heyquilt 0.3.182 → 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.
Files changed (122) hide show
  1. package/README.md +101 -97
  2. package/RELEASES.md +8 -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 +2 -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/notify.js +7 -7
  18. package/src/api/permissions.js +1 -1
  19. package/src/api/routes/agent-wake.js +1 -1
  20. package/src/api/routes/agents.js +2 -2
  21. package/src/api/routes/ai-vm.js +5 -5
  22. package/src/api/routes/connections.js +13 -13
  23. package/src/api/routes/grants.js +2 -2
  24. package/src/api/routes/mail.js +10 -10
  25. package/src/api/routes/relay.js +1 -1
  26. package/src/api/routes/secrets.js +11 -11
  27. package/src/api/routes/session-invites.js +5 -5
  28. package/src/api/routes/sessions.js +3 -3
  29. package/src/api/routes/workspace-agents.js +14 -14
  30. package/src/api/routes/workspace-files.js +12 -12
  31. package/src/api/routes/workspace-invites.js +5 -5
  32. package/src/api/routes/workspaces.js +11 -11
  33. package/src/api/secrets-access.js +1 -1
  34. package/src/api/server.js +3 -3
  35. package/src/api/team-access.js +1 -1
  36. package/src/api/workspace-access.js +1 -1
  37. package/src/api/workspace-reach.js +3 -3
  38. package/src/app-tools.js +10 -10
  39. package/src/autowork.js +4 -4
  40. package/src/branch-view.js +1 -1
  41. package/src/catchup.js +5 -5
  42. package/src/chat-links.js +18 -18
  43. package/src/connection.js +11 -11
  44. package/src/control.js +5 -5
  45. package/src/conversation.js +1 -1
  46. package/src/doctor.js +2 -2
  47. package/src/duties.js +1 -1
  48. package/src/fsutil.js +1 -1
  49. package/src/held.js +4 -4
  50. package/src/hooks.js +3 -3
  51. package/src/hosted-client.js +2 -2
  52. package/src/identity.js +1 -1
  53. package/src/inbox.js +1 -1
  54. package/src/key-cli.js +1 -1
  55. package/src/mail-tools.js +11 -11
  56. package/src/mcp-proxy.js +1 -1
  57. package/src/mcp.js +59 -59
  58. package/src/new-session.js +6 -6
  59. package/src/project-rules.js +2 -2
  60. package/src/relay-ask.js +2 -2
  61. package/src/relay-cluster.js +3 -3
  62. package/src/relay-live-write.js +3 -3
  63. package/src/relay-mcp.js +56 -56
  64. package/src/relay-prune.js +1 -1
  65. package/src/relay-turn-sync.js +1 -1
  66. package/src/secret-import.js +1 -1
  67. package/src/secret-names.js +6 -6
  68. package/src/secret-run.js +3 -3
  69. package/src/server.js +41 -41
  70. package/src/session-access.js +3 -3
  71. package/src/session-name.js +1 -1
  72. package/src/session.js +50 -50
  73. package/src/setup.js +7 -7
  74. package/src/status.js +2 -2
  75. package/src/tasks.js +1 -1
  76. package/src/turn-sync.js +4 -4
  77. package/src/ui/account-sessions.js +2 -2
  78. package/src/ui/agent-env-key.js +1 -1
  79. package/src/ui/agent-guide.js +35 -35
  80. package/src/ui/agent-kinds.js +8 -8
  81. package/src/ui/agent-place.js +16 -16
  82. package/src/ui/agents-table.js +6 -6
  83. package/src/ui/app.css +331 -0
  84. package/src/ui/app.js +28 -13
  85. package/src/ui/board.js +2 -2
  86. package/src/ui/catchup.js +5 -5
  87. package/src/ui/changes-seen.js +2 -2
  88. package/src/ui/changes.js +3 -3
  89. package/src/ui/cloud-ai.js +12 -12
  90. package/src/ui/common.js +1 -1
  91. package/src/ui/connections.js +1 -1
  92. package/src/ui/diffview.js +2 -2
  93. package/src/ui/feed.js +1 -1
  94. package/src/ui/feedback.js +4 -4
  95. package/src/ui/files.js +120 -14
  96. package/src/ui/fileview.js +3 -3
  97. package/src/ui/git-rule.js +3 -3
  98. package/src/ui/home.js +92 -47
  99. package/src/ui/index.html +1 -1
  100. package/src/ui/invite.js +8 -8
  101. package/src/ui/invites.js +3 -3
  102. package/src/ui/new-session.js +3 -3
  103. package/src/ui/prail-model.js +22 -0
  104. package/src/ui/prail.js +43 -0
  105. package/src/ui/project-board.js +359 -0
  106. package/src/ui/project-model.js +197 -0
  107. package/src/ui/project-pop.js +451 -0
  108. package/src/ui/projects.js +406 -0
  109. package/src/ui/sandbox-keys.js +3 -3
  110. package/src/ui/secrets-view.js +5 -5
  111. package/src/ui/session-words.js +2 -2
  112. package/src/ui/session.js +156 -43
  113. package/src/ui/tree.js +3 -3
  114. package/src/ui/voice.js +6 -6
  115. package/src/ui/workspaces.js +23 -23
  116. package/src/ui-server.js +78 -24
  117. package/src/update-check.js +2 -2
  118. package/src/voice.js +7 -7
  119. package/src/wake-tool.js +1 -1
  120. package/src/webhooks.js +1 -1
  121. package/src/workspace-cli.js +12 -12
  122. package/src/workspace-tools.js +33 -33
