acpx 0.13.2 → 0.14.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/README.md +1 -0
- package/dist/{cli-DJT3MRRI.js → cli-DSwJ-0g-.js} +4 -4
- package/dist/{cli-DJT3MRRI.js.map → cli-DSwJ-0g-.js.map} +1 -1
- package/dist/cli.d.ts +4 -5
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +9 -7
- package/dist/cli.js.map +1 -1
- package/dist/{client-CxNllqui.d.ts → client-IfFkZz0S.d.ts} +3 -2
- package/dist/{client-CxNllqui.d.ts.map → client-IfFkZz0S.d.ts.map} +1 -1
- package/dist/{flags-CM2rAdBo.js → flags-ftdtbXWd.js} +21 -4
- package/dist/flags-ftdtbXWd.js.map +1 -0
- package/dist/{flows-BiRKgCnW.js → flows-DEook1GU.js} +390 -58
- package/dist/flows-DEook1GU.js.map +1 -0
- package/dist/flows.d.ts +24 -16
- package/dist/flows.d.ts.map +1 -1
- package/dist/flows.js +1 -1
- package/dist/{live-checkpoint-Gw2oGjhe.js → live-checkpoint-BW9JivEG.js} +53 -40
- package/dist/live-checkpoint-BW9JivEG.js.map +1 -0
- package/dist/{output-DiPPprGk.js → output-jb0298L8.js} +3 -2
- package/dist/output-jb0298L8.js.map +1 -0
- package/dist/runtime.d.ts +14 -14
- package/dist/runtime.d.ts.map +1 -1
- package/dist/runtime.js +2 -2
- package/dist/runtime.js.map +1 -1
- package/package.json +10 -10
- package/skills/acpx/SKILL.md +3 -0
- package/dist/flags-CM2rAdBo.js.map +0 -1
- package/dist/flows-BiRKgCnW.js.map +0 -1
- package/dist/live-checkpoint-Gw2oGjhe.js.map +0 -1
- package/dist/output-DiPPprGk.js.map +0 -1
package/dist/runtime.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { _ as SessionRecord, a as AcpElicitationHandler, c as AcpElicitationResponse, f as McpServer$1, h as PermissionPolicy, i as AcpElicitationContext, l as AcpPermissionDecision, m as PermissionMode, n as SystemPromptOption, o as AcpElicitationMode, p as NonInteractivePermissionPolicy, s as AcpElicitationRequest, t as SessionAgentOptions, u as AcpPermissionRequest } from "./session-options-DwRDODlr.js";
|
|
2
|
-
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 { 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-IfFkZz0S.js";
|
|
3
3
|
import fs from "node:fs";
|
|
4
4
|
import { SetSessionConfigOptionResponse, ToolCallContent, ToolCallLocation, ToolKind } from "@agentclientprotocol/sdk";
|
|
5
5
|
//#region src/agent-registry.d.ts
|
|
6
|
-
declare const DEFAULT_AGENT_NAME = "codex";
|
|
6
|
+
export declare const DEFAULT_AGENT_NAME = "codex";
|
|
7
7
|
//#endregion
|
|
8
8
|
//#region src/runtime/public/contract.d.ts
|
|
9
9
|
type AcpRuntimePromptMode = "prompt" | "steer";
|
|
@@ -236,7 +236,7 @@ type AcpRuntimeTurnResult = {
|
|
|
236
236
|
};
|
|
237
237
|
interface AcpRuntimeTurn {
|
|
238
238
|
readonly requestId: string;
|
|
239
|
-
/** Resolves after
|
|
239
|
+
/** Resolves after the underlying writable transport accepts the prompt request. */
|
|
240
240
|
readonly promptStarted: Promise<void>;
|
|
241
241
|
readonly events: AsyncIterable<AcpRuntimeEvent>;
|
|
242
242
|
/**
|
|
@@ -442,19 +442,19 @@ declare class AcpRuntimeManager {
|
|
|
442
442
|
}
|
|
443
443
|
//#endregion
|
|
444
444
|
//#region src/runtime/public/file-session-store.d.ts
|
|
445
|
-
declare function createFileSessionStore(options: AcpFileSessionStoreOptions): AcpSessionStore;
|
|
445
|
+
export declare function createFileSessionStore(options: AcpFileSessionStoreOptions): AcpSessionStore;
|
|
446
446
|
//#endregion
|
|
447
447
|
//#region src/runtime/public/errors.d.ts
|
|
448
448
|
declare const ACP_ERROR_CODES: readonly ["ACP_BACKEND_MISSING", "ACP_BACKEND_UNAVAILABLE", "ACP_BACKEND_UNSUPPORTED_CONTROL", "ACP_DISPATCH_DISABLED", "ACP_INVALID_RUNTIME_OPTION", "ACP_SESSION_INIT_FAILED", "ACP_TURN_FAILED"];
|
|
449
449
|
type AcpRuntimeErrorCode = (typeof ACP_ERROR_CODES)[number];
|
|
450
|
-
declare class AcpRuntimeError extends Error {
|
|
450
|
+
export declare class AcpRuntimeError extends Error {
|
|
451
451
|
readonly code: AcpRuntimeErrorCode;
|
|
452
452
|
readonly cause?: unknown;
|
|
453
453
|
constructor(code: AcpRuntimeErrorCode, message: string, options?: {
|
|
454
454
|
cause?: unknown;
|
|
455
455
|
});
|
|
456
456
|
}
|
|
457
|
-
declare function isAcpRuntimeError(value: unknown): value is AcpRuntimeError;
|
|
457
|
+
export declare function isAcpRuntimeError(value: unknown): value is AcpRuntimeError;
|
|
458
458
|
//#endregion
|
|
459
459
|
//#region src/runtime/public/shared.d.ts
|
|
460
460
|
type AcpxHandleState = {
|
|
@@ -468,20 +468,20 @@ type AcpxHandleState = {
|
|
|
468
468
|
};
|
|
469
469
|
//#endregion
|
|
470
470
|
//#region src/runtime/public/handle-state.d.ts
|
|
471
|
-
declare function encodeAcpxRuntimeHandleState(state: AcpxHandleState): string;
|
|
472
|
-
declare function decodeAcpxRuntimeHandleState(runtimeSessionName: string): AcpxHandleState | null;
|
|
471
|
+
export declare function encodeAcpxRuntimeHandleState(state: AcpxHandleState): string;
|
|
472
|
+
export declare function decodeAcpxRuntimeHandleState(runtimeSessionName: string): AcpxHandleState | null;
|
|
473
473
|
//#endregion
|
|
474
474
|
//#region src/runtime.d.ts
|
|
475
|
-
declare const ACPX_BACKEND_ID = "acpx";
|
|
475
|
+
export declare const ACPX_BACKEND_ID = "acpx";
|
|
476
476
|
type AcpxRuntimeLike = AcpRuntime & {
|
|
477
477
|
probeAvailability(): Promise<void>;
|
|
478
478
|
isHealthy(): boolean;
|
|
479
479
|
doctor(): Promise<AcpRuntimeDoctorReport>;
|
|
480
480
|
};
|
|
481
|
-
declare function createAgentRegistry(params?: {
|
|
481
|
+
export declare function createAgentRegistry(params?: {
|
|
482
482
|
overrides?: Record<string, string | string[]>;
|
|
483
483
|
}): AcpAgentRegistry;
|
|
484
|
-
declare class AcpxRuntime implements AcpxRuntimeLike {
|
|
484
|
+
export declare class AcpxRuntime implements AcpxRuntimeLike {
|
|
485
485
|
private readonly options;
|
|
486
486
|
private readonly testOptions?;
|
|
487
487
|
private healthy;
|
|
@@ -544,10 +544,10 @@ declare class AcpxRuntime implements AcpxRuntimeLike {
|
|
|
544
544
|
private resolveManagerHandle;
|
|
545
545
|
private resolveHandleState;
|
|
546
546
|
}
|
|
547
|
-
declare function createAcpRuntime(options: AcpRuntimeOptions): AcpxRuntime;
|
|
548
|
-
declare function createRuntimeStore(options: {
|
|
547
|
+
export declare function createAcpRuntime(options: AcpRuntimeOptions): AcpxRuntime;
|
|
548
|
+
export declare function createRuntimeStore(options: {
|
|
549
549
|
stateDir: string;
|
|
550
550
|
}): AcpSessionStore;
|
|
551
551
|
//#endregion
|
|
552
|
-
export {
|
|
552
|
+
export { type AcpAgentRegistry, type AcpElicitationContext, type AcpElicitationHandler, type AcpElicitationMode, type AcpElicitationRequest, type AcpElicitationResponse, type AcpFileSessionStoreOptions, type AcpPermissionDecision, type AcpPermissionRequest, type AcpRuntime, type AcpRuntimeAvailableCommand, type AcpRuntimeCapabilities, type AcpRuntimeDoctorReport, type AcpRuntimeEnsureInput, type AcpRuntimeErrorCode, type AcpRuntimeEvent, type AcpRuntimeHandle, type AcpRuntimeOptions, 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, type PermissionPolicy, REQUESTED_MODEL_UNSUPPORTED_ERROR_CODE, REQUESTED_MODEL_UNSUPPORTED_REASONS, RequestedModelUnsupportedError, type RequestedModelUnsupportedErrorCode, type RequestedModelUnsupportedReason, type SessionAgentOptions, type SystemPromptOption, isRequestedModelUnsupportedError };
|
|
553
553
|
//# sourceMappingURL=runtime.d.ts.map
|
package/dist/runtime.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"runtime.d.ts","names":[],"sources":["../src/agent-registry.ts","../src/runtime/public/contract.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/agent-registry.ts","../src/runtime/public/contract.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":";;;;;qBAkHa;;;KClFD;KAEA;KAEA;KAaA;KAEA;EACV;EACA;EACA;EACA;EACA;EACA;EACA;;KAGU;EACV;EACA;EACA,MAAM;EACN;EACA;;;;;;;;;EASA,iBAAiB;;KAGP;;;;;EAKV;EACA;;KAGU;EACV,QAAQ;EACR;EACA,cAAc;EACd,MAAM;EACN;EACA;EACA,SAAS;;EAET,gBAAgB;;KAGN;EACV,UAAU;EACV;;KAGU;EACV;EACA;;;;;;;KA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pClient, E as reconcileAgentSessionId, Ft as resolveCanonicalAgentName, M as modelStateFromConfigOptions, Mt as normalizeAgentName, N as normalizeAgentCommandInput, Nt as resolveAgentArgv, O as REQUESTED_MODEL_UNSUPPORTED_ERROR_CODE, Pt as resolveAgentCommand, Q as assertPersistedKeyPolicy, S as persistSessionOptions, T as applyLifecycleSnapshotToRecord, Tt as textPrompt, Vt as isAcpResourceNotFoundError, Z as createAtomicWriteTempPath, _ as recordPromptSubmission, a as applyConfigOptionSelection, b as advertisedModelState, c as applyRequestedModelIfAdvertised, ct as serializeSessionRecordForDisk, d as setDesiredModeId, dt as defaultSessionEventLog, f as syncAdvertisedModelState, g as recordClientOperation, h as createSessionConversation, i as connectAndLoadSession, j as isRequestedModelUnsupportedError, jt as listBuiltInAgents, k as REQUESTED_MODEL_UNSUPPORTED_REASONS, kt as withTimeout, l as currentModelIdFromSetModelResponse, m as cloneSessionConversation, n as runPromptTurn, o as applyConfigOptionsToRecord, p as cloneSessionAcpxState, r as withConnectedSession, s as applyModelSelection, st as parseSessionRecord, t as LiveSessionCheckpoint, u as setCurrentModelId, v as recordSessionUpdate, w as applyConversation, y as trimConversationForRuntime, zt as normalizeOutputError } from "./live-checkpoint-
|
|
1
|
+
import { A as RequestedModelUnsupportedError, At as DEFAULT_AGENT_NAME, Bt as extractAcpError, C as sessionOptionsFromRecord, D as AcpClient, E as reconcileAgentSessionId, Ft as resolveCanonicalAgentName, M as modelStateFromConfigOptions, Mt as normalizeAgentName, N as normalizeAgentCommandInput, Nt as resolveAgentArgv, O as REQUESTED_MODEL_UNSUPPORTED_ERROR_CODE, Pt as resolveAgentCommand, Q as assertPersistedKeyPolicy, S as persistSessionOptions, T as applyLifecycleSnapshotToRecord, Tt as textPrompt, Vt as isAcpResourceNotFoundError, Z as createAtomicWriteTempPath, _ as recordPromptSubmission, a as applyConfigOptionSelection, b as advertisedModelState, c as applyRequestedModelIfAdvertised, ct as serializeSessionRecordForDisk, d as setDesiredModeId, dt as defaultSessionEventLog, f as syncAdvertisedModelState, g as recordClientOperation, h as createSessionConversation, i as connectAndLoadSession, j as isRequestedModelUnsupportedError, jt as listBuiltInAgents, k as REQUESTED_MODEL_UNSUPPORTED_REASONS, kt as withTimeout, l as currentModelIdFromSetModelResponse, m as cloneSessionConversation, n as runPromptTurn, o as applyConfigOptionsToRecord, p as cloneSessionAcpxState, r as withConnectedSession, s as applyModelSelection, st as parseSessionRecord, t as LiveSessionCheckpoint, u as setCurrentModelId, v as recordSessionUpdate, w as applyConversation, y as trimConversationForRuntime, zt as normalizeOutputError } from "./live-checkpoint-BW9JivEG.js";
|
|
2
2
|
import path from "node:path";
|
|
3
3
|
import fs from "node:fs/promises";
|
|
4
4
|
import { randomUUID } from "node:crypto";
|
|
@@ -1264,7 +1264,7 @@ var AcpRuntimeManager = class {
|
|
|
1264
1264
|
timeoutMs: task.input.timeoutMs ?? this.options.timeoutMs,
|
|
1265
1265
|
conversation: turn.conversation,
|
|
1266
1266
|
promptMessageId: turn.promptMessageId,
|
|
1267
|
-
|
|
1267
|
+
onPromptRequestWritten: () => task.promptStarted.resolve(),
|
|
1268
1268
|
onElicitation: task.input.onElicitation
|
|
1269
1269
|
});
|
|
1270
1270
|
} finally {
|