@bivy/bivy 0.20.9-staging.13 → 0.20.9-staging.2

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 (124) hide show
  1. package/README.md +5 -6
  2. package/bin/bivy.mjs +56 -13
  3. package/bin/cli-commands.mjs +4 -2
  4. package/bin/guides/talk-to-the-user.md +24 -13
  5. package/dist/agent-instructions.js +10 -4
  6. package/dist/agents/pi/integration.js +1 -1
  7. package/dist/apps/styles.css +47 -14
  8. package/dist/certification/generated.js +1 -1
  9. package/dist/device-registry.js +0 -27
  10. package/dist/ephemeral-exec.js +108 -0
  11. package/dist/ephemeral-teardown.js +1 -11
  12. package/dist/exec.js +1 -4
  13. package/dist/runtime/model-catalog.js +0 -16
  14. package/dist/server.js +54 -62
  15. package/dist/session/event-log.js +17 -2
  16. package/dist/session/inline-image-fetch.js +3 -1
  17. package/dist/session/session-tokens.js +1 -1
  18. package/dist/session/suggestions.js +17 -0
  19. package/package.json +6 -6
  20. package/web/assets/AutomationsView-DEild20v.js +51 -0
  21. package/web/assets/{ChangesCard-aSANT98o.js → ChangesCard-DcSRy5g_.js} +1 -1
  22. package/web/assets/{LibraryView-CcssDQpe.js → LibraryView-Cu0tU0gU.js} +1 -1
  23. package/web/assets/{ProviderConnect-GHqdbDfx.js → ProviderConnect-cpGwBMrU.js} +1 -1
  24. package/web/assets/Settings-BoTU83-i.js +10 -0
  25. package/web/assets/{Sheet-akpaXVWk.js → Sheet-D-5t3lJ0.js} +1 -1
  26. package/web/assets/{Terminal-Cl9BAqmG.js → Terminal-CjMjKB1f.js} +1 -1
  27. package/web/assets/{VoiceSettings-CiVFD62Z.js → VoiceSettings-xv6rjaY2.js} +1 -1
  28. package/web/assets/{abnfDiagram-VCTEODGH-DvcKa8Q6.js → abnfDiagram-VCTEODGH-BLT3MLyK.js} +1 -1
  29. package/web/assets/architecture-7GRP2DOG-s28sMQ0-.js +1 -0
  30. package/web/assets/{architectureDiagram-5GKGNRK7-C5UHXNNA.js → architectureDiagram-5GKGNRK7-BGinLETW.js} +1 -1
  31. package/web/assets/{blockDiagram-I7D4REHJ-B3bEudR9.js → blockDiagram-I7D4REHJ-BNiY2HLB.js} +1 -1
  32. package/web/assets/{c4Diagram-7LVT6UL2-B-Uwyk2S.js → c4Diagram-7LVT6UL2-46aGfRMd.js} +1 -1
  33. package/web/assets/channel-CPSM7rj7.js +1 -0
  34. package/web/assets/{chunk-4HAMMTFA-ZZNhY7ou.js → chunk-4HAMMTFA-CRzer-vm.js} +1 -1
  35. package/web/assets/{chunk-75Z2AOVW-DkSlF2wc.js → chunk-75Z2AOVW-MFkgf2Ar.js} +1 -1
  36. package/web/assets/{chunk-DU6HZSFF-DJSerjpq.js → chunk-DU6HZSFF-Bpze6ID8.js} +1 -1
  37. package/web/assets/{chunk-F27PBJKO-BnSlJxd6.js → chunk-F27PBJKO-Dq3OmNXG.js} +1 -1
  38. package/web/assets/{chunk-GMAD6QVW-k1Kqheha.js → chunk-GMAD6QVW-umDWdG9g.js} +1 -1
  39. package/web/assets/{chunk-GVQU2GXP-D-Dky606.js → chunk-GVQU2GXP-DuT1Awt9.js} +1 -1
  40. package/web/assets/{chunk-IMKFNOWR-CMgW8VOp.js → chunk-IMKFNOWR-CpFFccVb.js} +1 -1
  41. package/web/assets/{chunk-L3NEJ4N5-BPppfNZq.js → chunk-L3NEJ4N5-0jRWrASa.js} +1 -1
  42. package/web/assets/{chunk-OSK3NFVY-X1S-7cI8.js → chunk-OSK3NFVY-CBErW4-p.js} +1 -1
  43. package/web/assets/{chunk-P2QGCYS3-C3D0xAbV.js → chunk-P2QGCYS3-BPMii7LM.js} +1 -1
  44. package/web/assets/{chunk-POPQ4Y6H-rzpiAvDt.js → chunk-POPQ4Y6H-CHTRMb_C.js} +1 -1
  45. package/web/assets/{chunk-PWAF6VOD-BnelcVCG.js → chunk-PWAF6VOD-BOcNKrmu.js} +1 -1
  46. package/web/assets/{chunk-SHT3W25Y-BpUiekby.js → chunk-SHT3W25Y-Dvb-oEDN.js} +1 -1
  47. package/web/assets/{chunk-SVP7TREG-CHzYiMcX.js → chunk-SVP7TREG-B4AQIUTK.js} +1 -1
  48. package/web/assets/{chunk-TICWLB2K-Cil76YwI.js → chunk-TICWLB2K-CWzLTsHW.js} +1 -1
  49. package/web/assets/classDiagram-ZZMXUADV-CZ-So67n.js +1 -0
  50. package/web/assets/classDiagram-v2-VYDZK3BY-CZ-So67n.js +1 -0
  51. package/web/assets/{cynefin-OW5HDTMX-DqYTG6s3.js → cynefin-OW5HDTMX-BPkKT48j.js} +1 -1
  52. package/web/assets/{cynefinDiagram-5FMLGOSQ-DHoCWcHR.js → cynefinDiagram-5FMLGOSQ-Ck2qLmpR.js} +1 -1
  53. package/web/assets/{dagre-GXQ25YYZ-CkVRQJ7Q.js → dagre-GXQ25YYZ-BPKEs_49.js} +1 -1
  54. package/web/assets/{diagram-S7CK7UJ4-DTqxklJ8.js → diagram-S7CK7UJ4-ou-L5HdJ.js} +1 -1
  55. package/web/assets/{diagram-UQ7AKVKN-BfPq1M8P.js → diagram-UQ7AKVKN-DihVn6fF.js} +1 -1
  56. package/web/assets/{diagram-VSXAHHWV-BQnLbJ0g.js → diagram-VSXAHHWV-BkLtxbP7.js} +1 -1
  57. package/web/assets/{diagram-VX7I27RA-B8A1-dub.js → diagram-VX7I27RA-BZ-Z-CwP.js} +1 -1
  58. package/web/assets/{diagram-Z3DM3KII-CRBTYKWA.js → diagram-Z3DM3KII-BQN-bGqD.js} +1 -1
  59. package/web/assets/{ebnfDiagram-PWID7BFC-FvVv2X7o.js → ebnfDiagram-PWID7BFC-aKK1a_it.js} +1 -1
  60. package/web/assets/{erDiagram-RLTQ6QDP-D1s8uXzs.js → erDiagram-RLTQ6QDP-BGsXtJl-.js} +1 -1
  61. package/web/assets/eventmodeling-NTZA5JFV-Dd2mk6iz.js +1 -0
  62. package/web/assets/flowDiagram-HODETNUW-D7f1jYIL.js +1 -0
  63. package/web/assets/{ganttDiagram-EL5Y4UJY-BEdenIa6.js → ganttDiagram-EL5Y4UJY-lrYuyNAe.js} +1 -1
  64. package/web/assets/{gitGraph-4MIJSDKK-BCH2_BAZ.js → gitGraph-4MIJSDKK-raj_IxZ8.js} +1 -1
  65. package/web/assets/{gitGraphDiagram-WWUBYQGX-BYL-zyse.js → gitGraphDiagram-WWUBYQGX-DzqRGXuk.js} +1 -1
  66. package/web/assets/{index-ROUVrPbc.js → index-B6GPr2Pt.js} +2 -2
  67. package/web/assets/index-D76QD5dl.css +1 -0
  68. package/web/assets/{info-A6RAGUB7-CKrUmOha.js → info-A6RAGUB7-DJVi9SAN.js} +1 -1
  69. package/web/assets/{infoDiagram-27XIBGKW-Dgv66P4Q.js → infoDiagram-27XIBGKW-B2HrGywP.js} +1 -1
  70. package/web/assets/{ishikawaDiagram-5VMMS53U-C0kmn2Cr.js → ishikawaDiagram-5VMMS53U-CczIkvWw.js} +1 -1
  71. package/web/assets/{journeyDiagram-3NMN7TZE-5jZi913z.js → journeyDiagram-3NMN7TZE-D-h-kwep.js} +1 -1
  72. package/web/assets/{kanban-definition-UXKFOSKX-DO4Z-hZf.js → kanban-definition-UXKFOSKX-GClrFWfH.js} +1 -1
  73. package/web/assets/{line-zuKPCmLl.js → line-pweWV0oc.js} +1 -1
  74. package/web/assets/{mermaid-parser.core-4-0aU2cI.js → mermaid-parser.core-C1vHZCtC.js} +3 -3
  75. package/web/assets/{mermaid.core-BZrDCPKc.js → mermaid.core-Df8DJ7AE.js} +4 -4
  76. package/web/assets/{mindmap-definition-YA3MSWOX-DOFnNlT5.js → mindmap-definition-YA3MSWOX-BpqA307n.js} +1 -1
  77. package/web/assets/mount-ISRAcaLu.js +33 -0
  78. package/web/assets/{packet-AYTQ26CC-BDFArHuv.js → packet-AYTQ26CC-afE6T0Hc.js} +1 -1
  79. package/web/assets/{pegDiagram-XKGWAZYB-7CxEp7-m.js → pegDiagram-XKGWAZYB-AAEw7Khy.js} +1 -1
  80. package/web/assets/{pie-WAS4IAKB-BUC9CmzW.js → pie-WAS4IAKB-vtwSUVVK.js} +1 -1
  81. package/web/assets/{pieDiagram-E7YTZNPT-BlXxIkan.js → pieDiagram-E7YTZNPT-CDg0SkhS.js} +1 -1
  82. package/web/assets/{quadrantDiagram-AXDQQJYC-C5GRb0RN.js → quadrantDiagram-AXDQQJYC-_o0rOR26.js} +1 -1
  83. package/web/assets/{radar-RG4KPBEZ-M1s8yzHp.js → radar-RG4KPBEZ-_Tf7tpz8.js} +1 -1
  84. package/web/assets/{railroad-74A4TZTK-BQj2Bxlk.js → railroad-74A4TZTK-DM_a0HtL.js} +1 -1
  85. package/web/assets/railroad-abnf-HS5TGJTU-BzFZIgti.js +1 -0
  86. package/web/assets/railroad-ebnf-LZEXJU2U-BkKCtTE4.js +1 -0
  87. package/web/assets/railroad-peg-WCYAUIDC-CuXWl9dG.js +1 -0
  88. package/web/assets/{railroadDiagram-O6MQD6OU-n0Sd3MRX.js → railroadDiagram-O6MQD6OU-BpQZeQ-f.js} +1 -1
  89. package/web/assets/{requirementDiagram-BXWQKSXE-A0anIwln.js → requirementDiagram-BXWQKSXE-DC4US4K_.js} +1 -1
  90. package/web/assets/{sankeyDiagram-P5KCCOFB-f_ILKHwt.js → sankeyDiagram-P5KCCOFB-BUJ9KIqV.js} +1 -1
  91. package/web/assets/{sequenceDiagram-WJ2MYXX4-Z4Yxn3Me.js → sequenceDiagram-WJ2MYXX4-By7D5XFY.js} +1 -1
  92. package/web/assets/settingsRoute-DSj-6Pdo.js +1 -0
  93. package/web/assets/{stateDiagram-D77RDMKH-DH4tyyvM.js → stateDiagram-D77RDMKH-D0BA3EeM.js} +1 -1
  94. package/web/assets/stateDiagram-v2-MP3YSRHH-2_bDqGCB.js +1 -0
  95. package/web/assets/{swimlanes-42K2YHIH-D0mYIRp_.js → swimlanes-42K2YHIH-BNUI3ghm.js} +1 -1
  96. package/web/assets/swimlanesDiagram-VR7AAH4N-SmXx3nAj.js +8 -0
  97. package/web/assets/{timeline-definition-24CTP7MA-D9SvE_xH.js → timeline-definition-24CTP7MA-DVzeoz4F.js} +1 -1
  98. package/web/assets/{treeView-Q6P3EWNA-BJZ3tNbp.js → treeView-Q6P3EWNA-CnvdZw-U.js} +1 -1
  99. package/web/assets/{treemap-WGGIJYW6-B4y9-El8.js → treemap-WGGIJYW6-Ax_RXzPk.js} +1 -1
  100. package/web/assets/useStore-BznE40dl.js +29 -0
  101. package/web/assets/{vennDiagram-4TSXK5OY-COLSJIgu.js → vennDiagram-4TSXK5OY-CNauH8S4.js} +1 -1
  102. package/web/assets/{wardley-WFR3VGLG-D8rExT50.js → wardley-WFR3VGLG-q8WnmSMu.js} +1 -1
  103. package/web/assets/{wardleyDiagram-VM6X3IG4-BSLx_T3_.js → wardleyDiagram-VM6X3IG4-DKOY4P11.js} +1 -1
  104. package/web/assets/{xychartDiagram-S5SC5T6Z-DekMZK0J.js → xychartDiagram-S5SC5T6Z-m8KaPfml.js} +1 -1
  105. package/web/index.html +2 -2
  106. package/web/sw.js +1 -1
  107. package/dist/automation-reseal.js +0 -30
  108. package/web/assets/AutomationsView-DN6Pjj3D.js +0 -51
  109. package/web/assets/Settings-zrbfuGw7.js +0 -10
  110. package/web/assets/architecture-7GRP2DOG-Db3dVfEg.js +0 -1
  111. package/web/assets/channel-BmwZ91Zu.js +0 -1
  112. package/web/assets/classDiagram-ZZMXUADV-BWeCowiO.js +0 -1
  113. package/web/assets/classDiagram-v2-VYDZK3BY-BWeCowiO.js +0 -1
  114. package/web/assets/eventmodeling-NTZA5JFV-DRobz4Mt.js +0 -1
  115. package/web/assets/flowDiagram-HODETNUW-DmXstahq.js +0 -1
  116. package/web/assets/index-DZb12uRj.css +0 -1
  117. package/web/assets/mount-BpoYlWmV.js +0 -31
  118. package/web/assets/railroad-abnf-HS5TGJTU-cooT4VHw.js +0 -1
  119. package/web/assets/railroad-ebnf-LZEXJU2U-Dbxg-HJI.js +0 -1
  120. package/web/assets/railroad-peg-WCYAUIDC-DF7RNXo3.js +0 -1
  121. package/web/assets/settingsRoute-Co4_ejOs.js +0 -1
  122. package/web/assets/stateDiagram-v2-MP3YSRHH-BGcz3nv5.js +0 -1
  123. package/web/assets/swimlanesDiagram-VR7AAH4N-DytMuA5I.js +0 -8
  124. package/web/assets/useStore-BjgRUXv4.js +0 -22
