@workflow-code/cli 0.2.3-20260901001 → 0.2.3-20260902001

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.
@@ -4,7 +4,7 @@ import {
4
4
  initI18n,
5
5
  isSupportedLocale,
6
6
  normalizeLocale
7
- } from "./chunk-TCYG46PO.js";
7
+ } from "./chunk-PSXLDKGX.js";
8
8
 
9
9
  // src/locale.ts
10
10
  import { WORKFLOW_RUNTIME_LOCALE_ENV } from "workflow-code";
@@ -3307,6 +3307,7 @@ var desktop = {
3307
3307
  hideHomeSidebar: "Hide home sidebar",
3308
3308
  homeProjectMode: "Home workspace mode",
3309
3309
  homeSidebar: "Home sidebar",
3310
+ userHomeDirectory: "User home directory",
3310
3311
  importLocal: "Import local",
3311
3312
  importLocalFolder: "Open folder",
3312
3313
  importLocalFolderUploadTitle: "Select a local workflow folder and upload it as a server draft",
@@ -4462,7 +4463,7 @@ var desktop = {
4462
4463
  assistantHideAria: "Developer assistant: hide the workspace development conversation",
4463
4464
  assistantHideTitle: "Hide the developer assistant",
4464
4465
  assistantInstallFailed: "Failed to install the developer assistant. Please retry.",
4465
- assistantLocalOnly: "The developer assistant only supports local editable projects and folders.",
4466
+ assistantLocalOnly: "The developer assistant only supports the user home directory, local editable projects, and folders.",
4466
4467
  assistantOpenAria: "Developer assistant: open the workspace development conversation",
4467
4468
  assistantOpenTitle: "Open the developer assistant",
4468
4469
  assistantPreparingDetail: "Checking built-in dependencies and loading the conversation workspace.",
@@ -7838,6 +7839,7 @@ var desktop2 = {
7838
7839
  hideHomeSidebar: "\u9690\u85CF\u9996\u9875\u4FA7\u8FB9\u680F",
7839
7840
  homeProjectMode: "\u9996\u9875\u5DE5\u4F5C\u533A\u6A21\u5F0F",
7840
7841
  homeSidebar: "\u9996\u9875\u4FA7\u8FB9\u680F",
7842
+ userHomeDirectory: "\u7528\u6237\u4E3B\u76EE\u5F55",
7841
7843
  importLocal: "\u5BFC\u5165\u672C\u5730",
7842
7844
  importLocalFolder: "\u6253\u5F00\u6587\u4EF6\u5939",
7843
7845
  importLocalFolderUploadTitle: "\u9009\u62E9\u672C\u5730 workflow \u6587\u4EF6\u5939\u5E76\u4E0A\u4F20\u4E3A\u670D\u52A1\u5668\u8349\u7A3F",
@@ -8993,7 +8995,7 @@ var desktop2 = {
8993
8995
  assistantHideAria: "\u5C0F\u52A9\u624B\uFF1A\u9690\u85CF\u5DE5\u4F5C\u533A\u5F00\u53D1\u5BF9\u8BDD",
8994
8996
  assistantHideTitle: "\u9690\u85CF\u5C0F\u52A9\u624B",
8995
8997
  assistantInstallFailed: "\u5C0F\u52A9\u624B\u5B89\u88C5\u5931\u8D25\uFF0C\u8BF7\u91CD\u8BD5\u3002",
8996
- assistantLocalOnly: "\u5C0F\u52A9\u624B\u4EC5\u652F\u6301\u672C\u5730\u53EF\u7F16\u8F91\u9879\u76EE\u548C\u666E\u901A\u6587\u4EF6\u5939\u3002",
8998
+ assistantLocalOnly: "\u5C0F\u52A9\u624B\u4EC5\u652F\u6301\u7528\u6237\u4E3B\u76EE\u5F55\u3001\u672C\u5730\u53EF\u7F16\u8F91\u9879\u76EE\u548C\u666E\u901A\u6587\u4EF6\u5939\u3002",
8997
8999
  assistantOpenAria: "\u5C0F\u52A9\u624B\uFF1A\u6253\u5F00\u5DE5\u4F5C\u533A\u5F00\u53D1\u5BF9\u8BDD",
8998
9000
  assistantOpenTitle: "\u6253\u5F00\u5C0F\u52A9\u624B",
8999
9001
  assistantPreparingDetail: "\u6B63\u5728\u68C0\u67E5\u5185\u7F6E\u4F9D\u8D56\u5E76\u52A0\u8F7D\u5BF9\u8BDD\u5DE5\u4F5C\u533A\u3002",
package/dist/index.js CHANGED
@@ -1,11 +1,11 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  prepareCliInvocation
4
- } from "./chunk-DPFPLLLT.js";
4
+ } from "./chunk-PPZ35MOY.js";
5
5
  import {
6
6
  i18n,
7
7
  translateWorkflowCodeError
8
- } from "./chunk-TCYG46PO.js";
8
+ } from "./chunk-PSXLDKGX.js";
9
9
  import "./chunk-NSPRIPOP.js";
10
10
 
11
11
  // src/index.ts
@@ -17,18 +17,18 @@ async function main(argv = process.argv.slice(2)) {
17
17
  const writeProtocolLine = isolateOpenAIRunnerStdout();
18
18
  const { register: register2 } = await import("tsx/esm/api");
19
19
  register2();
20
- const runner = await import("./openai-responses-runner-2MPK3UAP.js");
20
+ const runner = await import("./openai-responses-runner-K3HF3XOG.js");
21
21
  return runner.main({ writeProtocolLine });
22
22
  }
23
23
  const prepared = prepareCliInvocation(argv);
24
24
  argv = prepared.argv;
25
25
  if (argv[0] === "workspace") {
26
- const workspaceCli = await import("./workspace-4DAJK3ZR.js");
26
+ const workspaceCli = await import("./workspace-J3C6D5W5.js");
27
27
  await workspaceCli.main(argv.slice(1), { localeInitialized: true });
28
28
  return typeof process.exitCode === "number" ? process.exitCode : 0;
29
29
  }
30
30
  if (argv[0] === "mcp") {
31
- const mcpCli = await import("./mcp-PNIRX64G.js");
31
+ const mcpCli = await import("./mcp-SGAVKGVX.js");
32
32
  return mcpCli.main(argv.slice(1));
33
33
  }
34
34
  if (argv.length === 0 || argv[0] === "help" || argv[0] === "--help" || argv[0] === "-h") {
@@ -38,7 +38,7 @@ async function main(argv = process.argv.slice(2)) {
38
38
  }
39
39
  const { register } = await import("tsx/esm/api");
40
40
  register();
41
- const localCli = await import("./local-R4Q7NLP6.js");
41
+ const localCli = await import("./local-YVQXAXWF.js");
42
42
  return localCli.main(argv, { localeInitialized: true });
43
43
  }
44
44
  function formatHelp() {
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  prepareCliInvocation
4
- } from "./chunk-DPFPLLLT.js";
4
+ } from "./chunk-PPZ35MOY.js";
5
5
  import {
6
6
  createCliRelatedProjectRuntime,
7
7
  parseCliRelatedProjectSpec
@@ -12,7 +12,7 @@ import {
12
12
  import {
13
13
  i18n,
14
14
  translateWorkflowCodeError
15
- } from "./chunk-TCYG46PO.js";
15
+ } from "./chunk-PSXLDKGX.js";
16
16
  import {
17
17
  __commonJS,
18
18
  __toESM
@@ -13,7 +13,7 @@ import {
13
13
  } from "./chunk-27OW6OJ3.js";
14
14
  import {
15
15
  i18n
16
- } from "./chunk-TCYG46PO.js";
16
+ } from "./chunk-PSXLDKGX.js";
17
17
  import {
18
18
  __commonJS,
19
19
  __export,
@@ -25559,68 +25559,87 @@ async function resolveWorkflowMcpInteractions(server, options, entrypoint, initi
25559
25559
  requestedSchema: workflowParamsToMcpElicitationSchema(pending.params, pending.defaultValues)
25560
25560
  }, { signal, relatedRequestId });
25561
25561
  } catch (error51) {
25562
- if (signal.aborted) {
25563
- await options.runner.cancel?.({
25564
- projectId: options.projectId,
25565
- entrypointId: entrypoint.id,
25566
- entrypointTitle: entrypoint.title,
25567
- runId: report.runId,
25568
- requestId: pending.requestId,
25569
- reason: "request_cancelled",
25570
- signal
25571
- });
25572
- }
25562
+ await cancelWorkflowMcpWaitingRun(
25563
+ options,
25564
+ entrypoint,
25565
+ report,
25566
+ pending,
25567
+ signal.aborted ? "request_cancelled" : "elicitation_failed",
25568
+ signal
25569
+ );
25573
25570
  throw error51;
25574
25571
  }
