@hachej/boring-agent 0.1.100 → 0.1.103

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.
Files changed (36) hide show
  1. package/dist/{DebugDrawer-2TO5SE2D.js → DebugDrawer-JNA43SVR.js} +2 -1
  2. package/dist/chunk-2BGLZZ7T.js +10 -0
  3. package/dist/{chunk-46HJK2ES.js → chunk-4XOW57KJ.js} +3 -8
  4. package/dist/{chunk-ZOHN72OS.js → chunk-6WKQ4FC4.js} +127 -138
  5. package/dist/{chunk-LSO2AO6Q.js → chunk-7QM22DU7.js} +1 -3
  6. package/dist/{chunk-3OEDBRKY.js → chunk-JNEKOVMJ.js} +1 -1
  7. package/dist/{chunk-VXF5DWS6.js → chunk-K25PK5EC.js} +1 -0
  8. package/dist/chunk-N6THTH7P.js +110 -0
  9. package/dist/{chunk-GRMDMWBW.js → chunk-TW7G33QH.js} +23 -40
  10. package/dist/core/index.d.ts +5 -5
  11. package/dist/core/index.js +1 -1
  12. package/dist/{createHarness-5TEXLUYX.js → createHarness-4Q6DQBRT.js} +2 -2
  13. package/dist/{errors-cNC4HMpV.d.ts → errors-szpcDUFQ.d.ts} +3 -4
  14. package/dist/{file-search-QxnanNjO.d.ts → file-search-BXdSm-Yq.d.ts} +5 -5
  15. package/dist/front/artifacts.d.ts +34 -0
  16. package/dist/front/artifacts.js +21 -0
  17. package/dist/front/index.d.ts +6 -20
  18. package/dist/front/index.js +604 -710
  19. package/dist/{harness-DS8jLKIx.d.ts → harness-erpL2SER.d.ts} +2 -2
  20. package/dist/{lease-D8WC6pQl.d.ts → lease-K-EZhdL-.d.ts} +3 -3
  21. package/dist/{middleware-Cq_cYHjJ.d.ts → middleware-CaAEXpi5.d.ts} +11 -2
  22. package/dist/{piChatEvent-B3ehh9V0.d.ts → piChatEvent-g1nIBh44.d.ts} +14 -16
  23. package/dist/{piChatSessionService-xnv8rcdh.d.ts → piChatSessionService-DugeRHzb.d.ts} +1 -3
  24. package/dist/{sandbox-KQiEdz4W.d.ts → sandbox-BMhut3kh.d.ts} +6 -1
  25. package/dist/server/agent-host/testing/gatewayConformance.d.ts +6 -6
  26. package/dist/server/agent-host/testing/gatewayConformance.js +3 -4
  27. package/dist/server/index.d.ts +24 -35
  28. package/dist/server/index.js +7 -5
  29. package/dist/server/worker/index.d.ts +3 -2
  30. package/dist/server/worker/index.js +25 -6
  31. package/dist/shared/index.d.ts +29 -29
  32. package/dist/shared/index.js +3 -3
  33. package/dist/{types-BPzq-RwN.d.ts → types-BnjMLAd5.d.ts} +14 -6
  34. package/docs/AGENT_GATEWAY_V0.md +3 -4
  35. package/docs/ERROR_CODES.md +1 -0
  36. package/package.json +16 -12
@@ -71,7 +71,7 @@ import {
71
71
  validateConfig,
72
72
  validateConsumptionGuards,
73
73
  validateTool
74
- } from "../chunk-3OEDBRKY.js";
74
+ } from "../chunk-JNEKOVMJ.js";
75
75
  import {
76
76
  SAFE_NATIVE_SESSION_ID,
77
77
  noopTelemetry,
@@ -114,7 +114,7 @@ import {
114
114
  extractToolUiMetadata,
115
115
  isToolUiMetadata,
116
116
  sanitizeToolUiMetadata2 as sanitizeToolUiMetadata
117
- } from "../chunk-LSO2AO6Q.js";
117
+ } from "../chunk-7QM22DU7.js";
118
118
  import {
119
119
  safeRandomUUID
120
120
  } from "../chunk-YGRQ4Q5P.js";