package/dist/server.js CHANGED
@@ -44,7 +44,7 @@ import { createAppCommands } from "./controllers/app-commands.js";
44
44
  import { createFileCommands } from "./controllers/file-commands.js";
45
45
  import { bindClientCommandRoutes } from "./http/client-command-routes.js";
46
46
  import { collectDiscoveredSessions, planNativeAdoption } from "./runtime/native-session-discovery.js";
47
- import { aggregateModelCatalog, catalogReplyEvent, warmSessionCatalog, mergeProviderCatalog } from "./runtime/model-catalog.js";
47
+ import { aggregateModelCatalog, catalogReplyEvent, mergeProviderCatalog } from "./runtime/model-catalog.js";
48
48
  import { resolveModelRef } from "./runtime/model-ref.js";
49
49
  import { RuntimeHost, enforcementLevelFor, remoteRuntimeEnabled } from "./runtime/host.js";
50
50
  import { RemoteRuntime, RemoteRuntimeSession } from "./runtime/remote.js";
@@ -54,7 +54,6 @@ import { ControlPlaneSessionLocationRegistry, LayeredSessionLocationRegistry } f
54
54
  import { attachAdoptedSessions, classifyAttachFailure } from "./runtime/adoption.js";
55
55
  import { createCredentialStore, testProviderCredential } from "./runtime/credentials.js";
56
56
  import { decodeAutomationTemplate } from "./automation-template.js";
57
- import { resealAutomationTemplates } from "./automation-reseal.js";
58
57
  import { passWebhookFilter } from "./automation-filter-gate.js";
59
58
  import { isModelAuthError, authProviderForSession, classifyModelAuthError } from "./runtime/auth-errors.js";
60
59
  import { createCredentialVault, migrateVaultDir } from "./runtime/credential-store.js";
@@ -81,7 +80,9 @@ import { exportProviderAuth, exportAccountApiKeys, exportAccountOAuthCredentials
81
80
  import { listProviders } from "./runtime/provider-catalog.js";
82
81
  import { exportLocalModels, importLocalModels } from "./runtime/local-model-store.js";
83
82
  import { sessionLikeFields } from "./session/start-like.js";
83
+ import { MAX_SUGGESTION_TEXT, MAX_SUGGESTION_TITLE, SUGGESTION_RUNS, isTaskSuggestion } from "./session/suggestions.js";
84
84
  import { BIVY_AGENT_NOTE, mergeSyncedAgentInstructions, readAgentInstructions, sessionInstructions, writeAgentInstructions, MAX_AGENT_INSTRUCTIONS_BYTES } from "./agent-instructions.js";
85
+ import { execEphemeralRequest } from "./ephemeral-exec.js";
85
86
  import { ApprovalManager } from "./approval.js";
86
87
  import { QuestionManager, validQuestions, isAskUserQuestionTool, formatQuestionResult } from "./question.js";
87
88
  import { NodeIdentity } from "./identity.js";
@@ -142,7 +143,7 @@ import { AgentQuestions, askQuestionsFrom } from "./session/agent-questions.js";
142
143
  import { AutomationProposals, describeChange } from "./session/automation-proposals.js";
143
144
  import { createSessionTokenCodec, isSessionToken, sessionTokenAllows } from "./session/session-tokens.js";
144
145
  import { setSessionTokenSigner } from "./runtime/session-env.js";
145
- import { MAX_NOTICE_TEXT, noticePush } from "./session/notices.js";
146
+ import { MAX_NOTICE_TEXT, isAgentNotice, noticePush } from "./session/notices.js";
146
147
  import { createForkCommands } from "./controllers/fork-commands.js";
147
148
  import { createGithubCommands } from "./controllers/github-commands.js";
148
149
  import { createCredentialCommands } from "./controllers/credential-commands.js";
@@ -1081,7 +1082,6 @@ const linkedDevices = createLinkedDeviceController({
1081
1082
  syncPairingMetadata();
1082
1083
  relay?.pushRotate(deliveries);
1083
1084
  broadcast({ type: "devices.updated", devices });
1084
- void resealRetiredAutomationTemplates();
1085
1085
  },
1086
1086
  });
