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.
@@ -1017,7 +1017,7 @@ var init_claude_registry = __esm(() => {
1017
1017
  });
1018
1018
 
1019
1019
  // ../../packages/core/src/version.ts
1020
- var NEGOTIUM_VERSION = "0.4.0";
1020
+ var NEGOTIUM_VERSION = "0.4.1";
1021
1021
 
1022
1022
  // ../../packages/core/src/agents/codex-native-multi-agent.ts
1023
1023
  import { spawn } from "child_process";
@@ -8667,9 +8667,11 @@ function hookClientPath() {
8667
8667
  return packaged;
8668
8668
  throw new Error("Codex Vault hook client is missing from this installation");
8669
8669
  }
8670
- function privateCodexWrapper(codexScript) {
8670
+ function privateCodexWrapper(codexScript, socketPath, token) {
8671
8671
  return [
8672
8672
  "#!/bin/sh",
8673
+ `export ${HOOK_SOCKET_ENV}=${shellQuote(socketPath)}`,
8674
+ `export ${HOOK_TOKEN_ENV}=${shellQuote(token)}`,
8673
8675
  'if [ "$1" = "exec" ]; then',
8674
8676
  " shift",
8675
8677
  ` exec ${shellQuote(process.execPath)} ${shellQuote(codexScript)} exec --dangerously-bypass-hook-trust "$@"`,
@@ -8732,15 +8734,13 @@ async function createCodexVaultHookBridge(userId) {
8732
8734
  });
8733
8735
  });
8734
8736
  await chmod(socketPath, 384);
8735
- await writeFile(wrapperPath, privateCodexWrapper(codexCliScriptPath()), { mode: 448 });
8736
- const command = [
8737
- shellQuote(process.execPath),
8738
- shellQuote(hookClientPath()),
8739
- shellQuote(socketPath),
8740
- shellQuote(token)
8741
- ].join(" ");
8737
+ await writeFile(wrapperPath, privateCodexWrapper(codexCliScriptPath(), socketPath, token), {
8738
+ mode: 448
8739
+ });
8740
+ const command = [shellQuote(process.execPath), shellQuote(hookClientPath())].join(" ");
8742
8741
  return {
8743
8742
  codexPathOverride: wrapperPath,
8743
+ environment: { [HOOK_SOCKET_ENV]: socketPath, [HOOK_TOKEN_ENV]: token },
8744
8744
  hooks: {
8745
8745
  PreToolUse: [
8746
8746
  {
@@ -8769,7 +8769,7 @@ async function createCodexVaultHookBridge(userId) {
8769
8769
  throw error;
8770
8770
  }
8771
8771
  }
8772
- var MAX_HOOK_REQUEST_BYTES, SENSITIVE_STORAGE_DENIAL = "Runtime secret storage access is not permitted";
8772
+ 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";
8773
8773
  var init_codex_vault_hook_bridge = __esm(async () => {
8774
8774
  init_codex_native_multi_agent();
8775
8775
  await init_execution_host();
@@ -9883,7 +9883,10 @@ async function* codexProvider(opts) {
9883
9883
  yield fileEvent;
9884
9884
  }
9885
9885
  } else if (item.type === "error") {
9886
- yield { type: "error", content: String(item.message ?? "") };
9886
+ const message = String(item.message ?? "");
9887
+ if (message !== CODEX_HOOK_TRUST_BYPASS_NOTICE) {
9888
+ yield { type: "error", content: message };
9889
+ }
9887
9890
  }
9888
9891
  break;
9889
9892
  }
@@ -9974,7 +9977,7 @@ async function* codexProvider(opts) {
9974
9977
  await vaultHook.close();
9975
9978
  }
9976
9979
  }
9977
- 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;
9980
+ 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;
9978
9981
  var init_codex_provider = __esm(async () => {
9979
9982
  init_codex_native_multi_agent();
9980
9983
  init_codex_tree_kill();
@@ -21361,4 +21364,4 @@ export {
21361
21364
  createAgentHealthMcpServer
21362
21365
  };
21363
21366
 
21364
- //# debugId=3C9958DCA4DDE01364756E2164756E21
21367
+ //# debugId=D5AB0F4D22A1F9C564756E2164756E21