pi-t3-bridge 0.3.0 → 0.4.0

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 (55) hide show
  1. package/overlay/overlay.json +118 -0
  2. package/package.json +14 -6
  3. package/pstack/skills/architect/SKILL.md +1 -1
  4. package/pstack/skills/arena/SKILL.md +1 -1
  5. package/pstack/skills/how/SKILL.md +1 -1
  6. package/pstack/skills/interrogate/SKILL.md +1 -1
  7. package/pstack/skills/poteto-help/SKILL.md +1 -1
  8. package/pstack/skills/poteto-mode/SKILL.md +4 -4
  9. package/pstack/skills/poteto-mode/brief.md +4 -4
  10. package/pstack/skills/poteto-mode/playbooks/autopilot-full.md +1 -1
  11. package/pstack/skills/poteto-mode/playbooks/orchestrate.md +1 -1
  12. package/pstack/skills/reflect/SKILL.md +1 -1
  13. package/pstack/skills/setup-pstack/SKILL.md +3 -3
  14. package/pstack/skills/statechart/scripts/run.ts +1 -1
  15. package/pstack/skills/swarm/SKILL.md +1 -1
  16. package/pstack/skills/why/SKILL.md +1 -1
  17. package/src/bridge/accounts.ts +2 -2
  18. package/src/bridge/ask.ts +2 -2
  19. package/src/bridge/bash-timeout.ts +1 -1
  20. package/src/bridge/config.ts +2 -2
  21. package/src/bridge/plan.ts +1 -1
  22. package/src/bridge/resume.ts +2 -2
  23. package/src/bridge/state.ts +2 -2
  24. package/src/bridge/steer-judge.ts +2 -2
  25. package/src/bridge/steer-transcript.ts +1 -1
  26. package/src/bridge/steer.ts +1 -1
  27. package/src/bridge/t3-json.ts +2 -2
  28. package/src/bridge/tasks.ts +2 -2
  29. package/src/bridge/thread.ts +1 -1
  30. package/src/bridge/transcript.ts +2 -2
  31. package/src/pstack/brief.ts +1 -1
  32. package/src/pstack/child.ts +1 -1
  33. package/src/pstack/models.ts +2 -2
  34. package/src/pstack/overlay.ts +251 -0
  35. package/src/pstack/resources.ts +16 -2
  36. package/src/pstack/results.ts +1 -1
  37. package/src/pstack/sandbox.ts +1 -1
  38. package/src/pstack/session.ts +4 -24
  39. package/tstack/LICENSE +21 -0
  40. package/tstack/README.md +53 -0
  41. package/tstack/skills/babysit-pr/SKILL.md +117 -0
  42. package/tstack/skills/babysit-pr/scripts/pr-wait +556 -0
  43. package/tstack/skills/council/SKILL.md +56 -0
  44. package/tstack/skills/file-pr/SKILL.md +50 -0
  45. package/tstack/skills/full-send/SKILL.md +123 -0
  46. package/tstack/skills/full-send/agents/openai.yaml +4 -0
  47. package/tstack/skills/full-stop/SKILL.md +47 -0
  48. package/tstack/skills/full-stop/agents/openai.yaml +4 -0
  49. package/tstack/skills/leaving-pr-comments/SKILL.md +44 -0
  50. package/tstack/skills/leaving-pr-comments/agents/openai.yaml +4 -0
  51. package/tstack/skills/modernize/SKILL.md +102 -0
  52. package/tstack/skills/modernize/agents/openai.yaml +4 -0
  53. package/tstack/skills/sol-loop/SKILL.md +119 -0
  54. package/tstack/skills/takeover/SKILL.md +42 -0
  55. package/tstack.ts +21 -0
