@hachej/boring-agent 0.1.105 → 0.1.107
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-K25PK5EC.js → chunk-3JFPS2O6.js} +1 -0
- package/dist/{chunk-JNEKOVMJ.js → chunk-6OANSUEI.js} +1 -1
- package/dist/{chunk-4IQ4HHBG.js → chunk-7XAOVFSN.js} +7 -0
- package/dist/{chunk-F2OJI2LX.js → chunk-GS4ADE34.js} +863 -358
- package/dist/{chunk-LFN45QDZ.js → chunk-KDXIXVF6.js} +5076 -3640
- package/dist/{chunk-6DRHERVK.js → chunk-MVKXLMH3.js} +44 -2
- package/dist/chunk-YTUZFKB3.js +78 -0
- package/dist/core/index.d.ts +5 -5
- package/dist/core/index.js +2 -2
- package/dist/{createHarness-GMBZZPTN.js → createHarness-AHWSC36D.js} +3 -3
- package/dist/{errors-DH7C01Pm.d.ts → errors-CEU4iujR.d.ts} +59 -4
- package/dist/{file-search-qcD5zItr.d.ts → file-search-BGUHnW9o.d.ts} +3 -3
- package/dist/front/index.d.ts +36 -7
- package/dist/front/index.js +1491 -727
- package/dist/front/styles.css +57 -0
- package/dist/{harness-Dcd08yKr.d.ts → harness-Ct0e4RWc.d.ts} +6 -3
- package/dist/{lease-DffrPrQn.d.ts → lease-nASWv2tU.d.ts} +1 -1
- package/dist/{piChatEvent-iNSXiFQq.d.ts → piChatEvent-BUWIzw5l.d.ts} +67 -36
- package/dist/{piChatSessionService-DQSQ_kWZ.d.ts → piChatSessionService-nvroRAVk.d.ts} +13 -11
- package/dist/server/agent-host/testing/gatewayConformance.d.ts +6 -5
- package/dist/server/agent-host/testing/gatewayConformance.js +57 -8
- package/dist/server/index.d.ts +167 -212
- package/dist/server/index.js +13 -9
- package/dist/server/worker/index.js +7 -7
- package/dist/shared/index.d.ts +34 -28
- package/dist/shared/index.js +8 -8
- package/dist/{types-BTsdaAQ2.d.ts → types-B7-PN5jV.d.ts} +47 -14
- package/docs/AGENT_GATEWAY_V0.md +40 -2
- package/docs/ERROR_CODES.md +1 -0
- package/docs/README.md +1 -0
- package/docs/SESSION_IDENTITY.md +91 -0
- package/docs/tools.md +4 -0
- package/package.json +11 -10
- package/dist/chunk-WSQ5QNIY.js +0 -18
package/dist/server/index.d.ts
CHANGED
|
@@ -1,22 +1,23 @@
|
|
|
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
|
|
2
|
-
export { A as AgentGatewayEffect, H as AgentHostDescription, I as AgentHostDirectProjectionOptions, J as AgentHostDispatcherRunInput, K as AgentHostEnvironmentLease, L as AgentHostHandle, N as
|
|
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 ResolvedPiHarnessOptions, 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-B7-PN5jV.js';
|
|
2
|
+
export { A as AgentGatewayEffect, H as AgentHostDescription, I as AgentHostDirectProjectionOptions, J as AgentHostDispatcherRunInput, K as AgentHostEnvironmentLease, L as AgentHostHandle, N as DEFAULT_AGENT_TYPE_ID, O as MeteringErrorLogger, Q as MeteringReleaseInput, S as MeteringReleaseReason, T as MeteringReservationResult, U as MeteringReserveInput, V as MeteringRunKind, X as MeteringRunScope, Y as MeteringRunStatus, Z as MeteringSettleInput, _ as MeteringUsage, $ as MeteringUsageInput, a0 as PI_PACKAGE_RESOURCE_FILTERS, a1 as PiExtensionFactory, a2 as PluginSkillSource, a3 as ResolvedEnvironmentScope, a4 as RuntimeFilesystemBindingOperations, a5 as RuntimeNodePackageSpec, a6 as RuntimeProvisioningContribution, a7 as RuntimePythonSpec, a8 as RuntimeTemplateContribution, a9 as WorkspaceProvisioningExecResult, aa as compactPiPackages, ab as mergePiPackageSources, ac as normalizeMeteringUsage, ad as piPackageSourceKey } from '../types-B7-PN5jV.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';
|
|
6
6
|
export { d as REMOTE_WORKER_EXCLUSIVE_BINARY_CREATE_CAPABILITY, e as REMOTE_WORKER_PROVIDER, f as REMOTE_WORKER_RUNTIME_CWD, g as RemoteWorkerErrorPayload, h as RemoteWorkerExecResponse, i as RemoteWorkerFsEventEnvelope, W as WORKER_INTERNAL_TOKEN_HEADER, j as WORKER_REQUEST_ID_HEADER, k as WORKER_WORKSPACE_ID_HEADER, l as createAgentAuthMiddleware } from '../middleware-CaAEXpi5.js';
|
|
7
7
|
import { SandboxProviderV1, WorkspaceSandboxPairV1 } from '@hachej/boring-sandbox/shared';
|
|
8
8
|
import { BwrapSandboxProviderOptions } from '@hachej/boring-sandbox/providers/bwrap';
|
|
9
|
-
import { F as SandboxHandleStore, k as CompiledAgentBundle, a as Sha256Digest, i as AgentDeployment, M as ShareEntryStore, y as ProviderId, c as CredentialFieldId, B as ResolvedCredentialMaterialV1, d as AuthorizedWorkspaceCredentialScopeV1, V as VerifiedWorkspaceCredentialAuthorityV1, X as WorkspaceCredentialAuthorityVerifierV1, n as CredentialConsumerBindingRegistryV1, z as ProviderRegistryV1, Y as WorkspaceCredentialResolverV1, P as ProviderCredentialRefV1, R as ResolvedCredentialLeaseV1 } from '../lease-
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
|
|
13
|
-
|
|
9
|
+
import { F as SandboxHandleStore, k as CompiledAgentBundle, a as Sha256Digest, i as AgentDeployment, M as ShareEntryStore, y as ProviderId, c as CredentialFieldId, B as ResolvedCredentialMaterialV1, d as AuthorizedWorkspaceCredentialScopeV1, V as VerifiedWorkspaceCredentialAuthorityV1, X as WorkspaceCredentialAuthorityVerifierV1, n as CredentialConsumerBindingRegistryV1, z as ProviderRegistryV1, Y as WorkspaceCredentialResolverV1, P as ProviderCredentialRefV1, R as ResolvedCredentialLeaseV1 } from '../lease-nASWv2tU.js';
|
|
10
|
+
import { z as ErrorCode, o as SessionCtx, a as SessionListOptions, b as SessionSummary, c as PiChatSnapshot, d as PiChatEvent, e as PromptReceipt, F as FollowUpPayload, f as FollowUpReceipt, Q as QueueClearPayload, g as QueueClearReceipt, I as InterruptPayload, h as CommandReceipt, i as StopPayload, j as StopReceipt, S as SessionStore } from '../piChatEvent-BUWIzw5l.js';
|
|
11
|
+
import { B as JsonValue, A as AgentGateway, a as AuthorizedAgentScope, b as AgentSessionRef, c as AgentSessionActivity, V as VerifiedAgentScopeClaim, g as AgentAccessOperation, f as AgentAccessDecision, k as AgentGatewayErrorDTO, r as AgentSessionSummary, q as AgentSessionStateSnapshot, n as AgentSessionConnection } from '../errors-CEU4iujR.js';
|
|
12
|
+
export { F as ResolveAgentAccess, G as ResolveAgentAccessInput } from '../errors-CEU4iujR.js';
|
|
13
|
+
import { d as AgentActor, j as AgentEvent, w as TelemetrySink, s as AgentTool, D as AgentHarnessFactory, A as AgentHarness } from '../harness-Ct0e4RWc.js';
|
|
14
|
+
export { u as AgentConfig, E as AgentHarnessFactoryInput } from '../harness-Ct0e4RWc.js';
|
|
14
15
|
import { IncomingMessage, ServerResponse } from 'node:http';
|
|
15
16
|
import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
|
|
16
17
|
import { FastifyRequest, FastifyInstance, FastifyPluginCallback } from 'fastify';
|
|
17
|
-
import { i as PiSessionRequestContext,
|
|
18
|
-
import { c as WorkspaceAgentDirectRunInput, W as WorkspaceAgentDirectRunCallback, f as WorkspaceAgentDispatcherContext, e as WorkspaceAgentDispatcher, i as WorkspaceAgentGatewayBinding } from '../file-search-
|
|
19
|
-
export { L as LeaseBoundWorkspaceAgent } from '../file-search-
|
|
18
|
+
import { i as PiSessionRequestContext, j as AgentPromptPayload, k as PiChatAttachmentResult } from '../piChatSessionService-nvroRAVk.js';
|
|
19
|
+
import { c as WorkspaceAgentDirectRunInput, W as WorkspaceAgentDirectRunCallback, f as WorkspaceAgentDispatcherContext, e as WorkspaceAgentDispatcher, i as WorkspaceAgentGatewayBinding } from '../file-search-BGUHnW9o.js';
|
|
20
|
+
export { L as LeaseBoundWorkspaceAgent } from '../file-search-BGUHnW9o.js';
|
|
20
21
|
import { SettingsManager } from '@mariozechner/pi-coding-agent';
|
|
21
22
|
import '@hachej/boring-bash/agent';
|
|
22
23
|
import '@hachej/boring-sandbox/providers/node-workspace';
|
|
@@ -204,7 +205,7 @@ declare function createBlaxelSandboxModeAdapter(options: {
|
|
|
204
205
|
}): RuntimeModeAdapter;
|
|
205
206
|
|
|
206
207
|
interface ProviderRuntimeModeAdapterOptions {
|
|
207
|
-
id:
|
|
208
|
+
id: RuntimeModeId;
|
|
208
209
|
provider: SandboxProviderV1;
|
|
209
210
|
runtimeHost: AgentRuntimeHostOperations;
|
|
210
211
|
workspaceFsCapability: 'strong' | 'best-effort';
|
|
@@ -226,7 +227,7 @@ interface SandboxRuntimeModeOptions {
|
|
|
226
227
|
}
|
|
227
228
|
/** Built-in runtime layout root without exposing provider package constants to consumers. */
|
|
228
229
|
declare function resolveBuiltinRuntimeLayoutRoot(mode: BuiltinRuntimeModeId, workspaceRoot: string): string;
|
|
229
|
-
declare function createSandboxRuntimeModeAdapter(mode:
|
|
230
|
+
declare function createSandboxRuntimeModeAdapter(mode: RuntimeModeId, options?: SandboxRuntimeModeOptions): RuntimeModeAdapter;
|
|
230
231
|
|
|
231
232
|
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_MANIFEST_MISSING_BORING_AGENT' | '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';
|
|
232
233
|
type AgentDirectoryCompilerPublicErrorCode = Extract<ErrorCode, 'CONFIG_INVALID' | 'PATH_NOT_FOUND' | 'PATH_SYMLINK_ESCAPE'>;
|
|
@@ -407,11 +408,10 @@ declare class FleetConfigError extends Error {
|
|
|
407
408
|
* descriptors, `.agents/factory/policy.yaml` `models.seats` tiers, and the
|
|
408
409
|
* priority-ordered `models.tiers` candidates declared in fleet.yaml.
|
|
409
410
|
*
|
|
410
|
-
* Fails
|
|
411
|
-
*
|
|
412
|
-
*
|
|
413
|
-
*
|
|
414
|
-
* since there is no seat set to fail closed against.
|
|
411
|
+
* Fails startup when any configured seat cannot materialize or verify. Only
|
|
412
|
+
* genuinely unseated discovered packages remain nonfatal diagnostics. Whole-
|
|
413
|
+
* fleet config errors (including unreadable/malformed fleet or policy YAML)
|
|
414
|
+
* throw `FleetConfigError`.
|
|
415
415
|
*/
|
|
416
416
|
declare function loadConfiguredAgentFleet(options: LoadConfiguredAgentFleetOptions): Promise<LoadConfiguredAgentFleetResult>;
|
|
417
417
|
|
|
@@ -449,12 +449,14 @@ declare function resolveAgentInstructionFileRefs(input: {
|
|
|
449
449
|
readonly workspaceRoot: string | null | undefined;
|
|
450
450
|
}): Promise<ResolvedInstructionFileRefs>;
|
|
451
451
|
|
|
452
|
-
|
|
452
|
+
/**
|
|
453
|
+
* A real, regular Agent used by hosts that do not opt into authored fleet
|
|
454
|
+
* discovery. Platform host adapters preserve the established `default` ID's
|
|
455
|
+
* plugin, skill, and transcript behavior without a separate pseudo-Agent type.
|
|
456
|
+
*/
|
|
457
|
+
declare const DEFAULT_AGENT_FLEET: readonly AgentHostAgentSpec[];
|
|
453
458
|
interface ResolveDefaultAgentFleetOptions {
|
|
454
|
-
/**
|
|
455
|
-
* Repository root used to resolve `.agents/{factory,skills}` when
|
|
456
|
-
* `BORING_AGENT_FLEET=1` composes the fleet. Defaults to `process.cwd()`.
|
|
457
|
-
*/
|
|
459
|
+
/** Repository root used to resolve `.agents/{factory,skills}`. Defaults to `process.cwd()`. */
|
|
458
460
|
readonly repositoryRoot?: string;
|
|
459
461
|
/** Asset-manager scan results supplied by the workspace/CLI boot layer. */
|
|
460
462
|
readonly discoveredPackages?: readonly DiscoveredAgentPackageDescriptor[];
|
|
@@ -462,24 +464,12 @@ interface ResolveDefaultAgentFleetOptions {
|
|
|
462
464
|
readonly env?: NodeJS.ProcessEnv;
|
|
463
465
|
}
|
|
464
466
|
/**
|
|
465
|
-
*
|
|
466
|
-
* from boot-injected plugin scan descriptors plus `.agents/factory` under `repositoryRoot`
|
|
467
|
-
* alongside the default agent; flag absent preserves the legacy
|
|
468
|
-
* single-default-agent boot byte-identically. Shared by
|
|
469
|
-
* `createWorkspaceAgentServer`, `createCoreWorkspaceAgentServer`, and the CLI
|
|
470
|
-
* hub — one composition path for every production/CLI entry point.
|
|
467
|
+
* Resolves one deployment-static fleet for Core, Workspace, and CLI hosts.
|
|
471
468
|
*
|
|
472
|
-
*
|
|
473
|
-
*
|
|
474
|
-
*
|
|
475
|
-
*
|
|
476
|
-
* - Whole fleet: a missing/malformed `fleet.yaml` or `policy.yaml` would
|
|
477
|
-
* otherwise throw `FleetConfigError` out of the boot path. That throw is
|
|
478
|
-
* preserved for direct/programmatic callers of `loadConfiguredAgentFleet`
|
|
479
|
-
* (e.g. the playground, tests), but this boot-seam wrapper catches it and
|
|
480
|
-
* degrades to the legacy default-agent-only fleet plus a logged
|
|
481
|
-
* diagnostic — a container with the flag on and no `.agents/` tree must
|
|
482
|
-
* still boot.
|
|
469
|
+
* The built-in default is a regular configured Agent. When authored fleet
|
|
470
|
+
* discovery is enabled it remains available alongside discovered seats so old
|
|
471
|
+
* `default` session references stay routable. Invalid enabled fleet
|
|
472
|
+
* composition fails boot; it never degrades to a pseudo-Agent.
|
|
483
473
|
*/
|
|
484
474
|
declare function resolveDefaultAgentFleet(options: ResolveDefaultAgentFleetOptions): Promise<readonly AgentHostAgentSpec[]>;
|
|
485
475
|
|
|
@@ -841,6 +831,12 @@ interface CreateStandaloneAgentHostAppOptions {
|
|
|
841
831
|
}) => Promise<void>;
|
|
842
832
|
sessionDir?: string;
|
|
843
833
|
sessionRoot?: string;
|
|
834
|
+
/**
|
|
835
|
+
* Durable request ledger file. Host application state, not workspace content:
|
|
836
|
+
* point it at host-owned storage. Defaults per
|
|
837
|
+
* {@link resolveRequestLedgerPath}.
|
|
838
|
+
*/
|
|
839
|
+
requestLedgerPath?: string;
|
|
844
840
|
externalPlugins?: boolean;
|
|
845
841
|
beforeReload?: () => void | {
|
|
846
842
|
readonly diagnostics?: ReadonlyArray<{
|
|
@@ -891,173 +887,6 @@ interface AgentHostEnvironmentHttpProjectionOptions {
|
|
|
891
887
|
*/
|
|
892
888
|
declare function registerAgentHostEnvironmentRoutes(app: FastifyInstance, options: AgentHostEnvironmentHttpProjectionOptions): Promise<void>;
|
|
893
889
|
|
|
894
|
-
interface EventStreamReadResult {
|
|
895
|
-
events: Array<{
|
|
896
|
-
data: unknown;
|
|
897
|
-
offset: string;
|
|
898
|
-
}>;
|
|
899
|
-
nextOffset: string;
|
|
900
|
-
upToDate: boolean;
|
|
901
|
-
closed: boolean;
|
|
902
|
-
}
|
|
903
|
-
interface EventStreamMeta {
|
|
904
|
-
nextOffset: string;
|
|
905
|
-
closed: boolean;
|
|
906
|
-
}
|
|
907
|
-
interface EventStreamStore {
|
|
908
|
-
createStream(path: string): Promise<void>;
|
|
909
|
-
appendEvent(path: string, event: unknown): Promise<string>;
|
|
910
|
-
appendEventOnce(path: string, key: string, event: unknown): Promise<string>;
|
|
911
|
-
appendAgentEvent(sessionId: string, chunk: PiChatEvent, opts?: {
|
|
912
|
-
idempotencyKey?: string;
|
|
913
|
-
streamPath?: string;
|
|
914
|
-
}): Promise<string>;
|
|
915
|
-
readEvents(path: string, opts?: {
|
|
916
|
-
offset?: string;
|
|
917
|
-
limit?: number;
|
|
918
|
-
}): Promise<EventStreamReadResult>;
|
|
919
|
-
closeStream(path: string): Promise<void>;
|
|
920
|
-
getStreamMeta(path: string): Promise<EventStreamMeta | null>;
|
|
921
|
-
subscribe(path: string, listener: () => void): () => void;
|
|
922
|
-
}
|
|
923
|
-
|
|
924
|
-
interface HarnessPiChatServiceOptions {
|
|
925
|
-
harness: AgentHarness;
|
|
926
|
-
sessionStore: SessionStore;
|
|
927
|
-
workdir: string;
|
|
928
|
-
workspace?: Workspace;
|
|
929
|
-
eventStore?: EventStreamStore;
|
|
930
|
-
/**
|
|
931
|
-
* Optional host billing sink. When set, accepted prompts/follow-ups reserve
|
|
932
|
-
* before execution (a rejecting sink blocks the request), native assistant
|
|
933
|
-
* usage is recorded per message, and every run settles or releases from
|
|
934
|
-
* native terminal lifecycle.
|
|
935
|
-
*/
|
|
936
|
-
metering?: AgentMeteringSink;
|
|
937
|
-
/** Host-owned process-lifetime projection of live session activity. */
|
|
938
|
-
onEvent?: (sessionId: string, event: PiChatEvent) => void;
|
|
939
|
-
/** Receives non-fatal metering pipeline failures (default: console.warn). */
|
|
940
|
-
meteringLogger?: MeteringErrorLogger;
|
|
941
|
-
/** Canonical HTTP projection for lazily loaded persisted attachment bytes. */
|
|
942
|
-
attachmentUrl?: (input: {
|
|
943
|
-
readonly sessionId: string;
|
|
944
|
-
readonly messageId: string;
|
|
945
|
-
readonly index: number;
|
|
946
|
-
readonly data?: string;
|
|
947
|
-
readonly mediaType?: string;
|
|
948
|
-
readonly filename?: string;
|
|
949
|
-
}) => string;
|
|
950
|
-
}
|
|
951
|
-
declare class HarnessPiChatService implements PiChatSessionService {
|
|
952
|
-
private readonly harness;
|
|
953
|
-
private readonly sessionStore;
|
|
954
|
-
private readonly workdir;
|
|
955
|
-
private readonly workspace?;
|
|
956
|
-
private readonly eventStore?;
|
|
957
|
-
private readonly onEvent?;
|
|
958
|
-
private readonly attachmentUrl?;
|
|
959
|
-
private readonly channels;
|
|
960
|
-
private readonly channelCreations;
|
|
961
|
-
private readonly sessionGenerations;
|
|
962
|
-
private readonly messageMetadata;
|
|
963
|
-
private readonly activePromptRuns;
|
|
964
|
-
private readonly syntheticPromptFailures;
|
|
965
|
-
private readonly activeSyntheticPromptErrors;
|
|
966
|
-
private readonly liveAttachments;
|
|
967
|
-
private readonly lifecycle;
|
|
968
|
-
private readonly metering?;
|
|
969
|
-
private disposePromise?;
|
|
970
|
-
constructor(options: HarnessPiChatServiceOptions);
|
|
971
|
-
/** Test/diagnostic hook: resolves once queued metering sink calls settle. */
|
|
972
|
-
flushMetering(): Promise<void>;
|
|
973
|
-
dispose(): Promise<void>;
|
|
974
|
-
private disposeService;
|
|
975
|
-
listSessions(ctx: PiSessionRequestContext, options?: SessionListOptions): Promise<SessionSummary[]>;
|
|
976
|
-
createSession(ctx: PiSessionRequestContext, init?: PiSessionCreateInit): Promise<SessionSummary>;
|
|
977
|
-
deleteSession(ctx: PiSessionRequestContext, sessionId: string): Promise<void>;
|
|
978
|
-
private deleteSessionBeforeDispose;
|
|
979
|
-
readAttachment(ctx: PiSessionRequestContext, sessionId: string, messageId: string, index: number): Promise<{
|
|
980
|
-
readonly data: Uint8Array;
|
|
981
|
-
readonly mediaType: string;
|
|
982
|
-
readonly filename?: string;
|
|
983
|
-
}>;
|
|
984
|
-
readState(ctx: PiSessionRequestContext, sessionId: string): Promise<PiChatSnapshot>;
|
|
985
|
-
private readStateBeforeDispose;
|
|
986
|
-
/**
|
|
987
|
-
* The persisted transcript can lag the live adapter: transcript writes are
|
|
988
|
-
* asynchronous, and some harnesses never persist transcripts at all. A
|
|
989
|
-
* persisted refresh whose seq fences the live replay buffer while its
|
|
990
|
-
* messages are missing would permanently hide those turns from a hydrating
|
|
991
|
-
* client (it starts "caught up" at that seq with an empty timeline), so
|
|
992
|
-
* refresh from persisted state only when it carries at least as much
|
|
993
|
-
* rendered history as the live adapter.
|
|
994
|
-
*/
|
|
995
|
-
private persistedStateDropsLiveMessages;
|
|
996
|
-
private canRefreshFromPersistedState;
|
|
997
|
-
private harnessMayHaveLiveSession;
|
|
998
|
-
private attachmentUrlFor;
|
|
999
|
-
private readPersistedState;
|
|
1000
|
-
subscribe(ctx: PiSessionRequestContext, sessionId: string, cursor: number, subscriber: PiChatEventSubscriber): Promise<PiChatEventStreamResult>;
|
|
1001
|
-
private subscribeBeforeDispose;
|
|
1002
|
-
prompt(ctx: PiSessionRequestContext, sessionId: string, payload: PromptPayload): Promise<PromptReceipt>;
|
|
1003
|
-
private promptBeforeDispose;
|
|
1004
|
-
followUp(ctx: PiSessionRequestContext, sessionId: string, payload: FollowUpPayload): Promise<FollowUpReceipt>;
|
|
1005
|
-
private followUpBeforeDispose;
|
|
1006
|
-
clearQueue(ctx: PiSessionRequestContext, sessionId: string, payload: QueueClearPayload): Promise<QueueClearReceipt>;
|
|
1007
|
-
private clearQueueBeforeDispose;
|
|
1008
|
-
interrupt(ctx: PiSessionRequestContext, sessionId: string, _payload: InterruptPayload): Promise<{
|
|
1009
|
-
accepted: true;
|
|
1010
|
-
cursor: number;
|
|
1011
|
-
}>;
|
|
1012
|
-
private interruptBeforeDispose;
|
|
1013
|
-
stop(ctx: PiSessionRequestContext, sessionId: string, _payload: StopPayload): Promise<StopReceipt>;
|
|
1014
|
-
private stopBeforeDispose;
|
|
1015
|
-
private clearAllFollowUps;
|
|
1016
|
-
private nextFollowUpForInterrupt;
|
|
1017
|
-
private autoPostInterruptedFollowUp;
|
|
1018
|
-
private runPrompt;
|
|
1019
|
-
private trackActiveRun;
|
|
1020
|
-
private clearAutoPostedFollowUpForFallback;
|
|
1021
|
-
private canClearAutoPostedFollowUpForFallback;
|
|
1022
|
-
private enrichSyntheticPromptFailures;
|
|
1023
|
-
private publishAutoPostedFollowUpRunError;
|
|
1024
|
-
private publishChannelEvents;
|
|
1025
|
-
private publishChannelEventSync;
|
|
1026
|
-
private publishPromptRunError;
|
|
1027
|
-
private runAndDrainPublishQueue;
|
|
1028
|
-
private drainPublishQueue;
|
|
1029
|
-
private getAdapter;
|
|
1030
|
-
private getChannel;
|
|
1031
|
-
private ensureChannel;
|
|
1032
|
-
/** Coalesce concurrent cold callers so only one adapter subscription wins. */
|
|
1033
|
-
private createChannelOnce;
|
|
1034
|
-
private generationOf;
|
|
1035
|
-
private assertSessionIncarnation;
|
|
1036
|
-
private buildChannel;
|
|
1037
|
-
/** Cheap cold-snapshot seq lookup (no buffer hydration) — see {@link hydrateDurableReplayBuffer} for the live-channel path. */
|
|
1038
|
-
private readDurableLatestPiChatSeq;
|
|
1039
|
-
/**
|
|
1040
|
-
* On cold channel construction, rehydrate a fresh {@link PiChatReplayBuffer}
|
|
1041
|
-
* from the durable event store (when present) so resuming clients replay
|
|
1042
|
-
* genuinely — not merely resume seq counting from a high-water-mark with an
|
|
1043
|
-
* empty buffer, which forces every behind-the-tip cursor into
|
|
1044
|
-
* `PI_CHAT_REPLAY_GAP`. Reads at most the buffer's own retention window
|
|
1045
|
-
* (`DEFAULT_REPLAY_BUFFER_MAX_EVENTS`) worth of trailing entries — older
|
|
1046
|
-
* history is already outside what the in-memory buffer would retain even
|
|
1047
|
-
* across a live process, so this preserves prior semantics for very long
|
|
1048
|
-
* streams while fixing the common "just restarted" resume case.
|
|
1049
|
-
*/
|
|
1050
|
-
private hydrateDurableReplayBuffer;
|
|
1051
|
-
/**
|
|
1052
|
-
* Validate the persisted session identity and instantiate its lazily-created
|
|
1053
|
-
* Pi adapter under the same full cache key. This is intentionally a narrow
|
|
1054
|
-
* trusted-host seam rather than another browser route.
|
|
1055
|
-
*/
|
|
1056
|
-
ensurePiSessionBound(ctx: PiSessionRequestContext, sessionId: string): Promise<void>;
|
|
1057
|
-
private assertCanAccessSession;
|
|
1058
|
-
private sessionKey;
|
|
1059
|
-
}
|
|
1060
|
-
|
|
1061
890
|
interface EnvironmentProvisioningSnapshot {
|
|
1062
891
|
readonly changed: boolean;
|
|
1063
892
|
readonly env: Readonly<Record<string, string>>;
|
|
@@ -1072,13 +901,64 @@ interface EnvironmentLease {
|
|
|
1072
901
|
retire(): Promise<void>;
|
|
1073
902
|
}
|
|
1074
903
|
|
|
904
|
+
/** Workspace-scoped addressing. Pi-native identities remain adapter-private. */
|
|
905
|
+
interface HarnessSessionAddress {
|
|
906
|
+
readonly workspaceScopeId: string;
|
|
907
|
+
readonly ref: AgentSessionRef;
|
|
908
|
+
}
|
|
909
|
+
interface HarnessAgentScope {
|
|
910
|
+
readonly workspaceScopeId: string;
|
|
911
|
+
readonly agentTypeId: string;
|
|
912
|
+
}
|
|
913
|
+
/** Attribution only: authSubjectId is never session-storage ownership. */
|
|
914
|
+
interface HarnessRequestContext {
|
|
915
|
+
readonly requestId: string;
|
|
916
|
+
readonly authSubjectId: string;
|
|
917
|
+
}
|
|
918
|
+
type HarnessWatchResult = {
|
|
919
|
+
readonly type: 'ok';
|
|
920
|
+
unsubscribe(): void;
|
|
921
|
+
readonly closed?: Promise<void>;
|
|
922
|
+
} | {
|
|
923
|
+
readonly type: 'replay_gap' | 'cursor_ahead';
|
|
924
|
+
readonly latestSeq: number;
|
|
925
|
+
readonly minReplaySeq: number;
|
|
926
|
+
};
|
|
927
|
+
/**
|
|
928
|
+
* Private D29 runtime seam. The Gateway ledger is the sole idempotency
|
|
929
|
+
* authority; callers may retry only after ledger admission.
|
|
930
|
+
*/
|
|
931
|
+
interface AgentHarnessBackend {
|
|
932
|
+
listSessions(scope: HarnessAgentScope, ctx: HarnessRequestContext, options?: SessionListOptions): Promise<SessionSummary[]>;
|
|
933
|
+
createSession(scope: HarnessAgentScope, ctx: HarnessRequestContext, init?: {
|
|
934
|
+
title?: string;
|
|
935
|
+
}): Promise<SessionSummary>;
|
|
936
|
+
readSnapshot(address: HarnessSessionAddress, ctx: HarnessRequestContext): Promise<PiChatSnapshot>;
|
|
937
|
+
watchEvents(address: HarnessSessionAddress, ctx: HarnessRequestContext, cursor: number, subscriber: (event: PiChatEvent) => void): Promise<HarnessWatchResult>;
|
|
938
|
+
submitPrompt(address: HarnessSessionAddress, ctx: HarnessRequestContext, payload: AgentPromptPayload): Promise<PromptReceipt>;
|
|
939
|
+
submitFollowUp(address: HarnessSessionAddress, ctx: HarnessRequestContext, payload: FollowUpPayload): Promise<FollowUpReceipt>;
|
|
940
|
+
clearQueue(address: HarnessSessionAddress, ctx: HarnessRequestContext, payload: QueueClearPayload): Promise<QueueClearReceipt>;
|
|
941
|
+
interrupt(address: HarnessSessionAddress, ctx: HarnessRequestContext, payload: InterruptPayload): Promise<CommandReceipt>;
|
|
942
|
+
stop(address: HarnessSessionAddress, ctx: HarnessRequestContext, payload: StopPayload): Promise<StopReceipt>;
|
|
943
|
+
renameSession(address: HarnessSessionAddress, ctx: HarnessRequestContext, title: string): Promise<SessionSummary>;
|
|
944
|
+
deleteSession(address: HarnessSessionAddress, ctx: HarnessRequestContext): Promise<void>;
|
|
945
|
+
readAttachment(address: HarnessSessionAddress, ctx: HarnessRequestContext, messageId: string, index: number): Promise<PiChatAttachmentResult>;
|
|
946
|
+
close(): Promise<void>;
|
|
947
|
+
}
|
|
948
|
+
|
|
1075
949
|
interface BuiltAgentComposition {
|
|
1076
950
|
readonly harness: AgentHarness;
|
|
1077
951
|
readonly sessionStore: SessionStore;
|
|
1078
|
-
readonly
|
|
952
|
+
readonly backend: AgentHarnessBackend;
|
|
1079
953
|
readonly tools: readonly AgentTool[];
|
|
954
|
+
readonly pi: ResolvedPiHarnessOptions;
|
|
1080
955
|
readonly runtimeBundle: RuntimeBundle;
|
|
1081
956
|
readonly readyTracker: ReadyStatusTracker;
|
|
957
|
+
readonly getFilesystemBindings?: (ctx: {
|
|
958
|
+
sessionId?: string;
|
|
959
|
+
userId?: string;
|
|
960
|
+
requestId?: string;
|
|
961
|
+
}) => Promise<readonly RuntimeFilesystemBinding[]>;
|
|
1082
962
|
dispose(): Promise<void>;
|
|
1083
963
|
}
|
|
1084
964
|
|
|
@@ -1116,9 +996,12 @@ interface AgentHostRuntime {
|
|
|
1116
996
|
readonly activity: AgentSessionActivityIndex;
|
|
1117
997
|
readonly shutdownGraceMs: number;
|
|
1118
998
|
listSessionSummaries(agentTypeId: string, scope: AuthorizedAgentScope, claim: VerifiedAgentScopeClaim, options?: SessionListOptions): Promise<readonly SessionSummary[]>;
|
|
999
|
+
setSessionArchived?(agentTypeId: string, scope: AuthorizedAgentScope, claim: VerifiedAgentScopeClaim, sessionId: string, archived: boolean): Promise<SessionSummary>;
|
|
1119
1000
|
isDraining(): boolean;
|
|
1120
1001
|
assertOpen(): void;
|
|
1121
1002
|
verify(scope: AuthorizedAgentScope): Promise<VerifiedAgentScopeClaim>;
|
|
1003
|
+
resolveAgentAccess?(agentTypeId: string, scope: AuthorizedAgentScope, claim: VerifiedAgentScopeClaim, operation: AgentAccessOperation): Promise<AgentAccessDecision>;
|
|
1004
|
+
assertAgentAccess?(agentTypeId: string, scope: AuthorizedAgentScope, claim: VerifiedAgentScopeClaim, operation: AgentAccessOperation): Promise<void>;
|
|
1122
1005
|
resolveEnvironmentScope(scope: AuthorizedAgentScope, claim: VerifiedAgentScopeClaim, intent: AuthorizedEnvironmentIntent): Promise<AgentHostEnvironmentScope>;
|
|
1123
1006
|
acquireEnvironment(scope: AuthorizedAgentScope, claim: VerifiedAgentScopeClaim, intent: AuthorizedEnvironmentIntent): Promise<EnvironmentLease>;
|
|
1124
1007
|
acquireResolvedEnvironment(workspaceScopeId: string, environment: AgentHostEnvironmentScope): Promise<EnvironmentLease>;
|
|
@@ -1152,6 +1035,65 @@ declare class SqliteAgentRequestLedger implements AgentRequestLedger {
|
|
|
1152
1035
|
private transition;
|
|
1153
1036
|
}
|
|
1154
1037
|
|
|
1038
|
+
/**
|
|
1039
|
+
* Compatibility location a host falls back to when it has neither an explicit
|
|
1040
|
+
* ledger path nor a host-owned session root.
|
|
1041
|
+
*
|
|
1042
|
+
* Hosts historically disagreed on this tail, so it is the *only* part of the
|
|
1043
|
+
* chain that is parameterized. Everything before it is identical for every
|
|
1044
|
+
* host and is owned solely by {@link resolveRequestLedgerPath}.
|
|
1045
|
+
*/
|
|
1046
|
+
type LegacyRequestLedgerLocation =
|
|
1047
|
+
/** `<workspaceRoot>/.boring/agent-request-ledger.sqlite` (standalone + workspace hosts). */
|
|
1048
|
+
{
|
|
1049
|
+
readonly layout: 'workspace-boring-dir';
|
|
1050
|
+
readonly workspaceRoot: string;
|
|
1051
|
+
}
|
|
1052
|
+
/** `<workspaceRoot>/.agent-request-ledger.sqlite` (core workspace host). */
|
|
1053
|
+
| {
|
|
1054
|
+
readonly layout: 'workspace-host-file';
|
|
1055
|
+
readonly workspaceRoot: string;
|
|
1056
|
+
};
|
|
1057
|
+
interface ResolveRequestLedgerPathInput {
|
|
1058
|
+
/** Explicit host-configured ledger file. Wins over every fallback. */
|
|
1059
|
+
readonly requestLedgerPath?: string;
|
|
1060
|
+
/** Host-owned session root supplied by the caller, if any. */
|
|
1061
|
+
readonly sessionRoot?: string;
|
|
1062
|
+
/**
|
|
1063
|
+
* Also accept `BORING_AGENT_SESSION_ROOT` as a host-owned root when the
|
|
1064
|
+
* caller supplied no `sessionRoot`. Hosts that already fold that env var
|
|
1065
|
+
* into their own session-root chain omit this.
|
|
1066
|
+
*/
|
|
1067
|
+
readonly acceptSessionRootEnv?: boolean;
|
|
1068
|
+
/**
|
|
1069
|
+
* Last-resort compatibility location. Omit for hosts that must fail closed
|
|
1070
|
+
* instead of inventing an in-workspace ledger; they get `undefined`.
|
|
1071
|
+
*/
|
|
1072
|
+
readonly legacy?: LegacyRequestLedgerLocation;
|
|
1073
|
+
}
|
|
1074
|
+
/**
|
|
1075
|
+
* Resolve the durable request ledger file for an agent host.
|
|
1076
|
+
*
|
|
1077
|
+
* **Ledger cutover note:** adopting BORING_AGENT_SESSION_ROOT (or an
|
|
1078
|
+
* explicit requestLedgerPath) after running with the legacy in-workspace
|
|
1079
|
+
* location RELOCATES the sqlite ledger. Effect-idempotency keys recorded
|
|
1080
|
+
* at the legacy path are stranded there; retries that span the upgrade
|
|
1081
|
+
* may be re-admitted once against the new ledger. Copy or drain the
|
|
1082
|
+
* legacy file as part of the cutover if exactly-once effects must
|
|
1083
|
+
* survive it.
|
|
1084
|
+
*
|
|
1085
|
+
* The request ledger is host application state, not workspace content, so the
|
|
1086
|
+
* chain prefers host-owned storage: explicit option, then the caller's
|
|
1087
|
+
* `sessionRoot` (optionally `BORING_AGENT_SESSION_ROOT`), and only then the
|
|
1088
|
+
* host's legacy in-workspace location.
|
|
1089
|
+
*
|
|
1090
|
+
* This is the sole owner of that chain: no host may re-encode any part of it.
|
|
1091
|
+
*/
|
|
1092
|
+
declare function resolveRequestLedgerPath(input: ResolveRequestLedgerPathInput & {
|
|
1093
|
+
readonly legacy: LegacyRequestLedgerLocation;
|
|
1094
|
+
}): string;
|
|
1095
|
+
declare function resolveRequestLedgerPath(input: ResolveRequestLedgerPathInput): string | undefined;
|
|
1096
|
+
|
|
1155
1097
|
declare const AgentFleetCompilationErrorCode: {
|
|
1156
1098
|
readonly AGENT_FLEET_PLUGIN_UNKNOWN: "AGENT_FLEET_PLUGIN_UNKNOWN";
|
|
1157
1099
|
readonly AGENT_FLEET_CONFIG_BINDING_UNKNOWN: "AGENT_FLEET_CONFIG_BINDING_UNKNOWN";
|
|
@@ -1184,7 +1126,7 @@ declare function createValidatingAgentFleetCompiler(options: CreateValidatingAge
|
|
|
1184
1126
|
|
|
1185
1127
|
declare class EmbeddedAgentGateway implements AgentGateway {
|
|
1186
1128
|
private readonly runtime;
|
|
1187
|
-
private readonly
|
|
1129
|
+
private readonly sessionInventoryPager;
|
|
1188
1130
|
private readonly connections;
|
|
1189
1131
|
private readonly writerTails;
|
|
1190
1132
|
private readonly knownSessions;
|
|
@@ -1219,6 +1161,14 @@ declare class EmbeddedAgentGateway implements AgentGateway {
|
|
|
1219
1161
|
setActivityForTesting(workspaceScopeId: string, ref: AgentSessionRef, activity: AgentSessionActivity): void;
|
|
1220
1162
|
private assertOpen;
|
|
1221
1163
|
private verify;
|
|
1164
|
+
private resolveAgentAccess;
|
|
1165
|
+
private throwForAgentAccessDecision;
|
|
1166
|
+
private assertAgentAccess;
|
|
1167
|
+
authorizeAgentAccess(input: {
|
|
1168
|
+
readonly scope: AuthorizedAgentScope;
|
|
1169
|
+
readonly agentTypeId: string;
|
|
1170
|
+
readonly operation: AgentAccessOperation;
|
|
1171
|
+
}): Promise<void>;
|
|
1222
1172
|
listAgents(input: {
|
|
1223
1173
|
readonly scope: AuthorizedAgentScope;
|
|
1224
1174
|
}): Promise<{
|
|
@@ -1231,15 +1181,22 @@ declare class EmbeddedAgentGateway implements AgentGateway {
|
|
|
1231
1181
|
label: string;
|
|
1232
1182
|
}[]>;
|
|
1233
1183
|
listSessions(input: Parameters<AgentGateway['listSessions']>[0]): Promise<{
|
|
1234
|
-
nextCursor?: string | undefined;
|
|
1235
1184
|
sessions: AgentSessionSummary[];
|
|
1185
|
+
nextCursor?: string;
|
|
1236
1186
|
}>;
|
|
1237
1187
|
createSession(input: Parameters<AgentGateway['createSession']>[0]): Promise<AgentSessionRef>;
|
|
1238
1188
|
readSessionState(input: Parameters<AgentGateway['readSessionState']>[0]): Promise<AgentSessionStateSnapshot>;
|
|
1239
1189
|
connectSession(input: Parameters<AgentGateway['connectSession']>[0]): Promise<AgentSessionConnection>;
|
|
1240
1190
|
private send;
|
|
1241
1191
|
renameSession(input: Parameters<AgentGateway['renameSession']>[0]): Promise<AgentSessionSummary>;
|
|
1192
|
+
/**
|
|
1193
|
+
* Visibility only. This never reaches the delete path: the session
|
|
1194
|
+
* repository records the flag beside the transcript and hands back the same
|
|
1195
|
+
* summary, so `archived: false` restores the row untouched.
|
|
1196
|
+
*/
|
|
1197
|
+
setSessionArchived(input: Parameters<AgentGateway['setSessionArchived']>[0]): Promise<AgentSessionSummary>;
|
|
1242
1198
|
deleteSession(input: Parameters<AgentGateway['deleteSession']>[0]): Promise<void>;
|
|
1199
|
+
private authorizedEvents;
|
|
1243
1200
|
close(): Promise<void>;
|
|
1244
1201
|
private bindingForSession;
|
|
1245
1202
|
private loadSummary;
|
|
@@ -1251,8 +1208,6 @@ declare class EmbeddedAgentGateway implements AgentGateway {
|
|
|
1251
1208
|
private promptAdmission;
|
|
1252
1209
|
private queueClearAdmission;
|
|
1253
1210
|
private withWriter;
|
|
1254
|
-
private encodeCursor;
|
|
1255
|
-
private decodeCursor;
|
|
1256
1211
|
}
|
|
1257
1212
|
|
|
1258
1213
|
/** Process-lifetime Level-B ledger with the exact published state machine. */
|
|
@@ -1486,4 +1441,4 @@ declare function createInMemoryCredentialBackendV1(entries: readonly InMemoryCre
|
|
|
1486
1441
|
|
|
1487
1442
|
declare function withResolvedCredential<T>(resolver: WorkspaceCredentialResolverV1, workspace: AuthorizedWorkspaceCredentialScopeV1, ref: ProviderCredentialRefV1, fn: (lease: ResolvedCredentialLeaseV1) => T | Promise<T>): Promise<T>;
|
|
1488
1443
|
|
|
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,
|
|
1444
|
+
export { AgentAccessDecision, AgentAccessOperation, 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_AGENT_FLEET, 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, type LegacyRequestLedgerLocation, 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, 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 ResolveRequestLedgerPathInput, 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, resolveRequestLedgerPath, resolveRuntimeReadonlyFilesystemAccess, resolveWorkspaceRoot, sandboxRuntimeHostOperations, shareResourceUri, withResolvedCredential, withRuntimeEnvContributions };
|
package/dist/server/index.js
CHANGED
|
@@ -3,12 +3,13 @@ import {
|
|
|
3
3
|
AgentFleetCompilationError,
|
|
4
4
|
AgentFleetCompilationErrorCode,
|
|
5
5
|
AuthoredAgentMaterializationError,
|
|
6
|
+
DEFAULT_AGENT_FLEET,
|
|
7
|
+
DEFAULT_AGENT_TYPE_ID,
|
|
6
8
|
DEFAULT_PI_RESOURCE_DIGEST_LIMITS,
|
|
7
9
|
DEFAULT_READONLY_WORKSPACE_PATHS,
|
|
8
10
|
EmbeddedAgentGateway,
|
|
9
11
|
FleetConfigError,
|
|
10
12
|
InMemoryAgentRequestLedger,
|
|
11
|
-
LEGACY_DEFAULT_AGENT_FLEET,
|
|
12
13
|
MANAGED_AGENT_MCP_DELIVERY_RULE,
|
|
13
14
|
MANAGED_AGENT_MCP_ORIGIN_SURFACE,
|
|
14
15
|
ManagedAgentMcpDelegateController,
|
|
@@ -84,37 +85,39 @@ import {
|
|
|
84
85
|
resolveBuiltinRuntimeLayoutRoot,
|
|
85
86
|
resolveDefaultAgentFleet,
|
|
86
87
|
resolveMode,
|
|
88
|
+
resolveRequestLedgerPath,
|
|
87
89
|
resolveRuntimeReadonlyFilesystemAccess,
|
|
88
90
|
resolveWorkspaceRoot,
|
|
89
91
|
sandboxRuntimeHostOperations,
|
|
90
92
|
shareResourceUri,
|
|
91
93
|
withResolvedCredential,
|
|
92
94
|
withRuntimeEnvContributions
|
|
93
|
-
} from "../chunk-
|
|
95
|
+
} from "../chunk-KDXIXVF6.js";
|
|
94
96
|
import {
|
|
95
97
|
PI_PACKAGE_RESOURCE_FILTERS,
|
|
96
98
|
compactPiPackages,
|
|
97
99
|
createResourceSettingsManager,
|
|
98
100
|
mergePiPackageSources,
|
|
99
101
|
piPackageSourceKey
|
|
100
|
-
} from "../chunk-
|
|
101
|
-
import "../chunk-
|
|
102
|
-
import "../chunk-
|
|
103
|
-
import "../chunk-
|
|
104
|
-
import "../chunk-
|
|
102
|
+
} from "../chunk-GS4ADE34.js";
|
|
103
|
+
import "../chunk-6OANSUEI.js";
|
|
104
|
+
import "../chunk-7XAOVFSN.js";
|
|
105
|
+
import "../chunk-YTUZFKB3.js";
|
|
106
|
+
import "../chunk-MVKXLMH3.js";
|
|
105
107
|
import "../chunk-YGRQ4Q5P.js";
|
|
106
|
-
import "../chunk-
|
|
108
|
+
import "../chunk-3JFPS2O6.js";
|
|
107
109
|
export {
|
|
108
110
|
AgentDirectoryCompilerError,
|
|
109
111
|
AgentFleetCompilationError,
|
|
110
112
|
AgentFleetCompilationErrorCode,
|
|
111
113
|
AuthoredAgentMaterializationError,
|
|
114
|
+
DEFAULT_AGENT_FLEET,
|
|
115
|
+
DEFAULT_AGENT_TYPE_ID,
|
|
112
116
|
DEFAULT_PI_RESOURCE_DIGEST_LIMITS,
|
|
113
117
|
DEFAULT_READONLY_WORKSPACE_PATHS,
|
|
114
118
|
EmbeddedAgentGateway,
|
|
115
119
|
FleetConfigError,
|
|
116
120
|
InMemoryAgentRequestLedger,
|
|
117
|
-
LEGACY_DEFAULT_AGENT_FLEET,
|
|
118
121
|
MANAGED_AGENT_MCP_DELIVERY_RULE,
|
|
119
122
|
MANAGED_AGENT_MCP_ORIGIN_SURFACE,
|
|
120
123
|
ManagedAgentMcpDelegateController,
|
|
@@ -195,6 +198,7 @@ export {
|
|
|
195
198
|
resolveBuiltinRuntimeLayoutRoot,
|
|
196
199
|
resolveDefaultAgentFleet,
|
|
197
200
|
resolveMode,
|
|
201
|
+
resolveRequestLedgerPath,
|
|
198
202
|
resolveRuntimeReadonlyFilesystemAccess,
|
|
199
203
|
resolveWorkspaceRoot,
|
|
200
204
|
sandboxRuntimeHostOperations,
|
|
@@ -2,14 +2,14 @@ import {
|
|
|
2
2
|
REMOTE_WORKER_EXCLUSIVE_BINARY_CREATE_CAPABILITY,
|
|
3
3
|
WORKER_INTERNAL_TOKEN_HEADER,
|
|
4
4
|
constantTimeTokenEqual
|
|
5
|
-
} from "../../chunk-
|
|
6
|
-
import "../../chunk-
|
|
7
|
-
import "../../chunk-
|
|
8
|
-
import "../../chunk-
|
|
9
|
-
import "../../chunk-
|
|
10
|
-
import "../../chunk-
|
|
5
|
+
} from "../../chunk-KDXIXVF6.js";
|
|
6
|
+
import "../../chunk-GS4ADE34.js";
|
|
7
|
+
import "../../chunk-6OANSUEI.js";
|
|
8
|
+
import "../../chunk-7XAOVFSN.js";
|
|
9
|
+
import "../../chunk-YTUZFKB3.js";
|
|
10
|
+
import "../../chunk-MVKXLMH3.js";
|
|
11
11
|
import "../../chunk-YGRQ4Q5P.js";
|
|
12
|
-
import "../../chunk-
|
|
12
|
+
import "../../chunk-3JFPS2O6.js";
|
|
13
13
|
|
|
14
14
|
// src/server/worker/index.ts
|
|
15
15
|
import Fastify from "fastify";
|