@turri-dev/cli 0.4.2-next.a6867e8 → 0.4.3-next.3fc888b

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 (128) hide show
  1. package/README.md +1 -0
  2. package/dist/background-skills.d.ts +4 -1
  3. package/dist/background-skills.js +9 -1
  4. package/dist/capture/agents.d.ts +391 -0
  5. package/dist/capture/agents.js +338 -0
  6. package/dist/capture/area.d.ts +58 -0
  7. package/dist/capture/area.js +197 -0
  8. package/dist/capture/assemble.d.ts +122 -0
  9. package/dist/capture/assemble.js +452 -0
  10. package/dist/capture/capture.d.ts +116 -0
  11. package/dist/capture/capture.js +1281 -0
  12. package/dist/capture/chat.d.ts +29 -0
  13. package/dist/capture/chat.js +94 -0
  14. package/dist/capture/checks.d.ts +142 -0
  15. package/dist/capture/checks.js +643 -0
  16. package/dist/capture/config.d.ts +13 -0
  17. package/dist/capture/config.js +60 -0
  18. package/dist/capture/interface.d.ts +71 -0
  19. package/dist/capture/interface.js +199 -0
  20. package/dist/capture/map.d.ts +58 -0
  21. package/dist/capture/map.js +530 -0
  22. package/dist/capture/plan.d.ts +8 -0
  23. package/dist/capture/plan.js +13 -0
  24. package/dist/capture/progress.d.ts +109 -0
  25. package/dist/capture/progress.js +240 -0
  26. package/dist/capture/report.d.ts +75 -0
  27. package/dist/capture/report.js +268 -0
  28. package/dist/capture/scripts.d.ts +26 -0
  29. package/dist/capture/scripts.js +33 -0
  30. package/dist/capture/state.d.ts +299 -0
  31. package/dist/capture/state.js +43 -0
  32. package/dist/capture/trial.d.ts +34 -0
  33. package/dist/capture/trial.js +89 -0
  34. package/dist/capture-cli.d.ts +1 -0
  35. package/dist/capture-cli.js +77 -0
  36. package/dist/chat-commands.d.ts +2 -10
  37. package/dist/chat-commands.js +3 -57
  38. package/dist/chat-tab-header.d.ts +15 -0
  39. package/dist/chat-tab-header.js +78 -0
  40. package/dist/chat-tabs.d.ts +26 -0
  41. package/dist/chat-tabs.js +100 -0
  42. package/dist/chat-terminal.js +57 -8
  43. package/dist/chat-waiting.d.ts +4 -1
  44. package/dist/chat-waiting.js +7 -4
  45. package/dist/chats.d.ts +12 -7
  46. package/dist/chats.js +35 -21
  47. package/dist/cli.js +32 -14
  48. package/dist/config-edit.js +4 -2
  49. package/dist/config.d.ts +15 -2
  50. package/dist/config.js +62 -4
  51. package/dist/extension.d.ts +1 -0
  52. package/dist/extension.js +262 -136
  53. package/dist/identity.js +3 -2
  54. package/dist/init-config.js +2 -0
  55. package/dist/loop-cli.js +5 -1
  56. package/dist/loop-tools.d.ts +2 -3
  57. package/dist/loop-tools.js +12 -13
  58. package/dist/new-project.d.ts +5 -0
  59. package/dist/new-project.js +11 -0
  60. package/dist/pi-launch.js +2 -0
  61. package/dist/pi-themes.d.ts +3 -0
  62. package/dist/pi-themes.js +21 -0
  63. package/dist/pi.js +2 -2
  64. package/dist/plain-code-blocks.d.ts +14 -0
  65. package/dist/plain-code-blocks.js +56 -0
  66. package/dist/pointer-hover.d.ts +12 -0
  67. package/dist/pointer-hover.js +48 -0
  68. package/dist/question-dialog.d.ts +5 -0
  69. package/dist/question-dialog.js +20 -1
  70. package/dist/regenerate/chunk-plan.d.ts +2 -11
  71. package/dist/regenerate/chunk-plan.js +9 -20
  72. package/dist/regenerate/command-check.d.ts +9 -0
  73. package/dist/regenerate/command-check.js +163 -14
  74. package/dist/regenerate/job-panel.d.ts +5 -107
  75. package/dist/regenerate/job-panel.js +4 -289
  76. package/dist/regenerate/jobs-tree.d.ts +1 -0
  77. package/dist/regenerate/jobs-tree.js +5 -1
  78. package/dist/regenerate/loop.d.ts +6 -14
  79. package/dist/regenerate/loop.js +51 -35
  80. package/dist/regenerate/side-panel.d.ts +6 -1
  81. package/dist/regenerate/side-panel.js +158 -22
  82. package/dist/regenerate/spec-map-view.d.ts +11 -3
  83. package/dist/regenerate/spec-map-view.js +22 -2
  84. package/dist/regenerate/test-scripts.d.ts +8 -0
  85. package/dist/regenerate/test-scripts.js +20 -5
  86. package/dist/reopen.d.ts +29 -0
  87. package/dist/reopen.js +47 -0
  88. package/dist/resume-line.d.ts +4 -1
  89. package/dist/resume-line.js +5 -2
  90. package/dist/sentinel-chat.js +7 -2
  91. package/dist/sentinel.d.ts +1 -1
  92. package/dist/sentinel.js +4 -2
  93. package/dist/setup.js +9 -1
  94. package/dist/terminal-notifications.d.ts +31 -0
  95. package/dist/terminal-notifications.js +134 -0
  96. package/docs/README.md +2 -0
  97. package/docs/capture.md +207 -0
  98. package/docs/chats.md +8 -7
  99. package/docs/config.md +18 -3
  100. package/docs/development.md +4 -1
  101. package/docs/hosting.md +2 -2
  102. package/docs/launch.md +2 -2
  103. package/docs/regenerating.md +9 -8
  104. package/docs/sandbox.md +3 -1
  105. package/docs/sentinel.md +11 -11
  106. package/docs/skills-and-gates.md +1 -1
  107. package/docs/theming.md +3 -3
  108. package/docs/using.md +12 -5
  109. package/genome/capture/capture.md +26 -0
  110. package/genome/capture/check-conventions.md +5 -0
  111. package/genome/capture/check-reference.md +11 -0
  112. package/genome/capture/compact.md +7 -0
  113. package/genome/capture/concepts.md +3 -0
  114. package/genome/capture/divide.md +9 -0
  115. package/genome/capture/feature.md +45 -0
  116. package/genome/capture/interface.md +9 -0
  117. package/genome/capture/modules.md +23 -0
  118. package/genome/capture/outline.md +11 -0
  119. package/genome/capture/readability.md +12 -0
  120. package/genome/capture/reference.md +10 -0
  121. package/genome/capture/split.md +9 -0
  122. package/genome/capture/survey.md +37 -0
  123. package/genome/capture/trial.md +18 -0
  124. package/genome/capture/verify.md +7 -0
  125. package/genome/rules/turri-regeneration.md +2 -2
  126. package/package.json +3 -3
  127. package/dist/regenerate/steer.d.ts +0 -34
  128. package/dist/regenerate/steer.js +0 -91
