@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.
- package/README.md +7 -8
- package/dist/bedrock-region.js +3 -3
- package/dist/chat-idle.d.ts +2 -2
- package/dist/chat-idle.js +2 -2
- package/dist/chat-models.d.ts +1 -1
- package/dist/chat-models.js +1 -1
- package/dist/chat-scope.d.ts +1 -3
- package/dist/chat-skills.d.ts +1 -1
- package/dist/chat-skills.js +1 -1
- package/dist/chats.d.ts +44 -20
- package/dist/chats.js +125 -64
- package/dist/cli.js +12 -31
- package/dist/config-edit.d.ts +20 -8
- package/dist/config-edit.js +32 -26
- package/dist/config.d.ts +106 -78
- package/dist/config.js +267 -133
- package/dist/conform-cli.js +14 -3
- package/dist/conformance-switch.d.ts +13 -22
- package/dist/conformance-switch.js +37 -59
- package/dist/drift-cli.js +1 -1
- package/dist/extension.d.ts +17 -10
- package/dist/extension.js +435 -532
- package/dist/genome.js +10 -49
- package/dist/graph.js +3 -5
- package/dist/host-session.d.ts +11 -21
- package/dist/host-session.js +6 -8
- package/dist/host.d.ts +4 -4
- package/dist/host.js +4 -7
- package/dist/identity.js +2 -3
- package/dist/init-config.d.ts +1 -2
- package/dist/init-config.js +10 -17
- package/dist/installed-providers.d.ts +1 -1
- package/dist/installed-providers.js +1 -1
- package/dist/launch-agent.d.ts +51 -0
- package/dist/launch-agent.js +267 -0
- package/dist/{release-cli.js → launch-cli.js} +41 -24
- package/dist/launch-session.d.ts +68 -0
- package/dist/launch-session.js +217 -0
- package/dist/launch-tools.d.ts +28 -0
- package/dist/launch-tools.js +69 -0
- package/dist/launch-track.d.ts +125 -0
- package/dist/launch-track.js +320 -0
- package/dist/loop-cli.d.ts +4 -3
- package/dist/loop-cli.js +17 -15
- package/dist/loop-tools.d.ts +45 -21
- package/dist/loop-tools.js +155 -90
- package/dist/new-project.js +2 -2
- package/dist/notice.d.ts +7 -6
- package/dist/parse-cli.js +2 -2
- package/dist/pi-launch.js +4 -1
- package/dist/pi-settings.d.ts +4 -0
- package/dist/pi-settings.js +39 -0
- package/dist/pi.js +12 -9
- package/dist/plain/check.d.ts +2 -9
- package/dist/plain/check.js +6 -39
- package/dist/plain-files.d.ts +2 -2
- package/dist/plain-files.js +7 -7
- package/dist/regenerate/activity.d.ts +0 -7
- package/dist/regenerate/activity.js +2 -20
- package/dist/regenerate/agent-env.d.ts +1 -1
- package/dist/regenerate/agent-env.js +3 -3
- package/dist/regenerate/agent-shell.js +5 -3
- package/dist/regenerate/audit.js +9 -0
- package/dist/regenerate/base-folder.d.ts +2 -2
- package/dist/regenerate/base-folder.js +1 -1
- package/dist/regenerate/cases.js +7 -0
- package/dist/regenerate/chunk-plan.d.ts +5 -0
- package/dist/regenerate/chunk-plan.js +16 -1
- package/dist/regenerate/command-check.d.ts +7 -1
- package/dist/regenerate/command-check.js +43 -1
- package/dist/regenerate/delivery.d.ts +1 -1
- package/dist/regenerate/delivery.js +3 -3
- package/dist/regenerate/drift.d.ts +4 -0
- package/dist/regenerate/drift.js +26 -6
- package/dist/regenerate/failure-reports.d.ts +28 -0
- package/dist/regenerate/failure-reports.js +79 -0
- package/dist/regenerate/job-panel.js +3 -1
- package/dist/regenerate/jobs-tree.js +1 -1
- package/dist/regenerate/jobs.d.ts +4 -2
- package/dist/regenerate/jobs.js +14 -10
- package/dist/regenerate/launch.d.ts +154 -0
- package/dist/regenerate/{release.js → launch.js} +195 -51
- package/dist/regenerate/ledger-view.d.ts +11 -24
- package/dist/regenerate/ledger-view.js +14 -60
- package/dist/regenerate/ledger.d.ts +34 -16
- package/dist/regenerate/ledger.js +1 -1
- package/dist/regenerate/lineage.d.ts +2 -0
- package/dist/regenerate/lineage.js +8 -0
- package/dist/regenerate/loop.d.ts +54 -67
- package/dist/regenerate/loop.js +312 -148
- package/dist/regenerate/model-names.d.ts +33 -0
- package/dist/regenerate/{engine.js → model-names.js} +2 -28
- package/dist/regenerate/paths.d.ts +3 -3
- package/dist/regenerate/paths.js +4 -4
- package/dist/regenerate/records.d.ts +11 -0
- package/dist/regenerate/records.js +15 -0
- package/dist/regenerate/regenerate.d.ts +0 -2
- package/dist/regenerate/regenerate.js +4 -15
- package/dist/regenerate/renames.js +4 -4
- package/dist/regenerate/requires.d.ts +7 -0
- package/dist/regenerate/requires.js +24 -18
- package/dist/regenerate/scripts-being-written.d.ts +4 -4
- package/dist/regenerate/scripts-being-written.js +3 -3
- package/dist/regenerate/spec-map.js +3 -3
- package/dist/regenerate/standing.js +1 -1
- package/dist/regenerate/submit-work.d.ts +2 -0
- package/dist/regenerate/submit-work.js +8 -3
- package/dist/regenerate/test-scripts.d.ts +2 -1
- package/dist/regenerate/test-scripts.js +33 -23
- package/dist/regenerate/testing-steps.d.ts +16 -5
- package/dist/regenerate/testing-steps.js +28 -9
- package/dist/regenerate-cli.js +18 -9
- package/dist/self-invocation.d.ts +11 -0
- package/dist/self-invocation.js +36 -10
- package/dist/sentinel-check.d.ts +3 -3
- package/dist/sentinel-check.js +3 -3
- package/dist/sentinel.d.ts +18 -12
- package/dist/sentinel.js +75 -46
- package/dist/{config-command.d.ts → settings.d.ts} +13 -8
- package/dist/{config-command.js → settings.js} +155 -24
- package/dist/setup.d.ts +2 -2
- package/dist/setup.js +7 -7
- package/dist/skill.d.ts +0 -11
- package/dist/skill.js +0 -9
- package/dist/tools.js +2 -3
- package/dist/turri-versions.js +2 -1
- package/docs/README.md +4 -6
- package/docs/authoring-plain.md +3 -3
- package/docs/chats.md +6 -9
- package/docs/claude-subscription.md +2 -2
- package/docs/config.md +61 -51
- package/docs/development.md +4 -5
- package/docs/headless.md +7 -6
- package/docs/hosting.md +25 -24
- package/docs/launch.md +67 -0
- package/docs/parser.md +3 -3
- package/docs/regenerating.md +30 -22
- package/docs/sandbox.md +3 -3
- package/docs/sentinel.md +28 -16
- package/docs/skills-and-gates.md +6 -11
- package/docs/using.md +25 -42
- package/genome/rules/project-model.md +2 -1
- package/genome/rules/test-plain-files.md +15 -7
- package/genome/rules/turri-regeneration.md +7 -10
- package/genome/skills/convert-old-syntax/SKILL.md +5 -5
- package/genome/skills/implement-conformance-testing-script/SKILL.md +2 -2
- package/genome/skills/implement-unit-testing-script/SKILL.md +3 -3
- package/package.json +1 -1
- package/dist/advisor-chat.d.ts +0 -63
- package/dist/advisor-chat.js +0 -290
- package/dist/change-plain-cli.js +0 -55
- package/dist/ledger-cli.d.ts +0 -1
- package/dist/ledger-cli.js +0 -50
- package/dist/ledger-tools.d.ts +0 -10
- package/dist/ledger-tools.js +0 -64
- package/dist/regenerate/advisor-records.d.ts +0 -93
- package/dist/regenerate/advisor-records.js +0 -110
- package/dist/regenerate/advisor-runs.d.ts +0 -87
- package/dist/regenerate/advisor-runs.js +0 -327
- package/dist/regenerate/engine.d.ts +0 -52
- package/dist/regenerate/release.d.ts +0 -121
- package/dist/regenerate/test-advisor.d.ts +0 -101
- package/dist/regenerate/test-advisor.js +0 -379
- package/dist/release-agent.d.ts +0 -43
- package/dist/release-agent.js +0 -130
- package/dist/release-cli.d.ts +0 -1
- package/dist/release-tools.d.ts +0 -44
- package/dist/release-tools.js +0 -170
- package/dist/spec-tools.d.ts +0 -36
- package/dist/spec-tools.js +0 -128
- package/dist/stacks.d.ts +0 -13
- package/dist/stacks.js +0 -96
- package/docs/deploy.md +0 -48
- package/docs/test-advisor.md +0 -110
- /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
|
|
106
|
-
|
|
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
|
|
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
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
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
|
-
*
|
|
351
|
-
* the
|
|
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
|
-
|
|
380
|
+
landed?: (input: {
|
|
381
|
+
job: Job;
|
|
354
382
|
plainFile: string;
|
|
355
383
|
moduleName: string;
|
|
384
|
+
commit: string;
|
|
356
385
|
title: string;
|
|
357
|
-
|
|
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?: {
|