@nuucognition/flint-cli 0.6.0-dev.22 → 0.6.0-dev.23

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.
@@ -2,6 +2,6 @@
2
2
  "sha": "ef931f0a52da06382a671173f8bb29b50fb42ca0",
3
3
  "tree": "ab077f44c9c0b63fa845980cdf9e4287c59a2cdd",
4
4
  "dirty": true,
5
- "builtAt": "2026-09-22T00:29:54.751Z",
5
+ "builtAt": "2026-09-22T01:33:16.004Z",
6
6
  "mode": "prod"
7
7
  }
package/dist/index.js CHANGED
@@ -273761,6 +273761,50 @@ function eventServerArgs(args) {
273761
273761
  if (roots.length) result.push("-c", `sandbox_workspace_write.writable_roots=${JSON.stringify(roots)}`);
273762
273762
  return result;
273763
273763
  }
273764
+ function isServerPermissionConfig(setting) {
273765
+ const equals = setting.indexOf("=");
273766
+ if (equals < 0) return false;
273767
+ try {
273768
+ const keys2 = Object.keys(parse2(`${setting.slice(0, equals)}=0`));
273769
+ return keys2.some((key) => SERVER_PERMISSION_CONFIG.has(key));
273770
+ } catch {
273771
+ return false;
273772
+ }
273773
+ }
273774
+ function remoteResumeArgs(options, endpoint, threadId) {
273775
+ const flags = [];
273776
+ let tail2 = [];
273777
+ for (let i = options.args[0] === "resume" ? 1 : 0; i < options.args.length; i++) {
273778
+ const original = options.args[i];
273779
+ if (original === "--") {
273780
+ tail2 = options.args.slice(i + 1);
273781
+ break;
273782
+ }
273783
+ let flag = original;
273784
+ let attached;
273785
+ const equals = flag.startsWith("--") ? flag.indexOf("=") : -1;
273786
+ if (equals > 0) {
273787
+ attached = flag.slice(equals + 1);
273788
+ flag = flag.slice(0, equals);
273789
+ } else if (/^-[cmpasC].+/.test(flag)) {
273790
+ attached = flag.slice(2).replace(/^=/, "");
273791
+ flag = flag.slice(0, 2);
273792
+ }
273793
+ if (["--dangerously-bypass-approvals-and-sandbox", "--full-auto", "--approve-for-me"].includes(flag)) continue;
273794
+ if (TERMINAL_VALUE_FLAGS.has(flag)) {
273795
+ const value = attached ?? options.args[++i];
273796
+ if (value === void 0) throw new Error(`Missing Codex argument: ${flag}`);
273797
+ if (SERVER_PERMISSION_FLAGS.has(flag)) continue;
273798
+ if ((flag === "-c" || flag === "--config") && isServerPermissionConfig(value)) continue;
273799
+ flags.push(original);
273800
+ if (attached === void 0) flags.push(value);
273801
+ } else {
273802
+ flags.push(original);
273803
+ }
273804
+ }
273805
+ const prompt = options.nativeSessionId ? tail2.slice(1) : tail2;
273806
+ return ["--remote", endpoint, "resume", ...flags, "--", threadId, ...prompt];
273807
+ }
273764
273808
  async function connectDedicatedCodexEvents(options) {
273765
273809
  if (options.args.some((arg) => arg === "--remote" || arg.startsWith("--remote="))) throw new Error("Orbh cannot own event delivery for an externally selected Codex server");
273766
273810
  const serverArgs = eventServerArgs(options.args);
@@ -273855,11 +273899,7 @@ Wait for the session bootstrap prompt.` }] }] });
273855
273899
  await client.request("thread/resume", { threadId: nativeSessionId });
273856
273900
  return client;
273857
273901
  };
273858
- const separator = options.args.indexOf("--");
273859
- const flags = (separator < 0 ? options.args : options.args.slice(0, separator)).filter((arg) => arg !== "resume");
273860
- const tail2 = separator < 0 ? [] : options.args.slice(separator + 1);
273861
- const prompt = options.nativeSessionId ? tail2.slice(1) : tail2;
273862
- const args = ["--remote", endpoint, "resume", ...flags, "--", nativeSessionId, ...prompt];
273902
+ const args = remoteResumeArgs(options, endpoint, nativeSessionId);
273863
273903
  return {
273864
273904
  commandActions: true,
273865
273905
  nativeSessionId,
@@ -274088,11 +274128,7 @@ Wait for the session bootstrap prompt.` }] }] });
274088
274128
  client = reconnected;
274089
274129
  return client;
274090
274130
  };
