@qoder-ai/qoder-agent-sdk 1.0.29 → 1.0.31
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/daemon/daemon-connection.d.ts +3 -0
- 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/protocol/common.d.ts +6 -3
- package/dist/protocol/index.d.ts +1 -1
- 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/dist/types/common.d.ts +1 -1
- package/package.json +2 -2
|
@@ -18,20 +18,23 @@ export type UrlImageSource = {
|
|
|
18
18
|
type: 'url';
|
|
19
19
|
url: string;
|
|
20
20
|
};
|
|
21
|
+
/** Claude-compatible capitalization for URL image inputs. */
|
|
22
|
+
export type URLImageSource = UrlImageSource;
|
|
21
23
|
/** Image sources accepted on input and observed in projected user messages. */
|
|
22
24
|
export type ImageSource = Base64ImageSource | UrlImageSource;
|
|
23
25
|
/**
|
|
24
26
|
* Typed image block for SDK Hosts.
|
|
25
27
|
*
|
|
26
|
-
* Hosts
|
|
27
|
-
*
|
|
28
|
-
* variants.
|
|
28
|
+
* Hosts can send local images as `base64` or remotely hosted images as `url`.
|
|
29
|
+
* Projected and restored user messages may contain either variant as well.
|
|
29
30
|
*/
|
|
30
31
|
export type ImageContentBlock = {
|
|
31
32
|
type: 'image';
|
|
32
33
|
source: ImageSource;
|
|
33
34
|
[key: string]: unknown;
|
|
34
35
|
};
|
|
36
|
+
/** Claude-compatible name for an image block accepted in user input. */
|
|
37
|
+
export type ImageBlockParam = ImageContentBlock;
|
|
35
38
|
export type ContentBlock = {
|
|
36
39
|
type: string;
|
|
37
40
|
text?: string;
|
package/dist/protocol/index.d.ts
CHANGED
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
*/
|
|
15
15
|
export { WIRE_PROTOCOL_VERSION, type WireProtocolVersion } from './version.js';
|
|
16
16
|
export type { ModelPromptPatch, ModelPromptPatches, } from './model-prompt-patches.js';
|
|
17
|
-
export type { UUID, Base64ImageSource, UrlImageSource, ImageSource, ImageContentBlock, ContentBlock, BetaMessage, BetaRawMessageStreamEvent, BetaUsage, BetaStopReason, MessageParam, NonNullableUsage, AccountInfo, UsageAddOnQuotaBucket, UsageInfo, UsageOrgResourcePackage, UsageQuotaBucket, SessionCreditsUsage, ApiKeySource, ExitReason, FastModeState, ConfigScope, SettingSource, SDKAssistantMessageError, SDKStatus, EffortLevel, ThinkingAdaptive, ThinkingEnabled, ThinkingDisabled, ThinkingConfig, ModelInfo, ModelSource, ServerModelJson, ServerModelJsonValue, ModelStrategy, ModelPromotion, LocalizedModelText, ModelContextConfig, ModelContextWindowEntry, ModelEffortEntry, ModelThinkingConfig, ModelThinkingDisabled, ModelThinkingEnabled, PluginInfo, ModelUsage, SlashCommand, ToolConfig, SdkPluginConfig, } from './common.js';
|
|
17
|
+
export type { UUID, Base64ImageSource, UrlImageSource, URLImageSource, ImageSource, ImageContentBlock, ImageBlockParam, ContentBlock, BetaMessage, BetaRawMessageStreamEvent, BetaUsage, BetaStopReason, MessageParam, NonNullableUsage, AccountInfo, UsageAddOnQuotaBucket, UsageInfo, UsageOrgResourcePackage, UsageQuotaBucket, SessionCreditsUsage, ApiKeySource, ExitReason, FastModeState, ConfigScope, SettingSource, SDKAssistantMessageError, SDKStatus, EffortLevel, ThinkingAdaptive, ThinkingEnabled, ThinkingDisabled, ThinkingConfig, ModelInfo, ModelSource, ServerModelJson, ServerModelJsonValue, ModelStrategy, ModelPromotion, LocalizedModelText, ModelContextConfig, ModelContextWindowEntry, ModelEffortEntry, ModelThinkingConfig, ModelThinkingDisabled, ModelThinkingEnabled, PluginInfo, ModelUsage, SlashCommand, ToolConfig, SdkPluginConfig, } from './common.js';
|
|
18
18
|
export type { AICodeTrackingLaunchOptions, QoderAgentLaunchOptions, QoderCliFlagSettings, } from './launch.js';
|
|
19
19
|
export { buildQoderCliFlagSettings, buildQoderCliFlagSettingsArgs, } from './launch.js';
|
|
20
20
|
export type { EffectiveMemoryConfig, MemoryConsumptionFile, MemoryConsumptionResult, MemoryGenerationFailedFile, MemoryGenerationGateInput, MemoryGenerationGateResult, MemoryGenerationResult, MemoryMode, MemoryRoot, MemoryRootAccess, SerializableMemoryConfig, SerializableMemoryConsumptionOptions, SerializableMemoryGenerationOptions, } from './memory.js';
|
|
@@ -62,6 +62,8 @@ type InitConfig = {
|
|
|
62
62
|
permissionMode?: PermissionMode;
|
|
63
63
|
/** Use the daemon subscribe result instead of issuing Query initialize. */
|
|
64
64
|
attachedInitialization?: Promise<SDKControlInitializeResponse>;
|
|
65
|
+
/** Resolve initialization only after the Fork transcript is durable. */
|
|
66
|
+
requireSessionStoreForkBarrier?: boolean;
|
|
65
67
|
};
|
|
66
68
|
export declare class QueryRunner implements InternalQuery {
|
|
67
69
|
private static readonly CUSTOM_CONTEXT_CAPABILITY;
|
|
@@ -70,6 +72,7 @@ export declare class QueryRunner implements InternalQuery {
|
|
|
70
72
|
private static readonly SIDE_QUESTION_CAPABILITY;
|
|
71
73
|
private static readonly GOAL_CAPABILITY;
|
|
72
74
|
private static readonly PLAN_MODE_CAPABILITY;
|
|
75
|
+
private static readonly SESSION_STORE_FORK_BARRIER_CAPABILITY;
|
|
73
76
|
private readonly transport;
|
|
74
77
|
private readonly inputStream;
|
|
75
78
|
private readonly pendingRequests;
|
|
@@ -117,6 +120,7 @@ export declare class QueryRunner implements InternalQuery {
|
|
|
117
120
|
private endInputFlushPromise?;
|
|
118
121
|
private skillEvolutionFlushPromise?;
|
|
119
122
|
private closePromise?;
|
|
123
|
+
private sessionStoreForkBarrierComplete;
|
|
120
124
|
constructor(transport: Transport, isSingleTurn: boolean, canUseTool?: CanUseTool, hooks?: Partial<Record<InternalHookEvent, HookCallbackMatcher[]>>, abortController?: AbortController, sdkMcpServers?: Map<string, McpServer>, initConfig?: InitConfig, onElicitation?: OnElicitation, diagnostics?: DiagnosticsSink, onAuthExpired?: () => void, controlRequestTimeoutMs?: number, sdkMcpTransports?: Map<string, SdkMcpTransport>, pendingMcpResponses?: Map<string, PendingMcpResponse>, fetchJobToken?: FetchJobToken, resolveModel?: ModelPolicyProvider, resolveModelTimeoutMs?: number, sessionStore?: SessionStore, sessionStoreFlush?: SessionStoreFlush, sdkMcpToolOverrides?: Record<string, Record<string, McpToolRuntimeOverride>>, fetchServiceAccountToken?: FetchServiceAccountToken, memoryCallbacks?: MemoryRuntimeCallbacks, skillEvolutionCallbacks?: SkillEvolutionRuntimeCallbacks);
|
|
121
125
|
private getRecord;
|
|
122
126
|
private normalizeLogPreview;
|
|
@@ -214,6 +218,8 @@ export declare class QueryRunner implements InternalQuery {
|
|
|
214
218
|
*/
|
|
215
219
|
initialize(): Promise<SDKControlInitializeResponse>;
|
|
216
220
|
private performInitialize;
|
|
221
|
+
private completeSessionStoreForkBarrier;
|
|
222
|
+
private flushTranscriptMirrorForLifecycle;
|
|
217
223
|
private invokeRegisteredHookCallback;
|
|
218
224
|
/**
|
|
219
225
|
* Get the cached initialization response.
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 1,
|
|
3
3
|
"brand": "global",
|
|
4
|
-
"sdkVersion": "1.0.
|
|
5
|
-
"qoderCliVersion": "1.1.
|
|
4
|
+
"sdkVersion": "1.0.31",
|
|
5
|
+
"qoderCliVersion": "1.1.38",
|
|
6
6
|
"defaultTransport": "worker",
|
|
7
7
|
"workerRuntime": {
|
|
8
8
|
"packaged": false,
|
|
9
9
|
"delivery": "install",
|
|
10
10
|
"source": "qodercli-worker-runtime",
|
|
11
|
-
"urlTemplate": "https://download.qoder.com/qodercli/releases/1.1.
|
|
11
|
+
"urlTemplate": "https://download.qoder.com/qodercli/releases/1.1.38/qodercli-worker-runtime-{target}.tgz",
|
|
12
12
|
"artifactNameTemplate": "qodercli-worker-runtime-{target}.tgz",
|
|
13
|
-
"sdkVersion": "1.0.
|
|
14
|
-
"qoderCliVersion": "1.1.
|
|
13
|
+
"sdkVersion": "1.0.31",
|
|
14
|
+
"qoderCliVersion": "1.1.38"
|
|
15
15
|
}
|
|
16
16
|
}
|
|
@@ -11,15 +11,25 @@ export declare function isTranscriptMirrorMessage(value: unknown): value is Tran
|
|
|
11
11
|
export declare class TranscriptMirrorBatcher {
|
|
12
12
|
private readonly options;
|
|
13
13
|
private readonly states;
|
|
14
|
+
private readonly failures;
|
|
15
|
+
private holding;
|
|
16
|
+
private receivedEntryCount;
|
|
14
17
|
constructor(options: {
|
|
15
18
|
store: SessionStore;
|
|
16
19
|
flushMode: SessionStoreFlush;
|
|
17
20
|
onMirrorError: (message: SDKMirrorErrorMessage) => void;
|
|
18
21
|
diagnostics?: DiagnosticsSink;
|
|
19
22
|
appendTimeoutMs?: number;
|
|
23
|
+
/** Keep all entries queued until a successful flush releases the barrier. */
|
|
24
|
+
holdUntilFlush?: boolean;
|
|
20
25
|
});
|
|
21
26
|
enqueue(message: TranscriptMirrorMessage): void;
|
|
22
|
-
flush(
|
|
27
|
+
flush(options?: {
|
|
28
|
+
throwOnError?: boolean;
|
|
29
|
+
}): Promise<void>;
|
|
30
|
+
/** Persist the held bootstrap and restore the caller's normal flush mode. */
|
|
31
|
+
completeBarrier(): Promise<void>;
|
|
32
|
+
discardPending(): void;
|
|
23
33
|
private drain;
|
|
24
34
|
}
|
|
25
35
|
export declare function sessionKeyFromTranscriptPath(filePath: string): SessionKey;
|
package/dist/types/common.d.ts
CHANGED
|
@@ -5,4 +5,4 @@
|
|
|
5
5
|
* shim so existing SDK consumer imports (`'./types/common.js'` paths)
|
|
6
6
|
* keep working.
|
|
7
7
|
*/
|
|
8
|
-
export type { UUID, Base64ImageSource, UrlImageSource, ImageSource, ImageContentBlock, ContentBlock, BetaMessage, BetaRawMessageStreamEvent, BetaUsage, BetaStopReason, MessageParam, NonNullableUsage, AccountInfo, UsageAddOnQuotaBucket, UsageInfo, UsageOrgResourcePackage, UsageQuotaBucket, SessionCreditsUsage, ApiKeySource, ExitReason, FastModeState, ConfigScope, SettingSource, SDKAssistantMessageError, SDKStatus, EffortLevel, ThinkingAdaptive, ThinkingEnabled, ThinkingDisabled, ThinkingConfig, ModelInfo, ModelSource, ServerModelJson, ServerModelJsonValue, ModelStrategy, ModelPromotion, LocalizedModelText, ModelContextConfig, ModelContextWindowEntry, ModelEffortEntry, ModelThinkingConfig, ModelThinkingDisabled, ModelThinkingEnabled, PluginInfo, ModelUsage, SlashCommand, ToolConfig, SdkPluginConfig, } from '../protocol/index.js';
|
|
8
|
+
export type { UUID, Base64ImageSource, UrlImageSource, URLImageSource, ImageSource, ImageContentBlock, ImageBlockParam, ContentBlock, BetaMessage, BetaRawMessageStreamEvent, BetaUsage, BetaStopReason, MessageParam, NonNullableUsage, AccountInfo, UsageAddOnQuotaBucket, UsageInfo, UsageOrgResourcePackage, UsageQuotaBucket, SessionCreditsUsage, ApiKeySource, ExitReason, FastModeState, ConfigScope, SettingSource, SDKAssistantMessageError, SDKStatus, EffortLevel, ThinkingAdaptive, ThinkingEnabled, ThinkingDisabled, ThinkingConfig, ModelInfo, ModelSource, ServerModelJson, ServerModelJsonValue, ModelStrategy, ModelPromotion, LocalizedModelText, ModelContextConfig, ModelContextWindowEntry, ModelEffortEntry, ModelThinkingConfig, ModelThinkingDisabled, ModelThinkingEnabled, PluginInfo, ModelUsage, SlashCommand, ToolConfig, SdkPluginConfig, } from '../protocol/index.js';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@qoder-ai/qoder-agent-sdk",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.31",
|
|
4
4
|
"description": "TypeScript SDK for building Qoder-powered coding agents.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
"peerDependencies": {
|
|
51
51
|
"zod": "^3.25.0 || ^4.0.0"
|
|
52
52
|
},
|
|
53
|
-
"qoderCliVersion": "1.1.
|
|
53
|
+
"qoderCliVersion": "1.1.38",
|
|
54
54
|
"qoderSdkBrand": "global",
|
|
55
55
|
"license": "SEE LICENSE IN LICENSE"
|
|
56
56
|
}
|