@qoder-ai/qoder-agent-sdk 1.0.20 → 1.0.22
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 +20 -14
- package/dist/core/brand.d.ts +4 -0
- package/dist/core/process-transport.d.ts +2 -0
- package/dist/core/runtime-launch-options.d.ts +2 -0
- package/dist/global/plugins.d.ts +8 -2
- package/dist/index.d.ts +7 -4
- package/dist/index.js +30 -27
- package/dist/protocol/control.d.ts +53 -79
- package/dist/protocol/index.d.ts +1 -1
- package/dist/protocol/index.js +1 -1
- package/dist/protocol/messages.d.ts +19 -0
- package/dist/query/index.d.ts +2 -0
- package/dist/query/startup.d.ts +11 -0
- package/dist/runtime-manifest.json +6 -6
- package/dist/settings/resolve-settings.d.ts +2 -0
- package/dist/types/messages.d.ts +3 -1
- package/dist/types/model-policy-provider.d.ts +10 -0
- package/dist/types/options.d.ts +19 -0
- package/dist/types/plugins.d.ts +52 -0
- package/dist/types/session.d.ts +5 -0
- package/dist/types/settings.d.ts +14 -1
- package/package.json +2 -2
- package/scripts/postinstall.cjs +154 -24
|
@@ -231,6 +231,16 @@ export type SDKControlGetModelPolicyResponse = {
|
|
|
231
231
|
* the supplied API key instead of the default upstream.
|
|
232
232
|
*/
|
|
233
233
|
custom_model?: CustomModel;
|
|
234
|
+
/**
|
|
235
|
+
* Optional routing scene label the CLI forwards as the inference request
|
|
236
|
+
* body `task_id`.
|
|
237
|
+
*/
|
|
238
|
+
task_id?: string;
|
|
239
|
+
/**
|
|
240
|
+
* Optional business sub-task label the CLI forwards as `business.sub_task`
|
|
241
|
+
* on the inference request (billing/analytics).
|
|
242
|
+
*/
|
|
243
|
+
sub_task?: string;
|
|
234
244
|
};
|
|
235
245
|
export type SDKControlSetMaxThinkingTokensRequest = {
|
|
236
246
|
type: 'set_max_thinking_tokens';
|
|
@@ -514,93 +524,57 @@ export type SDKControlInitializeResponse = {
|
|
|
514
524
|
capabilities?: string[];
|
|
515
525
|
};
|
|
516
526
|
export type SDKControlGetContextUsageResponse = {
|
|
527
|
+
model: string;
|
|
528
|
+
/** Whether optional token-count fields are available in this response. */
|
|
529
|
+
tokenCountsAvailable: boolean;
|
|
530
|
+
contextWindow: {
|
|
531
|
+
/** Context occupancy as a percentage from 0 to 100. */
|
|
532
|
+
usedPercentage: number;
|
|
533
|
+
usedTokens?: number;
|
|
534
|
+
sizeTokens?: number;
|
|
535
|
+
};
|
|
536
|
+
/** Local estimates in the same order and category model as `/context`. */
|
|
517
537
|
categories: Array<{
|
|
518
|
-
|
|
519
|
-
tokens: number;
|
|
520
|
-
color: string;
|
|
521
|
-
isDeferred?: boolean;
|
|
522
|
-
}>;
|
|
523
|
-
totalTokens: number;
|
|
524
|
-
maxTokens: number;
|
|
525
|
-
rawMaxTokens: number;
|
|
526
|
-
percentage: number;
|
|
527
|
-
gridRows: Array<Array<{
|
|
528
|
-
color: string;
|
|
529
|
-
isFilled: boolean;
|
|
530
|
-
categoryName: string;
|
|
531
|
-
tokens: number;
|
|
538
|
+
type: 'system_prompt' | 'system_tools' | 'skills' | 'messages' | 'other' | 'free_space' | 'auto_compact';
|
|
532
539
|
percentage: number;
|
|
533
|
-
|
|
534
|
-
}>>;
|
|
535
|
-
model: string;
|
|
536
|
-
memoryFiles: Array<{
|
|
537
|
-
path: string;
|
|
538
|
-
type: string;
|
|
539
|
-
tokens: number;
|
|
540
|
-
}>;
|
|
541
|
-
mcpTools: Array<{
|
|
542
|
-
name: string;
|
|
543
|
-
serverName: string;
|
|
544
|
-
tokens: number;
|
|
545
|
-
isLoaded?: boolean;
|
|
540
|
+
tokens?: number;
|
|
546
541
|
}>;
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
}>;
|
|
552
|
-
systemTools?: Array<{
|
|
553
|
-
name: string;
|
|
554
|
-
tokens: number;
|
|
555
|
-
}>;
|
|
556
|
-
systemPromptSections?: Array<{
|
|
557
|
-
name: string;
|
|
558
|
-
tokens: number;
|
|
559
|
-
}>;
|
|
560
|
-
agents: Array<{
|
|
561
|
-
agentType: string;
|
|
562
|
-
source: string;
|
|
563
|
-
tokens: number;
|
|
564
|
-
}>;
|
|
565
|
-
slashCommands?: {
|
|
566
|
-
totalCommands: number;
|
|
567
|
-
includedCommands: number;
|
|
568
|
-
tokens: number;
|
|
542
|
+
autoCompact: {
|
|
543
|
+
enabled: boolean;
|
|
544
|
+
thresholdPercentage: number;
|
|
545
|
+
thresholdTokens?: number;
|
|
569
546
|
};
|
|
570
|
-
skills
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
547
|
+
skills: {
|
|
548
|
+
count: number;
|
|
549
|
+
/** Aggregate skill frontmatter as a percentage of the full context. */
|
|
550
|
+
percentageOfContext: number;
|
|
551
|
+
tokens?: number;
|
|
552
|
+
items: Array<{
|
|
575
553
|
name: string;
|
|
576
|
-
source:
|
|
577
|
-
|
|
554
|
+
source: 'project' | 'user' | 'built-in' | 'plugin';
|
|
555
|
+
/** This skill's frontmatter as a percentage of the full context. */
|
|
556
|
+
percentageOfContext: number;
|
|
557
|
+
tokens?: number;
|
|
578
558
|
}>;
|
|
579
559
|
};
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
}
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
}
|
|
560
|
+
duplicateFileReads: Array<{
|
|
561
|
+
path: string;
|
|
562
|
+
count: number;
|
|
563
|
+
wastedTokens?: number;
|
|
564
|
+
}>;
|
|
565
|
+
session: {
|
|
566
|
+
messageCount: number;
|
|
567
|
+
promptCount: number;
|
|
568
|
+
toolCalls: {
|
|
569
|
+
total: number;
|
|
570
|
+
succeeded: number;
|
|
571
|
+
failed: number;
|
|
572
|
+
};
|
|
573
|
+
linesChanged: {
|
|
574
|
+
added: number;
|
|
575
|
+
removed: number;
|
|
576
|
+
};
|
|
597
577
|
};
|
|
598
|
-
apiUsage: {
|
|
599
|
-
input_tokens: number;
|
|
600
|
-
output_tokens: number;
|
|
601
|
-
cache_creation_input_tokens: number;
|
|
602
|
-
cache_read_input_tokens: number;
|
|
603
|
-
} | null;
|
|
604
578
|
};
|
|
605
579
|
export type SDKControlReloadPluginsResponse = {
|
|
606
580
|
commands: SlashCommand[];
|
package/dist/protocol/index.d.ts
CHANGED
|
@@ -19,7 +19,7 @@ export type { AICodeTrackingLaunchOptions, QoderAgentLaunchOptions, QoderCliFlag
|
|
|
19
19
|
export { buildQoderCliFlagSettings, buildQoderCliFlagSettingsArgs, } from './launch.js';
|
|
20
20
|
export type { PermissionMode, PermissionBehavior, PermissionDecisionClassification, PermissionUpdateDestination, PermissionRuleValue, PermissionUpdate, PermissionResult, } from './permissions.js';
|
|
21
21
|
export type { McpStdioServerConfig, McpSSEServerConfig, McpHttpServerConfig, McpSdkServerConfig, McpServerConfigForProcessTransport, McpServerStatus, McpServerStatusConfig, McpSetServersResult, OAuthToken, } from './mcp.js';
|
|
22
|
-
export type { SDKAssistantMessage, SDKUserMessage, SDKUserMessageReplay, SDKResultSuccess, SDKResultError, SDKResultMessage, SDKFileAttachment, SDKSystemMessage, SDKPartialAssistantMessage, SDKCompactBoundaryMessage, SDKStatusMessage, SDKAPIRetryMessage, SDKHookStartedMessage, SDKHookProgressMessage, SDKHookResponseMessage, SDKTaskNotificationMessage, SDKTaskStartedMessage, SDKTaskProgressMessage, SDKTaskUpdatedMessage, SDKBackgroundTasksChangedMessage, SDKSessionStateChangedMessage, SDKSessionTitleChangedMessage, SDKFilesPersistedEvent, SDKElicitationCompleteMessage, SDKPromptSuggestionMessage, SDKCloudAgentEventMessage, SDKPermissionDenial, SDKPermissionDeniedMessage, SDKPermissionDeniedReasonType, SDKMessage, } from './messages.js';
|
|
22
|
+
export type { SDKAssistantMessage, SDKToolNonExecutionKind, SDKToolResultMeta, SDKUserMessage, SDKUserMessageReplay, SDKResultSuccess, SDKResultError, SDKResultMessage, SDKFileAttachment, SDKSystemMessage, SDKPartialAssistantMessage, SDKCompactBoundaryMessage, SDKStatusMessage, SDKAPIRetryMessage, SDKHookStartedMessage, SDKHookProgressMessage, SDKHookResponseMessage, SDKTaskNotificationMessage, SDKTaskStartedMessage, SDKTaskProgressMessage, SDKTaskUpdatedMessage, SDKBackgroundTasksChangedMessage, SDKSessionStateChangedMessage, SDKSessionTitleChangedMessage, SDKFilesPersistedEvent, SDKElicitationCompleteMessage, SDKPromptSuggestionMessage, SDKCloudAgentEventMessage, SDKPermissionDenial, SDKPermissionDeniedMessage, SDKPermissionDeniedReasonType, SDKMessage, } from './messages.js';
|
|
23
23
|
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';
|
|
24
24
|
export type { AgentMcpServerSpec, AgentDefinition, AgentInfo, AgentMemoryScope, } from './agents.js';
|
|
25
25
|
export { QoderModelPurpose } from './control.js';
|
package/dist/protocol/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
var r="1.2.0";function i(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function n(e={}){let t={...e.settings??{}},o=e.aiCodeTracking?.installGitCommitHook;if(o!==void 0){let s=t.aiCodeTracking;t.aiCodeTracking={...i(s)?s:{},installGitCommitHook:o}}return t}function
|
|
1
|
+
var r="1.2.0";function i(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function n(e={}){let t={...e.settings??{}},o=e.aiCodeTracking?.installGitCommitHook;if(o!==void 0){let s=t.aiCodeTracking;t.aiCodeTracking={...i(s)?s:{},installGitCommitHook:o}}return t}function p(e={}){let t=n(e);return Object.keys(t).length===0?[]:["--settings",JSON.stringify(t)]}var l={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{l as QoderModelPurpose,r as WIRE_PROTOCOL_VERSION,n as buildQoderCliFlagSettings,p as buildQoderCliFlagSettingsArgs};
|
|
@@ -17,6 +17,13 @@ export type SDKAssistantMessage = {
|
|
|
17
17
|
type: 'assistant';
|
|
18
18
|
message: BetaMessage;
|
|
19
19
|
parent_tool_use_id: string | null;
|
|
20
|
+
/**
|
|
21
|
+
* Present when qodercli synthesized this Assistant message from an API
|
|
22
|
+
* failure rather than a model response. Embedded hosts can use the marker to
|
|
23
|
+
* avoid rendering duplicate error text when the terminal Result already
|
|
24
|
+
* provides a structured error surface.
|
|
25
|
+
*/
|
|
26
|
+
isApiErrorMessage?: true;
|
|
20
27
|
/** Qoder model request ID, present only when explicitly enabled in the CLI. */
|
|
21
28
|
request_id?: string;
|
|
22
29
|
error?: SDKAssistantMessageError;
|
|
@@ -28,6 +35,16 @@ export type SDKAssistantMessage = {
|
|
|
28
35
|
uuid: UUID;
|
|
29
36
|
session_id: string;
|
|
30
37
|
};
|
|
38
|
+
export type SDKToolNonExecutionKind = 'user-rejected' | 'permission-rule' | 'automode-blocked' | 'automode-unavailable' | 'automode-parsing-error' | 'interrupted' | 'cancelled';
|
|
39
|
+
/**
|
|
40
|
+
* Display-only metadata for a tool result whose tool did not run to
|
|
41
|
+
* completion. This wrapper-level field is never part of the model message.
|
|
42
|
+
*/
|
|
43
|
+
export type SDKToolResultMeta = {
|
|
44
|
+
id: string;
|
|
45
|
+
non_execution_kind: SDKToolNonExecutionKind;
|
|
46
|
+
user_feedback?: string;
|
|
47
|
+
};
|
|
31
48
|
export type SDKUserMessage = {
|
|
32
49
|
type: 'user';
|
|
33
50
|
message: MessageParam;
|
|
@@ -35,6 +52,7 @@ export type SDKUserMessage = {
|
|
|
35
52
|
file_attachments?: SDKFileAttachment[];
|
|
36
53
|
isSynthetic?: boolean;
|
|
37
54
|
tool_use_result?: unknown;
|
|
55
|
+
tool_result_meta?: SDKToolResultMeta[];
|
|
38
56
|
/**
|
|
39
57
|
* Delivery priority. `next` is the default; `now` interrupts the active
|
|
40
58
|
* turn, while `later` waits for the session to become idle.
|
|
@@ -57,6 +75,7 @@ export type SDKUserMessageReplay = {
|
|
|
57
75
|
file_attachments?: SDKFileAttachment[];
|
|
58
76
|
isSynthetic?: boolean;
|
|
59
77
|
tool_use_result?: unknown;
|
|
78
|
+
tool_result_meta?: SDKToolResultMeta[];
|
|
60
79
|
/**
|
|
61
80
|
* Delivery priority. `next` is the default; `now` interrupts the active
|
|
62
81
|
* turn, while `later` waits for the session to become idle.
|
package/dist/query/index.d.ts
CHANGED
|
@@ -4,5 +4,7 @@
|
|
|
4
4
|
* This is the main entry point for the Qoder Agent SDK query functionality.
|
|
5
5
|
*/
|
|
6
6
|
export { query } from './query.js';
|
|
7
|
+
export { startup } from './startup.js';
|
|
8
|
+
export type { StartupParams, WarmQuery } from './startup.js';
|
|
7
9
|
export { QueryRunner } from './query-runner.js';
|
|
8
10
|
export { generateRequestId, createControlRequest, createControlResponse, createControlErrorResponse, isControlResponse, isControlRequest, isControlCancelRequest, isKeepAlive, isStreamlinedText, isStreamlinedToolUseSummary, isPostTurnSummary, isResultMessage, } from './control-protocol.js';
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Options, Query } from '../types/options.js';
|
|
2
|
+
import type { SDKUserMessage } from '../types/messages.js';
|
|
3
|
+
export interface WarmQuery extends AsyncDisposable {
|
|
4
|
+
query(prompt: string | AsyncIterable<SDKUserMessage>): Query;
|
|
5
|
+
close(): void;
|
|
6
|
+
}
|
|
7
|
+
export interface StartupParams {
|
|
8
|
+
options?: Options;
|
|
9
|
+
initializeTimeoutMs?: number;
|
|
10
|
+
}
|
|
11
|
+
export declare function startup(params?: StartupParams): Promise<WarmQuery>;
|
|
@@ -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.22",
|
|
5
|
+
"qoderCliVersion": "1.1.22",
|
|
6
6
|
"defaultTransport": "worker",
|
|
7
7
|
"workerRuntime": {
|
|
8
8
|
"packaged": false,
|
|
9
9
|
"delivery": "install",
|
|
10
10
|
"source": "qodercli-worker-runtime",
|
|
11
|
-
"
|
|
12
|
-
"
|
|
13
|
-
"sdkVersion": "1.0.
|
|
14
|
-
"qoderCliVersion": "1.1.
|
|
11
|
+
"urlTemplate": "https://download.qoder.com/qodercli/releases/1.1.22/qodercli-worker-runtime-{target}.tgz",
|
|
12
|
+
"artifactNameTemplate": "qodercli-worker-runtime-{target}.tgz",
|
|
13
|
+
"sdkVersion": "1.0.22",
|
|
14
|
+
"qoderCliVersion": "1.1.22"
|
|
15
15
|
}
|
|
16
16
|
}
|
package/dist/types/messages.d.ts
CHANGED
|
@@ -9,13 +9,15 @@ 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, SDKResultSuccess, SDKResultError, SDKResultMessage, SDKPartialAssistantMessage, SDKCompactBoundaryMessage, SDKAPIRetryMessage, SDKHookStartedMessage, SDKHookProgressMessage, SDKHookResponseMessage, SDKTaskNotificationMessage, SDKTaskStartedMessage, SDKTaskProgressMessage, SDKTaskUpdatedMessage, SDKBackgroundTasksChangedMessage, SDKSessionStateChangedMessage, SDKSessionTitleChangedMessage, SDKFilesPersistedEvent, SDKElicitationCompleteMessage, SDKPromptSuggestionMessage, SDKCloudAgentEventMessage, SDKPermissionDenial, } from '../protocol/index.js';
|
|
12
|
+
export type { SDKAssistantMessage, SDKResultSuccess, SDKResultError, SDKResultMessage, SDKPartialAssistantMessage, SDKCompactBoundaryMessage, SDKAPIRetryMessage, SDKHookStartedMessage, SDKHookProgressMessage, SDKHookResponseMessage, SDKTaskNotificationMessage, SDKTaskStartedMessage, SDKTaskProgressMessage, SDKTaskUpdatedMessage, SDKBackgroundTasksChangedMessage, SDKSessionStateChangedMessage, SDKSessionTitleChangedMessage, SDKFilesPersistedEvent, SDKElicitationCompleteMessage, SDKPromptSuggestionMessage, SDKCloudAgentEventMessage, SDKPermissionDenial, SDKToolNonExecutionKind, SDKToolResultMeta, } from '../protocol/index.js';
|
|
13
13
|
export type SDKUserMessage = {
|
|
14
14
|
type: 'user';
|
|
15
15
|
message: MessageParam;
|
|
16
16
|
parent_tool_use_id: string | null;
|
|
17
17
|
isSynthetic?: boolean;
|
|
18
18
|
tool_use_result?: unknown;
|
|
19
|
+
/** CLI-stamped display metadata for tool results that did not execute. */
|
|
20
|
+
tool_result_meta?: import('../protocol/index.js').SDKToolResultMeta[];
|
|
19
21
|
/**
|
|
20
22
|
* Delivery priority. `next` is the default; `now` interrupts the active
|
|
21
23
|
* turn, while `later` waits for the session to become idle.
|
|
@@ -48,6 +48,16 @@ export interface ModelPolicyResult {
|
|
|
48
48
|
});
|
|
49
49
|
/** Optional per-request model policy parameters (contextWindow, reasoningEffort). */
|
|
50
50
|
parameters?: Record<string, unknown>;
|
|
51
|
+
/**
|
|
52
|
+
* Optional routing scene label sent as the inference request body `task_id`.
|
|
53
|
+
* The server selects models by it; internal CLI tasks keep their own values.
|
|
54
|
+
*/
|
|
55
|
+
taskId?: string;
|
|
56
|
+
/**
|
|
57
|
+
* Optional business sub-task label sent as `business.sub_task` on the
|
|
58
|
+
* inference request, used for billing/analytics. Not involved in routing.
|
|
59
|
+
*/
|
|
60
|
+
subTask?: string;
|
|
51
61
|
}
|
|
52
62
|
/**
|
|
53
63
|
* Host-registered callback for pull-mode model selection.
|
package/dist/types/options.d.ts
CHANGED
|
@@ -141,6 +141,25 @@ export type Options = {
|
|
|
141
141
|
enableFileCheckpointing?: boolean;
|
|
142
142
|
toolConfig?: ToolConfig;
|
|
143
143
|
forkSession?: boolean;
|
|
144
|
+
/**
|
|
145
|
+
* When resuming, load the conversation chain only through this entry UUID.
|
|
146
|
+
* Use with `resume`; when combined with `forkSession`, the new session starts
|
|
147
|
+
* from this historical point while retaining its file checkpoint history.
|
|
148
|
+
* The UUID may identify any persisted chain entry, not only an assistant
|
|
149
|
+
* message. Use the last entry belonging to the turn that must be kept.
|
|
150
|
+
*/
|
|
151
|
+
resumeSessionAt?: string;
|
|
152
|
+
/**
|
|
153
|
+
* With `resumeSessionAt`, declares the prompt UUID of the turn intended to be
|
|
154
|
+
* discarded. The CLI refuses the truncation if the discarded range contains
|
|
155
|
+
* unrelated work such as a queued prompt or task notification.
|
|
156
|
+
*
|
|
157
|
+
* A refusal is returned as an execution error whose message starts with
|
|
158
|
+
* `Resume rejected by --resume-drops-turn:`. Treat it as a deterministic
|
|
159
|
+
* stale-view conflict: resume without truncation to recover the new evidence
|
|
160
|
+
* instead of retrying the same request.
|
|
161
|
+
*/
|
|
162
|
+
resumeDropsTurn?: string;
|
|
144
163
|
hooks?: Partial<Record<HookEvent, HookCallbackMatcher[]>>;
|
|
145
164
|
onElicitation?: OnElicitation;
|
|
146
165
|
/**
|
package/dist/types/plugins.d.ts
CHANGED
|
@@ -48,4 +48,56 @@ export type UninstallPluginResult = {
|
|
|
48
48
|
pluginId: string;
|
|
49
49
|
fullyRemoved: boolean;
|
|
50
50
|
reverseDependents: string[];
|
|
51
|
+
};
|
|
52
|
+
export type PluginValidationSeverity = 'error' | 'warning';
|
|
53
|
+
export type PluginValidationPhase = 'target' | 'manifest' | 'component' | 'load-simulation' | 'installability';
|
|
54
|
+
export type PluginValidationPosition = {
|
|
55
|
+
line: number;
|
|
56
|
+
character: number;
|
|
57
|
+
};
|
|
58
|
+
export type PluginValidationLocation = {
|
|
59
|
+
path: string;
|
|
60
|
+
jsonPointer?: string;
|
|
61
|
+
range?: {
|
|
62
|
+
start: PluginValidationPosition;
|
|
63
|
+
end: PluginValidationPosition;
|
|
64
|
+
};
|
|
65
|
+
};
|
|
66
|
+
export type PluginValidationDiagnostic = {
|
|
67
|
+
severity: PluginValidationSeverity;
|
|
68
|
+
code: string;
|
|
69
|
+
message: string;
|
|
70
|
+
phase: PluginValidationPhase;
|
|
71
|
+
location?: PluginValidationLocation;
|
|
72
|
+
suggestion?: string;
|
|
73
|
+
};
|
|
74
|
+
export type PluginValidationReport = {
|
|
75
|
+
schemaVersion: 1;
|
|
76
|
+
validator: {
|
|
77
|
+
name: 'qodercli';
|
|
78
|
+
version: string;
|
|
79
|
+
};
|
|
80
|
+
valid: boolean;
|
|
81
|
+
target: {
|
|
82
|
+
inputPath: string;
|
|
83
|
+
resolvedPath: string;
|
|
84
|
+
manifestPath?: string;
|
|
85
|
+
};
|
|
86
|
+
plugin?: {
|
|
87
|
+
name: string;
|
|
88
|
+
version?: string;
|
|
89
|
+
displayName?: string;
|
|
90
|
+
};
|
|
91
|
+
diagnostics: PluginValidationDiagnostic[];
|
|
92
|
+
summary: {
|
|
93
|
+
errorCount: number;
|
|
94
|
+
warningCount: number;
|
|
95
|
+
componentCount: number;
|
|
96
|
+
};
|
|
97
|
+
resources?: PluginResources;
|
|
98
|
+
};
|
|
99
|
+
export type ValidatePluginOptions = {
|
|
100
|
+
cliPath?: string;
|
|
101
|
+
env?: Record<string, string>;
|
|
102
|
+
signal?: AbortSignal;
|
|
51
103
|
};
|
package/dist/types/session.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { SDKToolResultMeta } from '../protocol/messages.js';
|
|
1
2
|
export type SDKSessionInfo = {
|
|
2
3
|
/** Unique session identifier (UUID). */
|
|
3
4
|
sessionId: string;
|
|
@@ -31,6 +32,10 @@ export type SessionMessage = {
|
|
|
31
32
|
* messages, depth-one subagents, and transcripts without this metadata.
|
|
32
33
|
*/
|
|
33
34
|
parent_agent_id: string | null;
|
|
35
|
+
/** Present when qodercli persisted an Assistant synthesized from an API failure. */
|
|
36
|
+
isApiErrorMessage?: true;
|
|
37
|
+
/** CLI-stamped display metadata for tool results that did not execute. */
|
|
38
|
+
tool_result_meta?: SDKToolResultMeta[];
|
|
34
39
|
/**
|
|
35
40
|
* ISO 8601 timestamp of when this transcript entry was written to the
|
|
36
41
|
* jsonl file. Mirrors the on-disk `timestamp` field. Optional because
|
package/dist/types/settings.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { PermissionMode } from './permissions.js';
|
|
2
|
+
import type { SettingSource } from './options.js';
|
|
2
3
|
/**
|
|
3
4
|
* Settings fields with a verified qodercli execution path.
|
|
4
5
|
*
|
|
@@ -42,13 +43,25 @@ export interface Settings {
|
|
|
42
43
|
}>;
|
|
43
44
|
[k: string]: unknown;
|
|
44
45
|
}
|
|
46
|
+
export type ResolvedSettingSource = SettingSource;
|
|
45
47
|
export type ResolvedSettingsSource = {
|
|
46
|
-
source:
|
|
48
|
+
source: ResolvedSettingSource;
|
|
47
49
|
settings: Settings;
|
|
48
50
|
path?: string;
|
|
49
51
|
};
|
|
52
|
+
export type SettingsProvenanceEntry = {
|
|
53
|
+
source: ResolvedSettingSource;
|
|
54
|
+
path?: string;
|
|
55
|
+
};
|
|
56
|
+
export type ResolveSettingsOptions = {
|
|
57
|
+
/** Directory used to resolve project and local settings. */
|
|
58
|
+
cwd?: string;
|
|
59
|
+
/** Filesystem settings sources to load. Omit for all sources; pass [] for none. */
|
|
60
|
+
settingSources?: SettingSource[];
|
|
61
|
+
};
|
|
50
62
|
export type ResolvedSettings = {
|
|
51
63
|
effective: Settings;
|
|
64
|
+
provenance: Record<string, SettingsProvenanceEntry>;
|
|
52
65
|
sources: ResolvedSettingsSource[];
|
|
53
66
|
};
|
|
54
67
|
/**
|
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.22",
|
|
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.22",
|
|
54
54
|
"qoderSdkBrand": "global",
|
|
55
55
|
"license": "SEE LICENSE IN LICENSE"
|
|
56
56
|
}
|