@hachej/boring-agent 0.1.12 → 0.1.14
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 +242 -42
- package/dist/DebugDrawer-MCYZ4AWZ.js +6 -0
- package/dist/chunk-F3CE5CNW.js +38 -0
- package/dist/chunk-MMJA3QON.js +295 -0
- package/dist/front/index.d.ts +48 -76
- package/dist/front/index.js +2396 -1795
- package/dist/front/styles.css +2242 -1267
- package/dist/{sandbox-handle-store-DCNEJJ6b.d.ts → sandbox-handle-store-hK76cTjn.d.ts} +2 -0
- package/dist/server/index.d.ts +35 -3
- package/dist/server/index.js +2079 -1577
- package/dist/shared/index.d.ts +11 -7
- package/dist/shared/index.js +10 -1
- package/dist/{harness-DT3ZzdAN.d.ts → tool-ui-DSmWuqGe.d.ts} +33 -4
- package/package.json +4 -4
|
@@ -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<{
|
package/dist/server/index.d.ts
CHANGED
|
@@ -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-
|
|
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;
|
|
@@ -215,9 +220,16 @@ interface VercelSandboxWorkspaceOptions {
|
|
|
215
220
|
}
|
|
216
221
|
declare function createVercelSandboxWorkspace(sandbox: Sandbox$1, workspaceOpts?: VercelSandboxWorkspaceOptions): VercelSandboxWorkspace;
|
|
217
222
|
|
|
218
|
-
type
|
|
223
|
+
type BuiltinRuntimeModeId = 'direct' | 'local' | 'vercel-sandbox';
|
|
224
|
+
type RuntimeModeId = BuiltinRuntimeModeId | (string & {});
|
|
219
225
|
interface RuntimeModeAdapter {
|
|
220
226
|
readonly id: RuntimeModeId;
|
|
227
|
+
/**
|
|
228
|
+
* Declares whether the workspace files are strongly available on the host
|
|
229
|
+
* path before create() runs. Composition layers use this to decide whether
|
|
230
|
+
* host-side fs checks/prompts are safe without hard-coding sandbox IDs.
|
|
231
|
+
*/
|
|
232
|
+
readonly workspaceFsCapability?: Workspace['fsCapability'];
|
|
221
233
|
create(ctx: ModeContext): Promise<RuntimeBundle>;
|
|
222
234
|
dispose?(): Promise<void>;
|
|
223
235
|
}
|
|
@@ -260,6 +272,8 @@ interface CreateAgentAppOptions {
|
|
|
260
272
|
sessionId?: string;
|
|
261
273
|
templatePath?: string;
|
|
262
274
|
mode?: RuntimeModeId;
|
|
275
|
+
/** Supply a custom runtime adapter to plug in non-built-in sandbox/workspace modes. */
|
|
276
|
+
runtimeModeAdapter?: RuntimeModeAdapter;
|
|
263
277
|
authToken?: string;
|
|
264
278
|
version?: string;
|
|
265
279
|
logger?: boolean;
|
|
@@ -275,6 +289,10 @@ interface CreateAgentAppOptions {
|
|
|
275
289
|
systemPromptAppend?: string;
|
|
276
290
|
/** Optional pi resource-loader isolation knobs. */
|
|
277
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;
|
|
278
296
|
}
|
|
279
297
|
declare function createAgentApp(opts?: CreateAgentAppOptions): Promise<FastifyInstance>;
|
|
280
298
|
|
|
@@ -295,15 +313,29 @@ interface RegisterAgentRoutesOptions {
|
|
|
295
313
|
request?: FastifyRequest;
|
|
296
314
|
}) => string | undefined | Promise<string | undefined>;
|
|
297
315
|
mode?: RuntimeModeId;
|
|
316
|
+
/** Supply a custom runtime adapter to plug in non-built-in sandbox/workspace modes. */
|
|
317
|
+
runtimeModeAdapter?: RuntimeModeAdapter;
|
|
298
318
|
version?: string;
|
|
299
319
|
extraTools?: AgentTool[];
|
|
300
320
|
getExtraTools?: (ctx: {
|
|
301
321
|
workspaceId: string;
|
|
302
322
|
workspaceRoot: string;
|
|
303
323
|
runtimeMode: RuntimeModeId;
|
|
324
|
+
workspaceFsCapability?: Workspace['fsCapability'];
|
|
304
325
|
}) => AgentTool[] | Promise<AgentTool[]>;
|
|
305
326
|
systemPromptAppend?: string;
|
|
306
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>;
|
|
307
339
|
registerHealthRoute?: boolean;
|
|
308
340
|
sandboxHandleStore?: SandboxHandleStore;
|
|
309
341
|
getWorkspaceId?: (request: FastifyRequest) => string | Promise<string>;
|
|
@@ -329,4 +361,4 @@ interface Logger {
|
|
|
329
361
|
}
|
|
330
362
|
declare function createLogger(prefix: string): Logger;
|
|
331
363
|
|
|
332
|
-
export { 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 };
|