@hachej/boring-agent 0.1.13 → 0.1.16

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.
@@ -261,6 +261,8 @@ interface ToolExecContext {
261
261
  abortSignal: AbortSignal;
262
262
  toolCallId: string;
263
263
  onUpdate?: (partial: string) => void;
264
+ /** Agent chat/session id executing this tool, when known. */
265
+ sessionId?: string;
264
266
  }
265
267
  interface ToolResult {
266
268
  content: Array<{
@@ -1,4 +1,4 @@
1
- import { S as Sandbox, f as SandboxHandleStore, e as SandboxHandleRecord, W as Workspace, F as FileSearch, A as AgentTool } from '../sandbox-handle-store-DCNEJJ6b.js';
1
+ import { S as Sandbox, f as SandboxHandleStore, e as SandboxHandleRecord, W as Workspace, F as FileSearch, A as AgentTool } from '../sandbox-handle-store-hK76cTjn.js';
2
2
  import { Sandbox as Sandbox$1 } from '@vercel/sandbox';
3
3
  import { FastifyInstance, FastifyRequest, FastifyPluginAsync } from 'fastify';
4
4
  import { PackageSource } from '@mariozechner/pi-coding-agent';
@@ -173,6 +173,11 @@ declare function prepareVercelDeploymentSnapshot(opts: VercelDeploymentSnapshotO
173
173
 
174
174
  declare function createNodeWorkspace(root: string): Workspace;
175
175
 
176
+ declare function fileRoutes(app: FastifyInstance, opts: {
177
+ workspace?: Workspace;
178
+ getWorkspace?: (request: FastifyRequest) => Workspace | Promise<Workspace>;
179
+ }, done: (err?: Error) => void): void;
180
+
176
181
  interface RuntimeTemplateContribution {
177
182
  id: string;
178
183
  path: string | URL;
@@ -284,6 +289,10 @@ interface CreateAgentAppOptions {
284
289
  systemPromptAppend?: string;
285
290
  /** Optional pi resource-loader isolation knobs. */
286
291
  resourceLoaderOptions?: PiResourceLoaderOptions;
292
+ /** Optional stable namespace for file-backed session storage. */
293
+ sessionNamespace?: string;
294
+ /** Optional explicit file-backed session directory. Mostly for tests/hosts. */
295
+ sessionDir?: string;
287
296
  }
288
297
  declare function createAgentApp(opts?: CreateAgentAppOptions): Promise<FastifyInstance>;
289
298
 
@@ -316,6 +325,17 @@ interface RegisterAgentRoutesOptions {
316
325
  }) => AgentTool[] | Promise<AgentTool[]>;
317
326
  systemPromptAppend?: string;
318
327
  resourceLoaderOptions?: PiResourceLoaderOptions;
328
+ getResourceLoaderOptions?: (ctx: {
329
+ workspaceId: string;
330
+ workspaceRoot: string;
331
+ request?: FastifyRequest;
332
+ }) => PiResourceLoaderOptions | undefined | Promise<PiResourceLoaderOptions | undefined>;
333
+ sessionNamespace?: string;
334
+ getSessionNamespace?: (ctx: {
335
+ workspaceId: string;
336
+ workspaceRoot: string;
337
+ request?: FastifyRequest;
338
+ }) => string | undefined | Promise<string | undefined>;
319
339
  registerHealthRoute?: boolean;
320
340
  sandboxHandleStore?: SandboxHandleStore;
321
341
  getWorkspaceId?: (request: FastifyRequest) => string | Promise<string>;
@@ -341,4 +361,4 @@ interface Logger {
341
361
  }
342
362
  declare function createLogger(prefix: string): Logger;
343
363
 
344
- export { type BuiltinRuntimeModeId, type CreateAgentAppOptions, type DeploymentSnapshotProvider, type DeploymentSnapshotRecipe, type DeploymentSnapshotResult, type DeploymentSnapshotStatus, FileHandleStore, type LogFields, type Logger, type ModeContext, PI_PACKAGE_RESOURCE_FILTERS, type PiPackageSource, type PiResourceLoaderOptions, type ProvisionRuntimeWorkspaceOptions, type RegisterAgentRoutesOptions, type RuntimeBundle, type RuntimeModeAdapter, type RuntimeModeId, type RuntimeProvisioningContribution, type RuntimePythonSpec, type RuntimeTemplateContribution, type RuntimeWorkspaceProvisioningResult, type SnapshotBakeOptions, type SnapshotBakeResult, UV_SETUP_COMMANDS, UV_SETUP_COMMANDS as VERCEL_UV_SETUP_COMMANDS, type VercelBakeClient, type VercelBakeSandbox, type VercelDeploymentSnapshotOptions, applyCspHeaders, autoDetectMode, bakeSnapshotIfNeeded, buildDeploymentSnapshotRecipe, buildPackageHash, buildSnapshotRecipeHash, compactPiPackages, createAgentApp, createBwrapSandbox, createDirectSandbox, createLogger, createNodeWorkspace, createVercelDeploymentSnapshotProvider, createVercelSandboxWorkspace, hasBwrap, mergePiPackageSources, piPackageSourceKey, prepareDeploymentSnapshot, prepareVercelDeploymentSnapshot, provisionRuntimeWorkspace, registerAgentRoutes, resolveMode, resolveSandboxHandle };
364
+ export { type BuiltinRuntimeModeId, type CreateAgentAppOptions, type DeploymentSnapshotProvider, type DeploymentSnapshotRecipe, type DeploymentSnapshotResult, type DeploymentSnapshotStatus, FileHandleStore, type LogFields, type Logger, type ModeContext, PI_PACKAGE_RESOURCE_FILTERS, type PiPackageSource, type PiResourceLoaderOptions, type ProvisionRuntimeWorkspaceOptions, type RegisterAgentRoutesOptions, type RuntimeBundle, type RuntimeModeAdapter, type RuntimeModeId, type RuntimeProvisioningContribution, type RuntimePythonSpec, type RuntimeTemplateContribution, type RuntimeWorkspaceProvisioningResult, type SnapshotBakeOptions, type SnapshotBakeResult, UV_SETUP_COMMANDS, UV_SETUP_COMMANDS as VERCEL_UV_SETUP_COMMANDS, type VercelBakeClient, type VercelBakeSandbox, type VercelDeploymentSnapshotOptions, applyCspHeaders, autoDetectMode, bakeSnapshotIfNeeded, buildDeploymentSnapshotRecipe, buildPackageHash, buildSnapshotRecipeHash, compactPiPackages, createAgentApp, createBwrapSandbox, createDirectSandbox, createLogger, createNodeWorkspace, createVercelDeploymentSnapshotProvider, createVercelSandboxWorkspace, fileRoutes, hasBwrap, mergePiPackageSources, piPackageSourceKey, prepareDeploymentSnapshot, prepareVercelDeploymentSnapshot, provisionRuntimeWorkspace, registerAgentRoutes, resolveMode, resolveSandboxHandle };