@sixb/agent 0.2.2 → 0.2.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -2
- package/dist/artifacts/board-previews.d.ts +41 -0
- package/dist/artifacts/board-previews.d.ts.map +1 -0
- package/dist/artifacts/layout-check/layout-check.d.ts +38 -6
- package/dist/artifacts/layout-check/layout-check.d.ts.map +1 -1
- package/dist/artifacts/layout-check/overview.d.ts +17 -0
- package/dist/artifacts/layout-check/overview.d.ts.map +1 -0
- package/dist/artifacts/materialize.d.ts +56 -24
- package/dist/artifacts/materialize.d.ts.map +1 -1
- package/dist/artifacts/publish-tool.d.ts +35 -27
- package/dist/artifacts/publish-tool.d.ts.map +1 -1
- package/dist/ask-tool.d.ts +62 -0
- package/dist/ask-tool.d.ts.map +1 -0
- package/dist/attachments.d.ts +1 -1
- package/dist/attachments.d.ts.map +1 -1
- package/dist/background-commands.d.ts +3 -3
- package/dist/background-commands.d.ts.map +1 -1
- package/dist/background-notices.d.ts.map +1 -1
- package/dist/child-files.d.ts +1 -1
- package/dist/child-questions.d.ts +1 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +12309 -10490
- package/dist/index.js.map +41 -35
- package/dist/run-agent-turn.d.ts.map +1 -1
- package/dist/run-conversation-turn.d.ts.map +1 -1
- package/dist/run-environment.d.ts +4 -1
- package/dist/run-environment.d.ts.map +1 -1
- package/dist/run-subagent.d.ts +1 -1
- package/dist/sandbox-files.d.ts +19 -0
- package/dist/sandbox-files.d.ts.map +1 -1
- package/dist/subagent-tools.d.ts +23 -2
- package/dist/subagent-tools.d.ts.map +1 -1
- package/dist/tools/background.d.ts +50 -18
- package/dist/tools/background.d.ts.map +1 -1
- package/dist/tools/bash.d.ts +1 -0
- package/dist/tools/bash.d.ts.map +1 -1
- package/dist/tools/edit-text.d.ts +22 -0
- package/dist/tools/edit-text.d.ts.map +1 -0
- package/dist/tools/edit.d.ts +54 -0
- package/dist/tools/edit.d.ts.map +1 -0
- package/dist/tools/file-writes.d.ts +52 -0
- package/dist/tools/file-writes.d.ts.map +1 -0
- package/dist/tools/model-spec.d.ts.map +1 -1
- package/dist/tools/read.d.ts +16 -3
- package/dist/tools/read.d.ts.map +1 -1
- package/dist/tools/tool-files.d.ts.map +1 -1
- package/dist/tools/view-file.d.ts +20 -23
- package/dist/tools/view-file.d.ts.map +1 -1
- package/dist/tools/web-fetch/tool.d.ts +1 -0
- package/dist/tools/web-fetch/tool.d.ts.map +1 -1
- package/dist/tools/web-search.d.ts +1 -0
- package/dist/tools/web-search.d.ts.map +1 -1
- package/dist/tools/write.d.ts +36 -0
- package/dist/tools/write.d.ts.map +1 -0
- package/dist/types.d.ts +5 -4
- package/dist/types.d.ts.map +1 -1
- package/package.json +7 -6
- package/src/agent-prompt.ts +10 -10
- package/src/artifacts/board-previews.ts +218 -0
- package/src/artifacts/layout-check/check.cjs +304 -80
- package/src/artifacts/layout-check/layout-check.ts +119 -9
- package/src/artifacts/layout-check/overview.ts +291 -0
- package/src/artifacts/materialize.ts +181 -55
- package/src/artifacts/publish-tool.ts +475 -163
- package/src/ask-tool.ts +223 -0
- package/src/attachments.ts +7 -6
- package/src/background-commands.ts +5 -5
- package/src/background-notices.ts +5 -12
- package/src/child-files.ts +1 -1
- package/src/child-questions.ts +1 -1
- package/src/context-compaction.ts +4 -1
- package/src/index.ts +2 -1
- package/src/run-agent-turn.ts +14 -4
- package/src/run-child.ts +1 -1
- package/src/run-conversation-turn.ts +4 -1
- package/src/run-environment.ts +40 -26
- package/src/run-subagent.ts +3 -3
- package/src/sandbox-api-context.ts +1 -1
- package/src/sandbox-files.ts +86 -0
- package/src/skills/sixb-artifacts/SKILL.md +48 -25
- package/src/skills/sixb-artifacts/canvas.md +140 -18
- package/src/skills/sixb-artifacts/examples/canvas/onboarding-flow/canvas.json +1 -1
- package/src/skills/sixb-artifacts/page.md +2 -2
- package/src/skills/sixb-artifacts/references.md +15 -12
- package/src/skills/sixb-artifacts/sheet.md +1 -1
- package/src/skills/sixb-artifacts/slides.md +2 -2
- package/src/subagent-tools.ts +134 -88
- package/src/tools/background.ts +227 -67
- package/src/tools/bash.ts +2 -1
- package/src/tools/edit-text.ts +241 -0
- package/src/tools/edit.ts +166 -0
- package/src/tools/file-writes.ts +270 -0
- package/src/tools/model-spec.ts +9 -12
- package/src/tools/read.ts +75 -9
- package/src/tools/tool-files.ts +3 -1
- package/src/tools/tool-outputs.ts +2 -2
- package/src/tools/view-file.ts +78 -80
- package/src/tools/web-fetch/tool.ts +2 -1
- package/src/tools/web-search.ts +1 -0
- package/src/tools/write.ts +95 -0
- package/src/types.ts +5 -4
- package/dist/ask-parent-tool.d.ts +0 -36
- package/dist/ask-parent-tool.d.ts.map +0 -1
- package/src/ask-parent-tool.ts +0 -100
package/README.md
CHANGED
|
@@ -7,7 +7,7 @@ both to the harness.
|
|
|
7
7
|
```text
|
|
8
8
|
runner (the cloud worker today) harness (@sixb/agent)
|
|
9
9
|
claims the run → AgentRunSession builds the prompt and tools, runs the loop, finishes
|
|
10
|
-
opens its environment → openSandbox
|
|
10
|
+
opens its environment → openSandbox read · edit · write · bash · wait · stop ·
|
|
11
11
|
publish_artifact · children
|
|
12
12
|
```
|
|
13
13
|
|
|
@@ -16,7 +16,7 @@ runAgentTurn a conversation turn
|
|
|
16
16
|
runSubagent a child agent's run
|
|
17
17
|
runWorkflowAgentNode a workflow agent step: the loop, then the structured finalizer
|
|
18
18
|
create*AgentEnvironment the run's prompt, tools and files, in the environment its runner opens
|
|
19
|
-
SubagentCoordinator spawn_agent,
|
|
19
|
+
SubagentCoordinator spawn_agent, message_agent, children for wait and stop, their questions
|
|
20
20
|
```
|
|
21
21
|
|
|
22
22
|
A run reaches shared state only through its session (see
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import type { BlobStorage, Sandbox } from "@sixb/core";
|
|
2
|
+
import type { AgentRunMissingPreview } from "@sixb/core/internal/agents";
|
|
3
|
+
import { type BoardPreviewInput, type MissingBoardPreview, type RefusedBoardPreview } from "@sixb/core/internal/artifacts/publish";
|
|
4
|
+
import type { ArtifactVersionRecord } from "@sixb/core/storage";
|
|
5
|
+
import type { AgentSandboxHandle } from "../sandbox-handle";
|
|
6
|
+
import { type CheckedPreview, type CheckedQuery } from "./layout-check/layout-check";
|
|
7
|
+
/** The pictures read and stored, and those that were not, with why. */
|
|
8
|
+
export interface CheckedPreviews {
|
|
9
|
+
readonly previews: readonly BoardPreviewInput[];
|
|
10
|
+
readonly dropped: readonly RefusedBoardPreview[];
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* The pictures the check took that `missing` asks for, read out of the sandbox a batch at a time
|
|
14
|
+
* and each stored in `blobStorage`. A picture the check did not take is left out: the worker
|
|
15
|
+
* renders it later. Each stands alone: one too large or that cannot be read or stored is dropped,
|
|
16
|
+
* and returned with why, and the others are kept.
|
|
17
|
+
*/
|
|
18
|
+
export declare function storeCheckedPreviews(input: {
|
|
19
|
+
readonly handle: AgentSandboxHandle;
|
|
20
|
+
readonly checked: readonly CheckedPreview[];
|
|
21
|
+
readonly missing: readonly AgentRunMissingPreview[];
|
|
22
|
+
readonly blobStorage: Pick<BlobStorage, "put">;
|
|
23
|
+
readonly signal: AbortSignal;
|
|
24
|
+
}): Promise<CheckedPreviews>;
|
|
25
|
+
/**
|
|
26
|
+
* Renders the pictures a stored canvas version's boards miss, in `sandbox`, a blank one created
|
|
27
|
+
* for it: the version's files are written there, each missing board is opened in every mode it
|
|
28
|
+
* misses, and the pictures are stored in `blobStorage`. What the boards' queries return, `queries`
|
|
29
|
+
* holds as the version's publisher read them. Without them a board that reads a query is not
|
|
30
|
+
* pictured: it would show its queries rejecting, which no reader sees. A sandbox without the
|
|
31
|
+
* agent image's browser renders nothing.
|
|
32
|
+
*/
|
|
33
|
+
export declare function renderBoardPreviews(input: {
|
|
34
|
+
readonly sandbox: Sandbox;
|
|
35
|
+
readonly version: ArtifactVersionRecord;
|
|
36
|
+
readonly missing: readonly MissingBoardPreview[];
|
|
37
|
+
readonly blobStorage: Pick<BlobStorage, "put" | "open" | "stat">;
|
|
38
|
+
readonly queries?: Readonly<Record<string, CheckedQuery>>;
|
|
39
|
+
readonly signal: AbortSignal;
|
|
40
|
+
}): Promise<CheckedPreviews>;
|
|
41
|
+
//# sourceMappingURL=board-previews.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"board-previews.d.ts","sourceRoot":"","sources":["../../src/artifacts/board-previews.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,OAAO,EAAE,MAAM,YAAY,CAAA;AAEtD,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,4BAA4B,CAAA;AACxE,OAAO,EAGL,KAAK,iBAAiB,EAEtB,KAAK,mBAAmB,EACxB,KAAK,mBAAmB,EACzB,MAAM,uCAAuC,CAAA;AAC9C,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,oBAAoB,CAAA;AAG/D,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAA;AAC3D,OAAO,EAAE,KAAK,cAAc,EAAE,KAAK,YAAY,EAAe,MAAM,6BAA6B,CAAA;AAiBjG,uEAAuE;AACvE,MAAM,WAAW,eAAe;IAC9B,QAAQ,CAAC,QAAQ,EAAE,SAAS,iBAAiB,EAAE,CAAA;IAC/C,QAAQ,CAAC,OAAO,EAAE,SAAS,mBAAmB,EAAE,CAAA;CACjD;AAED;;;;;GAKG;AACH,wBAAsB,oBAAoB,CAAC,KAAK,EAAE;IAChD,QAAQ,CAAC,MAAM,EAAE,kBAAkB,CAAA;IACnC,QAAQ,CAAC,OAAO,EAAE,SAAS,cAAc,EAAE,CAAA;IAC3C,QAAQ,CAAC,OAAO,EAAE,SAAS,sBAAsB,EAAE,CAAA;IACnD,QAAQ,CAAC,WAAW,EAAE,IAAI,CAAC,WAAW,EAAE,KAAK,CAAC,CAAA;IAC9C,QAAQ,CAAC,MAAM,EAAE,WAAW,CAAA;CAC7B,GAAG,OAAO,CAAC,eAAe,CAAC,CAwD3B;AAqBD;;;;;;;GAOG;AACH,wBAAsB,mBAAmB,CAAC,KAAK,EAAE;IAC/C,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAA;IACzB,QAAQ,CAAC,OAAO,EAAE,qBAAqB,CAAA;IACvC,QAAQ,CAAC,OAAO,EAAE,SAAS,mBAAmB,EAAE,CAAA;IAChD,QAAQ,CAAC,WAAW,EAAE,IAAI,CAAC,WAAW,EAAE,KAAK,GAAG,MAAM,GAAG,MAAM,CAAC,CAAA;IAChE,QAAQ,CAAC,OAAO,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,YAAY,CAAC,CAAC,CAAA;IACzD,QAAQ,CAAC,MAAM,EAAE,WAAW,CAAA;CAC7B,GAAG,OAAO,CAAC,eAAe,CAAC,CAmD3B"}
|
|
@@ -1,5 +1,7 @@
|
|
|
1
|
-
import type { ArtifactTheme } from "@sixb/core/artifacts";
|
|
1
|
+
import type { ArtifactTheme, ArtifactThemeMode, Canvas } from "@sixb/core/artifacts";
|
|
2
2
|
import { type FrameLayout, type LayoutProblem } from "@sixb/core/internal/artifacts/frames";
|
|
3
|
+
import { type ArtifactQueryAnswer } from "@sixb/core/internal/artifacts/publish";
|
|
4
|
+
import type { ArtifactBoardPreviewSize } from "@sixb/core/storage";
|
|
3
5
|
import { type AgentSandboxHandle } from "../../sandbox-handle";
|
|
4
6
|
/** What the layout check found, for the publish tool to report beside the version. */
|
|
5
7
|
export type LayoutCheck = {
|
|
@@ -7,6 +9,10 @@ export type LayoutCheck = {
|
|
|
7
9
|
readonly warnings: readonly LayoutWarning[];
|
|
8
10
|
/** One per slide, or a page's at each width, as the agent names them. */
|
|
9
11
|
readonly screenshots: readonly string[];
|
|
12
|
+
/** Each `pictured` board in each mode the reader sees it in, at its path in the sandbox. */
|
|
13
|
+
readonly previews: readonly CheckedPreview[];
|
|
14
|
+
/** A canvas as it opens in the app, as the agent names it, when the check took it. */
|
|
15
|
+
readonly overview?: string;
|
|
10
16
|
} | {
|
|
11
17
|
readonly status: "skipped";
|
|
12
18
|
readonly reason: string;
|
|
@@ -27,16 +33,25 @@ export interface CheckedBoard {
|
|
|
27
33
|
readonly w: number;
|
|
28
34
|
readonly h: number;
|
|
29
35
|
readonly html: Uint8Array;
|
|
36
|
+
/** Screenshot in every mode, not only the first: it needs its pictures for readers. */
|
|
37
|
+
readonly pictured?: boolean;
|
|
38
|
+
}
|
|
39
|
+
/** A board's picture in one mode and size, which the check took. */
|
|
40
|
+
export interface CheckedPreview {
|
|
41
|
+
readonly board: string;
|
|
42
|
+
readonly theme: ArtifactThemeMode;
|
|
43
|
+
/** `full`, a PNG of the board; `small`, a WebP at most 480 pixels wide. */
|
|
44
|
+
readonly size: ArtifactBoardPreviewSize;
|
|
45
|
+
/** Absolute, in the sandbox. */
|
|
46
|
+
readonly path: string;
|
|
47
|
+
/** How large the check wrote it. */
|
|
48
|
+
readonly bytes?: number;
|
|
30
49
|
}
|
|
31
50
|
/**
|
|
32
51
|
* What a page's `sixb.query(name)` reads in the check: the query route's JSON as it answers the
|
|
33
52
|
* requester, or why the query failed for them.
|
|
34
53
|
*/
|
|
35
|
-
export type CheckedQuery =
|
|
36
|
-
readonly result: unknown;
|
|
37
|
-
} | {
|
|
38
|
-
readonly error: string;
|
|
39
|
-
};
|
|
54
|
+
export type CheckedQuery = ArtifactQueryAnswer;
|
|
40
55
|
/** A width a page is checked at, as a laptop and a phone show it. */
|
|
41
56
|
export type PageView = "desktop" | "phone";
|
|
42
57
|
/**
|
|
@@ -67,7 +82,24 @@ export declare function checkLayout(input: {
|
|
|
67
82
|
} | {
|
|
68
83
|
readonly layout: "canvas";
|
|
69
84
|
readonly boards: readonly CheckedBoard[];
|
|
85
|
+
/** The canvas's items, for a picture of it as it opens; none without. */
|
|
86
|
+
readonly canvas?: Canvas;
|
|
70
87
|
})): Promise<LayoutCheck>;
|
|
88
|
+
/** A board whose page draws larger than the board, in CSS pixels. */
|
|
89
|
+
interface OversizedBoard {
|
|
90
|
+
readonly board: string;
|
|
91
|
+
readonly w: number;
|
|
92
|
+
readonly h: number;
|
|
93
|
+
readonly page: {
|
|
94
|
+
readonly w: number;
|
|
95
|
+
readonly h: number;
|
|
96
|
+
};
|
|
97
|
+
}
|
|
98
|
+
/**
|
|
99
|
+
* Each board whose page is larger than the board: the canvas, its preview, and the opened board
|
|
100
|
+
* all show only its top left. The board takes the page's size; the canvas's zoom makes it small.
|
|
101
|
+
*/
|
|
102
|
+
export declare function oversizedWarnings(boards: readonly OversizedBoard[]): LayoutWarning[];
|
|
71
103
|
/** A problem where the check found it: on a deck's slide, or on a page at one width. */
|
|
72
104
|
type CheckedProblem = LayoutProblem & {
|
|
73
105
|
readonly theme: "light" | "dark";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"layout-check.d.ts","sourceRoot":"","sources":["../../../src/artifacts/layout-check/layout-check.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAA;
|
|
1
|
+
{"version":3,"file":"layout-check.d.ts","sourceRoot":"","sources":["../../../src/artifacts/layout-check/layout-check.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,aAAa,EAAE,iBAAiB,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAA;AAEpF,OAAO,EAGL,KAAK,WAAW,EAEhB,KAAK,aAAa,EAGnB,MAAM,sCAAsC,CAAA;AAC7C,OAAO,EAAE,KAAK,mBAAmB,EAAsB,MAAM,uCAAuC,CAAA;AACpG,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,oBAAoB,CAAA;AAElE,OAAO,EAAE,KAAK,kBAAkB,EAAe,MAAM,sBAAsB,CAAA;AAe3E,sFAAsF;AACtF,MAAM,MAAM,WAAW,GACnB;IACE,QAAQ,CAAC,MAAM,EAAE,SAAS,CAAA;IAC1B,QA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AC,EAAE,MAAM,CAAA;IAClB,QAAQ,CAAC,IAAI,EAAE;QAAE,QAAQ,CAAC,CAAC,EAAE,MAAM,CAAC;QAAC,QAAQ,CAAC,CAAC,EAAE,MAAM,CAAA;KAAE,CAAA;CAC1D;AAED;;;GAGG;AACH,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,SAAS,cAAc,EAAE,GAAG,aAAa,EAAE,CAcpF;AAiBD,wFAAwF;AACxF,KAAK,cAAc,GAAG,aAAa,GAAG;IACpC,QAAQ,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,CAAA;IAChC,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAA;IACvB,QAAQ,CAAC,IAAI,CAAC,EAAE,QAAQ,CAAA;IACxB,mCAAmC;IACnC,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAA;CACxB,CAAA;AAED;;;;;GAKG;AACH,wBAAgB,cAAc,CAAC,QAAQ,EAAE,SAAS,cAAc,EAAE,GAAG,aAAa,EAAE,CAiFnF"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { Canvas } from "@sixb/core/artifacts";
|
|
2
|
+
/** The window the canvas opens in: a laptop's. */
|
|
3
|
+
export declare const OVERVIEW_VIEWPORT: {
|
|
4
|
+
readonly width: 1440;
|
|
5
|
+
readonly height: 900;
|
|
6
|
+
};
|
|
7
|
+
/**
|
|
8
|
+
* The page the check screenshots as `overview.png`: the canvas fitted to the viewport as the
|
|
9
|
+
* app's opening fit does, in the theme's tokens, each board its picture at `image(id)`.
|
|
10
|
+
*/
|
|
11
|
+
export declare function canvasOverviewHtml(input: {
|
|
12
|
+
readonly canvas: Canvas;
|
|
13
|
+
readonly tokens: Readonly<Record<string, string>>;
|
|
14
|
+
/** Where each board's picture is, relative to the page. */
|
|
15
|
+
readonly image: (boardId: string) => string;
|
|
16
|
+
}): string;
|
|
17
|
+
//# sourceMappingURL=overview.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"overview.d.ts","sourceRoot":"","sources":["../../../src/artifacts/layout-check/overview.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAyB,MAAM,sBAAsB,CAAA;AAczE,kDAAkD;AAClD,eAAO,MAAM,iBAAiB;;;CAAwC,CAAA;AAyBtE;;;GAGG;AACH,wBAAgB,kBAAkB,CAAC,KAAK,EAAE;IACxC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAA;IACvB,QAAQ,CAAC,MAAM,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAA;IACjD,2DAA2D;IAC3D,QAAQ,CAAC,KAAK,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,MAAM,CAAA;CAC5C,GAAG,MAAM,CAmDT"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { Sandbox, SandboxFileRecord } from "@sixb/core";
|
|
2
2
|
import type { AgentRunArtifacts, AgentRunFileStore } from "@sixb/core/internal/agents";
|
|
3
|
-
import type { ArtifactRecord, ArtifactVersionRecord } from "@sixb/core/storage";
|
|
3
|
+
import type { ArtifactFile, ArtifactRecord, ArtifactVersionRecord } from "@sixb/core/storage";
|
|
4
4
|
export interface MaterializedArtifacts {
|
|
5
5
|
/** Files to write, at paths relative to the sandbox working directory or absolute. */
|
|
6
6
|
readonly files: readonly SandboxFileRecord[];
|
|
@@ -16,35 +16,46 @@ interface ManifestEntry {
|
|
|
16
16
|
readonly kind: string;
|
|
17
17
|
readonly title: string;
|
|
18
18
|
readonly version: number;
|
|
19
|
+
/** The artifact's revision this copy holds: an update made from it starts from there. */
|
|
20
|
+
readonly revision: number;
|
|
21
|
+
/**
|
|
22
|
+
* The version is open: each update replaces it until the user creates a version. A frozen one
|
|
23
|
+
* never changes, and the next update opens the next version.
|
|
24
|
+
*/
|
|
25
|
+
readonly open: boolean;
|
|
19
26
|
/** The artifact's address: an artifact that shows it follows its latest version. */
|
|
20
27
|
readonly address: string;
|
|
21
|
-
/**
|
|
22
|
-
|
|
28
|
+
/**
|
|
29
|
+
* The same at this version, once the user created it, which then never changes: a reply shows
|
|
30
|
+
* what its words describe. None while the version is open.
|
|
31
|
+
*/
|
|
32
|
+
readonly pinned?: string;
|
|
23
33
|
/**
|
|
24
34
|
* Addresses of its parts: a document's sections, a sheet's sheets and charts, a deck's slides, a
|
|
25
35
|
* canvas's boards and sections.
|
|
26
36
|
*/
|
|
27
37
|
readonly parts?: readonly {
|
|
28
38
|
readonly address: string;
|
|
29
|
-
readonly pinned
|
|
39
|
+
readonly pinned?: string;
|
|
30
40
|
readonly name: string;
|
|
31
41
|
}[];
|
|
32
42
|
/** Where the version's files are, as the agent names it; absent when not installed. */
|
|
33
43
|
readonly directory?: string;
|
|
34
44
|
readonly files: readonly string[];
|
|
35
45
|
/**
|
|
36
|
-
* The latest version was
|
|
37
|
-
* another conversation, or the project's code.
|
|
38
|
-
* changes.
|
|
46
|
+
* The latest version was last written outside this conversation: a person's edit in the app,
|
|
47
|
+
* another conversation, or the project's code. An update starts from it and keeps its changes.
|
|
39
48
|
*/
|
|
40
49
|
readonly edited?: true;
|
|
50
|
+
/** The requester reads it, through an object that holds it, and cannot change it. */
|
|
51
|
+
readonly readOnly?: true;
|
|
41
52
|
}
|
|
42
53
|
/**
|
|
43
54
|
* The conversation's artifacts as the run's sandbox holds them: the latest version of each under
|
|
44
55
|
* `<directory>/<id>/`, listed in the manifest, newest first. A publish replaces its artifact's copy
|
|
45
|
-
* and entry, so both stay the latest
|
|
46
|
-
* starts from the
|
|
47
|
-
*
|
|
56
|
+
* and entry, so both stay at the latest revision for the rest of the run: revising from the copy
|
|
57
|
+
* never starts from what the artifact held before. A publish refused because the artifact moved
|
|
58
|
+
* on installs what it moved to.
|
|
48
59
|
*/
|
|
49
60
|
export declare class InstalledArtifacts implements MaterializedArtifacts {
|
|
50
61
|
#private;
|
|
@@ -55,23 +66,45 @@ export declare class InstalledArtifacts implements MaterializedArtifacts {
|
|
|
55
66
|
readonly directory: string;
|
|
56
67
|
readonly manifestPath: string;
|
|
57
68
|
readonly maxBytes: number;
|
|
58
|
-
}, entries: readonly ManifestEntry[], installed: Map<string, number>, files: readonly SandboxFileRecord[]);
|
|
69
|
+
}, entries: readonly ManifestEntry[], installed: Map<string, number>, files: readonly SandboxFileRecord[], bases?: ReadonlyMap<string, readonly ArtifactFile[]>);
|
|
59
70
|
get manifestJson(): string;
|
|
60
|
-
/** The
|
|
61
|
-
|
|
71
|
+
/** The revision the manifest lists for an artifact: the one its copy holds. */
|
|
72
|
+
revisionOf(artifactId: string): number | undefined;
|
|
73
|
+
/** Whether the artifact was installed for the requester to read only. */
|
|
74
|
+
readOnly(artifactId: string): boolean;
|
|
75
|
+
/** Where an artifact's copy is installed, as the agent names it; none when it is not. */
|
|
76
|
+
directoryOf(artifactId: string): string | undefined;
|
|
77
|
+
/**
|
|
78
|
+
* The revision an update of an artifact starts from, and its files: those of the copy, which a
|
|
79
|
+
* canvas's update is merged from when others wrote it since.
|
|
80
|
+
*/
|
|
81
|
+
baseOf(artifactId: string): {
|
|
82
|
+
readonly revision: number;
|
|
83
|
+
readonly files: readonly ArtifactFile[];
|
|
84
|
+
} | undefined;
|
|
85
|
+
/** Records the folder the Agent published an artifact from: `path` as it named it. */
|
|
86
|
+
publishedFrom(artifactId: string, folder: {
|
|
87
|
+
readonly path: string;
|
|
88
|
+
readonly absolute: string;
|
|
89
|
+
}): void;
|
|
62
90
|
/**
|
|
63
|
-
* Install
|
|
64
|
-
*
|
|
91
|
+
* Install a revision in place of the artifact's copy, and list it first: the copy, the base of
|
|
92
|
+
* the next update, and the folder the Agent last published it from move together, so an update
|
|
93
|
+
* from that folder never takes out what someone else wrote. One that fails to write them keeps
|
|
94
|
+
* the base as it was, and rejects. One update runs at a time, so
|
|
95
|
+
* parallel publishes never write an older manifest over a newer one. Resolves to the folder it
|
|
96
|
+
* wrote, as the Agent named it, if any.
|
|
65
97
|
*/
|
|
66
98
|
replace(sandbox: Sandbox, published: {
|
|
67
99
|
readonly artifact: ArtifactRecord;
|
|
68
100
|
readonly version: ArtifactVersionRecord;
|
|
69
101
|
}, files: readonly PublishedArtifactFile[], signal: AbortSignal, options?: {
|
|
70
102
|
readonly edited?: boolean;
|
|
71
|
-
|
|
103
|
+
readonly readOnly?: boolean;
|
|
104
|
+
}): Promise<string | undefined>;
|
|
72
105
|
}
|
|
73
106
|
/** What a turn reads of its conversation's artifacts, as its requester, through its session. */
|
|
74
|
-
export type TurnArtifacts = Pick<AgentRunArtifacts, "getVersion" | "list" | "
|
|
107
|
+
export type TurnArtifacts = Pick<AgentRunArtifacts, "getVersion" | "list" | "turnWrites">;
|
|
75
108
|
/**
|
|
76
109
|
* The latest version of each artifact the conversation shares, installed under `<directory>/<id>/`
|
|
77
110
|
* and listed in a manifest, so the Agent edits what was published rather than whatever an older
|
|
@@ -94,19 +127,18 @@ export declare function materializeThreadArtifacts(input: {
|
|
|
94
127
|
readonly maxBytes?: number;
|
|
95
128
|
}): Promise<InstalledArtifacts>;
|
|
96
129
|
/**
|
|
97
|
-
* Install the latest
|
|
98
|
-
* place of the copy the run holds: a parent turn sees what
|
|
99
|
-
* whoever
|
|
100
|
-
* end names each.
|
|
130
|
+
* Install the latest revision of each thread artifact the run's turn wrote, its children's writes
|
|
131
|
+
* among them, in place of the copy the run holds when it holds another: a parent turn sees what
|
|
132
|
+
* its children wrote like its own, whoever wrote since. One that cannot be installed does not stop
|
|
133
|
+
* the others; the error at the end names each.
|
|
101
134
|
*/
|
|
102
|
-
export declare function
|
|
135
|
+
export declare function installTurnArtifacts(input: {
|
|
103
136
|
readonly installed: InstalledArtifacts;
|
|
104
137
|
readonly artifacts: TurnArtifacts;
|
|
105
138
|
readonly blobStorage: AgentRunFileStore;
|
|
106
139
|
readonly sandbox: Sandbox;
|
|
107
|
-
readonly runIds: readonly string[];
|
|
108
140
|
readonly signal: AbortSignal;
|
|
109
|
-
}): Promise<
|
|
141
|
+
}): Promise<string[]>;
|
|
110
142
|
/** A version's files with the bytes each holds. Reading stops when the run is cancelled. */
|
|
111
143
|
export declare function readArtifactVersionFiles(blobStorage: AgentRunFileStore, version: ArtifactVersionRecord, signal: AbortSignal): Promise<PublishedArtifactFile[]>;
|
|
112
144
|
/** A blob's bytes. Reading stops when the run is cancelled. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"materialize.d.ts","sourceRoot":"","sources":["../../src/artifacts/materialize.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,OAAO,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAA;AAE5D,OAAO,KAAK,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAA;AACtF,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"materialize.d.ts","sourceRoot":"","sources":["../../src/artifacts/materialize.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,OAAO,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAA;AAE5D,OAAO,KAAK,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAA;AACtF,OAAO,KAAK,EACV,YAAY,EAEZ,cAAc,EACd,qBAAqB,EACtB,MAAM,oBAAoB,CAAA;AAQ3B,MAAM,WAAW,qBAAqB;IACpC,sFAAsF;IACtF,QAAQ,CAAC,KAAK,EAAE,SAAS,iBAAiB,EAAE,CAAA;IAC5C,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAA;CAC9B;AAED,qEAAqE;AACrE,MAAM,WAAW,qBAAqB;IACpC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;IACrB,QAAQ,CAAC,KAAK,EAAE,UAAU,CAAA;CAC3B;AAED,UAAU,aAAa;IACrB,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAA;IACnB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;IACrB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;IACtB,QAAQ,CAAC,OAAO,EAAE,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,CAAC,SAAS,EAAE,aAAa,CAAA;IACjC,QAAQ,CAAC,WAAW,EAAE,iBAAiB,CAAA;IACvC,6EAA6E;IAC7E,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAA;IAC1B,yDAAyD;IACzD,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAA;IAC7B,yCAAyC;IACzC,QAAQ,CAAC,MAAM,CAAC,EAAE,WAAW,CAAA;IAC7B,kDAAkD;IAClD,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAA;CAC3B,GAAG,OAAO,CAAC,kBAAkB,CAAC,CAqD9B;AAED;;;;;GAKG;AACH,wBAAsB,oBAAoB,CAAC,KAAK,EAAE;IAChD,QAAQ,CAAC,SAAS,EAAE,kBAAkB,CAAA;IACtC,QAAQ,CAAC,SAAS,EAAE,aAAa,CAAA;IACjC,QAAQ,CAAC,WAAW,EAAE,iBAAiB,CAAA;IACvC,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAA;IACzB,QAAQ,CAAC,MAAM,EAAE,WAAW,CAAA;CAC7B,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC,CAoCpB;AAoFD,4FAA4F;AAC5F,wBAAsB,wBAAwB,CAC5C,WAAW,EAAE,iBAAiB,EAC9B,OAAO,EAAE,qBAAqB,EAC9B,MAAM,EAAE,WAAW,GAClB,OAAO,CAAC,qBAAqB,EAAE,CAAC,CAQlC;AAED,+DAA+D;AAC/D,wBAAsB,QAAQ,CAC5B,WAAW,EAAE,iBAAiB,EAC9B,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,WAAW,GAClB,OAAO,CAAC,UAAU,CAAC,CAkBrB"}
|
|
@@ -7,7 +7,8 @@ import { type InstalledArtifacts } from "./materialize";
|
|
|
7
7
|
type PublishableKind = ArtifactKind;
|
|
8
8
|
export declare const PUBLISH_ARTIFACT_TOOL_SPEC: {
|
|
9
9
|
readonly name: "publish_artifact";
|
|
10
|
-
readonly
|
|
10
|
+
readonly strict: true;
|
|
11
|
+
readonly description: string;
|
|
11
12
|
readonly inputSchema: {
|
|
12
13
|
type: string;
|
|
13
14
|
properties: {
|
|
@@ -15,22 +16,28 @@ export declare const PUBLISH_ARTIFACT_TOOL_SPEC: {
|
|
|
15
16
|
readonly type: "string";
|
|
16
17
|
readonly description: "A file or a directory in the sandbox, relative to the working directory.";
|
|
17
18
|
};
|
|
19
|
+
title: {
|
|
20
|
+
readonly type: "string";
|
|
21
|
+
readonly description: "Plain text of at most 200 characters naming the deliverable.";
|
|
22
|
+
};
|
|
18
23
|
kind: {
|
|
19
24
|
type: string;
|
|
20
25
|
enum: ("file" | "document" | "sheet" | "slides" | "page" | "canvas")[];
|
|
26
|
+
description: string;
|
|
21
27
|
};
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
28
|
+
id: {
|
|
29
|
+
type: string;
|
|
30
|
+
description: string;
|
|
25
31
|
};
|
|
26
32
|
};
|
|
27
33
|
required: string[];
|
|
28
34
|
additionalProperties: false;
|
|
29
35
|
};
|
|
30
36
|
};
|
|
31
|
-
export declare const
|
|
32
|
-
readonly name: "
|
|
33
|
-
readonly
|
|
37
|
+
export declare const OPEN_ARTIFACT_TOOL_SPEC: {
|
|
38
|
+
readonly name: "open_artifact";
|
|
39
|
+
readonly strict: true;
|
|
40
|
+
readonly description: "Open an artifact $SIXB_ARTIFACTS does not list, such as one a project object holds: its current version is installed under $SIXB_ARTIFACTS_DIR/<id>/ and listed in $SIXB_ARTIFACTS, to read it, or to revise it with publish_artifact and its id when the user may change it. Publishes nothing. Returns its title, revision, and whether the user may only read it.";
|
|
34
41
|
readonly inputSchema: {
|
|
35
42
|
type: string;
|
|
36
43
|
properties: {
|
|
@@ -38,28 +45,15 @@ export declare const PUBLISH_ARTIFACT_VERSION_TOOL_SPEC: {
|
|
|
38
45
|
type: string;
|
|
39
46
|
description: string;
|
|
40
47
|
};
|
|
41
|
-
path: {
|
|
42
|
-
readonly type: "string";
|
|
43
|
-
readonly description: "A file or a directory in the sandbox, relative to the working directory.";
|
|
44
|
-
};
|
|
45
|
-
title: {
|
|
46
|
-
readonly type: "string";
|
|
47
|
-
readonly description: "Plain text of at most 200 characters naming the deliverable.";
|
|
48
|
-
};
|
|
49
48
|
};
|
|
50
49
|
required: string[];
|
|
51
50
|
additionalProperties: false;
|
|
52
51
|
};
|
|
53
52
|
};
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
readonly title: string;
|
|
58
|
-
}
|
|
59
|
-
export interface PublishArtifactVersionToolInput {
|
|
53
|
+
/** A publish: of a new artifact by its kind, or of an artifact's current version by its id. */
|
|
54
|
+
export type PublishArtifactToolInput = PublishRequest;
|
|
55
|
+
export interface OpenArtifactToolInput {
|
|
60
56
|
readonly id: string;
|
|
61
|
-
readonly path: string;
|
|
62
|
-
readonly title: string;
|
|
63
57
|
}
|
|
64
58
|
interface PublishToolsInput {
|
|
65
59
|
/** The run's artifacts, through its session: what it reads as its requester, and publishes. */
|
|
@@ -76,11 +70,25 @@ interface PublishToolsInput {
|
|
|
76
70
|
readonly installed: Promise<InstalledArtifacts>;
|
|
77
71
|
}
|
|
78
72
|
/**
|
|
79
|
-
* `publish_artifact`
|
|
80
|
-
*
|
|
81
|
-
*
|
|
73
|
+
* `publish_artifact` reads a file or a directory from the sandbox, stores its bytes, and publishes
|
|
74
|
+
* them through the run's session, which applies a run's rules (see `AgentRunArtifacts.publish`):
|
|
75
|
+
* a new artifact of its kind, or, by id, the open version's content replaced, or the next version
|
|
76
|
+
* opened after one the user created. What it wrote exists when the tool returns, so the
|
|
82
77
|
* conversation shows it mid-turn and a cancelled run keeps it.
|
|
78
|
+
*
|
|
79
|
+
* `open_artifact` installs one the conversation does not list, as the requester reads it, so an
|
|
80
|
+
* update starts from what it holds.
|
|
83
81
|
*/
|
|
84
|
-
export declare function createPublishArtifactTools(input: PublishToolsInput): readonly [ModelTool<PublishArtifactToolInput>, ModelTool<
|
|
82
|
+
export declare function createPublishArtifactTools(input: PublishToolsInput): readonly [ModelTool<PublishArtifactToolInput>, ModelTool<OpenArtifactToolInput>];
|
|
83
|
+
interface PublishRequest {
|
|
84
|
+
readonly path: string;
|
|
85
|
+
readonly title: string;
|
|
86
|
+
/** A new artifact of this kind, or this artifact's latest version. */
|
|
87
|
+
readonly target: {
|
|
88
|
+
readonly kind: PublishableKind;
|
|
89
|
+
} | {
|
|
90
|
+
readonly artifactId: string;
|
|
91
|
+
};
|
|
92
|
+
}
|
|
85
93
|
export {};
|
|
86
94
|
//# sourceMappingURL=publish-tool.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"publish-tool.d.ts","sourceRoot":"","sources":["../../src/artifacts/publish-tool.ts"],"names":[],"mappings":"AAEA,OAAO,EAEL,KAAK,YAAY,
|
|
1
|
+
{"version":3,"file":"publish-tool.d.ts","sourceRoot":"","sources":["../../src/artifacts/publish-tool.ts"],"names":[],"mappings":"AAEA,OAAO,EAEL,KAAK,YAAY,EAGjB,KAAK,SAAS,EAEf,MAAM,YAAY,CAAA;AASnB,OAAO,EAEL,KAAK,iBAAiB,EACtB,KAAK,iBAAiB,EAEvB,MAAM,4BAA4B,CAAA;AAUnC,OAAO,KAAK,EAAc,SAAS,EAAE,MAAM,mBAAmB,CAAA;AAS9D,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAA;AAC3D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAA;AAS1D,OAAO,EACL,KAAK,kBAAkB,EAGxB,MAAM,eAAe,CAAA;AAQtB,KAAK,eAAe,GAAG,YAAY,CAAA;AAenC,eAAO,MAAM,0BAA0B;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA0B7B,CAAA;AAEV,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;CAa1B,CAAA;AAEV,+FAA+F;AAC/F,MAAM,MAAM,wBAAwB,GAAG,cAAc,CAAA;AAErD,MAAM,WAAW,qBAAqB;IACpC,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAA;CACpB;AAED,UAAU,iBAAiB;IACzB,+FAA+F;IAC/F,QAAQ,CAAC,SAAS,EAAE,iBAAiB,CAAA;IACrC,+FAA+F;IAC/F,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAA;IACzB,QAAQ,CAAC,KAAK,EAAE,SAAS,CAAA;IACzB,mEAAmE;IACnE,QAAQ,CAAC,WAAW,EAAE,iBAAiB,CAAA;IACvC,mDAAmD;IACnD,QAAQ,CAAC,MAAM,EAAE,eAAe,CAAA;IAChC,QAAQ,CAAC,cAAc,EAAE,MAAM,OAAO,CAAC,kBAAkB,CAAC,CAAA;IAC1D,qFAAqF;IACrF,QAAQ,CAAC,SAAS,EAAE,OAAO,CAAC,kBAAkB,CAAC,CAAA;CAChD;AAED;;;;;;;;;GASG;AACH,wBAAgB,0BAA0B,CACxC,KAAK,EAAE,iBAAiB,GACvB,SAAS,CAAC,SAAS,CAAC,wBAAwB,CAAC,EAAE,SAAS,CAAC,qBAAqB,CAAC,CAAC,CAiBlF;AAUD,UAAU,cAAc;IACtB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;IACrB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;IACtB,sEAAsE;IACtE,QAAQ,CAAC,MAAM,EAAE;QAAE,QAAQ,CAAC,IAAI,EAAE,eAAe,CAAA;KAAE,GAAG;QAAE,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAA;KAAE,CAAA;CACtF"}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { type AgentMessage } from "@sixb/core";
|
|
2
|
+
import { type AgentQuestion } from "@sixb/core/internal/agents";
|
|
3
|
+
import { type ModelTool } from "@sixb/core/models";
|
|
4
|
+
import type { SubagentInbox } from "./subagent-inbox";
|
|
5
|
+
export declare const ASK_TOOL_NAME = "ask";
|
|
6
|
+
export interface AskInput {
|
|
7
|
+
readonly questions: readonly AgentQuestion[];
|
|
8
|
+
}
|
|
9
|
+
/** What a sub-agent's `ask` answers: its parent's answer, or that it comes in a later turn. */
|
|
10
|
+
export type AskParentOutput = {
|
|
11
|
+
readonly answer: string;
|
|
12
|
+
}
|
|
13
|
+
/** `question`: its id, which the answer of a later turn replies to. */
|
|
14
|
+
| {
|
|
15
|
+
readonly status: "deferred";
|
|
16
|
+
readonly question: string;
|
|
17
|
+
readonly note: string;
|
|
18
|
+
}
|
|
19
|
+
/** It paused on a held call too: only a decision continues it, without an answer. */
|
|
20
|
+
| {
|
|
21
|
+
readonly status: "unanswered";
|
|
22
|
+
readonly question: string;
|
|
23
|
+
readonly note: string;
|
|
24
|
+
};
|
|
25
|
+
/** What the Agent's `ask` answers: the user sees the questions, and the turn ends. */
|
|
26
|
+
export interface AskUserOutput {
|
|
27
|
+
readonly status: "asked";
|
|
28
|
+
readonly note: string;
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* What a question deferred in the step that held a call reads as once the child continues: the
|
|
32
|
+
* decision continues it, and no answer comes with it. Only a continuation reads it, as the child
|
|
33
|
+
* paused right after that step, so what its thread keeps may say so without changing a byte the
|
|
34
|
+
* model already read.
|
|
35
|
+
*/
|
|
36
|
+
export declare function unansweredQuestion<TMessage extends Pick<AgentMessage, "parts">>(messages: readonly TMessage[]): readonly TMessage[];
|
|
37
|
+
/**
|
|
38
|
+
* A sub-agent's questions to its parent, which it waits for within its step. Its parent reads them
|
|
39
|
+
* as one text and answers with `message_agent`; when its turn ends first, the child pauses on them
|
|
40
|
+
* and a later turn continues it with the answer.
|
|
41
|
+
*/
|
|
42
|
+
export declare function createAskParentTool(inbox: SubagentInbox): ModelTool<AskInput>;
|
|
43
|
+
/**
|
|
44
|
+
* The Agent's questions to the user. The turn ends after the step that asks (see
|
|
45
|
+
* {@link stepAskedUser}); the app and the TUI show the questions with their choices, and the
|
|
46
|
+
* user's answer is their next message, which the next turn reads after this call.
|
|
47
|
+
*/
|
|
48
|
+
export declare function createAskUserTool(): ModelTool<AskInput>;
|
|
49
|
+
/**
|
|
50
|
+
* Whether a step of the Agent's asked the user: the turn ends after it. A call refused for its
|
|
51
|
+
* input did not ask: the model reads why and tries again.
|
|
52
|
+
*/
|
|
53
|
+
export declare function stepAskedUser(step: {
|
|
54
|
+
readonly content: readonly {
|
|
55
|
+
readonly type: string;
|
|
56
|
+
readonly toolName?: string;
|
|
57
|
+
readonly output?: {
|
|
58
|
+
readonly type: string;
|
|
59
|
+
};
|
|
60
|
+
}[];
|
|
61
|
+
}): boolean;
|
|
62
|
+
//# sourceMappingURL=ask-tool.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ask-tool.d.ts","sourceRoot":"","sources":["../src/ask-tool.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,YAAY,EAAwB,MAAM,YAAY,CAAA;AACpE,OAAO,EAEL,KAAK,aAAa,EAGnB,MAAM,4BAA4B,CAAA;AACnC,OAAO,EAAkD,KAAK,SAAS,EAAE,MAAM,mBAAmB,CAAA;AAElG,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAA;AAErD,eAAO,MAAM,aAAa,QAAQ,CAAA;AAElC,MAAM,WAAW,QAAQ;IACvB,QAAQ,CAAC,SAAS,EAAE,SAAS,aAAa,EAAE,CAAA;CAC7C;AAED,+FAA+F;AAC/F,MAAM,MAAM,eAAe,GACvB;IAAE,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAA;CAAE;AAC7B,uEAAuE;GACrE;IAAE,QAAQ,CAAC,MAAM,EAAE,UAAU,CAAC;IAAC,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;CAAE;AACnF,qFAAqF;GACnF;IAAE,QAAQ,CAAC,MAAM,EAAE,YAAY,CAAC;IAAC,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;CAAE,CAAA;AAEvF,sFAAsF;AACtF,MAAM,WAAW,aAAa;IAC5B,QAAQ,CAAC,MAAM,EAAE,OAAO,CAAA;IACxB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;CACtB;AAWD;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAAC,QAAQ,SAAS,IAAI,CAAC,YAAY,EAAE,OAAO,CAAC,EAC7E,QAAQ,EAAE,SAAS,QAAQ,EAAE,GAC5B,SAAS,QAAQ,EAAE,CAiBrB;AAED;;;;GAIG;AACH,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,aAAa,GAAG,SAAS,CAAC,QAAQ,CAAC,CAyB7E;AAED;;;;GAIG;AACH,wBAAgB,iBAAiB,IAAI,SAAS,CAAC,QAAQ,CAAC,CAgBvD;AAED;;;GAGG;AACH,wBAAgB,aAAa,CAAC,IAAI,EAAE;IAClC,QAAQ,CAAC,OAAO,EAAE,SAAS;QACzB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;QACrB,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAA;QAC1B,QAAQ,CAAC,MAAM,CAAC,EAAE;YAAE,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;SAAE,CAAA;KAC5C,EAAE,CAAA;CACJ,GAAG,OAAO,CAKV"}
|
package/dist/attachments.d.ts
CHANGED
|
@@ -4,7 +4,7 @@ import type { LanguageModel, ModelMessage } from "@sixb/core/models";
|
|
|
4
4
|
import type { AgentMessageRecord } from "@sixb/core/storage";
|
|
5
5
|
/**
|
|
6
6
|
* Where a parent finds what its children wrote to `out/`, a directory per spawn key, in the context
|
|
7
|
-
* directory: `
|
|
7
|
+
* directory: `wait` and `stop` copy them there, and later turns materialize them there again.
|
|
8
8
|
*/
|
|
9
9
|
export declare const CHILD_FILES_DIRECTORY = "children";
|
|
10
10
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"attachments.d.ts","sourceRoot":"","sources":["../src/attachments.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,uBAAuB,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E,WAAW,CAAA;IAC7B,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,CAAA;IAC7B,QAAQ,CAAC,iBAAiB,CAAC,EAAE,MAAM,CAAA;CACpC,GAAG,OAAO,CAAC,+BAA+B,CAAC,CAsF3C;AAyfD,wBAAgB,yBAAyB,CAAC,KAAK,EAAE,aAAa,GAAG,OAAO,CAMvE;AAED;;;GAGG;AACH,wBAAgB,sBAAsB,CACpC,OAAO,EAAE,8BAA8B,EACvC,QAAQ,EAAE,WAAW,CAAC,MAAM,EAAE,sBAAsB,CAAC,GACpD,8BAA8B,CA4BhC;AA8LD,wBAAgB,WAAW,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAIjD;AAED,OAAO,EACL,aAAa,EACb,sBAAsB,EACtB,qBAAqB,EACrB,uBAAuB,GACxB,MAAM,4BAA4B,CAAA"}
|
|
@@ -5,7 +5,7 @@ export declare const BACKGROUND_DIRECTORY = "background";
|
|
|
5
5
|
export type BackgroundCommandStatus = "running" | "exited" | "stopped";
|
|
6
6
|
/** A background command as its tools report it, and as a chat can show it. */
|
|
7
7
|
export interface BackgroundCommandState {
|
|
8
|
-
/** `bg_<hex>`: the id `
|
|
8
|
+
/** `bg_<hex>`: the id `wait` and `stop` take, never the same in two runs. */
|
|
9
9
|
readonly id: string;
|
|
10
10
|
readonly command: string;
|
|
11
11
|
readonly status: BackgroundCommandStatus;
|
|
@@ -20,7 +20,7 @@ export interface BackgroundCommandState {
|
|
|
20
20
|
/** The file holding everything it wrote, stdout and stderr together, as the agent names it. */
|
|
21
21
|
readonly outputPath: string;
|
|
22
22
|
}
|
|
23
|
-
/** What `
|
|
23
|
+
/** What `wait` and `stop` return of it: its state, and what it wrote since the last read. */
|
|
24
24
|
export interface BackgroundCommandOutput extends BackgroundCommandState {
|
|
25
25
|
/** What it wrote since the last read: its newest 20,000 bytes at most. */
|
|
26
26
|
readonly output: string;
|
|
@@ -89,7 +89,7 @@ export declare class BackgroundCommands {
|
|
|
89
89
|
/**
|
|
90
90
|
* Stop the commands a `sixb` that ended without stopping them left running: one killed, or that
|
|
91
91
|
* crashed. Their pid files are all that is left of them. Each group still running its command
|
|
92
|
-
* gets SIGTERM, then SIGKILL after the grace period `
|
|
92
|
+
* gets SIGTERM, then SIGKILL after the grace period `stop` gives, in one call.
|
|
93
93
|
*/
|
|
94
94
|
export declare function stopLeftRunning(sandbox: Sandbox, pidFiles: readonly string[], signal: AbortSignal): Promise<void>;
|
|
95
95
|
//# sourceMappingURL=background-commands.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"background-commands.d.ts","sourceRoot":"","sources":["../src/background-commands.ts"],"names":[],"mappings":"AAEA,OAAO,EAA4C,KAAK,OAAO,EAAE,MAAM,YAAY,CAAA;AAGnF,OAAO,EAAE,KAAK,kBAAkB,EAAe,MAAM,kBAAkB,CAAA;AASvE,oEAAoE;AACpE,eAAO,MAAM,oBAAoB,eAAe,CAAA;AAoBhD,MAAM,MAAM,uBAAuB,GAAG,SAAS,GAAG,QAAQ,GAAG,SAAS,CAAA;AAEtE,8EAA8E;AAC9E,MAAM,WAAW,sBAAsB;IACrC,
|
|
1
|
+
{"version":3,"file":"background-commands.d.ts","sourceRoot":"","sources":["../src/background-commands.ts"],"names":[],"mappings":"AAEA,OAAO,EAA4C,KAAK,OAAO,EAAE,MAAM,YAAY,CAAA;AAGnF,OAAO,EAAE,KAAK,kBAAkB,EAAe,MAAM,kBAAkB,CAAA;AASvE,oEAAoE;AACpE,eAAO,MAAM,oBAAoB,eAAe,CAAA;AAoBhD,MAAM,MAAM,uBAAuB,GAAG,SAAS,GAAG,QAAQ,GAAG,SAAS,CAAA;AAEtE,8EAA8E;AAC9E,MAAM,WAAW,sBAAsB;IACrC,6EAA6E;IAC7E,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAA;IACnB,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAA;IACxB,QAAQ,CAAC,MAAM,EAAE,uBAAuB,CAAA;IACxC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AAE,MAAM,EAAE,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC;IAsB7E;;;OAGG;IACG,IAAI,CACR,EAAE,EAAE,MAAM,EACV,MAAM,EAAE,kBAAkB,EAC1B,MAAM,EAAE,WAAW,GAClB,OAAO,CAAC,uBAAuB,CAAC;IAsCnC;;;;OAIG;IACG,IAAI,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,sBAAsB,CAAC;IASvD,wCAAwC;IAClC,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC;IAK9B;;;OAGG;IACH,KAAK,CAAC,OAAO,EAAE,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC,GAAG,SAAS;IAQlD,qFAAqF;IACrF,SAAS,IAAI,SAAS,sBAAsB,EAAE;CA0E/C;AAmDD;;;;GAIG;AACH,wBAAsB,eAAe,CACnC,OAAO,EAAE,OAAO,EAChB,QAAQ,EAAE,SAAS,MAAM,EAAE,EAC3B,MAAM,EAAE,WAAW,GAClB,OAAO,CAAC,IAAI,CAAC,CASf"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"background-notices.d.ts","sourceRoot":"","sources":["../src/background-notices.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,YAAY,EAAuB,MAAM,YAAY,CAAA;AACnE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAA;AAClD,OAAO,KAAK,EAAE,sBAAsB,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAA;
|
|
1
|
+
{"version":3,"file":"background-notices.d.ts","sourceRoot":"","sources":["../src/background-notices.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,YAAY,EAAuB,MAAM,YAAY,CAAA;AACnE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAA;AAClD,OAAO,KAAK,EAAE,sBAAsB,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAA;AASvF;;;;;;GAMG;AACH,qBAAa,iBAAiB;;IAa1B,OAAO,CAAC,QAAQ,CAAC,QAAQ;gBAAR,QAAQ,EAAE,kBAAkB,EAC7C,OAAO,GAAE;QACP,6FAA6F;QAC7F,QAAQ,CAAC,WAAW,CAAC,EAAE,SAAS,sBAAsB,EAAE,CAAA;QACxD,+FAA+F;QAC/F,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAA;KACvB;IAYR,+DAA+D;IAC/D,IAAI,CAAC,GAAG,OAAa,GAAG,MAAM,GAAG,SAAS;IAmB1C,2EAA2E;IAC3E,IAAI,CAAC,KAAK,EAAE,SAAS,SAAS,EAAE,GAAG,SAAS,EAAE;CAsB/C;AAED;;;;GAIG;AACH,wBAAgB,6BAA6B,CAC3C,QAAQ,EAAE,SAAS,IAAI,CAAC,YAAY,EAAE,OAAO,CAAC,EAAE,GAC/C,SAAS,sBAAsB,EAAE,CAmBnC"}
|
package/dist/child-files.d.ts
CHANGED
|
@@ -45,7 +45,7 @@ export declare function handedFileRefs(input: {
|
|
|
45
45
|
}): Promise<readonly SubagentRunFile[]>;
|
|
46
46
|
/**
|
|
47
47
|
* The child's side: the files its parent handed over, at the same paths in its sandbox, listed in
|
|
48
|
-
* `$SIXB_ATTACHMENTS` and readable with `
|
|
48
|
+
* `$SIXB_ATTACHMENTS` and readable with `read`.
|
|
49
49
|
*/
|
|
50
50
|
export declare function prepareHandedFiles(input: {
|
|
51
51
|
readonly projectId: string;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* A question a child asked: the id of its mail and what it asks. A child paused on it keeps both in
|
|
3
|
-
* its thread, the
|
|
3
|
+
* its thread, the questions as its `ask` call's input and the id in that call's output.
|
|
4
4
|
*/
|
|
5
5
|
export interface QuestionRef {
|
|
6
6
|
readonly id: string;
|