@workflow-code/cli 0.2.4-20260921001 → 0.2.4-20260921003

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.
@@ -3856,6 +3856,7 @@ var desktop = {
3856
3856
  hideConversationList: "Hide conversation list",
3857
3857
  hideDiagnostic: "Hide {{label}}",
3858
3858
  hideFileList: "Hide file list",
3859
+ hideTaskList: "Hide task list",
3859
3860
  hideWorkflow: "Hide workflow",
3860
3861
  historyRunResult: "History run result",
3861
3862
  keyColumn: "Key",
@@ -4650,7 +4651,7 @@ var desktop = {
4650
4651
  builtinProgress: " {{percent}}%",
4651
4652
  connectingServer: "Connecting to Workflow Server...",
4652
4653
  conversationNotFoundRecovered: "The corresponding conversation was not found. The workspace is open; trying to locate the run record.",
4653
- developerAssistantDescription: "Based on OpenCode, create or maintain code and documents across the current workspace root and authorized linked roots, and remember stable preferences and workspace decisions on demand.",
4654
+ developerAssistantDescription: "Create or maintain code and documents across the current workspace root and authorized linked roots, and remember stable preferences and workspace decisions on demand.",
4654
4655
  developerAssistantLabel: "Developer assistant",
4655
4656
  developerAssistantSubtitle: "Workspace development assistant",
4656
4657
  diagramDiagnosticLabel: "Flowchart diagnostics",
@@ -8824,6 +8825,7 @@ var desktop2 = {
8824
8825
  hideConversationList: "\u9690\u85CF\u4F1A\u8BDD\u5217\u8868",
8825
8826
  hideDiagnostic: "\u6536\u8D77{{label}}",
8826
8827
  hideFileList: "\u9690\u85CF\u6587\u4EF6\u5217\u8868",
8828
+ hideTaskList: "\u9690\u85CF\u4EFB\u52A1\u5217\u8868",
8827
8829
  hideWorkflow: "\u9690\u85CF workflow",
8828
8830
  historyRunResult: "\u5386\u53F2\u6267\u884C\u7ED3\u679C",
8829
8831
  keyColumn: "\u952E",
@@ -9618,7 +9620,7 @@ var desktop2 = {
9618
9620
  builtinProgress: "\uFF0C{{percent}}%",
9619
9621
  connectingServer: "\u6B63\u5728\u8FDE\u63A5 Workflow Server...",
9620
9622
  conversationNotFoundRecovered: "\u672A\u627E\u5230\u5BF9\u5E94\u4F1A\u8BDD\uFF0C\u5DF2\u6253\u5F00\u5DE5\u4F5C\u533A\u5E76\u5C1D\u8BD5\u5B9A\u4F4D\u8FD0\u884C\u8BB0\u5F55\u3002",
9621
- developerAssistantDescription: "\u57FA\u4E8E OpenCode \u5728\u5F53\u524D\u5DE5\u4F5C\u533A\u6839\u76EE\u5F55\u53CA\u5DF2\u6388\u6743\u5173\u8054\u6839\u76EE\u5F55\u4E2D\u7EF4\u62A4\u4EE3\u7801\u548C\u6587\u6863\uFF0C\u5E76\u6309\u9700\u8BB0\u4F4F\u7A33\u5B9A\u504F\u597D\u4E0E\u5DE5\u4F5C\u533A\u51B3\u7B56\u3002",
9623
+ developerAssistantDescription: "\u5728\u5F53\u524D\u5DE5\u4F5C\u533A\u6839\u76EE\u5F55\u53CA\u5DF2\u6388\u6743\u5173\u8054\u6839\u76EE\u5F55\u4E2D\u7EF4\u62A4\u4EE3\u7801\u548C\u6587\u6863\uFF0C\u5E76\u6309\u9700\u8BB0\u4F4F\u7A33\u5B9A\u504F\u597D\u4E0E\u5DE5\u4F5C\u533A\u51B3\u7B56\u3002",
9622
9624
  developerAssistantLabel: "\u5C0F\u52A9\u624B",
9623
9625
  developerAssistantSubtitle: "\u5DE5\u4F5C\u533A\u5F00\u53D1\u52A9\u624B",
9624
9626
  diagramDiagnosticLabel: "\u6D41\u7A0B\u56FE\u8BCA\u65AD",
@@ -4,7 +4,7 @@ import {
4
4
  initI18n,
5
5
  isSupportedLocale,
6
6
  normalizeLocale
7
- } from "./chunk-5YS542FD.js";
7
+ } from "./chunk-2COJUGNI.js";
8
8
 
9
9
  // src/locale.ts
10
10
  import { WORKFLOW_RUNTIME_LOCALE_ENV } from "workflow-code";
package/dist/index.js CHANGED
@@ -1,11 +1,11 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  prepareCliInvocation
4
- } from "./chunk-FHLFK2CH.js";
4
+ } from "./chunk-4PNQMMWP.js";
5
5
  import {
6
6
  i18n,
7
7
  translateWorkflowCodeError
8
- } from "./chunk-5YS542FD.js";
8
+ } from "./chunk-2COJUGNI.js";
9
9
  import "./chunk-NSPRIPOP.js";
