@turri-dev/cli 0.1.6 → 0.1.7-next.9aec40e
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/dist/ask.d.ts +83 -0
- package/dist/brand.d.ts +13 -0
- package/dist/btw.d.ts +67 -0
- package/dist/chat-models.d.ts +22 -0
- package/dist/chat-skills.d.ts +17 -0
- package/dist/cli-options.d.ts +25 -0
- package/dist/cli.d.ts +9 -0
- package/dist/config-command.d.ts +26 -0
- package/dist/config-edit.d.ts +69 -0
- package/dist/config.d.ts +321 -0
- package/dist/conform-cli.d.ts +1 -0
- package/dist/cultivate-cli.d.ts +1 -0
- package/dist/drift-cli.d.ts +1 -0
- package/dist/environment.d.ts +39 -0
- package/dist/extension.d.ts +147 -0
- package/dist/extension.js +36 -10
- package/dist/genome.d.ts +62 -0
- package/dist/graph.d.ts +52 -0
- package/dist/host.d.ts +20 -0
- package/dist/host.js +23 -0
- package/dist/identity.d.ts +2 -0
- package/dist/init-config.d.ts +106 -0
- package/dist/jellyfish.d.ts +25 -0
- package/dist/judge.d.ts +25 -0
- package/dist/lineage-cli.d.ts +1 -0
- package/dist/loop-cli.d.ts +34 -0
- package/dist/loop-tools.d.ts +80 -0
- package/dist/mature-tools.d.ts +53 -0
- package/dist/model-check.d.ts +42 -0
- package/dist/module-report.d.ts +9 -0
- package/dist/pi-launch.d.ts +1 -0
- package/dist/pi.d.ts +246 -0
- package/dist/picture-row.d.ts +10 -0
- package/dist/plain/check.d.ts +23 -0
- package/dist/plain/concepts.d.ts +11 -0
- package/dist/plain/errors.d.ts +22 -0
- package/dist/plain/files.d.ts +12 -0
- package/dist/plain/highlight.d.ts +42 -0
- package/dist/plain/index.d.ts +15 -0
- package/dist/plain/liquid.d.ts +22 -0
- package/dist/plain/markdown.d.ts +74 -0
- package/dist/plain/parser.d.ts +87 -0
- package/dist/plain/spec.d.ts +90 -0
- package/dist/plain/stdlib.d.ts +14 -0
- package/dist/question-dialog.d.ts +51 -0
- package/dist/questioning.d.ts +55 -0
- package/dist/quiet.d.ts +34 -0
- package/dist/regenerate/activity.d.ts +207 -0
- package/dist/regenerate/agent-env.d.ts +44 -0
- package/dist/regenerate/agent-shell.d.ts +49 -0
- package/dist/regenerate/arbiter.d.ts +68 -0
- package/dist/regenerate/audit.d.ts +69 -0
- package/dist/regenerate/cases.d.ts +9 -0
- package/dist/regenerate/change-view.d.ts +18 -0
- package/dist/regenerate/choose-conformance.d.ts +32 -0
- package/dist/regenerate/chunk-plan.d.ts +164 -0
- package/dist/regenerate/codebase.d.ts +21 -0
- package/dist/regenerate/command-check.d.ts +40 -0
- package/dist/regenerate/compaction.d.ts +13 -0
- package/dist/regenerate/confine.d.ts +62 -0
- package/dist/regenerate/conform.d.ts +63 -0
- package/dist/regenerate/conformance-agents.d.ts +405 -0
- package/dist/regenerate/conformance.d.ts +189 -0
- package/dist/regenerate/conversation-writes.d.ts +10 -0
- package/dist/regenerate/credentials.d.ts +18 -0
- package/dist/regenerate/debug-log.d.ts +54 -0
- package/dist/regenerate/debugger.d.ts +31 -0
- package/dist/regenerate/delivery.d.ts +6 -0
- package/dist/regenerate/diagnose-job.d.ts +2 -0
- package/dist/regenerate/diagnose.d.ts +46 -0
- package/dist/regenerate/diff-view.d.ts +61 -0
- package/dist/regenerate/drift.d.ts +84 -0
- package/dist/regenerate/engine.d.ts +52 -0
- package/dist/regenerate/environment-error.d.ts +136 -0
- package/dist/regenerate/job-log.d.ts +28 -0
- package/dist/regenerate/job-panel.d.ts +122 -0
- package/dist/regenerate/jobs-tree.d.ts +71 -0
- package/dist/regenerate/jobs.d.ts +186 -0
- package/dist/regenerate/lanes.d.ts +16 -0
- package/dist/regenerate/lineage.d.ts +95 -0
- package/dist/regenerate/list-arguments.d.ts +21 -0
- package/dist/regenerate/loop.d.ts +392 -0
- package/dist/regenerate/masking.d.ts +19 -0
- package/dist/regenerate/notes.d.ts +159 -0
- package/dist/regenerate/os-sandbox.d.ts +89 -0
- package/dist/regenerate/panel-dock.d.ts +23 -0
- package/dist/regenerate/paths.d.ts +92 -0
- package/dist/regenerate/plain-palette.d.ts +34 -0
- package/dist/regenerate/prompt.d.ts +192 -0
- package/dist/regenerate/records.d.ts +88 -0
- package/dist/regenerate/regenerate.d.ts +108 -0
- package/dist/regenerate/regression.d.ts +58 -0
- package/dist/regenerate/release.d.ts +123 -0
- package/dist/regenerate/requires.d.ts +96 -0
- package/dist/regenerate/resources.d.ts +53 -0
- package/dist/regenerate/self-check.d.ts +29 -0
- package/dist/regenerate/services.d.ts +28 -0
- package/dist/regenerate/shell.d.ts +91 -0
- package/dist/regenerate/side-panel.d.ts +57 -0
- package/dist/regenerate/spec-map-view.d.ts +139 -0
- package/dist/regenerate/spec-map.d.ts +138 -0
- package/dist/regenerate/spec-steps.d.ts +137 -0
- package/dist/regenerate/state.d.ts +20 -0
- package/dist/regenerate/steer.d.ts +34 -0
- package/dist/regenerate/steering.d.ts +56 -0
- package/dist/regenerate/stop-report.d.ts +43 -0
- package/dist/regenerate/submit-work.d.ts +42 -0
- package/dist/regenerate/test-kinds.d.ts +42 -0
- package/dist/regenerate/test-scripts.d.ts +221 -0
- package/dist/regenerate/testing.d.ts +141 -0
- package/dist/regenerate/transcript-view.d.ts +21 -0
- package/dist/regenerate/unit-gate.d.ts +27 -0
- package/dist/regenerate/unit-review.d.ts +152 -0
- package/dist/regenerate/web.d.ts +61 -0
- package/dist/regenerate/workspace.d.ts +12 -0
- package/dist/regenerate-cli.d.ts +1 -0
- package/dist/release-agent.d.ts +26 -0
- package/dist/release-cli.d.ts +1 -0
- package/dist/release-tools.d.ts +38 -0
- package/dist/resume-line.d.ts +2 -0
- package/dist/review/live.d.ts +72 -0
- package/dist/rules.d.ts +20 -0
- package/dist/run-report.d.ts +88 -0
- package/dist/screen-padding.d.ts +28 -0
- package/dist/self-invocation.d.ts +25 -0
- package/dist/setup.d.ts +43 -0
- package/dist/skill-progress.d.ts +46 -0
- package/dist/skill.d.ts +98 -0
- package/dist/skills.d.ts +30 -0
- package/dist/spec-diff-cli.d.ts +1 -0
- package/dist/spec-tools.d.ts +36 -0
- package/dist/stack.d.ts +58 -0
- package/dist/stacks.d.ts +12 -0
- package/dist/stdlib.d.ts +27 -0
- package/dist/terminal-images.d.ts +2 -0
- package/dist/tools.d.ts +101 -0
- package/dist/validate-cli.d.ts +1 -0
- package/docs/README.md +2 -0
- package/docs/hosting.md +51 -0
- package/package.json +8 -1
|
@@ -0,0 +1,405 @@
|
|
|
1
|
+
import type { AgentSession, ToolDefinition } from "@earendil-works/pi-coding-agent";
|
|
2
|
+
import { type ScriptRun, type TestScripts } from "./test-scripts.ts";
|
|
3
|
+
import type { JobCases } from "./drift.ts";
|
|
4
|
+
/**
|
|
5
|
+
* The agents a conformance run needs beside the one that writes the tests.
|
|
6
|
+
*
|
|
7
|
+
* The conformance tests are rendered apart from the code, in their own folder, by an agent
|
|
8
|
+
* that may read the code but writes only tests. Before it starts, an explorer reads the code and
|
|
9
|
+
* writes down how the built software is invoked from outside. When the harness's run of the suite
|
|
10
|
+
* fails, a judge reads both, against the spec, and says which is wrong: the code goes to a coding
|
|
11
|
+
* agent, which works in the code folder and may read the tests, the tests go back to
|
|
12
|
+
* their author.
|
|
13
|
+
*/
|
|
14
|
+
/** What the explorer, the judge and the coding agent are told the spec says. */
|
|
15
|
+
export interface SpecContext {
|
|
16
|
+
moduleName: string;
|
|
17
|
+
/** The spec, as its agents are shown it: the definitions, the reqs, the functional specs. */
|
|
18
|
+
text: string;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* What an explorer hands the author of the conformance tests: how the software is built and run, how each functionality is reached from outside,
|
|
22
|
+
* what it needs around it, and a plan for the tests.
|
|
23
|
+
*/
|
|
24
|
+
export interface Exploration {
|
|
25
|
+
buildAndRun: string;
|
|
26
|
+
/**
|
|
27
|
+
* How the conformance tests, run by the project's conformance testing script, reach it: what the
|
|
28
|
+
* script builds or installs and where, the coordinates, paths or classes the tests depend on or
|
|
29
|
+
* start, and whether they start it themselves.
|
|
30
|
+
*/
|
|
31
|
+
testsReachIt: string;
|
|
32
|
+
interfaces: Array<{
|
|
33
|
+
module: string;
|
|
34
|
+
frid: string;
|
|
35
|
+
how: string;
|
|
36
|
+
}>;
|
|
37
|
+
environment: string;
|
|
38
|
+
plan: Array<{
|
|
39
|
+
module: string;
|
|
40
|
+
frid: string;
|
|
41
|
+
tests: string;
|
|
42
|
+
}>;
|
|
43
|
+
other?: string;
|
|
44
|
+
}
|
|
45
|
+
/** An exploration as the test author, and the judge, read it. */
|
|
46
|
+
export declare function explorationText(exploration: Exploration, replies?: string[]): string;
|
|
47
|
+
/**
|
|
48
|
+
* What an exploration lacks for the conformance tests to be written from it alone, or nothing when
|
|
49
|
+
* it is whole: how to build and run it, and - for every functionality the tests are for - how it
|
|
50
|
+
* is reached and what to test.
|
|
51
|
+
*/
|
|
52
|
+
/**
|
|
53
|
+
* How many tool calls the agents with one thing to decide may make before they are told to decide:
|
|
54
|
+
* the explorer its account, the reviewer its review, the judge its verdict. Past twice that, the turn
|
|
55
|
+
* is stopped. A judge that reads 40 files has read enough; one that has not decided by then is going
|
|
56
|
+
* round in a circle.
|
|
57
|
+
*/
|
|
58
|
+
export declare const EXPLORER_CALLS = 40;
|
|
59
|
+
export declare const REVIEWER_CALLS = 40;
|
|
60
|
+
export declare const JUDGE_CALLS = 30;
|
|
61
|
+
/** How long an exploration may be: the interface, not the code. Longer is sent back to be cut down. */
|
|
62
|
+
export declare const MAX_EXPLORATION_CHARS = 12000;
|
|
63
|
+
/** How many times the explorer may hand an exploration over: each ends its turn, and is checked. */
|
|
64
|
+
export declare const EXPLORATION_SUBMISSIONS = 3;
|
|
65
|
+
export declare function explorationProblems(exploration: Exploration | undefined, scope: ConflictScope, moduleName: string,
|
|
66
|
+
/** The functionalities whose acceptance tests the plan has to carry out, and how many each has. */
|
|
67
|
+
acceptance?: Array<{
|
|
68
|
+
module: string;
|
|
69
|
+
frid: string;
|
|
70
|
+
count: number;
|
|
71
|
+
}>): string[];
|
|
72
|
+
/**
|
|
73
|
+
* How the built software is invoked from outside, and a plan for its conformance tests, as an agent
|
|
74
|
+
* that explored the code writes it - everything the tests' author works
|
|
75
|
+
* from. Checked before it is used: it has to cover every functionality the tests are for, and is sent
|
|
76
|
+
* back until it does. What the explorer wrote in its replies goes with an account it never completed.
|
|
77
|
+
*/
|
|
78
|
+
export declare function exploreInvocation(options: {
|
|
79
|
+
buildDir: string;
|
|
80
|
+
spec: SpecContext;
|
|
81
|
+
/** The functionalities of the codebase, and the one under test - none for a spec change. */
|
|
82
|
+
scope: ConflictScope;
|
|
83
|
+
/** The project's conformance testing script: how the tests are built and run, and so how they reach the software. */
|
|
84
|
+
testingScripts?: ShownScript[];
|
|
85
|
+
/**
|
|
86
|
+
* Asked again: the tests written from the last account keep failing the same way, most likely for
|
|
87
|
+
* something they need of the software that it left out. The failing run, as the harness saw it.
|
|
88
|
+
*/
|
|
89
|
+
question?: {
|
|
90
|
+
failure: string;
|
|
91
|
+
account: string;
|
|
92
|
+
};
|
|
93
|
+
/** The functionalities whose acceptance tests the plan has to carry out, and how many each has. */
|
|
94
|
+
acceptance?: Array<{
|
|
95
|
+
module: string;
|
|
96
|
+
frid: string;
|
|
97
|
+
count: number;
|
|
98
|
+
}>;
|
|
99
|
+
label: string;
|
|
100
|
+
model?: string;
|
|
101
|
+
onDelta?: (delta: string) => void;
|
|
102
|
+
}): Promise<string>;
|
|
103
|
+
/** The codebase's last complete exploration, and the files of the code changed since - added, changed or removed. */
|
|
104
|
+
export declare function previousExploration(buildDir: string): {
|
|
105
|
+
account: string;
|
|
106
|
+
changed: string[];
|
|
107
|
+
} | undefined;
|
|
108
|
+
/** How many questions the test author may put to the explorer in one conformance run, and how long an answer may be. */
|
|
109
|
+
export declare const EXPLORER_QUESTIONS = 3;
|
|
110
|
+
/**
|
|
111
|
+
* The test author's question to the explorer, answered: a fresh explorer, in the code's folder - it reads the
|
|
112
|
+
* code and runs it, and changes nothing - given what was handed over so far and the question, answering in words.
|
|
113
|
+
*/
|
|
114
|
+
export declare function answerAsExplorer(options: {
|
|
115
|
+
buildDir: string;
|
|
116
|
+
spec: SpecContext;
|
|
117
|
+
/** What the explorer handed over: the account the tests are written from. */
|
|
118
|
+
account: string;
|
|
119
|
+
question: string;
|
|
120
|
+
label: string;
|
|
121
|
+
model?: string;
|
|
122
|
+
onDelta?: (delta: string) => void;
|
|
123
|
+
}): Promise<string>;
|
|
124
|
+
/** ask_explorer, for the conformance agent: a question about the software, answered by the explorer. */
|
|
125
|
+
export declare function createAskExplorerTool(options: {
|
|
126
|
+
ask: (question: string) => Promise<string>;
|
|
127
|
+
questions?: number;
|
|
128
|
+
}): ToolDefinition;
|
|
129
|
+
export declare function explorePrompt(buildDir: string, spec: SpecContext, scope: ConflictScope, testingScripts?: ShownScript[], question?: {
|
|
130
|
+
failure: string;
|
|
131
|
+
account: string;
|
|
132
|
+
}, previous?: {
|
|
133
|
+
account: string;
|
|
134
|
+
changed: string[];
|
|
135
|
+
}): string;
|
|
136
|
+
/** A review's word for a problem, as one of the two: "missing" (and anything starting so), else "bad". */
|
|
137
|
+
export declare function reviewKind(word: string): "missing" | "bad";
|
|
138
|
+
/** What the review found wrong with the tests: which file and test, whether something is missing or bad, and exactly what. */
|
|
139
|
+
export interface ReviewProblem {
|
|
140
|
+
file: string;
|
|
141
|
+
test?: string;
|
|
142
|
+
kind: "missing" | "bad";
|
|
143
|
+
what: string;
|
|
144
|
+
/**
|
|
145
|
+
* The functionality is not yet tested, black box: a test or an acceptance test missing or cut down,
|
|
146
|
+
* the software mocked or reached other than from outside, a test that cannot fail or skips what it
|
|
147
|
+
* checks. Never let go. Anything else is a way to make good tests better.
|
|
148
|
+
*/
|
|
149
|
+
blocking?: boolean;
|
|
150
|
+
}
|
|
151
|
+
/**
|
|
152
|
+
* The review gate, after the conformance suite and the unit tests pass: do the tests this run added
|
|
153
|
+
* or changed test the software black box, and do the acceptance tests do what the spec says - every
|
|
154
|
+
* step, every expectation. Passing tests prove nothing when they assert nothing, mock the software
|
|
155
|
+
* they test, or skip what the spec asks for. It reads the tests and the code and changes neither.
|
|
156
|
+
* No verdict is no pass: a gate that cannot say yes stays shut.
|
|
157
|
+
*/
|
|
158
|
+
export interface TestReviewer {
|
|
159
|
+
/** One review: what it is shown (`testReviewRequest`), and its verdict. No verdict is no pass. */
|
|
160
|
+
review(request: string): Promise<{
|
|
161
|
+
pass: boolean;
|
|
162
|
+
problems: ReviewProblem[];
|
|
163
|
+
}>;
|
|
164
|
+
dispose(): void;
|
|
165
|
+
}
|
|
166
|
+
/**
|
|
167
|
+
* The reviewer, one session for the whole conformance run: a review after the first starts from what it already
|
|
168
|
+
* read and raised. Its task is its instructions; each review is shown the diff of the tests - the whole of what the
|
|
169
|
+
* run wrote first, what changed since after - and the conformance agent's account of it.
|
|
170
|
+
*/
|
|
171
|
+
export declare function createTestReviewer(options: {
|
|
172
|
+
/** What the work does to each functional spec (work.ts): a mechanical job is held only to that. */
|
|
173
|
+
cases?: JobCases;
|
|
174
|
+
buildDir: string;
|
|
175
|
+
conformanceDir: string;
|
|
176
|
+
spec: SpecContext;
|
|
177
|
+
/** The functionality under test - or, for a spec change, those it touches - with their acceptance tests. */
|
|
178
|
+
functionalities: Array<{
|
|
179
|
+
frid: string;
|
|
180
|
+
acceptanceTests: string[];
|
|
181
|
+
}>;
|
|
182
|
+
forChange?: boolean;
|
|
183
|
+
invocation: string;
|
|
184
|
+
label: string;
|
|
185
|
+
model?: string;
|
|
186
|
+
onDelta?: (delta: string) => void;
|
|
187
|
+
}): Promise<TestReviewer>;
|
|
188
|
+
/** The reviewer's task, for its instructions: word for word through every review of the run. */
|
|
189
|
+
export declare function testReviewTask(options: {
|
|
190
|
+
/** What the work does to each functional spec (work.ts): a mechanical job is held only to that. */
|
|
191
|
+
cases?: JobCases;
|
|
192
|
+
buildDir: string;
|
|
193
|
+
conformanceDir: string;
|
|
194
|
+
spec: SpecContext;
|
|
195
|
+
functionalities: Array<{
|
|
196
|
+
frid: string;
|
|
197
|
+
acceptanceTests: string[];
|
|
198
|
+
}>;
|
|
199
|
+
forChange?: boolean;
|
|
200
|
+
invocation: string;
|
|
201
|
+
}): string;
|
|
202
|
+
/** What one review of the tests is shown: the whole of what the run wrote first; after that, what changed since. */
|
|
203
|
+
export declare function testReviewRequest(options: {
|
|
204
|
+
/** First review: the tests the run wrote (`workDiff`). After it: the diff since the last review (`diffSinceSnapshot`). */
|
|
205
|
+
diff: string;
|
|
206
|
+
/** The test files this run added or changed, relative to the tests folder. */
|
|
207
|
+
changed: string[];
|
|
208
|
+
account: string;
|
|
209
|
+
/** The problems of the last review the conformance agent was given - given, this is a review after it. */
|
|
210
|
+
earlier?: ReviewProblem[];
|
|
211
|
+
/** What the arbiter let go of the last review. */
|
|
212
|
+
letGo?: ReviewProblem[];
|
|
213
|
+
}): string;
|
|
214
|
+
/** The review's problems, for the conformance agent to fix. */
|
|
215
|
+
export declare function reviewFeedbackPrompt(problems: ReviewProblem[]): string;
|
|
216
|
+
export type Culprit = "code" | "tests" | "spec" | "environment";
|
|
217
|
+
/** One thing the judge found, and where: a file it opened, `testing script`, or `failing run`. */
|
|
218
|
+
export interface Evidence {
|
|
219
|
+
source: string;
|
|
220
|
+
shows: string;
|
|
221
|
+
}
|
|
222
|
+
/**
|
|
223
|
+
* A script of a conformance run as the explorer and the judge are shown it: its path, how it is run, its text. The
|
|
224
|
+
* conformance testing script, and the prepare script before it where the project has one.
|
|
225
|
+
*/
|
|
226
|
+
export interface ShownScript {
|
|
227
|
+
path: string;
|
|
228
|
+
runs: string;
|
|
229
|
+
content: string;
|
|
230
|
+
/** The prepare script: run on the build before every run of the conformance testing script. */
|
|
231
|
+
prepare?: boolean;
|
|
232
|
+
}
|
|
233
|
+
/**
|
|
234
|
+
* The tests' fix for a failure did not make it go away: the verdict that sent it to them, and what they changed. The judge
|
|
235
|
+
* is asked again, now whether the failure is the code's rather than the tests'.
|
|
236
|
+
*/
|
|
237
|
+
export interface Escalation {
|
|
238
|
+
reason: string;
|
|
239
|
+
changed: string[];
|
|
240
|
+
}
|
|
241
|
+
/** A functionality, by the module it is in and its id there: a conflict can cross modules. */
|
|
242
|
+
export interface FunctionalityRef {
|
|
243
|
+
module: string;
|
|
244
|
+
frid: string;
|
|
245
|
+
}
|
|
246
|
+
/** "billing 4": a functionality as the judge and the person read it. */
|
|
247
|
+
export declare function refLabel(ref: FunctionalityRef): string;
|
|
248
|
+
export interface Verdict {
|
|
249
|
+
culprit: Culprit;
|
|
250
|
+
reason: string;
|
|
251
|
+
/** For code: the specification's words the code does not meet, as the judge quoted them. */
|
|
252
|
+
specSays?: string;
|
|
253
|
+
/** For code: it is wrong because it hides why the software failed. */
|
|
254
|
+
causeHidden?: boolean;
|
|
255
|
+
/** For code: the conformance testing script's own words for what it needs of the build, as the judge quoted them. */
|
|
256
|
+
scriptNeeds?: string;
|
|
257
|
+
/** What the judge found itself, each with where: a file it opened, the testing script, or the failing run. */
|
|
258
|
+
evidence?: Evidence[];
|
|
259
|
+
/** For a spec conflict: the two functionalities that cannot both hold - in this module, or in one it requires. */
|
|
260
|
+
functionalities?: FunctionalityRef[];
|
|
261
|
+
}
|
|
262
|
+
/**
|
|
263
|
+
* Which functionalities a spec conflict may name: this module's, and those of the modules it
|
|
264
|
+
* requires - its codebase holds them all, and so does its conformance suite. A functionality's
|
|
265
|
+
* conformance run can only raise one with the functionality it tests - a conflict between two
|
|
266
|
+
* earlier ones would have come up when the later of them was tested. A spec diff's run may name any two.
|
|
267
|
+
*/
|
|
268
|
+
export interface ConflictScope {
|
|
269
|
+
functionalities: FunctionalityRef[];
|
|
270
|
+
/** The functionality under test, which every conflict raised must include. None for a spec diff. */
|
|
271
|
+
tested?: FunctionalityRef;
|
|
272
|
+
}
|
|
273
|
+
/** A conflict's functionalities as the judge gave them, tidied: trimmed, and each once. */
|
|
274
|
+
export declare function conflictRefs(given: Array<{
|
|
275
|
+
module?: string;
|
|
276
|
+
id?: string;
|
|
277
|
+
frid?: string;
|
|
278
|
+
}> | undefined): FunctionalityRef[];
|
|
279
|
+
/** Why a spec conflict cannot be raised as given, or nothing when it can. */
|
|
280
|
+
export declare function specConflictProblem(functionalities: FunctionalityRef[] | undefined, scope: ConflictScope): string | undefined;
|
|
281
|
+
/** The two functionalities of a spec conflict, in a fixed order: the same conflict, however it was named. */
|
|
282
|
+
export declare function conflictKey(functionalities: FunctionalityRef[]): string;
|
|
283
|
+
export declare function sortedRefs(functionalities: FunctionalityRef[]): FunctionalityRef[];
|
|
284
|
+
/** How many times a spec conflict between the same two functionalities is raised before it counts. */
|
|
285
|
+
export declare const SPEC_CONFLICT_RAISES = 3;
|
|
286
|
+
/**
|
|
287
|
+
* How many times, one after the other, the run's environment is judged what is wrong before it counts: once more
|
|
288
|
+
* than once, so a second judge of a new run - the tests checked in between - has to agree.
|
|
289
|
+
*/
|
|
290
|
+
export declare const ENVIRONMENT_RAISES = 2;
|
|
291
|
+
/**
|
|
292
|
+
* Why a verdict that the code is wrong cannot be taken as it is, or nothing when it can. The code is
|
|
293
|
+
* wrong only against what the specification says - so the judge quotes it, and the quote has to be
|
|
294
|
+
* in the specification - or when it hides why the software failed. A test asserting what the
|
|
295
|
+
* specification leaves open is the test's mistake, however plausible the assertion.
|
|
296
|
+
*/
|
|
297
|
+
export declare function unfoundedCodeVerdict(verdict: Verdict, specText: string, scriptText?: string): string | undefined;
|
|
298
|
+
/**
|
|
299
|
+
* Why a verdict's evidence cannot be taken as it is, or nothing when it can. Asked to weigh an escalation, the judge has
|
|
300
|
+
* to rest its verdict on what it found itself: each piece of evidence from a file it opened, the testing script or the
|
|
301
|
+
* failing run - and at least one not the run alone, which every judge before it read too. What the explorer's account
|
|
302
|
+
* says is not evidence: it was written before the run, and may be wrong.
|
|
303
|
+
*/
|
|
304
|
+
export declare function unfoundedEvidence(evidence: Evidence[] | undefined, opened: (path: string) => boolean): string | undefined;
|
|
305
|
+
export declare function judgeFailure(options: {
|
|
306
|
+
buildDir: string;
|
|
307
|
+
conformanceDir: string;
|
|
308
|
+
spec: SpecContext;
|
|
309
|
+
run: ScriptRun;
|
|
310
|
+
invocation: string;
|
|
311
|
+
scope: ConflictScope;
|
|
312
|
+
/** The working notes, whose pitfalls hold the attempts made at this failure so far. */
|
|
313
|
+
notes: string;
|
|
314
|
+
/** The conformance testing script, word for word: what the run does, and what it needs of the build. */
|
|
315
|
+
testingScripts?: ShownScript[];
|
|
316
|
+
/** The tests' fix did not make this failure go away: is it the code's? */
|
|
317
|
+
escalation?: Escalation;
|
|
318
|
+
label: string;
|
|
319
|
+
model?: string;
|
|
320
|
+
onDelta?: (delta: string) => void;
|
|
321
|
+
}): Promise<Verdict>;
|
|
322
|
+
export declare function judgePrompt(options: {
|
|
323
|
+
buildDir: string;
|
|
324
|
+
conformanceDir: string;
|
|
325
|
+
spec: SpecContext;
|
|
326
|
+
run: ScriptRun;
|
|
327
|
+
invocation: string;
|
|
328
|
+
scope: ConflictScope;
|
|
329
|
+
notes: string;
|
|
330
|
+
testingScripts?: ShownScript[];
|
|
331
|
+
escalation?: Escalation;
|
|
332
|
+
}): string;
|
|
333
|
+
/**
|
|
334
|
+
* For the judge, of a run the time limit stopped: what kept it from finishing - something that hangs, the code's or a
|
|
335
|
+
* test's, or a suite that is only slow, which no agent can give more time.
|
|
336
|
+
*/
|
|
337
|
+
export declare function timedOutBlock(run: Pick<ScriptRun, "timeoutMs" | "elapsedMs">): string[];
|
|
338
|
+
/**
|
|
339
|
+
* The coding agent a conformance run sends the code to, when the judge says the code is wrong: it
|
|
340
|
+
* works in the code folder, may read the tests but never changes them, and keeps the unit
|
|
341
|
+
* tests passing.
|
|
342
|
+
* Made the first time it is needed, and kept for the rest of the run: each fix after the first starts from what the
|
|
343
|
+
* ones before it tried. Its task is its instructions; its work is compacted as it gets longer.
|
|
344
|
+
*/
|
|
345
|
+
export declare function createCodeFixer(options: {
|
|
346
|
+
buildDir: string;
|
|
347
|
+
/** The conformance tests: it reads them, and never changes them. */
|
|
348
|
+
conformanceDir?: string;
|
|
349
|
+
label: string;
|
|
350
|
+
model?: string;
|
|
351
|
+
/** The specification it fixes the code to: in its task. */
|
|
352
|
+
spec: SpecContext;
|
|
353
|
+
/** Its own tools beyond the file tools: running the unit tests, its notes. */
|
|
354
|
+
tools: ToolDefinition[];
|
|
355
|
+
toolNames: string[];
|
|
356
|
+
/** The harness's own run its environment reports are checked against. */
|
|
357
|
+
checkEnvironment?: {
|
|
358
|
+
run: () => Promise<{
|
|
359
|
+
exitCode: number;
|
|
360
|
+
output: string;
|
|
361
|
+
}>;
|
|
362
|
+
script: string;
|
|
363
|
+
};
|
|
364
|
+
/** The testing scripts its fixes are run by - the prepare, conformance and unit ones - word for word, in its task. */
|
|
365
|
+
testingScripts?: {
|
|
366
|
+
scripts: TestScripts;
|
|
367
|
+
root: string;
|
|
368
|
+
};
|
|
369
|
+
}): Promise<AgentSession>;
|
|
370
|
+
/**
|
|
371
|
+
* The code fixer's task, for its instructions: whose code it is, the specification, and how a fix is made. It stays
|
|
372
|
+
* word for word through every fix of the run; each failure comes as a message (`codeFixPrompt`).
|
|
373
|
+
*/
|
|
374
|
+
export declare function codeFixerTask(options: {
|
|
375
|
+
buildDir: string;
|
|
376
|
+
conformanceDir?: string;
|
|
377
|
+
spec: SpecContext;
|
|
378
|
+
}): string;
|
|
379
|
+
/** One failure for the code fixer: the run, and why the code is what is wrong. */
|
|
380
|
+
export declare function codeFixPrompt(options: {
|
|
381
|
+
run: ScriptRun;
|
|
382
|
+
reason: string;
|
|
383
|
+
}): string;
|
|
384
|
+
/**
|
|
385
|
+
* An escalated failure for the code fixer: the tests were fixed for it and it did not go away, and the judge found it
|
|
386
|
+
* the code's. It is handed the conformance testing script's error, the tests as they stand and the judge's evidence.
|
|
387
|
+
*/
|
|
388
|
+
export declare function escalatedFixPrompt(options: {
|
|
389
|
+
run: ScriptRun;
|
|
390
|
+
reason: string;
|
|
391
|
+
evidence: Evidence[];
|
|
392
|
+
tests: Array<{
|
|
393
|
+
path: string;
|
|
394
|
+
content: string;
|
|
395
|
+
}>;
|
|
396
|
+
}): string;
|
|
397
|
+
/** The run's environment judged what is wrong: the conformance agent checks the tests do not cause it, and changes nothing when they do not. */
|
|
398
|
+
export declare function environmentCheckPrompt(options: {
|
|
399
|
+
run: ScriptRun;
|
|
400
|
+
reason: string;
|
|
401
|
+
}): string;
|
|
402
|
+
export declare function testsFixPrompt(options: {
|
|
403
|
+
run: ScriptRun;
|
|
404
|
+
reason: string;
|
|
405
|
+
}): string;
|
|
@@ -0,0 +1,189 @@
|
|
|
1
|
+
import { ACCEPTANCE_TESTS, type MarshalledPlainSource } from "../plain/spec.ts";
|
|
2
|
+
import { type BuildingSpec } from "./activity.ts";
|
|
3
|
+
import type { JobCases } from "./drift.ts";
|
|
4
|
+
import { type ScriptRun, failureSignature, STUCK_ROUNDS } from "./test-scripts.ts";
|
|
5
|
+
import type { ToolDefinition } from "@earendil-works/pi-coding-agent";
|
|
6
|
+
import { type Evidence, type ReviewProblem } from "./conformance-agents.ts";
|
|
7
|
+
import { type TestRemoval, type TestRun } from "./testing.ts";
|
|
8
|
+
/**
|
|
9
|
+
* A module's conformance tests: one directory, `plain_modules/<module>/tests`, organised
|
|
10
|
+
* however the tests are best organised. It holds the tests of the modules it requires too,
|
|
11
|
+
* copied up with their code, so running it is the regression suite of the whole chain.
|
|
12
|
+
*/
|
|
13
|
+
export declare function conformanceDirFor(moduleName: string, root?: string): string;
|
|
14
|
+
export interface RenderConformanceTestsOptions {
|
|
15
|
+
/** What the job does to each functional spec (work.ts): its agents are told case by case. */
|
|
16
|
+
cases?: JobCases;
|
|
17
|
+
plainFile: string;
|
|
18
|
+
frid?: string;
|
|
19
|
+
templateDirs?: string[];
|
|
20
|
+
/** The rendered code under test. Must exist and be non-empty. */
|
|
21
|
+
buildDir?: string;
|
|
22
|
+
/** Where the tests are written. Defaults to `<cwd>/plain_modules/<module>/tests`. */
|
|
23
|
+
conformanceDir?: string;
|
|
24
|
+
onDelta?: (delta: string) => void;
|
|
25
|
+
onRun?: (command: string, exitCode: number) => void;
|
|
26
|
+
/** Rounds of fixing a failing run before giving up. */
|
|
27
|
+
maxRounds?: number;
|
|
28
|
+
/** "provider/model-id". Omitted: whatever pi is configured to use. */
|
|
29
|
+
model?: string;
|
|
30
|
+
/** The judge's and the test review's model. Omitted: the project's judge-model, else `model`. */
|
|
31
|
+
judgeModel?: string;
|
|
32
|
+
dryRun?: boolean;
|
|
33
|
+
/** Update the tests for a spec change, given as a diff, rather than for one functionality. */
|
|
34
|
+
diff?: string;
|
|
35
|
+
/** That change section by section, as the agents are shown it in place of the diff. */
|
|
36
|
+
change?: string;
|
|
37
|
+
/**
|
|
38
|
+
* The spec as parsed when that change was written. A change rendered from a queue runs after
|
|
39
|
+
* later ones went into the file, so the file is not what this change is about.
|
|
40
|
+
*/
|
|
41
|
+
spec?: {
|
|
42
|
+
moduleName: string;
|
|
43
|
+
tree: MarshalledPlainSource;
|
|
44
|
+
};
|
|
45
|
+
/**
|
|
46
|
+
* This is a later step of work already under way, whose changes are not committed yet - a
|
|
47
|
+
* spec diff's conformance step - so the module is not put back to its last commit first.
|
|
48
|
+
*/
|
|
49
|
+
continuing?: boolean;
|
|
50
|
+
}
|
|
51
|
+
export interface RenderConformanceTestsResult {
|
|
52
|
+
moduleName: string;
|
|
53
|
+
frid: string;
|
|
54
|
+
buildDir: string;
|
|
55
|
+
conformanceDir: string;
|
|
56
|
+
prompt: string;
|
|
57
|
+
response: string;
|
|
58
|
+
files: string[];
|
|
59
|
+
runs: TestRun[];
|
|
60
|
+
/** Whether the harness's own run of the whole suite passed - and the unit tests, when the code changed. */
|
|
61
|
+
passed: boolean;
|
|
62
|
+
/** How many times the harness ran the conformance testing script: the rounds it judged. */
|
|
63
|
+
rounds?: number;
|
|
64
|
+
/** Whether the agent changed the code to make the tests pass. */
|
|
65
|
+
codeChanged: boolean;
|
|
66
|
+
/**
|
|
67
|
+
* The code and the tests as they were at the harness's last green run - the whole suite and the unit tests passing -
|
|
68
|
+
* file by file: what is still as it was then needs no run of the whole suite again.
|
|
69
|
+
*/
|
|
70
|
+
green?: {
|
|
71
|
+
code: Map<string, string>;
|
|
72
|
+
tests: Map<string, string>;
|
|
73
|
+
};
|
|
74
|
+
/** Conformance tests that went missing mid-run and had to be justified. */
|
|
75
|
+
testRemovals: TestRemoval[];
|
|
76
|
+
/**
|
|
77
|
+
* The spec contradicts itself: two functionalities that cannot both hold, raised by the judge
|
|
78
|
+
* the times it takes to count. The run stopped on it - nothing in the code or the tests can fix it.
|
|
79
|
+
*/
|
|
80
|
+
specConflict?: {
|
|
81
|
+
functionalities: Array<{
|
|
82
|
+
module: string;
|
|
83
|
+
frid: string;
|
|
84
|
+
}>;
|
|
85
|
+
reason: string;
|
|
86
|
+
};
|
|
87
|
+
/**
|
|
88
|
+
* The run failed the same way, judged the same way, round after round - and again after the
|
|
89
|
+
* explorer was asked what the tests lacked. It stopped rather than spend its attempts on it.
|
|
90
|
+
*/
|
|
91
|
+
stuck?: {
|
|
92
|
+
failure: string;
|
|
93
|
+
rounds: number;
|
|
94
|
+
error: string;
|
|
95
|
+
times: number;
|
|
96
|
+
changedNothing?: boolean;
|
|
97
|
+
};
|
|
98
|
+
/**
|
|
99
|
+
* The run's environment is what is wrong - a credential missing or rejected, say - judged so ENVIRONMENT_RAISES
|
|
100
|
+
* times in a row: only the person can fix it, so the run stopped.
|
|
101
|
+
*/
|
|
102
|
+
environment?: {
|
|
103
|
+
reason: string;
|
|
104
|
+
times: number;
|
|
105
|
+
};
|
|
106
|
+
/**
|
|
107
|
+
* The tests' fix for a failure did not make it go away, the judge found it the code's and escalated it to the coding
|
|
108
|
+
* agent - and the run still failed the same way after the code's fix too: why the judge found it the code's, on what
|
|
109
|
+
* evidence, and the error the run stopped on.
|
|
110
|
+
*/
|
|
111
|
+
escalation?: {
|
|
112
|
+
reason: string;
|
|
113
|
+
evidence: Evidence[];
|
|
114
|
+
error: string;
|
|
115
|
+
failure: string;
|
|
116
|
+
changedNothing?: boolean;
|
|
117
|
+
};
|
|
118
|
+
/** The tests were sent back to be written and labelled, and never were: what was missing the last time. */
|
|
119
|
+
unlabelled?: string[];
|
|
120
|
+
/** The tests were optimised as far as REVIEW_ROUNDS reviews could take them: what the last one still suggested. */
|
|
121
|
+
reviewWaived?: ReviewProblem[];
|
|
122
|
+
/** The suite passed, but the tests never passed review: what the review last found. */
|
|
123
|
+
review?: Array<{
|
|
124
|
+
file: string;
|
|
125
|
+
test?: string;
|
|
126
|
+
kind: "missing" | "bad";
|
|
127
|
+
what: string;
|
|
128
|
+
}>;
|
|
129
|
+
}
|
|
130
|
+
/**
|
|
131
|
+
* Write black-box conformance tests for one functionality of a .plain specification.
|
|
132
|
+
*
|
|
133
|
+
* Runs after the functionality has been rendered: the build directory is the subject,
|
|
134
|
+
* and this refuses to start without one.
|
|
135
|
+
*/
|
|
136
|
+
export declare function renderConformanceTests(options: RenderConformanceTestsOptions): Promise<RenderConformanceTestsResult>;
|
|
137
|
+
/**
|
|
138
|
+
* Why conformance tests did not land, in a line. Tests sent back to be labelled and never labelled may well pass: the
|
|
139
|
+
* line says so, rather than that they failed.
|
|
140
|
+
*/
|
|
141
|
+
export declare function notLandedWhy(what: string, unlabelled?: string[]): string;
|
|
142
|
+
/**
|
|
143
|
+
* The functionalities a spec change touches - its functional spec, or one of its acceptance tests,
|
|
144
|
+
* has a line the change adds or removes - with their acceptance tests: what a spec diff's
|
|
145
|
+
* conformance run labels, checks and reviews, as a functionality's run does for its one.
|
|
146
|
+
*/
|
|
147
|
+
export declare function touchedFunctionalities(tree: MarshalledPlainSource, frids: string[], diff: string): Array<{
|
|
148
|
+
frid: string;
|
|
149
|
+
acceptanceTests: string[];
|
|
150
|
+
}>;
|
|
151
|
+
/** From the how-manieth review that sends the tests back the arbiter weighs each one (see arbiter.ts). */
|
|
152
|
+
export declare const REVIEW_ROUNDS = 1;
|
|
153
|
+
/** How many times the tests are sent back to be written and labelled before the run stops. */
|
|
154
|
+
export declare const LABEL_ASKS = 3;
|
|
155
|
+
/** How many times a code fix that does not build or pass its unit tests goes back to the coding agent before the suite runs again. */
|
|
156
|
+
export declare const FIX_UNIT_CHECKS = 3;
|
|
157
|
+
/** How many times an agent runs the conformance suite in a turn before its turn ends and the harness takes over. */
|
|
158
|
+
export declare const RUNS_PER_TURN = 3;
|
|
159
|
+
/**
|
|
160
|
+
* A testing script tool an agent may call so many times a turn. The last allowed call ends its turn
|
|
161
|
+
* with the result - the harness then runs the suite itself and judges what is wrong - so an agent
|
|
162
|
+
* cannot spend its turn rerunning a failure it cannot fix. `newTurn` starts the count again.
|
|
163
|
+
*/
|
|
164
|
+
export declare function turnLimited(tool: ToolDefinition, limit: number): {
|
|
165
|
+
tool: ToolDefinition;
|
|
166
|
+
newTurn: () => void;
|
|
167
|
+
};
|
|
168
|
+
export { failureSignature, STUCK_ROUNDS };
|
|
169
|
+
/** How many fixes in a row that change no file - the code's or the tests' - is nothing changing. */
|
|
170
|
+
export declare const IDLE_FIXES = 2;
|
|
171
|
+
/**
|
|
172
|
+
* The code's own build files, at the top of its folder, as they are - read by the harness, for the
|
|
173
|
+
* author of the conformance tests, who cannot read the code. They are interface, not implementation:
|
|
174
|
+
* what a separate test project has to point at - the name, the coordinates, the version.
|
|
175
|
+
*/
|
|
176
|
+
export declare function buildManifests(buildDir: string): Array<{
|
|
177
|
+
path: string;
|
|
178
|
+
content: string;
|
|
179
|
+
}>;
|
|
180
|
+
/** What a failing run failed with, in one line as it said it: its first line that says what went wrong. */
|
|
181
|
+
export declare function failureLine(run: ScriptRun): string;
|
|
182
|
+
/**
|
|
183
|
+
* The functional spec a conformance run writes tests for, for the person watching: which one of how
|
|
184
|
+
* many, and its text as the spec has it, with its acceptance tests after it.
|
|
185
|
+
*/
|
|
186
|
+
export declare function buildingSpec(moduleName: string, frid: string, total: number, specifications: {
|
|
187
|
+
"functional specs": string[];
|
|
188
|
+
[ACCEPTANCE_TESTS]?: string[];
|
|
189
|
+
}): BuildingSpec;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/** The conversation is about to write these files: call what it returns once it has. */
|
|
2
|
+
export declare function conversationWriting(paths: string[]): () => void;
|
|
3
|
+
/** The conversation starts a command of its own: call what it returns once it has ended. */
|
|
4
|
+
export declare function conversationCommand(): () => void;
|
|
5
|
+
/** The conversation's turn is over: nothing of its is in progress any more. */
|
|
6
|
+
export declare function conversationSettled(): void;
|
|
7
|
+
/** Whether the conversation may have written this file after `since` - a write of its to it, or a command of its own. */
|
|
8
|
+
export declare function writtenByConversation(path: string, since: number): boolean;
|
|
9
|
+
/** For tests: forget everything. */
|
|
10
|
+
export declare function resetConversationWrites(): void;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Credentials are the person's: no agent writes them. A run that needs one and does not have it is told
|
|
3
|
+
* so - by its judge, to the person - rather than given one an agent made up, which every later run then
|
|
4
|
+
* fails on without anyone seeing why.
|
|
5
|
+
*
|
|
6
|
+
* A credential file is a `.env` or one of its variants (`.env.local`, `.env.test`); a template of one -
|
|
7
|
+
* `.env.example`, `.env.sample`, `.env.template`, `.env.dist` - holds no secret and is not one.
|
|
8
|
+
*/
|
|
9
|
+
export declare function isCredentialFile(path: string): boolean;
|
|
10
|
+
/** What an agent is told when it tries to write one. */
|
|
11
|
+
export declare function credentialRefusal(path: string): string;
|
|
12
|
+
/** The credential files under `roots`, with what each holds: what an agent's command is checked against. */
|
|
13
|
+
export declare function credentialFiles(roots: string[]): Map<string, string>;
|
|
14
|
+
/**
|
|
15
|
+
* Undo what a command did to the credential files under `roots`, from what they held before it: one it made is
|
|
16
|
+
* removed, one it changed or removed is put back. Says which it put back.
|
|
17
|
+
*/
|
|
18
|
+
export declare function restoreCredentialFiles(before: Map<string, string>, roots: string[]): string[];
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import type { AgentSessionEvent } from "@earendil-works/pi-coding-agent";
|
|
2
|
+
/**
|
|
3
|
+
* Every render agent's whole conversation, streamed to a file of its own as it happens - always.
|
|
4
|
+
*
|
|
5
|
+
* A job's transcript keeps a tool call's arguments to 600 characters and its result to 2000, and only while pi is
|
|
6
|
+
* running. When an agent goes wrong, what it was actually
|
|
7
|
+
* given and what actually came back is what there is to go on. So each agent a render starts -
|
|
8
|
+
* coding, conformance, repair, the spec-steps planner - writes everything to `.turri/debug/`
|
|
9
|
+
* in the project: the system prompt, every prompt, its replies and thinking as they stream, every
|
|
10
|
+
* tool call with its arguments and its whole result, each response's stop reason and usage, and the
|
|
11
|
+
* provider's retries and errors.
|
|
12
|
+
*
|
|
13
|
+
* Each event is on disk the moment it arrives, so a crashed or killed run leaves its log up to
|
|
14
|
+
* the moment it stopped, and `tail -f` follows an agent live. The folder is in the project, not in
|
|
15
|
+
* `plain_modules`, so no agent can read another's log. A log that cannot be written is given up
|
|
16
|
+
* on, never allowed to fail the render.
|
|
17
|
+
*/
|
|
18
|
+
/** `.turri/debug` in the project: beside `plain_modules`, never inside it. */
|
|
19
|
+
export declare function debugDir(project: string): string;
|
|
20
|
+
/**
|
|
21
|
+
* Where the log of an agent working in `cwd` goes: always outside what that agent can reach. In
|
|
22
|
+
* `plain_modules`, or in the project that holds it, that is the project's; an explicit build
|
|
23
|
+
* folder elsewhere is its own fence (see `modulesRootOf`), so its logs go beside it, not in it.
|
|
24
|
+
*/
|
|
25
|
+
export declare function debugDirFor(cwd: string): string;
|
|
26
|
+
/** The part of a pi session a debug log reads. */
|
|
27
|
+
export interface DebuggedSession {
|
|
28
|
+
subscribe(listener: (event: AgentSessionEvent) => void): () => void;
|
|
29
|
+
readonly model?: {
|
|
30
|
+
provider?: string;
|
|
31
|
+
id?: string;
|
|
32
|
+
} | undefined;
|
|
33
|
+
readonly thinkingLevel?: string;
|
|
34
|
+
readonly systemPrompt?: string;
|
|
35
|
+
readonly sessionFile?: string | undefined;
|
|
36
|
+
}
|
|
37
|
+
export interface DebugLog {
|
|
38
|
+
readonly file: string;
|
|
39
|
+
/** A prompt the agent is sent, whole. */
|
|
40
|
+
prompt(text: string): void;
|
|
41
|
+
/** Something the harness has to say about the turn: that it ended, and how. */
|
|
42
|
+
note(line: string): void;
|
|
43
|
+
}
|
|
44
|
+
/** The debug log a session is streaming to, if it has one. */
|
|
45
|
+
export declare function debugLogOf(session: object): DebugLog | undefined;
|
|
46
|
+
/**
|
|
47
|
+
* Start streaming a session to a log of its own. `label` says what the agent is - `app 3 coding
|
|
48
|
+
* agent` - and names the file.
|
|
49
|
+
*/
|
|
50
|
+
export declare function startDebugLog(session: DebuggedSession, options: {
|
|
51
|
+
cwd: string;
|
|
52
|
+
label: string;
|
|
53
|
+
tools?: string[];
|
|
54
|
+
}): DebugLog | undefined;
|