@kvman/kvcoder 0.1.18 → 0.1.19
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/connectors/artifact.d.ts +1 -1
- package/dist/connectors/artifact.d.ts.map +1 -1
- package/dist/connectors/artifact.js +14 -5
- package/dist/connectors/artifact.js.map +1 -1
- package/dist/connectors/builtin-connectors.d.ts +1 -1
- package/dist/connectors/delegate.d.ts +1 -1
- package/dist/connectors/execution-map.d.ts +1 -1
- package/dist/connectors/execution-map.d.ts.map +1 -1
- package/dist/connectors/execution-map.js +6 -4
- package/dist/connectors/execution-map.js.map +1 -1
- package/dist/delegate/brief.d.ts +1 -1
- package/dist/delegate/brief.js +5 -5
- package/dist/delegate/brief.js.map +1 -1
- package/dist/delegate/workers.js +2 -2
- package/dist/delegate/workers.js.map +1 -1
- package/dist/prompt/working-method.d.ts.map +1 -1
- package/dist/prompt/working-method.js +26 -15
- package/dist/prompt/working-method.js.map +1 -1
- package/dist/turns/quiet-ending.d.ts +6 -0
- package/dist/turns/quiet-ending.d.ts.map +1 -0
- package/dist/turns/quiet-ending.js +14 -0
- package/dist/turns/quiet-ending.js.map +1 -0
- package/dist/turns/step.d.ts.map +1 -1
- package/dist/turns/step.js +4 -1
- package/dist/turns/step.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { z, type Ctx } from '@kvman/sdk';
|
|
2
2
|
import { artifactFormats } from '../artifacts/artifact-format.ts';
|
|
3
3
|
/** What the prompt's index says the connector is for. */
|
|
4
|
-
export declare const artifactDescription = "Show the person something to read or see: a report, a design, an HTML page, or the localhost address of an app you are running (format url). Use it for anything longer than a few lines instead of pasting it into a reply. To change part of an existing artifact, use edit; write it again only when most of it changes. Delete an artifact that is superseded or no longer true with delete; never empty one to clear it. For a diagram, write Mermaid code in a fenced mermaid block of a Markdown artifact or reply: kvman draws it. Don't write SVG for a diagram. The panel runs the page of an HTML artifact in a sandbox where localStorage, sessionStorage, cookies, and indexedDB throw, so a page you show that way must work without them, keeping its state in memory or wrapping each use in try/catch. A form can't be submitted there either: make a button act on its click and a field on the Enter key, in JavaScript, and never rely on a form's submit. You can't press the page's buttons yourself, so say that its interaction is unchecked unless you tested it another way. A url artifact is a normal page on its own address and has none of these limits.";
|
|
4
|
+
export declare const artifactDescription = "Show the person something to read or see: a report, a design, an HTML page, or the localhost address of an app you are running (format url). Use it for anything longer than a few lines instead of pasting it into a reply. To change part of an existing artifact, use edit; write it again only when most of it changes. Delete an artifact that is superseded or no longer true with delete; never empty one to clear it. For a diagram, write Mermaid code in a fenced mermaid block of a Markdown artifact or reply: kvman draws it. Don't write SVG for a diagram. The panel runs the page of an HTML artifact in a sandbox where localStorage, sessionStorage, cookies, and indexedDB throw, so a page you show that way must work without them, keeping its state in memory or wrapping each use in try/catch. A form can't be submitted there either: make a button act on its click and a field on the Enter key, in JavaScript, and never rely on a form's submit. You can't press the page's buttons yourself, so say that its interaction is unchecked unless you tested it another way. A url artifact is a normal page on its own address and has none of these limits. A chat shows an address in one url artifact: writing it under another id removes the old one.";
|
|
5
5
|
export declare const artifactCommands: {
|
|
6
6
|
write: {
|
|
7
7
|
registration: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"artifact.d.ts","sourceRoot":"","sources":["../../src/connectors/artifact.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,KAAK,GAAG,EAAE,MAAM,YAAY,CAAC;AACzC,OAAO,EAAE,eAAe,EAA4B,MAAM,iCAAiC,CAAC;AAiB5F,yDAAyD;AACzD,eAAO,MAAM,mBAAmB,
|
|
1
|
+
{"version":3,"file":"artifact.d.ts","sourceRoot":"","sources":["../../src/connectors/artifact.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,KAAK,GAAG,EAAE,MAAM,YAAY,CAAC;AACzC,OAAO,EAAE,eAAe,EAA4B,MAAM,iCAAiC,CAAC;AAiB5F,yDAAyD;AACzD,eAAO,MAAM,mBAAmB,0tCAC8rC,CAAC;AAqB/tC,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAKe,CAAC;AAyD7C,uHAAuH;AACvH,wBAAsB,YAAY,CAAC,GAAG,EAAE,GAAG,EAAE,SAAS,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC;IAAE,EAAE,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,CAAC,OAAO,eAAe,CAAC,CAAC,MAAM,CAAC,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,GAAG,SAAS,CAAC,CAGzL;AAID,wBAAgB,yBAAyB,CAAC,GAAG,EAAE,GAAG,GAAG,IAAI,CAmCxD"}
|
|
@@ -15,7 +15,7 @@ import { edits } from "./payload-fields.js";
|
|
|
15
15
|
// runs the calls on one artifact one after another. `write`, `edit`, and `delete` are public too, so an extension can
|
|
16
16
|
// show a chat something (ADR 0082, 13) and the person can delete one (ADR 0105, 1).
|
|
17
17
|
/** What the prompt's index says the connector is for. */
|
|
18
|
-
export const artifactDescription = 'Show the person something to read or see: a report, a design, an HTML page, or the localhost address of an app you are running (format url). Use it for anything longer than a few lines instead of pasting it into a reply. To change part of an existing artifact, use edit; write it again only when most of it changes. Delete an artifact that is superseded or no longer true with delete; never empty one to clear it. For a diagram, write Mermaid code in a fenced mermaid block of a Markdown artifact or reply: kvman draws it. Don\'t write SVG for a diagram. The panel runs the page of an HTML artifact in a sandbox where localStorage, sessionStorage, cookies, and indexedDB throw, so a page you show that way must work without them, keeping its state in memory or wrapping each use in try/catch. A form can\'t be submitted there either: make a button act on its click and a field on the Enter key, in JavaScript, and never rely on a form\'s submit. You can\'t press the page\'s buttons yourself, so say that its interaction is unchecked unless you tested it another way. A url artifact is a normal page on its own address and has none of these limits.';
|
|
18
|
+
export const artifactDescription = 'Show the person something to read or see: a report, a design, an HTML page, or the localhost address of an app you are running (format url). Use it for anything longer than a few lines instead of pasting it into a reply. To change part of an existing artifact, use edit; write it again only when most of it changes. Delete an artifact that is superseded or no longer true with delete; never empty one to clear it. For a diagram, write Mermaid code in a fenced mermaid block of a Markdown artifact or reply: kvman draws it. Don\'t write SVG for a diagram. The panel runs the page of an HTML artifact in a sandbox where localStorage, sessionStorage, cookies, and indexedDB throw, so a page you show that way must work without them, keeping its state in memory or wrapping each use in try/catch. A form can\'t be submitted there either: make a button act on its click and a field on the Enter key, in JavaScript, and never rely on a form\'s submit. You can\'t press the page\'s buttons yourself, so say that its interaction is unchecked unless you tested it another way. A url artifact is a normal page on its own address and has none of these limits. A chat shows an address in one url artifact: writing it under another id removes the old one.';
|
|
19
19
|
const idMessage = 'An artifact id is lowercase kebab case, such as report or login-design, up to 50 characters.';
|
|
20
20
|
const artifactId = z.string().max(50, idMessage).regex(kebab, idMessage).describe('The name of the artifact within this chat, in lowercase kebab case, up to 50 characters, such as login-design.');
|
|
21
21
|
const payloads = {
|
|
@@ -39,6 +39,13 @@ export const artifactCommands = {
|
|
|
39
39
|
const missing = (id) => notFound(`The artifact ${id} doesn't exist.`, { id });
|
|
40
40
|
// An artifact belongs to its chat, so a subagent's belongs to the chat at its root.
|
|
41
41
|
const chatOf = async (ctx, sessionId) => chatIdOf(await findSession(ctx, sessionId));
|
|
42
|
+
// A chat shows an address in one url artifact: writing one removes the chat's others with that address (ADR 0114, 3).
|
|
43
|
+
function removeSameAddress(artifacts, chatId, id, address) {
|
|
44
|
+
const same = artifacts.find({ sessionId: chatId, format: 'url' }, { limit: artifactCountLimit }).filter((artifact) => artifact.artifactId !== id && new URL(artifact.content).href === new URL(address).href);
|
|
45
|
+
for (const artifact of same)
|
|
46
|
+
artifacts.delete(artifact.id);
|
|
47
|
+
return same.map((artifact) => artifact.artifactId).sort();
|
|
48
|
+
}
|
|
42
49
|
async function writeArtifact(ctx, chatId, input) {
|
|
43
50
|
const format = input.format ?? detectFormat(input.content);
|
|
44
51
|
const replaced = format === 'url' ? await endedUrlArtifact(ctx, chatId, input.id) : undefined;
|
|
@@ -46,6 +53,8 @@ async function writeArtifact(ctx, chatId, input) {
|
|
|
46
53
|
const content = contentFor(format, input.content);
|
|
47
54
|
assertWithinLimit(input.id, content);
|
|
48
55
|
const artifacts = txRecords(tx).artifacts;
|
|
56
|
+
const removed = format === 'url' ? removeSameAddress(artifacts, chatId, input.id, content) : [];
|
|
57
|
+
const also = removed.length === 0 ? {} : { removed };
|
|
49
58
|
const existing = artifacts.find({ sessionId: chatId, artifactId: input.id }, { limit: 1 })[0];
|
|
50
59
|
const stamp = now();
|
|
51
60
|
if (existing === undefined) {
|
|
@@ -53,15 +62,15 @@ async function writeArtifact(ctx, chatId, input) {
|
|
|
53
62
|
if (ended !== undefined && artifacts.count({ sessionId: chatId }) >= artifactCountLimit) {
|
|
54
63
|
artifacts.delete(ended.id);
|
|
55
64
|
artifacts.insert({ sessionId: chatId, artifactId: input.id, title: input.title, format, content, version: 1, createdAt: stamp, updatedAt: stamp });
|
|
56
|
-
return { id: input.id, version: 1, created: true, bytes: Buffer.byteLength(content), replaced: ended.artifactId };
|
|
65
|
+
return { id: input.id, version: 1, created: true, bytes: Buffer.byteLength(content), replaced: ended.artifactId, ...also };
|
|
57
66
|
}
|
|
58
67
|
if (artifacts.count({ sessionId: chatId }) >= artifactCountLimit)
|
|
59
68
|
throw tooLarge(`This chat already has ${artifactCountLimit} artifacts. Update one that exists (artifact list names them), or delete one.`, artifactCountLimit);
|
|
60
69
|
artifacts.insert({ sessionId: chatId, artifactId: input.id, title: input.title, format, content, version: 1, createdAt: stamp, updatedAt: stamp });
|
|
61
|
-
return { id: input.id, version: 1, created: true, bytes: Buffer.byteLength(content) };
|
|
70
|
+
return { id: input.id, version: 1, created: true, bytes: Buffer.byteLength(content), ...also };
|
|
62
71
|
}
|
|
63
72
|
artifacts.update(existing.id, { title: input.title, format, content, version: existing.version + 1, updatedAt: stamp });
|
|
64
|
-
return { id: input.id, version: existing.version + 1, created: false, bytes: Buffer.byteLength(content) };
|
|
73
|
+
return { id: input.id, version: existing.version + 1, created: false, bytes: Buffer.byteLength(content), ...also };
|
|
65
74
|
});
|
|
66
75
|
}
|
|
67
76
|
function editArtifact(ctx, chatId, input) {
|
|
@@ -87,7 +96,7 @@ export function registerArtifactConnector(ctx) {
|
|
|
87
96
|
ctx.registerCommand('kvcoder.artifact.write', {
|
|
88
97
|
description: commands.write.description,
|
|
89
98
|
input: callInput(payloads.write),
|
|
90
|
-
output: z.object({ id: z.string(), version: z.number().int(), created: z.boolean(), bytes: z.number().int(), replaced: z.string().exactOptional() }),
|
|
99
|
+
output: z.object({ id: z.string(), version: z.number().int(), created: z.boolean(), bytes: z.number().int(), replaced: z.string().exactOptional(), removed: z.array(z.string()).exactOptional() }),
|
|
91
100
|
public: true,
|
|
92
101
|
retries: 0,
|
|
93
102
|
handle: async ({ sessionId, payload }) => writeArtifact(ctx, await chatOf(ctx, sessionId), payload),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"artifact.js","sourceRoot":"","sources":["../../src/connectors/artifact.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAY,MAAM,YAAY,CAAC;AACzC,OAAO,EAAE,eAAe,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,iCAAiC,CAAC;AAC5F,OAAO,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,QAAQ,EAAE,MAAM,kCAAkC,CAAC;AACnG,OAAO,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAC7D,OAAO,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAC;AACjE,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AACnD,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AACpD,OAAO,EAAE,KAAK,EAAE,MAAM,wBAAwB,CAAC;AAC/C,OAAO,EAAE,WAAW,EAAE,GAAG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,KAAK,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;YAC9I,IAAI,KAAK,KAAK,SAAS;gBAAE,MAAM,OAAO,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC;YACnD,OAAO,EAAE,EAAE,EAAE,OAAO,CAAC,EAAE,EAAE,KAAK,EAAE,KAAK,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,CAAC,MAAM,EAAE,OAAO,EAAE,KAAK,CAAC,OAAO,EAAE,OAAO,EAAE,KAAK,CAAC,OAAO,EAAE,CAAC;QACtH,CAAC;KACF,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -334,7 +334,7 @@ export declare const builtinCommands: {
|
|
|
334
334
|
fromLine: import("zod").ZodExactOptional<import("zod").ZodNumber>;
|
|
335
335
|
lines: import("zod").ZodExactOptional<import("zod").ZodNumber>;
|
|
336
336
|
}, import("zod/v4/core").$strict>>>;
|
|
337
|
-
|
|
337
|
+
maxSteps: import("zod").ZodExactOptional<import("zod").ZodNumber>;
|
|
338
338
|
}, import("zod/v4/core").$strict>;
|
|
339
339
|
asks: false;
|
|
340
340
|
result: string;
|
|
@@ -33,7 +33,7 @@ export declare const delegateCommands: {
|
|
|
33
33
|
fromLine: z.ZodExactOptional<z.ZodNumber>;
|
|
34
34
|
lines: z.ZodExactOptional<z.ZodNumber>;
|
|
35
35
|
}, z.core.$strict>>>;
|
|
36
|
-
|
|
36
|
+
maxSteps: z.ZodExactOptional<z.ZodNumber>;
|
|
37
37
|
}, z.core.$strict>;
|
|
38
38
|
asks: false;
|
|
39
39
|
result: string;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { z, type Ctx } from '@kvman/sdk';
|
|
2
2
|
/** What the prompt's index says the connector is for. */
|
|
3
|
-
export declare const executionMapDescription = "Plan work as the execution map: your execution path, and the implementation plan the person reads, agrees to, and watches as a diagram. Keep it true as you work: the person follows the work on it. Give the goal, the outcome the person wants in their own terms, then the steps. A step is one concrete stage of the path, something you can name before you start it, never a phase such as implement or a whole feature: what gets done, who does it, and how it is checked; it may cover the few files that change together. Its uses names who does it: you, with a connector such as fs, or a worker of delegate whose description in the delegate entry fits the step, such as a design that is a real choice, a structure decision across several parts, or a review of a finished change that is risky or wide. Its check is the exact command you will run or the thing you will look at. Your own steps are one line, each after the one before. Steps side by side are branches, and a branch means delegation: draw one only for work a worker does that needs nothing from the other branches, touches files no other branch touches, and is worth a worker that starts with none of this conversation; give the branches that start together the same after, or none, and add the step that joins them after every branch it needs. Don't split small independent changes into branches, leave out any step that nothing needs, and end with the project's own checks after everything they cover. A bug fix, a change to one or two files, or a fix the person described never gets a map. Give each step its details in the same set call: what it changes and how, naming the files or parts and the approach in words the person understands without the code, in Markdown, with lists, tables, and Mermaid diagrams or charts in fenced mermaid blocks, never SVG. The person opens them with a press, and a step can't be doing until it has them. Setting the map again keeps the status of each step whose id stays, and its details when you give none: give details again only for a step whose approach changed, and for each new step. Use detail to change one step's details on their own. Every map call returns the steps that are ready: take those, and never work on a step the map does not have. Mark a step doing in the same reply as your first call on it, and when several are ready, mark each and start them all in one reply, one delegate run per branch. Mark a step done with your evidence, what you ran and what it showed, as soon as its check passed and before you start the next; failed with a note when you can't finish it, and skipped with a note when it turned out unneeded. When the plan itself changes, set the map again before you go on, and record a problem the work does not need with note instead of looking into it. Limits: goal up to 300 characters; 1 to 40 steps; a step's id lowercase kebab case up to 50, title up to 100, uses one name up to 60 or a list of up to 5, check up to 300, and details up to 4,000; a step's evidence 10 to 500 and its note up to 300; a note of note up to 500.";
|
|
3
|
+
export declare const executionMapDescription = "Plan work as the execution map: your execution path, and the implementation plan the person reads, agrees to, and watches as a diagram. Keep it true as you work: the person follows the work on it. Give the goal, the outcome the person wants in their own terms, then the steps. A step is one concrete stage of the path, something you can name before you start it, never a phase such as implement or a whole feature: what gets done, who does it, and how it is checked; it may cover the few files that change together. Its uses names who does it: you, with a connector such as fs, or a worker of delegate whose description in the delegate entry fits the step, such as a design that is a real choice, a structure decision across several parts, or a review of a finished change that is risky or wide. Its check is the exact command you will run or the thing you will look at. Your own steps are one line, each after the one before. Steps side by side are branches, and a branch means delegation: draw one only for work a worker does that needs nothing from the other branches, touches files no other branch touches, and is worth a worker that starts with none of this conversation; give the branches that start together the same after, or none, and add the step that joins them after every branch it needs. Don't split small independent changes into branches, leave out any step that nothing needs, and end with the project's own checks after everything they cover. A bug fix, a change to one or two files, or a fix the person described never gets a map. Give each step its details in the same set call: what it changes and how, naming the files or parts and the approach in words the person understands without the code, in Markdown, with lists, tables, and Mermaid diagrams or charts in fenced mermaid blocks, never SVG. The person opens them with a press, and a step can't be doing until it has them. Setting the map again with the same goal keeps the status of each step whose id stays, and its details when you give none: give details again only for a step whose approach changed, and for each new step. A new request is a new goal, and a new goal starts a new map: every step starts todo, with only the details you give. Use detail to change one step's details on their own. Every map call returns the steps that are ready: take those, and never work on a step the map does not have. Mark a step doing in the same reply as your first call on it, and when several are ready, mark each and start them all in one reply, one delegate run per branch. Mark a step done with your evidence, what you ran and what it showed, as soon as its check passed and before you start the next; failed with a note when you can't finish it, and skipped with a note when it turned out unneeded. When the plan itself changes, set the map again before you go on, and record a problem the work does not need with note instead of looking into it. Limits: goal up to 300 characters; 1 to 40 steps; a step's id lowercase kebab case up to 50, title up to 100, uses one name up to 60 or a list of up to 5, check up to 300, and details up to 4,000; a step's evidence 10 to 500 and its note up to 300; a note of note up to 500.";
|
|
4
4
|
/** The steps one map holds at most, and its notes. */
|
|
5
5
|
export declare const stepsLimit = 40;
|
|
6
6
|
export declare const notesLimit = 50;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"execution-map.d.ts","sourceRoot":"","sources":["../../src/connectors/execution-map.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,KAAK,GAAG,EAAE,MAAM,YAAY,CAAC;AAczC,yDAAyD;AACzD,eAAO,MAAM,uBAAuB,
|
|
1
|
+
{"version":3,"file":"execution-map.d.ts","sourceRoot":"","sources":["../../src/connectors/execution-map.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,KAAK,GAAG,EAAE,MAAM,YAAY,CAAC;AAczC,yDAAyD;AACzD,eAAO,MAAM,uBAAuB,ioGAC4lG,CAAC;AAEjoG,sDAAsD;AACtD,eAAO,MAAM,UAAU,KAAK,CAAC;AAC7B,eAAO,MAAM,UAAU,KAAK,CAAC;AAmD7B,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAMW,CAAC;AAyB7C,wBAAgB,6BAA6B,CAAC,GAAG,EAAE,GAAG,GAAG,IAAI,CAqF5D"}
|
|
@@ -11,7 +11,7 @@ import { callInput } from "./connector-command.js";
|
|
|
11
11
|
// which the person watches as a diagram. Each change returns where the work is and what can start, so the task stays
|
|
12
12
|
// at the end of the context. A child session never has it.
|
|
13
13
|
/** What the prompt's index says the connector is for. */
|
|
14
|
-
export const executionMapDescription = "Plan work as the execution map: your execution path, and the implementation plan the person reads, agrees to, and watches as a diagram. Keep it true as you work: the person follows the work on it. Give the goal, the outcome the person wants in their own terms, then the steps. A step is one concrete stage of the path, something you can name before you start it, never a phase such as implement or a whole feature: what gets done, who does it, and how it is checked; it may cover the few files that change together. Its uses names who does it: you, with a connector such as fs, or a worker of delegate whose description in the delegate entry fits the step, such as a design that is a real choice, a structure decision across several parts, or a review of a finished change that is risky or wide. Its check is the exact command you will run or the thing you will look at. Your own steps are one line, each after the one before. Steps side by side are branches, and a branch means delegation: draw one only for work a worker does that needs nothing from the other branches, touches files no other branch touches, and is worth a worker that starts with none of this conversation; give the branches that start together the same after, or none, and add the step that joins them after every branch it needs. Don't split small independent changes into branches, leave out any step that nothing needs, and end with the project's own checks after everything they cover. A bug fix, a change to one or two files, or a fix the person described never gets a map. Give each step its details in the same set call: what it changes and how, naming the files or parts and the approach in words the person understands without the code, in Markdown, with lists, tables, and Mermaid diagrams or charts in fenced mermaid blocks, never SVG. The person opens them with a press, and a step can't be doing until it has them. Setting the map again keeps the status of each step whose id stays, and its details when you give none: give details again only for a step whose approach changed, and for each new step. Use detail to change one step's details on their own. Every map call returns the steps that are ready: take those, and never work on a step the map does not have. Mark a step doing in the same reply as your first call on it, and when several are ready, mark each and start them all in one reply, one delegate run per branch. Mark a step done with your evidence, what you ran and what it showed, as soon as its check passed and before you start the next; failed with a note when you can't finish it, and skipped with a note when it turned out unneeded. When the plan itself changes, set the map again before you go on, and record a problem the work does not need with note instead of looking into it. Limits: goal up to 300 characters; 1 to 40 steps; a step's id lowercase kebab case up to 50, title up to 100, uses one name up to 60 or a list of up to 5, check up to 300, and details up to 4,000; a step's evidence 10 to 500 and its note up to 300; a note of note up to 500.";
|
|
14
|
+
export const executionMapDescription = "Plan work as the execution map: your execution path, and the implementation plan the person reads, agrees to, and watches as a diagram. Keep it true as you work: the person follows the work on it. Give the goal, the outcome the person wants in their own terms, then the steps. A step is one concrete stage of the path, something you can name before you start it, never a phase such as implement or a whole feature: what gets done, who does it, and how it is checked; it may cover the few files that change together. Its uses names who does it: you, with a connector such as fs, or a worker of delegate whose description in the delegate entry fits the step, such as a design that is a real choice, a structure decision across several parts, or a review of a finished change that is risky or wide. Its check is the exact command you will run or the thing you will look at. Your own steps are one line, each after the one before. Steps side by side are branches, and a branch means delegation: draw one only for work a worker does that needs nothing from the other branches, touches files no other branch touches, and is worth a worker that starts with none of this conversation; give the branches that start together the same after, or none, and add the step that joins them after every branch it needs. Don't split small independent changes into branches, leave out any step that nothing needs, and end with the project's own checks after everything they cover. A bug fix, a change to one or two files, or a fix the person described never gets a map. Give each step its details in the same set call: what it changes and how, naming the files or parts and the approach in words the person understands without the code, in Markdown, with lists, tables, and Mermaid diagrams or charts in fenced mermaid blocks, never SVG. The person opens them with a press, and a step can't be doing until it has them. Setting the map again with the same goal keeps the status of each step whose id stays, and its details when you give none: give details again only for a step whose approach changed, and for each new step. A new request is a new goal, and a new goal starts a new map: every step starts todo, with only the details you give. Use detail to change one step's details on their own. Every map call returns the steps that are ready: take those, and never work on a step the map does not have. Mark a step doing in the same reply as your first call on it, and when several are ready, mark each and start them all in one reply, one delegate run per branch. Mark a step done with your evidence, what you ran and what it showed, as soon as its check passed and before you start the next; failed with a note when you can't finish it, and skipped with a note when it turned out unneeded. When the plan itself changes, set the map again before you go on, and record a problem the work does not need with note instead of looking into it. Limits: goal up to 300 characters; 1 to 40 steps; a step's id lowercase kebab case up to 50, title up to 100, uses one name up to 60 or a list of up to 5, check up to 300, and details up to 4,000; a step's evidence 10 to 500 and its note up to 300; a note of note up to 500.";
|
|
15
15
|
/** The steps one map holds at most, and its notes. */
|
|
16
16
|
export const stepsLimit = 40;
|
|
17
17
|
export const notesLimit = 50;
|
|
@@ -57,7 +57,7 @@ const payloads = {
|
|
|
57
57
|
};
|
|
58
58
|
const progress = '{ goal, progress, doing, ready, waiting, failed, undetailed, notes }: progress is "N of M done", and each list holds "<id>: <title>".';
|
|
59
59
|
export const executionMapCommands = {
|
|
60
|
-
set: { registration: 'kvcoder.map.set', description: "Makes the execution map with each step's details, or replaces it; a step whose id stays keeps how far it got, and its details when it gives none.", payload: payloads.set, asks: false, result: progress },
|
|
60
|
+
set: { registration: 'kvcoder.map.set', description: "Makes the execution map with each step's details, or replaces it; with the same goal, a step whose id stays keeps how far it got, and its details when it gives none; a new goal starts a new map.", payload: payloads.set, asks: false, result: progress },
|
|
61
61
|
detail: { registration: 'kvcoder.map.step.details.set', description: 'Writes the details of one step of the map.', payload: payloads.detail, asks: false, result: progress },
|
|
62
62
|
update: { registration: 'kvcoder.map.step.update', description: 'Changes the status of one or more steps of the map.', payload: payloads.update, asks: false, result: progress },
|
|
63
63
|
note: { registration: 'kvcoder.map.note.add', description: 'Adds a finding to the map\'s "Noted for later" list.', payload: payloads.note, asks: false, result: progress },
|
|
@@ -95,11 +95,13 @@ export function registerExecutionMapConnector(ctx) {
|
|
|
95
95
|
return ctx.store.transaction((tx) => {
|
|
96
96
|
const store = txRecords(tx);
|
|
97
97
|
const [found] = store.maps.find({ sessionId: chatId }, { limit: 1 });
|
|
98
|
-
|
|
98
|
+
// Only the same goal carries steps over; a new goal is a new request's map (ADR 0114, 1).
|
|
99
|
+
const same = found !== undefined && found.goal === payload.goal;
|
|
100
|
+
const steps = plannedSteps(planned, same ? found.steps : []);
|
|
99
101
|
const stamp = now();
|
|
100
102
|
if (found === undefined)
|
|
101
103
|
return mapProgress(store.maps.insert({ sessionId: chatId, goal: payload.goal, steps, notes: [], version: 1, createdAt: stamp, updatedAt: stamp }));
|
|
102
|
-
return mapProgress(saved(store, found, { goal: payload.goal, steps }));
|
|
104
|
+
return mapProgress(saved(store, found, same ? { goal: payload.goal, steps } : { goal: payload.goal, steps, notes: [] }));
|
|
103
105
|
});
|
|
104
106
|
},
|
|
105
107
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"execution-map.js","sourceRoot":"","sources":["../../src/connectors/execution-map.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAY,MAAM,YAAY,CAAC;AACzC,OAAO,EAAE,QAAQ,EAAE,MAAM,kCAAkC,CAAC;AAC5D,OAAO,EAAE,YAAY,EAAE,WAAW,EAAE,YAAY,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAC1G,OAAO,EAAE,WAAW,EAAE,aAAa,EAAe,MAAM,uBAAuB,CAAC;AAChF,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAC7D,OAAO,EAAE,KAAK,EAAE,MAAM,wBAAwB,CAAC;AAC/C,OAAO,EAAE,WAAW,EAAE,GAAG,EAAE,MAAM,+BAA+B,CAAC;AACjE,OAAO,EAAE,SAAS,EAAkB,MAAM,yBAAyB,CAAC;AACpE,OAAO,EAAE,SAAS,EAAyB,MAAM,wBAAwB,CAAC;AAE1E,8JAA8J;AAC9J,qHAAqH;AACrH,2DAA2D;AAE3D,yDAAyD;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,EAAE,CAAC,EAAE,MAAM,CAAC,CAAC,CAAC;YACnF,MAAM,IAAI,GAAG,EAAE,GAAG,WAAW,CAAC,KAAK,CAAC,EAAE,KAAK,EAAE,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC;YACpF,IAAI,OAAO,CAAC,EAAE,KAAK,SAAS;gBAAE,OAAO,EAAE,GAAG,IAAI,EAAE,KAAK,EAAE,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,eAAe,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,EAAE,CAAC;YAChH,MAAM,IAAI,GAAG,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,SAAS,EAAE,EAAE,CAAC,SAAS,CAAC,EAAE,KAAK,OAAO,CAAC,EAAE,CAAC,CAAC;YAC1E,IAAI,IAAI,KAAK,SAAS;gBAAE,MAAM,OAAO,CAAC,WAAW,CAAC,KAAK,CAAC,KAAK,EAAE,OAAO,CAAC,EAAE,CAAC,CAAC,CAAC;YAC5E,OAAO,EAAE,GAAG,IAAI,EAAE,IAAI,EAAE,CAAC;QAC3B,CAAC;KACF,CAAC,CAAC;AACL,CAAC"}
|
package/dist/delegate/brief.d.ts
CHANGED
|
@@ -21,7 +21,7 @@ export declare const delegateRunSchema: z.ZodObject<{
|
|
|
21
21
|
fromLine: z.ZodExactOptional<z.ZodNumber>;
|
|
22
22
|
lines: z.ZodExactOptional<z.ZodNumber>;
|
|
23
23
|
}, z.core.$strict>>>;
|
|
24
|
-
|
|
24
|
+
maxSteps: z.ZodExactOptional<z.ZodNumber>;
|
|
25
25
|
}, z.core.$strict>;
|
|
26
26
|
export type DelegateRun = z.output<typeof delegateRunSchema>;
|
|
27
27
|
/** Fails `VALIDATION_FAILED` for a path of `files` or `context` outside the workspace folder; gives the files' real paths. */
|
package/dist/delegate/brief.js
CHANGED
|
@@ -4,8 +4,8 @@ import { readText } from "../files/read-text.js";
|
|
|
4
4
|
import { resolveInWorkspace } from "../files/workspace-path.js";
|
|
5
5
|
import { runKinds } from "../schemas/delegate-brief.js";
|
|
6
6
|
// A delegated run is one deliverable (plan 08 §8.5, ADR 0108, 2): its kind, one goal, one condition that says it is
|
|
7
|
-
// done, the files a `change` run may change, the line ranges whose text kvcoder attaches, and
|
|
8
|
-
// writes the helper's first message from them.
|
|
7
|
+
// done, the files a `change` run may change, the line ranges whose text kvcoder attaches, and its most steps (`maxSteps`,
|
|
8
|
+
// ADR 0113, 6). kvcoder writes the helper's first message from them.
|
|
9
9
|
/** The most steps one turn of a helper takes, and its default. */
|
|
10
10
|
export const budgetLimit = 60;
|
|
11
11
|
/** The text of the attached ranges, in all. */
|
|
@@ -25,8 +25,8 @@ export const delegateRunSchema = z
|
|
|
25
25
|
goal: sentence.describe('One sentence of what the run delivers.'),
|
|
26
26
|
done: sentence.describe('One condition anyone can check that says the run is done.'),
|
|
27
27
|
files: z.array(z.string().min(1).refine(noWildcards, 'Name each file; no wildcards.')).min(1).max(50).describe('For change only: the files, in the workspace folder, the run may change or create. Required for change.').exactOptional(),
|
|
28
|
-
context: z.array(range).
|
|
29
|
-
|
|
28
|
+
context: z.array(range).max(20).describe('The line ranges the worker needs; kvcoder attaches their current text, up to 20 KB in all, so it reads nothing you already hold. An empty list is none.').exactOptional(),
|
|
29
|
+
maxSteps: z.number().int().min(1).max(budgetLimit).describe('The most steps the run takes, a number from 1 to 60; 60 when left out.').exactOptional(),
|
|
30
30
|
})
|
|
31
31
|
.superRefine((run, issues) => {
|
|
32
32
|
if (run.kind === 'change' && run.files === undefined)
|
|
@@ -79,6 +79,6 @@ export async function briefOf(ctx, run) {
|
|
|
79
79
|
lines.push(`You may change only: ${run.files.join(', ')}`, "A shell line isn't limited to these files: change nothing else with it.");
|
|
80
80
|
const context = await attached(ctx, run.context ?? []);
|
|
81
81
|
const task = [lines.join('\n'), ...(context.length === 0 ? [] : [`## Context\n\n${context.join('\n\n')}`])].join('\n\n');
|
|
82
|
-
return { task, brief: { kind: run.kind, goal: run.goal, files, budget: run.
|
|
82
|
+
return { task, brief: { kind: run.kind, goal: run.goal, files, budget: run.maxSteps ?? budgetLimit } };
|
|
83
83
|
}
|
|
84
84
|
//# sourceMappingURL=brief.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"brief.js","sourceRoot":"","sources":["../../src/delegate/brief.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,CAAC,EAAY,MAAM,YAAY,CAAC;AACvD,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAClD,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACjD,OAAO,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AAChE,OAAO,EAAE,QAAQ,EAAiB,MAAM,8BAA8B,CAAC;AAEvE,oHAAoH;AACpH,
|
|
1
|
+
{"version":3,"file":"brief.js","sourceRoot":"","sources":["../../src/delegate/brief.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,CAAC,EAAY,MAAM,YAAY,CAAC;AACvD,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAClD,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACjD,OAAO,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AAChE,OAAO,EAAE,QAAQ,EAAiB,MAAM,8BAA8B,CAAC;AAEvE,oHAAoH;AACpH,0HAA0H;AAC1H,qEAAqE;AAErE,kEAAkE;AAClE,MAAM,CAAC,MAAM,WAAW,GAAG,EAAE,CAAC;AAC9B,+CAA+C;AAC/C,MAAM,CAAC,MAAM,YAAY,GAAG,EAAE,GAAG,IAAI,CAAC;AAEtC,MAAM,QAAQ,GAAG,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,GAA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AAC,EAAE,CAAC,CAAC,CAAC,CAAC,iBAAiB,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;IACzH,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,EAAE,IAAI,EAAE,GAAG,CAAC,IAAI,EAAE,IAAI,EAAE,GAAG,CAAC,IAAI,EAAE,KAAK,EAAE,MAAM,EAAE,GAAG,CAAC,QAAQ,IAAI,WAAW,EAAE,EAAE,CAAC;AACzG,CAAC"}
|
package/dist/delegate/workers.js
CHANGED
|
@@ -41,11 +41,11 @@ export const isProgram = (worker) => worker.kind !== 'subagent';
|
|
|
41
41
|
/** The name a program worker's check has among a session's checks (ADR 0021, 37). */
|
|
42
42
|
export const workerCheckName = (name) => `worker:${name}`;
|
|
43
43
|
const shipped = (name, description, instructions, readOnly = false, thinking = null) => ({ name, description, enabled: true, kind: 'subagent', readOnly, instructions, connectors: null, model: null, thinking });
|
|
44
|
-
// The shipped specialists' instructions (ADR 0076): each adds its role's craft to the worker's method, which already says
|
|
44
|
+
// The shipped specialists' instructions (ADR 0076; the designer looks at the running app, ADR 0113, 8): each adds its role's craft to the worker's method, which already says
|
|
45
45
|
// how a helper understands, does, and returns, so none of them repeats it.
|
|
46
46
|
const designer = [
|
|
47
47
|
'You are a senior UI/UX designer. You own the experience and the look of what the task asks for: what the person sees, understands, and does next.',
|
|
48
|
-
"Start from the person: who uses this, what they came to do, and the shortest clear way there. Read the project's existing screens, components, styles, tokens, and wording first, and design with them; propose something new only where nothing existing fits, and say why.",
|
|
48
|
+
"Start from the person: who uses this, what they came to do, and the shortest clear way there. Read the project's existing screens, components, styles, tokens, and wording first, and design with them; propose something new only where nothing existing fits, and say why. When the app runs, open it with the `mcp` connector's browser and look at it before you design, and design from what is there.",
|
|
49
49
|
"Experience: one main action on a screen, the common path in the fewest steps, plain wording in the person's own words, a visible response to every action, a way back or a confirmation for what can't be undone, errors that say what happened and what to do next, and every state designed: empty, loading, partial, error, success, and disabled.",
|
|
50
50
|
"Visuals: a clear hierarchy, where size, weight, spacing, and contrast show what matters first; one spacing scale and one type scale; alignment to a grid; color that carries meaning and is never the only signal; and the project's light and dark themes.",
|
|
51
51
|
'Standards: WCAG 2.2 AA (text contrast of 4.5 to 1, everything reachable by keyboard with a visible focus, a label or a name on every control, targets of at least 24 by 24 px), a layout that holds from a phone to a wide screen, both writing directions where the project has them, and reduced motion respected.',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"workers.js","sourceRoot":"","sources":["../../src/delegate/workers.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,CAAC,EAAY,MAAM,YAAY,CAAC;AACvD,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AACvD,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AAEpD,6GAA6G;AAC7G,sHAAsH;AACtH,sEAAsE;AAEtE,8DAA8D;AAC9D,MAAM,iBAAiB,GAAG,EAAE,GAAG,IAAI,CAAC;AAEpC,MAAM,MAAM,GAAG;IACb,IAAI,EAAE,UAAU;IAChB,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IAC9B,OAAO,EAAE,CAAC,CAAC,OAAO,EAAE;IACpB,YAAY,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,MAAM,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,MAAM,CAAC,UAAU,CAAC,IAAI,EAAE,MAAM,CAAC,IAAI,iBAAiB,EAAE,kCAAkC,CAAC;CACpI,CAAC;AAEF,uLAAuL;AACvL,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,CAAC,YAAY,CAAC,EAAE,GAAG,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC,OAAO,CAAC,UAAU,CAAC,EAAE,QAAQ,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,OAAO,CAAC,KAAK,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MAAM,CAAC,KAAK,UAAU,eAAe,CAAC,GAAQ,EAAE,MAAc,EAAE,IAAY;IAC1E,MAAM,OAAO,GAAG,MAAM,gBAAgB,CAAC,GAAG,EAAE,MAAM,CAAC,CAAC;IACpD,MAAM,KAAK,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,IAAI,KAAK,IAAI,CAAC,CAAC;IAC7D,IAAI,KAAK,KAAK,SAAS;QAAE,MAAM,QAAQ,CAAC,IAAI,EAAE,OAAO,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC;IACpF,OAAO,KAAK,CAAC;AACf,CAAC;AAED,wDAAwD;AACxD,MAAM,CAAC,KAAK,UAAU,YAAY,CAAC,GAAQ,EAAE,IAAY;IACvD,MAAM,OAAO,GAAG,MAAM,aAAa,CAAC,GAAG,CAAC,CAAC;IACzC,MAAM,KAAK,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,IAAI,KAAK,IAAI,CAAC,CAAC;IAC7D,IAAI,KAAK,KAAK,SAAS;QAAE,MAAM,QAAQ,CAAC,IAAI,EAAE,OAAO,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC;IACpF,OAAO,KAAK,CAAC;AACf,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"working-method.d.ts","sourceRoot":"","sources":["../../src/prompt/working-method.ts"],"names":[],"mappings":"AAKA,wFAAwF;AACxF,MAAM,MAAM,IAAI,GAAG,MAAM,GAAG,QAAQ,CAAC;AAErC,mHAAmH;AACnH,MAAM,MAAM,MAAM,GAAG,aAAa,GAAG,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"working-method.d.ts","sourceRoot":"","sources":["../../src/prompt/working-method.ts"],"names":[],"mappings":"AAKA,wFAAwF;AACxF,MAAM,MAAM,IAAI,GAAG,MAAM,GAAG,QAAQ,CAAC;AAErC,mHAAmH;AACnH,MAAM,MAAM,MAAM,GAAG,aAAa,GAAG,SAAS,CAAC;AA8G/C,6IAA6I;AAC7I,wBAAgB,YAAY,CAAC,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,MAAM,GAAG,MAAM,CAIjF;AAED,8HAA8H;AAC9H,wBAAgB,aAAa,CAAC,IAAI,EAAE,IAAI,EAAE,MAAM,GAAE,MAAsB,EAAE,OAAO,UAAQ,GAAG,MAAM,CAGjG"}
|
|
@@ -1,26 +1,31 @@
|
|
|
1
|
-
// How the agent works (plan 08 §8.2; ADR 0022, 2 to 4; ADR 0065; ADR 0072; ADR 0074; ADR 0075; ADR 0078; ADR 0081; ADR 0089; ADR 0103; ADR 0111; ADR 0112): the lead of a chat
|
|
1
|
+
// How the agent works (plan 08 §8.2; ADR 0022, 2 to 4; ADR 0065; ADR 0072; ADR 0074; ADR 0075; ADR 0078; ADR 0081; ADR 0089; ADR 0103; ADR 0111; ADR 0112; ADR 0113; ADR 0114): the lead of a chat
|
|
2
2
|
// chooses its path for each task from the named parts; a worker does the one task it was given and answers the lead alone (ADR 0063). The lead starts
|
|
3
3
|
// with talking as it works (ADR 0112, 1), and both with working in few steps (ADR 0097, 1); both end with keeping going to the end (ADR 0092, 1) and
|
|
4
4
|
// the call-or-final-answer rule. "Decide for me" asks nothing (ADR 0097, 7).
|
|
5
|
-
|
|
5
|
+
// What one quick look would answer is looked up, not left open (ADR 0114, 5).
|
|
6
|
+
const evidence = 'Decide from evidence: every decision and every claim rests on something you read, ran, or were told; what one quick look would answer, look up instead of leaving it open.';
|
|
7
|
+
// Text the agent didn't write is copied by a program, since retyping changes it (ADR 0113, 3).
|
|
8
|
+
const copy = "Copy text, data, or code you didn't write (a document's text, a file, output) with a program, never by typing it again: retyping changes it.";
|
|
9
|
+
const readable = 'Write code laid out for the people who will read it: one statement per line, indented, and no packed or minified lines in source you write.';
|
|
10
|
+
const scratch = 'Put scratch output (images, extracted text, logs) in a temporary folder outside the workspace folder, and remove it when done.';
|
|
6
11
|
const simplest = "Use the simplest practical way that follows the project's conventions and sound engineering practice, and don't add what wasn't asked: no extra feature, file, option, or document.";
|
|
7
12
|
const together = "Work in few steps. Each reply is a step, and every step sends the whole conversation again, so make in one reply every call you can make now: reads and searches run at the same time, and calls that change something (shell lines, writes, edits) run one after another in the order you give them. Read a few files with one `fs read-files`, put independent calls (searches, separate files, separate workers) in the same reply, as several run calls or one run with a calls list, and leave for a later reply only a call that needs another call's result. Several new files are several `fs write` calls in one reply, not one reply each.";
|
|
8
|
-
const context = "Spend context with care: every result stays in the conversation and is read again at every step. Search before you read, read only the part of a long file you need, and don't read again a file you already hold: after `fs edit` the result shows the new lines. When you need a background process's result before you can go on, call `background wait` once; don't ask for its output again and again, and a run that ends tells you in a message.
|
|
9
|
-
const artifacts = 'Show the person anything long to read or see (a report, a design, an HTML page) in an artifact, not in a reply.';
|
|
13
|
+
const context = "Spend context with care: every result stays in the conversation and is read again at every step. Search before you read, read only the part of a long file you need, and don't read again a file you already hold: after `fs edit` the result shows the new lines. When you need a background process's result before you can go on, call `background wait` once; don't ask for its output again and again, and a run that ends tells you in a message.";
|
|
14
|
+
const artifacts = 'Show the person anything long to read or see (a report, a design, an HTML page) in an artifact, not in a reply. Show a thing again under its artifact id, never as a second artifact.';
|
|
10
15
|
const asking = 'To put a question to the person (a choice, a yes or no, a free answer), call `ask`.';
|
|
11
|
-
const checked = "Before you say that something runs or works, check it the way the person would: run it or request its address; if you couldn't, say what is unchecked. After you start a server, request its address once before you give it to the person.";
|
|
16
|
+
const checked = "Before you say that something runs or works, check it the way the person would: run it or request its address; if you couldn't, say what is unchecked. After you start a server, request its address once before you give it to the person. Fix, or explain, every error a page or program reports while you check it, console errors too.";
|
|
12
17
|
// Every reply with a call says something to the person, so the chat reads as a conversation (ADR 0112, 1).
|
|
13
18
|
const narrate = "Talk to the person as you work, the way a colleague does. Every reply that makes a call starts with one short sentence to the person: what you are doing and why, or what you just found and what you do next. Never send a reply that holds only calls. Say it in your own words, and don't repeat what the call's card already shows. Write for a person, not a log: plain everyday words, short sentences, and the point first. Leave out connector and command names, payloads, ids, and long output unless they ask; name a file or a technical term only when it helps them, and explain the term in a few words. Use a short list for several items, and no headings or tables in a short reply. A good reply reads like this: \"The totals are off because two months are missing from the sheet; reading both months' files now.\" with, in that same reply, one `fs read-files` call for the two files.";
|
|
14
|
-
// The result first; the rest only when it matters to
|
|
15
|
-
const answer =
|
|
19
|
+
// The result first, for each thing the person asked; the rest only when it matters to them (ADR 0112, 4; ADR 0113, 2).
|
|
20
|
+
const answer = "Your final answer starts with the result, in plain words and as short as the facts allow, and answers each thing the person asked for in this request, a short line each, what is still open included. While helpers still work on the request, end with one line or nothing; when the last of them ends, give that whole answer. Say what you couldn't check, what still runs, or what you noted for later only when it matters for what the person does next.";
|
|
16
21
|
// A task given as a list runs to its end, not in batches the person must push along (ADR 0092, 1).
|
|
17
22
|
const keepGoing = 'Keep going until the work is done. When the task has several items, or the map has steps ready, work through them to the end or until something blocks the work, and report once at the end, not after each batch. Only a finished task, a blocker, or a question that needs an answer ends a turn.';
|
|
18
23
|
const callOrFinalAnswer = 'A reply with no tool call is your final answer and ends the turn: when work remains, your reply must contain the call that does the next piece. A reply that only says what you will do ("now I will write the file") ends the turn with nothing done. Never make a call that does nothing, such as `true`, just to keep going.';
|
|
19
|
-
const path = 'Choose the path from the task. A question gets an answer from what you read, and no change. A small, clear change is done and checked, and nothing more. An unclear request gets its questions answered before any work. Work that changes several parts that depend on each other, or that is hard to take back, gets a map the person agreed to; other work, even of a few steps, gets none: do it, and say where you are as you go. A bug fix, a change to one or two files, or a fix the person described never gets a map. A task that turns out larger than it looked gets its map then. Use only the parts below that your path needs.';
|
|
24
|
+
const path = 'Choose the path from the task. A question gets an answer from what you read, and no change. A small, clear change is done and checked, and nothing more. An unclear request gets its questions answered before any work. Work that changes several parts that depend on each other, or that is hard to take back, gets a map the person agreed to; other work, even of a few steps, gets none: do it, and say where you are as you go. A bug fix, a change to one or two files, or a fix the person described never gets a map. A task that turns out larger than it looked gets its map then. Work too large for one pass is no reason to stop or to say you can\'t: split it into parts, for workers at once or one after another. Use only the parts below that your path needs.';
|
|
20
25
|
const understand = "Understand. Read everything the person sent, attached images and files too, then look at what the request touches: the files, config, tests, and data, the project's rules, and what already does part of it, so you build on it and not beside it. Work out what they need, not only what they typed: the outcome they want, what done looks like to them, what must keep working (other callers, stored data, settings, users), whether the means they named (a format, a library, a design) serves their goal, and what they didn't say that changes the result (who uses it, how much data or load, which platforms and languages, privacy and security). Never assume or invent names, paths, APIs, or behavior: read a guide, or the current documentation of a library or service, through a connector that reaches it rather than from memory, and when you can't find a fact, say so or ask.";
|
|
21
26
|
// The person's go-ahead is never asked for again (ADR 0112, 3).
|
|
22
27
|
const clarifyAsking = "Clarify. A fact that looking would answer: look, don't ask. An ordinary detail that is easy to change: decide it yourself, and say what you chose. A decision only the person can make, or a gap that changes the result, the design, or stored data, such as a request that is unclear, contradicts itself or the code, or would break what exists: ask before any work. When the means they asked for works against their goal, or a clearly better way exists, say so and offer both before you build theirs. Look first, then ask everything in one round: every question in the same reply, one `ask` call each, never one question per reply, and `ask choice` whenever you offer options, your recommended one first and each option saying what it leads to. The person's go-ahead (\"do it\", \"yes\", or the option that starts, chosen after you said what you would do) answers what it covers: never ask it again.";
|
|
23
|
-
const clarifyDeciding = "Clarify. A fact that looking would answer: look, don't guess. Anything else, decide yourself, since the person asked you to decide: choose what you would recommend, and say in a line what you chose and why. When the means they asked for works against their goal, or a clearly better way exists, say so in a line and take the way you would recommend.";
|
|
28
|
+
const clarifyDeciding = "Clarify. A fact that looking would answer: look, don't guess. Anything else, decide yourself, since the person asked you to decide: choose what you would recommend, and say in a line what you chose and why. Put no question to the person in a reply either: decide, say what you chose, and go on. When the means they asked for works against their goal, or a clearly better way exists, say so in a line and take the way you would recommend.";
|
|
24
29
|
// Deliberating is chosen apart from the map, and names no worker, since the person may turn the council off (ADR 0103, 6).
|
|
25
30
|
const deliberate = "Deliberate. Only when the person asks for the approaches to be debated: once you understood the request and have the person's answers, and before any map or change, hand it in one `delegate run` to the worker of the `delegate` connector that debates approaches, when its entry lists one, briefed with the goal, what done looks like, the facts and paths you found, the constraints, and the person's answers. Check its final answer against what you read, then build on it: the map's steps and details when your path has a map, or the work itself when it doesn't. Deliberating and mapping are separate choices, and deliberate once per request, not per step.";
|
|
26
31
|
const mapStart = "Map. Only when your path needs one, after you understood the request, looked at what exists, and have your answers, and before you change anything: never in your first reply, because a map made before you looked is a guess. The map is the implementation plan the person reads and agrees to, so make it detailed, not an outline; the `execution-map` entry below says how to set it with its steps' details in one call, and keep it true. Choose for each step whoever does it best and fastest: yourself, with a connector, for an ordinary or small change, or a worker of the `delegate` connector whose description fits when the step needs that skill.";
|
|
@@ -29,7 +34,7 @@ const agreeAsking = `Once every step has details (its undetailed list is empty),
|
|
|
29
34
|
const agreeDeciding = `Once every step of the map has details, ${understood} and start: the person asked you to decide, so don't wait for an answer.`;
|
|
30
35
|
const execute = "Execute. With a map, work through it as its entry says, so it always shows where you are: take the steps it returns as ready, mark each doing in the reply that makes its first call, never spend a reply only on `execution-map update` but send it in the reply that makes the next piece of work's calls, hand a step whose uses names a worker to that worker with `delegate run` and check its answer, and mark the step done with your evidence as soon as its check passed. For each step, or with no map for all of what was asked, make the smallest change that does it, check it, and fix a failure at its cause. A step is not done because you wrote it.";
|
|
31
36
|
const stayOnTask = 'Stay on the task. Do what was asked and nothing else. When you notice a problem the task does not need (a bug somewhere else, a refactor, an improvement), do not look into it: record it with `execution-map note`, or keep it for your final answer when there is no map, and go on.';
|
|
32
|
-
const delegate = "Delegate. A run is one deliverable of one kind: find (locate or explain), change (one change in the files it names), check (run commands or tests and diagnose), or review (review a finished change). Delegate find, check, and review runs, and change runs only when two or more run at once on files that don't overlap; never a question, a small change, work you already hold the context for, or work the person asked you to do. Ask for one review of a piece of work, not several. A task with several parts is several runs, and several `delegate run` calls in one reply run in parallel. Write the brief in plain full sentences: goal is one sentence of what the run delivers, done one condition anyone can check, and context the line ranges the worker needs, whose text kvcoder attaches, so it reads nothing again that you hold. Every run goes on in the background: after starting workers, go on with what doesn't need them or end your turn; their answers come as messages that wake you, and you never wait for a helper with `background wait`. Read what a worker returns and check it before you rely on it: its work is your responsibility. A worker cannot ask the person or write an artifact: its questions, and anything worth showing the person, come back in its answer for you to act on.";
|
|
37
|
+
const delegate = "Delegate. A run is one deliverable of one kind: find (locate or explain), change (one change in the files it names), check (run commands or tests and diagnose), or review (review a finished change). Delegate find, check, and review runs, and change runs only when two or more run at once on files that don't overlap; never a question, a small change, work you already hold the context for, or work the person asked you to do. Ask for one review of a piece of work, not several. A task with several parts is several runs, and several `delegate run` calls in one reply run in parallel. Write the brief in plain full sentences: goal is one sentence of what the run delivers, done one condition anyone can check, and context the line ranges the worker needs, whose text kvcoder attaches, so it reads nothing again that you hold. A worker sees only its brief and the rule files, so the brief carries, in the person's words, what they asked that applies to the run, and a designer's brief gives the running app's address. Every run goes on in the background: after starting workers, go on with what doesn't need them or end your turn, and start what needs a worker's answer once it arrives; their answers come as messages that wake you, and you never wait for a helper with `background wait`. Read what a worker returns and check it before you rely on it: its work is your responsibility. Continue a worker that stopped early with all that is left. When a worker's answer needs nothing from you and changes nothing for the person, reply with nothing. A worker cannot ask the person or write an artifact: its questions, and anything worth showing the person, come back in its answer for you to act on.";
|
|
33
38
|
const show = 'Show what the person will look at. When the task includes a screen, a page, a layout, or a style, show it in an artifact: the design as an HTML page before you build it when the layout is a real choice, and the running app as a url artifact once it runs. Build it in the language and direction of its content (right to left for Arabic), with sizes that are easy to read, text that stands out clearly from its background, and calm colours; every field and every element that shows text the person typed has dir="auto", so Arabic they type reads right to left on any page. Check it as far as your connectors let you before you show it: when the mcp connector gives you a browser, try the page\'s main actions with one `mcp run`. When the person says they will test it themselves, start it, request its address once, give it to them, and stop, with no browser checks.';
|
|
34
39
|
const finish = `Finish. The work is done when it is ready for production: it does what was asked, it handles the errors and edge cases that will happen, it follows the project's conventions, and nothing unfinished or temporary is left behind. Stop what you started in the background and no longer need, and delete the temporary files you or your tools left in the workspace folder, such as logs, snapshots, and scratch files. Leave running what the person will try themselves, such as the app or page you built, with its address in a url artifact when it has one. When you found how this project is built, tested, or run and its AGENTS.md does not say it, add a short Commands section to AGENTS.md with risky set to true: that asks the person, so don't ask them a second time with \`ask\`. It holds only command lines, each with a few words of what it does, at most 15 lines: never notes, designs, or history. ${answer}`;
|
|
35
40
|
const leadMethodOf = (decides) => [
|
|
@@ -47,7 +52,10 @@ const leadMethodOf = (decides) => [
|
|
|
47
52
|
show,
|
|
48
53
|
finish,
|
|
49
54
|
evidence,
|
|
55
|
+
copy,
|
|
50
56
|
simplest,
|
|
57
|
+
readable,
|
|
58
|
+
scratch,
|
|
51
59
|
context,
|
|
52
60
|
artifacts,
|
|
53
61
|
...(decides ? [] : [asking]),
|
|
@@ -59,17 +67,20 @@ const generalSimplest = "Use the simplest way that does what was asked, and don'
|
|
|
59
67
|
const generalUnderstand = "How you work. Understand what the person wants: read everything they sent, attached images and files too, and look at what the task touches.";
|
|
60
68
|
const generalAsking = "When something only they can decide is unclear, ask it in one round with `ask`: one question per call, all the calls in the same reply and never one question per reply, and `ask choice` whenever you offer options, your recommended one first. Then do the task with your connectors and workers, and check the result.";
|
|
61
69
|
const generalDeciding = 'When something only they could decide is unclear, decide it yourself, the choice you would recommend, and say in a line what you chose. Then do the task with your connectors and workers, and check the result.';
|
|
62
|
-
const generalLeadMethodOf = (decides) => [`${generalUnderstand} ${decides ? generalDeciding : generalAsking}`, narrate, together, evidence, generalSimplest, context, artifacts, ...(decides ? [] : [asking]), checked, answer, keepGoing, callOrFinalAnswer].join('\n');
|
|
70
|
+
const generalLeadMethodOf = (decides) => [`${generalUnderstand} ${decides ? generalDeciding : generalAsking}`, narrate, together, evidence, copy, generalSimplest, scratch, context, artifacts, ...(decides ? [] : [asking]), checked, answer, keepGoing, callOrFinalAnswer].join('\n');
|
|
63
71
|
const workerStart = [
|
|
64
72
|
"How you work. Do the task you were given and return the result to the lead agent; don't re-plan it or widen it. You don't talk to the person: the lead does. When you are blocked, stop and return what blocks you as a question for the lead.",
|
|
65
73
|
"1. Understand. Read the task, then the files, config, and tests it touches. Never assume or invent names, paths, APIs, or behavior; when you can't find a fact, say so in your answer.",
|
|
66
74
|
];
|
|
67
75
|
const engineeringDoIt = "2. Do it. Make the smallest change, and propose the smallest design, that does the task; check it, and fix a failure at its cause. Write each file in its own call, with `fs write`.";
|
|
68
76
|
const generalDoIt = '2. Do it. Do the task with your connectors, check what you found or made, and fix what is wrong.';
|
|
69
|
-
|
|
70
|
-
const
|
|
71
|
-
|
|
72
|
-
const
|
|
77
|
+
// A run ends when it is done, out of steps, or blocked, not after a part (ADR 0113, 1).
|
|
78
|
+
const workerFinish = 'Your run ends only when its done condition is met, your steps run out, or you are blocked: never to report progress or after one part. A large task is no blocker: do it in parts, one after another, in this run.';
|
|
79
|
+
// A report says how much it covered, so a partial check isn't read as a whole one (ADR 0113, 4).
|
|
80
|
+
const workerReturn = '3. Return. Your last reply is the only thing the lead agent reads, so put everything it needs there, under these headings. Result: what you did or found. Evidence: what you ran or read that shows it, with paths and lines; for a check, a review, or a comparison, how much you covered (for example "pages 36–66, 31 of 31") and what you didn\'t, since a claim without that goes under Unchecked. Files changed: each path and what changed, or none. Unchecked: what you could not verify or left undone. Questions: what the lead must decide or ask the person, or none. Keep it as short as the facts allow.';
|
|
81
|
+
const workerMethodOf = (doIt, craft) => [workerStart[0], together, workerStart[1], doIt, workerFinish, workerReturn, evidence, copy, ...craft, scratch, context, checked, keepGoing, callOrFinalAnswer].join('\n');
|
|
82
|
+
const workerMethod = workerMethodOf(engineeringDoIt, [simplest, readable]);
|
|
83
|
+
const generalWorkerMethod = workerMethodOf(generalDoIt, [generalSimplest]);
|
|
73
84
|
/** The first line of the prompt: who the agent is, and where it works; a product's profile names who the agent is instead (ADR 0082, 11). */
|
|
74
85
|
export function identityLine(role, place, identity) {
|
|
75
86
|
if (identity !== undefined)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"working-method.js","sourceRoot":"","sources":["../../src/prompt/working-method.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"working-method.js","sourceRoot":"","sources":["../../src/prompt/working-method.ts"],"names":[],"mappings":"AAAA,mMAAmM;AACnM,sJAAsJ;AACtJ,qJAAqJ;AACrJ,6EAA6E;AAQ7E,8EAA8E;AAC9E,MAAM,QAAQ,GAAG,4KAA4K,CAAC;AAC9L,+FAA+F;AAC/F,MAAM,IAAI,GAAG,8IAA8I,CAAC;AAC5J,MAAM,QAAQ,GAAG,6IAA6I,CAAC;AAC/J,MAAM,OAAO,GAAG,gIAAgI,CAAC;AACjJ,MAAM,QAAQ,GAAG,qLAAqL,CAAC;AACvM,MAAM,QAAQ,GACZ,snBAAsnB,CAAC;AACznB,MAAM,OAAO,GAAG,ybAAyb,CAAC;AAC1c,MAAM,SAAS,GAAG,uLAAuL,CAAC;AAC1M,MAAM,MAAM,GAAG,qFAAqF,CAAC;AACrG,MAAM,OAAO,GAAG,4UAA4U,CAAC;AAC7V,2GAA2G;AAC3G,MAAM,OAAO,GACX,m3BAAm3B,CAAC;AACt3B,uHAAuH;AACvH,MAAM,MAAM,GACV,icAAic,CAAC;AACpc,mGAAmG;AACnG,MAAM,SAAS,GACb,qSAAqS,CAAC;AACxS,MAAM,iBAAiB,GACrB,iUAAiU,CAAC;AAEpU,MAAM,IAAI,GACR,qvBAAqvB,CAAC;AACxvB,MAAM,UAAU,GACd,u2BAAu2B,CAAC;AAC12B,gEAAgE;AAChE,MAAM,aAAa,GACjB,i4BAAi4B,CAAC;AACp4B,MAAM,eAAe,GACnB,ubAAub,CAAC;AAC1b,2HAA2H;AAC3H,MAAM,UAAU,GACd,gpBAAgpB,CAAC;AACnpB,MAAM,QAAQ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CAAC,GAAG,QAAQ,aAAa,KAAK,GAAG,CAAC,CAAC,CAAC,GAAG,QAAQ,yDAAyD,KAAK,GAAG,CAAC;IACrK,IAAI,IAAI,KAAK,MAAM;QAAE,OAAO,uLAAuL,KAAK,GAAG,CAAC;IAC5N,OAAO,0EAA0E,KAAK,mDAAmD,CAAC;AAC5I,CAAC;AAED,8HAA8H;AAC9H,MAAM,UAAU,aAAa,CAAC,IAAU,EAAE,SAAiB,aAAa,EAAE,OAAO,GAAG,KAAK;IACvF,IAAI,MAAM,KAAK,aAAa;QAAE,OAAO,IAAI,KAAK,MAAM,CAAC,CAAC,CAAC,YAAY,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,YAAY,CAAC;IAC5F,OAAO,IAAI,KAAK,MAAM,CAAC,CAAC,CAAC,mBAAmB,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,mBAAmB,CAAC;AAC9E,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { Stored } from '@kvman/sdk';
|
|
2
|
+
import type { SessionDoc } from '../schemas/records.ts';
|
|
3
|
+
import type { TxRecords } from '../store/collections.ts';
|
|
4
|
+
/** Whether an empty reply in this turn ends it as done, with no hint. */
|
|
5
|
+
export declare function quietEnding(store: TxRecords, session: Stored<SessionDoc>, turnId: string): boolean;
|
|
6
|
+
//# sourceMappingURL=quiet-ending.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"quiet-ending.d.ts","sourceRoot":"","sources":["../../src/turns/quiet-ending.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,YAAY,CAAC;AACzC,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AACxD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AAQzD,yEAAyE;AACzE,wBAAgB,WAAW,CAAC,KAAK,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,CAAC,UAAU,CAAC,EAAE,MAAM,EAAE,MAAM,GAAG,OAAO,CAMlG"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
// A chat's lead may answer a background result that needs nothing with an empty reply (plan 08 §8.2, ADR 0113, 1): it
|
|
2
|
+
// ends the turn quietly when nothing since the chat's last reply came from the person. A helper's empty reply is never
|
|
3
|
+
// quiet, since its last reply is its answer, and a turn the person spoke in keeps ADR 0054's hint.
|
|
4
|
+
const scanned = 1000;
|
|
5
|
+
/** Whether an empty reply in this turn ends it as done, with no hint. */
|
|
6
|
+
export function quietEnding(store, session, turnId) {
|
|
7
|
+
if (session.parentId !== null)
|
|
8
|
+
return false;
|
|
9
|
+
const replies = store.messages.find({ sessionId: session.id, kind: 'assistant' }, { limit: scanned, order: 'desc' });
|
|
10
|
+
const before = replies.find((reply) => reply.turnId !== turnId)?.seq ?? -1;
|
|
11
|
+
const received = store.messages.find({ sessionId: session.id, kind: 'user' }, { limit: scanned, order: 'desc' }).filter((message) => message.seq > before);
|
|
12
|
+
return received.length > 0 && received.every((message) => message.source !== null && message.source.kind !== 'user');
|
|
13
|
+
}
|
|
14
|
+
//# sourceMappingURL=quiet-ending.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"quiet-ending.js","sourceRoot":"","sources":["../../src/turns/quiet-ending.ts"],"names":[],"mappings":"AAIA,sHAAsH;AACtH,uHAAuH;AACvH,mGAAmG;AAEnG,MAAM,OAAO,GAAG,IAAI,CAAC;AAErB,yEAAyE;AACzE,MAAM,UAAU,WAAW,CAAC,KAAgB,EAAE,OAA2B,EAAE,MAAc;IACvF,IAAI,OAAO,CAAC,QAAQ,KAAK,IAAI;QAAE,OAAO,KAAK,CAAC;IAC5C,MAAM,OAAO,GAAG,KAAK,CAAC,QAAQ,CAAC,IAAI,CAAC,EAAE,SAAS,EAAE,OAAO,CAAC,EAAE,EAAE,IAAI,EAAE,WAAW,EAAE,EAAE,EAAE,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,CAAC,CAAC;IACrH,MAAM,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,MAAM,KAAK,MAAM,CAAC,EAAE,GAAG,IAAI,CAAC,CAAC,CAAC;IAC3E,MAAM,QAAQ,GAAG,KAAK,CAAC,QAAQ,CAAC,IAAI,CAAC,EAAE,SAAS,EAAE,OAAO,CAAC,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE,EAAE,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,OAAO,CAAC,GAAG,GAAG,MAAM,CAAC,CAAC;IAC3J,OAAO,QAAQ,CAAC,MAAM,GAAG,CAAC,IAAI,QAAQ,CAAC,KAAK,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,OAAO,CAAC,MAAM,KAAK,IAAI,IAAI,OAAO,CAAC,MAAM,CAAC,IAAI,KAAK,MAAM,CAAC,CAAC;AACvH,CAAC"}
|
package/dist/turns/step.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"step.d.ts","sourceRoot":"","sources":["../../src/turns/step.ts"],"names":[],"mappings":"AAAA,OAAO,EAAmB,KAAK,GAAG,EAAe,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"step.d.ts","sourceRoot":"","sources":["../../src/turns/step.ts"],"names":[],"mappings":"AAAA,OAAO,EAAmB,KAAK,GAAG,EAAe,MAAM,YAAY,CAAC;AAsCpE,8DAA8D;AAC9D,eAAO,MAAM,WAAW;;;CAAuC,CAAC;AAgNhE,wBAAgB,YAAY,CAAC,GAAG,EAAE,GAAG,GAAG,IAAI,CAS3C"}
|
package/dist/turns/step.js
CHANGED
|
@@ -17,6 +17,7 @@ import { appendMessage, appendNotice, appendQueued, userContent } from "./histor
|
|
|
17
17
|
import { levelFor } from "./model-info.js";
|
|
18
18
|
import { incompleteHint, incompleteReply, incompleteRetries, lostHint, lostRetries, lostTokens, repairedCalls } from "./lost-reply.js";
|
|
19
19
|
import { modelMessages, sentHistory } from "./model-context.js";
|
|
20
|
+
import { quietEnding } from "./quiet-ending.js";
|
|
20
21
|
import { completeWithRetries, transient } from "./model-retry.js";
|
|
21
22
|
import { triesUsed, waitForConnection } from "./connection-wait.js";
|
|
22
23
|
import { evaluateCalls, runApproved, runDeferred } from "./run-calls.js";
|
|
@@ -184,13 +185,15 @@ function failureDetails(error) {
|
|
|
184
185
|
return parsed.success ? parsed.data : {};
|
|
185
186
|
}
|
|
186
187
|
// Inbox/lost-reply decision and settlement/end/successor now share one canonical transaction.
|
|
187
|
-
async function finishWithoutCalls(ctx, lease, maxSteps, lost,
|
|
188
|
+
async function finishWithoutCalls(ctx, lease, maxSteps, lost, replied) {
|
|
188
189
|
const next = await ctx.store.transaction((tx) => {
|
|
189
190
|
ctx.job.signal.throwIfAborted();
|
|
190
191
|
const store = txRecords(tx);
|
|
191
192
|
const live = liveStep(store, lease, lease.jobId);
|
|
192
193
|
if (live === undefined)
|
|
193
194
|
return undefined;
|
|
195
|
+
// An empty reply to background results alone ends the turn quietly (ADR 0113, 1).
|
|
196
|
+
const incomplete = replied === 'empty' && quietEnding(store, live.session, lease.turnId) ? undefined : replied;
|
|
194
197
|
if (lost !== undefined && live.turn.lost >= lostRetries) {
|
|
195
198
|
const ended = endTurnState(store, lease.sessionId, lease.turnId, 'failed', 'step', { code: 'REPLY_LOST', params: { tokens: lost } }, lease);
|
|
196
199
|
return ended === undefined ? undefined : { kind: 'end', ended };
|
package/dist/turns/step.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"step.js","sourceRoot":"","sources":["../../src/turns/step.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,CAAC,EAAyB,MAAM,YAAY,CAAC;AAGpE,OAAO,EAAE,eAAe,EAAE,MAAM,2BAA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