10
10
 
11
11
  // src/index.ts
@@ -24,12 +24,12 @@ async function main(argv = process.argv.slice(2)) {
24
24
  const prepared = prepareCliInvocation(argv);
25
25
  argv = prepared.argv;
26
26
  if (argv[0] === "workspace") {
27
- const workspaceCli = await import("./workspace-H5OFXHP3.js");
27
+ const workspaceCli = await import("./workspace-FBXSM443.js");
28
28
  await workspaceCli.main(argv.slice(1), { localeInitialized: true });
29
29
  return typeof process.exitCode === "number" ? process.exitCode : 0;
30
30
  }
31
31
  if (argv[0] === "mcp") {
32
- const mcpCli = await import("./mcp-K3U7RICE.js");
32
+ const mcpCli = await import("./mcp-EC7JFRIT.js");
33
33
  return mcpCli.main(argv.slice(1));
34
34
  }
35
35
  if (argv.length === 0 || argv[0] === "help" || argv[0] === "--help" || argv[0] === "-h") {
@@ -39,7 +39,7 @@ async function main(argv = process.argv.slice(2)) {
39
39
  }
40
40
  const { register } = await import("tsx/esm/api");
41
41
  register();
42
- const localCli = await import("./local-ZP3D5C2Q.js");
42
+ const localCli = await import("./local-7XY6XQ3G.js");
43
43
  return localCli.main(argv, { localeInitialized: true });
44
44
  }
45
45
  function formatHelp() {
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  prepareCliInvocation
4
- } from "./chunk-FHLFK2CH.js";
4
+ } from "./chunk-4PNQMMWP.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-5YS542FD.js";
15
+ } from "./chunk-2COJUGNI.js";
16
16
  import {
17
17
  __commonJS,
18
18
  __toESM
@@ -2043,6 +2043,77 @@ function readRequiredCoreVersion(manifest) {
2043
2043
  }
2044
2044
  return normalizeExactVersion(value, "Workflow Core requirement");
2045
2045
  }
