heyquilt 0.3.181 → 0.3.183
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.
- package/README.md +101 -97
- package/RELEASES.md +17 -0
- package/bin/quilt.js +32 -32
- package/desktop/main.js +1 -1
- package/package.json +1 -1
- package/src/account.js +2 -2
- package/src/admit-policy.js +2 -2
- package/src/agent-join.js +3 -3
- package/src/agent-task-workflow.js +14 -14
- package/src/ai-vm.js +1 -1
- package/src/api/agent-placement.js +2 -2
- package/src/api/audit.js +1 -1
- package/src/api/file-paths.js +1 -1
- package/src/api/file-store.js +1 -1
- package/src/api/invite-email.js +4 -4
- package/src/api/join-text.js +5 -5
- package/src/api/notify.js +7 -7
- package/src/api/permissions.js +1 -1
- package/src/api/routes/agent-wake.js +1 -1
- package/src/api/routes/agents.js +2 -2
- package/src/api/routes/ai-vm.js +5 -5
- package/src/api/routes/connections.js +13 -13
- package/src/api/routes/grants.js +2 -2
- package/src/api/routes/mail.js +10 -10
- package/src/api/routes/relay.js +1 -1
- package/src/api/routes/secrets.js +11 -11
- package/src/api/routes/session-invites.js +5 -5
- package/src/api/routes/sessions.js +3 -3
- package/src/api/routes/workspace-agents.js +14 -14
- package/src/api/routes/workspace-files.js +12 -12
- package/src/api/routes/workspace-invites.js +5 -5
- package/src/api/routes/workspaces.js +11 -11
- package/src/api/secrets-access.js +1 -1
- package/src/api/server.js +3 -3
- package/src/api/team-access.js +1 -1
- package/src/api/workspace-access.js +1 -1
- package/src/api/workspace-reach.js +3 -3
- package/src/app-tools.js +10 -10
- package/src/autowork.js +4 -4
- package/src/branch-view.js +1 -1
- package/src/catchup.js +5 -5
- package/src/chat-links.js +18 -18
- package/src/connection.js +11 -11
- package/src/control.js +5 -5
- package/src/conversation.js +1 -1
- package/src/doctor.js +2 -2
- package/src/duties.js +1 -1
- package/src/fsutil.js +1 -1
- package/src/gitstate.js +117 -1
- package/src/held.js +4 -4
- package/src/hooks.js +3 -3
- package/src/hosted-client.js +2 -2
- package/src/identity.js +1 -1
- package/src/inbox.js +1 -1
- package/src/key-cli.js +1 -1
- package/src/mail-tools.js +11 -11
- package/src/mcp-proxy.js +1 -1
- package/src/mcp.js +59 -59
- package/src/new-session.js +112 -0
- package/src/project-rules.js +2 -2
- package/src/relay-ask.js +2 -2
- package/src/relay-cluster.js +3 -3
- package/src/relay-live-write.js +3 -3
- package/src/relay-mcp.js +56 -56
- package/src/relay-prune.js +1 -1
- package/src/relay-turn-sync.js +1 -1
- package/src/repo-ref.js +54 -0
- package/src/secret-import.js +1 -1
- package/src/secret-names.js +6 -6
- package/src/secret-run.js +3 -3
- package/src/server.js +41 -41
- package/src/session-access.js +3 -3
- package/src/session-name.js +1 -1
- package/src/session.js +118 -52
- package/src/setup.js +7 -7
- package/src/status.js +2 -2
- package/src/tasks.js +1 -1
- package/src/turn-sync.js +4 -4
- package/src/ui/account-sessions.js +2 -2
- package/src/ui/agent-env-key.js +1 -1
- package/src/ui/agent-guide.js +35 -35
- package/src/ui/agent-kinds.js +8 -8
- package/src/ui/agent-place.js +16 -16
- package/src/ui/agents-table.js +6 -6
- package/src/ui/app.css +357 -0
- package/src/ui/app.js +29 -14
- package/src/ui/board.js +2 -2
- package/src/ui/catchup.js +5 -5
- package/src/ui/changes-seen.js +2 -2
- package/src/ui/changes.js +3 -3
- package/src/ui/cloud-ai.js +12 -12
- package/src/ui/common.js +1 -1
- package/src/ui/connections.js +1 -1
- package/src/ui/diffview.js +2 -2
- package/src/ui/feed.js +1 -1
- package/src/ui/feedback.js +4 -4
- package/src/ui/files.js +120 -14
- package/src/ui/fileview.js +3 -3
- package/src/ui/git-rule.js +3 -3
- package/src/ui/home.js +95 -67
- package/src/ui/index.html +1 -1
- package/src/ui/invite.js +8 -8
- package/src/ui/invites.js +3 -3
- package/src/ui/new-session.js +151 -0
- package/src/ui/prail-model.js +22 -0
- package/src/ui/prail.js +43 -0
- package/src/ui/project-board.js +359 -0
- package/src/ui/project-model.js +197 -0
- package/src/ui/project-pop.js +451 -0
- package/src/ui/projects.js +406 -0
- package/src/ui/sandbox-keys.js +3 -3
- package/src/ui/secrets-view.js +5 -5
- package/src/ui/session-words.js +2 -2
- package/src/ui/session.js +156 -43
- package/src/ui/tree.js +3 -3
- package/src/ui/voice.js +6 -6
- package/src/ui/workspaces.js +23 -23
- package/src/ui-server.js +104 -26
- package/src/update-check.js +2 -2
- package/src/voice.js +7 -7
- package/src/wake-tool.js +1 -1
- package/src/webhooks.js +1 -1
- package/src/workspace-cli.js +12 -12
- 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
|
|
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
|
|
27
|
-
quilt join <invite-link> Join a partner's
|
|
28
|
-
quilt sync [--dir <folder>] Agents in a sandbox: sync this folder with the
|
|
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
|
|
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
|
|
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
|
|
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
|
|
54
|
-
quilt workspace list|files|get|put|write|mkdir|mv|rm
|
|
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>
|
|
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
|
|
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
|
|
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
|
|
152
|
-
console.log(` dashboard: ${c.apiUrl && c.relayApiSecret ? `reports who is in which
|
|
153
|
-
if (!c.passPublicKey) console.log(` new
|
|
154
|
-
console.log(` limits: ${Math.round(c.maxRoomBytes / 1048576)} MB per
|
|
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
|
|
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:
|
|
260
|
-
if (!env.CLOUDFLARE_ACCOUNT_ID || !env.CLOUDFLARE_EMAIL_TOKEN) console.log('CLOUDFLARE_ACCOUNT_ID or CLOUDFLARE_EMAIL_TOKEN is not set:
|
|
261
|
-
if (!env.CLOUDFLARE_MAIL_ZONE_ID) console.log('CLOUDFLARE_MAIL_ZONE_ID is not set:
|
|
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 <
|
|
269
|
-
' quilt agent env --name <name> --session <
|
|
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 <
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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(
|
|
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('
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
package/src/account.js
CHANGED
|
@@ -404,11 +404,11 @@ export async function announceWhenReported (announce, { alive = () => true, log
|
|
|
404
404
|
if (!alive()) return null
|
|
405
405
|
try {
|
|
406
406
|
const r = await announce()
|
|
407
|
-
if (r.notified.length) log(`told ${r.notified.length === 1 ? '1 agent' : `${r.notified.length} agents`} in this
|
|
407
|
+
if (r.notified.length) log(`told ${r.notified.length === 1 ? '1 agent' : `${r.notified.length} agents`} in this project that the codebase started`)
|
|
408
408
|
return r
|
|
409
409
|
} catch (err) {
|
|
410
410
|
if (err.status !== 409 || i >= delays.length) {
|
|
411
|
-
log(`could not tell this
|
|
411
|
+
log(`could not tell this project's agents the codebase started: ${err.message}`)
|
|
412
412
|
return null
|
|
413
413
|
}
|
|
414
414
|
}
|
package/src/admit-policy.js
CHANGED
|
@@ -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
|
|
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
|
|
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
|
|
142
|
-
log(`Next: in the
|
|
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 <
|
|
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
|
|
21
|
-
'and read the
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
89
|
-
: 'This
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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}
|
|
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: '
|
|
16
|
+
session_ended: 'Codebase ended',
|
|
17
17
|
relay_restart: 'Relay restarted',
|
|
18
18
|
idle: 'Done working (went quiet)',
|
|
19
19
|
replaced: 'Reconnected',
|
package/src/api/file-paths.js
CHANGED
|
@@ -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
|
|
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.`)
|
package/src/api/file-store.js
CHANGED
|
@@ -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('
|
|
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
|
}
|
package/src/api/invite-email.js
CHANGED
|
@@ -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
|
|
25
|
+
`${who} invited you to ${sessionName}, a live Quilt codebase that people and their AIs build together.`,
|
|
26
26
|
'',
|
|
27
|
-
`Join the
|
|
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}
|
|
41
|
+
subject: `${who} invited you to the ${workspaceName} project on Quilt`,
|
|
42
42
|
text: [
|
|
43
|
-
`${who} invited you to ${workspaceName}, a Quilt
|
|
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
|
'',
|
package/src/api/join-text.js
CHANGED
|
@@ -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
|
|
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
|
|
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
|
|
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 <
|
|
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
|
|
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>`.' : ''
|
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
|
|
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
|
|
65
|
-
text: ['Waiting for you to let them in:', '', ...due.map(({ n, s }) => `- ${n.by}${n.agent ? ' (an agent)' : ''} in ${s.name || 'Untitled
|
|
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
|
|
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 ? '
|
|
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 ? '
|
|
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
|
|
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
|
})
|
package/src/api/permissions.js
CHANGED
|
@@ -56,7 +56,7 @@ export function agentWakeRoutes (ctx) {
|
|
|
56
56
|
}
|
|
57
57
|
const address = cleanAddress(body.address)
|
|
58
58
|
if (!address) throw new HttpError(400, 'Give the email address you watch.')
|
|
59
|
-
if (address.endsWith(`@${MAIL_DOMAIN}`)) throw new HttpError(400, "That's a
|
|
59
|
+
if (address.endsWith(`@${MAIL_DOMAIN}`)) throw new HttpError(400, "That's a codebase's own address: give the inbox you watch yourself.")
|
|
60
60
|
if (!cf) throw new HttpError(503, 'Email is not set up on this server.')
|
|
61
61
|
limitCodes(agent.id)
|
|
62
62
|
const code = String(crypto.randomInt(0, 1_000_000)).padStart(6, '0')
|
package/src/api/routes/agents.js
CHANGED
|
@@ -243,7 +243,7 @@ export function agentRoutes ({ store, user, person, now, limit, limitTokens, lim
|
|
|
243
243
|
const u = await person(req)
|
|
244
244
|
const known = (await personSandboxKeys(u.userId)).filter((k) => k.room === String(body.room))
|
|
245
245
|
session = known.map((k) => links.open(k.sessionLink)).find(Boolean) || ''
|
|
246
|
-
if (!session) throw new HttpError(400, 'paste the
|
|
246
|
+
if (!session) throw new HttpError(400, 'paste the codebase\'s invite link')
|
|
247
247
|
}
|
|
248
248
|
return envKeyFor(agent, { session, name: body.name, label: body.sessionName })
|
|
249
249
|
}],
|
|
@@ -271,7 +271,7 @@ export function agentRoutes ({ store, user, person, now, limit, limitTokens, lim
|
|
|
271
271
|
if (old.revokedAt) throw new HttpError(404, 'no such key')
|
|
272
272
|
limit(req)
|
|
273
273
|
const session = links.open(old.sessionLink)
|
|
274
|
-
if (!session) throw new HttpError(409, 'make a new key for this
|
|
274
|
+
if (!session) throw new HttpError(409, 'make a new key for this codebase instead (paste its invite link)')
|
|
275
275
|
const made = await envKeyFor(agent, { session, name: old.name, label: old.sessionName || '', slot: old.slot, rotating: true })
|
|
276
276
|
await store.revokeAgentAppKey(agent.id, old.id)
|
|
277
277
|
return { ...made, replaced: old.id }
|