@hachej/boring-agent 0.1.104 → 0.1.105

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.
@@ -5,7 +5,7 @@ import {
5
5
  mergePiPackageSources,
6
6
  projectSkillResourceLocations,
7
7
  withPiHarnessDefaults
8
- } from "./chunk-I7KFNGB4.js";
8
+ } from "./chunk-F2OJI2LX.js";
9
9
  import "./chunk-4IQ4HHBG.js";
10
10
  import "./chunk-K25PK5EC.js";
11
11
  export {
@@ -157,6 +157,13 @@ declare function parseSlashCommand(text: string): ParsedCommand | null;
157
157
  type SlashCommandHandlerResult = string | void | {
158
158
  message?: string;
159
159
  preserveDraft?: boolean;
160
+ /**
161
+ * Result text the agent must see. When set, the command's outcome is also
162
+ * submitted as an expanded-text turn, so it lands in the model's context the
163
+ * same way a skill command's expansion does — a browser-only notice is
164
+ * invisible to the agent. Keep it a short structured summary, not a dump.
165
+ */
166
+ modelMessage?: string;
160
167
  };
161
168
  type SlashCommandHandler = (args: string, ctx: SlashCommandContext) => SlashCommandHandlerResult | Promise<SlashCommandHandlerResult>;
162
169
  type SlashCommandClickBehavior = 'execute' | 'insert' | 'disabled';
@@ -280,6 +280,14 @@ function createCommandRegistry(initial) {
280
280
  }
281
281
 
282
282
  // src/front/slashCommands/builtins.ts
283
+ var MAX_RELOAD_MODEL_MESSAGE = 2e3;
284
+ function reloadResultForModel(message) {
285
+ const body = message.trim() || "No result reported.";
286
+ const bounded = body.length > MAX_RELOAD_MODEL_MESSAGE ? `${body.slice(0, MAX_RELOAD_MODEL_MESSAGE)}
287
+ \u2026 (truncated)` : body;
288
+ return `/reload result:
289
+ ${bounded}`;
290
+ }
283
291
  var builtinCommands = [
284
292
  {
285
293
  name: "reset",
@@ -301,9 +309,9 @@ var builtinCommands = [
301
309
  name: "reload",
302
310
  description: "Reload agent plugins",
303
311
  clickBehavior: "execute",
304
- handler(_, ctx) {
305
- if (ctx.pluginUpdate) return ctx.pluginUpdate.run();
306
- return ctx.reloadAgentPlugins();
312
+ async handler(_, ctx) {
313
+ const message = ctx.pluginUpdate ? await ctx.pluginUpdate.run() : await ctx.reloadAgentPlugins();
314
+ return { message, modelMessage: reloadResultForModel(message) };
307
315
  }
308
316
  },
309
317
  {
@@ -2365,7 +2373,7 @@ var PiComposerPolicyController = class {
2365
2373
  if (command?.kind === "skill") {
2366
2374
  return this.submitExpandedText(skillCommandText(parsed.name, parsed.args), source, false);
2367
2375
  }
2368
- if (command) return this.runLocalCommand(parsed.name, parsed.args);
2376
+ if (command) return this.runLocalCommand(parsed.name, parsed.args, source);
2369
2377
  }
2370
2378
  if (isPiChatBusy(this.options.session.getState().status) && files.length > 0) {
2371
2379
  return this.fromQueueResult(await this.queueController.submit({ text, attachments: this.toAttachmentPayloads(files) }));
@@ -2408,7 +2416,7 @@ var PiComposerPolicyController = class {
2408
2416
  ...this.options.thinkingControl ? { thinkingLevel: this.options.thinkingLevel ?? DEFAULT_THINKING } : {}
2409
2417
  }));
2410
2418
  }
2411
- async runLocalCommand(commandName, args) {
2419
+ async runLocalCommand(commandName, args, source) {
2412
2420
  const command = this.options.registry.get(commandName);
2413
2421
  if (isPiChatBusy(this.options.session.getState().status) && command?.allowWhileBusy?.(args) !== true) {
2414
2422
  return this.block("busy-slash-command", "Slash commands are not queued while the agent is responding.");
@@ -2417,6 +2425,10 @@ var PiComposerPolicyController = class {
2417
2425
  const message = typeof result === "string" ? result : result && typeof result === "object" ? result.message : void 0;
2418
2426
  const preserveDraft = Boolean(result && typeof result === "object" && result.preserveDraft === true);
2419
2427
  if (message) this.options.onCommandResult?.(message);
2428
+ const modelMessage = result && typeof result === "object" ? result.modelMessage?.trim() : void 0;
2429
+ if (modelMessage) {
2430
+ return await this.submitExpandedText(modelMessage, source, false);
2431
+ }
2420
2432
  return { type: "command", command: commandName, ...message ? { result: message } : {}, preserveDraft };
2421
2433
  }
2422
2434
  async runBeforeSubmit(draft, files, source) {
@@ -70,6 +70,9 @@
70
70
  .collapse {
71
71
  visibility: collapse;
72
72
  }
73
+ .invisible {
74
+ visibility: hidden;
75
+ }
73
76
  .visible {
74
77
  visibility: visible;
75
78
  }
@@ -2597,8 +2600,11 @@
2597
2600
  .top-4 {
2598
2601
  top: calc(var(--spacing) * 4);
2599
2602
  }
2600
- .top-\[50\%\] {
2601
- top: 50%;
2603
+ .top-\[calc\(1rem\+env\(safe-area-inset-top\,0px\)\)\] {
2604
+ top: calc(1rem + env(safe-area-inset-top,0px));
2605
+ }
2606
+ .top-\[max\(1rem\,env\(safe-area-inset-top\,0px\)\)\] {
2607
+ top: max(1rem, env(safe-area-inset-top,0px));
2602
2608
  }
2603
2609
  .right-0 {
2604
2610
  right: 0px;
@@ -2609,11 +2615,14 @@
2609
2615
  .right-4 {
2610
2616
  right: calc(var(--spacing) * 4);
2611
2617
  }
2618
+ .right-\[calc\(1rem\+env\(safe-area-inset-right\,0px\)\)\] {
2619
+ right: calc(1rem + env(safe-area-inset-right,0px));
2620
+ }
2612
2621
  .bottom-0 {
2613
2622
  bottom: 0px;
2614
2623
  }
2615
- .bottom-4 {
2616
- bottom: calc(var(--spacing) * 4);
2624
+ .bottom-\[calc\(1rem\+env\(safe-area-inset-bottom\,0px\)\)\] {
2625
+ bottom: calc(1rem + env(safe-area-inset-bottom,0px));
2617
2626
  }
2618
2627
  .left-0 {
2619
2628
  left: 0px;
@@ -2621,12 +2630,12 @@
2621
2630
  .left-2 {
2622
2631
  left: calc(var(--spacing) * 2);
2623
2632
  }
2624
- .left-4 {
2625
- left: calc(var(--spacing) * 4);
2626
- }
2627
2633
  .left-\[50\%\] {
2628
2634
  left: 50%;
2629
2635
  }
2636
+ .left-\[calc\(1rem\+env\(safe-area-inset-left\,0px\)\)\] {
2637
+ left: calc(1rem + env(safe-area-inset-left,0px));
2638
+ }
2630
2639
  .z-50 {
2631
2640
  z-index: 50;
2632
2641
  }
@@ -2766,6 +2775,9 @@
2766
2775
  .h-10 {
2767
2776
  height: calc(var(--spacing) * 10);
2768
2777
  }
2778
+ .h-\[100dvh\] {
2779
+ height: 100dvh;
2780
+ }
2769
2781
  .h-\[calc\(100\%-1px\)\] {
2770
2782
  height: calc(100% - 1px);
2771
2783
  }
@@ -2793,6 +2805,9 @@
2793
2805
  .max-h-\[300px\] {
2794
2806
  max-height: 300px;
2795
2807
  }
2808
+ .max-h-\[calc\(100dvh-var\(--keyboard-inset\,0px\)\)\] {
2809
+ max-height: calc(100dvh - var(--keyboard-inset,0px));
2810
+ }
2796
2811
  .min-h-0 {
2797
2812
  min-height: 0px;
2798
2813
  }
@@ -2896,8 +2911,8 @@
2896
2911
  --tw-translate-x: -50%;
2897
2912
  translate: var(--tw-translate-x) var(--tw-translate-y);
2898
2913
  }
2899
- .translate-y-\[-50\%\] {
2900
- --tw-translate-y: -50%;
2914
+ .translate-y-0 {
2915
+ --tw-translate-y: 0px;
2901
2916
  translate: var(--tw-translate-x) var(--tw-translate-y);
2902
2917
  }
2903
2918
  .translate-y-\[calc\(-50\%_-_2px\)\] {
@@ -3402,6 +3417,9 @@
3402
3417
  .pt-3 {
3403
3418
  padding-top: calc(var(--spacing) * 3);
3404
3419
  }
3420
+ .pt-\[env\(safe-area-inset-top\,0px\)\] {
3421
+ padding-top: env(safe-area-inset-top,0px);
3422
+ }
3405
3423
  .pr-2 {
3406
3424
  padding-right: calc(var(--spacing) * 2);
3407
3425
  }
@@ -3411,12 +3429,21 @@
3411
3429
  .pr-8 {
3412
3430
  padding-right: calc(var(--spacing) * 8);
3413
3431
  }
3432
+ .pr-\[env\(safe-area-inset-right\,0px\)\] {
3433
+ padding-right: env(safe-area-inset-right,0px);
3434
+ }
3414
3435
  .pb-2 {
3415
3436
  padding-bottom: calc(var(--spacing) * 2);
3416
3437
  }
3417
3438
  .pb-3 {
3418
3439
  padding-bottom: calc(var(--spacing) * 3);
3419
3440
  }
3441
+ .pb-\[calc\(1rem\+env\(safe-area-inset-bottom\,0px\)\)\] {
3442
+ padding-bottom: calc(1rem + env(safe-area-inset-bottom,0px));
3443
+ }
3444
+ .pb-\[env\(safe-area-inset-bottom\,0px\)\] {
3445
+ padding-bottom: env(safe-area-inset-bottom,0px);
3446
+ }
3420
3447
  .pl-2 {
3421
3448
  padding-left: calc(var(--spacing) * 2);
3422
3449
  }
@@ -3426,6 +3453,9 @@
3426
3453
  .pl-8 {
3427
3454
  padding-left: calc(var(--spacing) * 8);
3428
3455
  }
3456
+ .pl-\[env\(safe-area-inset-left\,0px\)\] {
3457
+ padding-left: env(safe-area-inset-left,0px);
3458
+ }
3429
3459
  .text-center {
3430
3460
  text-align: center;
3431
3461
  }
@@ -4225,12 +4255,19 @@
4225
4255
  border-radius: 0;
4226
4256
  }
4227
4257
  @media (width >= 40rem) {
4258
+ .sm\:top-\[50\%\] {
4259
+ top: 50%;
4260
+ }
4228
4261
  .sm\:max-w-lg {
4229
4262
  max-width: var(--container-lg);
4230
4263
  }
4231
4264
  .sm\:max-w-sm {
4232
4265
  max-width: var(--container-sm);
4233
4266
  }
4267
+ .sm\:translate-y-\[-50\%\] {
4268
+ --tw-translate-y: -50%;
4269
+ translate: var(--tw-translate-x) var(--tw-translate-y);
4270
+ }
4234
4271
  .sm\:flex-row {
4235
4272
  flex-direction: row;
4236
4273
  }
@@ -4798,12 +4835,12 @@
4798
4835
  --secondary-foreground: oklch(0.985 0 0);
4799
4836
  --muted: oklch(0.269 0.006 285.885);
4800
4837
  --muted-foreground: oklch(0.708 0.01 286.073);
4801
- --accent: oklch(0.62 0.14 65);
4802
- --accent-foreground: oklch(0.12 0.004 285.823);
4838
+ --accent: oklch(0.72 0.13 65);
4839
+ --accent-foreground: oklch(0.18 0.02 65);
4803
4840
  --accent-soft: oklch(0.28 0.04 65);
4804
4841
  --border: oklch(0.269 0.006 285.885);
4805
4842
  --input: oklch(0.269 0.006 285.885);
4806
- --ring: oklch(0.62 0.14 65);
4843
+ --ring: oklch(0.72 0.13 65);
4807
4844
  --canvas: oklch(0.12 0.004 285.823);
4808
4845
  }
4809
4846
  [data-boring-agent] {
@@ -4890,12 +4927,12 @@
4890
4927
  --secondary-foreground: var(--boring-secondary-foreground, oklch(0.985 0 0));
4891
4928
  --muted: var(--boring-muted, oklch(0.269 0.006 285.885));
4892
4929
  --muted-foreground: var(--boring-muted-foreground, oklch(0.708 0.01 286.073));
4893
- --accent: var(--boring-accent, oklch(0.62 0.14 65));
4894
- --accent-foreground: var(--boring-accent-foreground, oklch(0.12 0.004 285.823));
4930
+ --accent: var(--boring-accent, oklch(0.72 0.13 65));
4931
+ --accent-foreground: var(--boring-accent-foreground, oklch(0.18 0.02 65));
4895
4932
  --accent-soft: var(--boring-accent-soft, oklch(0.28 0.04 65));
4896
4933
  --border: var(--boring-border, oklch(0.269 0.006 285.885));
4897
4934
  --input: var(--boring-input, oklch(0.269 0.006 285.885));
4898
- --ring: var(--boring-ring, oklch(0.62 0.14 65));
4935
+ --ring: var(--boring-ring, oklch(0.72 0.13 65));
4899
4936
  --canvas: var(--boring-canvas, oklch(0.12 0.004 285.823));
4900
4937
  --surface-chat: var(--boring-surface-chat, oklch(0.165 0.004 285.823));
4901
4938
  --boring-agent-user-bg: oklch(from var(--accent) l c h / 0.16);
@@ -1,5 +1,5 @@
1
1
  import { A as AgentGateway, a as AuthorizedAgentScope, b as AgentSessionRef, c as AgentSessionActivity } from '../../../errors-DH7C01Pm.js';
2
- import { A as AgentGatewayEffect } from '../../../types-B1xDlBSo.js';
2
+ import { A as AgentGatewayEffect } from '../../../types-BTsdaAQ2.js';
3
3
  import '../../../piChatEvent-iNSXiFQq.js';
4
4
  import 'zod';
5
5
  import 'fastify';
@@ -1,5 +1,5 @@
1
- import { P as ProvisionWorkspaceRuntimeOptions, W as WorkspaceProvisioningResult, a as PiPackageSource, R as RuntimeModeAdapter, b as RuntimeModeId, B as BuiltinRuntimeModeId, c as AgentRuntimeHostOperations, d as RuntimeBashStrategy, e as RuntimeFilesystemStrategy, M as ModeContext, f as WorkspaceProvisioningAdapter, g as AgentInstructionFileRef, C as ConfiguredAgentHostAgentSpec, h as AgentHostAgentSpec, i as RuntimeBundle, j as PiHarnessOptions, k as AgentMeteringSink, l as RuntimeFilesystemBinding, m as CreatedAgentHost, n as MeteringErrorLogger, o as ReadyStatusTracker, p as CreateAgentHostOptions, q as CompiledAgentHostAgentSpec, r as AgentRequestLedger, s as AgentEffectAdmission, t as AuthorizedEnvironmentIntent, u as AgentHostEnvironmentScope, v as ResolvedAgentRuntimeScope, w as AgentRequestKey, x as AgentRequestLedgerPrepareResult, y as AgentRequestFailure, z as AgentRequestLedgerRecord, D as AgentFleetCompiler, E as AgentRequestTarget, F as RuntimeFilesystemAccessDecision } from '../types-B1xDlBSo.js';
2
- export { A as AgentGatewayEffect, G as AgentHostDescription, H as AgentHostDirectProjectionOptions, I as AgentHostDispatcherRunInput, J as AgentHostEnvironmentLease, K as AgentHostHandle, L as LegacyDefaultAgentHostSpec, N as MeteringReleaseInput, O as MeteringReleaseReason, Q as MeteringReservationResult, S as MeteringReserveInput, T as MeteringRunKind, U as MeteringRunScope, V as MeteringRunStatus, X as MeteringSettleInput, Y as MeteringUsage, Z as MeteringUsageInput, _ as PI_PACKAGE_RESOURCE_FILTERS, $ as PiExtensionFactory, a0 as PluginSkillSource, a1 as ResolvedEnvironmentScope, a2 as RuntimeFilesystemBindingOperations, a3 as RuntimeNodePackageSpec, a4 as RuntimeProvisioningContribution, a5 as RuntimePythonSpec, a6 as RuntimeTemplateContribution, a7 as WorkspaceProvisioningExecResult, a8 as compactPiPackages, a9 as mergePiPackageSources, aa as normalizeMeteringUsage, ab as piPackageSourceKey } from '../types-B1xDlBSo.js';
1
+ import { P as ProvisionWorkspaceRuntimeOptions, W as WorkspaceProvisioningResult, a as PiPackageSource, R as RuntimeModeAdapter, b as RuntimeModeId, B as BuiltinRuntimeModeId, c as AgentRuntimeHostOperations, d as RuntimeBashStrategy, e as RuntimeFilesystemStrategy, M as ModeContext, f as WorkspaceProvisioningAdapter, g as AgentInstructionSource, C as ConfiguredAgentHostAgentSpec, h as AgentInstructionFileRef, i as AgentHostAgentSpec, j as RuntimeBundle, k as PiHarnessOptions, l as AgentMeteringSink, m as RuntimeFilesystemBinding, n as CreatedAgentHost, o as MeteringErrorLogger, p as ReadyStatusTracker, q as CreateAgentHostOptions, r as CompiledAgentHostAgentSpec, s as AgentRequestLedger, t as AgentEffectAdmission, u as AuthorizedEnvironmentIntent, v as AgentHostEnvironmentScope, w as ResolvedAgentRuntimeScope, x as AgentRequestKey, y as AgentRequestLedgerPrepareResult, z as AgentRequestFailure, D as AgentRequestLedgerRecord, E as AgentFleetCompiler, F as AgentRequestTarget, G as RuntimeFilesystemAccessDecision } from '../types-BTsdaAQ2.js';
2
+ export { A as AgentGatewayEffect, H as AgentHostDescription, I as AgentHostDirectProjectionOptions, J as AgentHostDispatcherRunInput, K as AgentHostEnvironmentLease, L as AgentHostHandle, N as LegacyDefaultAgentHostSpec, O as MeteringReleaseInput, Q as MeteringReleaseReason, S as MeteringReservationResult, T as MeteringReserveInput, U as MeteringRunKind, V as MeteringRunScope, X as MeteringRunStatus, Y as MeteringSettleInput, Z as MeteringUsage, _ as MeteringUsageInput, $ as PI_PACKAGE_RESOURCE_FILTERS, a0 as PiExtensionFactory, a1 as PluginSkillSource, a2 as ResolvedEnvironmentScope, a3 as RuntimeFilesystemBindingOperations, a4 as RuntimeNodePackageSpec, a5 as RuntimeProvisioningContribution, a6 as RuntimePythonSpec, a7 as RuntimeTemplateContribution, a8 as WorkspaceProvisioningExecResult, a9 as compactPiPackages, aa as mergePiPackageSources, ab as normalizeMeteringUsage, ac as piPackageSourceKey } from '../types-BTsdaAQ2.js';
3
3
  import { d as ExecOptions, a as ExecResult, W as WorkspaceChangeEvent, b as Workspace, c as Sandbox } from '../sandbox-BMhut3kh.js';
4
4
  export { h as RuntimeFilesystemCapability } from '../sandbox-BMhut3kh.js';
5
5
  import { b as RemoteWorkerHealthResponse, R as RemoteWorkerWorkspaceOp, a as RemoteWorkerWorkspaceResult, c as RemoteWorkerExecRequest } from '../middleware-CaAEXpi5.js';
@@ -299,10 +299,11 @@ interface TrustedAgentInstructionAppendix {
299
299
  interface TrustedAuthoredAgentPolicy {
300
300
  readonly fallbackLabel?: string;
301
301
  /**
302
- * Workspace-relative authored instruction sources for this agent, supplied
303
- * by the trusted composer that actually knows where they live.
302
+ * Authored instruction sources for this agent as host absolute paths,
303
+ * supplied by the trusted composer that actually knows where they live.
304
+ * Addressing them against a served workspace root is a per-request concern.
304
305
  */
305
- readonly instructionFiles?: readonly AgentInstructionFileRef[];
306
+ readonly instructionSources?: readonly AgentInstructionSource[];
306
307
  readonly instructionAppendices?: readonly TrustedAgentInstructionAppendix[];
307
308
  readonly plugins?: readonly {
308
309
  readonly name: string;
@@ -366,22 +367,6 @@ interface DiscoveredAgentPackageDescriptor {
366
367
  interface LoadConfiguredAgentFleetOptions {
367
368
  /** Plugin-manager scan descriptors injected by the workspace/CLI boot layer. */
368
369
  readonly discoveredPackages: readonly DiscoveredAgentPackageDescriptor[];
369
- /**
370
- * Root of the workspace the `user` filesystem serves, or `null` when the
371
- * host resolves a DIFFERENT root per request (core, the CLI hub) and so has
372
- * no single one at fleet-composition time.
373
- *
374
- * Required, because published `instructionFiles` are addressed relative to
375
- * it and only the caller knows it. It is NOT derivable from the discovered
376
- * package roots: a fleet can be composed from packages that live outside
377
- * the workspace root, and guessing produced well-formed paths that
378
- * resolved to nothing.
379
- *
380
- * `null` is not a soft option — it makes the host structurally unable to
381
- * publish a ref it cannot guarantee, which is the honest answer for
382
- * per-workspace roots.
383
- */
384
- readonly workspaceRoot: string | null;
385
370
  /** Path to `.agents/factory/fleet.yaml`. */
386
371
  readonly fleetConfigPath: string;
387
372
  /** Path to `.agents/factory/policy.yaml` (read for `models.seats` tiers). */
@@ -394,7 +379,7 @@ interface LoadConfiguredAgentFleetOptions {
394
379
  /** Overridable for tests; defaults to `process.env`. */
395
380
  readonly env?: NodeJS.ProcessEnv;
396
381
  }
397
- type FleetLoaderDiagnosticCode = Extract<ErrorCode, 'AGENT_FLEET_SEAT_PERSONA_INVALID' | 'AGENT_FLEET_SEAT_SKILL_DIGEST_MISMATCH' | 'AGENT_DEFINITION_ID_CONFLICT' | 'AGENT_DEFINITION_UNSEATED' | 'AGENT_FLEET_SEAT_INSTRUCTIONS_PATH_UNPUBLISHABLE'>;
382
+ type FleetLoaderDiagnosticCode = Extract<ErrorCode, 'AGENT_FLEET_SEAT_PERSONA_INVALID' | 'AGENT_FLEET_SEAT_SKILL_DIGEST_MISMATCH' | 'AGENT_DEFINITION_ID_CONFLICT' | 'AGENT_DEFINITION_UNSEATED'>;
398
383
  interface FleetLoaderDiagnostic {
399
384
  readonly seat?: string;
400
385
  readonly agentTypeId: string;
@@ -430,6 +415,40 @@ declare class FleetConfigError extends Error {
430
415
  */
431
416
  declare function loadConfiguredAgentFleet(options: LoadConfiguredAgentFleetOptions): Promise<LoadConfiguredAgentFleetResult>;
432
417
 
418
+ type InstructionRefWithholdingCode = Extract<ErrorCode, 'AGENT_FLEET_SEAT_INSTRUCTIONS_PATH_UNPUBLISHABLE'>;
419
+ interface WithheldInstructionRef {
420
+ readonly code: InstructionRefWithholdingCode;
421
+ /** Host absolute path of the authored source that could not be addressed. */
422
+ readonly absolutePath: string;
423
+ readonly message: string;
424
+ }
425
+ interface ResolvedInstructionFileRefs {
426
+ readonly refs: readonly AgentInstructionFileRef[];
427
+ readonly withheld: readonly WithheldInstructionRef[];
428
+ }
429
+ /**
430
+ * Addresses authored instruction sources against the workspace root a SINGLE
431
+ * request is served from, which is the only moment a multi-workspace host
432
+ * (the CLI hub, core) knows one — composition time sees a fleet shared by
433
+ * every workspace (gh-1189).
434
+ *
435
+ * Publication is deterministic and fails closed: a ref is emitted only when
436
+ * the source canonically resolves inside the served root AND composes a path
437
+ * the client-side openable-resource guard accepts. Anything else is withheld
438
+ * with the stable `AGENT_FLEET_SEAT_INSTRUCTIONS_PATH_UNPUBLISHABLE` code, so
439
+ * the invariant from #1176 holds: a rendered link always resolves.
440
+ *
441
+ * Canonicalization (not lexical containment) on BOTH sides is the point:
442
+ * dotfile managers make a symlinked `.agents` ordinary, and a lexical check
443
+ * would call `~/project/.agents -> ~/dotfiles/agents` "inside the workspace"
444
+ * and publish a link the `user` filesystem cannot open.
445
+ */
446
+ declare function resolveAgentInstructionFileRefs(input: {
447
+ readonly sources: readonly AgentInstructionSource[] | undefined;
448
+ /** Root the `user` filesystem serves for THIS request, when the host resolved one. */
449
+ readonly workspaceRoot: string | null | undefined;
450
+ }): Promise<ResolvedInstructionFileRefs>;
451
+
433
452
  declare const LEGACY_DEFAULT_AGENT_FLEET: readonly AgentHostAgentSpec[];
434
453
  interface ResolveDefaultAgentFleetOptions {
435
454
  /**
@@ -439,16 +458,6 @@ interface ResolveDefaultAgentFleetOptions {
439
458
  readonly repositoryRoot?: string;
440
459
  /** Asset-manager scan results supplied by the workspace/CLI boot layer. */
441
460
  readonly discoveredPackages?: readonly DiscoveredAgentPackageDescriptor[];
442
- /**
443
- * Root of the workspace the `user` filesystem serves, or `null` when the
444
- * host resolves one per request. Explicit rather than defaulted, because it
445
- * is a DIFFERENT root from `repositoryRoot` in every multi-workspace host —
446
- * the two only coincide in the single-root dogfood/playground case.
447
- * Personas outside it are not published as openable instruction refs (see
448
- * `loadConfiguredAgentFleet`): a well-formed path the workbench cannot open
449
- * is worse than no link.
450
- */
451
- readonly workspaceRoot: string | null;
452
461
  /** Overridable for tests; defaults to `process.env`. */
453
462
  readonly env?: NodeJS.ProcessEnv;
454
463
  }
@@ -1106,7 +1115,7 @@ interface AgentHostRuntime {
1106
1115
  readonly effectAdmission: AgentEffectAdmission;
1107
1116
  readonly activity: AgentSessionActivityIndex;
1108
1117
  readonly shutdownGraceMs: number;
1109
- listSessionSummaries(agentTypeId: string, scope: AuthorizedAgentScope, claim: VerifiedAgentScopeClaim): Promise<readonly SessionSummary[]>;
1118
+ listSessionSummaries(agentTypeId: string, scope: AuthorizedAgentScope, claim: VerifiedAgentScopeClaim, options?: SessionListOptions): Promise<readonly SessionSummary[]>;
1110
1119
  isDraining(): boolean;
1111
1120
  assertOpen(): void;
1112
1121
  verify(scope: AuthorizedAgentScope): Promise<VerifiedAgentScopeClaim>;
@@ -1477,4 +1486,4 @@ declare function createInMemoryCredentialBackendV1(entries: readonly InMemoryCre
1477
1486
 
1478
1487
  declare function withResolvedCredential<T>(resolver: WorkspaceCredentialResolverV1, workspace: AuthorizedWorkspaceCredentialScopeV1, ref: ProviderCredentialRefV1, fn: (lease: ResolvedCredentialLeaseV1) => T | Promise<T>): Promise<T>;
1479
1488
 
1480
- export { AgentDirectoryCompilerError, type AgentDirectoryCompilerErrorCode, type AgentDirectoryCompilerPublicErrorCode, AgentEffectAdmission, AgentFleetCompilationError, AgentFleetCompilationErrorCode, AgentFleetCompiler, type AgentFleetPluginBindingContract, AgentHarnessFactory, AgentHostAgentSpec, type AgentHostEnvironmentHttpProjectionOptions, AgentHostEnvironmentScope, AgentInstructionFileRef, AgentMeteringSink, AgentRequestKey, AgentRequestLedger, AgentRequestLedgerPrepareResult, AgentRequestLedgerRecord, AgentRuntimeHostOperations, AuthoredAgentMaterializationError, type AuthoredAgentMaterializationErrorCode, type AuthoredAgentSourceV1, AuthorizedAgentScope, AuthorizedEnvironmentIntent, type AuthorizedSessionRunDetails, BuiltinRuntimeModeId, CompiledAgentHostAgentSpec, ConfiguredAgentHostAgentSpec, CreateAgentHostOptions, type CreateConfiguredAgentHostAgentSpecInput, type CreateStandaloneAgentHostAppOptions, type CreateValidatingAgentFleetCompilerOptions, CreatedAgentHost, type CredentialStoreBackendV1, DEFAULT_PI_RESOURCE_DIGEST_LIMITS, DEFAULT_READONLY_WORKSPACE_PATHS, type DeploymentSnapshotProvider, type DeploymentSnapshotRecipe, type DeploymentSnapshotResult, type DeploymentSnapshotStatus, type DiscoveredAgentPackageDescriptor, EmbeddedAgentGateway, type FakeAuthorityVerifierGrantV1, FleetConfigError, type FleetConfigErrorCode, type FleetLoaderDiagnostic, type FleetLoaderDiagnosticCode, type FleetSeatBinding, type FleetSkillBinding, type HostSideCredentialResolverOptionsV1, InMemoryAgentRequestLedger, type InMemoryCredentialBackendEntryV1, LEGACY_DEFAULT_AGENT_FLEET, type LoadConfiguredAgentFleetOptions, type LoadConfiguredAgentFleetResult, MANAGED_AGENT_MCP_DELIVERY_RULE, MANAGED_AGENT_MCP_ORIGIN_SURFACE, type ManagedAgentArtifact, type ManagedAgentArtifactCandidate, type ManagedAgentArtifactRef, type ManagedAgentBoundRunnerWorkspace, type ManagedAgentCollectArtifactsInput, type ManagedAgentDelegateInput, type ManagedAgentDelegateProgress, type ManagedAgentDelegateRequestContext, type ManagedAgentDelegateResult, type ManagedAgentDelegateRunInput, type ManagedAgentDelegateRunner, type ManagedAgentDelegateStatus, type ManagedAgentDelegateStatusResult, ManagedAgentMcpDelegateController, type ManagedAgentMcpDelegateOptions, ManagedAgentMcpError, type ManagedAgentMcpHttpHandlerOptions, type ManagedAgentMcpServerOptions, type ManagedAgentSafeError, type ManagedAgentWorkspaceResolutionInput, type MaterializeAgentDirectoryInput, MeteringErrorLogger, ModeContext, type ModelTierCandidate, PiHarnessOptions, PiPackageSource, type PiResourceDigestInput, type PiResourceDigestLimits, type PiResourceSet, type ProvisionRuntimeWorkspaceOptions, ProvisionWorkspaceRuntimeOptions, type ProvisioningArtifactRequest, RUNTIME_FILESYSTEM_BINDING_DUPLICATE_CODE, RUNTIME_READONLY_FILESYSTEM_POLICY_INVALID_CODE, RemoteWorkerClient, RemoteWorkerClientError, type RemoteWorkerClientOptions, RemoteWorkerExecRequest, type RemoteWorkerModeAdapterOptions, RemoteWorkerWorkspaceOp, RemoteWorkerWorkspaceResult, type ResolveDefaultAgentFleetOptions, type ResolvedAgent, type ResolvedAgentDigestInput, ResolvedAgentRuntimeScope, RuntimeBundle, type RuntimeEnvContribution, type RuntimeEnvContributionContext, RuntimeFilesystemAccessDecision, RuntimeFilesystemBinding, RuntimeFilesystemBindingConfigurationError, RuntimeModeAdapter, RuntimeModeId, type RuntimeReadonlyFilesystemPolicy, RuntimeReadonlyFilesystemPolicyError, type RuntimeWorkspaceProvisioningResult, type SandboxRuntimeModeOptions, type ShareEntryMcpResourceOptions, type SkillMetadataFrontmatter, SqliteAgentRequestLedger, TrustedAgentCompositionError, type TrustedAgentInstructionAppendix, type TrustedAuthoredAgentPolicy, UV_SETUP_COMMANDS, VerifiedAgentScopeClaim, type WorkspaceAgentDispatcherBinding, type WorkspaceAgentDispatcherResolveOptions, type WorkspaceAgentDispatcherResolver, WorkspaceProvisioningAdapter, WorkspaceProvisioningResult, applyCspHeaders, autoDetectMode, buildDeploymentSnapshotRecipe, compileAgentDirectory, compilePersonaPackageDirectory, constantTimeTokenEqual, createAgentHost, createBlaxelSandboxModeAdapter, createBoundWorkspaceAgentDispatcher, createConfiguredAgentHostAgentSpec, createDirectModeAdapter, createEnvironmentProvisioningFingerprint, createFakeAuthorityVerifierV1, createHostSideCredentialResolverV1, createInMemoryCredentialBackendV1, createLocalModeAdapter, createManagedAgentMcpDelegateController, createManagedAgentMcpHttpHandler, createManagedAgentMcpServer, createPiResourceDigestFence, createPiResourceDigestInput, createPluginDiagnosticsTool, createProviderRuntimeModeAdapter, createRemoteWorkerModeAdapter, createRemoteWorkerSandbox, createRemoteWorkerWorkspace, createResolvedAgentDigest, createResolvedRuntimeScopeIdentity, createResourceSettingsManager, createSandboxRuntimeModeAdapter, createStandaloneAgentHostApp, createUserFilesystemBinding, createValidatingAgentFleetCompiler, createVercelSandboxModeAdapter, decodeBytesFromWorker, deepLinkRoutes, digestPiResourceInputs, encodeBytesForWorker, hasBwrap, loadConfiguredAgentFleet, materializeAgentDirectory, mergeRuntimeFilesystemBindings, normalizeRuntimeReadonlyFilesystemPolicy, parseSkillMetadataFrontmatter, prepareDeploymentSnapshot, projectAuthorizedSessionRunDetails, provisionRuntimeWorkspace, provisionWorkspaceRuntime, registerAgentHostEnvironmentRoutes, registerShareEntryResources, resolveAgentDeployment, resolveBuiltinRuntimeLayoutRoot, resolveDefaultAgentFleet, resolveMode, resolveRuntimeReadonlyFilesystemAccess, resolveWorkspaceRoot, sandboxRuntimeHostOperations, shareResourceUri, withResolvedCredential, withRuntimeEnvContributions };
1489
+ export { AgentDirectoryCompilerError, type AgentDirectoryCompilerErrorCode, type AgentDirectoryCompilerPublicErrorCode, AgentEffectAdmission, AgentFleetCompilationError, AgentFleetCompilationErrorCode, AgentFleetCompiler, type AgentFleetPluginBindingContract, AgentHarnessFactory, AgentHostAgentSpec, type AgentHostEnvironmentHttpProjectionOptions, AgentHostEnvironmentScope, AgentInstructionFileRef, AgentInstructionSource, AgentMeteringSink, AgentRequestKey, AgentRequestLedger, AgentRequestLedgerPrepareResult, AgentRequestLedgerRecord, AgentRuntimeHostOperations, AuthoredAgentMaterializationError, type AuthoredAgentMaterializationErrorCode, type AuthoredAgentSourceV1, AuthorizedAgentScope, AuthorizedEnvironmentIntent, type AuthorizedSessionRunDetails, BuiltinRuntimeModeId, CompiledAgentHostAgentSpec, ConfiguredAgentHostAgentSpec, CreateAgentHostOptions, type CreateConfiguredAgentHostAgentSpecInput, type CreateStandaloneAgentHostAppOptions, type CreateValidatingAgentFleetCompilerOptions, CreatedAgentHost, type CredentialStoreBackendV1, DEFAULT_PI_RESOURCE_DIGEST_LIMITS, DEFAULT_READONLY_WORKSPACE_PATHS, type DeploymentSnapshotProvider, type DeploymentSnapshotRecipe, type DeploymentSnapshotResult, type DeploymentSnapshotStatus, type DiscoveredAgentPackageDescriptor, EmbeddedAgentGateway, type FakeAuthorityVerifierGrantV1, FleetConfigError, type FleetConfigErrorCode, type FleetLoaderDiagnostic, type FleetLoaderDiagnosticCode, type FleetSeatBinding, type FleetSkillBinding, type HostSideCredentialResolverOptionsV1, InMemoryAgentRequestLedger, type InMemoryCredentialBackendEntryV1, LEGACY_DEFAULT_AGENT_FLEET, type LoadConfiguredAgentFleetOptions, type LoadConfiguredAgentFleetResult, MANAGED_AGENT_MCP_DELIVERY_RULE, MANAGED_AGENT_MCP_ORIGIN_SURFACE, type ManagedAgentArtifact, type ManagedAgentArtifactCandidate, type ManagedAgentArtifactRef, type ManagedAgentBoundRunnerWorkspace, type ManagedAgentCollectArtifactsInput, type ManagedAgentDelegateInput, type ManagedAgentDelegateProgress, type ManagedAgentDelegateRequestContext, type ManagedAgentDelegateResult, type ManagedAgentDelegateRunInput, type ManagedAgentDelegateRunner, type ManagedAgentDelegateStatus, type ManagedAgentDelegateStatusResult, ManagedAgentMcpDelegateController, type ManagedAgentMcpDelegateOptions, ManagedAgentMcpError, type ManagedAgentMcpHttpHandlerOptions, type ManagedAgentMcpServerOptions, type ManagedAgentSafeError, type ManagedAgentWorkspaceResolutionInput, type MaterializeAgentDirectoryInput, MeteringErrorLogger, ModeContext, type ModelTierCandidate, PiHarnessOptions, PiPackageSource, type PiResourceDigestInput, type PiResourceDigestLimits, type PiResourceSet, type ProvisionRuntimeWorkspaceOptions, ProvisionWorkspaceRuntimeOptions, type ProvisioningArtifactRequest, RUNTIME_FILESYSTEM_BINDING_DUPLICATE_CODE, RUNTIME_READONLY_FILESYSTEM_POLICY_INVALID_CODE, RemoteWorkerClient, RemoteWorkerClientError, type RemoteWorkerClientOptions, RemoteWorkerExecRequest, type RemoteWorkerModeAdapterOptions, RemoteWorkerWorkspaceOp, RemoteWorkerWorkspaceResult, type ResolveDefaultAgentFleetOptions, type ResolvedAgent, type ResolvedAgentDigestInput, ResolvedAgentRuntimeScope, type ResolvedInstructionFileRefs, RuntimeBundle, type RuntimeEnvContribution, type RuntimeEnvContributionContext, RuntimeFilesystemAccessDecision, RuntimeFilesystemBinding, RuntimeFilesystemBindingConfigurationError, RuntimeModeAdapter, RuntimeModeId, type RuntimeReadonlyFilesystemPolicy, RuntimeReadonlyFilesystemPolicyError, type RuntimeWorkspaceProvisioningResult, type SandboxRuntimeModeOptions, type ShareEntryMcpResourceOptions, type SkillMetadataFrontmatter, SqliteAgentRequestLedger, TrustedAgentCompositionError, type TrustedAgentInstructionAppendix, type TrustedAuthoredAgentPolicy, UV_SETUP_COMMANDS, VerifiedAgentScopeClaim, type WithheldInstructionRef, type WorkspaceAgentDispatcherBinding, type WorkspaceAgentDispatcherResolveOptions, type WorkspaceAgentDispatcherResolver, WorkspaceProvisioningAdapter, WorkspaceProvisioningResult, applyCspHeaders, autoDetectMode, buildDeploymentSnapshotRecipe, compileAgentDirectory, compilePersonaPackageDirectory, constantTimeTokenEqual, createAgentHost, createBlaxelSandboxModeAdapter, createBoundWorkspaceAgentDispatcher, createConfiguredAgentHostAgentSpec, createDirectModeAdapter, createEnvironmentProvisioningFingerprint, createFakeAuthorityVerifierV1, createHostSideCredentialResolverV1, createInMemoryCredentialBackendV1, createLocalModeAdapter, createManagedAgentMcpDelegateController, createManagedAgentMcpHttpHandler, createManagedAgentMcpServer, createPiResourceDigestFence, createPiResourceDigestInput, createPluginDiagnosticsTool, createProviderRuntimeModeAdapter, createRemoteWorkerModeAdapter, createRemoteWorkerSandbox, createRemoteWorkerWorkspace, createResolvedAgentDigest, createResolvedRuntimeScopeIdentity, createResourceSettingsManager, createSandboxRuntimeModeAdapter, createStandaloneAgentHostApp, createUserFilesystemBinding, createValidatingAgentFleetCompiler, createVercelSandboxModeAdapter, decodeBytesFromWorker, deepLinkRoutes, digestPiResourceInputs, encodeBytesForWorker, hasBwrap, loadConfiguredAgentFleet, materializeAgentDirectory, mergeRuntimeFilesystemBindings, normalizeRuntimeReadonlyFilesystemPolicy, parseSkillMetadataFrontmatter, prepareDeploymentSnapshot, projectAuthorizedSessionRunDetails, provisionRuntimeWorkspace, provisionWorkspaceRuntime, registerAgentHostEnvironmentRoutes, registerShareEntryResources, resolveAgentDeployment, resolveAgentInstructionFileRefs, resolveBuiltinRuntimeLayoutRoot, resolveDefaultAgentFleet, resolveMode, resolveRuntimeReadonlyFilesystemAccess, resolveWorkspaceRoot, sandboxRuntimeHostOperations, shareResourceUri, withResolvedCredential, withRuntimeEnvContributions };
@@ -80,6 +80,7 @@ import {
80
80
  registerAgentHostEnvironmentRoutes,
81
81
  registerShareEntryResources,
82
82
  resolveAgentDeployment,
83
+ resolveAgentInstructionFileRefs,
83
84
  resolveBuiltinRuntimeLayoutRoot,
84
85
  resolveDefaultAgentFleet,
85
86
  resolveMode,
@@ -89,14 +90,14 @@ import {
89
90
  shareResourceUri,
90
91
  withResolvedCredential,
91
92
  withRuntimeEnvContributions
92
- } from "../chunk-BTYOMR7W.js";
93
+ } from "../chunk-LFN45QDZ.js";
93
94
  import {
94
95
  PI_PACKAGE_RESOURCE_FILTERS,
95
96
  compactPiPackages,
96
97
  createResourceSettingsManager,
97
98
  mergePiPackageSources,
98
99
  piPackageSourceKey
99
- } from "../chunk-I7KFNGB4.js";
100
+ } from "../chunk-F2OJI2LX.js";
100
101
  import "../chunk-JNEKOVMJ.js";
101
102
  import "../chunk-4IQ4HHBG.js";
102
103
  import "../chunk-WSQ5QNIY.js";
@@ -190,6 +191,7 @@ export {
190
191
  registerAgentHostEnvironmentRoutes,
191
192
  registerShareEntryResources,
192
193
  resolveAgentDeployment,
194
+ resolveAgentInstructionFileRefs,
193
195
  resolveBuiltinRuntimeLayoutRoot,
194
196
  resolveDefaultAgentFleet,
195
197
  resolveMode,
@@ -2,8 +2,8 @@ import {
2
2
  REMOTE_WORKER_EXCLUSIVE_BINARY_CREATE_CAPABILITY,
3
3
  WORKER_INTERNAL_TOKEN_HEADER,
4
4
  constantTimeTokenEqual
5
- } from "../../chunk-BTYOMR7W.js";
6
- import "../../chunk-I7KFNGB4.js";
5
+ } from "../../chunk-LFN45QDZ.js";
6
+ import "../../chunk-F2OJI2LX.js";
7
7
  import "../../chunk-JNEKOVMJ.js";
8
8
  import "../../chunk-4IQ4HHBG.js";
9
9
  import "../../chunk-WSQ5QNIY.js";
@@ -86,11 +86,11 @@ interface ModelsRoutesOptions {
86
86
  * (fail closed) so hosts can enforce hard stops.
87
87
  * recordUsage once per native assistant message carrying usage.
88
88
  * `usageId` is a stable idempotency key.
89
- * settleRun when the run reaches a native terminal state and usage
90
- * was recorded (or it finished ok).
91
- * releaseRun when the run never produced billable usage: rejected
92
- * execution, cleared queue, cancel/abort, or error before
93
- * any usage arrived.
89
+ * settleRun when the run reaches a native terminal state and billable
90
+ * usage or an authoritative all-zero usage row was recorded.
91
+ * releaseRun when the run does not settle: rejected execution, cleared
92
+ * queue, cancel/abort, error before usage, or a fail-closed
93
+ * fallback charge.
94
94
  *
95
95
  * Every run terminates with exactly one settle or release from the
96
96
  * coordinator; sinks should still treat all four methods as idempotent
@@ -102,8 +102,8 @@ interface AgentMeteringSink {
102
102
  reserveRun(input: MeteringReserveInput): Promise<MeteringReservationResult>;
103
103
  /** Records the usage and returns the credit micros it was actually billed. The
104
104
  * coordinator counts a usage as billable from this charged amount (not raw provider
105
- * fields), so a row that prices to 0 (e.g. cost-only usage when provider cost isn't
106
- * trusted) doesn't make a free run settle. */
105
+ * fields). A complete, internally consistent all-zero report settles at zero;
106
+ * potentially billable usage priced to 0 retains fail-closed fallback. */
107
107
  recordUsage(input: MeteringUsageInput): Promise<MeteringUsageResult>;
108
108
  settleRun(input: MeteringSettleInput): Promise<void>;
109
109
  releaseRun(input: MeteringReleaseInput): Promise<void>;
@@ -754,6 +754,21 @@ interface AgentInstructionFileRef {
754
754
  readonly path: string;
755
755
  readonly role: 'persona';
756
756
  }
757
+ /**
758
+ * An authored instruction file as the fleet composer knows it: a canonical
759
+ * HOST absolute path, not yet addressed against any workspace.
760
+ *
761
+ * The two shapes are deliberately distinct. A multi-workspace host (the CLI
762
+ * hub, core) serves a DIFFERENT root per request, so composition cannot know
763
+ * which root a ref should be relative to; only the request can. The spec
764
+ * therefore carries sources, and `describe` publishes the subset that is
765
+ * reachable through the root actually being served (gh-1189).
766
+ */
767
+ interface AgentInstructionSource {
768
+ /** Canonical absolute path on the host filesystem. */
769
+ readonly absolutePath: string;
770
+ readonly role: 'persona';
771
+ }
757
772
  interface ConfiguredAgentHostAgentSpec {
758
773
  readonly agentTypeId: string;
759
774
  readonly definition: {
@@ -775,8 +790,12 @@ interface ConfiguredAgentHostAgentSpec {
775
790
  /** Host path of the package's `knowledge/` folder. */
776
791
  readonly rootDir: string;
777
792
  };
778
- /** Authored instruction sources behind `definition.instructions`. */
779
- readonly instructionFiles?: readonly AgentInstructionFileRef[];
793
+ /**
794
+ * Authored instruction sources behind `definition.instructions`, as host
795
+ * absolute paths. Addressed against a served workspace root per request by
796
+ * `describe`, never at composition time.
797
+ */
798
+ readonly instructionSources?: readonly AgentInstructionSource[];
780
799
  readonly plugins?: readonly {
781
800
  /** Canonical app-preflighted plugin ID. */
782
801
  readonly name: string;
@@ -986,4 +1005,4 @@ interface CreatedAgentHost {
986
1005
  runWithWorkspaceAgent(input: AgentHostDispatcherRunInput, run: (binding: LeaseBoundWorkspaceAgent) => Promise<void>): Promise<void>;
987
1006
  }
988
1007
 
989
- export { type PiExtensionFactory as $, type AgentGatewayEffect as A, type BuiltinRuntimeModeId as B, type ConfiguredAgentHostAgentSpec as C, type AgentFleetCompiler as D, type AgentRequestTarget as E, type RuntimeFilesystemAccessDecision as F, type AgentHostDescription as G, type AgentHostDirectProjectionOptions as H, type AgentHostDispatcherRunInput as I, type AgentHostEnvironmentLease as J, type AgentHostHandle as K, type LegacyDefaultAgentHostSpec as L, type ModeContext as M, type MeteringReleaseInput as N, type MeteringReleaseReason as O, type ProvisionWorkspaceRuntimeOptions as P, type MeteringReservationResult as Q, type RuntimeModeAdapter as R, type MeteringReserveInput as S, type MeteringRunKind as T, type MeteringRunScope as U, type MeteringRunStatus as V, type WorkspaceProvisioningResult as W, type MeteringSettleInput as X, type MeteringUsage as Y, type MeteringUsageInput as Z, PI_PACKAGE_RESOURCE_FILTERS as _, type PiPackageSource as a, type PluginSkillSource as a0, type ResolvedEnvironmentScope as a1, type RuntimeFilesystemBindingOperations as a2, type RuntimeNodePackageSpec as a3, type RuntimeProvisioningContribution as a4, type RuntimePythonSpec as a5, type RuntimeTemplateContribution as a6, type WorkspaceProvisioningExecResult as a7, compactPiPackages as a8, mergePiPackageSources as a9, normalizeMeteringUsage as aa, piPackageSourceKey as ab, type RuntimeModeId as b, type AgentRuntimeHostOperations as c, type RuntimeBashStrategy as d, type RuntimeFilesystemStrategy as e, type WorkspaceProvisioningAdapter as f, type AgentInstructionFileRef as g, type AgentHostAgentSpec as h, type RuntimeBundle as i, type PiHarnessOptions as j, type AgentMeteringSink as k, type RuntimeFilesystemBinding as l, type CreatedAgentHost as m, type MeteringErrorLogger as n, ReadyStatusTracker as o, type CreateAgentHostOptions as p, type CompiledAgentHostAgentSpec as q, type AgentRequestLedger as r, type AgentEffectAdmission as s, type AuthorizedEnvironmentIntent as t, type AgentHostEnvironmentScope as u, type ResolvedAgentRuntimeScope as v, type AgentRequestKey as w, type AgentRequestLedgerPrepareResult as x, type AgentRequestFailure as y, type AgentRequestLedgerRecord as z };
1008
+ export { PI_PACKAGE_RESOURCE_FILTERS as $, type AgentGatewayEffect as A, type BuiltinRuntimeModeId as B, type ConfiguredAgentHostAgentSpec as C, type AgentRequestLedgerRecord as D, type AgentFleetCompiler as E, type AgentRequestTarget as F, type RuntimeFilesystemAccessDecision as G, type AgentHostDescription as H, type AgentHostDirectProjectionOptions as I, type AgentHostDispatcherRunInput as J, type AgentHostEnvironmentLease as K, type AgentHostHandle as L, type ModeContext as M, type LegacyDefaultAgentHostSpec as N, type MeteringReleaseInput as O, type ProvisionWorkspaceRuntimeOptions as P, type MeteringReleaseReason as Q, type RuntimeModeAdapter as R, type MeteringReservationResult as S, type MeteringReserveInput as T, type MeteringRunKind as U, type MeteringRunScope as V, type WorkspaceProvisioningResult as W, type MeteringRunStatus as X, type MeteringSettleInput as Y, type MeteringUsage as Z, type MeteringUsageInput as _, type PiPackageSource as a, type PiExtensionFactory as a0, type PluginSkillSource as a1, type ResolvedEnvironmentScope as a2, type RuntimeFilesystemBindingOperations as a3, type RuntimeNodePackageSpec as a4, type RuntimeProvisioningContribution as a5, type RuntimePythonSpec as a6, type RuntimeTemplateContribution as a7, type WorkspaceProvisioningExecResult as a8, compactPiPackages as a9, mergePiPackageSources as aa, normalizeMeteringUsage as ab, piPackageSourceKey as ac, type RuntimeModeId as b, type AgentRuntimeHostOperations as c, type RuntimeBashStrategy as d, type RuntimeFilesystemStrategy as e, type WorkspaceProvisioningAdapter as f, type AgentInstructionSource as g, type AgentInstructionFileRef as h, type AgentHostAgentSpec as i, type RuntimeBundle as j, type PiHarnessOptions as k, type AgentMeteringSink as l, type RuntimeFilesystemBinding as m, type CreatedAgentHost as n, type MeteringErrorLogger as o, ReadyStatusTracker as p, type CreateAgentHostOptions as q, type CompiledAgentHostAgentSpec as r, type AgentRequestLedger as s, type AgentEffectAdmission as t, type AuthorizedEnvironmentIntent as u, type AgentHostEnvironmentScope as v, type ResolvedAgentRuntimeScope as w, type AgentRequestKey as x, type AgentRequestLedgerPrepareResult as y, type AgentRequestFailure as z };
@@ -45,7 +45,7 @@ All API failures must use the response envelope:
45
45
  | `AGENT_FLEET_MODEL_POLICY_UNCOMPILED` | Agent fleet configuration declares a model policy that the app fleet compiler did not resolve | 500 | configure app fleet compiler | error | stable (trusted API) |
46
46
  | `AGENT_FLEET_SEAT_PERSONA_INVALID` | `loadConfiguredAgentFleet` excluded a fleet.yaml seat because its persona package failed to materialize or compose | 500 | fix persona package/spec | error | stable (trusted API) |
47
47
  | `AGENT_FLEET_SEAT_SKILL_DIGEST_MISMATCH` | `loadConfiguredAgentFleet` excluded a fleet.yaml seat because a pinned skill's canonical content was unavailable or its digest drifted | 500 | run `pnpm write:skill-digests` or fix the skill file | error | stable (trusted API) |
48
- | `AGENT_FLEET_SEAT_INSTRUCTIONS_PATH_UNPUBLISHABLE` | `loadConfiguredAgentFleet` composed a fleet.yaml seat but withheld the link to its persona `instructions.md`. Usually because the host serves a workspace root that does not contain the personas tree (multi-workspace hosts resolve a root per request and pass `workspaceRoot: null`); rarely because the seat name is not a safe path segment | 500 | expected on multi-workspace hosts — the seat runs normally, only the Agent-details instruction link is withheld. On a single-root host, check that `workspaceRoot` is the root the `user` filesystem serves and contains `personasDir`. If the message names the seat, rename it to `[A-Za-z0-9][A-Za-z0-9._-]*` | warn | stable (trusted API) |
48
+ | `AGENT_FLEET_SEAT_INSTRUCTIONS_PATH_UNPUBLISHABLE` | `GET /api/v1/agents/:agentTypeId/describe` withheld the link to a seat's persona `instructions.md` for THIS request. Usually because the workspace root serving the request does not contain the personas tree (the fleet is composed from a repository root while the request is served from somewhere else); also when the persona canonically resolves outside that root through a symlink, when the source no longer exists, or when the seat name is not a safe path segment. NOT an HTTP error: the describe call still returns 200 — the code is only logged as a warning while that link is omitted from the response | 200 (log-only) | expected whenever a request is served from a workspace the personas are outside of — the seat runs normally, only the Agent-details instruction link is withheld. Serve the request from a workspace that contains the personas tree to get the link. If the message names an unsafe composed path, rename the seat directory to `[A-Za-z0-9][A-Za-z0-9._-]*` | warn | stable (trusted API) |
49
49
  | `AGENT_FLEET_CONFIG_FILE_INVALID` | `loadConfiguredAgentFleet`'s fleet.yaml could not be read, parsed, or validated (whole-fleet failure, not per-seat) | 500 | fix `.agents/factory/fleet.yaml` | error | stable (trusted API) |
50
50
  | `AGENT_DEFINITION_ID_CONFLICT` | Multiple discovered plugin packages claim the same agent definition id, so every claimant is excluded | 500 | remove or rename conflicting definitions | error | stable (trusted API) |
51
51
  | `AGENT_DEFINITION_UNSEATED` | A discovered agent package is not named by the fleet roster and remains inert | 200 | seat it in class-B fleet config if activation is intended | info | stable (trusted API) |
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hachej/boring-agent",
3
- "version": "0.1.104",
3
+ "version": "0.1.105",
4
4
  "type": "module",
5
5
  "license": "MIT",
6
6
  "description": "Pane-embeddable coding agent. Ships direct/local/vercel-sandbox execution modes behind one interface.",
@@ -85,12 +85,12 @@
85
85
  "@streamdown/math": "^1.0.2",
86
86
  "@streamdown/mermaid": "^1.0.2",
87
87
  "@tanstack/react-query": "^5.101.4",
88
- "ai": "^7.0.62",
88
+ "ai": "^7.0.65",
89
89
  "class-variance-authority": "^0.7.1",
90
90
  "clsx": "^2.1.1",
91
91
  "cmdk": "^1.1.1",
92
92
  "diff": "^9.0.0",
93
- "fastify": "^5.11.3",
93
+ "fastify": "^5.12.0",
94
94
  "lucide-react": "^1.31.0",
95
95
  "motion": "^13.1.0",
96
96
  "nanoid": "^6.0.0",
@@ -100,9 +100,9 @@
100
100
  "use-stick-to-bottom": "^1.1.6",
101
101
  "yaml": "^2.9.0",
102
102
  "zod": "^3.25.76",
103
- "@hachej/boring-bash": "0.1.104",
104
- "@hachej/boring-sandbox": "0.1.104",
105
- "@hachej/boring-ui-kit": "0.1.104"
103
+ "@hachej/boring-bash": "0.1.105",
104
+ "@hachej/boring-sandbox": "0.1.105",
105
+ "@hachej/boring-ui-kit": "0.1.105"
106
106
  },
107
107
  "devDependencies": {
108
108
  "@vercel/sandbox": "3.0.0",