@turri-dev/cli 0.2.3-next.fea0bd9 → 0.2.4-next.009bd0c

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 (176) hide show
  1. package/README.md +57 -62
  2. package/dist/bedrock-region.js +3 -3
  3. package/dist/chat-idle.d.ts +2 -2
  4. package/dist/chat-idle.js +2 -2
  5. package/dist/chat-models.d.ts +1 -1
  6. package/dist/chat-models.js +1 -1
  7. package/dist/chat-scope.d.ts +1 -3
  8. package/dist/chat-skills.d.ts +1 -1
  9. package/dist/chat-skills.js +1 -1
  10. package/dist/chats.d.ts +44 -20
  11. package/dist/chats.js +125 -64
  12. package/dist/cli.js +42 -31
  13. package/dist/config-edit.d.ts +20 -8
  14. package/dist/config-edit.js +32 -26
  15. package/dist/config.d.ts +106 -78
  16. package/dist/config.js +267 -133
  17. package/dist/conform-cli.js +14 -3
  18. package/dist/conformance-switch.d.ts +13 -22
  19. package/dist/conformance-switch.js +37 -59
  20. package/dist/drift-cli.js +1 -1
  21. package/dist/extension.d.ts +31 -12
  22. package/dist/extension.js +555 -556
  23. package/dist/genome.js +10 -49
  24. package/dist/graph.js +3 -5
  25. package/dist/host-session.d.ts +11 -21
  26. package/dist/host-session.js +6 -8
  27. package/dist/host.d.ts +4 -4
  28. package/dist/host.js +4 -7
  29. package/dist/identity.js +2 -3
  30. package/dist/init-config.d.ts +1 -2
  31. package/dist/init-config.js +10 -17
  32. package/dist/installed-providers.d.ts +1 -1
  33. package/dist/installed-providers.js +2 -2
  34. package/dist/launch-agent.d.ts +41 -0
  35. package/dist/launch-agent.js +219 -0
  36. package/dist/{release-cli.js → launch-cli.js} +41 -24
  37. package/dist/launch-session.d.ts +58 -0
  38. package/dist/launch-session.js +195 -0
  39. package/dist/launch-tools.d.ts +28 -0
  40. package/dist/launch-tools.js +69 -0
  41. package/dist/launch-track.d.ts +120 -0
  42. package/dist/launch-track.js +298 -0
  43. package/dist/loop-cli.d.ts +4 -3
  44. package/dist/loop-cli.js +17 -15
  45. package/dist/loop-tools.d.ts +45 -21
  46. package/dist/loop-tools.js +155 -90
  47. package/dist/new-project.js +2 -2
  48. package/dist/notice.d.ts +7 -6
  49. package/dist/parse-cli.js +2 -2
  50. package/dist/pi-launch.js +4 -1
  51. package/dist/pi-settings.d.ts +4 -0
  52. package/dist/pi-settings.js +39 -0
  53. package/dist/pi.js +12 -9
  54. package/dist/plain/check.d.ts +2 -9
  55. package/dist/plain/check.js +6 -39
  56. package/dist/plain-files.d.ts +2 -2
  57. package/dist/plain-files.js +7 -7
  58. package/dist/regenerate/activity.d.ts +0 -7
  59. package/dist/regenerate/activity.js +2 -20
  60. package/dist/regenerate/agent-env.d.ts +1 -1
  61. package/dist/regenerate/agent-env.js +3 -3
  62. package/dist/regenerate/agent-shell.js +5 -3
  63. package/dist/regenerate/audit.js +9 -0
  64. package/dist/regenerate/base-folder.d.ts +2 -2
  65. package/dist/regenerate/base-folder.js +1 -1
  66. package/dist/regenerate/cases.js +7 -0
  67. package/dist/regenerate/chunk-plan.d.ts +5 -0
  68. package/dist/regenerate/chunk-plan.js +16 -1
  69. package/dist/regenerate/command-check.d.ts +1 -1
  70. package/dist/regenerate/command-check.js +1 -1
  71. package/dist/regenerate/delivery.d.ts +1 -1
  72. package/dist/regenerate/delivery.js +3 -3
  73. package/dist/regenerate/drift.d.ts +4 -0
  74. package/dist/regenerate/drift.js +26 -6
  75. package/dist/regenerate/failure-reports.d.ts +28 -0
  76. package/dist/regenerate/failure-reports.js +79 -0
  77. package/dist/regenerate/job-panel.js +3 -1
  78. package/dist/regenerate/jobs-tree.js +1 -1
  79. package/dist/regenerate/jobs.d.ts +4 -2
  80. package/dist/regenerate/jobs.js +14 -10
  81. package/dist/regenerate/launch.d.ts +126 -0
  82. package/dist/regenerate/{release.js → launch.js} +60 -48
  83. package/dist/regenerate/ledger-view.d.ts +11 -24
  84. package/dist/regenerate/ledger-view.js +14 -60
  85. package/dist/regenerate/ledger.d.ts +26 -16
  86. package/dist/regenerate/ledger.js +1 -1
  87. package/dist/regenerate/lineage.d.ts +2 -0
  88. package/dist/regenerate/lineage.js +8 -0
  89. package/dist/regenerate/loop.d.ts +57 -65
  90. package/dist/regenerate/loop.js +354 -171
  91. package/dist/regenerate/model-names.d.ts +33 -0
  92. package/dist/regenerate/{engine.js → model-names.js} +2 -28
  93. package/dist/regenerate/paths.d.ts +3 -3
  94. package/dist/regenerate/paths.js +4 -4
  95. package/dist/regenerate/records.d.ts +11 -0
  96. package/dist/regenerate/records.js +15 -0
  97. package/dist/regenerate/regenerate.d.ts +0 -2
  98. package/dist/regenerate/regenerate.js +4 -15
  99. package/dist/regenerate/renames.js +4 -4
  100. package/dist/regenerate/requires.d.ts +7 -0
  101. package/dist/regenerate/requires.js +24 -18
  102. package/dist/regenerate/scripts-being-written.d.ts +4 -4
  103. package/dist/regenerate/scripts-being-written.js +3 -3
  104. package/dist/regenerate/spec-map.js +3 -3
  105. package/dist/regenerate/standing.js +1 -1
  106. package/dist/regenerate/submit-work.d.ts +2 -0
  107. package/dist/regenerate/submit-work.js +8 -3
  108. package/dist/regenerate/test-scripts.d.ts +2 -1
  109. package/dist/regenerate/test-scripts.js +33 -23
  110. package/dist/regenerate/testing-steps.d.ts +16 -5
  111. package/dist/regenerate/testing-steps.js +28 -9
  112. package/dist/regenerate-cli.js +18 -9
  113. package/dist/self-invocation.d.ts +11 -0
  114. package/dist/self-invocation.js +37 -11
  115. package/dist/sentinel-check.d.ts +3 -3
  116. package/dist/sentinel-check.js +3 -3
  117. package/dist/sentinel.d.ts +17 -12
  118. package/dist/sentinel.js +75 -46
  119. package/dist/{config-command.d.ts → settings.d.ts} +13 -8
  120. package/dist/{config-command.js → settings.js} +155 -24
  121. package/dist/setup.d.ts +2 -2
  122. package/dist/setup.js +7 -7
  123. package/dist/skill.d.ts +0 -11
  124. package/dist/skill.js +0 -9
  125. package/dist/tools.js +2 -3
  126. package/dist/turri-versions.js +2 -1
  127. package/docs/README.md +4 -6
  128. package/docs/authoring-plain.md +3 -3
  129. package/docs/chats.md +6 -9
  130. package/docs/claude-subscription.md +8 -8
  131. package/docs/config.md +62 -52
  132. package/docs/development.md +4 -5
  133. package/docs/headless.md +7 -6
  134. package/docs/hosting.md +25 -24
  135. package/docs/installation.md +4 -0
  136. package/docs/launch.md +63 -0
  137. package/docs/parser.md +3 -3
  138. package/docs/regenerating.md +30 -22
  139. package/docs/sandbox.md +3 -3
  140. package/docs/sentinel.md +27 -16
  141. package/docs/skills-and-gates.md +6 -11
  142. package/docs/using.md +26 -42
  143. package/genome/rules/project-model.md +2 -1
  144. package/genome/rules/test-plain-files.md +15 -7
  145. package/genome/rules/turri-regeneration.md +7 -10
  146. package/genome/skills/convert-old-syntax/SKILL.md +5 -5
  147. package/genome/skills/implement-conformance-testing-script/SKILL.md +2 -2
  148. package/genome/skills/implement-unit-testing-script/SKILL.md +3 -3
  149. package/package.json +1 -1
  150. package/dist/advisor-chat.d.ts +0 -63
  151. package/dist/advisor-chat.js +0 -290
  152. package/dist/change-plain-cli.js +0 -55
  153. package/dist/ledger-cli.d.ts +0 -1
  154. package/dist/ledger-cli.js +0 -50
  155. package/dist/ledger-tools.d.ts +0 -10
  156. package/dist/ledger-tools.js +0 -64
  157. package/dist/regenerate/advisor-records.d.ts +0 -93
  158. package/dist/regenerate/advisor-records.js +0 -110
  159. package/dist/regenerate/advisor-runs.d.ts +0 -87
  160. package/dist/regenerate/advisor-runs.js +0 -327
  161. package/dist/regenerate/engine.d.ts +0 -52
  162. package/dist/regenerate/release.d.ts +0 -121
  163. package/dist/regenerate/test-advisor.d.ts +0 -101
  164. package/dist/regenerate/test-advisor.js +0 -379
  165. package/dist/release-agent.d.ts +0 -43
  166. package/dist/release-agent.js +0 -130
  167. package/dist/release-cli.d.ts +0 -1
  168. package/dist/release-tools.d.ts +0 -44
  169. package/dist/release-tools.js +0 -170
  170. package/dist/spec-tools.d.ts +0 -36
  171. package/dist/spec-tools.js +0 -128
  172. package/dist/stacks.d.ts +0 -13
  173. package/dist/stacks.js +0 -96
  174. package/docs/deploy.md +0 -48
  175. package/docs/test-advisor.md +0 -110
  176. /package/dist/{change-plain-cli.d.ts → launch-cli.d.ts} +0 -0
