@turri-dev/cli 0.2.4-next.8422d0f → 0.2.4-next.d779410

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 (175) hide show
  1. package/README.md +7 -8
  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 +12 -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 +17 -10
  22. package/dist/extension.js +435 -532
  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 +1 -1
  34. package/dist/launch-agent.d.ts +51 -0
  35. package/dist/launch-agent.js +267 -0
  36. package/dist/{release-cli.js → launch-cli.js} +41 -24
  37. package/dist/launch-session.d.ts +68 -0
  38. package/dist/launch-session.js +217 -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 +125 -0
  42. package/dist/launch-track.js +320 -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 +7 -1
  70. package/dist/regenerate/command-check.js +43 -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 +154 -0
  82. package/dist/regenerate/{release.js → launch.js} +195 -51
  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 +34 -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 +54 -67
  90. package/dist/regenerate/loop.js +312 -148
  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 +36 -10
  115. package/dist/sentinel-check.d.ts +3 -3
  116. package/dist/sentinel-check.js +3 -3
  117. package/dist/sentinel.d.ts +18 -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 +2 -2
  131. package/docs/config.md +61 -51
  132. package/docs/development.md +4 -5
  133. package/docs/headless.md +7 -6
  134. package/docs/hosting.md +25 -24
  135. package/docs/launch.md +67 -0
  136. package/docs/parser.md +3 -3
  137. package/docs/regenerating.md +30 -22
  138. package/docs/sandbox.md +3 -3
  139. package/docs/sentinel.md +28 -16
  140. package/docs/skills-and-gates.md +6 -11
  141. package/docs/using.md +25 -42
  142. package/genome/rules/project-model.md +2 -1
  143. package/genome/rules/test-plain-files.md +15 -7
  144. package/genome/rules/turri-regeneration.md +7 -10
  145. package/genome/skills/convert-old-syntax/SKILL.md +5 -5
  146. package/genome/skills/implement-conformance-testing-script/SKILL.md +2 -2
  147. package/genome/skills/implement-unit-testing-script/SKILL.md +3 -3
  148. package/package.json +1 -1
  149. package/dist/advisor-chat.d.ts +0 -63
  150. package/dist/advisor-chat.js +0 -290
  151. package/dist/change-plain-cli.js +0 -55
  152. package/dist/ledger-cli.d.ts +0 -1
  153. package/dist/ledger-cli.js +0 -50
  154. package/dist/ledger-tools.d.ts +0 -10
  155. package/dist/ledger-tools.js +0 -64
  156. package/dist/regenerate/advisor-records.d.ts +0 -93
  157. package/dist/regenerate/advisor-records.js +0 -110
  158. package/dist/regenerate/advisor-runs.d.ts +0 -87
  159. package/dist/regenerate/advisor-runs.js +0 -327
  160. package/dist/regenerate/engine.d.ts +0 -52
  161. package/dist/regenerate/release.d.ts +0 -121
  162. package/dist/regenerate/test-advisor.d.ts +0 -101
  163. package/dist/regenerate/test-advisor.js +0 -379
  164. package/dist/release-agent.d.ts +0 -43
  165. package/dist/release-agent.js +0 -130
  166. package/dist/release-cli.d.ts +0 -1
  167. package/dist/release-tools.d.ts +0 -44
  168. package/dist/release-tools.js +0 -170
  169. package/dist/spec-tools.d.ts +0 -36
  170. package/dist/spec-tools.js +0 -128
  171. package/dist/stacks.d.ts +0 -13
  172. package/dist/stacks.js +0 -96
  173. package/docs/deploy.md +0 -48
  174. package/docs/test-advisor.md +0 -110
  175. /package/dist/{change-plain-cli.d.ts → launch-cli.d.ts} +0 -0
@@ -1,4 +1,3 @@
1
- import { type MarshalledPlainSource } from "../plain/spec.ts";
2
1
  import { type ChunkAgents } from "./chunk-plan.ts";
3
2
  import { type SpecGap } from "./notes.ts";
4
3
  import { type Job, type JobRegistry, type PulseCases } from "./jobs.ts";
@@ -102,8 +101,8 @@ export interface ModuleStatus {
102
101
  codebases: string[];
103
102
  old?: true;
104
103
  };
105
- /** The stack it is built with - its config.turri.<stack>.yaml over config.turri.yaml - when one is. */
106
- stack?: string;
104
+ /** The module whose config.turri.<module>.yaml it is built with, over config.turri.yaml - its own, or one it requires - when one is. */
105
+ configModule?: string;
107
106
  /** Pure renames turri makes once the running pulse ends - a func-id or a scenario-id, nothing else with it: nothing regenerated. */
108
107
  renames?: string[];
