limixbot 0.3.108 → 0.3.109

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 (54) hide show
  1. package/dist/assets/{ActivityPanel-CTrLS1XS.js → ActivityPanel-IacZjniB.js} +1 -1
  2. package/dist/assets/{App-CG84MXOY.js → App-Da1IJf4I.js} +8 -8
  3. package/dist/assets/{AppEventEditor-ZtIPD0FQ.js → AppEventEditor-D-JdKwvB.js} +1 -1
  4. package/dist/assets/{BotSettingsDialog-C3tyr4gD.js → BotSettingsDialog-DSZgdb-K.js} +1 -1
  5. package/dist/assets/{BrowserPanel-BBSj_PCL.js → BrowserPanel-B7QVfUIN.js} +1 -1
  6. package/dist/assets/{BrowserProfilesManager-CBzqzPcQ.js → BrowserProfilesManager-30U67jIQ.js} +1 -1
  7. package/dist/assets/{CloudAddDialog-tp51EOQi.js → CloudAddDialog-D4ewT_62.js} +1 -1
  8. package/dist/assets/{ComputerFilesPane-QxES8_oW.js → ComputerFilesPane-Dbt5Octq.js} +1 -1
  9. package/dist/assets/{ComputerPanel-Go21aHH_.js → ComputerPanel-T1eREzMO.js} +2 -2
  10. package/dist/assets/{DataPanel-CohjsyZS.js → DataPanel-tXfBQsfA.js} +1 -1
  11. package/dist/assets/{GrokMoveDialog-Dta-wMUD.js → GrokMoveDialog-CTSZJDDk.js} +1 -1
  12. package/dist/assets/{InspectorPanel-DNVQ8l5h.js → InspectorPanel-B4dI5yXI.js} +1 -1
  13. package/dist/assets/{KeyboardShortcutsModal-DKAqPkt7.js → KeyboardShortcutsModal-Btb5BR6K.js} +1 -1
  14. package/dist/assets/{LimixResizeHandles-DkFJU9cC.js → LimixResizeHandles-IKv2bmO6.js} +1 -1
  15. package/dist/assets/{LiveDesktop-CBma2qSi.js → LiveDesktop-B3CSsFO6.js} +1 -1
  16. package/dist/assets/{LocalVmWorkspace-Dmj0Asui.js → LocalVmWorkspace-DFy-DrTq.js} +1 -1
  17. package/dist/assets/{MacLocalControl-3ulCDLa0.js → MacLocalControl-Cpd2xOz8.js} +1 -1
  18. package/dist/assets/{MarkdownFilePreview-D14WSq4R.js → MarkdownFilePreview-D4A9O3UJ.js} +1 -1
  19. package/dist/assets/{NewBotDialog-YvTqJ2Ew.js → NewBotDialog-CZW0iYlB.js} +1 -1
  20. package/dist/assets/{PhoneAppDialog-ilnxxFj8.js → PhoneAppDialog-BJtplBje.js} +1 -1
  21. package/dist/assets/{PluginsPanel-BcyGpf-0.js → PluginsPanel-C51CDnDj.js} +1 -1
  22. package/dist/assets/{ProIntroduction-CSkNp2Uo.js → ProIntroduction-BpWCjQ1C.js} +1 -1
  23. package/dist/assets/{RemoteAgentSettingsPanel-CqIm4aob.js → RemoteAgentSettingsPanel-BUoUg0hd.js} +1 -1
  24. package/dist/assets/{RoomPanel-DV9a_WMs.js → RoomPanel-BRjsROAZ.js} +1 -1
  25. package/dist/assets/{RoutinesPage-l0d2HuFh.js → RoutinesPage-C0qk4mty.js} +1 -1
  26. package/dist/assets/{SettingsModal-DrG6Vc09.js → SettingsModal-CPNn5FDR.js} +1 -1
  27. package/dist/assets/{ShareTeamDialog-CxhYnAKl.js → ShareTeamDialog-BTMYj845.js} +1 -1
  28. package/dist/assets/{SignedInSites-BLbxN4TK.js → SignedInSites-6XAmuQxr.js} +1 -1
  29. package/dist/assets/{TeamLibraryPanel-DCCNY9_4.js → TeamLibraryPanel-BoCfg2iL.js} +1 -1
  30. package/dist/assets/{TeamMapPage-BHXeLBCn.js → TeamMapPage-DrvtJSus.js} +1 -1
  31. package/dist/assets/{TriggersPage-DFXX3U13.js → TriggersPage-CHGyZ8sb.js} +1 -1
  32. package/dist/assets/{VisibilitySection-Bj2CSIz8.js → VisibilitySection-6rPJvLyB.js} +1 -1
  33. package/dist/assets/{WebhookTrigger-BUWw55_B.js → WebhookTrigger-BVxzRDK2.js} +1 -1
  34. package/dist/assets/{WorksOnGrid-DI002IF-.js → WorksOnGrid-RhbULwdu.js} +1 -1
  35. package/dist/assets/{core-DVjkFPvv.js → core-BA18sP8B.js} +1 -1
  36. package/dist/assets/{import-name-He5LDxDq.js → import-name-bNghNtjG.js} +1 -1
  37. package/dist/assets/{index-DlFIRtPe.js → index-B_pK5sN6.js} +2 -2
  38. package/dist/assets/{index-Cp-6CGKc.js → index-BiD1HNlf.js} +1 -1
  39. package/dist/assets/{mcp-servers-CLZ0PI_2.js → mcp-servers-CiENQYvn.js} +1 -1
  40. package/dist/assets/{new-bot-DxHaApV0.js → new-bot-Dsqzl0Bb.js} +1 -1
  41. package/dist/assets/{org-library-CYxHJUvG.js → org-library-BqlLonI6.js} +1 -1
  42. package/dist/assets/{package-format-DuWZOSdu.js → package-format-BKar6BQ0.js} +1 -1
  43. package/dist/assets/{remote-desktop-panel-BR4X58aF.js → remote-desktop-panel-DI9eWAtC.js} +1 -1
  44. package/dist/index.html +1 -1
  45. package/dist-server/index.js +694 -683
  46. package/dist-server/limixbot.js +199 -186
  47. package/dist-server/package.json +1 -1
  48. package/dist-server/pair-cli.js +199 -186
  49. package/dist-server/server/bot-api-host.js +6 -2
  50. package/dist-server/server/drivers/antigravity-guest.js +105 -0
  51. package/dist-server/server/drivers/antigravity.js +14 -8
  52. package/dist-server/server/drivers/pi.js +5 -3
  53. package/dist-server/server/index.js +9 -2
  54. package/package.json +1 -1