@@ -46,7 +46,7 @@ The other rules say what a spec means. This one says what turri does with a chan
46
46
 
47
47
  - A coding agent sees its prompt and its module's code - nothing else. It cannot read `.plain` files, this conversation, AGENTS.md or the person. It never sees a functional spec's scenarios: those are the conformance tests'
48
48
  - What the code needs to know has to be in the spec. A fact said only in the conversation, AGENTS.md or notes never reaches the code, and is lost at the next regeneration
49
- - Steering reaches the agents that plan the work - how it is cut and in what order - not what the code does. What the code does is changed in the spec
49
+ - How the work is cut into pulses, and in what order, is the planner's alone: nothing the person or the conversation says reaches it. What the code does is changed in the spec
50
50
  - A codebase that requires no module may start from a base folder (`base-folder:` in config.turri.yaml): an existing codebase, files to use - images, animations - or both, copied in once before its first pulse and up the chain with the code. The agents that change and review its code are told what came from it, and keep it unless a functional spec asks otherwise. Refer to what is in it in the spec - in words, or by a link into the folder, relative to the module's file as every link is - for the code to use it: a file it holds that no functional spec names is kept, never used. A change to the folder later reaches the code only when the module is regenerated from scratch
51
51
 
52
52
  ## How bad code is fixed
@@ -56,7 +56,7 @@ The other rules say what a spec means. This one says what turri does with a chan
56
56
  - Bad conformance tests are fixed the same way, their code untouched: `conform` naming a functional spec whose tests are written writes them again, anew from its scenarios; `conform` from scratch takes out the tests folder at the tip of the module's chain and writes them again - from the tests of the module the tip requires, or, its whole chain, from nothing - only when the person asks for it