2046
+ var EXACT_VERSION_PATTERN = /^\d+\.\d+\.\d+(?:-[0-9A-Za-z.-]+)?(?:\+[0-9A-Za-z.-]+)?$/u;
2047
+ var LOCAL_SPECIFIER_PATTERN = /^(?:file|link):(.*)$/u;
2048
+ function classifyVersionReference(manifest, packageName, { section = "devDependencies" } = {}) {
2049
+ if (!isRecord(manifest)) throw new Error("Workflow package.json root must be an object.");
2050
+ const dependencies = manifest[section];
2051
+ const label = `${section}.${packageName}`;
2052
+ const value = isRecord(dependencies) ? dependencies[packageName] : void 0;
2053
+ if (typeof value !== "string" || value.trim() === "") {
2054
+ throw new Error(`Workflow package.json must declare ${label} as an exact version.`);
2055
+ }
2056
+ const specifier = value.trim();
2057
+ const local = LOCAL_SPECIFIER_PATTERN.exec(specifier);
2058
+ if (local !== null) {
2059
+ const relative = local[1];
2060
+ if (!relative.startsWith("./") && !relative.startsWith("../")) {
2061
+ throw new Error(`${label} must use a relative file:/link: specifier, received ${specifier}.`);
2062
+ }
2063
+ return { kind: "local", specifier, relative };
2064
+ }
2065
+ if (!EXACT_VERSION_PATTERN.test(specifier)) {
2066
+ throw new Error(`${label} "${value}" must be an exact SemVer version.`);
2067
+ }
2068
+ return { kind: "exact", version: specifier, specifier };
2069
+ }
2070
+ function resolveReleaseMode(env = process.env) {
2071
+ const override = String(env.WORKFLOW_REPOSITORY_MODE ?? "").trim();
2072
+ if (override !== "" && override !== "main") {
2073
+ throw new Error("WORKFLOW_REPOSITORY_MODE only accepts main as a fail-closed override.");
2074
+ }
2075
+ if (override === "main") return "main";
2076
+ if (String(env.CI_COMMIT_TAG ?? "").trim() !== "") return "main";
2077
+ const branch = String(env.CI_COMMIT_BRANCH ?? env.CI_MERGE_REQUEST_SOURCE_BRANCH_NAME ?? "").trim();
2078
+ return branch === "main" || branch === "alpha" ? "main" : "dev";
2079
+ }
2080
+ function resolveSiblingDirectory(relative, repositoryDirectory) {
2081
+ const segments = String(repositoryDirectory).split("/").filter((segment) => segment !== "");
2082
+ if (segments.length === 0) throw new Error("The declaring repository directory is required.");
2083
+ for (const segment of String(relative).split("/")) {
2084
+ if (segment === "" || segment === ".") continue;
2085
+ if (segment === "..") {
2086
+ if (segments.length === 0) {
2087
+ throw new Error(`${relative} must stay inside the workspace root.`);
2088
+ }
2089
+ segments.pop();
2090
+ continue;
2091
+ }
2092
+ if (segment.includes("\\")) throw new Error(`${relative} must use forward slashes.`);
2093
+ segments.push(segment);
2094
+ }
2095
+ if (segments.length === 0) {
2096
+ throw new Error(`${relative} must point at a sibling repository, not the workspace root.`);
2097
+ }
2098
+ return segments.join("/");
2099
+ }
2100
+ function resolveRequiredCoreVersion(manifest, options) {
2101
+ const reference = classifyVersionReference(manifest, WORKFLOW_CORE_PACKAGE_NAME, {
2102
+ section: options.section ?? "devDependencies"
2103
+ });
2104
+ if (reference.kind === "exact") return normalizeExactVersion(reference.version, "Workflow Core requirement");
2105
+ if (options.mode === "main") {
2106
+ throw new Error(
2107
+ `devDependencies.${WORKFLOW_CORE_PACKAGE_NAME} must declare an exact published version on main and alpha; ${reference.specifier} is only allowed on dev and feature branches.`
2108
+ );
2109
+ }
2110
+ const siblingDirectory = resolveSiblingDirectory(reference.relative, options.repositoryDirectory);
2111
+ const sibling = options.readSiblingManifest(siblingDirectory);
2112
+ if (!isRecord(sibling) || sibling.name !== WORKFLOW_CORE_PACKAGE_NAME) {
2113
+ throw new Error(`${reference.specifier} must point at the sibling Core repository (${siblingDirectory}).`);
2114
+ }
2115
+ return normalizeExactVersion(String(sibling.version ?? ""), "Sibling Core version");
2116
+ }
2046
2117
  function normalizeExactVersion(value, label = "version") {
2047
2118
  const normalized = value.trim();
2048
2119
  const validVersion = import_semver.default.valid(normalized);
@@ -2378,13 +2449,20 @@ function runStructureCommand(argv) {
2378
2449
  return 1;
2379
2450
  }
2380
2451
  }
