@workflow-code/cli 0.2.4-20260921004.codex-ai-model-attributes → 0.2.4-20260922001

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.
@@ -2280,6 +2280,16 @@ var common = {
2280
2280
  toolPermissionAutoApprove: "Auto approve",
2281
2281
  toolPermissionEnableTool: "Enable {{name}}",
2282
2282
  toolPermissionAutoApproveTool: "Auto approve {{name}}",
2283
+ systemAiUsage: "System AI",
2284
+ systemAiPlanCount: "{{count}} plans",
2285
+ systemAiNoPlans: "No subscription plans",
2286
+ systemAiBalance: "Account balance",
2287
+ systemAiDailyQuota: "Daily quota",
2288
+ systemAiWeeklyQuota: "Weekly quota",
2289
+ systemAiMonthlyQuota: "Monthly quota",
2290
+ systemAiUnlimited: "Unlimited",
2291
+ systemAiRefresh: "Refresh usage",
2292
+ systemAiLoadFailed: "Unable to read the system AI configuration.",
2283
2293
  advancedOptions: "Advanced options",
2284
2294
  advancedInputs: "Advanced inputs",
2285
2295
  closeAdvancedOptions: "Close advanced options",
@@ -3712,6 +3722,11 @@ var desktop = {
3712
3722
  accessModeAll: "All keys",
3713
3723
  accessModePrefixes: "Prefixes",
3714
3724
  accessPrefixesPlaceholder: "For example: data., cache.",
3725
+ knowledgeAccess: "Knowledge",
3726
+ knowledgeReadAccess: "Read Knowledge",
3727
+ knowledgeWriteAccess: "Write Knowledge",
3728
+ entrypointAccess: "Callable entrypoints",
3729
+ entrypointAccessDescription: "An entrypoint runs the other project in the caller's name: that user has to be able to run it, and the run is recorded as theirs.",
3715
3730
  publishNewVersion: "Publish new version",
3716
3731
  releaseConfiguration: "Release configuration",
3717
3732
  releaseConfigurationDescription: "These options come from the current package.json and are read-only here.",
@@ -7249,6 +7264,16 @@ var common2 = {
7249
7264
  toolPermissionAutoApprove: "\u81EA\u52A8\u6279\u51C6",
7250
7265
  toolPermissionEnableTool: "{{name}} \u542F\u7528\u5DE5\u5177",
7251
7266
  toolPermissionAutoApproveTool: "{{name}} \u81EA\u52A8\u6279\u51C6",
7267
+ systemAiUsage: "\u7CFB\u7EDF AI",
7268
+ systemAiPlanCount: "{{count}} \u4E2A\u5957\u9910",
7269
+ systemAiNoPlans: "\u672A\u8BA2\u9605\u5957\u9910",
7270
+ systemAiBalance: "\u8D26\u6237\u4F59\u989D",
7271
+ systemAiDailyQuota: "\u6BCF\u65E5\u989D\u5EA6",
7272
+ systemAiWeeklyQuota: "\u6BCF\u5468\u989D\u5EA6",
7273
+ systemAiMonthlyQuota: "\u6BCF\u6708\u989D\u5EA6",
7274
+ systemAiUnlimited: "\u4E0D\u9650",
7275
+ systemAiRefresh: "\u5237\u65B0\u7528\u91CF",
7276
+ systemAiLoadFailed: "\u65E0\u6CD5\u8BFB\u53D6\u7CFB\u7EDF AI \u914D\u7F6E\u3002",
7252
7277
  advancedOptions: "\u9AD8\u7EA7\u9009\u9879",
7253
7278
  advancedInputs: "\u9AD8\u7EA7\u8F93\u5165",
7254
7279
  closeAdvancedOptions: "\u6536\u8D77\u9AD8\u7EA7\u9009\u9879",
@@ -8681,6 +8706,11 @@ var desktop2 = {
8681
8706
  accessModeAll: "\u5168\u90E8 key",
8682
8707
  accessModePrefixes: "\u6307\u5B9A\u524D\u7F00",
8683
8708
  accessPrefixesPlaceholder: "\u4F8B\u5982 data., cache.",
8709
+ knowledgeAccess: "\u77E5\u8BC6\u5E93",
8710
+ knowledgeReadAccess: "\u8BFB\u77E5\u8BC6\u5E93",
8711
+ knowledgeWriteAccess: "\u5199\u77E5\u8BC6\u5E93",
8712
+ entrypointAccess: "\u53EF\u8C03\u7528\u7684\u5165\u53E3",
8713
+ entrypointAccessDescription: "\u5165\u53E3\u4EE5\u53D1\u8D77\u8C03\u7528\u7684\u8EAB\u4EFD\u8FD0\u884C\u5BF9\u65B9\u9879\u76EE\uFF1A\u8BE5\u7528\u6237\u8981\u80FD\u8FD0\u884C\u5BF9\u65B9\u9879\u76EE\uFF0C\u8FD0\u884C\u8BB0\u5F55\u4E5F\u5F52\u5C5E\u4E8E\u4ED6\u3002",
8684
8714
  publishNewVersion: "\u53D1\u5E03\u65B0\u7248\u672C",
8685
8715
  releaseConfiguration: "\u53D1\u884C\u914D\u7F6E",
8686
8716
  releaseConfigurationDescription: "\u4EE5\u4E0B\u9009\u9879\u8BFB\u53D6\u5F53\u524D package.json\uFF0C\u4EC5\u53EF\u901A\u8FC7\u914D\u7F6E\u6587\u4EF6\u4FEE\u6539\u3002",
@@ -5,7 +5,7 @@ import {
5
5
  isWorkflowProjectDataStorageLocationAllowed,
6
6
  readWorkflowProjectInfo,
7
7
  resolveWorkflowRelatedProjectAccess
8
- } from "./chunk-27OW6OJ3.js";
8
+ } from "./chunk-PI54SAI5.js";
9
9
 
10
10
  // src/related-projects.ts
11
11
  import os from "os";
@@ -51,16 +51,22 @@ function createCliRelatedProjectRuntime(options) {
51
51
  configuredProjectIds.add(targetProjectId);
52
52
  configuredPaths.add(target.projectDir);
53
53
  }
54
+ const localKvStoreDir = options.localKvStoreDir ?? path.join(os.tmpdir(), "workflow-code-kv");
55
+ const localPersistentValueStoreDir = options.localPersistentValueStoreDir;
54
56
  const localKvStore = targetStorageApi.createLocalWorkflowKVStore({
55
- rootDir: options.localKvStoreDir ?? path.join(os.tmpdir(), "workflow-code-kv"),
57
+ rootDir: localKvStoreDir,
56
58
  storageKind: "kv"
57
59
  });
60
+ const localPersistentValueStore = typeof targetStorageApi.createWorkflowPersistentValueContext === "function" && localPersistentValueStoreDir !== void 0 ? targetStorageApi.createLocalWorkflowKVStore({
61
+ rootDir: localPersistentValueStoreDir,
62
+ storageKind: "persistent_value"
63
+ }) : void 0;
58
64
  return {
59
65
  localKvStore,
60
- localResolver: createResolver("local", localKvStore),
66
+ localResolver: createResolver("local", localKvStore, localPersistentValueStore),
61
67
  serverResolver: createResolver("server")
62
68
  };
63
- function createResolver(location, fixedStore) {
69
+ function createResolver(location, fixedStore, fixedPersistentValueStore) {
64
70
  return {
65
71
  resolve(alias) {
66
72
  const configured = configuredByAlias.get(alias);
@@ -94,23 +100,76 @@ function createCliRelatedProjectRuntime(options) {
94
100
  env: options.env
95
101
  });
96
102
  if (store === void 0) return void 0;
103
+ const source = {
104
+ projectId: currentConsumer.projectId,
105
+ runId: options.runId,
106
+ conversationId: options.conversationId
107
+ };
108
+ const persistentValue = fixedPersistentValueStore === void 0 ? void 0 : targetStorageApi.createWorkflowPersistentValueContext?.({
109
+ store: fixedPersistentValueStore,
110
+ projectId: currentTarget.projectId,
111
+ source
112
+ });
113
+ const runner = location === "local" ? createLocalProjectRunner({
114
+ projectDir: currentTarget.projectDir,
115
+ // The roots settled above, not the raw options: the relation and
116
+ // the target's own run have to land on the same store, defaults
117
+ // included, or one side writes what the other cannot see.
118
+ kvStoreDir: localKvStoreDir,
119
+ persistentValueStoreDir: localPersistentValueStoreDir
120
+ }) : void 0;
97
121
  return {
98
122
  projectId: currentTarget.projectId,
99
123
  grant: access.grant,
100
124
  kv: targetStorageApi.createWorkflowKVContext({
101
125
  store,
102
126
  projectId: currentTarget.projectId,
103
- source: {
104
- projectId: currentConsumer.projectId,
105
- runId: options.runId,
106
- conversationId: options.conversationId
107
- }
108
- })
127
+ source
128
+ }),
129
+ ...persistentValue === void 0 ? {} : { persistentValue },
130
+ ...runner === void 0 ? {} : { runner }
109
131
  };
110
132
  }
111
133
  };
112
134
  }
113
135
  }
