@qoder-ai/qoder-agent-sdk 1.0.46 → 1.0.48

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.
@@ -73,6 +73,8 @@ export type SDKUserMessage = {
73
73
  message: MessageParam;
74
74
  parent_tool_use_id: string | null;
75
75
  custom_context?: Record<string, string>;
76
+ /** SDK telemetry metadata; started_at_ms/submitted_at_ms use Unix milliseconds. */
77
+ extra?: Record<string, unknown>;
76
78
  /** The client has resolved slash commands, so a leading slash is literal input. */
77
79
  client_composed?: boolean;
78
80
  /** Skills the CLI must activate as direct user intent before processing this input. */
@@ -131,6 +133,7 @@ export type SDKResultSuccess = {
131
133
  is_error: boolean;
132
134
  num_turns: number;
133
135
  result: string;
136
+ /** 最后一条模型回复的结束原因;tool_use 不代表 Agent 本轮仍在运行。 */
134
137
  stop_reason: string | null;
135
138
  total_cost_usd: number;
136
139
  /** Session-cumulative Qoder credits. Added by newer CLI versions. */
@@ -140,6 +143,11 @@ export type SDKResultSuccess = {
140
143
  permission_denials: SDKPermissionDenial[];
141
144
  error_code?: number | string;
142
145
  deferred_tool_use?: unknown;
146
+ /**
147
+ * Agent 本轮的执行终止原因,与模型 stop_reason 独立。
148
+ * hook_stopped 表示 Hook 主动结束本轮,即使 stop_reason 为 tool_use 也已停止。
149
+ * 旧版 CLI 可能不返回此字段;SDK 原样透传,不推断或改写模型原因。
150
+ */
143
151
  terminal_reason?: string | null;
144
152
  fast_mode_state?: FastModeState;
145
153
  origin?: SDKMessageOrigin;
@@ -48,6 +48,7 @@ import type { ResolveSessionArtifacts } from '../types/artifacts.js';
48
48
  import type { BYOKModelValidationInput, BYOKProviderInfo, ByokConfigCheckResult, ByokConfigInfo, ByokConfigReference, CheckByokConfigInput, CreateByokConfigInput, DeleteByokConfigInput, UpdateByokConfigInput } from '../types/byok.js';
49
49
  /** Init config passed to the initialize control request. */
50
50
  type InitConfig = {
51
+ sdkStartedAtMs?: number;
51
52
  systemPrompt?: string;
52
53
  appendSystemPrompt?: string;
53
54
  modelRequestPatches?: ModelPromptPatches;
@@ -135,6 +136,7 @@ export declare class QueryRunner implements InternalQuery {
135
136
  private cliCapabilities?;
136
137
  private customContextCapabilityWarningEmitted;
137
138
  private firstResultReceived;
139
+ private sdkStartupTimingSent;
138
140
  private firstResultReceivedResolve?;
139
141
  private memoryFlushPromise?;
140
142
  private endInputFlushPromise?;
@@ -1,16 +1,16 @@
1
1
  {
2
2
  "version": 1,
3
3
  "brand": "global",
4
- "sdkVersion": "1.0.46",
5
- "qoderCliVersion": "1.1.59",
4
+ "sdkVersion": "1.0.48",
5
+ "qoderCliVersion": "1.1.61",
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.59/qodercli-worker-runtime-{target}.tgz",
11
+ "urlTemplate": "https://download.qoder.com/qodercli/releases/1.1.61/qodercli-worker-runtime-{target}.tgz",
12
12
  "artifactNameTemplate": "qodercli-worker-runtime-{target}.tgz",
13
- "sdkVersion": "1.0.46",
14
- "qoderCliVersion": "1.1.59"
13
+ "sdkVersion": "1.0.48",
14
+ "qoderCliVersion": "1.1.61"
15
15
  }
16
16
  }
@@ -15,6 +15,8 @@ export type SDKUserMessage = {
15
15
  message: MessageParam;
16
16
  parent_tool_use_id: string | null;
17
17
  custom_context?: Record<string, string>;
18
+ /** SDK telemetry metadata; started_at_ms/submitted_at_ms use Unix milliseconds. */
19
+ extra?: Record<string, unknown>;
18
20
  /**
19
21
  * When true, the client has already resolved slash-command intent. The CLI
20
22
  * treats a leading slash as literal model input while preserving attachments.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@qoder-ai/qoder-agent-sdk",
3
- "version": "1.0.46",
3
+ "version": "1.0.48",
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.59",
53
+ "qoderCliVersion": "1.1.61",
54
54
  "qoderSdkBrand": "global",
55
55
  "license": "SEE LICENSE IN LICENSE"
56
56
  }