@turri-dev/cli 0.2.4-next.240620d → 0.2.4-next.359b847
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 +6 -7
- package/dist/bedrock-region.js +3 -3
- 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 -10
- package/dist/chats.js +125 -41
- package/dist/cli.js +10 -26
- package/dist/config-edit.d.ts +20 -8
- package/dist/config-edit.js +32 -24
- package/dist/config.d.ts +101 -58
- package/dist/config.js +265 -118
- package/dist/conform-cli.js +14 -3
- package/dist/conformance-switch.d.ts +7 -6
- package/dist/conformance-switch.js +19 -16
- package/dist/extension.d.ts +29 -3
- package/dist/extension.js +375 -351
- package/dist/genome.js +5 -1
- package/dist/host-session.d.ts +8 -7
- package/dist/host-session.js +4 -4
- package/dist/host.d.ts +3 -1
- package/dist/host.js +3 -3
- package/dist/identity.js +2 -2
- package/dist/init-config.d.ts +1 -1
- package/dist/init-config.js +8 -8
- 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.js +4 -4
- package/dist/loop-tools.d.ts +45 -21
- package/dist/loop-tools.js +152 -82
- package/dist/notice.d.ts +7 -6
- package/dist/parse-cli.js +2 -2
- package/dist/pi-launch.js +3 -0
- package/dist/pi-settings.d.ts +4 -0
- package/dist/pi-settings.js +39 -0
- package/dist/pi.js +6 -3
- package/dist/plain/check.d.ts +1 -1
- package/dist/plain/check.js +3 -1
- package/dist/plain-files.d.ts +2 -2
- package/dist/plain-files.js +7 -7
- 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/job-panel.js +3 -1
- package/dist/regenerate/jobs.d.ts +2 -2
- package/dist/regenerate/jobs.js +10 -10
- package/dist/regenerate/launch.d.ts +154 -0
- package/dist/regenerate/{release.js → launch.js} +195 -51
- package/dist/regenerate/ledger.d.ts +33 -2
- package/dist/regenerate/lineage.d.ts +2 -0
- package/dist/regenerate/lineage.js +8 -0
- package/dist/regenerate/loop.d.ts +30 -10
- package/dist/regenerate/loop.js +166 -59
- 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.js +4 -1
- 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/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 +6 -6
- package/dist/regenerate/testing-steps.js +8 -8
- package/dist/regenerate-cli.js +1 -1
- package/dist/self-invocation.d.ts +11 -0
- package/dist/self-invocation.js +36 -7
- 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 +72 -43
- 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/turri-versions.js +2 -1
- package/docs/README.md +4 -4
- package/docs/chats.md +5 -6
- package/docs/claude-subscription.md +2 -2
- package/docs/config.md +58 -46
- package/docs/development.md +2 -2
- package/docs/headless.md +4 -4
- package/docs/hosting.md +20 -19
- package/docs/launch.md +67 -0
- package/docs/parser.md +2 -2
- package/docs/regenerating.md +21 -15
- package/docs/sandbox.md +3 -3
- package/docs/sentinel.md +26 -14
- package/docs/skills-and-gates.md +4 -4
- package/docs/using.md +19 -28
- package/genome/rules/project-model.md +2 -1
- package/genome/rules/turri-regeneration.md +5 -3
- 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/regenerate/engine.d.ts +0 -52
- package/dist/regenerate/release.d.ts +0 -121
- package/dist/release-agent.d.ts +0 -43
- package/dist/release-agent.js +0 -130
- package/dist/release-tools.d.ts +0 -44
- package/dist/release-tools.js +0 -170
- package/dist/stacks.d.ts +0 -13
- package/dist/stacks.js +0 -96
- package/docs/deploy.md +0 -48
- /package/dist/{release-cli.d.ts → launch-cli.d.ts} +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Whether a project's functional specs are conformance tested: `conformance-tests:` in its config, a
|
|
3
|
-
* project's, false when unset. Conformance testing is a validation step that makes each change take about twice as long,
|
|
2
|
+
* Whether a project's functional specs are conformance tested: `conformance-tests:` in its config, a module's own file's
|
|
3
|
+
* over the project's, false when unset. Conformance testing is a validation step that makes each change take about twice as long,
|
|
4
4
|
* so it is off until the person turns it on - with /conform, or the setting - and they keep it off to iterate fast. Off,
|
|
5
5
|
* nothing of conformance testing runs - no conformance pulse, no conformance testing script, the
|
|
6
6
|
* chat's conform refused; the test plain files there are kept, and not tested. The chat never turns them on: it says why
|
|
@@ -8,13 +8,14 @@
|
|
|
8
8
|
*/
|
|
9
9
|
/** Why the chat's conform, or a skill that writes the conformance testing script, is refused while they are off. */
|
|
10
10
|
export declare const CONFORMANCE_OFF_REFUSAL: string;
|
|
11
|
-
/** Whether a module's functional specs are conformance tested: its
|
|
11
|
+
/** Whether a module's functional specs are conformance tested: its own file's `conformance-tests:` over the project's. */
|
|
12
12
|
export declare function conformanceTestsOn(plainFile: string): boolean;
|
|
13
|
-
/** Whether the project conformance tests anything: its own config, or a
|
|
13
|
+
/** Whether the project conformance tests anything: its own config, or a module's own file - for the chat's tools, which are the project's. */
|
|
14
14
|
export declare function conformanceTestsOnIn(project: string): boolean;
|
|
15
15
|
/**
|
|
16
|
-
* Turn conformance testing on: `conformance-tests: true` written where the module's value comes from - its
|
|
17
|
-
* when that names the key, else config.turri.yaml - and in effect at once.
|
|
16
|
+
* Turn conformance testing on: `conformance-tests: true` written where the module's value comes from - its config
|
|
17
|
+
* file, its own or one of a module it requires, when that names the key, else config.turri.yaml - and in effect at once.
|
|
18
|
+
* Says which file.
|
|
18
19
|
*/
|
|
19
20
|
export declare function turnOnConformanceTests(project: string, plainFile?: string): string;
|
|
20
21
|
/**
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { existsSync, readFileSync, writeFileSync } from "node:fs";
|
|
2
2
|
import { join, resolve } from "node:path";
|
|
3
|
-
import { adoptLegacyConfig, CONFIG_FILE, CONFIG_KEYS, configForSpec, readConfigFile, readProjectConfig,
|
|
3
|
+
import { adoptLegacyConfig, CONFIG_FILE, CONFIG_KEYS, configForSpec, readConfigFile, readProjectConfig, moduleConfigFileIn, configModuleFor, moduleConfigsOf } from "./config.js";
|
|
4
4
|
import { withSetting, writeSetting } from "./config-edit.js";
|
|
5
5
|
/**
|
|
6
|
-
* Whether a project's functional specs are conformance tested: `conformance-tests:` in its config, a
|
|
7
|
-
* project's, false when unset. Conformance testing is a validation step that makes each change take about twice as long,
|
|
6
|
+
* Whether a project's functional specs are conformance tested: `conformance-tests:` in its config, a module's own file's
|
|
7
|
+
* over the project's, false when unset. Conformance testing is a validation step that makes each change take about twice as long,
|
|
8
8
|
* so it is off until the person turns it on - with /conform, or the setting - and they keep it off to iterate fast. Off,
|
|
9
9
|
* nothing of conformance testing runs - no conformance pulse, no conformance testing script, the
|
|
10
10
|
* chat's conform refused; the test plain files there are kept, and not tested. The chat never turns them on: it says why
|
|
@@ -14,8 +14,8 @@ import { withSetting, writeSetting } from "./config-edit.js";
|
|
|
14
14
|
export const CONFORMANCE_OFF_REFUSAL = "Conformance tests are off for this project (conformance-tests: false, or unset), and turning them on is the person's " +
|
|
15
15
|
"decision: they make each change take about twice as long, and the person keeps them off to iterate fast. Tell the " +
|
|
16
16
|
"person, in a line or two, why you want conformance tests here; they decide, and turn them on with /conform - which " +
|
|
17
|
-
"also starts them - or /
|
|
18
|
-
/** Whether a module's functional specs are conformance tested: its
|
|
17
|
+
"also starts them - or /settings conformance-tests true. Nothing was started.";
|
|
18
|
+
/** Whether a module's functional specs are conformance tested: its own file's `conformance-tests:` over the project's. */
|
|
19
19
|
export function conformanceTestsOn(plainFile) {
|
|
20
20
|
try {
|
|
21
21
|
return configForSpec(resolve(plainFile)).conformanceTests === true;
|
|
@@ -24,29 +24,29 @@ export function conformanceTestsOn(plainFile) {
|
|
|
24
24
|
return false;
|
|
25
25
|
}
|
|
26
26
|
}
|
|
27
|
-
/** Whether the project conformance tests anything: its own config, or a
|
|
27
|
+
/** Whether the project conformance tests anything: its own config, or a module's own file - for the chat's tools, which are the project's. */
|
|
28
28
|
export function conformanceTestsOnIn(project) {
|
|
29
29
|
try {
|
|
30
|
-
|
|
31
|
-
return readProjectConfig(project).conformanceTests === true || stacks.some((stack) => readProjectConfig(project, stack).conformanceTests === true);
|
|
30
|
+
return readProjectConfig(project).conformanceTests === true || moduleConfigsOf(project).some((module) => readProjectConfig(project, module).conformanceTests === true);
|
|
32
31
|
}
|
|
33
32
|
catch {
|
|
34
33
|
return false;
|
|
35
34
|
}
|
|
36
35
|
}
|
|
37
36
|
/**
|
|
38
|
-
* Turn conformance testing on: `conformance-tests: true` written where the module's value comes from - its
|
|
39
|
-
* when that names the key, else config.turri.yaml - and in effect at once.
|
|
37
|
+
* Turn conformance testing on: `conformance-tests: true` written where the module's value comes from - its config
|
|
38
|
+
* file, its own or one of a module it requires, when that names the key, else config.turri.yaml - and in effect at once.
|
|
39
|
+
* Says which file.
|
|
40
40
|
*/
|
|
41
41
|
export function turnOnConformanceTests(project, plainFile) {
|
|
42
|
-
const
|
|
43
|
-
if (
|
|
44
|
-
const file = join(project,
|
|
42
|
+
const module = plainFile !== undefined ? configModuleFor(resolve(plainFile)) : undefined;
|
|
43
|
+
if (module !== undefined) {
|
|
44
|
+
const file = join(project, moduleConfigFileIn(project, module));
|
|
45
45
|
if (existsSync(file) && readConfigFile(file).conformanceTests !== undefined) {
|
|
46
46
|
adoptLegacyConfig(project);
|
|
47
|
-
const own = join(project,
|
|
47
|
+
const own = join(project, moduleConfigFileIn(project, module));
|
|
48
48
|
writeFileSync(own, withSetting(readFileSync(own, "utf8"), CONFIG_KEYS.conformanceTests, true));
|
|
49
|
-
return
|
|
49
|
+
return moduleConfigFileIn(project, module);
|
|
50
50
|
}
|
|
51
51
|
}
|
|
52
52
|
writeSetting(project, CONFIG_KEYS.conformanceTests, true);
|
|
@@ -69,6 +69,9 @@ export function conformanceBlock(on) {
|
|
|
69
69
|
"They are on here (conformance-tests: true): functional specs with scenarios are conformance tested once their code is",
|
|
70
70
|
"built. As you write or change a functional spec, judge whether it needs scenarios, as the rules on test plain files say,",
|
|
71
71
|
"and write them when it does - in the same change, a visible ***plain change the person reviews like any other.",
|
|
72
|
+
"Scenarios are tested only once their module has test reqs and the project a conformance testing script: when you",
|
|
73
|
+
"write scenarios and one of those is missing, write it first, in that order - the test reqs, then the script with",
|
|
74
|
+
"implement-conformance-testing-script - asking nothing: conformance tests on is the person's yes to them.",
|
|
72
75
|
].join("\n")
|
|
73
76
|
: [
|
|
74
77
|
"They are off here (conformance-tests: false, or unset). They make each change take about twice as long, so the person",
|
|
@@ -76,7 +79,7 @@ export function conformanceBlock(on) {
|
|
|
76
79
|
"no conformance testing script either, and conform is refused. Test plain files already there are",
|
|
77
80
|
"kept, and not tested. When you think conformance tests are worth it here - the person asks for tests, a functional spec",
|
|
78
81
|
"could go wrong silently, or the coding agent keeps failing at one - tell them in a line or two why, and what it costs.",
|
|
79
|
-
"They decide, and turn them on with /conform - which also tests what is built - or /
|
|
82
|
+
"They decide, and turn them on with /conform - which also tests what is built - or /settings conformance-tests true.",
|
|
80
83
|
].join("\n"),
|
|
81
84
|
"</conformance-tests>",
|
|
82
85
|
].join("\n");
|
package/dist/extension.d.ts
CHANGED
|
@@ -6,6 +6,7 @@ import { fromWorkingDir } from "./loop-tools.ts";
|
|
|
6
6
|
import { type WorkLoop } from "./regenerate/loop.ts";
|
|
7
7
|
import { type AskUser, type AskUserIO } from "./ask.ts";
|
|
8
8
|
import { type TurriCore, type TurriHost } from "./chats.ts";
|
|
9
|
+
import { type Job } from "./regenerate/jobs.ts";
|
|
9
10
|
/**
|
|
10
11
|
* Puts a skill step's question to the person, when there is one to ask.
|
|
11
12
|
*
|
|
@@ -14,6 +15,12 @@ import { type TurriCore, type TurriHost } from "./chats.ts";
|
|
|
14
15
|
* exchange is therefore reported back, so the interview is visible while it happens and
|
|
15
16
|
* survives in the tool's result afterwards.
|
|
16
17
|
*/
|
|
18
|
+
/**
|
|
19
|
+
* What a question gets with nobody to answer it - print, json and rpc modes. What is the agent's to decide it decides; the
|
|
20
|
+
* person's own files it leaves as they are, as it would have without their yes - a testing script it finds wrong is said,
|
|
21
|
+
* not rewritten.
|
|
22
|
+
*/
|
|
23
|
+
export declare const NO_USER_ANSWER: string;
|
|
17
24
|
export declare function askUserVia(ctx: ExtensionContext, onExchange: (question: string, answer: string, said?: string) => void,
|
|
18
25
|
/** Given, "/btw ..." typed as an answer is a side question: answered with this, and the question asked again. */
|
|
19
26
|
aside?: (question: string) => Promise<string>,
|
|
@@ -64,14 +71,25 @@ export declare function asksOneByOne(words: string): boolean;
|
|
|
64
71
|
export declare function shownAfterCommand(pi: ExtensionAPI, ctx: ExtensionContext, command: string, text: string, level: NonNullable<CommandOutcome["level"]>,
|
|
65
72
|
/** The command is in the chat already, above it (echoCommand): the text alone. */
|
|
66
73
|
echoed?: boolean, react?: string): void;
|
|
74
|
+
/**
|
|
75
|
+
* What a slash command found for the agent alone - guidance the person need not see: put in the conversation unseen,
|
|
76
|
+
* and the agent started on it - at once when it is idle, else once its turn ends - told what to do with it.
|
|
77
|
+
*/
|
|
78
|
+
export declare function toldAfterCommand(pi: ExtensionAPI, command: string, text: string, react: string): void;
|
|
67
79
|
/**
|
|
68
80
|
* What the agent does once /regenerate or /conform has started pulses: a command's output alone leaves the chat silent,
|
|
69
81
|
* and the person wondering whether to wait. It says what runs, and that they need not - and starts nothing itself.
|
|
70
82
|
*/
|
|
71
83
|
export declare const COMMAND_STARTED_REACTION: string;
|
|
72
84
|
/**
|
|
73
|
-
* What the agent does when /conform
|
|
74
|
-
*
|
|
85
|
+
* What the agent does when /conform found a step of adding tests still to take: takes it at once, asking nothing - the
|
|
86
|
+
* /conform was the person's yes - and says what it writes as the way there, never as a failure: the person saw none.
|
|
87
|
+
*/
|
|
88
|
+
export declare const CONFORM_STEPS_REACTION: string;
|
|
89
|
+
/**
|
|
90
|
+
* What the agent does when /conform started nothing for a reason that is not a step of adding tests - a functional spec
|
|
91
|
+
* named that is not there, words it does not take: answers it at once - why, and what would let it start - rather than
|
|
92
|
+
* leave the person with a refusal and a silent chat.
|
|
75
93
|
*/
|
|
76
94
|
export declare const CONFORM_REFUSED_REACTION: string;
|
|
77
95
|
export declare const COMMAND_OUTCOME = "turri_command_outcome";
|
|
@@ -132,11 +150,19 @@ export declare function projectConfigBlock(root: string): string;
|
|
|
132
150
|
/**
|
|
133
151
|
* Conformance tests turned on, for the session: `conformance-tests: true` written where the module's value comes from
|
|
134
152
|
* (conformance-switch.ts) - what /conform does when they are off, and a host's turnOnConformance. Every chat is told at
|
|
135
|
-
* its next turn. `plainFile`, absolute or from the project, picks the module whose
|
|
153
|
+
* its next turn. `plainFile`, absolute or from the project, picks the module whose own file
|
|
136
154
|
* is written when that names the key. Returns the file written, from the project. Starts no conformance pulse.
|
|
137
155
|
*/
|
|
138
156
|
export declare function turnOnConformance(core: TurriCore, plainFile?: string): string;
|
|
139
157
|
export { fromWorkingDir };
|
|
158
|
+
/**
|
|
159
|
+
* What a chat's agent is told of a pulse it asked for that ended, with the sentinel off. One that landed under
|
|
160
|
+
* launch-after-pulse is being launched as it is told: it says so, and offers nothing else for it - it is told once the
|
|
161
|
+
* launch ends.
|
|
162
|
+
*/
|
|
163
|
+
export declare function pulseEndNote(job: Job, options?: {
|
|
164
|
+
launching?: boolean;
|
|
165
|
+
}): string;
|
|
140
166
|
/**
|
|
141
167
|
* What the agent is to do with a job that just ended, unasked: what the project's guidance says to do then, or else say
|
|
142
168
|
* in a line or two what ended - the person saw it end already, in the transcript.
|