@hachej/boring-agent 0.1.95 → 0.1.97
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/DebugDrawer-2TO5SE2D.js +7 -0
- package/dist/{chunk-NITBKFG6.js → chunk-3OEDBRKY.js} +93 -58
- package/dist/{chunk-BOIV2I3N.js → chunk-46HJK2ES.js} +31 -16
- package/dist/{chunk-AQBXNPMD.js → chunk-4IQ4HHBG.js} +4 -0
- package/dist/{chunk-2EMAKBVR.js → chunk-CXMM24NW.js} +9039 -7788
- package/dist/{chunk-OFQ7J6SI.js → chunk-LSO2AO6Q.js} +57 -1
- package/dist/{chunk-2GBHYJVC.js → chunk-VXF5DWS6.js} +34 -0
- package/dist/{chunk-2TMS2RU2.js → chunk-WC5KBGP2.js} +518 -165
- package/dist/chunk-YGRQ4Q5P.js +20 -0
- package/dist/core/index.d.ts +5 -5
- package/dist/core/index.js +604 -7
- package/dist/{createHarness-UCD74XXK.js → createHarness-PW3A2MRB.js} +3 -3
- package/dist/{errors-G6T6S7PQ.d.ts → errors-cNC4HMpV.d.ts} +14 -7
- package/dist/eval/index.d.ts +5 -3
- package/dist/eval/index.js +31 -23
- package/dist/file-search-QxnanNjO.d.ts +87 -0
- package/dist/front/index.d.ts +86 -16
- package/dist/front/index.js +839 -343
- package/dist/front/styles.css +1171 -2129
- package/dist/{harness-Cc48o6uS.d.ts → harness-DS8jLKIx.d.ts} +4 -2
- package/dist/{lease-CusB-uLg.d.ts → lease-D8WC6pQl.d.ts} +10 -89
- package/dist/{middleware-CzW8n7B7.d.ts → middleware-Cq_cYHjJ.d.ts} +1 -1
- package/dist/piChatEvent-B3ehh9V0.d.ts +384 -0
- package/dist/{piChatSessionService-C0KbcGw9.d.ts → piChatSessionService-xnv8rcdh.d.ts} +1 -1
- package/dist/{sandbox-DAD8cWQR.d.ts → sandbox-KQiEdz4W.d.ts} +12 -1
- package/dist/server/agent-host/testing/compositionRouteProof.d.ts +8 -0
- package/dist/server/agent-host/testing/compositionRouteProof.js +78 -0
- package/dist/server/agent-host/testing/gatewayConformance.d.ts +6 -6
- package/dist/server/agent-host/testing/gatewayConformance.js +17 -9
- package/dist/server/index.d.ts +572 -370
- package/dist/server/index.js +69 -17
- package/dist/server/worker/index.d.ts +2 -2
- package/dist/server/worker/index.js +9 -9
- package/dist/shared/index.d.ts +212 -56
- package/dist/shared/index.js +43 -7
- package/dist/{types-C-Eroi__.d.ts → types-D_SD-7_l.d.ts} +304 -87
- package/docs/AGENT_GATEWAY_V0.md +6 -3
- package/docs/AGENT_PACKAGES.md +80 -0
- package/docs/ERROR_CODES.md +58 -0
- package/docs/README.md +1 -0
- package/docs/runtime.md +19 -2
- package/package.json +34 -29
- package/dist/DebugDrawer-RYEBQ6CO.js +0 -6
- package/dist/chunk-EOMY2HDT.js +0 -619
- package/dist/piChatEvent-BsMp3MSo.d.ts +0 -368
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { l as SessionCtx, b as PiChatEvent, S as SessionStore } from './piChatEvent-
|
|
1
|
+
import { l as SessionCtx, b as PiChatEvent, S as SessionStore } from './piChatEvent-B3ehh9V0.js';
|
|
2
2
|
import { AgentSessionEvent, PromptOptions } from '@mariozechner/pi-coding-agent';
|
|
3
3
|
|
|
4
4
|
interface TelemetrySink {
|
|
@@ -264,8 +264,10 @@ interface RunContext {
|
|
|
264
264
|
userId?: string;
|
|
265
265
|
userEmail?: string;
|
|
266
266
|
userEmailVerified?: boolean;
|
|
267
|
+
/** Canonical storage/live identity for commands and prompts sharing one Pi handle. */
|
|
268
|
+
sessionCtx?: SessionCtx;
|
|
267
269
|
/** When false, slash-command fallback through native model prompt must fail closed. */
|
|
268
270
|
allowPromptDispatch?: boolean;
|
|
269
271
|
}
|
|
270
272
|
|
|
271
|
-
export { type AgentHarness as A, type ToolResult as B, noopTelemetry as C, safeCapture as D, sessionStreamPath as E, type JSONSchema as J, type MessageAttachment as M, type RunContext as R, type SendMessageInput as S, type TelemetrySink as T, type AgentReadiness as a, type Agent as b, AGENT_NOT_IMPLEMENTED_UNTIL_T1 as c, type AgentActor as d, type AgentCoreHarness as e, type AgentCoreHarnessFactory as f, type AgentCorePromptInput as g, type AgentCoreSessionAdapter as h, type AgentCoreSessionSnapshot as i, type AgentEvent as j, type AgentMessageContent as k, type AgentMessagePart as l, AgentNotImplementedError as m, type AgentReadinessStatus as n, type AgentResolveInputResponse as o, type AgentSendInput as p, type AgentStartReceipt as q, type AgentStreamOptions as r, type
|
|
273
|
+
export { type AgentHarness as A, type ToolResult as B, noopTelemetry as C, safeCapture as D, sessionStreamPath as E, type JSONSchema as J, type MessageAttachment as M, type RunContext as R, type SendMessageInput as S, type TelemetrySink as T, type AgentReadiness as a, type Agent as b, AGENT_NOT_IMPLEMENTED_UNTIL_T1 as c, type AgentActor as d, type AgentCoreHarness as e, type AgentCoreHarnessFactory as f, type AgentCorePromptInput as g, type AgentCoreSessionAdapter as h, type AgentCoreSessionSnapshot as i, type AgentEvent as j, type AgentMessageContent as k, type AgentMessagePart as l, AgentNotImplementedError as m, type AgentReadinessStatus as n, type AgentResolveInputResponse as o, type AgentSendInput as p, type AgentStartReceipt as q, type AgentStreamOptions as r, type AgentTool as s, type AgentHarnessFactory as t, type AgentConfig as u, type AgentHarnessFactoryInput as v, type ToolReadinessRequirement as w, type AgentRuntimeAdapter as x, type TelemetryEvent as y, type ToolExecContext as z };
|
|
@@ -1,48 +1,6 @@
|
|
|
1
|
-
import { D as InterruptReceipt, j as StopReceipt, p as AgentDefinitionErrorCode, q as AgentDeploymentErrorCode } from './piChatEvent-BsMp3MSo.js';
|
|
2
|
-
import { p as AgentSendInput, j as AgentEvent } from './harness-Cc48o6uS.js';
|
|
3
|
-
import { b as AgentSessionRef, n as AgentSendReceipt, A as AgentGateway, a as AuthorizedAgentScope } from './errors-G6T6S7PQ.js';
|
|
4
1
|
import { z } from 'zod';
|
|
5
|
-
import {
|
|
6
|
-
|
|
7
|
-
interface WorkspaceAgentDispatcherContext {
|
|
8
|
-
workspaceId: string;
|
|
9
|
-
userId: string;
|
|
10
|
-
}
|
|
11
|
-
type WorkspaceAgentDispatcherSendInput = Omit<AgentSendInput, 'ctx'>;
|
|
12
|
-
interface WorkspaceAgentDispatcherDispatchInput extends WorkspaceAgentDispatcherSendInput {
|
|
13
|
-
/** Optional title for a newly created addressed session. */
|
|
14
|
-
title?: string;
|
|
15
|
-
/** Durable caller-owned idempotency key. */
|
|
16
|
-
requestId: string;
|
|
17
|
-
/** Defaults to requestId. */
|
|
18
|
-
clientNonce?: string;
|
|
19
|
-
/** Defaults to prompt; follow-up requires a non-negative clientSeq. */
|
|
20
|
-
kind?: 'prompt' | 'followup';
|
|
21
|
-
clientSeq?: number;
|
|
22
|
-
}
|
|
23
|
-
interface WorkspaceAgentDispatch {
|
|
24
|
-
ref: AgentSessionRef;
|
|
25
|
-
receipt: AgentSendReceipt;
|
|
26
|
-
events: AsyncIterable<AgentEvent>;
|
|
27
|
-
}
|
|
28
|
-
/** Addressed gateway binding minted by the trusted composition root. */
|
|
29
|
-
interface WorkspaceAgentGatewayBinding {
|
|
30
|
-
gateway: AgentGateway;
|
|
31
|
-
scope: AuthorizedAgentScope;
|
|
32
|
-
agentTypeId: string;
|
|
33
|
-
}
|
|
34
|
-
/**
|
|
35
|
-
* Compatibility-facing delegation surface. New durable callers use dispatch so
|
|
36
|
-
* the addressed ref and accepted Gateway receipt can be persisted before they
|
|
37
|
-
* consume events. send remains for callers that only need the legacy stream.
|
|
38
|
-
*/
|
|
39
|
-
interface WorkspaceAgentDispatcher {
|
|
40
|
-
/** Optional only for source compatibility with pre-Gateway injected resolvers. */
|
|
41
|
-
dispatch?(input: WorkspaceAgentDispatcherDispatchInput): Promise<WorkspaceAgentDispatch>;
|
|
42
|
-
send(input: WorkspaceAgentDispatcherSendInput): AsyncIterable<AgentEvent>;
|
|
43
|
-
interrupt(sessionId: string): Promise<InterruptReceipt>;
|
|
44
|
-
stop(sessionId: string): Promise<StopReceipt>;
|
|
45
|
-
}
|
|
2
|
+
import { p as AgentDefinitionErrorCode, q as AgentDeploymentErrorCode } from './piChatEvent-B3ehh9V0.js';
|
|
3
|
+
import { b as Workspace } from './sandbox-KQiEdz4W.js';
|
|
46
4
|
|
|
47
5
|
interface SandboxHandleRecord {
|
|
48
6
|
workspaceId: string;
|
|
@@ -110,6 +68,12 @@ interface CompiledAgentBundle {
|
|
|
110
68
|
readonly definition: CompiledAgentDefinition;
|
|
111
69
|
readonly definitionDigest: Sha256Digest;
|
|
112
70
|
readonly assets: readonly Readonly<AgentDefinitionDigestAsset>[];
|
|
71
|
+
/**
|
|
72
|
+
* Host path of the package's optional `knowledge/` folder. Present only
|
|
73
|
+
* when the compiled package ships knowledge; the folder's file bytes are
|
|
74
|
+
* already folded into `definitionDigest` via `assets`.
|
|
75
|
+
*/
|
|
76
|
+
readonly knowledgeDir?: string;
|
|
113
77
|
}
|
|
114
78
|
declare const OpaqueRefSchema: z.ZodEffects<z.ZodString, string, string>;
|
|
115
79
|
declare const Sha256DigestSchema: z.ZodEffects<z.ZodString, `sha256:${string}`, string>;
|
|
@@ -128,50 +92,6 @@ declare function createAgentDefinitionDigest(input: {
|
|
|
128
92
|
}): Promise<Sha256Digest>;
|
|
129
93
|
declare function createAgentDeploymentDigest(deployment: AgentDeployment): Promise<Sha256Digest>;
|
|
130
94
|
|
|
131
|
-
/**
|
|
132
|
-
* Browser CustomEvent name dispatched on `window` after the workspace's
|
|
133
|
-
* agent-plugin hot reload subscriber commits a registry change (load,
|
|
134
|
-
* unload, or error).
|
|
135
|
-
*
|
|
136
|
-
* Declared in `@hachej/boring-agent` (not `@hachej/boring-workspace`)
|
|
137
|
-
* so the agent's ChatPanel — which listens for this event to refresh
|
|
138
|
-
* its slash-command palette / banner state — can import it without
|
|
139
|
-
* creating a workspace → agent → workspace cycle. Workspace's
|
|
140
|
-
* `useAgentPluginHotReload` imports the same constant.
|
|
141
|
-
*/
|
|
142
|
-
declare const WORKSPACE_AGENT_PLUGINS_RELOADED_EVENT = "boring-ui:agent-plugins-reloaded";
|
|
143
|
-
/**
|
|
144
|
-
* One per plugin that loaded successfully but whose server-side surfaces
|
|
145
|
-
* (Fastify routes / agent tools) still hold pre-reload code. Shared
|
|
146
|
-
* between the agent's /reload HTTP route + the ChatPanel banner so the
|
|
147
|
-
* agent layer has ONE declaration of this wire shape. Mirrors what the
|
|
148
|
-
* workspace's `collectRestartWarnings()` emits (workspace owns the
|
|
149
|
-
* canonical `PluginRestartWarning` type; we redeclare here only because
|
|
150
|
-
* the agent layer must not depend on workspace).
|
|
151
|
-
*/
|
|
152
|
-
interface PluginRestartWarning {
|
|
153
|
-
id: string;
|
|
154
|
-
surfaces: string[];
|
|
155
|
-
message: string;
|
|
156
|
-
}
|
|
157
|
-
/**
|
|
158
|
-
* Browser CustomEvent name dispatched on `window` when a `showNotification`
|
|
159
|
-
* UI command arrives from the server (e.g. from a plugin slash command that
|
|
160
|
-
* calls `notify()`). `PiChatPanel` listens for this to show the
|
|
161
|
-
* `CommandRunStatus` banner above the composer.
|
|
162
|
-
*/
|
|
163
|
-
declare const WORKSPACE_COMMAND_NOTIFY_EVENT = "boring-ui:command-notify";
|
|
164
|
-
/**
|
|
165
|
-
* Payload carried by `WORKSPACE_COMMAND_NOTIFY_EVENT`. Maps directly to
|
|
166
|
-
* what `uiCommandDispatcher` extracts from the `showNotification` command.
|
|
167
|
-
*/
|
|
168
|
-
interface CommandNotifyPayload {
|
|
169
|
-
message: string;
|
|
170
|
-
tone: 'success' | 'error' | 'info' | 'warn';
|
|
171
|
-
/** Name of the command that triggered the notification (without leading slash). */
|
|
172
|
-
command?: string;
|
|
173
|
-
}
|
|
174
|
-
|
|
175
95
|
declare const OpaqueShareLocatorIdSchema: z.ZodEffects<z.ZodString, string, string>;
|
|
176
96
|
interface ShareEntryProvenance {
|
|
177
97
|
producerPrincipalRef: string;
|
|
@@ -461,6 +381,7 @@ interface CredentialConsumerBindingRegistryV1 {
|
|
|
461
381
|
readonly contractVersion: "boring.credential-consumer-bindings.v1";
|
|
462
382
|
require(bindingId: CredentialConsumerBindingId): CredentialConsumerBindingV1;
|
|
463
383
|
}
|
|
384
|
+
declare function providerCredentialFieldsV1(provider: ProviderDefinitionV1): readonly CredentialFieldDefinitionV1[];
|
|
464
385
|
declare function createCredentialConsumerBindingRegistryV1(bindings: readonly CredentialConsumerBindingV1[], providerRegistry: ProviderRegistryV1): CredentialConsumerBindingRegistryV1;
|
|
465
386
|
|
|
466
387
|
declare const PROVIDER_CREDENTIAL_REF_VERSION: "boring.provider-credential-ref.v1";
|
|
@@ -508,4 +429,4 @@ interface WorkspaceCredentialResolverV1 {
|
|
|
508
429
|
resolve(workspace: AuthorizedWorkspaceCredentialScopeV1, ref: ProviderCredentialRefV1): Promise<ResolvedCredentialLeaseV1>;
|
|
509
430
|
}
|
|
510
431
|
|
|
511
|
-
export {
|
|
432
|
+
export { createAgentDeploymentDigest as $, type AgentDeployment as A, type ProviderCategoryV1 as B, type CompiledAgentBundle as C, type ProviderCredentialDefinitionV1 as D, type ExternalManagedAccountReferenceDefinitionV1 as E, type ProviderCredentialRefFactoryV1 as F, type ProviderDefinitionV1 as G, type SandboxHandleRecord as H, InMemoryShareEntryStore as I, Sha256DigestSchema as J, ShareEntryErrorCode as K, type ShareEntryProvenance as L, ShareEntryProvenanceSchema as M, type ShareEntryResolution as N, OpaqueRefSchema as O, type ProviderId as P, type ShareEntryTombstone as Q, type ResolvedCredentialMaterialV1 as R, type SandboxHandleStore as S, type ShareEntryV1 as T, ShareEntryV1Schema as U, type VerifiedWorkspaceCredentialAuthorityV1 as V, type WorkspaceCredentialAuthorityVerifierV1 as W, ShareEntryValidationError as X, type VerifiedWorkspaceCredentialPrincipalV1 as Y, createAgentAssetDigest as Z, createAgentDefinitionDigest as _, type Sha256Digest as a, createCredentialConsumerBindingRegistryV1 as a0, createProviderCredentialRefFactoryV1 as a1, createProviderRegistryV1 as a2, providerCredentialFieldsV1 as a3, resolveShareEntry as a4, validateAgentDefinition as a5, validateAgentDeployment as a6, type ShareEntryStore as b, type CredentialFieldId as c, type AuthorizedWorkspaceCredentialScopeV1 as d, type CredentialConsumerBindingRegistryV1 as e, type ProviderRegistryV1 as f, type WorkspaceCredentialResolverV1 as g, type ProviderCredentialRefV1 as h, type ResolvedCredentialLeaseV1 as i, SchemaValidationError as j, type AgentSchemaIssue as k, type AgentSchemaValidationResult as l, type CredentialConsumerBindingId as m, type AgentDefinition as n, type AgentDefinitionDigestAsset as o, type AgentDefinitionReference as p, AgentDefinitionValidationError as q, AgentDeploymentValidationError as r, type CompiledAgentDefinition as s, type CreateShareEntryInput as t, type CredentialConsumerBindingV1 as u, type CredentialConsumerKindV1 as v, type CredentialDeliveryV1 as w, type CredentialFieldDefinitionV1 as x, OpaqueShareLocatorIdSchema as y, PROVIDER_CREDENTIAL_REF_VERSION as z };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { d as Stat, e as Entry, a as ExecResult, W as WorkspaceChangeEvent } from './sandbox-
|
|
1
|
+
import { d as Stat, e as Entry, a as ExecResult, W as WorkspaceChangeEvent } from './sandbox-KQiEdz4W.js';
|
|
2
2
|
import { FastifyRequest, FastifyReply } from 'fastify';
|
|
3
3
|
|
|
4
4
|
declare const REMOTE_WORKER_RUNTIME_CWD = "/workspace";
|