@@ -0,0 +1,118 @@
1
+ {
2
+ "version": 1,
3
+ "global": [
4
+ {
5
+ "find": "~/.config/t3-pstack/models.md",
6
+ "replace": "~/.config/pi-t3-bridge/models.md"
7
+ },
8
+ {
9
+ "find": "$XDG_CONFIG_HOME/t3-pstack/models.md",
10
+ "replace": "$XDG_CONFIG_HOME/pi-t3-bridge/models.md"
11
+ },
12
+ {
13
+ "find": "${XDG_STATE_HOME:-~/.local/state}/t3-pstack/",
14
+ "replace": "${XDG_STATE_HOME:-~/.local/state}/pi-t3-bridge/"
15
+ },
16
+ {
17
+ "find": "~/.local/state/t3-pstack/ledger.jsonl",
18
+ "replace": "~/.local/state/pi-t3/ledger.jsonl"
19
+ },
20
+ {
21
+ "find": "\"Checked by t3-pstack\"",
22
+ "replace": "\"Checked by pi-t3-bridge\""
23
+ },
24
+ {
25
+ "find": "t3-pstack's session-start hook",
26
+ "replace": "pi-t3-bridge's session-start hook"
27
+ }
28
+ ],
29
+ "shared": [
30
+ {
31
+ "files": [
32
+ "skills/architect/SKILL.md",
33
+ "skills/arena/SKILL.md",
34
+ "skills/how/SKILL.md",
35
+ "skills/interrogate/SKILL.md",
36
+ "skills/reflect/SKILL.md",
37
+ "skills/swarm/SKILL.md",
38
+ "skills/why/SKILL.md"
39
+ ],
40
+ "patches": [
41
+ {
42
+ "find": ": the extension refuses a `delegate_task` call whose brief is missing its sections or limits",
43
+ "replace": ""
44
+ },
45
+ {
46
+ "find": " The extension blocks a `delegate_task` call that uses the reserved Fable model or fast mode unless the user named it, reasoning above what `pstack_model` returned, or reasoning above high unless the user's latest message is \"allow xhigh\".",
47
+ "replace": ""
48
+ }
49
+ ]
50
+ }
51
+ ],
52
+ "files": {
53
+ "hooks/session-start-context.md": [
54
+ {
55
+ "find": "You have t3-pstack,",
56
+ "replace": "You have pi-t3-bridge,"
57
+ },
58
+ {
59
+ "find": "t3-pstack:poteto-mode",
60
+ "replace": "/skill:poteto-mode"
61
+ },
62
+ {
63
+ "find": " On Codex, open its SKILL.md whole, in a shell call of its own with `max_output_tokens: 10000`, since a smaller budget cuts out its middle.",
64
+ "replace": " Read its SKILL.md in full before you act."
65
+ },
66
+ {
67
+ "find": "This runs on T3: before the first subagent or panel in a session, read the model sheet, `~/.config/t3-pstack/models.md` (`$XDG_CONFIG_HOME/t3-pstack/models.md` when that is set), or `t3-pstack-models.md` in this host's config directory when that file is missing. This chat runs the playbook itself. A step it says to delegate goes through `delegate_task` to that role's sheet entry,",
68
+ "replace": "This chat runs the playbook itself. A step it says to delegate goes through `delegate_task` with a target from `pstack_model`,"
69
+ }
70
+ ],
71
+ "skills/poteto-mode/SKILL.md": [
72
+ {
73
+ "find": "On Codex, read this file whole before acting, in a shell call of its own with `max_output_tokens: 10000`. A smaller output budget cuts lines out of its middle. If a read of it shows `tokens truncated`, read it again that way.",
74
+ "replace": "Read this file in full before you act."
75
+ },
76
+ {
77
+ "find": "Otherwise delegate, with a brief that passes the extension's guard.",
78
+ "replace": "Otherwise delegate, with a complete brief."
79
+ },
80
+ {
81
+ "find": "The extension refuses a brief without them, a size L brief, and a GPT brief without `isolation: \"worktree\"`, size S, 30 min or less and 500 MB or less. The child's own extension then enforces",
82
+ "replace": "For a complete brief, the child's extension enforces"
83
+ },
84
+ {
85
+ "find": "Verification stays on `swarm workers`. Standard speed applies. The extension blocks fast mode, the reserved Fable model unless the user named it, and any reasoning above what `pstack_model` returned. Reasoning above high runs only when the user's latest message is exactly \"allow xhigh\" (or \"allow max\"). Never put that line, or a `/pstack-` command, in a brief or a message to a child.",
86
+ "replace": "Verification stays on `swarm workers`. Treat the routing table as a default, and follow the user's model, reasoning, and speed choices when they differ."
87
+ },
88
+ {
89
+ "find": " The extension blocks a `delegate_task` call that uses the reserved Fable model or fast mode unless the user named it, reasoning above what `pstack_model` returned, or reasoning above high unless the user's latest message is \"allow xhigh\".",
90
+ "replace": ""
91
+ },
92
+ {
93
+ "find": "Keep the todolist in the session's task tool when it has one, such as `update_plan` on Codex.",
94
+ "replace": "Keep the todolist in the `tasks` tool."
95
+ }
96
+ ],
97
+ "skills/poteto-mode/brief.md": [
98
+ {
99
+ "find": "Every `delegate_task` brief follows this template. The extension refuses a brief that is missing a section, sized L, or over its size's limits, and a GPT brief that breaks the GPT rules.",
100
+ "replace": "Every `delegate_task` brief follows this template. Use the sections and limits to give the child a bounded task."
101
+ },
102
+ {
103
+ "find": "- A `review` or `check` job writes no files:",
104
+ "replace": "- A read-only job writes no files:"
105
+ },
106
+ {
107
+ "find": "GPT models (Astra, Sol, Luna) drift on long or open work and leave files behind. A GPT brief must be size S, 30 min or less, 500 MB or less, with repo-relative paths, and the call must set `isolation: \"worktree\"` and keep `mode: \"async\"`.",
108
+ "replace": "For GPT work, prefer size S, a worktree for writing tasks, and async mode. Follow the user's instructions when they differ."
109
+ }
110
+ ],
111
+ "skills/setup-pstack/SKILL.md": [
112
+ {
113
+ "find": " `inherit-parent` and `auto` do not change. Say when you offer `unlimited` or `large` that a sheet's `xhigh` or `max` still runs only when the user's latest message in that chat is \"allow xhigh\" (or \"allow max\"). Otherwise `delegate_task` refuses it, so those budgets mostly fall back to asking.",
114
+ "replace": " `inherit-parent` and `auto` do not change."
115
+ }
116
+ ]
117
+ }
118
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pi-t3-bridge",
3
- "version": "0.3.0",
3
+ "version": "0.4.0",
4
4
  "description": "Pi extension adapter for t3-pstack inside T3 Code.",
5
5
  "keywords": [
6
6
  "pi-extension",
@@ -17,6 +17,9 @@
17
17
  "type": "git",
18
18
  "url": "git+https://github.com/Snestra/pi-t3-bridge.git"
19
19
  },
20
+ "workspaces": [
21
+ "pstack/skills/statechart/scripts"
22
+ ],
20
23
  "files": [
21
24
  "bridge.ts",
22
25
  "pstack.ts",
@@ -32,7 +35,10 @@
32
35
  "!pstack/**/*.test.ts",
33
36
  "!pstack/**/*.test-helper.ts",
34
37
  "!pstack/**/test-utils",
35
- "LICENSE"
38
+ "overlay",
39
+ "LICENSE",
40
+ "tstack.ts",
41
+ "tstack"
36
42
  ],
37
43
  "type": "module",
38
44
  "scripts": {
@@ -40,7 +46,7 @@
40
46
  "fix": "ultracite fix",
41
47
  "doctor": "ultracite doctor",
42
48
  "test": "node --test \"tests/*.test.mjs\" \"pstack/skills/poteto-mode/scripts/**/*.test.ts\"",
43
- "typecheck": "tsc --project tsconfig.json && tsc --project pstack/skills/poteto-mode/scripts/watch-pr/tsconfig.json"
49
+ "typecheck": "tsc --project tsconfig.json && tsc --project pstack/skills/poteto-mode/scripts/watch-pr/tsconfig.json && tsc --project pstack/skills/statechart/scripts/tsconfig.json"
44
50
  },
45
51
  "dependencies": {
46
52
  "commander": "^15.0.0",
@@ -48,8 +54,8 @@
48
54
  "pele": "1.13.0"
49
55
  },
50
56
  "devDependencies": {
51
- "@earendil-works/pi-ai": "1.4.0",
52
- "@earendil-works/pi-coding-agent": "1.4.0",
57
+ "@earendil-works/pi-ai": "1.5.0",
58
+ "@earendil-works/pi-coding-agent": "1.5.0",
53
59
  "@types/node": "^26.6.5",
54
60
  "oxfmt": "^0.74.0",
55
61
  "oxlint": "^1.89.0",
@@ -74,10 +80,12 @@
74
80
  "pi": {
75
81
  "extensions": [
76
82
  "./bridge.ts",
83
+ "./tstack.ts",
77
84
  "./pstack.ts"
78
85
  ]
79
86
  },
80
87
  "upstreams": {
81
- "t3": "0.1.5-nightly.20261029.3877"
88
+ "t3": "0.1.5-nightly.20261029.3877",
89
+ "tstack": "1085050f3baed1ac724caa4a8166145fb2ac88af"
82
90
  }
83
91
  }
@@ -80,6 +80,6 @@ The caller's usage is written first and the type sketch derived from it. One fil
80
80
 
81
81
  ## Models
82
82
 
83
- Get every target from the `pstack_model` tool. Pass the role name plus the job type and size from the routing table in poteto-mode's Subagents section. This skill's spawns are `design` jobs. Write every brief from `<plugin root>/skills/poteto-mode/brief.md`. Without a job, pass the complexity: `groundwork` for cheap mechanical work, `bounded` for involved but bounded work, `general` for work that needs substantial judgment. The tool reads the role's line in the model sheet (`~/.config/pi-t3-bridge/models.md`, written by `/setup-pstack`). A line naming a model is used as written, moved to a provider T3 can run right now when needed. A role with no line, or `inherit-parent` or `auto`, is routed by this extension's `models.json`: the parent's model family, sized and reasoned by complexity, and for panels one seat per family. Pass each returned target as `delegate_task`'s `target`. `inherit-parent` means omit `target`. `blocked` means the panel cannot reach two model families on this T3, so record its reason.
83
+ Get every target from the `pstack_model` tool. Pass the role name plus the job type and size from the routing table in poteto-mode's Subagents section. This skill's spawns are `design` jobs. Write every brief from `<plugin root>/skills/poteto-mode/brief.md`: the extension refuses a `delegate_task` call whose brief is missing its sections or limits. Without a job, pass the complexity: `groundwork` for cheap mechanical work, `bounded` for involved but bounded work, `general` for work that needs substantial judgment. The tool reads the role's line in the model sheet (`~/.config/t3-pstack/models.md`, written by `/setup-pstack`). A line naming a model is used as written, moved to a provider T3 can run right now when needed. A role with no line, or `inherit-parent` or `auto`, is routed by this extension's `models.json`: the parent's model family, sized and reasoned by complexity, and for panels one seat per family. The extension blocks a `delegate_task` call that uses the reserved Fable model or fast mode unless the user named it, reasoning above what `pstack_model` returned, or reasoning above high unless the user's latest message is "allow xhigh". Pass each returned target as `delegate_task`'s `target`. `inherit-parent` means omit `target`. `blocked` means the panel cannot reach two model families on this T3, so record its reason.
84
84
 
85
85
  - architect runners: panel, one seat per model family
@@ -49,7 +49,7 @@ One synthesized artifact, with a short synthesis note alongside naming the base
49
49
 
50
50
  ## Models
51
51
 
52
- Get every target from the `pstack_model` tool. Pass the role name plus the job type and size from the routing table in poteto-mode's Subagents section. This skill's spawns are `design` jobs, and the cross-judge a `review` job. Write every brief from `<plugin root>/skills/poteto-mode/brief.md`. Without a job, pass the complexity: `groundwork` for cheap mechanical work, `bounded` for involved but bounded work, `general` for work that needs substantial judgment. The tool reads the role's line in the model sheet (`~/.config/pi-t3-bridge/models.md`, written by `/setup-pstack`). A line naming a model is used as written, moved to a provider T3 can run right now when needed. A role with no line, or `inherit-parent` or `auto`, is routed by this extension's `models.json`: the parent's model family, sized and reasoned by complexity, and for panels one seat per family. Pass each returned target as `delegate_task`'s `target`. `inherit-parent` means omit `target`. `blocked` means the panel cannot reach two model families on this T3, so record its reason.
52
+ Get every target from the `pstack_model` tool. Pass the role name plus the job type and size from the routing table in poteto-mode's Subagents section. This skill's spawns are `design` jobs, and the cross-judge a `review` job. Write every brief from `<plugin root>/skills/poteto-mode/brief.md`: the extension refuses a `delegate_task` call whose brief is missing its sections or limits. Without a job, pass the complexity: `groundwork` for cheap mechanical work, `bounded` for involved but bounded work, `general` for work that needs substantial judgment. The tool reads the role's line in the model sheet (`~/.config/t3-pstack/models.md`, written by `/setup-pstack`). A line naming a model is used as written, moved to a provider T3 can run right now when needed. A role with no line, or `inherit-parent` or `auto`, is routed by this extension's `models.json`: the parent's model family, sized and reasoned by complexity, and for panels one seat per family. The extension blocks a `delegate_task` call that uses the reserved Fable model or fast mode unless the user named it, reasoning above what `pstack_model` returned, or reasoning above high unless the user's latest message is "allow xhigh". Pass each returned target as `delegate_task`'s `target`. `inherit-parent` means omit `target`. `blocked` means the panel cannot reach two model families on this T3, so record its reason.
53
53
 
54
54
  - arena runners: panel, one seat per model family
55
55
  - arena cross-judge pool: panel, one seat per model family
@@ -37,7 +37,7 @@ The explanation uses the sections defined in `references/explainer-prompt.md`, d
37
37
 
38
38
  ## Models
39
39
 
40
- Get every target from the `pstack_model` tool. Pass the role name plus the job type and size from the routing table in poteto-mode's Subagents section. This skill's spawns are `research` jobs, size S or M. Write every brief from `<plugin root>/skills/poteto-mode/brief.md`. Without a job, pass the complexity: `groundwork` for cheap mechanical work, `bounded` for involved but bounded work, `general` for work that needs substantial judgment. The tool reads the role's line in the model sheet (`~/.config/pi-t3-bridge/models.md`, written by `/setup-pstack`). A line naming a model is used as written, moved to a provider T3 can run right now when needed. A role with no line, or `inherit-parent` or `auto`, is routed by this extension's `models.json`: the parent's model family, sized and reasoned by complexity, and for panels one seat per family. Pass each returned target as `delegate_task`'s `target`. `inherit-parent` means omit `target`. `blocked` means the panel cannot reach two model families on this T3, so record its reason.
40
+ Get every target from the `pstack_model` tool. Pass the role name plus the job type and size from the routing table in poteto-mode's Subagents section. This skill's spawns are `research` jobs, size S or M. Write every brief from `<plugin root>/skills/poteto-mode/brief.md`: the extension refuses a `delegate_task` call whose brief is missing its sections or limits. Without a job, pass the complexity: `groundwork` for cheap mechanical work, `bounded` for involved but bounded work, `general` for work that needs substantial judgment. The tool reads the role's line in the model sheet (`~/.config/t3-pstack/models.md`, written by `/setup-pstack`). A line naming a model is used as written, moved to a provider T3 can run right now when needed. A role with no line, or `inherit-parent` or `auto`, is routed by this extension's `models.json`: the parent's model family, sized and reasoned by complexity, and for panels one seat per family. The extension blocks a `delegate_task` call that uses the reserved Fable model or fast mode unless the user named it, reasoning above what `pstack_model` returned, or reasoning above high unless the user's latest message is "allow xhigh". Pass each returned target as `delegate_task`'s `target`. `inherit-parent` means omit `target`. `blocked` means the panel cannot reach two model families on this T3, so record its reason.
41
41
 
42
42
  - how explorer: one target
43
43
  - how explainer: one target
@@ -32,6 +32,6 @@ Skip arena Phases C, D, and E. Adversaries find different failures, so the verdi
32
32
 
33
33
  ## Models
34
34
 
35
- Get every target from the `pstack_model` tool. Pass the role name plus the job type and size from the routing table in poteto-mode's Subagents section. This skill's spawns are `review` jobs, size S or M. Write every brief from `<plugin root>/skills/poteto-mode/brief.md`. Without a job, pass the complexity: `groundwork` for cheap mechanical work, `bounded` for involved but bounded work, `general` for work that needs substantial judgment. The tool reads the role's line in the model sheet (`~/.config/pi-t3-bridge/models.md`, written by `/setup-pstack`). A line naming a model is used as written, moved to a provider T3 can run right now when needed. A role with no line, or `inherit-parent` or `auto`, is routed by this extension's `models.json`: the parent's model family, sized and reasoned by complexity, and for panels one seat per family. Pass each returned target as `delegate_task`'s `target`. `inherit-parent` means omit `target`. `blocked` means the panel cannot reach two model families on this T3, so record its reason.
35
+ Get every target from the `pstack_model` tool. Pass the role name plus the job type and size from the routing table in poteto-mode's Subagents section. This skill's spawns are `review` jobs, size S or M. Write every brief from `<plugin root>/skills/poteto-mode/brief.md`: the extension refuses a `delegate_task` call whose brief is missing its sections or limits. Without a job, pass the complexity: `groundwork` for cheap mechanical work, `bounded` for involved but bounded work, `general` for work that needs substantial judgment. The tool reads the role's line in the model sheet (`~/.config/t3-pstack/models.md`, written by `/setup-pstack`). A line naming a model is used as written, moved to a provider T3 can run right now when needed. A role with no line, or `inherit-parent` or `auto`, is routed by this extension's `models.json`: the parent's model family, sized and reasoned by complexity, and for panels one seat per family. The extension blocks a `delegate_task` call that uses the reserved Fable model or fast mode unless the user named it, reasoning above what `pstack_model` returned, or reasoning above high unless the user's latest message is "allow xhigh". Pass each returned target as `delegate_task`'s `target`. `inherit-parent` means omit `target`. `blocked` means the panel cannot reach two model families on this T3, so record its reason.
36
36
 
37
37
  - interrogate reviewers: panel, one seat per model family
@@ -24,7 +24,7 @@ Infer the need from the message and the conversation. A named situation, such as
24
24
 
25
25
  Check the state that changes the answer, and mention it only when it does:
26
26
 
27
- - No model sheet (`~/.config/pi-t3-bridge/models.md`, see `/setup-pstack`) means `/setup-pstack` hasn't run for this user, so every role uses its default model.
27
+ - No model sheet (`~/.config/t3-pstack/models.md`, see `/setup-pstack`) means `/setup-pstack` hasn't run for this user, so every role uses its default model.
28
28
  - No `verify-*` skill or other app harness in the project means agents have no scripted way to drive the app. Mention `/create-verification-skill` when the question is about proving a change works.
29
29
  - No formal verification skill in the project means no property is checked past what tests reach. Mention `/create-formal-verification-skill` when the question is about a race, an invariant, or another case tests rarely hit. When one exists and the code it covers changed after the commit it records as last in sync, mention `/maintain-formal-verification-skill` if the question touches that code.
30
30
 
@@ -94,13 +94,13 @@ Read the leaf skill in full for any principle you apply. Each entry names when i
94
94
 
95
95
  **Brief any subagent you spawn inside a playbook step as a `poteto-agent`** (code-writing delegates, ad-hoc helpers). The chat that receives `/poteto-mode` runs the playbook. Never spawn a `poteto-agent` to run the playbook itself. Routed workflow skills (`how`, `why`, `interrogate`, `reflect`, `swarm`) set their own brief and role for diverse-model review. Respect what the skill prescribes, don't override to `poteto-agent`.
96
96
 
97
- **Do it yourself, or delegate.** Do the work in this chat when any of these holds: you can't write an acceptance command that fails on wrong work (judgment, a design choice, prose for the user, a call only the user can make); the brief would take longer than the work (one file, under about 15 minutes or 50 changed lines); the work needs context from this chat that isn't in a file yet; you are checking a child's result; or a child already failed the same task twice, so the third attempt is yours or a split into smaller tasks. Otherwise delegate, with a complete brief.
97
+ **Do it yourself, or delegate.** Do the work in this chat when any of these holds: you can't write an acceptance command that fails on wrong work (judgment, a design choice, prose for the user, a call only the user can make); the brief would take longer than the work (one file, under about 15 minutes or 50 changed lines); the work needs context from this chat that isn't in a file yet; you are checking a child's result; or a child already failed the same task twice, so the third attempt is yours or a split into smaller tasks. Otherwise delegate, with a brief that passes the extension's guard.
98
98
 
99
- **Every brief follows `<plugin root>/skills/poteto-mode/brief.md`.** It has a header with the job type, size (S or M), time limit and disk limit, then Goal, Acceptance command, Files you may write, Non-goals, Context, Stop conditions and Report. For a complete brief, the child's extension enforces the file list, a write sandbox, the time and disk limits, and red before green, and appends a report block written from commands it ran. Check a result by running its acceptance command, `git status --porcelain` against the file list, and `du -sk` yourself. Never judge a result by rereading the work.
99
+ **Every brief follows `<plugin root>/skills/poteto-mode/brief.md`.** It has a header with the job type, size (S or M), time limit and disk limit, then Goal, Acceptance command, Files you may write, Non-goals, Context, Stop conditions and Report. The extension refuses a brief without them, a size L brief, and a GPT brief without `isolation: "worktree"`, size S, 30 min or less and 500 MB or less. The child's own extension then enforces the file list, a write sandbox, the time and disk limits, and red before green, and appends a report block written from commands it ran. Check a result by running its acceptance command, `git status --porcelain` against the file list, and `du -sk` yourself. Never judge a result by rereading the work.
100
100
 
101
101
  **Defaults for every `delegate_task` call.** `mode: "async"` (a steer or resume of a running child, a `t3_thread_send`, gets no `t3_thread_wait` either, because a waiting call holds your turn while other reports wait), full tool access (a read-only child gets "inspect only, change no file" in its brief), file pointers not inlined context, a `target` from `pstack_model` per job (see [Models](#models)). Code delegates tier by job type and size from the routing table: the hardest changes (cross-cutting design, gnarly concurrency, subtle algorithms) are job `hard`, and trivial mechanical edits are job `mechanical`. Per-role lines in the model sheet that `/setup-pstack` writes override these defaults and the model choices in the routed skills (`how`, `why`, `arena`, `swarm`, `architect`, `interrogate`, `reflect`). A role with no line keeps its default, and a role line of `inherit-parent` or `auto` runs that role on the parent chat model (omit `target`). Each code playbook's configured model comes from its line (`feature, refactoring`, `bug-fix`, `perf-issue`, or `hillclimb`), and the hardest changes read `hardest tasks`. Prose and judgment read `judgment and prose`.
102
102
 
103
- **Match the model to the job.** Before each spawn, call `pstack_model` with the role, the job type and the size. The routing table picks the tier, model and reasoning, routes around accounts that are out of usage, and keeps a panel's families diverse. Verification stays on `swarm workers`. Treat the routing table as a default, and follow the user's model, reasoning, and speed choices when they differ.
103
+ **Match the model to the job.** Before each spawn, call `pstack_model` with the role, the job type and the size. The routing table picks the tier, model and reasoning, routes around accounts that are out of usage, and keeps a panel's families diverse. Verification stays on `swarm workers`. Standard speed applies. The extension blocks fast mode, the reserved Fable model unless the user named it, and any reasoning above what `pstack_model` returned. Reasoning above high runs only when the user's latest message is exactly "allow xhigh" (or "allow max"). Never put that line, or a `/pstack-` command, in a brief or a message to a child.
104
104
 
105
105
  | Job | S | M |
106
106
  |---|---|---|
@@ -176,7 +176,7 @@ A large or cross-cutting effort (a migration across many call sites, an ambitiou
176
176
 
177
177
  ## Models
178
178
 
179
- Get every target from the `pstack_model` tool. Pass the role name, the job type and the size from the routing table under [Subagents](#subagents). Without a job, pass the complexity instead: `groundwork` for cheap mechanical work, `bounded` for involved but bounded work, `general` for work that needs substantial judgment. The tool reads the role's line in the model sheet (`~/.config/pi-t3-bridge/models.md`, written by `/setup-pstack`). A line naming a model is used as written, moved to a provider T3 can run right now when needed. When that line names no reasoning level, the job's complexity sets it, as for routed roles. A role with no line, or `inherit-parent` or `auto`, is routed by this extension's `models.json`: the parent's model family, sized and reasoned by complexity, and for panels one seat per family. Pass each returned target as `delegate_task`'s `target`. `inherit-parent` means omit `target`. `blocked` means the panel cannot reach two model families on this T3, so record its reason.
179
+ Get every target from the `pstack_model` tool. Pass the role name, the job type and the size from the routing table under [Subagents](#subagents). Without a job, pass the complexity instead: `groundwork` for cheap mechanical work, `bounded` for involved but bounded work, `general` for work that needs substantial judgment. The tool reads the role's line in the model sheet (`~/.config/t3-pstack/models.md`, written by `/setup-pstack`). A line naming a model is used as written, moved to a provider T3 can run right now when needed. When that line names no reasoning level, the job's complexity sets it, as for routed roles. A role with no line, or `inherit-parent` or `auto`, is routed by this extension's `models.json`: the parent's model family, sized and reasoned by complexity, and for panels one seat per family. The extension blocks a `delegate_task` call that uses the reserved Fable model or fast mode unless the user named it, reasoning above what `pstack_model` returned, or reasoning above high unless the user's latest message is "allow xhigh". Pass each returned target as `delegate_task`'s `target`. `inherit-parent` means omit `target`. `blocked` means the panel cannot reach two model families on this T3, so record its reason.
180
180
 
181
181
  - feature, refactoring: one target
182
182
  - bug-fix: one target
@@ -1,6 +1,6 @@
1
1
  # Delegation brief
2
2
 
3
- Every `delegate_task` brief follows this template. Use the sections and limits to give the child a bounded task. A persona line ("Read `<plugin root>/agents/<name>.md` in full and act as it says") may come before `# Task:`.
3
+ Every `delegate_task` brief follows this template. The extension refuses a brief that is missing a section, sized L, or over its size's limits, and a GPT brief that breaks the GPT rules. A persona line ("Read `<plugin root>/agents/<name>.md` in full and act as it says") may come before `# Task:`.
4
4
 
5
5
  Fill each `<...>`. Keep the headings exactly as written.
6
6
 
@@ -53,7 +53,7 @@ ISSUES or BLOCKED: one line each with file:line and the command that shows it
53
53
 
54
54
  - For `mechanical`, `implement` and `hard` jobs it must fail before the change. The child's extension runs it first. If it already passes, the child stops with BLOCKED, because the command checks nothing.
55
55
  - It must fail on wrong work, not only on a crash. A script that compares nothing and exits 0 is not an acceptance command. Pass the arguments it needs, and assert on its output when it prints a verdict.
56
- - A read-only job writes no files: list `- none` under "Files you may write". Its acceptance command checks the report exists or reruns the commands under review.
56
+ - A `review` or `check` job writes no files: list `- none` under "Files you may write". Its acceptance command checks the report exists or reruns the commands under review.
57
57
  - Allow the tool caches the command needs. A brief that forbids `~/.cache/uv` stops `uv sync`.
58
58
 
59
59
  ## What the child's extension enforces
@@ -63,8 +63,8 @@ The child's own pstack extension reads this brief from its first message and enf
63
63
  - Every shell command runs in a macOS sandbox that can write only to the workdir, its git directory, the tool caches and the system temp folder.
64
64
  - `write` and `edit` only touch the listed files and `.scratch/`.
65
65
  - Shell timeouts stop at the time limit. After it, or past the disk limit, every tool is refused and the child can only report.
66
- - When the child ends its turn, the extension reruns the acceptance command, `git status` and `du`, and appends a "Checked by pi-t3-bridge" block with the real exit codes and STATUS. It also writes a ledger line to `~/.local/state/pi-t3/ledger.jsonl`.
66
+ - When the child ends its turn, the extension reruns the acceptance command, `git status` and `du`, and appends a "Checked by t3-pstack" block with the real exit codes and STATUS. It also writes a ledger line to `~/.local/state/t3-pstack/ledger.jsonl`.
67
67
 
68
68
  ## GPT rules
69
69
 
70
- For GPT work, prefer size S, a worktree for writing tasks, and async mode. Follow the user's instructions when they differ.
70
+ GPT models (Astra, Sol, Luna) drift on long or open work and leave files behind. A GPT brief must be size S, 30 min or less, 500 MB or less, with repo-relative paths, and the call must set `isolation: "worktree"` and keep `mode: "async"`.
@@ -9,7 +9,7 @@ A verdict covers one patch and green CI covers one head. Step 4 runs a full swar
9
9
 
10
10
  Open the PR early so CI and bots run alongside the work. The code is ready only after the slop-strip (the **deslop** skill, `/deslop`) and the `/no-comments` pass, so the full swarm runs on finished code. Then rebase onto current trunk and report the code-ready head before self-proof, so verification runs on the base the patch lands on. Report every later head, and merge-ready once self-proof, CI, and babysit are done. Fix rounds stay on that base unless trunk conflicts, breaks CI, or lands a known concurrent change to the same files, because each rebase restarts CI. Run the repo's checks for the touched paths on the committed head before the code-ready push and before a later push that needs a verifier.
11
11
 
12
- Assume the owner's session dies. Soon after starting, push and start a decision trail in the root's store, `${XDG_STATE_HOME:-~/.local/state}/pi-t3-bridge/` (T3 names no agent store), per the **show-me-your-work** skill, then push each finished unit before you start the next. Whoever spawns a subagent records its id, state, and a stuck-after runtime from past runs of its kind in that store, so the root can probe it if the parent dies. Force-push only your own branch, with `--force-with-lease` pinned to the SHA you last pushed or took over, and on any push you did not make, stop and report to the root.
12
+ Assume the owner's session dies. Soon after starting, push and start a decision trail in the root's store, `${XDG_STATE_HOME:-~/.local/state}/t3-pstack/` (T3 names no agent store), per the **show-me-your-work** skill, then push each finished unit before you start the next. Whoever spawns a subagent records its id, state, and a stuck-after runtime from past runs of its kind in that store, so the root can probe it if the parent dies. Force-push only your own branch, with `--force-with-lease` pinned to the SHA you last pushed or took over, and on any push you did not make, stop and report to the root.
13
13
  3. **Run owners in parallel off trunk, never stacked,** so each PR lands on its own.
14
14
  4. **Swarm-verify once.** A full swarm runs once, at the code-ready head. Another full swarm runs only for new behavior, a redesign, or a large new diff. A rebase, a merge-conflict resolution, or a minor fix gets a single verifier at the new head, and a wording-only change gets none. Fan out independent verifiers at the code-ready SHA per the **swarm** skill, as `delegate_task` children assigned round-robin over the `interrogate reviewers` entries, so the lanes span model families. They re-run the gates, prove the load-bearing behavior live on the real surface through its control skill (see poteto-mode's Non-negotiables) or a named driver, and audit the diff. The verdict is not clean without the live lane, or before you audit the merge-ready report's receipts, because no lane trusts a claim it has not checked.
15
15
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  **You run the program, never the code. Decide which agent does each piece of work, then check what each one produces.** For a standing project handed to one coordinator chat: multi-day, many stacked PRs, dozens to hundreds of subagents, few human turns. One task driven to a predicate is Autonomous run. One ambitious run that needs a bespoke workflow is figure-it-out. Work that one agent could finish inside the session's budget is not a program.
4
4
 
5
- Run it with your own tools. Spawn workers with `delegate_task`. Keep the program's state in `${XDG_STATE_HOME:-~/.local/state}/pi-t3-bridge/orchestrate/<project-slug>/`, with the tracker in its `notes.md`. Watch each PR with `watch_pull_request` when this thread has it. It wakes this thread on failed checks, passed required checks, new comments or reviews, and conflicts. Call no scripts, run no polling loops, and never relay messages or status between agents.
5
+ Run it with your own tools. Spawn workers with `delegate_task`. Keep the program's state in `${XDG_STATE_HOME:-~/.local/state}/t3-pstack/orchestrate/<project-slug>/`, with the tracker in its `notes.md`. Watch each PR with `watch_pull_request` when this thread has it. It wakes this thread on failed checks, passed required checks, new comments or reviews, and conflicts. Call no scripts, run no polling loops, and never relay messages or status between agents.
6
6
 
7
7
  #### Topology
8
8
 
@@ -80,7 +80,7 @@ Short list, no preamble:
80
80
 
81
81
  ## Models
82
82
 
83
- Get every target from the `pstack_model` tool. Pass the role name plus the job type and size from the routing table in poteto-mode's Subagents section. This skill's spawns are `research` jobs for tooling and `review` jobs for judgment. Write every brief from `<plugin root>/skills/poteto-mode/brief.md`. Without a job, pass the complexity: `groundwork` for cheap mechanical work, `bounded` for involved but bounded work, `general` for work that needs substantial judgment. The tool reads the role's line in the model sheet (`~/.config/pi-t3-bridge/models.md`, written by `/setup-pstack`). A line naming a model is used as written, moved to a provider T3 can run right now when needed. A role with no line, or `inherit-parent` or `auto`, is routed by this extension's `models.json`: the parent's model family, sized and reasoned by complexity, and for panels one seat per family. Pass each returned target as `delegate_task`'s `target`. `inherit-parent` means omit `target`. `blocked` means the panel cannot reach two model families on this T3, so record its reason.
83
+ Get every target from the `pstack_model` tool. Pass the role name plus the job type and size from the routing table in poteto-mode's Subagents section. This skill's spawns are `research` jobs for tooling and `review` jobs for judgment. Write every brief from `<plugin root>/skills/poteto-mode/brief.md`: the extension refuses a `delegate_task` call whose brief is missing its sections or limits. Without a job, pass the complexity: `groundwork` for cheap mechanical work, `bounded` for involved but bounded work, `general` for work that needs substantial judgment. The tool reads the role's line in the model sheet (`~/.config/t3-pstack/models.md`, written by `/setup-pstack`). A line naming a model is used as written, moved to a provider T3 can run right now when needed. A role with no line, or `inherit-parent` or `auto`, is routed by this extension's `models.json`: the parent's model family, sized and reasoned by complexity, and for panels one seat per family. The extension blocks a `delegate_task` call that uses the reserved Fable model or fast mode unless the user named it, reasoning above what `pstack_model` returned, or reasoning above high unless the user's latest message is "allow xhigh". Pass each returned target as `delegate_task`'s `target`. `inherit-parent` means omit `target`. `blocked` means the panel cannot reach two model families on this T3, so record its reason.
84
84
 
85
85
  - reflect tooling: one target
86
86
  - reflect judgment, divergent, synthesizer: one target
@@ -5,7 +5,7 @@ description: Configure which T3 provider and model pstack uses per role and at w
5
5
 
6
6
  # Setup pstack
7
7
 
8
- Write the model sheet, `~/.config/pi-t3-bridge/models.md` (`$XDG_CONFIG_HOME/pi-t3-bridge/models.md` when that is set), one per machine. It sets pstack's T3 provider and model per role, and every pstack skill reads it before it dispatches.
8
+ Write the model sheet, `~/.config/t3-pstack/models.md` (`$XDG_CONFIG_HOME/t3-pstack/models.md` when that is set), one per machine. It sets pstack's T3 provider and model per role, and every pstack skill reads it before it dispatches.
9
9
 
10
10
  ## Steps
11
11
 
@@ -26,11 +26,11 @@ The default role-to-target mapping is the sheet shape in step 5 below. If the sh
26
26
  - `medium - high reasoning`
27
27
  - `small - medium reasoning`
28
28
 
29
- **(b) Apply it.** Build the working table from the defaults, and on a re-run keep any role you changed by provider, list, or alias (`inherit-parent`, `auto`). `unlimited`, `large`, and `small` set the reasoning option of every entry, panel entries included, to `max`, `xhigh`, or `medium`. `medium` writes no reasoning option, so `pstack_model` sets `low`, `medium`, or `high` from each job's complexity. Use the option ID that provider lists. If the provider does not offer that value, use its highest value at or below the target, else mark the role as needing a choice. So Grok, whose reasoning tops out at `xhigh`, stays at `xhigh` under `unlimited`. `inherit-parent` and `auto` do not change.
29
+ **(b) Apply it.** Build the working table from the defaults, and on a re-run keep any role you changed by provider, list, or alias (`inherit-parent`, `auto`). `unlimited`, `large`, and `small` set the reasoning option of every entry, panel entries included, to `max`, `xhigh`, or `medium`. `medium` writes no reasoning option, so `pstack_model` sets `low`, `medium`, or `high` from each job's complexity. Use the option ID that provider lists. If the provider does not offer that value, use its highest value at or below the target, else mark the role as needing a choice. So Grok, whose reasoning tops out at `xhigh`, stays at `xhigh` under `unlimited`. `inherit-parent` and `auto` do not change. Say when you offer `unlimited` or `large` that a sheet's `xhigh` or `max` still runs only when the user's latest message in that chat is "allow xhigh" (or "allow max"). Otherwise `delegate_task` refuses it, so those budgets mostly fall back to asking.
30
30
 
31
31
  **(c) Show the roles and confirm.** Show every role with its entry, marking any target not in the detected set as needing a choice. Also list each line step 2 dropped. Ask whether to accept as-is or change specific roles, offering the detected targets plus `inherit-parent` and `auto` (both mean: this role runs on the parent chat's model) as the options. For panel roles (`arena runners`, `architect runners`, `interrogate reviewers`) the value is a list, and one subagent runs per entry, alias entries included, so the list length sets the count. A panel needs at least two model families among its targets. A model's family is the first segment of its ID's last `/` part, such as `claude`, `gpt`, or `grok`. `arena cross-judge pool` is also a list, but Arena runs one judge. It tries only values from a family other than the parent's. Among those it tries first the ones whose model ran fewer candidates, and list order decides among values that ran as many, so order it by preference. An `inherit-parent` or `auto` value never judges. `swarm workers` is the default target for every worker unless a race or comparison assigns another per arm.
32
32
 
33
- **(d) Ask about the session-start hook.** Ask whether pi-t3-bridge's session-start hook should keep telling new chats when to enter `/poteto-mode`. Write `session hook: on` or `session hook: off`.
33
+ **(d) Ask about the session-start hook.** Ask whether t3-pstack's session-start hook should keep telling new chats when to enter `/poteto-mode`. Write `session hook: on` or `session hook: off`.
34
34
 
35
35
  ### 4. Validate
36
36
 
@@ -212,7 +212,7 @@ async function findTlc(cwd: string) {
212
212
  };
213
213
  }
214
214
 
215
- const exitClass = (status: number | null) =>
215
+ const exitClass = (status: number | null): CheckResult["exit"] =>
216
216
  status === 0 ? 0 : status === 11 || status === 12 || status === 13 ? 1 : 2;
217
217
 
218
218
  const tail = (r: FileResult) => {
@@ -42,6 +42,6 @@ Return one consolidated in-chat report with a result table, issue one-liners, ga
42
42
 
43
43
  ## Models
44
44
 
45
- Get every target from the `pstack_model` tool. Pass the role name plus the job type and size from the routing table in poteto-mode's Subagents section. This skill's spawns are `check` jobs for verification workers and `implement` or `mechanical` jobs for build workers. Write every brief from `<plugin root>/skills/poteto-mode/brief.md`. Without a job, pass the complexity: `groundwork` for cheap mechanical work, `bounded` for involved but bounded work, `general` for work that needs substantial judgment. The tool reads the role's line in the model sheet (`~/.config/pi-t3-bridge/models.md`, written by `/setup-pstack`). A line naming a model is used as written, moved to a provider T3 can run right now when needed. A role with no line, or `inherit-parent` or `auto`, is routed by this extension's `models.json`: the parent's model family, sized and reasoned by complexity, and for panels one seat per family. Pass each returned target as `delegate_task`'s `target`. `inherit-parent` means omit `target`. `blocked` means the panel cannot reach two model families on this T3, so record its reason.
45
+ Get every target from the `pstack_model` tool. Pass the role name plus the job type and size from the routing table in poteto-mode's Subagents section. This skill's spawns are `check` jobs for verification workers and `implement` or `mechanical` jobs for build workers. Write every brief from `<plugin root>/skills/poteto-mode/brief.md`: the extension refuses a `delegate_task` call whose brief is missing its sections or limits. Without a job, pass the complexity: `groundwork` for cheap mechanical work, `bounded` for involved but bounded work, `general` for work that needs substantial judgment. The tool reads the role's line in the model sheet (`~/.config/t3-pstack/models.md`, written by `/setup-pstack`). A line naming a model is used as written, moved to a provider T3 can run right now when needed. A role with no line, or `inherit-parent` or `auto`, is routed by this extension's `models.json`: the parent's model family, sized and reasoned by complexity, and for panels one seat per family. The extension blocks a `delegate_task` call that uses the reserved Fable model or fast mode unless the user named it, reasoning above what `pstack_model` returned, or reasoning above high unless the user's latest message is "allow xhigh". Pass each returned target as `delegate_task`'s `target`. `inherit-parent` means omit `target`. `blocked` means the panel cannot reach two model families on this T3, so record its reason.
46
46
 
47
47
  - swarm workers: one target
@@ -99,7 +99,7 @@ After Sources Consulted, if the user's `why` question is a precursor to changing
99
99
 
100
100
  ## Models
101
101
 
102
- Get every target from the `pstack_model` tool. Pass the role name plus the job type and size from the routing table in poteto-mode's Subagents section. This skill's spawns are `research` jobs for investigators and `hard` jobs for the synthesizer. Write every brief from `<plugin root>/skills/poteto-mode/brief.md`. Without a job, pass the complexity: `groundwork` for cheap mechanical work, `bounded` for involved but bounded work, `general` for work that needs substantial judgment. The tool reads the role's line in the model sheet (`~/.config/pi-t3-bridge/models.md`, written by `/setup-pstack`). A line naming a model is used as written, moved to a provider T3 can run right now when needed. A role with no line, or `inherit-parent` or `auto`, is routed by this extension's `models.json`: the parent's model family, sized and reasoned by complexity, and for panels one seat per family. Pass each returned target as `delegate_task`'s `target`. `inherit-parent` means omit `target`. `blocked` means the panel cannot reach two model families on this T3, so record its reason.
102
+ Get every target from the `pstack_model` tool. Pass the role name plus the job type and size from the routing table in poteto-mode's Subagents section. This skill's spawns are `research` jobs for investigators and `hard` jobs for the synthesizer. Write every brief from `<plugin root>/skills/poteto-mode/brief.md`: the extension refuses a `delegate_task` call whose brief is missing its sections or limits. Without a job, pass the complexity: `groundwork` for cheap mechanical work, `bounded` for involved but bounded work, `general` for work that needs substantial judgment. The tool reads the role's line in the model sheet (`~/.config/t3-pstack/models.md`, written by `/setup-pstack`). A line naming a model is used as written, moved to a provider T3 can run right now when needed. A role with no line, or `inherit-parent` or `auto`, is routed by this extension's `models.json`: the parent's model family, sized and reasoned by complexity, and for panels one seat per family. The extension blocks a `delegate_task` call that uses the reserved Fable model or fast mode unless the user named it, reasoning above what `pstack_model` returned, or reasoning above high unless the user's latest message is "allow xhigh". Pass each returned target as `delegate_task`'s `target`. `inherit-parent` means omit `target`. `blocked` means the panel cannot reach two model families on this T3, so record its reason.
103
103
 
104
104
  - why investigators: one target
105
105
  - why synthesizer: one target
@@ -1,10 +1,10 @@
1
- import { Type } from "@earendil-works/pi-ai";
2
- import type { Static } from "@earendil-works/pi-ai";
3
1
  import type {
4
2
  ExtensionAPI,
5
3
  ExtensionContext,
6
4
  ExtensionToolContext,
7
5
  } from "@earendil-works/pi-coding-agent";
6
+ import { Type } from "typebox";
7
+ import type { Static } from "typebox";
8
8
  import { Value } from "typebox/value";
9
9
 
10
10
  import { classifyFailure } from "./failures.ts";
package/src/bridge/ask.ts CHANGED
@@ -1,11 +1,11 @@
1
- import { Type } from "@earendil-works/pi-ai";
2
- import type { Static } from "@earendil-works/pi-ai";
3
1
  import { defineTool } from "@earendil-works/pi-coding-agent";
4
2
  import type {
5
3
  ExtensionAPI,
6
4
  ExtensionUIContext,
7
5
  ExtensionUIDialogOptions,
8
6
  } from "@earendil-works/pi-coding-agent";
7
+ import { Type } from "typebox";
8
+ import type { Static } from "typebox";
9
9
  import { Value } from "typebox/value";
10
10
 
11
11
  import { registerUnlessTaken } from "./claim.ts";
@@ -1,5 +1,5 @@
1
- import { Type } from "@earendil-works/pi-ai";
2
1
  import type { ExtensionAPI } from "@earendil-works/pi-coding-agent";
2
+ import { Type } from "typebox";
3
3
  import { Value } from "typebox/value";
4
4
 
5
5
  import { readConfig } from "./config.ts";
@@ -2,9 +2,9 @@ import { readFileSync } from "node:fs";
2
2
  import { homedir } from "node:os";
3
3
  import path from "node:path";
4
4
 
5
- import { Type } from "@earendil-works/pi-ai";
6
- import type { Static, TSchema } from "@earendil-works/pi-ai";
7
5
  import type { ExtensionAPI } from "@earendil-works/pi-coding-agent";
6
+ import { Type } from "typebox";
7
+ import type { Static, TSchema } from "typebox";
8
8
  import { Value } from "typebox/value";
9
9
 
10
10
  // The bridge's settings, one JSON file per machine. Each key is checked on its
@@ -1,9 +1,9 @@
1
- import { Type } from "@earendil-works/pi-ai";
2
1
  import { defineTool } from "@earendil-works/pi-coding-agent";
3
2
  import type {
4
3
  ExtensionAPI,
5
4
  ExtensionContext,
6
5
  } from "@earendil-works/pi-coding-agent";
6
+ import { Type } from "typebox";
7
7
 
8
8
  import {
9
9
  escapeHtml,
@@ -1,9 +1,9 @@
1
- import { Type } from "@earendil-works/pi-ai";
2
- import type { Static } from "@earendil-works/pi-ai";
3
1
  import type {
4
2
  ExtensionAPI,
5
3
  ExtensionContext,
6
4
  } from "@earendil-works/pi-coding-agent";
5
+ import { Type } from "typebox";
6
+ import type { Static } from "typebox";
7
7
  import { Value } from "typebox/value";
8
8
 
9
9
  import type { Classified } from "./failures.ts";
@@ -9,8 +9,8 @@ import {
9
9
  import { homedir } from "node:os";
10
10
  import path from "node:path";
11
11
 
12
- import { Type } from "@earendil-works/pi-ai";
13
- import type { Static } from "@earendil-works/pi-ai";
12
+ import { Type } from "typebox";
13
+ import type { Static } from "typebox";
14
14
  import { Value } from "typebox/value";
15
15
 
16
16
  // Machine-wide bridge state, shared by every Pi session: which model families
@@ -1,14 +1,14 @@
1
1
  import { readFileSync } from "node:fs";
2
2
  import path from "node:path";
3
3
 
4
- import { Type } from "@earendil-works/pi-ai";
5
4
  import type {
6
5
  ClassifierBoolQuestion,
7
6
  ClassifierContext,
8
7
  JsonObject,
9
- Static,
10
8
  } from "@earendil-works/pi-ai";
11
9
  import type { ExtensionContext } from "@earendil-works/pi-coding-agent";
10
+ import { Type } from "typebox";
11
+ import type { Static } from "typebox";
12
12
  import { Value } from "typebox/value";
13
13
 
14
14
  import type { MastExcerpt, StopInput } from "./steer-transcript.ts";
@@ -1,5 +1,5 @@
1
- import { Type } from "@earendil-works/pi-ai";
2
1
  import type { SessionEntry } from "@earendil-works/pi-coding-agent";
2
+ import { Type } from "typebox";
3
3
  import { Value } from "typebox/value";
4
4
 
5
5
  // Turns the session branch into the text the stop judge reads. The rendering
@@ -1,5 +1,4 @@
1
1
  import type { AssistantMessage } from "@earendil-works/pi-ai";
2
- import { Type } from "@earendil-works/pi-ai";
3
2
  import type {
4
3
  AgentBeforeSettleEvent,
5
4
  BoundaryResult,
@@ -7,6 +6,7 @@ import type {
7
6
  ExtensionContext,
8
7
  SessionEntry,
9
8
  } from "@earendil-works/pi-coding-agent";
9
+ import { Type } from "typebox";
10
10
  import { Value } from "typebox/value";
11
11
 
12
12
  import { TERMINAL_STATUSES } from "./accounts.ts";
@@ -1,5 +1,5 @@
1
- import { Type } from "@earendil-works/pi-ai";
2
- import type { Static, TSchema } from "@earendil-works/pi-ai";
1
+ import { Type } from "typebox";
2
+ import type { Static, TSchema } from "typebox";
3
3
  import { Value } from "typebox/value";
4
4
 
5
5
  const ResultEnvelopeSchema = Type.Object({
@@ -1,6 +1,6 @@
1
- import { Type } from "@earendil-works/pi-ai";
2
- import type { Static } from "@earendil-works/pi-ai";
3
1
  import { defineTool } from "@earendil-works/pi-coding-agent";
2
+ import { Type } from "typebox";
3
+ import type { Static } from "typebox";
4
4
 
5
5
  import {
6
6
  escapeHtml,
@@ -1,4 +1,4 @@
1
- import { Type } from "@earendil-works/pi-ai";
1
+ import { Type } from "typebox";
2
2
  import { Value } from "typebox/value";
3
3
 
4
4
  import { callT3Tool, insideT3 } from "./t3-http.ts";
@@ -1,10 +1,10 @@
1
- import { Type } from "@earendil-works/pi-ai";
2
- import type { Static } from "@earendil-works/pi-ai";
3
1
  import { defineTool } from "@earendil-works/pi-coding-agent";
4
2
  import type {
5
3
  ExtensionAPI,
6
4
  ExtensionContext,
7
5
  } from "@earendil-works/pi-coding-agent";
6
+ import { Type } from "typebox";
7
+ import type { Static } from "typebox";
8
8
 
9
9
  import { registerUnlessTaken } from "./claim.ts";
10
10
 
@@ -1,5 +1,5 @@
1
- import { Type } from "@earendil-works/pi-ai";
2
1
  import type { ExtensionContext } from "@earendil-works/pi-coding-agent";
2
+ import { Type } from "typebox";
3
3
  import { Value } from "typebox/value";
4
4
 
5
5
  // The child's extension reads its limits from the delegation brief
@@ -4,11 +4,11 @@ import { homedir } from "node:os";
4
4
  import path from "node:path";
5
5
  import { promisify } from "node:util";
6
6
 
7
- import { Type } from "@earendil-works/pi-ai";
8
7
  import type {
9
8
  ExtensionAPI,
10
9
  ExtensionContext,
11
10
  } from "@earendil-works/pi-coding-agent";
11
+ import { Type } from "typebox";
12
12
  import { Value } from "typebox/value";
13
13
 
14
14
  import { bashTimeoutSeconds } from "../bridge/bash-timeout.ts";