negotium 0.1.22 → 0.1.24

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.
@@ -1794,6 +1794,15 @@ var SENSITIVE_RUNTIME_NAMES = [
1794
1794
  "runtime-mcp-secret",
1795
1795
  "sessions.db"
1796
1796
  ];
1797
+ var DIRECT_VAULT_EXECUTION_TOOLS = new Set(["Bash", "WebFetch"]);
1798
+ function leafToolName(toolName) {
1799
+ const parts = toolName.split("__");
1800
+ return parts.at(-1) ?? toolName;
1801
+ }
1802
+ function shouldSubstituteVaultToolInput(toolName) {
1803
+ const leaf = leafToolName(toolName);
1804
+ return leaf.startsWith("browser_") || DIRECT_VAULT_EXECUTION_TOOLS.has(leaf);
1805
+ }
1797
1806
  var VAULT_BROKER_REDIRECT_ERROR = "Vault broker redirection is disabled; use {{KEY}} directly in normal tool inputs.";
1798
1807
  function createVaultToolPolicy(host) {
1799
1808
  function isVaultBrokerTool(toolName) {
@@ -2831,7 +2840,9 @@ var CLAUDE_DEFAULT_DISALLOWED_TOOLS = [
2831
2840
  "TaskGet"
2832
2841
  ];
2833
2842
  var CLAUDE_NATIVE_AGENT_TOOLS = ["Task", "Agent", "TaskOutput", "TaskStop"];
2834
- function substituteClaudeToolInput(userId, input) {
2843
+ function substituteClaudeToolInput(userId, toolName, input) {
2844
+ if (!shouldSubstituteVaultToolInput(toolName))
2845
+ return input;
2835
2846
  return deepMapStrings(input, (value) => substituteHostedSecrets(userId, value));
2836
2847
  }
2837
2848
  function buildClaudeDisallowedTools(extra = undefined) {
@@ -3072,7 +3083,7 @@ async function* claudeProvider(opts) {
3072
3083
  };
3073
3084
  }
3074
3085
  const userId = opts.userId ?? "";
3075
- const withVault = substituteClaudeToolInput(userId, tool_input);
3086
+ const withVault = substituteClaudeToolInput(userId, tool_name, tool_input);
3076
3087
  if (JSON.stringify(withVault) === JSON.stringify(tool_input)) {
3077
3088
  return { continue: true };
3078
3089
  }
@@ -3304,7 +3315,7 @@ import { createRequire } from "module";
3304
3315
  import { dirname as dirname6, join as join11 } from "path";
3305
3316
 
3306
3317
  // ../../packages/core/src/version.ts
3307
- var NEGOTIUM_VERSION = "0.1.22";
3318
+ var NEGOTIUM_VERSION = "0.1.24";
3308
3319
 
3309
3320
  // ../../packages/core/src/agents/codex-native-multi-agent.ts
3310
3321
  var NEGOTIUM_MODEL_CATALOG = "negotium-model-catalog.json";
@@ -3939,10 +3950,12 @@ function buildMaestroDisallowedTools(callerDisallowedTools = []) {
3939
3950
  function buildVaultHook(userId) {
3940
3951
  return {
3941
3952
  name: "vault-guard",
3942
- pre({ input }) {
3953
+ pre({ toolName, input }) {
3943
3954
  if (referencesHostedSecretStorage(input)) {
3944
3955
  return { decision: "block", error: "Runtime secret storage access is not permitted" };
3945
3956
  }
3957
+ if (!shouldSubstituteVaultToolInput(toolName))
3958
+ return { decision: "allow" };
3946
3959
  const substituted = deepMapStrings(input, (value) => substituteHostedSecrets(userId, value));
3947
3960
  return JSON.stringify(substituted) === JSON.stringify(input) ? { decision: "allow" } : { decision: "modify", input: substituted };
3948
3961
  },
@@ -6348,4 +6361,4 @@ export {
6348
6361
  VAULT_BROKER_REDIRECT_ERROR
6349
6362
  };
6350
6363
 
6351
- //# debugId=386290251F1B5ABD64756E2164756E21
6364
+ //# debugId=9524E348462F8E0864756E2164756E21