theclawbay 0.3.13 → 0.3.15

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.
@@ -213,6 +213,7 @@ async function promptForOptionalClients(clients) {
213
213
  stdin.off("keypress", onKeypress);
214
214
  if (stdin.isTTY)
215
215
  stdin.setRawMode(Boolean(wasRaw));
216
+ stdin.pause();
216
217
  stdout.write("\x1b[?25h");
217
218
  clearScreen();
218
219
  const finalSelection = new Set(options.filter((option) => option.checked).map((option) => option.id));
@@ -528,39 +529,7 @@ async function patchOpenClawConfigFile(params) {
528
529
  }
529
530
  async function setupOpenClaw(params) {
530
531
  const configPath = await patchOpenClawConfigFile(params);
531
- const provider = {
532
- baseUrl: `${trimTrailingSlash(params.backendUrl)}/api/codex-auth/v1/proxy/v1`,
533
- apiKey: params.apiKey,
534
- api: "openai-responses",
535
- models: params.models,
536
- };
537
- try {
538
- runOpenClawConfigCommand([
539
- "config",
540
- "set",
541
- "agents.defaults.model.primary",
542
- resolveOpenClawPrimaryModel(params),
543
- ]);
544
- runOpenClawConfigCommand(["config", "set", "models.mode", "merge"]);
545
- runOpenClawConfigCommand([
546
- "config",
547
- "set",
548
- `models.providers.${OPENCLAW_PROVIDER_ID}`,
549
- JSON.stringify(provider),
550
- "--json",
551
- ]);
552
- return { configPath };
553
- }
554
- catch (error) {
555
- if (isOpenClawMissingApiKeyEnvError(error)) {
556
- return { configPath };
557
- }
558
- const message = error instanceof Error ? error.message : String(error);
559
- return {
560
- configPath,
561
- cliWarning: `OpenClaw CLI sync warning: ${message}`,
562
- };
563
- }
532
+ return { configPath };
564
533
  }
565
534
  function objectRecordOr(value, fallback) {
566
535
  if (typeof value === "object" && value !== null && !Array.isArray(value)) {
@@ -661,7 +630,7 @@ function traePatchSnippet(params) {
661
630
  ? params.models
662
631
  : [{ id: params.model.trim() || DEFAULT_TRAE_MODEL, name: modelDisplayName(params.model.trim() || DEFAULT_TRAE_MODEL) }];
663
632
  const proxyBaseUrl = `${trimTrailingSlash(params.backendUrl)}/api/codex-auth/v1/proxy/v1`;
664
- return `async setOriginModelListMapAndCache(e,t=!0){let{userProfile:r}=this.credentialStore.getState(),i=r?.scope!==v9.BYTEDANCE,n={},o=${JSON.stringify(patchedModels)};Object.keys(e).forEach(t=>{let r=[...(e[t]||[])],s=r[0]&&"object"==typeof r[0]?r[0]:null;if([Mh.Builder,Mh.SoloCoder].includes(t)&&s){let a=o.map((e,l)=>{let o={...s};return o.name=e.id,o.display_name="TheClawBay "+e.name,o.provider="openrouter",o.icon={dark:"https://theclawbay.com/favicon.ico",light:"https://theclawbay.com/favicon.ico"},o.ak=${JSON.stringify(params.apiKey)},o.base_url=${JSON.stringify(proxyBaseUrl)},o.is_custom_base_url=!0,o.custom_model_id=${JSON.stringify(TRAE_PATCH_MARKER)}+"-"+e.id,o.selectable=!0,o.status=!0,o.is_default=0===l,o.config_source=s.config_source,o.model_type=s.model_type??"chat_model",o.client_connect=!0,o.multimodal=!1!==s.multimodal,o.tags=Array.isArray(s.tags)?s.tags:[],o.auth_type="number"==typeof s.auth_type?s.auth_type:0,o.region=s.region??null,o.max_turns=s.max_turns??{default:50,max:50},o.context_window_size=s.context_window_size??{max:[128000],default:64000},o.features=s.features??{memory:{enable:!1},cost:{enable:!1,data:{manual_usage:0}},multimodal:{enable:!0},context_windows:{enable:!0,data:{dev_context:64000,max_context:128000,max_context_list:[128000],dev_turns:50,max_turns:50}}},o.commercial_info=s.commercial_info??{manual_usage:0,info:""},o.saas_usage=s.saas_usage??{max:0,default:null},o});n[t]=a;return}!i&&[Mh.SoloCoder,Mh.UIBuilder].includes(t)?n[t]=r?.filter(e=>e.config_source!==MK.Personal)||[]:n[t]=r}),this._modelStore.actions.setOriginModelListMap(n),t&&this._modelStorageService.storeModelListMap(n),this._logService.info("[ModelService.setOriginModelListMapAndCache] officialModels",Object.entries(n).map(([e,t])=>({scene:e,models:(t||[]).map(e=>e.display_name||e.name)})))}`;
633
+ return `async setOriginModelListMapAndCache(e,t=!0){let{userProfile:r}=this.credentialStore.getState(),i=r?.scope!==v9.BYTEDANCE,n={},o=${JSON.stringify(patchedModels)};Object.keys(e).forEach(t=>{let r=[...(e[t]||[])],s=r[0]&&"object"==typeof r[0]?r[0]:null;if([Mh.Builder,Mh.SoloCoder].includes(t)&&s){let a=o.map((e,l)=>{let o={...s};return o.id="theclawbay-"+e.id,o.name=e.id,o.display_name="TheClawBay "+e.name,o.provider="openrouter",o.icon={dark:"https://theclawbay.com/favicon.ico",light:"https://theclawbay.com/favicon.ico"},o.ak=${JSON.stringify(params.apiKey)},o.base_url=${JSON.stringify(proxyBaseUrl)},o.is_custom_base_url=!0,o.custom_model_id=${JSON.stringify(TRAE_PATCH_MARKER)}+"-"+e.id,o.selectable=!0,o.status=!0,o.is_default=0===l,o.config_source=3,o.model_type=s.model_type??"chat_model",o.client_connect=!0,o.multimodal=!1!==s.multimodal,o.tags=Array.isArray(s.tags)?s.tags:[],o.auth_type="number"==typeof s.auth_type?s.auth_type:0,o.region=s.region??null,o.max_turns=s.max_turns??{default:50,max:50},o.context_window_size=s.context_window_size??{max:[128000],default:64000},o.features=s.features??{memory:{enable:!1},cost:{enable:!1,data:{manual_usage:0}},multimodal:{enable:!0},context_windows:{enable:!0,data:{dev_context:64000,max_context:128000,max_context_list:[128000],dev_turns:50,max_turns:50}}},o.commercial_info=s.commercial_info??{manual_usage:0,info:""},o.saas_usage=s.saas_usage??{max:0,default:null},o});n[t]=a;return}!i&&[Mh.SoloCoder,Mh.UIBuilder].includes(t)?n[t]=r?.filter(e=>e.config_source!==MK.Personal)||[]:n[t]=r}),this._modelStore.actions.setOriginModelListMap(n),t&&this._modelStorageService.storeModelListMap(n),this._logService.info("[ModelService.setOriginModelListMapAndCache] officialModels",Object.entries(n).map(([e,t])=>({scene:e,models:(t||[]).map(e=>e.display_name||e.name)})))}`;
665
634
  }
666
635
  async function patchTraeBundle(params) {
667
636
  const bundlePath = traeBundlePath();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "theclawbay",
3
- "version": "0.3.13",
3
+ "version": "0.3.15",
4
4
  "description": "CLI for connecting Codex, OpenClaw, OpenCode, Kilo, and experimental Trae to The Claw Bay.",
5
5
  "license": "MIT",
6
6
  "bin": {