@@ -127,7 +127,7 @@ import {
127
127
  ERROR_CODES,
128
128
  ErrorCode,
129
129
  ErrorLogFieldsSchema
130
- } from "../chunk-VXF5DWS6.js";
130
+ } from "../chunk-K25PK5EC.js";
131
131
  export {
132
132
  AGENT_GATEWAY_ERROR_CODES,
133
133
  AGENT_KNOWLEDGE_FILESYSTEM_ID,
@@ -1,9 +1,9 @@
1
1
  import { FastifyRequest, FastifyPluginAsync } from 'fastify';
2
- import { w as ToolReadinessRequirement, T as TelemetrySink, s as AgentTool, t as AgentHarnessFactory } from './harness-DS8jLKIx.js';
3
- import { F as FileSearch, A as AgentSkillResource, W as WorkspaceAgentDirectRunInput, L as LeaseBoundWorkspaceAgent } from './file-search-QxnanNjO.js';
4
- import { b as Workspace, R as RuntimeFilesystemCapability, c as WorkspaceRuntimeContext, S as Sandbox } from './sandbox-KQiEdz4W.js';
5
- import { d as AgentSessionRef, V as VerifiedAgentScopeClaim, f as AgentGatewayErrorDTO, J as JsonValue, c as AuthorizedAgentScope, b as AgentGateway, j as AgentScopeVerifier } from './errors-cNC4HMpV.js';
6
- import { o as ChatModelSelection } from './piChatEvent-B3ehh9V0.js';
2
+ import { C as ToolReadinessRequirement, v as TelemetrySink, s as AgentTool, D as AgentHarnessFactory } from './harness-erpL2SER.js';
3
+ import { F as FileSearch, b as AgentSkillResource, c as WorkspaceAgentDirectRunInput, L as LeaseBoundWorkspaceAgent } from './file-search-BXdSm-Yq.js';
4
+ import { b as Workspace, h as RuntimeFilesystemCapability, j as WorkspaceRuntimeContext, c as Sandbox } from './sandbox-BMhut3kh.js';
5
+ import { b as AgentSessionRef, V as VerifiedAgentScopeClaim, i as AgentGatewayErrorDTO, x as JsonValue, a as AuthorizedAgentScope, A as AgentGateway, k as AgentScopeVerifier } from './errors-szpcDUFQ.js';
6
+ import { C as ChatModelSelection } from './piChatEvent-g1nIBh44.js';
7
7
  import { RuntimeHostOperations, RuntimeFilesystemBinding as RuntimeFilesystemBinding$1 } from '@hachej/boring-bash/agent';
8
8
  import { CreateNodeWorkspaceOptions, BoringAgentRuntimePaths } from '@hachej/boring-sandbox/providers/node-workspace';
9
9
  import { PackageSource, ExtensionFactory } from '@mariozechner/pi-coding-agent';
@@ -492,6 +492,14 @@ interface RuntimeFilesystemBindingOperations {
492
492
  mtimeMs?: number;
493
493
  metadata?: unknown;
494
494
  }>;
495
+ createBinary?(descriptor: {
496
+ filesystem: string;
497
+ path: string;
498
+ content: Uint8Array;
499
+ }): Promise<{
500
+ mtimeMs?: number;
501
+ metadata?: unknown;
502
+ }>;
495
503
  delete?(descriptor: {
496
504
  filesystem: string;
497
505
  path: string;
@@ -978,4 +986,4 @@ interface CreatedAgentHost {
978
986
  runWithWorkspaceAgent(input: AgentHostDispatcherRunInput, run: (binding: LeaseBoundWorkspaceAgent) => Promise<void>): Promise<void>;
979
987
  }
980
988
 
981
- 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 ResolvedAgentRuntimeScope 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 AgentRequestKey as w, type AgentRequestLedgerPrepareResult as x, type AgentRequestFailure as y, type AgentRequestLedgerRecord as z };
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 };
@@ -97,7 +97,7 @@ shorthand. Prompts add `displayContent?`, `model?`, `thinkingLevel?`,
97
97
 
98
98
  ## Error codes
99
99
 
100
- Fifteen, exhaustive, order-stable, exported as both a const map and
100
+ Fourteen, exhaustive, order-stable, exported as both a const map and
101
101
  `AGENT_GATEWAY_ERROR_CODES`:
102
102
 
103
103
  `AGENT_TYPE_UNKNOWN` · `AGENT_SESSION_NOT_FOUND` · `AGENT_SCOPE_DENIED` ·
@@ -105,12 +105,11 @@ Fifteen, exhaustive, order-stable, exported as both a const map and
105
105
  `AGENT_SESSION_CURSOR_EXPIRED` · `AGENT_SESSION_CURSOR_INVALID` ·
106
106
  `AGENT_REQUEST_CONFLICT` · `AGENT_REQUEST_IN_PROGRESS` ·
107
107
  `AGENT_REQUEST_OUTCOME_UNKNOWN` · `AGENT_RUNTIME_RESTART_REQUIRED` ·
108
- `AGENT_COMMAND_INVALID_STATE` · `AGENT_SESSION_RUNTIME_SCOPE_MISMATCH` ·
108
+ `AGENT_COMMAND_INVALID_STATE` ·
109
109
  `AGENT_SHARED_ENVIRONMENT_UNAVAILABLE` · `AGENT_GATEWAY_CLOSED`
110
110
 
111
111
  HTTP mapping lives in `server/agent-host/httpProjection.ts`
112
- (`statusForGatewayError`). Note `AGENT_SESSION_RUNTIME_SCOPE_MISMATCH`,
113
- `AGENT_REQUEST_CONFLICT`, `AGENT_REQUEST_IN_PROGRESS`,
112
+ (`statusForGatewayError`). Note `AGENT_REQUEST_CONFLICT`, `AGENT_REQUEST_IN_PROGRESS`,
114
113
  `AGENT_RUNTIME_RESTART_REQUIRED`, and `AGENT_COMMAND_INVALID_STATE` project to
115
114
  **409**.
116
115
 
@@ -86,6 +86,7 @@ All API failures must use the response envelope:
86
86
  | `REMOTE_WORKER_EXEC_ABORTED` | Invocation was aborted after bounded in-sandbox cleanup | 499 | retry | warn | stable (trusted API) |
87
87
  | `REMOTE_WORKER_OUTPUT_LIMIT` | Invocation output exceeded its configured combined byte ceiling | 413 | reduce-output | warn | stable (trusted API) |
88
88
  | `REMOTE_WORKER_PATH_UNSAFE` | Workspace operation failed dirfd-relative path confinement | 400 | report-bug | warn | stable (trusted API) |
89
+ | `REMOTE_WORKER_ALREADY_EXISTS` | An atomic exclusive-create workspace operation found an existing path | 409 | choose-replace-or-skip | info | stable (trusted API) |
89
90
  | `REMOTE_WORKER_PATH_PRIMITIVE_UNAVAILABLE` | Required dirfd/openat2 containment primitive is unavailable | 503 | operator-fix | error | stable (trusted API) |
90
91
  | `REMOTE_WORKER_QUOTA_EXCEEDED` | Fixed workspace byte or inode quota was exceeded | 507 | free-space | warn | stable (trusted API) |
91
92
  | `REMOTE_WORKER_OUTCOME_UNKNOWN` | Worker loss left an effectful invocation outcome unknown; no automatic replay is safe | 502 | inspect-before-retry | error | stable (public API) |
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hachej/boring-agent",
3
- "version": "0.1.100",
3
+ "version": "0.1.103",
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.",
@@ -52,6 +52,10 @@
52
52
  "import": "./dist/front/index.js"
53
53
  },
