@iinm/plain-agent 1.9.2 → 1.9.3
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 +1 -1
- package/package.json +1 -1
- package/src/tools/patchFile.mjs +5 -8
package/README.md
CHANGED
|
@@ -53,7 +53,7 @@ A lightweight, capable coding agent for the terminal.
|
|
|
53
53
|
</details>
|
|
54
54
|
|
|
55
55
|
|
|
56
|
-
- **Approval rules & path validation** — Auto-approve tool uses by name and arguments using regex patterns ([config.predefined.json#autoApproval](https://github.com/iinm/plain-agent/blob/main/config/config.predefined.json)); restrict file access to the working directory — git-ignored
|
|
56
|
+
- **Approval rules & path validation** — Auto-approve tool uses by name and arguments using regex patterns ([config.predefined.json#autoApproval](https://github.com/iinm/plain-agent/blob/main/config/config.predefined.json)); restrict file access to the working directory — git-ignored files require explicit approval ([src/toolInputValidator.mjs](https://github.com/iinm/plain-agent/blob/main/src/toolInputValidator.mjs)).
|
|
57
57
|
- **Sandboxed execution** — Run agent commands in a Docker container with a read-only project root and no network; writable mode and allowlisted network destinations can be enabled as needed.
|
|
58
58
|
- **Plain-text memory** — Task state is saved as Markdown files under `.plain-agent/memory/` for easy review.
|
|
59
59
|
- **Extensible** — Define prompts and subagents in Markdown. Connect MCP servers.
|
package/package.json
CHANGED
package/src/tools/patchFile.mjs
CHANGED
|
@@ -40,14 +40,11 @@ inserted content
|
|
|
40
40
|
prepended content
|
|
41
41
|
@@@ ${nonce}
|
|
42
42
|
|
|
43
|
-
-
|
|
44
|
-
|
|
45
|
-
- Hashes are 2-hex
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
- "{N}:{afterHash}+" inserts after line N; "0+" prepends (no hash
|
|
49
|
-
needed for line 0). "{lastLine}:{hash}+" appends.
|
|
50
|
-
- Empty body deletes the range.
|
|
43
|
+
- The nonce "${nonce}" is constant; always use the exact value shown above.
|
|
44
|
+
- Line numbers are 1-indexed and refer to the original file; "{start}-{end}" is inclusive.
|
|
45
|
+
- Hashes are 2-character hex hashes of each line's full content as shown by read_file (e.g. "a3").
|
|
46
|
+
- "{N}:{afterHash}+" inserts after line N; "0+" prepends (no hash needed). "{lastLine}:{hash}+" appends.
|
|
47
|
+
- An empty body deletes the range.
|
|
51
48
|
`.trim(),
|
|
52
49
|
type: "string",
|
|
53
50
|
},
|