polyctl 0.7.0__py3-none-any.whl

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.
Files changed (99) hide show
  1. polyctl/__init__.py +7 -0
  2. polyctl/__main__.py +5 -0
  3. polyctl/a2a.py +226 -0
  4. polyctl/a2a_mcp.py +546 -0
  5. polyctl/acp.py +417 -0
  6. polyctl/adapters/README.md +101 -0
  7. polyctl/adapters/aider.json +32 -0
  8. polyctl/adapters/amazon-q.json +15 -0
  9. polyctl/adapters/amp.json +16 -0
  10. polyctl/adapters/antigravity.json +120 -0
  11. polyctl/adapters/claude-code.json +229 -0
  12. polyctl/adapters/cloud-generic.json +57 -0
  13. polyctl/adapters/codex.json +47 -0
  14. polyctl/adapters/command-code.json +45 -0
  15. polyctl/adapters/copilot.json +17 -0
  16. polyctl/adapters/cursor-agent.json +29 -0
  17. polyctl/adapters/deepseek.json +13 -0
  18. polyctl/adapters/droid.json +34 -0
  19. polyctl/adapters/gemini.json +30 -0
  20. polyctl/adapters/grok.json +22 -0
  21. polyctl/adapters/hermes.json +34 -0
  22. polyctl/adapters/kilocode.json +30 -0
  23. polyctl/adapters/kimi.json +23 -0
  24. polyctl/adapters/kiro.json +332 -0
  25. polyctl/adapters/ollama.json +29 -0
  26. polyctl/adapters/omp.json +34 -0
  27. polyctl/adapters/openai-api.json +68 -0
  28. polyctl/adapters/opencode.json +162 -0
  29. polyctl/adapters/pi.json +24 -0
  30. polyctl/adapters/pr-agent.json +54 -0
  31. polyctl/adapters/profiles.json +9 -0
  32. polyctl/adapters/qoder.json +163 -0
  33. polyctl/adapters/qwen.json +27 -0
  34. polyctl/adapters/reasonix.json +25 -0
  35. polyctl/adapters/rewriters/rtk.json +24 -0
  36. polyctl/adapters/trae.json +31 -0
  37. polyctl/adapters/vendors.json +42 -0
  38. polyctl/adapters/warp.json +88 -0
  39. polyctl/allowlist.py +1756 -0
  40. polyctl/api_review.py +920 -0
  41. polyctl/cli.py +835 -0
  42. polyctl/conformance_harness.py +9 -0
  43. polyctl/demo.py +503 -0
  44. polyctl/drivers.py +146 -0
  45. polyctl/email.py +160 -0
  46. polyctl/features.py +98 -0
  47. polyctl/journal.py +144 -0
  48. polyctl/language.py +945 -0
  49. polyctl/lib.py +1296 -0
  50. polyctl/matrix.py +660 -0
  51. polyctl/mcp.py +1362 -0
  52. polyctl/ntfy.py +169 -0
  53. polyctl/outbound.py +39 -0
  54. polyctl/parts/__init__.py +5 -0
  55. polyctl/parts/cli_authority.py +2615 -0
  56. polyctl/parts/cli_channels.py +1325 -0
  57. polyctl/parts/cli_checks.py +2293 -0
  58. polyctl/parts/cli_completion.py +686 -0
  59. polyctl/parts/cli_evidence.py +141 -0
  60. polyctl/parts/cli_gain.py +375 -0
  61. polyctl/parts/cli_harness.py +392 -0
  62. polyctl/parts/cli_hooks.py +1816 -0
  63. polyctl/parts/cli_install.py +638 -0
  64. polyctl/parts/cli_lanes.py +106 -0
  65. polyctl/parts/cli_maintenance.py +2536 -0
  66. polyctl/parts/cli_next.py +248 -0
  67. polyctl/parts/cli_pr.py +53 -0
  68. polyctl/parts/cli_project.py +2857 -0
  69. polyctl/parts/cli_review.py +5158 -0
  70. polyctl/parts/cli_status.py +898 -0
  71. polyctl/parts/lib_adapters.py +2933 -0
  72. polyctl/parts/lib_alarms.py +2106 -0
  73. polyctl/parts/lib_events.py +224 -0
  74. polyctl/parts/lib_evidence.py +412 -0
  75. polyctl/parts/lib_gates.py +2099 -0
  76. polyctl/parts/lib_lanes.py +829 -0
  77. polyctl/parts/lib_mail.py +1541 -0
  78. polyctl/parts/lib_next.py +652 -0
  79. polyctl/parts/lib_pr.py +331 -0
  80. polyctl/parts/lib_slices.py +3337 -0
  81. polyctl/parts/lib_state.py +2415 -0
  82. polyctl/parts/lib_transcript.py +4118 -0
  83. polyctl/pressure.py +325 -0
  84. polyctl/prices.json +47 -0
  85. polyctl/procs.py +1194 -0
  86. polyctl/settings.py +505 -0
  87. polyctl/skill/SKILL.md +365 -0
  88. polyctl/skillkit.py +503 -0
  89. polyctl/storage.py +2055 -0
  90. polyctl/telegram.py +327 -0
  91. polyctl/tiers.py +123 -0
  92. polyctl/verdicts.py +41 -0
  93. polyctl/watchdog.py +3887 -0
  94. polyctl/web.py +337 -0
  95. polyctl-0.7.0.dist-info/METADATA +235 -0
  96. polyctl-0.7.0.dist-info/RECORD +99 -0
  97. polyctl-0.7.0.dist-info/WHEEL +4 -0
  98. polyctl-0.7.0.dist-info/entry_points.txt +5 -0
  99. polyctl-0.7.0.dist-info/licenses/LICENSE +21 -0