54
54
  "./front/styles.css": "./dist/front/styles.css",
55
+ "./front/artifacts": {
56
+ "types": "./dist/front/artifacts.d.ts",
57
+ "import": "./dist/front/artifacts.js"
58
+ },
55
59
  "./eval": {
56
60
  "types": "./dist/eval/index.d.ts",
57
61
  "import": "./dist/eval/index.js"
@@ -81,14 +85,14 @@
81
85
  "@streamdown/math": "^1.0.2",
82
86
  "@streamdown/mermaid": "^1.0.2",
83
87
  "@tanstack/react-query": "^5.101.4",
84
- "ai": "^7.0.40",
88
+ "ai": "^7.0.62",
85
89
  "class-variance-authority": "^0.7.1",
86
90
  "clsx": "^2.1.1",
87
91
  "cmdk": "^1.1.1",
88
92
  "diff": "^9.0.0",
89
- "fastify": "^5.11.2",
90
- "lucide-react": "^1.27.0",
91
- "motion": "^13.0.0",
93
+ "fastify": "^5.11.3",
94
+ "lucide-react": "^1.31.0",
95
+ "motion": "^13.1.0",
92
96
  "nanoid": "^6.0.0",
93
97
  "shiki": "^4.4.2",
94
98
  "streamdown": "^2.5.0",
@@ -96,13 +100,13 @@
96
100
  "use-stick-to-bottom": "^1.1.6",
97
101
  "yaml": "^2.9.0",
98
102
  "zod": "^3.25.76",
99
- "@hachej/boring-sandbox": "0.1.100",
100
- "@hachej/boring-ui-kit": "0.1.100",
101
- "@hachej/boring-bash": "0.1.100"
103
+ "@hachej/boring-bash": "0.1.103",
104
+ "@hachej/boring-ui-kit": "0.1.103",
105
+ "@hachej/boring-sandbox": "0.1.103"
102
106
  },
103
107
  "devDependencies": {
104
- "@vercel/sandbox": "2.9.2",
105
- "@antithesishq/bombadil": "0.6.1",
108
+ "@vercel/sandbox": "3.0.0",
109
+ "@antithesishq/bombadil": "0.7.0",
106
110
  "@opentelemetry/api": "^1.9.1",
107
111
  "@tailwindcss/postcss": "^4.3.3",
108
112
  "@types/node": "^22.20.0",
@@ -110,14 +114,14 @@
110
114
  "@types/react-dom": "^19.2.4",
111
115
  "@vitejs/plugin-react": "^4.7.0",
112
116
  "ajv": "^8.20.0",
113
- "esbuild": "^0.28.1",
117
+ "esbuild": "^0.28.2",
114
118
  "postcss": "^8.5.25",
115
119
  "react": "^19.2.8",
116
120
  "react-dom": "^19.2.8",
117
121
  "tsup": "^8.4.0",
118
122
  "tsx": "^4.23.6",
119
123
  "typescript": "^6.0.3",
120
- "vite": "^8.2.0",
124
+ "vite": "^8.2.1",
121
125
  "vitest": "^4.1.9"
122
126
  },
123
127
  "peerDependencies": {