25575
25572
  if (elicited.action !== "accept") {
25576
- await options.runner.cancel?.({
25573
+ await cancelWorkflowMcpWaitingRun(
25574
+ options,
25575
+ entrypoint,
25576
+ report,
25577
+ pending,
25578
+ elicited.action === "decline" ? "elicitation_declined" : "elicitation_cancelled",
25579
+ signal
25580
+ );
25581
+ return workflowReportToMcpInteractionDeclined(report, entrypoint, elicited.action);
25582
+ }
25583
+ try {
25584
+ if (!elicited.content) {
25585
+ throw new McpError(ErrorCode.InvalidParams, "Accepted elicitation response did not contain form data.");
25586
+ }
25587
+ const parsed = await workflowParamsToMcpInputSchema(pending.params, "local").safeParseAsync(elicited.content);
25588
+ if (!parsed.success) {
25589
+ throw new McpError(ErrorCode.InvalidParams, `Invalid elicitation response: ${parsed.error.message}`);
25590
+ }
25591
+ await options.beforeRun?.({
25592
+ projectId: options.projectId,
25593
+ entrypointId: entrypoint.id,
25594
+ runId: report.runId,
25595
+ signal
25596
+ });
25597
+ await Promise.resolve(options.onAudit?.({
25598
+ type: "tool_call_resumed",
25599
+ projectId: options.projectId,
25600
+ entrypointId: entrypoint.id,
25601
+ runId: report.runId,
25602
+ requestId: pending.requestId
25603
+ })).catch(() => void 0);
25604
+ const resumed = await options.runner.resume({
25577
25605
  projectId: options.projectId,
25578
25606
  entrypointId: entrypoint.id,
25579
25607
  entrypointTitle: entrypoint.title,
25580
25608
  runId: report.runId,
25581
25609
  requestId: pending.requestId,
25582
- reason: elicited.action === "decline" ? "elicitation_declined" : "elicitation_cancelled",
25610
+ nodeName: pending.nodeName,
25611
+ values: parsed.data,
25583
25612
  signal
25584
25613
  });
25585
- return workflowReportToMcpInteractionDeclined(report, entrypoint, elicited.action);
25586
- }
25587
- if (!elicited.content) {
25588
- throw new McpError(ErrorCode.InvalidParams, "Accepted elicitation response did not contain form data.");
25589
- }
25590
- const parsed = await workflowParamsToMcpInputSchema(pending.params, "local").safeParseAsync(elicited.content);
25591
- if (!parsed.success) {
25592
- throw new McpError(ErrorCode.InvalidParams, `Invalid elicitation response: ${parsed.error.message}`);
25593
- }
25594
- await options.beforeRun?.({
25595
- projectId: options.projectId,
25596
- entrypointId: entrypoint.id,
25597
- runId: report.runId,
25598
- signal
25599
- });
25600
- await Promise.resolve(options.onAudit?.({
25601
- type: "tool_call_resumed",
25602
- projectId: options.projectId,
25603
- entrypointId: entrypoint.id,
25604
- runId: report.runId,
25605
- requestId: pending.requestId
25606
- })).catch(() => void 0);
25607
- const resumed = await options.runner.resume({
25608
- projectId: options.projectId,
25609
- entrypointId: entrypoint.id,
25610
- entrypointTitle: entrypoint.title,
25611
- runId: report.runId,
25612
- requestId: pending.requestId,
25613
- nodeName: pending.nodeName,
25614
- values: parsed.data,
25615
- signal
25616
- });
25617
- if (resumed.runId !== report.runId) {
25618
- throw new Error("Workflow MCP resume changed the run ID.");
25614
+ if (resumed.runId !== report.runId) {
25615
+ throw new Error("Workflow MCP resume changed the run ID.");
25616
+ }
25617
+ report = resumed;
25618
+ } catch (error51) {
25619
+ await cancelWorkflowMcpWaitingRun(
25620
+ options,
25621
+ entrypoint,
25622
+ report,
25623
+ pending,
25624
+ signal.aborted ? "request_cancelled" : "elicitation_failed",
25625
+ signal
25626
+ );
25627
+ throw error51;
25619
25628
  }
25620
- report = resumed;
25621
25629
  }
25622
25630
  return report;
25623
25631
  }
