heyquilt 0.3.182 → 0.3.184

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 (126) hide show
  1. package/README.md +101 -97
  2. package/RELEASES.md +14 -0
  3. package/bin/quilt.js +32 -32
  4. package/desktop/main.js +1 -1
  5. package/package.json +1 -1
  6. package/src/account.js +17 -2
  7. package/src/admit-policy.js +2 -2
  8. package/src/agent-join.js +3 -3
  9. package/src/agent-task-workflow.js +14 -14
  10. package/src/ai-vm.js +1 -1
  11. package/src/api/agent-placement.js +2 -2
  12. package/src/api/audit.js +1 -1
  13. package/src/api/file-paths.js +1 -1
  14. package/src/api/file-store.js +1 -1
  15. package/src/api/invite-email.js +4 -4
  16. package/src/api/join-text.js +5 -5
  17. package/src/api/memory-store.js +22 -1
  18. package/src/api/notify.js +7 -7
  19. package/src/api/permissions.js +1 -1
  20. package/src/api/routes/agent-wake.js +1 -1
  21. package/src/api/routes/agents.js +2 -2
  22. package/src/api/routes/ai-vm.js +5 -5
  23. package/src/api/routes/connections.js +66 -25
  24. package/src/api/routes/grants.js +2 -2
  25. package/src/api/routes/mail.js +10 -10
  26. package/src/api/routes/relay.js +1 -1
  27. package/src/api/routes/secrets.js +11 -11
  28. package/src/api/routes/session-invites.js +5 -5
  29. package/src/api/routes/sessions.js +3 -3
  30. package/src/api/routes/workspace-agents.js +14 -14
  31. package/src/api/routes/workspace-chat.js +77 -0
  32. package/src/api/routes/workspace-files.js +12 -12
  33. package/src/api/routes/workspace-invites.js +5 -5
  34. package/src/api/routes/workspaces.js +11 -11
  35. package/src/api/secrets-access.js +1 -1
  36. package/src/api/server.js +5 -4
  37. package/src/api/supabase-store.js +25 -1
  38. package/src/api/team-access.js +1 -1
  39. package/src/api/workspace-access.js +1 -1
  40. package/src/api/workspace-reach.js +3 -3
  41. package/src/app-tools.js +11 -11
  42. package/src/autowork.js +4 -4
  43. package/src/branch-view.js +1 -1
  44. package/src/catchup.js +5 -5
  45. package/src/chat-links.js +18 -18
  46. package/src/connection.js +11 -11
  47. package/src/control.js +5 -5
  48. package/src/conversation.js +1 -1
  49. package/src/doctor.js +2 -2
  50. package/src/duties.js +1 -1
  51. package/src/fsutil.js +1 -1
  52. package/src/held.js +4 -4
  53. package/src/hooks.js +3 -3
  54. package/src/hosted-client.js +2 -2
  55. package/src/identity.js +1 -1
  56. package/src/inbox.js +1 -1
  57. package/src/key-cli.js +1 -1
  58. package/src/mail-tools.js +11 -11
  59. package/src/mcp-proxy.js +1 -1
  60. package/src/mcp.js +59 -59
  61. package/src/new-session.js +6 -6
  62. package/src/project-rules.js +2 -2
  63. package/src/relay-ask.js +2 -2
  64. package/src/relay-cluster.js +3 -3
  65. package/src/relay-live-write.js +3 -3
  66. package/src/relay-mcp.js +56 -56
  67. package/src/relay-prune.js +1 -1
  68. package/src/relay-turn-sync.js +1 -1
  69. package/src/secret-import.js +1 -1
  70. package/src/secret-names.js +6 -6
  71. package/src/secret-run.js +3 -3
  72. package/src/server.js +41 -41
  73. package/src/session-access.js +3 -3
  74. package/src/session-name.js +1 -1
  75. package/src/session.js +50 -50
  76. package/src/setup.js +7 -7
  77. package/src/status.js +2 -2
  78. package/src/tasks.js +1 -1
  79. package/src/turn-sync.js +4 -4
  80. package/src/ui/account-sessions.js +2 -2
  81. package/src/ui/agent-env-key.js +1 -1
  82. package/src/ui/agent-guide.js +35 -35
  83. package/src/ui/agent-kinds.js +8 -8
  84. package/src/ui/agent-place.js +16 -16
  85. package/src/ui/agents-table.js +6 -6
  86. package/src/ui/app.css +345 -0
  87. package/src/ui/app.js +28 -13
  88. package/src/ui/board.js +2 -2
  89. package/src/ui/catchup.js +5 -5
  90. package/src/ui/changes-seen.js +2 -2
  91. package/src/ui/changes.js +3 -3
  92. package/src/ui/cloud-ai.js +12 -12
  93. package/src/ui/common.js +1 -1
  94. package/src/ui/connections.js +48 -8
  95. package/src/ui/diffview.js +2 -2
  96. package/src/ui/feed.js +1 -1
  97. package/src/ui/feedback.js +4 -4
  98. package/src/ui/files.js +120 -14
  99. package/src/ui/fileview.js +3 -3
  100. package/src/ui/git-rule.js +3 -3
  101. package/src/ui/home.js +97 -47
  102. package/src/ui/index.html +1 -1
  103. package/src/ui/invite.js +8 -8
  104. package/src/ui/invites.js +3 -3
  105. package/src/ui/new-session.js +3 -3
  106. package/src/ui/prail-model.js +22 -0
  107. package/src/ui/prail.js +43 -0
  108. package/src/ui/project-board.js +359 -0
  109. package/src/ui/project-channel.js +93 -0
  110. package/src/ui/project-model.js +224 -0
  111. package/src/ui/project-pop.js +451 -0
  112. package/src/ui/projects.js +464 -0
  113. package/src/ui/sandbox-keys.js +3 -3
  114. package/src/ui/secrets-view.js +5 -5
  115. package/src/ui/session-words.js +2 -2
  116. package/src/ui/session.js +174 -47
  117. package/src/ui/tree.js +3 -3
  118. package/src/ui/voice.js +6 -6
  119. package/src/ui/workspaces.js +23 -23
  120. package/src/ui-server.js +88 -27
  121. package/src/update-check.js +2 -2
  122. package/src/voice.js +7 -7
  123. package/src/wake-tool.js +1 -1
  124. package/src/webhooks.js +1 -1
  125. package/src/workspace-cli.js +12 -12
  126. package/src/workspace-tools.js +33 -33
package/bin/quilt.js CHANGED
@@ -19,13 +19,13 @@ Usage:
19
19
  quilt api [--port 8787] [--memory] Run the accounts API (needs SUPABASE_URL etc.; --memory for local testing)
20
20
  quilt agent join <link> --name <name> Join Quilt as an agent with an invite link from the website
21
21
  [--agent-id <id>] (an agent that joined before comes back as itself)
