@archmax-ai/harness 0.3.1 → 0.4.0
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 +3 -1
- package/dist/assembly/compose.d.ts +40 -3
- package/dist/assembly/compose.js +81 -7
- package/dist/assembly/compose.js.map +1 -1
- package/dist/assembly/delegation-registry.js +5 -2
- package/dist/assembly/delegation-registry.js.map +1 -1
- package/dist/assembly/image-reads.d.ts +53 -0
- package/dist/assembly/image-reads.js +163 -0
- package/dist/assembly/image-reads.js.map +1 -0
- package/dist/assembly/index.d.ts +21 -0
- package/dist/assembly/index.js +7 -1
- package/dist/assembly/index.js.map +1 -1
- package/dist/assembly/plain.js +6 -3
- package/dist/assembly/plain.js.map +1 -1
- package/dist/authoring-skill/archmax-harness/references/backend-integration.md +48 -1
- package/dist/authoring-skill/archmax-harness/references/hook-and-test-scripts.md +27 -1
- package/dist/authoring-skill/archmax-harness/references/workflow-schema.md +71 -25
- package/dist/authoring-skill/archmax-harness/references/workflow-yaml.md +24 -5
- package/dist/core/binary-read.d.ts +52 -0
- package/dist/core/binary-read.js +129 -0
- package/dist/core/binary-read.js.map +1 -0
- package/dist/core/file-operations.d.ts +43 -0
- package/dist/core/file-operations.js +368 -0
- package/dist/core/file-operations.js.map +1 -0
- package/dist/core/path-mapping.d.ts +10 -3
- package/dist/core/path-mapping.js +27 -0
- package/dist/core/path-mapping.js.map +1 -1
- package/dist/core/platform-prompt.generated.js +1 -1
- package/dist/core/platform-prompt.generated.js.map +1 -1
- package/dist/core/prompt.d.ts +27 -0
- package/dist/core/prompt.js +65 -5
- package/dist/core/prompt.js.map +1 -1
- package/dist/core/session-zone.d.ts +3 -0
- package/dist/core/session-zone.js +9 -0
- package/dist/core/session-zone.js.map +1 -1
- package/dist/core/tool-context.d.ts +23 -0
- package/dist/core/tool-context.js +14 -0
- package/dist/core/tool-context.js.map +1 -0
- package/dist/core/tool-telemetry.js +2 -1
- package/dist/core/tool-telemetry.js.map +1 -1
- package/dist/core/workspace-router.d.ts +11 -1
- package/dist/core/workspace-router.js +47 -3
- package/dist/core/workspace-router.js.map +1 -1
- package/dist/index.d.ts +11 -1
- package/dist/index.js +3 -1
- package/dist/index.js.map +1 -1
- package/dist/kernel/kernel.js +167 -119
- package/dist/kernel/kernel.js.map +1 -1
- package/dist/machine/allow.d.ts +22 -0
- package/dist/machine/allow.js +47 -15
- package/dist/machine/allow.js.map +1 -1
- package/dist/machine/lint-spec.js +12 -3
- package/dist/machine/lint-spec.js.map +1 -1
- package/dist/machine/machine.d.ts +10 -1
- package/dist/machine/machine.js +36 -8
- package/dist/machine/machine.js.map +1 -1
- package/dist/machine/spec-schema.js +14 -0
- package/dist/machine/spec-schema.js.map +1 -1
- package/dist/machine/tool-names.d.ts +27 -7
- package/dist/machine/tool-names.js +43 -13
- package/dist/machine/tool-names.js.map +1 -1
- package/dist/machine/tool-paths.d.ts +51 -0
- package/dist/machine/tool-paths.js +127 -0
- package/dist/machine/tool-paths.js.map +1 -0
- package/dist/public/spec.d.ts +6 -1
- package/dist/public/spec.js +5 -1
- package/dist/public/spec.js.map +1 -1
- package/dist/validate/validate.js +10 -5
- package/dist/validate/validate.js.map +1 -1
- package/dist/workflow/agent-tools.d.ts +20 -1
- package/dist/workflow/agent-tools.js +31 -1
- package/dist/workflow/agent-tools.js.map +1 -1
- package/dist/workflow/control-tools.d.ts +4 -1
- package/dist/workflow/control-tools.js +24 -15
- package/dist/workflow/control-tools.js.map +1 -1
- package/dist/workflow/governance.d.ts +2 -0
- package/dist/workflow/governance.js +1 -0
- package/dist/workflow/governance.js.map +1 -1
- package/dist/workflow/middleware.d.ts +2 -0
- package/dist/workflow/middleware.js +27 -12
- package/dist/workflow/middleware.js.map +1 -1
- package/dist/workflow/on-error.js +3 -2
- package/dist/workflow/on-error.js.map +1 -1
- package/dist/workflow/parks.js +5 -5
- package/dist/workflow/parks.js.map +1 -1
- package/dist/workflow/render-prompt.d.ts +2 -0
- package/dist/workflow/render-prompt.js +9 -3
- package/dist/workflow/render-prompt.js.map +1 -1
- package/dist/workflow/returns-check.d.ts +35 -0
- package/dist/workflow/returns-check.js +10 -0
- package/dist/workflow/returns-check.js.map +1 -0
- package/dist/workflow/signature-checks.d.ts +26 -1
- package/dist/workflow/signature-checks.js +35 -10
- package/dist/workflow/signature-checks.js.map +1 -1
- package/dist/workflow/state.d.ts +75 -1
- package/dist/workflow/state.js +83 -0
- package/dist/workflow/state.js.map +1 -1
- package/dist/workflow/sub-workflow.d.ts +16 -5
- package/dist/workflow/sub-workflow.js +84 -37
- package/dist/workflow/sub-workflow.js.map +1 -1
- package/dist/workflow/tool-service.js +57 -10
- package/dist/workflow/tool-service.js.map +1 -1
- package/dist/workflow/turn-boundary.d.ts +8 -7
- package/dist/workflow/turn-boundary.js +10 -9
- package/dist/workflow/turn-boundary.js.map +1 -1
- package/dist/workflow/workflow-tools.js +5 -1
- package/dist/workflow/workflow-tools.js.map +1 -1
- package/package.json +1 -1
- package/skills/archmax-harness/references/backend-integration.md +48 -1
- package/skills/archmax-harness/references/hook-and-test-scripts.md +27 -1
- package/skills/archmax-harness/references/workflow-schema.md +71 -25
- package/skills/archmax-harness/references/workflow-yaml.md +24 -5
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"path-mapping.js","sourceRoot":"","sources":["../../src/core/path-mapping.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"path-mapping.js","sourceRoot":"","sources":["../../src/core/path-mapping.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAmClD,SAAS,SAAS,CAAC,MAAc;IAC/B,OAAO,gBAAgB,CAAC,MAAM,CAAC,CAAC,OAAO,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC;AACtD,CAAC;AAED;;;;;;;;;;GAUG;AACH,MAAM,UAAU,YAAY,CAC1B,OAA0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E,CAAC,CAAC,KAAK,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC,EAAE,OAAO,CAAC,CAAC,CAC5F,CAAC;YACF,OAAO,GAAG,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,EAAE,GAAG,KAAK,EAAE,IAAI,EAAE,MAAM,CAAC,KAAK,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;QACrF,CAAC;KACF,CAAC;AACJ,CAAC;AAED,SAAS,WAAW,CAAC,MAA0B;IAC7C,IAAI,MAAM,IAAI,IAAI;QAAE,OAAO,SAAS,CAAC;IACrC,MAAM,GAAG,GAAG,SAAS,CAAC,MAAM,CAAC,CAAC;IAC9B,OAAO,GAAG,KAAK,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,GAAG,CAAC;AACtC,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
// Generated from platform-prompt.md by scripts/generate-platform-prompt.mjs. Do not edit.
|
|
2
2
|
/** The bundled platform prompt: how to move through the graph and which tools are the runtime's. */
|
|
3
|
-
export const PLATFORM_PROMPT = "# Graph state execution\n\nYou run inside a **declarative workflow graph**: you occupy one **state** at a\ntime, and its spec governs which tools you may call and which files you may read\nor write.\n\n## How you move\n\n1. **Name the run first.** Before anything else in your first turn, call\n **`archmax_set_variables({ \"variables\": { \"title\": \"<a few words>\" } })`** — see\n \"Naming the run\" below.\n2. Do the current state's work. Write files where its instructions or listed\n mounts say; `scratchpad/`, always writable, is only the default.\n3. Call **`archmax_advance({ \"to\": \"<next>\", \"reason\": \"<one sentence>\" })`**,\n choosing `to` from the transitions under \"Current state\" by their descriptions.\n `to` takes the target's **slug** — the backticked token on the transition line.\n A parenthesized note gives the edge's type (`approve`, `reject`, `refine`) and\n marks a **human decision node** or a **terminal** target. A state with no\n transitions says so: the run ends there, so finish its work and stop.\n4. The runtime validates the edge and runs this state's `after` hook and then the\n target's `before` hook — either may send you back to correct or veto the move —\n before the next state's tools unlock.\n\n**One transition per message.** A second `archmax_advance` in the same message is\nrefused; chain states over successive turns.\n\n**Text alone ends your turn.** A message with no tool call is the last thing you\ndo until someone writes again: the run stays where it is, and whatever you meant\nto do next never happens. So when the work is to tell the person something *and\nthen* advance, wait or raise, write that text and make the call in the **same\nmessage**.\n\n**A conversation keeps its position.** A new message finds you in the state your\nlast turn ended in. If that state cannot serve it — no transition reaches what\nwas asked, or an earlier turn took a wrong path — call\n**`archmax_reset({ \"reason\": \"<one sentence>\" })`** to return to the state the\nconversation began in. The conversation and every file written so far are kept.\n\n**A terminal state never serves a follow-up.** When a message lands on a run that\nwas *already sitting* in a terminal state, reset **before** answering, or you skip\nevery state the answer depends on. Two cases are not follow-ups: a run you parked\nwith `archmax_wait`, which resumes where it was on purpose, and a terminal state\nyou were routed into *this turn*, by your own advance or a person's decision — do\nits work, then stop. Never reset out of a state you just arrived in, and never\n`archmax_wait` for the runtime to move you.\n\n### Waiting
|
|
3
|
+
export const PLATFORM_PROMPT = "# Graph state execution\n\nYou run inside a **declarative workflow graph**: you occupy one **state** at a\ntime, and its spec governs which tools you may call and which files you may read\nor write.\n\n## How you move\n\n<!-- top-level-only -->\n1. **Name the run first.** Before anything else in your first turn, call\n **`archmax_set_variables({ \"variables\": { \"title\": \"<a few words>\" } })`** — see\n \"Naming the run\" below.\n<!-- /top-level-only -->\n2. Do the current state's work. Write files where its instructions or listed\n mounts say; `scratchpad/`, always writable, is only the default.\n3. Call **`archmax_advance({ \"to\": \"<next>\", \"reason\": \"<one sentence>\" })`**,\n choosing `to` from the transitions under \"Current state\" by their descriptions.\n `to` takes the target's **slug** — the backticked token on the transition line.\n A parenthesized note gives the edge's type (`approve`, `reject`, `refine`) and\n marks a **human decision node** or a **terminal** target. A state with no\n transitions says so: the run ends there, so finish its work and stop.\n4. The runtime validates the edge and runs this state's `after` hook and then the\n target's `before` hook — either may send you back to correct or veto the move —\n before the next state's tools unlock.\n\n**One transition per message.** A second `archmax_advance` in the same message is\nrefused; chain states over successive turns.\n\n**Text alone ends your turn.** A message with no tool call is the last thing you\ndo until someone writes again: the run stays where it is, and whatever you meant\nto do next never happens. So when the work is to tell the person something *and\nthen* advance, wait or raise, write that text and make the call in the **same\nmessage**.\n\n**A conversation keeps its position.** A new message finds you in the state your\nlast turn ended in. If that state cannot serve it — no transition reaches what\nwas asked, or an earlier turn took a wrong path — call\n**`archmax_reset({ \"reason\": \"<one sentence>\" })`** to return to the state the\nconversation began in. The conversation and every file written so far are kept.\n\n**A terminal state never serves a follow-up.** When a message lands on a run that\nwas *already sitting* in a terminal state, reset **before** answering, or you skip\nevery state the answer depends on. Two cases are not follow-ups: a run you parked\nwith `archmax_wait`, which resumes where it was on purpose, and a terminal state\nyou were routed into *this turn*, by your own advance or a person's decision — do\nits work, then stop. Never reset out of a state you just arrived in, and never\n`archmax_wait` for the runtime to move you.\n\n### Waiting and deciding\n\n- Something has to **arrive** from outside the run — an event, a callback, a reply\n someone sends in their own time → call\n **`archmax_wait({ \"reason\": \"<what you are waiting for>\" })`** and stop. You\n resume in **this same state**, with what arrived in your transcript and any\n values it carried in the variables. Waiting for a *time*? Add `\"until\": \"1d\"` (a\n duration or an ISO-8601 instant); an earlier event still resumes you.\n- Someone has to **decide**, approve, review or choose → `archmax_advance` into the\n **human decision node** the author declared for it. The runtime parks the run\n there and presents the options itself: do the work its transitions require,\n advance in, and stop. Never advance out of one yourself, and never `archmax_wait`\n to ask for a decision.\n\n### When the work fails\n\nIf the task **cannot be completed** — a system it depends on keeps failing, what it\nneeds does not exist, the request is one this workflow cannot serve — try to\nrecover once or twice (a retry, another tool, another approach). If that fails\ntoo, call **`archmax_raise({ \"code\": \"<short-token>\", \"reason\": \"<what failed>\" })`**:\nit ends the session as a failure from any state, and whoever started the run\nreads your `code` (e.g. `orders-unavailable`) and `reason`. **When you are about to\ntell the person the task cannot be done, make that call in the same message**: the\nmessage's text is what they read, and no other tool call goes with it. A reply\nthat only explains the failure ends the run as a success. Never raise to finish\nwork that worked, or in place of `archmax_wait`, `archmax_reset` or a human node.\n\n### The state you are in\n\nThe active state's **`instructions`** arrive under a \"Current state\" heading:\nfollow them. You are shown the edges out of this state and nothing else of the\ngraph — there is no map of the workflow to consult. Do not guess at slugs, and do\nnot treat a state named anywhere else (a message, a file, your own earlier turns)\nas somewhere you can move to. Skills the state may use are listed under \"Skills\navailable in this state\", each naming the `SKILL.md` to read first.\n\n**`before`/`after` hooks** run on their own and may approve, ask for a\ncorrection, or block the run: fix the work rather than arguing with it.\n\n## Tools\n\nTool access is **closed by default**: you see only the active state's tools, and\na state may narrow a tool's arguments (e.g. `write_file` to one path). Tools named\n`archmax_*` are the runtime's controls. A blocked call names the tool, the state\nand the policy: fix the call, or advance if you are done.\n\n**Write code instead of many calls.** **`archmax_eval({ \"code\": \"…\" })`**, in\nevery state, runs JavaScript in a sandbox where `tools.*` calls your tools,\ngoverned exactly as your own calls are. Reach for it by default for loops,\nfilters, arithmetic, or more than about two calls whose results feed each other:\n**only your last expression and whatever you `console.log` come back to you**, so\nthe rest of what those tools returned never enters the conversation. The REPL\nkeeps its state between calls. Your code cannot read the run's variables:\ninterpolate a scalar one into it with `${{name}}` (below), or use\n**`archmax_run({ \"file_path\": \"…\" })`**, the same sandbox subject to the state's\npath constraints, whose script receives whole structured values as\n`args.variables`.\n\n<!-- top-level-only -->\n**Naming the run.** `title` is a reserved run variable: a one-line label of a few\nwords (`Refund for order A-1042`) that tells this run apart in a list of runs.\nThis is step 1 above, and it is not optional. Write it from what the request\nalready says, **before** the state's own work and before any other tool call — it\nis a label, not a plan, so never read anything to produce one — and it still goes\nfirst when the state's instructions tell you to do something else first. Update\nit when the task turns into something the old title no longer describes. Never\npass `lock` with it: that call is refused.\n\n<!-- /top-level-only -->\n**Reference a run variable instead of retyping it.** In any text argument,\n`${{name}}` (or `${{name.path.to.value}}`) is replaced with that variable's value\nbefore the call runs, also **inside** a longer string and as often as you like:\n\n```\n\"Thanks — your refund is on its way.\n\n--- Original message ---\n\n${{inbound.text}}\"\n```\n\nPrefer the reference to writing the value out: the value is what you spend tokens\non, and a reference cannot paraphrase, truncate or mistype it.\n`archmax_get_variables` shows what is set; a reference that does not resolve\nrefuses the call and says why. To write `${{…}}` literally, double the dollar:\n`$${{name}}`.\n";
|
|
4
4
|
//# sourceMappingURL=platform-prompt.generated.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"platform-prompt.generated.js","sourceRoot":"","sources":["../../src/core/platform-prompt.generated.ts"],"names":[],"mappings":"AAAA,0FAA0F;AAE1F,oGAAoG;AACpG,MAAM,CAAC,MAAM,eAAe,GAAW,
|
|
1
|
+
{"version":3,"file":"platform-prompt.generated.js","sourceRoot":"","sources":["../../src/core/platform-prompt.generated.ts"],"names":[],"mappings":"AAAA,0FAA0F;AAE1F,oGAAoG;AACpG,MAAM,CAAC,MAAM,eAAe,GAAW,01OAA01O,CAAC"}
|
package/dist/core/prompt.d.ts
CHANGED
|
@@ -10,6 +10,12 @@ export interface ResolveSystemPromptOptions {
|
|
|
10
10
|
* for it to explain.
|
|
11
11
|
*/
|
|
12
12
|
platformBackendPath: string | null;
|
|
13
|
+
/**
|
|
14
|
+
* The prompt is a sub-workflow's child session's: the platform layer leaves
|
|
15
|
+
* out its top-level-only passages (see {@link platformPromptFor}). Omitted, it
|
|
16
|
+
* is a top-level session's.
|
|
17
|
+
*/
|
|
18
|
+
child?: boolean;
|
|
13
19
|
/**
|
|
14
20
|
* Pre-assembled workflow prompt text: the spec-rendered workflow header
|
|
15
21
|
* followed by any `WORKFLOW.md` prose addendum (the caller composes both —
|
|
@@ -38,5 +44,26 @@ export interface SystemPromptParts {
|
|
|
38
44
|
}
|
|
39
45
|
/** Join the prompt layers, skipping absent ones. */
|
|
40
46
|
export declare function buildSystemPrompt(parts: SystemPromptParts): string;
|
|
47
|
+
/** Opens a platform-prompt passage only a top-level session reads; alone on its line. */
|
|
48
|
+
export declare const TOP_LEVEL_ONLY_OPEN = "<!-- top-level-only -->";
|
|
49
|
+
/** Closes a passage {@link TOP_LEVEL_ONLY_OPEN} opened; alone on its line. */
|
|
50
|
+
export declare const TOP_LEVEL_ONLY_CLOSE = "<!-- /top-level-only -->";
|
|
51
|
+
/** Which session a prompt is for: one a host started, or a sub-workflow's child. */
|
|
52
|
+
export type PromptSession = "top-level" | "child";
|
|
53
|
+
/**
|
|
54
|
+
* The platform prompt as `session` reads it. A passage between
|
|
55
|
+
* {@link TOP_LEVEL_ONLY_OPEN} and {@link TOP_LEVEL_ONLY_CLOSE}, each alone on
|
|
56
|
+
* its line, is kept for a top-level session and left out for a child session,
|
|
57
|
+
* which does not name itself: its title would describe a session nothing
|
|
58
|
+
* lists. The marker lines reach neither, so a top-level session reads the text
|
|
59
|
+
* exactly as it did before the markers existed. Where a left-out passage held
|
|
60
|
+
* items of an ordered list, the items after it in that list are renumbered. An
|
|
61
|
+
* opening marker with no closing one leaves everything after it in place.
|
|
62
|
+
*
|
|
63
|
+
* The same rule applies to a workspace's override, so one copied from the
|
|
64
|
+
* bundled prompt keeps the omission and one without markers reads the same in
|
|
65
|
+
* both sessions.
|
|
66
|
+
*/
|
|
67
|
+
export declare function platformPromptFor(text: string, session: PromptSession): string;
|
|
41
68
|
/** Load the prompt layers from the backend and merge them. */
|
|
42
69
|
export declare function resolveSystemPrompt(workspace: Workspace, opts: ResolveSystemPromptOptions): Promise<string>;
|
package/dist/core/prompt.js
CHANGED
|
@@ -11,7 +11,8 @@
|
|
|
11
11
|
* It ships inside the code (`platform-prompt.md`, generated into
|
|
12
12
|
* `platform-prompt.generated.ts`); a workspace may override it at
|
|
13
13
|
* `.platform/system/GRAPH_STATE.md`. A plain agent has no machine for it to
|
|
14
|
-
* explain, so it gets no platform layer.
|
|
14
|
+
* explain, so it gets no platform layer. A sub-workflow's child session
|
|
15
|
+
* reads it without its top-level-only passages (see {@link platformPromptFor}).
|
|
15
16
|
* 4. Workspace zones — rendered from the assembly's resolved mount table.
|
|
16
17
|
* 5. The workflow header — the spec's `title` and root `instructions`, and no
|
|
17
18
|
* state of the graph: the graph is disclosed only from where the agent
|
|
@@ -51,17 +52,76 @@ export function buildSystemPrompt(parts) {
|
|
|
51
52
|
.filter(Boolean)
|
|
52
53
|
.join("\n\n");
|
|
53
54
|
}
|
|
54
|
-
/**
|
|
55
|
-
|
|
55
|
+
/** Opens a platform-prompt passage only a top-level session reads; alone on its line. */
|
|
56
|
+
export const TOP_LEVEL_ONLY_OPEN = "<!-- top-level-only -->";
|
|
57
|
+
/** Closes a passage {@link TOP_LEVEL_ONLY_OPEN} opened; alone on its line. */
|
|
58
|
+
export const TOP_LEVEL_ONLY_CLOSE = "<!-- /top-level-only -->";
|
|
59
|
+
const ORDERED_ITEM = /^(\d+)\.(?=\s)/;
|
|
60
|
+
/**
|
|
61
|
+
* The platform prompt as `session` reads it. A passage between
|
|
62
|
+
* {@link TOP_LEVEL_ONLY_OPEN} and {@link TOP_LEVEL_ONLY_CLOSE}, each alone on
|
|
63
|
+
* its line, is kept for a top-level session and left out for a child session,
|
|
64
|
+
* which does not name itself: its title would describe a session nothing
|
|
65
|
+
* lists. The marker lines reach neither, so a top-level session reads the text
|
|
66
|
+
* exactly as it did before the markers existed. Where a left-out passage held
|
|
67
|
+
* items of an ordered list, the items after it in that list are renumbered. An
|
|
68
|
+
* opening marker with no closing one leaves everything after it in place.
|
|
69
|
+
*
|
|
70
|
+
* The same rule applies to a workspace's override, so one copied from the
|
|
71
|
+
* bundled prompt keeps the omission and one without markers reads the same in
|
|
72
|
+
* both sessions.
|
|
73
|
+
*/
|
|
74
|
+
export function platformPromptFor(text, session) {
|
|
75
|
+
if (!text.includes(TOP_LEVEL_ONLY_OPEN))
|
|
76
|
+
return text;
|
|
77
|
+
const kept = [];
|
|
78
|
+
/** The lines of the passage being read, or `null` outside one. */
|
|
79
|
+
let passage = null;
|
|
80
|
+
/** How many items of the ordered list being read a left-out passage held. */
|
|
81
|
+
let dropped = 0;
|
|
82
|
+
for (const line of text.split("\n")) {
|
|
83
|
+
const marker = line.trim();
|
|
84
|
+
if (passage === null && marker === TOP_LEVEL_ONLY_OPEN) {
|
|
85
|
+
passage = [];
|
|
86
|
+
continue;
|
|
87
|
+
}
|
|
88
|
+
if (passage !== null) {
|
|
89
|
+
if (marker !== TOP_LEVEL_ONLY_CLOSE) {
|
|
90
|
+
passage.push(line);
|
|
91
|
+
continue;
|
|
92
|
+
}
|
|
93
|
+
if (session === "top-level")
|
|
94
|
+
kept.push(...passage);
|
|
95
|
+
else
|
|
96
|
+
dropped += passage.filter((held) => ORDERED_ITEM.test(held)).length;
|
|
97
|
+
passage = null;
|
|
98
|
+
continue;
|
|
99
|
+
}
|
|
100
|
+
const item = ORDERED_ITEM.exec(line);
|
|
101
|
+
if (item && dropped > 0) {
|
|
102
|
+
kept.push(`${Number(item[1]) - dropped}${line.slice(item[1].length)}`);
|
|
103
|
+
continue;
|
|
104
|
+
}
|
|
105
|
+
// Any other unindented text ends the list a passage cut items from.
|
|
106
|
+
if (line.trim() !== "" && !/^\s/.test(line))
|
|
107
|
+
dropped = 0;
|
|
108
|
+
kept.push(line);
|
|
109
|
+
}
|
|
110
|
+
if (passage !== null)
|
|
111
|
+
kept.push(...passage);
|
|
112
|
+
return kept.join("\n");
|
|
113
|
+
}
|
|
114
|
+
/** The workspace's override when it serves one, else the bundled prompt, as `session` reads it. */
|
|
115
|
+
async function readPlatformPrompt(workspace, backendPath, session) {
|
|
56
116
|
if (backendPath === null)
|
|
57
117
|
return null;
|
|
58
|
-
return (await workspace.readText(backendPath)) || PLATFORM_PROMPT;
|
|
118
|
+
return platformPromptFor((await workspace.readText(backendPath)) || PLATFORM_PROMPT, session);
|
|
59
119
|
}
|
|
60
120
|
/** Load the prompt layers from the backend and merge them. */
|
|
61
121
|
export async function resolveSystemPrompt(workspace, opts) {
|
|
62
122
|
const agentsPath = opts.agentsPath ?? "AGENTS.md";
|
|
63
123
|
const [platform, agents] = await Promise.all([
|
|
64
|
-
readPlatformPrompt(workspace, opts.platformBackendPath),
|
|
124
|
+
readPlatformPrompt(workspace, opts.platformBackendPath, opts.child ? "child" : "top-level"),
|
|
65
125
|
workspace.readText(agentsPath),
|
|
66
126
|
]);
|
|
67
127
|
return buildSystemPrompt({
|
package/dist/core/prompt.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"prompt.js","sourceRoot":"","sources":["../../src/core/prompt.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"prompt.js","sourceRoot":"","sources":["../../src/core/prompt.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsCG;AACH,OAAO,EAAE,eAAe,EAAE,MAAM,gCAAgC,CAAC;AAEjE,OAAO,EAAE,oBAAoB,EAAE,MAAM,uBAAuB,CAAC;AAC7D,OAAO,EAAE,SAAS,EAAsB,MAAM,YAAY,CAAC;AA8C3D,oDAAoD;AACpD,MAAM,UAAU,iBAAiB,CAAC,KAAwB;IACxD,OAAO;QACL,KAAK,CAAC,MAAM,EAAE,IAAI,EAAE;QACpB,KAAK,CAAC,KAAK,EAAE,IAAI,EAAE;QACnB,KAAK,CAAC,QAAQ,EAAE,IAAI,EAAE;QACtB,KAAK,CAAC,SAAS,EAAE,IAAI,EAAE;QACvB,KAAK,CAAC,QAAQ,EAAE,IAAI,EAAE;KACvB;SACE,MAAM,CAAC,OAAO,CAAC;SACf,IAAI,CAAC,MAAM,CAAC,CAAC;AAClB,CAAC;AAED,yFAAyF;AACzF,MAAM,CAAC,MAAM,mBAAmB,GAAG,yBAAyB,CAAC;AAC7D,8EAA8E;AAC9E,MAAM,CAAC,MAAM,oBAAoB,GAAG,0BAA0B,CAAC;AAK/D,MAAM,YAAY,GAAG,gBAAgB,CAAC;AAEtC;;;;;;;;;;;;;GAaG;AACH,MAAM,UAAU,iBAAiB,CAAC,IAAY,EAAE,OAAsB;IACpE,IAAI,C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,CAAC;AACL,CAAC"}
|
|
@@ -51,4 +51,7 @@ export declare class SessionZoneRouter implements BackendProtocolV2 {
|
|
|
51
51
|
glob(pattern: string, path?: string): import("deepagents").MaybePromise<import("deepagents").GlobResult>;
|
|
52
52
|
write(filePath: string, content: string): import("deepagents").MaybePromise<import("deepagents").WriteResult>;
|
|
53
53
|
edit(filePath: string, oldString: string, newString: string, replaceAll?: boolean): import("deepagents").MaybePromise<import("deepagents").EditResult>;
|
|
54
|
+
downloadFiles(paths: string[]): import("deepagents").MaybePromise<import("deepagents").FileDownloadResponse[]>;
|
|
55
|
+
uploadFiles(files: Array<[string, Uint8Array]>): import("deepagents").MaybePromise<import("deepagents").FileUploadResponse[]>;
|
|
56
|
+
delete(filePath: string): import("deepagents").MaybePromise<import("deepagents").DeleteResult>;
|
|
54
57
|
}
|
|
@@ -78,5 +78,14 @@ export class SessionZoneRouter {
|
|
|
78
78
|
edit(filePath, oldString, newString, replaceAll) {
|
|
79
79
|
return this.routed.edit(filePath, oldString, newString, replaceAll);
|
|
80
80
|
}
|
|
81
|
+
downloadFiles(paths) {
|
|
82
|
+
return this.routed.downloadFiles(paths);
|
|
83
|
+
}
|
|
84
|
+
uploadFiles(files) {
|
|
85
|
+
return this.routed.uploadFiles(files);
|
|
86
|
+
}
|
|
87
|
+
delete(filePath) {
|
|
88
|
+
return this.routed.delete(filePath);
|
|
89
|
+
}
|
|
81
90
|
}
|
|
82
91
|
//# sourceMappingURL=session-zone.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"session-zone.js","sourceRoot":"","sources":["../../src/core/session-zone.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AAErD,OAAO,EAAE,YAAY,
|
|
1
|
+
{"version":3,"file":"session-zone.js","sourceRoot":"","sources":["../../src/core/session-zone.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AAErD,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,IAAoB,EAAE,IAAoB;QAC9D,OAAO,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC;IAC/C,CAAC;IAED,IAAI,CAAC,OAAe,EAAE,IAAa;QACjC,OAAO,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC;IACzC,CAAC;IAED,KAAK,CAAC,QAAgB,EAAE,OAAe;QACrC,OAAO,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC;IAC9C,CAAC;IAED,IAAI,CAAC,QAAgB,EAAE,SAAiB,EAAE,SAAiB,EAAE,UAAoB;QAC/E,OAAO,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,QAAQ,EAAE,SAAS,EAAE,SAAS,EAAE,UAAU,CAAC,CAAC;IACtE,CAAC;IAED,aAAa,CAAC,KAAe;QAC3B,OAAO,IAAI,CAAC,MAAM,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;IAC1C,CAAC;IAED,WAAW,CAAC,KAAkC;QAC5C,OAAO,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;IACxC,CAAC;IAED,MAAM,CAAC,QAAgB;QACrB,OAAO,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;IACtC,CAAC;CACF"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { BackendProtocolV2 } from "deepagents";
|
|
2
|
+
/**
|
|
3
|
+
* What a host tool's handler is handed besides its input: the turn's
|
|
4
|
+
* workspace, so a host tool resolves paths exactly as the built-in file tools
|
|
5
|
+
* do instead of rebuilding the mount table beside the SDK.
|
|
6
|
+
*/
|
|
7
|
+
export interface ToolContext {
|
|
8
|
+
/**
|
|
9
|
+
* The turn's workspace: the host's mounts with their read-only posture and the
|
|
10
|
+
* session zone at the root, bound to this session — the same instance
|
|
11
|
+
* `read_file` resolves through. Besides text `read`/`write`, it carries raw
|
|
12
|
+
* bytes (`downloadFiles`/`uploadFiles`) and `delete`; a read-only mount refuses
|
|
13
|
+
* every write, upload and delete.
|
|
14
|
+
*/
|
|
15
|
+
workspace: BackendProtocolV2;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Run `fn` with `context` as the tool context of everything it does. Bound per
|
|
19
|
+
* turn, beside the session binding, by both compositions.
|
|
20
|
+
*/
|
|
21
|
+
export declare function runWithToolContext<T>(context: ToolContext, fn: () => Promise<T>): Promise<T>;
|
|
22
|
+
/** The tool context of the turn in progress, or `undefined` outside one. */
|
|
23
|
+
export declare function currentToolContext(): ToolContext | undefined;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { AsyncLocalStorage } from "node:async_hooks";
|
|
2
|
+
const current = new AsyncLocalStorage();
|
|
3
|
+
/**
|
|
4
|
+
* Run `fn` with `context` as the tool context of everything it does. Bound per
|
|
5
|
+
* turn, beside the session binding, by both compositions.
|
|
6
|
+
*/
|
|
7
|
+
export function runWithToolContext(context, fn) {
|
|
8
|
+
return current.run(context, fn);
|
|
9
|
+
}
|
|
10
|
+
/** The tool context of the turn in progress, or `undefined` outside one. */
|
|
11
|
+
export function currentToolContext() {
|
|
12
|
+
return current.getStore();
|
|
13
|
+
}
|
|
14
|
+
//# sourceMappingURL=tool-context.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tool-context.js","sourceRoot":"","sources":["../../src/core/tool-context.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AAmBrD,MAAM,OAAO,GAAG,IAAI,iBAAiB,EAAe,CAAC;AAErD;;;GAGG;AACH,MAAM,UAAU,kBAAkB,CAAI,OAAoB,EAAE,EAAoB;IAC9E,OAAO,OAAO,CAAC,GAAG,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC;AAClC,CAAC;AAED,4EAA4E;AAC5E,MAAM,UAAU,kBAAkB;IAChC,OAAO,OAAO,CAAC,QAAQ,EAAE,CAAC;AAC5B,CAAC"}
|
|
@@ -30,7 +30,8 @@ export function toolOutputPreview(value) {
|
|
|
30
30
|
}
|
|
31
31
|
/** A concise, single-value hint for a tool call (e.g. its `file_path`), for the CLI. */
|
|
32
32
|
export function toolCallDetail(args) {
|
|
33
|
-
|
|
33
|
+
// A copy is named by where it lands, as a write is.
|
|
34
|
+
for (const key of ["file_path", "destination", "path", "to", "pattern", "command", "url"]) {
|
|
34
35
|
const value = args[key];
|
|
35
36
|
if (typeof value === "string" && value.trim())
|
|
36
37
|
return value;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tool-telemetry.js","sourceRoot":"","sources":["../../src/core/tool-telemetry.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAEvD;;;;;;GAMG;AAEH,oFAAoF;AACpF,MAAM,CAAC,MAAM,uBAAuB,GAAG,IAAI,CAAC;AAE5C,oEAAoE;AACpE,MAAM,UAAU,iBAAiB,CAAC,KAAc;IAC9C,IAAI,IAAY,CAAC;IACjB,IAAI,KAAK,YAAY,WAAW,EAAE,CAAC;QACjC,IAAI,GAAG,OAAO,KAAK,CAAC,OAAO,KAAK,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,OAAO,CAAC,IAAI,EAAE,CAAC;IACjG,CAAC;SAAM,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE,CAAC;QACrC,IAAI,GAAG,KAAK,CAAC;IACf,CAAC;SAAM,CAAC;QACN,IAAI,CAAC;YACH,IAAI,GAAG,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,IAAI,MAAM,CAAC,KAAK,CAAC,CAAC;QAChD,CAAC;QAAC,MAAM,CAAC;YACP,IAAI,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC;QACvB,C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QACvB,CAAC;IACH,CAAC;IACD,MAAM,SAAS,GAAG,IAAI,CAAC,MAAM,GAAG,uBAAuB,CAAC;IACxD,OAAO,EAAE,MAAM,EAAE,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,EAAE,uBAAuB,CAAC,CAAC,CAAC,CAAC,IAAI,EAAE,SAAS,EAAE,CAAC;AAC1F,CAAC;AAED,wFAAwF;AACxF,MAAM,UAAU,cAAc,CAAC,IAA6B;IAC1D,oDAAoD;IACpD,KAAK,MAAM,GAAG,IAAI,CAAC,WAAW,EAAE,aAAa,EAAE,MAAM,EAAE,IAAI,EAAE,SAAS,EAAE,SAAS,EAAE,KAAK,CAAC,EAAE,CAAC;QAC1F,MAAM,KAAK,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC;QACxB,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,CAAC,IAAI,EAAE;YAAE,OAAO,KAAK,CAAC;IAC9D,CAAC;IACD,OAAO,SAAS,CAAC;AACnB,CAAC"}
|
|
@@ -3,7 +3,7 @@ import { classifyWorkspacePath } from "./zones.js";
|
|
|
3
3
|
import type { MountPrefixes } from "./mounts.js";
|
|
4
4
|
/**
|
|
5
5
|
* The workspace's single entry point, wrapping the mount-routing
|
|
6
|
-
* {@link CompositeBackend}. It owns the
|
|
6
|
+
* {@link CompositeBackend}. It owns the things prefix routing cannot do
|
|
7
7
|
* on its own:
|
|
8
8
|
*
|
|
9
9
|
* 1. **Canonicalization.** `CompositeBackend` routes by literal prefix, but
|
|
@@ -28,6 +28,16 @@ import type { MountPrefixes } from "./mounts.js";
|
|
|
28
28
|
* serves searches, and a search addressed at it (the mount or a path inside
|
|
29
29
|
* it) is delegated to its route directly, so the backend's own answer —
|
|
30
30
|
* matches or refusal — reaches the caller verbatim.
|
|
31
|
+
* 5. **Text-only reads.** A `read` whose result is binary — a non-text MIME
|
|
32
|
+
* type, bytes, or NUL in decoded text — is answered with the binary notice
|
|
33
|
+
* (`core/binary-read.ts`) instead of content, so no caller of `read_file`
|
|
34
|
+
* or `tools.readFile` ever gets base64 or decoded bytes. A route's own
|
|
35
|
+
* `{ error }` and `readRaw` are untouched.
|
|
36
|
+
* 6. **Raw-byte transfer and deletion.** `downloadFiles`/`uploadFiles` and
|
|
37
|
+
* `delete` route each path as a read or a write does (exact file mount, else
|
|
38
|
+
* the composite), so the file operations can move bytes no text channel
|
|
39
|
+
* carries and remove a file. A route without transfer throws, as the
|
|
40
|
+
* composite does; a route without deletion answers an error.
|
|
31
41
|
*/
|
|
32
42
|
export interface WorkspaceRouterOptions {
|
|
33
43
|
/** Mount-routing backend: session zone as default route, authored zone mounted. */
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { binaryReadError } from "./binary-read.js";
|
|
1
2
|
import { canonicalizeRelPath } from "./workspace.js";
|
|
2
3
|
import { SESSION_INTERNAL_DIRS, classifyWorkspacePath, mountNameOf } from "./zones.js";
|
|
3
4
|
/** Thrown when a workspace path resolves above the workspace root. */
|
|
@@ -48,6 +49,14 @@ export function createWorkspaceRouter(options) {
|
|
|
48
49
|
// slash, and the mount itself becomes `/`.
|
|
49
50
|
return { backend, name, routePath: target.slice(name.length + 1) || "/" };
|
|
50
51
|
};
|
|
52
|
+
/** A routed read's result, or the binary notice in its place. */
|
|
53
|
+
const textOnly = async (target, pending) => {
|
|
54
|
+
const res = await pending;
|
|
55
|
+
// A v1 file mount answers a bare string; read it as Deep Agents' adapter wraps it.
|
|
56
|
+
const raw = res;
|
|
57
|
+
const binary = binaryReadError(target, typeof raw === "string" ? { content: raw } : res);
|
|
58
|
+
return binary === null ? res : { error: binary };
|
|
59
|
+
};
|
|
51
60
|
/** Hide runtime-internal areas and surface file mounts at `/`. */
|
|
52
61
|
const shapeRoot = async (path, files) => {
|
|
53
62
|
if (path !== "/" || !boundSessionId())
|
|
@@ -83,9 +92,7 @@ export function createWorkspaceRouter(options) {
|
|
|
83
92
|
read(filePath, offset, limit) {
|
|
84
93
|
const target = canonical(filePath);
|
|
85
94
|
const file = fileMount(target);
|
|
86
|
-
return file
|
|
87
|
-
? file.backend.read(file.key, offset, limit)
|
|
88
|
-
: composite.read(target, offset, limit);
|
|
95
|
+
return textOnly(target, file ? file.backend.read(file.key, offset, limit) : composite.read(target, offset, limit));
|
|
89
96
|
},
|
|
90
97
|
readRaw(filePath) {
|
|
91
98
|
const target = canonical(filePath);
|
|
@@ -137,6 +144,43 @@ export function createWorkspaceRouter(options) {
|
|
|
137
144
|
? file.backend.edit(file.key, oldString, newString, replaceAll)
|
|
138
145
|
: composite.edit(target, oldString, newString, replaceAll);
|
|
139
146
|
},
|
|
147
|
+
async delete(filePath) {
|
|
148
|
+
const target = canonical(filePath);
|
|
149
|
+
const file = fileMount(target);
|
|
150
|
+
if (!file)
|
|
151
|
+
return composite.delete(target);
|
|
152
|
+
if (!file.backend.delete)
|
|
153
|
+
return { error: `Cannot delete '${target.slice(1)}': the store serving it cannot delete.` };
|
|
154
|
+
return file.backend.delete(file.key);
|
|
155
|
+
},
|
|
156
|
+
async downloadFiles(paths) {
|
|
157
|
+
const out = [];
|
|
158
|
+
for (const path of paths) {
|
|
159
|
+
const target = canonical(path);
|
|
160
|
+
const file = fileMount(target);
|
|
161
|
+
if (file && !file.backend.downloadFiles)
|
|
162
|
+
throw new Error("Backend does not support downloadFiles");
|
|
163
|
+
const [res] = file
|
|
164
|
+
? await file.backend.downloadFiles([file.key])
|
|
165
|
+
: await composite.downloadFiles([target]);
|
|
166
|
+
out.push({ path: target, content: res?.content ?? null, error: res?.error ?? null });
|
|
167
|
+
}
|
|
168
|
+
return out;
|
|
169
|
+
},
|
|
170
|
+
async uploadFiles(files) {
|
|
171
|
+
const out = [];
|
|
172
|
+
for (const [path, content] of files) {
|
|
173
|
+
const target = canonical(path);
|
|
174
|
+
const file = fileMount(target);
|
|
175
|
+
if (file && !file.backend.uploadFiles)
|
|
176
|
+
throw new Error("Backend does not support uploadFiles");
|
|
177
|
+
const [res] = file
|
|
178
|
+
? await file.backend.uploadFiles([[file.key, content]])
|
|
179
|
+
: await composite.uploadFiles([[target, content]]);
|
|
180
|
+
out.push({ path: target, error: res?.error ?? null });
|
|
181
|
+
}
|
|
182
|
+
return out;
|
|
183
|
+
},
|
|
140
184
|
};
|
|
141
185
|
return router;
|
|
142
186
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"workspace-router.js","sourceRoot":"","sources":["../../src/core/workspace-router.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"workspace-router.js","sourceRoot":"","sources":["../../src/core/workspace-router.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AACnD,OAAO,EAAE,mBAAmB,EAAE,MAAM,gBAAgB,CAAC;AACrD,OAAO,EAAE,qBAAqB,EAAE,qBAAqB,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAgEvF,sEAAsE;AACtE,MAAM,OAAO,wBAAyB,SAAQ,KAAK;IAC5B;IAArB,YAAqB,IAAY;QAC/B,KAAK,CACH,QAAQ,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,wCAAwC;YAClE,4CAA4C,CAC/C,CAAC;QAJiB,SAAI,GAAJ,IAAI,CAAQ;QAK/B,IAAI,CAAC,IAAI,GAAG,0BAA0B,CAAC;IACzC,CAAC;CACF;AAED,MAAM,gBAAgB,GAAwB,IAAI,GAAG,CAAC,qBAAqB,CAAC,CAAC;AAE7E,4EAA4E;AAC5E,SAAS,SAAS,CAAC,IAAY;IAC7B,MAAM,EAAE,IAAI,EAAE,GAAG,EAAE,OAAO,EAAE,GAAG,mBAAmB,CAAC,IAAI,CAAC,CAAC;IACzD,IAAI,OAAO;QAAE,MAAM,IAAI,wBAAwB,CAAC,IAAI,CAAC,CAAC;IACtD,OAAO,IAAI,GAAG,EAAE,CAAC;AACnB,CAAC;AAED,4EAA4E;AAC5E,SAAS,SAAS,CAAC,IAAY;IAC7B,OAAO,mBAAmB,C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AAI,EAAE,MAAM,EAAE,KAAK,EAAE,GAAG,EAAE,KAAK,IAAI,IAAI,EAAE,CAAC,CAAC;YACxD,CAAC;YACD,OAAO,GAAG,CAAC;QACb,CAAC;KACF,CAAC;IAEF,OAAO,MAAM,CAAC;AAChB,CAAC;AAED,8EAA8E;AAC9E,OAAO,EAAE,qBAAqB,EAAE,CAAC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -106,8 +106,10 @@ WorkflowLoadError,
|
|
|
106
106
|
WorkflowDisabledError, } from "./machine/load-spec.js";
|
|
107
107
|
/** A trigger id the machine does not declare. */
|
|
108
108
|
export { UnknownTriggerError } from "./machine/triggers.js";
|
|
109
|
-
/** A host tool wearing a reserved `archmax_` name. */
|
|
109
|
+
/** A host tool wearing a reserved `archmax_` name, or a runtime file operation's name. */
|
|
110
110
|
export { ReservedToolNameError } from "./machine/tool-names.js";
|
|
111
|
+
/** A host path declaration the runtime cannot honour (a built-in tool, an unknown access). */
|
|
112
|
+
export { ToolPathsError } from "./machine/tool-paths.js";
|
|
111
113
|
/** A seeded variable name that is not a legal identifier. */
|
|
112
114
|
export { InvalidVariableNameError } from "./machine/variables.js";
|
|
113
115
|
/** A mount key shadows a session area. */
|
|
@@ -178,6 +180,14 @@ export { PLATFORM_PROMPT_PATH } from "./workflow/paths.js";
|
|
|
178
180
|
export { resolveSystemPrompt } from "./core/prompt.js";
|
|
179
181
|
/** Bind a `name → tool` map in the shape the `tools` option takes. */
|
|
180
182
|
export { toolsFromMap } from "./workflow/agent-tools.js";
|
|
183
|
+
/** One host tool for `toolsFromMap`: its schema, its declared paths, and a handler handed the turn's workspace. */
|
|
184
|
+
export type { AgentToolDescriptor } from "./workflow/agent-tools.js";
|
|
185
|
+
/** What a host tool's handler is handed: the turn's workspace. */
|
|
186
|
+
export type { ToolContext } from "./core/tool-context.js";
|
|
187
|
+
/** A tool's path arguments and how a call uses each — the `toolPaths` option's values. */
|
|
188
|
+
export type { ToolPaths, PathAccess } from "./machine/tool-paths.js";
|
|
189
|
+
/** The `images` option: show the model the images it reads. */
|
|
190
|
+
export type { ImageReadOptions } from "./assembly/image-reads.js";
|
|
181
191
|
/** A message's text, whatever content-block shape it arrived in. */
|
|
182
192
|
export { contentToString } from "./core/messages.js";
|
|
183
193
|
/** Whether a message is the assistant's turn. */
|
package/dist/index.js
CHANGED
|
@@ -54,8 +54,10 @@ WorkflowLoadError,
|
|
|
54
54
|
WorkflowDisabledError, } from "./machine/load-spec.js";
|
|
55
55
|
/** A trigger id the machine does not declare. */
|
|
56
56
|
export { UnknownTriggerError } from "./machine/triggers.js";
|
|
57
|
-
/** A host tool wearing a reserved `archmax_` name. */
|
|
57
|
+
/** A host tool wearing a reserved `archmax_` name, or a runtime file operation's name. */
|
|
58
58
|
export { ReservedToolNameError } from "./machine/tool-names.js";
|
|
59
|
+
/** A host path declaration the runtime cannot honour (a built-in tool, an unknown access). */
|
|
60
|
+
export { ToolPathsError } from "./machine/tool-paths.js";
|
|
59
61
|
/** A seeded variable name that is not a legal identifier. */
|
|
60
62
|
export { InvalidVariableNameError } from "./machine/variables.js";
|
|
61
63
|
/** A mount key shadows a session area. */
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AAEH,iFAAiF;AAEjF;;;;;GAKG;AACH,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAClD,qDAAqD;AACrD,OAAO,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AA6C1C;;;GAGG;AACH,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AACzD,OAAO;AACL,0FAA0F;AAC1F,aAAa;AACb,iEAAiE;AACjE,aAAa,GACd,MAAM,qBAAqB,CAAC;AAqB7B,iFAAiF;AACjF,EAAE;AACF,gFAAgF;AAChF,yDAAyD;AAEzD,OAAO;AAC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