negotium 0.4.0 → 0.4.1

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.
package/dist/main.js CHANGED
@@ -1869,7 +1869,7 @@ var exports_version = {};
1869
1869
  __export(exports_version, {
1870
1870
  NEGOTIUM_VERSION: () => NEGOTIUM_VERSION
1871
1871
  });
1872
- var NEGOTIUM_VERSION = "0.4.0";
1872
+ var NEGOTIUM_VERSION = "0.4.1";
1873
1873
 
1874
1874
  // ../../packages/core/src/agents/codex-native-multi-agent.ts
1875
1875
  import { spawn } from "child_process";
@@ -5283,9 +5283,11 @@ function hookClientPath() {
5283
5283
  return packaged;
5284
5284
  throw new Error("Codex Vault hook client is missing from this installation");
5285
5285
  }
5286
- function privateCodexWrapper(codexScript) {
5286
+ function privateCodexWrapper(codexScript, socketPath, token) {
5287
5287
  return [
5288
5288
  "#!/bin/sh",
5289
+ `export ${HOOK_SOCKET_ENV}=${shellQuote(socketPath)}`,
5290
+ `export ${HOOK_TOKEN_ENV}=${shellQuote(token)}`,
5289
5291
  'if [ "$1" = "exec" ]; then',
5290
5292
  " shift",
5291
5293
  ` exec ${shellQuote(process.execPath)} ${shellQuote(codexScript)} exec --dangerously-bypass-hook-trust "$@"`,
@@ -5348,15 +5350,13 @@ async function createCodexVaultHookBridge(userId) {
5348
5350
  });
5349
5351
  });
5350
5352
  await chmod(socketPath, 384);
5351
- await writeFile(wrapperPath, privateCodexWrapper(codexCliScriptPath()), { mode: 448 });
5352
- const command = [
5353
- shellQuote(process.execPath),
5354
- shellQuote(hookClientPath()),
5355
- shellQuote(socketPath),
5356
- shellQuote(token)
5357
- ].join(" ");
5353
+ await writeFile(wrapperPath, privateCodexWrapper(codexCliScriptPath(), socketPath, token), {
5354
+ mode: 448
5355
+ });
5356
+ const command = [shellQuote(process.execPath), shellQuote(hookClientPath())].join(" ");
5358
5357
  return {
5359
5358
  codexPathOverride: wrapperPath,
5359
+ environment: { [HOOK_SOCKET_ENV]: socketPath, [HOOK_TOKEN_ENV]: token },
5360
5360
  hooks: {
5361
5361
  PreToolUse: [
5362
5362
  {
@@ -5385,7 +5385,7 @@ async function createCodexVaultHookBridge(userId) {
5385
5385
  throw error;
5386
5386
  }
5387
5387
  }
5388
- var MAX_HOOK_REQUEST_BYTES, SENSITIVE_STORAGE_DENIAL = "Runtime secret storage access is not permitted";
5388
+ var MAX_HOOK_REQUEST_BYTES, SENSITIVE_STORAGE_DENIAL = "Runtime secret storage access is not permitted", HOOK_SOCKET_ENV = "NEGOTIUM_CODEX_VAULT_HOOK_SOCKET", HOOK_TOKEN_ENV = "NEGOTIUM_CODEX_VAULT_HOOK_TOKEN";
5389
5389
  var init_codex_vault_hook_bridge = __esm(async () => {
5390
5390
  init_codex_native_multi_agent();
5391
5391
  await init_execution_host();
@@ -6499,7 +6499,10 @@ async function* codexProvider(opts) {
6499
6499
  yield fileEvent;
6500
6500
  }
6501
6501
  } else if (item.type === "error") {
6502
- yield { type: "error", content: String(item.message ?? "") };
6502
+ const message = String(item.message ?? "");
6503
+ if (message !== CODEX_HOOK_TRUST_BYPASS_NOTICE) {
6504
+ yield { type: "error", content: message };
6505
+ }
6503
6506
  }
6504
6507
  break;
6505
6508
  }
@@ -6590,7 +6593,7 @@ async function* codexProvider(opts) {
6590
6593
  await vaultHook.close();
6591
6594
  }
6592
6595
  }
6593
- var CODEX_MCP_SERVER_NAME_OVERRIDES, CODEX_DIFF_FILE_LIMIT, CODEX_DIFF_BASELINE_FILE_LIMIT = 200, CODEX_DIFF_BASELINE_BYTE_LIMIT, CODEX_STARTUP_TIMEOUT_MS = 90000;
6596
+ var CODEX_HOOK_TRUST_BYPASS_NOTICE = "`--dangerously-bypass-hook-trust` is enabled. Enabled hooks may run without review for this invocation.", CODEX_MCP_SERVER_NAME_OVERRIDES, CODEX_DIFF_FILE_LIMIT, CODEX_DIFF_BASELINE_FILE_LIMIT = 200, CODEX_DIFF_BASELINE_BYTE_LIMIT, CODEX_STARTUP_TIMEOUT_MS = 90000;
6594
6597
  var init_codex_provider = __esm(async () => {
6595
6598
  init_codex_native_multi_agent();
6596
6599
  init_codex_tree_kill();
@@ -47192,4 +47195,4 @@ switch (command) {
47192
47195
  }
47193
47196
  }
47194
47197
 
47195
- //# debugId=8E2AD65C6830FCEF64756E2164756E21
47198
+ //# debugId=A4A68C691DEC1BCD64756E2164756E21