@4fu/arbor-interfaces 2026.1107.0 → 2026.1107.1

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/agent.d.ts CHANGED
@@ -354,7 +354,15 @@ export interface ToolCall {
354
354
  export interface ToolResult {
355
355
  callId: string;
356
356
  ok: boolean;
357
- /** Stable fields, bounded, in the core's error shape when it failed. */
357
+ /**
358
+ * Stable fields, bounded, in the core's error shape when it failed.
359
+ *
360
+ * A refusal carries its own wording here as well as in `error`: the rule, the
361
+ * message and the next action, in the one form the journal records a refusal
362
+ * with. So an embedding that writes its own log passes the result through as
363
+ * it stands instead of reassembling the three parts, and what the record
364
+ * holds is what the caller was handed.
365
+ */
358
366
  content: string;
359
367
  /**
360
368
  * The tool that was called, as the prompt names it. A refusal carries it so
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@4fu/arbor-interfaces",
3
- "version": "2026.1107.0",
3
+ "version": "2026.1107.1",
4
4
  "type": "module",
5
5
  "description": "Every replaceable interface in arbor, and the core's own shapes.",
6
6
  "exports": {
package/plugin.d.ts CHANGED
@@ -16,6 +16,7 @@ import type { EffectExecutor } from "./effects.ts";
16
16
  import type { EnvDraft } from "./environment.ts";
17
17
  import type { JudgeCriteria } from "./judge.ts";
18
18
  import type { Hooks } from "./hooks.ts";
19
+ import type { WindowRef } from "./refs.ts";
19
20
  import type { TaskSource } from "./task.ts";
20
21
  import type { ExternalTool, ExternalToolSource } from "./tools.ts";
21
22
  /** Connections to the outside world. */
@@ -30,8 +31,17 @@ export interface PromptSection {
30
31
  tag: string;
31
32
  /** The block kinds its inputs use, which the renderer maps to text. */
32
33
  blocks: readonly BlockKindSpec[];
33
- /** Its content, as blocks. The plugin hands blocks, never finished text. */
34
- content(): readonly Block[] | Promise<readonly Block[]>;
34
+ /**
35
+ * Its content, as blocks. The plugin hands blocks, never finished text.
36
+ *
37
+ * `window` is the window the section is rendered for, which the host names on
38
+ * every render: the epoch a window opens with, a delta of the changed lines
39
+ * while it runs. A section whose content is the same for every window ignores
40
+ * it; one that serves several sessions - one workspace per session, each
41
+ * naming the window it serves - answers for that window
42
+ * (docs/prompting.md#plugin-sections-that-change).
43
+ */
44
+ content(window?: WindowRef): readonly Block[] | Promise<readonly Block[]>;
35
45
  /**
36
46
  * The fixed strings its own blocks write, merged into the host's text table.
37
47
  * A plugin names no secret here, and writes no prompt text of its own: its
@@ -47,6 +57,16 @@ export interface PromptSection {
47
57
  * never changes once the host has rendered it.
48
58
  */
49
59
  revision?(): string | number | Promise<string | number>;
60
+ /**
61
+ * True when this section's content differs from window to window - a section
62
+ * that serves several sessions, one workspace per session, naming the window
63
+ * it serves. The host then renders it for each window instead of freezing it
64
+ * with the epoch, and that window's prefix is its own where this section is
65
+ * concerned; every other window still shares the epoch's prefix
66
+ * (docs/prompting.md#plugin-sections-that-change). Absent, like `false`: the
67
+ * section says the same thing to every window and is frozen with the epoch.
68
+ */
69
+ perWindow?: boolean;
50
70
  /**
51
71
  * True when the section is material from outside the framework - a third
52
72
  * party's prompt text, such as the sections a DeepSeek Harness plugin
package/workspace.d.ts CHANGED
@@ -130,13 +130,30 @@ export interface Workspace {
130
130
  mount(ref: WorkspaceRef): Promise<WorkspaceMount>;
131
131
  /** The workspace's size and file count, for a quota a deployment sets. */
132
132
  quota(workspace: WorkspaceRef): Promise<WorkspaceQuota>;
133
- /** Reclaim the workspace after the retention period. */
133
+ /**
134
+ * Reclaim the workspace after the retention period.
135
+ *
136
+ * An implementation whose workspace is a directory somebody else owns - a
137
+ * host's own project directory, which nothing here may remove - has no honest
138
+ * answer to give here: it says so with `reclaimable`, below, and the host
139
+ * never asks.
140
+ */
134
141
  reclaim(workspace: WorkspaceRef): Promise<void>;
142
+ /**
143
+ * Whether this implementation reclaims a workspace at all. `false` for one
144
+ * whose directory belongs to somebody else - the user's own project, which
145
+ * nothing here may remove - and the host then neither asks `refOf` for a ref
146
+ * to reclaim nor arms a retention deadline, so nothing is reclaimed and no
147
+ * failure is recorded either (docs/workspaces.md#lifecycle). Absent, like
148
+ * `true`: the implementation owns what it created and `reclaim` removes it.
149
+ */
150
+ reclaimable?(): boolean | Promise<boolean>;
135
151
  /**
136
152
  * The workspace a window's chain already has, or `undefined` when it has
137
153
  * none - the window never touched files, or the directory was reclaimed. The
138
154
  * host asks for it to reclaim a chain's directory once its last window has
139
- * ended and the retention period has passed, which a restart has to survive
155
+ * ended and the retention period has passed - of an implementation that
156
+ * reclaims at all (`reclaimable`, above) - which a restart has to survive
140
157
  * (docs/workspaces.md#lifecycle).
141
158
  */
142
159
  refOf(window: WindowRef): Promise<WorkspaceRef | undefined>;
@@ -182,6 +199,11 @@ export interface Workspace {
182
199
  * method the model follows - how this implementation wants files changed -
183
200
  * rendered in its own tag, so each implementation owns its own prompt text and
184
201
  * a host that fell back to another implementation shows that one's instead.
202
+ *
203
+ * The host registers the section once and renders it per window, so a section
204
+ * that serves several sessions - one workspace per session, each naming the
205
+ * window it serves - answers for the window it is rendered for through
206
+ * `content(window)` (docs/prompting.md#plugin-sections-that-change).
185
207
  */
186
208
  promptSection?(table: TextTable): PromptSection;
187
209
  /**