indusagi-coding-agent 0.2.3 → 0.2.4
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/CHANGELOG.md +25 -0
- package/dist/entry.js +1733 -572
- package/dist/guardrails.js +21 -6
- package/dist/index.js +1687 -552
- package/dist/types/boot/heap.d.ts +31 -0
- package/dist/types/boot/runners/delegate-runner.d.ts +21 -1
- package/dist/types/boot/runners/server-mode.d.ts +71 -0
- package/dist/types/boot/runners/session.d.ts +24 -1
- package/dist/types/boot/runners/session.test.d.ts +6 -1
- package/dist/types/boot/server-token.d.ts +97 -0
- package/dist/types/capability-deck/contract.d.ts +7 -6
- package/dist/types/conductor/conductor.d.ts +24 -0
- package/dist/types/conductor/contract.d.ts +71 -7
- package/dist/types/conductor/index.d.ts +3 -3
- package/dist/types/conductor/permissions.d.ts +74 -4
- package/dist/types/conductor/post-edit-diagnostics.test.d.ts +8 -3
- package/dist/types/conductor/quota-error.d.ts +35 -0
- package/dist/types/console/auth-status.d.ts +28 -0
- package/dist/types/console/components/TerminalConsole.d.ts +0 -5
- package/dist/types/console/contract.d.ts +13 -0
- package/dist/types/console/input/index.d.ts +1 -1
- package/dist/types/console/input/keymap.d.ts +1 -1
- package/dist/types/console/input/paste.d.ts +53 -1
- package/dist/types/console/overlays/approval-queue.d.ts +18 -1
- package/dist/types/console/overlays/index.d.ts +1 -1
- package/dist/types/launch/login.d.ts +68 -0
- package/dist/types/launch/oauth.test.d.ts +20 -0
- package/dist/types/window-budget/summarize/condense.d.ts +6 -0
- package/dist/types/workflow-engine/agent-runner.d.ts +20 -1
- package/dist/types/workspace/brand.d.ts +1 -1
- package/package.json +2 -2
package/dist/guardrails.js
CHANGED
|
@@ -7849,8 +7849,18 @@ function resolveRuleDecision(toolName, input, rules, mode, readOnlyExtra) {
|
|
|
7849
7849
|
}
|
|
7850
7850
|
return "ask";
|
|
7851
7851
|
}
|
|
7852
|
+
function allowAlwaysRuleStrings(toolName, input) {
|
|
7853
|
+
if (isBashTool(toolName)) {
|
|
7854
|
+
const bag = input;
|
|
7855
|
+
const command = typeof input === "string" ? input : bag !== null && typeof bag === "object" && typeof bag.command === "string" ? bag.command : "";
|
|
7856
|
+
if (command.length > 0) {
|
|
7857
|
+
return bashSubcommandSubjects(command).map((subject) => `${toolName}(${subject})`);
|
|
7858
|
+
}
|
|
7859
|
+
}
|
|
7860
|
+
return [toolName];
|
|
7861
|
+
}
|
|
7852
7862
|
function noResolverMessage(toolName) {
|
|
7853
|
-
return `Tool "${toolName}" requires approval, but
|
|
7863
|
+
return `Tool "${toolName}" requires approval, but no interactive approval prompt is available here (a non-interactive run, or a sub-agent). Denying. Add an allow rule under permissions.allow in settings, or run with --permission-mode acceptEdits/bypass, to permit it.`;
|
|
7854
7864
|
}
|
|
7855
7865
|
function declinedMessage(toolName) {
|
|
7856
7866
|
return `Tool "${toolName}" was denied by the user.`;
|
|
@@ -7892,13 +7902,18 @@ function createPermissionGate(config) {
|
|
|
7892
7902
|
} catch {
|
|
7893
7903
|
choice = "deny";
|
|
7894
7904
|
}
|
|
7895
|
-
if (choice === "
|
|
7896
|
-
|
|
7905
|
+
if (choice === "allow-once" || choice === "allow-always") {
|
|
7906
|
+
if (choice === "allow-always" && config.appendAllowRule) {
|
|
7907
|
+
for (const raw of allowAlwaysRuleStrings(toolName, input)) {
|
|
7908
|
+
config.appendAllowRule(makeRule("allow", raw));
|
|
7909
|
+
}
|
|
7910
|
+
}
|
|
7911
|
+
return { behavior: "allow" };
|
|
7897
7912
|
}
|
|
7898
|
-
if (choice === "
|
|
7899
|
-
|
|
7913
|
+
if (choice === "unavailable") {
|
|
7914
|
+
return { behavior: "deny", message: noResolverMessage(toolName) };
|
|
7900
7915
|
}
|
|
7901
|
-
return { behavior: "
|
|
7916
|
+
return { behavior: "deny", message: declinedMessage(toolName) };
|
|
7902
7917
|
};
|
|
7903
7918
|
}
|
|
7904
7919
|
|