strands-darwin 0.0.33 → 0.0.35
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/README.md +5 -1
- package/README.zh-CN.md +5 -1
- package/dist/patches/@strands-agents+sdk+1.16.0.patch +29 -15
- package/dist/patches/ink+7.1.1.patch +58 -0
- package/dist/src/agent/background-delegation.d.ts +3 -3
- package/dist/src/agent/background-delegation.js +2 -2
- package/dist/src/agent/background-delegation.js.map +1 -1
- package/dist/src/agent/cache-miss.d.ts +143 -0
- package/dist/src/agent/cache-miss.js +182 -0
- package/dist/src/agent/cache-miss.js.map +1 -0
- package/dist/src/agent/compact.d.ts +28 -0
- package/dist/src/agent/compact.js +34 -0
- package/dist/src/agent/compact.js.map +1 -1
- package/dist/src/agent/context-breakdown.d.ts +110 -0
- package/dist/src/agent/context-breakdown.js +117 -0
- package/dist/src/agent/context-breakdown.js.map +1 -0
- package/dist/src/agent/instructions.d.ts +23 -4
- package/dist/src/agent/instructions.js +67 -34
- package/dist/src/agent/instructions.js.map +1 -1
- package/dist/src/agent/permission-rules.d.ts +81 -2
- package/dist/src/agent/permission-rules.js +226 -6
- package/dist/src/agent/permission-rules.js.map +1 -1
- package/dist/src/agent/permission.d.ts +116 -2
- package/dist/src/agent/permission.js +201 -26
- package/dist/src/agent/permission.js.map +1 -1
- package/dist/src/agent/prompt-cache.d.ts +12 -3
- package/dist/src/agent/prompt-cache.js +12 -3
- package/dist/src/agent/prompt-cache.js.map +1 -1
- package/dist/src/agent/refusal.d.ts +44 -7
- package/dist/src/agent/refusal.js +54 -8
- package/dist/src/agent/refusal.js.map +1 -1
- package/dist/src/agent/runtime.d.ts +112 -7
- package/dist/src/agent/runtime.js +240 -19
- package/dist/src/agent/runtime.js.map +1 -1
- package/dist/src/agent/stream-resumption.d.ts +5 -2
- package/dist/src/agent/stream-resumption.js +5 -2
- package/dist/src/agent/stream-resumption.js.map +1 -1
- package/dist/src/agent/system-prompt.d.ts +1 -1
- package/dist/src/agent/system-prompt.js +4 -1
- package/dist/src/agent/system-prompt.js.map +1 -1
- package/dist/src/agent/thinking.js +4 -2
- package/dist/src/agent/thinking.js.map +1 -1
- package/dist/src/agents/child-recipe.d.ts +9 -1
- package/dist/src/agents/child-recipe.js +2 -0
- package/dist/src/agents/child-recipe.js.map +1 -1
- package/dist/src/agents/dispatch-registry.d.ts +18 -0
- package/dist/src/agents/dispatch-registry.js +2 -0
- package/dist/src/agents/dispatch-registry.js.map +1 -1
- package/dist/src/agents/retained-children.d.ts +101 -0
- package/dist/src/agents/retained-children.js +101 -0
- package/dist/src/agents/retained-children.js.map +1 -0
- package/dist/src/agents/subagent-tool.d.ts +50 -1
- package/dist/src/agents/subagent-tool.js +151 -12
- package/dist/src/agents/subagent-tool.js.map +1 -1
- package/dist/src/agents/workflow-tool.js +2 -2
- package/dist/src/agents/workflow-tool.js.map +1 -1
- package/dist/src/cli-doctor.js +10 -6
- package/dist/src/cli-doctor.js.map +1 -1
- package/dist/src/cli-main.js +9 -3
- package/dist/src/cli-main.js.map +1 -1
- package/dist/src/commands/custom-commands.d.ts +1 -1
- package/dist/src/commands/custom-commands.js +12 -5
- package/dist/src/commands/custom-commands.js.map +1 -1
- package/dist/src/commands/init-command.d.ts +47 -0
- package/dist/src/commands/init-command.js +110 -0
- package/dist/src/commands/init-command.js.map +1 -0
- package/dist/src/config.d.ts +78 -8
- package/dist/src/config.js +167 -20
- package/dist/src/config.js.map +1 -1
- package/dist/src/dev-repl.js +17 -2
- package/dist/src/dev-repl.js.map +1 -1
- package/dist/src/headless-protocol.d.ts +1 -1
- package/dist/src/headless-protocol.js +6 -5
- package/dist/src/headless-protocol.js.map +1 -1
- package/dist/src/headless-runner.js +12 -3
- package/dist/src/headless-runner.js.map +1 -1
- package/dist/src/headless.d.ts +11 -0
- package/dist/src/headless.js +33 -7
- package/dist/src/headless.js.map +1 -1
- package/dist/src/hooks/tool-hooks.js +10 -6
- package/dist/src/hooks/tool-hooks.js.map +1 -1
- package/dist/src/pricing/model-prices.d.ts +3 -1
- package/dist/src/pricing/model-prices.js +7 -1
- package/dist/src/pricing/model-prices.js.map +1 -1
- package/dist/src/skills/builtin/self-evolution-research/SKILL.md +14 -1
- package/dist/src/skills/prompt.d.ts +17 -0
- package/dist/src/skills/prompt.js +20 -0
- package/dist/src/skills/prompt.js.map +1 -1
- package/dist/src/tools/background-bash.d.ts +15 -3
- package/dist/src/tools/background-bash.js +18 -8
- package/dist/src/tools/background-bash.js.map +1 -1
- package/dist/src/tools/file-editor-serial.d.ts +14 -0
- package/dist/src/tools/file-editor-serial.js +15 -0
- package/dist/src/tools/file-editor-serial.js.map +1 -1
- package/dist/src/tools/shell-env.d.ts +77 -0
- package/dist/src/tools/shell-env.js +139 -0
- package/dist/src/tools/shell-env.js.map +1 -0
- package/dist/src/trajectory/record.d.ts +169 -2
- package/dist/src/trajectory/record.js +135 -0
- package/dist/src/trajectory/record.js.map +1 -1
- package/dist/src/trajectory/replay.d.ts +34 -1
- package/dist/src/trajectory/replay.js +157 -4
- package/dist/src/trajectory/replay.js.map +1 -1
- package/dist/src/trajectory/resume-recap.js +10 -3
- package/dist/src/trajectory/resume-recap.js.map +1 -1
- package/dist/src/trajectory/spend.d.ts +14 -1
- package/dist/src/trajectory/spend.js +40 -6
- package/dist/src/trajectory/spend.js.map +1 -1
- package/dist/src/trajectory/writer.d.ts +89 -4
- package/dist/src/trajectory/writer.js +191 -17
- package/dist/src/trajectory/writer.js.map +1 -1
- package/dist/src/tui/App.d.ts +12 -5
- package/dist/src/tui/App.js +328 -67
- package/dist/src/tui/App.js.map +1 -1
- package/dist/src/tui/InputBox.d.ts +1 -1
- package/dist/src/tui/InputBox.js +1 -1
- package/dist/src/tui/context-format.d.ts +16 -0
- package/dist/src/tui/context-format.js +41 -0
- package/dist/src/tui/context-format.js.map +1 -1
- package/dist/src/tui/instructions-format.d.ts +14 -0
- package/dist/src/tui/instructions-format.js +24 -0
- package/dist/src/tui/instructions-format.js.map +1 -0
- package/dist/src/tui/prompt-queue.js +4 -2
- package/dist/src/tui/prompt-queue.js.map +1 -1
- package/dist/src/tui/status-format.d.ts +50 -16
- package/dist/src/tui/status-format.js +92 -8
- package/dist/src/tui/status-format.js.map +1 -1
- package/dist/src/tui/subagent-format.js +13 -1
- package/dist/src/tui/subagent-format.js.map +1 -1
- package/dist/src/tui/tangent.d.ts +122 -0
- package/dist/src/tui/tangent.js +153 -0
- package/dist/src/tui/tangent.js.map +1 -0
- package/dist/src/tui/terminal-notify.d.ts +40 -0
- package/dist/src/tui/terminal-notify.js +136 -0
- package/dist/src/tui/terminal-notify.js.map +1 -0
- package/dist/src/tui/terminal-title.d.ts +94 -0
- package/dist/src/tui/terminal-title.js +121 -0
- package/dist/src/tui/terminal-title.js.map +1 -0
- package/dist/src/tui/turn-state.d.ts +12 -1
- package/dist/src/tui/turn-state.js +11 -0
- package/dist/src/tui/turn-state.js.map +1 -1
- package/package.json +3 -3
|
@@ -1,14 +1,29 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Project instructions preloaded from AGENTS.md.
|
|
2
|
+
* Project instructions preloaded from AGENTS.md — or, when there is none, CLAUDE.md.
|
|
3
3
|
*
|
|
4
|
-
* Only the run directory's own
|
|
5
|
-
*
|
|
6
|
-
*
|
|
4
|
+
* Only the run directory's own file is read: no walking up to parent directories
|
|
5
|
+
* and no merging of several files, so what reaches the model is exactly one file
|
|
6
|
+
* sitting next to the repository the user is working in. There is exactly one
|
|
7
|
+
* fallback name and it is fixed: `CLAUDE.md` (Claude Code's convention) is tried
|
|
8
|
+
* only when `AGENTS.md` does not exist at all. An `AGENTS.md` that is present but
|
|
9
|
+
* unusable decides the outcome by itself; when both files exist, `CLAUDE.md` is
|
|
10
|
+
* never opened.
|
|
7
11
|
*/
|
|
8
12
|
import { readFile } from 'node:fs/promises';
|
|
9
13
|
import path from 'node:path';
|
|
10
14
|
import { StringDecoder } from 'node:string_decoder';
|
|
11
15
|
export const AGENTS_FILENAME = 'AGENTS.md';
|
|
16
|
+
/** Read only when {@link AGENTS_FILENAME} does not exist. */
|
|
17
|
+
export const CLAUDE_FILENAME = 'CLAUDE.md';
|
|
18
|
+
/** Lookup order — the first file that exists decides, whether or not it can be read. */
|
|
19
|
+
const INSTRUCTIONS_FILENAMES = [AGENTS_FILENAME, CLAUDE_FILENAME];
|
|
20
|
+
/**
|
|
21
|
+
* One fixed line for the CLAUDE.md case only. Claude Code expands `@path` lines
|
|
22
|
+
* into the referenced files; darwin does not, so without this the model would
|
|
23
|
+
* take an import line for content it has already been given.
|
|
24
|
+
*/
|
|
25
|
+
export const CLAUDE_IMPORT_NOTICE = `(Loaded from ${CLAUDE_FILENAME} because there is no ${AGENTS_FILENAME}. ` +
|
|
26
|
+
'`@path` import lines are not expanded by darwin: they are literal text here, not loaded content.)';
|
|
12
27
|
/**
|
|
13
28
|
* Instructions past this size are truncated rather than sent whole.
|
|
14
29
|
*
|
|
@@ -18,7 +33,8 @@ export const AGENTS_FILENAME = 'AGENTS.md';
|
|
|
18
33
|
*/
|
|
19
34
|
export const MAX_INSTRUCTIONS_BYTES = 32 * 1024;
|
|
20
35
|
/**
|
|
21
|
-
* Reads `<projectRoot>/AGENTS.md
|
|
36
|
+
* Reads `<projectRoot>/AGENTS.md`, or `<projectRoot>/CLAUDE.md` when the former
|
|
37
|
+
* does not exist.
|
|
22
38
|
*
|
|
23
39
|
* A broken file never blocks startup — the agent works without project
|
|
24
40
|
* instructions — but the two ways of ending up without them are not the same. No
|
|
@@ -27,34 +43,46 @@ export const MAX_INSTRUCTIONS_BYTES = 32 * 1024;
|
|
|
27
43
|
* user has rules they believe are in effect and nothing on screen contradicts
|
|
28
44
|
* that. Same isolation rule as a broken skill directory: skip it, say why.
|
|
29
45
|
*
|
|
46
|
+
* Only a truly missing `AGENTS.md` moves on to `CLAUDE.md`: an unreadable one is
|
|
47
|
+
* reported as such and never falls through, because the file the user wrote
|
|
48
|
+
* rules into is the one that must decide. Whichever file is found first is the
|
|
49
|
+
* only one opened.
|
|
50
|
+
*
|
|
30
51
|
* An empty or whitespace-only file is silently skipped: injecting the delimiters
|
|
31
52
|
* with nothing between them would only point the model at emptiness.
|
|
32
53
|
*/
|
|
33
54
|
export async function loadProjectInstructions(projectRoot) {
|
|
34
|
-
const
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
55
|
+
for (const filename of INSTRUCTIONS_FILENAMES) {
|
|
56
|
+
const filePath = path.join(projectRoot, filename);
|
|
57
|
+
let raw;
|
|
58
|
+
try {
|
|
59
|
+
raw = await readFile(filePath);
|
|
60
|
+
}
|
|
61
|
+
catch (error) {
|
|
62
|
+
if (isMissingFile(error))
|
|
63
|
+
continue;
|
|
64
|
+
return { instructions: undefined, problem: describe(error), problemFile: filename };
|
|
65
|
+
}
|
|
66
|
+
const bytes = raw.byteLength;
|
|
67
|
+
const truncated = bytes > MAX_INSTRUCTIONS_BYTES;
|
|
68
|
+
const text = truncated
|
|
69
|
+
? clipToLastLine(raw.subarray(0, MAX_INSTRUCTIONS_BYTES))
|
|
70
|
+
: raw.toString('utf8');
|
|
71
|
+
if (text.trim() === '')
|
|
72
|
+
return { instructions: undefined, problem: undefined, problemFile: undefined };
|
|
73
|
+
return {
|
|
74
|
+
instructions: {
|
|
75
|
+
filename,
|
|
76
|
+
path: filePath,
|
|
77
|
+
bytes,
|
|
78
|
+
truncated,
|
|
79
|
+
fragment: renderFragment(text.trimEnd(), truncated, filename),
|
|
80
|
+
},
|
|
81
|
+
problem: undefined,
|
|
82
|
+
problemFile: undefined,
|
|
83
|
+
};
|
|
41
84
|
}
|
|
42
|
-
|
|
43
|
-
const truncated = bytes > MAX_INSTRUCTIONS_BYTES;
|
|
44
|
-
const text = truncated
|
|
45
|
-
? clipToLastLine(raw.subarray(0, MAX_INSTRUCTIONS_BYTES))
|
|
46
|
-
: raw.toString('utf8');
|
|
47
|
-
if (text.trim() === '')
|
|
48
|
-
return { instructions: undefined, problem: undefined };
|
|
49
|
-
return {
|
|
50
|
-
instructions: {
|
|
51
|
-
path: filePath,
|
|
52
|
-
bytes,
|
|
53
|
-
truncated,
|
|
54
|
-
fragment: renderFragment(text.trimEnd(), truncated),
|
|
55
|
-
},
|
|
56
|
-
problem: undefined,
|
|
57
|
-
};
|
|
85
|
+
return { instructions: undefined, problem: undefined, problemFile: undefined };
|
|
58
86
|
}
|
|
59
87
|
/**
|
|
60
88
|
* Places project instructions directly after the base prompt.
|
|
@@ -71,10 +99,11 @@ export function composeSystemPrompt(basePrompt, instructions) {
|
|
|
71
99
|
return `${basePrompt}\n\n${instructions.fragment}`;
|
|
72
100
|
}
|
|
73
101
|
/**
|
|
74
|
-
* True when the file is simply not there
|
|
102
|
+
* True when the file is simply not there — the only case that moves on to the
|
|
103
|
+
* fallback name.
|
|
75
104
|
*
|
|
76
105
|
* `ENOTDIR` counts: a path component that is a file rather than a directory means
|
|
77
|
-
* there is no
|
|
106
|
+
* there is no such file at that location either.
|
|
78
107
|
*/
|
|
79
108
|
function isMissingFile(error) {
|
|
80
109
|
const code = typeof error === 'object' && error !== null ? error.code : undefined;
|
|
@@ -100,14 +129,18 @@ function clipToLastLine(slice) {
|
|
|
100
129
|
/**
|
|
101
130
|
* Wraps the text in a labelled block. The source attribute matters: the model has
|
|
102
131
|
* to be able to tell these instructions came from the project's own file rather
|
|
103
|
-
* than from darwin itself, since only one of the two is something the user can edit
|
|
132
|
+
* than from darwin itself, since only one of the two is something the user can edit
|
|
133
|
+
* — and which file, since a CLAUDE.md may lean on Claude Code features (its
|
|
134
|
+
* `@path` imports) that darwin does not provide; {@link CLAUDE_IMPORT_NOTICE} says
|
|
135
|
+
* so once, in that case only.
|
|
104
136
|
*/
|
|
105
|
-
function renderFragment(text, truncated) {
|
|
137
|
+
function renderFragment(text, truncated, filename) {
|
|
106
138
|
const attributes = truncated
|
|
107
|
-
? `source="${
|
|
108
|
-
: `source="${
|
|
139
|
+
? `source="${filename}" truncated="true"`
|
|
140
|
+
: `source="${filename}"`;
|
|
109
141
|
return [
|
|
110
142
|
`<project-instructions ${attributes}>`,
|
|
143
|
+
...(filename === CLAUDE_FILENAME ? [CLAUDE_IMPORT_NOTICE] : []),
|
|
111
144
|
text,
|
|
112
145
|
...(truncated
|
|
113
146
|
? [`(This file is larger than ${MAX_INSTRUCTIONS_BYTES / 1024} KB and was cut off here.)`]
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"instructions.js","sourceRoot":"","sources":["../../../src/agent/instructions.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"instructions.js","sourceRoot":"","sources":["../../../src/agent/instructions.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AACH,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAEpD,MAAM,CAAC,MAAM,eAAe,GAAG,WAAW,CAAC;AAC3C,6DAA6D;AAC7D,MAAM,CAAC,MAAM,eAAe,GAAG,WAAW,CAAC;AAI3C,wFAAwF;AACxF,MAAM,sBAAsB,GAAoC,CAAC,eAAe,EAAE,eAAe,CAAC,CAAC;AAEnG;;;;GAIG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAC/B,gBAAgB,eAAe,wBAAwB,eAAe,IAAI;IAC1E,mGAAmG,CAAC;AAEtG;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,sBAAsB,GAAG,EAAE,GAAG,IAAI,CAAC;AA8BhD;;;;;;;;;;;;;;;;;;GAkBG;AACH,MAAM,CAAC,KAAK,UAAU,uBAAuB,CAC3C,WAAmB;IAEnB,KAAK,MAAM,QAAQ,IAAI,sBAAsB,EAAE,CAAC;QAC9C,MAAM,QAAQ,GAAG,IAAI,CAAC,IAAI,CAAC,WAAW,EAAE,QAAQ,CAAC,CAAC;QAElD,IAAI,GAAW,CAAC;QAChB,IAAI,C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,CAAC;YAC1F,CAAC,CAAC,EAAE,CAAC;QACP,yBAAyB;KAC1B,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AACf,CAAC"}
|
|
@@ -10,6 +10,55 @@ export interface RuleSuggestion {
|
|
|
10
10
|
/** Short label for the option line, e.g. `pnpm *` or `all bash`. */
|
|
11
11
|
label: string;
|
|
12
12
|
}
|
|
13
|
+
/**
|
|
14
|
+
* Home-relative directories whose every entry is a credential. The directory
|
|
15
|
+
* itself counts too: listing `~/.ssh` names the keys that exist.
|
|
16
|
+
*/
|
|
17
|
+
export declare const SENSITIVE_READ_DIRECTORIES: readonly string[];
|
|
18
|
+
/** Home-relative files that hold credentials. */
|
|
19
|
+
export declare const SENSITIVE_READ_HOME_FILES: readonly string[];
|
|
20
|
+
/** Absolute files that hold credentials. */
|
|
21
|
+
export declare const SENSITIVE_READ_ABSOLUTE_FILES: readonly string[];
|
|
22
|
+
/**
|
|
23
|
+
* The fixed sensitive-read set (SER-071): a resolved absolute path that is under
|
|
24
|
+
* one of {@link SENSITIVE_READ_DIRECTORIES}, is one of the home or absolute
|
|
25
|
+
* credential files, has a `.env` / `.env.*` basename anywhere, or is one of
|
|
26
|
+
* darwin's own policy files ({@link isSensitiveDarwinPath}).
|
|
27
|
+
*
|
|
28
|
+
* A fixed set rather than "outside the project": darwin legitimately reads
|
|
29
|
+
* `/tmp`, `/etc/os-release` and the global skill roots, and a one-line list is
|
|
30
|
+
* something a prompt can explain.
|
|
31
|
+
*/
|
|
32
|
+
export declare function isSensitiveReadPath(projectRoot: string, resolved: string): boolean;
|
|
33
|
+
/**
|
|
34
|
+
* The credential location a recursive content search started at `resolved`
|
|
35
|
+
* would descend into — `~/.ssh` for `~`, `/home/<user>` or `/`; `/etc/shadow`
|
|
36
|
+
* for `/etc` — or undefined. Only the fixed home/absolute locations qualify:
|
|
37
|
+
* `.env*` basenames are excluded on purpose, or `grep -r foo .` would prompt in
|
|
38
|
+
* every project that has a `.env`. Returned `~`-abbreviated for the prompt.
|
|
39
|
+
*/
|
|
40
|
+
export declare function sensitiveLocationBelow(resolved: string): string | undefined;
|
|
41
|
+
/**
|
|
42
|
+
* One path argument as the shell (or the model) would resolve it: `~`, `~/…`,
|
|
43
|
+
* `$HOME…` and `${HOME}…` against the home directory, relative forms against
|
|
44
|
+
* the project root, `..` segments normalised. Surrounding quotes are dropped
|
|
45
|
+
* first — bash would not expand a quoted `~`, so this over-approximates, which
|
|
46
|
+
* for a read costs a prompt and never a silent approval.
|
|
47
|
+
*/
|
|
48
|
+
export declare function resolveReadTarget(argument: string, projectRoot: string): string;
|
|
49
|
+
/**
|
|
50
|
+
* The first read target of this call that falls in the sensitive set, as the
|
|
51
|
+
* model wrote it, or undefined when the call reads nothing sensitive (SER-071).
|
|
52
|
+
*
|
|
53
|
+
* Targets are the `path` of `fileEditor view` and every non-option argument of
|
|
54
|
+
* every {@link BASH_PATH_READERS} segment of a bash command — a pattern
|
|
55
|
+
* argument (`rg password ~/.gnupg`) is resolved like a path and simply misses.
|
|
56
|
+
* For the {@link RECURSIVE_CONTENT_READERS} an argument that is an ancestor of a
|
|
57
|
+
* credential location also counts, returned as
|
|
58
|
+
* `<arg> (searches above <location>)`. Any other tool or command reads nothing
|
|
59
|
+
* this function can see.
|
|
60
|
+
*/
|
|
61
|
+
export declare function sensitiveReadPath(toolName: string, input: unknown, projectRoot: string): string | undefined;
|
|
13
62
|
/** True when the command contains redirection or substitution. */
|
|
14
63
|
export declare function hasShellMetacharacters(command: string): boolean;
|
|
15
64
|
/**
|
|
@@ -33,10 +82,40 @@ export declare function isValidRule(rule: string): boolean;
|
|
|
33
82
|
* permissions.
|
|
34
83
|
*/
|
|
35
84
|
export declare function matchesAnyRule(rules: readonly string[], target: RuleTarget, projectRoot: string): string | undefined;
|
|
85
|
+
/**
|
|
86
|
+
* The first deny-rule that forbids this call, or undefined when none does
|
|
87
|
+
* (SER-076). Same grammar as {@link matchesAnyRule}, inverted conservatism:
|
|
88
|
+
*
|
|
89
|
+
* - no exemptions — {@link isRuleExempt} exists so a rule cannot *widen*, and a
|
|
90
|
+
* deny only ever narrows, so `memory_save`, `.env*` and darwin's own policy
|
|
91
|
+
* files can be denied like anything else;
|
|
92
|
+
* - a bash pattern forbids the call when **any** segment matches, not every one
|
|
93
|
+
* (`git status && git push --force` is a forced push), and the segments are
|
|
94
|
+
* cut more finely than for allow — also at `$(`, backticks, parentheses, `&`
|
|
95
|
+
* and redirection — so `echo $(git push --force)` and `(git push --force)`
|
|
96
|
+
* expose the forbidden words as a segment of their own;
|
|
97
|
+
* - shell metacharacters never exempt the call — for allow they mean "the words
|
|
98
|
+
* no longer say what will run", which for a prohibition is a reason to deny,
|
|
99
|
+
* not to look away;
|
|
100
|
+
* - a file pattern applies to every `fileEditor` call on the path, `view`
|
|
101
|
+
* included, exactly as an allow pattern would cover it.
|
|
102
|
+
*
|
|
103
|
+
* The allow matcher above is untouched: the two directions share the parser and
|
|
104
|
+
* the pattern primitives, not the decision.
|
|
105
|
+
*/
|
|
106
|
+
export declare function matchesAnyDenyRule(rules: readonly string[], target: RuleTarget, projectRoot: string): string | undefined;
|
|
107
|
+
/**
|
|
108
|
+
* The deny-side cut of a command: {@link splitBashSegments}' operators plus
|
|
109
|
+
* substitution openers, grouping parentheses, `&` and redirection. Over-splitting
|
|
110
|
+
* is the safe direction here — a spurious segment can only match a deny pattern
|
|
111
|
+
* the user wrote, never clear one.
|
|
112
|
+
*/
|
|
113
|
+
export declare function splitDenySegments(command: string): string[];
|
|
36
114
|
/**
|
|
37
115
|
* Calls no rule may ever cover: darwin's own config (a rule there lets the agent
|
|
38
|
-
* grant itself more rules)
|
|
39
|
-
*
|
|
116
|
+
* grant itself more rules), environment files, and — the read side of the same
|
|
117
|
+
* exemption (SER-071) — any read into the sensitive set. All are also
|
|
118
|
+
* `dangerous` statically, so the effect is that they always ask.
|
|
40
119
|
*/
|
|
41
120
|
export declare function isRuleExempt(target: RuleTarget, projectRoot: string): boolean;
|
|
42
121
|
/**
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Wildcard allow-rules: "stop asking about calls like this one"
|
|
2
|
+
* Wildcard allow-rules: "stop asking about calls like this one" — and, in the
|
|
3
|
+
* same grammar, deny-rules: "never run calls like this one" (SER-076).
|
|
3
4
|
*
|
|
4
5
|
* A rule is a string, so it survives a round trip through `.darwin/config.json`
|
|
5
6
|
* unchanged and stays readable in it:
|
|
@@ -9,10 +10,12 @@
|
|
|
9
10
|
* - `bash` — no colon: every call of that tool. The only shape available for
|
|
10
11
|
* unknown and MCP tools, whose input has no structure we can reason about.
|
|
11
12
|
*
|
|
12
|
-
* The matcher is deliberately conservative in the same way the static risk
|
|
13
|
-
* are: anything it cannot reason about does not match, and a non-match only
|
|
14
|
-
* a prompt.
|
|
13
|
+
* The allow matcher is deliberately conservative in the same way the static risk
|
|
14
|
+
* rules are: anything it cannot reason about does not match, and a non-match only
|
|
15
|
+
* costs a prompt. The deny matcher ({@link matchesAnyDenyRule}) is conservative in
|
|
16
|
+
* the opposite direction: anything that *might* be the forbidden call is denied.
|
|
15
17
|
*/
|
|
18
|
+
import os from 'node:os';
|
|
16
19
|
import path from 'node:path';
|
|
17
20
|
import { isSensitiveDarwinPath } from '../paths.js';
|
|
18
21
|
/**
|
|
@@ -23,6 +26,148 @@ import { isSensitiveDarwinPath } from '../paths.js';
|
|
|
23
26
|
const SHELL_METACHARACTERS = /[><`]|\$\(/;
|
|
24
27
|
/** Sensitive file basenames no rule may cover. */
|
|
25
28
|
const ENV_FILE = /^\.env(\..+)?$/;
|
|
29
|
+
/**
|
|
30
|
+
* Whitelisted bash readers whose non-option arguments name files (SER-071).
|
|
31
|
+
* `echo` is on the static safe list but deliberately absent here: with `<` and
|
|
32
|
+
* `$(` refused as metacharacters it can only print its arguments, never open a
|
|
33
|
+
* file, so `echo ~/.ssh/id_rsa` reveals a path string and nothing else. `pwd`
|
|
34
|
+
* and `which` take no file paths.
|
|
35
|
+
*/
|
|
36
|
+
const BASH_PATH_READERS = new Set(['cat', 'head', 'tail', 'grep', 'rg', 'find', 'ls', 'wc']);
|
|
37
|
+
/**
|
|
38
|
+
* The two readers that recurse into file *contents*: `grep -r AKIA ~` or
|
|
39
|
+
* `rg -uu password /` reads `~/.aws/credentials` without ever naming it, so for
|
|
40
|
+
* these a start directory that is an ancestor of a credential location counts
|
|
41
|
+
* too. Deliberately not `cat`/`head`/`tail`/`wc` (one file each, named) and not
|
|
42
|
+
* `find`/`ls -R`, which reveal names only, never contents.
|
|
43
|
+
*/
|
|
44
|
+
const RECURSIVE_CONTENT_READERS = new Set(['grep', 'rg']);
|
|
45
|
+
/**
|
|
46
|
+
* Home-relative directories whose every entry is a credential. The directory
|
|
47
|
+
* itself counts too: listing `~/.ssh` names the keys that exist.
|
|
48
|
+
*/
|
|
49
|
+
export const SENSITIVE_READ_DIRECTORIES = ['.ssh', '.aws', '.gnupg'];
|
|
50
|
+
/** Home-relative files that hold credentials. */
|
|
51
|
+
export const SENSITIVE_READ_HOME_FILES = [
|
|
52
|
+
'.netrc',
|
|
53
|
+
path.join('.kube', 'config'),
|
|
54
|
+
path.join('.docker', 'config.json'),
|
|
55
|
+
];
|
|
56
|
+
/** Absolute files that hold credentials. */
|
|
57
|
+
export const SENSITIVE_READ_ABSOLUTE_FILES = ['/etc/shadow'];
|
|
58
|
+
/**
|
|
59
|
+
* The fixed sensitive-read set (SER-071): a resolved absolute path that is under
|
|
60
|
+
* one of {@link SENSITIVE_READ_DIRECTORIES}, is one of the home or absolute
|
|
61
|
+
* credential files, has a `.env` / `.env.*` basename anywhere, or is one of
|
|
62
|
+
* darwin's own policy files ({@link isSensitiveDarwinPath}).
|
|
63
|
+
*
|
|
64
|
+
* A fixed set rather than "outside the project": darwin legitimately reads
|
|
65
|
+
* `/tmp`, `/etc/os-release` and the global skill roots, and a one-line list is
|
|
66
|
+
* something a prompt can explain.
|
|
67
|
+
*/
|
|
68
|
+
export function isSensitiveReadPath(projectRoot, resolved) {
|
|
69
|
+
const home = os.homedir();
|
|
70
|
+
if (SENSITIVE_READ_DIRECTORIES.some((directory) => isInside(path.join(home, directory), resolved)))
|
|
71
|
+
return true;
|
|
72
|
+
if (SENSITIVE_READ_HOME_FILES.some((file) => samePath(path.join(home, file), resolved)))
|
|
73
|
+
return true;
|
|
74
|
+
if (SENSITIVE_READ_ABSOLUTE_FILES.some((file) => samePath(file, resolved)))
|
|
75
|
+
return true;
|
|
76
|
+
if (ENV_FILE.test(path.basename(resolved)))
|
|
77
|
+
return true;
|
|
78
|
+
return isSensitiveDarwinPath(projectRoot, resolved);
|
|
79
|
+
}
|
|
80
|
+
/**
|
|
81
|
+
* The credential location a recursive content search started at `resolved`
|
|
82
|
+
* would descend into — `~/.ssh` for `~`, `/home/<user>` or `/`; `/etc/shadow`
|
|
83
|
+
* for `/etc` — or undefined. Only the fixed home/absolute locations qualify:
|
|
84
|
+
* `.env*` basenames are excluded on purpose, or `grep -r foo .` would prompt in
|
|
85
|
+
* every project that has a `.env`. Returned `~`-abbreviated for the prompt.
|
|
86
|
+
*/
|
|
87
|
+
export function sensitiveLocationBelow(resolved) {
|
|
88
|
+
const home = os.homedir();
|
|
89
|
+
for (const directory of SENSITIVE_READ_DIRECTORIES) {
|
|
90
|
+
if (isInside(resolved, path.join(home, directory)))
|
|
91
|
+
return `~/${directory}`;
|
|
92
|
+
}
|
|
93
|
+
for (const file of SENSITIVE_READ_HOME_FILES) {
|
|
94
|
+
if (isInside(resolved, path.join(home, file)))
|
|
95
|
+
return `~/${file.split(path.sep).join('/')}`;
|
|
96
|
+
}
|
|
97
|
+
return SENSITIVE_READ_ABSOLUTE_FILES.find((file) => isInside(resolved, file));
|
|
98
|
+
}
|
|
99
|
+
/**
|
|
100
|
+
* One path argument as the shell (or the model) would resolve it: `~`, `~/…`,
|
|
101
|
+
* `$HOME…` and `${HOME}…` against the home directory, relative forms against
|
|
102
|
+
* the project root, `..` segments normalised. Surrounding quotes are dropped
|
|
103
|
+
* first — bash would not expand a quoted `~`, so this over-approximates, which
|
|
104
|
+
* for a read costs a prompt and never a silent approval.
|
|
105
|
+
*/
|
|
106
|
+
export function resolveReadTarget(argument, projectRoot) {
|
|
107
|
+
const unquoted = argument.replace(/^(["'])([\s\S]*)\1$/, '$2');
|
|
108
|
+
const home = os.homedir();
|
|
109
|
+
let expanded = unquoted;
|
|
110
|
+
if (unquoted === '~')
|
|
111
|
+
expanded = home;
|
|
112
|
+
else if (unquoted.startsWith('~/'))
|
|
113
|
+
expanded = path.join(home, unquoted.slice(2));
|
|
114
|
+
else if (/^\$(HOME|\{HOME\})(\/|$)/.test(unquoted))
|
|
115
|
+
expanded = path.join(home, unquoted.replace(/^\$(HOME|\{HOME\})/, ''));
|
|
116
|
+
return path.resolve(projectRoot, expanded);
|
|
117
|
+
}
|
|
118
|
+
/**
|
|
119
|
+
* The first read target of this call that falls in the sensitive set, as the
|
|
120
|
+
* model wrote it, or undefined when the call reads nothing sensitive (SER-071).
|
|
121
|
+
*
|
|
122
|
+
* Targets are the `path` of `fileEditor view` and every non-option argument of
|
|
123
|
+
* every {@link BASH_PATH_READERS} segment of a bash command — a pattern
|
|
124
|
+
* argument (`rg password ~/.gnupg`) is resolved like a path and simply misses.
|
|
125
|
+
* For the {@link RECURSIVE_CONTENT_READERS} an argument that is an ancestor of a
|
|
126
|
+
* credential location also counts, returned as
|
|
127
|
+
* `<arg> (searches above <location>)`. Any other tool or command reads nothing
|
|
128
|
+
* this function can see.
|
|
129
|
+
*/
|
|
130
|
+
export function sensitiveReadPath(toolName, input, projectRoot) {
|
|
131
|
+
if (toolName === 'fileEditor') {
|
|
132
|
+
if (readString(input, 'command') !== 'view')
|
|
133
|
+
return undefined;
|
|
134
|
+
const filePath = readString(input, 'path');
|
|
135
|
+
if (filePath === undefined || filePath === '')
|
|
136
|
+
return undefined;
|
|
137
|
+
return isSensitiveReadPath(projectRoot, resolveReadTarget(filePath, projectRoot)) ? filePath : undefined;
|
|
138
|
+
}
|
|
139
|
+
if (toolName === 'bash') {
|
|
140
|
+
const command = readString(input, 'command');
|
|
141
|
+
if (command === undefined)
|
|
142
|
+
return undefined;
|
|
143
|
+
for (const segment of splitBashSegments(command)) {
|
|
144
|
+
const [word = '', ...args] = segment.split(/\s+/);
|
|
145
|
+
if (!BASH_PATH_READERS.has(word))
|
|
146
|
+
continue;
|
|
147
|
+
const recursive = RECURSIVE_CONTENT_READERS.has(word);
|
|
148
|
+
for (const arg of args) {
|
|
149
|
+
if (arg.startsWith('-'))
|
|
150
|
+
continue;
|
|
151
|
+
const resolved = resolveReadTarget(arg, projectRoot);
|
|
152
|
+
if (isSensitiveReadPath(projectRoot, resolved))
|
|
153
|
+
return arg;
|
|
154
|
+
if (recursive) {
|
|
155
|
+
const below = sensitiveLocationBelow(resolved);
|
|
156
|
+
if (below !== undefined)
|
|
157
|
+
return `${arg} (searches above ${below})`;
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
return undefined;
|
|
163
|
+
}
|
|
164
|
+
function samePath(left, right) {
|
|
165
|
+
return path.relative(left, right) === '';
|
|
166
|
+
}
|
|
167
|
+
function isInside(root, candidate) {
|
|
168
|
+
const relative = path.relative(root, candidate);
|
|
169
|
+
return relative === '' || (!relative.startsWith(`..${path.sep}`) && relative !== '..' && !path.isAbsolute(relative));
|
|
170
|
+
}
|
|
26
171
|
/**
|
|
27
172
|
* Commands whose first word is only a dispatcher: `git push` and `git status`
|
|
28
173
|
* have nothing in common, so a rule derived from `git …` alone would be far
|
|
@@ -110,14 +255,77 @@ export function matchesAnyRule(rules, target, projectRoot) {
|
|
|
110
255
|
}
|
|
111
256
|
return undefined;
|
|
112
257
|
}
|
|
258
|
+
/**
|
|
259
|
+
* The first deny-rule that forbids this call, or undefined when none does
|
|
260
|
+
* (SER-076). Same grammar as {@link matchesAnyRule}, inverted conservatism:
|
|
261
|
+
*
|
|
262
|
+
* - no exemptions — {@link isRuleExempt} exists so a rule cannot *widen*, and a
|
|
263
|
+
* deny only ever narrows, so `memory_save`, `.env*` and darwin's own policy
|
|
264
|
+
* files can be denied like anything else;
|
|
265
|
+
* - a bash pattern forbids the call when **any** segment matches, not every one
|
|
266
|
+
* (`git status && git push --force` is a forced push), and the segments are
|
|
267
|
+
* cut more finely than for allow — also at `$(`, backticks, parentheses, `&`
|
|
268
|
+
* and redirection — so `echo $(git push --force)` and `(git push --force)`
|
|
269
|
+
* expose the forbidden words as a segment of their own;
|
|
270
|
+
* - shell metacharacters never exempt the call — for allow they mean "the words
|
|
271
|
+
* no longer say what will run", which for a prohibition is a reason to deny,
|
|
272
|
+
* not to look away;
|
|
273
|
+
* - a file pattern applies to every `fileEditor` call on the path, `view`
|
|
274
|
+
* included, exactly as an allow pattern would cover it.
|
|
275
|
+
*
|
|
276
|
+
* The allow matcher above is untouched: the two directions share the parser and
|
|
277
|
+
* the pattern primitives, not the decision.
|
|
278
|
+
*/
|
|
279
|
+
export function matchesAnyDenyRule(rules, target, projectRoot) {
|
|
280
|
+
for (const rule of rules) {
|
|
281
|
+
const parsed = parseRule(rule);
|
|
282
|
+
if (parsed === undefined)
|
|
283
|
+
continue;
|
|
284
|
+
if (parsed.toolName !== target.toolName)
|
|
285
|
+
continue;
|
|
286
|
+
if (parsed.pattern === undefined)
|
|
287
|
+
return rule;
|
|
288
|
+
if (patternForbids(parsed.pattern, target, projectRoot))
|
|
289
|
+
return rule;
|
|
290
|
+
}
|
|
291
|
+
return undefined;
|
|
292
|
+
}
|
|
293
|
+
/**
|
|
294
|
+
* The deny-side cut of a command: {@link splitBashSegments}' operators plus
|
|
295
|
+
* substitution openers, grouping parentheses, `&` and redirection. Over-splitting
|
|
296
|
+
* is the safe direction here — a spurious segment can only match a deny pattern
|
|
297
|
+
* the user wrote, never clear one.
|
|
298
|
+
*/
|
|
299
|
+
export function splitDenySegments(command) {
|
|
300
|
+
return command
|
|
301
|
+
.split(/&&|\|\||\$\(|[;|\n&`()<>]/)
|
|
302
|
+
.map((segment) => segment.trim())
|
|
303
|
+
.filter((segment) => segment !== '');
|
|
304
|
+
}
|
|
305
|
+
function patternForbids(pattern, target, projectRoot) {
|
|
306
|
+
if (target.toolName === 'bash') {
|
|
307
|
+
const command = readString(target.input, 'command') ?? '';
|
|
308
|
+
return splitDenySegments(command).some((segment) => commandMatches(pattern, segment));
|
|
309
|
+
}
|
|
310
|
+
if (target.toolName === 'fileEditor') {
|
|
311
|
+
const filePath = readString(target.input, 'path');
|
|
312
|
+
if (filePath === undefined)
|
|
313
|
+
return false;
|
|
314
|
+
return pathMatches(pattern, toPosix(projectRelativeOrAbsolute(filePath, projectRoot)));
|
|
315
|
+
}
|
|
316
|
+
return false;
|
|
317
|
+
}
|
|
113
318
|
/**
|
|
114
319
|
* Calls no rule may ever cover: darwin's own config (a rule there lets the agent
|
|
115
|
-
* grant itself more rules)
|
|
116
|
-
*
|
|
320
|
+
* grant itself more rules), environment files, and — the read side of the same
|
|
321
|
+
* exemption (SER-071) — any read into the sensitive set. All are also
|
|
322
|
+
* `dangerous` statically, so the effect is that they always ask.
|
|
117
323
|
*/
|
|
118
324
|
export function isRuleExempt(target, projectRoot) {
|
|
119
325
|
if (target.toolName === 'memory_save')
|
|
120
326
|
return true;
|
|
327
|
+
if (sensitiveReadPath(target.toolName, target.input, projectRoot) !== undefined)
|
|
328
|
+
return true;
|
|
121
329
|
if (target.toolName !== 'fileEditor')
|
|
122
330
|
return false;
|
|
123
331
|
const filePath = readString(target.input, 'path');
|
|
@@ -245,6 +453,18 @@ function normalizeSpaces(value) {
|
|
|
245
453
|
function toPosix(value) {
|
|
246
454
|
return value.split(path.sep).join('/');
|
|
247
455
|
}
|
|
456
|
+
/**
|
|
457
|
+
* The path a file pattern is matched against: project-relative when the target
|
|
458
|
+
* lies inside the project, the resolved absolute path otherwise — the same view
|
|
459
|
+
* `patternCovers` takes for allow, so `fileEditor:dist/**` names the same files
|
|
460
|
+
* in both directions.
|
|
461
|
+
*/
|
|
462
|
+
function projectRelativeOrAbsolute(filePath, projectRoot) {
|
|
463
|
+
const resolved = path.resolve(projectRoot, filePath);
|
|
464
|
+
const relative = path.relative(projectRoot, resolved);
|
|
465
|
+
const inside = relative !== '' && !relative.startsWith('..') && !path.isAbsolute(relative);
|
|
466
|
+
return inside ? relative : resolved;
|
|
467
|
+
}
|
|
248
468
|
function escapeRegExp(value) {
|
|
249
469
|
return value.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
|
|
250
470
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"permission-rules.js","sourceRoot":"","sources":["../../../src/agent/permission-rules.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AACH,OAAO,IAAI,MAAM,WAAW,CAAC;AAE7B,OAAO,EAAE,qBAAqB,EAAE,MAAM,aAAa,CAAC;AAgBpD;;;;GAIG;AACH,MAAM,oBAAoB,GAAG,YAAY,CAAC;AAE1C,kDAAkD;AAClD,MAAM,QAAQ,GAAG,gBAAgB,CAAC;AAElC;;;;GAIG;AACH,MAAM,kBAAkB,GAAG,IAAI,GAAG,CAAC;IACjC,KAAK;IACL,MAAM;IACN,KAAK;IACL,KAAK;IACL,MAAM;IACN,OAAO;IACP,QAAQ;IACR,IAAI;IACJ,IAAI;IACJ,KAAK;IACL,QAAQ;IACR,SAAS;IACT,MAAM;IACN,MAAM;IACN,IAAI;IACJ,SAAS;IACT,KAAK;IACL,QAAQ;CACT,CAAC,CAAC;AAEH;;;;GAIG;AACH,MAAM,eAAe,GAAG,EAAE,CAAC;AAE3B,kEAAkE;AAClE,MAAM,UAAU,sBAAsB,CAAC,OAAe;IACpD,OAAO,oBAAoB,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;AAC5C,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,iBAAiB,CAAC,OAAe;IAC/C,OAAO,OAAO;SACX,KAAK,CAAC,gBAAgB,CAAC;SACvB,GAAG,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,OAAO,CAAC,IAAI,EAAE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