negotium 0.1.22 → 0.1.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.
- package/dist/agent-helpers.js +18 -5
- package/dist/agent-helpers.js.map +6 -6
- package/dist/cron.js +21 -6
- package/dist/cron.js.map +6 -6
- package/dist/hosted-agent.js +18 -5
- package/dist/hosted-agent.js.map +6 -6
- package/dist/main.js +21 -6
- package/dist/main.js.map +6 -6
- package/dist/runtime/src/agents/claude-provider.ts +11 -5
- package/dist/runtime/src/agents/maestro-provider.ts +4 -1
- package/dist/runtime/src/agents/vault-tool-policy.ts +15 -0
- package/dist/runtime/src/version.ts +1 -1
- package/dist/types/packages/core/src/agents/claude-provider.d.ts +1 -1
- package/dist/types/packages/core/src/agents/vault-tool-policy.d.ts +1 -0
- package/dist/types/packages/core/src/version.d.ts +1 -1
- package/package.json +1 -1
package/dist/cron.js
CHANGED
|
@@ -1832,6 +1832,14 @@ var init_sensitive_path = __esm(() => {
|
|
|
1832
1832
|
});
|
|
1833
1833
|
|
|
1834
1834
|
// ../../packages/core/src/agents/vault-tool-policy.ts
|
|
1835
|
+
function leafToolName(toolName) {
|
|
1836
|
+
const parts = toolName.split("__");
|
|
1837
|
+
return parts.at(-1) ?? toolName;
|
|
1838
|
+
}
|
|
1839
|
+
function shouldSubstituteVaultToolInput(toolName) {
|
|
1840
|
+
const leaf = leafToolName(toolName);
|
|
1841
|
+
return leaf.startsWith("browser_") || DIRECT_VAULT_EXECUTION_TOOLS.has(leaf);
|
|
1842
|
+
}
|
|
1835
1843
|
function createVaultToolPolicy(host) {
|
|
1836
1844
|
function isVaultBrokerTool(toolName) {
|
|
1837
1845
|
return toolName.includes("vault_run") || toolName.includes("vault_http_request");
|
|
@@ -1855,7 +1863,7 @@ function createVaultToolPolicy(host) {
|
|
|
1855
1863
|
}
|
|
1856
1864
|
return { isVaultBrokerTool, referencesRuntimeSecretStorage, shouldRedirectVaultTool };
|
|
1857
1865
|
}
|
|
1858
|
-
var SENSITIVE_RUNTIME_NAMES, defaultVaultToolPolicy, isVaultBrokerTool, referencesRuntimeSecretStorage, shouldRedirectVaultTool;
|
|
1866
|
+
var SENSITIVE_RUNTIME_NAMES, DIRECT_VAULT_EXECUTION_TOOLS, defaultVaultToolPolicy, isVaultBrokerTool, referencesRuntimeSecretStorage, shouldRedirectVaultTool;
|
|
1859
1867
|
var init_vault_tool_policy = __esm(() => {
|
|
1860
1868
|
init_sensitive_path();
|
|
1861
1869
|
SENSITIVE_RUNTIME_NAMES = [
|
|
@@ -1864,6 +1872,7 @@ var init_vault_tool_policy = __esm(() => {
|
|
|
1864
1872
|
"runtime-mcp-secret",
|
|
1865
1873
|
"sessions.db"
|
|
1866
1874
|
];
|
|
1875
|
+
DIRECT_VAULT_EXECUTION_TOOLS = new Set(["Bash", "WebFetch"]);
|
|
1867
1876
|
defaultVaultToolPolicy = createVaultToolPolicy({
|
|
1868
1877
|
isSensitivePath,
|
|
1869
1878
|
valueReferencesVaultKey: () => false
|
|
@@ -2979,7 +2988,9 @@ var DEFAULT_CONTEXT_WARNING_RATIO = 0.8;
|
|
|
2979
2988
|
import { spawn as spawn2 } from "child_process";
|
|
2980
2989
|
import { existsSync as existsSync8, readFileSync as readFileSync6 } from "fs";
|
|
2981
2990
|
import { query } from "@anthropic-ai/claude-agent-sdk";
|
|
2982
|
-
function substituteClaudeToolInput(userId, input) {
|
|
2991
|
+
function substituteClaudeToolInput(userId, toolName, input) {
|
|
2992
|
+
if (!shouldSubstituteVaultToolInput(toolName))
|
|
2993
|
+
return input;
|
|
2983
2994
|
return deepMapStrings(input, (value) => substituteHostedSecrets(userId, value));
|
|
2984
2995
|
}
|
|
2985
2996
|
function buildClaudeDisallowedTools(extra = undefined) {
|
|
@@ -3212,7 +3223,7 @@ async function* claudeProvider(opts) {
|
|
|
3212
3223
|
};
|
|
3213
3224
|
}
|
|
3214
3225
|
const userId = opts.userId ?? "";
|
|
3215
|
-
const withVault = substituteClaudeToolInput(userId, tool_input);
|
|
3226
|
+
const withVault = substituteClaudeToolInput(userId, tool_name, tool_input);
|
|
3216
3227
|
if (JSON.stringify(withVault) === JSON.stringify(tool_input)) {
|
|
3217
3228
|
return { continue: true };
|
|
3218
3229
|
}
|
|
@@ -3429,6 +3440,7 @@ var CLAUDE_DEFAULT_DISALLOWED_TOOLS, CLAUDE_NATIVE_AGENT_TOOLS, CLAUDE_IMAGE_MAX
|
|
|
3429
3440
|
var init_claude_provider = __esm(async () => {
|
|
3430
3441
|
init_claude_registry();
|
|
3431
3442
|
await init_execution_host();
|
|
3443
|
+
init_vault_tool_policy();
|
|
3432
3444
|
init_file_events();
|
|
3433
3445
|
init_logger();
|
|
3434
3446
|
CLAUDE_DEFAULT_DISALLOWED_TOOLS = [
|
|
@@ -3451,7 +3463,7 @@ var init_claude_provider = __esm(async () => {
|
|
|
3451
3463
|
});
|
|
3452
3464
|
|
|
3453
3465
|
// ../../packages/core/src/version.ts
|
|
3454
|
-
var NEGOTIUM_VERSION = "0.1.
|
|
3466
|
+
var NEGOTIUM_VERSION = "0.1.23";
|
|
3455
3467
|
|
|
3456
3468
|
// ../../packages/core/src/agents/codex-native-multi-agent.ts
|
|
3457
3469
|
import { spawn as spawn3 } from "child_process";
|
|
@@ -4089,10 +4101,12 @@ function buildMaestroDisallowedTools(callerDisallowedTools = []) {
|
|
|
4089
4101
|
function buildVaultHook(userId) {
|
|
4090
4102
|
return {
|
|
4091
4103
|
name: "vault-guard",
|
|
4092
|
-
pre({ input }) {
|
|
4104
|
+
pre({ toolName, input }) {
|
|
4093
4105
|
if (referencesHostedSecretStorage(input)) {
|
|
4094
4106
|
return { decision: "block", error: "Runtime secret storage access is not permitted" };
|
|
4095
4107
|
}
|
|
4108
|
+
if (!shouldSubstituteVaultToolInput(toolName))
|
|
4109
|
+
return { decision: "allow" };
|
|
4096
4110
|
const substituted = deepMapStrings(input, (value) => substituteHostedSecrets(userId, value));
|
|
4097
4111
|
return JSON.stringify(substituted) === JSON.stringify(input) ? { decision: "allow" } : { decision: "modify", input: substituted };
|
|
4098
4112
|
},
|
|
@@ -4150,6 +4164,7 @@ var MAESTRO_DEFAULT_MAX_TOKENS = 32768, PROVIDER_ASK_USER_TOOL = "AskUserQuestio
|
|
|
4150
4164
|
var init_maestro_provider = __esm(async () => {
|
|
4151
4165
|
init_maestro_bootstrap_env();
|
|
4152
4166
|
await init_execution_host();
|
|
4167
|
+
init_vault_tool_policy();
|
|
4153
4168
|
MAESTRO_NATIVE_TASK_TOOLS = [
|
|
4154
4169
|
"TaskCreate",
|
|
4155
4170
|
"TaskUpdate",
|
|
@@ -13941,4 +13956,4 @@ export {
|
|
|
13941
13956
|
CRON_CONTEXT_RETAIN_TURNS
|
|
13942
13957
|
};
|
|
13943
13958
|
|
|
13944
|
-
//# debugId=
|
|
13959
|
+
//# debugId=9CE363245A572F6F64756E2164756E21
|