@opencode-ai/sdk 0.0.0-snapshot-terminal-title-animation-202512231827 → 0.0.0-snapshot-thinking-toggle-202512290017

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.
@@ -1015,6 +1015,10 @@ export type Config = {
1015
1015
  */
1016
1016
  theme?: string;
1017
1017
  keybinds?: KeybindsConfig;
1018
+ /**
1019
+ * Log level
1020
+ */
1021
+ logLevel?: "DEBUG" | "INFO" | "WARN" | "ERROR";
1018
1022
  /**
1019
1023
  * TUI specific settings
1020
1024
  */
package/dist/server.js CHANGED
@@ -5,7 +5,10 @@ export async function createOpencodeServer(options) {
5
5
  port: 4096,
6
6
  timeout: 5000,
7
7
  }, options ?? {});
8
- const proc = spawn(`opencode`, [`serve`, `--hostname=${options.hostname}`, `--port=${options.port}`], {
8
+ const args = [`serve`, `--hostname=${options.hostname}`, `--port=${options.port}`];
9
+ if (options.config?.logLevel)
10
+ args.push(`--log-level=${options.config.logLevel}`);
11
+ const proc = spawn(`opencode`, args, {
9
12
  signal: options.signal,
10
13
  env: {
11
14
  ...process.env,
@@ -396,6 +396,9 @@ export declare class Session extends HeyApiClient {
396
396
  [key: string]: boolean;
397
397
  };
398
398
  system?: string;
399
+ thinking?: {
400
+ effort: "default" | "medium" | "high";
401
+ };
399
402
  parts?: Array<TextPartInput | FilePartInput | AgentPartInput | SubtaskPartInput>;
400
403
  }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<SessionPromptResponses, SessionPromptErrors, ThrowOnError, "fields">;
401
404
  /**
@@ -427,6 +430,9 @@ export declare class Session extends HeyApiClient {
427
430
  [key: string]: boolean;
428
431
  };
429
432
  system?: string;
433
+ thinking?: {
434
+ effort: "default" | "medium" | "high";
435
+ };
430
436
  parts?: Array<TextPartInput | FilePartInput | AgentPartInput | SubtaskPartInput>;
431
437
  }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<SessionPromptAsyncResponses, SessionPromptAsyncErrors, ThrowOnError, "fields">;
432
438
  /**
@@ -737,6 +737,7 @@ export class Session extends HeyApiClient {
737
737
  { in: "body", key: "noReply" },
738
738
  { in: "body", key: "tools" },
739
739
  { in: "body", key: "system" },
740
+ { in: "body", key: "thinking" },
740
741
  { in: "body", key: "parts" },
741
742
  ],
742
743
  },
@@ -790,6 +791,7 @@ export class Session extends HeyApiClient {
790
791
  { in: "body", key: "noReply" },
791
792
  { in: "body", key: "tools" },
792
793
  { in: "body", key: "system" },
794
+ { in: "body", key: "thinking" },
793
795
  { in: "body", key: "parts" },
794
796
  ],
795
797
  },
@@ -79,6 +79,9 @@ export type UserMessage = {
79
79
  tools?: {
80
80
  [key: string]: boolean;
81
81
  };
82
+ thinking?: {
83
+ effort: "default" | "medium" | "high";
84
+ };
82
85
  };
83
86
  export type ProviderAuthError = {
84
87
  name: "ProviderAuthError";
@@ -115,6 +118,9 @@ export type ApiError = {
115
118
  [key: string]: string;
116
119
  };
117
120
  responseBody?: string;
121
+ metadata?: {
122
+ [key: string]: string;
123
+ };
118
124
  };
119
125
  };
120
126
  export type AssistantMessage = {
@@ -501,6 +507,12 @@ export type EventTuiToastShow = {
501
507
  duration?: number;
502
508
  };
503
509
  };
510
+ export type EventMcpToolsChanged = {
511
+ type: "mcp.tools.changed";
512
+ properties: {
513
+ server: string;
514
+ };
515
+ };
504
516
  export type EventCommandExecuted = {
505
517
  type: "command.executed";
506
518
  properties: {
@@ -630,7 +642,7 @@ export type EventGlobalDisposed = {
630
642
  [key: string]: unknown;
631
643
  };
632
644
  };
633
- export type Event = EventInstallationUpdated | EventInstallationUpdateAvailable | EventProjectUpdated | EventServerInstanceDisposed | EventLspClientDiagnostics | EventLspUpdated | EventMessageUpdated | EventMessageRemoved | EventMessagePartUpdated | EventMessagePartRemoved | EventPermissionUpdated | EventPermissionReplied | EventFileEdited | EventTodoUpdated | EventSessionStatus | EventSessionIdle | EventSessionCompacted | EventTuiPromptAppend | EventTuiCommandExecute | EventTuiToastShow | EventCommandExecuted | EventSessionCreated | EventSessionUpdated | EventSessionDeleted | EventSessionDiff | EventSessionError | EventFileWatcherUpdated | EventVcsBranchUpdated | EventPtyCreated | EventPtyUpdated | EventPtyExited | EventPtyDeleted | EventServerConnected | EventGlobalDisposed;
645
+ export type Event = EventInstallationUpdated | EventInstallationUpdateAvailable | EventProjectUpdated | EventServerInstanceDisposed | EventLspClientDiagnostics | EventLspUpdated | EventMessageUpdated | EventMessageRemoved | EventMessagePartUpdated | EventMessagePartRemoved | EventPermissionUpdated | EventPermissionReplied | EventFileEdited | EventTodoUpdated | EventSessionStatus | EventSessionIdle | EventSessionCompacted | EventTuiPromptAppend | EventTuiCommandExecute | EventTuiToastShow | EventMcpToolsChanged | EventCommandExecuted | EventSessionCreated | EventSessionUpdated | EventSessionDeleted | EventSessionDiff | EventSessionError | EventFileWatcherUpdated | EventVcsBranchUpdated | EventPtyCreated | EventPtyUpdated | EventPtyExited | EventPtyDeleted | EventServerConnected | EventGlobalDisposed;
634
646
  export type GlobalEvent = {
635
647
  directory: string;
636
648
  payload: Event;
@@ -816,6 +828,10 @@ export type KeybindsConfig = {
816
828
  * Previous agent
817
829
  */
818
830
  agent_cycle_reverse?: string;
831
+ /**
832
+ * Cycle thinking effort level
833
+ */
834
+ effort_cycle?: string;
819
835
  /**
820
836
  * Clear input field
821
837
  */
@@ -992,7 +1008,15 @@ export type KeybindsConfig = {
992
1008
  * Toggle terminal title
993
1009
  */
994
1010
  terminal_title_toggle?: string;
1011
+ /**
1012
+ * Toggle tips on home screen
1013
+ */
1014
+ tips_toggle?: string;
995
1015
  };
1016
+ /**
1017
+ * Log level
1018
+ */
1019
+ export type LogLevel = "DEBUG" | "INFO" | "WARN" | "ERROR";
996
1020
  export type AgentConfig = {
997
1021
  model?: string;
998
1022
  temperature?: number;
@@ -1194,6 +1218,7 @@ export type Config = {
1194
1218
  */
1195
1219
  theme?: string;
1196
1220
  keybinds?: KeybindsConfig;
1221
+ logLevel?: LogLevel;
1197
1222
  /**
1198
1223
  * TUI specific settings
1199
1224
  */
@@ -2511,6 +2536,9 @@ export type SessionPromptData = {
2511
2536
  [key: string]: boolean;
2512
2537
  };
2513
2538
  system?: string;
2539
+ thinking?: {
2540
+ effort: "default" | "medium" | "high";
2541
+ };
2514
2542
  parts: Array<TextPartInput | FilePartInput | AgentPartInput | SubtaskPartInput>;
2515
2543
  };
2516
2544
  path: {
@@ -2674,6 +2702,9 @@ export type SessionPromptAsyncData = {
2674
2702
  [key: string]: boolean;
2675
2703
  };
2676
2704
  system?: string;
2705
+ thinking?: {
2706
+ effort: "default" | "medium" | "high";
2707
+ };
2677
2708
  parts: Array<TextPartInput | FilePartInput | AgentPartInput | SubtaskPartInput>;
2678
2709
  };
2679
2710
  path: {
package/dist/v2/server.js CHANGED
@@ -5,7 +5,10 @@ export async function createOpencodeServer(options) {
5
5
  port: 4096,
6
6
  timeout: 5000,
7
7
  }, options ?? {});
8
- const proc = spawn(`opencode`, [`serve`, `--hostname=${options.hostname}`, `--port=${options.port}`], {
8
+ const args = [`serve`, `--hostname=${options.hostname}`, `--port=${options.port}`];
9
+ if (options.config?.logLevel)
10
+ args.push(`--log-level=${options.config.logLevel}`);
11
+ const proc = spawn(`opencode`, args, {
9
12
  signal: options.signal,
10
13
  env: {
11
14
  ...process.env,
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://json.schemastore.org/package.json",
3
3
  "name": "@opencode-ai/sdk",
4
- "version": "0.0.0-snapshot-terminal-title-animation-202512231827",
4
+ "version": "0.0.0-snapshot-thinking-toggle-202512290017",
5
5
  "type": "module",
6
6
  "scripts": {
7
7
  "typecheck": "tsgo --noEmit",