109
108
  /**
@@ -142,25 +141,34 @@ export interface DriftReport {
142
141
  }
143
142
  /** What is left to regenerate, as the conversation and the command line read it. */
144
143
  export declare function describeDrift(reports: DriftReport[]): string;
145
- /** A codebase as the loop has just looked at it: its chain, its spec now, and what its code is built from (`codeTree` form). */
146
- export interface SeenSpec {
147
- chain: ChainEntry[];
148
- tree: MarshalledPlainSource;
149
- built: MarshalledPlainSource;
150
- }
151
144
  export interface WorkLoop {
152
145
  /**
153
146
  * Bring a spec's module up to the spec as the .plain files have it now - in the codebases where its
154
147
  * code lives, and every module it is built on that has to be built first - planning and starting the
155
- * first jobs. Asked again, it clears a halt. Also what a spec change is: the loop works out the work
156
- * again. `specChange`: brought up because its spec was changed, not asked for - a module the person halted stays
157
- * halted. Says what it planned.
148
+ * first jobs. Asked again, it clears a halt - one the person asked for too. Says what it planned.
158
149
  */
159
150
  bringUp(plainFile: string, options?: {
160
151
  model?: string;
161
152
  guidance?: string;
162
- specChange?: boolean;
163
153
  }): Promise<ModuleStatus[]>;
154
+ /**
155
+ * Plan a spec's module as `bringUp` would - the same codebases, its config pinned, the steering and `guidance` given
156
+ * to the planner - and start nothing: the plans are kept, and its pulses held until regenerate, conform or /regenerate
157
+ * asks for the module. Then the first pulse of the kept plan starts as it is, planned again only when the ***plain,
158
+ * what it is built from or the steering changed since. A module the person halted stays halted, and a codebase whose
159
+ * chain has a pulse running goes on as it was, planning what follows it. Says what is planned.
160
+ */
161
+ lookAhead(plainFile: string, options?: {
162
+ model?: string;
163
+ guidance?: string;
164
+ }): Promise<ModuleStatus[]>;
165
+ /**
166
+ * A planned row (`planned-<module>-N`, as `planned` names it) as the loop keeps it: its cases and, for the next pulse
167
+ * of a codebase with nothing running, the whole prompt its coding agent will get - built from the kept plan, never
168
+ * planned again. Otherwise, or when the ***plain or the steering changed since the plan was made, `why` says why no
169
+ * prompt is shown. Undefined when no row has that id.
170
+ */
171
+ plannedPulse(rowId: string): Promise<PlannedPulse | undefined>;
164
172
  /**
165
173
  * Regenerate functional specs of a module again, their spec changed or not - each named by its func-id: each is marked to regenerate again in
166
174
  * the record of every codebase it is built in - committed - and they are brought up to their spec, the marked ones
@@ -180,11 +188,20 @@ export interface WorkLoop {
180
188
  * Write and run the conformance tests of a spec's module - of the functional specs named, or of every one - on the
181
189
  * code as it is built, in the codebases where its code lives: for this session, whatever the config says. Asked
182
190
  * again, it clears a halt. Says what it planned.
191
+ *
192
+ * A functional spec named whose tests are written already has them written again: marked in the tests record of
193
+ * every codebase it is tested in - committed - and written anew there, its code untouched. `fromScratch` works where
194
+ * its code lives, as regenerating it from scratch does - the tip of each chain it is built in, never a codebase in the
195
+ * middle: the tip's tests folder taken out - committed first, so its history keeps it - and the tests written again
196
+ * there: `"module"` starting from a copy of the tests of the module the tip requires, `"chain"` from nothing, every
197
+ * functional spec of the chain written anew. The code is untouched, and nothing else is. Destructive: asked for only
198
+ * when the person asked for it. Not both: from scratch writes every one of them again.
183
199
  */
184
200
  conformance(plainFile: string, options?: {
185
201
  funcIds?: string[];
186
202
  model?: string;
187
203
  separately?: boolean;
204
+ fromScratch?: "module" | "chain";
188
205
  }): Promise<ModuleStatus[]>;
189
206
  /**
190
207
  * Start over the codebases of a spec's module that now require a module their code was not built on (see
@@ -230,14 +247,24 @@ export interface WorkLoop {
230
247
  mapPlan(): MapPlan;
231
248
  /** Resolves once nothing runs and nothing more can start. */
232
249
  drain(): Promise<void>;
233
- /** In a dry run: the job each codebase would start, with the spec it would be given. */
234
- firsts(): Array<{
235
- module: string;
236
- plainFile: string;
237
- buildDir: string;
238
- spec: SpecSnapshot;
239
- planned: PlannedJob;
240
- }>;
250
+ }
251
+ /** A planned pulse as `WorkLoop.plannedPulse` tells it. */
252
+ export interface PlannedPulse {
253
+ /** The planned row's id. */
254
+ id: string;
255
+ module: string;
256
+ plainFile: string;
257
+ title: string;
258
+ track: Track;
259
+ cases: JobCases;
260
+ /** Its place among the codebase's planned pulses, from 1. */
261
+ index: number;
262
+ /** Planned by a look ahead: it waits for regenerate, conform or /regenerate to start it. */
263
+ lookedAhead: boolean;
264
+ /** The coding agent's task, whole: the next pulse of a codebase with nothing running, from the kept plan. */
265
+ task?: string;
266
+ /** Why no task is shown, when none is. */
267
+ why?: string;
241
268
  }