57
57
  - Pulses regenerate in the background: the spec can be changed while they run, and need not wait for them. A change inside what a running pulse regenerates steers it; the rest is planned again around it
58
58
  - A pulse that does not land is rolled back whole - code, tests and record together - and its module waits until the spec changes or the module is asked for again. Running it again unchanged usually ends the same way: look at why it did not land first
59
- - A finished pulse goes to the sentinel, a chat of turri's own - unless `sentinel: false`; under `sentinel: ask`, the default, only once the person said to start it, asked by turri before it first opens in a session (declined, a pulse goes to the chat that asked for it, as with `false`): it checks every pulse, in order, tests it in what was launched - a launch whose commit holds the pulse's - fixes a testing script - or where the config says the scripts are - itself and regenerates the module again, and puts anything else that is wrong to the person as a notice with what can be done. It never changes ***plain. turri installs nothing on the machine and changes none of its settings - not the sentinel, the chat, a launch or any agent: a toolchain the machine lacks is the person's to install, told the exact command. A pulse that landed is told to the chat the person is in too, only to say it landed and what the sentinel does with it, and when the sentinel is done with a pulse, what it found - the chat does nothing else about either; a pulse that went wrong is not told to it - the chat's agent is given a notice's task once the person accepts it, and does that
59
+ - A finished pulse goes to the sentinel, a chat of turri's own - unless `sentinel: false`; under `sentinel: ask`, the default, only once the person said to start it. It checks every pulse in order and tests it in a launch whose commit holds the pulse's. It can fix a testing script or its configuration and resume the module. Anything else that is wrong goes to the person as a notice with evidence and actions. The sentinel never changes ***plain. turri installs nothing on the machine and changes none of its settings: a missing toolchain is the person's to install, told the exact command. Where the surface shows notifications, finished pulses, findings and conclusions are for the person to read there. The chat does not repeat them; it answers when asked and carries out a notice's task once the person accepts it
60
60
 
61
61
  ## Where the cost is
62
62
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@turri-dev/cli",
3
- "version": "0.4.2-next.a6867e8",
3
+ "version": "0.4.3-next.3fc888b",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "repository": {
@@ -39,8 +39,8 @@
39
39
  "prepack": "npm run build"
40
40
  },
