@qoder-ai/qoder-agent-sdk 1.0.41 → 1.0.43
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/runtime-launch-options.d.ts +11 -4
- package/dist/core/usage-normalize.d.ts +16 -0
- package/dist/core/worker-transport.d.ts +3 -1
- package/dist/daemon/daemon-connection.d.ts +23 -2
- package/dist/daemon/protocol.d.ts +118 -2
- package/dist/daemon/start-daemon.d.ts +42 -0
- package/dist/feedback.d.ts +14 -0
- package/dist/index.d.ts +4 -1
- package/dist/index.js +33 -31
- package/dist/protocol/common.d.ts +2 -0
- package/dist/protocol/control.d.ts +1 -0
- package/dist/protocol/feedback.d.ts +11 -0
- package/dist/protocol/index.d.ts +2 -1
- package/dist/protocol/index.js +1 -1
- package/dist/protocol/messages.d.ts +8 -0
- package/dist/query/query-runner.d.ts +11 -1
- package/dist/runtime-manifest.json +5 -5
- package/dist/types/host-action.d.ts +11 -0
- package/dist/types/index.d.ts +1 -0
- package/dist/types/messages.d.ts +3 -1
- package/dist/types/options.d.ts +5 -0
- package/package.json +2 -2
|
@@ -302,6 +302,8 @@ export type ModelInfo = {
|
|
|
302
302
|
modelId?: string;
|
|
303
303
|
displayName: string;
|
|
304
304
|
description: string;
|
|
305
|
+
/** English model description supplied by the catalog, when available. */
|
|
306
|
+
descriptionEn?: string;
|
|
305
307
|
/** `'system'` (Qoder catalog), `'user'` (BYOK), `'organization'`, or `'custom'` (Custom Provider). */
|
|
306
308
|
source?: ModelSource;
|
|
307
309
|
/** Server-designated default for the current scene. */
|
|
@@ -122,6 +122,7 @@ export type SDKControlInitializeRequest = {
|
|
|
122
122
|
sdkMcpServers?: string[];
|
|
123
123
|
sdkMcpToolOverrides?: Record<string, Record<string, McpToolRuntimeOverride>>;
|
|
124
124
|
promptSuggestions?: boolean;
|
|
125
|
+
hostActions?: Record<string, never>;
|
|
125
126
|
goalMaxTurns?: number;
|
|
126
127
|
supportsCatalogReadyInitialize?: boolean;
|
|
127
128
|
/** Opts this Host into authoritative model snapshots on the Query stream. */
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/** Stable Host UI actions reported to the CLI. */
|
|
2
|
+
export declare const HOST_ACTIONS: readonly ["copy_text", "helpful", "not_helpful", "create_branch_task", "copy_markdown", "add_reply_to_task"];
|
|
3
|
+
export type HostAction = (typeof HOST_ACTIONS)[number];
|
|
4
|
+
export type HostActionEvent = {
|
|
5
|
+
type: 'feedback';
|
|
6
|
+
subtype: 'action';
|
|
7
|
+
uuid: string;
|
|
8
|
+
action: HostAction;
|
|
9
|
+
session_id: string;
|
|
10
|
+
parent_result_uuid: string;
|
|
11
|
+
};
|
package/dist/protocol/index.d.ts
CHANGED
|
@@ -14,6 +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 { HOST_ACTIONS, type HostAction, type HostActionEvent, } from './feedback.js';
|
|
17
18
|
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
19
|
export type { AICodeTrackingLaunchOptions, QoderAgentLaunchOptions, QoderCliFlagSettings, } from './launch.js';
|
|
19
20
|
export { buildQoderCliFlagSettings, buildQoderCliFlagSettingsArgs, } from './launch.js';
|
|
@@ -21,7 +22,7 @@ export type { EffectiveMemoryConfig, MemoryConsumptionFile, MemoryConsumptionRes
|
|
|
21
22
|
export type { EffectiveEvolutionConfig, EffectiveSkillEvolutionConfig, SerializableEvolutionConfig, SerializableSkillEvolutionConfig, SerializableSkillEvolutionGenerationOptions, SkillEvolutionGateInput, SkillEvolutionGateResult, SkillEvolutionMode, SkillEvolutionResult, SkillEvolutionSuggestion, } from './skill-evolution.js';
|
|
22
23
|
export type { PermissionMode, PermissionBehavior, PermissionScope, CanUseToolPermissionKind, CanUseToolPermissionOption, CanUseToolPermissionDetails, PermissionDecisionClassification, PermissionUpdateDestination, PermissionRuleValue, PermissionUpdate, PermissionResult, } from './permissions.js';
|
|
23
24
|
export type { McpStdioServerConfig, McpSSEServerConfig, McpHttpServerConfig, McpSdkServerConfig, McpServerConfigForProcessTransport, McpServerStatus, McpServerStatusConfig, McpSetServersResult, OAuthToken, } from './mcp.js';
|
|
24
|
-
export type { SDKAssistantMessage, SDKToolNonExecutionKind, SDKToolResultMeta, SDKMessageOrigin, SDKUserMessage, SDKUserMessageReplay, SDKResultSuccess, SDKResultError, SDKResultMessage, SDKFileAttachment, SDKSystemMessage, SDKArtifactInfo, SDKArtifactUpdateMessage, SDKAvailableModelsUpdateMessage, SDKCommandsChangedMessage, SDKPartialAssistantMessage, SDKCompactBoundaryMessage, SDKStatusMessage, SDKAPIRetryMessage, SDKModelQueueStatusMessage, SDKControlRequestProgressMessage, SDKCommandLifecycleMessage, SDKHookStartedMessage, SDKHookProgressMessage, SDKHookResponseMessage, SDKTaskNotificationMessage, SDKTaskStartedMessage, SDKTaskProgressMessage, SDKTaskUpdatedMessage, SDKBackgroundTasksChangedMessage, SDKSessionStateChangedMessage, SDKPlanModeChangedMessage, SDKGoalUpdatedMessage, SDKGoalClearedMessage, SDKSessionTitleChangedMessage, SDKFilesPersistedEvent, SDKElicitationCompleteMessage, SDKPromptSuggestionMessage, SDKCloudAgentEventMessage, SDKMemoryGenerationMessage, SDKMemoryConsumptionMessage, SDKSkillEvolutionMessage, SDKPermissionDenial, SDKPermissionDeniedMessage, SDKPermissionDeniedReasonType, SDKMessage, } from './messages.js';
|
|
25
|
+
export type { SDKAssistantMessage, SDKToolNonExecutionKind, SDKToolResultMeta, SDKMessageOrigin, SDKSelectedSkill, SDKUserMessage, SDKUserMessageReplay, SDKResultSuccess, SDKResultError, SDKResultMessage, SDKFileAttachment, SDKSystemMessage, SDKArtifactInfo, SDKArtifactUpdateMessage, SDKAvailableModelsUpdateMessage, SDKCommandsChangedMessage, SDKPartialAssistantMessage, SDKCompactBoundaryMessage, SDKStatusMessage, SDKAPIRetryMessage, SDKModelQueueStatusMessage, SDKControlRequestProgressMessage, SDKCommandLifecycleMessage, SDKHookStartedMessage, SDKHookProgressMessage, SDKHookResponseMessage, SDKTaskNotificationMessage, SDKTaskStartedMessage, SDKTaskProgressMessage, SDKTaskUpdatedMessage, SDKBackgroundTasksChangedMessage, SDKSessionStateChangedMessage, SDKPlanModeChangedMessage, SDKGoalUpdatedMessage, SDKGoalClearedMessage, SDKSessionTitleChangedMessage, SDKFilesPersistedEvent, SDKElicitationCompleteMessage, SDKPromptSuggestionMessage, SDKCloudAgentEventMessage, SDKMemoryGenerationMessage, SDKMemoryConsumptionMessage, SDKSkillEvolutionMessage, SDKPermissionDenial, SDKPermissionDeniedMessage, SDKPermissionDeniedReasonType, SDKMessage, } from './messages.js';
|
|
25
26
|
export type { BaseHookInput, PreToolUseHookInput, PostToolUseHookInput, PostToolUseFailureHookInput, UserPromptSubmitHookInput, SessionStartHookInput, SessionEndHookInput, StopHookInput, StopFailureHookInput, SubagentStartHookInput, SubagentStopHookInput, PreCompactHookInput, PostCompactHookInput, PermissionRequestHookInput, PermissionDeniedHookInput, SetupHookInput, TeammateIdleHookInput, TaskCreatedHookInput, TaskCompletedHookInput, ElicitationHookInput, ElicitationResultHookInput, ConfigChangeHookInput, WorktreeCreateHookInput, WorktreeRemoveHookInput, InstructionsLoadedHookInput, CwdChangedHookInput, FileChangedHookInput, HookInput, PreToolUseHookSpecificOutput, PostToolUseHookSpecificOutput, PostToolUseFailureHookSpecificOutput, UserPromptSubmitHookSpecificOutput, SessionStartHookSpecificOutput, SetupHookSpecificOutput, SubagentStartHookSpecificOutput, PermissionRequestHookSpecificOutput, ElicitationHookSpecificOutput, ElicitationResultHookSpecificOutput, CwdChangedHookSpecificOutput, FileChangedHookSpecificOutput, WorktreeCreateHookSpecificOutput, SyncHookJSONOutput, AsyncHookJSONOutput, HookJSONOutput, HookEvent, } from './hooks.js';
|
|
26
27
|
export type { AgentMcpServerSpec, AgentDefinition, AgentInfo, AgentMemoryScope, } from './agents.js';
|
|
27
28
|
export { QoderModelPurpose } from './control.js';
|
package/dist/protocol/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
var a="1.4.0";var r=["l1StaticCheck","l2LightweightScan","l3DeepScan"];function i(e){if(e===null||typeof e!="object"||Array.isArray(e))throw new TypeError("securityScan must be an object.");let o=new Set(r),n=Object.keys(e).filter(t=>!o.has(t));if(n.length>0)throw new TypeError(`securityScan contains unknown option${n.length===1?"":"s"}: ${n.join(", ")}.`);for(let t of r){let s=e[t];if(s!==void 0&&typeof s!="boolean")throw new TypeError(`securityScan.${t} must be a boolean.`)}return{l1StaticCheck:e.l1StaticCheck??!1,l2LightweightScan:e.l2LightweightScan??!1,l3DeepScan:e.l3DeepScan??!1}}function
|
|
1
|
+
var a="1.4.0";var p=["copy_text","helpful","not_helpful","create_branch_task","copy_markdown","add_reply_to_task"];var r=["l1StaticCheck","l2LightweightScan","l3DeepScan"];function i(e){if(e===null||typeof e!="object"||Array.isArray(e))throw new TypeError("securityScan must be an object.");let o=new Set(r),n=Object.keys(e).filter(t=>!o.has(t));if(n.length>0)throw new TypeError(`securityScan contains unknown option${n.length===1?"":"s"}: ${n.join(", ")}.`);for(let t of r){let s=e[t];if(s!==void 0&&typeof s!="boolean")throw new TypeError(`securityScan.${t} must be a boolean.`)}return{l1StaticCheck:e.l1StaticCheck??!1,l2LightweightScan:e.l2LightweightScan??!1,l3DeepScan:e.l3DeepScan??!1}}function u(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function l(e={}){let o={...e.settings??{}},n=e.aiCodeTracking?.installGitCommitHook;if(n!==void 0){let t=o.aiCodeTracking;o.aiCodeTracking={...u(t)?t:{},installGitCommitHook:n}}return e.securityScan!==void 0&&(o.securityScan=i(e.securityScan)),o}function g(e={}){let o=l(e);return Object.keys(o).length===0?[]:["--settings",JSON.stringify(o)]}var S={Main:"main",Plan:"plan",Task:"task",Compact:"compact",Title:"title",Suggestion:"suggestion",Generate:"generate",HookPrompt:"hook_prompt",Subagent:"subagent",WebFetch:"web_fetch",ImageGen:"image_gen",Compression:"compression",Utility:"utility"};export{p as HOST_ACTIONS,S as QoderModelPurpose,a as WIRE_PROTOCOL_VERSION,l as buildQoderCliFlagSettings,g as buildQoderCliFlagSettingsArgs};
|
|
@@ -63,6 +63,11 @@ export type SDKMessageOrigin = {
|
|
|
63
63
|
kind: 'bridge';
|
|
64
64
|
sessionId?: string;
|
|
65
65
|
};
|
|
66
|
+
/** A skill explicitly selected by the user for this input turn. */
|
|
67
|
+
export type SDKSelectedSkill = {
|
|
68
|
+
name: string;
|
|
69
|
+
arguments?: string;
|
|
70
|
+
};
|
|
66
71
|
export type SDKUserMessage = {
|
|
67
72
|
type: 'user';
|
|
68
73
|
message: MessageParam;
|
|
@@ -70,6 +75,8 @@ export type SDKUserMessage = {
|
|
|
70
75
|
custom_context?: Record<string, string>;
|
|
71
76
|
/** The client has resolved slash commands, so a leading slash is literal input. */
|
|
72
77
|
client_composed?: boolean;
|
|
78
|
+
/** Skills the CLI must activate as direct user intent before processing this input. */
|
|
79
|
+
selected_skills?: SDKSelectedSkill[];
|
|
73
80
|
file_attachments?: SDKFileAttachment[];
|
|
74
81
|
isSynthetic?: boolean;
|
|
75
82
|
origin?: SDKMessageOrigin;
|
|
@@ -94,6 +101,7 @@ export type SDKUserMessageReplay = {
|
|
|
94
101
|
type: 'user';
|
|
95
102
|
message: MessageParam;
|
|
96
103
|
parent_tool_use_id: string | null;
|
|
104
|
+
selected_skills?: SDKSelectedSkill[];
|
|
97
105
|
file_attachments?: SDKFileAttachment[];
|
|
98
106
|
isSynthetic?: boolean;
|
|
99
107
|
origin?: SDKMessageOrigin;
|
|
@@ -20,6 +20,8 @@
|
|
|
20
20
|
*
|
|
21
21
|
* 3. Implements all Query interface methods for the consumer.
|
|
22
22
|
*/
|
|
23
|
+
import { type HostActionParams } from '../types/host-action.js';
|
|
24
|
+
import type { HostActionEvent } from '../protocol/feedback.js';
|
|
23
25
|
import { type DiagnosticsSink } from '../core/sdk-diagnostics.js';
|
|
24
26
|
import type { ModelPromptPatches } from '../protocol/model-prompt-patches.js';
|
|
25
27
|
import type { Transport } from '../core/transport.js';
|
|
@@ -53,6 +55,7 @@ type InitConfig = {
|
|
|
53
55
|
skills?: string[];
|
|
54
56
|
planMode?: boolean;
|
|
55
57
|
promptSuggestions?: boolean;
|
|
58
|
+
hostActions?: Record<string, never>;
|
|
56
59
|
goalMaxTurns?: number;
|
|
57
60
|
enableFileCheckpointing?: boolean;
|
|
58
61
|
memory?: SerializableMemoryConfig;
|
|
@@ -73,7 +76,9 @@ type InitConfig = {
|
|
|
73
76
|
requireSessionStoreForkBarrier?: boolean;
|
|
74
77
|
};
|
|
75
78
|
export declare class QueryRunner implements InternalQuery {
|
|
79
|
+
private readonly hostActionDirect;
|
|
76
80
|
private static readonly CUSTOM_CONTEXT_CAPABILITY;
|
|
81
|
+
private static readonly SELECTED_SKILLS_CAPABILITY;
|
|
77
82
|
private static readonly INITIALIZE_TIMEOUT_MS;
|
|
78
83
|
private static readonly BACKGROUND_TASKS_CAPABILITY;
|
|
79
84
|
private static readonly SIDE_QUESTION_CAPABILITY;
|
|
@@ -81,6 +86,7 @@ export declare class QueryRunner implements InternalQuery {
|
|
|
81
86
|
private static readonly GOAL_MAX_TURNS_CAPABILITY;
|
|
82
87
|
private static readonly PLAN_MODE_CAPABILITY;
|
|
83
88
|
private static readonly SESSION_STORE_FORK_BARRIER_CAPABILITY;
|
|
89
|
+
private static readonly HOST_ACTION_CAPABILITY;
|
|
84
90
|
private static readonly BYOK_CONFIG_MANAGEMENT_CAPABILITY;
|
|
85
91
|
private static readonly REMOTE_PROJECTION_REQUEST_ID_PREFIX;
|
|
86
92
|
private readonly transport;
|
|
@@ -109,6 +115,7 @@ export declare class QueryRunner implements InternalQuery {
|
|
|
109
115
|
private readonly transcriptMirrorBatcher?;
|
|
110
116
|
private readonly memoryCallbacks?;
|
|
111
117
|
private readonly skillEvolutionCallbacks?;
|
|
118
|
+
private readonly hostActionFallback?;
|
|
112
119
|
private readonly resolveSessionArtifacts?;
|
|
113
120
|
private resolveStreamInitialization;
|
|
114
121
|
private initResponse?;
|
|
@@ -134,7 +141,8 @@ export declare class QueryRunner implements InternalQuery {
|
|
|
134
141
|
private skillEvolutionFlushPromise?;
|
|
135
142
|
private closePromise?;
|
|
136
143
|
private sessionStoreForkBarrierComplete;
|
|
137
|
-
|
|
144
|
+
private inputEnded;
|
|
145
|
+
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, resolveSessionArtifacts?: ResolveSessionArtifacts, hostActionFallback?: (event: HostActionEvent) => Promise<void>, hostActionDirect?: boolean);
|
|
138
146
|
private getRecord;
|
|
139
147
|
private normalizeLogPreview;
|
|
140
148
|
private extractMessagePreview;
|
|
@@ -162,6 +170,7 @@ export declare class QueryRunner implements InternalQuery {
|
|
|
162
170
|
private dispatchSkillEvolutionCallbacks;
|
|
163
171
|
private flushBeforeEndInput;
|
|
164
172
|
private performFlushBeforeEndInput;
|
|
173
|
+
private endTransportInput;
|
|
165
174
|
/**
|
|
166
175
|
* Send a control request to the CLI and wait for the response.
|
|
167
176
|
*
|
|
@@ -257,6 +266,7 @@ export declare class QueryRunner implements InternalQuery {
|
|
|
257
266
|
* Interrupt the current operation.
|
|
258
267
|
*/
|
|
259
268
|
interrupt(): Promise<SDKControlInterruptResponse | undefined>;
|
|
269
|
+
sendHostAction(params: HostActionParams): Promise<void>;
|
|
260
270
|
/**
|
|
261
271
|
* Drop a UUID-stamped async user message while it is still queued.
|
|
262
272
|
*/
|
|
@@ -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.43",
|
|
5
|
+
"qoderCliVersion": "1.1.55",
|
|
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.55/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.43",
|
|
14
|
+
"qoderCliVersion": "1.1.55"
|
|
15
15
|
}
|
|
16
16
|
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { HostAction, HostActionEvent } from '../protocol/feedback.js';
|
|
2
|
+
/** Explicitly enables Host-to-CLI action events for this Query. */
|
|
3
|
+
export type HostActionOptions = Record<string, never>;
|
|
4
|
+
export type HostActionParams = {
|
|
5
|
+
/** Stable identity for one Host UI gesture. Reuse it when retrying. */
|
|
6
|
+
uuid: string;
|
|
7
|
+
action: HostAction;
|
|
8
|
+
sessionId: string;
|
|
9
|
+
parentResultUuid: string;
|
|
10
|
+
};
|
|
11
|
+
export declare function createHostActionEvent(params: HostActionParams): HostActionEvent;
|
package/dist/types/index.d.ts
CHANGED
|
@@ -13,6 +13,7 @@ export type { WorkerRuntimeTransportOptions, WorkerTransportOptions, } from '../
|
|
|
13
13
|
export type { QueryTransportProvider, Transport, } from '../core/transport.js';
|
|
14
14
|
export type { ElicitationRequest, ElicitationResult, OnElicitation, PromptRequestOption, PromptRequest, PromptResponse, SecurityScanOptions, Options, QueryTransportOptions, SpawnOptions, SpawnedProcess, Query, } from './options.js';
|
|
15
15
|
export * from './permissions.js';
|
|
16
|
+
export type { HostActionOptions, HostActionParams } from './host-action.js';
|
|
16
17
|
export type { HookEvent, HookPermissionDecision, HookCallback, HookCallbackMatcher, HookInput, HookSpecificOutput, HookJSONOutput, AsyncHookJSONOutput, SyncHookJSONOutput, BaseHookInput, PreToolUseHookInput, PostToolUseHookInput, PostToolUseFailureHookInput, UserPromptSubmitHookInput, SessionStartHookInput, SessionEndHookInput, StopHookInput, SubagentStartHookInput, SubagentStopHookInput, PreCompactHookInput, PostCompactHookInput, PermissionRequestHookInput, PermissionDeniedHookInput, InstructionsLoadedHookInput, WorktreeCreateHookInput, WorktreeRemoveHookInput, CwdChangedHookInput, FileChangedHookInput, PreToolUseHookSpecificOutput, PostToolUseHookSpecificOutput, PostToolUseFailureHookSpecificOutput, UserPromptSubmitHookSpecificOutput, SessionStartHookSpecificOutput, SubagentStartHookSpecificOutput, PermissionRequestHookSpecificOutput, WorktreeCreateHookSpecificOutput, CwdChangedHookSpecificOutput, FileChangedHookSpecificOutput, } from './hooks.js';
|
|
17
18
|
export * from './mcp.js';
|
|
18
19
|
export * from './agents.js';
|
package/dist/types/messages.d.ts
CHANGED
|
@@ -9,7 +9,7 @@ import type { SDKMessage as ProtocolSDKMessage, SDKStatusMessage as ProtocolSDKS
|
|
|
9
9
|
import type { MessageParam, UUID } from './common.js';
|
|
10
10
|
import type { PermissionMode } from './permissions.js';
|
|
11
11
|
import type { SessionKey } from '../session/session-store.js';
|
|
12
|
-
export type { SDKAssistantMessage, SDKArtifactInfo, SDKArtifactUpdateMessage, SDKAvailableModelsUpdateMessage, SDKCommandsChangedMessage, SDKResultSuccess, SDKResultError, SDKResultMessage, SDKPartialAssistantMessage, SDKCompactBoundaryMessage, SDKAPIRetryMessage, SDKModelQueueStatusMessage, SDKControlRequestProgressMessage, SDKCommandLifecycleMessage, SDKHookStartedMessage, SDKHookProgressMessage, SDKHookResponseMessage, SDKTaskNotificationMessage, SDKTaskStartedMessage, SDKTaskProgressMessage, SDKTaskUpdatedMessage, SDKBackgroundTasksChangedMessage, SDKSessionStateChangedMessage, SDKPlanModeChangedMessage, SDKSessionTitleChangedMessage, SDKFilesPersistedEvent, SDKElicitationCompleteMessage, SDKPromptSuggestionMessage, SDKCloudAgentEventMessage, SDKMemoryGenerationMessage, SDKMemoryConsumptionMessage, SDKSkillEvolutionMessage, SDKPermissionDenial, SDKMessageOrigin, SDKToolNonExecutionKind, SDKToolResultMeta, } from '../protocol/index.js';
|
|
12
|
+
export type { SDKAssistantMessage, SDKArtifactInfo, SDKArtifactUpdateMessage, SDKAvailableModelsUpdateMessage, SDKCommandsChangedMessage, SDKResultSuccess, SDKResultError, SDKResultMessage, SDKPartialAssistantMessage, SDKCompactBoundaryMessage, SDKAPIRetryMessage, SDKModelQueueStatusMessage, SDKControlRequestProgressMessage, SDKCommandLifecycleMessage, SDKHookStartedMessage, SDKHookProgressMessage, SDKHookResponseMessage, SDKTaskNotificationMessage, SDKTaskStartedMessage, SDKTaskProgressMessage, SDKTaskUpdatedMessage, SDKBackgroundTasksChangedMessage, SDKSessionStateChangedMessage, SDKPlanModeChangedMessage, SDKSessionTitleChangedMessage, SDKFilesPersistedEvent, SDKElicitationCompleteMessage, SDKPromptSuggestionMessage, SDKCloudAgentEventMessage, SDKMemoryGenerationMessage, SDKMemoryConsumptionMessage, SDKSkillEvolutionMessage, SDKPermissionDenial, SDKMessageOrigin, SDKSelectedSkill, SDKToolNonExecutionKind, SDKToolResultMeta, } from '../protocol/index.js';
|
|
13
13
|
export type SDKUserMessage = {
|
|
14
14
|
type: 'user';
|
|
15
15
|
message: MessageParam;
|
|
@@ -20,6 +20,8 @@ export type SDKUserMessage = {
|
|
|
20
20
|
* treats a leading slash as literal model input while preserving attachments.
|
|
21
21
|
*/
|
|
22
22
|
client_composed?: boolean;
|
|
23
|
+
/** Skills the CLI must activate as direct user intent before processing this input. */
|
|
24
|
+
selected_skills?: import('../protocol/index.js').SDKSelectedSkill[];
|
|
23
25
|
isSynthetic?: boolean;
|
|
24
26
|
origin?: import('../protocol/index.js').SDKMessageOrigin;
|
|
25
27
|
tool_use_result?: unknown;
|
package/dist/types/options.d.ts
CHANGED
|
@@ -21,6 +21,7 @@ import type { MemoryOptions } from './memory.js';
|
|
|
21
21
|
import type { EvolutionOptions } from './skill-evolution.js';
|
|
22
22
|
import type { SDKGoalSnapshot, SDKGoalStatus, SDKPlanModeSnapshot } from '../protocol/control.js';
|
|
23
23
|
import type { Daemon } from '../daemon/start-daemon.js';
|
|
24
|
+
import type { HostActionOptions, HostActionParams } from './host-action.js';
|
|
24
25
|
import type { ResolveSessionArtifacts } from './artifacts.js';
|
|
25
26
|
export type { CanUseTool };
|
|
26
27
|
export type { AuthOptions };
|
|
@@ -284,6 +285,8 @@ export type Options = {
|
|
|
284
285
|
permissionPromptToolName?: string;
|
|
285
286
|
plugins?: SdkPluginConfig[];
|
|
286
287
|
promptSuggestions?: boolean;
|
|
288
|
+
/** Explicit opt-in for Host-to-CLI result action events. */
|
|
289
|
+
hostActions?: HostActionOptions;
|
|
287
290
|
/**
|
|
288
291
|
* Persist the local session transcript. Defaults to true.
|
|
289
292
|
*
|
|
@@ -407,6 +410,8 @@ export interface RemoteProjectionCheckpoint {
|
|
|
407
410
|
* 配置 MCP servers 请通过 `Options.mcpServers`(启动时一次性配置)。
|
|
408
411
|
*/
|
|
409
412
|
export interface Query extends AsyncGenerator<SDKMessage, void> {
|
|
413
|
+
/** Queue a Host UI action for the active CLI or a one-shot fallback process. */
|
|
414
|
+
sendHostAction(params: HostActionParams): Promise<void>;
|
|
410
415
|
/**
|
|
411
416
|
* Request interruption of the active turn.
|
|
412
417
|
*
|
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.43",
|
|
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.55",
|
|
54
54
|
"qoderSdkBrand": "global",
|
|
55
55
|
"license": "SEE LICENSE IN LICENSE"
|
|
56
56
|
}
|