Action protocol
Native provider tool calls and strict JSON actions enter the same validated local execution loop. Tool schemas are derived from each input contract and sent with the model request.
Execution loop
- The model returns a native tool call or a strict JSON action.
- Jeden resolves the action against the current capability registry.
- Input schema, path jail, exposure flags, approval mode, and hooks are evaluated.
- The handler executes and returns a typed result.
- The result is appended to the session and returned to the model.
- The loop continues until a final answer or configured step limit.
Action shapes
Actions are explicit objects; prose that resembles a command does not execute. A strict action identifies the action name and its typed arguments. Selectors and mutation guards are carried as data, not inferred from surrounding text.
{
"action": "read_file",
"args": {
"path": "src/server.ts:80-140"
}
}Selectors
| :50 | Read from line 50. |
| :50-90 | Read an inclusive range. |
| :5-16,90-110 | Read several visible ranges. |
| :raw | Return verbatim content. |
| :conflicts | Return unresolved merge-conflict blocks. |
| archive.zip:path/file | Address an archive member. |
| db.sqlite:table:key | Address one SQLite row by primary key. |
| artifact://name | Address a persisted session artifact. |
Anchored edits
An anchored edit names the snapshot tag returned by the latest read, then applies tight line or block operations only to visible anchors. Every successful mutation produces a fresh snapshot; subsequent edits must re-read or use the new tag.
- SWAP replaces an exact visible line range.
- INS.PRE / INS.POST inserts without restating unchanged lines.
- DEL deletes an exact line range.
- Block operations target a complete syntax block at its opener.
- MV / REM move or remove a file under the same guarded contract.
The edit body is final content, not a diff. Ranges describe original lines. Stale tags and unseen anchors are rejected.
Oversized results
Large tool output is persisted under the session artifact store. The model receives a compact artifact:// reference and may issue bounded follow-up reads instead of carrying the full payload in context.