@chibitek/chibi 0.1.208 → 0.1.210

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 (145) hide show
  1. package/dist/assets/{TerminalPanel-B5bwdaJ5.js → TerminalPanel-DxQoOfkY.js} +1 -1
  2. package/dist/assets/{abnfDiagram-O67JEVCF-BLKuHvdS.js → abnfDiagram-O67JEVCF-Ds2qYdjS.js} +1 -1
  3. package/dist/assets/{arc-BeOf3Y3d.js → arc-1O9tchZk.js} +1 -1
  4. package/dist/assets/{architectureDiagram-NJMV4G6O-DnXr729a.js → architectureDiagram-NJMV4G6O-CWuQ1x2F.js} +1 -1
  5. package/dist/assets/{blockDiagram-BEXU5L5S-CEiwrTaI.js → blockDiagram-BEXU5L5S-CNcEkXEx.js} +1 -1
  6. package/dist/assets/{c4Diagram-YGBWAQC7-C0-29khR.js → c4Diagram-YGBWAQC7-BKI_wi9I.js} +1 -1
  7. package/dist/assets/channel-CT5xRPK0.js +1 -0
  8. package/dist/assets/{chunk-2Q5K7J3B-D8dKbbui.js → chunk-2Q5K7J3B-gO88emfN.js} +1 -1
  9. package/dist/assets/{chunk-3FUC2YCW-fAEY1oOe.js → chunk-3FUC2YCW-DbKNT_-r.js} +2 -2
  10. package/dist/assets/{chunk-5VM5RSS4-Djza4B4b.js → chunk-5VM5RSS4-BbJCoZVg.js} +1 -1
  11. package/dist/assets/{chunk-GTNCS2PH-BWFGSXNt.js → chunk-GTNCS2PH-DXurSCcp.js} +1 -1
  12. package/dist/assets/{chunk-GWA4HPMP-BGo5oevY.js → chunk-GWA4HPMP-BWyt0I_m.js} +1 -1
  13. package/dist/assets/{chunk-JWPE2WC7-DIdxOMOn.js → chunk-JWPE2WC7-6iWSsogl.js} +1 -1
  14. package/dist/assets/{chunk-NETBCI7D-Dc4tJ9uD.js → chunk-NETBCI7D-CFoqO9Hw.js} +1 -1
  15. package/dist/assets/{chunk-WEXAMYUT-DvZ9F5yw.js → chunk-WEXAMYUT-BZEzAlNi.js} +1 -1
  16. package/dist/assets/{chunk-XXDRQBXY-BYUVYcxq.js → chunk-XXDRQBXY-W4hfC50f.js} +1 -1
  17. package/dist/assets/{classDiagram-v2-NBCMYWYE-BtnsJQvT.js → classDiagram-v2-NBCMYWYE-BsGmL9e7.js} +1 -1
  18. package/dist/assets/{cose-bilkent-JH36ORCC-DLDe1VHc.js → cose-bilkent-JH36ORCC-CYtTgIzk.js} +1 -1
  19. package/dist/assets/{cynefin-OW5HDTMX-a1GJE5iI.js → cynefin-OW5HDTMX-DLOi2Q2V.js} +1 -1
  20. package/dist/assets/{cynefinDiagram-VND7K2PF-DXxGLDlQ.js → cynefinDiagram-VND7K2PF-BXcXJ3hv.js} +1 -1
  21. package/dist/assets/{dagre-6A5THRUB-DAW_YZe9.js → dagre-6A5THRUB-BdBOiuzt.js} +1 -1
  22. package/dist/assets/{diagram-22UHCM2B-oq3saywD.js → diagram-22UHCM2B-DCf3M4WE.js} +1 -1
  23. package/dist/assets/{diagram-3UASUU5V-BhCP3hS9.js → diagram-3UASUU5V-CzdF-UXi.js} +1 -1
  24. package/dist/assets/{diagram-ATOU4E4O-ByFRn1dW.js → diagram-ATOU4E4O-_UmmlMOD.js} +1 -1
  25. package/dist/assets/{diagram-CDSNMT55-DWoCvkNH.js → diagram-CDSNMT55-DrQODVuX.js} +1 -1
  26. package/dist/assets/{diagram-MLGK6HIB-CSH5kSlk.js → diagram-MLGK6HIB-CE16iJlJ.js} +1 -1
  27. package/dist/assets/{diagram-MPIPVDR6-Cnpx1s-T.js → diagram-MPIPVDR6-DJuTbhbP.js} +1 -1
  28. package/dist/assets/{ebnfDiagram-ZINNZB2B-DPmX63Vg.js → ebnfDiagram-ZINNZB2B-f1VEI2Po.js} +1 -1
  29. package/dist/assets/{elk-276RUBZZ-DUtmO9kb.js → elk-276RUBZZ-BRbs9WzY.js} +1 -1
  30. package/dist/assets/{erDiagram-OPXOYQCR-SxwJeJu-.js → erDiagram-OPXOYQCR-DvMp_cQr.js} +1 -1
  31. package/dist/assets/{flowDiagram-KWPJA3E3--QZAAUjB.js → flowDiagram-KWPJA3E3-CYS1A0fu.js} +1 -1
  32. package/dist/assets/{ganttDiagram-FUAMR5RP-CRz6i2Pe.js → ganttDiagram-FUAMR5RP-qya_JE9x.js} +1 -1
  33. package/dist/assets/{gitGraphDiagram-X574FWY7-Dx9Cisl2.js → gitGraphDiagram-X574FWY7-ChMUJ3hH.js} +1 -1
  34. package/dist/assets/{index-vIsgWbJW.js → index-COH7BlyH.js} +196 -196
  35. package/dist/assets/index-H8vkXbLq.css +1 -0
  36. package/dist/assets/{index-BGkOob08.js → index-xE4Li_H2.js} +1 -1
  37. package/dist/assets/{infoDiagram-VRGFBTTK-CDLogk8N.js → infoDiagram-VRGFBTTK-B2VudqsE.js} +1 -1
  38. package/dist/assets/{ishikawaDiagram-OU5B5YK6-DsrF1wno.js → ishikawaDiagram-OU5B5YK6-Bdk47y0t.js} +1 -1
  39. package/dist/assets/{journeyDiagram-ZHPQQLJL-DUi8LEA6.js → journeyDiagram-ZHPQQLJL-A4StgNQ9.js} +1 -1
  40. package/dist/assets/{kanban-definition-PNTS6WVX-BAdWXobw.js → kanban-definition-PNTS6WVX-DZo45dQw.js} +1 -1
  41. package/dist/assets/{linear-Dha948ns.js → linear-D_rK-Ord.js} +1 -1
  42. package/dist/assets/{mermaid.core-BqT1aUP9.js → mermaid.core-C7CvDDvz.js} +5 -5
  43. package/dist/assets/{mindmap-definition-NLK3R4M7-XS1wDQ80.js → mindmap-definition-NLK3R4M7-6fmVPMyc.js} +1 -1
  44. package/dist/assets/{pegDiagram-GJSIUBJH-BphuafcF.js → pegDiagram-GJSIUBJH-CD4Qg24h.js} +1 -1
  45. package/dist/assets/{pieDiagram-5QR66LMP-JN9mbdiU.js → pieDiagram-5QR66LMP-DmzQ883B.js} +1 -1
  46. package/dist/assets/{quadrantDiagram-O4NWA36T-CkBF7Woa.js → quadrantDiagram-O4NWA36T-BW37utPZ.js} +1 -1
  47. package/dist/assets/{railroadDiagram-XR7U4H2S-Ie1GVpj5.js → railroadDiagram-XR7U4H2S-CWXiMlAb.js} +1 -1
  48. package/dist/assets/{requirementDiagram-PLB6GJNP-B8xGM6w4.js → requirementDiagram-PLB6GJNP-DHSfr9U3.js} +1 -1
  49. package/dist/assets/{sankeyDiagram-IPEJSGJF-BgTSlqMg.js → sankeyDiagram-IPEJSGJF-PebTt4eq.js} +1 -1
  50. package/dist/assets/{sequenceDiagram-PO4LG4MO-B1J4EIne.js → sequenceDiagram-PO4LG4MO-DPwp8fia.js} +1 -1
  51. package/dist/assets/{sizeCapture-INFHLROL-Cpcjc5oE.js → sizeCapture-INFHLROL-BX_46o3S.js} +1 -1
  52. package/dist/assets/{stateDiagram-v2-GCMORJYK-CtQKYLT4.js → stateDiagram-v2-GCMORJYK-W2e0RRrZ.js} +1 -1
  53. package/dist/assets/{swimlanes-2SLR337P-DpIk02zs.js → swimlanes-2SLR337P-CkyXpQX9.js} +1 -1
  54. package/dist/assets/swimlanesDiagram-TC7HE7FX-BH9Yry0J.js +8 -0
  55. package/dist/assets/{timeline-definition-EJHVYXUP-DsA7dQhy.js → timeline-definition-EJHVYXUP-BS-sCjlN.js} +1 -1
  56. package/dist/assets/{usecaseDiagram-POWQR4AR-BM42_rDz.js → usecaseDiagram-POWQR4AR-BQre-k6x.js} +1 -1
  57. package/dist/assets/{vennDiagram-UO4OBE2U-DgLtqgJF.js → vennDiagram-UO4OBE2U-CEWCsi_s.js} +1 -1
  58. package/dist/assets/{wardleyDiagram-VNRHLVJA-BKUUTKBJ.js → wardleyDiagram-VNRHLVJA-CXUxqghG.js} +1 -1
  59. package/dist/assets/{xychartDiagram-PMCCYNJV-B9RWvizV.js → xychartDiagram-PMCCYNJV-DBgVMpwp.js} +1 -1
  60. package/dist/index.html +4 -2
  61. package/dist-server/accounts-proxy.js +19 -12
  62. package/dist-server/browser-proxy.js +19 -14
  63. package/dist-server/container-mcp.js +84 -12
  64. package/dist-server/drivers/agents-proxy.js +28 -13
  65. package/dist-server/drivers/phone-proxy.js +21 -13
  66. package/dist-server/index.js +4000 -2834
  67. package/dist-server/local-computer-proxy.js +77 -11
  68. package/dist-server/local-computer.js +2 -1
  69. package/dist-server/mcp-gate.js +53 -4
  70. package/dist-server/mcp-server.js +1 -1
  71. package/dist-server/openmausbot.js +458 -93
  72. package/dist-server/pair-cli.js +458 -93
  73. package/dist-server/server/accounts-proxy.js +3 -17
  74. package/dist-server/server/atomic-engine-release.js +7 -0
  75. package/dist-server/server/browser-proxy.js +3 -17
  76. package/dist-server/server/child-env.js +79 -0
  77. package/dist-server/server/config.js +11 -5
  78. package/dist-server/server/container-computer.js +1 -1
  79. package/dist-server/server/container-mcp.js +3 -2
  80. package/dist-server/server/control-client.js +7 -6
  81. package/dist-server/server/delegated-full-access.js +98 -0
  82. package/dist-server/server/desktop-loopback-gate.js +57 -0
  83. package/dist-server/server/drivers/acp/core.js +4 -4
  84. package/dist-server/server/drivers/acp/hermes-hosts.js +9 -0
  85. package/dist-server/server/drivers/acp/hermes.js +6 -9
  86. package/dist-server/server/drivers/acp/session-key.js +8 -0
  87. package/dist-server/server/drivers/agents-client.js +2 -14
  88. package/dist-server/server/drivers/gcloud-token.js +28 -0
  89. package/dist-server/server/drivers/github-copilot.js +152 -0
  90. package/dist-server/server/drivers/openai-chat-protocol.js +8 -0
  91. package/dist-server/server/drivers/openai-chat.js +10 -8
  92. package/dist-server/server/drivers/openai-compat.js +44 -9
  93. package/dist-server/server/drivers/phone-proxy.js +5 -18
  94. package/dist-server/server/engine-tiers.js +9 -9
  95. package/dist-server/server/harness/http.js +47 -1
  96. package/dist-server/server/index.js +54 -54
  97. package/dist-server/server/ladder-pick.js +18 -0
  98. package/dist-server/server/local-computer-proxy.js +3 -2
  99. package/dist-server/server/local-computer.js +1 -0
  100. package/dist-server/server/mcp-bridge.js +3 -2
  101. package/dist-server/server/mcp-gate.js +2 -1
  102. package/dist-server/server/mcp-registry.js +5 -1
  103. package/dist-server/server/model-gateway/failover.js +4 -1
  104. package/dist-server/server/model-gateway/route.js +64 -14
  105. package/dist-server/server/model-gateway/usage.js +66 -0
  106. package/dist-server/server/model-levels/aa-scale.js +42 -0
  107. package/dist-server/server/model-levels/aliases.js +16 -3
  108. package/dist-server/server/model-levels/index.js +8 -3
  109. package/dist-server/server/model-levels/rankings-build.js +76 -0
  110. package/dist-server/server/model-prices.js +6 -0
  111. package/dist-server/server/nexus-memory/index.js +5 -13
  112. package/dist-server/server/nexus-memory/policy.js +5 -17
  113. package/dist-server/server/oauth-account-vault.js +7 -2
  114. package/dist-server/server/provider-accounts.js +20 -1
  115. package/dist-server/server/provider-key-check.js +31 -1
  116. package/dist-server/server/registry-load.js +88 -0
  117. package/dist-server/server/request-auth.js +6 -28
  118. package/dist-server/server/routes/provider-accounts.js +124 -6
  119. package/dist-server/server/routine-daily-schedule.js +20 -0
  120. package/dist-server/server/routine-prompt-escape.js +18 -0
  121. package/dist-server/server/routine-tick-guard.js +16 -0
  122. package/dist-server/server/routine-tool-problems.js +36 -0
  123. package/dist-server/server/routines.js +36 -38
  124. package/dist-server/server/shutdown-triggers.js +18 -0
  125. package/dist-server/server/spend.js +23 -13
  126. package/dist-server/server/store.js +4 -13
  127. package/dist-server/server/terminal.js +2 -1
  128. package/dist-server/server/turn-token-file.js +79 -0
  129. package/dist-server/server/turn-token.js +23 -0
  130. package/dist-server/server/vps-container-mcp.js +3 -2
  131. package/dist-server/server/webhook-ingress.js +11 -1
  132. package/dist-server/server/webhook-prompt.js +82 -0
  133. package/dist-server/server/webhooks.js +8 -65
  134. package/dist-server/server/workspace-backup-policy.js +3 -3
  135. package/dist-server/server/workspace-backup.js +1 -1
  136. package/dist-server/server/workspace-time-zone.js +47 -0
  137. package/dist-server/shared/engine-choices.js +12 -1
  138. package/dist-server/shared/engine-tiers.js +0 -12
  139. package/dist-server/shared/provider-accounts.js +114 -2
  140. package/dist-server/shared/zoned-time.js +55 -0
  141. package/dist-server/vps-container-mcp.js +84 -12
  142. package/package.json +1 -1
  143. package/dist/assets/channel-_JFliC5C.js +0 -1
  144. package/dist/assets/index-Bi3hprmz.css +0 -1
  145. package/dist/assets/swimlanesDiagram-TC7HE7FX-DPTl4zVS.js +0 -8
