stitchkit 0.130.0 → 0.131.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/CHANGELOG.md +48 -0
- package/dist/agent-executor/acp/v1-connect.d.ts +40 -26
- package/dist/agent-executor/acp/v1-connect.d.ts.map +1 -1
- package/dist/agent-executor/acp/v1-driver.d.ts +10 -4
- package/dist/agent-executor/acp/v1-driver.d.ts.map +1 -1
- package/dist/agent-executor/acp/v1-handlers.d.ts +6 -2
- package/dist/agent-executor/acp/v1-handlers.d.ts.map +1 -1
- package/dist/agent-executor/acp/v1-probe.d.ts +38 -0
- package/dist/agent-executor/acp/v1-probe.d.ts.map +1 -0
- package/dist/agent-executor/acp/v1-protocol.d.ts +15 -0
- package/dist/agent-executor/acp/v1-protocol.d.ts.map +1 -1
- package/dist/agent-executor/acp/v1-session.d.ts +9 -7
- package/dist/agent-executor/acp/v1-session.d.ts.map +1 -1
- package/dist/agent-executor/claude/cli-driver.d.ts +7 -7
- package/dist/agent-executor/claude/cli-driver.d.ts.map +1 -1
- package/dist/agent-executor/claude/limits.d.ts +6 -4
- package/dist/agent-executor/claude/limits.d.ts.map +1 -1
- package/dist/agent-executor/claude/session.d.ts +3 -3
- package/dist/agent-executor/claude/session.d.ts.map +1 -1
- package/dist/agent-executor/claude-sdk/controls.d.ts +1 -0
- package/dist/agent-executor/claude-sdk/controls.d.ts.map +1 -1
- package/dist/agent-executor/claude-sdk/driver.d.ts +51 -50
- package/dist/agent-executor/claude-sdk/driver.d.ts.map +1 -1
- package/dist/agent-executor/claude-sdk/probe.d.ts +3 -3
- package/dist/agent-executor/claude-sdk/probe.d.ts.map +1 -1
- package/dist/agent-executor/claude-sdk/query-loop.d.ts +2 -1
- package/dist/agent-executor/claude-sdk/query-loop.d.ts.map +1 -1
- package/dist/agent-executor/codex/classify.d.ts.map +1 -1
- package/dist/agent-executor/codex/connect.d.ts +9 -7
- package/dist/agent-executor/codex/connect.d.ts.map +1 -1
- package/dist/agent-executor/codex/control-client.d.ts +112 -87
- package/dist/agent-executor/codex/control-client.d.ts.map +1 -1
- package/dist/agent-executor/codex/control-read-methods.d.ts +7 -0
- package/dist/agent-executor/codex/control-read-methods.d.ts.map +1 -0
- package/dist/agent-executor/codex/driver.d.ts +42 -31
- package/dist/agent-executor/codex/driver.d.ts.map +1 -1
- package/dist/agent-executor/codex/event-routing.d.ts +14 -0
- package/dist/agent-executor/codex/event-routing.d.ts.map +1 -0
- package/dist/agent-executor/codex/handlers.d.ts +9 -4
- package/dist/agent-executor/codex/handlers.d.ts.map +1 -1
- package/dist/agent-executor/codex/limits.d.ts +9 -3
- package/dist/agent-executor/codex/limits.d.ts.map +1 -1
- package/dist/agent-executor/codex/notifications.d.ts +183 -0
- package/dist/agent-executor/codex/notifications.d.ts.map +1 -0
- package/dist/agent-executor/codex/pagination.d.ts +54 -0
- package/dist/agent-executor/codex/pagination.d.ts.map +1 -0
- package/dist/agent-executor/codex/protocol.d.ts +586 -144
- package/dist/agent-executor/codex/protocol.d.ts.map +1 -1
- package/dist/agent-executor/codex/request-answers.d.ts +4 -2
- package/dist/agent-executor/codex/request-answers.d.ts.map +1 -1
- package/dist/agent-executor/codex/responses.d.ts +855 -0
- package/dist/agent-executor/codex/responses.d.ts.map +1 -0
- package/dist/agent-executor/codex/session-bind.d.ts +410 -0
- package/dist/agent-executor/codex/session-bind.d.ts.map +1 -0
- package/dist/agent-executor/codex/session-controls.d.ts +21 -169
- package/dist/agent-executor/codex/session-controls.d.ts.map +1 -1
- package/dist/agent-executor/codex/session-types.d.ts +190 -0
- package/dist/agent-executor/codex/session-types.d.ts.map +1 -0
- package/dist/agent-executor/codex/session.d.ts +5 -53
- package/dist/agent-executor/codex/session.d.ts.map +1 -1
- package/dist/agent-executor/codex/shared-server.d.ts +7 -5
- package/dist/agent-executor/codex/shared-server.d.ts.map +1 -1
- package/dist/agent-executor/codex/shared-thread.d.ts +8 -8
- package/dist/agent-executor/codex/shared-thread.d.ts.map +1 -1
- package/dist/agent-executor/codex/thread-controls.d.ts +61 -36
- package/dist/agent-executor/codex/thread-controls.d.ts.map +1 -1
- package/dist/agent-executor/codex/thread-list-query.d.ts +5 -0
- package/dist/agent-executor/codex/thread-list-query.d.ts.map +1 -0
- package/dist/agent-executor/codex/thread-open.d.ts +66 -0
- package/dist/agent-executor/codex/thread-open.d.ts.map +1 -0
- package/dist/agent-executor/codex/turn-input.d.ts +25 -7
- package/dist/agent-executor/codex/turn-input.d.ts.map +1 -1
- package/dist/agent-executor/codex/unix-socket-target.d.ts +12 -3
- package/dist/agent-executor/codex/unix-socket-target.d.ts.map +1 -1
- package/dist/agent-executor/codex/ws-frame.d.ts +4 -1
- package/dist/agent-executor/codex/ws-frame.d.ts.map +1 -1
- package/dist/agent-executor/contract.d.ts +3 -1
- package/dist/agent-executor/contract.d.ts.map +1 -1
- package/dist/agent-executor/engine-process.d.ts +4 -4
- package/dist/agent-executor/engine-process.d.ts.map +1 -1
- package/dist/agent-executor/engine.d.ts +3 -3
- package/dist/agent-executor/engine.d.ts.map +1 -1
- package/dist/agent-executor/handoff.d.ts.map +1 -1
- package/dist/agent-executor/hello.d.ts +7 -0
- package/dist/agent-executor/hello.d.ts.map +1 -1
- package/dist/agent-executor/json-rpc-peer.d.ts +9 -4
- package/dist/agent-executor/json-rpc-peer.d.ts.map +1 -1
- package/dist/agent-executor/leases.d.ts +1 -1
- package/dist/agent-executor/leases.d.ts.map +1 -1
- package/dist/agent-executor/plan-limits.d.ts +12 -1
- package/dist/agent-executor/plan-limits.d.ts.map +1 -1
- package/dist/agent-executor/profile.d.ts +7 -0
- package/dist/agent-executor/profile.d.ts.map +1 -1
- package/dist/agent-executor/session-primitives.d.ts +8 -0
- package/dist/agent-executor/session-primitives.d.ts.map +1 -1
- package/dist/agent-executor/testing/consumer-stubs.d.ts +45 -0
- package/dist/agent-executor/testing/consumer-stubs.d.ts.map +1 -0
- package/dist/agent-executor/testing/fake-claude-sdk-query.d.ts +88 -0
- package/dist/agent-executor/testing/fake-claude-sdk-query.d.ts.map +1 -0
- package/dist/agent-executor/testing/fake-codex-app-server.d.ts +56 -0
- package/dist/agent-executor/testing/fake-codex-app-server.d.ts.map +1 -0
- package/dist/agent-executor/testing/fixtures.d.ts +26 -0
- package/dist/agent-executor/testing/fixtures.d.ts.map +1 -0
- package/dist/agent-executor/testing/replay-driver.d.ts +8 -8
- package/dist/agent-executor/testing/replay-driver.d.ts.map +1 -1
- package/dist/agent-executor/testing/replay-runner.d.ts +3 -2
- package/dist/agent-executor/testing/replay-runner.d.ts.map +1 -1
- package/dist/agent-executor/testing/replay-transcript.d.ts +5 -3
- package/dist/agent-executor/testing/replay-transcript.d.ts.map +1 -1
- package/dist/agent-runtime/branch-observations.d.ts +5 -5
- package/dist/entrypoints/agent-executor/acp.d.ts +2 -1
- package/dist/entrypoints/agent-executor/acp.d.ts.map +1 -1
- package/dist/entrypoints/agent-executor/acp.js +284 -82
- package/dist/entrypoints/agent-executor/claude-sdk.d.ts +4 -0
- package/dist/entrypoints/agent-executor/claude-sdk.d.ts.map +1 -1
- package/dist/entrypoints/agent-executor/claude-sdk.js +58 -32
- package/dist/entrypoints/agent-executor/claude.d.ts +2 -2
- package/dist/entrypoints/agent-executor/claude.d.ts.map +1 -1
- package/dist/entrypoints/agent-executor/claude.js +25 -20
- package/dist/entrypoints/agent-executor/codex.d.ts +11 -6
- package/dist/entrypoints/agent-executor/codex.d.ts.map +1 -1
- package/dist/entrypoints/agent-executor/codex.js +2223 -1803
- package/dist/entrypoints/agent-executor/testing.d.ts +4 -0
- package/dist/entrypoints/agent-executor/testing.d.ts.map +1 -1
- package/dist/entrypoints/agent-executor/testing.js +880 -18
- package/dist/entrypoints/agent-executor.d.ts +3 -3
- package/dist/entrypoints/agent-executor.d.ts.map +1 -1
- package/dist/entrypoints/agent-executor.js +42 -8
- package/dist/entrypoints/process.js +3 -3
- package/dist/{index-jrn3prgm.js → index-32vaajec.js} +29 -4
- package/dist/{index-p1qmpq0p.js → index-64e9p079.js} +92 -56
- package/dist/{index-dbp6xemn.js → index-g2d9kws8.js} +199 -3
- package/dist/index-gm9yz82v.js +56 -0
- package/dist/index-j15dhkda.js +749 -0
- package/dist/{index-1q0n6zek.js → index-kwsr7j5k.js} +84 -44
- package/llms/agent-executor-acp.txt +5 -5
- package/llms/agent-executor-claude-sdk.txt +3 -1
- package/llms/agent-executor-claude.txt +2 -2
- package/llms/agent-executor-codex.txt +13 -10
- package/llms/agent-executor-testing.txt +5 -1
- package/llms/agent-executor.txt +4 -4
- package/llms/stitchkit.txt +75 -74
- package/llms/{upgrading-0.128.0-0.130.0.txt → upgrading-0.128.0-0.131.0.txt} +56 -3
- package/llms/upgrading.txt +1 -1
- package/llms-full.txt +160 -97
- package/llms.txt +8 -8
- package/package.json +3 -3
- package/dist/index-2s8sy57y.js +0 -229
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
import type { AccountInfo, McpServerStatus, McpSetServersResult, ModelInfo, Options, PermissionMode, PermissionResult, RewindFilesResult, SDKControlGetContextUsageResponse, SDKControlGetUsageResponse, SDKControlInitializeResponse, SDKControlSetPermissionModeResponse, SDKUserMessage, SlashCommand } from '@anthropic-ai/claude-agent-sdk';
|
|
2
|
+
import type { ClaudeSdkQuery } from '../claude-sdk/driver.js';
|
|
3
|
+
/** Recorded live control invocation observed on {@link FakeClaudeSdkQueryHarness}. */
|
|
4
|
+
export interface FakeClaudeSdkRecordedCall {
|
|
5
|
+
/** Control method name invoked by the driver (`interrupt`, `setModel`, `setPermissionMode`, `applyFlagSettings`, `rewindFiles`, `close`, etc.). */
|
|
6
|
+
readonly method: string;
|
|
7
|
+
/** Positional arguments passed to the control method. */
|
|
8
|
+
readonly args: readonly unknown[];
|
|
9
|
+
}
|
|
10
|
+
/** Imperative controller handed to scripted turns and `onRun` callbacks in {@link createFakeClaudeSdkQuery}. */
|
|
11
|
+
export interface FakeClaudeSdkRunController {
|
|
12
|
+
/** SDK options passed when this query run was created. */
|
|
13
|
+
readonly options: Options | undefined;
|
|
14
|
+
/** User messages pulled from the `prompt` async iterable for this run. */
|
|
15
|
+
readonly promptMessages: readonly SDKUserMessage[];
|
|
16
|
+
/** Emit one raw Claude SDK stream record to the driver's drain loop. */
|
|
17
|
+
emit(record: unknown): void;
|
|
18
|
+
/** Trigger the driver's `options.canUseTool` callback with a real `AbortSignal` and `toolUseID`. */
|
|
19
|
+
askPermission(toolName: string, input: Record<string, unknown>, options?: {
|
|
20
|
+
readonly toolUseID?: string | undefined;
|
|
21
|
+
readonly signal?: AbortSignal | undefined;
|
|
22
|
+
readonly requestId?: string | undefined;
|
|
23
|
+
readonly decisionReason?: string | undefined;
|
|
24
|
+
readonly blockedPath?: string | undefined;
|
|
25
|
+
readonly title?: string | undefined;
|
|
26
|
+
readonly displayName?: string | undefined;
|
|
27
|
+
readonly description?: string | undefined;
|
|
28
|
+
readonly agentID?: string | undefined;
|
|
29
|
+
readonly defaultToNo?: boolean | undefined;
|
|
30
|
+
readonly suppressAlwaysAllowRule?: boolean | undefined;
|
|
31
|
+
}): Promise<PermissionResult | null>;
|
|
32
|
+
/** End the run's async iterable cleanly (simulates unexpected idle or mid-turn query exit). */
|
|
33
|
+
end(): void;
|
|
34
|
+
/** Fail the run's async iterable with `error`. */
|
|
35
|
+
fail(error: unknown): void;
|
|
36
|
+
}
|
|
37
|
+
/** One scripted turn driven by {@link createFakeClaudeSdkQuery}: static record list or imperative handler. */
|
|
38
|
+
export type FakeClaudeSdkScriptedTurn = {
|
|
39
|
+
readonly records: readonly unknown[];
|
|
40
|
+
} | ((message: SDKUserMessage, controller: FakeClaudeSdkRunController) => Promise<void> | void);
|
|
41
|
+
/** Configuration for {@link createFakeClaudeSdkQuery}. */
|
|
42
|
+
export interface FakeClaudeSdkQueryConfig {
|
|
43
|
+
/** Ordered turns executed as user messages arrive on the query's `prompt` iterable. */
|
|
44
|
+
readonly turns?: readonly FakeClaudeSdkScriptedTurn[] | undefined;
|
|
45
|
+
/** Optional hook invoked as soon as each `ClaudeSdkRun` is created (before prompt messages arrive). */
|
|
46
|
+
readonly onRun?: ((controller: FakeClaudeSdkRunController) => Promise<void> | void) | undefined;
|
|
47
|
+
/** Canned `initializationResult()` response. */
|
|
48
|
+
readonly initializationResult?: SDKControlInitializeResponse | undefined;
|
|
49
|
+
/** Canned `supportedModels()` list. */
|
|
50
|
+
readonly models?: readonly ModelInfo[] | undefined;
|
|
51
|
+
/** Canned `supportedCommands()` list. */
|
|
52
|
+
readonly commands?: readonly SlashCommand[] | undefined;
|
|
53
|
+
/** Canned `accountInfo()` response. */
|
|
54
|
+
readonly account?: AccountInfo | undefined;
|
|
55
|
+
/** Canned `mcpServerStatus()` list. */
|
|
56
|
+
readonly mcpServers?: readonly McpServerStatus[] | undefined;
|
|
57
|
+
/** Canned `getContextUsage()` response. */
|
|
58
|
+
readonly contextUsage?: SDKControlGetContextUsageResponse | undefined;
|
|
59
|
+
/**
|
|
60
|
+
* Optional `get_usage` response or factory. When omitted, the experimental usage method is NOT
|
|
61
|
+
* attached to the fake query (so `readUsage()` reports `{ supported: false }`).
|
|
62
|
+
*/
|
|
63
|
+
readonly usage?: SDKControlGetUsageResponse | (() => Promise<SDKControlGetUsageResponse> | SDKControlGetUsageResponse) | undefined;
|
|
64
|
+
/** Optional custom `setPermissionMode` response resolver (defaults to `{ mode }`). */
|
|
65
|
+
readonly onSetPermissionMode?: ((mode: PermissionMode) => Promise<SDKControlSetPermissionModeResponse | undefined> | SDKControlSetPermissionModeResponse | undefined) | undefined;
|
|
66
|
+
/** Canned `rewindFiles()` response (defaults to `{ canRewind: true }`). */
|
|
67
|
+
readonly rewindFilesResult?: RewindFilesResult | undefined;
|
|
68
|
+
/** Canned `setMcpServers()` response (defaults to `{ added: [], removed: [], errors: {} }`). */
|
|
69
|
+
readonly setMcpServersResult?: McpSetServersResult | undefined;
|
|
70
|
+
}
|
|
71
|
+
/** Harness returned by {@link createFakeClaudeSdkQuery} for E2E tests over `createClaudeSdkDriver`. */
|
|
72
|
+
export interface FakeClaudeSdkQueryHarness {
|
|
73
|
+
/** Drop-in `ClaudeSdkQuery` implementation passed as `createClaudeSdkDriver({ query })`. */
|
|
74
|
+
readonly query: ClaudeSdkQuery;
|
|
75
|
+
/** Recorded control method calls across all query runs in chronological order. */
|
|
76
|
+
readonly calls: readonly FakeClaudeSdkRecordedCall[];
|
|
77
|
+
/** All user messages consumed from `prompt` across all runs in chronological order. */
|
|
78
|
+
readonly promptMessages: readonly SDKUserMessage[];
|
|
79
|
+
/** Controllers for every `ClaudeSdkRun` created by this harness. */
|
|
80
|
+
readonly runs: readonly FakeClaudeSdkRunController[];
|
|
81
|
+
}
|
|
82
|
+
/**
|
|
83
|
+
* Create a scripted in-process {@link ClaudeSdkQuery} harness for consumer E2E tests against real
|
|
84
|
+
* `createClaudeSdkDriver`, keeping runs open across multiple turns and supporting `canUseTool`,
|
|
85
|
+
* live control recording, and non-inference `probeCapabilities`.
|
|
86
|
+
*/
|
|
87
|
+
export declare function createFakeClaudeSdkQuery(config?: FakeClaudeSdkQueryConfig): FakeClaudeSdkQueryHarness;
|
|
88
|
+
//# sourceMappingURL=fake-claude-sdk-query.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fake-claude-sdk-query.d.ts","sourceRoot":"","sources":["../../../src/agent-executor/testing/fake-claude-sdk-query.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,WAAW,EACX,eAAe,EACf,mBAAmB,EACnB,SAAS,EACT,OAAO,EACP,cAAc,EACd,gBAAgB,EAChB,iBAAiB,EACjB,iCAAiC,EACjC,0BAA0B,EAC1B,4BAA4B,EAC5B,mCAAmC,EACnC,cAAc,EACd,YAAY,EACb,MAAM,gCAAgC,CAAC;AAExC,OAAO,KAAK,EAAE,cAAc,EAAgB,MAAM,sBAAsB,CAAC;AAEzE,sFAAsF;AACtF,MAAM,WAAW,yBAAyB;IACxC,mJAAmJ;IACnJ,QAAQ,CAAC,MAAM,EAAE,MAAM,C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S,CAAC;IACd,sFAAsF;IACtF,QAAQ,CAAC,mBAAmB,CAAC,EACzB,CAAC,CACC,IAAI,EAAE,cAAc,KAElB,OAAO,CAAC,mCAAmC,GAAG,SAAS,CAAC,GACxD,mCAAmC,GACnC,SAAS,CAAC,GACd,SAAS,CAAC;IACd,2EAA2E;IAC3E,QAAQ,CAAC,iBAAiB,CAAC,EAAE,iBAAiB,GAAG,SAAS,CAAC;IAC3D,gGAAgG;IAChG,QAAQ,CAAC,mBAAmB,CAAC,EAAE,mBAAmB,GAAG,SAAS,CAAC;CAChE;AAED,uGAAuG;AACvG,MAAM,WAAW,yBAAyB;IACxC,4FAA4F;IAC5F,QAAQ,CAAC,KAAK,EAAE,cAAc,CAAC;IAC/B,kFAAkF;IAClF,QAAQ,CAAC,KAAK,EAAE,SAAS,yBAAyB,EAAE,CAAC;IACrD,uFAAuF;IACvF,QAAQ,CAAC,cAAc,EAAE,SAAS,cAAc,EAAE,CAAC;IACnD,oEAAoE;IACpE,QAAQ,CAAC,IAAI,EAAE,SAAS,0BAA0B,EAAE,CAAC;CACtD;AAkOD;;;;GAIG;AACH,wBAAgB,wBAAwB,CACtC,MAAM,GAAE,wBAA6B,GACpC,yBAAyB,CAkF3B"}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { type JsonRpcValue } from '../json-rpc-peer.js';
|
|
2
|
+
/** One JSON-RPC request recorded in arrival order by {@link FakeCodexAppServer}. */
|
|
3
|
+
export interface RecordedJsonRpcRequest {
|
|
4
|
+
/** Wire JSON-RPC request identifier. */
|
|
5
|
+
readonly id: string | number;
|
|
6
|
+
/** JSON-RPC method name requested by the client. */
|
|
7
|
+
readonly method: string;
|
|
8
|
+
/** Optional request params payload. */
|
|
9
|
+
readonly params?: JsonRpcValue | undefined;
|
|
10
|
+
}
|
|
11
|
+
/** Explicit JSON-RPC error object returned by a {@link FakeCodexRpcHandler}. */
|
|
12
|
+
export interface FakeCodexRpcErrorOutcome {
|
|
13
|
+
readonly error: {
|
|
14
|
+
readonly code: number;
|
|
15
|
+
readonly message: string;
|
|
16
|
+
readonly data?: JsonRpcValue | undefined;
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
/** Return value accepted from a {@link FakeCodexRpcHandler}: JSON/DTO payload, explicit RPC error, or `'hang'` to omit any reply. */
|
|
20
|
+
export type FakeCodexRpcHandlerOutcome = JsonRpcValue | Readonly<Record<string, unknown>> | FakeCodexRpcErrorOutcome | 'hang';
|
|
21
|
+
/** Handler for one client JSON-RPC method on {@link FakeCodexAppServer}. */
|
|
22
|
+
export type FakeCodexRpcHandler = (params: JsonRpcValue | undefined, request: RecordedJsonRpcRequest) => Promise<FakeCodexRpcHandlerOutcome> | FakeCodexRpcHandlerOutcome;
|
|
23
|
+
/** Configuration for {@link createFakeCodexAppServer}. */
|
|
24
|
+
export interface FakeCodexAppServerConfig {
|
|
25
|
+
/** Absolute Unix domain socket path inside a private (`0o700`) directory. */
|
|
26
|
+
readonly socketPath: string;
|
|
27
|
+
/** `userAgent` returned by the default `initialize` handler. Defaults to `'codex/0.171.0'`; pass explicit `undefined` to omit. */
|
|
28
|
+
readonly userAgent?: string | undefined;
|
|
29
|
+
/** Per-method JSON-RPC handlers overriding or extending the default `initialize` handshake. */
|
|
30
|
+
readonly handlers?: Readonly<Record<string, FakeCodexRpcHandler>> | undefined;
|
|
31
|
+
/** Maximum incoming WebSocket frame size in bytes. Default 16 MiB. */
|
|
32
|
+
readonly maxFrameBytes?: number | undefined;
|
|
33
|
+
}
|
|
34
|
+
/** Running Unix-socket WebSocket JSON-RPC fake Codex app-server handle. */
|
|
35
|
+
export interface FakeCodexAppServer {
|
|
36
|
+
/** Bound Unix domain socket path accepted by `createCodexDriver({ transport: { kind: 'unix-connect', socketPath } })`. */
|
|
37
|
+
readonly socketPath: string;
|
|
38
|
+
/** All JSON-RPC requests (with `id`) received from clients in order. */
|
|
39
|
+
readonly requests: readonly RecordedJsonRpcRequest[];
|
|
40
|
+
/** Push a JSON-RPC notification frame to the active client; throws if no client is connected. */
|
|
41
|
+
sendNotification(method: string, params?: JsonRpcValue | Readonly<Record<string, unknown>>): void;
|
|
42
|
+
/** Push a JSON-RPC server request to the active client and resolve with its reply; rejects on error or disconnect. */
|
|
43
|
+
sendRequest(id: string | number, method: string, params?: JsonRpcValue | Readonly<Record<string, unknown>>): Promise<JsonRpcValue>;
|
|
44
|
+
/** Push an arbitrary UTF-8 WebSocket text frame to the active client (for malformed JSON or oversize-frame tests). */
|
|
45
|
+
sendRaw(text: string): void;
|
|
46
|
+
/** Drop all active client sockets without stopping the listening server (for `onDisconnect` and reconnect tests). */
|
|
47
|
+
disconnect(): void;
|
|
48
|
+
/** Stop the server, drop active sockets, and remove the bound socket file (idempotent). */
|
|
49
|
+
close(): Promise<void>;
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* Start a portable (Bun and Node.js) Unix-socket WebSocket JSON-RPC fake Codex app-server for
|
|
53
|
+
* consumer integration tests with `createCodexDriver({ transport: { kind: 'unix-connect' } })`.
|
|
54
|
+
*/
|
|
55
|
+
export declare function createFakeCodexAppServer(config: FakeCodexAppServerConfig): Promise<FakeCodexAppServer>;
|
|
56
|
+
//# sourceMappingURL=fake-codex-app-server.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fake-codex-app-server.d.ts","sourceRoot":"","sources":["../../../src/agent-executor/testing/fake-codex-app-server.ts"],"names":[],"mappings":"AAaA,OAAO,EAGL,KAAK,YAAY,EAElB,MAAM,kBAAkB,CAAC;AAQ1B,oFAAoF;AACpF,MAAM,WAAW,sBAAsB;IACrC,wCAAwC;IACxC,QAAQ,CAAC,EAAE,EAAE,MAAM,GAAG,MAAM,CAAC;IAC7B,oDAAoD;IACpD,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,uCAAuC;IACvC,QAAQ,CAAC,MAAM,CAAC,EAAE,YAAY,GAAG,SAAS,CAAC;CAC5C;AAED,gFAAgF;AAChF,MAA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,GACxD,IAAI,CAAC;IACR,sHAAsH;IACtH,WAAW,CACT,EAAE,EAAE,MAAM,GAAG,MAAM,EACnB,MAAM,EAAE,MAAM,EACd,MAAM,CAAC,EAAE,YAAY,GAAG,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,GACxD,OAAO,CAAC,YAAY,CAAC,CAAC;IACzB,sHAAsH;IACtH,OAAO,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,qHAAqH;IACrH,UAAU,IAAI,IAAI,CAAC;IACnB,2FAA2F;IAC3F,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;CACxB;AA6OD;;;GAGG;AACH,wBAAsB,wBAAwB,CAC5C,MAAM,EAAE,wBAAwB,GAC/B,OAAO,CAAC,kBAAkB,CAAC,CAiG7B"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import type { CodexNotificationEvent } from '../codex/handlers.js';
|
|
2
|
+
import { type CodexThread } from '../codex/protocol.js';
|
|
3
|
+
import { type JsonRpcValue } from '../json-rpc-peer.js';
|
|
4
|
+
import { type ExecutorDelta } from '../vocabulary.js';
|
|
5
|
+
/** Compact input accepted by {@link makeExecutorDelta}, making `turnId`, `itemId`, and `raw` optional across every `ExecutorDelta` branch. */
|
|
6
|
+
export type ExecutorDeltaInput<D extends ExecutorDelta = ExecutorDelta> = D extends ExecutorDelta ? Omit<D, 'turnId' | 'itemId' | 'raw'> & {
|
|
7
|
+
readonly turnId?: string | undefined;
|
|
8
|
+
readonly itemId?: string | undefined;
|
|
9
|
+
readonly raw?: ExecutorDelta['raw'] | undefined;
|
|
10
|
+
} : never;
|
|
11
|
+
/** Optional overrides accepted by {@link makeCodexNotificationEvent}. */
|
|
12
|
+
export interface CodexNotificationEventOverrides {
|
|
13
|
+
/** Override `duringActiveTurn` (defaults to `false`). */
|
|
14
|
+
readonly duringActiveTurn?: boolean | undefined;
|
|
15
|
+
/** Override classified `deltas` (defaults to `[]`). */
|
|
16
|
+
readonly deltas?: readonly ExecutorDelta[] | undefined;
|
|
17
|
+
}
|
|
18
|
+
/** Build a validated {@link ExecutorDelta} with sensible default `turnId`, `itemId`, and `raw` metadata. */
|
|
19
|
+
export declare function makeExecutorDelta(delta: ExecutorDeltaInput): ExecutorDelta;
|
|
20
|
+
/** Build a validated {@link CodexNotificationEvent} fixture for consumer unit tests. */
|
|
21
|
+
export declare function makeCodexNotificationEvent(method: string, params?: JsonRpcValue, overrides?: CodexNotificationEventOverrides): CodexNotificationEvent;
|
|
22
|
+
/** Build a validated {@link CodexThread} fixture with sensible defaults and optional field overrides. */
|
|
23
|
+
export declare function makeCodexThreadFixture(overrides?: {
|
|
24
|
+
[K in keyof CodexThread]?: CodexThread[K] | undefined;
|
|
25
|
+
} & Readonly<Record<string, unknown>>): CodexThread;
|
|
26
|
+
//# sourceMappingURL=fixtures.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fixtures.d.ts","sourceRoot":"","sources":["../../../src/agent-executor/testing/fixtures.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,mBAAmB,CAAC;AAChE,OAAO,EAAE,KAAK,WAAW,EAAqB,MAAM,mBAAmB,CAAC;AACxE,OAAO,EAAE,KAAK,YAAY,EAAsB,MAAM,kBAAkB,CAAC;AACzE,OAAO,EAAE,KAAK,aAAa,EAAuB,MAAM,eAAe,CAAC;AAExE,8IAA8I;AAC9I,MAAM,MAAM,kBAAkB,CAAC,CAAC,SAAS,aAAa,GAAG,aAAa,IACpE,CAAC,SAAS,aAAa,GACnB,IAAI,CAAC,CAAC,EAAE,QAAQ,GAAG,QAAQ,GAAG,KAAK,CAAC,GAAG;IACrC,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACrC,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACrC,QAAQ,CAAC,GAAG,CAAC,EAAE,aAAa,CAAC,KAAK,CAAC,GAAG,SAAS,CAAC;CACjD,GACD,KAAK,CAAC;AAEZ,yEAAyE;AACzE,MAAM,WAAW,+BAA+B;IAC9C,yDAAyD;IACzD,QAAQ,CAAC,gBAAgB,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IAChD,uDAAuD;IACvD,QAAQ,CAAC,MAAM,CAAC,EAAE,SAAS,aAAa,EAAE,GAAG,SAAS,CAAC;CACxD;AAED,4GAA4G;AAC5G,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,kBAAkB,GAAG,aAAa,CAO1E;AAED,wFAAwF;AACxF,wBAAgB,0BAA0B,CACxC,MAAM,EAAE,MAAM,EACd,MAAM,CAAC,EAAE,YAAY,EACrB,SAAS,CAAC,EAAE,+BAA+B,GAC1C,sBAAsB,CAgBxB;AAED,yGAAyG;AACzG,wBAAgB,sBAAsB,CACpC,SAAS,CAAC,EAAE;KAAG,CAAC,IAAI,MAAM,WAAW,CAAC,CAAC,EAAE,WAAW,CAAC,CAAC,CAAC,GAAG,SAAS;CAAE,GAAG,QAAQ,CAC9E,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CACxB,GACA,WAAW,CAeb"}
|
|
@@ -5,23 +5,23 @@ import { type ExecutorReplayTranscript } from './replay-transcript.js';
|
|
|
5
5
|
/** Configuration for {@link createReplayExecutorDriver}. */
|
|
6
6
|
export interface ReplayExecutorDriverConfig {
|
|
7
7
|
/** Which wire engine identity to emulate (any existing {@link ExecutorEngine}; default `'acp'`). */
|
|
8
|
-
readonly engine?: ExecutorEngine;
|
|
8
|
+
readonly engine?: ExecutorEngine | undefined;
|
|
9
9
|
/** Reconcile strategy emulated by this driver (`'none'` default, or `'client-id'` with `findInput`). */
|
|
10
|
-
readonly reconcile?: 'client-id' | 'none';
|
|
10
|
+
readonly reconcile?: 'client-id' | 'none' | undefined;
|
|
11
11
|
/** One transcript per turn (NDJSON string or validated {@link ExecutorReplayTranscript}). */
|
|
12
12
|
readonly turns: readonly (string | ExecutorReplayTranscript)[];
|
|
13
13
|
/** Optional label gate pausing execution on `{ kind: 'gate', label }` steps. */
|
|
14
|
-
readonly gate?: ReplayGate;
|
|
14
|
+
readonly gate?: ReplayGate | undefined;
|
|
15
15
|
/** Workspace path substituted for `<workspace>` placeholders in NDJSON transcripts. */
|
|
16
|
-
readonly workspace?: string;
|
|
16
|
+
readonly workspace?: string | undefined;
|
|
17
17
|
/** Optional capability overrides merged onto engine defaults and validated strictly. */
|
|
18
|
-
readonly capabilities?: Partial<ExecutorDriverCapabilities
|
|
18
|
+
readonly capabilities?: Partial<ExecutorDriverCapabilities> | undefined;
|
|
19
19
|
/** Engine version string reported in `info()`. Default `'replay-1.0.0'`. */
|
|
20
|
-
readonly version?: string;
|
|
20
|
+
readonly version?: string | undefined;
|
|
21
21
|
/** Optional model ids advertised by `info()`. When omitted, `info().models` is `'not-asked'`. */
|
|
22
|
-
readonly models?: readonly string[];
|
|
22
|
+
readonly models?: readonly string[] | undefined;
|
|
23
23
|
/** When `true`, `session.close()` fails if any configured turns or required steps were not consumed. */
|
|
24
|
-
readonly assertCompleteOnClose?: boolean;
|
|
24
|
+
readonly assertCompleteOnClose?: boolean | undefined;
|
|
25
25
|
}
|
|
26
26
|
/** In-process deterministic replay driver adding inspection and completeness assertions. */
|
|
27
27
|
export interface ReplayExecutorDriver extends AgentEngineDriver {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"replay-driver.d.ts","sourceRoot":"","sources":["../../../src/agent-executor/testing/replay-driver.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,iBAAiB,EAAuC,MAAM,WAAW,CAAC;AAGxF,OAAO,EACL,KAAK,0BAA0B,EAE/B,KAAK,cAAc,EAGpB,MAAM,UAAU,CAAC;AAGlB,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAEhD,OAAO,
|
|
1
|
+
{"version":3,"file":"replay-driver.d.ts","sourceRoot":"","sources":["../../../src/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,EAAE,MAAM,GAAG,MAAM,CAAC;IAC1C,2FAA2F;IAC3F,WAAW,CAAC,aAAa,EAAE,MAAM,GAAG,OAAO,CAAC;IAC5C,0GAA0G;IAC1G,cAAc,IAAI,IAAI,CAAC;CACxB;AAoCD;;;GAGG;AACH,wBAAgB,0BAA0B,CACxC,MAAM,EAAE,0BAA0B,GACjC,oBAAoB,CA2KtB"}
|
|
@@ -2,11 +2,12 @@ import { type EngineRequestTurn } from '../engine-requests.js';
|
|
|
2
2
|
import type { InteractionReply } from '../executor-contract.js';
|
|
3
3
|
import type { ExecutorEngine, PlanLimits } from '../hello.js';
|
|
4
4
|
import type { ReplayGate } from './replay-gate.js';
|
|
5
|
-
import type { ExecutorReplayTranscript } from './replay-transcript.js';
|
|
5
|
+
import type { ExecutorReplayStep, ExecutorReplayTranscript } from './replay-transcript.js';
|
|
6
6
|
export interface ReplayTurnSlot extends EngineRequestTurn<InteractionReply['reply'], {
|
|
7
7
|
readonly interactionId: string;
|
|
8
8
|
}> {
|
|
9
9
|
readonly turnId: string;
|
|
10
|
+
readonly hostAnswered: Set<string>;
|
|
10
11
|
readonly interruptWaiters: Array<() => void>;
|
|
11
12
|
readonly replyPromises: Map<string, Promise<InteractionReply['reply']>>;
|
|
12
13
|
}
|
|
@@ -17,7 +18,7 @@ export interface ReplayTurnRunnerContext {
|
|
|
17
18
|
readonly profileId: string;
|
|
18
19
|
readonly limits: Map<string, PlanLimits>;
|
|
19
20
|
readonly answeredIds: Set<string>;
|
|
20
|
-
readonly
|
|
21
|
+
readonly consumedReplies: Set<ExecutorReplayStep>;
|
|
21
22
|
readonly gate?: ReplayGate;
|
|
22
23
|
readonly signal: AbortSignal;
|
|
23
24
|
readonly onTurnCompleted: () => void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"replay-runner.d.ts","sourceRoot":"","sources":["../../../src/agent-executor/testing/replay-runner.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,iBAAiB,EAIvB,M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,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,MAAM,EAAE,GAAG,CAAC,MAAM,EAAE,UAAU,CAAC,CAAC;IACzC,QAAQ,CAAC,WAAW,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;IAClC,QAAQ,CAAC,eAAe,EAAE,GAAG,CAAC,kBAAkB,CAAC,CAAC;IAClD,QAAQ,CAAC,IAAI,CAAC,EAAE,UAAU,CAAC;IAC3B,QAAQ,CAAC,MAAM,EAAE,WAAW,CAAC;IAC7B,QAAQ,CAAC,eAAe,EAAE,MAAM,IAAI,CAAC;IACrC,QAAQ,CAAC,eAAe,EAAE,MAAM,IAAI,CAAC;CACtC;AAED,wBAAsB,mBAAmB,CAAC,OAAO,EAAE,uBAAuB,GAAG,OAAO,CAAC,IAAI,CAAC,CAqKzF"}
|
|
@@ -122,6 +122,7 @@ export declare const ExecutorReplayStepSchema: z.ZodUnion<readonly [z.ZodObject<
|
|
|
122
122
|
resetsAt: z.ZodOptional<z.ZodISODateTime>;
|
|
123
123
|
windowDurationMins: z.ZodOptional<z.ZodInt>;
|
|
124
124
|
label: z.ZodOptional<z.ZodString>;
|
|
125
|
+
scope: z.ZodOptional<z.ZodString>;
|
|
125
126
|
}, z.core.$strict>>;
|
|
126
127
|
}, z.core.$strict>, z.ZodObject<{
|
|
127
128
|
kind: z.ZodLiteral<"unknownRecord">;
|
|
@@ -258,6 +259,7 @@ export declare const ExecutorReplayTranscriptSchema: z.ZodObject<{
|
|
|
258
259
|
resetsAt: z.ZodOptional<z.ZodISODateTime>;
|
|
259
260
|
windowDurationMins: z.ZodOptional<z.ZodInt>;
|
|
260
261
|
label: z.ZodOptional<z.ZodString>;
|
|
262
|
+
scope: z.ZodOptional<z.ZodString>;
|
|
261
263
|
}, z.core.$strict>>;
|
|
262
264
|
}, z.core.$strict>, z.ZodObject<{
|
|
263
265
|
kind: z.ZodLiteral<"unknownRecord">;
|
|
@@ -280,11 +282,11 @@ export type ExecutorReplayTranscript = z.infer<typeof ExecutorReplayTranscriptSc
|
|
|
280
282
|
/** Options for {@link parseReplayTranscript}. */
|
|
281
283
|
export interface ParseReplayTranscriptOptions {
|
|
282
284
|
/** Substitute literal `<workspace>` tokens inside parsed string values with this path. */
|
|
283
|
-
readonly workspace?: string;
|
|
285
|
+
readonly workspace?: string | undefined;
|
|
284
286
|
/** Maximum UTF-8 byte length accepted for the NDJSON source. Default 4 MiB. */
|
|
285
|
-
readonly maxBytes?: number;
|
|
287
|
+
readonly maxBytes?: number | undefined;
|
|
286
288
|
/** Maximum number of replay steps accepted. Default 4096. */
|
|
287
|
-
readonly maxSteps?: number;
|
|
289
|
+
readonly maxSteps?: number | undefined;
|
|
288
290
|
}
|
|
289
291
|
/**
|
|
290
292
|
* Parse and strictly validate an NDJSON replay transcript within finite byte and step limits.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"replay-transcript.d.ts","sourceRoot":"","sources":["../../../src/agent-executor/testing/replay-transcript.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AASxB,eAAO,MAAM,wBAAwB,QAAkB,CAAC;AACxD,eAAO,MAAM,wBAAwB,OAAQ,CAAC;AAsI9C,4EAA4E;AAC5E,eAAO,MAAM,wBAAwB
|
|
1
|
+
{"version":3,"file":"replay-transcript.d.ts","sourceRoot":"","sources":["../../../src/agent-executor/testing/replay-transcript.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AASxB,eAAO,MAAM,wBAAwB,QAAkB,CAAC;AACxD,eAAO,MAAM,wBAAwB,OAAQ,CAAC;AAsI9C,4EAA4E;AAC5E,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;oBAmBnC,CAAC;AAEH,0EAA0E;AAC1E,eAAO,MAAM,8BAA8B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAEzC,CAAC;AAEH,kFAAkF;AAClF,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,wBAAwB,CAAC,CAAC;AAC1E,oGAAoG;AACpG,MAAM,MAAM,wBAAwB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,8BAA8B,CAAC,CAAC;AAEtF,iDAAiD;AACjD,MAAM,WAAW,4BAA4B;IAC3C,0FAA0F;IAC1F,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACxC,+EAA+E;IAC/E,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACvC,6DAA6D;IAC7D,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CACxC;AAqBD;;;GAGG;AACH,wBAAgB,qBAAqB,CACnC,MAAM,EAAE,MAAM,EACd,OAAO,GAAE,4BAAiC,GACzC,wBAAwB,CA6C1B;AAED,qEAAqE;AACrE,wBAAgB,sBAAsB,CAAC,KAAK,EAAE,SAAS,kBAAkB,EAAE,GAAG,MAAM,CAEnF"}
|
|
@@ -134,11 +134,6 @@ export declare function branchObservation(ids: BranchIdentities, kind: string, r
|
|
|
134
134
|
artifactId?: string | undefined;
|
|
135
135
|
payloadOmitted?: "max-payload-bytes" | undefined;
|
|
136
136
|
payloadSha256: string;
|
|
137
|
-
} | {
|
|
138
|
-
stepName: string;
|
|
139
|
-
encoded: string;
|
|
140
|
-
runId: string;
|
|
141
|
-
id?: string | undefined;
|
|
142
137
|
} | {
|
|
143
138
|
kind: "sleep";
|
|
144
139
|
name: string;
|
|
@@ -152,6 +147,11 @@ export declare function branchObservation(ids: BranchIdentities, kind: string, r
|
|
|
152
147
|
id: string;
|
|
153
148
|
encoded?: string | undefined;
|
|
154
149
|
runId: string;
|
|
150
|
+
} | {
|
|
151
|
+
stepName: string;
|
|
152
|
+
encoded: string;
|
|
153
|
+
runId: string;
|
|
154
|
+
id?: string | undefined;
|
|
155
155
|
} | {
|
|
156
156
|
event: string;
|
|
157
157
|
id: string;
|
|
@@ -2,6 +2,7 @@ export { acpFakeScenarios } from '../../agent-executor/acp/scenarios.js';
|
|
|
2
2
|
export type { AcpProbeMode, AcpPromptOutcomeOverride, AcpSessionMetaInput, AcpSteerMode, AcpWatchPromptOutcome, } from '../../agent-executor/acp/v1-connect.js';
|
|
3
3
|
export { type AcpApprovalEnforcement, type AcpDriver, type AcpDriverConfig, type AcpSession, type AcpSessionSummary, createAcpDriver, } from '../../agent-executor/acp/v1-driver.js';
|
|
4
4
|
export type { AcpPermissionRequestEvent, AcpTransformUpdate, AcpUpdateEvent, } from '../../agent-executor/acp/v1-handlers.js';
|
|
5
|
-
export
|
|
5
|
+
export type { AcpCapabilitiesProbe, AcpProbeCapabilitiesInput, } from '../../agent-executor/acp/v1-probe.js';
|
|
6
|
+
export { ACP_PROTOCOL_VERSION, type AcpClientInfo, AcpClientInfoSchema, type AcpConfigOption, type AcpConfigOptionChoice, AcpConfigOptionSchema, type AcpInitializeResult, AcpInitializeResultSchema, type AcpMcpServer, AcpMcpServerSchema, type AcpPermissionOption, AcpPermissionOptionSchema, type AcpPermissionRequest, AcpPermissionRequestSchema, type AcpPromptResult, type AcpPromptUsage, type AcpSessionUpdate, AcpSessionUpdateSchema, acpOptionChoices, acpOptionValues, } from '../../agent-executor/acp/v1-protocol.js';
|
|
6
7
|
export type { AcpOpenInput, AcpSteerTurnInput } from '../../agent-executor/acp/v1-session.js';
|
|
7
8
|
//# sourceMappingURL=acp.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"acp.d.ts","sourceRoot":"","sources":["../../../src/entrypoints/agent-executor/acp.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,oCAAoC,CAAC;AACtE,YAAY,EACV,YAAY,EACZ,wBAAwB,EACxB,mBAAmB,EACnB,YAAY,EACZ,qBAAqB,GACtB,MAAM,qCAAqC,CAAC;AAC7C,OAAO,EACL,KAAK,sBAAsB,EAC3B,KAAK,SAAS,EACd,KAAK,eAAe,EACpB,KAAK,UAAU,EACf,KAAK,iBAAiB,EACtB,eAAe,GAChB,MAAM,oCAAoC,CAAC;AAC5C,YAAY,EACV,yBAAyB,EACzB,kBAAkB,EAClB,cAAc,GACf,MAAM,sCAAsC,CAAC;AAC9C,OAAO,EACL,oBAAoB,EACpB,KAAK,aAAa,EAClB,mBAAmB,EACnB,KAAK,eAAe,EACpB,KAAK,mBAAmB,EACxB,KAAK,YAAY,EACjB,kBAAkB,EAClB,KAAK,mBAAmB,EACxB,KAAK,oBAAoB,EACzB,KAAK,eAAe,EACpB,KAAK,cAAc,EACnB,KAAK,gBAAgB,
|
|
1
|
+
{"version":3,"file":"acp.d.ts","sourceRoot":"","sources":["../../../src/entrypoints/agent-executor/acp.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,oCAAoC,CAAC;AACtE,YAAY,EACV,YAAY,EACZ,wBAAwB,EACxB,mBAAmB,EACnB,YAAY,EACZ,qBAAqB,GACtB,MAAM,qCAAqC,CAAC;AAC7C,OAAO,EACL,KAAK,sBAAsB,EAC3B,KAAK,SAAS,EACd,KAAK,eAAe,EACpB,KAAK,UAAU,EACf,KAAK,iBAAiB,EACtB,eAAe,GAChB,MAAM,oCAAoC,CAAC;AAC5C,YAAY,EACV,yBAAyB,EACzB,kBAAkB,EAClB,cAAc,GACf,MAAM,sCAAsC,CAAC;AAC9C,YAAY,EACV,oBAAoB,EACpB,yBAAyB,GAC1B,MAAM,mCAAmC,CAAC;AAC3C,OAAO,EACL,oBAAoB,EACpB,KAAK,aAAa,EAClB,mBAAmB,EACnB,KAAK,eAAe,EACpB,KAAK,qBAAqB,EAC1B,qBAAqB,EACrB,KAAK,mBAAmB,EACxB,yBAAyB,EACzB,KAAK,YAAY,EACjB,kBAAkB,EAClB,KAAK,mBAAmB,EACxB,yBAAyB,EACzB,KAAK,oBAAoB,EACzB,0BAA0B,EAC1B,KAAK,eAAe,EACpB,KAAK,cAAc,EACnB,KAAK,gBAAgB,EACrB,sBAAsB,EACtB,gBAAgB,EAChB,eAAe,GAChB,MAAM,sCAAsC,CAAC;AAC9C,YAAY,EAAE,YAAY,EAAE,iBAAiB,EAAE,MAAM,qCAAqC,CAAC"}
|