Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions packages/client/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,27 @@
# @temporal-contract/client

## 8.0.0-beta.14

### Minor Changes

- 29c8bc3: Run a contract's global activity as a **standalone activity**, with no workflow around it (Temporal Server ≥ 1.32):

```ts
const result = await client.for(pdfContract).executeActivity("renderInvoice", {
activityId: `invoice-${invoiceId}`,
args: { invoiceId },
});
```

`ContractClient` gains `startActivity`, `executeActivity` and `getActivityHandle`. The task queue comes from the contract, `args` is validated before the start, and the result is parsed against the output schema. The handle's `result()` decodes the activity's declared errors into typed `ContractError`s and reports the outcomes as first-class errors: `ActivityCancelledError`, `ActivityTerminatedError`, `ActivityTimeoutError`, otherwise `ActivityFailedError`. `describe`, `cancel` and `terminate` err with `ActivityExecutionNotFoundError`, and a duplicate start with `ActivityAlreadyStartedError`. The activity's contract-level `activityOptions` are the call's defaults, and the merged options need a per-attempt and a total bound. New pattern groups: `ACTIVITY_START_PATTERNS`, `ACTIVITY_RESULT_PATTERNS`, `ACTIVITY_EXECUTE_PATTERNS`.

The worker side needs nothing new: `declareActivitiesHandler` already registers each activity under its name on the contract's queue.

### Patch Changes

- Updated dependencies [29c8bc3]
- @temporal-contract/contract@8.0.0-beta.14

## 8.0.0-beta.13

### Patch Changes
Expand Down
4 changes: 2 additions & 2 deletions packages/client/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@temporal-contract/client",
"version": "8.0.0-beta.13",
"version": "8.0.0-beta.14",
"description": "Client utilities with unthrown Result/AsyncResult for consuming temporal-contract workflows",
"keywords": [
"client",
Expand Down Expand Up @@ -70,7 +70,7 @@
"zod": "catalog:"
},
"peerDependencies": {
"@temporal-contract/contract": "^8.0.0-beta.13",
"@temporal-contract/contract": "^8.0.0-beta.14",
"@temporalio/client": "^1.24.0",
"@temporalio/common": "^1.24.0",
"unthrown": "^5.11.0"
Expand Down
17 changes: 17 additions & 0 deletions packages/contract/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,22 @@
# @temporal-contract/contract

## 8.0.0-beta.14

### Patch Changes

- 29c8bc3: Run a contract's global activity as a **standalone activity**, with no workflow around it (Temporal Server ≥ 1.32):

```ts
const result = await client.for(pdfContract).executeActivity("renderInvoice", {
activityId: `invoice-${invoiceId}`,
args: { invoiceId },
});
```

`ContractClient` gains `startActivity`, `executeActivity` and `getActivityHandle`. The task queue comes from the contract, `args` is validated before the start, and the result is parsed against the output schema. The handle's `result()` decodes the activity's declared errors into typed `ContractError`s and reports the outcomes as first-class errors: `ActivityCancelledError`, `ActivityTerminatedError`, `ActivityTimeoutError`, otherwise `ActivityFailedError`. `describe`, `cancel` and `terminate` err with `ActivityExecutionNotFoundError`, and a duplicate start with `ActivityAlreadyStartedError`. The activity's contract-level `activityOptions` are the call's defaults, and the merged options need a per-attempt and a total bound. New pattern groups: `ACTIVITY_START_PATTERNS`, `ACTIVITY_RESULT_PATTERNS`, `ACTIVITY_EXECUTE_PATTERNS`.

The worker side needs nothing new: `declareActivitiesHandler` already registers each activity under its name on the contract's queue.

## 8.0.0-beta.13

No changes in this release.
Expand Down
2 changes: 1 addition & 1 deletion packages/contract/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@temporal-contract/contract",
"version": "8.0.0-beta.13",
"version": "8.0.0-beta.14",
"description": "Contract builder for temporal-contract",
"keywords": [
"contract",
Expand Down
10 changes: 10 additions & 0 deletions packages/testing/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
# @temporal-contract/testing

## 8.0.0-beta.14

### Patch Changes

- Updated dependencies [29c8bc3]
- Updated dependencies [29c8bc3]
- @temporal-contract/client@8.0.0-beta.14
- @temporal-contract/contract@8.0.0-beta.14
- @temporal-contract/worker@8.0.0-beta.14

## 8.0.0-beta.13

### Patch Changes
Expand Down
8 changes: 4 additions & 4 deletions packages/testing/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@temporal-contract/testing",
"version": "8.0.0-beta.13",
"version": "8.0.0-beta.14",
"description": "Temporal testing utilities",
"keywords": [
"contract",
Expand Down Expand Up @@ -88,9 +88,9 @@
"zod": "catalog:"
},
"peerDependencies": {
"@temporal-contract/client": "^8.0.0-beta.13",
"@temporal-contract/contract": "^8.0.0-beta.13",
"@temporal-contract/worker": "^8.0.0-beta.13",
"@temporal-contract/client": "^8.0.0-beta.14",
"@temporal-contract/contract": "^8.0.0-beta.14",
"@temporal-contract/worker": "^8.0.0-beta.14",
"@temporalio/client": "^1.24.0",
"@temporalio/testing": "^1.24.0",
"@temporalio/worker": "^1.24.0",
Expand Down
19 changes: 19 additions & 0 deletions packages/worker/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,24 @@
# @temporal-contract/worker

## 8.0.0-beta.14

### Minor Changes

- 29c8bc3: `context.executeActivity(contract, activityName, { args, ...options })` calls a global activity of any contract on **that contract's task queue**, typically an activity-only contract served by a dedicated worker pool:

```ts
const { url } = await propagateFailure(
context.executeActivity(pdfContract, "renderInvoice", { args: { invoiceId } }),
);
```

The queue name is written once, on the contract whose worker polls it, instead of in an `activityOptionsByName` entry per calling workflow (#452). The call validates and classifies like `context.activities.X`. Options merge `declareWorkflow`'s `activityOptions` → the activity's contract-level `activityOptions` → the per-call options, and must carry a per-attempt and a total bound.

### Patch Changes

- Updated dependencies [29c8bc3]
- @temporal-contract/contract@8.0.0-beta.14

## 8.0.0-beta.13

### Patch Changes
Expand Down
4 changes: 2 additions & 2 deletions packages/worker/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@temporal-contract/worker",
"version": "8.0.0-beta.13",
"version": "8.0.0-beta.14",
"description": "Worker utilities with unthrown Result/AsyncResult for implementing temporal-contract workflows and activities",
"keywords": [
"contract",
Expand Down Expand Up @@ -80,7 +80,7 @@
"zod": "catalog:"
},
"peerDependencies": {
"@temporal-contract/contract": "^8.0.0-beta.13",
"@temporal-contract/contract": "^8.0.0-beta.14",
"@temporalio/common": "^1.24.0",
"@temporalio/worker": "^1.24.0",
"@temporalio/workflow": "^1.24.0",
Expand Down
Loading