heyquilt 0.3.170 → 0.3.172
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/RELEASES.md +30 -0
- package/bin/quilt.js +16 -9
- package/package.json +2 -2
- package/src/agent-task-workflow.js +2 -9
- package/src/base-pick.js +212 -0
- package/src/boxes.js +6 -7
- package/src/catchup.js +1 -1
- package/src/chat-links.js +1 -3
- package/src/connection.js +24 -5
- package/src/control.js +27 -20
- package/src/duties.js +32 -56
- package/src/github-commit.js +1 -1
- package/src/held.js +323 -0
- package/src/hooks.js +27 -66
- package/src/identity.js +1 -1
- package/src/inbox.js +5 -4
- package/src/key-cli.js +1 -1
- package/src/live-merge.js +599 -0
- package/src/mcp.js +57 -102
- package/src/merge3.js +65 -1
- package/src/now-summary.js +4 -6
- package/src/pathrules.js +1 -1
- package/src/persona.js +1 -1
- package/src/presence.js +2 -0
- package/src/protocol.js +2 -2
- package/src/read-bases.js +123 -0
- package/src/relay-ask.js +2 -2
- package/src/relay-live-write.js +179 -0
- package/src/relay-mcp.js +173 -212
- package/src/relay-prune.js +2 -2
- package/src/relay-turn-sync.js +146 -142
- package/src/runner.js +0 -2
- package/src/server.js +253 -375
- package/src/session-follow.js +3 -1
- package/src/session-quilt.js +2 -21
- package/src/session-seam.js +35 -7
- package/src/session.js +795 -553
- package/src/setup.js +15 -25
- package/src/source-live/bring-in.js +5 -5
- package/src/source-live/land.js +20 -3
- package/src/source-live/live-block.js +503 -52
- package/src/status.js +8 -12
- package/src/swap-in.js +81 -0
- package/src/textdiff.js +54 -0
- package/src/turn-sync-plan.js +6 -18
- package/src/turn-sync.js +28 -21
- package/src/ui/agent-guide.js +13 -13
- package/src/ui/app.css +19 -40
- package/src/ui/boxes.js +8 -16
- package/src/ui/common.js +1 -1
- package/src/ui/fileview.js +11 -15
- package/src/ui/loom-model.js +18 -16
- package/src/ui/loom.css +1 -2
- package/src/ui/loom.js +6 -6
- package/src/ui/rail-model.js +25 -64
- package/src/ui/rail.js +48 -60
- package/src/ui/seam-model.js +39 -3
- package/src/ui/session.js +36 -54
- package/src/ui/tree.js +22 -129
- package/src/ui-server.js +2 -6
- package/src/release-words.js +0 -18
- package/src/seam-claims.js +0 -53
package/src/setup.js
CHANGED
|
@@ -27,15 +27,15 @@ ${TASK_WORKFLOW_MD}
|
|
|
27
27
|
- Read the project's rules and design system with \`quilt_project_rules\` before your
|
|
28
28
|
first change: the same rules whatever tool each person uses.
|
|
29
29
|
- See what a partner's AI is doing with \`quilt_partner_feed\`, and where people
|
|
30
|
-
are working with \`quilt_list_files\` (recent edits
|
|
30
|
+
are working with \`quilt_list_files\` (recent edits).
|
|
31
31
|
- Announce what you're working on (\`quilt_set_focus\` / \`quilt focus "..."\`).
|
|
32
32
|
- Share your work with \`quilt_share\`: when you start a request (what was asked,
|
|
33
33
|
your plan) and when you finish (what you did, the files you changed). Partners
|
|
34
34
|
see it in their feed, it goes on the task board, and the host won't commit under you.
|
|
35
|
-
- Before you change files, call \`quilt_before_edit\` with their paths. It
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
- In the session you are your person: your messages
|
|
35
|
+
- Before you change files, call \`quilt_before_edit\` with their paths. It shows what
|
|
36
|
+
people said about those files in chat and who else changed them lately. It never
|
|
37
|
+
refuses: nobody holds files.
|
|
38
|
+
- In the session you are your person: your messages and tasks are theirs, and
|
|
39
39
|
people see you as them. "<person>'s AI" ("@Daniel's AI") is only that
|
|
40
40
|
person's cloud AI, when they connected one (their own AI tool on their own cloud
|
|
41
41
|
machine). Nothing written or handed to "<person>'s AI" comes to you; when your person
|
|
@@ -44,28 +44,18 @@ ${TASK_WORKFLOW_MD}
|
|
|
44
44
|
person, not for you: Quilt shows you none of them and nothing waits on your answer.
|
|
45
45
|
Write in chat, read it or take a task only when your person asks you to. An agent
|
|
46
46
|
that joined as its own member reads its own mentions in \`quilt_inbox\`.
|
|
47
|
-
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
done (\`quilt_release\` / \`quilt release <path>\`).
|
|
47
|
+
- Nobody holds files: there are no claims, no file queue and no handoffs of files.
|
|
48
|
+
Edit any file you may change; edits merge as they arrive. If your change clashes
|
|
49
|
+
with someone's on the same lines, Quilt tells you (at the top of your next quilt
|
|
50
|
+
answer) and you resolve it.
|
|
52
51
|
- Your unfinished work is boxed: in a folder that is a git repository, a file you
|
|
53
52
|
change stays in a box until you commit it. Everyone sees the change, but it is only
|
|
54
53
|
in your folder, so nobody else's git can commit it. Committing it (or putting it
|
|
55
|
-
back) opens the box by itself; finishing
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
- If a file is claimed by someone else, your edit is refused or undone, and the next
|
|
61
|
-
quilt tool you call tells you so. Don't retry or work around it: ask for it in its
|
|
62
|
-
file queue (\`quilt_request_file\`: a title like "Working on X for task Y" and up to
|
|
63
|
-
300 characters on your plan), then carry on with other work. You're woken when it's
|
|
64
|
-
handed to you, with the holder's context.
|
|
65
|
-
- When someone waits in the queue for a file you hold, every quilt answer says so.
|
|
66
|
-
Finish your change, then hand it off with \`quilt_handoff\` and your context (what
|
|
67
|
-
you changed, what's left, gotchas). You can't finish or release it before. A claim
|
|
68
|
-
whose holder does nothing for 20 minutes goes to the next one waiting.
|
|
54
|
+
back) opens the box by itself; finishing does not. \`quilt_unpack\` shares a box
|
|
55
|
+
early when someone needs it: decide yourself, and ask your person first for a
|
|
56
|
+
large, risky or critical change or when the project's rules say so. A file boxed
|
|
57
|
+
by someone else isn't in your folder yet: if you edit it, their box opens and your
|
|
58
|
+
change merges with their work.
|
|
69
59
|
- Answer collaborators' messages (\`quilt_read_messages\`): help with their change,
|
|
70
60
|
or say when you'll be done. New ones are shown at the top of
|
|
71
61
|
every quilt answer. When you finish, call \`quilt_set_work\` with "done": it is
|
|
@@ -184,7 +174,7 @@ export function setup (root, { home } = {}) {
|
|
|
184
174
|
if (r.result === 'added' || r.result === 'updated') changed.push(`${r.file} (${r.name} MCP server)`)
|
|
185
175
|
else if (r.result === 'skipped' || r.result === 'failed') changed.push(`${r.file}: left alone, not plain JSON (${r.name})`)
|
|
186
176
|
}
|
|
187
|
-
if (installHooks(root)) changed.push(`${HOOKS_FILE} (Claude Code hooks:
|
|
177
|
+
if (installHooks(root)) changed.push(`${HOOKS_FILE} (Claude Code hooks: chat about each file is shown as you edit it)`)
|
|
188
178
|
if (upsertBlock(path.join(root, 'AGENTS.md'), AGENT_GUIDE)) changed.push('AGENTS.md (Cursor, Codex, and other agents)')
|
|
189
179
|
// Claude Code and Gemini CLI read AGENTS.md through a pointer, so every tool has the same rules.
|
|
190
180
|
if (pointAtAgents(path.join(root, 'CLAUDE.md'), { create: true })) changed.push('CLAUDE.md (Claude Code: reads AGENTS.md)')
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
// seam_merge): members see it marked in their folders and settle it, and nothing typed is lost.
|
|
19
19
|
import { liveMaps, liveHead, entryOf, overlay, seal } from './live-square.js'
|
|
20
20
|
import { mergeSmart, withMarkers, unionMatcher } from '../merge3.js'
|
|
21
|
-
import {
|
|
21
|
+
import { applyLineDiff } from '../textdiff.js'
|
|
22
22
|
import { blobId } from '@heyquilt/seam/lib/quilts/records.js'
|
|
23
23
|
import { isText } from '@heyquilt/seam/lib/quilts/textdiff.js'
|
|
24
24
|
|
|
@@ -187,7 +187,7 @@ export async function olderCopiesAhead (reader, q, sq, doc, tip, { marked = null
|
|
|
187
187
|
if (combine(h, moved, t, { union }).conflict) continue
|
|
188
188
|
const y = m.files.get(p)
|
|
189
189
|
if (!y || y.toString() !== l.text) continue
|
|
190
|
-
doc.transact(() =>
|
|
190
|
+
doc.transact(() => applyLineDiff(y, r.text), 'relay-quilt')
|
|
191
191
|
out.push(p)
|
|
192
192
|
}
|
|
193
193
|
return out
|
|
@@ -332,9 +332,9 @@ export async function moveLive (reader, q, doc, { prev, head, base = false, by =
|
|
|
332
332
|
if (c.same) { drop[p] = l.id; out.dropped.push(p); continue }
|
|
333
333
|
if (c.keep) continue
|
|
334
334
|
const t = m.files.get(p)
|
|
335
|
-
if (c.text !== undefined && t) {
|
|
335
|
+
if (c.text !== undefined && t) { applyLineDiff(t, c.text); out.combined.push(p); continue }
|
|
336
336
|
// Not expected (conflictsAhead committed it first): an edit made while the rebase ran. Both sides stay in the file, marked.
|
|
337
|
-
if (t && l.text !== null && o.text !== null && n.text !== null && !n.term)
|
|
337
|
+
if (t && l.text !== null && o.text !== null && n.text !== null && !n.term) applyLineDiff(t, withMarkers(o.text, l.text, n.text, { mine: 'this square', theirs: 'main' }))
|
|
338
338
|
out.conflicts.push(p)
|
|
339
339
|
}
|
|
340
340
|
seal(doc, { prev, head, sealed: drop, by })
|
|
@@ -371,7 +371,7 @@ export function lateEdits (doc, { from, to, read }, { ms = LATE_MS, origin = 're
|
|
|
371
371
|
if (!t || !w || w.at !== from || !a || !b || a.text === null || b.text === null || b.term) continue
|
|
372
372
|
const cur = t.toString()
|
|
373
373
|
const r = mergeSmart(a.text, cur, b.text)
|
|
374
|
-
if (!r.conflicts.length && r.text !== cur)
|
|
374
|
+
if (!r.conflicts.length && r.text !== cur) applyLineDiff(t, r.text)
|
|
375
375
|
// Combined: it is on `to` now, so a later edit of the same file is not combined again.
|
|
376
376
|
m.writers.set(p, { ...w, at: to })
|
|
377
377
|
}
|
package/src/source-live/land.js
CHANGED
|
@@ -23,11 +23,16 @@
|
|
|
23
23
|
//
|
|
24
24
|
// Only the square's holder's app lands it; a writer's app does once the holder's has been quiet for
|
|
25
25
|
// HOLDER_WAIT_MS more (offline), the same turn as bringing main in (bring-in.js).
|
|
26
|
+
//
|
|
27
|
+
// A path with an open held conflict (held.js: two live writes changed the same lines and the second
|
|
28
|
+
// writer's are held) never lands until someone resolves it with quilt_resolve_merge (Seam's 07 "Terms
|
|
29
|
+
// held aside"): it stays live in the square, said once, and everything else lands as above.
|
|
26
30
|
import { mergeWaiting } from '@heyquilt/seam/lib/quilts/merge-wait.js'
|
|
27
31
|
import { parseMarkers } from '@heyquilt/seam/lib/quilts/conflict-format.js'
|
|
28
32
|
import { blobId } from '@heyquilt/seam/lib/quilts/records.js'
|
|
29
33
|
import { squareShort } from '@heyquilt/seam/lib/quilts/errors.js'
|
|
30
34
|
import { isChangelog, onOlderCopy, olderTexts, unionMarked, HOLDER_WAIT_MS } from './bring-in.js'
|
|
35
|
+
import { heldLandingNote } from '../held.js'
|
|
31
36
|
|
|
32
37
|
const num = (v, d) => (Number(v) > 0 ? Number(v) : d)
|
|
33
38
|
// How long the square's work is left alone after its last edit before it lands.
|
|
@@ -165,8 +170,19 @@ export class Lander {
|
|
|
165
170
|
// Still moving (the relay brings main in this moment): the next look.
|
|
166
171
|
if (this.block.head !== want) { this.soon(15 * 1000); return { did: 'moving' } }
|
|
167
172
|
}
|
|
168
|
-
|
|
169
|
-
|
|
173
|
+
// Paths with an open held conflict stay live until it is resolved; the rest of the work lands.
|
|
174
|
+
const held = new Set(this.block.heldPaths ? this.block.heldPaths() : [])
|
|
175
|
+
const all = this.block.status ? this.block.status() : []
|
|
176
|
+
const work = all.filter((w) => !held.has(w.path))
|
|
177
|
+
const left = all.filter((w) => held.has(w.path)).map((w) => w.path)
|
|
178
|
+
const heldKey = left.slice().sort().join('\n')
|
|
179
|
+
if (left.length && this.heldTold !== heldKey) { this.heldTold = heldKey; this.log(heldLandingNote(left, { none: !work.length && !sq.head })) }
|
|
180
|
+
if (!work.length && !sq.head) {
|
|
181
|
+
if (!left.length) return { did: 'nothing' }
|
|
182
|
+
// Resolving it "theirs" changes no file (no edit wakes this): looked at again in a minute.
|
|
183
|
+
this.soon(60 * 1000)
|
|
184
|
+
return { did: 'held', held: left }
|
|
185
|
+
}
|
|
170
186
|
const me = await this.me(c)
|
|
171
187
|
const holder = !!me && me === sq.holder
|
|
172
188
|
const quiet = this.now() - this.lastEdit
|
|
@@ -380,7 +396,8 @@ export class Lander {
|
|
|
380
396
|
const now = await c.square(this.quilt, sq.id)
|
|
381
397
|
let r = null
|
|
382
398
|
if (now && !now.conflicted_paths) {
|
|
383
|
-
const
|
|
399
|
+
const held = new Set(this.block.heldPaths ? this.block.heldPaths() : [])
|
|
400
|
+
const work = (this.block.status ? this.block.status() : []).filter((x) => !held.has(x.path))
|
|
384
401
|
let to = now.head
|
|
385
402
|
if (work.length) { const w = await this.block.commit({ message: landMessage(work.map((x) => x.path)) }); to = (w && w.square && w.square.head) || to }
|
|
386
403
|
if (to) r = await this.merge(c, now, to)
|