@hatchet-dev/typescript-sdk 1.28.1 → 1.28.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +7 -7
- package/v1/declaration.js +6 -1
- package/v1/examples/batch_assign/workflow.js +6 -0
- package/version.d.ts +1 -1
- package/version.js +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hatchet-dev/typescript-sdk",
|
|
3
|
-
"version": "1.28.
|
|
3
|
+
"version": "1.28.2",
|
|
4
4
|
"description": "Background task orchestration & visibility for developers",
|
|
5
5
|
"types": "dist/index.d.ts",
|
|
6
6
|
"files": [
|
|
@@ -59,11 +59,11 @@
|
|
|
59
59
|
"@anthropic-ai/claude-agent-sdk": "^0.3.148",
|
|
60
60
|
"@grpc/grpc-js": "^1.14.3",
|
|
61
61
|
"@modelcontextprotocol/sdk": "^1.29.0",
|
|
62
|
-
"@openai/agents": "0.
|
|
62
|
+
"@openai/agents": "0.14.2",
|
|
63
63
|
"@opentelemetry/api": "^1.9.0",
|
|
64
64
|
"@opentelemetry/core": "^2.0.0",
|
|
65
|
-
"@opentelemetry/exporter-trace-otlp-grpc": "^0.
|
|
66
|
-
"@opentelemetry/instrumentation": "^0.
|
|
65
|
+
"@opentelemetry/exporter-trace-otlp-grpc": "^0.221.0",
|
|
66
|
+
"@opentelemetry/instrumentation": "^0.221.0",
|
|
67
67
|
"@opentelemetry/sdk-trace-base": "^2.0.0",
|
|
68
68
|
"prom-client": "^15.1.3",
|
|
69
69
|
"typedoc": "^0.28.17",
|
|
@@ -91,11 +91,11 @@
|
|
|
91
91
|
"@anthropic-ai/claude-agent-sdk": "^0.3.148",
|
|
92
92
|
"@grpc/grpc-js": "^1.14.3",
|
|
93
93
|
"@modelcontextprotocol/sdk": "^1.29.0",
|
|
94
|
-
"@openai/agents": "0.
|
|
94
|
+
"@openai/agents": "0.14.2",
|
|
95
95
|
"@opentelemetry/api": "^1.9.0",
|
|
96
96
|
"@opentelemetry/core": "^2.0.0",
|
|
97
|
-
"@opentelemetry/exporter-trace-otlp-grpc": "^0.
|
|
98
|
-
"@opentelemetry/instrumentation": "^0.
|
|
97
|
+
"@opentelemetry/exporter-trace-otlp-grpc": "^0.221.0",
|
|
98
|
+
"@opentelemetry/instrumentation": "^0.221.0",
|
|
99
99
|
"@opentelemetry/sdk-trace-base": "^2.0.0",
|
|
100
100
|
"prom-client": "^15.1.3"
|
|
101
101
|
},
|
package/v1/declaration.js
CHANGED
|
@@ -594,7 +594,12 @@ exports.WorkflowDeclaration = WorkflowDeclaration;
|
|
|
594
594
|
*/
|
|
595
595
|
class TaskWorkflowDeclaration extends BaseWorkflowDeclaration {
|
|
596
596
|
constructor(options, client) {
|
|
597
|
-
|
|
597
|
+
// strip out the concurrency options, because those do not need to be provided to the workflow options.
|
|
598
|
+
// if they are, it will cause the concurrency strategy to have a parentId (from the workflow that doesn't really exist)
|
|
599
|
+
// causing a fallback to the slow concurrency evaluation
|
|
600
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
601
|
+
const { concurrency } = options, workflowOpts = __rest(options, ["concurrency"]);
|
|
602
|
+
super(Object.assign({}, workflowOpts), client);
|
|
598
603
|
this._standalone_task_name = options.name;
|
|
599
604
|
this.definition._tasks.push(Object.assign({}, options));
|
|
600
605
|
}
|
|
@@ -11,6 +11,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.batchChildBatchSpawn = exports.batchChildSpawn = exports.childBatch = exports.child = exports.batchCancel = exports.batchBroadcast = exports.batchOrdered = exports.batchSingle = exports.batchLarge = exports.batchKeyedInterval = exports.batchKeyedFailable = exports.batchKeyed = exports.batchSimple = void 0;
|
|
13
13
|
const hatchet_client_1 = require("../hatchet-client");
|
|
14
|
+
// > Declaring a batch task
|
|
14
15
|
exports.batchSimple = hatchet_client_1.hatchet.batchTask({
|
|
15
16
|
name: 'batch-simple',
|
|
16
17
|
batch: { maxSize: 3, maxInterval: 200 },
|
|
@@ -22,6 +23,8 @@ exports.batchSimple = hatchet_client_1.hatchet.batchTask({
|
|
|
22
23
|
return out;
|
|
23
24
|
}),
|
|
24
25
|
});
|
|
26
|
+
// !!
|
|
27
|
+
// > Declaring a keyed batch task
|
|
25
28
|
exports.batchKeyed = hatchet_client_1.hatchet.batchTask({
|
|
26
29
|
name: 'batch-keyed',
|
|
27
30
|
batch: { maxSize: 2, maxInterval: 200, groupKey: 'input.group' },
|
|
@@ -40,6 +43,7 @@ exports.batchKeyed = hatchet_client_1.hatchet.batchTask({
|
|
|
40
43
|
return out;
|
|
41
44
|
}),
|
|
42
45
|
});
|
|
46
|
+
// !!
|
|
43
47
|
exports.batchKeyedFailable = hatchet_client_1.hatchet.batchTask({
|
|
44
48
|
name: 'batch-keyed-failable',
|
|
45
49
|
batch: { maxSize: 2, maxInterval: 200, groupKey: 'input.group' },
|
|
@@ -110,6 +114,7 @@ exports.batchOrdered = hatchet_client_1.hatchet.batchTask({
|
|
|
110
114
|
return out;
|
|
111
115
|
}),
|
|
112
116
|
});
|
|
117
|
+
// > Declaring a broadcast batch task
|
|
113
118
|
exports.batchBroadcast = hatchet_client_1.hatchet.batchTask({
|
|
114
119
|
name: 'batch-broadcast',
|
|
115
120
|
batch: { maxSize: 10, maxInterval: 2000, broadcastOutput: true },
|
|
@@ -118,6 +123,7 @@ exports.batchBroadcast = hatchet_client_1.hatchet.batchTask({
|
|
|
118
123
|
return { sum };
|
|
119
124
|
}),
|
|
120
125
|
});
|
|
126
|
+
// !!
|
|
121
127
|
exports.batchCancel = hatchet_client_1.hatchet.batchTask({
|
|
122
128
|
name: 'batch-cancel',
|
|
123
129
|
batch: { maxSize: 10, maxInterval: 2000, broadcastOutput: true },
|
package/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const HATCHET_VERSION = "1.28.
|
|
1
|
+
export declare const HATCHET_VERSION = "1.28.2";
|
package/version.js
CHANGED