41
41
  "dependencies": {
42
- "@earendil-works/pi-coding-agent": "1.4.0",
43
- "@earendil-works/pi-tui": "1.4.0",
42
+ "@earendil-works/pi-coding-agent": "1.6.0",
43
+ "@earendil-works/pi-tui": "1.6.0",
44
44
  "@langchain/langgraph": "1.4.15",
45
45
  "gray-matter": "^4.0.3",
46
46
  "js-yaml": "^5.4.2",
@@ -1,34 +0,0 @@
1
- /**
2
- * How the person wants the queue planned - which functional specs go together, what goes first, how big a job is -
3
- * given to the planner's agents with every plan, as a strong preference.
4
- *
5
- * It comes from three places. The conversation sets it (`steer`), for the whole project or one module, and it
6
- * holds for the session. The project's AGENTS.md can say it once for good: a section whose heading names the queue
7
- * ("## Queue guidance") is read with every plan, so an edit to it holds from the next. And whatever queues work can
8
- * pass guidance for that work (a tool's `guidance`), which the queue keeps with it.
9
- */
10
- /** Everything the conversation's steering applies to: every module of the project. */
11
- export declare const EVERY_MODULE = "*";
12
- export interface SteeringStore {
13
- /** The steering for a scope - a module's name, or EVERY_MODULE - in the order it was given. */
14
- get(scope: string): string[];
15
- set(scope: string, texts: string[]): void;
16
- scopes(): string[];
17
- }
18
- export declare function createSteeringStore(): SteeringStore;
19
- /** A module's name as the steering names it: its spec file's name, without `.plain`. */
20
- export declare function moduleNameOf(plainFile: string): string;
21
- /**
22
- * What an AGENTS.md says of the queue: every section whose heading names it - "Queue", "Queue guidance", "How the
23
- * render queue is planned" - up to the next heading of its level or above. Empty when there is none.
24
- */
25
- export declare function queueSectionOf(markdown: string): string;
26
- /** The steering a plan of this spec's codebase follows - AGENTS.md's, then the conversation's for every module and for this one. */
27
- export declare function steeringFor(plainFile: string, cwd: string, store: SteeringStore): Steering[];
28
- /** How the person or the harness wants the queue planned: a strong preference, each with where it came from. */
29
- export interface Steering {
30
- source: string;
31
- text: string;
32
- }
33
- /** The steering, for an agent's task: each with where it came from, and how binding it is. */
34
- export declare function steeringBlock(steering: Steering[] | undefined): string[];
@@ -1,91 +0,0 @@
1
- import { existsSync, readFileSync } from "node:fs";
2
- import { basename, dirname, extname, join, resolve } from "node:path";
3
- import { projectDirOf } from "./paths.js";
4
- /**
5
- * How the person wants the queue planned - which functional specs go together, what goes first, how big a job is -
6
- * given to the planner's agents with every plan, as a strong preference.
7
- *
8
- * It comes from three places. The conversation sets it (`steer`), for the whole project or one module, and it
9
- * holds for the session. The project's AGENTS.md can say it once for good: a section whose heading names the queue
10
- * ("## Queue guidance") is read with every plan, so an edit to it holds from the next. And whatever queues work can
11
- * pass guidance for that work (a tool's `guidance`), which the queue keeps with it.
12
- */
13
- /** Everything the conversation's steering applies to: every module of the project. */
14
- export const EVERY_MODULE = "*";
15
- export function createSteeringStore() {
16
- const byScope = new Map();
17
- return {
18
- get: (scope) => [...(byScope.get(scope) ?? [])],
19
- set(scope, texts) {
20
- if (texts.length === 0)
21
- byScope.delete(scope);
22
- else
23
- byScope.set(scope, [...texts]);
24
- },
25
- scopes: () => [...byScope.keys()],
26
- };
27
- }
28
- /** A module's name as the steering names it: its spec file's name, without `.plain`. */
29
- export function moduleNameOf(plainFile) {
30
- return basename(plainFile, extname(plainFile));
31
- }
32
- /**
33
- * What an AGENTS.md says of the queue: every section whose heading names it - "Queue", "Queue guidance", "How the
34
- * render queue is planned" - up to the next heading of its level or above. Empty when there is none.
35
- */
36
- export function queueSectionOf(markdown) {
37
- const lines = markdown.split("\n");
38
- const out = [];
39
- let level = 0;
40
- for (const line of lines) {
41
- const heading = /^(#{1,6})\s+(.*)$/.exec(line);
42
- if (heading !== null) {
43
- const depth = heading[1].length;
44
- if (level > 0 && depth <= level)
45
- level = 0;
46
- if (level === 0 && /\bqueue/i.test(heading[2])) {
47
- level = depth;
48
- continue;
49
- }
50
- }
51
- if (level > 0)
52
- out.push(line);
53
- }
54
- return out.join("\n").trim();
55
- }
56
- /** The AGENTS.md files a spec's steering is read from: where turri runs, and the spec's project - once each. */
57
- function agentsFiles(plainFile, cwd) {
58
- const dirs = [resolve(cwd), projectDirOf(resolve(cwd, plainFile))];
59
- return [...new Set(dirs.map((dir) => join(dir, "AGENTS.md")))].filter((file) => existsSync(file));
60
- }
61
- /** The steering a plan of this spec's codebase follows - AGENTS.md's, then the conversation's for every module and for this one. */
62
- export function steeringFor(plainFile, cwd, store) {
63
- const fromFiles = agentsFiles(plainFile, cwd).flatMap((file) => {
64
- try {
65
- const text = queueSectionOf(readFileSync(file, "utf8"));
66
- return text === "" ? [] : [{ source: `AGENTS.md (${basename(dirname(file))})`, text }];
67
- }
68
- catch {
69
- return [];
70
- }
71
- });
72
- const module = moduleNameOf(plainFile);
73
- return [
74
- ...fromFiles,
75
- ...store.get(EVERY_MODULE).map((text) => ({ source: "the conversation", text })),
76
- ...store.get(module).map((text) => ({ source: `the conversation, for ${module}`, text })),
77
- ];
78
- }
79
- /** The steering, for an agent's task: each with where it came from, and how binding it is. */
80
- export function steeringBlock(steering) {
81
- if (steering === undefined || steering.length === 0)
82
- return [];
83
- return [
84
- "<how the queue is to be planned - the person's or the harness's wishes>",
85
- ...steering.map((entry) => `<from source="${entry.source}">\n${entry.text.trim()}\n</from>`),
86
- "</how the queue is to be planned>",
87
- "Follow these as a strong preference: they say how the person wants the work cut and ordered. They never override the",
88
- "limits and checks the plan is held to; where one would, keep to the limit, and say which and why in your answer's notes.",
89
- "",
90
- ];
91
- }