@saadnvd1/agent-os 0.3.698 → 0.3.700

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 (65) hide show
  1. package/app/api/bus/send/route.ts +11 -1
  2. package/app/api/bus/wait/route.ts +22 -0
  3. package/app/api/peer/hello/reveal/route.ts +6 -0
  4. package/app/api/peer/hello/route.ts +9 -0
  5. package/app/api/peer/hello/status/route.ts +6 -0
  6. package/app/api/peers/account/route.ts +9 -0
  7. package/app/api/peers/gate.test.ts +111 -0
  8. package/app/api/peers/link/[id]/confirm/route.ts +27 -0
  9. package/app/api/peers/link/[id]/route.ts +20 -0
  10. package/app/api/peers/link/route.ts +23 -0
  11. package/app/api/peers/pending/[id]/accept/route.ts +31 -0
  12. package/app/api/peers/pending/[id]/decline/route.ts +13 -0
  13. package/app/api/peers/pending/route.ts +7 -0
  14. package/app/api/sessions/route.ts +18 -1
  15. package/app/page.tsx +2 -0
  16. package/components/Hosts/AccountMachines.tsx +180 -0
  17. package/components/Hosts/HostRow.tsx +44 -35
  18. package/components/Hosts/HostsDialog.tsx +49 -37
  19. package/components/Hosts/IncomingLinkSheet.tsx +228 -0
  20. package/components/Hosts/LinkCodeSheet.tsx +186 -0
  21. package/components/Hosts/sheet.ts +3 -0
  22. package/components/SessionList/RowSubtitle.tsx +11 -1
  23. package/components/Welcome/ConnectBlock.tsx +1 -1
  24. package/data/peers/index.ts +2 -0
  25. package/data/peers/keys.ts +6 -0
  26. package/data/peers/queries.ts +141 -0
  27. package/lib/agents/brief.ts +3 -1
  28. package/lib/bus/format.ts +25 -4
  29. package/lib/bus/index.ts +113 -106
  30. package/lib/bus/resolve.ts +16 -2
  31. package/lib/bus/targets.ts +122 -0
  32. package/lib/bus/waits/kick.ts +12 -0
  33. package/lib/bus/waits/lines.ts +69 -0
  34. package/lib/bus/waits/register.ts +83 -0
  35. package/lib/bus/waits/store.ts +196 -0
  36. package/lib/bus/waits/tick.ts +192 -0
  37. package/lib/connect/control-api.ts +108 -2
  38. package/lib/connect/heartbeat.ts +11 -3
  39. package/lib/connect/serve.ts +2 -0
  40. package/lib/db/migrations/20261020T1600_bus_waits.ts +35 -0
  41. package/lib/db/types.ts +4 -0
  42. package/lib/done/archive.ts +2 -0
  43. package/lib/orchestrator/describe.ts +13 -0
  44. package/lib/orchestrator/facts.ts +17 -0
  45. package/lib/peer/account.ts +198 -0
  46. package/lib/peer/cli.ts +24 -0
  47. package/lib/peer/code.ts +3 -0
  48. package/lib/peer/hello-route.ts +32 -0
  49. package/lib/peer/hello.ts +346 -0
  50. package/lib/peer/link-cli.ts +233 -0
  51. package/lib/peer/machines.ts +72 -0
  52. package/lib/peer/notify.ts +32 -0
  53. package/lib/peer/pairing-out.ts +382 -0
  54. package/lib/peer/pairing.ts +403 -0
  55. package/lib/peer/pin.ts +55 -0
  56. package/lib/peer/rpc-intake.ts +37 -8
  57. package/lib/peer/rpc-server.ts +19 -1
  58. package/lib/schedules/when.ts +1 -1
  59. package/lib/security/auth.ts +10 -2
  60. package/lib/security/gate.ts +3 -0
  61. package/lib/sessions/end.ts +3 -0
  62. package/package.json +1 -1
  63. package/scripts/agent-os +2 -0
  64. package/scripts/lib/commands.sh +2 -0
  65. package/server.ts +3 -0
@@ -558,6 +558,8 @@ cmd_help() {
558
558
  echo " pair Add a phone, tablet or laptop (prints a QR code)"
559
559
  echo " connect Turn on AgentOS Connect for this machine (in development)"
560
560
  echo " disconnect Turn Connect off; the tunnel closes within seconds"
561
+ echo " link Link machines on your Connect account (link <name>, link accept <code>)"
562
+ echo " unlink Unlink a machine linked through Connect"
561
563
  echo " passkeys reset Revoke every passkey (recovery; asks you to confirm)"
562
564
  echo " logs Tail server logs"
563
565
  echo " update Update to latest version"
package/server.ts CHANGED
@@ -14,6 +14,7 @@ import { setStartGate } from "./lib/stacks/tick";
14
14
  import { stackStartGate } from "./lib/orchestrator/brakes";
15
15
  import { buildId } from "./lib/build";
16
16
  import { startOrchestratorWatcher } from "./lib/orchestrator/watcher";
17
+ import { startWaitWatcher } from "./lib/bus/waits/tick";
17
18
  import { installErrorCounter } from "./lib/health/errors";
18
19
  import { recordBoot } from "./lib/health/boots";
19
20
  import { realDeps, schedulesEnabled, startScheduler } from "./lib/schedules";
@@ -476,6 +477,8 @@ app.prepare().then(async () => {
476
477
  if (process.env.AGENTOS_STACKS !== "off") startStackWatcher();
477
478
  // Each workspace's orchestrator hears about its sessions as events.
478
479
  if (process.env.AGENTOS_ORCHESTRATOR !== "off") startOrchestratorWatcher();
480
+ // Sessions waiting on each other (aos send --await, aos wait).
481
+ startWaitWatcher();
479
482
  // Schedules tick here, once a minute, and nowhere else.
480
483
  if (schedulesEnabled(process.env)) startScheduler(realDeps);
481
484
  // Looking for a newer version, and running an update only when one is