heyquilt 0.3.149 → 0.3.150
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 +4 -0
- package/package.json +2 -2
- package/src/session-follow.js +0 -10
- package/src/source-live/land.js +1 -51
- package/src/ui/seam-model.js +0 -1
- package/src/source-live/land-gate.js +0 -99
package/RELEASES.md
CHANGED
|
@@ -11,6 +11,10 @@ Format: `## <version> — <YYYY-MM-DD>`, an optional one-line summary, then bull
|
|
|
11
11
|
Lead each bullet with a short bold phrase. Inline `code` and **bold** are rendered;
|
|
12
12
|
nothing else is.
|
|
13
13
|
|
|
14
|
+
## 0.3.150 — 2026-11-04
|
|
15
|
+
|
|
16
|
+
- **Quilt no longer runs tests on your computer before your work lands.** Held work goes into Seam's main as soon as your folder is quiet, as before 0.3.148's test step. Tests run in Seam, only for the files a change touches.
|
|
17
|
+
|
|
14
18
|
## 0.3.149 — 2026-11-04
|
|
15
19
|
|
|
16
20
|
- **Agents that run commands can talk in calls.** `quilt voice say <text>` says it out loud in the session's call, `quilt voice join` joins it (or leaves with `--leave`), and `quilt voice transcript` reads what was said: the same as the call tools, for agents that use the command line instead of MCP.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "heyquilt",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.150",
|
|
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",
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
"test:stress": "node --disable-warning=ExperimentalWarning --import ./test/helpers/setup.js --test --test-concurrency=1 test/stress/*.test.js",
|
|
21
21
|
"test:file": "node --disable-warning=ExperimentalWarning --import ./test/helpers/setup.js --test",
|
|
22
22
|
"test:coverage": "node scripts/coverage.mjs",
|
|
23
|
-
"test:fast": "node
|
|
23
|
+
"test:fast": "node scripts/test-fast.mjs",
|
|
24
24
|
"serve": "node bin/quilt.js serve",
|
|
25
25
|
"app": "electron .",
|
|
26
26
|
"dist:mac": "electron-builder --mac",
|
package/src/session-follow.js
CHANGED
|
@@ -26,7 +26,6 @@ import { appSeamUrl } from './seam-url.js'
|
|
|
26
26
|
import { lastWriters, liveMaps } from './source-live/live-square.js'
|
|
27
27
|
import { broughtOf } from './source-live/bring-in.js'
|
|
28
28
|
import { Lander, landOn } from './source-live/land.js'
|
|
29
|
-
import { gateCommand, runGate } from './source-live/land-gate.js'
|
|
30
29
|
import { getSettings } from './settings.js'
|
|
31
30
|
import { catchUpWords } from './ui/seam-model.js'
|
|
32
31
|
import { QUILT_MOVE_TIMEOUT_MS } from './connection.js'
|
|
@@ -455,15 +454,6 @@ export class SquareFollower {
|
|
|
455
454
|
hasAi: () => !!(s.hasCloudAi && s.hasCloudAi()),
|
|
456
455
|
person: s.name,
|
|
457
456
|
board: { list: () => s.taskList(), add: (f) => s.addTask(f), comment: (id, text) => s.commentTask({ id, text }), move: (id, column) => s.updateTask({ id, column }) },
|
|
458
|
-
// The project's fast tests in a fresh copy of the folder before anything lands (land-gate.js).
|
|
459
|
-
gate: async ({ signal }) => {
|
|
460
|
-
let settings = {}
|
|
461
|
-
try { settings = getSettings() } catch {}
|
|
462
|
-
const g = gateCommand(s.root, { settings })
|
|
463
|
-
if (g.off || g.missing) return g
|
|
464
|
-
if (s.log && this.here === here) s.log(`🧵 running ${g.command} in a copy of this folder before its held work lands`)
|
|
465
|
-
return { ...(await runGate({ dir: s.root, command: g.command, signal })), command: g.command }
|
|
466
|
-
},
|
|
467
457
|
notify: (text) => { if (s.noteToSelf) s.noteToSelf(text) },
|
|
468
458
|
log: (m) => { if (this.here === here && s.log) s.log(`🧵 ${m}`) }
|
|
469
459
|
})
|
package/src/source-live/land.js
CHANGED
|
@@ -120,10 +120,9 @@ export class Lander {
|
|
|
120
120
|
this.state = null // what it did last, for status: { landed } | { kept } | { asked } | { waiting }
|
|
121
121
|
}
|
|
122
122
|
|
|
123
|
-
/** An edit reached the square (anyone's): the quiet starts again, and a look is due once it lasts.
|
|
123
|
+
/** An edit reached the square (anyone's): the quiet starts again, and a look is due once it lasts. */
|
|
124
124
|
edited () {
|
|
125
125
|
this.lastEdit = this.now()
|
|
126
|
-
if (this.gateRun) this.gateRun.abort()
|
|
127
126
|
this.soon(this.quietMs + 50)
|
|
128
127
|
}
|
|
129
128
|
|
|
@@ -184,11 +183,6 @@ export class Lander {
|
|
|
184
183
|
// Refused for something only a person gives: not again for a while, unless the square changed.
|
|
185
184
|
const headNow = sq.head || null
|
|
186
185
|
if (this.refusedAt && this.refusedHead === headNow && !work.length && this.now() - this.refusedAt < REFUSED_RETRY_MS) return { did: 'refused-wait' }
|
|
187
|
-
// The gate (land-gate.js): the project's fast tests pass on the work as it would land, or it stays held.
|
|
188
|
-
if (this.gate) {
|
|
189
|
-
const g = await this.tested(sq)
|
|
190
|
-
if (g) return g
|
|
191
|
-
}
|
|
192
186
|
let head = sq.head
|
|
193
187
|
if (work.length) {
|
|
194
188
|
const r = await this.block.commit({ message: landMessage(work.map((w) => w.path)) })
|
|
@@ -198,50 +192,6 @@ export class Lander {
|
|
|
198
192
|
return this.merge(c, sq, head)
|
|
199
193
|
}
|
|
200
194
|
|
|
201
|
-
/**
|
|
202
|
-
* Runs the gate on the work as it is now, at most one run at a time. Null when it passed (or is off);
|
|
203
|
-
* else what the look answers: held (red, or it can't run; one note per failure, not again until the
|
|
204
|
-
* work changes) or restarted (an edit came while it ran: tested again after the next quiet).
|
|
205
|
-
*/
|
|
206
|
-
async tested (sq) {
|
|
207
|
-
const since = this.lastEdit
|
|
208
|
-
const key = `${since} ${sq.head || sq.base}`
|
|
209
|
-
if (this.gateHeld && this.gateHeld.key === key) return { did: 'held', ...this.gateHeld.why }
|
|
210
|
-
const ac = new AbortController()
|
|
211
|
-
this.gateRun = ac
|
|
212
|
-
const was = this.state
|
|
213
|
-
this.state = { testing: { at: this.now() } }
|
|
214
|
-
let r
|
|
215
|
-
try { r = await this.gate({ signal: ac.signal }) } finally { this.gateRun = null }
|
|
216
|
-
if (!r || r.off) { this.state = was; return null }
|
|
217
|
-
if (r.stopped || this.lastEdit !== since) {
|
|
218
|
-
this.state = was
|
|
219
|
-
this.log('new edits came while the tests ran: they run again once the folder is quiet.')
|
|
220
|
-
this.soon(Math.max(0, this.lastEdit + this.quietMs - this.now()) + 50)
|
|
221
|
-
return { did: 'restarted' }
|
|
222
|
-
}
|
|
223
|
-
if (r.missing || !r.ok) {
|
|
224
|
-
const why = r.missing ? { missing: r.missing } : { failing: r.failing || [], code: r.code, ...(r.timedOut ? { timedOut: true } : {}) }
|
|
225
|
-
this.gateHeld = { key, why }
|
|
226
|
-
this.state = { held: { ...why, command: r.command || '', at: this.now() } }
|
|
227
|
-
const ran = `in a copy of your folder${r.command ? ` (${r.command})` : ''}`
|
|
228
|
-
const tail = 'It stays held; Quilt tries again after your next change.'
|
|
229
|
-
const failing = why.failing || []
|
|
230
|
-
let said = `Your held work did not land: the fast tests failed ${ran}${failing.length ? `: ${listed(failing)}` : ` (exit ${r.code}, no test named)`}. ${tail}`
|
|
231
|
-
if (r.timedOut) said = `Your held work did not land: the fast tests did not finish ${ran} in ${Math.round((r.ms || 0) / 60000)} min, so Quilt stopped them${failing.length ? ` (failed so far: ${listed(failing)})` : ''}. ${tail}`
|
|
232
|
-
if (r.missing) said = `Your held work did not land: ${r.missing}.`
|
|
233
|
-
const sig = r.missing ? `missing ${r.missing}` : `failing ${failing.join('\n') || r.code}`
|
|
234
|
-
if (sig !== this.gateSaid) { this.gateSaid = sig; this.notify(said) }
|
|
235
|
-
this.log(said)
|
|
236
|
-
return { did: 'held', ...why }
|
|
237
|
-
}
|
|
238
|
-
this.gateHeld = null
|
|
239
|
-
this.gateSaid = null
|
|
240
|
-
this.state = was
|
|
241
|
-
this.log(`the fast tests passed on the held work${r.command ? ` (${r.command}` : ' ('}${r.ms ? `, ${Math.round(r.ms / 1000)} s` : ''}): it lands.`)
|
|
242
|
-
return null
|
|
243
|
-
}
|
|
244
|
-
|
|
245
195
|
async merge (c, sq, head) {
|
|
246
196
|
const line = sq.line || this.line || 'main'
|
|
247
197
|
const message = await this.title(c, sq).catch(() => null)
|
package/src/ui/seam-model.js
CHANGED
|
@@ -84,7 +84,6 @@ export function catchUpWords (s) {
|
|
|
84
84
|
if (l && l.kept) out.push(`Main changed the same lines as your ${listed(l.kept.paths || [])}, so main's version stayed there; yours is kept in square sq:${String(l.kept.square || '').slice(-8)} ("${l.kept.title || ''}").`)
|
|
85
85
|
if (l && l.landed) out.push(`Your held work landed on ${l.landed.line || 'main'}${l.landed.patch != null ? ` as patch ${l.landed.patch}` : ''} at ${new Date(l.landed.at).toLocaleTimeString([], { hour: 'numeric', minute: '2-digit' })}, with no step of yours.`)
|
|
86
86
|
if (l && l.waiting) out.push(`Your held work is waiting to merge: ${l.waiting}`)
|
|
87
|
-
if (l && l.testing) out.push('Your held work is being tested (the fast tests, in a copy of this folder) before it lands.')
|
|
88
87
|
if (l && l.held) out.push(l.held.missing ? `Your held work did not land: ${l.held.missing}.` : `Your held work did not land: the fast tests failed${(l.held.failing || []).length ? ` (${listed(l.held.failing)})` : ''}. It lands after your next change once they pass.`)
|
|
89
88
|
return out
|
|
90
89
|
}
|
|
@@ -1,99 +0,0 @@
|
|
|
1
|
-
// Quilt's side of seam: live squares in a Quilt session. Seam (src/quilts/) never imports this.
|
|
2
|
-
// The gate before held work lands (land.js, Daniel 2026-11-03): once the folder has been quiet, the
|
|
3
|
-
// project's own fast tests run on the person's computer, in a fresh copy of the folder as the square
|
|
4
|
-
// holds it then (not the live folder, where edits arriving meanwhile would change what is tested), and
|
|
5
|
-
// the work lands only when they pass. The command is the project's fast test script (Quilt's AGENTS.md
|
|
6
|
-
// and package.json name it `test:fast`, unit and integration tests with the project's test setup;
|
|
7
|
-
// never the whole suite), or what the person set (setting `landGate`, env QUILT_LAND_GATE: a command,
|
|
8
|
-
// or `off`).
|
|
9
|
-
import fs from 'node:fs'
|
|
10
|
-
import os from 'node:os'
|
|
11
|
-
import path from 'node:path'
|
|
12
|
-
import { spawn } from 'node:child_process'
|
|
13
|
-
|
|
14
|
-
export const FAST_SCRIPT = 'test:fast'
|
|
15
|
-
// A run that takes longer is stopped and counts as failed (a test that never ends would hold the work for good).
|
|
16
|
-
export const GATE_TIMEOUT_MS = Number(process.env.QUILT_LAND_GATE_TIMEOUT_MS) > 0 ? Number(process.env.QUILT_LAND_GATE_TIMEOUT_MS) : 20 * 60 * 1000
|
|
17
|
-
// What a run keeps of its output for the note: its end, where the failing tests are listed.
|
|
18
|
-
const KEEP_OUT = 256 * 1024
|
|
19
|
-
// Copied into the fresh copy as links, never byte for byte: installed packages, and Quilt's own state.
|
|
20
|
-
const LINKED = new Set(['node_modules'])
|
|
21
|
-
const SKIPPED = new Set(['.quilt', '.git'])
|
|
22
|
-
|
|
23
|
-
/**
|
|
24
|
-
* What the gate runs in `dir`: { command } (a shell command), { off: true }, or { missing } (why it
|
|
25
|
-
* can't run: no fast test script, no installed packages). `env.QUILT_LAND_GATE` first, then the
|
|
26
|
-
* setting `landGate`, then the project's `test:fast` script.
|
|
27
|
-
*/
|
|
28
|
-
export function gateCommand (dir, { env = process.env, settings = {} } = {}) {
|
|
29
|
-
const set = String(env.QUILT_LAND_GATE ?? settings.landGate ?? '').trim()
|
|
30
|
-
if (set.toLowerCase() === 'off') return { off: true }
|
|
31
|
-
if (set) return { command: set }
|
|
32
|
-
let pkg = null
|
|
33
|
-
try { pkg = JSON.parse(fs.readFileSync(path.join(dir, 'package.json'), 'utf8')) } catch {}
|
|
34
|
-
if (!pkg) return { missing: 'this folder has no package.json, so Quilt has no fast tests to run before your work lands (set landGate to a command, or off)' }
|
|
35
|
-
if (!pkg.scripts || !pkg.scripts[FAST_SCRIPT]) return { missing: `package.json has no "${FAST_SCRIPT}" script, so Quilt has no fast tests to run before your work lands (add one, or set landGate to a command, or off)` }
|
|
36
|
-
if (!fs.existsSync(path.join(dir, 'node_modules'))) return { missing: 'this folder has no node_modules (run npm ci), so its tests can\'t run before your work lands' }
|
|
37
|
-
return { command: `npm run ${FAST_SCRIPT}` }
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
/** The failing tests a run names (node --test's "✖ failing tests:" list, else every ✖ line), at most 20. */
|
|
41
|
-
export function failingTests (out) {
|
|
42
|
-
const lines = String(out || '').split('\n')
|
|
43
|
-
const at = lines.findIndex((l) => /^✖ failing tests:/.test(l.trim()))
|
|
44
|
-
const pick = (from) => [...new Set(lines.slice(from).map((l) => l.trim()).filter((l) => /^✖ /.test(l) && !/^✖ failing tests:/.test(l)).map((l) => l.slice(2).replace(/\s*\(\d+(\.\d+)?m?s\)$/, '').trim()))]
|
|
45
|
-
return (at >= 0 ? pick(at + 1) : pick(0)).slice(0, 20)
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
/** A fresh copy of `dir` (copy-on-write where the disk can), its node_modules linked: the folder as it is now. */
|
|
49
|
-
export function freshCopy (dir, into = fs.mkdtempSync(path.join(os.tmpdir(), 'quilt-land-gate-'))) {
|
|
50
|
-
for (const name of fs.readdirSync(dir)) {
|
|
51
|
-
if (SKIPPED.has(name)) continue
|
|
52
|
-
const from = path.join(dir, name)
|
|
53
|
-
const to = path.join(into, name)
|
|
54
|
-
if (LINKED.has(name)) { fs.symlinkSync(from, to, 'dir'); continue }
|
|
55
|
-
const nested = []
|
|
56
|
-
fs.cpSync(from, to, { recursive: true, verbatimSymlinks: true, mode: fs.constants.COPYFILE_FICLONE, filter: (src) => { if (path.basename(src) !== 'node_modules' || src === from) return true; nested.push(src); return false } })
|
|
57
|
-
// A package's own node_modules further down (web/node_modules): linked too.
|
|
58
|
-
for (const src of nested) { const at = path.join(into, path.relative(dir, src)); fs.mkdirSync(path.dirname(at), { recursive: true }); fs.symlinkSync(src, at, 'dir') }
|
|
59
|
-
}
|
|
60
|
-
return into
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
/**
|
|
64
|
-
* Runs `command` in a fresh copy of `dir`. `signal` stops it (an edit arrived: what it tests is old).
|
|
65
|
-
* Answers { ok, code, ms, failing, out } or { stopped: true }. The copy is removed after.
|
|
66
|
-
*/
|
|
67
|
-
export async function runGate ({ dir, command, signal = null, env = process.env, timeoutMs = GATE_TIMEOUT_MS }) {
|
|
68
|
-
const t0 = Date.now()
|
|
69
|
-
const copy = freshCopy(dir)
|
|
70
|
-
// Never Quilt's own test runner's context: a gate started from inside a test would run as its child.
|
|
71
|
-
const { NODE_TEST_CONTEXT, ...rest } = env
|
|
72
|
-
try {
|
|
73
|
-
return await new Promise((resolve) => {
|
|
74
|
-
let out = ''
|
|
75
|
-
const child = spawn(command, { cwd: copy, shell: true, env: { ...rest, CI: rest.CI || '1' }, stdio: ['ignore', 'pipe', 'pipe'], detached: process.platform !== 'win32', windowsHide: true })
|
|
76
|
-
const take = (d) => { out += d; if (out.length > KEEP_OUT * 2) out = out.slice(-KEEP_OUT) }
|
|
77
|
-
child.stdout.on('data', take)
|
|
78
|
-
child.stderr.on('data', take)
|
|
79
|
-
let stopped = false
|
|
80
|
-
let timedOut = false
|
|
81
|
-
const kill = () => { try { if (process.platform !== 'win32') process.kill(-child.pid, 'SIGTERM'); else child.kill() } catch {} }
|
|
82
|
-
const stop = () => { stopped = true; kill() }
|
|
83
|
-
const timer = setTimeout(() => { timedOut = true; kill() }, timeoutMs)
|
|
84
|
-
timer.unref?.()
|
|
85
|
-
if (signal) { if (signal.aborted) stop(); else signal.addEventListener('abort', stop, { once: true }) }
|
|
86
|
-
child.on('error', (err) => resolve({ ok: false, code: -1, ms: Date.now() - t0, failing: [], out: String(err.message) }))
|
|
87
|
-
child.on('close', (code) => {
|
|
88
|
-
clearTimeout(timer)
|
|
89
|
-
if (signal) signal.removeEventListener('abort', stop)
|
|
90
|
-
if (stopped) return resolve({ stopped: true, ms: Date.now() - t0 })
|
|
91
|
-
if (timedOut) return resolve({ ok: false, code: null, timedOut: true, ms: Date.now() - t0, failing: failingTests(out.slice(-KEEP_OUT)), out: out.slice(-KEEP_OUT) })
|
|
92
|
-
out = out.slice(-KEEP_OUT)
|
|
93
|
-
resolve({ ok: code === 0, code, ms: Date.now() - t0, failing: code === 0 ? [] : failingTests(out), out })
|
|
94
|
-
})
|
|
95
|
-
})
|
|
96
|
-
} finally {
|
|
97
|
-
fs.rm(copy, { recursive: true, force: true }, () => {})
|
|
98
|
-
}
|
|
99
|
-
}
|