@deepseek-ai/dsh-tool-workflow 0.2.1-alpha.2 → 0.2.1-alpha.3

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/lib/index.js CHANGED
@@ -210,11 +210,12 @@ function renderResult(name, agentsStarted, value, maxChars) {
210
210
  * @param ctx - plugin context (engine, optional jobs registry, logger).
211
211
  * @param args - the validated tool call.
212
212
  * @param parent - the calling agent; owns the job.
213
+ * @param toolCall - creating invocation, including its root call.
213
214
  * @param recordsRun - whether this top-level call records durable run events.
214
215
  * @param deps - the tool's recorder/mirror taps and the render cap.
215
216
  * @returns the background result for the tool's output schema.
216
217
  */
217
- function startBackgroundRun(ctx, args, parent, recordsRun, deps) {
218
+ function startBackgroundRun(ctx, args, parent, toolCall, recordsRun, deps) {
218
219
  const jobs = ctx.get("jobs");
219
220
  if (jobs === void 0) throw new Error("background jobs unavailable: load @deepseek-ai/dsh-jobs and @deepseek-ai/dsh-tool-jobs");
220
221
  let run;
@@ -224,6 +225,7 @@ function startBackgroundRun(ctx, args, parent, recordsRun, deps) {
224
225
  kind: "workflow",
225
226
  label: args.meta.name,
226
227
  owner: parent.id,
228
+ toolCall,
227
229
  run: (job) => {
228
230
  run = ctx.workflowEngine.start({
229
231
  script: args.script,
@@ -385,7 +387,10 @@ function apply(ctx, config) {
385
387
  if (!parent) throw new Error("workflow tool requires a calling agent (exec.agent was undefined)");
386
388
  if (args.run_in_background === true) {
387
389
  if (!enableRunInBackground) throw new Error("run_in_background is disabled for this tool");
388
- return startBackgroundRun(ctx, args, parent, exec.parent === void 0, {
390
+ return startBackgroundRun(ctx, args, parent, {
391
+ callId: exec.callId,
392
+ rootCallId: exec.rootCallId
393
+ }, exec.parent === void 0, {
389
394
  recorder,
390
395
  mirror,
391
396
  maxResultChars
@@ -177,11 +177,12 @@ function renderResult(name, agentsStarted, value, maxChars) {
177
177
  * @param ctx - plugin context (engine, optional jobs registry, logger).
178
178
  * @param args - the validated tool call.
179
179
  * @param parent - the calling agent; owns the job.
180
+ * @param toolCall - creating invocation, including its root call.
180
181
  * @param recordsRun - whether this top-level call records durable run events.
181
182
  * @param deps - the tool's recorder/mirror taps and the render cap.
182
183
  * @returns the background result for the tool's output schema.
183
184
  */
184
- function startBackgroundRun(ctx, args, parent, recordsRun, deps) {
185
+ function startBackgroundRun(ctx, args, parent, toolCall, recordsRun, deps) {
185
186
  const jobs = ctx.get('jobs');
186
187
  if (jobs === undefined) {
187
188
  throw new Error('background jobs unavailable: load @deepseek-ai/dsh-jobs and @deepseek-ai/dsh-tool-jobs');
@@ -191,6 +192,7 @@ function startBackgroundRun(ctx, args, parent, recordsRun, deps) {
191
192
  kind: 'workflow',
192
193
  label: args.meta.name,
193
194
  owner: parent.id,
195
+ toolCall,
194
196
  run: (job) => {
195
197
  // A synchronous engine rejection (META_INVALID/SCRIPT_PARSE) propagates
196
198
  // out of the starter, so the registry registers nothing and the model
@@ -337,7 +339,7 @@ export function apply(ctx, config) {
337
339
  // jobs.start synchronously from there. The shell tools await a
338
340
  // sandbox escalation approval before registering, which is the window
339
341
  // their check covers.
340
- return startBackgroundRun(ctx, args, parent, exec.parent === undefined, {
342
+ return startBackgroundRun(ctx, args, parent, { callId: exec.callId, rootCallId: exec.rootCallId }, exec.parent === undefined, {
341
343
  recorder,
342
344
  mirror,
343
345
  maxResultChars,
package/locale/en.json ADDED
@@ -0,0 +1,5 @@
1
+ {
2
+ "meta": {
3
+ "title": "tool-workflow"
4
+ }
5
+ }
package/locale/zh.json ADDED
@@ -0,0 +1,6 @@
1
+ {
2
+ "meta": {
3
+ "title": "工作流工具",
4
+ "description": "让 AI 编写并运行 JavaScript 脚本,编排多项工具操作。"
5
+ }
6
+ }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@deepseek-ai/dsh-tool-workflow",
3
3
  "description": "Model-facing workflow tool: run a JavaScript orchestration script over ctx.workflowEngine",
4
- "version": "0.2.1-alpha.2",
4
+ "version": "0.2.1-alpha.3",
5
5
  "publishConfig": {
6
6
  "access": "public"
7
7
  },
@@ -23,41 +23,43 @@
23
23
  "default": "./lib/types/types.js"
24
24
  },
25
25
  "./src/*": "./src/*",
26
- "./package.json": "./package.json"
26
+ "./package.json": "./package.json",
27
+ "./locale/*.json": "./locale/*.json"
27
28
  },
28
29
  "files": [
30
+ "locale/*.json",
29
31
  "lib/index.js",
30
32
  "lib/types/**/*.js",
31
33
  "lib/types/**/*.d.ts"
32
34
  ],
33
35
  "license": "MIT",
34
36
  "peerDependencies": {
35
- "@deepseek-ai/cordis": "~4.0.5-alpha.1",
36
- "@deepseek-ai/dsh-agent": "0.2.1-alpha.2",
37
- "@deepseek-ai/dsh-jobs": "0.2.1-alpha.2",
38
- "@deepseek-ai/dsh-llm": "0.2.1-alpha.2",
39
- "@deepseek-ai/dsh-session": "0.2.1-alpha.2",
40
- "@deepseek-ai/dsh-system-prompt": "0.2.1-alpha.2",
41
- "@deepseek-ai/dsh-tools": "0.2.1-alpha.2",
42
- "@deepseek-ai/dsh-workflow": "0.2.1-alpha.2"
37
+ "@deepseek-ai/cordis": "~4.0.5-alpha.2",
38
+ "@deepseek-ai/dsh-agent": "0.2.1-alpha.3",
39
+ "@deepseek-ai/dsh-jobs": "0.2.1-alpha.3",
40
+ "@deepseek-ai/dsh-llm": "0.2.1-alpha.3",
41
+ "@deepseek-ai/dsh-session": "0.2.1-alpha.3",
42
+ "@deepseek-ai/dsh-system-prompt": "0.2.1-alpha.3",
43
+ "@deepseek-ai/dsh-tools": "0.2.1-alpha.3",
44
+ "@deepseek-ai/dsh-workflow": "0.2.1-alpha.3"
43
45
  },
44
46
  "dependencies": {
45
- "@deepseek-ai/schemastery": "~3.18.5-alpha.1"
47
+ "@deepseek-ai/schemastery": "~3.18.5-alpha.2"
46
48
  },
47
49
  "devDependencies": {
48
- "@deepseek-ai/cordis": "~4.0.5-alpha.1",
49
- "@deepseek-ai/dsh-agent": "0.2.1-alpha.2",
50
- "@deepseek-ai/dsh-agent-loop-testkit": "0.2.1-alpha.2",
51
- "@deepseek-ai/dsh-jobs": "0.2.1-alpha.2",
52
- "@deepseek-ai/dsh-jobs-local": "0.2.1-alpha.2",
53
- "@deepseek-ai/dsh-llm": "0.2.1-alpha.2",
54
- "@deepseek-ai/dsh-session": "0.2.1-alpha.2",
55
- "@deepseek-ai/dsh-session-projection": "0.2.1-alpha.2",
56
- "@deepseek-ai/dsh-subagent": "0.2.1-alpha.2",
57
- "@deepseek-ai/dsh-system-prompt": "0.2.1-alpha.2",
58
- "@deepseek-ai/dsh-tool-jobs": "0.2.1-alpha.2",
59
- "@deepseek-ai/dsh-tools": "0.2.1-alpha.2",
60
- "@deepseek-ai/dsh-workflow": "0.2.1-alpha.2",
61
- "@deepseek-ai/dsh-workflow-ptc": "0.2.1-alpha.2"
50
+ "@deepseek-ai/cordis": "~4.0.5-alpha.2",
51
+ "@deepseek-ai/dsh-agent": "0.2.1-alpha.3",
52
+ "@deepseek-ai/dsh-agent-loop-testkit": "0.2.1-alpha.3",
53
+ "@deepseek-ai/dsh-jobs": "0.2.1-alpha.3",
54
+ "@deepseek-ai/dsh-jobs-local": "0.2.1-alpha.3",
55
+ "@deepseek-ai/dsh-llm": "0.2.1-alpha.3",
56
+ "@deepseek-ai/dsh-session": "0.2.1-alpha.3",
57
+ "@deepseek-ai/dsh-session-projection": "0.2.1-alpha.3",
58
+ "@deepseek-ai/dsh-subagent": "0.2.1-alpha.3",
59
+ "@deepseek-ai/dsh-system-prompt": "0.2.1-alpha.3",
60
+ "@deepseek-ai/dsh-tool-jobs": "0.2.1-alpha.3",
61
+ "@deepseek-ai/dsh-tools": "0.2.1-alpha.3",
62
+ "@deepseek-ai/dsh-workflow": "0.2.1-alpha.3",
63
+ "@deepseek-ai/dsh-workflow-ptc": "0.2.1-alpha.3"
62
64
  }
63
65
  }