@@ -0,0 +1,68 @@
1
+ {
2
+ "id": "openai-api",
3
+ "name": "OpenAI-compatible API (polyctl's own client)",
4
+ "contract": 1,
5
+ "kind": "tool-reviewer",
6
+ "verified": "partial",
7
+ "disclaimer": "polyctl's own stdlib client, polyctl-api-review, run here against a stand-in of the chat-completions endpoint on this machine (tests/test_api_review.py); a provider's own answer is proven on a local candidate by the owner, whose key it is.",
8
+ "roles": {
9
+ "reviewer": "eligible: one completion over the review prompt through a provider's HTTP API, with read-only tools over the candidate's tree when the route names --tree {tree}",
10
+ "implementer": "ineligible: it writes no code",
11
+ "architect": "ineligible: it answers one question and keeps no session"
12
+ },
13
+ "send": {
14
+ "argv": [
15
+ "polyctl-api-review",
16
+ "--model",
17
+ "{model}",
18
+ "--diff-file",
19
+ "{diff_file}",
20
+ "--output",
21
+ "{output}",
22
+ "{prompt}"
23
+ ],
24
+ "note": "The prompt carries the candidate's diff; the diff file is the same bytes, handed as every tool reviewer is handed them.",
25
+ "stdin": {
26
+ "replaces": [
27
+ "{prompt}"
28
+ ],
29
+ "with": [
30
+ "-"
31
+ ],
32
+ "note": "A prompt past what one argument carries is read from standard input: polyctl-api-review takes - for it."
33
+ }
34
+ },
35
+ "options": {
36
+ "trust_none": [],
37
+ "trust_none_note": "nothing to deny: without --tree {tree} the client has no tools, and with it only polyctl's own read-only tools confined to the unpacked candidate",
38
+ "model": null,
39
+ "model_note": "<provider>/<model>: the provider a word review.api_providers names on this machine, with its base URL and the environment variable holding its key",
40
+ "effort": null,
41
+ "effort_note": "polyctl composes no effort for a tool"
42
+ },
43
+ "review": {
44
+ "candidate": "diff-file",
45
+ "encoding": "utf-8",
46
+ "tree": [
47
+ "--tree",
48
+ "{tree}"
49
+ ],
50
+ "answer": {
51
+ "from": "output"
52
+ },
53
+ "environment": {
54
+ "remove": [
55
+ "^POLYCTL_SETTINGS$"
56
+ ],
57
+ "note": "The providers are read from the machine's own settings file: one named through POLYCTL_SETTINGS could send the review, and its key, elsewhere."
58
+ }
59
+ },
60
+ "detect": {
61
+ "binaries": [
62
+ "polyctl-api-review"
63
+ ],
64
+ "headless": [
65
+ "--output"
66
+ ]
67
+ }
68
+ }
@@ -0,0 +1,162 @@
1
+ {
2
+ "project_config": [".opencode", "opencode.json", "opencode.jsonc", "AGENTS.md", "CLAUDE.md"],
3
+ "id": "opencode",
4
+ "name": "opencode",
5
+ "verified": "partial",
6
+ "disclaimer": "The store is mapped on a real install (2026-09-21): one database shared by three opencode versions, 17 sessions, 220 messages, 726 parts. Flags are read from `opencode run --help` on 1.18.27 and 1.17.3, which agree. What polyctl does with the store is the gap: see reader below.",
7
+ "acp": { "argv": ["opencode", "acp"], "measured": "opencode 1.18.27 answered initialize and session/list, 2026-09-28" },
8
+ "detect": {
9
+ "dirs": [".opencode"],
10
+ "files": ["opencode.json", "opencode.jsonc", "AGENTS.md"],
11
+ "binaries": ["opencode"],
12
+ "headless": ["run"],
13
+ "install_dirs": ["~/.local/share/opencode"],
14
+ "config": ["~/.config/opencode/opencode.jsonc"],
15
+ "note": "One install is not one install here: a person's own ~/.opencode/bin/opencode and a Traycer-managed one under ~/.traycer/host/providers/opencode/darwin-arm64/<version>/opencode coexist on this machine and share the same store, so a version is read from session.version per session rather than from the binary polyctl happens to find on PATH. No `processes`: a Traycer-managed opencode runs as one long-lived server holding several sessions at once (its host registers `opencode-managed-server:<pid>`), so a process match would say every idle session in that server is working."
16
+ },
17
+ "send": { "argv": ["opencode", "run", "{prompt}"] },
18
+ "resume": {
19
+ "argv": ["opencode", "run", "--session", "{session}", "{prompt}"],
20
+ "continue_last": ["opencode", "run", "--continue", "{prompt}"],
21
+ "note": "Verified against `opencode run --help` on 1.18.27: -s/--session names the session, -c/--continue takes the most recent, --fork branches it instead of resuming it in place, and --agent <name> and --variant <reasoning effort> are separate flags. A run started by polyctl should pin its permission mode: --auto approves tool calls, and it is the only such flag opencode offers, so it is a widening rather than the scoped grant a claude-code wake carries."
22
+ },
23
+ "options": {
24
+ "trust_none": ["--pure"],
25
+ "trust_none_note": "No flag denies tools - --auto only approves - so a reviewer runs as an agent of polyctl's whose permission denies every tool but read, grep, glob and list, options.reviewer_agent; --pure leaves out the plugins the person's configuration names to install.",
26
+ "reviewer_agent": {
27
+ "argv": ["--agent", "{agent}"],
28
+ "release": "1.18",
29
+ "path": ".opencode/agents/{agent}.md",
30
+ "format": "frontmatter",
31
+ "config": {
32
+ "description": "polyctl's reviewer: it reads, and has no tool that writes, runs a command or reaches a server",
33
+ "mode": "primary",
34
+ "permission": {"*": "deny", "read": "allow", "grep": "allow", "glob": "allow", "list": "allow"}
35
+ },
36
+ "body": "You review what the prompt hands you. You read files and write nothing, and you run nothing.",
37
+ "note": "Measured on opencode 1.18.27, 2026-10-07, with EVREN's DeepSeek V4 Flash: run as this agent with --pure, opencode offered the model read, grep and glob alone, and asked to write a file, run a command or fetch a page it had no tool to; nothing was written. A project's permission of allow for every tool did not widen it. The agent's name is its file's. A plugin under .opencode/plugin and an MCP server in opencode.json ran from the folder opencode started in even with --pure, so the candidate's tree reaches it in candidate/, less every harness's project configuration (REVIEW-TREE-3)."
38
+ },
39
+ "progress_on_stderr": "opencode run prints the turn's progress - the agent, each tool call - on stderr, and the model's text alone on stdout; the answer is stdout, and a run that wrote none answered nothing.",
40
+ "model": ["--model", "{model}"],
41
+ "model_format": "provider/model",
42
+ "effort": ["--variant", "{effort}"],
43
+ "output_json": ["--format", "json"],
44
+ "agent_profile": ["--agent", "{agent}"]
45
+ },
46
+ "transcript": {
47
+ "kind": "sqlite",
48
+ "path": "~/.local/share/opencode/opencode.db",
49
+ "access": "READ-ONLY. A second writer corrupts the agent's own state: polyctl opens the store as file:<path>?mode=ro, and the newest rows may still be in the -wal beside it.",
50
+ "record": {
51
+ "table": "message",
52
+ "kind": "role",
53
+ "body": "data",
54
+ "session_key": "session_id",
55
+ "order": "time_created",
56
+ "time": "time_created",
57
+ "time_unit": "milliseconds",
58
+ "text_keys": ["text"],
59
+ "children": {
60
+ "table": "part",
61
+ "key": "message_id",
62
+ "parent_key": "id",
63
+ "session_key": "session_id",
64
+ "body": "data",
65
+ "as": "parts",
66
+ "order": "time_created",
67
+ "time": "time_created",
68
+ "time_unit": "milliseconds"
69
+ }
70
+ },
71
+ "messages": {
72
+ "prompt": ["user"],
73
+ "reply": ["assistant"],
74
+ "blocks": "parts[]",
75
+ "match": { "type": "text" }
76
+ },
77
+ "turn": {
78
+ "end": [],
79
+ "end_when": { "type": "assistant", "field": "finish", "values": ["stop"] },
80
+ "conversation": ["user", "assistant"]
81
+ },
82
+ "tool_call": {
83
+ "type": "assistant",
84
+ "blocks": "parts[]",
85
+ "match": { "type": "tool" },
86
+ "name": "tool",
87
+ "id": "callID",
88
+ "args": "state.input",
89
+ "result": "state.output",
90
+ "path_keys": ["state.input.filePath"],
91
+ "write_words": ["write", "edit"],
92
+ "note": "Unlike a jsonl store, a call and its result are ONE row updated in place: 185 tool parts, 185 distinct callIDs, and state carries status (completed 183, error 2), input, output, metadata, title and time.start/time.end. Reading a tool part twice across a poll sees it change, so an artifact comparison must key on callID and status rather than on row counts. Parts by type: tool 185, step-start 173, step-finish 173, reasoning 69, text 64, patch 62."
93
+ },
94
+ "freshness": {
95
+ "query": "SELECT MAX(time_updated) FROM part WHERE session_id = ?",
96
+ "time_unit": "milliseconds"
97
+ },
98
+ "subagent_sessions": {
99
+ "query": "SELECT id FROM session WHERE parent_id = ?",
100
+ "session": "id",
101
+ "link": "session.parent_id, and the task tool part's data.state.metadata {parentSessionId, sessionId}",
102
+ "note": "A subagent is a session of its own in the same tables, not a file beside the parent's, so this is no `subagents` layer for the file reader. Measured on this store on 2026-09-21: one session is a child, titled '(@general subagent)' with agent 'general', its 52 parts under the 99 of the session that delegated to it, and no child of that child. polyctl now asks the query above of a session and of each child it returns, so a delegating implementer is read as working while its subagent writes - the parent's newest part stood at 16:51:37 and its child's at 16:51:29, and the store's own file was written seconds ago whatever either session did. What the join does not do is read a child's records with its parent's: `transcript.subagents` is the jsonl store's key and is absent here, so `polyctl tail`, a turn's cost and what a reviewer sees stay the parent session's own rows."
103
+ },
104
+ "artifacts": "a patch part names what changed: data.hash and data.files, 62 of them, which is the store's own record of an artifact appearing",
105
+ "note": "message holds 25 user and 195 assistant rows; the role and everything else about a message is in its JSON data column, while time_created and session_id are typed columns. polyctl reads a message row and hangs its parts under the name `record.children.as` gives, which is what makes this store readable by the same readers as a store that nests its blocks: `data.role` becomes a kind, a text part's `data.text` a block's words, a tool part a call. A user row names the agent, the model as {providerID, modelID, variant} and a system prompt; an assistant row names parentID, mode, path, cost, tokens, time.completed and finish. The words of a message are never in its row, so a read that does not join parts finds a conversation of silent turns. A turn is open when the newest assistant message carries finish 'tool-calls' (170 of 195) - opencode runs the calls and asks the model again itself, with no process polyctl started and no closing record coming. time.completed is set on all 195 assistant messages, so it says a message was written, not that the model stopped cleanly; finish does, and only finish distinguishes them. A turn that ends at the provider instead of at an answer has finish null and an error beside it: 22 of 195, of which 20 are APIError and 2 MessageAbortedError, and a watchdog must not read one as a finished slice. A user part is no one speaking: a tool result is a part of the assistant message that asked for it.",
106
+ "tail_bytes": null
107
+ },
108
+ "sessions": {
109
+ "kind": "sqlite-sessions",
110
+ "query": "SELECT id, title, time_updated FROM session WHERE directory = ? AND parent_id IS NULL ORDER BY time_updated DESC",
111
+ "session": "id",
112
+ "title": "title",
113
+ "mtime": "time_updated",
114
+ "mtime_unit": "milliseconds",
115
+ "note": "No escaping, unlike Claude Code and Qoder: session.directory is the absolute cwd as it stands (5 directories over 17 sessions, 16 roots and 1 child). The working directory is bound as a parameter, so a checkout whose path holds a quote names its sessions rather than ending the query. project_id joins project.worktree and project_directory for a session inside a git worktree, and parent_id IS NULL keeps a subagent from being read as an implementer's own session. The v2 event-projection tables session_message, session_input and session_context_epoch exist and hold 0 rows: the transcript is message and part, and reading the newer tables would find nothing."
116
+ },
117
+ "telemetry": {
118
+ "context": {
119
+ "from": "none",
120
+ "note": "Tokens are stored per message, per step-finish part and aggregated per session, but no model window is, so a context percentage would rest on a guessed window. opencode's own context is a session_context_epoch row, and that table is empty in this store."
121
+ },
122
+ "cost": {
123
+ "from": "transcript",
124
+ "type": "assistant",
125
+ "response": "id",
126
+ "fields": ["tokens.input", "tokens.output", "tokens.reasoning", "tokens.cache.read", "tokens.cache.write"],
127
+ "unit": "token",
128
+ "counted": "each assistant message's data.tokens, one response a row, keyed by its id. Measured 2026-10-03 on six sessions of 1 to 2,525 messages: the session's aggregate columns are exactly these summed, input, output, reasoning, cache read and write alike, and output and reasoning are counted apart. Declared `from: session`, nothing read the aggregates and polyctl cost read 0 (ADAPTER-SQLITE-READER-2).",
129
+ "verified": true,
130
+ "note": "Aggregates are real and large where cost is not: one session reads tokens_output 23,564, tokens_cache_read 1,729,222, tokens_cache_write 87,649 with cost 0.0, because every message's cost is 0.0 in a store whose provider bills elsewhere. A panel that priced opencode by cost would show a working agent spending nothing."
131
+ },
132
+ "failure": {
133
+ "from": "transcript",
134
+ "type": "assistant",
135
+ "blocks": "parts[]",
136
+ "match": {"type": "tool"},
137
+ "field": "state.status",
138
+ "failed_when": "error",
139
+ "text": "state.error",
140
+ "note": "The harness's own verdict per call, beside an assistant message's data.error for a turn that died at the provider."
141
+ }
142
+ },
143
+ "billing": {
144
+ "fallback": {
145
+ "reading": "per-response",
146
+ "note": "A turn spans many assistant messages - most end on tool-calls - so each message is one response of the turn, not the whole of it (ADAPTER-SQLITE-READER-2)."
147
+ }
148
+ },
149
+ "busy": {
150
+ "mtime_file": ["~/.local/share/opencode/opencode.db-wal", "~/.local/share/opencode/opencode.db"],
151
+ "idle_seconds": 240,
152
+ "query": "SELECT MAX(time_updated) FROM part WHERE session_id = ?",
153
+ "note": "Take the newer of the two files: the -wal mtime follows commits, but a checkpoint writes the database and can remove the -wal, and at rest both stood at 02:00:13 while the -shm and log/opencode.log sat 6 minutes older. Both files are machine-global, so a second opencode session anywhere on the box reads as this one working - the per-session query is what makes the answer true, and it is the reason this adapter cannot be watched by the file-age reader alone."
154
+ },
155
+ "directives": {
156
+ "steering_files": ["AGENTS.md"],
157
+ "config": "opencode.json",
158
+ "skills_dir": ".opencode/skill",
159
+ "note": "Global config is ~/.config/opencode/opencode.jsonc; a Traycer-managed run reads ~/.traycer/.opencode/opencode.json, which is where Traycer injects its own plugin and skills paths. Both binaries read the same credential store at ~/.local/share/opencode/auth.json, verified with `opencode auth list` from each, so a provider configured once is configured for both."
160
+ },
161
+ "mcp": { "file": "~/.config/opencode/opencode.jsonc", "key": "mcp", "note": "opencode mcp add writes the `mcp` key of the config; only the empty object was observed on this machine, so the entry shape is unverified here." }
162
+ }
@@ -0,0 +1,24 @@
1
+ {
2
+ "project_config": [".pi", "AGENTS.md", "CLAUDE.md"],
3
+ "id": "pi", "name": "pi coding agent", "contract": 1, "verified": "untested",
4
+ "disclaimer": "Written from the documented interface, not verified against an install. Flags drift; correct and open a PR.",
5
+ "notes": "badlogic/pi-mono now redirects to earendil-works/pi (npm @earendil-works/pi-coding-agent). pi has no permission prompts by design. -p is a switch and the prompt is positional.",
6
+ "sources": ["https://github.com/earendil-works/pi/blob/main/packages/coding-agent/README.md"],
7
+ "detect": { "headless": ["-p", "--print"] },
8
+ "send": { "argv": ["pi", "-p", "{prompt}"], "cwd_matters": true },
9
+ "resume": { "argv": ["pi", "--session", "{session}", "-p", "{prompt}"], "continue_last": ["pi", "--continue", "-p", "{prompt}"],
10
+ "note": "--session takes a path or a partial id" },
11
+ "options": {
12
+ "trust_none": ["--tools", "read,grep,find,ls"],
13
+ "trust_none_note": "the README's read-only example; --no-tools removes every tool",
14
+ "model": ["--model", "{model}"],
15
+ "provider": ["--provider", "{provider}"],
16
+ "effort": ["--thinking", "{effort}"],
17
+ "effort_values": ["off", "minimal", "low", "medium", "high", "xhigh", "max"],
18
+ "output_json": ["--mode", "json"],
19
+ "trust_all": null, "trust_all_why": "there are no permission prompts to skip"
20
+ },
21
+ "transcript": { "kind": "jsonl", "path": "~/.pi/agent/sessions/", "note": "kept per working directory; --session-dir moves it", "todo": "confirm the layout and the record shape against an install" },
22
+ "busy": { "mtime_glob": "~/.pi/agent/sessions/**/*.jsonl", "idle_seconds": 240 },
23
+ "directives": { "steering_files": ["AGENTS.override.md", "AGENTS.md", "CLAUDE.md", "~/.pi/agent/AGENTS.md"], "note": "--no-context-files loads none" }
24
+ }
@@ -0,0 +1,54 @@
1
+ {
2
+ "id": "pr-agent", "name": "PR-Agent", "contract": 1, "kind": "tool-reviewer", "verified": "untested",
3
+ "disclaimer": "Written from pr-agent's documentation and its source at v0.45.0 and main, read 2026-09-17. Its failure path was measured here on 2026-10-16 against the PyPI 0.45.0 wheel (the settings probes below); no completion has answered, because that run needs a provider account and is the owner's (#86).",
4
+ "notes": "Not a harness polyctl drives: a reviewer polyctl runs itself over the staged candidate, on a provider account of its own, so a review spends no actor's window. Plain-diff mode (--diff-file) reads a unified diff with no pull request and no platform token, and publishes nowhere: it prints its result and writes it to --output. The command is ask, with polyctl's whole review prompt as the question, so the verdict rule and the count schema stay polyctl's; review answers with neither a verdict nor severities, and publishes nothing when it finds no major issue. The question carries the whole candidate, so the copy of the diff pr-agent trims to its token budget is context rather than the model's only view of the code, and where both fit the diff is paid for twice. The answer file holds the Ask heading, the question as given, a line `### **Answer:**` and then the answer. pr-agent's settings are read from files and then from the environment as <TABLE>__<KEY>, the highest layer. v0.45.0 exits 0 when the command fails, so no answer file is silence; later versions exit 1 under config.propagate_tool_errors. Measured on the PyPI 0.45.0 wheel, 2026-10-16: a failed run (no provider credentials, litellm raises in all fallbacks) exited 0 with no answer file - run() logs 'Failed to process the command.', prints usage, and returns without an exit code - and CONFIG__PROPAGATE_TOOL_ERRORS=true changed neither the code nor the file: at 0.45 only review, suggestions and description read the setting, not the ask tool. Upstream main's cli.py ends `raise SystemExit(run())` and returns 1 under the setting, as declared.",
5
+ "sources": ["https://github.com/The-PR-Agent/pr-agent",
6
+ "https://pypi.org/project/pr-agent/",
7
+ "https://github.com/The-PR-Agent/pr-agent/blob/main/docs/docs/usage-guide/plain_diff_mode.md",
8
+ "https://github.com/The-PR-Agent/pr-agent/blob/main/docs/docs/usage-guide/local_git_provider.md",
9
+ "https://github.com/The-PR-Agent/pr-agent/blob/main/docs/docs/usage-guide/changing_a_model.md",
10
+ "https://github.com/The-PR-Agent/pr-agent/blob/main/docs/docs/installation/locally.md",
11
+ "https://github.com/The-PR-Agent/pr-agent/blob/v0.45.0/pr_agent/cli.py",
12
+ "https://github.com/The-PR-Agent/pr-agent/blob/v0.45.0/pr_agent/git_providers/plain_diff_provider.py",
13
+ "https://github.com/The-PR-Agent/pr-agent/blob/v0.45.0/pr_agent/tools/pr_questions.py",
14
+ "https://github.com/The-PR-Agent/pr-agent/blob/main/pr_agent/agent/pr_agent.py",
15
+ "https://github.com/The-PR-Agent/pr-agent/blob/main/pr_agent/algo/cli_args.py",
16
+ "https://github.com/The-PR-Agent/pr-agent/blob/main/pr_agent/algo/artifacts.py",
17
+ "https://github.com/The-PR-Agent/pr-agent/blob/main/pr_agent/config_loader.py",
18
+ "https://github.com/The-PR-Agent/pr-agent/blob/main/pr_agent/git_providers/utils.py",
19
+ "https://github.com/The-PR-Agent/pr-agent/blob/main/pr_agent/settings/configuration.toml",
20
+ "https://github.com/The-PR-Agent/pr-agent/blob/main/pr_agent/settings/.secrets_template.toml"],
21
+ "roles": { "reviewer": "eligible: one completion over a diff file polyctl wrote, outside any repository, publishing nowhere",
22
+ "implementer": "ineligible: it writes no code",
23
+ "architect": "ineligible: it answers one question and keeps no session" },
24
+ "send": { "argv": ["pr-agent", "--diff-file", "{diff_file}", "--output", "{output}", "ask", "{prompt}"],
25
+ "note": "--diff-file and --output come before the command; the question is the one argument after it" },
26
+ "options": {
27
+ "trust_none": [],
28
+ "trust_none_note": "nothing to deny: plain-diff mode has no platform to publish to and no tools, and polyctl runs it in a directory of its own outside any repository, where the only file it is given is the candidate",
29
+ "model": null,
30
+ "model_note": "chosen through the review contract's environment: config.model, model_weak, model_reasoning and fallback_models all name the route's model, so no other model can answer",
31
+ "effort": null,
32
+ "effort_note": "config.reasoning_effort exists and is left at pr-agent's default; polyctl composes no effort for a tool"
33
+ },
34
+ "review": {
35
+ "candidate": "diff-file",
36
+ "encoding": "utf-8",
37
+ "answer": { "from": "output", "after_prompt": "### **Answer:**" },
38
+ "environment": {
39
+ "remove": ["^[A-Za-z][A-Za-z0-9_]*__[A-Za-z0-9_]", "_FOR_DYNACONF$", "^DYNACONF_", "^PR_AGENT_",
40
+ "^ARTIFACT_(PATH|INSTRUCTIONS)$", "^GITHUB_WORKSPACE$"],
41
+ "keep": ["^(OPENAI|ANTHROPIC|COHERE|REPLICATE|GROQ|SAMBANOVA|XAI|HUGGINGFACE|OLLAMA|VERTEXAI|GOOGLE_AI_STUDIO|DEEPSEEK|ZAI|MOONSHOT|DASHSCOPE|XIAOMI_MIMO|DEEPINFRA|DATABRICKS|AZURE_AD|OPENROUTER|AWS)__"],
42
+ "set": { "CONFIG__MODEL": "{model}", "CONFIG__MODEL_WEAK": "{model}", "CONFIG__MODEL_REASONING": "{model}",
43
+ "CONFIG__FALLBACK_MODELS": "{model}", "CONFIG__AI_TIMEOUT": "{timeout}",
44
+ "CONFIG__MAX_MODEL_TOKENS": "1000000", "CONFIG__PROPAGATE_TOOL_ERRORS": "true",
45
+ "CONFIG__USE_REPO_SETTINGS_FILE": "false", "CONFIG__USE_GLOBAL_SETTINGS_FILE": "false" },
46
+ "note": "Whoever runs `polyctl review` owns its environment, and pr-agent reads every <TABLE>__<KEY> variable as a setting: the model, its fallbacks, extra instructions, artifacts injected into prompts, callbacks that ship prompts elsewhere. Every such variable is removed except the provider sections, which carry credentials and endpoints; so are Dynaconf's own controls (a settings file to load), the PR_AGENT_ variables (an extra config URL, a config branch) and the ARTIFACT_ variables. fallback_models is a plain string on purpose: at v0.45.0 settings merge, so a list given in the environment is appended to the default fallback list, while a string replaces it and pr-agent splits it on commas. max_model_tokens is raised so the budget pr-agent trims its own copy of the diff to is the model's context rather than its default of 32000, which a prompt carrying the candidate and its context can exhaust before any of the diff fits; pr-agent then skips the model call and answers nothing. Rechecked on 0.45.0, 2026-10-16: the log's 'total tokens under limit' read 32000 unpinned and 1000000 with the pin; the setting is consumed once, in get_max_tokens (algo/utils.py), as min(config.max_model_tokens, the model's table value), so the pin lifts the default cap to 1,000,000 for the pinned model (gpt-5.6 sits at 1,050,000 in the table)."
47
+ },
48
+ "release": "0.45",
49
+ "install": "pipx install 'pr-agent==0.45.*' (Python 3.12 or later), or pip install 'polyctl[pr-agent]'",
50
+ "limits": ["pr-agent does not report which model answered; polyctl records the model it pinned in every model setting pr-agent reads",
51
+ "pr-agent's own settings files on this machine are read below the environment, and polyctl does not read or check them"]
52
+ },
53
+ "detect": { "binaries": ["pr-agent"], "headless": ["ask"] }
54
+ }
@@ -0,0 +1,9 @@
1
+ {
2
+ "about": "Presets for `polyctl init --profile`: which adapter holds each role (#76). The role blocks are composed from those adapters - an actor's name, a reviewer's argv from its send, model and trust_none, an architect's from its resume and allowed tools - never written here. `init` is the profile a new project is pointed at.",
3
+ "init": "agy-codex",
4
+ "profiles": {
5
+ "agy-codex": { "implementer": "antigravity", "reviewer": "codex", "architect": "claude-code" },
6
+ "codex-agy": { "implementer": "codex", "reviewer": "antigravity", "architect": "claude-code" },
7
+ "claude-codex": { "implementer": "claude-code", "reviewer": "codex", "architect": "claude-code" }
8
+ }
9
+ }
@@ -0,0 +1,163 @@
1
+ {
2
+ "id": "qoder",
3
+ "name": "Qoder",
4
+ "project_config": [".qoder", ".mcp.json", "AGENTS.md"],
5
+ "verified": "partial",
6
+ "verified_version": "qodercli 1.1.59",
7
+ "disclaimer": "The command surface (send, resume, options, output formats, models, permissions) and the read-only tool set were measured by running qodercli 1.1.59 on 2026-09-21; polyctl can now both watch a Qoder agent and wake one. What was not run stays marked: trust_all (--dangerously-skip-permissions), --list-sessions and --reasoning-effort and the model names they take, and the names of MCP tools inside the agent, `--strict-mcp-config` beside them, and the `mcp add` that registers polyctl: each is declared from the CLI's own help, not from a run. The standard-input prompt channel was measured on 2026-09-26, as was what one argument carries. The transcript, sessions, busy and telemetry readings are from a running Qoder 1.1.57 store, unchanged: two session transcripts (985 records) and three subagent transcripts beside them. Qoder is primarily an IDE (see docs/ide-extensions.md) with a companion CLI.",
8
+ "acp": { "argv": ["qodercli", "--acp"], "measured": "qodercli 1.1.59 answered initialize and session/list, 2026-09-28" },
9
+ "detect": {
10
+ "dirs": [".qoder"],
11
+ "files": ["AGENTS.md"],
12
+ "binaries": ["qodercli"],
13
+ "headless": ["-p"],
14
+ "install_dirs": ["~/.qoder"],
15
+ "note": "No `processes`: the process that writes this store is the Qoder IDE itself, one long-lived process shared by every session on the machine and still alive after an agent's turn dies, so naming it would let busy() read a dead agent as working - which is the one thing that check exists to prevent. The runtime is @qoder-ai/qoder-agent-sdk inside /Applications/Qoder.app. The CLI's binary on PATH is `qodercli`, and `which qodercli` is the test that it is installed; `qoder` is a dispatcher in ~/.qoder/entry that is not on PATH and must never be put in an argv. The same ~/.qoder/entry/qoder answers 'Qoder CLI is not installed' when no CLI is there, so its presence is not proof the CLI exists."
16
+ },
17
+ "send": {
18
+ "argv": ["qodercli", "-p", "{prompt}"],
19
+ "stdin": {"replaces": ["{prompt}"], "with": [], "note": "Measured on qodercli 1.1.59, 2026-09-26: `-p` with no prompt argument reads the prompt from standard input, so a prompt past what one argument carries has a route. What an argument does carry was measured too, and it is not small: 4, 8, 16, 24 and 32 KB each ran as one argument. No documented cap was found for either route."},
20
+ "note": "One non-interactive turn: `qodercli -p \"<prompt>\"` runs it and exits 0. Measured on qodercli 1.1.59, 2026-09-21."
21
+ },
22
+ "resume": {
23
+ "argv": ["qodercli", "-r", "{session}", "-p", "{prompt}"],
24
+ "stdin": {"replaces": ["{prompt}"], "with": [], "note": "As send: the prompt of a resumed turn is read from standard input when no prompt argument is given."},
25
+ "note": "`-r <id>` (or `--resume <id>`) continues that session: it writes to the same transcript file and remembers the previous turn. Measured on qodercli 1.1.59. The grant claude-code pins in its resume is mapped onto Qoder's flags in options.unattended, which polyctl appends to this argv when it starts a turn nobody attends (resume names no tool scope of its own)."
26
+ },
27
+ "options": {
28
+ "model": ["--model", "{model}"],
29
+ "output_json": ["-o", "stream-json"],
30
+ "trust_none": ["--tools", "Read,Grep,Glob", "--permission-mode", "dont_ask", "--strict-mcp-config"],
31
+ "trust_none_note": "Fact 8, measured on qodercli 1.1.59: `--tools Read,Grep,Glob --permission-mode dont_ask` leaves only those three tools - asked to create a file, the agent answered it had no tool to write with and no file appeared. --strict-mcp-config starts no MCP server; it exists but was not run.",
32
+ "trust_all": ["--dangerously-skip-permissions"],
33
+ "trust_all_note": "--dangerously-skip-permissions bypasses every permission check; the flag exists but was not run. There is no --yolo. polyctl never starts a turn with this: the grant of a turn nobody attends is options.unattended.",
34
+ "unattended": ["--permission-mode", "accept_edits", "--allowed-tools", "Bash(polyctl status:*),Bash(polyctl board:*),Bash(polyctl next:*),Bash(polyctl slice start:*),Bash(polyctl slice block:*),Bash(polyctl slice status:*),Bash(polyctl slices:*),Bash(polyctl writers),Bash(polyctl verify:*),Bash(polyctl review:*),Bash(polyctl commit-ok),Bash(polyctl commit-ok --verify),Bash(polyctl commit -m:*),Bash(polyctl commit -F:*),Bash(polyctl mail:*),Bash(polyctl ask:*),Bash(polyctl decisions:*),Bash(polyctl propose:*),Bash(polyctl doctor),Bash(polyctl watchdog explain:*),Bash(polyctl since:*),Bash(polyctl digest:*),Bash(polyctl fanout ok:*),Bash(polyctl fanout record:*),Bash(polyctl tail:*),Bash(git status:*),Bash(git log:*),Bash(git diff:*),Bash(git add:*),Bash(ls:*),Bash(cat:*),Bash(grep:*)"],
35
+ "unattended_note": "accept_edits, mapping the dontAsk mode claude-code pins: a -p turn nobody attends cannot answer a prompt, and claude-code pins dontAsk so an unlisted call is denied rather than left waiting. Measured on qodercli 1.1.59, the mode that achieves the same for Qoder is accept_edits, not dont_ask: dont_ask denies Write and Edit whatever the allowlist says (tried --allowed-tools Write, \"Read Write\", a repeated flag and \"Write(**)\", all denied with \"This action needs approval, and the Don't ask permission mode does not prompt\"), so an implementer under dont_ask cannot write the tree it is trusted with. accept_edits instead approves edits inside the workspace on its own - a write there lands, a write outside it is refused - so the allowlist names no Read, Grep, Glob, Write or Edit: reads need no entry (ls and echo ran unlisted; the allowlist bounds what changes things, not what reads), and edits are approved by the mode. It names only the Bash commands of the loop, comma-separated (measured: a comma list runs every name in it, and a repeated --allowed-tools flag works too). An unlisted command is blocked without hanging - the turn ends normally at exit 0, unlike a waiting prompt - but its denial is not recorded in the result's permission_denials; only dont_ask fills that field, so a blocked call is visible in the transcript's own tool_result, not there. polyctl's MCP tools are not named: a Qoder agent reaches the mailbox through the CLI, so this grant scopes no MCP tool. The read-only set beside it and each of these Bash forms were measured; this composed grant has never been run as one turn. A person's own allow rules in ~/.qoder/settings.json still apply.",
36
+ "effort": ["--reasoning-effort", "{effort}"],
37
+ "effort_note": "--reasoning-effort <level> exists but was not run: the level names it accepts are unverified, so no effort_values are declared and polyctl passes any level through unchecked."
38
+ },
39
+ "list_models": {
40
+ "argv": ["qodercli", "--list-models"],
41
+ "note": "Prints a header line 'MODEL', then one model name per line: read it by dropping the header. Measured on qodercli 1.1.59."
42
+ },
43
+ "list_sessions": {
44
+ "argv": ["qodercli", "--list-sessions"],
45
+ "unverified": "--list-sessions exists but was not run, and its output shape is unmeasured. Nothing in polyctl reads it: a session is resolved from the store, not asked of the harness."
46
+ },
47
+ "models": {
48
+ "default": "Qwen3.8-Flash",
49
+ "review": "Qwen3.8-Flash",
50
+ "_note": "polyctl init --profile and the reviewer default read these. --list-models offers router tiers - Auto, Ultimate, Performance, Efficient - and nothing states which vendor serves a tier, so any vendor may stand behind one: a role that must differ in family from its reviewer names a pinned model (Qwen3.8-Max, Qwen3.8-Flash, Kimi-K3, GLM-5.3, DeepSeek-V4-Pro, MiniMax-M3), never a tier. Qwen models are the alibaba family. Qwen3.8-Flash was measured billing total_cost_usd and total_credits both 0."
51
+ },
52
+ "transcript": {
53
+ "kind": "jsonl",
54
+ "path": "~/.qoder/projects/{escaped_cwd}/{session}.jsonl",
55
+ "escaped_cwd": "every character of the absolute cwd that is not a letter or a digit becomes '-', so /private/tmp/a_b.c becomes -private-tmp-a-b-c",
56
+ "record": {
57
+ "time": "timestamp",
58
+ "kind": "type",
59
+ "text_keys": ["message.content", "humanInput.text", "lastPrompt"]
60
+ },
61
+ "messages": {
62
+ "prompt": ["user"],
63
+ "reply": ["assistant"],
64
+ "blocks": "message.content[]",
65
+ "match": { "type": "text" },
66
+ "not_words": [{ "isMeta": true }],
67
+ "harness_replies": []
68
+ },
69
+ "turn": {
70
+ "end": [],
71
+ "end_when": {
72
+ "type": "assistant",
73
+ "field": "message.stop_reason",
74
+ "values": ["end_turn"],
75
+ "when": "the record carries message.usage; an assistant record with stop_reason null and no usage is a streaming partial, not an answer"
76
+ },
77
+ "conversation": ["user", "assistant"]
78
+ },
79
+ "tool_call": {
80
+ "type": "assistant",
81
+ "blocks": "message.content[]",
82
+ "match": { "type": "tool_use" },
83
+ "name": "name",
84
+ "args": "input",
85
+ "id": "id",
86
+ "path_keys": ["file_path"],
87
+ "write_words": ["write", "edit"],
88
+ "note": "Call ids are 'call_...'. The result is a tool_result block in the user record that follows, carrying tool_use_id and, on a failure only, is_error (3 of 132). The top-level toolUseResult repeats it per tool: Bash gives {exitCode, signal, stdout, stderr, kind, telemetryExecutionId}, Edit and Write give {file_path, success, additions, deletions, diff}, Read gives {file, type}, and an Agent call gives {kind: 'agent-result', agentId, agentType, state, terminateReason, outputPath, transcriptPath} - the last is how a subagent is named, see subagents."
89
+ },
90
+ "subagents": {
91
+ "dir": "{session}/subagents",
92
+ "transcripts": [{ "path": "agent-{id}.jsonl", "named_by": "toolUseResult.agentId" }],
93
+ "sidecar": { "path": "agent-{id}.meta.json", "call": "toolUseId", "fields": ["agentType", "description", "invocationName", "color"] },
94
+ "status": { "path": "~/.qoder/tasks/{session}/task-{taskId}.json", "fields": ["status", "agentId", "parentToolUseId", "transcriptPath", "completedAt", "result", "summary"], "running_values": ["running"] },
95
+ "note": "An agent a call starts writes its own transcript under the session's subagents directory, named by the agentId the call's toolUseResult carries; its meta sidecar names the starting call at toolUseId, which is the link when a call's result carries no agentId. Its records share the session's schema with isSidechain true (every record of the 3 transcripts checked) against false in the session's own, and promptId holding the parent session's uuid rather than a turn's. A task sidecar ticks per subagent update and says 'running' or 'completed': 1 completed and 2 running were live while this was read, one written seconds before the read. So a Qoder subagent at work is its implementer at work while the session transcript is quiet, and polyctl must read the subagents and the sidecars, not the session file alone."
96
+ },
97
+ "note": "No record closes a turn: the store holds no 'result' and no 'system' record of any kind, so a turn ends at the last assistant record that carries usage, whose stop_reason says why the model stopped. Observed stop_reason across 985 records: tool_use 130, end_turn 5, null 234 (partials). A store at rest ended every one of its 6 human prompts at an end_turn, and meta records follow the end rather than mark it. max_tokens, stop_sequence and refusal were never observed, so how Qoder records a truncated or refused answer is unknown; treat an absent end_turn as 'not cleanly ended'. A user record is a prompt only when it carries no tool result: 131 of its 134 user records return a call (toolUseResult plus sourceToolAssistantUUID), and 7 carry origin.kind 'human' with humanInput.text, which are the prompts a person typed; isMeta true marks a note the harness writes (2 of 985). No isCompactSummary, no '<synthetic>' model and no isApiErrorMessage was observed, so a reply Qoder writes itself is not distinguishable from the model's - unlike Claude Code, whose store holds 515. Kinds present across the two stores, with counts from the larger: user 134, assistant 264, attachment 20, active-leaf 251, runtime-config 4, workspace-directories 3, worktree-state 1, last-prompt 2, file-history-snapshot 25. Every kind but user and assistant is bookkeeping. version 1.1.57, entrypoint 'cli', userType 'external', gitBranch and cwd sit on every user, assistant and attachment record. A session's records are also echoed as structured events under ~/.qoder/logs/sessions/{escaped_cwd}/{session}/segments/*.jsonl (3,243 events: model.request.started, model.response.completed, loop.iteration.*, tool.requested, tool.execution.finished, hook.*), one file per process, which is a second reader's option when the transcript's own cadence is too coarse.",
98
+ "tail_bytes": 900000
99
+ },
100
+ "sessions": {
101
+ "kind": "escaped-cwd",
102
+ "dir": "~/.qoder/projects",
103
+ "transcript": "{session}.jsonl",
104
+ "cwd": "cwd",
105
+ "note": "A directory's name is its working directory with '/' made '-', so it cannot be read back into a path: `cwd` names the record field holding it, and every user, assistant and attachment record carries it (420 of 420 in the larger store). A type 'workspace-directories' record lists the full paths of every directory the session may work in, which is where a moved or multi-root session must be read from. ~/.qoder/logs/sessions holds a directory for a session whose transcript is elsewhere or gone: one of the four observed log directories has no transcript, so a session is placed from the transcripts, not the log tree."
106
+ },
107
+ "busy": {
108
+ "idle_seconds": 900,
109
+ "note": "No status file, so the age of the last write decides it, and the write to age is the newest of the session transcript and its subagents' transcripts: they advance together while a turn runs. Mid-turn quiet is not small: measured 2026-10-16 over the reviewer store (217 qodercli sessions) and the IDE stores, turn-bounded and subagent writes counted, a live turn stayed quiet for 612 s before its first partial (523, 520, 494 and 416 beside it) and IDE turns for 599 s and 606 s - the hour-and-day gaps the same walks hold are app closures, and reading idle for a closed app is right. The window is 900 s so a live turn across a ten-minute check reads slowing, not idle; the earlier 120 s window sat below the 135 s quiet its own note recorded, and read a live turn idle through such gaps. A session the IDE drove has no qodercli process, so the process check reads stopped for it however fresh its write; busy() watches the implementer's headless turn, whose qodercli lives in the tree."
110
+ },
111
+ "telemetry": {
112
+ "context": {
113
+ "from": "transcript",
114
+ "type": "assistant",
115
+ "field": "message.usage.context_usage_ratio",
116
+ "fallback": { "type": "runtime-config", "field": "contextWindow" },
117
+ "unit": "ratio",
118
+ "verified": true,
119
+ "note": "The store states the percentage outright: context_usage_ratio is nonzero on 143 of 143 records carrying usage, and a type 'runtime-config' record names the window beside it (contextWindow 200000, model 'qfmodel'). No other harness polyctl reads gives context this directly."
120
+ },
121
+ "cost": {
122
+ "from": "transcript",
123
+ "type": "assistant",
124
+ "response": "message.id",
125
+ "fields": ["message.usage.credits"],
126
+ "unit": "credit",
127
+ "counted": "credits, once per response read by message.id: the same response is written as several streaming partials and each repeats the usage, so summing records would count it again.",
128
+ "not_counted": "message.usage.input_tokens, output_tokens, cache_creation_input_tokens and cache_read_input_tokens, which are all zero on every record of this store's model, and the Claude-family keys beside them (server_tool_use, iterations) that Qoder writes without filling.",
129
+ "verified": true,
130
+ "note": "This is the one harness whose spend polyctl can read in the unit it is billed: credits, with original_credits beside it and billable false on 143 of 143. Token counts are present as fields and empty of values, so a token-priced estimate would read zero spend for a session that spent credits - the failure mode billing.fallback exists to avoid."
131
+ },
132
+ "failure": {
133
+ "from": "transcript",
134
+ "type": "user",
135
+ "blocks": "message.content[]",
136
+ "match": { "type": "tool_result" },
137
+ "field": "is_error",
138
+ "failed_when": true,
139
+ "text": "content",
140
+ "verified": true,
141
+ "note": "is_error is present only where a call failed (3 of 132 observed), so its absence is a success rather than an unread value. A subagent's own end is not a tool result: read task-{id}.json's status, and the terminateReason an Agent call's toolUseResult carries."
142
+ }
143
+ },
144
+ "billing": {
145
+ "fallback": {
146
+ "reading": "per-response",
147
+ "note": "How the panel and polyctl cost add this harness's records up. The offline credit estimate reads no transcript: Qoder bills its own credit account and says so in message.usage.credits, which is the reading, not an estimate to stand in for one."
148
+ }
149
+ },
150
+ "directives": {
151
+ "steering_files": ["AGENTS.md", ".qoder/rules"],
152
+ "steering_format": "unverified: neither file existed in any of the three working directories the store holds",
153
+ "skills_dir": "~/.qoder/plugins",
154
+ "settings": "~/.qoder/settings.json",
155
+ "note": "Observed on disk: ~/.qoder/settings.json holds only {enabledPlugins}, and plugins are installed under ~/.qoder/plugins/{cache,data,installed_plugins_v2.json}. The steering files above are what the documentation names; AGENTS.md is the one polyctl writes for every harness, and .qoder/rules was not present to confirm."
156
+ },
157
+ "mcp": {
158
+ "file": ".mcp.json",
159
+ "register": ["qodercli", "mcp", "add", "-s", "local", "polyctl", "{exe}", "{args}"],
160
+ "note": "Project-scope MCP servers are registered in .mcp.json (`qodercli mcp add -s project <name> <command> [args...]`; also add-json, list and remove). A project-scope server needs a per-project approval, which `qodercli mcp reset-project-choices` resets; the local scope this register uses needs no approval, so polyctl registers itself there. The names of MCP tools inside the agent are not yet verified, which is why the unattended grant reaches polyctl through the CLI rather than through named MCP tools.",
161
+ "warning": "~/.qoder/mcp-router.json is runtime state - {schemaVersion, pid, baseUrl, apiKey, startedAt} of a bridge process, and it holds a key, so polyctl must never write or read it as configuration."
162
+ }
163
+ }
@@ -0,0 +1,27 @@
1
+ {
2
+ "project_config": [".qwen", "QWEN.md", "AGENTS.md"],
3
+ "id": "qwen", "name": "Qwen Code", "contract": 1, "verified": "untested",
4
+ "disclaimer": "Written from the documented interface, not verified against an install. Flags drift; correct and open a PR.",
5
+ "sources": ["https://qwenlm.github.io/qwen-code-docs/en/users/features/headless/",
6
+ "https://qwenlm.github.io/qwen-code-docs/en/users/configuration/settings/",
7
+ "https://qwenlm.github.io/qwen-code-docs/en/users/features/memory/"],
8
+ "detect": { "headless": ["-p", "--prompt"] },
9
+ "send": { "argv": ["qwen", "-p", "{prompt}"], "cwd_matters": true,
10
+ "stdin": { "replaces": ["-p", "{prompt}"], "with": [],
11
+ "note": "Verified from the headless documentation (qwenlm.github.io/qwen-code-docs/en/users/features/headless/), read 2026-09-17: its example pipes the prompt to `qwen` with no -p. Its --resume and --continue examples all pass -p, so resume declares none." } },
12
+ "resume": { "argv": ["qwen", "--resume", "{session}", "-p", "{prompt}"], "continue_last": ["qwen", "--continue", "-p", "{prompt}"],
13
+ "note": "--resume without an id opens an interactive picker; always pass one." },
14
+ "options": {
15
+ "trust_none": ["--approval-mode", "plan"],
16
+ "trust_none_note": "plan mode analyses only: it neither edits files nor runs commands",
17
+ "model": ["--model", "{model}"],
18
+ "effort": null, "effort_why": "no documented flag; reasoning effort is the model.reasoningEffort setting",
19
+ "output_json": ["--output-format", "stream-json"],
20
+ "trust_all": ["--yolo"],
21
+ "unattended": ["--approval-mode", "auto-edit", "--allowed-tools", "Edit,Bash(polyctl status *),Bash(polyctl board *),Bash(polyctl next *),Bash(polyctl slice start *),Bash(polyctl slice block *),Bash(polyctl slice status *),Bash(polyctl slices *),Bash(polyctl writers),Bash(polyctl verify *),Bash(polyctl review *),Bash(polyctl commit-ok),Bash(polyctl commit-ok --verify),Bash(polyctl commit -m *),Bash(polyctl commit -F *),Bash(polyctl mail *),Bash(polyctl ask *),Bash(polyctl decisions *),Bash(polyctl propose *),Bash(polyctl doctor),Bash(polyctl watchdog explain *),Bash(polyctl since *),Bash(polyctl digest *),Bash(polyctl fanout ok *),Bash(polyctl fanout record *),Bash(polyctl tail *),Bash(git status *),Bash(git log *),Bash(git diff *),Bash(git add *),Bash(ls *),Bash(cat *),Bash(grep *)"],
22
+ "unattended_note": "In place of --yolo: auto-edit approves edits, a shell command runs only where --allowed-tools names it, and a -p run turns what would ask into an error the model reads; Edit is named for a folder Qwen Code does not trust, where the mode falls back to default; polyctl's MCP tools are not named, and the loop reaches the mailbox through the CLI. A person's tools.approvalMode yolo is overridden by the flag, and allow rules in settings still apply. Read on 2026-09-17 from qwenlm.github.io/qwen-code-docs/en/users/features/approval-mode/ and /features/headless/, and github.com/QwenLM/qwen-code (packages/cli/src/config/config.ts)."
23
+ },
24
+ "transcript": { "kind": "jsonl", "path": "~/.qwen/projects/{sanitized_cwd}/chats", "todo": "confirm how the cwd is sanitised and the record shape against an install" },
25
+ "busy": { "mtime_glob": "~/.qwen/projects/*/chats/*", "idle_seconds": 240 },
26
+ "directives": { "steering_files": ["QWEN.md", "AGENTS.md", ".qwen/QWEN.local.md", "~/.qwen/QWEN.md"], "note": "the file name follows context.fileName" }
27
+ }
@@ -0,0 +1,25 @@
1
+ {
2
+ "project_config": [".reasonix", "REASONIX.md", "AGENTS.md", "CLAUDE.md"],
3
+ "id": "reasonix", "name": "Reasonix", "contract": 1, "verified": "untested",
4
+ "disclaimer": "Written from the documented interface and, for -p, the source; not verified against an install. Flags drift; correct and open a PR.",
5
+ "notes": "esengine/DeepSeek-Reasonix, default branch main-v2, npm reasonix. -p as a switch with a positional prompt is read from internal/cli/cli_flags.go. --auto and -y are not full approval: they equal the default, workspace-write.",
6
+ "sources": ["https://github.com/esengine/DeepSeek-Reasonix/blob/main-v2/docs/CLI.md",
7
+ "https://github.com/esengine/DeepSeek-Reasonix/blob/main-v2/docs/CONFIG_PATHS.md",
8
+ "https://github.com/esengine/DeepSeek-Reasonix/blob/main-v2/docs/GUIDE.md"],
9
+ "detect": { "headless": ["-p", "run"] },
10
+ "send": { "argv": ["reasonix", "-p", "{prompt}"], "cwd_matters": true },
11
+ "resume": { "argv": ["reasonix", "run", "--resume", "{session}", "{prompt}"], "note": "--resume takes an id, a path or a unique title" },
12
+ "options": {
13
+ "trust_none": ["--permission-mode=read-only"],
14
+ "trust_none_note": "a non-interactive read-only run refuses writes and side effects",
15
+ "model": ["--model", "{model}"],
16
+ "effort": ["--effort", "{effort}"],
17
+ "output_json": ["--output-format", "stream-json"],
18
+ "trust_all": ["--permission-mode=danger-full-access"],
19
+ "unattended": ["--permission-mode=workspace-write"],
20
+ "unattended_note": "In place of danger-full-access, which runs without Reasonix's filesystem and network sandbox: workspace-write, its default, named so a configured default cannot move it, writes inside the workspace and runs builds and tests in the OS sandbox, and a -p run denies whatever would ask. The network is off unless [sandbox] network allows it, which polyctl review may need. Read on 2026-09-17 from github.com/esengine/DeepSeek-Reasonix (main-v2 docs/CLI.md and docs/GUIDE.md)."
21
+ },
22
+ "transcript": { "kind": "unknown", "path": "~/.reasonix/sessions/", "todo": "find the record format against an install" },
23
+ "busy": { "mtime_glob": "~/.reasonix/sessions/**", "idle_seconds": 240 },
24
+ "directives": { "steering_files": ["REASONIX.md", "AGENTS.md", "CLAUDE.md"], "note": "hierarchical; a .local.md beside one wins" }
25
+ }
@@ -0,0 +1,24 @@
1
+ {
2
+ "id": "rtk",
3
+ "command": "rtk",
4
+ "verified_version": "rtk 0.50.0",
5
+ "measured": "2026-09-26",
6
+ "hook": "A harness's pre-tool hook hands each shell command to `rtk rewrite` and runs what it answers in the command's place. Measured with `rtk hook claude`: the hook allows a rewritten command itself only where the person's own settings allow the original, answers nothing for one they deny, and for every other hands the decision back to the harness, which checks the rewritten command against its own rules. The grant polyctl gives a turn is on its command line and never reaches the hook, so `git diff` under `Bash(git diff:*)` ran as `rtk git diff`, which no rule admitted, and an unattended turn was denied it (measured on qodercli).",
7
+ "forms": {
8
+ "git status": "rtk git status",
9
+ "git log": "rtk git log",
10
+ "git diff": "rtk git diff",
11
+ "git add": "rtk git add",
12
+ "ls": "rtk ls",
13
+ "cat": "rtk read",
14
+ "head": "rtk read",
15
+ "tail": "rtk read",
16
+ "grep": "rtk grep",
17
+ "ps": "rtk ps"
18
+ },
19
+ "forms_note": "Each command a shipped grant names with any arguments after it, and the words every rewrite `rtk rewrite` makes of it begins with. git's subcommands, ls, cat, grep and ps keep their arguments in place (`git diff --stat` becomes `rtk git diff --stat`, `cat -n x` becomes `rtk read -n x`); head and tail do not (`head -n 5 x` becomes `rtk read x --head-lines 5`, `tail -n 5 x` becomes `rtk read x --tail-lines 5`, and `tail x` and `tail -f x` are left as they are), which is why a form is read only off a rule that names a command with any arguments. No form reaches further than its command: rtk git hands the words after a subcommand to that git subcommand (`rtk git status -c core.fsmonitor=<command>` was refused by git status, as `git status -c` is, while `rtk git -c core.fsmonitor=<command> status` ran it, as `git -c` does); rtk read prints a file's lines, as cat does, and as `head -n <count>` does whole; rtk grep ran grep with the words it was given, not ripgrep (a ripgrep put first on PATH was not run, and `--pre`, the ripgrep flag that runs a program, was refused by grep); rtk ls runs ls, and rtk ps, a command rtk has no filter for, runs ps as it is.",
20
+ "unchanged": ["polyctl", "lsof"],
21
+ "unchanged_note": "Programs `rtk rewrite` leaves as they are, measured for every polyctl command and every lsof form the shipped grants name, so a rule for them needs no form. tests/test_grants_rtk.py fails when a shipped grant names a command that is neither here nor in forms: a new one is measured before it ships.",
22
+ "runs_any_command": ["rtk proxy", "rtk run", "rtk err", "rtk summary", "rtk test", "rtk env"],
23
+ "runs_any_command_note": "Subcommands that run the command after them (measured: each ran the `touch` it was given), as rtk runs any program it has no filter for (`rtk sh -c` ran sh). A rule that admits one of them, or rtk's form of a command polyctl forbids, is named by the doctor as the command itself is (allowlist.through_rewriters); the grants polyctl composes admit neither."
24
+ }