242
269
  /** A pulse as the regeneration places it: by the items its trees differ in. */
243
270
  export interface MapPulse {
@@ -347,23 +374,16 @@ export declare function createWorkLoop(options: {
347
374
  /** Writes and runs a conformance job's tests. Default: a spec diff's conformance run, the whole suite with it. */
348
375
  runConformance?: JobRunner;
349
376
  /**
350
- * Under `release-after-pulse: true`, what releases a pulse that landed, as its last stage - before the pulse ends, so
351
- * the module's next pulse starts on what is released. Its last reply goes in the pulse's report. Not given: nothing is.
377
+ * A pulse landed: its codebase's commit, once its line is in the notes - the commit what is built on it builds on.
378
+ * Called before the codebase's next pulse starts; what it does - a launch, under launch-after-pulse - runs on its own.
352
379
  */
353
- release?: (input: {
380
+ landed?: (input: {
381
+ job: Job;
354
382
  plainFile: string;
355
383
  moduleName: string;
384
+ commit: string;
356
385
  title: string;
357
- onDelta: (delta: string) => void;
358
- }) => Promise<string>;
359
- /** Plan, and keep the job each codebase would start (`firsts`) - but start none. */
360
- dryRun?: boolean;
361
- /**
362
- * Told each time the loop looks at a codebase whose spec parses: its chain, the spec as the .plain files have it now,
363
- * and what its code is built from - what the test advisor watches (advisor-runs.ts). Nothing it does is the loop's
364
- * concern: one that throws is ignored.
365
- */
366
- onSpec?: (seen: SeenSpec) => void;
386
+ }) => void;
367
387
  }): WorkLoop;
368
388
  /** Why nothing runs in a codebase whose code - and conformance tests, where they are wanted - is built from its spec as it is. */
369
389
  export declare const UP_TO_DATE = "built from the ***plain as it is";
@@ -379,39 +399,6 @@ export declare function funcIdsNamed(module: string, names: string[]): string[];
379
399
  * go on. What /conform checks before it says anything.
380
400
  */
381
401
  export declare function conformanceRefusal(plainFile: string, funcIds?: string[]): string | undefined;
382
- /** The codebases the loop looks after, as the person reads them: what runs, what is planned after it, and why nothing does. */
383
- /**
384
- * The coding agent's task for a dry run's first job, built as the render builds it - and all it did rolled back. Not for
385
- * a conformance job: its prompt is built from what the code holds once it is built.
386
- */
387
- export declare function promptOf(first: ReturnType<WorkLoop["firsts"]>[number]): Promise<string | undefined>;
388
- /** The first job a codebase would start, and the prompt its coding agent would get. */
389
- export interface JobPreview {
390
- module: string;
391
- title: string;
392
- track: Track;
393
- cases: JobCases;
394
- /** The coding agent's task, whole. Not for a conformance job: it is built from what the code holds once it is built. */
395
- task?: string;
396
- }
397
- /**
398
- * What bringing a spec's module up would start, in each codebase, and the prompt of each - planned on a loop of its own
399
- * that starts nothing. A codebase `busy` says is running a job is left out: a dry run starts from its last commit, and
400
- * what the next job there is given depends on what the running one lands.
401
- */
402
- export declare function previewJobs(options: {
403
- plainFile: string;
404
- cwd: string;
405
- model?: string;
406
- plannerModel?: string;
407
- steering?: (plainFile: string) => Steering[];
408
- /** Whether a codebase, by its module, has a job running. */
409
- busy?: (module: string) => boolean;
410
- }): Promise<{
411
- statuses: ModuleStatus[];
412
- previews: JobPreview[];
413
- busy: string[];
414
- }>;
415
402
  /** Nothing runs, is planned or is waiting there, as its code is built from its spec as it is. */
416
403
  export declare function isUpToDate(status: ModuleStatus): boolean;
417
404
  export declare function describeModules(statuses: ModuleStatus[], options?: {