25632
+ async function cancelWorkflowMcpWaitingRun(options, entrypoint, report, pending, reason, signal) {
25633
+ await options.runner.cancel?.({
25634
+ projectId: options.projectId,
25635
+ entrypointId: entrypoint.id,
25636
+ entrypointTitle: entrypoint.title,
25637
+ runId: report.runId,
25638
+ requestId: pending.requestId,
25639
+ reason,
25640
+ signal
25641
+ });
25642
+ }
25624
25643
  function workflowReportToInvalidPendingInput(report, entrypoint) {
25625
25644
  return {
25626
25645
  ...report,
@@ -26166,7 +26185,7 @@ var WorkflowMcpCliRunner = class {
26166
26185
  const state = this.resumeStates.get(request.runId);
26167
26186
  this.resumeStates.delete(request.runId);
26168
26187
  if (state === void 0) return;
26169
- const reason = request.reason === "elicitation_declined" ? "The user declined the requested workflow input." : request.reason === "elicitation_cancelled" ? "The user cancelled the requested workflow input." : "The MCP request was cancelled.";
26188
+ const reason = request.reason === "elicitation_declined" ? "The user declined the requested workflow input." : request.reason === "elicitation_cancelled" ? "The user cancelled the requested workflow input." : request.reason === "elicitation_failed" ? "The MCP elicitation response could not be processed." : "The MCP request was cancelled.";
26170
26189
  await this.recordAbortedResumeState(request.runId, state, reason);
26171
26190
  }
26172
26191
  async close() {
@@ -8,7 +8,7 @@ import {
8
8
  } from "./chunk-PGM3IPWA.js";
9
9
  import {
10
10
  prepareCliInvocation
11
- } from "./chunk-DPFPLLLT.js";
11
+ } from "./chunk-PPZ35MOY.js";
12
12
  import {
13
13
  isWorkflowUuid,
14
14
  readWorkflowProjectInfo,
@@ -18,7 +18,7 @@ import {
18
18
  getCurrentLocale,
19
19
  i18n,
20
20
  translateWorkflowCodeError
21
- } from "./chunk-TCYG46PO.js";
21
+ } from "./chunk-PSXLDKGX.js";
22
22
  import {
23
23
  __commonJS,
24
24
  __toESM
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@workflow-code/cli",
3
- "version": "0.2.3-20260901001",
3
+ "version": "0.2.3-20260902001",
4
4
  "type": "module",
5
5
  "bin": {
6
6
  "workflow-code": "./dist/index.js"
@@ -20,7 +20,7 @@
20
20
  "zod": "4.4.3"
21
21
  },
22
22
  "peerDependencies": {
23
- "workflow-code": "0.2.3-20260901001"
23
+ "workflow-code": "0.2.3-20260902001"
24
24
  },
25
25
  "devDependencies": {
26
26
  "@types/node": "^25.6.0",
@@ -29,15 +29,15 @@
29
29
  "tsup": "^8.5.1",
30
30
  "typescript": "^6.0.3",
31
31
  "vitest": "^4.1.7",
32
- "workflow-code": "0.2.3-20260901001",
32
+ "workflow-code": "0.2.3-20260902001",
33
33
  "@workflow-code/auth-config": "0.1.0",
34
34
  "@workflow-code/execution-targets": "0.1.0",
35
35
  "@workflow-code/i18n": "0.1.0",
36
36
  "@workflow-code/openai-responses": "0.1.0",
37
37
  "@workflow-code/project-dependencies": "0.1.0",
38
38
  "@workflow-code/project-info": "0.1.0",
39
- "@workflow-code/runtime-compatibility": "0.1.0",
40
39
  "@workflow-code/project-upload": "0.1.0",
40
+ "@workflow-code/runtime-compatibility": "0.1.0",
41
41
  "@workflow-code/workflow-ids": "0.1.0",
42
42
  "@workflow-code/workflow-mcp": "0.1.0"
43
43
  },