@codelia/runtime 0.1.22 → 0.1.25

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.
Files changed (3) hide show
  1. package/dist/index.cjs +134 -28
  2. package/dist/index.js +134 -28
  3. package/package.json +9 -9
package/dist/index.cjs CHANGED
@@ -734,7 +734,15 @@ var resolveModelConfig = async (workingDir) => {
734
734
  provider: effective.model?.provider,
735
735
  name: effective.model?.name,
736
736
  reasoning: effective.model?.reasoning,
737
- verbosity: effective.model?.verbosity
737
+ verbosity: effective.model?.verbosity,
738
+ experimental: effective.experimental
739
+ };
740
+ };
741
+ var resolveTuiConfig = async (workingDir) => {
742
+ const { globalConfig, projectConfig } = await loadConfigLayers(workingDir);
743
+ const effective = import_config.configRegistry.resolve([globalConfig, projectConfig]);
744
+ return {
745
+ theme: effective.tui?.theme
738
746
  };
739
747
  };
740
748
  var resolvePermissionsConfig = async (workingDir) => {
@@ -896,19 +904,27 @@ var updateTuiTheme = async (workingDir, theme) => {
896
904
  return target;
897
905
  };
898
906
  var resolveReasoningEffort = (value) => {
899
- return resolveModelLevelOption(value, "model.reasoning");
907
+ return resolveModelLevelOption(value, "model.reasoning", {
908
+ allowXhigh: true
909
+ });
900
910
  };
901
911
  var resolveTextVerbosity = (value) => {
902
- return resolveModelLevelOption(value, "model.verbosity");
912
+ return resolveModelLevelOption(value, "model.verbosity", {
913
+ allowXhigh: false
914
+ });
903
915
  };
904
- var resolveModelLevelOption = (value, fieldName) => {
916
+ function resolveModelLevelOption(value, fieldName, options) {
905
917
  if (!value) return void 0;
906
918
  const normalized = value.trim().toLowerCase();
907
919
  if (normalized === "low" || normalized === "medium" || normalized === "high") {
908
920
  return normalized;
909
921
  }
910
- throw new Error(`Invalid ${fieldName}: ${value}. Expected low|medium|high.`);
911
- };
922
+ if (options.allowXhigh && normalized === "xhigh") {
923
+ return normalized;
924
+ }
925
+ const expected = options.allowXhigh ? "low|medium|high|xhigh" : "low|medium|high";
926
+ throw new Error(`Invalid ${fieldName}: ${value}. Expected ${expected}.`);
927
+ }
912
928
  var loadSystemPrompt = async (workingDir) => {
913
929
  const promptPath = process.env.CODELIA_SYSTEM_PROMPT_PATH ? import_node_path2.default.resolve(process.env.CODELIA_SYSTEM_PROMPT_PATH) : (0, import_core.getDefaultSystemPromptPath)();
914
930
  try {
@@ -5036,10 +5052,15 @@ var buildOpenAiClientOptions = (authResolver, auth) => {
5036
5052
  },
5037
5053
  { preconnect: fetch.preconnect }
5038
5054
  );
5055
+ const defaultHeaders = {};
5056
+ if (accountId) {
5057
+ defaultHeaders["ChatGPT-Account-ID"] = accountId;
5058
+ }
5039
5059
  return {
5040
5060
  apiKey,
5041
5061
  baseURL: OPENAI_OAUTH_BASE_URL,
5042
- fetch: fetchWithAccount
5062
+ fetch: fetchWithAccount,
5063
+ ...Object.keys(defaultHeaders).length > 0 ? { defaultHeaders } : {}
5043
5064
  };
5044
5065
  };
5045
5066
  var buildOpenRouterClientOptions = (auth) => {
@@ -5373,11 +5394,13 @@ var createAgentFactory = (state, options = {}) => {
5373
5394
  case "openai": {
5374
5395
  const reasoningEffort = resolveReasoningEffort(modelConfig.reasoning);
5375
5396
  const textVerbosity = resolveTextVerbosity(modelConfig.verbosity);
5397
+ const websocketMode = modelConfig.experimental?.openai?.websocket_mode;
5376
5398
  llm = new import_core18.ChatOpenAI({
5377
5399
  clientOptions: buildOpenAiClientOptions(authResolver, providerAuth),
5378
5400
  ...modelConfig.name ? { model: modelConfig.name } : {},
5379
5401
  ...reasoningEffort ? { reasoningEffort } : {},
5380
- ...textVerbosity ? { textVerbosity } : {}
5402
+ ...textVerbosity ? { textVerbosity } : {},
5403
+ ...websocketMode ? { websocketMode } : {}
5381
5404
  });
5382
5405
  break;
5383
5406
  }
@@ -7548,6 +7571,11 @@ var DEBUG_MAX_CONTENT_CHARS = 2e3;
7548
7571
  var DEBUG_MAX_LOG_CHARS = 2e4;
7549
7572
  var DEBUG_MAX_EVENT_RESULT_CHARS = 500;
7550
7573
  var DEBUG_MAX_EVENT_ARGS_CHARS = 2e3;
7574
+ var DEBUG_ERROR_MESSAGE_MAX_CHARS = 2e3;
7575
+ var DEBUG_ERROR_STACK_MAX_CHARS = 8e3;
7576
+ var DEBUG_ERROR_CHAIN_MAX_CHARS = 4e3;
7577
+ var DEBUG_ERROR_EXTRAS_MAX_CHARS = 4e3;
7578
+ var DEBUG_PROVIDER_META_STRING_MAX_CHARS = 80;
7551
7579
  var truncateText2 = (value, maxChars) => {
7552
7580
  if (value.length <= maxChars) return value;
7553
7581
  return `${value.slice(0, maxChars)}...[truncated]`;
@@ -7712,6 +7740,93 @@ var normalizeToolCallHistory = (messages) => {
7712
7740
  }
7713
7741
  return changed ? normalized : messages;
7714
7742
  };
7743
+ var formatErrorForDebugLog = (error) => {
7744
+ const parts = [];
7745
+ parts.push(`name=${error.name}`);
7746
+ parts.push(
7747
+ `message=${truncateText2(error.message, DEBUG_ERROR_MESSAGE_MAX_CHARS)}`
7748
+ );
7749
+ if (error.stack) {
7750
+ parts.push(`stack=${truncateText2(error.stack, DEBUG_ERROR_STACK_MAX_CHARS)}`);
7751
+ }
7752
+ const causeChain = [];
7753
+ let depth = 0;
7754
+ let current = error.cause;
7755
+ const seen = /* @__PURE__ */ new Set();
7756
+ while (current !== void 0 && current !== null && depth < 4) {
7757
+ if (seen.has(current)) {
7758
+ causeChain.push("[circular]");
7759
+ break;
7760
+ }
7761
+ seen.add(current);
7762
+ if (current instanceof Error) {
7763
+ causeChain.push(`${current.name}: ${current.message}`);
7764
+ current = current.cause;
7765
+ depth += 1;
7766
+ continue;
7767
+ }
7768
+ causeChain.push(stringifyUnknown(current));
7769
+ break;
7770
+ }
7771
+ if (causeChain.length > 0) {
7772
+ parts.push(
7773
+ `cause_chain=${truncateText2(causeChain.join(" <- "), DEBUG_ERROR_CHAIN_MAX_CHARS)}`
7774
+ );
7775
+ }
7776
+ const extras = Object.entries(
7777
+ error
7778
+ ).filter(([key]) => key !== "name" && key !== "message" && key !== "stack");
7779
+ if (extras.length > 0) {
7780
+ parts.push(
7781
+ `extras=${truncateText2(
7782
+ stringifyUnknown(Object.fromEntries(extras)),
7783
+ DEBUG_ERROR_EXTRAS_MAX_CHARS
7784
+ )}`
7785
+ );
7786
+ }
7787
+ return parts.join(" ");
7788
+ };
7789
+ var summarizeProviderMeta = (value) => {
7790
+ if (value === null || value === void 0) {
7791
+ return null;
7792
+ }
7793
+ if (typeof value === "string") {
7794
+ return value.length > DEBUG_PROVIDER_META_STRING_MAX_CHARS ? `${value.slice(0, DEBUG_PROVIDER_META_STRING_MAX_CHARS - 3)}...` : value;
7795
+ }
7796
+ if (Array.isArray(value)) {
7797
+ return `array(len=${value.length})`;
7798
+ }
7799
+ if (typeof value === "object") {
7800
+ const obj = value;
7801
+ const details = [];
7802
+ if (typeof obj.transport === "string") {
7803
+ details.push(`transport=${obj.transport}`);
7804
+ }
7805
+ if (typeof obj.websocket_mode === "string") {
7806
+ details.push(`websocket_mode=${obj.websocket_mode}`);
7807
+ }
7808
+ if (typeof obj.response_id === "string") {
7809
+ details.push(`response_id=${obj.response_id}`);
7810
+ }
7811
+ if (typeof obj.chain_reset === "boolean") {
7812
+ details.push(`chain_reset=${obj.chain_reset ? "true" : "false"}`);
7813
+ }
7814
+ if (typeof obj.fallback_used === "boolean") {
7815
+ details.push(`fallback_used=${obj.fallback_used ? "true" : "false"}`);
7816
+ }
7817
+ if (typeof obj.ws_input_mode === "string") {
7818
+ details.push(`ws_input_mode=${obj.ws_input_mode}`);
7819
+ }
7820
+ if (details.length > 0) {
7821
+ return details.join(" ");
7822
+ }
7823
+ const keys = Object.keys(obj);
7824
+ if (keys.length === 0) return "object";
7825
+ const shown = keys.slice(0, 4).join(",");
7826
+ return keys.length > 4 ? `object(keys=${shown},...)` : `object(keys=${shown})`;
7827
+ }
7828
+ return typeof value;
7829
+ };
7715
7830
  var isAbortLikeError = (error) => error.name === "AbortError" || error.name === "APIUserAbortError" || error.name === "AbortSignal" || /aborted|abort/i.test(error.message);
7716
7831
 
7717
7832
  // src/rpc/skill-mentions.ts
@@ -7846,24 +7961,6 @@ var toTimestampMs = (value) => {
7846
7961
  const ms = Date.parse(value);
7847
7962
  return Number.isFinite(ms) ? ms : null;
7848
7963
  };
7849
- var summarizeProviderMeta = (value) => {
7850
- if (value === null || value === void 0) {
7851
- return null;
7852
- }
7853
- if (typeof value === "string") {
7854
- return value.length > 80 ? `${value.slice(0, 77)}...` : value;
7855
- }
7856
- if (Array.isArray(value)) {
7857
- return `array(len=${value.length})`;
7858
- }
7859
- if (typeof value === "object") {
7860
- const keys = Object.keys(value);
7861
- if (keys.length === 0) return "object";
7862
- const shown = keys.slice(0, 4).join(",");
7863
- return keys.length > 4 ? `object(keys=${shown},...)` : `object(keys=${shown})`;
7864
- }
7865
- return typeof value;
7866
- };
7867
7964
  var createRunHandlers = ({
7868
7965
  state,
7869
7966
  getAgent,
@@ -8248,6 +8345,7 @@ var createRunHandlers = ({
8248
8345
  emitRunEnd(runId, "cancelled", finalResponse);
8249
8346
  return;
8250
8347
  }
8348
+ logRunDebug(log2, runId, `stream.error ${formatErrorForDebugLog(err)}`);
8251
8349
  await queueSessionSave("error");
8252
8350
  emitRunSummaryDiagnostics();
8253
8351
  emitRunStatus(runId, "error", err.message);
@@ -8907,7 +9005,14 @@ var createRuntimeHandlers = ({
8907
9005
  state,
8908
9006
  log: log2
8909
9007
  });
8910
- const handleInitialize = (id, params) => {
9008
+ const handleInitialize = async (id, params) => {
9009
+ let resolvedTheme;
9010
+ try {
9011
+ const workingDir = state.lastUiContext?.cwd ?? state.runtimeWorkingDir ?? process.cwd();
9012
+ resolvedTheme = (await resolveTuiConfig(workingDir)).theme;
9013
+ } catch (error) {
9014
+ log2(`initialize tui config load failed: ${String(error)}`);
9015
+ }
8911
9016
  const result = {
8912
9017
  protocol_version: PROTOCOL_VERSION,
8913
9018
  server: { name: SERVER_NAME, version: SERVER_VERSION },
@@ -8922,7 +9027,8 @@ var createRuntimeHandlers = ({
8922
9027
  supports_tool_call: true,
8923
9028
  supports_theme_set: true,
8924
9029
  supports_permission_preflight_events: true
8925
- }
9030
+ },
9031
+ ...resolvedTheme ? { tui: { theme: resolvedTheme } } : {}
8926
9032
  };
8927
9033
  sendResult(id, result);
8928
9034
  log2(`initialize from ${params.client?.name ?? "unknown"}`);
package/dist/index.js CHANGED
@@ -724,7 +724,15 @@ var resolveModelConfig = async (workingDir) => {
724
724
  provider: effective.model?.provider,
725
725
  name: effective.model?.name,
726
726
  reasoning: effective.model?.reasoning,
727
- verbosity: effective.model?.verbosity
727
+ verbosity: effective.model?.verbosity,
728
+ experimental: effective.experimental
729
+ };
730
+ };
731
+ var resolveTuiConfig = async (workingDir) => {
732
+ const { globalConfig, projectConfig } = await loadConfigLayers(workingDir);
733
+ const effective = configRegistry.resolve([globalConfig, projectConfig]);
734
+ return {
735
+ theme: effective.tui?.theme
728
736
  };
729
737
  };
730
738
  var resolvePermissionsConfig = async (workingDir) => {
@@ -886,19 +894,27 @@ var updateTuiTheme = async (workingDir, theme) => {
886
894
  return target;
887
895
  };
888
896
  var resolveReasoningEffort = (value) => {
889
- return resolveModelLevelOption(value, "model.reasoning");
897
+ return resolveModelLevelOption(value, "model.reasoning", {
898
+ allowXhigh: true
899
+ });
890
900
  };
891
901
  var resolveTextVerbosity = (value) => {
892
- return resolveModelLevelOption(value, "model.verbosity");
902
+ return resolveModelLevelOption(value, "model.verbosity", {
903
+ allowXhigh: false
904
+ });
893
905
  };
894
- var resolveModelLevelOption = (value, fieldName) => {
906
+ function resolveModelLevelOption(value, fieldName, options) {
895
907
  if (!value) return void 0;
896
908
  const normalized = value.trim().toLowerCase();
897
909
  if (normalized === "low" || normalized === "medium" || normalized === "high") {
898
910
  return normalized;
899
911
  }
900
- throw new Error(`Invalid ${fieldName}: ${value}. Expected low|medium|high.`);
901
- };
912
+ if (options.allowXhigh && normalized === "xhigh") {
913
+ return normalized;
914
+ }
915
+ const expected = options.allowXhigh ? "low|medium|high|xhigh" : "low|medium|high";
916
+ throw new Error(`Invalid ${fieldName}: ${value}. Expected ${expected}.`);
917
+ }
902
918
  var loadSystemPrompt = async (workingDir) => {
903
919
  const promptPath = process.env.CODELIA_SYSTEM_PROMPT_PATH ? path2.resolve(process.env.CODELIA_SYSTEM_PROMPT_PATH) : getDefaultSystemPromptPath();
904
920
  try {
@@ -5026,10 +5042,15 @@ var buildOpenAiClientOptions = (authResolver, auth) => {
5026
5042
  },
5027
5043
  { preconnect: fetch.preconnect }
5028
5044
  );
5045
+ const defaultHeaders = {};
5046
+ if (accountId) {
5047
+ defaultHeaders["ChatGPT-Account-ID"] = accountId;
5048
+ }
5029
5049
  return {
5030
5050
  apiKey,
5031
5051
  baseURL: OPENAI_OAUTH_BASE_URL,
5032
- fetch: fetchWithAccount
5052
+ fetch: fetchWithAccount,
5053
+ ...Object.keys(defaultHeaders).length > 0 ? { defaultHeaders } : {}
5033
5054
  };
5034
5055
  };
5035
5056
  var buildOpenRouterClientOptions = (auth) => {
@@ -5363,11 +5384,13 @@ var createAgentFactory = (state, options = {}) => {
5363
5384
  case "openai": {
5364
5385
  const reasoningEffort = resolveReasoningEffort(modelConfig.reasoning);
5365
5386
  const textVerbosity = resolveTextVerbosity(modelConfig.verbosity);
5387
+ const websocketMode = modelConfig.experimental?.openai?.websocket_mode;
5366
5388
  llm = new ChatOpenAI({
5367
5389
  clientOptions: buildOpenAiClientOptions(authResolver, providerAuth),
5368
5390
  ...modelConfig.name ? { model: modelConfig.name } : {},
5369
5391
  ...reasoningEffort ? { reasoningEffort } : {},
5370
- ...textVerbosity ? { textVerbosity } : {}
5392
+ ...textVerbosity ? { textVerbosity } : {},
5393
+ ...websocketMode ? { websocketMode } : {}
5371
5394
  });
5372
5395
  break;
5373
5396
  }
@@ -7564,6 +7587,11 @@ var DEBUG_MAX_CONTENT_CHARS = 2e3;
7564
7587
  var DEBUG_MAX_LOG_CHARS = 2e4;
7565
7588
  var DEBUG_MAX_EVENT_RESULT_CHARS = 500;
7566
7589
  var DEBUG_MAX_EVENT_ARGS_CHARS = 2e3;
7590
+ var DEBUG_ERROR_MESSAGE_MAX_CHARS = 2e3;
7591
+ var DEBUG_ERROR_STACK_MAX_CHARS = 8e3;
7592
+ var DEBUG_ERROR_CHAIN_MAX_CHARS = 4e3;
7593
+ var DEBUG_ERROR_EXTRAS_MAX_CHARS = 4e3;
7594
+ var DEBUG_PROVIDER_META_STRING_MAX_CHARS = 80;
7567
7595
  var truncateText2 = (value, maxChars) => {
7568
7596
  if (value.length <= maxChars) return value;
7569
7597
  return `${value.slice(0, maxChars)}...[truncated]`;
@@ -7728,6 +7756,93 @@ var normalizeToolCallHistory = (messages) => {
7728
7756
  }
7729
7757
  return changed ? normalized : messages;
7730
7758
  };
7759
+ var formatErrorForDebugLog = (error) => {
7760
+ const parts = [];
7761
+ parts.push(`name=${error.name}`);
7762
+ parts.push(
7763
+ `message=${truncateText2(error.message, DEBUG_ERROR_MESSAGE_MAX_CHARS)}`
7764
+ );
7765
+ if (error.stack) {
7766
+ parts.push(`stack=${truncateText2(error.stack, DEBUG_ERROR_STACK_MAX_CHARS)}`);
7767
+ }
7768
+ const causeChain = [];
7769
+ let depth = 0;
7770
+ let current = error.cause;
7771
+ const seen = /* @__PURE__ */ new Set();
7772
+ while (current !== void 0 && current !== null && depth < 4) {
7773
+ if (seen.has(current)) {
7774
+ causeChain.push("[circular]");
7775
+ break;
7776
+ }
7777
+ seen.add(current);
7778
+ if (current instanceof Error) {
7779
+ causeChain.push(`${current.name}: ${current.message}`);
7780
+ current = current.cause;
7781
+ depth += 1;
7782
+ continue;
7783
+ }
7784
+ causeChain.push(stringifyUnknown(current));
7785
+ break;
7786
+ }
7787
+ if (causeChain.length > 0) {
7788
+ parts.push(
7789
+ `cause_chain=${truncateText2(causeChain.join(" <- "), DEBUG_ERROR_CHAIN_MAX_CHARS)}`
7790
+ );
7791
+ }
7792
+ const extras = Object.entries(
7793
+ error
7794
+ ).filter(([key]) => key !== "name" && key !== "message" && key !== "stack");
7795
+ if (extras.length > 0) {
7796
+ parts.push(
7797
+ `extras=${truncateText2(
7798
+ stringifyUnknown(Object.fromEntries(extras)),
7799
+ DEBUG_ERROR_EXTRAS_MAX_CHARS
7800
+ )}`
7801
+ );
7802
+ }
7803
+ return parts.join(" ");
7804
+ };
7805
+ var summarizeProviderMeta = (value) => {
7806
+ if (value === null || value === void 0) {
7807
+ return null;
7808
+ }
7809
+ if (typeof value === "string") {
7810
+ return value.length > DEBUG_PROVIDER_META_STRING_MAX_CHARS ? `${value.slice(0, DEBUG_PROVIDER_META_STRING_MAX_CHARS - 3)}...` : value;
7811
+ }
7812
+ if (Array.isArray(value)) {
7813
+ return `array(len=${value.length})`;
7814
+ }
7815
+ if (typeof value === "object") {
7816
+ const obj = value;
7817
+ const details = [];
7818
+ if (typeof obj.transport === "string") {
7819
+ details.push(`transport=${obj.transport}`);
7820
+ }
7821
+ if (typeof obj.websocket_mode === "string") {
7822
+ details.push(`websocket_mode=${obj.websocket_mode}`);
7823
+ }
7824
+ if (typeof obj.response_id === "string") {
7825
+ details.push(`response_id=${obj.response_id}`);
7826
+ }
7827
+ if (typeof obj.chain_reset === "boolean") {
7828
+ details.push(`chain_reset=${obj.chain_reset ? "true" : "false"}`);
7829
+ }
7830
+ if (typeof obj.fallback_used === "boolean") {
7831
+ details.push(`fallback_used=${obj.fallback_used ? "true" : "false"}`);
7832
+ }
7833
+ if (typeof obj.ws_input_mode === "string") {
7834
+ details.push(`ws_input_mode=${obj.ws_input_mode}`);
7835
+ }
7836
+ if (details.length > 0) {
7837
+ return details.join(" ");
7838
+ }
7839
+ const keys = Object.keys(obj);
7840
+ if (keys.length === 0) return "object";
7841
+ const shown = keys.slice(0, 4).join(",");
7842
+ return keys.length > 4 ? `object(keys=${shown},...)` : `object(keys=${shown})`;
7843
+ }
7844
+ return typeof value;
7845
+ };
7731
7846
  var isAbortLikeError = (error) => error.name === "AbortError" || error.name === "APIUserAbortError" || error.name === "AbortSignal" || /aborted|abort/i.test(error.message);
7732
7847
 
7733
7848
  // src/rpc/skill-mentions.ts
@@ -7862,24 +7977,6 @@ var toTimestampMs = (value) => {
7862
7977
  const ms = Date.parse(value);
7863
7978
  return Number.isFinite(ms) ? ms : null;
7864
7979
  };
7865
- var summarizeProviderMeta = (value) => {
7866
- if (value === null || value === void 0) {
7867
- return null;
7868
- }
7869
- if (typeof value === "string") {
7870
- return value.length > 80 ? `${value.slice(0, 77)}...` : value;
7871
- }
7872
- if (Array.isArray(value)) {
7873
- return `array(len=${value.length})`;
7874
- }
7875
- if (typeof value === "object") {
7876
- const keys = Object.keys(value);
7877
- if (keys.length === 0) return "object";
7878
- const shown = keys.slice(0, 4).join(",");
7879
- return keys.length > 4 ? `object(keys=${shown},...)` : `object(keys=${shown})`;
7880
- }
7881
- return typeof value;
7882
- };
7883
7980
  var createRunHandlers = ({
7884
7981
  state,
7885
7982
  getAgent,
@@ -8264,6 +8361,7 @@ var createRunHandlers = ({
8264
8361
  emitRunEnd(runId, "cancelled", finalResponse);
8265
8362
  return;
8266
8363
  }
8364
+ logRunDebug(log2, runId, `stream.error ${formatErrorForDebugLog(err)}`);
8267
8365
  await queueSessionSave("error");
8268
8366
  emitRunSummaryDiagnostics();
8269
8367
  emitRunStatus(runId, "error", err.message);
@@ -8929,7 +9027,14 @@ var createRuntimeHandlers = ({
8929
9027
  state,
8930
9028
  log: log2
8931
9029
  });
8932
- const handleInitialize = (id, params) => {
9030
+ const handleInitialize = async (id, params) => {
9031
+ let resolvedTheme;
9032
+ try {
9033
+ const workingDir = state.lastUiContext?.cwd ?? state.runtimeWorkingDir ?? process.cwd();
9034
+ resolvedTheme = (await resolveTuiConfig(workingDir)).theme;
9035
+ } catch (error) {
9036
+ log2(`initialize tui config load failed: ${String(error)}`);
9037
+ }
8933
9038
  const result = {
8934
9039
  protocol_version: PROTOCOL_VERSION,
8935
9040
  server: { name: SERVER_NAME, version: SERVER_VERSION },
@@ -8944,7 +9049,8 @@ var createRuntimeHandlers = ({
8944
9049
  supports_tool_call: true,
8945
9050
  supports_theme_set: true,
8946
9051
  supports_permission_preflight_events: true
8947
- }
9052
+ },
9053
+ ...resolvedTheme ? { tui: { theme: resolvedTheme } } : {}
8948
9054
  };
8949
9055
  sendResult(id, result);
8950
9056
  log2(`initialize from ${params.client?.name ?? "unknown"}`);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@codelia/runtime",
3
- "version": "0.1.22",
3
+ "version": "0.1.25",
4
4
  "type": "module",
5
5
  "engines": {
6
6
  "node": ">=20 <25"
@@ -23,14 +23,14 @@
23
23
  "typecheck": "tsc --noEmit"
24
24
  },
25
25
  "dependencies": {
26
- "@codelia/config": "0.1.22",
27
- "@codelia/config-loader": "0.1.22",
28
- "@codelia/core": "0.1.22",
29
- "@codelia/logger": "0.1.22",
30
- "@codelia/model-metadata": "0.1.22",
31
- "@codelia/protocol": "0.1.22",
32
- "@codelia/shared-types": "0.1.22",
33
- "@codelia/storage": "0.1.22",
26
+ "@codelia/config": "0.1.25",
27
+ "@codelia/config-loader": "0.1.25",
28
+ "@codelia/core": "0.1.25",
29
+ "@codelia/logger": "0.1.25",
30
+ "@codelia/model-metadata": "0.1.25",
31
+ "@codelia/protocol": "0.1.25",
32
+ "@codelia/shared-types": "0.1.25",
33
+ "@codelia/storage": "0.1.25",
34
34
  "eventsource-parser": "^3.0.6",
35
35
  "oauth4webapi": "^3.8.4",
36
36
  "zod": "^4.3.5"