@@ -13,10 +13,10 @@ import { cleanFilePath, isTextual } from './api/file-paths.js'
13
13
 
14
14
  /** One paragraph for the MCP instructions, added only where these tools are offered. */
15
15
  export const WORKSPACE_GUIDE =
16
- 'Files that are not code (images, video, documents, data) live in the workspace library: read them with ' +
17
- 'quilt_workspace_read_file and put what you make there with quilt_workspace_write_file and a short note, not in chat. ' +
18
- 'Subscribe with quilt_workspace_webhook to be told when a session starts in your workspace; join it with the link the event carries, ' +
19
- 'and wait: the session\'s owner lets you in.'
16
+ 'Files that are not code (images, video, documents, data) are kept as a project\'s artifacts: read them with ' +
17
+ 'quilt_workspace_read_file and add what you make with quilt_workspace_write_file and a short note, not in chat. ' +
18
+ 'Subscribe with quilt_workspace_webhook to be told when a codebase starts in your project; join it with the link the event carries, ' +
19
+ 'and wait: the codebase\'s owner lets you in.'
20
20
 
21
21
  /** The same, for hosted agents: their one webhook (quilt_webhook_subscribe) carries session.started too. */
22
22
  export const WORKSPACE_GUIDE_HOSTED = WORKSPACE_GUIDE.replace('Subscribe with quilt_workspace_webhook to be told', 'Your webhook (quilt_webhook_subscribe) also tells you')