274091
- const separator = options.args.indexOf("--");
274092
- const flags = (separator < 0 ? options.args : options.args.slice(0, separator)).filter((arg) => arg !== "resume");
274093
- const tail2 = separator < 0 ? [] : options.args.slice(separator + 1);
274094
- const prompt = options.nativeSessionId ? tail2.slice(1) : tail2;
274095
- const args = ["--remote", endpoint, "resume", ...flags, "--", nativeSessionId, ...prompt];
274131
+ const args = remoteResumeArgs(options, endpoint, nativeSessionId);
274096
274132
  return {
274097
274133
  commandActions: true,
274098
274134
  nativeSessionId,
@@ -274604,7 +274640,7 @@ function registerCodexHarness() {
274604
274640
  registerHarness(harness);
274605
274641
  return harness;
274606
274642
  }
274607
- var CODEX_INTERNAL_MESSAGE_PATTERN, MESSAGE_ECHO_WINDOW_MS, CODEX_USAGE_URL, CODEX_USER_AGENT, AUTH_FILE, NEEDS_REAUTH_RESULT, EVENT_NOTIFICATION_OPT_OUTS, EventClient, THREAD_CONFIG, TERMINAL_ENV, CodexAppServerClient, CODEX_COMMAND, CODEX_DISABLE_STARTUP_UPDATE_CHECK, ORBH_SESSION_ID_DECLARATION, CODEX_APP_SERVER_CLIENT_VERSION, CLIENT_INFO, CODEX_CONFIG_KEY_MAP;
274643
+ var CODEX_INTERNAL_MESSAGE_PATTERN, MESSAGE_ECHO_WINDOW_MS, CODEX_USAGE_URL, CODEX_USER_AGENT, AUTH_FILE, NEEDS_REAUTH_RESULT, EVENT_NOTIFICATION_OPT_OUTS, EventClient, SERVER_PERMISSION_CONFIG, SERVER_PERMISSION_FLAGS, TERMINAL_VALUE_FLAGS, THREAD_CONFIG, TERMINAL_ENV, CodexAppServerClient, CODEX_COMMAND, CODEX_DISABLE_STARTUP_UPDATE_CHECK, ORBH_SESSION_ID_DECLARATION, CODEX_APP_SERVER_CLIENT_VERSION, CLIENT_INFO, CODEX_CONFIG_KEY_MAP;
274608
274644
  var init_dist21 = __esm({
274609
274645
  async "../../packages/orbh-codex/dist/index.js"() {
274610
274646
  "use strict";
@@ -274728,6 +274764,37 @@ var init_dist21 = __esm({
274728
274764
  this.socket.close();
274729
274765
  }
274730
274766
  };
274767
+ SERVER_PERMISSION_CONFIG = /* @__PURE__ */ new Set([
274768
+ "approval_policy",
274769
+ "approvals_reviewer",
274770
+ "sandbox_mode",
274771
+ "sandbox_workspace_write"
274772
+ ]);
274773
+ SERVER_PERMISSION_FLAGS = /* @__PURE__ */ new Set([
274774
+ "-a",
274775
+ "--ask-for-approval",
274776
+ "-s",
274777
+ "--sandbox",
274778
+ "--add-dir"
274779
+ ]);
274780
+ TERMINAL_VALUE_FLAGS = /* @__PURE__ */ new Set([
274781
+ "-c",
274782
+ "--config",
274783
+ "-m",
274784
+ "--model",
274785
+ "--enable",
274786
+ "--disable",
274787
+ "--code-mode-host",
274788
+ "-p",
274789
+ "--profile",
274790
+ "--local-provider",
274791
+ "-C",
274792
+ "--cd",
274793
+ "-i",
274794
+ "--image",
274795
+ "--remote-auth-token-env",
274796
+ ...SERVER_PERMISSION_FLAGS
274797
+ ]);
274731
274798
  THREAD_CONFIG = /* @__PURE__ */ new Set([
274732
274799
  "model",
274733
274800
  "model_reasoning_effort",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nuucognition/flint-cli",
3
- "version": "0.6.0-dev.22",
3
+ "version": "0.6.0-dev.23",
4
4
  "type": "module",
5
5
  "description": "Flint cognitive workspace CLI",
6
6
  "license": "PROPRIETARY",
@@ -45,16 +45,16 @@
45
45
  "@nuucognition/flint": "0.1.0",
46
46
  "@nuucognition/flint-mcp": "0.1.0",
47
47
  "@nuucognition/flint-migrations": "0.1.0",
48
- "@nuucognition/flint-server": "0.1.0",
49
48
  "@nuucognition/flint-sdk": "0.1.0",
50
49
  "@nuucognition/orbh": "0.0.1-dev.0",
51
- "@nuucognition/orbtest-cli": "0.1.0",
50
+ "@nuucognition/flint-server": "0.1.0",
52
51
  "@nuucognition/orbh-cli": "0.1.0-dev.1",
53
52
  "@nuucognition/orbtest-agent-orbh": "0.1.0",
54
- "@nuucognition/places": "1.0.0",
53
+ "@nuucognition/orbtest-cli": "0.1.0",
55
54
  "@nuucognition/orbtest-source-postgres": "0.1.0",
56
- "@nuucognition/eslint-config": "0.0.0",
55
+ "@nuucognition/places": "1.0.0",
57
56
  "@nuucognition/blacksmith-cli": "0.0.1",
57
+ "@nuucognition/eslint-config": "0.0.0",
58
58
  "@nuucognition/typescript-config": "0.0.0"
59
59
  },
60
60
  "peerDependencies": {