@hachej/boring-agent 0.1.77 → 0.1.79
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/dist/chunk-LCEBDU6G.js +531 -0
- package/dist/{chunk-ORURYKNY.js → chunk-P23XFC4W.js} +1 -1
- package/dist/chunk-Q42DWR3T.js +264 -0
- package/dist/chunk-RFHSFIHF.js +14037 -0
- package/dist/{chunk-ZUEITFIJ.js → chunk-WSQ5QNIY.js} +1 -12
- package/dist/{chunk-TS3QGFKK.js → chunk-X4WT3TPU.js} +85 -6
- package/dist/{chunk-6AEK34XU.js → chunk-YVON2BHN.js} +11 -1
- package/dist/core/index.d.ts +68 -6
- package/dist/core/index.js +3 -9
- package/dist/{createHarness-RZUU6MJQ.js → createHarness-XHMR3QN3.js} +2 -3
- package/dist/front/index.d.ts +1 -2
- package/dist/front/index.js +2 -2
- package/dist/{harness-OsJBlx4u.d.ts → harness-DD0zj704.d.ts} +3 -11
- package/dist/piChatEvent-D0yuLiJh.d.ts +358 -0
- package/dist/protocol-B_OQKfbI.d.ts +104 -0
- package/dist/{workspaceAgentDispatcher-Cl3EBveh.d.ts → sandbox-DthfJaOB.d.ts} +1 -77
- package/dist/server/index.d.ts +28 -108
- package/dist/server/index.js +64 -10939
- package/dist/server/worker/index.d.ts +65 -0
- package/dist/server/worker/index.js +367 -0
- package/dist/shared/index.d.ts +26 -25
- package/dist/shared/index.js +22 -8
- package/dist/workspaceAgentDispatcher-D3ZEBsH1.d.ts +146 -0
- package/docs/ERROR_CODES.md +1 -1
- package/docs/runtime.md +6 -24
- package/package.json +8 -2
- package/dist/chunk-3WWLQAJB.js +0 -2794
- package/dist/chunk-AJZHR626.js +0 -85
- package/dist/chunk-ZD7MM2LQ.js +0 -14
- package/dist/piChatCommand-BuWXytap.d.ts +0 -60
- package/dist/session-FUiMWsyX.d.ts +0 -297
package/dist/server/index.d.ts
CHANGED
|
@@ -1,14 +1,15 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { W as WorkspaceRuntimeContext, S as Sandbox, a as Workspace, E as ExecOptions, b as ExecResult, c as WorkspaceChangeEvent } from '../sandbox-DthfJaOB.js';
|
|
2
|
+
import { R as RemoteWorkerWorkspaceOp, a as RemoteWorkerWorkspaceResult, b as RemoteWorkerExecRequest } from '../protocol-B_OQKfbI.js';
|
|
3
|
+
export { B as BwrapResourceLimits, C as CreateBwrapSandboxOptions, c as REMOTE_WORKER_PROVIDER, d as REMOTE_WORKER_RUNTIME_CWD, e as RemoteWorkerErrorPayload, f as RemoteWorkerExecResponse, g as RemoteWorkerFsEventEnvelope, W as WORKER_INTERNAL_TOKEN_HEADER, h as WORKER_REQUEST_ID_HEADER, i as WORKER_WORKSPACE_ID_HEADER, j as createBwrapSandbox } from '../protocol-B_OQKfbI.js';
|
|
4
|
+
import { S as SandboxHandleStore, a as SandboxHandleRecord, F as FileSearch, C as CompiledAgentBundle, P as PluginRestartWarning, W as WorkspaceAgentDispatcherContext, b as WorkspaceAgentDispatcher } from '../workspaceAgentDispatcher-D3ZEBsH1.js';
|
|
2
5
|
import { Sandbox as Sandbox$1 } from '@vercel/sandbox';
|
|
3
|
-
import {
|
|
4
|
-
export { w as
|
|
6
|
+
import { T as TelemetrySink, s as ToolReadinessRequirement, t as AgentConfig, a as Agent, i as AgentEvent, c as AgentActor, u as AgentTool, v as AgentHarnessFactory } from '../harness-DD0zj704.js';
|
|
7
|
+
export { w as AgentHarnessFactoryInput } from '../harness-DD0zj704.js';
|
|
5
8
|
import { FastifyInstance, FastifyRequest, FastifyPluginAsync } from 'fastify';
|
|
6
|
-
|
|
7
|
-
import { S as SessionCtx, f as ErrorCode } from '../session-FUiMWsyX.js';
|
|
9
|
+
import { E as ErrorCode, o as SessionCtx, C as ChatModelSelection } from '../piChatEvent-D0yuLiJh.js';
|
|
8
10
|
import { IncomingMessage, ServerResponse } from 'node:http';
|
|
9
11
|
import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
|
|
10
12
|
import { PackageSource, ExtensionFactory, SettingsManager } from '@mariozechner/pi-coding-agent';
|
|
11
|
-
import { a as ChatModelSelection } from '../piChatCommand-BuWXytap.js';
|
|
12
13
|
import 'zod';
|
|
13
14
|
|
|
14
15
|
interface CreateDirectSandboxOptions {
|
|
@@ -16,22 +17,6 @@ interface CreateDirectSandboxOptions {
|
|
|
16
17
|
}
|
|
17
18
|
declare function createDirectSandbox(opts?: CreateDirectSandboxOptions): Sandbox;
|
|
18
19
|
|
|
19
|
-
interface BwrapResourceLimits {
|
|
20
|
-
cpuSeconds?: number;
|
|
21
|
-
fileSizeBlocks?: number;
|
|
22
|
-
maxProcesses?: number;
|
|
23
|
-
openFiles?: number;
|
|
24
|
-
virtualMemoryKb?: number;
|
|
25
|
-
}
|
|
26
|
-
interface CreateBwrapSandboxOptions {
|
|
27
|
-
hostWorkspaceRoot?: string;
|
|
28
|
-
runtimeContext?: WorkspaceRuntimeContext;
|
|
29
|
-
network?: 'shared' | 'isolated';
|
|
30
|
-
dropAllCapabilities?: boolean;
|
|
31
|
-
resourceLimits?: BwrapResourceLimits;
|
|
32
|
-
}
|
|
33
|
-
declare function createBwrapSandbox(opts?: CreateBwrapSandboxOptions): Sandbox;
|
|
34
|
-
|
|
35
20
|
interface FileHandleStoreOptions {
|
|
36
21
|
storePath?: string;
|
|
37
22
|
}
|
|
@@ -557,91 +542,6 @@ interface RuntimeBundle {
|
|
|
557
542
|
filesystemBindings?: RuntimeFilesystemBinding[];
|
|
558
543
|
}
|
|
559
544
|
|
|
560
|
-
declare const REMOTE_WORKER_RUNTIME_CWD = "/workspace";
|
|
561
|
-
declare const REMOTE_WORKER_PROVIDER = "remote-worker";
|
|
562
|
-
declare const WORKER_INTERNAL_TOKEN_HEADER = "x-boring-internal-token";
|
|
563
|
-
declare const WORKER_WORKSPACE_ID_HEADER = "x-boring-workspace-id";
|
|
564
|
-
declare const WORKER_REQUEST_ID_HEADER = "x-boring-request-id";
|
|
565
|
-
type RemoteWorkerWorkspaceOp = {
|
|
566
|
-
op: 'readFile';
|
|
567
|
-
path: string;
|
|
568
|
-
} | {
|
|
569
|
-
op: 'readBinaryFile';
|
|
570
|
-
path: string;
|
|
571
|
-
} | {
|
|
572
|
-
op: 'writeFile';
|
|
573
|
-
path: string;
|
|
574
|
-
data: string;
|
|
575
|
-
} | {
|
|
576
|
-
op: 'writeBinaryFile';
|
|
577
|
-
path: string;
|
|
578
|
-
dataBase64: string;
|
|
579
|
-
} | {
|
|
580
|
-
op: 'readFileWithStat';
|
|
581
|
-
path: string;
|
|
582
|
-
} | {
|
|
583
|
-
op: 'writeFileWithStat';
|
|
584
|
-
path: string;
|
|
585
|
-
data: string;
|
|
586
|
-
} | {
|
|
587
|
-
op: 'writeBinaryFileWithStat';
|
|
588
|
-
path: string;
|
|
589
|
-
dataBase64: string;
|
|
590
|
-
} | {
|
|
591
|
-
op: 'unlink';
|
|
592
|
-
path: string;
|
|
593
|
-
} | {
|
|
594
|
-
op: 'readdir';
|
|
595
|
-
path: string;
|
|
596
|
-
} | {
|
|
597
|
-
op: 'stat';
|
|
598
|
-
path: string;
|
|
599
|
-
} | {
|
|
600
|
-
op: 'mkdir';
|
|
601
|
-
path: string;
|
|
602
|
-
recursive?: boolean;
|
|
603
|
-
} | {
|
|
604
|
-
op: 'rename';
|
|
605
|
-
from: string;
|
|
606
|
-
to: string;
|
|
607
|
-
};
|
|
608
|
-
type RemoteWorkerWorkspaceResult = {
|
|
609
|
-
content: string;
|
|
610
|
-
} | {
|
|
611
|
-
dataBase64: string;
|
|
612
|
-
} | {
|
|
613
|
-
stat: Stat;
|
|
614
|
-
} | {
|
|
615
|
-
content: string;
|
|
616
|
-
stat: Stat;
|
|
617
|
-
} | {
|
|
618
|
-
entries: Entry[];
|
|
619
|
-
} | {
|
|
620
|
-
ok: true;
|
|
621
|
-
};
|
|
622
|
-
interface RemoteWorkerExecRequest {
|
|
623
|
-
cmd: string;
|
|
624
|
-
cwd?: string;
|
|
625
|
-
env?: Record<string, string>;
|
|
626
|
-
timeoutMs?: number;
|
|
627
|
-
maxOutputBytes?: number;
|
|
628
|
-
}
|
|
629
|
-
interface RemoteWorkerExecResponse extends Omit<ExecResult, 'stdout' | 'stderr'> {
|
|
630
|
-
stdoutBase64: string;
|
|
631
|
-
stderrBase64: string;
|
|
632
|
-
}
|
|
633
|
-
interface RemoteWorkerErrorPayload {
|
|
634
|
-
error: {
|
|
635
|
-
code: string;
|
|
636
|
-
message: string;
|
|
637
|
-
statusCode?: number;
|
|
638
|
-
details?: unknown;
|
|
639
|
-
};
|
|
640
|
-
}
|
|
641
|
-
interface RemoteWorkerFsEventEnvelope {
|
|
642
|
-
event: WorkspaceChangeEvent;
|
|
643
|
-
}
|
|
644
|
-
|
|
645
545
|
interface RemoteWorkerClientOptions {
|
|
646
546
|
baseUrl: string;
|
|
647
547
|
token: string;
|
|
@@ -790,6 +690,24 @@ interface ResolveModeOptions {
|
|
|
790
690
|
}
|
|
791
691
|
declare function resolveMode(mode?: RuntimeModeId, opts?: ResolveModeOptions): RuntimeModeAdapter;
|
|
792
692
|
|
|
693
|
+
declare function createAgent(config: AgentConfig): Agent;
|
|
694
|
+
|
|
695
|
+
type AgentDirectoryCompilerErrorCode = 'AGENT_DIRECTORY_NOT_FOUND' | 'AGENT_DIRECTORY_NOT_DIRECTORY' | 'AGENT_MANIFEST_NOT_FOUND' | 'AGENT_MANIFEST_NOT_FILE' | 'AGENT_MANIFEST_INVALID_UTF8' | 'AGENT_MANIFEST_INVALID_JSON' | 'AGENT_ASSET_NOT_FOUND' | 'AGENT_ASSET_NOT_FILE' | 'AGENT_ASSET_INVALID_UTF8' | 'AGENT_PATH_SYMLINK_ESCAPE' | 'AGENT_PATH_CHANGED_DURING_READ' | 'AGENT_DIRECTORY_IO_FAILED';
|
|
696
|
+
type AgentDirectoryCompilerPublicErrorCode = Extract<ErrorCode, 'CONFIG_INVALID' | 'PATH_NOT_FOUND' | 'PATH_SYMLINK_ESCAPE'>;
|
|
697
|
+
declare class AgentDirectoryCompilerError extends Error {
|
|
698
|
+
readonly code: AgentDirectoryCompilerPublicErrorCode;
|
|
699
|
+
readonly compilerCode: AgentDirectoryCompilerErrorCode;
|
|
700
|
+
readonly field: string;
|
|
701
|
+
constructor(input: {
|
|
702
|
+
code: AgentDirectoryCompilerPublicErrorCode;
|
|
703
|
+
compilerCode: AgentDirectoryCompilerErrorCode;
|
|
704
|
+
field: string;
|
|
705
|
+
message: string;
|
|
706
|
+
cause?: unknown;
|
|
707
|
+
});
|
|
708
|
+
}
|
|
709
|
+
declare function compileAgentDirectory(directory: string): Promise<CompiledAgentBundle>;
|
|
710
|
+
|
|
793
711
|
declare const MANAGED_AGENT_MCP_ORIGIN_SURFACE = "mcp-managed-agent";
|
|
794
712
|
declare const MANAGED_AGENT_MCP_DELIVERY_RULE = "M1-pr1 DELIVERY v0: delegate_task returns final assistant text and artifact file references only; share-link delivery is gated on PR #424.";
|
|
795
713
|
type ManagedAgentDelegationStatus = 'running' | 'completed' | 'error';
|
|
@@ -1332,6 +1250,8 @@ interface RegisterAgentRoutesOptions {
|
|
|
1332
1250
|
runtimeLayout: BoringAgentRuntimePaths;
|
|
1333
1251
|
provisioningAdapter?: WorkspaceProvisioningAdapter;
|
|
1334
1252
|
request?: FastifyRequest;
|
|
1253
|
+
/** Aborted when this binding retires; retirement still drains the task before provider disposal. */
|
|
1254
|
+
signal: AbortSignal;
|
|
1335
1255
|
}) => WorkspaceProvisioningResult | undefined | Promise<WorkspaceProvisioningResult | undefined>;
|
|
1336
1256
|
provisionWorkspace?: boolean;
|
|
1337
1257
|
/** Optional hook called before /api/v1/agent/reload reloads the harness. */
|
|
@@ -1379,4 +1299,4 @@ interface Logger {
|
|
|
1379
1299
|
}
|
|
1380
1300
|
declare function createLogger(prefix: string): Logger;
|
|
1381
1301
|
|
|
1382
|
-
export {
|
|
1302
|
+
export { AgentConfig, AgentDirectoryCompilerError, type AgentDirectoryCompilerErrorCode, type AgentDirectoryCompilerPublicErrorCode, AgentHarnessFactory, type AgentMeteringSink, type BoringAgentRuntimePaths, type BuiltinRuntimeModeId, type CreateAgentAppOptions, type CreateVercelProvisioningAdapterOptions, type DeploymentSnapshotProvider, type DeploymentSnapshotRecipe, type DeploymentSnapshotResult, type DeploymentSnapshotStatus, FileHandleStore, type LogFields, type Logger, MANAGED_AGENT_MCP_DELIVERY_RULE, MANAGED_AGENT_MCP_ORIGIN_SURFACE, type ManagedAgentArtifactRef, type ManagedAgentCollectArtifactsInput, type ManagedAgentDelegateInput, type ManagedAgentDelegateProgress, type ManagedAgentDelegateRequestContext, type ManagedAgentDelegateResult, type ManagedAgentDelegateStatus, type ManagedAgentDelegateStatusResult, ManagedAgentMcpDelegateController, type ManagedAgentMcpDelegateOptions, ManagedAgentMcpError, type ManagedAgentMcpHttpHandlerOptions, type ManagedAgentMcpServerOptions, type ManagedAgentSafeError, type MeteringErrorLogger, type MeteringReleaseInput, type MeteringReleaseReason, type MeteringReservationResult, type MeteringReserveInput, type MeteringRunKind, type MeteringRunScope, type MeteringRunStatus, type MeteringSettleInput, type MeteringUsage, type MeteringUsageInput, type ModeContext, PI_PACKAGE_RESOURCE_FILTERS, type PiExtensionFactory, type PiHarnessOptions, type PiPackageSource, type PluginSkillSource, type ProvisionRuntimeWorkspaceOptions, type ProvisionWorkspaceRuntimeOptions, type ProvisioningArtifactRequest, type RegisterAgentRoutesOptions, RemoteWorkerClient, RemoteWorkerClientError, type RemoteWorkerClientOptions, RemoteWorkerExecRequest, type RemoteWorkerModeAdapterOptions, RemoteWorkerWorkspaceOp, RemoteWorkerWorkspaceResult, type RuntimeBundle, type RuntimeEnvContribution, type RuntimeEnvContributionContext, type RuntimeFilesystemBinding, type RuntimeFilesystemBindingOperations, type RuntimeModeAdapter, type RuntimeModeId, type RuntimeNodePackageSpec$1 as RuntimeNodePackageSpec, type RuntimeProvisioningContribution$1 as RuntimeProvisioningContribution, type RuntimePythonSpec$1 as RuntimePythonSpec, type RuntimeTemplateContribution$1 as RuntimeTemplateContribution, type RuntimeWorkspaceProvisioningResult, type SnapshotBakeOptions, type SnapshotBakeResult, UV_SETUP_COMMANDS, VERCEL_PROVISIONING_CACHE_ROOT, VERCEL_SANDBOX_WORKSPACE_ROOT, UV_SETUP_COMMANDS as VERCEL_UV_SETUP_COMMANDS, type VercelBakeClient, type VercelBakeSandbox, type VercelDeploymentSnapshotOptions, type WorkspaceAgentDispatcherResolveOptions, type WorkspaceAgentDispatcherResolver, type WorkspaceProvisioningAdapter, type WorkspaceProvisioningExecResult, type WorkspaceProvisioningResult, applyCspHeaders, autoDetectMode, bakeSnapshotIfNeeded, buildDeploymentSnapshotRecipe, buildPackageHash, buildSnapshotRecipeHash, compactPiPackages, compileAgentDirectory, constantTimeTokenEqual, createAgent, createAgentApp, createDirectSandbox, createLogger, createManagedAgentMcpDelegateController, createManagedAgentMcpHttpHandler, createManagedAgentMcpServer, createNodeWorkspace, createRemoteWorkerModeAdapter, createRemoteWorkerSandbox, createRemoteWorkerWorkspace, createResourceSettingsManager, createVercelDeploymentSnapshotProvider, createVercelProvisioningAdapter, createVercelSandboxWorkspace, decodeBytesFromWorker, encodeBytesForWorker, fileRoutes, getBoringAgentPathEntries, getBoringAgentRuntimeEnv, getBoringAgentRuntimePaths, hasBwrap, mergePiPackageSources, normalizeMeteringUsage, piPackageSourceKey, prepareDeploymentSnapshot, prepareVercelDeploymentSnapshot, provisionRuntimeWorkspace, provisionWorkspaceRuntime, registerAgentRoutes, resolveMode, resolveSandboxHandle };
|