@@ -17180,6 +17180,23 @@ var init_provider_accounts = __esm({
17180
17180
  keyUrl: "https://z.ai/manage-apikey/apikey-list",
17181
17181
  signupUrl: "https://z.ai/subscribe"
17182
17182
  },
17183
+ {
17184
+ // GitHub Copilot (Pro, Pro+, Business, Enterprise): a subscription used
17185
+ // through a GitHub device-code sign-in. The GitHub token is kept like a
17186
+ // key; each request trades it for a short-lived Copilot token
17187
+ // (server/drivers/github-copilot.ts). Its models come from several
17188
+ // companies, so it walks with the subscriptions but gets no bot of its own.
17189
+ id: "githubCopilot",
17190
+ kind: "apiKey",
17191
+ label: "GitHub Copilot",
17192
+ billing: "subscription",
17193
+ driver: "openai-compat",
17194
+ envVar: "GITHUB_COPILOT_TOKEN",
17195
+ config: { url: "https://api.githubcopilot.com", apiKeyEnv: "GITHUB_COPILOT_TOKEN", model: "", provider: "", auth: "githubCopilot" },
17196
+ deviceSignIn: "githubCopilot",
17197
+ keyUrl: "https://github.com/settings/copilot",
17198
+ signupUrl: "https://github.com/features/copilot/plans"
17199
+ },
17183
17200
  {
17184
17201
  id: "xai",
17185
17202
  kind: "apiKey",
@@ -17204,6 +17221,155 @@ var init_provider_accounts = __esm({
17204
17221
  keyTest: { provider: "mistral" },
17205
17222
  keyUrl: "https://console.mistral.ai/api-keys"
17206
17223
  },
17224
+ {
17225
+ // OpenRouter with credit: one key for hundreds of models from every
17226
+ // company, billed per token. OpenRouter reports each request's cost, so
17227
+ // the ledger and the monthly spend limit count it exactly. `openrouter/auto`
17228
+ // lets OpenRouter pick until a model is chosen. A key with no credit can
17229
+ // still use the free models: add it as "OpenRouter (free models)".
17230
+ id: "openrouter",
17231
+ kind: "apiKey",
17232
+ label: "OpenRouter",
17233
+ billing: "payPerUse",
17234
+ driver: "openai-compat",
17235
+ envVar: "OPENROUTER_API_KEY",
17236
+ icon: "openrouter",
17237
+ config: { url: "https://openrouter.ai/api/v1", apiKeyEnv: "OPENROUTER_API_KEY", model: "openrouter/auto", provider: "" },
17238
+ keyTest: { provider: "openaiCompat", url: "https://openrouter.ai/api/v1" },
17239
+ keyUrl: "https://openrouter.ai/settings/keys",
17240
+ signupUrl: "https://openrouter.ai/"
17241
+ },
17242
+ {
17243
+ // Hugging Face Inference Providers: one Hugging Face token, an
17244
+ // OpenAI-compatible router in front of many inference companies, billed
17245
+ // per use to the Hugging Face account (a PRO account includes a small
17246
+ // monthly credit). The router's model list is public, so the key test
17247
+ // asks Hugging Face who the token belongs to instead.
17248
+ id: "huggingface",
17249
+ kind: "apiKey",
17250
+ label: "Hugging Face",
17251
+ billing: "payPerUse",
17252
+ driver: "openai-compat",
17253
+ envVar: "HF_TOKEN",
17254
+ config: { url: "https://router.huggingface.co/v1", apiKeyEnv: "HF_TOKEN", model: "openai/gpt-oss-120b", provider: "" },
17255
+ keyTest: { provider: "huggingface" },
17256
+ keyUrl: "https://huggingface.co/settings/tokens/new?tokenType=fineGrained",
17257
+ signupUrl: "https://huggingface.co/docs/inference-providers"
17258
+ },
17259
+ // Pay-per-use API keys, read 2026-11-22 from each vendor's own docs.
17260
+ {
17261
+ // DeepSeek's own API (api-docs.deepseek.com): OpenAI format at
17262
+ // api.deepseek.com, models deepseek-flash and deepseek-v4-pro.
17263
+ id: "deepseek",
17264
+ kind: "apiKey",
17265
+ label: "DeepSeek",
17266
+ billing: "payPerUse",
17267
+ driver: "openai-compat",
17268
+ envVar: "DEEPSEEK_API_KEY",
17269
+ config: { url: "https://api.deepseek.com", apiKeyEnv: "DEEPSEEK_API_KEY", model: "deepseek-flash", provider: "" },
17270
+ keyTest: { provider: "openaiCompat", url: "https://api.deepseek.com" },
17271
+ keyUrl: "https://platform.deepseek.com/api_keys"
17272
+ },
17273
+ {
17274
+ id: "together",
17275
+ kind: "apiKey",
17276
+ label: "Together AI",
17277
+ billing: "payPerUse",
17278
+ driver: "openai-compat",
17279
+ envVar: "TOGETHER_API_KEY",
17280
+ config: { url: "https://api.together.xyz/v1", apiKeyEnv: "TOGETHER_API_KEY", model: "openai/gpt-oss-120b", provider: "" },
17281
+ keyTest: { provider: "openaiCompat", url: "https://api.together.xyz/v1" },
17282
+ keyUrl: "https://api.together.ai/settings/api-keys"
17283
+ },
17284
+ {
17285
+ id: "fireworks",
17286
+ kind: "apiKey",
17287
+ label: "Fireworks AI",
17288
+ billing: "payPerUse",
17289
+ driver: "openai-compat",
17290
+ envVar: "FIREWORKS_API_KEY",
17291
+ config: { url: "https://api.fireworks.ai/inference/v1", apiKeyEnv: "FIREWORKS_API_KEY", model: "accounts/fireworks/models/gpt-oss-120b", provider: "" },
17292
+ keyTest: { provider: "openaiCompat", url: "https://api.fireworks.ai/inference/v1" },
17293
+ keyUrl: "https://app.fireworks.ai/settings/users/api-keys"
17294
+ },
17295
+ {
17296
+ // The paid tiers use the same endpoints as the free-tier accounts below;
17297
+ // only the account's billing differs, so they stay separate accounts.
17298
+ id: "groq",
17299
+ kind: "apiKey",
17300
+ label: "Groq",
17301
+ billing: "payPerUse",
17302
+ driver: "openai-compat",
17303
+ envVar: "GROQ_API_KEY",
17304
+ config: { url: "https://api.groq.com/openai/v1", apiKeyEnv: "GROQ_API_KEY", model: "openai/gpt-oss-120b", provider: "" },
17305
+ keyTest: { provider: "openaiCompat", url: "https://api.groq.com/openai/v1" },
17306
+ keyUrl: "https://console.groq.com/keys",
17307
+ signupUrl: "https://console.groq.com/settings/billing"
17308
+ },
17309
+ {
17310
+ id: "cerebras",
17311
+ kind: "apiKey",
17312
+ label: "Cerebras",
17313
+ billing: "payPerUse",
17314
+ driver: "openai-compat",
17315
+ envVar: "CEREBRAS_API_KEY",
17316
+ config: { url: "https://api.cerebras.ai/v1", apiKeyEnv: "CEREBRAS_API_KEY", model: "gpt-oss-120b", provider: "" },
17317
+ keyTest: { provider: "openaiCompat", url: "https://api.cerebras.ai/v1" },
17318
+ keyUrl: "https://cloud.cerebras.ai/platform/apikeys",
17319
+ signupUrl: "https://cloud.cerebras.ai/"
17320
+ },
17321
+ {
17322
+ // Amazon Bedrock's OpenAI-compatible Chat Completions on bedrock-runtime
17323
+ // with a Bedrock API key as the bearer token. Keys are per Region, and
17324
+ // short-term ones last at most 12 hours. bedrock-runtime has no model
17325
+ // list, so the model id is asked for (default: gpt-oss-120b).
17326
+ id: "bedrock",
17327
+ kind: "apiKey",
17328
+ label: "Amazon Bedrock",
17329
+ billing: "payPerUse",
17330
+ driver: "openai-compat",
17331
+ envVar: "AWS_BEARER_TOKEN_BEDROCK",
17332
+ config: { url: "https://bedrock-runtime.us-east-1.amazonaws.com/openai/v1", apiKeyEnv: "AWS_BEARER_TOKEN_BEDROCK", model: "openai.gpt-oss-120b-1:0", provider: "" },
17333
+ setup: {
17334
+ url: { example: "https://bedrock-runtime.us-east-1.amazonaws.com/openai/v1", pattern: "^https://bedrock-runtime\\.[a-z0-9-]+\\.amazonaws\\.com/openai/v1$" },
17335
+ model: { example: "openai.gpt-oss-120b-1:0" }
17336
+ },
17337
+ keyUrl: "https://console.aws.amazon.com/bedrock/home#/api-keys"
17338
+ },
17339
+ {
17340
+ // Azure OpenAI v1 API: the resource's own endpoint plus /openai/v1, the
17341
+ // resource key as the bearer token, and the deployment name as the model.
17342
+ id: "azureOpenai",
17343
+ kind: "apiKey",
17344
+ label: "Azure OpenAI",
17345
+ billing: "payPerUse",
17346
+ driver: "openai-compat",
17347
+ envVar: "AZURE_OPENAI_API_KEY",
17348
+ config: { url: "", apiKeyEnv: "AZURE_OPENAI_API_KEY", model: "", provider: "" },
17349
+ setup: {
17350
+ url: { example: "https://your-resource.openai.azure.com/openai/v1", pattern: "^https://[a-z0-9-]+\\.(openai\\.azure\\.com|services\\.ai\\.azure\\.com|cognitiveservices\\.azure\\.com)/openai/v1$" },
17351
+ model: { example: "gpt-5.4-mini", required: true }
17352
+ },
17353
+ keyUrl: "https://portal.azure.com/#view/Microsoft_Azure_ProjectOxford/CognitiveServicesHub/~/OpenAI"
17354
+ },
17355
+ {
17356
+ // Google Vertex AI's OpenAI-compatible endpoint accepts only a Google
17357
+ // Cloud access token, so the account borrows this computer's gcloud
17358
+ // sign-in (server/drivers/gcloud-token.ts) and stores no key.
17359
+ id: "vertexAi",
17360
+ kind: "apiKey",
17361
+ label: "Google Vertex AI",
17362
+ billing: "payPerUse",
17363
+ driver: "openai-compat",
17364
+ envVar: "VERTEX_AI_ACCESS_TOKEN",
17365
+ keyless: true,
17366
+ config: { url: "", apiKeyEnv: "VERTEX_AI_ACCESS_TOKEN", key: "gcloud", auth: "gcloud", model: "google/gemini-3.8-flash", provider: "" },
17367
+ setup: {
17368
+ url: { example: "https://aiplatform.googleapis.com/v1/projects/your-project/locations/global/endpoints/openapi", pattern: "^https://([a-z0-9-]+-)?aiplatform\\.googleapis\\.com/v1(beta1)?/projects/[a-z0-9-]+/locations/[a-z0-9-]+/endpoints/openapi$" },
17369
+ model: { example: "google/gemini-3.8-flash" }
17370
+ },
17371
+ keyUrl: "https://console.cloud.google.com/vertex-ai"
17372
+ },
17207
17373
  {
17208
17374
  // Ollama's Free, Pro, Max and Team plans each include a monthly credit.
17209
17375
  // Unused credit does not carry over (use it or lose it); use past it is
@@ -17262,7 +17428,9 @@ var init_provider_accounts = __esm({
17262
17428
  driver: "openai-compat",
17263
17429
  envVar: "OPENROUTER_FREE_API_KEY",
17264
17430
  icon: "openrouter",
17265
- config: { url: "https://openrouter.ai/api/v1", apiKeyEnv: "OPENROUTER_FREE_API_KEY", model: "", provider: "" },
17431
+ // Only free models are listed (`:free` ids and OpenRouter's own free
17432
+ // router, the default), so this account can never spend credit.
17433
+ config: { url: "https://openrouter.ai/api/v1", apiKeyEnv: "OPENROUTER_FREE_API_KEY", model: "openrouter/free", provider: "", modelFilter: "free" },
17266
17434
  keyTest: { provider: "openaiCompat", url: "https://openrouter.ai/api/v1" },
17267
17435
  keyUrl: "https://openrouter.ai/keys",
17268
17436
  signupUrl: "https://openrouter.ai/models?max_price=0"
@@ -17315,6 +17483,21 @@ var init_provider_accounts = __esm({
17315
17483
  keyTest: { provider: "openaiCompat", url: "https://integrate.api.nvidia.com/v1" },
17316
17484
  keyUrl: "https://build.nvidia.com/settings/api-keys",
17317
17485
  signupUrl: "https://build.nvidia.com/"
17486
+ },
17487
+ // No key, no sign-up: Pollinations' anonymous tier serves one small model
17488
+ // (openai-fast, gpt-oss-20b, Añejo). It answered an identical prompt with
17489
+ // an identical cached reply when checked (2026-11-22), so prompts may be
17490
+ // stored: opt-in only, never for client data (the free band skips it).
17491
+ {
17492
+ id: "pollinationsFree",
17493
+ kind: "apiKey",
17494
+ label: "Pollinations (no sign-up)",
17495
+ billing: "free",
17496
+ driver: "openai-compat",
17497
+ envVar: "POLLINATIONS_FREE_API_KEY",
17498
+ keyless: true,
17499
+ config: { url: "https://text.pollinations.ai/openai", apiKeyEnv: "POLLINATIONS_FREE_API_KEY", key: "anonymous", model: "openai-fast", provider: "" },
17500
+ keyUrl: "https://pollinations.ai/"
17318
17501
  }
17319
17502
  ];
17320
17503
  }
@@ -17955,7 +18138,7 @@ function saveConfig(patch, options = {}) {
17955
18138
  }
17956
18139
  if (checkedPatch.vps !== void 0) disk.vps = normalizeVpsConfig(checkedPatch.vps);
17957
18140
  if (checkedPatch.workspaceName !== void 0) disk.workspaceName = checkedPatch.workspaceName;
17958
- if (checkedPatch.language !== void 0) disk.language = checkedPatch.language;
18141
+ for (const key of ["language", "timeZone"]) if (checkedPatch[key] !== void 0) disk[key] = checkedPatch[key];
17959
18142
  if (checkedPatch.customDomain !== void 0) disk.customDomain = checkedPatch.customDomain;
17960
18143
  if (checkedPatch.godMode !== void 0) disk.godMode = checkedPatch.godMode;
17961
18144
  if (checkedPatch.signIn !== void 0) disk.signIn = checkedPatch.signIn;
@@ -18499,8 +18682,9 @@ var init_config = __esm({
18499
18682
  ).optional()
18500
18683
  }).strict().optional(),
18501
18684
  /** UI language override (BCP-47, lowercase). Empty/absent = follow the
18502
- * system language. Unknown tags degrade to English in the renderer. */
18685
+ * system language. Unknown tags degrade to English in the renderer. timeZone: see server/workspace-time-zone.ts. */
18503
18686
  language: optionalText,
18687
+ timeZone: external_exports.string().max(64).optional(),
18504
18688
  rooms: roomConfigSchema.optional(),
18505
18689
  context: external_exports.object({
18506
18690
  rebuildBytes: external_exports.number().int().min(1024).max(1e6).optional(),
@@ -18562,7 +18746,13 @@ var init_config = __esm({
18562
18746
  storedAppConfigSchema = appConfigSchema.extend({
18563
18747
  browserProfiles: storedBrowserProfilesSchema.optional()
18564
18748
  });
18565
- appConfigPatchSchema = appConfigSchema.omit({ instances: true, mcpServers: true, cliStartup: true, customDomain: true, godMode: true, engineTiers: true, jevAnswerChecks: true, hipaa: true, personal: true, subscriptionBots: true, nexusMemory: true }).extend({ threads: threadsPatchSchema.optional(), newBots: newBotsPatchSchema.optional() });
18749
+ appConfigPatchSchema = appConfigSchema.omit({ instances: true, mcpServers: true, cliStartup: true, customDomain: true, godMode: true, engineTiers: true, jevAnswerChecks: true, hipaa: true, personal: true, subscriptionBots: true, nexusMemory: true }).extend({ threads: threadsPatchSchema.optional(), newBots: newBotsPatchSchema.optional(), timeZone: external_exports.string().max(64).refine((value) => {
18750
+ try {
18751
+ return value === "" || Boolean(new Intl.DateTimeFormat("en-US", { timeZone: value }));
18752
+ } catch {
18753
+ return false;
18754
+ }
18755
+ }, "Choose a time zone from the list.").optional() });
18566
18756
  jsonObjectSchema = external_exports.record(external_exports.string(), external_exports.json());
18567
18757
  DATA_DIR = process.env.OMB_DATA_DIR ?? join4(homedir2(), ".atomic-app");
18568
18758
  LEGACY_DATA_DIR = join4(homedir2(), ".opengrokbot");
@@ -22316,8 +22506,46 @@ var init_cli_prompts = __esm({
22316
22506
  }
22317
22507
  });
22318
22508
 
22509
+ // electron/windows-process-time.mjs
22510
+ import { execFileSync as execFileSync3 } from "node:child_process";
22511
+ function windowsCreationTimeArgs(pid) {
22512
+ if (typeof pid !== "number" || !Number.isInteger(pid) || pid <= 0 || pid > MAX_PID) return null;
22513
+ return [
22514
+ "-NoProfile",
22515
+ "-NonInteractive",
22516
+ "-Command",
22517
+ // ToFileTimeUtc is an integer, so the answer does not depend on the
22518
+ // machine's language, date format or time zone.
22519
+ `$p = Get-CimInstance Win32_Process -Filter 'ProcessId=${pid}'; if ($p) { $p.CreationDate.ToFileTimeUtc() }`
22520
+ ];
22521
+ }
22522
+ function parseFileTimeUtcMs(text7) {
22523
+ const raw = String(text7 ?? "").trim();
22524
+ if (!/^\d{15,19}$/u.test(raw)) return null;
22525
+ const ms2 = BigInt(raw) / FILETIME_TICKS_PER_MS - FILETIME_UNIX_EPOCH_MS;
22526
+ return ms2 > 0n && ms2 <= BigInt(Number.MAX_SAFE_INTEGER) ? Number(ms2) : null;
22527
+ }
22528
+ function windowsProcessCreationTimeMs(pid, { platform = process.platform, exec: exec2 = execFileSync3 } = {}) {
22529
+ if (platform !== "win32") return null;
22530
+ const args = windowsCreationTimeArgs(pid);
22531
+ if (!args) return null;
22532
+ try {
22533
+ return parseFileTimeUtcMs(exec2("powershell.exe", args, { encoding: "utf8", timeout: 1e4, stdio: ["ignore", "pipe", "ignore"], windowsHide: true }));
22534
+ } catch {
22535
+ return null;
22536
+ }
22537
+ }
22538
+ var MAX_PID, FILETIME_TICKS_PER_MS, FILETIME_UNIX_EPOCH_MS;
22539
+ var init_windows_process_time = __esm({
22540
+ "electron/windows-process-time.mjs"() {
22541
+ "use strict";
22542
+ MAX_PID = 2147483647;
22543
+ FILETIME_TICKS_PER_MS = 10000n;
22544
+ FILETIME_UNIX_EPOCH_MS = 11644473600000n;
22545
+ }
22546
+ });
22547
+
22319
22548
  // electron/data-dir-lease.mjs
22320
- import { execFileSync as execFileSync2 } from "node:child_process";
22321
22549
  import { createHash as createHash3, randomUUID as randomUUID6 } from "node:crypto";
22322
22550
  import { existsSync as existsSync10, linkSync, mkdirSync as mkdirSync8, readFileSync as readFileSync6, renameSync as renameSync5, unlinkSync as unlinkSync3, writeFileSync as writeFileSync5 } from "node:fs";
22323
22551
  import { hostname as hostname4, uptime } from "node:os";
@@ -22326,7 +22554,7 @@ function leaseError(message3, cause) {
22326
22554
  return Object.assign(new DataDirLeaseError(message3), { cause });
22327
22555
  }
22328
22556
  function isPid(value) {
22329
- return Number.isInteger(value) && value > 0 && value <= MAX_PID;
22557
+ return Number.isInteger(value) && value > 0 && value <= MAX_PID2;
22330
22558
  }
22331
22559
  function readBootSession() {
22332
22560
  try {
@@ -22334,7 +22562,7 @@ function readBootSession() {
22334
22562
  return normalizeBootId(readFileSync6("/proc/sys/kernel/random/boot_id", "utf8"));
22335
22563
  }
22336
22564
  if (process.platform === "darwin") {
22337
- return normalizeBootId(execFileSync2("/usr/sbin/sysctl", ["-n", "kern.bootsessionuuid"], {
22565
+ return normalizeBootId(execFileSync("/usr/sbin/sysctl", ["-n", "kern.bootsessionuuid"], {
22338
22566
  encoding: "utf8",
22339
22567
  timeout: 5e3,
22340
22568
  stdio: ["ignore", "pipe", "ignore"]
@@ -22416,50 +22644,9 @@ function processIsAlive2(pid) {
22416
22644
  throw leaseError("Atomic could not verify the data-directory lease owner; refusing to start.", error51);
22417
22645
  }
22418
22646
  }
22419
- function parseWmiDateTime(value) {
22420
- const raw = String(value).trim();
22421
- const match = /^(\d{4})(\d{2})(\d{2})(\d{2})(\d{2})(\d{2})\.(\d{6})([+-]\d{3})$/.exec(raw);
22422
- if (!match) return null;
22423
- const [_3, year, month, day, hour, minute, second, micro, offset] = match;
22424
- const ms2 = Date.UTC(
22425
- Number(year),
22426
- Number(month) - 1,
22427
- Number(day),
22428
- Number(hour),
22429
- Number(minute),
22430
- Number(second),
22431
- Math.floor(Number(micro) / 1e3)
22432
- );
22433
- const offsetMinutes = Number(offset);
22434
- return ms2 - offsetMinutes * 60 * 1e3;
22435
- }
22436
- function processCreationTimeMs(pid) {
22437
- if (process.platform !== "win32") return null;
22438
- try {
22439
- const output = execFileSync2(
22440
- "wmic",
22441
- ["process", "where", `ProcessId=${pid}`, "get", "CreationDate", "/format:csv"],
22442
- // windowsHide: wmic is a console program and this is the windowed main
22443
- // process, so without it every launch flashed a console window.
22444
- { encoding: "utf8", timeout: 5e3, stdio: ["ignore", "pipe", "ignore"], windowsHide: true }
22445
- );
22446
- for (const line of output.split(/\r?\n/)) {
22447
- const trimmed = line.trim();
22448
- if (!trimmed) continue;
22449
- const lower = trimmed.toLowerCase();
22450
- if (lower === "node,creationdate" || lower.startsWith("node,")) continue;
22451
- const parts = trimmed.split(",");
22452
- const raw = parts[parts.length - 1].trim();
22453
- const parsed = parseWmiDateTime(raw);
22454
- if (parsed !== null) return parsed;
22455
- }
22456
- } catch {
22457
- }
22458
- return null;
22459
- }
22460
22647
  function ownerIdentityMatches(owner) {
22461
22648
  if (process.platform !== "win32") return true;
22462
- const created = processCreationTimeMs(owner.pid);
22649
+ const created = windowsProcessCreationTimeMs(owner.pid);
22463
22650
  if (created === null) return true;
22464
22651
  return created < owner.createdAt;
22465
22652
  }
@@ -22659,15 +22846,16 @@ function acquireDataDirLeaseInternal(dataDir, options = {}) {
22659
22846
  function acquireDataDirLease(dataDir, options = {}) {
22660
22847
  return acquireDataDirLeaseInternal(dataDir, options);
22661
22848
  }
22662
- var LEASE_NAME, DELEGATED_CHILD_DIR, CHILD_LEASE_ENV, UUID2, MAX_PID, MAX_BOOT_ID, MAX_REAPER_GENERATIONS, DataDirLeaseError, cachedBootSession;
22849
+ var LEASE_NAME, DELEGATED_CHILD_DIR, CHILD_LEASE_ENV, UUID2, MAX_PID2, MAX_BOOT_ID, MAX_REAPER_GENERATIONS, DataDirLeaseError, cachedBootSession;
22663
22850
  var init_data_dir_lease = __esm({
22664
22851
  "electron/data-dir-lease.mjs"() {
22665
22852
  "use strict";
22853
+ init_windows_process_time();
22666
22854
  LEASE_NAME = "openmausbot-server.lease";
22667
22855
  DELEGATED_CHILD_DIR = ".openmausbot-server-child";
22668
22856
  CHILD_LEASE_ENV = "OPENMAUSBOT_INTERNAL_DATA_DIR_LEASE";
22669
22857
  UUID2 = /^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/;
22670
- MAX_PID = 2147483647;
22858
+ MAX_PID2 = 2147483647;
22671
22859
  MAX_BOOT_ID = 128;
22672
22860
  MAX_REAPER_GENERATIONS = 128;
22673
22861
  DataDirLeaseError = class extends Error {
@@ -26538,6 +26726,20 @@ var init_local_inject = __esm({
26538
26726
  }
26539
26727
  });
26540
26728
 
26729
+ // server/drivers/acp/session-key.ts
26730
+ function mcpSessionKey(servers) {
26731
+ return JSON.stringify(servers.map((server) => {
26732
+ if (!server.env) return server;
26733
+ const names = new Set(server.env.map((entry) => entry.name));
26734
+ return { ...server, env: server.env.filter((entry) => !names.has(`${entry.name}_FILE`)) };
26735
+ }));
26736
+ }
26737
+ var init_session_key = __esm({
26738
+ "server/drivers/acp/session-key.ts"() {
26739
+ "use strict";
26740
+ }
26741
+ });
26742
+
26541
26743
  // server/drivers/prompt-shape.ts
26542
26744
  function permissionKindOfLabel(label) {
26543
26745
  const text7 = label.trim();
@@ -28489,7 +28691,7 @@ function createAcpDriver(support12) {
28489
28691
  const spawnEnv = launch.env ?? env;
28490
28692
  const envFingerprint = createHash5("sha256").update(JSON.stringify(spawnEnv)).digest("hex").slice(0, 16);
28491
28693
  const contractKey = JSON.stringify([launch.command, launch.args ?? [], spawnArgs, cwd, turnConfig.fullAuto === true, envFingerprint]);
28492
- const sessionKey = JSON.stringify(mcpServers);
28694
+ const sessionKey = mcpSessionKey(mcpServers);
28493
28695
  if (turn.sessionReset) {
28494
28696
  closeSession(threadId, "reset");
28495
28697
  sessionAllows.delete(threadId);
@@ -28930,6 +29132,7 @@ var init_core3 = __esm({
28930
29132
  "use strict";
28931
29133
  init_config();
28932
29134
  init_local_inject();
29135
+ init_session_key();
28933
29136
  init_prompt_shape();
28934
29137
  init_procs();
28935
29138
  init_contracts();
@@ -44527,16 +44730,17 @@ var init_box = __esm({
44527
44730
  // server/control-client.ts
44528
44731
  function createControlClient(options) {
44529
44732
  const url2 = options?.url ?? process.env.OMB_CONTROL_URL ?? "";
44530
- const token = options?.token ?? process.env.OMB_CONTROL_TOKEN ?? "";
44733
+ const given = options?.token ?? process.env.OMB_CONTROL_TOKEN ?? "";
44734
+ const token = typeof given === "function" ? given : () => given;
44531
44735
  const cacheMs = options?.cacheMs ?? 750;
44532
44736
  const fetchImpl = options?.fetchImpl ?? fetch;
44533
- const configured = Boolean(url2 && token);
44534
- const headers = { authorization: `Bearer ${token}`, "content-type": "application/json" };
44737
+ const configured = Boolean(url2 && token());
44738
+ const headers = () => ({ authorization: `Bearer ${token()}`, "content-type": "application/json" });
44535
44739
  let cachedAt = 0;
44536
44740
  let cached3 = DISENGAGED;
44537
44741
  async function read() {
44538
44742
  try {
44539
- const res = await fetchImpl(url2, { headers, signal: AbortSignal.timeout(2e3) });
44743
+ const res = await fetchImpl(url2, { headers: headers(), signal: AbortSignal.timeout(2e3) });
44540
44744
  if (!res.ok) return UNAVAILABLE;
44541
44745
  const body = await res.json().catch(() => null);
44542
44746
  if (typeof body?.held !== "boolean" || typeof body?.helpOpen !== "boolean") return UNAVAILABLE;
@@ -44565,7 +44769,7 @@ function createControlClient(options) {
44565
44769
  try {
44566
44770
  const res = await fetchImpl(url2, {
44567
44771
  method: "POST",
44568
- headers,
44772
+ headers: headers(),
44569
44773
  body: JSON.stringify({ reason }),
44570
44774
  signal: AbortSignal.timeout(2e3)
44571
44775
  });
@@ -44581,7 +44785,7 @@ function createControlClient(options) {
44581
44785
  try {
44582
44786
  await fetchImpl(url2, {
44583
44787
  method: "DELETE",
44584
- headers,
44788
+ headers: headers(),
44585
44789
  body: JSON.stringify({ requestId }),
44586
44790
  signal: AbortSignal.timeout(2e3)
44587
44791
  });
@@ -45176,6 +45380,11 @@ function providerError(json2) {
45176
45380
  }
45177
45381
  return null;
45178
45382
  }
45383
+ function chatUsage(usage) {
45384
+ if (!usage) return null;
45385
+ const cost = typeof usage.cost === "number" && Number.isFinite(usage.cost) && usage.cost >= 0 ? usage.cost : void 0;
45386
+ return { input: usage.prompt_tokens ?? 0, output: usage.completion_tokens ?? 0, ...cost !== void 0 ? { cost } : {} };
45387
+ }
45179
45388
  var MAX_CHAT_TOOL_CALLS, MAX_ARGUMENT_CHARS, ChatProtocolError, ChatReasoningDetails, ChatToolCalls;
45180
45389
  var init_openai_chat_protocol = __esm({
45181
45390
  "server/drivers/openai-chat-protocol.ts"() {
@@ -45324,11 +45533,12 @@ function createOpenAIChatRuntime(options) {
45324
45533
  resetIdleTimer();
45325
45534
  try {
45326
45535
  const activeSignal = signal ? AbortSignal.any([signal, timeoutController.signal]) : timeoutController.signal;
45327
- const sendable = sendableMessages(options.apiUrl, model, messages);
45328
- const response = await fetch(`${options.apiUrl}/chat/completions`, {
45536
+ const auth = await options.authorize?.();
45537
+ const sendable = sendableMessages(auth?.apiUrl ?? options.apiUrl, model, messages);
45538
+ const response = await fetch(`${auth?.apiUrl ?? options.apiUrl}/chat/completions`, {
45329
45539
  method: "POST",
45330
45540
  ...hasImageParts(sendable) ? { redirect: "error" } : {},
45331
- headers: { ...options.extraHeaders, authorization: `Bearer ${options.apiKey}`, "content-type": "application/json" },
45541
+ headers: { ...options.extraHeaders, ...auth?.headers, authorization: `Bearer ${auth?.apiKey ?? options.apiKey}`, "content-type": "application/json" },
45332
45542
  body: JSON.stringify({
45333
45543
  ...options.requestBody(model, sendable, stream),
45334
45544
  ...tools.length ? { tools } : {}
@@ -45529,6 +45739,7 @@ function createOpenAIChatRuntime(options) {
45529
45739
  let tools;
45530
45740
  const usage = { input: 0, output: 0 };
45531
45741
  let hasUsage = false;
45742
+ let cost = null;
45532
45743
  let ok = false;
45533
45744
  let stopReason = null;
45534
45745
  let failure;
@@ -45589,6 +45800,7 @@ function createOpenAIChatRuntime(options) {
45589
45800
  }
45590
45801
  native("in", options.nativeLog.incoming(completion));
45591
45802
  if (completion.usage) {
45803
+ if (completion.usage.cost !== void 0) cost = (cost ?? 0) + completion.usage.cost;
45592
45804
  usage.input += completion.usage.input;
45593
45805
  usage.output += completion.usage.output;
45594
45806
  hasUsage = true;
@@ -45707,7 +45919,7 @@ function createOpenAIChatRuntime(options) {
45707
45919
  type: "turn.completed",
45708
45920
  ok,
45709
45921
  stopReason,
45710
- cost: null,
45922
+ cost,
45711
45923
  ...hasUsage && (options.includeUsageInCompleted || seenCalls.size) ? { usage } : {},
45712
45924
  ...denials.length ? { denials } : {}
45713
45925
  });
@@ -45791,7 +46003,7 @@ var init_openai_chat = __esm({
45791
46003
  init_chat_text_only();
45792
46004
  init_native();
45793
46005
  init_retry();
45794
- usageFrom = (usage) => usage ? { input: usage.prompt_tokens ?? 0, output: usage.completion_tokens ?? 0 } : null;
46006
+ usageFrom = (usage) => chatUsage(usage);
45795
46007
  asError = (value) => value instanceof Error ? value : new Error(String(value));
45796
46008
  }
45797
46009
  });
@@ -50417,15 +50629,9 @@ var init_engine_tiers = __esm({
50417
50629
  { engine: "hermes", model: "nous:x-ai/grok-4.6" },
50418
50630
  { engine: "ollamaCloud", model: "glm-5.3" },
50419
50631
  { engine: "museCode", model: "muse-spark-1.2" },
50420
- { engine: "hermesAgent", model: "openai-codex:gpt-6-sol", modelClass: "Plata" },
50421
50632
  { engine: "antigravity", model: "gemini-3.8-flash-medium" },
50422
50633
  { engine: "cursorAgent", model: "auto" },
50423
- { engine: "hermesAgent", model: "huggingface:deepseek-ai/DeepSeek-R1-0528", modelClass: "Plata" },
50424
- { engine: "hermesAgent", model: "opencode-go:deepseek-v4-flash", modelClass: "Plata" },
50425
- { engine: "hermesAgent", model: "deepinfra:anthropic/claude-opus-5", modelClass: "Plata" },
50426
- { engine: "hermesAgent", model: "nous:meta/muse-spark-1.3", modelClass: "Plata" },
50427
- { engine: "hermesAgent", model: "openrouter:openai/gpt-6-sol", modelClass: "Plata" },
50428
- { engine: "hermesAgent", model: "openai-codex:gpt-6.1-sol", modelClass: "Plata" }
50634
+ { engine: "hermesAgent", model: "nous:meta/muse-spark-1.3", modelClass: "Plata" }
50429
50635
  ],
50430
50636
  engineering: [
50431
50637
  { ...ATOMIC_AUTO_RUNG },
@@ -50434,13 +50640,11 @@ var init_engine_tiers = __esm({
50434
50640
  { engine: "claudeAgent", model: "claude-opus-5-5" },
50435
50641
  { engine: "opencodeGo", model: "opencode-go/gemini-4-argon" },
50436
50642
  { engine: "ollamaCloud", model: "kimi-k3" },
50437
- { engine: "hermesAgent", model: "openai-codex:gpt-6-astra", modelClass: "Mezcal" },
50438
50643
  { engine: "grok", model: "grok-4.7" },
50439
50644
  { engine: "grokAgent", model: "grok-4.7" },
50440
50645
  { engine: "kimi", model: "kimi-code/k3" },
50441
50646
  { engine: "openai-compat", model: "qwen3.7-plus" },
50442
50647
  { engine: "hermesAgent", model: "nous:anthropic/claude-opus-5.5" },
50443
- { engine: "hermesAgent", model: "opencode-zen:claude-fable-5-1", modelClass: "Mezcal" },
50444
50648
  { engine: "cursorAgent", model: "auto" }
50445
50649
  ],
50446
50650
  research: [
@@ -50449,10 +50653,6 @@ var init_engine_tiers = __esm({
50449
50653
  { engine: "vibe", model: "mistral-medium-3.5" },
50450
50654
  { engine: "antigravityAgent", model: "gemini-3.8-flash-low" },
50451
50655
  { engine: "cursorAgent", model: "auto" },
50452
- { engine: "hermesAgent", model: "openrouter:x-ai/grok-4.7", modelClass: "Plata" },
50453
- { engine: "hermesAgent", model: "custom:local-(localhost:11434):deepseek-v4-pro:cloud" },
50454
- { engine: "hermesAgent", model: "openrouter:meta/muse-spark-1.3", modelClass: "Plata" },
50455
- { engine: "hermesAgent", model: "opencode-zen:muse-spark-1.3", modelClass: "Plata" },
50456
50656
  { engine: "claudeAgent", model: "claude-opus-5", modelClass: "Plata" },
50457
50657
  { engine: "cursorAgent", model: "claude-opus-5-high", modelClass: "Plata" },
50458
50658
  { engine: "opencodeGo", model: "opencode/claude-opus-5", modelClass: "Plata" }
@@ -50781,6 +50981,13 @@ var init_atomic_engine_release = __esm({
50781
50981
  url: "https://ugmbfkqvogfuvufzjxtb.supabase.co/storage/v1/object/public/atomic-updates/atomic/K_5FMcrZFZ5AE2K-Lydn-Tis/atomic-engine-0.21.4-68432dd-win32-x64.tar.gz",
50782
50982
  bytes: 103356325,
50783
50983
  sha512: "a2bb1c23194ca63168a855daee719a851d5213c79b6db083ca676b0aaff26ac55f0e2086e36395f86a677379e8cc0cf53113122b6695b841e12e3619857fc08c"
50984
+ },
50985
+ {
50986
+ version: "0.21.4-68432dd",
50987
+ platform: "darwin-x64",
50988
+ url: "https://ugmbfkqvogfuvufzjxtb.supabase.co/storage/v1/object/public/atomic-updates/atomic/K_5FMcrZFZ5AE2K-Lydn-Tis/atomic-engine-0.21.4-68432dd-darwin-x64.tar.gz",
50989
+ bytes: 107288371,
50990
+ sha512: "8f42c9411363df6969aeea1768f85e2699b3f074d336d8040b8ff4fc3bce798b2727c8071e9a079a00318e60ceab21ef0b752af5e32a073a6d43c8a4d98481fb"
50784
50991
  }
50785
50992
  ];
50786
50993
  }
@@ -57865,6 +58072,17 @@ var init_hermes_memory_lock = __esm({
57865
58072
  }
57866
58073
  });
57867
58074
 
58075
+ // server/drivers/acp/hermes-hosts.ts
58076
+ var HERMES_HOSTS, hostOf, hermesOnlyHosts;
58077
+ var init_hermes_hosts = __esm({
58078
+ "server/drivers/acp/hermes-hosts.ts"() {
58079
+ "use strict";
58080
+ HERMES_HOSTS = /* @__PURE__ */ new Set(["nous"]);
58081
+ hostOf = (modelId) => /^([a-z0-9_-]+):/i.exec(modelId)?.[1]?.toLowerCase();
58082
+ hermesOnlyHosts = (options) => options.filter((option) => HERMES_HOSTS.has(hostOf(option.id) ?? option.provider ?? ""));
58083
+ }
58084
+ });
58085
+
57868
58086
  // server/drivers/acp/hermes.ts
57869
58087
  import { spawn as spawn7 } from "node:child_process";
57870
58088
  import { mkdirSync as mkdirSync25, readFileSync as readFileSync30, writeFileSync as writeFileSync21 } from "node:fs";
@@ -58223,12 +58441,8 @@ async function resolveHermesModels(env, config2) {
58223
58441
  const listed = new Set(remote.map((o) => o.provider));
58224
58442
  const stored = signedIn.filter((o) => !listed.has(o.provider));
58225
58443
  const seen = /* @__PURE__ */ new Set();
58226
- const listedOptions = [...configured ? [configured] : [], ...hostDefault ? [hostDefault] : [], ...remote, ...stored, ...catalog2.options].filter((o) => {
58227
- if (seen.has(o.id)) return false;
58228
- seen.add(o.id);
58229
- return true;
58230
- });
58231
- const options = hermesZaiPlanHosts(listedOptions, hermesZaiCodingPlan(env));
58444
+ const listedOptions = [...configured ? [configured] : [], ...hostDefault ? [hostDefault] : [], ...remote, ...stored, ...catalog2.options].filter((o) => !seen.has(o.id) && Boolean(seen.add(o.id)));
58445
+ const options = hermesOnlyHosts(hermesZaiPlanHosts(listedOptions, hermesZaiCodingPlan(env)));
58232
58446
  return { default: options[0]?.id ?? "", options };
58233
58447
  }
58234
58448
  async function applySetting2(request, method, params, what) {
@@ -58247,6 +58461,7 @@ var init_hermes = __esm({
58247
58461
  init_spawn_command();
58248
58462
  init_local_inject();
58249
58463
  init_core3();
58464
+ init_hermes_hosts();
58250
58465
  init_hermes_memory_lock();
58251
58466
  EMPTY2 = { default: "", options: [] };
58252
58467
  HERMES_OPENMAUS_SCREENSHOT_COMPAT = "HERMES_OPENMAUS_SCREENSHOT_COMPAT";
@@ -58609,7 +58824,128 @@ var init_provider_key_check = __esm({
58609
58824
  }
58610
58825
  });
58611
58826
 
58827
+ // server/drivers/github-copilot.ts
58828
+ async function exchangeCopilotToken(githubToken, fetchImpl = fetch, now = Date.now()) {
58829
+ let response;
58830
+ try {
58831
+ response = await fetchImpl(`${GITHUB_API}/copilot_internal/v2/token`, {
58832
+ headers: { ...COPILOT_HEADERS, accept: "application/json", authorization: `token ${githubToken}` },
58833
+ redirect: "error",
58834
+ signal: AbortSignal.timeout(1e4)
58835
+ });
58836
+ } catch {
58837
+ throw new CopilotAuthError("Could not reach GitHub to renew the Copilot sign-in.");
58838
+ }
58839
+ if (response.status === 401) throw new CopilotAuthError(COPILOT_SIGNED_OUT, 401);
58840
+ if (response.status === 403 || response.status === 404) throw new CopilotAuthError(COPILOT_NO_PLAN, response.status);
58841
+ if (!response.ok) throw new CopilotAuthError(`GitHub could not renew the Copilot sign-in (HTTP ${response.status}).`, response.status);
58842
+ const body = await response.json().catch(() => null);
58843
+ const token = typeof body?.token === "string" ? body.token : "";
58844
+ if (!token) throw new CopilotAuthError("GitHub gave an unexpected answer when renewing the Copilot sign-in.");
58845
+ const endpoints = body?.endpoints && typeof body.endpoints === "object" ? body.endpoints : {};
58846
+ const api2 = typeof endpoints.api === "string" && /^https:\/\/[a-z0-9.-]+\.githubcopilot\.com\/?$/i.test(endpoints.api) ? endpoints.api.replace(/\/+$/, "") : COPILOT_DEFAULT_API;
58847
+ const expiresAt = typeof body?.expires_at === "number" ? body.expires_at * 1e3 : now + 25 * 6e4;
58848
+ return { token, apiUrl: api2, expiresAt };
58849
+ }
58850
+ function copilotSessionCache(githubToken, fetchImpl = fetch, clock3 = Date.now) {
58851
+ let current;
58852
+ let pending;
58853
+ return async () => {
58854
+ if (current && current.expiresAt - RENEW_EARLY_MS > clock3()) return current;
58855
+ pending ??= exchangeCopilotToken(githubToken, fetchImpl, clock3()).then((session) => {
58856
+ current = session;
58857
+ return session;
58858
+ }).finally(() => {
58859
+ pending = void 0;
58860
+ });
58861
+ return pending;
58862
+ };
58863
+ }
58864
+ async function fetchCopilotModels(session, fetchImpl = fetch) {
58865
+ const response = await fetchImpl(`${session.apiUrl}/models`, {
58866
+ headers: { ...COPILOT_HEADERS, authorization: `Bearer ${session.token}` },
58867
+ redirect: "error",
58868
+ signal: AbortSignal.timeout(8e3)
58869
+ });
58870
+ if (!response.ok) return [];
58871
+ const json2 = await response.json().catch(() => null);
58872
+ const rows = Array.isArray(json2?.data) ? json2.data : [];
58873
+ const seen = /* @__PURE__ */ new Set();
58874
+ const options = [];
58875
+ for (const row of rows) {
58876
+ const id = typeof row.id === "string" ? row.id : "";
58877
+ const capabilities = row.capabilities && typeof row.capabilities === "object" ? row.capabilities : {};
58878
+ const policy = row.policy && typeof row.policy === "object" ? row.policy : {};
58879
+ if (!id || seen.has(id)) continue;
58880
+ if (capabilities.type !== void 0 && capabilities.type !== "chat") continue;
58881
+ if (row.model_picker_enabled === false || policy.state === "disabled") continue;
58882
+ seen.add(id);
58883
+ options.push({ id, label: typeof row.name === "string" && row.name.trim() ? row.name : id, custom: true });
58884
+ }
58885
+ return options;
58886
+ }
58887
+ var COPILOT_DEFAULT_API, GITHUB_API, RENEW_EARLY_MS, COPILOT_HEADERS, CopilotAuthError, COPILOT_NO_PLAN, COPILOT_SIGNED_OUT;
58888
+ var init_github_copilot = __esm({
58889
+ "server/drivers/github-copilot.ts"() {
58890
+ "use strict";
58891
+ COPILOT_DEFAULT_API = "https://api.githubcopilot.com";
58892
+ GITHUB_API = "https://api.github.com";
58893
+ RENEW_EARLY_MS = 5 * 6e4;
58894
+ COPILOT_HEADERS = Object.freeze({
58895
+ "editor-version": "vscode/1.99.0",
58896
+ "editor-plugin-version": "copilot-chat/0.26.0",
58897
+ "copilot-integration-id": "vscode-chat",
58898
+ "user-agent": "GitHubCopilotChat/0.26.0",
58899
+ "openai-intent": "conversation-panel"
58900
+ });
58901
+ CopilotAuthError = class extends Error {
58902
+ status;
58903
+ constructor(message3, status) {
58904
+ super(message3);
58905
+ this.status = status;
58906
+ }
58907
+ };
58908
+ COPILOT_NO_PLAN = "This GitHub account has no active Copilot plan. Check github.com/settings/copilot, then sign in again.";
58909
+ COPILOT_SIGNED_OUT = "GitHub Copilot is signed out. Sign in again in Settings > AI & accounts > Subscriptions.";
58910
+ }
58911
+ });
58912
+
58913
+ // server/drivers/gcloud-token.ts
58914
+ import { execFile as execFile3 } from "node:child_process";
58915
+ function gcloudTokenCache(run2 = runGcloud, now = Date.now) {
58916
+ let held = null;
58917
+ let renewing = null;
58918
+ return async () => {
58919
+ if (held && held.until > now()) return held.token;
58920
+ renewing ??= run2().then((token) => {
58921
+ held = { token, until: now() + KEEP_MS };
58922
+ return token;
58923
+ }).finally(() => {
58924
+ renewing = null;
58925
+ });
58926
+ return renewing;
58927
+ };
58928
+ }
58929
+ var GCLOUD_SIGNED_OUT, KEEP_MS, runGcloud;
58930
+ var init_gcloud_token = __esm({
58931
+ "server/drivers/gcloud-token.ts"() {
58932
+ "use strict";
58933
+ GCLOUD_SIGNED_OUT = 'Vertex AI needs the Google Cloud CLI signed in on this computer. Run "gcloud auth login", then try again.';
58934
+ KEEP_MS = 45 * 6e4;
58935
+ runGcloud = () => new Promise((resolve14, reject) => {
58936
+ execFile3("gcloud", ["auth", "print-access-token"], { timeout: 2e4, windowsHide: true }, (error51, stdout2) => {
58937
+ const token = String(stdout2 ?? "").trim();
58938
+ if (error51 || !token) return reject(new Error(GCLOUD_SIGNED_OUT));
58939
+ resolve14(token);
58940
+ });
58941
+ });
58942
+ }
58943
+ });
58944
+
58612
58945
  // server/drivers/openai-compat.ts
58946
+ function isFreeOpenRouterModel(id) {
58947
+ return id.endsWith(":free") || id === "openrouter/free";
58948
+ }
58613
58949
  function isOpenRouterUrl(url2) {
58614
58950
  try {
58615
58951
  const host = new URL(url2).hostname.toLowerCase();
@@ -58634,6 +58970,10 @@ function decodeConfig6(raw) {
58634
58970
  // connection (CLI setup uses this). Absent still inherits the global pin.
58635
58971
  provider: typeof config2.provider === "string" ? config2.provider || void 0 : process.env.OPENAI_COMPAT_PROVIDER || void 0,
58636
58972
  ...typeof config2.organization === "string" && config2.organization ? { organization: config2.organization } : {},
58973
+ // Accounts added as "OpenRouter (free models)" before the filter existed
58974
+ // are known by their key's variable.
58975
+ ...config2.modelFilter === "free" || config2.apiKeyEnv === "OPENROUTER_FREE_API_KEY" ? { modelFilter: "free" } : {},
58976
+ ...config2.auth === "githubCopilot" || config2.auth === "gcloud" ? { auth: config2.auth } : {},
58637
58977
  ...typeof config2.project === "string" && config2.project ? { project: config2.project } : {}
58638
58978
  };
58639
58979
  }
@@ -58644,6 +58984,8 @@ var init_openai_compat = __esm({
58644
58984
  init_ollama_cloud();
58645
58985
  init_openai_chat();
58646
58986
  init_provider_key_check();
58987
+ init_github_copilot();
58988
+ init_gcloud_token();
58647
58989
  DRIVER_KIND5 = "openai-compat";
58648
58990
  DEFAULT_IDLE_TIMEOUT_MS = 18e4;
58649
58991
  idleTimeoutMs = () => {
@@ -58685,9 +59027,25 @@ var init_openai_compat = __esm({
58685
59027
  default: config2.model,
58686
59028
  options: DEFAULT_MODELS2.options.some((model) => model.id === config2.model) ? DEFAULT_MODELS2.options : [{ id: config2.model, label: config2.model, custom: true }, ...DEFAULT_MODELS2.options]
58687
59029
  } : DEFAULT_MODELS2;
59030
+ const copilot = config2.auth === "githubCopilot" && apiKey ? copilotSessionCache(apiKey) : void 0;
59031
+ const gcloud = config2.auth === "gcloud" ? gcloudTokenCache() : void 0;
59032
+ const useOptions = (options) => {
59033
+ if (!options.length) return;
59034
+ if (config2.model && !options.some((model) => model.id === config2.model)) {
59035
+ options.unshift({ id: config2.model, label: config2.model, custom: true });
59036
+ }
59037
+ catalog2 = { default: config2.model || options[0].id, options };
59038
+ };
58688
59039
  const fetchModels = async () => {
58689
- if (config2.managedModels) return;
59040
+ if (config2.managedModels || gcloud) return;
58690
59041
  if (!apiKey) return;
59042
+ if (copilot) {
59043
+ try {
59044
+ useOptions(await fetchCopilotModels(await copilot()));
59045
+ } catch {
59046
+ }
59047
+ return;
59048
+ }
58691
59049
  try {
58692
59050
  const response = await fetch(`${config2.url}/models`, {
58693
59051
  headers: { ...teamHeaders, authorization: `Bearer ${apiKey}` },
@@ -58701,6 +59059,7 @@ var init_openai_compat = __esm({
58701
59059
  for (const row of rows) {
58702
59060
  const id = typeof row.id === "string" ? row.id : "";
58703
59061
  if (!id || seen.has(id)) continue;
59062
+ if (config2.modelFilter === "free" && !isFreeOpenRouterModel(id)) continue;
58704
59063
  seen.add(id);
58705
59064
  options.push({
58706
59065
  id,
@@ -58708,11 +59067,7 @@ var init_openai_compat = __esm({
58708
59067
  custom: true
58709
59068
  });
58710
59069
  }
58711
- if (!options.length) return;
58712
- if (config2.model && !options.some((model) => model.id === config2.model)) {
58713
- options.unshift({ id: config2.model, label: config2.model, custom: true });
58714
- }
58715
- catalog2 = { default: config2.model ?? options[0].id, options };
59070
+ useOptions(options);
58716
59071
  } catch {
58717
59072
  }
58718
59073
  };
@@ -58723,6 +59078,12 @@ var init_openai_compat = __esm({
58723
59078
  apiKey,
58724
59079
  apiUrl: config2.url,
58725
59080
  extraHeaders: teamHeaders,
59081
+ ...copilot ? {
59082
+ authorize: async () => {
59083
+ const session = await copilot();
59084
+ return { apiKey: session.token, apiUrl: session.apiUrl, headers: { ...COPILOT_HEADERS } };
59085
+ }
59086
+ } : gcloud ? { authorize: async () => ({ apiKey: await gcloud() }) } : {},
58726
59087
  tools: config2.tools,
58727
59088
  computerUse: true,
58728
59089
  models: () => catalog2,
@@ -58732,14 +59093,18 @@ var init_openai_compat = __esm({
58732
59093
  messages,
58733
59094
  stream,
58734
59095
  stream_options: stream ? { include_usage: true } : void 0,
58735
- ...config2.provider && isOpenRouterUrl(config2.url) ? { provider: { order: [config2.provider], allow_fallbacks: false } } : {}
59096
+ ...config2.provider && isOpenRouterUrl(config2.url) ? { provider: { order: [config2.provider], allow_fallbacks: false } } : {},
59097
+ // OpenRouter then reports each request's price, which the ledger and
59098
+ // the monthly spend limit use instead of an estimate.
59099
+ ...isOpenRouterUrl(config2.url) ? { usage: { include: true } } : {}
58736
59100
  }),
58737
59101
  httpErrorLabel: "upstream",
58738
59102
  missingKeyError: OPENAI_COMPAT_NO_KEY,
58739
59103
  unavailableReason: OPENAI_COMPAT_NO_KEY,
58740
59104
  timeoutMs: idleTimeoutMs(),
58741
59105
  reasoning: true,
58742
- billing: "metered",
59106
+ // A Copilot plan is a subscription, not metered by the token.
59107
+ ...copilot ? {} : { billing: "metered" },
58743
59108
  includeUsageInCompleted: true,
58744
59109
  nativeLog: {
58745
59110
  source: "openai-compat.chat.completions",
@@ -63144,7 +63509,7 @@ function shouldShowBanner(options, stdout2 = process.stdout) {
63144
63509
 
63145
63510
  // server/fleet-cli.ts
63146
63511
  init_atomic();
63147
- import { execFileSync, spawn as spawn4 } from "node:child_process";
63512
+ import { execFileSync as execFileSync2, spawn as spawn4 } from "node:child_process";
63148
63513
  import { appendFileSync, closeSync as closeSync3, existsSync as existsSync7, fsyncSync as fsyncSync2, lstatSync, mkdirSync as mkdirSync5, openSync as openSync3, readFileSync as readFileSync4, rmSync as rmSync3 } from "node:fs";
63149
63514
  import { posix as posix4 } from "node:path";
63150
63515
 
@@ -63687,7 +64052,7 @@ process.stdout.write(JSON.stringify(result));
63687
64052
  function tenantIo(owner, file2, action, content, mode) {
63688
64053
  assertUnixUser(owner);
63689
64054
  const options = { encoding: "utf8", timeout: 5e3, killSignal: "SIGKILL", cwd: "/", env: { PATH: "/usr/bin:/bin" }, stdio: ["pipe", "pipe", "pipe"] };
63690
- const account = execFileSync("/usr/bin/getent", ["passwd", owner], { ...options, maxBuffer: 8192 }).trim().split(":");
64055
+ const account = execFileSync2("/usr/bin/getent", ["passwd", owner], { ...options, maxBuffer: 8192 }).trim().split(":");
63691
64056
  const uid = Number(account[2]);
63692
64057
  const gid = Number(account[3]);
63693
64058
  const home = account[5];
@@ -63695,7 +64060,7 @@ function tenantIo(owner, file2, action, content, mode) {
63695
64060
  throw new Error(`unsafe filesystem identity or path for ${owner}`);
63696
64061
  }
63697
64062
  try {
63698
- return JSON.parse(execFileSync(process.execPath, ["--eval", TENANT_IO], { ...options, maxBuffer: action === "usage" ? 8192 : 32 * 1024 * 1024, input: JSON.stringify({ uid, gid, home, file: file2, action, content, mode }) }));
64063
+ return JSON.parse(execFileSync2(process.execPath, ["--eval", TENANT_IO], { ...options, maxBuffer: action === "usage" ? 8192 : 32 * 1024 * 1024, input: JSON.stringify({ uid, gid, home, file: file2, action, content, mode }) }));
63699
64064
  } catch {
63700
64065
  throw new Error(`could not ${action} workspace file as ${owner}: check ownership, links, file size and permissions`);
63701
64066
  }