@workflow-code/cli 0.2.4-20261011008.codex-cli-web → 0.2.4-20261012001

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.
@@ -5,7 +5,7 @@ import {
5
5
  import {
6
6
  createCliRelatedProjectRuntime,
7
7
  parseCliRelatedProjectSpec
8
- } from "./chunk-MNY562W5.js";
8
+ } from "./chunk-5FPIZZE4.js";
9
9
  import {
10
10
  readWorkflowProjectInfo
11
11
  } from "./chunk-P6K3NB5S.js";
@@ -12,7 +12,7 @@ import os from "os";
12
12
  import path from "path";
13
13
  import { readFileSync, realpathSync, statSync } from "fs";
14
14
  import * as workflowCode from "workflow-code";
15
- var targetStorageApi = workflowCode;
15
+ var defaultStorageApi = workflowCode;
16
16
  function parseCliRelatedProjectSpec(value) {
17
17
  const separatorIndex = value.indexOf("=");
18
18
  if (separatorIndex <= 0 || separatorIndex === value.length - 1) {
@@ -30,6 +30,7 @@ function parseCliRelatedProjectSpec(value) {
30
30
  }
31
31
  function createCliRelatedProjectRuntime(options) {
32
32
  if (options.relatedProjects.length === 0) return {};
33
+ const targetStorageApi = options.storageApi ?? defaultStorageApi;
33
34
  const consumer = readProjectSnapshot(options.consumerProjectDir, "Current project");
34
35
  const configuredByAlias = /* @__PURE__ */ new Map();
35
36
  const configuredProjectIds = /* @__PURE__ */ new Set();
@@ -76,7 +77,7 @@ function createCliRelatedProjectRuntime(options) {
76
77
  configured.projectDir,
77
78
  `Related project "${alias}"`
78
79
  );
79
- if (currentTarget.projectId.toLowerCase() !== configured.projectId.toLowerCase()) {
80
+ if (currentConsumer.projectId.toLowerCase() !== consumer.projectId.toLowerCase() || currentTarget.projectId.toLowerCase() !== configured.projectId.toLowerCase()) {
80
81
  return void 0;
81
82
  }
82
83
  const access = resolveWorkflowRelatedProjectAccess({
@@ -93,7 +94,8 @@ function createCliRelatedProjectRuntime(options) {
93
94
  if (fixedStore === void 0 && typeof createRemoteStore !== "function") {
94
95
  throw new Error("Installed workflow-code does not support related project storage.");
95
96
  }
96
- const store = fixedStore ?? createRemoteStore({
97
+ const roots = options.localStorageForProject?.(currentTarget.projectDir) ?? { kvStoreDir: localKvStoreDir, persistentValueStoreDir: localPersistentValueStoreDir };
98
+ const store = location === "local" && options.localStorageForProject ? targetStorageApi.createLocalWorkflowKVStore({ rootDir: roots.kvStoreDir, storageKind: "kv" }) : fixedStore ?? createRemoteStore({
97
99
  consumerProjectId: currentConsumer.projectId,
98
100
  targetProjectId: currentTarget.projectId,
99
101
  alias,
@@ -105,8 +107,9 @@ function createCliRelatedProjectRuntime(options) {
105
107
  runId: options.runId,
106
108
  conversationId: options.conversationId
107
109
  };
108
- const persistentValue = fixedPersistentValueStore === void 0 ? void 0 : targetStorageApi.createWorkflowPersistentValueContext?.({
109
- store: fixedPersistentValueStore,
110
+ const persistentStore = location === "server" ? store : options.localStorageForProject && roots.persistentValueStoreDir !== void 0 ? targetStorageApi.createLocalWorkflowKVStore({ rootDir: roots.persistentValueStoreDir, storageKind: "persistent_value" }) : fixedPersistentValueStore;
111
+ const persistentValue = persistentStore === void 0 ? void 0 : targetStorageApi.createWorkflowPersistentValueContext?.({
112
+ store: persistentStore,
110
113
  projectId: currentTarget.projectId,
111
114
  source
112
115
  });
@@ -119,8 +122,9 @@ function createCliRelatedProjectRuntime(options) {
119
122
  // The roots settled above, not the raw options: the relation and the
120
123
  // target's own run have to land on the same store, defaults
121
124
  // included, or one side writes what the other cannot see.
122
- kvStoreDir: localKvStoreDir,
123
- persistentValueStoreDir: localPersistentValueStoreDir
125
+ kvStoreDir: roots.kvStoreDir,
126
+ persistentValueStoreDir: roots.persistentValueStoreDir,
127
+ storageApi: targetStorageApi
124
128
  });
125
129
  return {
126
130
  projectId: currentTarget.projectId,
@@ -139,6 +143,7 @@ function createCliRelatedProjectRuntime(options) {
139
143
  }
140
144
  function createLocalProjectRunner(options) {
141
145
  const projectDir = options.projectDir;
146
+ const targetStorageApi = options.storageApi;
142
147
  const inspect = targetStorageApi.inspectLocalWorkflowStructure;
143
148
  const run = targetStorageApi.runLocalWorkflowWithReport;
144
149
  const unwrap = targetStorageApi.readEntrypointOutput;
@@ -163,6 +163,7 @@ async function clearCliAuthConfig(env = process.env) {
163
163
  }
164
164
 
165
165
  export {
166
+ createEmptyWorkflowAuthConfig,
166
167
  normalizeWorkflowAuthConfig,
167
168
  isWorkflowAuthConfigLoggedIn,
168
169
  isWorkflowAuthExpiringSoon,
package/dist/index.js CHANGED
@@ -24,16 +24,16 @@ async function main(argv = process.argv.slice(2)) {
24
24
  const prepared = prepareCliInvocation(argv);
25
25
  argv = prepared.argv;
26
26
  if (argv[0] === "web") {
27
- const webCli = await import("./web-7M4WBBL7.js");
27
+ const webCli = await import("./web-ROA37F4H.js");
28
28
  return webCli.main(argv.slice(1));
29
29
  }
30
30
  if (argv[0] === "workspace") {
31
- const workspaceCli = await import("./workspace-V3UXVFK6.js");
31
+ const workspaceCli = await import("./workspace-OKFR57T6.js");
32
32
  await workspaceCli.main(argv.slice(1), { localeInitialized: true });
33
33
  return typeof process.exitCode === "number" ? process.exitCode : 0;
34
34
  }
35
35
  if (argv[0] === "mcp") {
36
- const mcpCli = await import("./mcp-LQ2IV6VA.js");
36
+ const mcpCli = await import("./mcp-RPT64F7T.js");
37
37
  return mcpCli.main(argv.slice(1));
38
38
  }
39
39
  if (argv.length === 0 || argv[0] === "help" || argv[0] === "--help" || argv[0] === "-h") {
@@ -43,7 +43,7 @@ async function main(argv = process.argv.slice(2)) {
43
43
  }
44
44
  const { register } = await import("tsx/esm/api");
45
45
  register();
46
- const localCli = await import("./local-QLYFH4WT.js");
46
+ const localCli = await import("./local-XHR2O2FP.js");
47
47
  return localCli.main(argv, { localeInitialized: true });
48
48
  }
49
49
  function formatHelp() {
@@ -9,9 +9,9 @@ import {
9
9
  main,
10
10
  parseWorkflowArgs,
11
11
  readInstalledWorkflowCoreVersion
12
- } from "./chunk-WN7VAGK6.js";
12
+ } from "./chunk-5DWX3LL6.js";
13
13
  import "./chunk-J2JMC4MZ.js";
14
- import "./chunk-MNY562W5.js";
14
+ import "./chunk-5FPIZZE4.js";
15
15
  import "./chunk-P6K3NB5S.js";
16
16
  import "./chunk-7WEXRL5A.js";
17
17
  import "./chunk-NSPRIPOP.js";
@@ -1,13 +1,13 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  parseCliRelatedProjectSpec
4
- } from "./chunk-MNY562W5.js";
4
+ } from "./chunk-5FPIZZE4.js";
5
5
  import {
6
6
  isWorkflowAuthConfigLoggedIn,
7
7
  normalizeWorkflowAuthConfig,
8
8
  readCliAuthConfigSync,
9
9
  resolveWorkflowDesktopConfigFilePath
10
- } from "./chunk-PGM3IPWA.js";
10
+ } from "./chunk-SGVXPYCT.js";
11
11
  import {
12
12
  assertWorkflowUuid
13
13
  } from "./chunk-P6K3NB5S.js";
@@ -1072,23 +1072,89 @@ main {
1072
1072
  margin-top: 12px;
1073
1073
  }
1074
1074
  .resource-card {
1075
- display: flex;
1076
- align-items: center;
1077
- gap: 8px;
1075
+ display: block;
1076
+ width: 100%;
1078
1077
  min-width: 0;
1079
- max-width: 100%;
1080
- min-height: 36px;
1081
- padding: 6px 10px;
1078
+ margin: 8px 0;
1082
1079
  border: 1px solid var(--border);
1083
1080
  border-radius: 6px;
1084
1081
  background: var(--vscode-editor-background);
1082
+ overflow: hidden;
1083
+ container-type: inline-size;
1084
+ }
1085
+ .resource-card-row {
1086
+ display: flex;
1087
+ align-items: center;
1088
+ gap: 4px;
1089
+ min-height: 44px;
1090
+ padding: 4px 8px;
1091
+ }
1092
+ .resource-target {
1093
+ display: flex;
1094
+ align-items: center;
1095
+ gap: 10px;
1096
+ flex: 1;
1097
+ min-width: 0;
1098
+ min-height: 36px;
1099
+ padding: 6px 4px;
1100
+ border: 0;
1101
+ background: transparent;
1085
1102
  text-align: left;
1086
1103
  }
1087
- .resource-card > span:not(.codicon) {
1104
+ .resource-target > .codicon {
1105
+ flex: none;
1106
+ color: var(--muted);
1107
+ }
1108
+ .resource-title {
1088
1109
  min-width: 0;
1089
- overflow: hidden;
1090
- text-overflow: ellipsis;
1091
- white-space: nowrap;
1110
+ white-space: normal;
1111
+ overflow-wrap: anywhere;
1112
+ line-height: 1.5;
1113
+ }
1114
+ .resource-card-row > .icon-button {
1115
+ flex: none;
1116
+ width: 28px;
1117
+ height: 28px;
1118
+ }
1119
+ @container (max-width: 280px) {
1120
+ .resource-card-row {
1121
+ flex-wrap: wrap;
1122
+ }
1123
+ .resource-target {
1124
+ flex-basis: 100%;
1125
+ }
1126
+ }
1127
+ .resource-inline {
1128
+ height: 360px;
1129
+ max-height: 70vh;
1130
+ min-height: 160px;
1131
+ border-top: 1px solid var(--border);
1132
+ overflow: auto;
1133
+ }
1134
+ .resource-inline[role] {
1135
+ padding: 12px;
1136
+ color: var(--muted);
1137
+ }
1138
+ .resource-inline[role=alert] {
1139
+ color: var(--vscode-errorForeground);
1140
+ }
1141
+ .resource-inline iframe {
1142
+ display: block;
1143
+ width: 100%;
1144
+ height: 100%;
1145
+ border: 0;
1146
+ }
1147
+ .resource-call-details {
1148
+ padding: 8px 12px;
1149
+ border-top: 1px solid var(--border);
1150
+ max-height: 320px;
1151
+ overflow: auto;
1152
+ }
1153
+ .resource-call-details pre {
1154
+ margin: 0;
1155
+ font-size: 11px;
1156
+ white-space: pre-wrap;
1157
+ overflow-wrap: anywhere;
1092
1158
  }
1093
1159
  .input-prompt {
1094
1160
  margin: 16px 0;