package/README.md CHANGED
@@ -7,7 +7,9 @@
7
7
  <a href="https://discord.com/invite/REJzFmVQfC"><img src="https://img.shields.io/badge/Discord-join%20the%20community-5865F2?logo=discord&logoColor=white" alt="Join the turri Discord"></a>
8
8
  </p>
9
9
 
10
- **turri** builds regenerative software: what lasts is the system's intent, and the code is derived from it - cheap to throw away and build again. You tell **turri** what the system should do; **turri** writes that down as durable intent, with the tests that say when it is met, and builds the code from it. From then on the durable intent is the source of truth: as it changes, the code is regenerated from it rather than patched in place, and never left to drift from it.
10
+ **turri** is the first coding agent with the power of [regenerative software](https://chadfowler.com/regenerative-software/). It gives you back control over engineering while the agent handles the coding. Instead of maintaining code, you maintain the system's definition (specs, tests, and ADRs) structured using [\*\*\*plain](https://plainlang.org/). You describe what you want, **turri** captures it as a durable, reviewable system definition, and generates the code from it. As your intent evolves, **turri** regenerates the affected code rather than patching it prompt after prompt. The system definition remains the source of truth, and tests verify that the generated code conforms to it.
11
+
12
+ Code is disposable, system definition is durable.
11
13
 
12
14
  **turri** is named after *Turritopsis dohrnii*, the immortal jellyfish that regenerates itself from its young form, again and again - as **turri** regenerates the code from the durable intent - see [the name](#the-name).
13
15
 
@@ -15,53 +17,53 @@
15
17
 
16
18
  ## Quick start
17
19
 
18
- **turri** is built on [pi](https://pi.dev), the coding agent, and runs wherever [pi](https://pi.dev) runs: macOS, Linux, WSL; native Windows best effort, with Git Bash. You need git, bash and [Node](https://nodejs.org/en/download) 22.19 or newer - a Linux distribution's own `nodejs` package is often older. The agents use this machine's toolchains, fenced by a command check and an audit everywhere, and an OS sandbox where the OS has one - Seatbelt on macOS, bubblewrap on Linux (`apt install bubblewrap`) - see [installation](docs/installation.md#installation).
20
+ **turri** is built on [pi](https://pi.dev/) and runs on macOS, Linux, and WSL (native Windows via Git Bash is best effort). You'll need Git, Bash, and Node.js 22.19+.
21
+
22
+ ### Install
19
23
 
20
24
  ```bash
21
- npm install -g @turri-dev/cli # puts `turri` on your PATH
22
- turri --version # the version you installed? if not, see docs/installation.md#an-older-turri-runs
23
- turri doctor # checks the machine
25
+ npm install -g @turri-dev/cli
26
+ turri doctor
24
27
  ```
25
28
 
26
- To follow `main` as it moves, or work on turri itself, run it [from a clone](#from-a-clone) instead.
29
+ `turri doctor` checks your environment and tells you how to fix any missing dependencies. See the [installation guide](docs/installation.md) for details.
27
30
 
28
- `doctor` checks for Node 22.19+, bash, the OS sandbox and a model provider for [pi](https://pi.dev); in a project, the toolchains its modules need, what its testing scripts run against this machine, and that each model `config.turri.yaml` names answers with your credentials. It changes nothing without asking: when a check fails - the OS sandbox does not start, say - it says why, and the command for you to run. Run it again whenever something breaks. What each check means: [installation](docs/installation.md).
31
+ ### Configure your models
29
32
 
30
- Then start it in your project, signed in to your model providers:
33
+ **turri** uses a capable model to define the system and plan the work, and a smaller, cheaper model to write the code. It supports any model provider available through [pi](https://pi.dev/), and some subscriptions too.
31
34
 
32
35
  ```bash
33
- cd ~/my-project
34
- turri init-config # asks which vendor you use: Anthropic, OpenAI, Google, Amazon Bedrock, a Claude subscription, or other
35
- export ANTHROPIC_API_KEY=... # the key it names - or skip it, and type /login in turri once it has started
36
- turri
36
+ mkdir my-project && cd my-project
37
+ turri init-config
37
38
  ```
38
39
 
39
- `turri init-config` asks which vendor's models you use and writes the project's `config.turri.yaml` with two of theirs - a capable one you talk to, which writes the durable intent and plans the work, and a smaller, cheaper one that writes the code. For Anthropic:
40
+ Choose your model provider, then sign in with `/login` once **turri** has started.
40
41
 
41
- ```yaml
42
- harness-model: anthropic/claude-opus-5-5:medium # you talk to it
43
- coding-model: anthropic/claude-haiku-5-5:low # it writes the code
44
- ```
45
-
46
- To skip the question, name the vendor - `anthropic`, `openai`, `google`, `amazon-bedrock` (with `--maker` and `--region`), `claude-code` - your Claude Pro or Max subscription, through Claude Code ([how](docs/claude-subscription.md)) - or `other`:
42
+ ### Build your first app
47
43
 
48
44
  ```bash
49
- turri init-config --vendor anthropic
45
+ turri
50
46
  ```
51
47
 
52
- It then tells you which API key to set - or to type `/login` once **turri** is running instead. **turri** loads the `config.turri.yaml` in the folder you start it from. Below the two models, the file sets every other setting to its default - change any of them in the file, or from the chat with `/turri-config`. Any other model works too: [models](#models).
48
+ Then simply describe what you want:
49
+
50
+ > Build a small API where users can register and sign in.
53
51
 
54
- Once `turri` is running, say what you want - `a small API where people can register and sign in` - and **turri** starts the project and regenerates it at once.
52
+ **turri** captures your intent in [\*\*\*plain](https://plainlang.org/), generates the code, and validates it against the system definition.
55
53
 
56
- No project of your own yet? Build one of [**the examples**](examples/README.md) with turri, step by step.
54
+ As your requirements evolve, just describe the changes. **turri** updates the system definition and regenerates the affected code.
57
55
 
58
- Rather not install Node and the rest? **turri** also runs in Docker, from one image: [turri in Docker](docker/README.md).
56
+ ### Other ways to run turri
59
57
 
60
- Choosing models: [models](#models); what to do next: [use](#use).
58
+ Prefer a graphical interface? Try [turri desktop](https://github.com/turri-oss/turri-desktop).
59
+
60
+ You can also run **turri** [in Docker](docker/README.md), or [from a clone](#from-a-clone) to follow `main` or work on **turri** itself.
61
+
62
+ For more, see [Using **turri**](docs/using.md) and [Examples](examples/README.md).
61
63
 
62
64
  ### From a clone
63
65
 
64
- In place of the npm package - for the latest of `main`, or to change turri itself:
66
+ To run the local version of **turri** instead of the npm package:
65
67
 
66
68
  ```bash
67
69
  git clone git@github.com:turri-oss/turri.git && cd turri
@@ -70,47 +72,41 @@ npm link # puts `turri` on your PATH, pointing at this clone
70
72
  turri doctor
71
73
  ```
72
74
 
73
- The clone runs its TypeScript sources directly, so there is nothing to build. When new commits land:
75
+ The clone runs its TypeScript sources directly, so there is nothing to build. To pick up new commits, run `git pull` and `npm install`, then start **turri** again - a running one keeps the code it started with. More in the [installation guide](docs/installation.md#from-a-clone).
74
76
 
75
- ```bash
76
- git pull
77
- npm install # picks up any dependency that changed
78
- ```
77
+ ## Why
79
78
 
80
- A **turri** already running keeps the code it started with - start it again to run what you pulled. More in [installation](docs/installation.md#from-a-clone).
79
+ Coding agents write in minutes what used to take teams weeks. But while coding got faster, our ability to understand and review code didn't. We increasingly become accountable for software we don't fully understand.
81
80
 
82
- ## Why
81
+ Software built with coding agents grows prompt after prompt, patch upon patch. Decisions and reasoning get lost in chat sessions, misunderstandings accumulate in the code, and each change builds on top of the last. Eventually, neither the developer nor the agent fully understands the system anymore.
82
+
83
+ Better models and more elaborate agent workflows don't solve the fundamental problem: code remains the source of truth, and humans are expected to understand and maintain something they can no longer meaningfully review.
84
+
85
+ Regenerative software flips the traditional model of software development. Instead of maintaining code and trying to preserve the reasoning behind it, we maintain the system's definition and regenerate the code from it.
86
+
87
+ With **turri**, you engineer the system's definition instead of maintaining its implementation. The agent writes the code, but you retain the understanding and control over what gets built.
88
+
89
+ **The goal isn't to write code faster. It's to understand your software again.**
83
90
 
84
- Software has always been maintained: written once, then patched for as long as it lives and everything learnt while building it lived only in the code. Coding agents code in minutes what took a team weeks, and they get better at it with every model, so code is now cheap and a disposable asset. It no longer has to be maintained - it can be regenerated. What has to last instead is the intent: what the system should do, and the tests that say whether it does. Get that right and the code is replaceable. Get it wrong and no agent, however capable, can guess what you meant.
91
+ For the story behind **turri**, read [Why I built turri](https://turri.dev/blog/why-i-built-turri/).
85
92
 
86
- Code that is patched, prompt after prompt, drifts: every misunderstanding stays in it, and the next change is made on top. When the software can always be regenerated from durable information instead, that understanding is written down - explicit, reviewable and tested - and it evolves with the software rather than against it.
93
+ ## Code is disposable
87
94
 
88
- ## How it differs from ye old coding agent
95
+ ### 1. Define
89
96
 
90
- With a coding agent you work on code: you ask for a change, it edits the code, and you review the code it wrote.
97
+ Describe what you want to build or change. **turri** captures your intent as a structured system definition using [\*\*\*plain](https://plainlang.org/), including specifications, architectural decisions, and tests.
91
98
 
92
- With **turri** you work on the durable intent. You say what the software must do, and **turri** updates durable intent and can always regenerate the code from that. You don't review the code or keep it - you review and keep the intent: what the software must do, and what must hold as it changes. The code is a disposable artefact, rebuilt from it whenever it changes.
99
+ ### 2. Review
93
100
 
94
- | | ye old coding agent | **turri** |
95
- | --- | --- | --- |
96
- | **What you maintain** | the code, patched prompt after prompt | the durable intent |
97
- | **What gets built, in what order** | whatever the agent decides, as it goes | the code is built from the durable intent step by step, in a fixed order, so no intent is skipped |
98
- | **Who writes the code** | the agent, and it decides everything else too | the agent - **turri** decides what it builds, the agent only how, line by line |
99
- | **How it works** | improvised, differently every time | a developer workflow baked in - build, unit test, review, conformance test, regression test, commit - the same every time |
100
- | **What counts as done** | the agent says so | every unit of intent is tested and validated by **turri** itself: all its tests pass, or the work goes back |
101
- | **Tests** | written and changed by the agent that writes the code | written from the durable intent, apart from the code; the agent writing the code cannot change them |
102
- | **When it gets stuck** | it keeps going, or quietly works around the problem | it stops and tells you which intent to clarify |
101
+ Review the system definition before implementation begins. Make sure it describes what you actually want, without getting lost in implementation details.
103
102
 
104
- ## How it works
103
+ ### 3. Regenerate
105
104
 
106
- **turri** captures the durable intent in [\*\*\*plain](https://plainlang.org/docs/), a language for saying what software should do. \*\*\*plain breaks the intent down into functionalities - small units, each a single thing the software does - and **turri** regenerates the code from them piece by piece.
105
+ **turri** generates code from the approved definition. When requirements change, it regenerates the affected parts of the implementation rather than accumulating patches on top of existing code.
107
106
 
108
- 1. **Define.** You say what the software should do; **turri** writes it down as \*\*\*plain.
109
- 2. **Review and refine.** You review \*\*\*plain and change it with **turri** until it says what you mean.
110
- 3. **Regenerate.** Agents write the code; **turri** decides what they write and when, step by step, the same way every time.
111
- 4. **Validate.** Agents write conformance tests from \*\*\*plain; **turri** runs them, and keeps the code only when it does what \*\*\*plain says.
107
+ ### 4. Prove
112
108
 
113
- These are not phases, one after the other: you don't spend hours writing \*\*\*plain and then hours waiting for the code. You go round the loop in small steps, in conversation with **turri** - while you refine the next functionality, the one before it is already being regenerated and validated. A bug is fixed in \*\*\*plain; a new behaviour goes into \*\*\*plain; and the next regeneration carries it. Ask to try it at any time: **turri** puts what is built in `dist` and starts it on your machine - an app, and it tells you where to open your browser.
109
+ **turri** verifies the generated implementation against independently defined tests. The coding agent cannot change the tests to make its implementation pass. If validation fails, **turri** iterates until the implementation conforms to the definition.
114
110
 
115
111
  ## The name
116
112
 
@@ -125,11 +121,11 @@ That is what regenerative software asks of software, and what **turri** does:
125
121
  | Every cell can become another, and it is still the same jellyfish. | Every line of code can be replaced, and it is still the same software - because what it is never lived in the code. |
126
122
  | It can do it again and again, for as long as it lives. | The code can be regenerated whenever \*\*\*plain changes or a model gets better, for as long as \*\*\*plain is kept. |
127
123
 
128
- So the tools speak its language: **`regenerate`** regenerates the code from \*\*\*plain as it is now - or the functionalities you name, though nothing changed, or all of it from scratch - **`drift`** says how far the code has moved from it, and **`lineage`** shows every generation of a module and what each was regenerated from.
124
+ So the tools speak its language: **`regenerate`** regenerates the code from \*\*\*plain as it is now - or the functionalities you name, though nothing changed, or all of it from scratch - **`drift`** says how far the code has moved from it, and **`/lineage`** shows every generation of a module and what each was regenerated from.
129
125
 
130
126
  ## Models
131
127
 
132
- `init-config`'s models are only a starting point. **turri** is built on [pi](https://pi.dev), so any model [pi](https://pi.dev) supports works - Anthropic, OpenAI, Google, Amazon Bedrock, OpenRouter, a local one. A model is reached as [pi](https://pi.dev) reaches it - `/login`, in `turri` as in `pi`, the provider's API key in the environment (`ANTHROPIC_API_KEY`, `OPENAI_API_KEY`, `GEMINI_API_KEY`, ...), or a cloud account - and named as [pi](https://pi.dev) names it, `provider/model-id`, with `:high`, `:low` and so on for how hard it thinks. It uses three: the **harness** model you talk to, which writes \*\*\*plain and plans the work - worth a capable one - and the **coding** and **judge** models its agents build and judge with, which can be smaller and cheaper, such as GPT-6 Luna or Gemini 3.1 Flash Lite. `turri --harness-model` and `--coding-model` choose them for a session, and [pi](https://pi.dev)'s `/model` switches the one you talk to as you go; to keep them for the project, set them with `/turri-config harness-model`, `/turri-config coding-model` and so on - each role's too, as `models.<role>` - or write them in its `config.turri.yaml`:
128
+ `init-config`'s models are only a starting point. **turri** is built on [pi](https://pi.dev), so any model [pi](https://pi.dev) supports works - Anthropic, OpenAI, Google, Amazon Bedrock, OpenRouter, a local one. A model is reached as [pi](https://pi.dev) reaches it - `/login`, in `turri` as in `pi`, the provider's API key in the environment (`ANTHROPIC_API_KEY`, `OPENAI_API_KEY`, `GEMINI_API_KEY`, ...), or a cloud account - and named as [pi](https://pi.dev) names it, `provider/model-id`, with `:high`, `:low` and so on for how hard it thinks. It uses three: the **harness** model you talk to, which writes \*\*\*plain and plans the work - worth a capable one - and the **coding** and **judge** models its agents build and judge with, which can be smaller and cheaper, such as GPT-6 Luna or Gemini 3.1 Flash Lite. `turri --harness-model` and `--coding-model` choose them for a session, and [pi](https://pi.dev)'s `/model` switches the one you talk to as you go; to keep them for the project, set them with `/settings harness-model`, `/settings coding-model` and so on - each role's too, as `models.<role>` - or write them in its `config.turri.yaml`:
133
129
 
134
130
  ```yaml
135
131
  harness-model: anthropic/claude-opus-5-5 # the model you talk to: a capable one
@@ -152,16 +148,15 @@ Then say what you want:
152
148
 
153
149
  > A small API where people can register and sign in, in Python.
154
150
 
155
- In a new project **turri** starts it itself, without asking how: it chooses the stack - the one you name, else a standard library stack this machine can build - writes the module and its unit testing script (and the conformance tests' when you ask for them, or the [test advisor](docs/test-advisor.md) finds a functional spec that needs them), regenerates the smallest thing that runs at once, then the main thing you described, and says what it chose and what it would write next. Every change after is yours to ask for: **turri** writes it as \*\*\*plain and regenerates it. While it works:
151
+ In a new project **turri** starts it itself, without asking how: it chooses the stack - the one you name, else a standard library stack this machine can build - writes the module and its unit testing script (and the conformance tests' when you ask for them, or - conformance tests on - it judges a functional spec needs them), regenerates the smallest thing that runs at once, then the main thing you described, and says what it chose and what it would write next. Every change after is yours to ask for: **turri** writes it as \*\*\*plain and regenerates it. While it works:
156
152
 
157
153
  - the **panel** above the input shows every build - its stage, what its agents are doing, its model and cost - and the queue behind it;
158
- - ask to try it at any time - "let me try it" - and **`release`** puts what is built so far in `dist/<module>` and **`activate`** starts it, installing what it needs - nothing to approve;
154
+ - ask to try it at any time - "let me try it" - and **`launch`** puts what is built so far in `dist/<module>` and starts it in the background, installing what it needs - nothing to approve;
159
155
  - the **side panel** (`ctrl+h`) takes the screen and opens on **regen** - \*\*\*plain, every item marked planned, working, regenerated, validating, conform or needs you - and `p` turns it to the **pulses** (`/pulses`) - every pulse, running, queued and finished, and what each regenerates; what its agents did is in each pulse's log in `.turri/jobs/`, kept with `--debug` (`debug: true`);
160
156
  - **`/halt`** halts a pulse, **`/lineage`** shows every generation of a module, and the **`drift`** tool says what is left to regenerate;
161
157
  - **`/btw <question>`** asks turri something on the side - answered at once, even while a question waits for you (typed as the answer, under "Something else…"), and left out of the conversation;
162
- - **`/turri-config`** changes any setting of the project's `config.turri.yaml` - the models, review, the test advisor, how many pulses at once - and says when it takes effect: now, at your next message, or at the next pulse. No restart: `/turri-config review false`, or `/turri-config` alone to pick from the list;
158
+ - **`/settings`** changes any setting of the project's `config.turri.yaml` - the models, review, how many pulses at once - and says when it takes effect: now, at your next message, or at the next pulse. No restart: `/settings review false`, or `/settings` alone to pick from the list - [pi](https://pi.dev)'s own settings the last entry. Or just ask: "regenerate with gpt 5.5 from now on";
163
159
  - **`/sentinel`** says whether the sentinel checks every pulse that finishes: `ask` (you are asked before it first opens), `on` or `off`;
164
- - **`/stack`** chooses the stack to build with, in a project whose backend and frontend each have their own testing scripts in `config.turri.<stack>.yaml` - `/stack backend`, `/stack none` - for the session (`--stack <name>` on the command line). The chat's model builds each part with its own stack by itself, pinned to that module's pulses.
165
160
 
166
161
  Other things to ask for:
167
162
 
@@ -193,8 +188,8 @@ Start at the [documentation index](docs/README.md), or go straight to a page:
193
188
  | [Installation](docs/installation.md) | doctor, what turri needs of this machine, **turri** and `pi`, environment variables |
194
189
  | [Examples](examples/README.md) | projects to build with turri step by step: guestbook - a backend and a frontend in minutes - a CLI, and a backend service tested where it matters |
195
190
  | [Using **turri**](docs/using.md) | the conversation, skills, tools, pulses and regen, choosing models, the command line |
196
- | [The project config](docs/config.md) | `config.turri.yaml` and each stack's `config.turri.<stack>.yaml`: every key, models and their inheritance, conformance, the testing scripts, stacks and choosing one, the old `config.yaml` |
197
- | [Deploy](docs/deploy.md) | trying what is built: the last commit in `dist/<module>`, started on your machine, nothing installed without asking |
191
+ | [The project config](docs/config.md) | `config.turri.yaml` and a module's own `config.turri.<module>.yaml`: every key, models and their inheritance, conformance, the testing scripts, which file builds a module, the old `config.yaml` |
192
+ | [Launch](docs/launch.md) | trying what is built: a commit in `dist/<module>`, started on your machine in the background - after every pulse too - nothing installed without asking |
198
193
  | [Running unattended](docs/headless.md) | regenerating \*\*\*plain overnight or in CI: the command, keeping it running, the results, resuming, rebuilding one functionality |
199
194
  | [Authoring \*\*\*plain](docs/authoring-plain.md) | what \*\*\*plain is made of, the authoring rules, the skills that write and fix it, checking it |
200
195
  | [Regenerating](docs/regenerating.md) | what each build does and in which order: functionalities, modules, regeneration, changes to \*\*\*plain, conformance and acceptance tests, working notes, what the code is built from |
@@ -1,7 +1,7 @@
1
1
  import { existsSync, readFileSync } from "node:fs";
2
2
  import { homedir } from "node:os";
3
3
  import { join } from "node:path";
4
- import { readProjectConfig, stacksOf } from "./config.js";
4
+ import { readProjectConfig, moduleConfigsOf } from "./config.js";
5
5
  import { bedrockAwsRegion, bedrockNeedsAwsRegion, bedrockPlaceOf } from "./init-config.js";
6
6
  import { modelsInUse } from "./model-check.js";
7
7
  /** The variable turri marks its own AWS_REGION with, so the pi it starts - and a reload - tells it from the person's. */
@@ -52,9 +52,9 @@ export function profileRegion(profile, env = process.env) {
52
52
  }
53
53
  return undefined;
54
54
  }
55
- /** The Bedrock models a project uses: every model its config names - each stack's too - and those given. */
55
+ /** The Bedrock models a project uses: every model its config names - each module's own file's too - and those given. */
56
56
  function bedrockModels(projectDir, also) {
57
- const configs = [readProjectConfig(projectDir), ...stacksOf(projectDir).map((stack) => readProjectConfig(projectDir, stack))];
57
+ const configs = [readProjectConfig(projectDir), ...moduleConfigsOf(projectDir).map((module) => readProjectConfig(projectDir, module))];
58
58
  const specs = [...configs.flatMap((config) => modelsInUse(config).map((used) => used.spec)), ...also];
59
59
  return [...new Set(specs.filter((spec) => spec.startsWith("amazon-bedrock/")))];
60
60
  }
@@ -1,7 +1,7 @@
1
1
  import type { ExtensionContext } from "@earendil-works/pi-coding-agent";
2
2
  import type { ChatLink } from "./chats.ts";
3
3
  /**
4
- * Whether a chat is busy, for what turri tells it of its own accord - a test advisor's verdict, a background skill run's
5
- * end - and so waits: its agent working, or the person typing - or no session to tell yet. Nothing told so interrupts.
4
+ * Whether a chat is busy, for what turri tells it of its own accord - a background skill run's end - and so waits: its
5
+ * agent working, or the person typing - or no session to tell yet. Nothing told so interrupts.
6
6
  */
7
7
  export declare function chatBusy(link: ChatLink, context: () => ExtensionContext | undefined): boolean;
package/dist/chat-idle.js CHANGED
@@ -1,6 +1,6 @@
1
1
  /**
2
- * Whether a chat is busy, for what turri tells it of its own accord - a test advisor's verdict, a background skill run's
3
- * end - and so waits: its agent working, or the person typing - or no session to tell yet. Nothing told so interrupts.
2
+ * Whether a chat is busy, for what turri tells it of its own accord - a background skill run's end - and so waits: its
3
+ * agent working, or the person typing - or no session to tell yet. Nothing told so interrupts.
4
4
  */
5
5
  export function chatBusy(link, context) {
6
6
  const session = link.session();
@@ -6,7 +6,7 @@ import { type ProjectConfig } from "./config.ts";
6
6
  * is another name for, or else `harness-model:` in config.turri.yaml. The coding model is the one
7
7
  * every render runs on: `--coding-model`, or else `coding-model:` in config.turri.yaml - pi knows
8
8
  * nothing of it, so it reaches the extension through the environment. Either can still be
9
- * changed in the conversation: pi's /model, engine.
9
+ * changed in the conversation: pi's /model, and the settings tool or /settings for the coding model.
10
10
  */
11
11
  /** The environment variable a chat's --coding-model reaches the extension through. */
12
12
  export declare const CODING_MODEL_ENV = "TURRI_CODING_MODEL";
@@ -6,7 +6,7 @@ import { modelSpec, projectModels } from "./config.js";
6
6
  * is another name for, or else `harness-model:` in config.turri.yaml. The coding model is the one
7
7
  * every render runs on: `--coding-model`, or else `coding-model:` in config.turri.yaml - pi knows
8
8
  * nothing of it, so it reaches the extension through the environment. Either can still be
9
- * changed in the conversation: pi's /model, engine.
9
+ * changed in the conversation: pi's /model, and the settings tool or /settings for the coding model.
10
10
  */
11
11
  /** The environment variable a chat's --coding-model reaches the extension through. */
12
12
  export const CODING_MODEL_ENV = "TURRI_CODING_MODEL";
@@ -1,12 +1,10 @@
1
1
  /**
2
2
  * The chat a piece of work runs for: its tools, its commands, its event handlers - and what they start, a pulse
3
3
  * queued from them among it. A turri session holds several chats (chats.ts); what each keeps for itself rides along
4
- * with its work here: its id, which pulses and the ledger's events carry, and the stack it chose.
4
+ * with its work here: its id, which pulses and the ledger's events carry.
5
5
  */
6
6
  export interface ChatScope {
7
7
  id: string;
8
- /** The stack this chat chose with /stack or the stack tool - none: the project's config alone. */
9
- stack: string | undefined;
10
8
  /** The questions it asks now, each with what declines it: a host declines them with `Turri.decline`. */
11
9
  readonly asking: Set<() => void>;
12
10
  }
@@ -8,7 +8,7 @@
8
8
  * runs its own skills, and the project's, with `cultivate`, steps and gates and all. A skill the chat followed by hand
9
9
  * instead would skip those gates, and one from another tool may say otherwise than turri's rules. So the conversation
10
10
  * is offered neither: no skill turri runs itself, and none about ***plain. A skill about anything else - a commit
11
- * message, a deploy - is offered as pi offers it.
11
+ * message, a launch - is offered as pi offers it.
12
12
  */
13
13
  /** Whether turri has what a pi skill offers: it runs a skill of that name itself, or the skill is about ***plain. */
14
14
  export declare function supersededByTurri(skill: {
@@ -8,7 +8,7 @@
8
8
  * runs its own skills, and the project's, with `cultivate`, steps and gates and all. A skill the chat followed by hand
9
9
  * instead would skip those gates, and one from another tool may say otherwise than turri's rules. So the conversation
10
10
  * is offered neither: no skill turri runs itself, and none about ***plain. A skill about anything else - a commit
11
- * message, a deploy - is offered as pi offers it.
11
+ * message, a launch - is offered as pi offers it.
12
12
  */
13
13
  /** What a skill says it is about, that turri covers: ***plain specs and their testing scripts. */
14
14
  const ABOUT_PLAIN = /\*\*\*plain|\\\*\\\*\\\*plain|\.plain\b|functional specs?\b|testing scripts?\b|run_unittests|run_conformance_tests/i;
package/dist/chats.d.ts CHANGED
@@ -5,16 +5,16 @@ import { type ChatUi } from "./chat-ui.ts";
5
5
  import { type SentinelSetting } from "./config.ts";
6
6
  import type { AskUserIO } from "./ask.ts";
7
7
  import type { Job, JobRegistry } from "./regenerate/jobs.ts";
8
+ import type { Launch } from "./launch-track.ts";
8
9
  import type { ToolDefinition } from "@earendil-works/pi-coding-agent";
9
- import type { AdvisorVerdict } from "./regenerate/advisor-runs.ts";
10
10
  import { type ChatRole, type Conclusion, type Notice, type NoticeAnswer, type NoticeInput, type SentinelCheck } from "./notice.ts";
11
11
  /**
12
12
  * The chats of a turri session.
13
13
  *
14
14
  * One turri process is one session on one project, and holds up to MAX_CHATS chats: conversations, each with its own
15
- * history, model, thinking level, stack and questions, each working while another is shown. What they share is the
15
+ * history, model, thinking level and questions, each working while another is shown. What they share is the
16
16
  * session's: the one job registry and work loop the project's pulses run in - a pulse any chat starts is in every
17
- * chat's side panel - the coding model, steering, releases and the ledger.
17
+ * chat's side panel - the coding model, steering, launches and the ledger.
18
18
  *
19
19
  * A chat is a pi session with turri's extension in it. The extension, built once for each, links itself to its chat
20
20
  * here (`attach`); its tools, commands and handlers then run inside the chat's scope (chat-scope.ts), so a pulse knows
@@ -80,13 +80,19 @@ export interface TurriHost {
80
80
  * not say it again in the conversation. Unset, it says both, as in the terminal.
81
81
  */
82
82
  pulseEndsShown?: boolean;
83
+ /**
84
+ * A launch was asked for, started, or ended (docs/launch.md): what the host shows of what runs is drawn again. One that
85
+ * ended with a newer launch waiting has `replacedBy` - stopped the next moment - and one whose servers were halted on
86
+ * request comes again, `stopped`.
87
+ */
88
+ onLaunch?(launch: Launch): void;
83
89
  /** What the sentinel puts to the person - and, `kind: "sentinel-start"`, whether to start it: the host draws it in the chat it names, and answers it with `answer`. */
84
90
  onNotice?(notice: Notice): void;
85
91
  /** A notice is over - answered, dismissed, or superseded by a newer one about its module: the host takes its card down. */
86
92
  onNoticeOver?(notice: Notice): void;
87
93
  /**
88
94
  * The sentinel's own tools beside turri's - a host's browser, say - and its surface: where the person watches it use
89
- * them, in the host's words. Given, the sentinel tries a release with those tools, keeping its shell for what they
95
+ * them, in the host's words. Given, the sentinel tries what is launched with those tools, keeping its shell for what they
90
96
  * cannot show; absent, the person does not watch it, and the tools are only to test with as well.
91
97
  */
92
98
  sentinel?: {
@@ -110,14 +116,21 @@ export interface ChatInstance {
110
116
  asked?: string;
111
117
  focused?: string;
112
118
  }): Promise<void>;
113
- /**
114
- * The sentinel's: functional specs a host asked it to check - the module released first, unless what runs is its last
115
- * commit, then its agent told, in a conversation of its own for the check. Why not, when the release failed: then its
116
- * agent is told nothing.
117
- */
119
+ /** The sentinel's: functional specs a host asked it to check - its agent told, in a conversation of its own for the check, in what is launched of the module. */
118
120
  briefCheck(check: SentinelCheck, context: {
119
121
  focused?: string;
120
- }): Promise<string | undefined>;
122
+ }): Promise<void>;
123
+ /**
124
+ * The sentinel's: its check of a pulse - or a host's check - paused while the codebase was launched again, carried on in
125
+ * the launch that holds it: its agent told so, in the conversation it was in. Throws when what runs no longer holds it.
126
+ */
127
+ resume(work: {
128
+ job: Job;
129
+ } | {
130
+ check: SentinelCheck;
131
+ }): Promise<void>;
132
+ /** A launch this chat is to hear of ended - one it asked for, or one after a pulse of its with the sentinel off: its agent told how it went. */
133
+ launched(launch: Launch): void;
121
134
  /** A notice put in the chat: drawn, and - in the terminal - put to the person once the chat is idle. */
122
135
  notice(notice: Notice): void;
123
136
  /** A notice is over: its dialog closed, if it is open. */
@@ -126,19 +139,12 @@ export interface ChatInstance {
126
139
  concluded(conclusion: Conclusion): void;
127
140
  /** The person answered a notice with something to do: the chat's agent started on it. */
128
141
  act(task: string): void;
129
- /**
130
- * The test advisor's verdict: once the chat is idle - its agent done, nothing typed - a yes starts a turn that writes its
131
- * scenarios, and a no is a line. Those that arrive meanwhile are delivered together.
132
- */
133
- advised(verdict: AdvisorVerdict): void;
134
142
  /** The jobs changed: what it draws of them is drawn again. */
135
143
  jobsChanged(): void;
136
144
  /** How hard the chat's model thinks now: sub-agents started from it think as hard. */
137
145
  thinkingLevel(): string | undefined;
138
146
  /** The chat's context, as its tools get it - for its model and its providers. */
139
147
  context(): ExtensionContext | undefined;
140
- /** Conformance tests turned on or off: the chat's tools switched to match - conform and evaluate_tests, or the tool that turns them on. */
141
- conformanceSwitched?(): void;
142
148
  }
143
149
  /** A chat's extension, linked to its chat. */
144
150
  export interface ChatLink {
@@ -230,6 +236,12 @@ export interface TurriCore {
230
236
  showing(chat: ChatState): void;
231
237
  /** For the extension: a pulse ended - told to the chat that asked for it, or, with the sentinel on, to the sentinel. */
232
238
  jobFinished(job: Job): void;
239
+ /**
240
+ * For the extension: a launch started, or ended. Started, the sentinel's check of a pulse or a check of its codebase is
241
+ * paused, to carry on once the codebase's launches are settled. Ended, one after a pulse, with the sentinel off: told to
242
+ * the chat that asked for the pulse, or the one shown.
243
+ */
244
+ launchChanged(launch: Launch): void;
233
245
  /** Whether finished pulses go to the sentinel now: it is on, and there is somewhere to open it. */
234
246
  sentinelOn(): boolean;
235
247
  /** A notice put to the person, in the chat they look at - the sentinel's, or turri's own. Undefined: no chat to put it in. */
@@ -248,8 +260,6 @@ export interface TurriCore {
248
260
  } | {
249
261
  refused: string;
250
262
  };
251
- /** The test advisor's verdict, for the chat the person looks at - held until there is one. Undefined: no chat to hand it to yet. */
252
- advised(verdict: AdvisorVerdict): string | undefined;
253
263
  /** The notices put to the person and not yet answered. */
254
264
  notices(): Notice[];
255
265
  /**
@@ -285,6 +295,20 @@ export interface CoreOptions {
285
295
  setSentinel?: (on: boolean) => void;
286
296
  /** The person ignored a notice for good: kept in the sentinel's guidance, for every conversation after. */
287
297
  ignored?: (notice: Notice) => void;
298
+ /** The launch track, as the sentinel waits on it (docs/sentinel.md). Not given: the sentinel waits for nothing. */
299
+ launches?: SentinelLaunches;
300
+ }
301
+ /**
302
+ * What the sentinel waits on of the launch track: a pulse is tested only in a launch whose commit holds the pulse's, and
303
+ * a check only in what runs of its module - each told once its codebase's launches are settled.
304
+ */
305
+ export interface SentinelLaunches {
306
+ /** Resolves once what runs can be tested for the pulse, or there is nothing running to test it in. Throws when what runs cannot hold it - turri got it wrong. */
307
+ readyFor(job: Job): Promise<void>;
308
+ /** Resolves once what runs of the check's module is settled. Throws when nothing of it runs. */
309
+ readyForCheck(check: SentinelCheck): Promise<void>;
310
+ /** Resolves once nothing of the codebase's is launching or waiting to. */
311
+ settled(codebase: string): Promise<void>;
288
312
  }
289
313
  /** A chat's session, as stopping what it does reaches it. */
290
314
  export type Stoppable = Pick<AgentSession, "isStreaming" | "isCompacting" | "isRetrying" | "isBashRunning" | "abort" | "abortBash">;
@@ -305,7 +329,7 @@ export declare function interruptChat<R>(session: Stoppable, asked: {
305
329
  export declare function createChats(options: CoreOptions): TurriCore;
306
330
  /**
307
331
  * pi's extension API for a chat: every tool, command, shortcut and handler the extension registers runs inside the
308
- * chat's scope - its stack, and its id on what it starts.
332
+ * chat's scope - its id on what it starts.
309
333
  */
310
334
  export declare function scopedToChat(pi: ExtensionAPI, scope: ChatScope): ExtensionAPI;
311
335
  /** A chat's stand-in for the screen, for the terminal's driver. */