@hachej/boring-agent 0.1.111 → 0.2.0
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/LICENSE +1 -1
- package/README.md +262 -51
- package/dist/agents.d.ts +75 -0
- package/dist/agents.js +91 -0
- package/dist/approval.d.ts +71 -0
- package/dist/approval.js +126 -0
- package/dist/artifacts.d.ts +53 -0
- package/dist/artifacts.js +129 -0
- package/dist/ask-user.d.ts +40 -0
- package/dist/ask-user.js +134 -0
- package/dist/attachment.d.ts +5 -0
- package/dist/attachment.js +4 -0
- package/dist/browser-task.d.ts +32 -0
- package/dist/browser-task.js +119 -0
- package/dist/chat-transport.d.ts +80 -0
- package/dist/chat-transport.js +306 -0
- package/dist/contracts.d.ts +40 -0
- package/dist/contracts.js +1 -0
- package/dist/conversations.d.ts +136 -0
- package/dist/conversations.js +366 -0
- package/dist/definitions.d.ts +37 -0
- package/dist/definitions.js +99 -0
- package/dist/delivery-input.d.ts +35 -0
- package/dist/delivery-input.js +56 -0
- package/dist/delivery.d.ts +33 -0
- package/dist/delivery.js +154 -0
- package/dist/durable-wait.d.ts +23 -0
- package/dist/durable-wait.js +79 -0
- package/dist/file-convert.d.ts +46 -0
- package/dist/file-convert.js +159 -0
- package/dist/file-guard.d.ts +50 -0
- package/dist/file-guard.js +171 -0
- package/dist/file-types.d.ts +17 -0
- package/dist/file-types.js +95 -0
- package/dist/gateway-provider.d.ts +24 -0
- package/dist/gateway-provider.js +42 -0
- package/dist/git.d.ts +34 -0
- package/dist/git.js +79 -0
- package/dist/harness-pool.d.ts +38 -0
- package/dist/harness-pool.js +134 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.js +1 -0
- package/dist/json-schema-tool.d.ts +25 -0
- package/dist/json-schema-tool.js +19 -0
- package/dist/memory/optchat-core.d.ts +118 -0
- package/dist/memory/optchat-core.js +317 -0
- package/dist/memory/optchat.d.ts +156 -0
- package/dist/memory/optchat.js +432 -0
- package/dist/mentions.d.ts +56 -0
- package/dist/mentions.js +140 -0
- package/dist/metering.d.ts +183 -0
- package/dist/metering.js +443 -0
- package/dist/model-gateway.d.ts +86 -0
- package/dist/model-gateway.js +241 -0
- package/dist/native-version.d.ts +9 -0
- package/dist/native-version.js +7 -0
- package/dist/native.d.ts +4 -0
- package/dist/native.js +1 -0
- package/dist/presentation.d.ts +17 -0
- package/dist/presentation.js +39 -0
- package/dist/projection-format.d.ts +68 -0
- package/dist/projection-format.js +118 -0
- package/dist/projection-window.d.ts +9 -0
- package/dist/projection-window.js +93 -0
- package/dist/projection.d.ts +22 -0
- package/dist/projection.js +153 -0
- package/dist/question-response.d.ts +20 -0
- package/dist/question-response.js +75 -0
- package/dist/questions.d.ts +74 -0
- package/dist/questions.js +199 -0
- package/dist/self-evolving.d.ts +55 -0
- package/dist/self-evolving.js +239 -0
- package/dist/skills.d.ts +15 -0
- package/dist/skills.js +51 -0
- package/dist/tool-evidence.d.ts +14 -0
- package/dist/tool-evidence.js +54 -0
- package/dist/validation.d.ts +38 -0
- package/dist/validation.js +68 -0
- package/dist/workspaces.d.ts +107 -0
- package/dist/workspaces.js +212 -0
- package/package.json +145 -150
- package/dist/DebugDrawer-JNA43SVR.js +0 -8
- package/dist/admin-DORVQfLn.d.ts +0 -340
- package/dist/chunk-2BGLZZ7T.js +0 -10
- package/dist/chunk-42D6KAQV.js +0 -2882
- package/dist/chunk-4XOW57KJ.js +0 -343
- package/dist/chunk-72KT6VWV.js +0 -1338
- package/dist/chunk-7XAOVFSN.js +0 -28
- package/dist/chunk-KJIEMSQP.js +0 -198
- package/dist/chunk-KN72XWP7.js +0 -394
- package/dist/chunk-N6THTH7P.js +0 -110
- package/dist/chunk-V3H5A3BR.js +0 -22501
- package/dist/chunk-YGRQ4Q5P.js +0 -20
- package/dist/chunk-YTUZFKB3.js +0 -78
- package/dist/core/index.d.ts +0 -28
- package/dist/core/index.js +0 -617
- package/dist/createHarness-DOLOHA62.js +0 -18
- package/dist/eval/index.d.ts +0 -247
- package/dist/eval/index.js +0 -541
- package/dist/file-search-BUgMSKZE.d.ts +0 -289
- package/dist/front/artifacts.d.ts +0 -34
- package/dist/front/artifacts.js +0 -21
- package/dist/front/index.d.ts +0 -1082
- package/dist/front/index.js +0 -12912
- package/dist/front/styles.css +0 -5380
- package/dist/harness-qHlMJhZo.d.ts +0 -276
- package/dist/middleware-CaAEXpi5.d.ts +0 -115
- package/dist/piChatEvent-DpE0lIb9.d.ts +0 -450
- package/dist/piChatSessionService-CBct-hmz.d.ts +0 -86
- package/dist/sandbox-BMhut3kh.d.ts +0 -317
- package/dist/server/agent-host/testing/compositionRouteProof.d.ts +0 -8
- package/dist/server/agent-host/testing/compositionRouteProof.js +0 -78
- package/dist/server/agent-host/testing/gatewayConformance.d.ts +0 -43
- package/dist/server/agent-host/testing/gatewayConformance.js +0 -605
- package/dist/server/index.d.ts +0 -2278
- package/dist/server/index.js +0 -274
- package/dist/server/pi-session-readability.d.ts +0 -12
- package/dist/server/pi-session-readability.js +0 -23
- package/dist/server/worker/index.d.ts +0 -68
- package/dist/server/worker/index.js +0 -377
- package/dist/share-entry-CxS6UJ_L.d.ts +0 -330
- package/dist/shared/index.d.ts +0 -2111
- package/dist/shared/index.js +0 -262
- package/dist/types-DcWoQMn8.d.ts +0 -1377
- package/docs/ACCESSIBILITY.md +0 -52
- package/docs/AGENT_GATEWAY_V0.md +0 -212
- package/docs/AGENT_PACKAGES.md +0 -90
- package/docs/API.md +0 -123
- package/docs/AUTHORING.md +0 -68
- package/docs/CSP.md +0 -41
- package/docs/ERROR_CODES.md +0 -229
- package/docs/KNOWN_LIMITATIONS.md +0 -100
- package/docs/MIGRATION.md +0 -50
- package/docs/PERFORMANCE.md +0 -68
- package/docs/PLUGINS.md +0 -138
- package/docs/README.md +0 -98
- package/docs/RISKS-MULTI-TAB.md +0 -46
- package/docs/SESSION_IDENTITY.md +0 -91
- package/docs/STYLING.md +0 -73
- package/docs/UI-SHADCN.md +0 -56
- package/docs/VERCEL_COSTS.md +0 -103
- package/docs/plans/archive/AGENT_EVAL_FRAMEWORK.md +0 -466
- package/docs/plans/archive/agent-package-spec.md +0 -1777
- package/docs/plans/archive/harness-followup-capabilities.md +0 -440
- package/docs/plans/archive/harness-tool-ui-capabilities.md +0 -144
- package/docs/plans/archive/pi-followup-history-projection.md +0 -229
- package/docs/plans/archive/pi-tools-migration.md +0 -1061
- package/docs/plans/archive/reviews/pi-followup-history-codex-review.md +0 -11
- package/docs/plans/archive/reviews/pi-followup-history-gpt-review.md +0 -64
- package/docs/plans/archive/reviews/pi-followup-history-opus-review.md +0 -43
- package/docs/plans/archive/reviews/pi-followup-history-xai-review.md +0 -43
- package/docs/plans/archive/vercel-base-snapshot-template-plan.md +0 -527
- package/docs/plans/archive/vercel-persistent-sandbox-adapter.md +0 -553
- package/docs/runtime-provisioning.md +0 -157
- package/docs/runtime.md +0 -296
- package/docs/tools.md +0 -102
package/dist/types-DcWoQMn8.d.ts
DELETED
|
@@ -1,1377 +0,0 @@
|
|
|
1
|
-
import { d as PiChatEvent, C as ChatModelSelection } from './piChatEvent-DpE0lIb9.js';
|
|
2
|
-
import { v as SessionStreamIdentity, C as ToolReadinessRequirement, w as TelemetrySink, s as AgentTool, D as AgentHarnessFactory } from './harness-qHlMJhZo.js';
|
|
3
|
-
import { FastifyRequest, FastifyPluginAsync } from 'fastify';
|
|
4
|
-
import { F as FileSearch, g as AgentSkillResource, P as ProviderId, n as CredentialEnvelopeV1, K as WrappedWorkspaceDekV1, B as WorkspaceCredentialAuthorityVerifierV1, V as VerifiedWorkspaceCredentialAuthorityV1, t as WorkspaceAgentDirectRunInput, L as LeaseBoundWorkspaceAgent } from './file-search-BUgMSKZE.js';
|
|
5
|
-
import { b as Workspace, h as RuntimeFilesystemCapability, j as WorkspaceRuntimeContext, c as Sandbox } from './sandbox-BMhut3kh.js';
|
|
6
|
-
import { B as CredentialLifecycleStateV1, b as AgentSessionRef, V as VerifiedAgentScopeClaim, k as AgentGatewayErrorDTO, P as JsonValue, a as AuthorizedAgentScope, A as AgentGateway, m as AgentScopeVerifier, T as ResolveAgentAccess } from './admin-DORVQfLn.js';
|
|
7
|
-
import { RuntimeHostOperations, RuntimeFilesystemBinding as RuntimeFilesystemBinding$1 } from '@hachej/boring-bash/agent';
|
|
8
|
-
import { BwrapArgsOptions } from '@hachej/boring-sandbox/providers/bwrap';
|
|
9
|
-
import { CreateNodeWorkspaceOptions, BoringAgentRuntimePaths } from '@hachej/boring-sandbox/providers/node-workspace';
|
|
10
|
-
import { CredentialStore } from '@earendil-works/pi-ai';
|
|
11
|
-
import { PackageSource, ExtensionFactory } from '@mariozechner/pi-coding-agent';
|
|
12
|
-
|
|
13
|
-
interface EventStreamReadResult {
|
|
14
|
-
events: Array<{
|
|
15
|
-
data: unknown;
|
|
16
|
-
offset: string;
|
|
17
|
-
}>;
|
|
18
|
-
nextOffset: string;
|
|
19
|
-
upToDate: boolean;
|
|
20
|
-
closed: boolean;
|
|
21
|
-
}
|
|
22
|
-
interface EventStreamMeta {
|
|
23
|
-
nextOffset: string;
|
|
24
|
-
closed: boolean;
|
|
25
|
-
}
|
|
26
|
-
interface SessionStreamOwner {
|
|
27
|
-
readonly path: string;
|
|
28
|
-
readonly workspaceScopeId: string;
|
|
29
|
-
readonly sessionId: string;
|
|
30
|
-
readonly agentTypeId: string | null;
|
|
31
|
-
readonly authSubjectId: string | null;
|
|
32
|
-
readonly seatId: string | null;
|
|
33
|
-
readonly threadId: string | null;
|
|
34
|
-
readonly keyVersion: number;
|
|
35
|
-
readonly createdAt: number;
|
|
36
|
-
}
|
|
37
|
-
interface CreateSessionStreamAttributes {
|
|
38
|
-
readonly agentTypeId: string;
|
|
39
|
-
readonly authSubjectId?: string;
|
|
40
|
-
}
|
|
41
|
-
declare const ownedSessionStreamBrand: unique symbol;
|
|
42
|
-
interface OwnedSessionStream {
|
|
43
|
-
readonly [ownedSessionStreamBrand]: true;
|
|
44
|
-
readonly path: string;
|
|
45
|
-
readonly identity: SessionStreamIdentity;
|
|
46
|
-
}
|
|
47
|
-
interface EventStreamStore {
|
|
48
|
-
createStream(path: string): Promise<void>;
|
|
49
|
-
createSessionStream(identity: SessionStreamIdentity, attrs: CreateSessionStreamAttributes): Promise<OwnedSessionStream>;
|
|
50
|
-
readStreamOwner(path: string): Promise<SessionStreamOwner | null>;
|
|
51
|
-
appendEvent(path: string, event: unknown): Promise<string>;
|
|
52
|
-
appendEventOnce(path: string, key: string, event: unknown): Promise<string>;
|
|
53
|
-
appendAgentEvent(stream: OwnedSessionStream, chunk: PiChatEvent, opts?: {
|
|
54
|
-
idempotencyKey?: string;
|
|
55
|
-
}): Promise<string>;
|
|
56
|
-
readEvents(path: string, opts?: {
|
|
57
|
-
offset?: string;
|
|
58
|
-
limit?: number;
|
|
59
|
-
}): Promise<EventStreamReadResult>;
|
|
60
|
-
closeStream(path: string): Promise<void>;
|
|
61
|
-
getStreamMeta(path: string): Promise<EventStreamMeta | null>;
|
|
62
|
-
subscribe(path: string, listener: () => void): () => void;
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
type SessionFileChangeOp = 'write' | 'edit' | 'unlink' | 'rename' | 'mkdir';
|
|
66
|
-
interface SessionFileChange {
|
|
67
|
-
op: SessionFileChangeOp;
|
|
68
|
-
path: string;
|
|
69
|
-
oldPath?: string;
|
|
70
|
-
size?: number;
|
|
71
|
-
timestamp: string;
|
|
72
|
-
}
|
|
73
|
-
interface SessionChangesTracker {
|
|
74
|
-
record(scope: SessionChangesScope | string, change: SessionFileChange): void;
|
|
75
|
-
list(scope: SessionChangesScope | string): SessionFileChange[];
|
|
76
|
-
clear(scope: SessionChangesScope | string): void;
|
|
77
|
-
}
|
|
78
|
-
interface SessionChangesScope {
|
|
79
|
-
readonly workspaceScopeId?: string;
|
|
80
|
-
readonly agentTypeId?: string;
|
|
81
|
-
readonly sessionId: string;
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
interface AgentModelSelection {
|
|
85
|
-
provider: string;
|
|
86
|
-
id: string;
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
/**
|
|
90
|
-
* GET /api/v1/agents/:agentTypeId/models
|
|
91
|
-
*
|
|
92
|
-
* Returns the list of models pi-coding-agent has auth for (i.e. where
|
|
93
|
-
* the corresponding provider API key is present in the environment or
|
|
94
|
-
* `~/.pi/agent/auth.json`). Consumers — including the shadcn example
|
|
95
|
-
* ChatPanel — fetch this endpoint to populate the model-selector dropdown
|
|
96
|
-
* instead of hardcoding a short alias list.
|
|
97
|
-
*
|
|
98
|
-
* Shape:
|
|
99
|
-
* {
|
|
100
|
-
* models: [
|
|
101
|
-
* { provider: "anthropic", id: "claude-sonnet-4-6", label: "Claude Sonnet 4.6", available: true },
|
|
102
|
-
* ...
|
|
103
|
-
* ]
|
|
104
|
-
* }
|
|
105
|
-
*
|
|
106
|
-
* Safe to call unauthenticated — we only report {provider, id, label,
|
|
107
|
-
* available}, never any key material.
|
|
108
|
-
*/
|
|
109
|
-
|
|
110
|
-
interface ModelSummary {
|
|
111
|
-
provider: string;
|
|
112
|
-
id: string;
|
|
113
|
-
label: string;
|
|
114
|
-
available: boolean;
|
|
115
|
-
}
|
|
116
|
-
interface ModelFilterContext {
|
|
117
|
-
request: FastifyRequest;
|
|
118
|
-
workspaceId?: string;
|
|
119
|
-
}
|
|
120
|
-
type ModelFilterResult = {
|
|
121
|
-
models: readonly ModelSummary[];
|
|
122
|
-
defaultModel?: AgentModelSelection;
|
|
123
|
-
};
|
|
124
|
-
interface ModelsRoutesOptions {
|
|
125
|
-
path?: string;
|
|
126
|
-
authorizeRequest?: (request: FastifyRequest) => void | Promise<void>;
|
|
127
|
-
filterModels?: (ctx: ModelFilterContext, models: readonly ModelSummary[], defaultModel: AgentModelSelection | undefined) => ModelFilterResult | Promise<ModelFilterResult>;
|
|
128
|
-
}
|
|
129
|
-
|
|
130
|
-
/**
|
|
131
|
-
* Generic metering seam for hosts that bill native Pi usage.
|
|
132
|
-
*
|
|
133
|
-
* The agent package owns lifecycle correctness (when to reserve, record,
|
|
134
|
-
* settle, release based on native Pi events); the host-provided sink owns
|
|
135
|
-
* persistence and product policy (credits, pricing, currencies, hard stops).
|
|
136
|
-
*
|
|
137
|
-
* Lifecycle per accepted prompt/follow-up ("run", identified by `runId`):
|
|
138
|
-
*
|
|
139
|
-
* reserveRun before execution starts; throwing rejects the request
|
|
140
|
-
* (fail closed) so hosts can enforce hard stops.
|
|
141
|
-
* recordUsage once per native assistant message carrying usage.
|
|
142
|
-
* `usageId` is a stable idempotency key.
|
|
143
|
-
* settleRun when the run reaches a native terminal state and billable
|
|
144
|
-
* usage or an authoritative all-zero usage row was recorded.
|
|
145
|
-
* releaseRun when the run does not settle: rejected execution, cleared
|
|
146
|
-
* queue, cancel/abort, error before usage, or a fail-closed
|
|
147
|
-
* fallback charge.
|
|
148
|
-
*
|
|
149
|
-
* Every run terminates with exactly one settle or release from the
|
|
150
|
-
* coordinator; sinks should still treat all four methods as idempotent
|
|
151
|
-
* because process restarts and client retries can replay transitions.
|
|
152
|
-
*/
|
|
153
|
-
interface AgentMeteringSink {
|
|
154
|
-
/** False means the sink is installed but policy is disabled/no-op. Omitted means active for fail-closed callers. */
|
|
155
|
-
isEnabled?: () => boolean;
|
|
156
|
-
reserveRun(input: MeteringReserveInput): Promise<MeteringReservationResult>;
|
|
157
|
-
/** Records the usage and returns the credit micros it was actually billed. The
|
|
158
|
-
* coordinator counts a usage as billable from this charged amount (not raw provider
|
|
159
|
-
* fields). A complete, internally consistent all-zero report settles at zero;
|
|
160
|
-
* potentially billable usage priced to 0 retains fail-closed fallback. */
|
|
161
|
-
recordUsage(input: MeteringUsageInput): Promise<MeteringUsageResult>;
|
|
162
|
-
settleRun(input: MeteringSettleInput): Promise<void>;
|
|
163
|
-
releaseRun(input: MeteringReleaseInput): Promise<void>;
|
|
164
|
-
}
|
|
165
|
-
interface MeteringUsageResult {
|
|
166
|
-
/** Credit micros this usage row was billed (0 = no real debit). */
|
|
167
|
-
billedMicros: number;
|
|
168
|
-
}
|
|
169
|
-
interface MeteringRunScope {
|
|
170
|
-
workspaceId?: string;
|
|
171
|
-
userId?: string;
|
|
172
|
-
userEmail?: string;
|
|
173
|
-
userEmailVerified?: boolean;
|
|
174
|
-
sessionId: string;
|
|
175
|
-
/** Stable id for one accepted prompt/follow-up run. */
|
|
176
|
-
runId: string;
|
|
177
|
-
source: 'pi-chat';
|
|
178
|
-
}
|
|
179
|
-
type MeteringRunKind = 'prompt' | 'followup';
|
|
180
|
-
interface MeteringReserveInput extends MeteringRunScope {
|
|
181
|
-
kind: MeteringRunKind;
|
|
182
|
-
message: string;
|
|
183
|
-
model?: ChatModelSelection;
|
|
184
|
-
}
|
|
185
|
-
/** Sinks without reservation rows can return an empty object. */
|
|
186
|
-
interface MeteringReservationResult {
|
|
187
|
-
reservationId?: string;
|
|
188
|
-
}
|
|
189
|
-
interface MeteringUsage {
|
|
190
|
-
input: number;
|
|
191
|
-
output: number;
|
|
192
|
-
cacheRead: number;
|
|
193
|
-
cacheWrite: number;
|
|
194
|
-
cost: {
|
|
195
|
-
input: number;
|
|
196
|
-
output: number;
|
|
197
|
-
cacheRead: number;
|
|
198
|
-
cacheWrite: number;
|
|
199
|
-
total: number;
|
|
200
|
-
};
|
|
201
|
-
}
|
|
202
|
-
interface MeteringUsageInput extends MeteringRunScope {
|
|
203
|
-
reservationId?: string;
|
|
204
|
-
/** Stable idempotency key for this usage row. */
|
|
205
|
-
usageId: string;
|
|
206
|
-
messageId?: string;
|
|
207
|
-
model?: {
|
|
208
|
-
provider?: string;
|
|
209
|
-
id?: string;
|
|
210
|
-
};
|
|
211
|
-
usage: MeteringUsage;
|
|
212
|
-
stopReason?: string;
|
|
213
|
-
metadata?: Record<string, unknown>;
|
|
214
|
-
}
|
|
215
|
-
type MeteringRunStatus = 'ok' | 'error' | 'aborted';
|
|
216
|
-
interface MeteringSettleInput extends MeteringRunScope {
|
|
217
|
-
reservationId?: string;
|
|
218
|
-
status: MeteringRunStatus;
|
|
219
|
-
}
|
|
220
|
-
type MeteringReleaseReason = 'run-rejected' | 'queue-cleared' | 'cancelled' | 'error-before-usage' | 'usage-write-failed' | 'fallback-hold-charge';
|
|
221
|
-
interface MeteringReleaseInput extends MeteringRunScope {
|
|
222
|
-
reservationId?: string;
|
|
223
|
-
reason: MeteringReleaseReason;
|
|
224
|
-
}
|
|
225
|
-
type MeteringErrorLogger = (message: string, error: unknown) => void;
|
|
226
|
-
/** Native Pi usage objects always carry token + cost breakdowns; normalize
|
|
227
|
-
* defensively (zero-filling gaps and clamping negatives) so a partial object
|
|
228
|
-
* from an unexpected provider still meters as zeros instead of NaN. */
|
|
229
|
-
declare function normalizeMeteringUsage(value: unknown): MeteringUsage | undefined;
|
|
230
|
-
|
|
231
|
-
type ReadyState = 'provisioning' | 'ready' | 'degraded';
|
|
232
|
-
type CapabilityState = 'not-started' | 'preparing' | 'ready' | 'failed';
|
|
233
|
-
interface CapabilityReadinessDetail {
|
|
234
|
-
state: CapabilityState;
|
|
235
|
-
requirement?: ToolReadinessRequirement;
|
|
236
|
-
startedAt?: string;
|
|
237
|
-
completedAt?: string;
|
|
238
|
-
errorCode?: string;
|
|
239
|
-
causeCode?: string;
|
|
240
|
-
retryable?: boolean;
|
|
241
|
-
message?: string;
|
|
242
|
-
}
|
|
243
|
-
interface AgentCapabilityReadiness {
|
|
244
|
-
chat: CapabilityReadinessDetail;
|
|
245
|
-
workspace: CapabilityReadinessDetail;
|
|
246
|
-
runtimeDependencies: CapabilityReadinessDetail;
|
|
247
|
-
}
|
|
248
|
-
interface ReadyStatusEvent {
|
|
249
|
-
state: ReadyState;
|
|
250
|
-
sandboxReady: boolean;
|
|
251
|
-
harnessReady: boolean;
|
|
252
|
-
capabilities: AgentCapabilityReadiness;
|
|
253
|
-
message?: string;
|
|
254
|
-
timestamp: string;
|
|
255
|
-
}
|
|
256
|
-
interface ReadinessSnapshot {
|
|
257
|
-
sandboxReady: boolean;
|
|
258
|
-
harnessReady: boolean;
|
|
259
|
-
capabilities: AgentCapabilityReadiness;
|
|
260
|
-
degradedReason?: string;
|
|
261
|
-
}
|
|
262
|
-
type StatusHandler = (event: ReadyStatusEvent) => void;
|
|
263
|
-
declare class ReadyStatusTracker {
|
|
264
|
-
private _sandboxReady;
|
|
265
|
-
private _harnessReady;
|
|
266
|
-
private _degradedReason?;
|
|
267
|
-
private _capabilities;
|
|
268
|
-
private subscribers;
|
|
269
|
-
constructor(opts?: {
|
|
270
|
-
sandboxReady?: boolean;
|
|
271
|
-
harnessReady?: boolean;
|
|
272
|
-
capabilities?: Partial<AgentCapabilityReadiness>;
|
|
273
|
-
});
|
|
274
|
-
get state(): ReadyState;
|
|
275
|
-
isReady(): boolean;
|
|
276
|
-
getReadiness(): ReadinessSnapshot;
|
|
277
|
-
getCapabilities(): AgentCapabilityReadiness;
|
|
278
|
-
updateCapability(name: keyof AgentCapabilityReadiness, detail: CapabilityReadinessDetail): void;
|
|
279
|
-
updateRuntimeDependencies(detail: CapabilityReadinessDetail): void;
|
|
280
|
-
markSandboxReady(): void;
|
|
281
|
-
markHarnessReady(): void;
|
|
282
|
-
markDegraded(reason: string): void;
|
|
283
|
-
clearDegraded(): void;
|
|
284
|
-
subscribe(handler: StatusHandler): () => void;
|
|
285
|
-
private emit;
|
|
286
|
-
private snapshot;
|
|
287
|
-
}
|
|
288
|
-
|
|
289
|
-
/**
|
|
290
|
-
* Host-owned values used by Agent's provider-neutral runtime composition.
|
|
291
|
-
*
|
|
292
|
-
* Built-in concrete operations live in `sandboxRuntimeHost.ts`; custom hosts
|
|
293
|
-
* may inject an equivalent implementation with their Workspace + Sandbox pair.
|
|
294
|
-
*/
|
|
295
|
-
interface AgentRuntimeHostOperations extends RuntimeHostOperations {
|
|
296
|
-
/**
|
|
297
|
-
* Agent legally depends on the provider package, so the injected builder is
|
|
298
|
-
* typed with the canonical options here rather than the narrowed slice
|
|
299
|
-
* boring-bash declares.
|
|
300
|
-
*/
|
|
301
|
-
buildBwrapArgs(workspaceRoot: string, options?: BwrapArgsOptions): string[];
|
|
302
|
-
createNodeWorkspace(root: string, options?: CreateNodeWorkspaceOptions): Workspace;
|
|
303
|
-
getNodeWorkspaceHostRoot(workspace: Workspace): string | undefined;
|
|
304
|
-
getBoringAgentRuntimePaths(workspaceRoot: string): BoringAgentRuntimePaths;
|
|
305
|
-
getBoringAgentRuntimeEnv(paths: BoringAgentRuntimePaths, cacheRoot?: string): Record<string, string>;
|
|
306
|
-
getBoringAgentPathEntries(paths: BoringAgentRuntimePaths): string[];
|
|
307
|
-
readonly runtimeLayout: Readonly<{
|
|
308
|
-
agentDir: string;
|
|
309
|
-
runtimeDirNames: readonly string[];
|
|
310
|
-
gitignoreContent: string;
|
|
311
|
-
}>;
|
|
312
|
-
validatePath(root: string, requestedPath: string): string;
|
|
313
|
-
assertRealPathWithinWorkspace(root: string, targetPath: string): Promise<void>;
|
|
314
|
-
resolveRealWorkspacePath(root: string, targetPath: string): Promise<string>;
|
|
315
|
-
isIgnoredDirName(name: string): boolean;
|
|
316
|
-
/** Host-owned confined projection for package resources outside the workspace. */
|
|
317
|
-
createAgentResourceFilesystemBinding(filesystem: string, mounts: readonly {
|
|
318
|
-
readonly logicalRoot: string;
|
|
319
|
-
readonly sourceRoot: string;
|
|
320
|
-
}[]): Promise<RuntimeFilesystemBinding$1>;
|
|
321
|
-
}
|
|
322
|
-
|
|
323
|
-
interface ProvisioningLogger {
|
|
324
|
-
info?(message: string, fields?: Record<string, unknown>): void;
|
|
325
|
-
warn?(message: string, fields?: Record<string, unknown>): void;
|
|
326
|
-
error?(message: string, fields?: Record<string, unknown>): void;
|
|
327
|
-
}
|
|
328
|
-
|
|
329
|
-
interface PluginSkillSource {
|
|
330
|
-
name: string;
|
|
331
|
-
source: string | URL;
|
|
332
|
-
}
|
|
333
|
-
interface RuntimeTemplateContribution {
|
|
334
|
-
id: string;
|
|
335
|
-
path: string | URL;
|
|
336
|
-
target?: string;
|
|
337
|
-
}
|
|
338
|
-
interface RuntimePythonSpec {
|
|
339
|
-
id: string;
|
|
340
|
-
projectFile: string | URL;
|
|
341
|
-
packageName?: string;
|
|
342
|
-
packageRoot?: string | URL;
|
|
343
|
-
version?: string;
|
|
344
|
-
extraLibs?: string[];
|
|
345
|
-
env?: Record<string, string | URL>;
|
|
346
|
-
expectedBins?: string[];
|
|
347
|
-
}
|
|
348
|
-
interface RuntimeNodePackageSpec {
|
|
349
|
-
id: string;
|
|
350
|
-
packageName: string;
|
|
351
|
-
packageRoot?: string | URL;
|
|
352
|
-
version?: string;
|
|
353
|
-
expectedBins?: string[];
|
|
354
|
-
}
|
|
355
|
-
interface RuntimeProvisioningContribution {
|
|
356
|
-
templateDirs?: RuntimeTemplateContribution[];
|
|
357
|
-
python?: RuntimePythonSpec[];
|
|
358
|
-
nodePackages?: RuntimeNodePackageSpec[];
|
|
359
|
-
}
|
|
360
|
-
interface WorkspaceProvisioningResult {
|
|
361
|
-
changed: boolean;
|
|
362
|
-
env: Record<string, string>;
|
|
363
|
-
pathEntries: string[];
|
|
364
|
-
skillPaths: string[];
|
|
365
|
-
}
|
|
366
|
-
interface WorkspaceProvisioningExecResult {
|
|
367
|
-
stdout?: string;
|
|
368
|
-
stderr?: string;
|
|
369
|
-
}
|
|
370
|
-
interface ResolveInstallSourceOpts {
|
|
371
|
-
kind: 'node' | 'python';
|
|
372
|
-
id: string;
|
|
373
|
-
fingerprint: string;
|
|
374
|
-
}
|
|
375
|
-
interface WorkspaceProvisioningAdapter {
|
|
376
|
-
/** Application-owned runtime ID; provisioning does not select builtin adapters. */
|
|
377
|
-
mode: string;
|
|
378
|
-
exec(command: string, args: string[], opts?: {
|
|
379
|
-
cwd?: string;
|
|
380
|
-
env?: Record<string, string>;
|
|
381
|
-
timeoutMs?: number;
|
|
382
|
-
}): Promise<WorkspaceProvisioningExecResult | void>;
|
|
383
|
-
resolveInstallSource(source: string | URL, opts: ResolveInstallSourceOpts): Promise<string>;
|
|
384
|
-
workspaceFs: {
|
|
385
|
-
exists(workspaceRelativePath: string): Promise<boolean>;
|
|
386
|
-
/** Remove a workspace-relative generated path. Missing path is success. */
|
|
387
|
-
rm(workspaceRelativePath: string): Promise<void>;
|
|
388
|
-
/** Create a workspace-relative directory recursively. */
|
|
389
|
-
mkdir(workspaceRelativePath: string): Promise<void>;
|
|
390
|
-
writeText(workspaceRelativePath: string, content: string): Promise<void>;
|
|
391
|
-
readText(workspaceRelativePath: string): Promise<string | null>;
|
|
392
|
-
/** Copy a host file or directory into the workspace; directory copies are recursive. */
|
|
393
|
-
copyFromHost(hostSourcePath: string | URL, workspaceRelativeTarget: string): Promise<void>;
|
|
394
|
-
};
|
|
395
|
-
getRuntimeCacheRoot(): string;
|
|
396
|
-
}
|
|
397
|
-
interface ProvisioningTelemetryContext {
|
|
398
|
-
workspaceId?: string;
|
|
399
|
-
sessionId?: string;
|
|
400
|
-
requestId?: string;
|
|
401
|
-
runtimeMode?: string;
|
|
402
|
-
}
|
|
403
|
-
interface ProvisionWorkspaceRuntimeOptions {
|
|
404
|
-
plugins: Array<{
|
|
405
|
-
id: string;
|
|
406
|
-
skills?: PluginSkillSource[];
|
|
407
|
-
provisioning?: RuntimeProvisioningContribution;
|
|
408
|
-
}>;
|
|
409
|
-
adapter: WorkspaceProvisioningAdapter;
|
|
410
|
-
runtimeLayout: BoringAgentRuntimePaths;
|
|
411
|
-
runtimeHost: AgentRuntimeHostOperations;
|
|
412
|
-
logger?: ProvisioningLogger;
|
|
413
|
-
telemetry?: TelemetrySink;
|
|
414
|
-
telemetryContext?: ProvisioningTelemetryContext;
|
|
415
|
-
}
|
|
416
|
-
|
|
417
|
-
type BuiltinRuntimeModeId = 'direct' | 'local' | 'blaxel' | 'vercel-sandbox';
|
|
418
|
-
type RuntimeModeId = BuiltinRuntimeModeId | (string & {});
|
|
419
|
-
interface RuntimeModeReadinessHooks {
|
|
420
|
-
initialSandboxReady?: boolean;
|
|
421
|
-
initialWorkspaceReadiness?: CapabilityReadinessDetail;
|
|
422
|
-
onTrackerCreated?: (tracker: ReadyStatusTracker) => void;
|
|
423
|
-
}
|
|
424
|
-
type RuntimeCachedBindingHealthCheckResult = {
|
|
425
|
-
state: 'ok';
|
|
426
|
-
} | {
|
|
427
|
-
state: 'recreate';
|
|
428
|
-
message?: string;
|
|
429
|
-
error?: unknown;
|
|
430
|
-
};
|
|
431
|
-
interface RuntimeCachedBindingHealthCheck {
|
|
432
|
-
intervalMs?: number;
|
|
433
|
-
check(ctx: {
|
|
434
|
-
runtimeBundle: RuntimeBundle;
|
|
435
|
-
workspaceId: string;
|
|
436
|
-
}): Promise<RuntimeCachedBindingHealthCheckResult>;
|
|
437
|
-
}
|
|
438
|
-
type RuntimeBashStrategy = {
|
|
439
|
-
kind: 'host';
|
|
440
|
-
preserveHostHome?: boolean;
|
|
441
|
-
} | {
|
|
442
|
-
kind: 'local-sandbox';
|
|
443
|
-
sandboxRoot: string;
|
|
444
|
-
} | {
|
|
445
|
-
kind: 'remote';
|
|
446
|
-
defaultPath?: string;
|
|
447
|
-
};
|
|
448
|
-
interface RuntimeRemoteWorkspacePathOptions {
|
|
449
|
-
rootAliases?: string[];
|
|
450
|
-
toRemotePath?: (value: string) => string;
|
|
451
|
-
toRuntimePath?: (value: string) => string;
|
|
452
|
-
sanitizeErrorText?: (value: string) => string;
|
|
453
|
-
}
|
|
454
|
-
type RuntimeFilesystemStrategy = {
|
|
455
|
-
kind: 'host';
|
|
456
|
-
} | {
|
|
457
|
-
kind: 'remote-workspace';
|
|
458
|
-
pathOptions?: RuntimeRemoteWorkspacePathOptions;
|
|
459
|
-
};
|
|
460
|
-
interface RuntimeProjectionRequest {
|
|
461
|
-
/** Server-private endpoint coordinates. Never expose this request to plugin/front/model code. */
|
|
462
|
-
port: number;
|
|
463
|
-
path?: string;
|
|
464
|
-
}
|
|
465
|
-
interface RuntimeProjectionLease {
|
|
466
|
-
/** Sealed upstream consumed only by the Host projection broker. */
|
|
467
|
-
readonly url: string;
|
|
468
|
-
readonly expiresAt: string;
|
|
469
|
-
revoke(): Promise<void>;
|
|
470
|
-
}
|
|
471
|
-
type RuntimeTrustedServiceOperation = 'start' | 'observe' | 'act' | 'takeover' | 'return-control' | 'stop';
|
|
472
|
-
interface RuntimeTrustedServiceQualificationV1 {
|
|
473
|
-
readonly serviceRef: 'trusted-service-v1';
|
|
474
|
-
readonly protocolDigest: string;
|
|
475
|
-
readonly imageDigest: string;
|
|
476
|
-
readonly isolation: 'dedicated-uid-private-channel';
|
|
477
|
-
}
|
|
478
|
-
interface RuntimeTrustedServiceLeaseV1 {
|
|
479
|
-
readonly qualification: RuntimeTrustedServiceQualificationV1;
|
|
480
|
-
invoke(input: {
|
|
481
|
-
readonly operation: RuntimeTrustedServiceOperation;
|
|
482
|
-
readonly payload?: Uint8Array;
|
|
483
|
-
readonly timeoutMs: number;
|
|
484
|
-
readonly signal: AbortSignal;
|
|
485
|
-
}): Promise<{
|
|
486
|
-
readonly status: 'ok' | 'rejected' | 'unknown-outcome';
|
|
487
|
-
readonly payload?: Uint8Array;
|
|
488
|
-
}>;
|
|
489
|
-
/** Host-only fixed endpoint lookup. No host, port, URL, or provider identity crosses this seam. */
|
|
490
|
-
createProjection(input: {
|
|
491
|
-
readonly mode: 'observe' | 'control';
|
|
492
|
-
readonly expiresAt: Date;
|
|
493
|
-
}): Promise<RuntimeProjectionLease>;
|
|
494
|
-
close(): Promise<void>;
|
|
495
|
-
}
|
|
496
|
-
interface RuntimeTrustedServiceMechanismV1 {
|
|
497
|
-
readonly qualification: RuntimeTrustedServiceQualificationV1;
|
|
498
|
-
acquire(input: {
|
|
499
|
-
readonly leaseId: string;
|
|
500
|
-
readonly idleTtlMs: number;
|
|
501
|
-
readonly absoluteTtlMs: number;
|
|
502
|
-
readonly signal: AbortSignal;
|
|
503
|
-
}): Promise<RuntimeTrustedServiceLeaseV1>;
|
|
504
|
-
}
|
|
505
|
-
interface RuntimeModeAdapter {
|
|
506
|
-
readonly id: RuntimeModeId;
|
|
507
|
-
readonly runtimeHost?: AgentRuntimeHostOperations;
|
|
508
|
-
/**
|
|
509
|
-
* Declares whether the workspace files are strongly available on the host
|
|
510
|
-
* path before create() runs. Composition layers use this to decide whether
|
|
511
|
-
* host-side fs checks/prompts are safe without hard-coding sandbox IDs.
|
|
512
|
-
*/
|
|
513
|
-
readonly workspaceFsCapability?: Workspace['fsCapability'];
|
|
514
|
-
readonly readiness?: RuntimeModeReadinessHooks;
|
|
515
|
-
readonly cachedBindingHealthCheck?: RuntimeCachedBindingHealthCheck;
|
|
516
|
-
create(ctx: ModeContext): Promise<RuntimeBundle>;
|
|
517
|
-
/** Resolves the provider-owned workspace root in runtime coordinates. */
|
|
518
|
-
getRuntimeLayoutRoot(ctx: ModeContext): string;
|
|
519
|
-
evictCachedRuntime?(ctx: {
|
|
520
|
-
workspaceId: string;
|
|
521
|
-
}): void | Promise<void>;
|
|
522
|
-
dispose?(): Promise<void>;
|
|
523
|
-
}
|
|
524
|
-
interface ModeContext {
|
|
525
|
-
workspaceRoot: string;
|
|
526
|
-
sessionId: string;
|
|
527
|
-
workspaceId?: string;
|
|
528
|
-
templatePath?: string;
|
|
529
|
-
requestId?: string;
|
|
530
|
-
telemetry?: TelemetrySink;
|
|
531
|
-
}
|
|
532
|
-
interface RuntimeFilesystemAccessDecision {
|
|
533
|
-
readonly filesystem: string;
|
|
534
|
-
readonly normalizedPath: string;
|
|
535
|
-
readonly access: 'readonly' | 'readwrite';
|
|
536
|
-
readonly capabilities: Readonly<Record<RuntimeFilesystemCapability, boolean>>;
|
|
537
|
-
}
|
|
538
|
-
interface RuntimeFilesystemBindingOperations {
|
|
539
|
-
read(descriptor: {
|
|
540
|
-
filesystem: string;
|
|
541
|
-
path: string;
|
|
542
|
-
}): Promise<{
|
|
543
|
-
content: string;
|
|
544
|
-
mtimeMs?: number;
|
|
545
|
-
metadata?: unknown;
|
|
546
|
-
}>;
|
|
547
|
-
list(descriptor: {
|
|
548
|
-
filesystem: string;
|
|
549
|
-
path: string;
|
|
550
|
-
}): Promise<{
|
|
551
|
-
entries: string[];
|
|
552
|
-
metadata?: unknown;
|
|
553
|
-
}>;
|
|
554
|
-
find(descriptor: {
|
|
555
|
-
filesystem: string;
|
|
556
|
-
path: string;
|
|
557
|
-
}, pattern: string, options?: {
|
|
558
|
-
limit?: number;
|
|
559
|
-
offset?: number;
|
|
560
|
-
}): Promise<{
|
|
561
|
-
paths: string[];
|
|
562
|
-
metadata?: unknown;
|
|
563
|
-
}>;
|
|
564
|
-
grep(descriptor: {
|
|
565
|
-
filesystem: string;
|
|
566
|
-
path: string;
|
|
567
|
-
}, pattern: string, options?: {
|
|
568
|
-
limit?: number;
|
|
569
|
-
offset?: number;
|
|
570
|
-
}): Promise<{
|
|
571
|
-
matches: Array<{
|
|
572
|
-
path: string;
|
|
573
|
-
line: number;
|
|
574
|
-
text: string;
|
|
575
|
-
}>;
|
|
576
|
-
metadata?: unknown;
|
|
577
|
-
}>;
|
|
578
|
-
stat(descriptor: {
|
|
579
|
-
filesystem: string;
|
|
580
|
-
path: string;
|
|
581
|
-
}): Promise<{
|
|
582
|
-
isDirectory: boolean;
|
|
583
|
-
metadata?: unknown;
|
|
584
|
-
}>;
|
|
585
|
-
write?(descriptor: {
|
|
586
|
-
filesystem: string;
|
|
587
|
-
path: string;
|
|
588
|
-
content: string;
|
|
589
|
-
expectedMtimeMs?: number;
|
|
590
|
-
}): Promise<{
|
|
591
|
-
mtimeMs?: number;
|
|
592
|
-
metadata?: unknown;
|
|
593
|
-
}>;
|
|
594
|
-
writeBinary?(descriptor: {
|
|
595
|
-
filesystem: string;
|
|
596
|
-
path: string;
|
|
597
|
-
content: Uint8Array;
|
|
598
|
-
}): Promise<{
|
|
599
|
-
mtimeMs?: number;
|
|
600
|
-
metadata?: unknown;
|
|
601
|
-
}>;
|
|
602
|
-
createBinary?(descriptor: {
|
|
603
|
-
filesystem: string;
|
|
604
|
-
path: string;
|
|
605
|
-
content: Uint8Array;
|
|
606
|
-
}): Promise<{
|
|
607
|
-
mtimeMs?: number;
|
|
608
|
-
metadata?: unknown;
|
|
609
|
-
}>;
|
|
610
|
-
delete?(descriptor: {
|
|
611
|
-
filesystem: string;
|
|
612
|
-
path: string;
|
|
613
|
-
}): Promise<{
|
|
614
|
-
metadata?: unknown;
|
|
615
|
-
}>;
|
|
616
|
-
move?(descriptor: {
|
|
617
|
-
filesystem: string;
|
|
618
|
-
from: string;
|
|
619
|
-
to: string;
|
|
620
|
-
}): Promise<{
|
|
621
|
-
metadata?: unknown;
|
|
622
|
-
}>;
|
|
623
|
-
mkdir?(descriptor: {
|
|
624
|
-
filesystem: string;
|
|
625
|
-
path: string;
|
|
626
|
-
recursive?: boolean;
|
|
627
|
-
}): Promise<{
|
|
628
|
-
metadata?: unknown;
|
|
629
|
-
}>;
|
|
630
|
-
resolveAccess?(descriptor: {
|
|
631
|
-
filesystem: string;
|
|
632
|
-
path: string;
|
|
633
|
-
}): Promise<RuntimeFilesystemAccessDecision>;
|
|
634
|
-
rejectMutation(operation: string, descriptor: {
|
|
635
|
-
filesystem: string;
|
|
636
|
-
path: string;
|
|
637
|
-
}): never;
|
|
638
|
-
}
|
|
639
|
-
interface RuntimeFilesystemCatalogPresentation {
|
|
640
|
-
readonly visible?: boolean;
|
|
641
|
-
readonly label?: string;
|
|
642
|
-
readonly rootDir?: '.' | `/${string}`;
|
|
643
|
-
}
|
|
644
|
-
interface RuntimeFilesystemBinding {
|
|
645
|
-
readonly filesystem: string;
|
|
646
|
-
readonly access: 'readonly' | 'readwrite';
|
|
647
|
-
readonly operations: RuntimeFilesystemBindingOperations;
|
|
648
|
-
/** User-facing catalog projection; internal routing continues to use filesystem. */
|
|
649
|
-
readonly catalog?: RuntimeFilesystemCatalogPresentation;
|
|
650
|
-
/** When present, only these addressed Agents receive this user-visible binding. */
|
|
651
|
-
readonly agentTypeIds?: readonly string[];
|
|
652
|
-
}
|
|
653
|
-
interface RuntimeBundle {
|
|
654
|
-
runtimeContext?: WorkspaceRuntimeContext;
|
|
655
|
-
/**
|
|
656
|
-
* Server-private host/storage root for host-side filesystem work. Required
|
|
657
|
-
* when runtime-coordinate workspace resources have an explicit host mirror;
|
|
658
|
-
* absence means composition must not infer or project a host path. Do not use
|
|
659
|
-
* this as the agent-visible cwd; Workspace.root remains the public runtime
|
|
660
|
-
* namespace shown to tools/model.
|
|
661
|
-
*/
|
|
662
|
-
storageRoot?: string;
|
|
663
|
-
workspace: Workspace;
|
|
664
|
-
sandbox: Sandbox;
|
|
665
|
-
fileSearch: FileSearch;
|
|
666
|
-
/** Host-owned provider utilities injected at the application boundary. */
|
|
667
|
-
runtimeHost?: AgentRuntimeHostOperations;
|
|
668
|
-
/** Optional per-execution runtime env provider for local/direct operations that do not call Sandbox.exec. */
|
|
669
|
-
getRuntimeEnv?: () => Promise<Record<string, string>>;
|
|
670
|
-
/** Runtime-owned bash execution strategy, consumed by the agent bash tool builder. */
|
|
671
|
-
bash?: RuntimeBashStrategy;
|
|
672
|
-
/** Runtime-owned filesystem strategy, consumed by the agent filesystem tool builder. */
|
|
673
|
-
filesystem?: RuntimeFilesystemStrategy;
|
|
674
|
-
/** Optional filesystem bindings prepared for this runtime/session. */
|
|
675
|
-
filesystemBindings?: RuntimeFilesystemBinding[];
|
|
676
|
-
/** Pair-local projection authority captured with this exact RuntimeBundle generation. */
|
|
677
|
-
createRuntimeProjection?: (request: RuntimeProjectionRequest) => Promise<RuntimeProjectionLease>;
|
|
678
|
-
/** Qualified fixed service channel. Ordinary Agent tools never receive this field. */
|
|
679
|
-
trustedServiceV1?: RuntimeTrustedServiceMechanismV1;
|
|
680
|
-
/**
|
|
681
|
-
* Workspace-relative prefixes the host protects from mutation. Carried on the
|
|
682
|
-
* bundle so shell/provisioning enforcement uses the same policy as the
|
|
683
|
-
* Operations bindings instead of re-deriving it.
|
|
684
|
-
*/
|
|
685
|
-
readonlyWorkspacePaths?: readonly string[];
|
|
686
|
-
/** Provisioning operations derived from this bundle's acquired Workspace + Sandbox pair. */
|
|
687
|
-
provisioningAdapter?: WorkspaceProvisioningAdapter;
|
|
688
|
-
/** Idempotently releases the acquired Workspace + Sandbox pair. */
|
|
689
|
-
disposeRuntime?: () => Promise<void>;
|
|
690
|
-
}
|
|
691
|
-
|
|
692
|
-
type PiPackageSource = PackageSource;
|
|
693
|
-
declare const PI_PACKAGE_RESOURCE_FILTERS: readonly ["extensions", "skills", "prompts", "themes"];
|
|
694
|
-
declare function piPackageSourceKey(source: PiPackageSource): string;
|
|
695
|
-
declare function compactPiPackages(sources: Array<PiPackageSource | undefined>): PiPackageSource[];
|
|
696
|
-
declare function mergePiPackageSources(base?: PiPackageSource[], additional?: PiPackageSource[]): PiPackageSource[];
|
|
697
|
-
|
|
698
|
-
interface PiHarnessOptions {
|
|
699
|
-
noContextFiles?: boolean;
|
|
700
|
-
/** Projects server-internal skill files to model-visible resource locators. */
|
|
701
|
-
locateSkillResource?: (filePath: string) => {
|
|
702
|
-
filesystem: string;
|
|
703
|
-
path: string;
|
|
704
|
-
} | undefined;
|
|
705
|
-
noSkills?: boolean;
|
|
706
|
-
/** Disable ambient Pi extensions (required when tools execute in a remote runtime). */
|
|
707
|
-
noExtensions?: boolean;
|
|
708
|
-
/** Ignore packages from user/project Pi settings while preserving explicit host package grants. */
|
|
709
|
-
noAmbientPackages?: boolean;
|
|
710
|
-
additionalSkillPaths?: string[];
|
|
711
|
-
defaultModel?: {
|
|
712
|
-
provider: string;
|
|
713
|
-
id: string;
|
|
714
|
-
};
|
|
715
|
-
/**
|
|
716
|
-
* Additional native Pi package sources to enable for this agent runtime.
|
|
717
|
-
* These are applied as in-memory SettingsManager overrides, so host/plugin
|
|
718
|
-
* declarations do not mutate .pi/settings.json.
|
|
719
|
-
*/
|
|
720
|
-
packages?: PiPackageSource[];
|
|
721
|
-
/**
|
|
722
|
-
* Additional native pi extension entrypoints. Pi loads these through jiti and
|
|
723
|
-
* re-imports them on ctx.reload(), which is required for hot-reloadable
|
|
724
|
-
* boring agent plugins.
|
|
725
|
-
*/
|
|
726
|
-
extensionPaths?: string[];
|
|
727
|
-
/** In-process host extensions. Use only for trusted built-ins; hot plugin code should use paths. */
|
|
728
|
-
extensionFactories?: ExtensionFactory[];
|
|
729
|
-
/**
|
|
730
|
-
* Optional source of hot-reloadable Pi resources. Pi calls it on every
|
|
731
|
-
* reloadSession() (and once at session build) and merges the result with
|
|
732
|
-
* the static fields above. Lets the workspace plugin layer refresh
|
|
733
|
-
* package.json-discovered skills/packages/extensions without mutating
|
|
734
|
-
* arrays that the harness already captured.
|
|
735
|
-
*/
|
|
736
|
-
getHotReloadableResources?: () => HotReloadablePiResources;
|
|
737
|
-
/** Reject an explicit unavailable/unknown model instead of silently falling back. */
|
|
738
|
-
strictModelResolution?: boolean;
|
|
739
|
-
/** Host-owned, actor-bound credential source. Never projected into the runtime workspace. */
|
|
740
|
-
credentialStore?: CredentialStore;
|
|
741
|
-
}
|
|
742
|
-
/** Pi harness options with the discovery flags resolved to definite booleans. */
|
|
743
|
-
type ResolvedPiHarnessOptions = PiHarnessOptions & {
|
|
744
|
-
noContextFiles: boolean;
|
|
745
|
-
noSkills: boolean;
|
|
746
|
-
};
|
|
747
|
-
interface HotReloadablePiResources {
|
|
748
|
-
additionalSkillPaths?: string[];
|
|
749
|
-
packages?: PiPackageSource[];
|
|
750
|
-
extensionPaths?: string[];
|
|
751
|
-
}
|
|
752
|
-
type PiExtensionFactory = ExtensionFactory;
|
|
753
|
-
|
|
754
|
-
/**
|
|
755
|
-
* GET /api/v1/agents/:agentTypeId/skills
|
|
756
|
-
*
|
|
757
|
-
* Returns the list of PI skills discovered for the current workspace —
|
|
758
|
-
* global skills (~/.pi/agent/skills) plus any project-local SKILL.md files.
|
|
759
|
-
* The front-end uses this to populate the slash-command picker without
|
|
760
|
-
* host apps having to hardcode skill names in extraCommands.
|
|
761
|
-
*
|
|
762
|
-
* Shape:
|
|
763
|
-
* { skills: [{ name: string, description: string }] }
|
|
764
|
-
*/
|
|
765
|
-
|
|
766
|
-
interface SkillSummary {
|
|
767
|
-
name: string;
|
|
768
|
-
description: string;
|
|
769
|
-
/** Browser-safe locator for opening a supported skill source. */
|
|
770
|
-
resource?: AgentSkillResource;
|
|
771
|
-
/** False for management-only rows that Pi did not retain as invocable. */
|
|
772
|
-
invocable?: boolean;
|
|
773
|
-
/** Human-readable source/scope label for diagnostics and disabled rows. */
|
|
774
|
-
source?: string;
|
|
775
|
-
}
|
|
776
|
-
interface AgentSkillResourceSnapshot {
|
|
777
|
-
readonly generation: string;
|
|
778
|
-
readonly managedSkills: readonly SkillSummary[];
|
|
779
|
-
locateSkill(filePath: string): AgentSkillResource | undefined;
|
|
780
|
-
}
|
|
781
|
-
|
|
782
|
-
/**
|
|
783
|
-
* Injectable persistence port for the credential vault.
|
|
784
|
-
*
|
|
785
|
-
* The ratified persistence model (docs/issues/820/byok-secret-vault-plan.md,
|
|
786
|
-
* "Proposed persistence model") maps one-to-one onto these methods:
|
|
787
|
-
* `workspace_provider_credentials` -> credential record,
|
|
788
|
-
* `workspace_credential_keys` -> wrapped DEK,
|
|
789
|
-
* `workspace_provider_credential_fields` -> field envelope.
|
|
790
|
-
*
|
|
791
|
-
* S1 supplies both in-memory and Postgres implementations. Only ciphertext,
|
|
792
|
-
* nonce, tag, persisted AAD, and metadata-only tombstones cross this port —
|
|
793
|
-
* never plaintext, never a KEK.
|
|
794
|
-
*/
|
|
795
|
-
type CredentialMaterialKindV1 = 'field-set' | 'none';
|
|
796
|
-
/** Metadata-only projection. Secret envelopes are deliberately unreachable here. */
|
|
797
|
-
interface StoredCredentialMetadataV1 {
|
|
798
|
-
readonly providerId: ProviderId;
|
|
799
|
-
readonly displayLabel: string;
|
|
800
|
-
readonly credentialType: string;
|
|
801
|
-
readonly state: CredentialLifecycleStateV1;
|
|
802
|
-
readonly credentialVersion: number;
|
|
803
|
-
readonly maskedLastFourSuffix?: string;
|
|
804
|
-
readonly createdAt: string;
|
|
805
|
-
readonly updatedAt: string;
|
|
806
|
-
}
|
|
807
|
-
interface StoredCredentialRecordV1 {
|
|
808
|
-
/** Stable per-(workspace, provider) credential identity, bound into AAD. */
|
|
809
|
-
readonly credentialId: string;
|
|
810
|
-
readonly credentialVersion: number;
|
|
811
|
-
readonly dekGeneration: number;
|
|
812
|
-
readonly materialKind: CredentialMaterialKindV1;
|
|
813
|
-
}
|
|
814
|
-
interface CredentialFieldKeyV1 {
|
|
815
|
-
readonly workspaceId: string;
|
|
816
|
-
readonly providerId: ProviderId;
|
|
817
|
-
readonly credentialVersion: number;
|
|
818
|
-
/** Required when persisting a live envelope; omitted for keyed reads. */
|
|
819
|
-
readonly dekGeneration?: number;
|
|
820
|
-
readonly fieldId: string;
|
|
821
|
-
}
|
|
822
|
-
type CredentialFieldDeletionReasonV1 = 'superseded-version' | 'credential-tombstone' | 'crypto-shred';
|
|
823
|
-
interface WorkspaceDekRotationStateV1 {
|
|
824
|
-
/** Caller-stable idempotency key. A retry must present the same operation id. */
|
|
825
|
-
readonly operationId: string;
|
|
826
|
-
readonly sourceGeneration: number;
|
|
827
|
-
readonly targetGeneration: number;
|
|
828
|
-
readonly phase: 'reencrypting' | 'verified' | 'anchor-advanced';
|
|
829
|
-
}
|
|
830
|
-
interface WorkspaceDekRotationReceiptV1 {
|
|
831
|
-
readonly operationId: string;
|
|
832
|
-
readonly sourceGeneration: number;
|
|
833
|
-
readonly targetGeneration: number;
|
|
834
|
-
}
|
|
835
|
-
interface WorkspaceCredentialRecordV1 {
|
|
836
|
-
readonly providerId: ProviderId;
|
|
837
|
-
readonly record: StoredCredentialRecordV1;
|
|
838
|
-
}
|
|
839
|
-
interface CommitDekRotationRecordInputV1 {
|
|
840
|
-
readonly workspaceId: string;
|
|
841
|
-
readonly providerId: ProviderId;
|
|
842
|
-
readonly expectedCredentialVersion: number;
|
|
843
|
-
readonly sourceGeneration: number;
|
|
844
|
-
readonly targetGeneration: number;
|
|
845
|
-
readonly fields: ReadonlyMap<string, CredentialEnvelopeV1>;
|
|
846
|
-
}
|
|
847
|
-
interface CredentialFieldTombstoneV1 {
|
|
848
|
-
readonly deletedAt: string;
|
|
849
|
-
readonly reason: CredentialFieldDeletionReasonV1;
|
|
850
|
-
}
|
|
851
|
-
interface CommitCredentialVersionInputV1 {
|
|
852
|
-
readonly workspaceId: string;
|
|
853
|
-
readonly providerId: ProviderId;
|
|
854
|
-
readonly expectedCredentialVersion: number;
|
|
855
|
-
readonly record: StoredCredentialRecordV1;
|
|
856
|
-
readonly fields: ReadonlyMap<string, CredentialEnvelopeV1>;
|
|
857
|
-
readonly supersededFieldsTombstone?: CredentialFieldTombstoneV1;
|
|
858
|
-
}
|
|
859
|
-
interface CommitCredentialVersionInputV2 extends CommitCredentialVersionInputV1 {
|
|
860
|
-
/** Applied in the same durable transaction as the record/version CAS. */
|
|
861
|
-
readonly metadataUpdate: Readonly<{
|
|
862
|
-
state: CredentialLifecycleStateV1;
|
|
863
|
-
displayLabel?: string;
|
|
864
|
-
credentialType?: string;
|
|
865
|
-
maskedLastFourSuffix?: string | null;
|
|
866
|
-
}>;
|
|
867
|
-
}
|
|
868
|
-
interface WorkspaceCredentialLockOptionsV1 {
|
|
869
|
-
/** Cancels only while waiting to acquire the lock; a running mutation is never interrupted. */
|
|
870
|
-
readonly signal?: AbortSignal;
|
|
871
|
-
/** Absolute Unix timestamp in milliseconds by which lock acquisition must finish. */
|
|
872
|
-
readonly deadlineMs?: number;
|
|
873
|
-
/** Relative acquisition bound. The earliest of this and deadlineMs wins. */
|
|
874
|
-
readonly timeoutMs?: number;
|
|
875
|
-
}
|
|
876
|
-
interface CredentialVaultPersistenceV1 {
|
|
877
|
-
/** Serializes workspace-wide lifecycle mutations and supplies a scoped adapter. */
|
|
878
|
-
withWorkspaceLock<T>(workspaceId: string, mutate: (locked: CredentialVaultPersistenceV1) => Promise<T>, options?: WorkspaceCredentialLockOptionsV1): Promise<T>;
|
|
879
|
-
getCredentialMetadata(workspaceId: string, providerId: ProviderId): Promise<StoredCredentialMetadataV1 | undefined>;
|
|
880
|
-
listCredentialMetadata(workspaceId: string): Promise<readonly StoredCredentialMetadataV1[]>;
|
|
881
|
-
/** True when any credential row, key, field/tombstone, rotation, or shred fence remains. */
|
|
882
|
-
hasWorkspaceCredentialArtifacts(workspaceId: string): Promise<boolean>;
|
|
883
|
-
updateCredentialMetadata(workspaceId: string, providerId: ProviderId, update: Readonly<{
|
|
884
|
-
state: CredentialLifecycleStateV1;
|
|
885
|
-
displayLabel?: string;
|
|
886
|
-
credentialType?: string;
|
|
887
|
-
maskedLastFourSuffix?: string | null;
|
|
888
|
-
}>): Promise<StoredCredentialMetadataV1>;
|
|
889
|
-
getCredentialRecord(workspaceId: string, providerId: ProviderId): Promise<StoredCredentialRecordV1 | undefined>;
|
|
890
|
-
putCredentialRecord(workspaceId: string, providerId: ProviderId, record: StoredCredentialRecordV1): Promise<void>;
|
|
891
|
-
/** Atomically CASes the record, fields, and superseded-version tombstones. */
|
|
892
|
-
commitCredentialVersion(input: CommitCredentialVersionInputV1): Promise<void>;
|
|
893
|
-
getWrappedDek(workspaceId: string, dekGeneration: number): Promise<WrappedWorkspaceDekV1 | undefined>;
|
|
894
|
-
putWrappedDek(workspaceId: string, dekGeneration: number, wrapped: WrappedWorkspaceDekV1): Promise<void>;
|
|
895
|
-
deleteWrappedDek(workspaceId: string, dekGeneration: number): Promise<void>;
|
|
896
|
-
listCredentialRecords(workspaceId: string): Promise<readonly WorkspaceCredentialRecordV1[]>;
|
|
897
|
-
listFields(workspaceId: string, providerId: ProviderId, credentialVersion: number): Promise<ReadonlyMap<string, CredentialEnvelopeV1>>;
|
|
898
|
-
/** Atomically replaces one current record's envelopes during DEK rotation. */
|
|
899
|
-
commitDekRotationRecord(input: CommitDekRotationRecordInputV1): Promise<void>;
|
|
900
|
-
getDekRotationState(workspaceId: string): Promise<WorkspaceDekRotationStateV1 | undefined>;
|
|
901
|
-
putDekRotationState(workspaceId: string, state: WorkspaceDekRotationStateV1): Promise<void>;
|
|
902
|
-
getDekRotationReceipt(workspaceId: string, operationId: string): Promise<WorkspaceDekRotationReceiptV1 | undefined>;
|
|
903
|
-
/** Atomically destroys N, clears the active marker, and records the idempotency receipt. */
|
|
904
|
-
finalizeDekRotation(workspaceId: string, state: WorkspaceDekRotationStateV1): Promise<void>;
|
|
905
|
-
clearDekRotationState(workspaceId: string): Promise<void>;
|
|
906
|
-
isWorkspaceCryptoShredded(workspaceId: string): Promise<boolean>;
|
|
907
|
-
/** Atomically tombstones ciphertext, destroys wrapped DEKs, and records the shred fence. */
|
|
908
|
-
cryptoShredWorkspace(workspaceId: string, shreddedAt: string): Promise<void>;
|
|
909
|
-
getField(key: CredentialFieldKeyV1): Promise<CredentialEnvelopeV1 | undefined>;
|
|
910
|
-
putField(key: CredentialFieldKeyV1, envelope: CredentialEnvelopeV1): Promise<void>;
|
|
911
|
-
/** Deletes ciphertext and retains metadata-only tombstones for every field. */
|
|
912
|
-
tombstoneCredentialVersionFields(workspaceId: string, providerId: ProviderId, credentialVersion: number, tombstone: CredentialFieldTombstoneV1): Promise<void>;
|
|
913
|
-
getFieldTombstone(key: CredentialFieldKeyV1): Promise<CredentialFieldTombstoneV1 | undefined>;
|
|
914
|
-
}
|
|
915
|
-
/** Persistence capability required by the V2 recoverable vault protocol. */
|
|
916
|
-
interface CredentialVaultPersistenceV2 extends CredentialVaultPersistenceV1 {
|
|
917
|
-
readonly contractVersion: 'boring.credential-vault-persistence.v2';
|
|
918
|
-
/** Preserves the V2 capability on the transaction-scoped adapter. */
|
|
919
|
-
withWorkspaceLock<T>(workspaceId: string, mutate: (locked: CredentialVaultPersistenceV2) => Promise<T>, options?: WorkspaceCredentialLockOptionsV1): Promise<T>;
|
|
920
|
-
/** Atomically CASes record, fields, tombstones, and authenticated metadata. */
|
|
921
|
-
commitCredentialVersionV2(input: CommitCredentialVersionInputV2): Promise<void>;
|
|
922
|
-
}
|
|
923
|
-
|
|
924
|
-
/** Single runtime and type-level source of truth for gateway operations persisted in request keys. */
|
|
925
|
-
declare const AGENT_GATEWAY_EFFECTS: readonly ["session.create", "session.rename", "session.archive", "session.delete", "session.prompt", "session.followup", "session.interrupt", "session.stop", "session.queue.clear", "agent.reload", "session.command.execute"];
|
|
926
|
-
type AgentGatewayEffect = typeof AGENT_GATEWAY_EFFECTS[number];
|
|
927
|
-
type AgentRequestTarget = {
|
|
928
|
-
readonly kind: 'agent';
|
|
929
|
-
readonly agentTypeId: string;
|
|
930
|
-
} | {
|
|
931
|
-
readonly kind: 'session';
|
|
932
|
-
readonly ref: AgentSessionRef;
|
|
933
|
-
};
|
|
934
|
-
interface AgentRequestKey {
|
|
935
|
-
readonly workspaceScopeId: string;
|
|
936
|
-
readonly authSubjectId: string;
|
|
937
|
-
readonly operation: AgentGatewayEffect;
|
|
938
|
-
readonly target: AgentRequestTarget;
|
|
939
|
-
readonly requestId: string;
|
|
940
|
-
}
|
|
941
|
-
type RunId = string;
|
|
942
|
-
interface VerifiedSeatParticipation {
|
|
943
|
-
readonly seatId: string;
|
|
944
|
-
}
|
|
945
|
-
/** Admission-time identity and provenance reference; never a live authorization grant. */
|
|
946
|
-
interface AcceptedWorkContext {
|
|
947
|
-
readonly version: 1;
|
|
948
|
-
readonly identity: {
|
|
949
|
-
readonly runId: RunId;
|
|
950
|
-
readonly requestKey: AgentRequestKey;
|
|
951
|
-
readonly agent: {
|
|
952
|
-
readonly agentTypeId: string;
|
|
953
|
-
};
|
|
954
|
-
readonly participation?: VerifiedSeatParticipation;
|
|
955
|
-
};
|
|
956
|
-
readonly operation: AgentGatewayEffect;
|
|
957
|
-
readonly target: AgentRequestTarget;
|
|
958
|
-
readonly authority: {
|
|
959
|
-
readonly workspaceScopeId: string;
|
|
960
|
-
readonly authSubjectId: string;
|
|
961
|
-
};
|
|
962
|
-
readonly delegation: {
|
|
963
|
-
readonly lineage: readonly RunId[];
|
|
964
|
-
};
|
|
965
|
-
}
|
|
966
|
-
interface AgentStableServiceErrorDTO {
|
|
967
|
-
readonly statusCode: number;
|
|
968
|
-
readonly error: {
|
|
969
|
-
readonly code: string;
|
|
970
|
-
readonly message: string;
|
|
971
|
-
readonly retryable?: boolean;
|
|
972
|
-
};
|
|
973
|
-
}
|
|
974
|
-
type AgentRequestFailure = {
|
|
975
|
-
readonly kind: 'gateway';
|
|
976
|
-
readonly error: AgentGatewayErrorDTO;
|
|
977
|
-
} | {
|
|
978
|
-
readonly kind: 'service';
|
|
979
|
-
readonly error: AgentStableServiceErrorDTO;
|
|
980
|
-
};
|
|
981
|
-
interface AgentRequestLedgerRecordBase {
|
|
982
|
-
readonly key: AgentRequestKey;
|
|
983
|
-
readonly acceptedWork: AcceptedWorkContext;
|
|
984
|
-
readonly digest: string;
|
|
985
|
-
readonly updatedAt: number;
|
|
986
|
-
}
|
|
987
|
-
type AgentRequestLedgerRecord = (AgentRequestLedgerRecordBase & {
|
|
988
|
-
readonly state: 'pending-admission';
|
|
989
|
-
/** The last owner stopped before ledger admission acceptance or effect dispatch. */
|
|
990
|
-
readonly retryable?: true;
|
|
991
|
-
}) | (AgentRequestLedgerRecordBase & {
|
|
992
|
-
readonly state: 'admission-accepted';
|
|
993
|
-
/** Append-only admission provenance, separate from current authority. */
|
|
994
|
-
readonly admissionReceipt: string;
|
|
995
|
-
}) | (AgentRequestLedgerRecordBase & {
|
|
996
|
-
readonly state: 'in-flight';
|
|
997
|
-
}) | (AgentRequestLedgerRecordBase & {
|
|
998
|
-
readonly state: 'rejected';
|
|
999
|
-
readonly failure: AgentRequestFailure;
|
|
1000
|
-
}) | (AgentRequestLedgerRecordBase & {
|
|
1001
|
-
readonly state: 'completed';
|
|
1002
|
-
readonly receipt: JsonValue;
|
|
1003
|
-
}) | (AgentRequestLedgerRecordBase & {
|
|
1004
|
-
readonly state: 'outcome-unknown';
|
|
1005
|
-
readonly error: AgentGatewayErrorDTO;
|
|
1006
|
-
});
|
|
1007
|
-
interface AgentRequestLedger {
|
|
1008
|
-
/** Direct production projections require transactional durable ownership. */
|
|
1009
|
-
readonly durability: 'durable-transactional' | 'in-memory';
|
|
1010
|
-
/** Atomically create or reclaim explicitly retryable admission across all store users. */
|
|
1011
|
-
prepare(key: AgentRequestKey, digest: string, acceptedWork: AcceptedWorkContext): Promise<AgentRequestLedgerPrepareResult>;
|
|
1012
|
-
/** Release only a pending claim whose owner has stopped before any effect. */
|
|
1013
|
-
markAdmissionRetryable(key: AgentRequestKey): Promise<void>;
|
|
1014
|
-
/** All transitions are compare-and-swap against the exact allowed prior state. */
|
|
1015
|
-
acceptAdmission(key: AgentRequestKey, admissionReceipt: string): Promise<void>;
|
|
1016
|
-
beginEffect(key: AgentRequestKey): Promise<void>;
|
|
1017
|
-
reject(key: AgentRequestKey, failure: AgentRequestFailure): Promise<void>;
|
|
1018
|
-
complete(key: AgentRequestKey, receipt: JsonValue): Promise<void>;
|
|
1019
|
-
markOutcomeUnknown(key: AgentRequestKey, error: AgentGatewayErrorDTO): Promise<void>;
|
|
1020
|
-
read(key: AgentRequestKey): Promise<AgentRequestLedgerRecord | undefined>;
|
|
1021
|
-
close?(): void | Promise<void>;
|
|
1022
|
-
}
|
|
1023
|
-
interface AgentRequestLedgerPrepareResult {
|
|
1024
|
-
readonly ownership: 'created' | 'reclaimed' | 'existing';
|
|
1025
|
-
readonly record: AgentRequestLedgerRecord;
|
|
1026
|
-
}
|
|
1027
|
-
type AgentEffectAdmissionResult = {
|
|
1028
|
-
readonly type: 'accepted';
|
|
1029
|
-
readonly admissionReceipt: string;
|
|
1030
|
-
} | {
|
|
1031
|
-
readonly type: 'rejected';
|
|
1032
|
-
readonly error: AgentGatewayErrorDTO;
|
|
1033
|
-
} | {
|
|
1034
|
-
readonly type: 'retryable';
|
|
1035
|
-
readonly error: AgentGatewayErrorDTO;
|
|
1036
|
-
};
|
|
1037
|
-
interface AgentEffectAdmission {
|
|
1038
|
-
/** Must be idempotent and reconcilable on the complete ledger key. */
|
|
1039
|
-
admit(input: {
|
|
1040
|
-
readonly key: AgentRequestKey;
|
|
1041
|
-
readonly digest: string;
|
|
1042
|
-
readonly scope: VerifiedAgentScopeClaim;
|
|
1043
|
-
readonly operation: AgentGatewayEffect;
|
|
1044
|
-
readonly target: AgentRequestTarget;
|
|
1045
|
-
}): Promise<AgentEffectAdmissionResult>;
|
|
1046
|
-
}
|
|
1047
|
-
/**
|
|
1048
|
-
* An authored file that contributes to this agent's instructions, addressed
|
|
1049
|
-
* exactly like every other openable resource (`{filesystem, path}`) so the
|
|
1050
|
-
* client can route it through the same safety guard as skills.
|
|
1051
|
-
*
|
|
1052
|
-
* The Host knows these locations from fleet configuration; clients must never
|
|
1053
|
-
* re-derive them from the agent id (seat and agentTypeId are unrelated
|
|
1054
|
-
* fleet.yaml fields). `role` is a DISCRIMINATOR, not a display string — the
|
|
1055
|
-
* words shown to the user are the client's business.
|
|
1056
|
-
*/
|
|
1057
|
-
interface AgentInstructionFileRef {
|
|
1058
|
-
readonly filesystem: string;
|
|
1059
|
-
/** Workspace-relative path, e.g. `.agents/personas/concierge/instructions.md`. */
|
|
1060
|
-
readonly path: string;
|
|
1061
|
-
readonly role: 'persona';
|
|
1062
|
-
}
|
|
1063
|
-
/**
|
|
1064
|
-
* An authored instruction file as the fleet composer knows it: a canonical
|
|
1065
|
-
* HOST absolute path, not yet addressed against any workspace.
|
|
1066
|
-
*
|
|
1067
|
-
* The two shapes are deliberately distinct. A multi-workspace host (the CLI
|
|
1068
|
-
* hub, core) serves a DIFFERENT root per request, so composition cannot know
|
|
1069
|
-
* which root a ref should be relative to; only the request can. The spec
|
|
1070
|
-
* therefore carries sources, and `describe` publishes the subset that is
|
|
1071
|
-
* reachable through the root actually being served (gh-1189).
|
|
1072
|
-
*/
|
|
1073
|
-
interface AgentInstructionSource {
|
|
1074
|
-
/** Canonical absolute path on the host filesystem. */
|
|
1075
|
-
readonly absolutePath: string;
|
|
1076
|
-
readonly role: 'persona';
|
|
1077
|
-
}
|
|
1078
|
-
declare const DEFAULT_AGENT_TYPE_ID = "default";
|
|
1079
|
-
interface AgentHostAgentSpec {
|
|
1080
|
-
readonly agentTypeId: string;
|
|
1081
|
-
readonly definition: {
|
|
1082
|
-
readonly instructions: string;
|
|
1083
|
-
readonly label: string;
|
|
1084
|
-
readonly version?: string;
|
|
1085
|
-
/**
|
|
1086
|
-
* Computed identity of the compiled definition (instructions + knowledge
|
|
1087
|
-
* bytes). The digest, not the version string, is the definition identity.
|
|
1088
|
-
*/
|
|
1089
|
-
readonly digest?: string;
|
|
1090
|
-
};
|
|
1091
|
-
/**
|
|
1092
|
-
* Optional agent-carried knowledge shipped inside the definition package.
|
|
1093
|
-
* Composition mounts it as a readonly, agent-scoped filesystem binding;
|
|
1094
|
-
* absent = no binding.
|
|
1095
|
-
*/
|
|
1096
|
-
readonly knowledge?: {
|
|
1097
|
-
/** Host path of the package's `knowledge/` folder. */
|
|
1098
|
-
readonly rootDir: string;
|
|
1099
|
-
};
|
|
1100
|
-
/**
|
|
1101
|
-
* Authored instruction sources behind `definition.instructions`, as host
|
|
1102
|
-
* absolute paths. Addressed against a served workspace root per request by
|
|
1103
|
-
* `describe`, never at composition time.
|
|
1104
|
-
*/
|
|
1105
|
-
readonly instructionSources?: readonly AgentInstructionSource[];
|
|
1106
|
-
readonly plugins?: readonly {
|
|
1107
|
-
/** Canonical app-preflighted plugin ID. */
|
|
1108
|
-
readonly name: string;
|
|
1109
|
-
readonly config?: JsonValue;
|
|
1110
|
-
}[];
|
|
1111
|
-
readonly model?: {
|
|
1112
|
-
readonly preferred?: string;
|
|
1113
|
-
/** RESERVED / NOT ENFORCED. Per-turn token-limit enforcement is future work. */
|
|
1114
|
-
readonly maxTokensPerTurn?: number;
|
|
1115
|
-
};
|
|
1116
|
-
/** Trusted host-owned provisioning grants; absent means no inherited resources. */
|
|
1117
|
-
readonly provisioning?: {
|
|
1118
|
-
readonly inheritSkillPaths?: boolean;
|
|
1119
|
-
};
|
|
1120
|
-
}
|
|
1121
|
-
type ConfiguredAgentHostAgentSpec = AgentHostAgentSpec;
|
|
1122
|
-
/**
|
|
1123
|
-
* Server-only compiler output. App-specific validated handles may be attached,
|
|
1124
|
-
* but the Host revalidates the complete agent ID set before freezing it.
|
|
1125
|
-
*/
|
|
1126
|
-
type CompiledAgentHostAgentSpec = AgentHostAgentSpec & {
|
|
1127
|
-
readonly resolvedPolicy?: Readonly<Record<string, unknown>>;
|
|
1128
|
-
/** Required when resolvedPolicy contains opaque/non-JSON runtime handles. */
|
|
1129
|
-
readonly resolvedPolicyDigest?: string;
|
|
1130
|
-
};
|
|
1131
|
-
interface AgentFleetCompiler {
|
|
1132
|
-
compile(input: {
|
|
1133
|
-
readonly agents: readonly AgentHostAgentSpec[];
|
|
1134
|
-
}): Promise<readonly CompiledAgentHostAgentSpec[]>;
|
|
1135
|
-
}
|
|
1136
|
-
interface ResolvedEnvironmentScope {
|
|
1137
|
-
readonly placementIdentity: string;
|
|
1138
|
-
readonly workspaceRoot: string;
|
|
1139
|
-
/** Physical provider workspace identifier; defaults to the verified storage scope. */
|
|
1140
|
-
readonly runtimeWorkspaceId?: string;
|
|
1141
|
-
readonly templatePath?: string;
|
|
1142
|
-
readonly provisioningFingerprint: string;
|
|
1143
|
-
readonly provisionRuntime?: (input: {
|
|
1144
|
-
readonly runtimeBundle: Awaited<ReturnType<RuntimeModeAdapter['create']>>;
|
|
1145
|
-
readonly signal: AbortSignal;
|
|
1146
|
-
}) => Promise<WorkspaceProvisioningResult | undefined>;
|
|
1147
|
-
}
|
|
1148
|
-
interface ResolvedAgentRuntimeScope {
|
|
1149
|
-
/** Persisted semantic compatibility identity. */
|
|
1150
|
-
readonly identity: string;
|
|
1151
|
-
/** Stable physical binding slot, independent of semantic resource revisions. */
|
|
1152
|
-
readonly physicalBindingIdentity?: string;
|
|
1153
|
-
/** Canonical digest of the immutable plugin/resource inputs used by reload. */
|
|
1154
|
-
readonly resourceInputDigest?: string;
|
|
1155
|
-
/**
|
|
1156
|
-
* Side-effect-free fence for path-backed reload resources. The Host invokes
|
|
1157
|
-
* it after classification, immediately before the effect, and after every
|
|
1158
|
-
* awaited apply/load stage so a successful receipt always matches the
|
|
1159
|
-
* resourceInputDigest recorded in the ledger.
|
|
1160
|
-
*/
|
|
1161
|
-
readonly revalidateResourceInputs?: () => Promise<void>;
|
|
1162
|
-
readonly environment: ResolvedEnvironmentScope;
|
|
1163
|
-
readonly sessionNamespace: string;
|
|
1164
|
-
readonly pi?: PiHarnessOptions;
|
|
1165
|
-
readonly extraTools?: readonly AgentTool[];
|
|
1166
|
-
/** Joined trusted-plugin cleanup invoked after backend session deletion succeeds. */
|
|
1167
|
-
readonly onSessionDelete?: (input: {
|
|
1168
|
-
readonly workspaceScopeId: string;
|
|
1169
|
-
readonly agentTypeId: string;
|
|
1170
|
-
readonly sessionId: string;
|
|
1171
|
-
}) => Promise<void>;
|
|
1172
|
-
readonly includeFilesystemTools?: boolean;
|
|
1173
|
-
readonly includeUploadTools?: boolean;
|
|
1174
|
-
readonly sessionDir?: string;
|
|
1175
|
-
readonly reloadMetadata?: {
|
|
1176
|
-
readonly diagnostics?: ReadonlyArray<{
|
|
1177
|
-
readonly source: string;
|
|
1178
|
-
readonly message: string;
|
|
1179
|
-
readonly pluginId?: string;
|
|
1180
|
-
}>;
|
|
1181
|
-
readonly restartWarnings?: ReadonlyArray<{
|
|
1182
|
-
readonly id: string;
|
|
1183
|
-
readonly surfaces: readonly string[];
|
|
1184
|
-
readonly message: string;
|
|
1185
|
-
}>;
|
|
1186
|
-
};
|
|
1187
|
-
/**
|
|
1188
|
-
* Host-internal reload mutation. Candidate identity fields above must be
|
|
1189
|
-
* resolved without mutating plugin, backend, or runtime resource state.
|
|
1190
|
-
* The Host invokes this callback only after durable ownership, admission,
|
|
1191
|
-
* immutable identity classification, and the binding operation fence.
|
|
1192
|
-
*/
|
|
1193
|
-
readonly applyReload?: (input: {
|
|
1194
|
-
readonly runtimeBundle: RuntimeBundle;
|
|
1195
|
-
}) => Promise<{
|
|
1196
|
-
readonly diagnostics?: ReadonlyArray<{
|
|
1197
|
-
readonly source: string;
|
|
1198
|
-
readonly message: string;
|
|
1199
|
-
readonly pluginId?: string;
|
|
1200
|
-
}>;
|
|
1201
|
-
readonly restartWarnings?: ReadonlyArray<{
|
|
1202
|
-
readonly id: string;
|
|
1203
|
-
readonly surfaces: readonly string[];
|
|
1204
|
-
readonly message: string;
|
|
1205
|
-
}>;
|
|
1206
|
-
} | undefined>;
|
|
1207
|
-
readonly getFilesystemBindings?: (input: {
|
|
1208
|
-
readonly scope: VerifiedAgentScopeClaim;
|
|
1209
|
-
readonly sessionId?: string;
|
|
1210
|
-
readonly requestId: string;
|
|
1211
|
-
}) => Promise<readonly RuntimeFilesystemBinding[] | undefined>;
|
|
1212
|
-
/**
|
|
1213
|
-
* Skill-resource locator/catalog snapshot for the current reload
|
|
1214
|
-
* generation. Threaded through the capability-projection layer so
|
|
1215
|
-
* `/skills` can resolve package-managed skill locators without going
|
|
1216
|
-
* through the legacy path-shaped `additionalSkillPaths` hot-reload API.
|
|
1217
|
-
*/
|
|
1218
|
-
readonly getSkillResourceSnapshot?: (input: {
|
|
1219
|
-
readonly scope: VerifiedAgentScopeClaim;
|
|
1220
|
-
readonly sessionId?: string;
|
|
1221
|
-
readonly requestId: string;
|
|
1222
|
-
}) => Promise<AgentSkillResourceSnapshot | undefined>;
|
|
1223
|
-
readonly systemPromptAppend?: string;
|
|
1224
|
-
readonly loadSystemPromptAppend?: () => Promise<string | undefined>;
|
|
1225
|
-
}
|
|
1226
|
-
interface AuthorizedEnvironmentIntent {
|
|
1227
|
-
readonly kind: 'http-route' | 'dispatcher' | 'agent-binding';
|
|
1228
|
-
readonly requestId: string;
|
|
1229
|
-
}
|
|
1230
|
-
interface AgentHostEnvironmentScope extends ResolvedEnvironmentScope {
|
|
1231
|
-
/** App-owned environment decoration applied once to the canonical provider generation. */
|
|
1232
|
-
readonly transformRuntimeBundle?: (runtimeBundle: RuntimeBundle) => RuntimeBundle | Promise<RuntimeBundle>;
|
|
1233
|
-
/** Evaluated for every authorized operation; never cached as placement authority. */
|
|
1234
|
-
readonly resolveFilesystemBindings?: (input: {
|
|
1235
|
-
readonly verifiedClaim: VerifiedAgentScopeClaim;
|
|
1236
|
-
readonly requestId: string;
|
|
1237
|
-
}) => Promise<readonly RuntimeFilesystemBinding[] | undefined>;
|
|
1238
|
-
}
|
|
1239
|
-
interface AgentHostSessionEnvironmentLease {
|
|
1240
|
-
readonly environmentGenerationId: string;
|
|
1241
|
-
readonly bindingGeneration: number;
|
|
1242
|
-
readonly signal: AbortSignal;
|
|
1243
|
-
acquireTrustedService(input: {
|
|
1244
|
-
readonly leaseId: string;
|
|
1245
|
-
readonly idleTtlMs: number;
|
|
1246
|
-
readonly absoluteTtlMs: number;
|
|
1247
|
-
}): Promise<RuntimeTrustedServiceLeaseV1>;
|
|
1248
|
-
release(): void;
|
|
1249
|
-
}
|
|
1250
|
-
interface AgentHostEnvironmentLease {
|
|
1251
|
-
readonly workspace: Workspace;
|
|
1252
|
-
/** Process execution paired with this exact runtime-owned workspace generation. */
|
|
1253
|
-
readonly sandbox: Sandbox;
|
|
1254
|
-
readonly gitWorkspace: Workspace;
|
|
1255
|
-
readonly fileSearch: FileSearch;
|
|
1256
|
-
readonly filesystemBindings?: readonly RuntimeFilesystemBinding[];
|
|
1257
|
-
readonly readiness: Readonly<AgentCapabilityReadiness>;
|
|
1258
|
-
readonly signal: AbortSignal;
|
|
1259
|
-
release(): void;
|
|
1260
|
-
}
|
|
1261
|
-
interface AgentHostDispatcherRunInput extends WorkspaceAgentDirectRunInput {
|
|
1262
|
-
readonly authorizedScope: AuthorizedAgentScope;
|
|
1263
|
-
readonly request?: FastifyRequest;
|
|
1264
|
-
}
|
|
1265
|
-
interface AgentHostDirectProjectionOptions {
|
|
1266
|
-
readonly authorizeAgentRequest: (request: FastifyRequest) => Promise<AuthorizedAgentScope>;
|
|
1267
|
-
readonly filterModels?: ModelsRoutesOptions['filterModels'];
|
|
1268
|
-
readonly sessionChangesTracker?: SessionChangesTracker;
|
|
1269
|
-
readonly defaultSessionId?: string;
|
|
1270
|
-
}
|
|
1271
|
-
interface AgentHostDescription {
|
|
1272
|
-
readonly hostId: string;
|
|
1273
|
-
readonly agents: readonly {
|
|
1274
|
-
readonly agentTypeId: string;
|
|
1275
|
-
readonly label: string;
|
|
1276
|
-
/** Exact package-declared version, when this is a configured Agent. */
|
|
1277
|
-
readonly definitionVersion?: string;
|
|
1278
|
-
/** Computed definition identity digest (instructions + knowledge bytes), when the spec carries one. */
|
|
1279
|
-
readonly definitionDigest?: string;
|
|
1280
|
-
}[];
|
|
1281
|
-
readonly draining: boolean;
|
|
1282
|
-
}
|
|
1283
|
-
interface AgentHostHandle {
|
|
1284
|
-
readonly hostId: string;
|
|
1285
|
-
describe(): Promise<AgentHostDescription>;
|
|
1286
|
-
drain(): Promise<void>;
|
|
1287
|
-
close(): Promise<void>;
|
|
1288
|
-
}
|
|
1289
|
-
interface CreateAgentHostOptions {
|
|
1290
|
-
readonly agents: readonly AgentHostAgentSpec[];
|
|
1291
|
-
readonly fleetCompiler: AgentFleetCompiler;
|
|
1292
|
-
readonly hostId?: string;
|
|
1293
|
-
readonly scopeVerifier: AgentScopeVerifier;
|
|
1294
|
-
/** Optional product-owned Seat/entitlement policy; omission preserves legacy fleet-wide access. */
|
|
1295
|
-
readonly resolveAgentAccess?: ResolveAgentAccess;
|
|
1296
|
-
readonly runtimeModeAdapter: RuntimeModeAdapter;
|
|
1297
|
-
readonly runtimeHost?: AgentRuntimeHostOperations;
|
|
1298
|
-
readonly sessionRoot?: string;
|
|
1299
|
-
readonly resolveAuthorizedEnvironmentScope?: (input: {
|
|
1300
|
-
readonly authorizedScope: AuthorizedAgentScope;
|
|
1301
|
-
readonly verifiedClaim: VerifiedAgentScopeClaim;
|
|
1302
|
-
readonly intent: AuthorizedEnvironmentIntent;
|
|
1303
|
-
}) => Promise<AgentHostEnvironmentScope>;
|
|
1304
|
-
readonly resolveAuthorizedAgentRuntimeScope?: (input: {
|
|
1305
|
-
readonly authorizedScope: AuthorizedAgentScope;
|
|
1306
|
-
readonly verifiedClaim: VerifiedAgentScopeClaim;
|
|
1307
|
-
readonly agentTypeId: string;
|
|
1308
|
-
readonly intent: AuthorizedEnvironmentIntent & {
|
|
1309
|
-
readonly kind: 'agent-binding';
|
|
1310
|
-
readonly operation: 'new-binding' | 'existing-session' | 'reload';
|
|
1311
|
-
readonly sessionId?: string;
|
|
1312
|
-
};
|
|
1313
|
-
readonly environment: AgentHostEnvironmentScope;
|
|
1314
|
-
}) => Promise<Omit<ResolvedAgentRuntimeScope, 'environment'>>;
|
|
1315
|
-
readonly telemetry?: TelemetrySink;
|
|
1316
|
-
readonly metering?: AgentMeteringSink;
|
|
1317
|
-
readonly requestLedger?: AgentRequestLedger;
|
|
1318
|
-
/** Durable effect ledger path, independent of transcript/session storage. */
|
|
1319
|
-
readonly requestLedgerPath?: string;
|
|
1320
|
-
/** App-host-owned durable event store, shared with channel outbound tails. */
|
|
1321
|
-
readonly eventStore?: EventStreamStore;
|
|
1322
|
-
/** Explicit test/dev opt-in for an in-memory ledger. */
|
|
1323
|
-
readonly inMemoryRequestLedgerMode?: 'test' | 'development';
|
|
1324
|
-
/**
|
|
1325
|
-
* Built-in SQLite terminal-payload retention. Values below 24 hours are
|
|
1326
|
-
* raised to 24 hours; omitted retention keeps terminal payloads indefinitely.
|
|
1327
|
-
* Injected ledgers retain ownership of their own storage policy.
|
|
1328
|
-
*/
|
|
1329
|
-
readonly requestRetentionMs?: number;
|
|
1330
|
-
readonly effectAdmission?: AgentEffectAdmission;
|
|
1331
|
-
readonly shutdownGraceMs?: number;
|
|
1332
|
-
readonly harnessFactory?: AgentHarnessFactory;
|
|
1333
|
-
/**
|
|
1334
|
-
* [1082 slice B] BYOK credential-vault composition inputs. Enablement is
|
|
1335
|
-
* env-driven (`BORING_CREDENTIAL_KMS_BACKEND`); when enabled the host embeds
|
|
1336
|
-
* durable persistence (#1145) and the Core-owned authority verifier here.
|
|
1337
|
-
* The composition is resolved exactly once, at `createAgentHost` startup:
|
|
1338
|
-
* misconfigured env fails host creation with a stable `CREDENTIAL_*` error,
|
|
1339
|
-
* and all runtime bindings share the single host-scope vault composition.
|
|
1340
|
-
* Absent env → composition absent, behavior identical to env-key-only auth.
|
|
1341
|
-
*/
|
|
1342
|
-
readonly credentials?: AgentHostCredentialOptionsV1;
|
|
1343
|
-
}
|
|
1344
|
-
interface WorkspaceCredentialLifecycleV1 {
|
|
1345
|
-
/** Irreversibly fences and destroys credential key access for one workspace. */
|
|
1346
|
-
cryptoShredWorkspace(workspaceId: string): Promise<void>;
|
|
1347
|
-
}
|
|
1348
|
-
interface AgentHostCredentialOptionsV1 {
|
|
1349
|
-
/** Env-shaped record override; defaults to `process.env`. */
|
|
1350
|
-
readonly env?: Readonly<Record<string, string | undefined>>;
|
|
1351
|
-
/** Durable vault persistence (#1145 Postgres in production). */
|
|
1352
|
-
readonly vaultPersistence?: CredentialVaultPersistenceV2;
|
|
1353
|
-
/** Core-owned authority verifier; pre-binds the credential resolver. */
|
|
1354
|
-
readonly authorityVerifier?: WorkspaceCredentialAuthorityVerifierV1;
|
|
1355
|
-
/** Host authentication adapter for owner-only credential HTTP routes. */
|
|
1356
|
-
readonly authorizeOwnerRequest?: (request: FastifyRequest) => VerifiedWorkspaceCredentialAuthorityV1 | Promise<VerifiedWorkspaceCredentialAuthorityV1>;
|
|
1357
|
-
/** Core deletion composition receives only the narrow irreversible lifecycle seam. */
|
|
1358
|
-
readonly onLifecycleReady?: (lifecycle: WorkspaceCredentialLifecycleV1) => void;
|
|
1359
|
-
}
|
|
1360
|
-
interface CreatedAgentHost {
|
|
1361
|
-
readonly host: AgentHostHandle;
|
|
1362
|
-
readonly gateway: AgentGateway;
|
|
1363
|
-
registerDirectRoutes(options: AgentHostDirectProjectionOptions): FastifyPluginAsync;
|
|
1364
|
-
acquireEnvironment(input: {
|
|
1365
|
-
readonly authorizedScope: AuthorizedAgentScope;
|
|
1366
|
-
readonly intent: AuthorizedEnvironmentIntent;
|
|
1367
|
-
}): Promise<AgentHostEnvironmentLease>;
|
|
1368
|
-
/** Trusted composition-only acquisition of the addressed session's exact Environment generation. */
|
|
1369
|
-
acquireSessionEnvironment(input: {
|
|
1370
|
-
readonly authorizedScope: AuthorizedAgentScope;
|
|
1371
|
-
readonly ref: AgentSessionRef;
|
|
1372
|
-
readonly requestId: string;
|
|
1373
|
-
}): Promise<AgentHostSessionEnvironmentLease>;
|
|
1374
|
-
runWithWorkspaceAgent(input: AgentHostDispatcherRunInput, run: (binding: LeaseBoundWorkspaceAgent) => Promise<void>): Promise<void>;
|
|
1375
|
-
}
|
|
1376
|
-
|
|
1377
|
-
export { type MeteringReleaseInput as $, type AgentGatewayEffect as A, type BuiltinRuntimeModeId as B, type CredentialVaultPersistenceV2 as C, type AgentHostEnvironmentScope as D, type EventStreamStore as E, type ResolvedAgentRuntimeScope as F, type AgentRequestKey as G, type AcceptedWorkContext as H, type AgentRequestLedgerPrepareResult as I, type AgentRequestFailure as J, type AgentRequestLedgerRecord as K, type AgentFleetCompiler as L, type ModeContext as M, type AgentRequestTarget as N, type RuntimeFilesystemAccessDecision as O, type ProvisionWorkspaceRuntimeOptions as P, type AgentHostDescription as Q, type RuntimeModeAdapter as R, type StoredCredentialRecordV1 as S, type AgentHostDirectProjectionOptions as T, type AgentHostDispatcherRunInput as U, type AgentHostEnvironmentLease as V, type WorkspaceProvisioningResult as W, type AgentHostHandle as X, type CredentialVaultPersistenceV1 as Y, DEFAULT_AGENT_TYPE_ID as Z, type MeteringErrorLogger as _, type PiPackageSource as a, type MeteringReleaseReason as a0, type MeteringReservationResult as a1, type MeteringReserveInput as a2, type MeteringRunKind as a3, type MeteringRunScope as a4, type MeteringRunStatus as a5, type MeteringSettleInput as a6, type MeteringUsage as a7, type MeteringUsageInput as a8, PI_PACKAGE_RESOURCE_FILTERS as a9, type PiExtensionFactory as aa, type PluginSkillSource as ab, type ResolvedEnvironmentScope as ac, type RuntimeFilesystemBindingOperations as ad, type RuntimeNodePackageSpec as ae, type RuntimeProvisioningContribution as af, type RuntimePythonSpec as ag, type RuntimeTemplateContribution as ah, type WorkspaceCredentialLifecycleV1 as ai, type WorkspaceProvisioningExecResult as aj, compactPiPackages as ak, mergePiPackageSources as al, normalizeMeteringUsage as am, piPackageSourceKey as an, type CredentialMaterialKindV1 as b, type WorkspaceCredentialLockOptionsV1 as c, type StoredCredentialMetadataV1 as d, type RuntimeModeId as e, type AgentRuntimeHostOperations as f, type RuntimeBashStrategy as g, type RuntimeFilesystemStrategy as h, type WorkspaceProvisioningAdapter as i, type AgentInstructionSource as j, type ConfiguredAgentHostAgentSpec as k, type AgentInstructionFileRef as l, type AgentHostAgentSpec as m, type RuntimeBundle as n, type PiHarnessOptions as o, type AgentMeteringSink as p, type AgentHostCredentialOptionsV1 as q, type RuntimeFilesystemBinding as r, type CreatedAgentHost as s, type ResolvedPiHarnessOptions as t, ReadyStatusTracker as u, type CreateAgentHostOptions as v, type CompiledAgentHostAgentSpec as w, type AgentRequestLedger as x, type AgentEffectAdmission as y, type AuthorizedEnvironmentIntent as z };
|