2381
- function assertLocalCliCoreCompatible(workflowDir, hostCoreVersion = readInstalledWorkflowCoreVersion()) {
2452
+ function assertLocalCliCoreCompatible(workflowDir, hostCoreVersion = readInstalledWorkflowCoreVersion(), options = {}) {
2382
2453
  const cliManifest = readJsonFile(new URL("../package.json", import.meta.url), "CLI package.json");
2383
2454
  const cliRequiredCoreVersion = readRequiredCoreVersion(cliManifest);
2384
2455
  assertCoreCompatibility(hostCoreVersion, cliRequiredCoreVersion);
2385
- const projectPackagePath = path.join(workflowDir, "package.json");
2386
- const projectManifest = readJsonFile(projectPackagePath, "Workflow package.json");
2387
- const projectRequiredCoreVersion = readRequiredCoreVersion(projectManifest);
2456
+ const projectDirectory = path.resolve(workflowDir);
2457
+ const projectManifest = readJsonFile(path.join(projectDirectory, "package.json"), "Workflow package.json");
2458
+ const projectRequiredCoreVersion = resolveRequiredCoreVersion(projectManifest, {
2459
+ mode: options.mode ?? resolveReleaseMode(),
2460
+ repositoryDirectory: path.basename(projectDirectory),
2461
+ readSiblingManifest: (siblingDirectory) => readJsonFile(
2462
+ path.join(path.dirname(projectDirectory), siblingDirectory, "package.json"),
2463
+ "Sibling Core package.json"
2464
+ )
2465
+ });
2388
2466
  assertCoreCompatibility(hostCoreVersion, projectRequiredCoreVersion);
2389
2467
  return { cliRequiredCoreVersion, projectRequiredCoreVersion };
2390
2468
  }
@@ -13,7 +13,7 @@ import {
13
13
  } from "./chunk-27OW6OJ3.js";
14
14
  import {
15
15
  i18n
16
- } from "./chunk-5YS542FD.js";
16
+ } from "./chunk-2COJUGNI.js";
17
17
  import {
18
18
  __commonJS,
19
19
  __export,
@@ -8,7 +8,7 @@ import {
8
8
  } from "./chunk-PGM3IPWA.js";
9
9
  import {
10
10
  prepareCliInvocation
11
- } from "./chunk-FHLFK2CH.js";
11
+ } from "./chunk-4PNQMMWP.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-5YS542FD.js";
21
+ } from "./chunk-2COJUGNI.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.4-20260921001",
3
+ "version": "0.2.4-20260921003",
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.4-20260909003"
23
+ "workflow-code": "0.2.4-20260921004"
24
24
  },
25
25
  "devDependencies": {
26
26
  "@types/node": "^25.6.0",
@@ -29,12 +29,12 @@
29
29
  "tsup": "^8.5.1",
30
30
  "typescript": "^6.0.3",
31
31
  "vitest": "^4.1.7",
32
- "workflow-code": "0.2.4-20260909003",
32
+ "workflow-code": "0.2.4-20260921004",
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
- "@workflow-code/project-dependencies": "0.1.0",
37
36
  "@workflow-code/openai-responses": "0.1.0",
37
+ "@workflow-code/project-dependencies": "0.1.0",
38
38
  "@workflow-code/project-info": "0.1.0",
39
39
  "@workflow-code/project-upload": "0.1.0",
40
40
  "@workflow-code/runtime-compatibility": "0.1.0",