acpx 0.16.0 → 0.17.1
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/README.md +2 -0
- package/dist/{agent-registry-DU6mhZBL.js → agent-registry-evUoJINz.js} +5 -1
- package/dist/agent-registry-evUoJINz.js.map +1 -0
- package/dist/agent-registry.d.ts.map +1 -1
- package/dist/agent-registry.js +1 -1
- package/dist/{cli-BkYIxj_N.js → cli-B2ycKzaO.js} +5 -4
- package/dist/{cli-BkYIxj_N.js.map → cli-B2ycKzaO.js.map} +1 -1
- package/dist/cli.d.ts +1 -1
- package/dist/cli.js +34 -27
- package/dist/cli.js.map +1 -1
- package/dist/{client-5levcBIs.d.ts → client-CkbBoSGd.d.ts} +17 -7
- package/dist/client-CkbBoSGd.d.ts.map +1 -0
- package/dist/{flows-Bxs4udrs.js → flows-xGyhmoHO.js} +7 -6
- package/dist/{flows-Bxs4udrs.js.map → flows-xGyhmoHO.js.map} +1 -1
- package/dist/flows.d.ts +2 -2
- package/dist/flows.js +1 -1
- package/dist/{invocation-options-BY4lxkn3.js → invocation-options-eZEBh4vd.js} +5 -4
- package/dist/{invocation-options-BY4lxkn3.js.map → invocation-options-eZEBh4vd.js.map} +1 -1
- package/dist/ipc-D2rstexT.js +3350 -0
- package/dist/ipc-D2rstexT.js.map +1 -0
- package/dist/output-D2xL6wdp.js +980 -0
- package/dist/output-D2xL6wdp.js.map +1 -0
- package/dist/{live-checkpoint-BEfxBKCh.js → queue-owner-runtime-Dgv3e2Tp.js} +3104 -1878
- package/dist/queue-owner-runtime-Dgv3e2Tp.js.map +1 -0
- package/dist/runtime.d.ts +187 -46
- package/dist/runtime.d.ts.map +1 -1
- package/dist/runtime.js +416 -93
- package/dist/runtime.js.map +1 -1
- package/dist/{session-options-t3d-F4dn.d.ts → session-options-Dp6mzNSy.d.ts} +2 -2
- package/dist/{session-options-t3d-F4dn.d.ts.map → session-options-Dp6mzNSy.d.ts.map} +1 -1
- package/dist/session-watch-CTe9Bnbc.js +76 -0
- package/dist/session-watch-CTe9Bnbc.js.map +1 -0
- package/dist/watch-DxuXEc8n.js +32 -0
- package/dist/watch-DxuXEc8n.js.map +1 -0
- package/package.json +3 -3
- package/skills/acpx/SKILL.md +6 -2
- package/dist/agent-registry-DU6mhZBL.js.map +0 -1
- package/dist/client-5levcBIs.d.ts.map +0 -1
- package/dist/live-checkpoint-BEfxBKCh.js.map +0 -1
- package/dist/output-uo5a27KB.js +0 -4711
- package/dist/output-uo5a27KB.js.map +0 -1
package/dist/runtime.d.ts
CHANGED
|
@@ -1,7 +1,37 @@
|
|
|
1
1
|
import { AcpAgentInspection, AcpAgentInspectionOptions, AcpAgentRegistry, AcpInspectableAgentRegistry, DEFAULT_AGENT_NAME, createAgentRegistry } from "./agent-registry.js";
|
|
2
|
-
import {
|
|
3
|
-
import { a as RequestedModelUnsupportedErrorCode, i as RequestedModelUnsupportedError, n as REQUESTED_MODEL_UNSUPPORTED_ERROR_CODE, o as RequestedModelUnsupportedReason, r as REQUESTED_MODEL_UNSUPPORTED_REASONS, s as isRequestedModelUnsupportedError, t as AcpClient } from "./client-
|
|
2
|
+
import { C as PermissionPolicy, E as PromptInput, S as PermissionMode, T as SessionRecord, _ as AcpProcessSpawnFailure, a as AcpElicitationHandler, b as McpServer$1, c as AcpElicitationResponse, d as AcpPermissionHandler, f as AcpPermissionRequest, g as AcpProcessLifecycle, h as AcpProcessLaunchScope, i as AcpElicitationContext, l as AcpJsonRpcMessage, m as AcpProcessLaunch, n as SystemPromptOption, o as AcpElicitationMode, p as AcpProcessExit, s as AcpElicitationRequest, t as SessionAgentOptions, u as AcpPermissionDecision, v as AcpProcessStarted, x as NonInteractivePermissionPolicy, y as AuthPolicy } from "./session-options-Dp6mzNSy.js";
|
|
3
|
+
import { a as RequestedModelUnsupportedErrorCode, c as AcpControlAuthority, i as RequestedModelUnsupportedError, n as REQUESTED_MODEL_UNSUPPORTED_ERROR_CODE, o as RequestedModelUnsupportedReason, r as REQUESTED_MODEL_UNSUPPORTED_REASONS, s as isRequestedModelUnsupportedError, t as AcpClient } from "./client-CkbBoSGd.js";
|
|
4
|
+
import { z } from "zod";
|
|
4
5
|
import { SetSessionConfigOptionResponse, ToolCallContent, ToolCallLocation, ToolKind } from "@agentclientprotocol/sdk";
|
|
6
|
+
//#region src/session/journal.d.ts
|
|
7
|
+
type SessionWatchResult = {
|
|
8
|
+
status: "completed" | "cancelled";
|
|
9
|
+
stopReason?: string;
|
|
10
|
+
_meta?: Record<string, unknown> | null;
|
|
11
|
+
} | {
|
|
12
|
+
status: "failed";
|
|
13
|
+
error: {
|
|
14
|
+
message: string;
|
|
15
|
+
code?: string;
|
|
16
|
+
detailCode?: string;
|
|
17
|
+
retryable?: boolean;
|
|
18
|
+
};
|
|
19
|
+
};
|
|
20
|
+
type SessionWatchEvent = {
|
|
21
|
+
cursor: string;
|
|
22
|
+
} & ({
|
|
23
|
+
type: "message";
|
|
24
|
+
requestId: string | null;
|
|
25
|
+
message: AcpJsonRpcMessage;
|
|
26
|
+
} | {
|
|
27
|
+
type: "turn_started";
|
|
28
|
+
requestId: string;
|
|
29
|
+
} | {
|
|
30
|
+
type: "turn_result";
|
|
31
|
+
requestId: string;
|
|
32
|
+
result: SessionWatchResult;
|
|
33
|
+
});
|
|
34
|
+
//#endregion
|
|
5
35
|
//#region src/runtime/public/contract.d.ts
|
|
6
36
|
type AcpRuntimePromptMode = "prompt" | "steer";
|
|
7
37
|
type AcpRuntimeSessionMode = "persistent" | "oneshot";
|
|
@@ -40,15 +70,22 @@ type AcpRuntimeTurnAttachment = {
|
|
|
40
70
|
mediaType: string;
|
|
41
71
|
data: string;
|
|
42
72
|
};
|
|
43
|
-
|
|
73
|
+
/**
|
|
74
|
+
* In-process turns check synchronous host authority before prompt dispatch.
|
|
75
|
+
* A throwing assertActive rejects admission without aborting the signal.
|
|
76
|
+
*/
|
|
77
|
+
type AcpRuntimeTurnInput = AcpControlAuthority & {
|
|
44
78
|
handle: AcpRuntimeHandle;
|
|
45
79
|
text: string;
|
|
46
80
|
attachments?: AcpRuntimeTurnAttachment[];
|
|
47
81
|
mode: AcpRuntimePromptMode;
|
|
48
82
|
requestId: string;
|
|
49
83
|
timeoutMs?: number;
|
|
50
|
-
|
|
51
|
-
|
|
84
|
+
/**
|
|
85
|
+
* Overrides the client's default callback for this prompt turn. Throwing or
|
|
86
|
+
* returning undefined falls through to configured permission policy, not the
|
|
87
|
+
* default callback.
|
|
88
|
+
*/
|
|
52
89
|
onPermissionRequest?: AcpPermissionHandler;
|
|
53
90
|
/** Handles ACP elicitation requests owned by this prompt turn. */
|
|
54
91
|
onElicitation?: AcpElicitationHandler;
|
|
@@ -276,6 +313,12 @@ interface AcpRuntimeTurn {
|
|
|
276
313
|
}): Promise<void>;
|
|
277
314
|
}
|
|
278
315
|
interface AcpRuntime {
|
|
316
|
+
/** Passively replays and follows recorded turns when the backend supports a shared journal. */
|
|
317
|
+
watchSession?(input: {
|
|
318
|
+
handle: AcpRuntimeHandle;
|
|
319
|
+
cursor?: string;
|
|
320
|
+
signal?: AbortSignal;
|
|
321
|
+
}): AsyncIterable<SessionWatchEvent>;
|
|
279
322
|
/** Stops owned connections and joins admitted work; stored sessions remain resumable. */
|
|
280
323
|
shutdown?(): Promise<void>;
|
|
281
324
|
/** Finds a persistent session handle without starting or reconnecting an agent. */
|
|
@@ -298,15 +341,16 @@ interface AcpRuntime {
|
|
|
298
341
|
handle: AcpRuntimeHandle;
|
|
299
342
|
signal?: AbortSignal;
|
|
300
343
|
}): Promise<AcpRuntimeStatus>;
|
|
301
|
-
|
|
344
|
+
/** Authority gates dispatch; an issued control still settles its response and saved state. */
|
|
345
|
+
setMode?(input: AcpControlAuthority & {
|
|
302
346
|
handle: AcpRuntimeHandle;
|
|
303
347
|
mode: string;
|
|
304
348
|
}): Promise<void>;
|
|
305
|
-
setModel?(input: {
|
|
349
|
+
setModel?(input: AcpControlAuthority & {
|
|
306
350
|
handle: AcpRuntimeHandle;
|
|
307
351
|
model: string;
|
|
308
352
|
}): Promise<void>;
|
|
309
|
-
setConfigOption?(input: {
|
|
353
|
+
setConfigOption?(input: AcpControlAuthority & {
|
|
310
354
|
handle: AcpRuntimeHandle;
|
|
311
355
|
key: string;
|
|
312
356
|
value: string;
|
|
@@ -331,6 +375,13 @@ interface AcpSessionStore {
|
|
|
331
375
|
load(sessionId: string): Promise<AcpSessionRecord | undefined>;
|
|
332
376
|
save(record: AcpSessionRecord): Promise<void>;
|
|
333
377
|
}
|
|
378
|
+
type AcpRuntimeSessionContext = {
|
|
379
|
+
sessionKey: string;
|
|
380
|
+
cwd: string;
|
|
381
|
+
agentCommand: string;
|
|
382
|
+
agentArgv?: string[];
|
|
383
|
+
};
|
|
384
|
+
type AcpRuntimeSessionPermissions = Partial<Pick<AcpRuntimeOptions, "permissionMode" | "nonInteractivePermissions" | "permissionPolicy" | "onPermissionRequest">>;
|
|
334
385
|
type AcpRuntimeOptions = {
|
|
335
386
|
cwd: string;
|
|
336
387
|
/** Trusted child-only environment, snapshotted at construction and never persisted. */
|
|
@@ -343,12 +394,14 @@ type AcpRuntimeOptions = {
|
|
|
343
394
|
* Retained connections keep their original servers. Initialization-only health
|
|
344
395
|
* probes do not call the resolver.
|
|
345
396
|
*/
|
|
346
|
-
mcpServers?: McpServer$1[] | ((session:
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
397
|
+
mcpServers?: McpServer$1[] | ((session: AcpRuntimeSessionContext) => McpServer$1[]);
|
|
398
|
+
/**
|
|
399
|
+
* Client permissions for new and reconnected sessions, resolved from stored
|
|
400
|
+
* identity. Unspecified fields inherit runtime defaults. Retained clients keep
|
|
401
|
+
* their original policy; health probes do not call this resolver. Neither the
|
|
402
|
+
* policy nor its callback is persisted.
|
|
403
|
+
*/
|
|
404
|
+
sessionPermissions?: (session: AcpRuntimeSessionContext) => AcpRuntimeSessionPermissions | undefined;
|
|
352
405
|
permissionMode: PermissionMode;
|
|
353
406
|
nonInteractivePermissions?: NonInteractivePermissionPolicy;
|
|
354
407
|
permissionPolicy?: PermissionPolicy;
|
|
@@ -371,11 +424,53 @@ type RuntimeHealthReport = {
|
|
|
371
424
|
message: string;
|
|
372
425
|
details?: string[];
|
|
373
426
|
};
|
|
427
|
+
type InspectAgentModelsOptions = {
|
|
428
|
+
agentCommand: string[];
|
|
429
|
+
cwd: string;
|
|
430
|
+
signal?: AbortSignal;
|
|
431
|
+
/** Positive startup/session discovery deadline; defaults to 120 seconds. Cleanup is awaited. */
|
|
432
|
+
timeoutMs?: number;
|
|
433
|
+
/** Trusted child-only environment overlay; never persisted. */
|
|
434
|
+
agentProcessEnv?: Record<string, string>;
|
|
435
|
+
};
|
|
436
|
+
/**
|
|
437
|
+
* Inspect session model metadata without a runtime store or prompt. The agent
|
|
438
|
+
* may create native session history; only its owned transport is closed.
|
|
439
|
+
*/
|
|
440
|
+
export declare function inspectAgentModels(options: InspectAgentModelsOptions): Promise<AcpRuntimeSessionModels | undefined>;
|
|
441
|
+
//#endregion
|
|
442
|
+
//#region src/runtime/engine/turn.d.ts
|
|
443
|
+
type Deferred<T> = {
|
|
444
|
+
promise: Promise<T>;
|
|
445
|
+
resolve: (value: T) => void;
|
|
446
|
+
reject: (error: unknown) => void;
|
|
447
|
+
};
|
|
448
|
+
declare class AsyncEventQueue {
|
|
449
|
+
private readonly items;
|
|
450
|
+
private readonly waits;
|
|
451
|
+
private closed;
|
|
452
|
+
push(item: AcpRuntimeEvent): void;
|
|
453
|
+
close(): void;
|
|
454
|
+
clear(): void;
|
|
455
|
+
next(): Promise<AcpRuntimeEvent | null>;
|
|
456
|
+
iterate(): AsyncIterable<AcpRuntimeEvent>;
|
|
457
|
+
}
|
|
374
458
|
//#endregion
|
|
375
459
|
//#region src/runtime/engine/manager.d.ts
|
|
376
460
|
type AcpRuntimeManagerDeps = {
|
|
377
461
|
clientFactory?: (options: ConstructorParameters<typeof AcpClient>[0]) => AcpClient;
|
|
378
462
|
};
|
|
463
|
+
type ActiveSessionController = {
|
|
464
|
+
hasActivePrompt: () => boolean;
|
|
465
|
+
requestCancelActivePrompt: () => Promise<boolean>;
|
|
466
|
+
setSessionMode: (modeId: string, authority?: AcpControlAuthority) => Promise<void>;
|
|
467
|
+
setSessionModel: (modelId: string, authority?: AcpControlAuthority) => ReturnType<AcpClient["setSessionModel"]>;
|
|
468
|
+
setSessionConfigOption: (configId: string, value: string, authority?: AcpControlAuthority) => ReturnType<AcpClient["setSessionConfigOption"]>;
|
|
469
|
+
setResolvedSessionConfigOption: (configId: string, value: string, authority?: AcpControlAuthority) => Promise<{
|
|
470
|
+
configId: string;
|
|
471
|
+
response: Awaited<ReturnType<AcpClient["setSessionConfigOption"]>>;
|
|
472
|
+
}>;
|
|
473
|
+
};
|
|
379
474
|
type RuntimeEnsureInput = {
|
|
380
475
|
sessionKey: string;
|
|
381
476
|
agent: string;
|
|
@@ -384,6 +479,23 @@ type RuntimeEnsureInput = {
|
|
|
384
479
|
resumeSessionId?: string;
|
|
385
480
|
sessionOptions?: SessionAgentOptions;
|
|
386
481
|
};
|
|
482
|
+
type RuntimeTurnTaskState = {
|
|
483
|
+
pendingCancel: boolean;
|
|
484
|
+
turnActive: boolean;
|
|
485
|
+
activeController: ActiveSessionController | null;
|
|
486
|
+
};
|
|
487
|
+
type RuntimeTurnTask = {
|
|
488
|
+
input: AcpRuntimeTurnInput & {
|
|
489
|
+
sessionMode: "persistent" | "oneshot";
|
|
490
|
+
};
|
|
491
|
+
promptInput: PromptInput | string;
|
|
492
|
+
queue: AsyncEventQueue;
|
|
493
|
+
promptStarted: Deferred<void>;
|
|
494
|
+
sessionReady: Deferred<void>;
|
|
495
|
+
state: RuntimeTurnTaskState;
|
|
496
|
+
settleResult: (next: AcpRuntimeTurnResult) => void;
|
|
497
|
+
abortHandler: () => void;
|
|
498
|
+
};
|
|
387
499
|
declare class AcpRuntimeManager {
|
|
388
500
|
private readonly options;
|
|
389
501
|
private readonly deps;
|
|
@@ -424,6 +536,7 @@ declare class AcpRuntimeManager {
|
|
|
424
536
|
private retainPersistentSessionOwnerAfterTurn;
|
|
425
537
|
private canRetainPersistentSessionOwner;
|
|
426
538
|
private resolveMcpServers;
|
|
539
|
+
private resolveSessionPermissions;
|
|
427
540
|
private withRuntimeControlSession;
|
|
428
541
|
private refreshOwnedRecordLifecycle;
|
|
429
542
|
ensureSession(input: RuntimeEnsureInput): Promise<SessionRecord>;
|
|
@@ -438,18 +551,7 @@ declare class AcpRuntimeManager {
|
|
|
438
551
|
private createOwnedRuntimeSession;
|
|
439
552
|
private prepareInitialRuntimeRecord;
|
|
440
553
|
private retainInitializedSessionOwner;
|
|
441
|
-
startTurn(input:
|
|
442
|
-
handle: AcpRuntimeHandle;
|
|
443
|
-
text: string;
|
|
444
|
-
attachments?: AcpRuntimeTurnAttachment[];
|
|
445
|
-
mode: AcpRuntimePromptMode;
|
|
446
|
-
sessionMode: "persistent" | "oneshot";
|
|
447
|
-
requestId: string;
|
|
448
|
-
timeoutMs?: number;
|
|
449
|
-
signal?: AbortSignal;
|
|
450
|
-
onElicitation?: AcpElicitationHandler;
|
|
451
|
-
onPermissionRequest?: AcpPermissionHandler;
|
|
452
|
-
}): AcpRuntimeTurn;
|
|
554
|
+
startTurn(input: RuntimeTurnTask["input"]): AcpRuntimeTurn;
|
|
453
555
|
private closeRetainedOneShotHandle;
|
|
454
556
|
private runRuntimeTurnTask;
|
|
455
557
|
private runRuntimePrompt;
|
|
@@ -473,33 +575,22 @@ declare class AcpRuntimeManager {
|
|
|
473
575
|
private publishRuntimeTurnController;
|
|
474
576
|
private resolveRuntimeTurnReady;
|
|
475
577
|
private cancelRuntimeTurnBeforePrompt;
|
|
476
|
-
private applyPendingRuntimeTurnCancel;
|
|
477
578
|
private saveCompletedRuntimeTurn;
|
|
579
|
+
private handleRuntimeTurnFailure;
|
|
478
580
|
private failRuntimeTurn;
|
|
479
581
|
private finalizeRuntimeTurn;
|
|
480
582
|
private discardRetainedRuntimeTurnOwner;
|
|
481
583
|
private closeRuntimeTurnClient;
|
|
482
584
|
private cleanupRuntimeTurn;
|
|
483
585
|
private finalizeRuntimeTurnRecord;
|
|
484
|
-
runTurn(input:
|
|
485
|
-
handle: AcpRuntimeHandle;
|
|
486
|
-
text: string;
|
|
487
|
-
attachments?: AcpRuntimeTurnAttachment[];
|
|
488
|
-
mode: AcpRuntimePromptMode;
|
|
489
|
-
sessionMode: "persistent" | "oneshot";
|
|
490
|
-
requestId: string;
|
|
491
|
-
timeoutMs?: number;
|
|
492
|
-
signal?: AbortSignal;
|
|
493
|
-
onElicitation?: AcpElicitationHandler;
|
|
494
|
-
onPermissionRequest?: AcpPermissionHandler;
|
|
495
|
-
}): AsyncIterable<AcpRuntimeEvent>;
|
|
586
|
+
runTurn(input: RuntimeTurnTask["input"]): AsyncIterable<AcpRuntimeEvent>;
|
|
496
587
|
getStatus(handle: AcpRuntimeHandle): Promise<AcpRuntimeStatus>;
|
|
497
588
|
private readStatus;
|
|
498
|
-
setMode(handle: AcpRuntimeHandle, mode: string, sessionMode?: "persistent" | "oneshot"): Promise<void>;
|
|
589
|
+
setMode(handle: AcpRuntimeHandle, mode: string, sessionMode?: "persistent" | "oneshot", authority?: AcpControlAuthority): Promise<void>;
|
|
499
590
|
private setModeWithOwnership;
|
|
500
|
-
setModel(handle: AcpRuntimeHandle, model: string, sessionMode?: "persistent" | "oneshot"): Promise<void>;
|
|
591
|
+
setModel(handle: AcpRuntimeHandle, model: string, sessionMode?: "persistent" | "oneshot", authority?: AcpControlAuthority): Promise<void>;
|
|
501
592
|
private setModelWithOwnership;
|
|
502
|
-
setConfigOption(handle: AcpRuntimeHandle, key: string, value: string, sessionMode?: "persistent" | "oneshot"): Promise<SetSessionConfigOptionResponse>;
|
|
593
|
+
setConfigOption(handle: AcpRuntimeHandle, key: string, value: string, sessionMode?: "persistent" | "oneshot", authority?: AcpControlAuthority): Promise<SetSessionConfigOptionResponse>;
|
|
503
594
|
private setConfigOptionWithOwnership;
|
|
504
595
|
cancel(handle: AcpRuntimeHandle): Promise<void>;
|
|
505
596
|
prepareFreshSession(handle: AcpRuntimeHandle): Promise<void>;
|
|
@@ -548,6 +639,56 @@ type AcpxHandleState = {
|
|
|
548
639
|
export declare function encodeAcpxRuntimeHandleState(state: AcpxHandleState): string;
|
|
549
640
|
export declare function decodeAcpxRuntimeHandleState(runtimeSessionName: string): AcpxHandleState | null;
|
|
550
641
|
//#endregion
|
|
642
|
+
//#region src/runtime/shared.d.ts
|
|
643
|
+
type SharedAcpRuntimeOptions = {
|
|
644
|
+
cwd: string;
|
|
645
|
+
agentRegistry?: AcpAgentRegistry;
|
|
646
|
+
permissionMode: PermissionMode;
|
|
647
|
+
nonInteractivePermissions?: NonInteractivePermissionPolicy;
|
|
648
|
+
permissionPolicy?: PermissionPolicy;
|
|
649
|
+
authCredentials?: Record<string, string>;
|
|
650
|
+
authPolicy?: AuthPolicy;
|
|
651
|
+
timeoutMs?: number;
|
|
652
|
+
ttlMs?: number;
|
|
653
|
+
};
|
|
654
|
+
/** A client of the CLI's local session owner. Shutdown detaches this client. */
|
|
655
|
+
export declare class SharedAcpRuntime {
|
|
656
|
+
private readonly registry;
|
|
657
|
+
private readonly options;
|
|
658
|
+
private readonly disconnect;
|
|
659
|
+
private readonly pending;
|
|
660
|
+
constructor(options: SharedAcpRuntimeOptions);
|
|
661
|
+
private assertOpen;
|
|
662
|
+
private track;
|
|
663
|
+
private sessionOptions;
|
|
664
|
+
findSession(input: {
|
|
665
|
+
sessionKey: string;
|
|
666
|
+
agent: string;
|
|
667
|
+
cwd?: string;
|
|
668
|
+
}): Promise<AcpRuntimeHandle | undefined>;
|
|
669
|
+
ensureSession(input: AcpRuntimeEnsureInput): Promise<AcpRuntimeHandle>;
|
|
670
|
+
startTurn(input: AcpRuntimeTurnInput): AcpRuntimeTurn;
|
|
671
|
+
runTurn(input: AcpRuntimeTurnInput): AsyncGenerator<AcpRuntimeEvent, void, any>;
|
|
672
|
+
getStatus(input: {
|
|
673
|
+
handle: AcpRuntimeHandle;
|
|
674
|
+
}): Promise<AcpRuntimeStatus>;
|
|
675
|
+
watchSession(input: {
|
|
676
|
+
handle: AcpRuntimeHandle;
|
|
677
|
+
cursor?: string;
|
|
678
|
+
signal?: AbortSignal;
|
|
679
|
+
}): AsyncIterable<SessionWatchEvent>;
|
|
680
|
+
cancel(input: {
|
|
681
|
+
handle: AcpRuntimeHandle;
|
|
682
|
+
reason?: string;
|
|
683
|
+
}): Promise<void>;
|
|
684
|
+
close(input: {
|
|
685
|
+
handle: AcpRuntimeHandle;
|
|
686
|
+
reason: string;
|
|
687
|
+
}): Promise<void>;
|
|
688
|
+
shutdown(): Promise<void>;
|
|
689
|
+
}
|
|
690
|
+
export declare function createSharedAcpRuntime(options: SharedAcpRuntimeOptions): SharedAcpRuntime;
|
|
691
|
+
//#endregion
|
|
551
692
|
//#region src/runtime.d.ts
|
|
552
693
|
export declare const ACPX_BACKEND_ID = "acpx";
|
|
553
694
|
type AcpxRuntimeLike = AcpRuntime & {
|
|
@@ -603,15 +744,15 @@ export declare class AcpxRuntime implements AcpxRuntimeLike {
|
|
|
603
744
|
handle: AcpRuntimeHandle;
|
|
604
745
|
signal?: AbortSignal;
|
|
605
746
|
}): Promise<AcpRuntimeStatus>;
|
|
606
|
-
setMode(input: {
|
|
747
|
+
setMode(input: AcpControlAuthority & {
|
|
607
748
|
handle: AcpRuntimeHandle;
|
|
608
749
|
mode: string;
|
|
609
750
|
}): Promise<void>;
|
|
610
|
-
setModel(input: {
|
|
751
|
+
setModel(input: AcpControlAuthority & {
|
|
611
752
|
handle: AcpRuntimeHandle;
|
|
612
753
|
model: string;
|
|
613
754
|
}): Promise<void>;
|
|
614
|
-
setConfigOption(input: {
|
|
755
|
+
setConfigOption(input: AcpControlAuthority & {
|
|
615
756
|
handle: AcpRuntimeHandle;
|
|
616
757
|
key: string;
|
|
617
758
|
value: string;
|
|
@@ -639,5 +780,5 @@ export declare function createRuntimeStore(options: {
|
|
|
639
780
|
stateDir: string;
|
|
640
781
|
}): AcpSessionStore;
|
|
641
782
|
//#endregion
|
|
642
|
-
export { type AcpAgentInspection, type AcpAgentInspectionOptions, type AcpAgentRegistry, type AcpElicitationContext, type AcpElicitationHandler, type AcpElicitationMode, type AcpElicitationRequest, type AcpElicitationResponse, type AcpFileSessionStoreOptions, type AcpInspectableAgentRegistry, type AcpPermissionDecision, type AcpPermissionHandler, type AcpPermissionRequest, type AcpProcessExit, type AcpProcessLaunch, type AcpProcessLaunchScope, type AcpProcessLifecycle, type AcpProcessSpawnFailure, type AcpProcessStarted, type AcpRuntime, type AcpRuntimeAvailableCommand, type AcpRuntimeCapabilities, type AcpRuntimeDoctorReport, type AcpRuntimeEnsureInput, type AcpRuntimeErrorCode, type AcpRuntimeEvent, type AcpRuntimeHandle, type AcpRuntimeOptions, type AcpRuntimePlanEntry, type AcpRuntimePromptMode, type AcpRuntimeSessionMode, type AcpRuntimeSessionModels, type AcpRuntimeSessionUsage, type AcpRuntimeStatus, type AcpRuntimeTurn, type AcpRuntimeTurnAttachment, type AcpRuntimeTurnInput, type AcpRuntimeTurnResult, type AcpRuntimeTurnResultError, type AcpRuntimeUsageBreakdown, type AcpRuntimeUsageCost, type AcpSessionRecord, type AcpSessionStore, type AcpSessionUpdateTag, type AcpTextDeltaOriginMeta, DEFAULT_AGENT_NAME, type PermissionPolicy, REQUESTED_MODEL_UNSUPPORTED_ERROR_CODE, REQUESTED_MODEL_UNSUPPORTED_REASONS, RequestedModelUnsupportedError, type RequestedModelUnsupportedErrorCode, type RequestedModelUnsupportedReason, type SessionAgentOptions, type SystemPromptOption, createAgentRegistry, isRequestedModelUnsupportedError };
|
|
783
|
+
export { type AcpAgentInspection, type AcpAgentInspectionOptions, type AcpAgentRegistry, type AcpElicitationContext, type AcpElicitationHandler, type AcpElicitationMode, type AcpElicitationRequest, type AcpElicitationResponse, type AcpFileSessionStoreOptions, type AcpInspectableAgentRegistry, type AcpPermissionDecision, type AcpPermissionHandler, type AcpPermissionRequest, type AcpProcessExit, type AcpProcessLaunch, type AcpProcessLaunchScope, type AcpProcessLifecycle, type AcpProcessSpawnFailure, type AcpProcessStarted, type AcpRuntime, type AcpRuntimeAvailableCommand, type AcpRuntimeCapabilities, type AcpRuntimeDoctorReport, type AcpRuntimeEnsureInput, type AcpRuntimeErrorCode, type AcpRuntimeEvent, type AcpRuntimeHandle, type AcpRuntimeOptions, type AcpRuntimePlanEntry, type AcpRuntimePromptMode, type AcpRuntimeSessionContext, type AcpRuntimeSessionMode, type AcpRuntimeSessionModels, type AcpRuntimeSessionPermissions, type AcpRuntimeSessionUsage, type AcpRuntimeStatus, type AcpRuntimeTurn, type AcpRuntimeTurnAttachment, type AcpRuntimeTurnInput, type AcpRuntimeTurnResult, type AcpRuntimeTurnResultError, type AcpRuntimeUsageBreakdown, type AcpRuntimeUsageCost, type AcpSessionRecord, type AcpSessionStore, type AcpSessionUpdateTag, type AcpTextDeltaOriginMeta, DEFAULT_AGENT_NAME, type InspectAgentModelsOptions, type PermissionPolicy, REQUESTED_MODEL_UNSUPPORTED_ERROR_CODE, REQUESTED_MODEL_UNSUPPORTED_REASONS, RequestedModelUnsupportedError, type RequestedModelUnsupportedErrorCode, type RequestedModelUnsupportedReason, type SessionAgentOptions, type SessionWatchEvent, type SessionWatchResult, type SharedAcpRuntimeOptions, type SystemPromptOption, createAgentRegistry, isRequestedModelUnsupportedError };
|
|
643
784
|
//# sourceMappingURL=runtime.d.ts.map
|
package/dist/runtime.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"runtime.d.ts","names":[],"sources":["../src/runtime/public/contract.ts","../src/runtime/public/probe.ts","../src/runtime/engine/manager.ts","../src/runtime/public/file-session-store.ts","../src/runtime/public/errors.ts","../src/runtime/public/shared.ts","../src/runtime/public/handle-state.ts","../src/runtime.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"runtime.d.ts","names":[],"sources":["../src/session/journal.ts","../src/runtime/public/contract.ts","../src/runtime/public/probe.ts","../src/runtime/engine/turn.ts","../src/runtime/engine/manager.ts","../src/runtime/public/file-session-store.ts","../src/runtime/public/errors.ts","../src/runtime/public/shared.ts","../src/runtime/public/handle-state.ts","../src/runtime/shared.ts","../src/runtime.ts"],"mappings":";;;;;;KAYY;EAEN;EACA;EACA,QAAQ;;EAGR;EACA;IAAS;IAAiB;IAAe;IAAqB;;;KAGxD;EAAsB;;EAC5B;EAAiB;EAA0B,SAAS;;EACpD;EAAsB;;EACtB;EAAqB;EAAmB,QAAQ;;;;KCiB1C;KAEA;KAEA;KAaA;KAMA;EACV;EACA;EACA;EACA;EACA;EACA;EACA;;KAGU;EACV;EACA;EACA,MAAM;EACN;EACA;;;;;;;;;EASA,iBAAiB;;KAGP;;;;;EAKV;EACA;;;;;;KAOU,sBAAsB;EAChC,QAAQ;EACR;EACA,cAAc;EACd,MAAM;EACN;EACA;;;;;;EAMA,sBAAsB;;EAEtB,gBAAgB;;KAGN;EACV,UAAU;EACV;;KAGU;EACV;EACA;;EAEA,kBAAkB;IAAQ;IAAiB;;;;;;;;KAQjC;EACV;EACA;;;;;;;KAQU;EACV;EACA;EACA;EACA;EACA;EACA;;;;;;;;KASU;EACV;EACA;;EAEA;;;;;;KAOU;EACV;EACA;EACA;;;;;;;KAQU;EACV,aAAa;;EAEb,OAAO;;EAEP,aAAa,eAAe;;KAGlB;;EAEV;EACA;EACA;EACA;EACA;EACA,SAAS;;EAET,QAAQ;;;;;;;EAOR,oBAAoB;EACpB,UAAU;;KAGA;EACV;EACA;EACA;EACA;EACA;;;;;;KAOU;EACV;EACA;EACA;;KAGU;EAEN;EACA;EACA;EACA,MAAM;;;;;;;;;EASN;;;;;;;;;;EAUA,OAAO;;EAGP;EACA;EACA,MAAM;EACN;EACA;;EAEA,OAAO;;;;;;EAMP,YAAY;;;;;;;EAOZ,oBAAoB;;;;;EAKpB,UAAU;;EAGV;EACA;EACA,MAAM;EACN;EACA;EACA;EACA,OAAO;EACP,YAAY;EACZ;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