@qoder-ai/qoder-agent-sdk 1.0.30 → 1.0.32
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/core/deferred-transport.d.ts +3 -1
- package/dist/core/errors.d.ts +20 -0
- package/dist/core/transport.d.ts +1 -1
- package/dist/daemon/daemon-connection.d.ts +3 -0
- package/dist/daemon/daemon-session-transport.d.ts +3 -2
- package/dist/daemon/session-store-rpc.d.ts +9 -1
- package/dist/daemon/start-daemon.d.ts +1 -0
- package/dist/index.d.ts +3 -1
- package/dist/index.js +30 -30
- package/dist/query/query-runner.d.ts +6 -0
- package/dist/runtime-manifest.json +5 -5
- package/dist/session/transcript-mirror.d.ts +11 -1
- package/package.json +2 -2
|
@@ -6,6 +6,7 @@ export declare class DeferredTransport implements Transport {
|
|
|
6
6
|
private bootstrapPromise;
|
|
7
7
|
private readonly pending;
|
|
8
8
|
private closed;
|
|
9
|
+
private closePromise;
|
|
9
10
|
constructor(bootstrap: () => Promise<{
|
|
10
11
|
transport: Transport;
|
|
11
12
|
cleanup?: () => Promise<void>;
|
|
@@ -14,10 +15,11 @@ export declare class DeferredTransport implements Transport {
|
|
|
14
15
|
private cleanupPromise;
|
|
15
16
|
initialize(): Promise<void>;
|
|
16
17
|
write(data: string): void;
|
|
17
|
-
close(): void
|
|
18
|
+
close(): Promise<void>;
|
|
18
19
|
isReady(): boolean;
|
|
19
20
|
readMessages(): AsyncGenerator<StdoutMessage, void, unknown>;
|
|
20
21
|
endInput(): void;
|
|
21
22
|
private getTransport;
|
|
23
|
+
private performClose;
|
|
22
24
|
private runCleanup;
|
|
23
25
|
}
|
package/dist/core/errors.d.ts
CHANGED
|
@@ -40,4 +40,24 @@ export declare class ProtocolVersionMismatchError extends Error {
|
|
|
40
40
|
export declare class UnsupportedCliCapabilityError extends Error {
|
|
41
41
|
readonly capability: string;
|
|
42
42
|
constructor(capability: string);
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* Thrown when the runtime rejects an SDK control request.
|
|
46
|
+
*
|
|
47
|
+
* `retryable` is true only when the runtime guarantees that retrying the
|
|
48
|
+
* original control operation will not duplicate an operation already applied
|
|
49
|
+
* by the Worker.
|
|
50
|
+
*/
|
|
51
|
+
export declare class ControlRequestError extends Error {
|
|
52
|
+
readonly requestId: string;
|
|
53
|
+
readonly code: string | undefined;
|
|
54
|
+
readonly retryable: boolean;
|
|
55
|
+
readonly details: Record<string, unknown> | undefined;
|
|
56
|
+
constructor(options: {
|
|
57
|
+
requestId: string;
|
|
58
|
+
message: string;
|
|
59
|
+
code?: string;
|
|
60
|
+
retryable?: boolean;
|
|
61
|
+
details?: Record<string, unknown>;
|
|
62
|
+
});
|
|
43
63
|
}
|
package/dist/core/transport.d.ts
CHANGED
|
@@ -25,7 +25,7 @@ export interface Transport {
|
|
|
25
25
|
* After calling close(), no further writes or reads should be attempted.
|
|
26
26
|
* This should gracefully terminate the underlying process/connection.
|
|
27
27
|
*/
|
|
28
|
-
close(): void
|
|
28
|
+
close(): void | Promise<void>;
|
|
29
29
|
/**
|
|
30
30
|
* Whether the transport is ready to send and receive messages.
|
|
31
31
|
* Returns false if the transport has not been initialized, has been
|
|
@@ -2,6 +2,7 @@ import type { Readable, Writable } from "node:stream";
|
|
|
2
2
|
import { type DaemonControlRequestFrame, type DaemonEventFrame, type DaemonWireSessionMessage, type JsonObject, type JsonValue, type EnableRemoteControlParams, type EnableRemoteControlResult, type OpenSessionParams, type RenameSessionResult, type SubscribeSessionResult, type UpdateSessionMetadataResult } from "./protocol.js";
|
|
3
3
|
import { DaemonSessionTransport, type DaemonSessionTransportOptions } from "./daemon-session-transport.js";
|
|
4
4
|
export declare const SESSION_STORE_FILE_CHECKPOINTING_CAPABILITY = "session_store_file_checkpointing_v1";
|
|
5
|
+
export declare const SESSION_STORE_FORK_BARRIER_CAPABILITY = "session_store_fork_barrier_v1";
|
|
5
6
|
export interface DaemonConnectionOptions {
|
|
6
7
|
input: Writable;
|
|
7
8
|
output: Readable;
|
|
@@ -16,10 +17,12 @@ export type RemoteControlFailure = {
|
|
|
16
17
|
export declare class DaemonRpcError extends Error {
|
|
17
18
|
readonly code: string;
|
|
18
19
|
readonly retryable: boolean;
|
|
20
|
+
readonly details: JsonObject | undefined;
|
|
19
21
|
constructor(options: {
|
|
20
22
|
code: string;
|
|
21
23
|
message: string;
|
|
22
24
|
retryable: boolean;
|
|
25
|
+
details?: JsonObject;
|
|
23
26
|
});
|
|
24
27
|
}
|
|
25
28
|
export declare class DaemonRequestError extends Error {
|
|
@@ -33,6 +33,7 @@ export declare class DaemonSessionTransport implements Transport {
|
|
|
33
33
|
private closed;
|
|
34
34
|
private cleaned;
|
|
35
35
|
private releasePromise;
|
|
36
|
+
private closePromise;
|
|
36
37
|
private subscribeResult;
|
|
37
38
|
private readonly remoteSessionId;
|
|
38
39
|
constructor(connection: DaemonConnection, options: DaemonSessionTransportOptions);
|
|
@@ -41,7 +42,7 @@ export declare class DaemonSessionTransport implements Transport {
|
|
|
41
42
|
write(data: string): void;
|
|
42
43
|
readMessages(): AsyncGenerator<StdoutMessage, void, unknown>;
|
|
43
44
|
endInput(): void;
|
|
44
|
-
close(): void
|
|
45
|
+
close(): Promise<void>;
|
|
45
46
|
isReady(): boolean;
|
|
46
47
|
acceptOutput(message: DaemonWireSessionMessage): void;
|
|
47
48
|
fail(error: unknown): void;
|
|
@@ -55,6 +56,6 @@ export declare class DaemonSessionTransport implements Transport {
|
|
|
55
56
|
private updateCommandLifecycleCapability;
|
|
56
57
|
private observeCommandLifecycle;
|
|
57
58
|
private maybeCloseAfterResult;
|
|
58
|
-
private
|
|
59
|
+
private performClose;
|
|
59
60
|
private cleanup;
|
|
60
61
|
}
|
|
@@ -1,6 +1,8 @@
|
|
|
1
|
-
import type { SessionKey, SessionStore } from "../session/session-store.js";
|
|
1
|
+
import type { SessionKey, SessionStore, SessionStoreEntry } from "../session/session-store.js";
|
|
2
2
|
import { DaemonRequestError, type DaemonRequestHandler } from "./daemon-connection.js";
|
|
3
|
+
import type { JsonObject } from "./protocol.js";
|
|
3
4
|
import { type SessionExtra, type SessionMetadataUpdate } from "./session-metadata.js";
|
|
5
|
+
export declare const DEFAULT_SESSION_STORE_MAX_PAYLOAD_BYTES: number;
|
|
4
6
|
export interface DaemonSessionStore extends SessionStore {
|
|
5
7
|
listAllSessions(): Promise<readonly DaemonSessionSummary[]>;
|
|
6
8
|
/**
|
|
@@ -23,6 +25,11 @@ export interface DaemonSessionStoreRpcOptions {
|
|
|
23
25
|
maxEntriesPerPage?: number;
|
|
24
26
|
maxPayloadBytes?: number;
|
|
25
27
|
}
|
|
28
|
+
/**
|
|
29
|
+
* Returns the UTF-8 wire size of one SessionStore entry when transported as a
|
|
30
|
+
* single-item page or append batch, including the surrounding array brackets.
|
|
31
|
+
*/
|
|
32
|
+
export declare function measureSessionStoreEntryPayloadBytes(entry: SessionStoreEntry): number;
|
|
26
33
|
export type DaemonSessionStoreRequestHandler = DaemonRequestHandler & {
|
|
27
34
|
dispose(): Promise<void>;
|
|
28
35
|
};
|
|
@@ -32,6 +39,7 @@ export declare class DaemonSessionStoreRpcError extends DaemonRequestError {
|
|
|
32
39
|
message: string;
|
|
33
40
|
retryable?: boolean;
|
|
34
41
|
operation?: string;
|
|
42
|
+
details?: JsonObject;
|
|
35
43
|
});
|
|
36
44
|
}
|
|
37
45
|
export declare function createDaemonSessionStoreRequestHandler(store: DaemonSessionStore, options?: DaemonSessionStoreRpcOptions): DaemonSessionStoreRequestHandler;
|
|
@@ -90,6 +90,7 @@ interface InternalDaemonRuntime {
|
|
|
90
90
|
readonly transportProvider: QueryTransportProvider<ProcessTransportOptions>;
|
|
91
91
|
readonly sessionStore?: DaemonSessionStore;
|
|
92
92
|
readonly supportsSessionStoreFileCheckpointing: boolean;
|
|
93
|
+
readonly supportsSessionStoreForkBarrier: boolean;
|
|
93
94
|
}
|
|
94
95
|
export declare function getDaemonRuntime(daemon: Daemon): InternalDaemonRuntime | undefined;
|
|
95
96
|
export declare function startDaemon(options: StartDaemonOptions): Promise<Daemon>;
|
package/dist/index.d.ts
CHANGED
|
@@ -59,6 +59,7 @@ export { startDaemon } from './daemon/start-daemon.js';
|
|
|
59
59
|
export type { Daemon, DaemonEvent, DaemonEventCallback, DaemonState, AttachSessionOptions, DaemonSessionInfo, SessionRuntimeState, EnableRemoteControlOptions, RemoteControl, RemoteControlState, StartDaemonOptions, } from './daemon/start-daemon.js';
|
|
60
60
|
export type { RemoteSessionLaunch, RemoteSessionLaunchRequest, ResolveRemoteSessionLaunch, SessionExtra, SessionExtraValue, SessionMetadataUpdate, } from './daemon/session-metadata.js';
|
|
61
61
|
export type { DaemonSessionStore, DaemonSessionSummary, } from './daemon/session-store-rpc.js';
|
|
62
|
+
export { DEFAULT_SESSION_STORE_MAX_PAYLOAD_BYTES, measureSessionStoreEntryPayloadBytes, } from './daemon/session-store-rpc.js';
|
|
62
63
|
export { DEFAULT_RUNTIME_TRANSPORT, } from './core/default-runtime.js';
|
|
63
64
|
export { ProcessTransport, QoderCliProcessError, } from './core/process-transport.js';
|
|
64
65
|
export { hasResolvableQoderWorkerRuntime, QoderWorkerRuntimeError, WorkerTransport, resolveQoderWorkerRuntimePath, } from './core/worker-transport.js';
|
|
@@ -77,7 +78,8 @@ export { listPlugins, enablePlugin, disablePlugin, installPlugin, uninstallPlugi
|
|
|
77
78
|
export type { PluginScope, PluginToggleOptions, PluginDetails, PluginResources, InstallPluginResult, UninstallPluginResult, PluginValidationSeverity, PluginValidationPhase, PluginValidationPosition, PluginValidationLocation, PluginValidationDiagnostic, PluginValidationReport, ValidatePluginOptions, } from './types/plugins.js';
|
|
78
79
|
export { submitFeedback } from './feedback.js';
|
|
79
80
|
export type { SubmitFeedbackParams, SubmitFeedbackOptions, IntegrationMode, } from './feedback.js';
|
|
80
|
-
export { AbortError, ModelPolicyTimeoutError, ProtocolVersionMismatchError, UnsupportedCliCapabilityError, } from './core/errors.js';
|
|
81
|
+
export { AbortError, ControlRequestError, ModelPolicyTimeoutError, ProtocolVersionMismatchError, UnsupportedCliCapabilityError, } from './core/errors.js';
|
|
82
|
+
export { DaemonRpcError } from './daemon/daemon-connection.js';
|
|
81
83
|
export { AuthAccessTokenEnvVarError, AuthServiceAccountEnvVarError, } from './core/runtime-launch-options.js';
|
|
82
84
|
export { WIRE_PROTOCOL_VERSION } from './protocol/version.js';
|
|
83
85
|
export type { ModelPromptPatch, ModelPromptPatches, } from './protocol/model-prompt-patches.js';
|