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/agent-helpers.js +16 -13
- package/dist/agent-helpers.js.map +5 -5
- package/dist/hosted-agent.js +17 -11
- package/dist/hosted-agent.js.map +5 -5
- package/dist/main.js +16 -13
- package/dist/main.js.map +5 -5
- package/dist/mcp-factories.js +16 -13
- package/dist/mcp-factories.js.map +5 -5
- package/dist/registry.js +2 -2
- package/dist/registry.js.map +2 -2
- package/dist/runtime/src/agents/codex-provider.ts +7 -1
- package/dist/runtime/src/agents/codex-vault-hook-bridge.ts +14 -8
- package/dist/runtime/src/agents/codex-vault-hook.mjs +3 -1
- package/dist/runtime/src/version.ts +1 -1
- package/dist/types/packages/core/src/agents/codex-vault-hook-bridge.d.ts +1 -0
- package/dist/types/packages/core/src/version.d.ts +1 -1
- package/package.json +2 -2
package/dist/agent-helpers.js
CHANGED
|
@@ -2412,7 +2412,7 @@ var init_claude_registry = __esm(() => {
|
|
|
2412
2412
|
});
|
|
2413
2413
|
|
|
2414
2414
|
// ../../packages/core/src/version.ts
|
|
2415
|
-
var NEGOTIUM_VERSION = "0.4.
|
|
2415
|
+
var NEGOTIUM_VERSION = "0.4.1";
|
|
2416
2416
|
|
|
2417
2417
|
// ../../packages/core/src/agents/codex-native-multi-agent.ts
|
|
2418
2418
|
import { spawn as spawn2 } from "child_process";
|
|
@@ -4621,9 +4621,11 @@ function hookClientPath() {
|
|
|
4621
4621
|
return packaged;
|
|
4622
4622
|
throw new Error("Codex Vault hook client is missing from this installation");
|
|
4623
4623
|
}
|
|
4624
|
-
function privateCodexWrapper(codexScript) {
|
|
4624
|
+
function privateCodexWrapper(codexScript, socketPath, token) {
|
|
4625
4625
|
return [
|
|
4626
4626
|
"#!/bin/sh",
|
|
4627
|
+
`export ${HOOK_SOCKET_ENV}=${shellQuote(socketPath)}`,
|
|
4628
|
+
`export ${HOOK_TOKEN_ENV}=${shellQuote(token)}`,
|
|
4627
4629
|
'if [ "$1" = "exec" ]; then',
|
|
4628
4630
|
" shift",
|
|
4629
4631
|
` exec ${shellQuote(process.execPath)} ${shellQuote(codexScript)} exec --dangerously-bypass-hook-trust "$@"`,
|
|
@@ -4686,15 +4688,13 @@ async function createCodexVaultHookBridge(userId) {
|
|
|
4686
4688
|
});
|
|
4687
4689
|
});
|
|
4688
4690
|
await chmod(socketPath, 384);
|
|
4689
|
-
await writeFile(wrapperPath, privateCodexWrapper(codexCliScriptPath()), {
|
|
4690
|
-
|
|
4691
|
-
|
|
4692
|
-
|
|
4693
|
-
shellQuote(socketPath),
|
|
4694
|
-
shellQuote(token)
|
|
4695
|
-
].join(" ");
|
|
4691
|
+
await writeFile(wrapperPath, privateCodexWrapper(codexCliScriptPath(), socketPath, token), {
|
|
4692
|
+
mode: 448
|
|
4693
|
+
});
|
|
4694
|
+
const command = [shellQuote(process.execPath), shellQuote(hookClientPath())].join(" ");
|
|
4696
4695
|
return {
|
|
4697
4696
|
codexPathOverride: wrapperPath,
|
|
4697
|
+
environment: { [HOOK_SOCKET_ENV]: socketPath, [HOOK_TOKEN_ENV]: token },
|
|
4698
4698
|
hooks: {
|
|
4699
4699
|
PreToolUse: [
|
|
4700
4700
|
{
|
|
@@ -4723,7 +4723,7 @@ async function createCodexVaultHookBridge(userId) {
|
|
|
4723
4723
|
throw error;
|
|
4724
4724
|
}
|
|
4725
4725
|
}
|
|
4726
|
-
var MAX_HOOK_REQUEST_BYTES, SENSITIVE_STORAGE_DENIAL = "Runtime secret storage access is not permitted";
|
|
4726
|
+
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";
|
|
4727
4727
|
var init_codex_vault_hook_bridge = __esm(async () => {
|
|
4728
4728
|
init_codex_native_multi_agent();
|
|
4729
4729
|
await init_execution_host();
|
|
@@ -5837,7 +5837,10 @@ async function* codexProvider(opts) {
|
|
|
5837
5837
|
yield fileEvent;
|
|
5838
5838
|
}
|
|
5839
5839
|
} else if (item.type === "error") {
|
|
5840
|
-
|
|
5840
|
+
const message = String(item.message ?? "");
|
|
5841
|
+
if (message !== CODEX_HOOK_TRUST_BYPASS_NOTICE) {
|
|
5842
|
+
yield { type: "error", content: message };
|
|
5843
|
+
}
|
|
5841
5844
|
}
|
|
5842
5845
|
break;
|
|
5843
5846
|
}
|
|
@@ -5928,7 +5931,7 @@ async function* codexProvider(opts) {
|
|
|
5928
5931
|
await vaultHook.close();
|
|
5929
5932
|
}
|
|
5930
5933
|
}
|
|
5931
|
-
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;
|
|
5934
|
+
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;
|
|
5932
5935
|
var init_codex_provider = __esm(async () => {
|
|
5933
5936
|
init_codex_native_multi_agent();
|
|
5934
5937
|
init_codex_tree_kill();
|
|
@@ -19130,4 +19133,4 @@ export {
|
|
|
19130
19133
|
DEFAULT_SELF_CONFIG_PRODUCT
|
|
19131
19134
|
};
|
|
19132
19135
|
|
|
19133
|
-
//# debugId=
|
|
19136
|
+
//# debugId=0CE166A02CA7806164756E2164756E21
|