@@ -114,16 +114,16 @@ export function registerWorkspaceTools (server, { call, fetchBytes, put, saveDir
114
114
  /** The workspace the agent means, by id or by name (any case): { id, name, ... }. */
115
115
  async function workspaceOf (ref) {
116
116
  const want = String(ref ?? '').trim()
117
- if (!want) throw new Error('Say which workspace (its name or id). quilt_workspaces lists yours.')
117
+ if (!want) throw new Error('Say which project (its name or id). quilt_workspaces lists yours.')
118
118
  const { workspaces } = await call('GET', '/v1/me/workspaces')
119
119
  const byId = workspaces.find((w) => w.id === want)
120
120
  if (byId) return byId
121
121
  const named = workspaces.filter((w) => w.name.toLowerCase() === want.toLowerCase())
122
122
  if (named.length === 1) return named[0]
123
- if (named.length > 1) throw new Error(`Several workspaces are called ${want}: ${named.map((w) => w.id).join(', ')}. Use the id.`)
123
+ if (named.length > 1) throw new Error(`Several projects are called ${want}: ${named.map((w) => w.id).join(', ')}. Use the id.`)
124
124
  // An id it isn't listed under: the API has the last word (and says not found).
125
125
  if (UUID.test(want)) return { id: want, name: want }
126
- throw new Error(`No workspace called ${want}. quilt_workspaces lists the ones you can reach.`)
126
+ throw new Error(`No project called ${want}. quilt_workspaces lists the ones you can reach.`)
127
127
  }
128
128
 
129
129
  /** The library row at `p` (a file or a folder). */
@@ -131,7 +131,7 @@ export function registerWorkspaceTools (server, { call, fetchBytes, put, saveDir
131
131
  const want = cleanFilePath(p)
132
132
  const { files } = await call('GET', `${ws$(ws.id)}/files`)
133
133
  const f = files.find((x) => x.path === want)
134
- if (!f) throw new Error(`No file at ${want} in ${ws.name}. quilt_workspace_files lists what is there.`)
134
+ if (!f) throw new Error(`No artifact at ${want} in ${ws.name}. quilt_workspace_files lists what is there.`)
135
135
  return f
136
136
  }
137
137
 
@@ -159,18 +159,18 @@ export function registerWorkspaceTools (server, { call, fetchBytes, put, saveDir
159
159
  // answer), for a host whose instructions went out before these tools were added.
160
160
  const lead = guide ? `${WORKSPACE_GUIDE}\n\n` : ''
161
161
  server.registerTool('quilt_workspaces', {
162
- description: 'List the Quilt workspaces you can reach: name, id, your access (edit or view), open sessions, files and storage used. Workspace tools take a workspace by name or id.' + (guide ? ` ${WORKSPACE_GUIDE}` : ''),
162
+ description: 'List the Quilt projects you can reach: name, id, your access (edit or view), open codebases, artifacts and storage used. The quilt_workspace tools take a project by name or id.' + (guide ? ` ${WORKSPACE_GUIDE}` : ''),
163
163
  inputSchema: {}
164
164
  }, tool(async () => lead + await listWorkspaces()))
165
165
 
166
166
  async function listWorkspaces () {
167
167
  const { workspaces } = await call('GET', '/v1/me/workspaces')
168
- if (!workspaces.length) return 'You are not in any workspace yet. A person adds you to one in the Quilt app or on heyquilt.com.'
168
+ if (!workspaces.length) return 'You are not in any project yet. A person adds you to one in the Quilt app or on heyquilt.com.'
169
169
  const usage = await Promise.all(workspaces.map((w) => call('GET', ws$(w.id)).then((d) => d.usage || null, () => null)))
170
170
  return workspaces.map((w, i) => {
171
171
  const c = w.counts || {}
172
172
  const u = usage[i]
173
- const parts = [`${w.access} access`, `${plural(c.open ?? 0, 'open session')}`, plural(c.files ?? u?.fileCount ?? 0, 'file')]
173
+ const parts = [`${w.access} access`, `${plural(c.open ?? 0, 'open codebase')}`, plural(c.files ?? u?.fileCount ?? 0, 'artifact')]
174
174
  if (u) parts.push(`${formatBytes(u.usedBytes)} of ${formatBytes(u.quotaBytes)} used`)
175
175
  if (w.archivedAt) parts.push('archived')
176
176
  return `- ${w.name} (id ${w.id}): ${parts.join(', ')}`
@@ -178,9 +178,9 @@ export function registerWorkspaceTools (server, { call, fetchBytes, put, saveDir
178
178
  }
179
179
 
180
180
  server.registerTool('quilt_workspace_files', {
181
- description: 'List the files in a workspace library: path, kind, size, version, who uploaded it and when, and its note. Narrow with folder (just that folder) or glob (like "**/*.png"; * stays in a folder, ** crosses folders).',
181
+ description: 'List a project\'s artifacts: path, kind, size, version, who uploaded it and when, and its note. Narrow with folder (just that folder) or glob (like "**/*.png"; * stays in a folder, ** crosses folders).',
182
182
  inputSchema: {
183
- workspace: z.string().describe('The workspace name or id'),
183
+ workspace: z.string().describe('The project\'s name or id'),
184
184
  folder: z.string().optional().describe('Only this folder, like "cuts" ("" for the top level)'),
185
185
  glob: z.string().optional().describe('Only paths matching this, like "cuts/*.mp4" or "**/*.md"')
186
186
  }
@@ -189,7 +189,7 @@ export function registerWorkspaceTools (server, { call, fetchBytes, put, saveDir
189
189
  const q = folder !== undefined ? `?folder=${encodeURIComponent(folder)}` : ''
190
190
  const [{ files }, names] = await Promise.all([call('GET', `${ws$(ws.id)}/files${q}`), namesIn(ws)])
191
191
  const shown = glob ? files.filter((f) => globMatch(glob, f.path)) : files
192
- if (!shown.length) return files.length ? `Nothing in ${ws.name} matches ${glob}.` : `No files in ${ws.name}${folder ? ` under ${folder}` : ''} yet.`
192
+ if (!shown.length) return files.length ? `Nothing in ${ws.name} matches ${glob}.` : `No artifacts in ${ws.name}${folder ? ` under ${folder}` : ''} yet.`
193
193
  const now = Date.now()
194
194
  return shown.map((f) => {
195
195
  if (f.kind === 'folder') return `${f.path}/ folder`
@@ -200,10 +200,10 @@ export function registerWorkspaceTools (server, { call, fetchBytes, put, saveDir
200
200
  }))
201
201
 
202
202
  server.registerTool('quilt_workspace_read_file', {
203
- description: `Read a file from a workspace library. Text up to ${formatBytes(maxInline)} comes back in the answer; anything else comes back as a download link${saveDir ? ' and is saved on this computer (the answer says where, as savedTo)' : ''}. Give version for an earlier version.`,
203
+ description: `Read an artifact from a project. Text up to ${formatBytes(maxInline)} comes back in the answer; anything else comes back as a download link${saveDir ? ' and is saved on this computer (the answer says where, as savedTo)' : ''}. Give version for an earlier version.`,
204
204
  inputSchema: {
205
- workspace: z.string().describe('The workspace name or id'),
206
- path: z.string().describe('The file\'s path in the library, like "cuts/teaser.mp4"'),
205
+ workspace: z.string().describe('The project\'s name or id'),
206
+ path: z.string().describe('The artifact\'s path in the project, like "cuts/teaser.mp4"'),
207
207
  version: z.number().int().positive().optional().describe('An earlier version number (default: the current one)')
208
208
  }
209
209
  }, tool(async ({ workspace, path: p, version }) => {
@@ -233,15 +233,15 @@ export function registerWorkspaceTools (server, { call, fetchBytes, put, saveDir
233
233
 
234
234
  const sources = readLocal ? 'text, base64 or fromPath' : 'text or base64'
235
235
  const writeSchema = {
236
- workspace: z.string().describe('The workspace name or id'),
237
- path: z.string().describe('Where it goes in the library, like "drafts/brief.md". Missing folders are made; an existing file gets a new version.'),
236
+ workspace: z.string().describe('The project\'s name or id'),
237
+ path: z.string().describe('Where it goes in the project\'s artifacts, like "drafts/brief.md". Missing folders are made; an existing artifact gets a new version.'),
238
238
  text: z.string().optional().describe(`The file's contents as text (up to ${formatBytes(maxInline)})`),
239
239
  base64: z.string().optional().describe(`The file's bytes as base64 (up to ${formatBytes(maxInline)})`),
240
- ...(readLocal ? { fromPath: z.string().optional().describe(`A file in this project folder (or the temp folder) to upload, up to ${formatBytes(MAX_FROM_PATH)}`) } : {}),
240
+ ...(readLocal ? { fromPath: z.string().optional().describe(`A file in this codebase's folder (or the temp folder) to upload, up to ${formatBytes(MAX_FROM_PATH)}`) } : {}),
241
241
  note: z.string().optional().describe('A short note on what this is or what changed (under 300 characters)')
242
242
  }
243
243
  server.registerTool('quilt_workspace_write_file', {
244
- description: `Put a file in a workspace library, from exactly one of ${sources}. Writing to an existing path adds a new version. Add a short note saying what it is. Needs edit access.`,
244
+ description: `Add an artifact to a project, from exactly one of ${sources}. Writing to an existing path adds a new version. Add a short note saying what it is. Needs edit access.`,
245
245
  inputSchema: writeSchema
246
246
  }, tool(async ({ workspace, path: p, text, base64, fromPath, note }) => {
247
247
  const given = [text, base64, fromPath].filter((v) => v !== undefined && v !== null)
@@ -264,7 +264,7 @@ export function registerWorkspaceTools (server, { call, fetchBytes, put, saveDir
264
264
  bytes = await readLocal(String(fromPath))
265
265
  if (bytes.length > MAX_FROM_PATH) throw new Error(`That file is too large (${formatBytes(bytes.length)}; at most ${formatBytes(MAX_FROM_PATH)}).`)
266
266
  }
267
- if (!bytes.length) throw new Error('That file is empty; the library keeps files with something in them.')
267
+ if (!bytes.length) throw new Error('That file is empty; a project keeps artifacts with something in them.')
268
268
  const ws = await workspaceOf(workspace)
269
269
  const sha256 = crypto.createHash('sha256').update(bytes).digest('hex')
270
270
  const started = await call('POST', `${ws$(ws.id)}/files`, { path: p, size: bytes.length, sha256, note: note || '' })
@@ -276,9 +276,9 @@ export function registerWorkspaceTools (server, { call, fetchBytes, put, saveDir
276
276
  }))
277
277
 
278
278
  server.registerTool('quilt_workspace_make_folder', {
279
- description: 'Make a folder in a workspace library, with any folders above it ("cuts/raw" makes both). Writing a file to a path makes its folders too. Needs edit access.',
279
+ description: 'Make a folder in a project\'s artifacts, with any folders above it ("cuts/raw" makes both). Writing an artifact to a path makes its folders too. Needs edit access.',
280
280
  inputSchema: {
281
- workspace: z.string().describe('The workspace name or id'),
281
+ workspace: z.string().describe('The project\'s name or id'),
282
282
  path: z.string().describe('The folder, like "cuts/raw"')
283
283
  }
284
284
  }, tool(async ({ workspace, path: p }) => {
@@ -288,9 +288,9 @@ export function registerWorkspaceTools (server, { call, fetchBytes, put, saveDir
288
288
  }))
289
289
 
290
290
  server.registerTool('quilt_workspace_move_file', {
291
- description: 'Rename or move a file or folder in a workspace library (a folder takes everything in it). Needs edit access.',
291
+ description: 'Rename or move one of a project\'s artifacts, or a folder of them (a folder takes everything in it). Needs edit access.',
292
292
  inputSchema: {
293
- workspace: z.string().describe('The workspace name or id'),
293
+ workspace: z.string().describe('The project\'s name or id'),
294
294
  path: z.string().describe('Its path now'),
295
295
  to: z.string().describe('Its new path, like "final/teaser.mp4"')
296
296
  }
@@ -302,9 +302,9 @@ export function registerWorkspaceTools (server, { call, fetchBytes, put, saveDir
302
302
  }))
303
303
 
304
304
  server.registerTool('quilt_workspace_delete_file', {
305
- description: 'Delete a file or folder (with everything in it) from a workspace library. Needs edit access.',
305
+ description: 'Delete one of a project\'s artifacts, or a folder with everything in it. Needs edit access.',
306
306
  inputSchema: {
307
- workspace: z.string().describe('The workspace name or id'),
307
+ workspace: z.string().describe('The project\'s name or id'),
308
308
  path: z.string().describe('The path to delete')
309
309
  }
310
310
  }, tool(async ({ workspace, path: p }) => {
@@ -316,25 +316,25 @@ export function registerWorkspaceTools (server, { call, fetchBytes, put, saveDir
316
316
 
317
317
  if (!webhook) return // hosted agents: quilt_webhook_subscribe is their one webhook, session.started included
318
318
  server.registerTool('quilt_workspace_webhook', {
319
- description: 'Have Quilt POST workspace events to a URL of yours: session.started when a session starts in a workspace that invites you to its sessions, with its join link. Answers the signing secret once. Setting it again replaces the URL and the secret.',
319
+ description: 'Have Quilt POST project events to a URL of yours: session.started when a codebase starts in a project that invites you to its codebases, with its join link. Answers the signing secret once. Setting it again replaces the URL and the secret.',
320
320
  inputSchema: {
321
321
  url: z.string().describe('An https URL that takes POSTs')
322
322
  }
323
323
  }, tool(async ({ url }) => {
324
324
  const r = await call('PUT', '/v1/agents/me/webhook', { url })
325
325
  return [
326
- `Workspace events (${(r.events || []).join(', ')}) now go to ${r.url}.`,
326
+ `Project events (${(r.events || []).join(', ')}) now go to ${r.url}.`,
327
327
  `Secret (shown once; check x-quilt-signature with it): ${r.secret}`,
328
328
  'Each POST is JSON ({ event, id, ts, workspace, room, name, link, by, via }) with x-quilt-event, x-quilt-delivery, x-quilt-timestamp and ' +
329
- 'x-quilt-signature: sha256=HMAC-SHA256(secret, "<timestamp>.<body>"). On session.started, join with quilt_join_session and the link; you wait until the session\'s owner lets you in.'
329
+ 'x-quilt-signature: sha256=HMAC-SHA256(secret, "<timestamp>.<body>"). On session.started, join with quilt_join_session and the link; you wait until the codebase\'s owner lets you in.'
330
330
  ].join('\n')
331
331
  }))
332
332
 
333
333
  server.registerTool('quilt_workspace_webhook_off', {
334
- description: 'Stop sending workspace events to your webhook.',
334
+ description: 'Stop sending project events to your webhook.',
335
335
  inputSchema: {}
336
336
  }, tool(async () => {
337
337
  await call('DELETE', '/v1/agents/me/webhook')
338
- return 'Workspace events are no longer sent to a webhook.'
338
+ return 'Project events are no longer sent to a webhook.'
339
339
  }))
340
340
  }