@kvman/kvcoder 0.1.14 → 0.1.16
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/artifacts/ended-url.d.ts +4 -0
- package/dist/artifacts/ended-url.d.ts.map +1 -0
- package/dist/artifacts/ended-url.js +30 -0
- package/dist/artifacts/ended-url.js.map +1 -0
- package/dist/calls/line-run.d.ts +1 -0
- package/dist/calls/line-run.d.ts.map +1 -1
- package/dist/calls/line-run.js +4 -1
- package/dist/calls/line-run.js.map +1 -1
- package/dist/calls/run-tool.d.ts +38 -1
- package/dist/calls/run-tool.d.ts.map +1 -1
- package/dist/calls/run-tool.js +46 -1
- package/dist/calls/run-tool.js.map +1 -1
- package/dist/connector-call.d.ts +7 -2
- package/dist/connector-call.d.ts.map +1 -1
- package/dist/connector-call.js +8 -4
- package/dist/connector-call.js.map +1 -1
- package/dist/connectors/artifact.d.ts.map +1 -1
- package/dist/connectors/artifact.js +10 -2
- package/dist/connectors/artifact.js.map +1 -1
- package/dist/connectors/background.d.ts +1 -1
- package/dist/connectors/background.d.ts.map +1 -1
- package/dist/connectors/background.js +5 -2
- package/dist/connectors/background.js.map +1 -1
- package/dist/connectors/binary.js +2 -2
- package/dist/connectors/binary.js.map +1 -1
- package/dist/connectors/builtin-connectors.d.ts +16 -3
- package/dist/connectors/builtin-connectors.d.ts.map +1 -1
- package/dist/connectors/delegate.d.ts +20 -13
- package/dist/connectors/delegate.d.ts.map +1 -1
- package/dist/connectors/delegate.js +27 -20
- package/dist/connectors/delegate.js.map +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 +1 -1
- package/dist/connectors/execution-map.js.map +1 -1
- package/dist/connectors/mcp.d.ts +1 -1
- package/dist/connectors/mcp.d.ts.map +1 -1
- package/dist/connectors/mcp.js +12 -7
- package/dist/connectors/mcp.js.map +1 -1
- package/dist/connectors/payload-fields.d.ts +1 -0
- package/dist/connectors/payload-fields.d.ts.map +1 -1
- package/dist/connectors/payload-fields.js +1 -0
- package/dist/connectors/payload-fields.js.map +1 -1
- package/dist/connectors/shell.d.ts +1 -0
- package/dist/connectors/shell.d.ts.map +1 -1
- package/dist/connectors/shell.js +2 -2
- package/dist/connectors/shell.js.map +1 -1
- package/dist/delegate/approved-run.d.ts.map +1 -1
- package/dist/delegate/approved-run.js +4 -11
- package/dist/delegate/approved-run.js.map +1 -1
- package/dist/delegate/brief.d.ts +34 -0
- package/dist/delegate/brief.d.ts.map +1 -0
- package/dist/delegate/brief.js +84 -0
- package/dist/delegate/brief.js.map +1 -0
- package/dist/delegate/continue-helper.d.ts.map +1 -1
- package/dist/delegate/continue-helper.js +6 -7
- package/dist/delegate/continue-helper.js.map +1 -1
- package/dist/delegate/permission.d.ts +26 -1
- package/dist/delegate/permission.d.ts.map +1 -1
- package/dist/delegate/program-permission.d.ts +1 -1
- package/dist/delegate/runs.d.ts +7 -3
- package/dist/delegate/runs.d.ts.map +1 -1
- package/dist/delegate/runs.js +2 -2
- package/dist/delegate/runs.js.map +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4 -0
- package/dist/index.js.map +1 -1
- package/dist/jobs/notify-watch.d.ts +5 -0
- package/dist/jobs/notify-watch.d.ts.map +1 -0
- package/dist/jobs/notify-watch.js +53 -0
- package/dist/jobs/notify-watch.js.map +1 -0
- package/dist/jobs/process-handlers.d.ts.map +1 -1
- package/dist/jobs/process-handlers.js +2 -1
- package/dist/jobs/process-handlers.js.map +1 -1
- package/dist/jobs/process-records.d.ts +4 -1
- package/dist/jobs/process-records.d.ts.map +1 -1
- package/dist/jobs/process-records.js +6 -2
- package/dist/jobs/process-records.js.map +1 -1
- package/dist/jobs/process-report.d.ts +2 -1
- package/dist/jobs/process-report.d.ts.map +1 -1
- package/dist/jobs/process-report.js +8 -5
- package/dist/jobs/process-report.js.map +1 -1
- package/dist/jobs/process-run.d.ts +1 -1
- package/dist/jobs/process-run.d.ts.map +1 -1
- package/dist/jobs/process-run.js +7 -3
- package/dist/jobs/process-run.js.map +1 -1
- package/dist/mcp/connect.d.ts +10 -5
- package/dist/mcp/connect.d.ts.map +1 -1
- package/dist/mcp/connect.js +22 -9
- package/dist/mcp/connect.js.map +1 -1
- package/dist/mcp/servers.d.ts +4 -0
- package/dist/mcp/servers.d.ts.map +1 -1
- package/dist/mcp/servers.js +5 -1
- package/dist/mcp/servers.js.map +1 -1
- package/dist/mcp/turn-servers.d.ts +8 -0
- package/dist/mcp/turn-servers.d.ts.map +1 -0
- package/dist/mcp/turn-servers.js +88 -0
- package/dist/mcp/turn-servers.js.map +1 -0
- package/dist/prompt/build-prompt.d.ts +1 -1
- package/dist/prompt/build-prompt.d.ts.map +1 -1
- package/dist/prompt/build-prompt.js +2 -3
- package/dist/prompt/build-prompt.js.map +1 -1
- package/dist/prompt/kept-rules.d.ts +6 -0
- package/dist/prompt/kept-rules.d.ts.map +1 -0
- package/dist/prompt/kept-rules.js +47 -0
- package/dist/prompt/kept-rules.js.map +1 -0
- package/dist/prompt/project-rules.d.ts +7 -2
- package/dist/prompt/project-rules.d.ts.map +1 -1
- package/dist/prompt/project-rules.js +27 -16
- package/dist/prompt/project-rules.js.map +1 -1
- package/dist/prompt/session-grants.d.ts +16 -23
- package/dist/prompt/session-grants.d.ts.map +1 -1
- package/dist/prompt/session-prompt.d.ts +1 -1
- package/dist/prompt/session-prompt.d.ts.map +1 -1
- package/dist/prompt/session-prompt.js +16 -9
- package/dist/prompt/session-prompt.js.map +1 -1
- package/dist/prompt/working-method.js +7 -7
- package/dist/prompt/working-method.js.map +1 -1
- package/dist/register-settings.d.ts +1 -0
- package/dist/register-settings.d.ts.map +1 -1
- package/dist/register-settings.js +1 -0
- package/dist/register-settings.js.map +1 -1
- package/dist/registry/register-connectors.d.ts +17 -1
- package/dist/registry/register-connectors.d.ts.map +1 -1
- package/dist/registry/register-connectors.js +11 -7
- package/dist/registry/register-connectors.js.map +1 -1
- package/dist/schemas/delegate-brief.d.ts +20 -0
- package/dist/schemas/delegate-brief.d.ts.map +1 -0
- package/dist/schemas/delegate-brief.js +9 -0
- package/dist/schemas/delegate-brief.js.map +1 -0
- package/dist/schemas/kept-rule.d.ts +12 -0
- package/dist/schemas/kept-rule.d.ts.map +1 -0
- package/dist/schemas/kept-rule.js +7 -0
- package/dist/schemas/kept-rule.js.map +1 -0
- package/dist/schemas/mcp-session.d.ts +15 -0
- package/dist/schemas/mcp-session.d.ts.map +1 -0
- package/dist/schemas/mcp-session.js +14 -0
- package/dist/schemas/mcp-session.js.map +1 -0
- package/dist/schemas/process-doc.d.ts +22 -0
- package/dist/schemas/process-doc.d.ts.map +1 -0
- package/dist/schemas/process-doc.js +20 -0
- package/dist/schemas/process-doc.js.map +1 -0
- package/dist/schemas/read-ending.d.ts +8 -0
- package/dist/schemas/read-ending.d.ts.map +1 -0
- package/dist/schemas/read-ending.js +4 -0
- package/dist/schemas/read-ending.js.map +1 -0
- package/dist/schemas/records.d.ts +29 -23
- package/dist/schemas/records.d.ts.map +1 -1
- package/dist/schemas/records.js +14 -16
- package/dist/schemas/records.js.map +1 -1
- package/dist/schemas/registry.d.ts +1 -0
- package/dist/schemas/registry.d.ts.map +1 -1
- package/dist/schemas/registry.js +3 -2
- package/dist/schemas/registry.js.map +1 -1
- package/dist/schemas/sent-record.d.ts +13 -0
- package/dist/schemas/sent-record.d.ts.map +1 -0
- package/dist/schemas/sent-record.js +7 -0
- package/dist/schemas/sent-record.js.map +1 -0
- package/dist/sessions/new-session.d.ts.map +1 -1
- package/dist/sessions/new-session.js +2 -0
- package/dist/sessions/new-session.js.map +1 -1
- package/dist/sessions/session-view.d.ts +7 -2
- package/dist/sessions/session-view.d.ts.map +1 -1
- package/dist/sessions/session-view.js +3 -0
- package/dist/sessions/session-view.js.map +1 -1
- package/dist/store/collections.d.ts +74 -6
- package/dist/store/collections.d.ts.map +1 -1
- package/dist/store/collections.js +6 -0
- package/dist/store/collections.js.map +1 -1
- package/dist/thinking-levels.d.ts +2 -0
- package/dist/thinking-levels.d.ts.map +1 -1
- package/dist/thinking-levels.js +4 -0
- package/dist/thinking-levels.js.map +1 -1
- package/dist/turns/background.d.ts +3 -0
- package/dist/turns/background.d.ts.map +1 -1
- package/dist/turns/background.js +10 -0
- package/dist/turns/background.js.map +1 -1
- package/dist/turns/clear-results.d.ts +2 -2
- package/dist/turns/clear-results.d.ts.map +1 -1
- package/dist/turns/clear-results.js +31 -15
- package/dist/turns/clear-results.js.map +1 -1
- package/dist/turns/collapse.d.ts +12 -0
- package/dist/turns/collapse.d.ts.map +1 -0
- package/dist/turns/collapse.js +67 -0
- package/dist/turns/collapse.js.map +1 -0
- package/dist/turns/connection-wait.d.ts +12 -0
- package/dist/turns/connection-wait.d.ts.map +1 -0
- package/dist/turns/connection-wait.js +56 -0
- package/dist/turns/connection-wait.js.map +1 -0
- package/dist/turns/end-turn-state.js +2 -2
- package/dist/turns/end-turn-state.js.map +1 -1
- package/dist/turns/end-turn.d.ts.map +1 -1
- package/dist/turns/end-turn.js +3 -0
- package/dist/turns/end-turn.js.map +1 -1
- package/dist/turns/history.d.ts +2 -0
- package/dist/turns/history.d.ts.map +1 -1
- package/dist/turns/history.js +1 -0
- package/dist/turns/history.js.map +1 -1
- package/dist/turns/model-context.d.ts +6 -2
- package/dist/turns/model-context.d.ts.map +1 -1
- package/dist/turns/model-context.js +26 -8
- package/dist/turns/model-context.js.map +1 -1
- package/dist/turns/model-retry.d.ts +5 -2
- package/dist/turns/model-retry.d.ts.map +1 -1
- package/dist/turns/model-retry.js +5 -3
- package/dist/turns/model-retry.js.map +1 -1
- package/dist/turns/read-endings.d.ts +8 -0
- package/dist/turns/read-endings.d.ts.map +1 -0
- package/dist/turns/read-endings.js +24 -0
- package/dist/turns/read-endings.js.map +1 -0
- package/dist/turns/run-calls.d.ts +0 -6
- package/dist/turns/run-calls.d.ts.map +1 -1
- package/dist/turns/run-calls.js +24 -26
- package/dist/turns/run-calls.js.map +1 -1
- package/dist/turns/run-command.d.ts +2 -0
- package/dist/turns/run-command.d.ts.map +1 -1
- package/dist/turns/run-command.js +6 -0
- package/dist/turns/run-command.js.map +1 -1
- package/dist/turns/run-scope.d.ts +7 -0
- package/dist/turns/run-scope.d.ts.map +1 -0
- package/dist/turns/run-scope.js +24 -0
- package/dist/turns/run-scope.js.map +1 -0
- package/dist/turns/sent-record.d.ts +4 -0
- package/dist/turns/sent-record.d.ts.map +1 -0
- package/dist/turns/sent-record.js +11 -0
- package/dist/turns/sent-record.js.map +1 -0
- package/dist/turns/settle-calls.d.ts.map +1 -1
- package/dist/turns/settle-calls.js +1 -19
- package/dist/turns/settle-calls.js.map +1 -1
- package/dist/turns/start-turn.js +1 -1
- package/dist/turns/start-turn.js.map +1 -1
- package/dist/turns/step.d.ts.map +1 -1
- package/dist/turns/step.js +36 -9
- package/dist/turns/step.js.map +1 -1
- package/dist/ui/register-ui.js +1 -1
- package/dist/ui/register-ui.js.map +1 -1
- package/dist/web/components/approval.css +1 -1
- package/dist/web/components/call.css +1 -1
- package/dist/web/components/call.js +1 -1
- package/dist/web/components/connectors.css +1 -1
- package/dist/web/components/connectors.js +186 -155
- package/dist/web/components/conversation.css +1 -1
- package/dist/web/components/conversation.js +1391 -1268
- package/dist/web/components/mcp-sign-in.css +1 -1
- package/dist/web/components/model.css +1 -1
- package/dist/web/components/preferences.css +1 -1
- package/dist/web/components/question.css +1 -1
- package/dist/web/components/sessions.css +1 -1
- package/dist/web/components/sessions.js +11 -7
- package/docs/connectors.md +3 -3
- package/locales/ar.json +17 -1
- package/locales/en.json +17 -1
- package/package.json +19 -4
- package/dist/delegate/start-pending.d.ts +0 -5
- package/dist/delegate/start-pending.d.ts.map +0 -1
- package/dist/delegate/start-pending.js +0 -42
- package/dist/delegate/start-pending.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"binary.js","sourceRoot":"","sources":["../../src/connectors/binary.ts"],"names":[],"mappings":"AAAA,OAAO,E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,EAAE,CAAC;AAE/O,MAAM,UAAU,uBAAuB,CAAC,GAAQ;IAC9C,GAAG,CAAC,eAAe,CAAC,oBAAoB,EAAE;QACxC,WAAW,EAAE,UAAU,CAAC,WAAW;QACnC,KAAK,EAAE,aAAa,CAAC,WAAW,CAAC,CAAC,MAAM,CAAC,EAAE,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,0CAA0C,CAAC,EAAE,CAAC;QACxH,MAAM,EAAE,aAAa;QACrB,GAAG,cAAc;QACjB,MAAM,EAAE,KAAK,EAAE,EAAE,SAAS,EAAE,SAAS,EAAE,OAAO,EAAE,EAAE,EAAE;YAClD,MAAM,MAAM,GAAG,CAAC,MAAM,gBAAgB,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,EAAE,EAAE,CAAC,SAAS,CAAC,IAAI,KAAK,SAAS,IAAI,SAAS,CAAC,IAAI,KAAK,QAAQ,CAAC,CAAC;YAC9H,IAAI,MAAM,KAAK,SAAS;gBAAE,MAAM,QAAQ,CAAC,gCAAgC,SAAS,GAAG,EAAE,EAAE,SAAS,EAAE,CAAC,CAAC;YACtG,MAAM,IAAI,GAAG,OAAO,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;YACxC,OAAO,OAAO,CAAC,GAAG,EAAE,SAAS,EAAE,IAAI,KAAK,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,GAAG,SAAS,IAAI,IAAI,EAAE,EAAE,OAAO,CAAC,CAAC;QAC5F,CAAC;KACF,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -8,6 +8,7 @@ export declare const builtinCommands: {
|
|
|
8
8
|
payload: import("zod").ZodObject<{
|
|
9
9
|
line: import("zod").ZodString;
|
|
10
10
|
background: import("zod").ZodExactOptional<import("zod").ZodBoolean>;
|
|
11
|
+
notify: import("zod").ZodExactOptional<import("zod").ZodBoolean>;
|
|
11
12
|
timeoutMs: import("zod").ZodExactOptional<import("zod").ZodNumber>;
|
|
12
13
|
risky: import("zod").ZodBoolean;
|
|
13
14
|
}, import("zod/v4/core").$strict>;
|
|
@@ -319,8 +320,21 @@ export declare const builtinCommands: {
|
|
|
319
320
|
payload: import("zod").ZodObject<{
|
|
320
321
|
worker: import("zod").ZodString;
|
|
321
322
|
title: import("zod").ZodString;
|
|
322
|
-
|
|
323
|
-
|
|
323
|
+
kind: import("zod").ZodEnum<{
|
|
324
|
+
check: "check";
|
|
325
|
+
find: "find";
|
|
326
|
+
change: "change";
|
|
327
|
+
review: "review";
|
|
328
|
+
}>;
|
|
329
|
+
goal: import("zod").ZodString;
|
|
330
|
+
done: import("zod").ZodString;
|
|
331
|
+
files: import("zod").ZodExactOptional<import("zod").ZodArray<import("zod").ZodString>>;
|
|
332
|
+
context: import("zod").ZodExactOptional<import("zod").ZodArray<import("zod").ZodObject<{
|
|
333
|
+
path: import("zod").ZodString;
|
|
334
|
+
fromLine: import("zod").ZodExactOptional<import("zod").ZodNumber>;
|
|
335
|
+
lines: import("zod").ZodExactOptional<import("zod").ZodNumber>;
|
|
336
|
+
}, import("zod/v4/core").$strict>>>;
|
|
337
|
+
budget: import("zod").ZodExactOptional<import("zod").ZodNumber>;
|
|
324
338
|
}, import("zod/v4/core").$strict>;
|
|
325
339
|
asks: false;
|
|
326
340
|
result: string;
|
|
@@ -331,7 +345,6 @@ export declare const builtinCommands: {
|
|
|
331
345
|
payload: import("zod").ZodObject<{
|
|
332
346
|
id: import("zod").ZodString;
|
|
333
347
|
message: import("zod").ZodString;
|
|
334
|
-
background: import("zod").ZodExactOptional<import("zod").ZodBoolean>;
|
|
335
348
|
}, import("zod/v4/core").$strict>;
|
|
336
349
|
asks: false;
|
|
337
350
|
result: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"builtin-connectors.d.ts","sourceRoot":"","sources":["../../src/connectors/builtin-connectors.ts"],"names":[],"mappings":"AAAA,OAAO,EAAoB,KAAK,gBAAgB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@@ import { z, type Ctx, type Stored } from '@kvman/sdk';
|
|
|
2
2
|
import { type SubagentWorker, type Worker } from '../delegate/workers.ts';
|
|
3
3
|
import type { CreationGuard } from '../delegate/permission.ts';
|
|
4
4
|
import type { SessionDoc } from '../schemas/records.ts';
|
|
5
|
+
import type { RunBrief } from '../schemas/delegate-brief.ts';
|
|
6
|
+
export { delegateRunSchema, type DelegateRun } from '../delegate/brief.ts';
|
|
5
7
|
/** What the prompt's index says the connector is for; the session's entry adds its workers. */
|
|
6
|
-
export declare const delegateDescription = "Hand
|
|
8
|
+
export declare const delegateDescription = "Hand one deliverable to a worker: a helper agent that works on it alone. Every run goes on in the background: the call returns at once, you go on with what doesn't need it or end your turn, and its answer comes as a message that wakes you; never wait for a helper with background wait. Delegate find, check, and review runs, and change runs only when two or more run at once on files that don't overlap; not a question, a small change, or work you already hold the context for.";
|
|
7
9
|
/** The connector's description with the available workers, as the prompt's index shows it (ADR 0021, 1). */
|
|
8
10
|
export declare function delegateIndexDescription(workers: readonly Worker[]): string;
|
|
9
|
-
export declare const delegateRunSchema: z.ZodObject<{
|
|
10
|
-
worker: z.ZodString;
|
|
11
|
-
title: z.ZodString;
|
|
12
|
-
task: z.ZodString;
|
|
13
|
-
background: z.ZodExactOptional<z.ZodBoolean>;
|
|
14
|
-
}, z.core.$strict>;
|
|
15
11
|
export declare const delegateContinueSchema: z.ZodObject<{
|
|
16
12
|
id: z.ZodString;
|
|
17
13
|
message: z.ZodString;
|
|
18
|
-
background: z.ZodExactOptional<z.ZodBoolean>;
|
|
19
14
|
}, z.core.$strict>;
|
|
20
15
|
export declare const delegateCommands: {
|
|
21
16
|
run: {
|
|
@@ -24,8 +19,21 @@ export declare const delegateCommands: {
|
|
|
24
19
|
payload: z.ZodObject<{
|
|
25
20
|
worker: z.ZodString;
|
|
26
21
|
title: z.ZodString;
|
|
27
|
-
|
|
28
|
-
|
|
22
|
+
kind: z.ZodEnum<{
|
|
23
|
+
check: "check";
|
|
24
|
+
find: "find";
|
|
25
|
+
change: "change";
|
|
26
|
+
review: "review";
|
|
27
|
+
}>;
|
|
28
|
+
goal: z.ZodString;
|
|
29
|
+
done: z.ZodString;
|
|
30
|
+
files: z.ZodExactOptional<z.ZodArray<z.ZodString>>;
|
|
31
|
+
context: z.ZodExactOptional<z.ZodArray<z.ZodObject<{
|
|
32
|
+
path: z.ZodString;
|
|
33
|
+
fromLine: z.ZodExactOptional<z.ZodNumber>;
|
|
34
|
+
lines: z.ZodExactOptional<z.ZodNumber>;
|
|
35
|
+
}, z.core.$strict>>>;
|
|
36
|
+
budget: z.ZodExactOptional<z.ZodNumber>;
|
|
29
37
|
}, z.core.$strict>;
|
|
30
38
|
asks: false;
|
|
31
39
|
result: string;
|
|
@@ -36,19 +44,18 @@ export declare const delegateCommands: {
|
|
|
36
44
|
payload: z.ZodObject<{
|
|
37
45
|
id: z.ZodString;
|
|
38
46
|
message: z.ZodString;
|
|
39
|
-
background: z.ZodExactOptional<z.ZodBoolean>;
|
|
40
47
|
}, z.core.$strict>;
|
|
41
48
|
asks: false;
|
|
42
49
|
result: string;
|
|
43
50
|
};
|
|
44
51
|
};
|
|
45
52
|
export type DelegateContinue = z.output<typeof delegateContinueSchema>;
|
|
46
|
-
export type DelegateRun = z.output<typeof delegateRunSchema>;
|
|
47
53
|
export declare function registerDelegateConnector(ctx: Ctx): void;
|
|
48
|
-
/** Creates the worker's child session, named by the run's title (ADR 0037, 2), with
|
|
54
|
+
/** Creates the worker's child session, named by the run's title (ADR 0037, 2), with its brief as its first message. */
|
|
49
55
|
export declare function createChild(ctx: Ctx, parent: Stored<SessionDoc>, worker: SubagentWorker, run: {
|
|
50
56
|
title: string;
|
|
51
57
|
task: string;
|
|
58
|
+
brief: RunBrief;
|
|
52
59
|
}, guard: CreationGuard): Promise<string>;
|
|
53
60
|
/** Starts the child's turn and tells the parent's stream, so the conversation can stream the child (ADR 0009, 99). */
|
|
54
61
|
export declare function startChild(ctx: Ctx, childId: string, guard: CreationGuard): Promise<void>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"delegate.d.ts","sourceRoot":"","sources":["../../src/connectors/delegate.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,KAAK,GAAG,EAAE,KAAK,MAAM,EAAE,MAAM,YAAY,CAAC;AACtD,OAAO,EAAoC,KAAK,cAAc,EAAE,KAAK,MAAM,EAAE,MAAM,wBAAwB,CAAC;AAI5G,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAC/D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"delegate.d.ts","sourceRoot":"","sources":["../../src/connectors/delegate.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,KAAK,GAAG,EAAE,KAAK,MAAM,EAAE,MAAM,YAAY,CAAC;AACtD,OAAO,EAAoC,KAAK,cAAc,EAAE,KAAK,MAAM,EAAE,MAAM,wBAAwB,CAAC;AAI5G,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAC/D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AASxD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,8BAA8B,CAAC;AAC7D,OAAO,EAAE,iBAAiB,EAAE,KAAK,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAQ3E,+FAA+F;AAC/F,eAAO,MAAM,mBAAmB,keACic,CAAC;AAKle,4GAA4G;AAC5G,wBAAgB,wBAAwB,CAAC,OAAO,EAAE,SAAS,MAAM,EAAE,GAAG,MAAM,CAE3E;AAOD,eAAO,MAAM,sBAAsB;;;kBAGjC,CAAC;AAEH,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAGe,CAAC;AAE7C,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,MAAM,CAAC,OAAO,sBAAsB,CAAC,CAAC;AAGvE,wBAAgB,yBAAyB,CAAC,GAAG,EAAE,GAAG,GAAG,IAAI,CAexD;AAED,uHAAuH;AACvH,wBAAsB,WAAW,CAAC,GAAG,EAAE,GAAG,EAAE,MAAM,EAAE,MAAM,CAAC,UAAU,CAAC,EAAE,MAAM,EAAE,cAAc,EAAE,GAAG,EAAE;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,QAAQ,CAAA;CAAE,EAAE,KAAK,EAAE,aAAa,GAAG,OAAO,CAAC,MAAM,CAAC,CAwD5L;AAQD,sHAAsH;AACtH,wBAAsB,UAAU,CAAC,GAAG,EAAE,GAAG,EAAE,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,aAAa,GAAG,OAAO,CAAC,IAAI,CAAC,CAW/F"}
|
|
@@ -7,15 +7,18 @@ import { now } from "../sessions/session-lookup.js";
|
|
|
7
7
|
import { records, txRecords } from "../store/collections.js";
|
|
8
8
|
import { appendMessage, noUsage, userContent } from "../turns/history.js";
|
|
9
9
|
import { modelInfo } from "../turns/model-info.js";
|
|
10
|
-
import { nearestLevel } from "../thinking-levels.js";
|
|
10
|
+
import { cappedLevel, nearestLevel } from "../thinking-levels.js";
|
|
11
11
|
import { beginTurn, openTurn } from "../turns/start-turn.js";
|
|
12
12
|
import { callInput } from "./connector-command.js";
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
//
|
|
16
|
-
//
|
|
13
|
+
import { checkedFiles, delegateRunSchema } from "../delegate/brief.js";
|
|
14
|
+
export { delegateRunSchema } from "../delegate/brief.js";
|
|
15
|
+
// The `delegate` connector (plan 08 §8.5, ADR 0021; ADR 0108, 1 and 2): a run of one deliverable handed to a worker,
|
|
16
|
+
// always in the background. A subagent worker runs it in a hidden child session that starts from the brief kvcoder
|
|
17
|
+
// writes, with the worker's instructions, connectors, model, and thinking; a child never has `delegate` or `ask`. A
|
|
18
|
+
// program worker's run is in `src/delegate/`. The check validates the payload, the worker, and the paths as a kernel
|
|
19
|
+
// job, and the step then starts the child (ADR 0011, 9).
|
|
17
20
|
/** What the prompt's index says the connector is for; the session's entry adds its workers. */
|
|
18
|
-
export const delegateDescription =
|
|
21
|
+
export const delegateDescription = "Hand one deliverable to a worker: a helper agent that works on it alone. Every run goes on in the background: the call returns at once, you go on with what doesn't need it or end your turn, and its answer comes as a message that wakes you; never wait for a helper with background wait. Delegate find, check, and review runs, and change runs only when two or more run at once on files that don't overlap; not a question, a small change, or work you already hold the context for.";
|
|
19
22
|
// A read-only worker says so, so the lead hands it no change to make (ADR 0085, 9).
|
|
20
23
|
const readOnlyNote = (worker) => (worker.kind === 'subagent' && worker.readOnly ? '; read-only' : '');
|
|
21
24
|
/** The connector's description with the available workers, as the prompt's index shows it (ADR 0021, 1). */
|
|
@@ -25,20 +28,13 @@ export function delegateIndexDescription(workers) {
|
|
|
25
28
|
const titleShown = 60;
|
|
26
29
|
// A helper's name as the person sees it: a title over 60 characters keeps its first 59 and an ellipsis (ADR 0051, 4).
|
|
27
30
|
const shownTitle = (title) => (title.length > titleShown ? `${title.slice(0, titleShown - 1)}…` : title);
|
|
28
|
-
export const delegateRunSchema = z.strictObject({
|
|
29
|
-
worker: z.string().min(1).describe('The worker to hand the task to, by a name the system prompt lists.'),
|
|
30
|
-
title: z.string().min(1).max(200).describe("The role this run plays, in a few words, such as UI expert or Node.js expert: the person sees it as the helper's name. Keep it under 60 characters; a longer one is shortened."),
|
|
31
|
-
task: z.string().min(1).describe("The worker's whole brief: the goal, the facts it needs, its limits, and what to return."),
|
|
32
|
-
background: z.boolean().describe('true lets you go on at once; the answer arrives later as a message.').exactOptional(),
|
|
33
|
-
});
|
|
34
31
|
export const delegateContinueSchema = z.strictObject({
|
|
35
32
|
id: z.string().min(1).describe('The helper to continue: the id in the line (helper <id>) under its result.'),
|
|
36
|
-
message: z.string().min(1).describe('What the helper is to do next; it still has its
|
|
37
|
-
background: z.boolean().describe('true lets you go on at once; the answer arrives later as a message.').exactOptional(),
|
|
33
|
+
message: z.string().min(1).describe('What the helper is to do next; it still has its brief and everything it did.'),
|
|
38
34
|
});
|
|
39
35
|
export const delegateCommands = {
|
|
40
|
-
run: { registration: 'kvcoder.delegate.check', description: '
|
|
41
|
-
continue: { registration: 'kvcoder.delegate.continue.check', description: 'Sends a follow-up to a helper of this chat
|
|
36
|
+
run: { registration: 'kvcoder.delegate.check', description: 'Starts a worker on one deliverable in the background; several runs in one reply run in parallel.', payload: delegateRunSchema, asks: false, result: 'started <id>; the answer comes as a message.' },
|
|
37
|
+
continue: { registration: 'kvcoder.delegate.continue.check', description: 'Sends a follow-up to a helper of this chat, such as one that came back blocked or with questions: it continues with its own history, in the background.', payload: delegateContinueSchema, asks: false, result: 'started <id>, or queued for a helper still working; the answer comes as a message.' },
|
|
42
38
|
};
|
|
43
39
|
export function registerDelegateConnector(ctx) {
|
|
44
40
|
ctx.registerCommand('kvcoder.delegate.check', {
|
|
@@ -48,17 +44,23 @@ export function registerDelegateConnector(ctx) {
|
|
|
48
44
|
retries: 0,
|
|
49
45
|
handle: async ({ sessionId, payload }) => {
|
|
50
46
|
const session = await records(ctx.store).sessions.get(sessionId);
|
|
51
|
-
await availableWorker(ctx, session?.checks ?? null, payload.worker);
|
|
47
|
+
const worker = await availableWorker(ctx, session?.checks ?? null, payload.worker);
|
|
48
|
+
// A read-only worker changes nothing, so it takes no change run (ADR 0108, 2).
|
|
49
|
+
if (payload.kind === 'change' && worker.kind === 'subagent' && worker.readOnly)
|
|
50
|
+
throw invalid(`The worker ${worker.name} is read-only, so it takes no change run.`, { worker: worker.name });
|
|
51
|
+
await checkedFiles(ctx, payload);
|
|
52
52
|
return {};
|
|
53
53
|
},
|
|
54
54
|
});
|
|
55
55
|
}
|
|
56
|
-
/** Creates the worker's child session, named by the run's title (ADR 0037, 2), with
|
|
56
|
+
/** Creates the worker's child session, named by the run's title (ADR 0037, 2), with its brief as its first message. */
|
|
57
57
|
export async function createChild(ctx, parent, worker, run, guard) {
|
|
58
58
|
// A worker that names no model uses the one set for helpers, and the chat's own when none is (ADR 0069, 3).
|
|
59
59
|
const helperModel = settingSchemas.model.parse(await ctx.settings.get('kvcoder.delegate.model'));
|
|
60
60
|
// A worker that names no level uses the one set for helpers, medium by default, so helpers stay quick (ADR 0102, 3).
|
|
61
61
|
const helperThinking = settingSchemas.thinking.parse(await ctx.settings.get('kvcoder.delegate.thinking'));
|
|
62
|
+
// Every helper's level is capped, so no worker runs at the slowest levels (ADR 0108, 3).
|
|
63
|
+
const thinkingLimit = settingSchemas.thinking.parse(await ctx.settings.get('kvcoder.delegate.thinkingLimit'));
|
|
62
64
|
// The helper's level is one its model has (ADR 0087, 11); the levels are looked up before the transaction, for the
|
|
63
65
|
// model the parent has now, and used only when the canonical parent still has it.
|
|
64
66
|
const expected = worker.model ?? helperModel ?? parent.model;
|
|
@@ -70,18 +72,21 @@ export async function createChild(ctx, parent, worker, run, guard) {
|
|
|
70
72
|
throw invalid('Delegation requires its originating session.');
|
|
71
73
|
const stamp = now();
|
|
72
74
|
const model = worker.model ?? helperModel ?? canonical.model;
|
|
73
|
-
const wanted = worker.thinking ?? helperThinking;
|
|
75
|
+
const wanted = cappedLevel(worker.thinking ?? helperThinking, thinkingLimit);
|
|
74
76
|
const child = store.sessions.insert({
|
|
75
77
|
title: shownTitle(run.title),
|
|
76
78
|
autoTitle: false,
|
|
77
79
|
deleting: false,
|
|
78
80
|
status: 'idle',
|
|
79
81
|
parentId: parent.id,
|
|
80
|
-
|
|
82
|
+
// A find or review run only reads, whatever its worker (ADR 0108, 2).
|
|
83
|
+
worker: { name: worker.name, instructions: worker.instructions, readOnly: worker.readOnly || run.brief.kind === 'find' || run.brief.kind === 'review' },
|
|
84
|
+
run: run.brief,
|
|
81
85
|
model,
|
|
82
86
|
thinking: levels !== undefined && model === expected ? nearestLevel(levels, wanted) : wanted,
|
|
83
87
|
decides: false,
|
|
84
88
|
clearedThroughSeq: null,
|
|
89
|
+
collapsedThroughSeq: null,
|
|
85
90
|
webHosts: [],
|
|
86
91
|
stepJobId: null,
|
|
87
92
|
stepGeneration: 0,
|
|
@@ -96,6 +101,8 @@ export async function createChild(ctx, parent, worker, run, guard) {
|
|
|
96
101
|
checks: canonical.checks === null ? null : canonical.checks.filter((check) => !check.name.startsWith(workerCheckName(''))),
|
|
97
102
|
connectors: worker.connectors,
|
|
98
103
|
optedIn: [],
|
|
104
|
+
// A helper keeps its parent's rule files (ADR 0108, 6).
|
|
105
|
+
...(canonical.rules === undefined ? {} : { rules: canonical.rules }),
|
|
99
106
|
createdAt: stamp,
|
|
100
107
|
updatedAt: stamp,
|
|
101
108
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"delegate.js","sourceRoot":"","sources":["../../src/connectors/delegate.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAyB,MAAM,YAAY,CAAC;AACtD,OAAO,EAAE,eAAe,EAAE,eAAe,EAAoC,MAAM,wBAAwB,CAAC;AAC5G,OAAO,EAAE,SAAS,EAAE,MAAM,+BAA+B,CAAC;AAC1D,OAAO,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AACzC,OAAO,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAGzD,OAAO,EAAE,GAAG,EAAE,MAAM,+BAA+B,CAAC;AACpD,OAAO,EAAE,OAAO,EAAE,SAAS,EAAkB,MAAM,yBAAyB,CAAC;AAC7E,OAAO,EAAE,aAAa,EAAE,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAC1E,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AACnD,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"delegate.js","sourceRoot":"","sources":["../../src/connectors/delegate.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAyB,MAAM,YAAY,CAAC;AACtD,OAAO,EAAE,eAAe,EAAE,eAAe,EAAoC,MAAM,w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,CAAC,QAAQ,KAAK,MAAM,CAAC,EAAE;YAAE,MAAM,OAAO,CAAC,yDAAyD,CAAC,CAAC;QAClI,OAAO,KAAK,KAAK,SAAS,IAAI,KAAK,CAAC,MAAM,KAAK,MAAM,IAAI,KAAK,CAAC,MAAM,KAAK,IAAI,IAAI,CAAC,YAAY,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,QAAQ,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC;IACrJ,CAAC,CAAC,CAAC;IACH,IAAI,MAAM,KAAK,SAAS;QAAE,OAAO;IACjC,MAAM,KAAK,GAAG,MAAM,SAAS,CAAC,GAAG,EAAE,OAAO,EAAE,MAAM,EAAE,KAAK,CAAC,CAAC;IAC3D,IAAI,KAAK,KAAK,IAAI;QAAE,GAAG,CAAC,GAAG,CAAC,QAAQ,CAAC,EAAE,IAAI,EAAE,UAAU,EAAE,SAAS,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC,CAAC;AACxF,CAAC"}
|
|
@@ -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,
|
|
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.";
|
|
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,w/FACm9F,CAAC;AAEx/F,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,CAmF5D"}
|
|
@@ -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,
|
|
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.";
|
|
15
15
|
/** The steps one map holds at most, and its notes. */
|
|
16
16
|
export const stepsLimit = 40;
|
|
17
17
|
export const notesLimit = 50;
|
|
@@ -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;AACzD,MAAM,CAAC,MAAM,uBAAuB,GAClC,09FAA09F,CAAC;AAE79F,sDAAsD;AACtD,MAAM,CAAC,MAAM,UAAU,GAAG,EAAE,CAAC;AAC7B,MAAM,CAAC,MAAM,UAAU,GAAG,EAAE,CAAC;AAE7B,MAAM,SAAS,GAAG,4EAA4E,CAAC;AAC/F,MAAM,MAAM,GAAG,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,EAAE,EAAE,SAAS,CAAC,CAAC,KAAK,CAAC,KAAK,EAAE,SAAS,CAAC,CAAC;AAErE,MAAM,QAAQ,GAAG,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG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AAC,EAAE,CAAC,CAAC,CAAC;YAC5E,OAAO,EAAE,GAAG,IAAI,EAAE,IAAI,EAAE,CAAC;QAC3B,CAAC;KACF,CAAC,CAAC;AACL,CAAC"}
|
package/dist/connectors/mcp.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { z, type Ctx } from '@kvman/sdk';
|
|
2
2
|
import { type McpServer } from '../mcp/servers.ts';
|
|
3
3
|
/** What the prompt's index says the connector is for; the session's entry adds its servers. */
|
|
4
|
-
export declare const mcpDescription = "Tools from the MCP servers the person added. Call tools with { \"server\" } to see what a server offers and what each tool takes; ask for one tool with { \"server\", \"tool\" } only when you need its full schema.
|
|
4
|
+
export declare const mcpDescription = "Tools from the MCP servers the person added. Call tools with { \"server\" } to see what a server offers and what each tool takes; ask for one tool with { \"server\", \"tool\" } only when you need its full schema. A server over HTTP, or a command server set up with a port, keeps its session for the whole turn, so a page you opened is still open at your next call; any other command server starts again at each call and keeps its state only inside one run: put the tools that belong together (open the page, fill, click, read) in one run. Call tools once a chat: its results stay.";
|
|
5
5
|
/** The connector's description with the workspace's servers, as the prompt's index shows it. */
|
|
6
6
|
export declare function mcpIndexDescription(servers: readonly McpServer[]): string;
|
|
7
7
|
/** The tools one run calls at most. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mcp.d.ts","sourceRoot":"","sources":["../../src/connectors/mcp.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,KAAK,GAAG,EAAE,MAAM,YAAY,CAAC;AAEzC,OAAO,EAAa,KAAK,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAW9D,+FAA+F;AAC/F,eAAO,MAAM,cAAc,
|
|
1
|
+
{"version":3,"file":"mcp.d.ts","sourceRoot":"","sources":["../../src/connectors/mcp.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,KAAK,GAAG,EAAE,MAAM,YAAY,CAAC;AAEzC,OAAO,EAAa,KAAK,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAW9D,+FAA+F;AAC/F,eAAO,MAAM,cAAc,ykBACuiB,CAAC;AAEnkB,gGAAgG;AAChG,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,SAAS,SAAS,EAAE,GAAG,MAAM,CAEzE;AAKD,uCAAuC;AACvC,eAAO,MAAM,aAAa,KAAK,CAAC;AAuBhC,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAIoB,CAAC;AAE7C,gGAAgG;AAChG,eAAO,MAAM,aAAa;;;iBAAuD,CAAC;AAelF,wBAAgB,oBAAoB,CAAC,GAAG,EAAE,GAAG,GAAG,IAAI,CA0DnD"}
|
package/dist/connectors/mcp.js
CHANGED
|
@@ -10,7 +10,7 @@ import { timeoutMs } from "./payload-fields.js";
|
|
|
10
10
|
// `run` runs several on one connection, so a server that keeps state between tools keeps it for the run (ADR 0070, 1).
|
|
11
11
|
// The MCP client is loaded by the first call that connects, so a kvman with no server doesn't keep it in memory.
|
|
12
12
|
/** What the prompt's index says the connector is for; the session's entry adds its servers. */
|
|
13
|
-
export const mcpDescription = 'Tools from the MCP servers the person added. Call tools with { "server" } to see what a server offers and what each tool takes; ask for one tool with { "server", "tool" } only when you need its full schema.
|
|
13
|
+
export const mcpDescription = 'Tools from the MCP servers the person added. Call tools with { "server" } to see what a server offers and what each tool takes; ask for one tool with { "server", "tool" } only when you need its full schema. A server over HTTP, or a command server set up with a port, keeps its session for the whole turn, so a page you opened is still open at your next call; any other command server starts again at each call and keeps its state only inside one run: put the tools that belong together (open the page, fill, click, read) in one run. Call tools once a chat: its results stay.';
|
|
14
14
|
/** The connector's description with the workspace's servers, as the prompt's index shows it. */
|
|
15
15
|
export function mcpIndexDescription(servers) {
|
|
16
16
|
return `${mcpDescription} Servers: ${servers.map((server) => `${server.name} (${server.description.replace(/[.\s]+$/, '')})`).join(', ')}.`;
|
|
@@ -51,16 +51,21 @@ const toolRowSchema = z.object({ name: z.string(), description: z.string() });
|
|
|
51
51
|
const describeOutput = z.union([z.object({ server: z.string(), tools: z.array(toolRowSchema.extend({ takes: z.string() })) }), toolRowSchema.extend({ server: z.string(), arguments: z.json() })]);
|
|
52
52
|
// The jobs may run for the call's longest timeout, with room to report it.
|
|
53
53
|
const jobOptions = { retries: 0, timeoutMs: 660_000 };
|
|
54
|
+
// The turn's link to a kept server (ADR 0108, 12); the module loads only when an MCP call runs.
|
|
55
|
+
async function linkOf(ctx, sessionId, server) {
|
|
56
|
+
const { turnLink } = await import("../mcp/turn-servers.js");
|
|
57
|
+
return turnLink(ctx, sessionId, server);
|
|
58
|
+
}
|
|
54
59
|
export function registerMcpConnector(ctx) {
|
|
55
60
|
ctx.registerCommand('kvcoder.mcp.tool.describe', {
|
|
56
61
|
description: mcpCommands.tools.description,
|
|
57
62
|
input: callInput(payloads.tools),
|
|
58
63
|
output: describeOutput,
|
|
59
64
|
...jobOptions,
|
|
60
|
-
handle: async ({ payload }) => {
|
|
65
|
+
handle: async ({ sessionId, payload }) => {
|
|
61
66
|
const found = await mcpServer(ctx, payload.server);
|
|
62
67
|
const { withServer } = await import("../mcp/connect.js");
|
|
63
|
-
const tools = await withServer(ctx, found, callTimeout(undefined), listTools);
|
|
68
|
+
const tools = await withServer(ctx, found, callTimeout(undefined), listTools, await linkOf(ctx, sessionId, found));
|
|
64
69
|
if (payload.tool === undefined)
|
|
65
70
|
return { server: found.name, tools: tools.map((tool) => ({ name: tool.name, description: tool.description ?? '', takes: payloadSignature(tool.inputSchema) ?? '{}' })) };
|
|
66
71
|
const tool = toolNamed(found.name, tools, payload.tool);
|
|
@@ -72,13 +77,13 @@ export function registerMcpConnector(ctx) {
|
|
|
72
77
|
input: callInput(payloads.call),
|
|
73
78
|
output: mcpCallSchema,
|
|
74
79
|
...jobOptions,
|
|
75
|
-
handle: async ({ payload }) => {
|
|
80
|
+
handle: async ({ sessionId, payload }) => {
|
|
76
81
|
const found = await mcpServer(ctx, payload.server);
|
|
77
82
|
const { withServer } = await import("../mcp/connect.js");
|
|
78
83
|
const result = await withServer(ctx, found, callTimeout(payload.timeoutMs), async (connection) => {
|
|
79
84
|
toolNamed(found.name, await listTools(connection), payload.tool);
|
|
80
85
|
return resultText(await connection.client.callTool({ name: payload.tool, arguments: payload.arguments ?? {} }, undefined, connection.request));
|
|
81
|
-
});
|
|
86
|
+
}, await linkOf(ctx, sessionId, found));
|
|
82
87
|
// Read after the call, which may have refreshed the tokens: no secret kvman holds for the server leaves in a result (ADR 0056, 9).
|
|
83
88
|
const { knownSecrets, withoutSecrets } = await import("../mcp/secrets.js");
|
|
84
89
|
return { ...result, text: withoutSecrets(result.text, await knownSecrets(ctx, found)) };
|
|
@@ -89,7 +94,7 @@ export function registerMcpConnector(ctx) {
|
|
|
89
94
|
input: callInput(payloads.run),
|
|
90
95
|
output: mcpCallSchema,
|
|
91
96
|
...jobOptions,
|
|
92
|
-
handle: async ({ payload }) => {
|
|
97
|
+
handle: async ({ sessionId, payload }) => {
|
|
93
98
|
const found = await mcpServer(ctx, payload.server);
|
|
94
99
|
const { withServer } = await import("../mcp/connect.js");
|
|
95
100
|
const result = await withServer(ctx, found, callTimeout(payload.timeoutMs), async (connection) => {
|
|
@@ -108,7 +113,7 @@ export function registerMcpConnector(ctx) {
|
|
|
108
113
|
return { text: parts.join('\n\n'), isError: true };
|
|
109
114
|
}
|
|
110
115
|
return { text: parts.join('\n\n'), isError: false };
|
|
111
|
-
});
|
|
116
|
+
}, await linkOf(ctx, sessionId, found));
|
|
112
117
|
const { knownSecrets, withoutSecrets } = await import("../mcp/secrets.js");
|
|
113
118
|
return { ...result, text: withoutSecrets(result.text, await knownSecrets(ctx, found)) };
|
|
114
119
|
},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mcp.js","sourceRoot":"","sources":["../../src/connectors/mcp.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAY,MAAM,YAAY,CAAC;AACzC,OAAO,EAAE,WAAW,EAA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AE,CAAC;YACtD,CAAC,EAAE,MAAM,MAAM,CAAC,GAAG,EAAE,SAAS,EAAE,KAAK,CAAC,CAAC,CAAC;YACxC,MAAM,EAAE,YAAY,EAAE,cAAc,EAAE,GAAG,MAAM,MAAM,CAAC,mBAAmB,CAAC,CAAC;YAC3E,OAAO,EAAE,GAAG,MAAM,EAAE,IAAI,EAAE,cAAc,CAAC,MAAM,CAAC,IAAI,EAAE,MAAM,YAAY,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC,EAAE,CAAC;QAC1F,CAAC;KACF,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { z } from '@kvman/sdk';
|
|
2
2
|
export declare const risky: z.ZodBoolean;
|
|
3
|
+
export declare const notify: z.ZodExactOptional<z.ZodBoolean>;
|
|
3
4
|
export declare const background: z.ZodExactOptional<z.ZodBoolean>;
|
|
4
5
|
/** A number that bounds how long or how much, cut into its range instead of refused (ADR 0090, 4). */
|
|
5
6
|
export declare const cutInto: (value: number, least: number, most: number) => number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"payload-fields.d.ts","sourceRoot":"","sources":["../../src/connectors/payload-fields.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,YAAY,CAAC;AAK/B,eAAO,MAAM,KAAK,cAEqiB,CAAC;AAExjB,eAAO,MAAM,UAAU,kCAAsK,CAAC;AAE9L,sGAAsG;AACtG,eAAO,MAAM,OAAO,GAAI,OAAO,MAAM,EAAE,OAAO,MAAM,EAAE,MAAM,MAAM,KAAG,MAAgD,CAAC;AAEtH,eAAO,MAAM,SAAS,iCAAqK,CAAC;AAE5L,eAAO,MAAM,KAAK;;;;mBASsG,CAAC"}
|
|
1
|
+
{"version":3,"file":"payload-fields.d.ts","sourceRoot":"","sources":["../../src/connectors/payload-fields.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,YAAY,CAAC;AAK/B,eAAO,MAAM,KAAK,cAEqiB,CAAC;AAExjB,eAAO,MAAM,MAAM,kCAA6N,CAAC;AAEjP,eAAO,MAAM,UAAU,kCAAsK,CAAC;AAE9L,sGAAsG;AACtG,eAAO,MAAM,OAAO,GAAI,OAAO,MAAM,EAAE,OAAO,MAAM,EAAE,MAAM,MAAM,KAAG,MAAgD,CAAC;AAEtH,eAAO,MAAM,SAAS,iCAAqK,CAAC;AAE5L,eAAO,MAAM,KAAK;;;;mBASsG,CAAC"}
|
|
@@ -4,6 +4,7 @@ import { z } from '@kvman/sdk';
|
|
|
4
4
|
export const risky = z
|
|
5
5
|
.boolean()
|
|
6
6
|
.describe("false for the ordinary work of the task: a file inside the workspace folder that the task needs, whoever made it and whether or not there are uncommitted changes (fs undo takes it back), or the project's own build, tests, and tools. true when this could do what is hard to take back or reaches past the task: anything outside the workspace folder, deleting files, a file that holds secrets, sudo, an install outside the project, git push --force, reset, checkout, restore, stash drop, or clean, or sending something out. The person is then asked first.");
|
|
7
|
+
export const notify = z.boolean().describe('true, with background, wakes this chat when the line ends, so you can end your turn and go on when its result comes, such as a download or a long test. Leave it out for a server.').exactOptional();
|
|
7
8
|
export const background = z.boolean().describe('true keeps a server or any long-running command running after the call returns; follow it up with the background connector.').exactOptional();
|
|
8
9
|
/** A number that bounds how long or how much, cut into its range instead of refused (ADR 0090, 4). */
|
|
9
10
|
export const cutInto = (value, least, most) => Math.min(Math.max(value, least), most);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"payload-fields.js","sourceRoot":"","sources":["../../src/connectors/payload-fields.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,YAAY,CAAC;AAE/B,mHAAmH;AACnH,mDAAmD;AAEnD,MAAM,CAAC,MAAM,KAAK,GAAG,CAAC;KACnB,OAAO,EAAE;KACT,QAAQ,CAAC,0iBAA0iB,CAAC,CAAC;AAExjB,MAAM,CAAC,MAAM,UAAU,GAAG,CAAC,CAAC,OAA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P,MAAM,CAAC,MAAM,UAAU,GAAG,CAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,CAAC,6HAA6H,CAAC,CAAC,aAAa,EAAE,CAAC;AAE9L,sGAAsG;AACtG,MAAM,CAAC,MAAM,OAAO,GAAG,CAAC,KAAa,EAAE,KAAa,EAAE,IAAY,EAAU,EAAE,CAAC,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,GAAG,CAAC,KAAK,EAAE,KAAK,CAAC,EAAE,IAAI,CAAC,CAAC;AAEtH,MAAM,CAAC,MAAM,SAAS,GAAG,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,4GAA4G,CAAC,CAAC,aAAa,EAAE,CAAC;AAE5L,MAAM,CAAC,MAAM,KAAK,GAAG,CAAC;KACnB,KAAK,CACJ,CAAC,CAAC,YAAY,CAAC;IACb,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,8HAA8H,CAAC;IAC5J,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,4BAA4B,CAAC;IAC1D,UAAU,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,CAAC,6GAA6G,CAAC,CAAC,aAAa,EAAE;CAChK,CAAC,CACH;KACA,GAAG,CAAC,CAAC,CAAC;KACN,QAAQ,CAAC,2GAA2G,CAAC,CAAC"}
|
|
@@ -8,6 +8,7 @@ export declare const shellCommands: {
|
|
|
8
8
|
payload: z.ZodObject<{
|
|
9
9
|
line: z.ZodString;
|
|
10
10
|
background: z.ZodExactOptional<z.ZodBoolean>;
|
|
11
|
+
notify: z.ZodExactOptional<z.ZodBoolean>;
|
|
11
12
|
timeoutMs: z.ZodExactOptional<z.ZodNumber>;
|
|
12
13
|
risky: z.ZodBoolean;
|
|
13
14
|
}, z.core.$strict>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shell.d.ts","sourceRoot":"","sources":["../../src/connectors/shell.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,KAAK,GAAG,EAAE,MAAM,YAAY,CAAC;AAQzC,2FAA2F;AAC3F,eAAO,MAAM,gBAAgB,GAAI,OAAO,MAAM,GAAG,YAAY,KAAG,MAC0Q,CAAC;AAI3U,eAAO,MAAM,aAAa
|
|
1
|
+
{"version":3,"file":"shell.d.ts","sourceRoot":"","sources":["../../src/connectors/shell.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,KAAK,GAAG,EAAE,MAAM,YAAY,CAAC;AAQzC,2FAA2F;AAC3F,eAAO,MAAM,gBAAgB,GAAI,OAAO,MAAM,GAAG,YAAY,KAAG,MAC0Q,CAAC;AAI3U,eAAO,MAAM,aAAa;;;;;;;;;;;;;;CAEkB,CAAC;AAE7C,wBAAgB,sBAAsB,CAAC,GAAG,EAAE,GAAG,GAAG,IAAI,CAQrD"}
|
package/dist/connectors/shell.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { z } from '@kvman/sdk';
|
|
2
2
|
import { lineRunOptions, lineRunSchema, runLine } from "../calls/line-run.js";
|
|
3
3
|
import { lineCallInput, lineResult } from "./connector-command.js";
|
|
4
|
-
import { background, risky, timeoutMs } from "./payload-fields.js";
|
|
4
|
+
import { background, notify, risky, timeoutMs } from "./payload-fields.js";
|
|
5
5
|
// The `shell` connector (plan 08 §8.3, ADR 0011, 2): `exec` runs one whole line in the real shell, in the workspace
|
|
6
6
|
// folder, after the person's approval when the call is risky.
|
|
7
7
|
/** What the prompt's index says the connector is for; it names the shell this run uses. */
|
|
8
8
|
export const shellDescription = (shell) => `Run a line in the real shell (${shell === 'bash' ? 'bash' : 'PowerShell'}) in the workspace folder: build, test, install, or anything no other connector covers. Set background to true for a server or any command that keeps running; to show the person an app you started, give its address to artifact write with the format url.`;
|
|
9
|
-
const execPayload = z.strictObject({ line: z.string().min(1).describe('The whole shell line to run, with any pipes, &&, or redirection.'), background, timeoutMs, risky });
|
|
9
|
+
const execPayload = z.strictObject({ line: z.string().min(1).describe('The whole shell line to run, with any pipes, &&, or redirection.'), background, notify, timeoutMs, risky });
|
|
10
10
|
export const shellCommands = {
|
|
11
11
|
exec: { registration: 'kvcoder.shell.run', description: 'Runs one line in the real shell, in the workspace folder.', payload: execPayload, asks: true, result: lineResult },
|
|
12
12
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shell.js","sourceRoot":"","sources":["../../src/connectors/shell.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAY,MAAM,YAAY,CAAC;AACzC,OAAO,EAAE,cAAc,EAAE,aAAa,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAC9E,OAAO,EAAE,aAAa,EAAE,UAAU,EAAyB,MAAM,wBAAwB,CAAC;AAC1F,OAAO,EAAE,UAAU,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"shell.js","sourceRoot":"","sources":["../../src/connectors/shell.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAY,MAAM,YAAY,CAAC;AACzC,OAAO,EAAE,cAAc,EAAE,aAAa,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAC9E,OAAO,EAAE,aAAa,EAAE,UAAU,EAAyB,MAAM,wBAAwB,CAAC;AAC1F,OAAO,EAAE,UAAU,EAAE,MAAM,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAE3E,oHAAoH;AACpH,8DAA8D;AAE9D,2FAA2F;AAC3F,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,KAA4B,EAAU,EAAE,CACvE,iCAAiC,KAAK,KAAK,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,YAAY,+PAA+P,CAAC;AAE3U,MAAM,WAAW,GAAG,CAAC,CAAC,YAAY,CAAC,EAAE,IAAI,EA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