A binding may declare `tools` with named roots. pi starts with --no-builtin-tools and the package's own extension, allowlisting list_dir, read_file and search. src/tools.mjs holds the rules: names not paths, per-segment lstat walk, one checked descriptor read that refuses symlinks, swaps, FIFOs, hard links and oversize files, credential shapes refusing the whole read, and a per-message call budget. The engine settles on agent_end and records tool calls in the turn record. Jason's rulings R1-R7 in the brief, section 7. rev-code-02 approved round 2 (comment 26276) on tree 43f0329b after four round 1 fixes. Suite 48/48, node tests 116. Not pushed. Co-Authored-By: Claude Opus 5 <[email protected]>
41 lines
1.2 KiB
JSON
41 lines
1.2 KiB
JSON
{
|
|
"bindingVersion": 1,
|
|
"name": "example-seat",
|
|
"seat": "sage",
|
|
"guildId": "100000000000000001",
|
|
"guildName": "Example Server",
|
|
"botUserId": "100000000000000002",
|
|
"tokenFile": "/home/example/secrets/discord-example.token",
|
|
"channels": [
|
|
{ "id": "100000000000000010", "name": "seat-admin", "mode": "open" },
|
|
{ "id": "100000000000000011", "name": "general", "mode": "mention" }
|
|
],
|
|
"users": [
|
|
{ "id": "100000000000000100", "name": "owner" },
|
|
{ "id": "100000000000000101", "name": "guest", "channels": ["100000000000000011"] }
|
|
],
|
|
"engine": { "provider": "zai", "model": "glm-5.3", "thinking": "high" },
|
|
"limits": {
|
|
"turnsPerDay": 200,
|
|
"turnTimeoutSeconds": 180,
|
|
"replyChunkChars": 1900,
|
|
"inboundMaxChars": 4000
|
|
},
|
|
"context": {
|
|
"files": [
|
|
"contracts/CONSTITUTION.md",
|
|
"contracts/STANDARDS.md",
|
|
"agents/sage/SOUL.md",
|
|
"agents/sage/DISCORD-USER.md"
|
|
]
|
|
},
|
|
"tools": {
|
|
"roots": [
|
|
{ "name": "stack-docs", "path": "/home/example/src/mosaic-stack/docs" },
|
|
{ "name": "sage", "path": "/home/example/src/mosaic-stack/agents/sage" }
|
|
],
|
|
"maxFileBytes": 262144,
|
|
"maxCallsPerTurn": 8
|
|
}
|
|
}
|