@qoder-ai/qoder-agent-sdk 1.0.57 → 1.0.58

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.
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 1,
3
3
  "brand": "global",
4
- "sdkVersion": "1.0.57",
4
+ "sdkVersion": "1.0.58",
5
5
  "qoderCliVersion": "1.1.81",
6
6
  "defaultTransport": "worker",
7
7
  "workerRuntime": {
@@ -10,7 +10,7 @@
10
10
  "source": "qodercli-worker-runtime",
11
11
  "urlTemplate": "https://download.qoder.com/qodercli/releases/1.1.81/qodercli-worker-runtime-{target}.tgz",
12
12
  "artifactNameTemplate": "qodercli-worker-runtime-{target}.tgz",
13
- "sdkVersion": "1.0.57",
13
+ "sdkVersion": "1.0.58",
14
14
  "qoderCliVersion": "1.1.81"
15
15
  }
16
16
  }
@@ -6,12 +6,9 @@ export * from './common.js';
6
6
  export * from './messages.js';
7
7
  export * from './memory.js';
8
8
  export * from './artifacts.js';
9
- export type { DefaultRuntimeTransport } from '../core/default-runtime.js';
10
9
  export type { QueryTransportCreateOptions, QueryTransportProviderOption, } from '../core/query-transport.js';
11
- export type { ProcessTransportOptions } from '../core/process-transport.js';
12
- export type { WorkerRuntimeTransportOptions, WorkerTransportOptions, } from '../core/worker-transport.js';
13
10
  export type { QueryTransportProvider, Transport, } from '../core/transport.js';
14
- export type { ElicitationRequest, ElicitationResult, OnElicitation, PromptRequestOption, PromptRequest, PromptResponse, SecurityScanOptions, Options, QueryTransportOptions, SpawnOptions, SpawnedProcess, Query, } from './options.js';
11
+ export type { ElicitationRequest, ElicitationResult, OnElicitation, PromptRequestOption, PromptRequest, PromptResponse, SecurityScanOptions, Options, QueryTransportOptions, Query, } from './options.js';
15
12
  export * from './permissions.js';
16
13
  export type { HostActionOptions, HostActionParams } from './host-action.js';
17
14
  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';
@@ -1,4 +1,4 @@
1
- import type { Readable, Writable } from 'stream';
1
+ import type { Readable, Writable } from 'node:stream';
2
2
  import type { CloseDiagnosticEvent } from './close-diagnostics.js';
3
3
  import type { ElicitResult } from '@modelcontextprotocol/sdk/types.js';
4
4
  import type { AuthOptions, InternalAuthOptions } from './auth.js';
@@ -9,7 +9,7 @@ import type { HookCallbackMatcher, HookEvent } from './hooks.js';
9
9
  import type { McpServerConfig, McpServerStatus, McpSetServersResult, OAuthToken } from './mcp.js';
10
10
  import type { SDKMessage, SDKUserMessage } from './messages.js';
11
11
  import type { Settings } from './settings.js';
12
- import type { SDKControlInterruptResponse, SDKControlInitializeResponse, SDKControlGetContextUsageResponse, SDKControlGenerateSessionTitleResponse, AskSideQuestionOptions, SideQuestionResult, SDKControlAddDirectoriesResponse, SDKControlReloadPluginsResponse, SDKControlReloadSkillsResponse, StdoutMessage } from './control.js';
12
+ import type { SDKControlInterruptResponse, SDKControlInitializeResponse, SDKControlGetContextUsageResponse, SDKControlGenerateSessionTitleResponse, AskSideQuestionOptions, SideQuestionResult, SDKControlAddDirectoriesResponse, SDKControlReloadPluginsResponse, SDKControlReloadSkillsResponse } from './control.js';
13
13
  import type { ModelPolicyProvider } from './model-policy-provider.js';
14
14
  import type { BYOKModelValidationInput, BYOKProviderInfo, ByokConfigCheckResult, ByokConfigInfo, ByokConfigReference, CheckByokConfigInput, CreateByokConfigInput, DeleteByokConfigInput, UpdateByokConfigInput } from './byok.js';
15
15
  import type { RewindFilesResult, RewindResult, RewindScope } from './session.js';
