@hachej/boring-agent 0.1.89 → 0.1.91
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-GOM3VJOJ.js → chunk-2GBHYJVC.js} +31 -1
- package/dist/{chunk-I7UEASPG.js → chunk-BHH5NH7P.js} +5534 -8253
- package/dist/{chunk-M32FXCIN.js → chunk-CJ2BW2W2.js} +23 -8
- package/dist/{chunk-WZCTVT57.js → chunk-IWBC6SF7.js} +94 -112
- package/dist/chunk-NITBKFG6.js +1246 -0
- package/dist/{chunk-BDYXKHWY.js → chunk-PZC76CIA.js} +7 -1
- package/dist/core/index.d.ts +5 -5
- package/dist/core/index.js +2 -2
- package/dist/{createHarness-CCQLHKUF.js → createHarness-PMYRKDE4.js} +2 -2
- package/dist/errors-BEmw9HMp.d.ts +200 -0
- package/dist/front/index.d.ts +30 -5
- package/dist/front/index.js +230 -44
- package/dist/{harness-VvP0l5Mj.d.ts → harness-Bt_GMNYR.d.ts} +2 -2
- package/dist/{workspaceAgentDispatcher-CKEeNPjW.d.ts → lease-2aXepSBL.d.ts} +254 -59
- package/dist/{protocol-B_OQKfbI.d.ts → middleware-CzW8n7B7.d.ts} +20 -18
- package/dist/piChatEvent-DBO3M5lu.d.ts +367 -0
- package/dist/{piChatSessionService-DPjJ0g71.d.ts → piChatSessionService-BaaVWke7.d.ts} +5 -1
- package/dist/{sandbox-DthfJaOB.d.ts → sandbox-DAD8cWQR.d.ts} +14 -1
- package/dist/server/agent-host/testing/gatewayConformance.d.ts +41 -0
- package/dist/server/agent-host/testing/gatewayConformance.js +465 -0
- package/dist/server/index.d.ts +507 -708
- package/dist/server/index.js +53 -50
- package/dist/server/worker/index.d.ts +9 -7
- package/dist/server/worker/index.js +19 -28
- package/dist/shared/index.d.ts +119 -27
- package/dist/shared/index.js +65 -282
- package/dist/types-jcMapYr9.d.ts +759 -0
- package/docs/ACCESSIBILITY.md +4 -5
- package/docs/API.md +3 -0
- package/docs/AUTHORING.md +68 -0
- package/docs/ERROR_CODES.md +29 -0
- package/docs/README.md +1 -0
- package/docs/RISKS-MULTI-TAB.md +1 -1
- package/docs/runtime-provisioning.md +1 -1
- package/docs/runtime.md +9 -6
- package/package.json +18 -9
- package/dist/chunk-DGRKMMXO.js +0 -8
- package/dist/chunk-XPQEF32D.js +0 -385
- package/dist/piChatEvent-nmOBSNU9.d.ts +0 -367
|
@@ -1,7 +1,46 @@
|
|
|
1
|
+
import { D as InterruptReceipt, j as StopReceipt, p as AgentDefinitionErrorCode, q as AgentDeploymentErrorCode } from './piChatEvent-DBO3M5lu.js';
|
|
2
|
+
import { p as AgentSendInput, j as AgentEvent } from './harness-Bt_GMNYR.js';
|
|
3
|
+
import { b as AgentSessionRef, n as AgentSendReceipt, A as AgentGateway, a as AuthorizedAgentScope } from './errors-BEmw9HMp.js';
|
|
1
4
|
import { z } from 'zod';
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
+
import { b as Workspace } from './sandbox-DAD8cWQR.js';
|
|
6
|
+
|
|
7
|
+
interface WorkspaceAgentDispatcherContext {
|
|
8
|
+
workspaceId: string;
|
|
9
|
+
userId: string;
|
|
10
|
+
}
|
|
11
|
+
type WorkspaceAgentDispatcherSendInput = Omit<AgentSendInput, 'ctx'>;
|
|
12
|
+
interface WorkspaceAgentDispatcherDispatchInput extends WorkspaceAgentDispatcherSendInput {
|
|
13
|
+
/** Durable caller-owned idempotency key. */
|
|
14
|
+
requestId: string;
|
|
15
|
+
/** Defaults to requestId. */
|
|
16
|
+
clientNonce?: string;
|
|
17
|
+
/** Defaults to prompt; follow-up requires a non-negative clientSeq. */
|
|
18
|
+
kind?: 'prompt' | 'followup';
|
|
19
|
+
clientSeq?: number;
|
|
20
|
+
}
|
|
21
|
+
interface WorkspaceAgentDispatch {
|
|
22
|
+
ref: AgentSessionRef;
|
|
23
|
+
receipt: AgentSendReceipt;
|
|
24
|
+
events: AsyncIterable<AgentEvent>;
|
|
25
|
+
}
|
|
26
|
+
/** Addressed gateway binding minted by the trusted composition root. */
|
|
27
|
+
interface WorkspaceAgentGatewayBinding {
|
|
28
|
+
gateway: AgentGateway;
|
|
29
|
+
scope: AuthorizedAgentScope;
|
|
30
|
+
agentTypeId: string;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Compatibility-facing delegation surface. New durable callers use dispatch so
|
|
34
|
+
* the addressed ref and accepted Gateway receipt can be persisted before they
|
|
35
|
+
* consume events. send remains for callers that only need the legacy stream.
|
|
36
|
+
*/
|
|
37
|
+
interface WorkspaceAgentDispatcher {
|
|
38
|
+
/** Optional only for source compatibility with pre-Gateway injected resolvers. */
|
|
39
|
+
dispatch?(input: WorkspaceAgentDispatcherDispatchInput): Promise<WorkspaceAgentDispatch>;
|
|
40
|
+
send(input: WorkspaceAgentDispatcherSendInput): AsyncIterable<AgentEvent>;
|
|
41
|
+
interrupt(sessionId: string): Promise<InterruptReceipt>;
|
|
42
|
+
stop(sessionId: string): Promise<StopReceipt>;
|
|
43
|
+
}
|
|
5
44
|
|
|
6
45
|
interface SandboxHandleRecord {
|
|
7
46
|
workspaceId: string;
|
|
@@ -17,10 +56,6 @@ interface SandboxHandleStore {
|
|
|
17
56
|
list(): Promise<SandboxHandleRecord[]>;
|
|
18
57
|
}
|
|
19
58
|
|
|
20
|
-
interface FileSearch {
|
|
21
|
-
search(glob: string, limit?: number): Promise<string[]>;
|
|
22
|
-
}
|
|
23
|
-
|
|
24
59
|
type Sha256Digest = `sha256:${string}`;
|
|
25
60
|
|
|
26
61
|
interface AgentSchemaIssue<Code extends string> {
|
|
@@ -47,11 +82,8 @@ interface AgentDefinition {
|
|
|
47
82
|
definitionId: string;
|
|
48
83
|
version: string;
|
|
49
84
|
label?: string;
|
|
85
|
+
description?: string;
|
|
50
86
|
instructionsRef: string;
|
|
51
|
-
capabilityRequirements?: string[];
|
|
52
|
-
toolRefs?: string[];
|
|
53
|
-
skillRefs?: string[];
|
|
54
|
-
mcpServerRefs?: string[];
|
|
55
87
|
}
|
|
56
88
|
interface AgentDefinitionReference {
|
|
57
89
|
definitionId: string;
|
|
@@ -94,6 +126,50 @@ declare function createAgentDefinitionDigest(input: {
|
|
|
94
126
|
}): Promise<Sha256Digest>;
|
|
95
127
|
declare function createAgentDeploymentDigest(deployment: AgentDeployment): Promise<Sha256Digest>;
|
|
96
128
|
|
|
129
|
+
/**
|
|
130
|
+
* Browser CustomEvent name dispatched on `window` after the workspace's
|
|
131
|
+
* agent-plugin hot reload subscriber commits a registry change (load,
|
|
132
|
+
* unload, or error).
|
|
133
|
+
*
|
|
134
|
+
* Declared in `@hachej/boring-agent` (not `@hachej/boring-workspace`)
|
|
135
|
+
* so the agent's ChatPanel — which listens for this event to refresh
|
|
136
|
+
* its slash-command palette / banner state — can import it without
|
|
137
|
+
* creating a workspace → agent → workspace cycle. Workspace's
|
|
138
|
+
* `useAgentPluginHotReload` imports the same constant.
|
|
139
|
+
*/
|
|
140
|
+
declare const WORKSPACE_AGENT_PLUGINS_RELOADED_EVENT = "boring-ui:agent-plugins-reloaded";
|
|
141
|
+
/**
|
|
142
|
+
* One per plugin that loaded successfully but whose server-side surfaces
|
|
143
|
+
* (Fastify routes / agent tools) still hold pre-reload code. Shared
|
|
144
|
+
* between the agent's /reload HTTP route + the ChatPanel banner so the
|
|
145
|
+
* agent layer has ONE declaration of this wire shape. Mirrors what the
|
|
146
|
+
* workspace's `collectRestartWarnings()` emits (workspace owns the
|
|
147
|
+
* canonical `PluginRestartWarning` type; we redeclare here only because
|
|
148
|
+
* the agent layer must not depend on workspace).
|
|
149
|
+
*/
|
|
150
|
+
interface PluginRestartWarning {
|
|
151
|
+
id: string;
|
|
152
|
+
surfaces: string[];
|
|
153
|
+
message: string;
|
|
154
|
+
}
|
|
155
|
+
/**
|
|
156
|
+
* Browser CustomEvent name dispatched on `window` when a `showNotification`
|
|
157
|
+
* UI command arrives from the server (e.g. from a plugin slash command that
|
|
158
|
+
* calls `notify()`). `PiChatPanel` listens for this to show the
|
|
159
|
+
* `CommandRunStatus` banner above the composer.
|
|
160
|
+
*/
|
|
161
|
+
declare const WORKSPACE_COMMAND_NOTIFY_EVENT = "boring-ui:command-notify";
|
|
162
|
+
/**
|
|
163
|
+
* Payload carried by `WORKSPACE_COMMAND_NOTIFY_EVENT`. Maps directly to
|
|
164
|
+
* what `uiCommandDispatcher` extracts from the `showNotification` command.
|
|
165
|
+
*/
|
|
166
|
+
interface CommandNotifyPayload {
|
|
167
|
+
message: string;
|
|
168
|
+
tone: 'success' | 'error' | 'info' | 'warn';
|
|
169
|
+
/** Name of the command that triggered the notification (without leading slash). */
|
|
170
|
+
command?: string;
|
|
171
|
+
}
|
|
172
|
+
|
|
97
173
|
declare const OpaqueShareLocatorIdSchema: z.ZodEffects<z.ZodString, string, string>;
|
|
98
174
|
interface ShareEntryProvenance {
|
|
99
175
|
producerPrincipalRef: string;
|
|
@@ -257,58 +333,177 @@ type ShareEntryResolution = {
|
|
|
257
333
|
declare function resolveShareEntry(store: ShareEntryStore, id: string, workspace: Workspace): Promise<ShareEntryResolution>;
|
|
258
334
|
|
|
259
335
|
/**
|
|
260
|
-
*
|
|
261
|
-
*
|
|
262
|
-
* unload, or error).
|
|
263
|
-
*
|
|
264
|
-
* Declared in `@hachej/boring-agent` (not `@hachej/boring-workspace`)
|
|
265
|
-
* so the agent's ChatPanel — which listens for this event to refresh
|
|
266
|
-
* its slash-command palette / banner state — can import it without
|
|
267
|
-
* creating a workspace → agent → workspace cycle. Workspace's
|
|
268
|
-
* `useAgentPluginHotReload` imports the same constant.
|
|
336
|
+
* Opaque, in-process Core capability. The brand symbol and constructor are not
|
|
337
|
+
* exported; Core records issued object identity in a private WeakMap.
|
|
269
338
|
*/
|
|
270
|
-
declare const
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
* between the agent's /reload HTTP route + the ChatPanel banner so the
|
|
275
|
-
* agent layer has ONE declaration of this wire shape. Mirrors what the
|
|
276
|
-
* workspace's `collectRestartWarnings()` emits (workspace owns the
|
|
277
|
-
* canonical `PluginRestartWarning` type; we redeclare here only because
|
|
278
|
-
* the agent layer must not depend on workspace).
|
|
279
|
-
*/
|
|
280
|
-
interface PluginRestartWarning {
|
|
281
|
-
id: string;
|
|
282
|
-
surfaces: string[];
|
|
283
|
-
message: string;
|
|
339
|
+
declare const authorizedWorkspaceCredentialScopeBrand: unique symbol;
|
|
340
|
+
interface AuthorizedWorkspaceCredentialScopeV1 {
|
|
341
|
+
readonly contractVersion: "boring.authorized-workspace-credential-scope.v1";
|
|
342
|
+
readonly [authorizedWorkspaceCredentialScopeBrand]: true;
|
|
284
343
|
}
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
344
|
+
type VerifiedWorkspaceCredentialPrincipalV1 = Readonly<{
|
|
345
|
+
kind: "user";
|
|
346
|
+
userId: string;
|
|
347
|
+
membershipRole: "owner" | "editor" | "viewer";
|
|
348
|
+
}> | Readonly<{
|
|
349
|
+
kind: "system";
|
|
350
|
+
principalId: string;
|
|
351
|
+
workspaceGrantId: string;
|
|
352
|
+
}>;
|
|
353
|
+
interface VerifiedWorkspaceCredentialAuthorityV1 {
|
|
354
|
+
readonly workspaceId: string;
|
|
355
|
+
readonly appId: string;
|
|
356
|
+
readonly principal: VerifiedWorkspaceCredentialPrincipalV1;
|
|
357
|
+
readonly authorizationReceiptId: string;
|
|
358
|
+
readonly expiresAt: string;
|
|
359
|
+
}
|
|
360
|
+
/** Core-owned verifier; a TypeScript cast or copied object is never authority. */
|
|
361
|
+
interface WorkspaceCredentialAuthorityVerifierV1 {
|
|
362
|
+
readonly contractVersion: "boring.workspace-credential-authority-verifier.v1";
|
|
363
|
+
verifyCurrent(scope: AuthorizedWorkspaceCredentialScopeV1): Promise<VerifiedWorkspaceCredentialAuthorityV1>;
|
|
301
364
|
}
|
|
302
365
|
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
366
|
+
type ProviderId = string & {
|
|
367
|
+
readonly __providerId: unique symbol;
|
|
368
|
+
};
|
|
369
|
+
type CredentialFieldId = string & {
|
|
370
|
+
readonly __credentialFieldId: unique symbol;
|
|
371
|
+
};
|
|
372
|
+
type CredentialConsumerBindingId = string & {
|
|
373
|
+
readonly __credentialConsumerBindingId: unique symbol;
|
|
374
|
+
};
|
|
375
|
+
type ProviderCategoryV1 = "llm" | "search" | "transcription" | "mcp" | "other";
|
|
376
|
+
interface CredentialFieldDefinitionV1 {
|
|
377
|
+
readonly id: CredentialFieldId;
|
|
378
|
+
readonly label: string;
|
|
379
|
+
readonly required: boolean;
|
|
380
|
+
readonly sensitivity: "secret" | "public";
|
|
381
|
+
readonly minBytes?: number;
|
|
382
|
+
readonly maxBytes: number;
|
|
306
383
|
}
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
384
|
+
interface ExternalManagedAccountReferenceDefinitionV1 {
|
|
385
|
+
readonly label: string;
|
|
386
|
+
readonly maxBytes: number;
|
|
387
|
+
readonly persistence: "server-only-metadata";
|
|
388
|
+
}
|
|
389
|
+
type ProviderCredentialDefinitionV1 = Readonly<{
|
|
390
|
+
type: "api-key";
|
|
391
|
+
fields: readonly CredentialFieldDefinitionV1[];
|
|
392
|
+
}> | Readonly<{
|
|
393
|
+
type: "oauth2-authorization-code";
|
|
394
|
+
tokenCustody: "local-vault";
|
|
395
|
+
clientRegistrationRef: string;
|
|
396
|
+
authorizationEndpoint: `https://${string}`;
|
|
397
|
+
tokenEndpoint: `https://${string}`;
|
|
398
|
+
revocationEndpoint?: `https://${string}`;
|
|
399
|
+
scopes: readonly string[];
|
|
400
|
+
usePkce: true;
|
|
401
|
+
refreshTokenField: CredentialFieldDefinitionV1;
|
|
402
|
+
resolvedAccessTokenField: CredentialFieldDefinitionV1;
|
|
403
|
+
accessTokenPersistence: "memory-only";
|
|
404
|
+
}> | Readonly<{
|
|
405
|
+
type: "oauth2-authorization-code";
|
|
406
|
+
tokenCustody: "external-managed";
|
|
407
|
+
custodianAdapterId: string;
|
|
408
|
+
connectUrlOrigins: readonly `https://${string}`[];
|
|
409
|
+
scopes: readonly string[];
|
|
410
|
+
accountReference: ExternalManagedAccountReferenceDefinitionV1;
|
|
411
|
+
delivery: "host-session-adapter-only";
|
|
412
|
+
}> | Readonly<{
|
|
413
|
+
type: "none";
|
|
414
|
+
}>;
|
|
415
|
+
interface ProviderDefinitionV1 {
|
|
416
|
+
readonly contractVersion: "boring.provider.v1";
|
|
417
|
+
readonly id: ProviderId;
|
|
418
|
+
readonly displayName: string;
|
|
419
|
+
readonly category: ProviderCategoryV1;
|
|
420
|
+
readonly credential: ProviderCredentialDefinitionV1;
|
|
421
|
+
readonly consumerBindingIds: readonly CredentialConsumerBindingId[];
|
|
422
|
+
readonly sandboxEgressOrigins: readonly `https://${string}`[];
|
|
423
|
+
readonly mcp?: Readonly<{
|
|
424
|
+
transport: "streamable-http";
|
|
425
|
+
endpoint?: `https://${string}`;
|
|
426
|
+
toolkitId?: string;
|
|
427
|
+
allowedTools: readonly string[];
|
|
428
|
+
deniedTools: readonly string[];
|
|
429
|
+
}>;
|
|
430
|
+
}
|
|
431
|
+
interface ProviderRegistryV1 {
|
|
432
|
+
readonly contractVersion: "boring.provider-registry.v1";
|
|
433
|
+
list(): readonly ProviderDefinitionV1[];
|
|
434
|
+
require(providerId: ProviderId): ProviderDefinitionV1;
|
|
435
|
+
}
|
|
436
|
+
declare function createProviderRegistryV1(defs: readonly ProviderDefinitionV1[]): ProviderRegistryV1;
|
|
437
|
+
|
|
438
|
+
type CredentialConsumerKindV1 = "model-provider" | "first-party-tool" | "plugin-server" | "mcp-server" | "tenant-custom-tool";
|
|
439
|
+
type CredentialDeliveryV1 = "host-only" | "sandbox-pipe" | "sandbox-tmpfs";
|
|
440
|
+
/** Immutable authority registered by the host beside the tool/provider catalog. */
|
|
441
|
+
interface CredentialConsumerBindingV1 {
|
|
442
|
+
readonly contractVersion: "boring.credential-consumer-binding.v1";
|
|
443
|
+
readonly id: CredentialConsumerBindingId;
|
|
444
|
+
readonly providerId: ProviderId;
|
|
445
|
+
readonly consumer: Readonly<{
|
|
446
|
+
id: string;
|
|
447
|
+
kind: CredentialConsumerKindV1;
|
|
448
|
+
trust: "trusted" | "untrusted";
|
|
449
|
+
}>;
|
|
450
|
+
readonly purpose: string;
|
|
451
|
+
readonly allowedFieldIds: readonly CredentialFieldId[];
|
|
452
|
+
readonly delivery: CredentialDeliveryV1;
|
|
453
|
+
readonly sandbox?: Readonly<{
|
|
454
|
+
credentialChannel: "fd-3" | "tmpfs-v1";
|
|
455
|
+
egressOrigins: readonly `https://${string}`[];
|
|
456
|
+
}>;
|
|
457
|
+
}
|
|
458
|
+
interface CredentialConsumerBindingRegistryV1 {
|
|
459
|
+
readonly contractVersion: "boring.credential-consumer-bindings.v1";
|
|
460
|
+
require(bindingId: CredentialConsumerBindingId): CredentialConsumerBindingV1;
|
|
461
|
+
}
|
|
462
|
+
declare function createCredentialConsumerBindingRegistryV1(bindings: readonly CredentialConsumerBindingV1[], providerRegistry: ProviderRegistryV1): CredentialConsumerBindingRegistryV1;
|
|
463
|
+
|
|
464
|
+
declare const PROVIDER_CREDENTIAL_REF_VERSION: "boring.provider-credential-ref.v1";
|
|
465
|
+
/** Constructed by a trusted factory from a registered binding. */
|
|
466
|
+
interface ProviderCredentialRefV1 {
|
|
467
|
+
readonly contractVersion: typeof PROVIDER_CREDENTIAL_REF_VERSION;
|
|
468
|
+
readonly providerId: ProviderId;
|
|
469
|
+
readonly executionId: string;
|
|
470
|
+
readonly bindingId: CredentialConsumerBindingId;
|
|
471
|
+
}
|
|
472
|
+
interface ProviderCredentialRefFactoryV1 {
|
|
473
|
+
readonly contractVersion: "boring.provider-credential-ref-factory.v1";
|
|
474
|
+
create(input: Readonly<{
|
|
475
|
+
providerId: ProviderId;
|
|
476
|
+
executionId: string;
|
|
477
|
+
bindingId: CredentialConsumerBindingId;
|
|
478
|
+
}>): ProviderCredentialRefV1;
|
|
479
|
+
}
|
|
480
|
+
declare function createProviderCredentialRefFactoryV1(bindingRegistry: CredentialConsumerBindingRegistryV1): ProviderCredentialRefFactoryV1;
|
|
481
|
+
|
|
482
|
+
type ResolvedCredentialMaterialV1 = Readonly<{
|
|
483
|
+
kind: "field-set";
|
|
484
|
+
fields: ReadonlyMap<CredentialFieldId, Uint8Array>;
|
|
485
|
+
}> | Readonly<{
|
|
486
|
+
kind: "external-managed-account";
|
|
487
|
+
custodianAdapterId: string;
|
|
488
|
+
opaqueAccountReference: Uint8Array;
|
|
489
|
+
}> | Readonly<{
|
|
490
|
+
kind: "none";
|
|
491
|
+
}>;
|
|
492
|
+
interface ResolvedCredentialLeaseV1 {
|
|
493
|
+
readonly contractVersion: "boring.resolved-credential.v1";
|
|
494
|
+
readonly workspaceId: string;
|
|
495
|
+
readonly providerId: ProviderId;
|
|
496
|
+
readonly credentialVersion: number;
|
|
497
|
+
readonly executionId: string;
|
|
498
|
+
/** Server implementation may use a Node byte array; shared stays Uint8Array. */
|
|
499
|
+
readonly material: ResolvedCredentialMaterialV1;
|
|
500
|
+
readonly expiresAt: string;
|
|
501
|
+
/** Idempotent best-effort overwrite and reference release. */
|
|
502
|
+
dispose(): void;
|
|
503
|
+
}
|
|
504
|
+
interface WorkspaceCredentialResolverV1 {
|
|
505
|
+
readonly contractVersion: "boring.workspace-credential-resolver.v1";
|
|
506
|
+
resolve(workspace: AuthorizedWorkspaceCredentialScopeV1, ref: ProviderCredentialRefV1): Promise<ResolvedCredentialLeaseV1>;
|
|
312
507
|
}
|
|
313
508
|
|
|
314
|
-
export { type AgentDeployment as A,
|
|
509
|
+
export { ShareEntryValidationError as $, type AgentDeployment as A, type CredentialDeliveryV1 as B, type CompiledAgentBundle as C, type CredentialFieldDefinitionV1 as D, type ExternalManagedAccountReferenceDefinitionV1 as E, OpaqueShareLocatorIdSchema as F, PROVIDER_CREDENTIAL_REF_VERSION as G, type ProviderCategoryV1 as H, InMemoryShareEntryStore as I, type ProviderCredentialDefinitionV1 as J, type ProviderCredentialRefFactoryV1 as K, type ProviderDefinitionV1 as L, type SandboxHandleRecord as M, Sha256DigestSchema as N, OpaqueRefSchema as O, type PluginRestartWarning as P, ShareEntryErrorCode as Q, type ResolvedCredentialMaterialV1 as R, type SandboxHandleStore as S, type ShareEntryProvenance as T, ShareEntryProvenanceSchema as U, type VerifiedWorkspaceCredentialAuthorityV1 as V, type WorkspaceAgentDispatcherContext as W, type ShareEntryResolution as X, type ShareEntryTombstone as Y, type ShareEntryV1 as Z, ShareEntryV1Schema as _, type Sha256Digest as a, type VerifiedWorkspaceCredentialPrincipalV1 as a0, WORKSPACE_AGENT_PLUGINS_RELOADED_EVENT as a1, WORKSPACE_COMMAND_NOTIFY_EVENT as a2, type WorkspaceAgentDispatch as a3, type WorkspaceAgentDispatcherDispatchInput as a4, type WorkspaceAgentDispatcherSendInput as a5, type WorkspaceAgentGatewayBinding as a6, createAgentAssetDigest as a7, createAgentDefinitionDigest as a8, createAgentDeploymentDigest as a9, createCredentialConsumerBindingRegistryV1 as aa, createProviderCredentialRefFactoryV1 as ab, createProviderRegistryV1 as ac, resolveShareEntry as ad, validateAgentDefinition as ae, validateAgentDeployment as af, type ShareEntryStore as b, type WorkspaceAgentDispatcher as c, type ProviderId as d, type CredentialFieldId as e, type AuthorizedWorkspaceCredentialScopeV1 as f, type WorkspaceCredentialAuthorityVerifierV1 as g, type CredentialConsumerBindingRegistryV1 as h, type ProviderRegistryV1 as i, type WorkspaceCredentialResolverV1 as j, type ProviderCredentialRefV1 as k, type ResolvedCredentialLeaseV1 as l, SchemaValidationError as m, type AgentSchemaIssue as n, type AgentSchemaValidationResult as o, type CredentialConsumerBindingId as p, type AgentDefinition as q, type AgentDefinitionDigestAsset as r, type AgentDefinitionReference as s, AgentDefinitionValidationError as t, AgentDeploymentValidationError as u, type CommandNotifyPayload as v, type CompiledAgentDefinition as w, type CreateShareEntryInput as x, type CredentialConsumerBindingV1 as y, type CredentialConsumerKindV1 as z };
|
|
@@ -1,20 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
interface BwrapResourceLimits {
|
|
4
|
-
cpuSeconds?: number;
|
|
5
|
-
fileSizeBlocks?: number;
|
|
6
|
-
maxProcesses?: number;
|
|
7
|
-
openFiles?: number;
|
|
8
|
-
virtualMemoryKb?: number;
|
|
9
|
-
}
|
|
10
|
-
interface CreateBwrapSandboxOptions {
|
|
11
|
-
hostWorkspaceRoot?: string;
|
|
12
|
-
runtimeContext?: WorkspaceRuntimeContext;
|
|
13
|
-
network?: 'shared' | 'isolated';
|
|
14
|
-
dropAllCapabilities?: boolean;
|
|
15
|
-
resourceLimits?: BwrapResourceLimits;
|
|
16
|
-
}
|
|
17
|
-
declare function createBwrapSandbox(opts?: CreateBwrapSandboxOptions): Sandbox;
|
|
1
|
+
import { d as Stat, e as Entry, a as ExecResult, W as WorkspaceChangeEvent } from './sandbox-DAD8cWQR.js';
|
|
2
|
+
import { FastifyRequest, FastifyReply } from 'fastify';
|
|
18
3
|
|
|
19
4
|
declare const REMOTE_WORKER_RUNTIME_CWD = "/workspace";
|
|
20
5
|
declare const REMOTE_WORKER_PROVIDER = "remote-worker";
|
|
@@ -101,4 +86,21 @@ interface RemoteWorkerFsEventEnvelope {
|
|
|
101
86
|
event: WorkspaceChangeEvent;
|
|
102
87
|
}
|
|
103
88
|
|
|
104
|
-
|
|
89
|
+
interface WorkspaceContext {
|
|
90
|
+
workspaceId: string;
|
|
91
|
+
authenticated: boolean;
|
|
92
|
+
}
|
|
93
|
+
interface AuthMiddlewareOptions {
|
|
94
|
+
authToken?: string;
|
|
95
|
+
workspaceId?: string;
|
|
96
|
+
publicPaths?: string[];
|
|
97
|
+
onDevModeWarning?: (message: string) => void;
|
|
98
|
+
}
|
|
99
|
+
declare module 'fastify' {
|
|
100
|
+
interface FastifyRequest {
|
|
101
|
+
workspaceContext: WorkspaceContext;
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
declare function createAuthMiddleware(opts?: AuthMiddlewareOptions): (request: FastifyRequest, reply: FastifyReply) => Promise<void>;
|
|
105
|
+
|
|
106
|
+
export { type RemoteWorkerWorkspaceOp as R, WORKER_INTERNAL_TOKEN_HEADER as W, type RemoteWorkerWorkspaceResult as a, type RemoteWorkerExecRequest as b, REMOTE_WORKER_PROVIDER as c, REMOTE_WORKER_RUNTIME_CWD as d, type RemoteWorkerErrorPayload as e, type RemoteWorkerExecResponse as f, type RemoteWorkerFsEventEnvelope as g, WORKER_REQUEST_ID_HEADER as h, WORKER_WORKSPACE_ID_HEADER as i, createAuthMiddleware as j };
|