22
- [--here] (keeps its keys in this project's .quilt/: a sandbox that wipes home)
22
+ [--here] (keeps its keys in this folder's .quilt/: a sandbox that wipes home)
23
23
  [--session <invite> --print-env] (keeps nothing: prints the sandbox's QUILT_AGENT_KEY instead)
24
24
  quilt agent env --name <name> --session <invite> A new QUILT_AGENT_KEY for a sandbox, for an agent joined on this computer
25
25
  quilt agent whoami --name <name> Show who a joined agent is
26
- quilt join Rejoin this folder's last session, or start a new one
27
- quilt join <invite-link> Join a partner's session in this folder
28
- quilt sync [--dir <folder>] Agents in a sandbox: sync this folder with the session once and exit
26
+ quilt join Open this folder's codebase again, or start a new one
27
+ quilt join <invite-link> Join a partner's codebase in this folder
28
+ quilt sync [--dir <folder>] Agents in a sandbox: sync this folder with the codebase once and exit
29
29
  (needs QUILT_AGENT_KEY; run it at the start and end of every turn).
30
30
  With the key, status, messages, say, tasks, task, history,
31
31
  focus, tool and mcp work too
@@ -35,23 +35,23 @@ Usage:
35
35
  Who changed what, when, and for which task
36
36
  quilt chat Live chat (messages, DMs, files) in this terminal
37
37
  quilt say [@name] <message> Message everyone, or one person with @name
38
- quilt send <file> [@name] [message] Send a file (not added to the project)
38
+ quilt send <file> [@name] [message] Send a file (not added to the codebase)
39
39
  quilt inbox --wait [--timeout <sec>] [--json] Wait for your next mention, direct message or task and print it (exit 2: timed out)
40
- quilt voice transcript [-n 50] What was said in the session's calls, oldest first
40
+ quilt voice transcript [-n 50] What was said in the codebase's calls, oldest first
41
41
  quilt wake [webhook|email|command|wait|push|schedule|turns|none] [--url U | --address A | --code C | --command CMD | --every N] How Quilt wakes you (step 2 of joining); no method: the ways that fit you
42
42
  quilt webhook set <url> [--bearer-env VAR] | clear | test | status Your webhook (quilt_webhook_subscribe): the relay POSTs your mentions, DMs and tasks there, even while you sleep
43
43
  quilt messages [--all] [--with name] [--grep text] [--before id] [-n 30]
44
44
  Show unread messages, or read back: the conversation
45
45
  with one person, a search, earlier messages
46
46
  quilt get <message-id> [dest] Download a shared file again
47
- quilt run -- <command> [args...] Run a command with the session's secrets: it gets NAME=quilt and
47
+ quilt run -- <command> [args...] Run a command with the codebase's secrets: it gets NAME=quilt and
48
48
  NAME's base URL (STRIPE_BASE_URL), and its requests go through
49
49
  Quilt's vault; it never sees a value
50
50
  quilt focus <what you're doing> Tell collaborators what you're working on
51
51
  quilt chat-link [name] [--minutes N] Owner: a link for a chat-only AI (ChatGPT, claude.ai, Grok); 10 minutes
52
52
  quilt chat-link extend <name> <minutes> Owner: keep a chat link working for that long from now
53
- quilt invite Print this session's invite code
54
- quilt workspace list|files|get|put|write|mkdir|mv|rm The workspace library (quilt workspace for help)
53
+ quilt invite Print this codebase's invite code
54
+ quilt workspace list|files|get|put|write|mkdir|mv|rm A project's artifacts (quilt workspace for help)
55
55
  quilt stop Shut down everything quilt is running (relay, app, syncs)
56
56
  quilt doctor [folder] [--watch 30] Check what quilt can see of your Claude Code / Cursor chats
57
57
  quilt mcp Run the MCP server (used by AI tools)
@@ -61,7 +61,7 @@ Usage:
61
61
  Join options:
62
62
  --agent <name> Join as a Quilt agent saved with \`quilt agent join\` (default: your account)
63
63
  --tool <tool> What you're coding with, e.g. claude, cursor (shown to others)
64
- --dir <folder> Project folder (default: current folder)
64
+ --dir <folder> The codebase's folder (default: current folder)
65
65
  --room <name> --secret <secret> Join/create a specific room instead of using an invite
66
66
  --on-mention <cmd> Run <cmd> through the shell on each mention, direct message or task for you, the
67
67
  event JSON (the webhook's) on stdin and in QUILT_EVENT; kept for this folder
@@ -71,7 +71,7 @@ Join options:
71
71
  --webhook-bearer-env <VAR> Sent as Authorization: Bearer $VAR (the variable's name, never the key)
72
72
  --webhook-secret-env <VAR> Sign with $VAR (16 to 200 characters); without it Quilt makes a secret and prints it once
73
73
  --prefer local On first join, keep your local version of files that differ
74
- (default: take the session's version and back yours up)
74
+ (default: take the codebase's version and back yours up)
75
75
  `
76
76
 
77
77
  const cmd = process.argv[2]
@@ -117,7 +117,7 @@ async function main () {
117
117
  const i = argv.indexOf('--minutes')
118
118
  const minutes = i >= 0 ? Number(argv[i + 1]) : undefined
119
119
  const name = argv.filter((a, k) => !(i >= 0 && (k === i || k === i + 1))).join(' ')
120
- return simple('/chat-link', { name, minutes }, (r) => `Chat link for ${r.name}, until ${new Date(r.expiresAt).toLocaleTimeString()}:\n\n ${r.url}\n\nPaste it into ChatGPT, claude.ai or Grok with "Open this link and follow it to join our Quilt session."\nAnyone with it can act as ${r.name}. Extend it with \`quilt chat-link extend ${r.name} <minutes>\`; once it runs out, make a new one.`)
120
+ return simple('/chat-link', { name, minutes }, (r) => `Chat link for ${r.name}, until ${new Date(r.expiresAt).toLocaleTimeString()}:\n\n ${r.url}\n\nPaste it into ChatGPT, claude.ai or Grok with "Open this link and follow it to join our Quilt codebase."\nAnyone with it can act as ${r.name}. Extend it with \`quilt chat-link extend ${r.name} <minutes>\`; once it runs out, make a new one.`)
121
121
  }
122
122
  case 'invite': return invite()
123
123
  case 'workspace': case 'workspaces': return workspaceCmd()
@@ -148,10 +148,10 @@ async function serve () {
148
148
  process.on('unhandledRejection', (err) => console.error('relay: unexpected rejection, carrying on:', err))
149
149
  const c = srv.config
150
150
  console.log(`quilt relay listening on :${srv.port} (data: ${dataDir})`)
151
- console.log(` sign-in: ${c.passPublicKey ? 'a pass from the accounts API is required; new sessions are limited per account' : 'off (set QUILT_PASS_PUBLIC_KEY to require it)'}`)
152
- console.log(` dashboard: ${c.apiUrl && c.relayApiSecret ? `reports who is in which session to ${c.apiUrl}` : 'off (set QUILT_API_URL and RELAY_API_SECRET to report sessions to the dashboard)'}`)
153
- if (!c.passPublicKey) console.log(` new sessions: ${c.relayKey ? 'need the relay key' : 'open to anyone who can reach this relay (set QUILT_RELAY_KEY to restrict)'}`)
154
- console.log(` limits: ${Math.round(c.maxRoomBytes / 1048576)} MB per session, ${Math.round(c.maxRoomFileBytes / 1048576)} MB of shared files, ${c.maxConnsPerIp} connections per address, idle sessions removed after ${c.roomTtlDays} days`)
151
+ console.log(` sign-in: ${c.passPublicKey ? 'a pass from the accounts API is required; new codebases are limited per account' : 'off (set QUILT_PASS_PUBLIC_KEY to require it)'}`)
152
+ console.log(` dashboard: ${c.apiUrl && c.relayApiSecret ? `reports who is in which codebase to ${c.apiUrl}` : 'off (set QUILT_API_URL and RELAY_API_SECRET to report codebases to the dashboard)'}`)
153
+ if (!c.passPublicKey) console.log(` new codebases: ${c.relayKey ? 'need the relay key' : 'open to anyone who can reach this relay (set QUILT_RELAY_KEY to restrict)'}`)
154
+ console.log(` limits: ${Math.round(c.maxRoomBytes / 1048576)} MB per codebase, ${Math.round(c.maxRoomFileBytes / 1048576)} MB of shared files, ${c.maxConnsPerIp} connections per address, idle codebases removed after ${c.roomTtlDays} days`)
155
155
  console.log(`for development, point Quilt at it with QUILT_SERVER=ws://<this-host>:${srv.port}`)
156
156
  const { registerProcess } = await import('../src/procs.js')
157
157
  registerProcess('relay', { port: srv.port, dataDir })
@@ -248,7 +248,7 @@ async function apiCmd () {
248
248
  )
249
249
  })
250
250
  console.log(`quilt accounts API listening on ${api.url}`)
251
- if (!env.RELAY_API_SECRET) console.log('RELAY_API_SECRET is not set: the relay cannot report sessions for the dashboard')
251
+ if (!env.RELAY_API_SECRET) console.log('RELAY_API_SECRET is not set: the relay cannot report codebases for the dashboard')
252
252
  if (!env.FLY_API_TOKEN || !env.AI_VM_APP || !env.AI_VM_IMAGE) console.log('FLY_API_TOKEN, AI_VM_APP or AI_VM_IMAGE is not set: people cannot connect a cloud AI')
253
253
  if (!env.QUILT_VAULT_SECRET) console.log('QUILT_VAULT_SECRET is not set: secrets are off')
254
254
  if (!env.COMPOSIO_API_KEY) console.log('COMPOSIO_API_KEY is not set: app connections are off')
@@ -256,17 +256,17 @@ async function apiCmd () {
256
256
  if (!env.CLOUDFLARE_TURN_KEY_ID || !env.CLOUDFLARE_TURN_KEY_TOKEN) console.log('CLOUDFLARE_TURN_KEY_ID or CLOUDFLARE_TURN_KEY_TOKEN is not set: calls connect directly only (STUN)')
257
257
  if (!env.CLOUDFLARE_ACCOUNT_ID || !env.CLOUDFLARE_AI_TOKEN) console.log('CLOUDFLARE_ACCOUNT_ID or CLOUDFLARE_AI_TOKEN is not set: call transcripts are off')
258
258
  if (!env.FLUXIONS_API_KEY) console.log("FLUXIONS_API_KEY is not set: agents in calls are read, not heard")
259
- if (!env.MAIL_INBOUND_SECRET) console.log('MAIL_INBOUND_SECRET is not set: sessions receive no email')
260
- if (!env.CLOUDFLARE_ACCOUNT_ID || !env.CLOUDFLARE_EMAIL_TOKEN) console.log('CLOUDFLARE_ACCOUNT_ID or CLOUDFLARE_EMAIL_TOKEN is not set: sessions send no email')
261
- if (!env.CLOUDFLARE_MAIL_ZONE_ID) console.log('CLOUDFLARE_MAIL_ZONE_ID is not set: session addresses get no Email Routing rule, so no mail reaches them')
259
+ if (!env.MAIL_INBOUND_SECRET) console.log('MAIL_INBOUND_SECRET is not set: codebases receive no email')
260
+ if (!env.CLOUDFLARE_ACCOUNT_ID || !env.CLOUDFLARE_EMAIL_TOKEN) console.log('CLOUDFLARE_ACCOUNT_ID or CLOUDFLARE_EMAIL_TOKEN is not set: codebases send no email')
261
+ if (!env.CLOUDFLARE_MAIL_ZONE_ID) console.log('CLOUDFLARE_MAIL_ZONE_ID is not set: codebase addresses get no Email Routing rule, so no mail reaches them')
262
262
  const shutdown = async () => { await api.close(); process.exit(0) }
263
263
  process.on('SIGINT', shutdown); process.on('SIGTERM', shutdown)
264
264
  }
265
265
 
266
266
  async function agentCmd () {
267
267
  const usage = 'usage: quilt agent join <link> --name <name> [--agent-id <id>] [--provider <p>] [--type <t>] [--description <d>] [--here]\n' +
268
- ' quilt agent join <link> --name <name> --session <session invite link> --print-env\n' +
269
- ' quilt agent env --name <name> --session <session invite link> [--key-name <label>]\n' +
268
+ ' quilt agent join <link> --name <name> --session <codebase invite link> --print-env\n' +
269
+ ' quilt agent env --name <name> --session <codebase invite link> [--key-name <label>]\n' +
270
270
  ' quilt agent whoami --name <name>'
271
271
  const [sub, ...rest] = argv
272
272
  let parsed = { values: {}, positionals: [] }
@@ -283,7 +283,7 @@ async function agentCmd () {
283
283
  }
284
284
  try {
285
285
  if (sub === 'join' && values['print-env']) {
286
- if (!values.session) fail('--print-env needs --session <session invite link>: the key says which session the sandbox works in.')
286
+ if (!values.session) fail('--print-env needs --session <codebase invite link>: the key says which codebase the sandbox works in.')
287
287
  if (values.here) fail('--print-env keeps nothing on disk; leave out --here.')
288
288
  const joined = await agentJoinUnsaved({ link: positionals[0], name: values.name, agentId: values['agent-id'], provider: values.provider, type: values.type, description: values.description })
289
289
  console.error(`${joined.rejoined ? 'Joined Quilt again as' : 'Joined Quilt as'} ${values.name} (agent id ${joined.agentId}). Nothing was saved on this computer.`)
@@ -341,16 +341,16 @@ async function join () {
341
341
  } else if (saved.server && !unsupportedRelay(saved.server)) {
342
342
  conn = { server: saved.server, room: saved.room, secret: saved.secret, ...(saved.viewSecret ? { viewSecret: saved.viewSecret } : {}) }
343
343
  } else {
344
- if (saved.server) console.log("This folder's last session ran on your computer's own relay, which Quilt no longer supports. Starting a new session.")
344
+ if (saved.server) console.log("This folder's codebase ran on your computer's own relay, which Quilt no longer supports. Starting a new codebase.")
345
345
  conn = newConn()
346
- console.log('starting a new session')
346
+ console.log('starting a new codebase')
347
347
  }
348
348
 
349
349
  // An agent never takes over a folder a person synced from this computer (they'd lose it
350
350
  // from the app's Recent list and couldn't get back in): it keeps its own copy of the room.
351
351
  if (auth.kind === 'agent' && personsFolder(dir, auth.name)) {
352
352
  const copy = agentCopyFolder(conn.room, auth.name)
353
- console.log(`${dir} is a person's own copy of a session on this computer and stays theirs: syncing ${copy} instead.`)
353
+ console.log(`${dir} is a person's own copy of a codebase on this computer and stays theirs: syncing ${copy} instead.`)
354
354
  dir = copy
355
355
  }
356
356
 
@@ -406,7 +406,7 @@ async function join () {
406
406
 
407
407
  const { registerProcess } = await import('../src/procs.js')
408
408
  registerProcess('sync', { dir })
409
- console.log(`\nInvite your partner by sending them this link:\n\n ${run.invite}\n\nThey paste it into quilt (Join a session), or run \`quilt join <link>\` in an empty (or matching) folder.\n`)
409
+ console.log(`\nInvite your partner by sending them this link:\n\n ${run.invite}\n\nThey paste it into quilt (Join a codebase), or run \`quilt join <link>\` in an empty (or matching) folder.\n`)
410
410
  console.log('Tip: run `quilt setup` once so your AI tools can see each other. Ctrl+C to stop.\n')
411
411
 
412
412
  const stop = async () => {
@@ -568,7 +568,7 @@ async function doSetup () {
568
568
  async function daemonOrFail () {
569
569
  const { findDaemon, call } = await import('../src/control.js')
570
570
  const d = findDaemon()
571
- if (!d) fail('quilt is not running here. Start it with `quilt join` in the project folder.')
571
+ if (!d) fail("quilt is not running here. Start it with `quilt join` in the codebase's folder.")
572
572
  return { d, call }
573
573
  }
574
574
 
@@ -642,7 +642,7 @@ async function say () {
642
642
  async function workspaceCmd () {
643
643
  const { WORKSPACE_USAGE, runWorkspaceCommand } = await import('../src/workspace-cli.js')
644
644
  const [sub, ...rest] = argv
645
- if (!(await import('../src/app-workspaces.js')).appWorkspaces()) fail('Workspaces are turned off in this version of Quilt.')
645
+ if (!(await import('../src/app-workspaces.js')).appWorkspaces()) fail('Projects are turned off in this version of Quilt.')
646
646
  if (!sub || sub === 'help' || sub === '--help' || sub === '-h') return console.log(WORKSPACE_USAGE)
647
647
  const { localWorkspaceAccess } = await import('../src/mcp.js')
648
648
  const { findDaemon } = await import('../src/control.js')
@@ -778,7 +778,7 @@ async function runCmd () {
778
778
  // The session syncing this folder first (its person or agent), else a sandbox's key.
779
779
  const daemon = findDaemon()
780
780
  const source = runSource({ key: daemon ? null : await envKey(), daemon, call })
781
- if (!source) fail('quilt run needs a session: run it in a folder Quilt is syncing (quilt join, or the app), or in a sandbox with QUILT_AGENT_KEY.')
781
+ if (!source) fail('quilt run needs a codebase: run it in a folder Quilt is syncing (quilt join, or the app), or in a sandbox with QUILT_AGENT_KEY.')
782
782
  try { process.exitCode = await runWithSecrets({ command, source }) } catch (err) { fail(err.message) }
783
783
  }
784
784
 
@@ -880,10 +880,10 @@ async function invite () {
880
880
  if (fs.existsSync(f)) {
881
881
  const c = JSON.parse(fs.readFileSync(f, 'utf8'))
882
882
  // Never hand out an invite to a relay Quilt won't connect to (or let anyone else connect to).
883
- if (unsupportedRelay(c.server)) fail("This folder's last session ran on your computer's own relay, which Quilt no longer supports. Run quilt join here to start a new session.")
883
+ if (unsupportedRelay(c.server)) fail("This folder's codebase ran on your computer's own relay, which Quilt no longer supports. Run quilt join here to start a new codebase.")
884
884
  return console.log(encodeInvite({ ...c, server: c.inviteServer && !unsupportedRelay(c.inviteServer) ? c.inviteServer : c.server }))
885
885
  }
886
- if (path.dirname(dir) === dir) fail('no session configured in this folder')
886
+ if (path.dirname(dir) === dir) fail('no codebase configured in this folder')
887
887
  dir = path.dirname(dir)
888
888
  }
889
889
  }
package/desktop/main.js CHANGED
@@ -384,7 +384,7 @@ async function installCli () {
384
384
  const ok = await new Promise((resolve) => execFile('osascript', ['-e', `do shell script "${cmd}" with administrator privileges`], (err) => resolve(!err)))
385
385
  if (!ok) return
386
386
  }
387
- dialog.showMessageBox(win, { message: 'The Quilt command is installed', detail: 'You can now run `quilt` in any terminal. AI tools like Claude Code and Cursor use it to see your session.' })
387
+ dialog.showMessageBox(win, { message: 'The Quilt command is installed', detail: 'You can now run `quilt` in any terminal. AI tools like Claude Code and Cursor use it to see your codebase.' })
388
388
  }
389
389
 
390
390
  // Quit cleanly: stop every session (so edits are flushed) before exiting.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "heyquilt",
3
- "version": "0.3.182",
3
+ "version": "0.3.184",
4
4
  "description": "Real-time, tool-agnostic pair vibe coding: sync a project folder live between collaborators using any AI coding tool.",
5
5
  "author": {
6
6
  "name": "Daniel Carmichael",
package/src/account.js CHANGED
@@ -350,6 +350,21 @@ export async function moveSessionToWorkspace ({ token, id, room, api = apiUrl(),
350
350
  return { session: r.session, added: Array.isArray(r.added) ? r.added : [], peopleNeedAdmin: !!r.peopleNeedAdmin }
351
351
  }
352
352
 
353
+ // A project's channel (routes/workspace-chat.js): its messages, saying something, and marking it read.
354
+ export async function workspaceMessages ({ token, id, after = 0, api = apiUrl(), fetch: fetchImpl = globalThis.fetch }) {
355
+ const r = await call(fetchImpl, api, 'GET', `${ws$(id)}/messages${after ? `?after=${encodeURIComponent(after)}` : ''}`, null, token)
356
+ if (!Array.isArray(r.messages)) throw new Error(BAD_REPLY)
357
+ return r
358
+ }
359
+ export async function sayInWorkspace ({ token, id, text, api = apiUrl(), fetch: fetchImpl = globalThis.fetch }) {
360
+ const r = await call(fetchImpl, api, 'POST', `${ws$(id)}/messages`, { text }, token)
361
+ if (!r.message) throw new Error(BAD_REPLY)
362
+ return r
363
+ }
364
+ export async function readWorkspaceMessages ({ token, id, api = apiUrl(), fetch: fetchImpl = globalThis.fetch }) {
365
+ return call(fetchImpl, api, 'POST', `${ws$(id)}/messages/read`, {}, token)
366
+ }
367
+
353
368
  // Workspace invites: an admin invites a person ({ account } or { email }); they accept in their Quilt.
354
369
  export async function listWorkspaceInvites ({ token, id, api = apiUrl(), fetch: fetchImpl = globalThis.fetch }) {
355
370
  const r = await call(fetchImpl, api, 'GET', `${ws$(id)}/invites`, null, token)
@@ -404,11 +419,11 @@ export async function announceWhenReported (announce, { alive = () => true, log
404
419
  if (!alive()) return null
405
420
  try {
406
421
  const r = await announce()
407
- if (r.notified.length) log(`told ${r.notified.length === 1 ? '1 agent' : `${r.notified.length} agents`} in this workspace that the session started`)
422
+ if (r.notified.length) log(`told ${r.notified.length === 1 ? '1 agent' : `${r.notified.length} agents`} in this project that the codebase started`)
408
423
  return r
409
424
  } catch (err) {
410
425
  if (err.status !== 409 || i >= delays.length) {
411
- log(`could not tell this workspace's agents the session started: ${err.message}`)
426
+ log(`could not tell this project's agents the codebase started: ${err.message}`)
412
427
  return null
413
428
  }
414
429
  }
@@ -7,10 +7,10 @@ export const DEFAULT_ADMIT_BY = 'owner'
7
7
  export const ADMIT_BY_LABELS = Object.freeze({
8
8
  owner: 'Only the owner',
9
9
  editors: 'Anyone who can edit',
10
- members: 'Anyone in the session'
10
+ members: 'Anyone in the codebase'
11
11
  })
12
12
 
13
- export const BAD_ADMIT_BY = 'Who can let people in must be only the owner, anyone who can edit, or anyone in the session.'
13
+ export const BAD_ADMIT_BY = 'Who can let people in must be only the owner, anyone who can edit, or anyone in the codebase.'
14
14
 
15
15
  /** A known admit-by value, or null. */
16
16
  export function cleanAdmitBy (raw) {
package/src/agent-join.js CHANGED
@@ -138,8 +138,8 @@ export async function agentJoin ({ link, name, agentId, provider = DEFAULTS.prov
138
138
  const inProject = !dir && path.dirname(path.dirname(file)) !== quiltHome()
139
139
  // Keys in a project folder: git leaves them out, whatever the project's .gitignore says.
140
140
  if (inProject) fs.writeFileSync(path.join(path.dirname(file), '.gitignore'), '*\n')
141
- log(`${r.body.rejoined ? 'Joined Quilt again as' : 'Joined Quilt as'} ${name} (agent id ${saved.agentId}: public, keep it to come back as yourself with a new invite). Keys saved in ${file}${inProject ? ": this project's own .quilt, which Quilt never syncs and git ignores. quilt finds them from anywhere in this folder" : ''}`)
142
- log(`Next: in the project folder, start \`quilt join <session invite link> --agent ${name}\` and keep it running. Then step 2 of 3: choose how Quilt wakes you when you are mentioned, with \`quilt wake\` (it lists the ways that fit you).`)
141
+ log(`${r.body.rejoined ? 'Joined Quilt again as' : 'Joined Quilt as'} ${name} (agent id ${saved.agentId}: public, keep it to come back as yourself with a new invite). Keys saved in ${file}${inProject ? ": this folder's own .quilt, which Quilt never syncs and git ignores. quilt finds them from anywhere in this folder" : ''}`)
142
+ log(`Next: in the codebase's folder, start \`quilt join <codebase invite link> --agent ${name}\` and keep it running. Then step 2 of 3: choose how Quilt wakes you when you are mentioned, with \`quilt wake\` (it lists the ways that fit you).`)
143
143
  return saved
144
144
  }
145
145
 
@@ -161,7 +161,7 @@ export async function agentJoinUnsaved ({ link, name, agentId, provider = DEFAUL
161
161
  * (its invite link): a new app key the agent's person sees and can revoke on heyquilt.com.
162
162
  */
163
163
  export async function makeEnvKey ({ api, accessKey, session, keyName, fetch: fetchImpl = globalThis.fetch }) {
164
- if (!session) throw new Error('--session <session invite link> is needed: the key says which session the sandbox works in.')
164
+ if (!session) throw new Error('--session <codebase invite link> is needed: the key says which codebase the sandbox works in.')
165
165
  const r = await send(fetchImpl, api, 'POST', '/v1/agents/me/keys', { session, ...(keyName ? { name: keyName } : {}) }, accessKey)
166
166
  if (!r.ok) throw Object.assign(new Error(r.body?.error || `Couldn't make the key (${r.status}).`), { status: r.status })
167
167
  // The key names the API's public address; one reached at another address (self-hosted, a test) keeps that one.
@@ -17,14 +17,14 @@ export const MAX_VERIFIED = 1000
17
17
  */
18
18
  export const TASK_WORKFLOW =
19
19
  'When you pick up a ticket (move it to In progress, or start work on one assigned to you): ' +
20
- 'first grok the codebase and workspace (explore the relevant files, how they fit together, and quilt_history for recent changes to them) ' +
21
- 'and read the project\'s rules and design system with quilt_project_rules (the same whatever tool you run in), ' +
20
+ 'first grok the codebase (explore the relevant files, how they fit together, and quilt_history for recent changes to them) ' +
21
+ 'and read the codebase\'s rules and design system with quilt_project_rules (the same whatever tool you run in), ' +
22
22
  'then implement a plan, then build the change, then test it (confirm the tests you touch pass) ' +
23
- 'and run the project\'s own checks under "Verifying a change" in AGENTS.md. ' +
23
+ 'and run the codebase\'s own checks under "Verifying a change" in AGENTS.md. ' +
24
24
  'When finished, move the ticket to QA (not straight to Done) with `qaNotes`: describe the changes you made and how you self-validated them. ' +
25
25
  'Keep qaNotes, verified and task comments brief: a few short sentences, no logs or play-by-play. ' +
26
26
  'Moving to Done still requires `verified` (what you ran and what you saw). Unit tests passing is not enough when the app itself was not exercised. ' +
27
- 'Get the task\'s files into git before you move it to QA: commit only the files you changed, and push. A ticket can have a branch of its own (quilt/<ticket>), where everyone who has the ticket open works together. A person opens one from the board when they want it, and their folder stays where it is otherwise: taking a ticket never moves a person\'s folder. An agent that joined as its own member is moved onto the ticket\'s branch when it takes the ticket: it pushes that branch and opens the pull request itself, its ticket moves to QA only once the branch is committed and pushed, and when the ticket is Done its folder goes back to the main branch. Quilt does not commit, push, open pull requests or merge them for anyone. Without a folder you cannot commit: say in `qaNotes` which files need committing. Work only in the session has not shipped.'
27
+ 'Get the task\'s files into git before you move it to QA: commit only the files you changed, and push. A ticket can have a branch of its own (quilt/<ticket>), where everyone who has the ticket open works together. A person opens one from the board when they want it, and their folder stays where it is otherwise: taking a ticket never moves a person\'s folder. An agent that joined as its own member is moved onto the ticket\'s branch when it takes the ticket: it pushes that branch and opens the pull request itself, its ticket moves to QA only once the branch is committed and pushed, and when the ticket is Done its folder goes back to the main branch. Quilt does not commit, push, open pull requests or merge them for anyone. Without a folder you cannot commit: say in `qaNotes` which files need committing. Work that is only in the live codebase has not shipped.'
28
28
 
29
29
  /**
30
30
  * What an AI is told after taking a ticket about the branch its folder is on (Session.openTask's
@@ -41,24 +41,24 @@ export function taskBranchNote (b) {
41
41
  /** Markdown bullets for AGENTS.md / CLAUDE.md (same steps as TASK_WORKFLOW). */
42
42
  export const TASK_WORKFLOW_MD =
43
43
  '- When you pick up a ticket (move it to In progress, or start work on one assigned to you):\n' +
44
- ' 1. **Grok** the codebase and workspace - explore the relevant files, how they fit together, and `quilt_history` for recent changes to them; read the project\'s rules and design system with `quilt_project_rules`.\n' +
44
+ ' 1. **Grok** the codebase - explore the relevant files, how they fit together, and `quilt_history` for recent changes to them; read the codebase\'s rules and design system with `quilt_project_rules`.\n' +
45
45
  ' 2. **Plan** the change.\n' +
46
46
  ' 3. **Build** it.\n' +
47
- ' 4. **Test** it: confirm the tests you touch pass, then run the project\'s own checks under "Verifying a change" below.\n' +
47
+ ' 4. **Test** it: confirm the tests you touch pass, then run the codebase\'s own checks under "Verifying a change" below.\n' +
48
48
  ' 5. **QA**: move to `qa` (not straight to Done) with `qaNotes` describing the changes and how you self-validated them.\n' +
49
49
  ' Keep `qaNotes`, `verified` and task comments brief: a few short sentences, no logs or play-by-play.\n' +
50
50
  ' 6. **Done** (after QA): `quilt_move_task` to `done` needs `verified`, what you ran and what you saw. Unit tests passing is not enough when the app itself was not exercised.\n' +
51
- ' 7. **Commit and push** before QA: only the files you changed, with a message. A ticket can have a branch of its own (quilt/<ticket>), where everyone who has the ticket open works together. A person opens one from the board when they want it, and their folder stays where it is otherwise: taking a ticket never moves a person\'s folder. An agent that joined as its own member is moved onto the ticket\'s branch when it takes the ticket: it pushes that branch and opens the pull request itself, its ticket moves to QA only once the branch is committed and pushed, and when the ticket is Done its folder goes back to the main branch. Quilt does not commit, push or merge for anyone. Without a folder you cannot commit: say in `qaNotes` which files need committing. Work only in the session has not shipped.'
51
+ ' 7. **Commit and push** before QA: only the files you changed, with a message. A ticket can have a branch of its own (quilt/<ticket>), where everyone who has the ticket open works together. A person opens one from the board when they want it, and their folder stays where it is otherwise: taking a ticket never moves a person\'s folder. An agent that joined as its own member is moved onto the ticket\'s branch when it takes the ticket: it pushes that branch and opens the pull request itself, its ticket moves to QA only once the branch is committed and pushed, and when the ticket is Done its folder goes back to the main branch. Quilt does not commit, push or merge for anyone. Without a folder you cannot commit: say in `qaNotes` which files need committing. Work that is only in the live codebase has not shipped.'
52
52
 
53
53
  /** Scaffolded into AGENTS.md by `quilt setup` when the project has no checklist yet. Owners edit it in place. */
54
54
  export const CHECKLIST_SCAFFOLD = `${CHECKLIST_HEADING}
55
55
 
56
56
  Every agent reads this when it picks up a ticket and must run these checks before moving
57
- it to QA. Replace the examples with what proves a change works in this project.
57
+ it to QA. Replace the examples with what proves a change works in this codebase.
58
58
 
59
59
  - Run the test suite and make sure it passes.
60
60
  - Start the app and exercise the part you changed; confirm it loads and behaves.
61
- - Note anything this project needs that tests do not catch (allowlists, registrations, config).
61
+ - Note anything this codebase needs that tests do not catch (allowlists, registrations, config).
62
62
  `
63
63
 
64
64
  const PLACEHOLDER = /Replace the examples with what proves a change works/
@@ -81,12 +81,12 @@ export function pickChecklist (...texts) {
81
81
 
82
82
  function checklistBlock (checklist) {
83
83
  if (!checklist) {
84
- return 'This project has no "Verifying a change" section in AGENTS.md yet. Run its tests and exercise the app yourself, ' +
84
+ return 'This codebase has no "Verifying a change" section in AGENTS.md yet. Run its tests and exercise the app yourself, ' +
85
85
  'and ask the owner what proves a change works here.'
86
86
  }
87
87
  const head = PLACEHOLDER.test(checklist)
88
- ? 'This project\'s checks (AGENTS.md, still the template: ask the owner what proves a change works here):'
89
- : 'This project\'s checks (from AGENTS.md):'
88
+ ? 'This codebase\'s checks (AGENTS.md, still the template: ask the owner what proves a change works here):'
89
+ : 'This codebase\'s checks (from AGENTS.md):'
90
90
  return `${head}\n${checklist}`
91
91
  }
92
92
 
@@ -114,7 +114,7 @@ export function pickupBrief ({ task, history = [], checklist = '', me = '', now
114
114
  lines.push(files.length ? `Files: ${files.join(', ')}` : 'Files: none listed. Add them with quilt_assign_task once you know which you will touch.')
115
115
  const recent = history.slice(-8)
116
116
  if (recent.length) {
117
- lines.push('', files.length ? 'Recent changes to these files (oldest first):' : 'Recent changes in the project (oldest first):')
117
+ lines.push('', files.length ? 'Recent changes to these files (oldest first):' : 'Recent changes in the codebase (oldest first):')
118
118
  for (const e of recent) {
119
119
  const who = e.by === me ? 'you' : e.by
120
120
  const forTask = e.task?.title ? ` for "${e.task.title}"` : ''
@@ -148,7 +148,7 @@ export function verifiedEnough (verified) {
148
148
  export function doneRefusal ({ task, checklist = '' } = {}) {
149
149
  const title = task?.title ? `"${task.title}"` : 'this ticket'
150
150
  return `Not moved: ${title} needs \`verified\` before it can be Done. ` +
151
- 'Say what you ran and what you saw (for example: "npm test passed, 612 tests; launched the app and the session page rendered with the new column"). ' +
151
+ 'Say what you ran and what you saw (for example: "npm test passed, 612 tests; launched the app and the codebase page rendered with the new column"). ' +
152
152
  'Vague words like "tested" are not enough.\n\n' + checklistBlock(checklist)
153
153
  }
154
154
 
package/src/ai-vm.js CHANGED
@@ -572,7 +572,7 @@ export class AiVm {
572
572
  if (now - (this.rejoinedAt.get(room) || 0) < this.rejoinMs) continue
573
573
  this.rejoinedAt.set(room, now)
574
574
  this.downSince.delete(room)
575
- this.log(`[${room}] ${r ? 'the relay connection stayed down' : 'the session had stopped'}: joining it again`)
575
+ this.log(`[${room}] ${r ? 'the relay connection stayed down' : 'the codebase had stopped'}: joining it again`)
576
576
  if (r) { this.runs.delete(room); await r.run.stop().catch(() => {}) }
577
577
  try { await this.follow(link); again.push(room) } catch (err) { this.log(`could not rejoin ${room}: ${err.message}`) }
578
578
  }
@@ -20,9 +20,9 @@ export function cleanPlacement (body) {
20
20
  let workspaceIds = []
21
21
  if (b.reach === 'workspaces') {
22
22
  const raw = b.workspaceIds ?? []
23
- if (!Array.isArray(raw) || raw.some((id) => typeof id !== 'string' || !UUID.test(id))) throw new HttpError(400, 'workspaceIds must be a list of workspace ids.')
23
+ if (!Array.isArray(raw) || raw.some((id) => typeof id !== 'string' || !UUID.test(id))) throw new HttpError(400, 'workspaceIds must be a list of project ids.')
24
24
  workspaceIds = [...new Set(raw.map((id) => id.toLowerCase()))]
25
- if (workspaceIds.length > MAX_WORKSPACES) throw new HttpError(400, `A placement can list at most ${MAX_WORKSPACES} workspaces.`)
25
+ if (workspaceIds.length > MAX_WORKSPACES) throw new HttpError(400, `A placement can list at most ${MAX_WORKSPACES} projects.`)
26
26
  }
27
27
  let scopes
28
28
  try { scopes = cleanFolders(b.scopes ?? []) } catch (e) { throw new HttpError(400, e.message) }
package/src/api/audit.js CHANGED
@@ -13,7 +13,7 @@ export const REASON_TEXT = {
13
13
  disconnected: 'Connection dropped',
14
14
  removed: 'Removed by the owner',
15
15
  pass_expired: 'Sign-in ran out',
16
- session_ended: 'Session ended',
16
+ session_ended: 'Codebase ended',
17
17
  relay_restart: 'Relay restarted',
18
18
  idle: 'Done working (went quiet)',
19
19
  replaced: 'Reconnected',
@@ -18,7 +18,7 @@ export function cleanFilePath (value) {
18
18
  if (/[\\\u0000-\u001f\u007f]/.test(str)) throw new HttpError(400, 'That path has characters a file name cannot have.')
19
19
  const raw = stripInvisible(str).join('').trim()
20
20
  const parts = raw.split('/').map((p) => p.trim()).filter((p) => p !== '')
21
- if (!parts.length) throw new HttpError(400, 'Give the file a path.')
21
+ if (!parts.length) throw new HttpError(400, 'Give the artifact a path.')
22
22
  if (parts.some((p) => p === '.' || p === '..')) throw new HttpError(400, 'A path cannot contain . or .. parts.')
23
23
  const out = parts.join('/')
24
24
  if (out.length > MAX_PATH) throw new HttpError(400, `Keep the path under ${MAX_PATH} characters.`)
@@ -93,7 +93,7 @@ export class SupabaseStore {
93
93
  }
94
94
 
95
95
  export function makeFileStore (cfg, dir) {
96
- if (!cfg.storageUrl !== !cfg.storageKey) throw new Error('Workspace file storage is half set up: set both QUILT_STORAGE_URL and QUILT_STORAGE_KEY to use Supabase Storage, or neither to keep files on this server\'s disk.')
96
+ if (!cfg.storageUrl !== !cfg.storageKey) throw new Error('Artifact storage is half set up: set both QUILT_STORAGE_URL and QUILT_STORAGE_KEY to use Supabase Storage, or neither to keep artifacts on this server\'s disk.')
97
97
  if (cfg.storageUrl && cfg.storageKey) return new SupabaseStore({ url: cfg.storageUrl, key: cfg.storageKey, bucket: cfg.storageBucket || 'workspace-files' })
98
98
  return new DiskStore(dir)
99
99
  }
@@ -22,9 +22,9 @@ export function sessionInviteEmail ({ inviterName, sessionName, link, site }) {
22
22
  return {
23
23
  subject: `${who} invited you to ${sessionName} on Quilt`,
24
24
  text: [
25
- `${who} invited you to ${sessionName}, a live Quilt session where people and their AIs build one project together.`,
25
+ `${who} invited you to ${sessionName}, a live Quilt codebase that people and their AIs build together.`,
26
26
  '',
27
- `Join the session: ${link}`,
27
+ `Join the codebase: ${link}`,
28
28
  '',
29
29
  'This invite expires in 7 days.',
30
30
  '',
@@ -38,9 +38,9 @@ export function sessionInviteEmail ({ inviterName, sessionName, link, site }) {
38
38
  export function workspaceInviteEmail ({ inviterName, workspaceName, access, site }) {
39
39
  const who = inviterName || 'Someone'
40
40
  return {
41
- subject: `${who} invited you to the ${workspaceName} workspace on Quilt`,
41
+ subject: `${who} invited you to the ${workspaceName} project on Quilt`,
42
42
  text: [
43
- `${who} invited you to ${workspaceName}, a Quilt workspace: its sessions, files and people in one place. You would ${access === 'view' ? 'be able to view it' : 'be able to edit it'}.`,
43
+ `${who} invited you to ${workspaceName}, a Quilt project: its codebases, artifacts and people in one place. You would ${access === 'view' ? 'be able to view it' : 'be able to edit it'}.`,
44
44
  '',
45
45
  `Accept it in the Quilt app, or at ${site}/dashboard`,
46
46
  '',
@@ -20,13 +20,13 @@ export function joinInstructions ({ link, apiUrl, status, expiresAt }) {
20
20
  '',
21
21
  STATUS[status](expiresAt),
22
22
  '',
23
- 'Quilt lets people and AI agents work in the same project folder in real time. A person invited you to join as their agent. Three steps: register and connect (below, by the way that fits you), choose how Quilt wakes you, then work.',
23
+ 'Quilt lets people and AI agents work in the same codebase in real time. A person invited you to join as their agent. Three steps: register and connect (below, by the way that fits you), choose how Quilt wakes you, then work.',
24
24
  '',
25
25
  CLI_FIRST,
26
26
  '',
27
27
  '## Step 1, if you can run commands (anywhere): use the Quilt CLI',
28
28
  '',
29
- `${INSTALL_CLI} Then run \`quilt agent join ${link} --name <your name>\` and, in the project folder, \`quilt join <session invite link> --agent <your name>\`. If you joined before, add \`--agent-id <your agent id>\` to come back as yourself (on the same computer, with the same name, Quilt sends it for you). ${KEEP_JOIN_RUNNING}`,
29
+ `${INSTALL_CLI} Then run \`quilt agent join ${link} --name <your name>\` and, in the codebase's folder, \`quilt join <codebase invite link> --agent <your name>\`. If you joined before, add \`--agent-id <your agent id>\` to come back as yourself (on the same computer, with the same name, Quilt sends it for you). ${KEEP_JOIN_RUNNING}`,
30
30
  '',
31
31
  '## Step 1, in a sandbox wiped after every turn: one key and `npx heyquilt sync`',
32
32
  '',
@@ -57,7 +57,7 @@ export function joinInstructions ({ link, apiUrl, status, expiresAt }) {
57
57
  '',
58
58
  '## Step 2: choose how Quilt wakes you',
59
59
  '',
60
- `${WAKE_STEP} With the CLI: \`quilt wake\` in the project folder once \`quilt join\` runs. Over HTTP: quilt_wake once you are connected to the MCP, or PUT ${apiUrl}/v1/agents/me/wake with your access key.`,
60
+ `${WAKE_STEP} With the CLI: \`quilt wake\` in the codebase's folder once \`quilt join\` runs. Over HTTP: quilt_wake once you are connected to the MCP, or PUT ${apiUrl}/v1/agents/me/wake with your access key.`,
61
61
  '',
62
62
  'On a computer:',
63
63
  describeWays(waysFor({ cli: true })),
@@ -82,9 +82,9 @@ export function joinNext ({ name, agentId, apiUrl, hasKey, rejoined = false }) {
82
82
  return [
83
83
  rejoined ? `Welcome back: you joined Quilt again as ${name}, the same agent as before, with new keys.` : `You joined Quilt as ${name}. Keep your keys secret.`,
84
84
  agentId ? `Your agent id is ${agentId}. Save it now where you will still have it later (your memory, notes or config), next to your name: it is public, not a secret. If you are ever sent a new agent invite, send it as agentId when you join, so you come back as yourself instead of as a new agent.` : '',
85
- hasKey ? '' : `You joined over HTTP. That is only for an agent with no computer. If you can run shell commands anywhere, stop and switch to the Quilt CLI now: ask your person for a new agent invite and run \`quilt agent join <invite link> --name ${name}${agentId ? ` --agent-id ${agentId}` : ''}\` (so you stay the same agent), then \`quilt join <session invite link> --agent ${name}\`. ${INSTALL_CLI} In a sandbox wiped after every turn, use a QUILT_AGENT_KEY instead: POST ${apiUrl}/v1/agents/me/keys with {"session": "<session invite link>"} and your access key gives you one (as envKey); ask your person to put it in the sandbox's environment or secrets settings as QUILT_AGENT_KEY, then run \`npx heyquilt sync\` at the start and end of every turn.`,
85
+ hasKey ? '' : `You joined over HTTP. That is only for an agent with no computer. If you can run shell commands anywhere, stop and switch to the Quilt CLI now: ask your person for a new agent invite and run \`quilt agent join <invite link> --name ${name}${agentId ? ` --agent-id ${agentId}` : ''}\` (so you stay the same agent), then \`quilt join <codebase invite link> --agent ${name}\`. ${INSTALL_CLI} In a sandbox wiped after every turn, use a QUILT_AGENT_KEY instead: POST ${apiUrl}/v1/agents/me/keys with {"session": "<codebase invite link>"} and your access key gives you one (as envKey); ask your person to put it in the sandbox's environment or secrets settings as QUILT_AGENT_KEY, then run \`npx heyquilt sync\` at the start and end of every turn.`,
86
86
  `${WAKE_STEP} Over HTTP: quilt_wake once you are connected (below), or PUT ${apiUrl}/v1/agents/me/wake with your access key now. The ways that fit you:\n${describeWays(waysFor({ cli: hasKey }))}\n`,
87
- `To work in a session: connect to the MCP server at ${mcp} (Streamable HTTP) with the header "Authorization: Bearer <accessKey>", then call quilt_join_session with the invite link the person gives you (https://join.heyquilt.com/<room>#<secret>). The session owner lets you in; quilt_session_info tells you when. Then quilt_status, quilt_read_file, quilt_write_file, quilt_message and the other tools work on the live project.`,
87
+ `To work in a codebase: connect to the MCP server at ${mcp} (Streamable HTTP) with the header "Authorization: Bearer <accessKey>", then call quilt_join_session with the invite link the person gives you (https://join.heyquilt.com/<room>#<secret>). The codebase's owner lets you in; quilt_session_info tells you when. Then quilt_status, quilt_read_file, quilt_write_file, quilt_message and the other tools work on the live codebase.`,
88
88
  'Over HTTP you show as online for 30 minutes after each tool call; while idle, people reach you in the way you chose with quilt_wake.',
89
89
  `Your access key lasts 1 hour. For a new pair, POST ${apiUrl}/v1/agents/token with {"refreshKey": "<refreshKey>"} (each refresh key works once: keep your keys in one place and save each new pair straight away). If Quilt says your keys were revoked, POST ${apiUrl}/v1/agents/resume with {"resumeKey": "<resumeKey>"} for a new pair. Check who you are with GET ${apiUrl}/v1/agents/me.`,
90
90
  hasKey ? 'On a computer running Quilt you can also sync the files to disk: `quilt join <invite link> --agent <your name>`.' : ''
@@ -62,6 +62,7 @@ export function createMemoryStore ({ now = Date.now } = {}) {
62
62
  const secretTickets = new Map(); const secretRuns = new Map(); const secretAsks = new Map(); const secretUses = []
63
63
  // App connections (20261112000000_app_connections.sql).
64
64
  const appConnections = new Map(); const appCalls = new Map()
65
+ const workspaceMessages = new Map(); const workspaceReads = new Map() // a project's channel, and each account's place in it
65
66
  const scopeKey = (scopeType, scopeId) => `${scopeType}\n${scopeId}`
66
67
  // A secret as the API's routes see it: never its sealed value (secretSealed reads that, for the vault).
67
68
  const secretMeta = (r) => { if (!r) return null; const { sealedValue, ...rest } = copy(r); return rest }
@@ -989,6 +990,8 @@ export function createMemoryStore ({ now = Date.now } = {}) {
989
990
  for (const s of relaySessions.values()) if (s.workspaceId === id) s.workspaceId = null
990
991
  for (const [k, m] of workspaceMembers) if (m.workspaceId === id) workspaceMembers.delete(k)
991
992
  for (const [k, i] of workspaceInvites) if (i.workspaceId === id) workspaceInvites.delete(k)
993
+ for (const [k, m] of workspaceMessages) if (m.workspaceId === id) workspaceMessages.delete(k)
994
+ for (const k of [...workspaceReads.keys()]) if (k.startsWith(`${id}|`)) workspaceReads.delete(k)
992
995
  for (const [k, f] of workspaceFiles) {
993
996
  if (f.workspaceId !== id) continue
994
997
  for (const vk of [...workspaceFileVersions.keys()]) if (vk.startsWith(`${f.id}\n`)) workspaceFileVersions.delete(vk)
@@ -1296,10 +1299,28 @@ export function createMemoryStore ({ now = Date.now } = {}) {
1296
1299
  return secretUses.filter((u) => secretIds.includes(u.secretId)).sort((a, b) => b.at - a.at).slice(0, limit).map(copy)
1297
1300
  },
1298
1301
 
1302
+ // A project's channel (20261122010000_project_channel.sql): its messages, and what each account has read.
1303
+ async addWorkspaceMessage ({ workspaceId, account, name = '', text }) {
1304
+ if (!workspaces.has(workspaceId)) throw fkViolation('workspace', 'does not exist')
1305
+ // Two messages never share a time: the order they were written in is the order they are read in.
1306
+ const last = Math.max(0, ...all(workspaceMessages, (m) => m.workspaceId === workspaceId).map((m) => m.createdAt))
1307
+ const row = { id: uuid(), workspaceId, account, name, text, createdAt: Math.max(now(), last + 1) }
1308
+ workspaceMessages.set(row.id, row); return copy(row)
1309
+ },
1310
+ async listWorkspaceMessages (workspaceId, { after = 0, limit = 100 } = {}) {
1311
+ const mine = all(workspaceMessages, (m) => m.workspaceId === workspaceId && m.createdAt > after).sort((a, b) => a.createdAt - b.createdAt)
1312
+ return (after ? mine.slice(0, limit) : mine.slice(-limit)).map(copy)
1313
+ },
1314
+ async countWorkspaceMessages (workspaceId, { after = 0, notBy = '' } = {}) {
1315
+ return all(workspaceMessages, (m) => m.workspaceId === workspaceId && m.createdAt > after && m.account !== notBy).length
1316
+ },
1317
+ async workspaceReadAt (workspaceId, account) { return workspaceReads.get(`${workspaceId}|${account}`) || 0 },
1318
+ async setWorkspaceReadAt (workspaceId, account, at) { workspaceReads.set(`${workspaceId}|${account}`, Math.max(at, workspaceReads.get(`${workspaceId}|${account}`) || 0)) },
1319
+
1299
1320
  // App connections (20261112000000_app_connections.sql): Composio holds the tokens.
1300
1321
  async addAppConnection (c) {
1301
1322
  if (all(appConnections, (r) => r.composioId === c.composioId).length) throw duplicate('connection')
1302
- const row = { id: uuid(), appName: '', logo: '', status: 'pending', who: 'all', ...copy(c), createdAt: now(), updatedAt: now() }
1323
+ const row = { id: uuid(), appName: '', logo: '', status: 'pending', who: 'all', agents: [], ...copy(c), createdAt: now(), updatedAt: now() }
1303
1324
  appConnections.set(row.id, row)
1304
1325
  return copy(row)
1305
1326
  },
package/src/api/notify.js CHANGED
@@ -31,7 +31,7 @@ const hours = (ms) => {
31
31
  if (m < 60) return `${m}m`
32
32
  return `${Math.floor(m / 60)}h${m % 60 ? ` ${m % 60}m` : ''}`
33
33
  }
34
- const line = (n, s) => `- ${s.name || 'Untitled session'}: ${n.by} · "${n.text}"`
34
+ const line = (n, s) => `- ${s.name || 'Untitled codebase'}: ${n.by} · "${n.text}"`
35
35
  const footer = (site) => ['', `Open your dashboard: ${site}/dashboard`, `Change which emails you get: ${site}/settings/notifications`]
36
36
 
37
37
  /**
@@ -61,8 +61,8 @@ export function planNotices ({ notify, sent, now, overview = null, t, site }) {
61
61
  if (due.length) {
62
62
  next.joinsAt = Math.max(...due.map(({ n }) => n.at))
63
63
  mails.push({
64
- subject: due.length === 1 ? `${due[0].n.by} asks to join ${due[0].s.name || 'your session'}` : `${due.length} are asking to join your sessions`,
65
- text: ['Waiting for you to let them in:', '', ...due.map(({ n, s }) => `- ${n.by}${n.agent ? ' (an agent)' : ''} in ${s.name || 'Untitled session'}`), '', 'Let them in, or not, from the session in the Quilt app.', ...footer(site)].join('\n')
64
+ subject: due.length === 1 ? `${due[0].n.by} asks to join ${due[0].s.name || 'your codebase'}` : `${due.length} are asking to join your codebases`,
65
+ text: ['Waiting for you to let them in:', '', ...due.map(({ n, s }) => `- ${n.by}${n.agent ? ' (an agent)' : ''} in ${s.name || 'Untitled codebase'}`), '', 'Let them in, or not, from the codebase in the Quilt app.', ...footer(site)].join('\n')
66
66
  })
67
67
  }
68
68
  }
@@ -72,7 +72,7 @@ export function planNotices ({ notify, sent, now, overview = null, t, site }) {
72
72
  next.tasksAt = t
73
73
  mails.push({
74
74
  subject: `${due.length} ${due.length === 1 ? 'task is' : 'tasks are'} waiting for you in Quilt`,
75
- text: ['Tasks for you, still to do:', '', ...due.map(({ n, s }) => `- ${n.text} (${s.name || 'Untitled session'}, from ${n.by})`), ...footer(site)].join('\n')
75
+ text: ['Tasks for you, still to do:', '', ...due.map(({ n, s }) => `- ${n.text} (${s.name || 'Untitled codebase'}, from ${n.by})`), ...footer(site)].join('\n')
76
76
  })
77
77
  }
78
78
  }
@@ -83,12 +83,12 @@ export function planNotices ({ notify, sent, now, overview = null, t, site }) {
83
83
  if (week.length) {
84
84
  const top = (overview.totals?.topCollaborators || []).slice(0, 3).map((c) => c.name)
85
85
  mails.push({
86
- subject: `Your week in Quilt: ${week.length} ${week.length === 1 ? 'session' : 'sessions'}${together ? `, ${hours(together)} together` : ''}`,
86
+ subject: `Your week in Quilt: ${week.length} ${week.length === 1 ? 'codebase' : 'codebases'}${together ? `, ${hours(together)} together` : ''}`,
87
87
  text: [
88
- `This week you worked in ${week.length} ${week.length === 1 ? 'session' : 'sessions'}${together ? ` and spent ${hours(together)} working with others` : ''}.`,
88
+ `This week you worked in ${week.length} ${week.length === 1 ? 'codebase' : 'codebases'}${together ? ` and spent ${hours(together)} working with others` : ''}.`,
89
89
  ...(top.length ? [`You worked most with ${top.join(', ')}.`] : []),
90
90
  '',
91
- ...week.slice(0, 10).map((s) => `- ${s.name || 'Untitled session'}: ${hours(s.myTotalMs)} for you`),
91
+ ...week.slice(0, 10).map((s) => `- ${s.name || 'Untitled codebase'}: ${hours(s.myTotalMs)} for you`),
92
92
  ...footer(site)
93
93
  ].join('\n')
94
94
  })