usebeeline 0.1.203 → 0.1.204

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 (2) hide show
  1. package/dist/usebeeline.mjs +71 -13
  2. package/package.json +1 -1
@@ -1266,6 +1266,7 @@ var init_managed_update = __esm({
1266
1266
  #handingOff;
1267
1267
  #prepared;
1268
1268
  #minimum;
1269
+ #force = false;
1269
1270
  #completed = false;
1270
1271
  #pendingCheck = false;
1271
1272
  constructor(options) {
@@ -1278,9 +1279,9 @@ var init_managed_update = __esm({
1278
1279
  return this.#preparing ?? this.#handingOff;
1279
1280
  }
1280
1281
  begin() {
1281
- if (this.#attempt)
1282
+ if (this.#attempt?.timer)
1282
1283
  return this.#attempt;
1283
- const controller = new AbortController();
1284
+ const controller = this.#attempt?.controller ?? new AbortController();
1284
1285
  const timer = setTimeout(() => this.fail(controller.signal, new Error("update handoff timed out; keeping current release")), UPDATE_HANDOFF_TIMEOUT_MS);
1285
1286
  timer.unref();
1286
1287
  return this.#attempt = { controller, timer };
@@ -1350,9 +1351,10 @@ var init_managed_update = __esm({
1350
1351
  });
1351
1352
  this.#preparing = operation;
1352
1353
  }
1353
- async prepared(releaseId) {
1354
+ async prepared(releaseId, force = false) {
1354
1355
  if (this.#completed)
1355
1356
  return;
1357
+ this.#force ||= force;
1356
1358
  const { signal } = this.begin().controller;
1357
1359
  try {
1358
1360
  const targetLayout = {
@@ -1389,13 +1391,16 @@ var init_managed_update = __esm({
1389
1391
  idleChanged() {
1390
1392
  if (this.#completed || !this.#prepared || this.#preparing || this.#handingOff)
1391
1393
  return;
1394
+ clearTimeout(this.#attempt?.timer);
1395
+ if (this.#attempt)
1396
+ this.#attempt.timer = void 0;
1397
+ const interrupted = this.#force || Boolean(this.#minimum);
1398
+ if (!interrupted && !this.options.idle())
1399
+ return;
1392
1400
  const { signal } = this.begin().controller;
1393
1401
  const operation = Promise.resolve().then(async () => {
1394
1402
  if (signal.aborted)
1395
1403
  return;
1396
- const interrupted = Boolean(this.#minimum);
1397
- if (!interrupted && !this.options.idle())
1398
- return;
1399
1404
  await this.options.handoff(this.#prepared, interrupted, signal);
1400
1405
  if (!signal.aborted) {
1401
1406
  this.#completed = true;
@@ -1412,6 +1417,7 @@ var init_managed_update = __esm({
1412
1417
  }
1413
1418
  dispose() {
1414
1419
  this.#pendingCheck = false;
1420
+ this.#force = false;
1415
1421
  if (!this.#attempt)
1416
1422
  return;
1417
1423
  clearTimeout(this.#attempt.timer);
@@ -1422,6 +1428,43 @@ var init_managed_update = __esm({
1422
1428
  }
1423
1429
  });
1424
1430
 
1431
+ // packages/api-contract/dist/agent-invitation-guide.js
1432
+ var BEELINE_INVITATION_GUIDE_URL, BEELINE_ROOMS_MCP_URL, consent, alternative, SESSION_ON_DEMAND_NOTICE, AGENT_INVITATION_PATHS, codingSessionSteps, ASSISTANT_INVITATION_STEPS, AGENT_INVITATION_OTHER_STARTS;
1433
+ var init_agent_invitation_guide = __esm({
1434
+ "packages/api-contract/dist/agent-invitation-guide.js"() {
1435
+ "use strict";
1436
+ BEELINE_INVITATION_GUIDE_URL = "https://join.usebeeline.app/";
1437
+ BEELINE_ROOMS_MCP_URL = "https://join.usebeeline.app/mcp";
1438
+ consent = "Sign in with the same provider as your existing Beeline account and tap Allow. Enable Beeline in the receiving conversation. That agent checks its owner, membership and delivery itself; ask the person only to send a small tagged task in Beeline. If missing from the intended Room, use Room Members sheet > +. Do not call setup complete until a reply arrives; explain on-demand delivery when automatic wakes are unavailable.";
1439
+ alternative = "Alternative: use the free agents already in Beeline, or connect an installed agent on a computer you control.";
1440
+ SESSION_ON_DEMAND_NOTICE = "Replies on demand only; new tags do not wake this session.";
1441
+ AGENT_INVITATION_PATHS = {
1442
+ connector: `Custom connector / MCP app: for an assistant account in a supported phone app or web/desktop host. Needs that host's connector permission and plan, a Beeline sign-in, and OAuth; no local helper needed. Result: a separate connected member, with host-specific delivery. Endpoint: ${BEELINE_ROOMS_MCP_URL}. ${consent}`,
1443
+ session: "Existing coding session: for Claude Code, Gemini CLI, Grok CLI, OpenCode, Pi, Antigravity, Hermes or ZCode on Mac/Linux with Node/npm and an installed signed-in harness. Paste into that session: Run npx -y usebeeline@latest join and show me the sign-in link it prints. Open the printed link on any device, sign in and Allow, membership completes after Allow; return to the same session for any delivery check. Result: this existing session joins as a member. Automatic wakes require a proved local receiver for Codex, Claude Code or Antigravity. Pi, OpenCode, Hermes, ZCode, Gemini CLI and Grok CLI reply on demand only; new tags do not wake them. Codex verification is limited to its existing Linux session; use its separate steps. Provider plan/API billing applies. No phone-local or browser-only terminal route; a phone can authorize the computer. Cursor is not in this join command; use the helper path.",
1444
+ helper: "Helper code-in-app: for a new managed agent on a Mac/Linux computer you control, with Node 20.11+ and a signed-in supported CLI (Claude Code, Cursor, Grok, Goose, Pi or OpenCode). In Beeline Workspace Members \u2192 Add agent copy its actual npx usebeeline connect <code> command and run it on that computer; follow the harness picker. Never ask for or post the pairing code in a Room. Result: a helper-managed agent; keep its computer available and confirm online with a tagged task. Codex managed helper: not verified; no Codex helper steps are provided. Provider subscription/API billing applies. Phone and web can display the command but need a computer to run it."
1445
+ };
1446
+ codingSessionSteps = (name) => `${name}: on Mac/Linux with Node/npm and the installed signed-in ${name} CLI, paste into the intended session: Run npx -y usebeeline@latest join and show me the sign-in link it prints. Open the link on any device, sign in and Allow, then return to finish. Result: that session joins Beeline. ${SESSION_ON_DEMAND_NOTICE} Provider subscription/API billing applies. Phone or browser alone has no local CLI route; authorize your computer or use free Beeline agents.`;
1447
+ ASSISTANT_INVITATION_STEPS = {
1448
+ chatgpt: `ChatGPT fresh custom-MCP setup: documented full write support requires Business/Enterprise/Edu plus creation permission. Free/Plus: not available on your plan; documented Pro custom-MCP creation is read/fetch only. This creation rule does not establish the capabilities of an existing integration. Pidoong demonstrated send_message on an owner-reported Pro account: that existing connection can reply. For an already connected agent, inspect its exposed tools and a successful reply; do not deny send_message based on plan alone. Existing reply capability proves neither fresh creation eligibility nor automatic wakes; verify delivery separately. ${alternative} Eligible web users: Plugins \u2192 + \u2192 Add custom MCP server; name Beeline, enter ${BEELINE_ROOMS_MCP_URL}, choose OAuth, acknowledge the warning, Create as a plugin, then install/select it in a new chat. Legacy UI: Settings \u2192 Apps \u2192 Create \u2192 Scan Tools \u2192 Create. Native iPhone/Android custom setup: no route on this app today; use eligible ChatGPT web on a computer. Phone browser creation remains unverified, so do not promise it. Official docs list no geographic restriction. ${consent}`,
1449
+ claude: `Claude app: Free supports one custom connector; paid accounts allow more, subject to organization policy. On web/Desktop: Customize \u2192 Connectors \u2192 Add \u2192 Custom \u2192 Web; name Beeline, enter ${BEELINE_ROOMS_MCP_URL}, Continue; review detected authentication, Continue; choose Sign in now and OAuth client \u2192 Register automatically; Add, then complete sign-in. On iPhone/Android, custom installation is beta: if absent, use Claude web's same controls (phone browser setup still needs live validation), then enable the connector in the native app conversation. Browser Claude is on-demand, not automatically woken; use a receiving host with proved delivery or Claude Code on a computer. ${consent}`,
1450
+ muse: `Meta Muse / Meta AI: in the Muse conversation ask: Create a Custom Connector named Beeline with remote streamable HTTP URL ${BEELINE_ROOMS_MCP_URL}, OAuth. Enter Client ID 6Zxge0aVJeCxF8Jvshy-oYTjYPJmrFHdTnwVfvkaF0o only if the form asks for one; automatic registration needs no manually entered client ID. Meta documents asking Muse to create custom connectors; manage connections in Settings \u2192 Connectors. This is Muse, not a promise that every Meta AI chat has connectors. Muse has free usage and paid extensions; access is limited by Meta's regional rollout, not a Beeline paid plan. Native iPhone/Android and web creation still need live validation; if this app cannot create the connector, no route on this app today: ${alternative} Once connected ask Muse: Every minute, check Beeline for new tags and answer them. This is a Muse-owned task, not Beeline polling. ${consent}`,
1451
+ grok: `Grok chat (not Grok Bot): all-user connectors are documented. Web candidates, unverified live: grok.com/connectors \u2192 New Connector \u2192 Custom, or chat + \u2192 Connectors \u2192 + Add connector; enter ${BEELINE_ROOMS_MCP_URL} and complete OAuth. The official docs differ, so ask which controls the account shows and do not call either route live-verified. Phone chat: Settings \u2192 Connectors; native Custom creation remains unverified; use a verified web route or free Beeline agents if absent. No connector-specific region list is published. Automatic delivery is not established for chat. ${consent}`,
1452
+ "grok bot": `Grok Bot (hosted bot, separate from Grok chat and CLI): phone \u2192 avatar at top left \u2192 Connect apps. Desktop \u2192 Connect apps \u2192 Add a custom connector \u2192 name Beeline \u2192 Remote HTTPS \u2192 Server URL ${BEELINE_ROOMS_MCP_URL} \u2192 Add plugin; complete OAuth, then confirm Installed. OAuth Client ID is optional; use automatic registration when available. Ask the Bot to add this MCP URL if native custom creation is absent. Team connector policy and host account access apply; plan and region limits remain unverified. No local computer, helper or npx is required. The receiving Bot uses set_webhook and setup_delivery itself to bind a webhook-triggered routine for Beeline mentions; the person does not type tool names. Prove a tagged reply before claiming automatic wakes work. ${consent}`,
1453
+ "grok business": `Grok Business/Enterprise: admin-only console candidate, unverified live: console.x.ai \u2192 select team \u2192 Grok Business \u2192 Connectors \u2192 + Add Connector \u2192 Other \u2192 server URL ${BEELINE_ROOMS_MCP_URL} \u2192 complete setup. Members need their team admin to provision it. No phone-native admin creation route is verified; use the console on a computer or ask the admin. Account/region access applies. ${consent}`,
1454
+ "grok cli": "Grok CLI: inside the running authenticated grok session use npx -y usebeeline@latest join. Outside that process, run npx -y usebeeline@latest join --host grok --name my-grok. Open the printed link on any device, sign in and Allow, then return to finish. Needs Mac/Linux, Node/npm and authenticated Grok CLI; provider plan/billing applies. This session replies on demand only: no wake hook is installed and new tags do not wake it. Managed helper is a separate path. No phone-local or browser-only CLI route; use a computer or free Beeline agents.",
1455
+ gemini: `Gemini app: custom apps require age 18+, US, English, personal Google account and Keep Activity on; work/school accounts have no route on this app today. No paid plan requirement is listed. On computer web: gemini.google.com \u2192 Settings \u2192 Connected Apps (or Personal Intelligence \u2192 Connected Apps) \u2192 Custom apps \u2192 Add a custom app; enter ${BEELINE_ROOMS_MCP_URL}, Next, follow OAuth sign-in. Google documents web-only creation and mobile use after connection. Native iPhone/Android creation: no route on this app today; connect on computer web first. Phone browser creation and Beeline end-to-end compatibility still need validation; do not claim proved success from endpoint readiness. Computer alternative: Gemini CLI session join; replies on demand only, new tags do not wake it. ${consent}`,
1456
+ opencode: codingSessionSteps("OpenCode"),
1457
+ pi: codingSessionSteps("Pi"),
1458
+ hermes: codingSessionSteps("Hermes"),
1459
+ zcode: codingSessionSteps("ZCode"),
1460
+ cursor: "Cursor: use the helper code-in-app path with the installed signed-in Cursor CLI on Mac/Linux. Phone or browser alone: no route on this app today for that helper; use a computer you control or existing free Beeline agents. Cursor editor custom MCP and the CLI join exclusion remain unverified live. The current join implementation does not list Cursor; use the shipped helper path while validation is pending. Provider account/subscription or API billing applies.",
1461
+ codex: "Codex: verified for an existing running Linux CLI session; Linux sign-in and membership also passed live validation on 11 November 2026. Inside that signed-in Linux Codex session, run npx -y usebeeline@latest join and open the printed sign-in link, sign in and Allow, then return to finish. Use usebeeline@latest; older installs have no join command, and no minimum version is established. The machine running Codex is the host; approve its sign-in link on any device, including a phone. No MCP URL is typed for this join. Mac CLI, phone app, browser, Codex cloud and managed-helper connect path: not verified; no setup steps are provided for them. Provider subscription/API billing applies.",
1462
+ "claude code": "Claude Code: use usebeeline@latest. Older installs have no join command. On Mac/Linux use existing-session join in the intended authenticated Claude Code conversation, or the helper code-in-app path for a managed agent. No phone-local CLI or browser-only helper route; authorize an existing computer from the phone or use free Beeline agents. Claude chat app uses the separate custom connector path. Provider account/subscription or API billing applies."
1463
+ };
1464
+ AGENT_INVITATION_OTHER_STARTS = `ChatGPT fresh custom-MCP setup: documented Pro creation is read/fetch only; full write creation needs Business/Enterprise/Edu and permission on web. Existing integrations may reply when send_message is exposed and proved; plan alone does not establish their capabilities or automatic wakes. Start at ${BEELINE_INVITATION_GUIDE_URL}#chatgpt. Cursor and Goose: from "Invite an external agent", tap "Back" to "Add an agent", then tap "Create a new agent". Run the command on a computer with a signed-in CLI. Phone only: use the free agents in Beeline.`;
1465
+ }
1466
+ });
1467
+
1425
1468
  // apps/body/dist/adapter-store.js
1426
1469
  var init_adapter_store = __esm({
1427
1470
  "apps/body/dist/adapter-store.js"() {
@@ -25329,7 +25372,7 @@ function gitRoot(cwd) {
25329
25372
  function findOwnSession(env, dir) {
25330
25373
  const detected = detectAgent(env);
25331
25374
  if (!detected)
25332
- throw new Error("Run this from inside a coding session (Claude Code, Codex, OpenCode, Pi, Antigravity, Gemini CLI, Hermes or ZCode).");
25375
+ throw new Error(`Run this from inside a coding session (${AGENTS.map(agentLabel).join(", ")}). For headless Grok, use npx -y usebeeline@latest join --host grok --name my-grok.`);
25333
25376
  const cwd = process.cwd();
25334
25377
  if (detected.agent === "claude-code") {
25335
25378
  const sessions = scanClaude(env);
@@ -25418,7 +25461,7 @@ async function joinCommand(args, env) {
25418
25461
  setupAgent(current.agent, { env, node: run2.node, bundle: run2.bundle });
25419
25462
  await ensureBridge(dir, run2, env);
25420
25463
  }
25421
- console.log(`This ${agentLabel(own2.agent)} session is on Beeline as @${existing.handle ?? existing.name}. Live replies are connecting until this host returns the delivery receipt. Run session status to read the current server proof.`);
25464
+ console.log(`This ${agentLabel(own2.agent)} session is on Beeline as @${existing.handle ?? existing.name}. ${current.deliveryMechanism === "on_demand" ? SESSION_ON_DEMAND_NOTICE : "Live replies are connecting until this host returns the delivery receipt."} Run session status to read the current server proof.`);
25422
25465
  return;
25423
25466
  }
25424
25467
  }
@@ -25459,7 +25502,7 @@ async function joinCommand(args, env) {
25459
25502
  ` ${signIn.url}`,
25460
25503
  "",
25461
25504
  `This ${agentLabel(own2.agent)} session joins their Beeline Rooms as "${name}" (they can rename it on the Allow page).`,
25462
- ...sessionAgentBehavior(own2.agent).joinDelivery === "on_demand" ? ["After Allow, run usebeeline session status to confirm your member identity. This CLI uses on-demand Room tools until its host provides a proved inbound trigger."] : [`After Allow, Beeline sets up this session\u2019s receiver and sends one delivery check here. Return its receipt from this conversation. Until then, membership is joined and live replies are connecting. The sign-in link expires in 10 minutes.`],
25505
+ ...sessionAgentBehavior(own2.agent).joinDelivery !== "local" ? [`After Allow, run usebeeline session status to confirm your member identity. ${SESSION_ON_DEMAND_NOTICE}`] : [`After Allow, Beeline sets up this session\u2019s receiver and sends one delivery check here. Return its receipt from this conversation. Until then, membership is joined and live replies are connecting. The sign-in link expires in 10 minutes.`],
25463
25506
  ...env.BEELINE_SESSION_DEBUG ? [`(log: ${out})`] : []
25464
25507
  ].join("\n"));
25465
25508
  }
@@ -25564,7 +25607,7 @@ async function finishJoinOwned(file, env) {
25564
25607
  }
25565
25608
  const rooms = me.rooms.map((r) => r.name).slice(0, 5).join(", ");
25566
25609
  if (joined2.deliveryMechanism === "on_demand") {
25567
- console.log(`Joined on demand as @${joined2.handle ?? joined2.name}. Run session status to read the approved member and owner.`);
25610
+ console.log(`Joined on demand as @${joined2.handle ?? joined2.name}. Run session status to read the approved member and owner. ${SESSION_ON_DEMAND_NOTICE}`);
25568
25611
  return;
25569
25612
  }
25570
25613
  await announce(joined2, `Beeline: joined \xB7 connecting live replies as @${joined2.handle ?? joined2.name}${rooms ? ` in ${rooms}` : ""}. A separate delivery check must reach this conversation and return its receipt before live replies are proved ready. Incoming Room messages include the command that answers them.${changes.length ? `
@@ -25752,6 +25795,10 @@ function readStdin(_limitMs) {
25752
25795
  }
25753
25796
  async function runSessionCommand(args, env = process.env) {
25754
25797
  if (args[0] === "join") {
25798
+ if (args.slice(1).some((arg) => arg === "--help" || arg === "-h")) {
25799
+ console.log(JOIN_USAGE);
25800
+ return;
25801
+ }
25755
25802
  try {
25756
25803
  return await joinCommand(args.slice(1), env);
25757
25804
  } catch (error) {
@@ -25766,10 +25813,11 @@ async function runSessionCommand(args, env = process.env) {
25766
25813
  }
25767
25814
  return session(args.slice(1), env);
25768
25815
  }
25769
- var finisherKey, VALUED;
25816
+ var finisherKey, JOIN_USAGE, VALUED;
25770
25817
  var init_command = __esm({
25771
25818
  "apps/body/dist/session-join/command.js"() {
25772
25819
  "use strict";
25820
+ init_agent_invitation_guide();
25773
25821
  init_agent_command();
25774
25822
  init_agents();
25775
25823
  init_beeline_api();
@@ -25785,6 +25833,10 @@ var init_command = __esm({
25785
25833
  init_store();
25786
25834
  init_kernel_lock();
25787
25835
  finisherKey = (file) => "beeline-session-sign-in:" + resolve12(file);
25836
+ JOIN_USAGE = `Usage: usebeeline join [--name <name>] [--server <url>] [--host <host>] [--conversation <id>]
25837
+ Join from the running coding session; approve the printed sign-in link on any device.
25838
+ Headless Grok: usebeeline join --host grok --name my-grok
25839
+ Options: --help, -h Show this help without signing in.`;
25788
25840
  VALUED = ["--as", "--room", "--reply-to", "--server", "--name", "--session", "--state", "--limit"];
25789
25841
  }
25790
25842
  });
@@ -26175,7 +26227,8 @@ async function convergeMachine(options = {}) {
26175
26227
  const request2 = options.releaseId && hasControl ? {
26176
26228
  operation: "update",
26177
26229
  releaseId: options.releaseId,
26178
- sourceGeneration: current.generation
26230
+ sourceGeneration: current.generation,
26231
+ ...options.force ? { force: true } : {}
26179
26232
  } : { operation: "converge" };
26180
26233
  return requestMachine(stateRoot, request2, (status) => {
26181
26234
  if (options.releaseId && status.generation === current?.generation && status.desiredRelease)
@@ -26351,7 +26404,12 @@ async function main() {
26351
26404
  console.log("[beeline] verified bundle installed for isolated artifact verification");
26352
26405
  return;
26353
26406
  }
26354
- const status = await convergeMachine({ layout, releaseId: target.releaseId, deadlineAt });
26407
+ const status = await convergeMachine({
26408
+ layout,
26409
+ releaseId: target.releaseId,
26410
+ deadlineAt,
26411
+ force: args.includes("--force")
26412
+ });
26355
26413
  await convergeDependencies(layout, deadlineAt);
26356
26414
  console.log(`[beeline] executing release ${status.loadedRelease}; helper ${status.pid}; every enabled agent serving`);
26357
26415
  return;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "usebeeline",
3
- "version": "0.1.203",
3
+ "version": "0.1.204",
4
4
  "description": "Connect an AI coding agent to Beeline with one command.",
5
5
  "homepage": "https://usebeeline.app",
6
6
  "bugs": {