1087
1087
  const accessDevices = createAccessDeviceController({
@@ -2898,13 +2898,6 @@ const RELAY_COMMANDS = {
2898
2898
  if (!requestedSessionId && wantedRuntimeId && record?.runtimeId !== wantedRuntimeId)
2899
2899
  record = null;
2900
2900
  record ??= await sessionForModelQuery(wantedRuntimeId);
2901
- // A session whose agent hasn't started yet answers from the runtime's
2902
- // placeholder catalog, which can be missing the account's current models —
2903
- // a freshly launched machine then rejected a saved model it actually has.
2904
- // Warm the real catalog first (a no-op re-read once the agent is running),
2905
- // bounded so a slow spawn still answers with what is known.
2906
- if (requestedSessionId)
2907
- await warmSessionCatalog(record.session, SESSION_MODELS_WARM_MS);
2908
2901
  // Tag the list with the runtime it was resolved for so the client can
2909
2902
  // tell whether it belongs to the agent it currently has selected. Without
2910
2903
  // this a models.list answered for one agent (e.g. Codex's models) could
@@ -3195,6 +3188,22 @@ const RELAY_COMMANDS = {
3195
3188
  return ctx.reply({ type: "session.promote.result", requestId, ok: false, error: "Promotion lost the epoch race" });
3196
3189
  ctx.reply({ type: "session.promote.result", requestId, ok: true, sessionId, epoch });
3197
3190
  },
3191
+ // Ephemeral provisioning transport (node-broker path). A remote device that
3192
+ // holds the user's cloud credentials asks this node to make ONE allowlisted
3193
+ // HTTPS request to a provider (Fly/Hetzner/AWS/...) on its behalf. The
3194
+ // token/credentials ride in the request headers and are used transiently —
3195
+ // never persisted here — so the provisioning stays end-to-end (the control
3196
+ // plane never sees it). The host allowlist is the SSRF guard.
3197
+ async "ephemeral.exec"(msg) {
3198
+ const requestId = String(msg.requestId ?? "");
3199
+ try {
3200
+ const result = await execEphemeralRequest(msg.request);
3201
+ relay?.sendEvent({ type: "ephemeral.exec.result", requestId, ...result });
3202
+ }
3203
+ catch (error) {
3204
+ relay?.sendEvent({ type: "ephemeral.exec.result", requestId, error: error instanceof Error ? error.message : String(error) });
3205
+ }
3206
+ },
3198
3207
  // Subscription / OAuth login driven from a remote device. The node runs the
3199
3208
  // provider's device-code (or paste-back) flow and reports the verification
3200
3209
  // link + code over the relay; the phone never needs the node's localhost.
@@ -3539,7 +3548,6 @@ function startRelayIfConfigured() {
3539
3548
  if (config.controlPlaneUrl && config.enrollmentToken) {
3540
3549
  sessionAdvertiseTarget = { controlPlaneUrl: config.controlPlaneUrl, enrollmentToken: config.enrollmentToken };
3541
3550
  void syncModelAuthFromControlPlane();
3542
- void resealRetiredAutomationTemplates();
3543
3551
  if (remoteRuntimeEnabled()) {
3544
3552
  // Stage 3: layer a control-plane-backed location registry UNDER the in-memory
3545
3553
  // one (so a lookup surviving a restart resolves from durable state), then
@@ -3701,43 +3709,6 @@ async function modelAuthFetch(pathname, init = {}) {
3701
3709
  headers.set("content-type", "application/json");
3702
3710
  return fetch(`${sessionAdvertiseTarget.controlPlaneUrl.replace(/\/$/, "")}${pathname}`, { ...init, headers });
3703
3711
  }
3704
- // A device revoke rotates the room key. Re-seal this node's stored automation
3705
- // instructions under the new key so the node and its devices can still read
3706
- // them, then drop the retired keys. Retried at startup until it completes.
3707
- async function resealRetiredAutomationTemplates() {
3708
- const retired = pairingStore.retiredRoomKeys();
3709
- if (!retired.length || !sessionAdvertiseTarget)
3710
- return;
3711
- const current = pairingStore.roomKey();
3712
- try {
3713
- const res = await modelAuthFetch("/node/automation-templates");
3714
- if (!res?.ok)
3715
- throw new Error(`control plane returned ${res?.status}`);
3716
- const { templates } = await res.json();
3717
- const result = await resealAutomationTemplates({
3718
- nodeId: identity.nodeId,
3719
- current,
3720
- retired,
3721
- templates,
3722
- save: async (id, templateCiphertext) => {
3723
- const saved = await modelAuthFetch(`/node/automation-templates/${encodeURIComponent(id)}`, { method: "PUT", body: JSON.stringify({ templateCiphertext }) });
3724
- if (!saved?.ok)
3725
- throw new Error(`control plane returned ${saved?.status}`);
3726
- },
3727
- });
3728
- if (result.resealed)
3729
- console.log(`[automation-reseal] re-sealed ${result.resealed} automation template(s) under the rotated room key`);
3730
- if (result.unreadable.length)
3731
- console.warn(`[automation-reseal] ${result.unreadable.length} automation template(s) were sealed under a key this node no longer has: ${result.unreadable.join(", ")}`);
3732
- // Another rotation during this pass retired `current`; run again for it.
3733
- if (!pairingStore.roomKey().equals(current))
3734
- return void resealRetiredAutomationTemplates();
3735
- pairingStore.forgetRetiredRoomKeys();
3736
- }
3737
- catch (error) {
3738
- console.warn("[automation-reseal] will retry at next start:", error.message);
3739
- }
3740
- }
3741
3712
  const remoteSessionAdmission = createRemoteSessionAdmission(async (idempotencyKey) => {
3742
3713
  // Only remote scopes reach this callback. Self-hosted control planes answer
3743
3714
  // allowed without an extension; losing enrollment mid-launch must fail closed.
@@ -5594,7 +5565,7 @@ async function executeWorkItem(item, report, signal) {
5594
5565
  throw new Error("automation instructions were encrypted for a different node");
5595
5566
  }
5596
5567
  try {
5597
- const template = decodeAutomationTemplate(pairingStore.openSealed(payload.join(":")));
5568
+ const template = decodeAutomationTemplate(open(pairingStore.roomKey(), payload.join(":")));
5598
5569
  credentialLabels = template.credentialLabels;
5599
5570
  filter = template.filter;
5600
5571
  item = { ...item, body: template.instructions };
@@ -7672,7 +7643,6 @@ function evaluateEphemeralTeardown() {
7672
7643
  }
7673
7644
  await performSelfTeardown({
7674
7645
  provider: ephemeralTeardownCfg.provider,
7675
- sleep: ephemeralTeardownCfg.sleep,
7676
7646
  signalSettled: signalSettledToControlPlane,
7677
7647
  shutdown: () => { try {
7678
7648
  spawnSync("shutdown", ["-h", "now"], { stdio: "ignore" });
@@ -7687,7 +7657,7 @@ if (ephemeralTeardownCfg.enabled) {
7687
7657
  const ephemeralEvalMs = Math.max(2_000, Math.min(ephemeralTeardownCfg.finishGraceMs, 15_000));
7688
7658
  const ephemeralTeardownTimer = setInterval(() => evaluateEphemeralTeardown(), ephemeralEvalMs);
7689
7659
  ephemeralTeardownTimer.unref?.();
7690
- console.log(`[ephemeral-teardown] armed: provider=${ephemeralTeardownCfg.provider} onFinish=${ephemeralTeardownCfg.onFinish} sleep=${ephemeralTeardownCfg.sleep} ttl=${ephemeralTeardownCfg.ttlMin}m`);
7660
+ console.log(`[ephemeral-teardown] armed: provider=${ephemeralTeardownCfg.provider} onFinish=${ephemeralTeardownCfg.onFinish} ttl=${ephemeralTeardownCfg.ttlMin}m`);
7691
7661
  }
7692
7662
  setTimeout(() => void sweepDiskGuardrails(), 30_000).unref?.();
7693
7663
  // One sweep shortly after boot clears ghosts left by a previous run before any
@@ -9099,9 +9069,6 @@ async function sessionForModelQuery(runtimeId) {
9099
9069
  modelQueryScratchPending.set(wanted, build);
9100
9070
  return build;
9101
9071
  }
9102
- /** How long a session's models.list waits for its agent's real catalog before
9103
- * answering with what is known (below the client's 15 s launch timeout). */
9104
- const SESSION_MODELS_WARM_MS = 8_000;
9105
9072
  // A fresh scratch answers its first models.list from the runtime's placeholder
9106
9073
  // list (no live agent yet). Warm the real catalog in the background — for Claude
9107
9074
  // Code this spins up the agent subprocess just far enough for supportedModels()
@@ -11774,9 +11741,10 @@ app.get("/api/session/:id/context", (req, res) => {
11774
11741
  previewAvailable,
11775
11742
  }));
11776
11743
  });
11777
- // `bivy notify`: a push naming the session (never any text) when nobody has the
11778
- // app open, or when it's urgent. At most one push a minute per session. It adds
11779
- // nothing to the chat: what the agent has to say belongs in its reply there.
11744
+ // `bivy notify "<message>"`: a card in the chat, and a push naming the session
11745
+ // (never the text) when nobody has the app open, or when it's urgent. At most
11746
+ // one push a minute per session; later notices still post a card. A `bivy run`
11747
+ // terminal has no chat to hold the card, so its notice is the push alone.
11780
11748
  const lastNotifyPush = new Map();
11781
11749
  app.post("/api/session/:id/notify", (req, res) => {
11782
11750
  const record = openSessions.get(String(req.params.id));
@@ -11784,9 +11752,16 @@ app.post("/api/session/:id/notify", (req, res) => {
11784
11752
  const sessionId = record?.id ?? run?.sessionId;
11785
11753
  if (!sessionId)
11786
11754
  return res.status(404).json({ error: "Session not found" });
11787
- const urgent = req.body?.urgent === true;
11755
+ const text = typeof req.body?.text === "string" ? req.body.text.trim() : "";
11756
+ const notice = { id: `notice-${randomBytes(8).toString("hex")}`, text, ...(req.body?.urgent === true ? { urgent: true } : {}) };
11757
+ if (!isAgentNotice(notice))
11758
+ return res.status(400).json({ error: `A notice needs text (up to ${MAX_NOTICE_TEXT} characters).` });
11759
+ if (record) {
11760
+ eventLog.appendNotice(record.id, { afterMessageCount: record.session.getMessages().length, notice });
11761
+ broadcast(stampSessionEvent({ type: "session.event", sessionId: record.id, event: { type: "notice", id: notice.id, notice } }));
11762
+ }
11788
11763
  const watching = Boolean(record) && (clients.size > 0 || (relay?.clientCount ?? 0) > 0);
11789
- const push = noticePush({ urgent, userWatching: watching, lastPushAt: lastNotifyPush.get(sessionId), now: Date.now(), pushConfigured: Boolean(sessionAdvertiseTarget) });
11764
+ const push = noticePush({ urgent: notice.urgent, userWatching: watching, lastPushAt: lastNotifyPush.get(sessionId), now: Date.now(), pushConfigured: Boolean(sessionAdvertiseTarget) });
11790
11765
  if (push === "sent") {
11791
11766
  lastNotifyPush.set(sessionId, Date.now());
11792
11767
  void sendNotificationHint({
@@ -11794,10 +11769,10 @@ app.post("/api/session/:id/notify", (req, res) => {
11794
11769
  sessionId,
11795
11770
  targetSessionId: sessionId,
11796
11771
  title: sessionNotifyLabel(record, run?.name || "A terminal session"),
11797
- body: "Wants you to take a look — tap to open the session.",
11772
+ body: "Has a message for you — tap to read it.",
11798
11773
  });
11799
11774
  }
11800
- res.json({ ok: true, push, userWatching: watching });
11775
+ res.json({ ok: true, id: notice.id, posted: Boolean(record), push, userWatching: watching });
11801
11776
  });
11802
11777
  // `bivy ask`: the question card and "needs your input" push, for any agent.
11803
11778
  // Returns at once with an id; `/wait` blocks up to 240s per call (under common
@@ -11855,6 +11830,23 @@ app.post("/api/session/:id/title", (req, res) => {
11855
11830
  sessionNamer.setSessionName(record, title);
11856
11831
  res.json({ ok: true, title });
11857
11832
  });
11833
+ // `bivy suggest "<task>"`: the agent proposes a task the user can start in one
11834
+ // tap, here, through this agent's sub-agents, or in a parallel session; `run`
11835
+ // is the one the agent recommends (see packages/web SuggestionCard).
11836
+ app.post("/api/session/:id/suggest", (req, res) => {
11837
+ const record = openSessions.get(String(req.params.id));
11838
+ if (!record)
11839
+ return res.status(404).json({ error: "Session not found" });
11840
+ const text = typeof req.body?.text === "string" ? req.body.text.trim() : "";
11841
+ const title = typeof req.body?.title === "string" && req.body.title.trim() ? req.body.title.trim() : undefined;
11842
+ const run = req.body?.run || undefined;
11843
+ const suggestion = { id: `suggestion-${randomBytes(8).toString("hex")}`, text, ...(title ? { title } : {}), ...(run ? { run } : {}) };
11844
+ if (!isTaskSuggestion(suggestion))
11845
+ return res.status(400).json({ error: `A suggestion needs text (up to ${MAX_SUGGESTION_TEXT} characters), an optional title (up to ${MAX_SUGGESTION_TITLE}) and an optional run (${SUGGESTION_RUNS.join(", ")}).` });
11846
+ eventLog.appendSuggestion(record.id, { afterMessageCount: record.session.getMessages().length, suggestion });
11847
+ broadcast(stampSessionEvent({ type: "session.event", sessionId: record.id, event: { type: "suggestion", id: suggestion.id, suggestion } }));
11848
+ res.json({ ok: true, id: suggestion.id });
11849
+ });
11858
11850
  // Explicit child Run API for first-party/user-directed workflows. These routes
11859
11851
  // are intentionally not advertised to agents as tools; the service still
11860
11852
  // authorizes every status lookup against this parent Session's provenance.
@@ -31,6 +31,7 @@ import path from "node:path";
31
31
  import { normalizedIntermediateText, thinkingTextFromContent, mergeTranscript } from "./transcript-merge.js";
32
32
  import { DELEGATION_BLOCK, isDelegationCard } from "./delegations.js";
33
33
  import { APP_PIN_BLOCK, APP_PUBLICATION_BLOCK, APP_REVIEW_BLOCK, isAppPin, isAppReference, isAppReview } from "../apps/types.js";
34
+ import { SUGGESTION_BLOCK, isTaskSuggestion } from "./suggestions.js";
34
35
  import { NOTICE_BLOCK, isAgentNotice } from "./notices.js";
35
36
  /**
36
37
  * Decompose a transcript message into serialization-independent "atoms": the
@@ -332,6 +333,12 @@ function isAppPublication(value) {
332
333
  const entry = value;
333
334
  return entry.bivyKind === "app-publication" && typeof entry.id === "string" && typeof entry.createdAt === "number" && typeof entry.afterMessageCount === "number" && isAppReference(entry.app);
334
335
  }
336
+ function isSuggestionEntry(value) {
337
+ if (!value || typeof value !== "object")
338
+ return false;
339
+ const entry = value;
340
+ return entry.bivyKind === "suggestion" && typeof entry.id === "string" && typeof entry.createdAt === "number" && typeof entry.afterMessageCount === "number" && isTaskSuggestion(entry.suggestion);
341
+ }
335
342
  function isNoticeEntry(value) {
336
343
  if (!value || typeof value !== "object")
337
344
  return false;
@@ -357,7 +364,7 @@ function isAppPinEntry(value) {
357
364
  return entry.bivyKind === "app-pin" && typeof entry.id === "string" && typeof entry.createdAt === "number" && typeof entry.afterMessageCount === "number" && isAppPin(entry.pin);
358
365
  }
359
366
  function isRecord(value) {
360
- return isDelegationEntry(value) || isOverlay(value) || isBase(value) || isForkDisplay(value) || isAttachment(value) || isOutboundAttachment(value) || isInlineImage(value) || isAppPublication(value) || isAppReviewEntry(value) || isAppPinEntry(value) || isNoticeEntry(value);
367
+ return isDelegationEntry(value) || isOverlay(value) || isBase(value) || isForkDisplay(value) || isAttachment(value) || isOutboundAttachment(value) || isInlineImage(value) || isAppPublication(value) || isAppReviewEntry(value) || isAppPinEntry(value) || isSuggestionEntry(value) || isNoticeEntry(value);
361
368
  }
362
369
  /**
363
370
  * Fold attachment records into a text→refs list: last write wins per text (a
@@ -500,11 +507,15 @@ export function replayExtras(entries) {
500
507
  role: "assistant", content: [{ type: DELEGATION_BLOCK, delegation: entry.delegation }],
501
508
  id: `delegation-${entry.id}`, afterMessageCount: entry.afterMessageCount, createdAt: entry.createdAt,
502
509
  }));
510
+ const suggestions = entries.filter((entry) => entry.bivyKind === "suggestion").map((entry) => ({
511
+ role: "assistant", content: [{ type: SUGGESTION_BLOCK, suggestion: entry.suggestion }],
512
+ id: entry.id, afterMessageCount: entry.afterMessageCount, createdAt: entry.createdAt,
513
+ }));
503
514
  const notices = entries.filter((entry) => entry.bivyKind === "notice").map((entry) => ({
504
515
  role: "assistant", content: [{ type: NOTICE_BLOCK, notice: entry.notice }],
505
516
  id: entry.id, afterMessageCount: entry.afterMessageCount, createdAt: entry.createdAt,
506
517
  }));
507
- return [...foldIntermediate(intermediate), ...foldTool(tool), ...replayOutboundAttachments(entries), ...publications, ...cards, ...pinCards, ...delegationCards, ...notices];
518
+ return [...foldIntermediate(intermediate), ...foldTool(tool), ...replayOutboundAttachments(entries), ...publications, ...cards, ...pinCards, ...delegationCards, ...suggestions, ...notices];
508
519
  }
509
520
  /**
510
521
  * Fold the outbound (agent-sent) attachment records into time-anchored synthetic
@@ -821,6 +832,10 @@ export class EventLog {
821
832
  this.load(id);
822
833
  this.enqueue(id, `pin:${entry.pin.id}`, { bivyKind: "app-pin", createdAt: entry.createdAt ?? Date.now(), afterMessageCount: entry.afterMessageCount, id: entry.pin.id, pin: structuredClone(entry.pin) });
823
834
  }
835
+ appendSuggestion(id, entry) {
836
+ this.load(id);
837
+ this.enqueue(id, `suggestion:${entry.suggestion.id}`, { bivyKind: "suggestion", createdAt: Date.now(), afterMessageCount: entry.afterMessageCount, id: entry.suggestion.id, suggestion: { ...entry.suggestion } });
838
+ }
824
839
  appendNotice(id, entry) {
825
840
  this.load(id);
826
841
  this.enqueue(id, `notice:${entry.notice.id}`, { bivyKind: "notice", createdAt: Date.now(), afterMessageCount: entry.afterMessageCount, id: entry.notice.id, notice: { ...entry.notice } });
@@ -22,7 +22,9 @@ import { sanitizeAttachmentName, sniffMime } from "./attach-to-chat.js";
22
22
  * in `inline()` in packages/core/src/markdown.ts exactly. Not a shared import: the
23
23
  * node (src/) intentionally does not depend on @bivy/core (a browser/client
24
24
  * package — see packages/core's own description). Kept in lock-step by comment
25
- * instead: if you change one, change the other.
25
+ * instead, the same convention EPHEMERAL_ALLOWED_HOSTS uses in
26
+ * src/ephemeral-exec.ts for its cross-copy host allowlist. If you change one,
27
+ * change the other.
26
28
  */
27
29
  const INLINE_IMAGE_MD_RE = /!\[[^\]]*\]\((https:\/\/[^)\s]+)\)/g;
28
30
  /** Bound how many distinct remote images a single message can trigger a fetch
@@ -44,7 +44,7 @@ export function createSessionTokenCodec(key = randomBytes(32)) {
44
44
  */
45
45
  export const SESSION_TOKEN_ROUTES = [
46
46
  { method: "GET", path: /^\/api\/session\/([^/]+)\/context$/, session: "path" },
47
- { method: "POST", path: /^\/api\/session\/([^/]+)\/(attach|notify|title)$/, session: "path" },
47
+ { method: "POST", path: /^\/api\/session\/([^/]+)\/(attach|suggest|notify|title)$/, session: "path" },
48
48
  { method: "POST", path: /^\/api\/session\/([^/]+)\/ask$/, session: "path" },
49
49
  { method: "GET", path: /^\/api\/session\/([^/]+)\/ask\/[^/]+$/, session: "path" },
50
50
  { method: "POST", path: /^\/api\/session\/([^/]+)\/ask\/[^/]+\/wait$/, session: "path" },
@@ -0,0 +1,17 @@
1
+ // SPDX-License-Identifier: AGPL-3.0-only
2
+ // Copyright (c) 2026 Petter André Sjulstad
3
+ /** here: this session's agent. subagents: this agent, through its own sub-agents. new: a session per task. */
4
+ export const SUGGESTION_RUNS = ["here", "subagents", "new"];
5
+ const isRun = (value) => value === undefined || SUGGESTION_RUNS.includes(value);
6
+ export const SUGGESTION_BLOCK = "bivy_suggestion";
7
+ export const MAX_SUGGESTION_TEXT = 4000;
8
+ export const MAX_SUGGESTION_TITLE = 120;
9
+ export function isTaskSuggestion(value) {
10
+ if (!value || typeof value !== "object")
11
+ return false;
12
+ const s = value;
13
+ return typeof s.id === "string" && s.id.length > 0
14
+ && typeof s.text === "string" && s.text.length > 0 && s.text.length <= MAX_SUGGESTION_TEXT
15
+ && (s.title === undefined || (typeof s.title === "string" && s.title.length <= MAX_SUGGESTION_TITLE))
16
+ && isRun(s.run);
17
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bivy/bivy",
3
- "version": "0.20.9-staging.13",
3
+ "version": "0.20.9-staging.2",
4
4
  "type": "module",
5
5
  "license": "AGPL-3.0-only",
6
6
  "description": "Run coding agents on machines you own. Open-source, self-hostable agent workspace.",
@@ -38,7 +38,7 @@
38
38
  },
39
39
  "dependencies": {
40
40
  "@lydell/node-pty": "1.2.0-beta.15",
41
- "@modelcontextprotocol/sdk": "1.31.0",
41
+ "@modelcontextprotocol/sdk": "1.30.1",
42
42
  "@novnc/novnc": "1.7.0",
43
43
  "brace-expansion": "5.0.12",
44
44
  "express": "^5.2.1",
@@ -55,7 +55,7 @@
55
55
  "hono": "4.13.5",
56
56
  "qs": "6.16.0",
57
57
  "@hono/node-server": "2.0.12",
58
- "@modelcontextprotocol/sdk": "1.31.0",
58
+ "@modelcontextprotocol/sdk": "1.30.1",
59
59
  "@earendil-works/pi-coding-agent": {
60
60
  "brace-expansion": "5.0.12",
61
61
  "undici": "8.11.2"
@@ -65,11 +65,11 @@
65
65
  "lodash-es": "4.18.1",
66
66
  "undici": "8.11.2"
67
67
  },
68
- "readme": "# Bivy\n\n[![npm](https://img.shields.io/npm/v/@bivy/bivy?color=2b6cb0&label=%40bivy%2Fbivy)](https://www.npmjs.com/package/@bivy/bivy)\n[![license: AGPL-3.0-only](https://img.shields.io/badge/license-AGPL--3.0--only-2b6cb0)](LICENSE)\n[![node](https://img.shields.io/badge/node-%E2%89%A520-2b6cb0)](https://nodejs.org)\n\n**Local coding agents that show their work. Anywhere.**\n\nBivy is the open-source workspace for coding agents. It runs Claude Code, Codex,\nPi, OpenCode and other agents on your own machine. Reach them from a browser or\nyour phone, with the live session, its terminal, its approvals, and the app\nthey're building right in the chat. Try it, mark what's wrong, and send it back.\n\n<p align=\"center\">\n <img src=\"docs/images/preview-feedback-loop.gif\" width=\"360\"\n alt=\"On a phone: open the app an agent built, circle the packed items, send a note, and compare the result before and after the agent's fix.\">\n</p>\n\nBivy is not another coding agent and not a cloud development machine. The agent\nstays local and does the coding with your model provider. Your repos, tools,\ndatabases, and services stay where they are. Bivy gives you remote access to all\nof it, plus live previews, automations, and review.\n\n- **Live previews.** The running app beside the chat. Mark it, send it back,\n share it with someone who has no Bivy account.\n- **Automations.** GitHub issues, failed CI, Linear, Slack, schedules, and\n webhooks start the work. It comes back as a preview link or a pull request.\n- **Any agent.** Hit a usage limit? Fork the session to another agent, or let\n Bivy retry when the limit resets.\n- **Your machine, anywhere.** Start at your desk, pick the session up on your\n phone. The machine dials out, so there are no ports to open, and session\n traffic is end-to-end encrypted.\n\n**[Start free on Bivy Cloud](https://app.bivy.sh)** ·\n**[Quickstart](docs/quickstart.md)** ·\n**[Documentation](docs/README.md)** ·\n**[Self-host](docs/deploy-images.md)** ·\n**[Website](https://bivy.sh)**\n\n**Recommended:** sign in at [app.bivy.sh](https://app.bivy.sh), then copy your\npersonalized **Connect a Machine** command into a terminal on your Mac or Linux\ncomputer. It installs and enrolls the machine without another Bivy login. The\nbrowser connects automatically; choose a repository and send your first task\nright there.\n\nPrefer starting from the terminal?\n\n```bash\ncurl -fsSL https://bivy.sh/install.sh | bash # install + guided setup\ncd your-repo\nbivy run claude # or codex, pi, opencode\nbivy open # continue in the web app (needs remote setup)\n```\n\nBivy Cloud hosts the app, control plane, and relay—not the machines running your\nagents. Connect a Mac, Linux computer, or existing server and bring your own\nagent subscription, model API key, or local model. You can also self-host the\nentire remote-access stack.\n\n> **Bivy is 0.x software.** Claude Code, Codex, Pi, OpenCode, and Grok are the\n> release-tested paths. Credential sync, resume, handoffs, approvals, and\n> sandboxing depend on the runtime. See the\n> [runtime support matrix](docs/runtime-support-matrix.md).\n\n## Don't just read the diff. Try the app.\n\nBivy lets you **use what the agent built and show it what to fix**, without a\nseparate deployment step.\n\n1. **Ask for a change.** The agent works in your repo with your existing tools\n and local services.\n2. **Try the app.** Bivy finds the dev server the agent starts and opens it\n beside the chat: web apps, terminals, and desktop apps. Use the running app,\n not a screenshot of what the agent says it finished.\n3. **Mark what needs work.** Press and hold anything in the preview to mark it,\n or drag to circle it, then say what you want. **Mark another** keeps\n separate notes separate. The marks go to the agent with the element and page\n context. No screenshots to paste.\n4. **Follow each note.** Every mark stays in the chat as a pin that resolves\n itself: **Changed** when a later run changes what you marked, **Element\n gone** when it leaves the page, **Done** when you say so.\n5. **Review the next version.** A new version waits on the preview pill instead\n of reloading under you. Take it when you're ready, compare before and after,\n inspect the diff and checks, and decide when the work is done.\n6. **Get a second opinion.** Share a preview link for 1 hour, 1 day, or 7 days.\n Teammates and clients try the running app and leave notes without a Bivy\n account. Make it view-only, or **Stop sharing** to end every link at once.\n\nOn Bivy Cloud, preview delivery is built in: no per-app domains, certificates,\npublic ports, or tunnels to configure. Self-hosters configure preview delivery\nonce for their Bivy deployment, not for every app. The app still needs its normal\nbuild or dev-server setup, and **the machine serving it must stay awake and\nonline**. These are development previews, not production hosting.\n\n**Share deliberately:** anyone with a preview link can use that app, including\nits live backend, until the link expires or you stop sharing.\nReviewer notes aren't sent to the agent automatically; you send them or explicitly\nallow agent access. Preview traffic uses HTTPS through the preview relay, not\nsession end-to-end encryption; the relay operator can see it.\n\n[App previews, visual feedback, and sharing →](docs/apps.md)\n\n## One workflow, from trigger to review\n\n```text\nPrompt · GitHub issue · CI failure · Linear · Slack · Schedule · Webhook\n │\n ▼\n Choose machine + agent + model\n + supported credentials\n │\n ▼\n Live agent session\n Join · steer · approve · stop\n │\n ▼\n Try app · inspect changes · checks\n │\n ▼\n Mark up · send feedback · iterate\n │\n ▼\n Share preview · review PR\n```\n\nA **Machine** is a computer or server you connect. A **Session** is live agent\nwork on that machine. A **Run** is delegated background work that creates a\nsession and tracks its outcome. An **Automation** is a reusable definition that\ncreates runs when an event matches.\n\nManual and automated work use the same kind of live session. You can join a run\nwhen it needs help rather than wait for a black-box job to finish.\n\n### Let events start the work\n\nAutomations turn recurring or incoming work into sessions you can join,\nsupervise, and review. An agent picks the task up on your machine and posts\nback a preview link or a pull request, so you try the result where the task\nlives and reply in the same session. Choose the repository, machine, agent,\nmodel, approval mode, sandbox setting, and maximum attempts.\n\n| Trigger | Example workflow |\n|---|---|\n| **GitHub issues and mentions** | Label an issue `bivy` or `bivy/<machine>`, or mention your Bivy GitHub App, to work toward a pull request. |\n| **Failed CI** | Match a failed workflow, ask the agent to reproduce it, make a fix, and run the affected checks. |\n| **Linear** | Label an issue to start work without copying its description into an agent. |\n| **Slack** | Send a request from the conversation where the work came up. |\n| **Schedules** | Run a weekly dependency review, recurring maintenance, or a one-time task. |\n| **Signed webhooks** | Connect alerts, internal tools, or your own event sources. |\n\nConfigure automations in the app or version them with your repository in\n`.bivy/automations.yaml`:\n\n```bash\nbivy automation init\n# Edit the generated definition for your repository and workflow.\nbivy automation validate\nbivy automation test --event .bivy/events/failed-ci.yaml # supply a local event fixture\nbivy automation apply\n```\n\nOr delegate a one-off job without creating an automation:\n\n```bash\nbivy runs start \"Review outdated dependencies and propose a small, tested update.\"\nbivy runs wait <id>\n```\n\nRuns keep routing and lifecycle evidence, check results, and output references\nin a reviewable Receipt. For unattended issue work, Bivy runs declared repository\nchecks after the agent's turn; failed required checks fail the run even if the\nagent reports success. A completed process alone is not proof that the task\nsucceeded.\n\n[Automation recipes →](docs/capability-recipes.md#let-events-start-runs) ·\n[Automations as code →](docs/automations-as-code.md) ·\n[Run outcomes and reliability limits →](docs/automation-runs.md)\n\n### Use every agent you pay for. Switch mid-task.\n\nRun Claude Code for one task, Codex for another, and Pi or OpenCode where they\nfit, side by side in one session list. Bivy supplies the shared session,\nremote-access, automation, and review surfaces; your chosen agent still does\nthe coding and uses your model provider.\n\n- **Hit a usage limit? Keep going.** When a turn fails on a limit, fork the\n session, with its code and conversation, to another agent and model, or let\n Bivy retry when the limit resets (the provider has to report a reset time).\n- **Get a second opinion.** `bivy delegate` hands a task to another agent, on\n the same machine or a different one, and brings back its answer, branch, and\n PR. `--to codex,claude@linux` sends one task to several agents to compare.\n- Choose an agent and, where supported, a model for each session or run.\n- Import existing Claude Code and Codex sessions.\n- Fork or move work to another agent or machine when a different setup fits\n better. Continuation fidelity varies: some paths preserve native history,\n while others replay portable turns or hand over a summary with the earlier\n transcript as a local file.\n- Use agent-native logins, Bivy-managed credentials, or local inference.\n Bivy's custom OpenAI-compatible endpoint registry currently feeds Pi;\n other agents may need their own provider configuration.\n- Register your own ACP or headless process agent with `bivy agent add`.\n\nBivy does not replace your agent, provide model inference, or make every agent's\nfeatures identical. Consult the [support matrix](docs/runtime-support-matrix.md)\nand [handoff recipes](docs/capability-recipes.md#fork-or-move-a-session).\n\n### Less signing in. Less copying secrets.\n\nBivy syncs **Bivy-managed API keys and supported OAuth credentials** across\nenrolled machines for compatible runtimes. Connect supported credentials once\nand reuse them where you run work, rather than manually distributing keys to\neach machine.\n\nFor ordinary account sync, credentials are encrypted on the node before upload.\nThe control plane stores ciphertext and wrapped-key metadata; enrolled nodes\nshare access by wrapping the vault key to one another. Bivy Cloud does not\nreceive plaintext credentials through this sync path.\n\nYou can also keep credentials local, use labeled keys and project presets, or\nreference environment variables and 1Password instead of embedding secrets in\nconfiguration:\n\n```bash\nbivy provider login\nbivy credentials add anthropic work\nbivy secrets ref github.repo-token op://Bivy/GitHub/repo-token\n```\n\n**Not every CLI login syncs.** Native agent logins may still be per-machine;\nGitHub App private-key sync is separately opt-in. If you lose every node and\ndevice able to unwrap a vault, you must sign in to providers again. Explicit\nhosted-provisioning custody grants are separate from ordinary encrypted sync.\n\n[Credential sync and runtime coverage →](docs/credential-sync.md) ·\n[Credentials guide →](docs/credentials-guide.md) ·\n[Key storage →](docs/key-management.md)\n\n### Work in the environment you already have\n\nA clean cloud sandbox isn't always enough. Your agent may need the database\nrunning on localhost, an uncommitted change, an internal API behind your VPN,\nor a model running on your GPU. Bivy runs the agent where those things already\nexist, subject to that machine's permissions and the runtime's protection.\n\nConnect several machines to the same account: a laptop for interactive work,\na Linux server for background jobs, or a GPU box for local inference. Choose\nthe machine for each session or pin it in an automation. Repository runs can\nuse isolated Git worktrees without rebuilding the whole development environment.\n\n**The execution machine must stay awake and online.** To close your laptop and\nleave work running, run the agent on a different, always-on machine.\n\n[Environment and multi-machine recipes →](docs/capability-recipes.md)\n\n### Start at your desk. Continue anywhere.\n\nOpen the same session in the browser, phone PWA, or terminal. Watch work live,\nanswer questions, approve supported tool calls, or stop the agent.\n\n- Send screenshots, images, logs, and other files from your phone.\n- Download reports and artifacts the agent creates.\n- Open [session apps](docs/apps.md) from chat or the **Apps** menu: live web\n previews, desktop app views, and CLI/TUI tools. Agents can publish views with\n `bivy app publish bivy.app.json` and create share links with `bivy app share`.\n- Use voice input and read-aloud where supported; provider-backed voice may\n send audio or text to the selected provider.\n- Keep a native terminal workflow or use structured chat, depending on the agent.\n\n```bash\nbivy run claude --no-follow # start without attaching\nbivy open # open the web app\nbivy resume # return to the session in your terminal\nbivy link # pair a device directly via QR\n```\n\nNo phone app installation is required. Open [app.bivy.sh](https://app.bivy.sh)\nin your browser; adding it to your home screen is optional.\n\n[Remote access →](docs/remote-access.md) ·\n[Voice, files, and terminal recipes →](docs/capability-recipes.md)\n\n### Agents can reach you, too\n\nEvery session gets the `bivy` CLI, so any agent with a shell can talk back\nthrough the app, not only agents with their own built-in tools:\n\n```bash\nbivy notify # push to your phone so you come back\nbivy ask \"Ship to staging?\" --option Yes --option No # waits for your answer\nbivy attach report.png --caption \"Before/after\" # show a file in the chat\nbivy context --json # session, workspace, machine, apps\n```\n\n`bivy help --json` lists every command, and with `BIVY_OUTPUT=json` failures\ncome back as structured errors with distinct exit codes, so an agent can tell\nwhat went wrong and what to run next. `bivy guide` prints short playbooks for\nagents, and the same commands are served as MCP tools for agents that prefer\nthem. Add your own standing instructions for\nevery session in **Settings → Agent instructions**.\n\n[Commands for agents inside a session →](docs/cli-reference.md#inside-an-agent-session) ·\n[Agent instructions →](docs/agent-instructions.md)\n\n## Get started\n\n### Install\n\nBivy supports **macOS and Linux with Node.js 20+**. The installer installs the\n`@bivy/bivy` package, runs guided setup, and starts a launchd or systemd service:\n\n```bash\ncurl -fsSL https://bivy.sh/install.sh | bash\n```\n\nSetup helps you choose an agent and configure remote access. Existing agents\nkeep their command, login, and configuration. The installer may use `sudo` to\ninstall a missing Node.js, but never for `npm install`. To inspect it first,\ndownload it with `curl -fsSL https://bivy.sh/install.sh -o install.sh`.\n\nAlready have Node.js and want to avoid sudo?\n\n```bash\nnpm install -g @bivy/bivy\nbivy setup\n```\n\nThen try one small task:\n\n```bash\ncd your-repo\nbivy run claude\n# Ask: \"Explain this repo and make one small, safe improvement. Run the relevant checks.\"\nbivy open\n```\n\nOpen that same session on your phone while it runs. For a web app, ask the agent\nto start its dev server, then open **Apps → Running in this workspace → Preview**.\nTry a page, point to something you'd change, and send the feedback back to the\nagent. No separate preview deployment needed.\n\nOnce that works, share a preview for review, connect another machine, or add\nyour first automation.\n\n**Local-only works too.** `bivy run`, `bivy resume`, and `bivy sessions` need no\naccount or server. Choose **local only for now** during setup; use `bivy login`\nlater.\n\n**Just your own devices?** `bivy tailscale` serves the app from the machine\nitself at `https://<machine>.<tailnet>.ts.net`, with no account, control plane\nor relay. You get the core over your tailnet: sessions, chat, approvals,\nquestions, terminals and files. Push notifications, app previews and share\nlinks need Bivy Cloud or a self-hosted server. See [Tailscale](docs/tailscale.md)\nand [Remote access](docs/remote-access.md).\n\n[Full quickstart →](docs/quickstart.md) ·\n[Installer options, service management, and uninstall →](docs/install.md)\n\n### Choose hosted or self-hosted\n\n| Option | What you get |\n|---|---|\n| **Free Cloud — $0** | Every launch feature, including automations; 10 new remote sessions per rolling seven days. No credit card required. |\n| **Cloud — $15/month** | The same features with unlimited remote sessions. |\n| **Self-hosted Core** | Operate the app, control plane, and relay yourself, with no Bivy usage limits. |\n\nManual and automated sessions share the Cloud allowance. Resuming existing\nsessions and viewing history do not consume it. Agent subscriptions and model\nprovider charges are separate. See [current pricing](https://bivy.sh#pricing).\n\n**Self-host anywhere:** deploy the public control-plane (including the web app)\nand relay images with Postgres and [a small set of environment variables](docs/deploy-images.md).\nYour server or container platform handles HTTPS. Set up owner access in the\nbrowser—no SSH, external authentication provider, or Bivy Cloud account required.\nFor a bare VPS, the [Compose installer](docs/self-host-quickstart.md) automates the\nsame stack. These onboarding features require a release containing them.\n\nStart on Cloud and self-host later if you prefer. Deploy the stack, reconnect\nmachines with `bivy relay:setup`, and pair devices to your server. This is not a\none-click migration of your Cloud account; your local repos and agent\nconfiguration stay in place.\n\n```bash\nbivy relay:setup \\\n --control-plane https://bivy.example.com \\\n --relay wss://relay.example.com\n```\n\nSelf-hosting is community-supported: you own TLS, backups, upgrades, and\nhardening. Public multi-architecture images are available as\n`ghcr.io/bivysh/bivy-control-plane` and `ghcr.io/bivysh/bivy-relay`; pin a release\nversion or full commit SHA.\n\n[Deploy the images anywhere →](docs/deploy-images.md) ·\n[Optional VPS installer →](docs/self-host-quickstart.md) ·\n[Operations reference →](docs/self-host.md)\n\n## Architecture\n\nYour environment, with clear security boundaries:\n\n```text\nYour machine Hosted or self-hosted\n┌──────────────────────┐ ┌──────────────────────┐\n│ Node daemon │──outbound──▶│ Relay │\n│ Agents, repos, tools │ │ Encrypted frames │\n│ Local credentials │ └──────────┬───────────┘\n└──────────────────────┘ │\n Browser / phone\n + control plane\n (app, accounts, metadata)\n```\n\n- **Execution stays on your machine.** Bivy Cloud does not run your agents.\n Your model provider still sees whatever the agent sends it.\n- **Interactive session traffic is end-to-end encrypted** between the node and\n paired devices. The relay forwards opaque session frames; your node dials out,\n so no inbound public port is required.\n- **App previews have a separate security boundary.** Preview traffic uses HTTPS\n and an outbound tunnel, not session E2E encryption. The preview ingress/relay\n operator can see it. Public preview links grant anyone holding them access to\n that view and its live backend until expiry or revocation. See\n [preview security and sharing](docs/apps.md#runtime-and-security-boundaries).\n- **Ordinary credential sync uploads ciphertext, not plaintext keys.**\n Supported credentials and recovery limits are documented separately.\n- **Encryption is not universal across integrations.** Slack commands and\n generic webhook instructions reach the control plane in plaintext. Do not\n put secrets in them. Routing and bounded run metadata are also visible there.\n- **Device authorization matters.** QR pairing authorizes a device directly\n through the node. Hosted account pairing trusts the control plane to authorize\n devices and serve the web app that holds client keys.\n- **Bivy is not an OS-level sandbox.** The default approval mode is\n `autonomous`; protection depends on the runtime. Some agents enforce sandbox\n tiers, while process agents may run with your full user permissions.\n Heuristic tool checks help prevent accidents but are not isolation.\n\nReview the runtime's Protection label and configure approval/sandbox settings\nfor the task, especially before enabling unattended work.\n\n[Security model and known limitations →](docs/security-model.md) ·\n[Runtime protection matrix →](docs/runtime-support-matrix.md) ·\n[Configuration →](docs/configuration.md)\n\n## Agents and everyday commands\n\n**Claude Code, Codex, Pi, OpenCode, and Grok are release-tested.** Additional\nadapters include Gemini CLI, Qwen Code, Goose, Aider, Cline, Crush, Cursor, GitHub\nCopilot, Amp, Auggie, Droid, Continue, Kilo Code, and Rovo Dev. Installation,\nresume, model selection, and tool protection vary—see the\n[support matrix](docs/runtime-support-matrix.md) and [agent guides](docs/agents/README.md).\n\nRun an arbitrary command with `bivy run -- ./your-agent --flags`, register a\nreusable entry with `bivy agent add`, or package a declarative integration with\nexperimental [plugins](docs/plugins.md).\n\n```bash\nbivy run claude # launch a durable session; also codex, pi, opencode\nbivy sessions # list live and saved sessions\nbivy resume # resume the most recent session\nbivy open # open the web app (requires remote setup)\nbivy nodes # list connected account machines\nbivy runs list # inspect delegated work\nbivy automation init # scaffold repo-owned automations\nbivy provider login # connect supported model credentials\nbivy agent add # register an ACP or process agent\nbivy doctor # check installation and connectivity\nbivy logs -f # follow node logs\nbivy update # update and restart the service\n```\n\n`bivy update` uses your original installation method and waits for an active\nturn to finish before restarting. Use `--force` to skip that wait.\n\n[CLI reference →](docs/cli-reference.md) ·\n[Node and project configuration →](docs/config-as-code.md) ·\n[GitHub setup →](docs/github-setup.md) ·\n[Linear setup →](docs/linear-work-queue.md)\n\n## Development and contributions\n\n```bash\npnpm install\npnpm run dev # node daemon on http://localhost:4317\npnpm run dev:web # web client dev server\n```\n\n| Directory | Contents |\n|---|---|\n| `src/`, `bin/` | Node daemon, CLI, runtime adapters, sessions, approvals, secrets |\n| `packages/core/` | Shared protocol, pairing, and wire format |\n| `packages/web/`, `packages/ui/` | React PWA and shared design system |\n| `services/relay/` | Self-hostable encrypted relay |\n| `services/control-plane/` | Self-hostable control plane |\n| `deploy/` | Deployment examples |\n\n```bash\npnpm run typecheck\npnpm run typecheck:web\npnpm run lint\npnpm run test:unit\npnpm run test:core\npnpm run check:licenses\npnpm run check:secrets\n```\n\nSee [CONTRIBUTING.md](CONTRIBUTING.md) for the development workflow. Releases\nare published from CI with provenance attestations; see\n[release verification](docs/releasing.md).\n\n**Found a security issue?** Use\n[GitHub private vulnerability reporting](https://github.com/bivysh/bivy/security/advisories/new),\nnot a public issue. See [SECURITY.md](SECURITY.md).\n\n### In development—not available at launch\n\nAutomatically provisioned, short-lived **ephemeral machines** are in development\nfor hosted and bring-your-own-cloud deployments. Neither path is ready or\nsupported for this launch. Use an existing computer or server you operate.\nExperimental provisioning has different credential-custody and encryption\nboundaries; see the [provisioning trust model](docs/hosted-provisioning-trust-model.md).\n\n## License\n\nEverything in this repository—node, CLI, web/PWA, relay, and control plane—is\nfree and open-source **AGPL-3.0-only Core**, with no Bivy usage limits. You may\nuse, modify, and self-host it under that license. If users interact with your\nmodified version over a network, section 13 requires you to offer its\ncorresponding source. See [LICENSE](LICENSE).\n\nBivy Cloud is the hosted operation of that stack. Its plans, billing and\nmanaged-compute operations live in a separate private service behind Core's\ndeployment extension. Contributions are made under the\n[Contributor License Agreement](CLA.md). The Bivy name and logo are covered by\nthe [trademark policy](TRADEMARKS.md).\n",
68
+ "readme": "# Bivy\n\n[![npm](https://img.shields.io/npm/v/@bivy/bivy?color=2b6cb0&label=%40bivy%2Fbivy)](https://www.npmjs.com/package/@bivy/bivy)\n[![license: AGPL-3.0-only](https://img.shields.io/badge/license-AGPL--3.0--only-2b6cb0)](LICENSE)\n[![node](https://img.shields.io/badge/node-%E2%89%A520-2b6cb0)](https://nodejs.org)\n\n**Local coding agents that show their work. Anywhere.**\n\nBivy is the open-source workspace for coding agents. It runs Claude Code, Codex,\nPi, OpenCode and other agents on your own machine. Reach them from a browser or\nyour phone, with the live session, its terminal, its approvals, and the app\nthey're building right in the chat. Try it, mark what's wrong, and send it back.\n\n<p align=\"center\">\n <img src=\"docs/images/preview-feedback-loop.gif\" width=\"360\"\n alt=\"On a phone: open the app an agent built, circle the packed items, send a note, and compare the result before and after the agent's fix.\">\n</p>\n\nBivy is not another coding agent and not a cloud development machine. The agent\nstays local and does the coding with your model provider. Your repos, tools,\ndatabases, and services stay where they are. Bivy gives you remote access to all\nof it, plus live previews, automations, and review.\n\n- **Live previews.** The running app beside the chat. Mark it, send it back,\n share it with someone who has no Bivy account.\n- **Automations.** GitHub issues, failed CI, Linear, Slack, schedules, and\n webhooks start the work. It comes back as a preview link or a pull request.\n- **Any agent.** Hit a usage limit? Fork the session to another agent, or let\n Bivy retry when the limit resets.\n- **Your machine, anywhere.** Start at your desk, pick the session up on your\n phone. The machine dials out, so there are no ports to open, and session\n traffic is end-to-end encrypted.\n\n**[Start free on Bivy Cloud](https://app.bivy.sh)** ·\n**[Quickstart](docs/quickstart.md)** ·\n**[Documentation](docs/README.md)** ·\n**[Self-host](docs/deploy-images.md)** ·\n**[Website](https://bivy.sh)**\n\n**Recommended:** sign in at [app.bivy.sh](https://app.bivy.sh), then copy your\npersonalized **Connect a Machine** command into a terminal on your Mac or Linux\ncomputer. It installs and enrolls the machine without another Bivy login. The\nbrowser connects automatically; choose a repository and send your first task\nright there.\n\nPrefer starting from the terminal?\n\n```bash\ncurl -fsSL https://bivy.sh/install.sh | bash # install + guided setup\ncd your-repo\nbivy run claude # or codex, pi, opencode\nbivy open # continue in the web app (needs remote setup)\n```\n\nBivy Cloud hosts the app, control plane, and relay—not the machines running your\nagents. Connect a Mac, Linux computer, or existing server and bring your own\nagent subscription, model API key, or local model. You can also self-host the\nentire remote-access stack.\n\n> **Bivy is 0.x software.** Claude Code, Codex, Pi, OpenCode, and Grok are the\n> release-tested paths. Credential sync, resume, handoffs, approvals, and\n> sandboxing depend on the runtime. See the\n> [runtime support matrix](docs/runtime-support-matrix.md).\n\n## Don't just read the diff. Try the app.\n\nBivy lets you **use what the agent built and show it what to fix**, without a\nseparate deployment step.\n\n1. **Ask for a change.** The agent works in your repo with your existing tools\n and local services.\n2. **Try the app.** Bivy finds the dev server the agent starts and opens it\n beside the chat: web apps, terminals, and desktop apps. Use the running app,\n not a screenshot of what the agent says it finished.\n3. **Mark what needs work.** Press and hold anything in the preview to mark it,\n or drag to circle it, then say what you want. **Mark another** keeps\n separate notes separate. The marks go to the agent with the element and page\n context. No screenshots to paste.\n4. **Follow each note.** Every mark stays in the chat as a pin that resolves\n itself: **Changed** when a later run changes what you marked, **Element\n gone** when it leaves the page, **Done** when you say so.\n5. **Review the next version.** A new version waits on the preview pill instead\n of reloading under you. Take it when you're ready, compare before and after,\n inspect the diff and checks, and decide when the work is done.\n6. **Get a second opinion.** Share a preview link for 1 hour, 1 day, or 7 days.\n Teammates and clients try the running app and leave notes without a Bivy\n account. Make it view-only, or **Stop sharing** to end every link at once.\n\nOn Bivy Cloud, preview delivery is built in: no per-app domains, certificates,\npublic ports, or tunnels to configure. Self-hosters configure preview delivery\nonce for their Bivy deployment, not for every app. The app still needs its normal\nbuild or dev-server setup, and **the machine serving it must stay awake and\nonline**. These are development previews, not production hosting.\n\n**Share deliberately:** anyone with a preview link can use that app, including\nits live backend, until the link expires or you stop sharing.\nReviewer notes aren't sent to the agent automatically; you send them or explicitly\nallow agent access. Preview traffic uses HTTPS through the preview relay, not\nsession end-to-end encryption; the relay operator can see it.\n\n[App previews, visual feedback, and sharing →](docs/apps.md)\n\n## One workflow, from trigger to review\n\n```text\nPrompt · GitHub issue · CI failure · Linear · Slack · Schedule · Webhook\n │\n ▼\n Choose machine + agent + model\n + supported credentials\n │\n ▼\n Live agent session\n Join · steer · approve · stop\n │\n ▼\n Try app · inspect changes · checks\n │\n ▼\n Mark up · send feedback · iterate\n │\n ▼\n Share preview · review PR\n```\n\nA **Machine** is a computer or server you connect. A **Session** is live agent\nwork on that machine. A **Run** is delegated background work that creates a\nsession and tracks its outcome. An **Automation** is a reusable definition that\ncreates runs when an event matches.\n\nManual and automated work use the same kind of live session. You can join a run\nwhen it needs help rather than wait for a black-box job to finish.\n\n### Let events start the work\n\nAutomations turn recurring or incoming work into sessions you can join,\nsupervise, and review. An agent picks the task up on your machine and posts\nback a preview link or a pull request, so you try the result where the task\nlives and reply in the same session. Choose the repository, machine, agent,\nmodel, approval mode, sandbox setting, and maximum attempts.\n\n| Trigger | Example workflow |\n|---|---|\n| **GitHub issues and mentions** | Label an issue `bivy` or `bivy/<machine>`, or mention your Bivy GitHub App, to work toward a pull request. |\n| **Failed CI** | Match a failed workflow, ask the agent to reproduce it, make a fix, and run the affected checks. |\n| **Linear** | Label an issue to start work without copying its description into an agent. |\n| **Slack** | Send a request from the conversation where the work came up. |\n| **Schedules** | Run a weekly dependency review, recurring maintenance, or a one-time task. |\n| **Signed webhooks** | Connect alerts, internal tools, or your own event sources. |\n\nConfigure automations in the app or version them with your repository in\n`.bivy/automations.yaml`:\n\n```bash\nbivy automation init\n# Edit the generated definition for your repository and workflow.\nbivy automation validate\nbivy automation test --event .bivy/events/failed-ci.yaml # supply a local event fixture\nbivy automation apply\n```\n\nOr delegate a one-off job without creating an automation:\n\n```bash\nbivy runs start \"Review outdated dependencies and propose a small, tested update.\"\nbivy runs wait <id>\n```\n\nRuns keep routing and lifecycle evidence, check results, and output references\nin a reviewable Receipt. For unattended issue work, Bivy runs declared repository\nchecks after the agent's turn; failed required checks fail the run even if the\nagent reports success. A completed process alone is not proof that the task\nsucceeded.\n\n[Automation recipes →](docs/capability-recipes.md#let-events-start-runs) ·\n[Automations as code →](docs/automations-as-code.md) ·\n[Run outcomes and reliability limits →](docs/automation-runs.md)\n\n### Use every agent you pay for. Switch mid-task.\n\nRun Claude Code for one task, Codex for another, and Pi or OpenCode where they\nfit, side by side in one session list. Bivy supplies the shared session,\nremote-access, automation, and review surfaces; your chosen agent still does\nthe coding and uses your model provider.\n\n- **Hit a usage limit? Keep going.** When a turn fails on a limit, fork the\n session, with its code and conversation, to another agent and model, or let\n Bivy retry when the limit resets (the provider has to report a reset time).\n- **Get a second opinion.** `bivy delegate` hands a task to another agent, on\n the same machine or a different one, and brings back its answer, branch, and\n PR. `--to codex,claude@linux` sends one task to several agents to compare.\n- Choose an agent and, where supported, a model for each session or run.\n- Import existing Claude Code and Codex sessions.\n- Fork or move work to another agent or machine when a different setup fits\n better. Continuation fidelity varies: some paths preserve native history,\n while others replay portable turns or hand over a summary with the earlier\n transcript as a local file.\n- Use agent-native logins, Bivy-managed credentials, or local inference.\n Bivy's custom OpenAI-compatible endpoint registry currently feeds Pi;\n other agents may need their own provider configuration.\n- Register your own ACP or headless process agent with `bivy agent add`.\n\nBivy does not replace your agent, provide model inference, or make every agent's\nfeatures identical. Consult the [support matrix](docs/runtime-support-matrix.md)\nand [handoff recipes](docs/capability-recipes.md#fork-or-move-a-session).\n\n### Less signing in. Less copying secrets.\n\nBivy syncs **Bivy-managed API keys and supported OAuth credentials** across\nenrolled machines for compatible runtimes. Connect supported credentials once\nand reuse them where you run work, rather than manually distributing keys to\neach machine.\n\nFor ordinary account sync, credentials are encrypted on the node before upload.\nThe control plane stores ciphertext and wrapped-key metadata; enrolled nodes\nshare access by wrapping the vault key to one another. Bivy Cloud does not\nreceive plaintext credentials through this sync path.\n\nYou can also keep credentials local, use labeled keys and project presets, or\nreference environment variables and 1Password instead of embedding secrets in\nconfiguration:\n\n```bash\nbivy provider login\nbivy credentials add anthropic work\nbivy secrets ref github.repo-token op://Bivy/GitHub/repo-token\n```\n\n**Not every CLI login syncs.** Native agent logins may still be per-machine;\nGitHub App private-key sync is separately opt-in. If you lose every node and\ndevice able to unwrap a vault, you must sign in to providers again. Explicit\nhosted-provisioning custody grants are separate from ordinary encrypted sync.\n\n[Credential sync and runtime coverage →](docs/credential-sync.md) ·\n[Credentials guide →](docs/credentials-guide.md) ·\n[Key storage →](docs/key-management.md)\n\n### Work in the environment you already have\n\nA clean cloud sandbox isn't always enough. Your agent may need the database\nrunning on localhost, an uncommitted change, an internal API behind your VPN,\nor a model running on your GPU. Bivy runs the agent where those things already\nexist, subject to that machine's permissions and the runtime's protection.\n\nConnect several machines to the same account: a laptop for interactive work,\na Linux server for background jobs, or a GPU box for local inference. Choose\nthe machine for each session or pin it in an automation. Repository runs can\nuse isolated Git worktrees without rebuilding the whole development environment.\n\n**The execution machine must stay awake and online.** To close your laptop and\nleave work running, run the agent on a different, always-on machine.\n\n[Environment and multi-machine recipes →](docs/capability-recipes.md)\n\n### Start at your desk. Continue anywhere.\n\nOpen the same session in the browser, phone PWA, or terminal. Watch work live,\nanswer questions, approve supported tool calls, or stop the agent.\n\n- Send screenshots, images, logs, and other files from your phone.\n- Download reports and artifacts the agent creates.\n- Open [session apps](docs/apps.md) from chat or the **Apps** menu: live web\n previews, desktop app views, and CLI/TUI tools. Agents can publish views with\n `bivy app publish bivy.app.json` and create share links with `bivy app share`.\n- Use voice input and read-aloud where supported; provider-backed voice may\n send audio or text to the selected provider.\n- Keep a native terminal workflow or use structured chat, depending on the agent.\n\n```bash\nbivy run claude --no-follow # start without attaching\nbivy open # open the web app\nbivy resume # return to the session in your terminal\nbivy link # pair a device directly via QR\n```\n\nNo phone app installation is required. Open [app.bivy.sh](https://app.bivy.sh)\nin your browser; adding it to your home screen is optional.\n\n[Remote access →](docs/remote-access.md) ·\n[Voice, files, and terminal recipes →](docs/capability-recipes.md)\n\n### Agents can reach you, too\n\nEvery session gets the `bivy` CLI, so any agent with a shell can talk back\nthrough the app, not only agents with their own built-in tools:\n\n```bash\nbivy notify \"Tests are green, PR is up\" # chat card + phone push when you're away\nbivy ask \"Ship to staging?\" --option Yes --option No # waits for your answer\nbivy attach report.png --caption \"Before/after\" # show a file in the chat\nbivy suggest \"Add a dark theme to settings\" # a next task you start in one tap\nbivy context --json # session, workspace, machine, apps\n```\n\n`bivy help --json` lists every command, and with `BIVY_OUTPUT=json` failures\ncome back as structured errors with distinct exit codes, so an agent can tell\nwhat went wrong and what to run next. `bivy guide` prints short playbooks for\nagents, and the same commands are served as MCP tools for agents that prefer\nthem. Add your own standing instructions for\nevery session in **Settings → Agent instructions**.\n\n[Commands for agents inside a session →](docs/cli-reference.md#inside-an-agent-session) ·\n[Agent instructions →](docs/agent-instructions.md)\n\n## Get started\n\n### Install\n\nBivy supports **macOS and Linux with Node.js 20+**. The installer installs the\n`@bivy/bivy` package, runs guided setup, and starts a launchd or systemd service:\n\n```bash\ncurl -fsSL https://bivy.sh/install.sh | bash\n```\n\nSetup helps you choose an agent and configure remote access. Existing agents\nkeep their command, login, and configuration. The installer may use `sudo` to\ninstall a missing Node.js, but never for `npm install`. To inspect it first,\ndownload it with `curl -fsSL https://bivy.sh/install.sh -o install.sh`.\n\nAlready have Node.js and want to avoid sudo?\n\n```bash\nnpm install -g @bivy/bivy\nbivy setup\n```\n\nThen try one small task:\n\n```bash\ncd your-repo\nbivy run claude\n# Ask: \"Explain this repo and make one small, safe improvement. Run the relevant checks.\"\nbivy open\n```\n\nOpen that same session on your phone while it runs. For a web app, ask the agent\nto start its dev server, then open **Apps → Running in this workspace → Preview**.\nTry a page, point to something you'd change, and send the feedback back to the\nagent. No separate preview deployment needed.\n\nOnce that works, share a preview for review, connect another machine, or add\nyour first automation.\n\n**Local-only works too.** `bivy run`, `bivy resume`, and `bivy sessions` need no\naccount or server. Choose **local only for now** during setup; use `bivy login`\nlater.\n\n**Just your own devices?** `bivy tailscale` serves the app from the machine\nitself at `https://<machine>.<tailnet>.ts.net`, with no account, control plane\nor relay. You get the core over your tailnet: sessions, chat, approvals,\nquestions, terminals and files. Push notifications, app previews and share\nlinks need Bivy Cloud or a self-hosted server. See [Tailscale](docs/tailscale.md)\nand [Remote access](docs/remote-access.md).\n\n[Full quickstart →](docs/quickstart.md) ·\n[Installer options, service management, and uninstall →](docs/install.md)\n\n### Choose hosted or self-hosted\n\n| Option | What you get |\n|---|---|\n| **Free Cloud — $0** | Every launch feature, including automations; 10 new remote sessions per rolling seven days. No credit card required. |\n| **Cloud — $15/month** | The same features with unlimited remote sessions. |\n| **Self-hosted Core** | Operate the app, control plane, and relay yourself, with no Bivy usage limits. |\n\nManual and automated sessions share the Cloud allowance. Resuming existing\nsessions and viewing history do not consume it. Agent subscriptions and model\nprovider charges are separate. See [current pricing](https://bivy.sh#pricing).\n\n**Self-host anywhere:** deploy the public control-plane (including the web app)\nand relay images with Postgres and [a small set of environment variables](docs/deploy-images.md).\nYour server or container platform handles HTTPS. Set up owner access in the\nbrowser—no SSH, external authentication provider, or Bivy Cloud account required.\nFor a bare VPS, the [Compose installer](docs/self-host-quickstart.md) automates the\nsame stack. These onboarding features require a release containing them.\n\nStart on Cloud and self-host later if you prefer. Deploy the stack, reconnect\nmachines with `bivy relay:setup`, and pair devices to your server. This is not a\none-click migration of your Cloud account; your local repos and agent\nconfiguration stay in place.\n\n```bash\nbivy relay:setup \\\n --control-plane https://bivy.example.com \\\n --relay wss://relay.example.com\n```\n\nSelf-hosting is community-supported: you own TLS, backups, upgrades, and\nhardening. Public multi-architecture images are available as\n`ghcr.io/bivysh/bivy-control-plane` and `ghcr.io/bivysh/bivy-relay`; pin a release\nversion or full commit SHA.\n\n[Deploy the images anywhere →](docs/deploy-images.md) ·\n[Optional VPS installer →](docs/self-host-quickstart.md) ·\n[Operations reference →](docs/self-host.md)\n\n## Architecture\n\nYour environment, with clear security boundaries:\n\n```text\nYour machine Hosted or self-hosted\n┌──────────────────────┐ ┌──────────────────────┐\n│ Node daemon │──outbound──▶│ Relay │\n│ Agents, repos, tools │ │ Encrypted frames │\n│ Local credentials │ └──────────┬───────────┘\n└──────────────────────┘ │\n Browser / phone\n + control plane\n (app, accounts, metadata)\n```\n\n- **Execution stays on your machine.** Bivy Cloud does not run your agents.\n Your model provider still sees whatever the agent sends it.\n- **Interactive session traffic is end-to-end encrypted** between the node and\n paired devices. The relay forwards opaque session frames; your node dials out,\n so no inbound public port is required.\n- **App previews have a separate security boundary.** Preview traffic uses HTTPS\n and an outbound tunnel, not session E2E encryption. The preview ingress/relay\n operator can see it. Public preview links grant anyone holding them access to\n that view and its live backend until expiry or revocation. See\n [preview security and sharing](docs/apps.md#runtime-and-security-boundaries).\n- **Ordinary credential sync uploads ciphertext, not plaintext keys.**\n Supported credentials and recovery limits are documented separately.\n- **Encryption is not universal across integrations.** Slack commands and\n generic webhook instructions reach the control plane in plaintext. Do not\n put secrets in them. Routing and bounded run metadata are also visible there.\n- **Device authorization matters.** QR pairing authorizes a device directly\n through the node. Hosted account pairing trusts the control plane to authorize\n devices and serve the web app that holds client keys.\n- **Bivy is not an OS-level sandbox.** The default approval mode is\n `autonomous`; protection depends on the runtime. Some agents enforce sandbox\n tiers, while process agents may run with your full user permissions.\n Heuristic tool checks help prevent accidents but are not isolation.\n\nReview the runtime's Protection label and configure approval/sandbox settings\nfor the task, especially before enabling unattended work.\n\n[Security model and known limitations →](docs/security-model.md) ·\n[Runtime protection matrix →](docs/runtime-support-matrix.md) ·\n[Configuration →](docs/configuration.md)\n\n## Agents and everyday commands\n\n**Claude Code, Codex, Pi, OpenCode, and Grok are release-tested.** Additional\nadapters include Gemini CLI, Qwen Code, Goose, Aider, Cline, Crush, Cursor, GitHub\nCopilot, Amp, Auggie, Droid, Continue, Kilo Code, and Rovo Dev. Installation,\nresume, model selection, and tool protection vary—see the\n[support matrix](docs/runtime-support-matrix.md) and [agent guides](docs/agents/README.md).\n\nRun an arbitrary command with `bivy run -- ./your-agent --flags`, register a\nreusable entry with `bivy agent add`, or package a declarative integration with\nexperimental [plugins](docs/plugins.md).\n\n```bash\nbivy run claude # launch a durable session; also codex, pi, opencode\nbivy sessions # list live and saved sessions\nbivy resume # resume the most recent session\nbivy open # open the web app (requires remote setup)\nbivy nodes # list connected account machines\nbivy runs list # inspect delegated work\nbivy automation init # scaffold repo-owned automations\nbivy provider login # connect supported model credentials\nbivy agent add # register an ACP or process agent\nbivy doctor # check installation and connectivity\nbivy logs -f # follow node logs\nbivy update # update and restart the service\n```\n\n`bivy update` uses your original installation method and waits for an active\nturn to finish before restarting. Use `--force` to skip that wait.\n\n[CLI reference →](docs/cli-reference.md) ·\n[Node and project configuration →](docs/config-as-code.md) ·\n[GitHub setup →](docs/github-setup.md) ·\n[Linear setup →](docs/linear-work-queue.md)\n\n## Development and contributions\n\n```bash\npnpm install\npnpm run dev # node daemon on http://localhost:4317\npnpm run dev:web # web client dev server\n```\n\n| Directory | Contents |\n|---|---|\n| `src/`, `bin/` | Node daemon, CLI, runtime adapters, sessions, approvals, secrets |\n| `packages/core/` | Shared protocol, pairing, and wire format |\n| `packages/web/`, `packages/ui/` | React PWA and shared design system |\n| `services/relay/` | Self-hostable encrypted relay |\n| `services/control-plane/` | Self-hostable control plane |\n| `deploy/` | Deployment examples |\n\n```bash\npnpm run typecheck\npnpm run typecheck:web\npnpm run lint\npnpm run test:unit\npnpm run test:core\npnpm run check:licenses\npnpm run check:secrets\n```\n\nSee [CONTRIBUTING.md](CONTRIBUTING.md) for the development workflow. Releases\nare published from CI with provenance attestations; see\n[release verification](docs/releasing.md).\n\n**Found a security issue?** Use\n[GitHub private vulnerability reporting](https://github.com/bivysh/bivy/security/advisories/new),\nnot a public issue. See [SECURITY.md](SECURITY.md).\n\n### In development—not available at launch\n\nAutomatically provisioned, short-lived **ephemeral machines** are in development\nfor hosted and bring-your-own-cloud deployments. Neither path is ready or\nsupported for this launch. Use an existing computer or server you operate.\nExperimental provisioning has different credential-custody and encryption\nboundaries; see the [provisioning trust model](docs/hosted-provisioning-trust-model.md).\n\n## License\n\nEverything in this repository—node, CLI, web/PWA, relay, and control plane—is\nfree and open-source **AGPL-3.0-only Core**, with no Bivy usage limits. You may\nuse, modify, and self-host it under that license. If users interact with your\nmodified version over a network, section 13 requires you to offer its\ncorresponding source. See [LICENSE](LICENSE).\n\nBivy Cloud is the hosted operation of that stack plus billing and plans, in a\nseparate private repository. Contributions use the\n[DCO](CONTRIBUTING.md#certificate-of-origin); there is no CLA.\n",
69
69
  "readmeFilename": "README.md",
70
70
  "agentBridges": {
71
71
  "@anthropic-ai/claude-agent-sdk": "0.3.286",
72
- "@earendil-works/pi-ai": "1.0.4",
73
- "@earendil-works/pi-coding-agent": "1.0.4"
72
+ "@earendil-works/pi-ai": "0.99.2",
73
+ "@earendil-works/pi-coding-agent": "0.99.2"
74
74
  }
75
75
  }