@@ -164,6 +164,7 @@ export function createBotApiHost(deps) {
164
164
  channel?.delivery?.signal.throwIfAborted();
165
165
  await deps.startTurn(botId, mediaPrompt(botApiPrompt(message, receivedAt, { guestChannel: Boolean(channel), publicLookup, careFacts }), channel?.attachment), {
166
166
  threadId, automationSource: "api", unattended: true, userMessage,
167
+ ...(channel?.model ? { channelGuestModel: channel.model } : {}),
167
168
  onSettled: (outcome) => { settled = outcome; markRunning(botId, threadId, false); },
168
169
  onDispatchError: (message) => { dispatchError = message; markRunning(botId, threadId, false); },
169
170
  });
@@ -214,10 +215,13 @@ export function createBotApiHost(deps) {
214
215
  if (!input.owner) {
215
216
  if (savedTask && !savedTask.botApi)
216
217
  fail(404, "no such thread");
217
- if (!deps.canConfine(botId, channelThread))
218
+ const model = await deps.channelGuestModel?.(botId, channelThread);
219
+ if (deps.channelModelChanging?.(botId, channelThread))
220
+ failBeforeAcceptance("capacity_busy");
221
+ if (deps.channelGuestModel ? !model : !deps.canConfine(botId, channelThread))
218
222
  throw Object.assign(new Error(CANNOT_CONFINE), { status: 403, code: "guest_engine" });
219
223
  let attachments = [];
220
- const answer = await runCall(botId, { message: input.text, ...(channelThread ? { thread: channelThread } : {}), wait: Math.round((input.waitMs ?? 600_000) / 1000) }, () => { }, { attachment: input.attachment, delivery: input.delivery, collect(files) { attachments = files; } });
224
+ const answer = await runCall(botId, { message: input.text, ...(channelThread ? { thread: channelThread } : {}), wait: Math.round((input.waitMs ?? 600_000) / 1000) }, () => { }, { model, attachment: input.attachment, delivery: input.delivery, collect(files) { attachments = files; } });
221
225
  const body = answer.body;
222
226
  return { threadId: body.thread, ...(attachments.length ? { attachments } : {}), reply: body.reply ?? "", ...(body.status ? { status: body.status } : {}) };
223
227
  }
@@ -0,0 +1,105 @@
1
+ import { mkdtemp, rm } from "node:fs/promises";
2
+ import { tmpdir } from "node:os";
3
+ import { join } from "node:path";
4
+ import { newEventId, newId } from "../contracts.js";
5
+ import { killCliTree, spawnCli } from "../procs.js";
6
+ export function antigravityGuestAdapter(adapter, cli, env) {
7
+ const listeners = new Set();
8
+ const pending = new Map();
9
+ async function guest(turn) {
10
+ if (!turn.model || turn.images?.length)
11
+ throw new Error("Antigravity customer chat requires a selected model and a text message");
12
+ if (pending.has(turn.threadId))
13
+ throw new Error("Conversation is busy");
14
+ const turnId = newId();
15
+ const controller = new AbortController();
16
+ pending.set(turn.threadId, controller);
17
+ const emit = (event) => {
18
+ const value = { ...event, provider: adapter.provider, turnId, threadId: turn.threadId, eventId: newEventId(), createdAt: new Date().toISOString() };
19
+ for (const listener of listeners)
20
+ listener(value);
21
+ };
22
+ async function run() {
23
+ let cwd;
24
+ try {
25
+ await turn.engineAdmission?.("process");
26
+ cwd = await mkdtemp(join(tmpdir(), "limix-guest-"));
27
+ controller.signal.throwIfAborted();
28
+ const args = ["--input-format", "stream-json", "--output-format", "stream-json", "--sandbox", "--disable-slash-commands",
29
+ "--settings", JSON.stringify({ toolPermission: "strict", allowNonWorkspaceAccess: false }), "--model", turn.model];
30
+ const effort = turn.variant || turn.effort;
31
+ if (effort)
32
+ args.push("--effort", effort);
33
+ const child = spawnCli(cli, args, { cwd, env: { ...env, HOME: cwd, USERPROFILE: cwd, XDG_CONFIG_HOME: cwd, GEMINI_CLI_HOME: cwd }, stdio: ["pipe", "pipe", "pipe"], botWork: true });
34
+ const stop = () => { void killCliTree(child, 0); };
35
+ controller.signal.addEventListener("abort", stop, { once: true });
36
+ const timer = setTimeout(() => controller.abort(), 120_000);
37
+ try {
38
+ const output = await new Promise((resolve, reject) => {
39
+ let data = "";
40
+ let sent = false;
41
+ child.stdout.setEncoding("utf8");
42
+ child.stdout.on("data", (chunk) => {
43
+ if (data.length + chunk.length > 4_000_000) {
44
+ stop();
45
+ reject(new Error("Customer response exceeded output limit"));
46
+ }
47
+ else
48
+ data += chunk;
49
+ if (!sent && data.includes("\n")) {
50
+ try {
51
+ const init = JSON.parse(data.slice(0, data.indexOf("\n")));
52
+ if (init.event !== "init" || init.init?.permission_mode !== "strict")
53
+ throw new Error("Antigravity did not confirm strict guest permissions");
54
+ sent = true;
55
+ const history = turn.transcript?.length ? JSON.stringify(turn.transcript) : undefined;
56
+ const prompt = [turn.system, history, turn.text].filter(Boolean).join("\n\n");
57
+ child.stdin.end(JSON.stringify({ event: "user", message: { content: prompt } }) + "\n");
58
+ }
59
+ catch (error) {
60
+ stop();
61
+ reject(error);
62
+ }
63
+ }
64
+ });
65
+ child.stderr.resume();
66
+ child.once("error", reject);
67
+ child.stdin.on("error", () => { });
68
+ child.once("close", code => code === 0 ? resolve(data) : reject(new Error("Antigravity could not complete this customer request")));
69
+ });
70
+ controller.signal.throwIfAborted();
71
+ const result = output.trim().split(/\r?\n/).map(line => JSON.parse(line)).find(item => item.event === "result")?.result;
72
+ if (result?.status !== "SUCCESS" || typeof result.response !== "string" || !result.response.trim())
73
+ throw new Error("Antigravity returned no customer reply");
74
+ emit({ type: "item.completed", itemType: "assistant_text", text: result.response });
75
+ emit({ type: "turn.completed", ok: true, stopReason: "end_turn", cost: null });
76
+ }
77
+ finally {
78
+ clearTimeout(timer);
79
+ controller.signal.removeEventListener("abort", stop);
80
+ }
81
+ }
82
+ catch (error) {
83
+ emit({ type: "runtime.error", message: error instanceof Error ? error.message : String(error) });
84
+ emit({ type: "turn.completed", ok: false, stopReason: "error", cost: null });
85
+ }
86
+ finally {
87
+ pending.delete(turn.threadId);
88
+ if (cwd)
89
+ await rm(cwd, { recursive: true, force: true, maxRetries: 4 }).catch(() => { });
90
+ }
91
+ }
92
+ emit({ type: "turn.started" });
93
+ void run();
94
+ return { turnId };
95
+ }
96
+ return {
97
+ ...adapter, capabilities: { ...adapter.capabilities, guestTurns: "confined" },
98
+ sendTurn: turn => turn.guestConfined ? guest(turn) : adapter.sendTurn(turn),
99
+ onEvent(listener) { listeners.add(listener); const off = adapter.onEvent(listener); return () => { listeners.delete(listener); off(); }; },
100
+ interruptTurn: async (id, turn) => { pending.get(id)?.abort(); await adapter.interruptTurn(id, turn); },
101
+ hasSession: id => pending.has(id) || adapter.hasSession(id),
102
+ stopAll: async () => { for (const controller of pending.values())
103
+ controller.abort(); await adapter.stopAll(); },
104
+ };
105
+ }
@@ -7,6 +7,7 @@ import { antigravityManagedInstallAvailable, installAntigravityRuntime, resolveA
7
7
  import { resolveAntigravityReleaseAsset } from "./antigravity-release.js";
8
8
  import { VERIFICATION_TEMP_KEY, scheduleAntigravityTempSweep } from "./antigravity-temp.js";
9
9
  import { augmentedPath } from "../env-path.js";
10
+ import { antigravityGuestAdapter } from "./antigravity-guest.js";
10
11
  import { agyCliFor, releaseAgyCli } from "../limix-agy-cli.js";
11
12
  import { bundledEngineCatalog } from "../model-manifest/bundled.js";
12
13
  import { currentEngineCatalog } from "../model-manifest/manifest.js";
@@ -54,6 +55,9 @@ function limixModeFor(wanted, option) {
54
55
  return wanted;
55
56
  return (LIMIX_MODE_ALIASES[wanted] ?? [wanted]).find((value) => offered.includes(value)) ?? null;
56
57
  }
58
+ function selectedAgyCli(cli, id, env) {
59
+ return !cli || cli === "agy" ? agyCliFor(id, env) : null;
60
+ }
57
61
  const support = {
58
62
  driverKind: "antigravityAgent",
59
63
  // Named for what people look for: Google moved personal Gemini subscriptions (free, AI Pro, AI Ultra) from Gemini CLI to Antigravity on 2026-06-18.
@@ -82,7 +86,7 @@ const support = {
82
86
  clientReadRoots: (turn) => (turn.skillFiles ?? []).map(dirname),
83
87
  sanitizeToolPayload: true,
84
88
  resolveCommand: async (env, config, instanceId) => {
85
- const agyCli = agyCliFor(instanceId, env);
89
+ const agyCli = selectedAgyCli(config.cli, instanceId, env);
86
90
  if (agyCli)
87
91
  return { command: agyCli, args: ["acp"] };
88
92
  const runtime = await resolveAntigravityRuntime(config.cli, env);
@@ -99,7 +103,7 @@ const support = {
99
103
  resolveModels: async (env, config, instanceId) => {
100
104
  // Limix: the person's own `agy` CLI is signed in to their Google account (Pro, Ultra…), whose models differ; read
101
105
  // them from the CLI itself instead of the fixed list, which only ever showed one plan's models.
102
- const agyCli = agyCliFor(instanceId, env);
106
+ const agyCli = selectedAgyCli(config.cli, instanceId, env);
103
107
  if (agyCli)
104
108
  return discoverAcpModels(env, agyCli, ["acp"], { default: currentEngineCatalog("antigravity").default, exitGraceMs: 2_000 });
105
109
  const runtime = await resolveAntigravityRuntime(config.cli, env);
@@ -118,7 +122,7 @@ const support = {
118
122
  authFailure: "fail",
119
123
  requireAuthenticationBeforeSpawn: true,
120
124
  isAuthenticated: async (env, config, instanceId) => {
121
- if (agyCliFor(instanceId, env))
125
+ if (selectedAgyCli(config.cli, instanceId, env))
122
126
  return true;
123
127
  try {
124
128
  const runtime = await resolveAntigravityRuntime(config.cli, env);
@@ -130,7 +134,7 @@ const support = {
130
134
  }
131
135
  },
132
136
  snapshot: async (env, config, instanceId) => {
133
- if (agyCliFor(instanceId, env))
137
+ if (selectedAgyCli(config.cli, instanceId, env))
134
138
  return { state: "available", version: "Antigravity CLI", authenticated: true };
135
139
  try {
136
140
  const runtime = await resolveAntigravityRuntime(config.cli, env);
@@ -185,12 +189,13 @@ export const AntigravityDriver = {
185
189
  });
186
190
  return { runtime, profile };
187
191
  };
192
+ const env = { ...process.env, ...input.environment, PATH: augmentedPath() };
193
+ const guestCli = selectedAgyCli(input.config.cli, input.instanceId, env);
194
+ const normal = { ...base.adapter, sendTurn: async (turn) => base.adapter.sendTurn(stageAntigravitySkills(turn, antigravityProfileDirectory(input.instanceId))) };
195
+ const adapter = guestCli ? antigravityGuestAdapter(normal, guestCli, env) : normal;
188
196
  return {
189
197
  ...base,
190
- adapter: {
191
- ...base.adapter,
192
- sendTurn: async (turn) => base.adapter.sendTurn(stageAntigravitySkills(turn, antigravityProfileDirectory(input.instanceId))),
193
- },
198
+ adapter,
194
199
  get models() {
195
200
  return base.models;
196
201
  },
@@ -232,6 +237,7 @@ export const AntigravityDriver = {
232
237
  },
233
238
  dispose: async () => {
234
239
  auth.cancel();
240
+ await adapter.stopAll();
235
241
  await base.dispose();
236
242
  },
237
243
  };
@@ -357,7 +357,7 @@ export const PiDriver = {
357
357
  const selection = parseToolScope(turn.toolScope);
358
358
  if (!selection.ok)
359
359
  throw new Error(selection.error);
360
- const toolScope = selection.scope;
360
+ const toolScope = turn.guestConfined ? { allow: [] } : selection.scope;
361
361
  if (active.has(threadId))
362
362
  throw new Error("a turn is already running on this thread");
363
363
  const fullAuto = turn.approvalMode === undefined ? config.fullAuto : false;
@@ -383,7 +383,7 @@ export const PiDriver = {
383
383
  }
384
384
  // The MCP config carries credentials: a 0600 temp file removed at settle, never argv.
385
385
  // Written on every turn: the extension also carries ask_user.
386
- const mcpServers = buildMcpServers(turn);
386
+ const mcpServers = turn.guestConfined ? {} : buildMcpServers(turn);
387
387
  const askUser = toolScope === undefined || allowsTool(toolScope, { kind: "native", name: ASK_USER_TOOL });
388
388
  const mcpTempDir = mkdtempSync(join(tmpdir(), "omb-pi-mcp-"));
389
389
  const scopeReadyPath = toolScope !== undefined ? join(mcpTempDir, "scope-ready.json") : undefined;
@@ -398,7 +398,8 @@ export const PiDriver = {
398
398
  catch { }
399
399
  throw err;
400
400
  }
401
- const childArgs = [...PI_ARGS, "-e", SPAWNED_PROXIES.piMcpExtension];
401
+ const guestArgs = turn.guestConfined ? ["--no-tools", "--no-extensions", "--no-skills", "--no-context-files", "--no-prompt-templates"] : [];
402
+ const childArgs = [...PI_ARGS, ...guestArgs, "-e", SPAWNED_PROXIES.piMcpExtension];
402
403
  // spawnCli can throw synchronously, before settle() could remove the credential file.
403
404
  const child = (() => {
404
405
  try {
@@ -923,6 +924,7 @@ export const PiDriver = {
923
924
  provider: DRIVER_KIND,
924
925
  capabilities: {
925
926
  sessionModelSwitch: "in-session",
927
+ guestTurns: "confined",
926
928
  // pi core has no MCP client of its own.
927
929
  agentsMcp: true,
928
930
  computerMcp: true,
@@ -7826,9 +7826,13 @@ async function beginTurn(botId, text, opts) {
7826
7826
  }
7827
7827
  healThreadModel(botId, threadId);
7828
7828
  limitFailovers.restore(botId, threadId);
7829
- const bot = store.projectBotForTask(botId, threadId);
7830
- if (!bot)
7829
+ const projected = store.projectBotForTask(botId, threadId);
7830
+ if (!projected)
7831
7831
  throw Object.assign(new Error("no such task"), { status: 404 });
7832
+ // Only the confined channel ingress may override the provider for a single turn.
7833
+ const channelModel = opts?.channelGuestModel && opts.automationSource === "api" && botApiThread(threadId)
7834
+ ? opts.channelGuestModel : undefined;
7835
+ const bot = channelModel ? { ...projected, modelSelection: channelModel } : projected;
7832
7836
  if (bot.approvalGrant) {
7833
7837
  throw Object.assign(new Error("this bot's approval level is still being confirmed — try again"), { status: 409, code: "settling" });
7834
7838
  }
@@ -9880,6 +9884,9 @@ const webhookRequests = new WebhookRequestService({ store, webhooks, botName: (b
9880
9884
  const botApi = createBotApiHost({ store, startTurn, threadBusy, careFacts: (botId, message) => { const bot = store.bot(botId); return bot ? industryGuestFacts(bot, message, servers => managedPolicy.filterMcp(servers)) : Promise.resolve(undefined); }, canStart: (botId, threadId) => canAdmitDirectTurn(botId, threadId, false), channelModelChanging: (botId, threadId) => {
9881
9885
  const selection = threadId ? turnSelection(botId, threadId) : store.bot(botId)?.modelSelection;
9882
9886
  return Boolean(store.bot(botId)?.approvalGrant || selection && providerInstancesChanging.has(selection.instanceId));
9887
+ }, channelGuestModel: async (botId) => {
9888
+ const selected = store.bot(botId)?.modelSelection;
9889
+ return selected && registry.get(selected.instanceId)?.adapter.capabilities.guestTurns === "confined" ? selected : undefined;
9883
9890
  }, canConfine: (botId, threadId) => {
9884
9891
  const selection = threadId ? turnSelection(botId, threadId) : store.bot(botId)?.modelSelection;
9885
9892
  return registry.get(selection?.instanceId ?? "")?.adapter.capabilities.guestTurns === "confined";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "limixbot",
3
- "version": "0.3.108",
3
+ "version": "0.3.109",
4
4
  "description": "Run the Limix Bot server anywhere and pair your devices to it (Leox ৹ Limix AI)",
5
5
  "license": "Apache-2.0",
6
6
  "type": "module",