@@ -99,9 +99,9 @@ export type Options = {
99
99
  * - `{ type: 'jobToken', fetchJobToken }` - Internal first-party host
100
100
  * integration. Prefer the `jobToken(fetchJobToken)` helper in host code.
101
101
  *
102
- * Required for direct `query()` sessions. A Query using `options.daemon`
103
- * inherits authentication configured when the daemon was started and must
104
- * omit this field.
102
+ * Required unless `options.daemon` refers to a daemon that was started with
103
+ * its own credentials. Every other query starts the process-wide daemon with
104
+ * these credentials.
105
105
  */
106
106
  auth?: InternalAuthOptions;
107
107
  additionalDirectories?: string[];
@@ -124,13 +124,17 @@ export type Options = {
124
124
  */
125
125
  experimentalCloudAgent?: CloudAgentOptions;
126
126
  /**
127
- * Selects the local query transport.
127
+ * Selects the shared daemon's launch carrier for the first implicit daemon
128
+ * start.
128
129
  *
129
- * - omitted: use the transport baked into the installed SDK package.
130
- * - `ProcessTransport.default`: spawn qodercli as a child process.
131
- * - `WorkerTransport.default`: run qoder-worker-runtime in a Node worker thread.
132
- * - `new WorkerTransport({ ... })`: run worker runtime with provider options.
130
+ * - omitted: the daemon uses the package's `DEFAULT_RUNTIME_TRANSPORT`.
131
+ * - `ProcessTransport.default`: launch qodercli as a process carrier.
132
+ * - `WorkerTransport.default`: launch the bundled worker runtime.
133
+ * - `new WorkerTransport({ ... })`: launch the given worker runtime.
133
134
  * - custom `QueryTransportProvider`: provide a fresh transport per query.
135
+ *
136
+ * Once the daemon is ready, a query with a different launch mode is rejected
137
+ * with `DaemonConfigurationConflictError`.
134
138
  */
135
139
  transport?: QueryTransportOptions;
136
140
  agent?: string;
@@ -245,11 +249,6 @@ export type Options = {
245
249
  * disable.
246
250
  */
247
251
  controlRequestTimeoutMs?: number;
248
- /**
249
- * Grace period in milliseconds before the local transport terminates qodercli
250
- * after closing stdin. Defaults to 2000.
251
- */
252
- closeGraceMs?: number;
253
252
  includePartialMessages?: boolean;
254
253
  includeHookEvents?: boolean;
255
254
  /** Opt in to bounded foreground shell previews via tool_progress on supported daemons. Defaults to off. */
@@ -265,11 +264,10 @@ export type Options = {
265
264
  allowedMcpServerNames?: string[];
266
265
  model?: string;
267
266
  /**
268
- * Path to a local Qoder runtime.
267
+ * Path to the local Qoder CLI entry that the daemon process launches.
269
268
  *
270
- * Native binaries and ordinary JavaScript CLI entries use ProcessTransport.
271
- * Recognized `qoder-worker-runtime*.mjs` entries use WorkerTransport. An
272
- * explicit `transport` provider takes precedence over this automatic choice.
269
+ * Native binaries and JavaScript CLI entries are both supported; a script
270
+ * entry runs through `executable` (or the SDK host's Node binary).
273
271
  */
274
272
  pathToQoderCLIExecutable?: string;
275
273
  permissionMode?: PermissionMode;
@@ -361,6 +359,11 @@ export type Options = {
361
359
  * logging, but is not forwarded to qodercli.
362
360
  */
363
361
  debugFile?: string;
362
+ /**
363
+ * Accepted for compatibility with the former per-query transport. The
364
+ * shared daemon owns process termination, so this value is ignored.
365
+ */
366
+ closeGraceMs?: number;
364
367
  spawnQoderCLIProcess?: (options: SpawnOptions) => SpawnedProcess;
365
368
  };
366
369
  export interface SpawnOptions {
@@ -652,12 +655,4 @@ export interface InternalQuery extends Query {
652
655
  reconnectMcpServer(serverName: string): Promise<void>;
653
656
  mcpClearAuth(serverName: string): Promise<void>;
654
657
  injectMcpToken(serverName: string, token: OAuthToken): Promise<void>;
655
- }
656
- export interface Transport {
657
- initialize(): Promise<void>;
658
- write(data: string): void | Promise<void>;
659
- close(): void;
660
- isReady(): boolean;
661
- readMessages(): AsyncGenerator<StdoutMessage, void, unknown>;
662
- endInput(): void;
663
658
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@qoder-ai/qoder-agent-sdk",
3
- "version": "1.0.57",
3
+ "version": "1.0.58",
4
4
  "description": "TypeScript SDK for building Qoder-powered coding agents.",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",