136
+ function createLocalProjectRunner(options) {
137
+ const projectDir = options.projectDir;
138
+ const inspect = targetStorageApi.inspectLocalWorkflowStructure;
139
+ const run = targetStorageApi.runLocalWorkflowWithReport;
140
+ const unwrap = targetStorageApi.readEntrypointOutput;
141
+ if (typeof inspect !== "function" || typeof run !== "function" || typeof unwrap !== "function") {
142
+ return void 0;
143
+ }
144
+ return {
145
+ async listEntrypoints() {
146
+ const structure = inspect({ workflowDir: projectDir });
147
+ return (structure.entrypoints ?? []).map((entrypoint) => ({
148
+ id: entrypoint.id,
149
+ ...entrypoint.title === void 0 ? {} : { title: entrypoint.title },
150
+ ...entrypoint.description === void 0 ? {} : { description: entrypoint.description }
151
+ }));
152
+ },
153
+ async run(entrypointId, args) {
154
+ const report = await run({
155
+ workflowDir: projectDir,
156
+ entrypointId,
157
+ args: [...args],
158
+ storage: {
159
+ host: "local",
160
+ local: {
161
+ kvStoreDir: options.kvStoreDir,
162
+ persistentValueStoreDir: options.persistentValueStoreDir
163
+ }
164
+ }
165
+ });
166
+ if (report.result === void 0) {
167
+ throw new Error(`Related project entrypoint "${entrypointId}" returned no result.`);
168
+ }
169
+ return unwrap(report.result.data);
170
+ }
171
+ };
172
+ }
114
173
  function assertConfirmedRelationship(consumer, target, alias) {
115
174
  const consumerRelation = consumer.projectInfo.relatedProjects.find(
116
175
  (relation) => relation.alias === alias
@@ -191,15 +191,32 @@ function normalizeRelatedProjects(value) {
191
191
  }
192
192
  function normalizeRelatedProjectGrant(value, field) {
193
193
  if (!isRecord(value)) throw new Error(`${field} must be an object.`);
194
- if (Object.keys(value).some((key) => key !== "read" && key !== "write")) {
194
+ const supported = /* @__PURE__ */ new Set(["read", "write", "knowledge", "entrypoints"]);
195
+ if (Object.keys(value).some((key) => !supported.has(key))) {
195
196
  throw new Error(`${field} contains unsupported fields.`);
196
197
  }
197
- return {
198
- read: normalizeProjectKVAccessRule(value["read"], `${field}.read`),
199
- write: normalizeProjectKVAccessRule(value["write"], `${field}.write`)
198
+ const grant = {
199
+ read: normalizeProjectAccessRule(value["read"], `${field}.read`),
200
+ write: normalizeProjectAccessRule(value["write"], `${field}.write`)
200
201
  };
202
+ const knowledge = value["knowledge"];
203
+ if (knowledge !== void 0) {
204
+ if (!isRecord(knowledge)) throw new Error(`${field}.knowledge must be an object.`);
205
+ if (Object.keys(knowledge).some((key) => key !== "read" && key !== "write")) {
206
+ throw new Error(`${field}.knowledge contains unsupported fields.`);
207
+ }
208
+ grant.knowledge = {
209
+ read: normalizeProjectAccessRule(knowledge["read"], `${field}.knowledge.read`),
210
+ write: normalizeProjectAccessRule(knowledge["write"], `${field}.knowledge.write`)
211
+ };
212
+ }
213
+ const entrypoints = value["entrypoints"];
214
+ if (entrypoints !== void 0) {
215
+ grant.entrypoints = normalizeProjectAccessRule(entrypoints, `${field}.entrypoints`);
216
+ }
217
+ return grant;
201
218
  }
202
- function normalizeProjectKVAccessRule(value, field) {
219
+ function normalizeProjectAccessRule(value, field) {
203
220
  if (!isRecord(value)) throw new Error(`${field} must be an object.`);
204
221
  const mode = value["mode"];
205
222
  if (mode === "none" || mode === "all") {
@@ -4,7 +4,7 @@ import {
4
4
  initI18n,
5
5
  isSupportedLocale,
6
6
  normalizeLocale
7
- } from "./chunk-2COJUGNI.js";
7
+ } from "./chunk-BBQ4K7IP.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-4PNQMMWP.js";
4
+ } from "./chunk-TD4BZWNE.js";
5
5
  import {
6
6
  i18n,
7
7
  translateWorkflowCodeError
8
- } from "./chunk-2COJUGNI.js";
8
+ } from "./chunk-BBQ4K7IP.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-FBXSM443.js");
27
+ const workspaceCli = await import("./workspace-66Z2Y5OB.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-EC7JFRIT.js");
32
+ const mcpCli = await import("./mcp-S6ZW7BDA.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-7XY6XQ3G.js");
42
+ const localCli = await import("./local-UWHFTRXA.js");
43
43
  return localCli.main(argv, { localeInitialized: true });
44
44
  }
45
45
  function formatHelp() {
@@ -1,18 +1,18 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  prepareCliInvocation
4
- } from "./chunk-4PNQMMWP.js";
4
+ } from "./chunk-TD4BZWNE.js";
5
5
  import {
6
6
  createCliRelatedProjectRuntime,
7
7
  parseCliRelatedProjectSpec
8
- } from "./chunk-HZABRDJK.js";
8
+ } from "./chunk-C7SXLSPA.js";
9
9
  import {
10
10
  readWorkflowProjectInfo
11
- } from "./chunk-27OW6OJ3.js";
11
+ } from "./chunk-PI54SAI5.js";
12
12
  import {
13
13
  i18n,
14
14
  translateWorkflowCodeError
15
- } from "./chunk-2COJUGNI.js";
15
+ } from "./chunk-BBQ4K7IP.js";
16
16
  import {
17
17
  __commonJS,
18
18
  __toESM
@@ -2182,6 +2182,7 @@ async function main(argv = process.argv.slice(2), options = {}) {
2182
2182
  consumerProjectDir: parsed.workflowDir,
2183
2183
  relatedProjects: parsed.relatedProjects,
2184
2184
  localKvStoreDir: process.env.WORKFLOW_KV_STORE_DIR,
2185
+ localPersistentValueStoreDir: process.env.WORKFLOW_PERSISTENT_VALUE_STORE_DIR,
2185
2186
  runId: parsed.runId,
2186
2187
  conversationId: parsed.conversationId,
2187
2188
  env: process.env
@@ -7,13 +7,13 @@ import {
7
7
  } from "./chunk-PGM3IPWA.js";
8
8
  import {
9
9
  parseCliRelatedProjectSpec
10
- } from "./chunk-HZABRDJK.js";
10
+ } from "./chunk-C7SXLSPA.js";
11
11
  import {
12
12
  assertWorkflowUuid
13
- } from "./chunk-27OW6OJ3.js";
13
+ } from "./chunk-PI54SAI5.js";
14
14
  import {
15
15
  i18n
16
- } from "./chunk-2COJUGNI.js";
16
+ } from "./chunk-BBQ4K7IP.js";
17
17
  import {
18
18
  __commonJS,
19
19
  __export,
@@ -8,17 +8,17 @@ import {
8
8
  } from "./chunk-PGM3IPWA.js";
9
9
  import {
10
10
  prepareCliInvocation
11
- } from "./chunk-4PNQMMWP.js";
11
+ } from "./chunk-TD4BZWNE.js";
12
12
  import {
13
13
  isWorkflowUuid,
14
14
  readWorkflowProjectInfo,
15
15
  resolveWorkflowRelatedProjectAccess
16
- } from "./chunk-27OW6OJ3.js";
16
+ } from "./chunk-PI54SAI5.js";
17
17
  import {
18
18
  getCurrentLocale,
19
19
  i18n,
20
20
  translateWorkflowCodeError
21
- } from "./chunk-2COJUGNI.js";
21
+ } from "./chunk-BBQ4K7IP.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-20260921004.codex-ai-model-attributes",
3
+ "version": "0.2.4-20260922001",
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-20260921005.codex-ai-model-attributes"
23
+ "workflow-code": "0.2.4-20260922007"
24
24
  },
25
25
  "devDependencies": {
26
26
  "@types/node": "^25.6.0",
@@ -29,7 +29,7 @@
29
29
  "tsup": "^8.5.1",
30
30
  "typescript": "^6.0.3",
31
31
  "vitest": "^4.1.7",
32
- "workflow-code": "0.2.4-20260921005.codex-ai-model-attributes",
32
+ "workflow-code": "0.2.4-20260922007",
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",
@@ -37,8 +37,8 @@
37
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
- "@workflow-code/runtime-compatibility": "0.1.0",
41
40
  "@workflow-code/workflow-ids": "0.1.0",
41
+ "@workflow-code/runtime-compatibility": "0.1.0",
42
42
  "@workflow-code/workflow-mcp": "0.1.0"
43
43
  },
44
44
  "scripts": {