heyquilt 0.3.174 → 0.3.176
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 +6 -3
- package/RELEASES.md +30 -0
- package/bin/quilt.js +1 -75
- package/desktop/main.js +22 -9
- package/package.json +2 -3
- package/src/ai-vm.js +1 -1
- package/src/api/memory-store.js +1 -5
- package/src/api/server.js +4 -45
- package/src/api/supabase-store.js +0 -10
- package/src/autowork.js +7 -142
- package/src/base-pick.js +125 -12
- package/src/branch-view.js +1 -1
- package/src/connection.js +12 -37
- package/src/control.js +16 -93
- package/src/fsutil.js +1 -1
- package/src/git-aside.js +70 -0
- package/src/github-commit.js +1 -2
- package/src/gitstate.js +326 -0
- package/src/held.js +12 -53
- package/src/history.js +1 -25
- package/src/live-merge.js +42 -161
- package/src/mcp.js +6 -90
- package/src/merge3.js +21 -5
- package/src/pathrules.js +1 -1
- package/src/protocol.js +6 -11
- package/src/read-bases.js +3 -5
- package/src/relay-live-write.js +37 -44
- package/src/relay-mcp.js +30 -164
- package/src/relay-prune.js +3 -6
- package/src/relay-turn-sync.js +7 -11
- package/src/runner.js +2 -4
- package/src/server.js +61 -1717
- package/src/session.js +895 -844
- package/src/setup.js +11 -3
- package/src/status.js +2 -5
- package/src/swap-in.js +56 -13
- package/src/turn-sync-plan.js +2 -2
- package/src/turn-sync.js +1 -1
- package/src/ui/agent-guide.js +3 -1
- package/src/ui/app.css +4 -96
- package/src/ui/app.js +1 -1
- package/src/ui/chat.js +2 -6
- package/src/ui/cloud-ai-model.js +0 -13
- package/src/ui/cloud-ai.js +2 -10
- package/src/ui/connections.js +2 -1
- package/src/ui/fileview.js +7 -20
- package/src/ui/git-rule.js +2 -13
- package/src/ui/home.js +2 -8
- package/src/ui/session-words.js +27 -0
- package/src/ui/session.js +34 -407
- package/src/ui-server.js +7 -56
- package/src/api/routes/seam-connect.js +0 -103
- package/src/api/routes/session-migrate.js +0 -39
- package/src/force-date.js +0 -27
- package/src/quilt-default.js +0 -84
- package/src/quilt-history.js +0 -106
- package/src/quilt-remote.js +0 -78
- package/src/seam-access.js +0 -97
- package/src/seam-url.js +0 -15
- package/src/session-follow.js +0 -583
- package/src/session-layout3.js +0 -466
- package/src/session-migrate.js +0 -123
- package/src/session-quilt.js +0 -126
- package/src/session-seam.js +0 -312
- package/src/source-live/bring-in.js +0 -391
- package/src/source-live/land.js +0 -410
- package/src/source-live/live-block.js +0 -1166
- package/src/source-live/live-square.js +0 -116
- package/src/ui/force-words.js +0 -19
- package/src/ui/quiltview.js +0 -213
- package/src/ui/seam-model.js +0 -309
package/README.md
CHANGED
|
@@ -277,9 +277,12 @@ its writer started from.
|
|
|
277
277
|
open conflict, which keeps each held version with its writer. A conflict closes by
|
|
278
278
|
itself when its writer's own later write to those lines lands, or when the held
|
|
279
279
|
lines already match the file.
|
|
280
|
-
- **A save
|
|
281
|
-
|
|
282
|
-
|
|
280
|
+
- **A save made from an older copy.** A tool that read a file, then wrote all of it
|
|
281
|
+
back after a teammate's change reached the folder, would erase that change. Quilt
|
|
282
|
+
keeps the versions it put in the folder, finds the one the save was made from, and
|
|
283
|
+
puts the save on top of it: the teammate's change stays and the writer is told. A
|
|
284
|
+
save that only undoes a teammate's change looks the same; saved again, it is taken
|
|
285
|
+
as meant.
|
|
283
286
|
- **A conflict never sits.** Its writer's AI is woken at once (an agent through the way
|
|
284
287
|
it chose to be woken; every AI sees open conflicts at the top of every Quilt answer).
|
|
285
288
|
While an AI has an open conflict of its own, moving a task to QA or Done,
|
package/RELEASES.md
CHANGED
|
@@ -11,6 +11,36 @@ 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.176 — 2026-11-16
|
|
15
|
+
|
|
16
|
+
A clash stays in your own file for your AI to settle, the way git does it. And your folder follows the git branch you check out.
|
|
17
|
+
|
|
18
|
+
- **Your folder follows its git branch.** When you check out another branch in git (`git checkout`, `git switch`), your folder moves to that branch in the session by itself. The files git changed for the checkout are not sent to the branch you left, and nobody still on it gets them. A branch the session has not seen starts from your folder as git left it; on a branch the session already has, your folder gets the session's work there, uncommitted work included. Before this, the checkout went unnoticed and the other branch's files were shared as edits to the branch you started on.
|
|
19
|
+
- **Nothing is shared while git is at work.** While git is busy in your folder (a checkout, a pull, a stash, a rebase), Quilt takes nothing in from it and writes nobody's changes into it. It carries on about half a second after git is done, and nothing is lost: what you saved and what others changed meanwhile both arrive then.
|
|
20
|
+
- **Uncommitted work stays on its branch.** Work the session has on one branch, which git carries along when you switch, stays in the session on the branch it was made on. On a branch the session already has, your folder gets that branch's own files in its place.
|
|
21
|
+
- **Switched while Quilt was off.** When it starts again it joins the branch your folder is on now. What it had saved of the other branch is kept for when you go back, and is never mixed into this one.
|
|
22
|
+
- **A checkout of a commit** (a detached HEAD) gets a place of its own in the session, named after the commit. During a rebase or a bisect your folder stays on its branch and waits; what the rebase changed is shared when it is over.
|
|
23
|
+
- **Git may still ask you to stash first.** The session's uncommitted work is in your folder, so git refuses a checkout that would overwrite it, as it does with your own. `git stash` and then the checkout, one right after the other, is safe: neither is taken for an edit.
|
|
24
|
+
- **A clash stays in your file.** When your save changes the same lines someone else just changed, none of that save is shared. Your file gets both versions of those lines between conflict markers (`<<<<<<< mine`, `=======`, `>>>>>>> session`), with their other changes already merged in, and your AI is told why. Once it has settled them and saved, the file is shared. Nobody else ever gets a file with markers in it, and a partner's later change is never written over a file you are still settling.
|
|
25
|
+
- **No side record for it.** A clash between folders no longer parks your lines in a record that needs `quilt_resolve_merge`. Agents with no folder and apps before this version keep the old way for now.
|
|
26
|
+
|
|
27
|
+
## 0.3.175 — 2026-11-16
|
|
28
|
+
|
|
29
|
+
Quilt works with git only: its own source control is gone from the app, the relay and the AI tools. Two rules that held saves which clashed with nothing are gone too, and a save made from an old copy of a file no longer erases a teammate's change.
|
|
30
|
+
|
|
31
|
+
- **Git only.** A session's files are shared live and its code is committed with git, in your own folder, as in any git project. The source control Quilt had built in is removed: its panel and settings in the app, the search and blame views that read it, `quilt commit` and `quilt session`, and the tools AIs had for it.
|
|
32
|
+
- **Your folder's git comes back by itself.** A folder whose `.git` an earlier version had set aside in `.quilt` gets it back, whole, the next time its session starts.
|
|
33
|
+
- **Sessions saved by an earlier version open on their branches.** The relay puts such a session back on its branch documents when it loads it; work that was not on a branch is kept in the relay's archive for 30 days.
|
|
34
|
+
- **Open conflicts keep their card.** The card at the top of a session that lists changes held back is there for every session.
|
|
35
|
+
- **From source, the app restarts itself after a `git pull`** that brings new app code, a minute later.
|
|
36
|
+
- **No more false clashes.** A save is held only when you and someone else changed the same lines since your copy of the file. The 15-minute rule is gone: changing or removing a line a teammate added a moment ago is an ordinary edit, however recent it is. This is what kept holding edits to `.claude/launch.json`.
|
|
37
|
+
- **A merge is never held because the file would not parse.** Two changes that combine line by line go in, as they do in git; whoever saved last fixes the file if the two do not fit.
|
|
38
|
+
- **A save from an old copy keeps your teammate's change.** When a tool read a file, a teammate's change then reached your folder, and the tool wrote the whole file back from what it had read, the teammate's change used to be erased. Quilt now keeps the versions it put in your folder, finds the one the save was made from, and puts the save on top of it. The writer is told. If you meant to undo their change, save your version again and it goes in.
|
|
39
|
+
- **The "Keep a partner's new lines for" setting is gone**, with `quilt session stale-write`. There is nothing left for it to set.
|
|
40
|
+
- **A cloud agent is told who changed the lines first.** When a cloud agent's write or a `quilt sync` clashed with a change a teammate had just saved from their folder, the notice said "Someone changed the same lines first". It names the teammate now.
|
|
41
|
+
- **The guide for agents over HTTP no longer names a tool they don't have.** It told them about `quilt_set_work`, which only agents with the command line have.
|
|
42
|
+
- **No save is lost on Linux when it lands right after Quilt's write.** Linux stamps file times only every few milliseconds, so a save of the same length right after Quilt wrote a partner's change looked untouched, and the next change written there replaced it. Quilt now compares the file's contents before it writes over or lets go of a file, and reads again any file changed in the last couple of seconds instead of trusting its size and time.
|
|
43
|
+
|
|
14
44
|
## 0.3.174 — 2026-11-14
|
|
15
45
|
|
|
16
46
|
No save is ever lost when Quilt writes a partner's change into your folder, conflicts no longer pile up or sit unanswered, nothing is guessed about stale saves, and the claim tools are gone.
|
package/bin/quilt.js
CHANGED
|
@@ -47,12 +47,9 @@ Usage:
|
|
|
47
47
|
quilt run -- <command> [args...] Run a command with the session'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
|
-
quilt commit <message> In a session that is a quilt: commit the square this folder follows
|
|
51
50
|
quilt focus <what you're doing> Tell collaborators what you're working on
|
|
52
51
|
quilt chat-link [name] [--minutes N] Owner: a link for a chat-only AI (ChatGPT, claude.ai, Grok); 10 minutes
|
|
53
52
|
quilt chat-link extend <name> <minutes> Owner: keep a chat link working for that long from now
|
|
54
|
-
quilt session stale-write [minutes] How long a write may not remove lines someone else added (default 15;
|
|
55
|
-
the owner sets it, 0 turns it off); no minutes: show it
|
|
56
53
|
quilt invite Print this session's invite code
|
|
57
54
|
quilt workspace list|files|get|put|write|mkdir|mv|rm The workspace library (quilt workspace for help)
|
|
58
55
|
quilt stop Shut down everything quilt is running (relay, app, syncs)
|
|
@@ -106,7 +103,6 @@ async function main () {
|
|
|
106
103
|
case 'wake': return wakeCmd()
|
|
107
104
|
case 'voice': return voiceCmd()
|
|
108
105
|
case 'get': return getFile()
|
|
109
|
-
case 'commit': if (!argv.join(' ').trim()) fail('Usage: quilt commit <message>'); return simple('/square-commit', { message: argv.join(' ') }, (r) => r.text)
|
|
110
106
|
case 'run': return runCmd()
|
|
111
107
|
// Left in folders by git mode (gone in R3): stand-ins that let git work and take themselves out (src/git-leftovers.js).
|
|
112
108
|
case 'git-credential': return gitCredentialLeftover()
|
|
@@ -123,7 +119,6 @@ async function main () {
|
|
|
123
119
|
const name = argv.filter((a, k) => !(i >= 0 && (k === i || k === i + 1))).join(' ')
|
|
124
120
|
return simple('/chat-link', { name, minutes }, (r) => `Chat link for ${r.name}, until ${new Date(r.expiresAt).toLocaleTimeString()}:\n\n ${r.url}\n\nPaste it into ChatGPT, claude.ai or Grok with "Open this link and follow it to join our Quilt session."\nAnyone with it can act as ${r.name}. Extend it with \`quilt chat-link extend ${r.name} <minutes>\`; once it runs out, make a new one.`)
|
|
125
121
|
}
|
|
126
|
-
case 'session': return sessionCmd()
|
|
127
122
|
case 'invite': return invite()
|
|
128
123
|
case 'workspace': case 'workspaces': return workspaceCmd()
|
|
129
124
|
case 'stop': return stopAll()
|
|
@@ -213,8 +208,6 @@ async function apiCmd () {
|
|
|
213
208
|
siteUrl: env.QUILT_SITE_URL || 'http://localhost:3000',
|
|
214
209
|
trustProxy: /^(1|true|yes)$/i.test(env.QUILT_TRUST_PROXY || ''), log: console.log,
|
|
215
210
|
workspaces: env.QUILT_WORKSPACES === '1' || env.QUILT_WORKSPACES === 'true',
|
|
216
|
-
// New sessions are quilts from the start (Seam's plans/quilt-source-control/16, flags order 8): apps read it from /v1/features.
|
|
217
|
-
quiltSourceDefault: env.QUILT_SOURCE_DEFAULT === '1' || env.QUILT_SOURCE_DEFAULT === 'true',
|
|
218
211
|
// Secrets: the vault (quilt-vault) and the secret it calls this API with; off when not set.
|
|
219
212
|
vaultSecret: env.QUILT_VAULT_SECRET || '',
|
|
220
213
|
vaultUrl: env.QUILT_VAULT_URL || 'https://vault.heyquilt.com',
|
|
@@ -226,11 +219,6 @@ async function apiCmd () {
|
|
|
226
219
|
// Its own machines through Fly's Machines API (QUILT_API_FLY_TOKEN): more as load climbs, fewer as it drops (src/api/scaler.js).
|
|
227
220
|
apiFly: (await import('../src/api/api-machines.js')).apiFlyFromEnv(env),
|
|
228
221
|
...(env.QUILT_API_MAX_MACHINES ? { maxMachines: Number(env.QUILT_API_MAX_MACHINES) } : {}),
|
|
229
|
-
// Seam is its own service (Seam's docs/seam-service.md): its old routes here go on to it.
|
|
230
|
-
...(env.QUILT_SEAM_URL !== undefined ? { seamUrl: env.QUILT_SEAM_URL } : {}),
|
|
231
|
-
...(env.QUILT_SEAM_CLIENT_ID ? { seamClientId: env.QUILT_SEAM_CLIENT_ID } : {}),
|
|
232
|
-
...(env.QUILT_SEAM_SITE_URL ? { seamSiteUrl: env.QUILT_SEAM_SITE_URL } : {}),
|
|
233
|
-
...(env.QUILT_SEAM_CONNECT_SECRET ? { seamConnectSecret: env.QUILT_SEAM_CONNECT_SECRET } : {}),
|
|
234
222
|
// Voice: Cloudflare TURN for calls on networks that block a direct line, Workers AI for transcripts; each off when not set.
|
|
235
223
|
voice: {
|
|
236
224
|
turnKeyId: env.CLOUDFLARE_TURN_KEY_ID || '',
|
|
@@ -344,7 +332,6 @@ async function join () {
|
|
|
344
332
|
|
|
345
333
|
const { unsupportedRelay } = await import('../src/settings.js')
|
|
346
334
|
let conn
|
|
347
|
-
let fresh = false // a session this command starts: a quilt from the start when the API says so (src/quilt-default.js)
|
|
348
335
|
if (positionals[0]) {
|
|
349
336
|
try { conn = decodeInvite(positionals[0]) } catch (err) { fail(err.message) }
|
|
350
337
|
} else if (values.room) {
|
|
@@ -356,7 +343,6 @@ async function join () {
|
|
|
356
343
|
} else {
|
|
357
344
|
if (saved.server) console.log("This folder's last session ran on your computer's own relay, which Quilt no longer supports. Starting a new session.")
|
|
358
345
|
conn = newConn()
|
|
359
|
-
fresh = true
|
|
360
346
|
console.log('starting a new session')
|
|
361
347
|
}
|
|
362
348
|
|
|
@@ -398,7 +384,6 @@ async function join () {
|
|
|
398
384
|
apiAuth: auth.apiAuth,
|
|
399
385
|
identity: auth.identity,
|
|
400
386
|
inviteServer: saved.room === conn.room ? saved.inviteServer : undefined,
|
|
401
|
-
newSession: fresh,
|
|
402
387
|
onLog: (m) => console.log(`[${stamp()}] ${m}`),
|
|
403
388
|
onDebug: process.env.QUILT_DEBUG ? (m) => console.log(`[${stamp()}] debug: ${m}`) : undefined,
|
|
404
389
|
onFatal: (err) => fail(whyStopped(err))
|
|
@@ -580,65 +565,6 @@ async function doSetup () {
|
|
|
580
565
|
console.log('\nAn AI tool that was already open picks up the "quilt" MCP server when it restarts.')
|
|
581
566
|
}
|
|
582
567
|
|
|
583
|
-
// `quilt session migrate [--dry-run]` (Seam's plans/quilt-source-control/16): what making this folder's
|
|
584
|
-
// session a quilt (Seam) would do, read only, or, without --dry-run, the move itself. The relay
|
|
585
|
-
// does both, behind QUILT_SOURCE_URL there, and only for the session's owner. --switch then moves
|
|
586
|
-
// the session's files into its squares (layout 3); --back returns it to its branches. `follow <folder>`
|
|
587
|
-
// then makes that folder follow this branch's square live (session-follow.js).
|
|
588
|
-
async function sessionCmd () {
|
|
589
|
-
// stale_write_minutes (held.js): how long a write may not remove lines someone else added; the owner sets it, 0 turns it off.
|
|
590
|
-
if (argv[0] === 'stale-write') {
|
|
591
|
-
const say = (r) => r.minutes ? `A write that removes lines someone else added in the last ${r.minutes} minute${r.minutes === 1 ? '' : 's'} is held for its writer to confirm.` : 'The stale-write check is off: a write may remove any lines.'
|
|
592
|
-
if (argv[1] === undefined) return simple('/stale-write', undefined, say, 'GET')
|
|
593
|
-
const n = Number(argv[1])
|
|
594
|
-
if (!/^\d+$/.test(argv[1]) || n > 1440) fail('Usage: quilt session stale-write [minutes] (0 to 1440; 0 turns the check off)')
|
|
595
|
-
return simple('/stale-write', { minutes: n }, say)
|
|
596
|
-
}
|
|
597
|
-
if (argv[0] === 'follow') {
|
|
598
|
-
if (!argv[1]) fail('Usage: quilt session follow <folder>')
|
|
599
|
-
return simple('/quilt-follow', { dir: path.resolve(argv[1]) }, (r) => r.text)
|
|
600
|
-
}
|
|
601
|
-
if (argv[0] !== 'migrate') fail('Usage: quilt session migrate [--dry-run | --link-only | --switch | --back [--carried <square,...>] | --shadow <quilt> | --unshadow] | quilt session follow <folder> | quilt session stale-write [minutes]')
|
|
602
|
-
if (argv.includes('--dry-run')) return simple('/quilt-plan', {}, (r) => r.text)
|
|
603
|
-
if (argv.includes('--shadow')) {
|
|
604
|
-
const q = argv[argv.indexOf('--shadow') + 1]
|
|
605
|
-
if (!q || q.startsWith('-')) fail('Usage: quilt session migrate --shadow <quilt> (the quilt an import of this session\'s git remote fills)')
|
|
606
|
-
return simple('/quilt-shadow', { quilt: q }, (r) => r.text)
|
|
607
|
-
}
|
|
608
|
-
if (argv.includes('--unshadow')) return simple('/quilt-shadow', { quilt: null }, (r) => r.text)
|
|
609
|
-
if (argv.includes('--switch')) return sessionMove('/quilt-switch', {}, 'into its squares')
|
|
610
|
-
if (argv.includes('--back')) {
|
|
611
|
-
// --carried <id,id>: open squares whose work was carried over by hand (seam diff <square> | git apply).
|
|
612
|
-
const i = argv.indexOf('--carried')
|
|
613
|
-
const carried = i >= 0 && argv[i + 1] ? argv[i + 1].split(',').map((x) => x.trim().replace(/^sq:/, '')).filter(Boolean) : []
|
|
614
|
-
return sessionMove('/quilt-unswitch', { carried }, 'back to its branches')
|
|
615
|
-
}
|
|
616
|
-
// "Make this a quilt": made a quilt and moved into its squares in one go (16 flag 9); --link-only stops after the first.
|
|
617
|
-
if (argv.includes('--link-only')) return sessionMove('/quilt-migrate', {}, 'into Seam')
|
|
618
|
-
return sessionMove('/quilt-make', {}, 'into Seam')
|
|
619
|
-
}
|
|
620
|
-
|
|
621
|
-
/**
|
|
622
|
-
* A move of the session (into Seam, or back), through this folder's app. The relay does it; on a large
|
|
623
|
-
* session that takes minutes, so it says so first. An app that can't follow a square (older than
|
|
624
|
-
* 0.3.127) is sent away by the relay at the end of the move, and this command's answer is lost with it:
|
|
625
|
-
* refused here before anything moves. If the app stops answering meanwhile, the relay still finishes
|
|
626
|
-
* (or undoes) the move on its own: said, with how to see which.
|
|
627
|
-
*/
|
|
628
|
-
async function sessionMove (route, body, where) {
|
|
629
|
-
const { d, call } = await daemonOrFail()
|
|
630
|
-
let info = null
|
|
631
|
-
try { info = await call(d, 'GET', '/info') } catch (err) { fail(err.message) }
|
|
632
|
-
const { moveRefusal } = await import('../src/control.js')
|
|
633
|
-
const refused = moveRefusal(info, (await import('../src/releases.js')).currentVersion())
|
|
634
|
-
if (refused) fail(refused)
|
|
635
|
-
console.error(`Moving the session ${where}. The relay does it; a large session takes a few minutes. Keep Quilt open until this answers.`)
|
|
636
|
-
try { console.log((await call(d, 'POST', route, body)).text) } catch (err) {
|
|
637
|
-
if (err.cut) fail(`Quilt's app for ${d.dir} stopped answering while the relay moved the session (${err.code || 'the connection closed'}), so this command never heard how it went. The relay finishes the move, or undoes it, on its own. Open the session in Quilt again (if it says the session needs a newer version of Quilt, update Quilt first); then quilt status says whether this folder follows its square.`)
|
|
638
|
-
fail(err.message)
|
|
639
|
-
}
|
|
640
|
-
}
|
|
641
|
-
|
|
642
568
|
async function daemonOrFail () {
|
|
643
569
|
const { findDaemon, call } = await import('../src/control.js')
|
|
644
570
|
const d = findDaemon()
|
|
@@ -654,7 +580,7 @@ async function status () {
|
|
|
654
580
|
async function history () {
|
|
655
581
|
const { values, positionals } = parseArgs({ args: argv, allowPositionals: true, options: { by: { type: 'string' }, since: { type: 'string' }, task: { type: 'string' }, diff: { type: 'boolean' }, n: { type: 'string', short: 'n' } } })
|
|
656
582
|
const { formatHistory } = await import('../src/history.js')
|
|
657
|
-
await simple('/history', { path: positionals[0], by: values.by, since: values.since, task: values.task, limit: Number(values.n || 30), with_diff: !!values.diff }, (r) =>
|
|
583
|
+
await simple('/history', { path: positionals[0], by: values.by, since: values.since, task: values.task, limit: Number(values.n || 30), with_diff: !!values.diff }, (r) => formatHistory(r.entries, { withDiff: !!values.diff }))
|
|
658
584
|
}
|
|
659
585
|
|
|
660
586
|
async function simple (route, body, format, method = 'POST') {
|
package/desktop/main.js
CHANGED
|
@@ -136,6 +136,7 @@ async function start () {
|
|
|
136
136
|
Menu.setApplicationMenu(appMenu())
|
|
137
137
|
makeTray()
|
|
138
138
|
createWindow()
|
|
139
|
+
watchOwnCode()
|
|
139
140
|
}
|
|
140
141
|
|
|
141
142
|
/** Light, Dark or System, as the app calls them; anything else is the app's default, dark. */
|
|
@@ -180,9 +181,9 @@ function devRestart () {
|
|
|
180
181
|
return { ok: true }
|
|
181
182
|
}
|
|
182
183
|
|
|
183
|
-
// Run from source, the app restarts by itself when
|
|
184
|
-
//
|
|
185
|
-
//
|
|
184
|
+
// Run from source, the app restarts by itself when a git pull brings new app code into the folder it runs
|
|
185
|
+
// from, a minute after the last one, so a fix to the app needs nobody to press Restart (Daniel, 2026-11-05).
|
|
186
|
+
// Local edits and commits alone (agents' saves) never restart it.
|
|
186
187
|
const APP_ROOT = path.resolve(HERE, '..')
|
|
187
188
|
const APP_STARTED = Date.now()
|
|
188
189
|
function appCodeChanged () {
|
|
@@ -199,13 +200,25 @@ function appCodeChanged () {
|
|
|
199
200
|
}
|
|
200
201
|
return ['src', 'desktop', 'bin'].some((d) => newer(path.join(APP_ROOT, d)))
|
|
201
202
|
}
|
|
203
|
+
// What git last did to HEAD here, from the end of its log: a pull, merge or rebase brings other people's commits.
|
|
204
|
+
function lastHeadMoveBroughtCode () {
|
|
205
|
+
try {
|
|
206
|
+
const lines = fs.readFileSync(path.join(APP_ROOT, '.git', 'logs', 'HEAD'), 'utf8').trimEnd().split('\n')
|
|
207
|
+
return /\t(pull|merge|rebase)\b/.test(lines[lines.length - 1] || '')
|
|
208
|
+
} catch { return false }
|
|
209
|
+
}
|
|
202
210
|
let ownCodeTimer = null
|
|
203
|
-
|
|
204
|
-
if (app.isPackaged
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
211
|
+
function watchOwnCode () {
|
|
212
|
+
if (app.isPackaged) return
|
|
213
|
+
try {
|
|
214
|
+
fs.watchFile(path.join(APP_ROOT, '.git', 'logs', 'HEAD'), { interval: 5000 }, () => {
|
|
215
|
+
if (!lastHeadMoveBroughtCode()) return
|
|
216
|
+
clearTimeout(ownCodeTimer)
|
|
217
|
+
ownCodeTimer = setTimeout(() => { if (!quitting && appCodeChanged()) devRestart() }, 60_000)
|
|
218
|
+
ownCodeTimer.unref?.()
|
|
219
|
+
})
|
|
220
|
+
} catch {}
|
|
221
|
+
}
|
|
209
222
|
|
|
210
223
|
function createWindow () {
|
|
211
224
|
win = new BrowserWindow({
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "heyquilt",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.176",
|
|
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",
|
|
@@ -37,7 +37,6 @@
|
|
|
37
37
|
"dependencies": {
|
|
38
38
|
"@fontsource/ibm-plex-mono": "^5.3.0",
|
|
39
39
|
"@fontsource/poppins": "^5.3.0",
|
|
40
|
-
"@heyquilt/seam": "0.237.359",
|
|
41
40
|
"@modelcontextprotocol/sdk": "^1.30.1",
|
|
42
41
|
"@noble/hashes": "^2.4.0",
|
|
43
42
|
"@supabase/supabase-js": "^2.117.2",
|
|
@@ -71,7 +70,7 @@
|
|
|
71
70
|
"build": {
|
|
72
71
|
"appId": "dev.quilt.app",
|
|
73
72
|
"productName": "Quilt",
|
|
74
|
-
"copyright": "Copyright
|
|
73
|
+
"copyright": "Copyright \u00a9 2026 Daniel Carmichael. All rights reserved.",
|
|
75
74
|
"directories": {
|
|
76
75
|
"buildResources": "desktop/build",
|
|
77
76
|
"output": "dist"
|
package/src/ai-vm.js
CHANGED
|
@@ -526,7 +526,7 @@ export class AiVm {
|
|
|
526
526
|
kind: 'agent',
|
|
527
527
|
passes: auth.passes,
|
|
528
528
|
identity: auth.identity,
|
|
529
|
-
// The accounts API
|
|
529
|
+
// The accounts API as this cloud AI, with its own key.
|
|
530
530
|
apiAuth: auth.apiAuth,
|
|
531
531
|
agentFeed: false,
|
|
532
532
|
onLog: (line) => this.log(`[${room}] ${line}`),
|
package/src/api/memory-store.js
CHANGED
|
@@ -58,7 +58,7 @@ export function createMemoryStore ({ now = Date.now } = {}) {
|
|
|
58
58
|
const hostedRooms = new Map() // "account\nroom" -> { account, room, addedAt }
|
|
59
59
|
const hostedWebhooks = new Map(); const resumeSignatures = new Map()
|
|
60
60
|
// Secrets (20261018000000_secrets.sql): only what the vault sealed.
|
|
61
|
-
const
|
|
61
|
+
const secretRows = new Map(); const secretDataKeys = new Map(); const secretSettingsRows = new Map()
|
|
62
62
|
const secretTickets = new Map(); const secretRuns = new Map(); const secretAsks = new Map(); const secretUses = []
|
|
63
63
|
// App connections (20261112000000_app_connections.sql).
|
|
64
64
|
const appConnections = new Map(); const appCalls = new Map()
|
|
@@ -1232,10 +1232,6 @@ export function createMemoryStore ({ now = Date.now } = {}) {
|
|
|
1232
1232
|
if (!secretDataKeys.has(k)) secretDataKeys.set(k, { scopeType, scopeId, version, sealedKey, provider, createdAt: now() })
|
|
1233
1233
|
return copy(secretDataKeys.get(k))
|
|
1234
1234
|
},
|
|
1235
|
-
// "Connect Seam" (routes/seam-connect.js): the person's Seam tokens, one row per Quilt user.
|
|
1236
|
-
async seamLink (userId) { return copy(seamLinks.get(userId)) || null },
|
|
1237
|
-
async putSeamLink (userId, link) { const row = { userId, access: link.access, refresh: link.refresh, scope: link.scope || '', expiresAt: link.expiresAt, connectedAt: link.connectedAt ?? now() }; seamLinks.set(userId, copy(row)); return copy(row) },
|
|
1238
|
-
async deleteSeamLink (userId) { seamLinks.delete(userId) },
|
|
1239
1235
|
async secretSettings (scopeType, scopeId) {
|
|
1240
1236
|
return copy(secretSettingsRows.get(scopeKey(scopeType, scopeId))) || { scopeType, scopeId, inheritOff: false, inheritOffBy: null, inheritOffAt: null, agentsOn: false, agents: 'all', updatedAt: null }
|
|
1241
1237
|
},
|
package/src/api/server.js
CHANGED
|
@@ -29,7 +29,6 @@ import { releaseSource } from './releases.js'
|
|
|
29
29
|
import { sessionRoutes, nowRoutes, nowAsker, overviewOf } from './routes/sessions.js'
|
|
30
30
|
import { notifier, NOTIFY_EVERY_MS } from './notify.js'
|
|
31
31
|
import { browserRoutes } from './routes/browsers.js'
|
|
32
|
-
import { sessionMigrateRoutes } from './routes/session-migrate.js'
|
|
33
32
|
import { accessTypeRoutes } from './routes/access-types.js'
|
|
34
33
|
import { grantRoutes } from './routes/grants.js'
|
|
35
34
|
import { sessionInviteRoutes } from './routes/session-invites.js'
|
|
@@ -38,7 +37,6 @@ import { workspaceFileRoutes } from './routes/workspace-files.js'
|
|
|
38
37
|
import { workspaceAgentRoutes } from './routes/workspace-agents.js'
|
|
39
38
|
import { workspaceInviteRoutes } from './routes/workspace-invites.js'
|
|
40
39
|
import { HOSTED_RELAY } from '../settings.js'
|
|
41
|
-
import { seamConnectRoutes } from './routes/seam-connect.js'
|
|
42
40
|
import { roomAccessFrom } from './access.js'
|
|
43
41
|
import { joiningRoom, sessionArg } from '../mcp-room.js'
|
|
44
42
|
import { issueRoutes } from './routes/issues.js'
|
|
@@ -51,7 +49,6 @@ import { mailRoutes } from './routes/mail.js'
|
|
|
51
49
|
import { connectionRoutes } from './routes/connections.js'
|
|
52
50
|
import { composioClient } from './composio.js'
|
|
53
51
|
import { agentWakeRoutes } from './routes/agent-wake.js'
|
|
54
|
-
import { workspaceReach } from './workspace-reach.js'
|
|
55
52
|
import { leader, LEADER_ONLY } from './leader.js'
|
|
56
53
|
import { autoscale } from './autoscale.js'
|
|
57
54
|
import { scaler as machineScaler } from './scaler.js'
|
|
@@ -78,7 +75,7 @@ const MCP_TIMEOUT_MS = 30 * 1000
|
|
|
78
75
|
// a change to its grant reaches it as soon as it reaches a connected app.
|
|
79
76
|
const PASS_REUSE_MARGIN_MS = 5 * 60 * 1000
|
|
80
77
|
|
|
81
|
-
export function startApi ({ port = 0, host = '127.0.0.1', store, verifyUser, siteUrl, apiUrl = 'https://api.heyquilt.com', mailer = { send: async () => { throw new Error('no mailer configured') } }, now = Date.now, log = () => {}, startLimit = 10, inviteLimit = 10, inviteSendLimit = 20, tokenLimit = 30, joinLimit = 20, trustProxy = false, maxStartKeys = 10_000, passKey = '', passLimit = 60, relayUrl = HOSTED_RELAY, mcpLimit = 600, reportKey = '', reportLimit = 10, slowMs = 2000, pruneEveryMs = 60 * 60 * 1000, keepEventsMs = 30 * 24 * 60 * 60 * 1000, keepIssuesMs = 90 * 24 * 60 * 60 * 1000, pruneStartMs = 10_000, relaySecret = '', workspaces = false,
|
|
78
|
+
export function startApi ({ port = 0, host = '127.0.0.1', store, verifyUser, siteUrl, apiUrl = 'https://api.heyquilt.com', mailer = { send: async () => { throw new Error('no mailer configured') } }, now = Date.now, log = () => {}, startLimit = 10, inviteLimit = 10, inviteSendLimit = 20, tokenLimit = 30, joinLimit = 20, trustProxy = false, maxStartKeys = 10_000, passKey = '', passLimit = 60, relayUrl = HOSTED_RELAY, mcpLimit = 600, reportKey = '', reportLimit = 10, slowMs = 2000, pruneEveryMs = 60 * 60 * 1000, keepEventsMs = 30 * 24 * 60 * 60 * 1000, keepIssuesMs = 90 * 24 * 60 * 60 * 1000, pruneStartMs = 10_000, relaySecret = '', workspaces = false, fileStore = null, maxFileBytes = 500 * 1024 * 1024, workspaceQuotaBytes = 5 * 1024 * 1024 * 1024, maxWorkspaceFiles = 2000, webhookFetch = globalThis.fetch, webhookLookup, allowLocalWebhooks = false, github = null, githubFetch = globalThis.fetch, fly = null, aiVmWaitMs = AI_VM_WAIT_MS, aiVmSpareSuspendMs, relayFetch = null, relayFly = null, heavy = null, relayTargets = null, clusterTiming = {}, vaultSecret = '', vaultUrl = 'https://vault.heyquilt.com', allowLocalUpstreams = false, secretWaitMs, voice = {}, voiceFetch = globalThis.fetch, voiceSocket, mail = {}, mailFetch = globalThis.fetch, composioKey = '', composioFetch = globalThis.fetch, appCallsPerDay = 500, appWaitMs, machineId = '', leaderTiming = {}, autoscaleTiming = {}, exit = () => process.exit(0), apiFly = null, maxMachines, notifyEveryMs = NOTIFY_EVERY_MS }) {
|
|
82
79
|
// PASS_SIGNING_KEY. A bad one should stop the API at start, not fail every pass later.
|
|
83
80
|
if (passKey) passPublicKey(passKey)
|
|
84
81
|
const site = String(siteUrl || '').replace(/\/+$/, '')
|
|
@@ -255,8 +252,7 @@ export function startApi ({ port = 0, host = '127.0.0.1', store, verifyUser, sit
|
|
|
255
252
|
['GET', /^\/healthz$/, async () => ({ ok: true })],
|
|
256
253
|
|
|
257
254
|
// Which optional parts this API has on, for the app and the MCPs to decide what to show. Public.
|
|
258
|
-
|
|
259
|
-
['GET', /^\/v1\/features$/, async () => ({ workspaces: !!workspaces, secrets: !!vaultSecret, connections: !!composioKey, quilt_source_default: !!quiltSourceDefault })],
|
|
255
|
+
['GET', /^\/v1\/features$/, async () => ({ workspaces: !!workspaces, secrets: !!vaultSecret, connections: !!composioKey })],
|
|
260
256
|
|
|
261
257
|
['POST', /^\/v1\/device\/start$/, async (req, body) => {
|
|
262
258
|
limitStarts(req)
|
|
@@ -439,7 +435,7 @@ export function startApi ({ port = 0, host = '127.0.0.1', store, verifyUser, sit
|
|
|
439
435
|
exit()
|
|
440
436
|
}
|
|
441
437
|
})
|
|
442
|
-
//
|
|
438
|
+
// Nothing waits on GitHub at start.
|
|
443
439
|
const githubReady = Promise.resolve()
|
|
444
440
|
// A person's AI on its own cloud machine (routes/ai-vm.js): off (503) without Fly set up. Only the leader runs it.
|
|
445
441
|
const aiVm = aiVmRoutes({ ...ctx, relayUrl, fly, waitMs: aiVmWaitMs, spareSuspendMs: aiVmSpareSuspendMs, leads: lead.leads })
|
|
@@ -449,7 +445,7 @@ export function startApi ({ port = 0, host = '127.0.0.1', store, verifyUser, sit
|
|
|
449
445
|
if (notifyEveryMs > 0) notices.start()
|
|
450
446
|
// Git rules went with git mode (R3): nothing to tell the relay.
|
|
451
447
|
const policyChanged = () => {}
|
|
452
|
-
routes.push(...orgRoutes(ctx), ...memberRoutes(ctx), ...teamRoutes({ ...ctx, policyChanged }), ...inviteRoutes(ctx), ...agentRoutes({ ...ctx, passKey }), ...agentInviteRoutes({ ...ctx, workspaces }), ...joinRoutes(ctx), ...relayRoutes(ctx), ...relayClusterRoutes({ ...ctx, cluster }), ...sessionRoutes(ctx), ...nowRoutes({ ...ctx, cluster, relayOn: !!(relay && relaySecret) }), ...browserRoutes(ctx), ...
|
|
448
|
+
routes.push(...orgRoutes(ctx), ...memberRoutes(ctx), ...teamRoutes({ ...ctx, policyChanged }), ...inviteRoutes(ctx), ...agentRoutes({ ...ctx, passKey }), ...agentInviteRoutes({ ...ctx, workspaces }), ...joinRoutes(ctx), ...relayRoutes(ctx), ...relayClusterRoutes({ ...ctx, cluster }), ...sessionRoutes(ctx), ...nowRoutes({ ...ctx, cluster, relayOn: !!(relay && relaySecret) }), ...browserRoutes(ctx), ...accessTypeRoutes(ctx), ...grantRoutes({ ...ctx, workspaces }), ...sessionInviteRoutes({ ...ctx, workspaces }), ...issueRoutes(ctx))
|
|
453
449
|
// Always routed: with the flag off each answers a plain 404 of its own, so the app's
|
|
454
450
|
// check at every launch isn't filed as a missing route.
|
|
455
451
|
// Only these take a hosted agent's pass (workspaceReach), so they alone get the pass key.
|
|
@@ -480,19 +476,6 @@ export function startApi ({ port = 0, host = '127.0.0.1', store, verifyUser, sit
|
|
|
480
476
|
routes.push(...connectionRoutes({ ...ctx, passKey, composio: composioClient({ apiKey: composioKey, fetch: composioFetch, log }), callsPerDay: appCallsPerDay, sayInRoom, ...(appWaitMs !== undefined ? { waitMs: appWaitMs } : {}) }))
|
|
481
477
|
// How Quilt wakes each agent (routes/agent-wake.js): step 2 of joining.
|
|
482
478
|
routes.push(...agentWakeRoutes({ ...ctx, passKey, mail, mailFetch, makeLimiter }))
|
|
483
|
-
// Seam (src/quilts/, Seam's plans/quilt-source-control/) is its own service at seamUrl. This API is its
|
|
484
|
-
// identity service for Quilt accounts: GET /v1/seam/me says who is calling, as a quilt member
|
|
485
|
-
// { member_id, kind, name, tool?, on_behalf_of? }, for a person's sign-in, an agent key or a pass.
|
|
486
|
-
const seamCaller = workspaceReach({ ...ctx, passKey })
|
|
487
|
-
const identifySeamMember = async (req) => {
|
|
488
|
-
const c = await seamCaller.caller(req)
|
|
489
|
-
if (c.agent) return { member_id: c.account, kind: 'agent', name: c.agent.name || 'agent', ...(c.agent.provider ? { tool: String(c.agent.provider).toLowerCase() } : {}), ...(c.agent.ownerUserId ? { on_behalf_of: `person:${c.agent.ownerUserId}` } : {}) }
|
|
490
|
-
const p = c.userId && store.profile ? await store.profile(c.userId).catch(() => null) : null
|
|
491
|
-
return { member_id: c.account, kind: 'person', name: (p && p.name) || 'person' }
|
|
492
|
-
}
|
|
493
|
-
routes.push(['GET', /^\/v1\/seam\/me$/, (req) => identifySeamMember(req)])
|
|
494
|
-
// "Connect Seam": a person links their own Seam account (Seam's OAuth); off without seamClientId.
|
|
495
|
-
routes.push(...seamConnectRoutes({ store, person, now, apiUrl: api, seamUrl, seamSiteUrl, clientId: seamClientId, secret: seamConnectSecret || passKey, fetch: seamFetch, log }))
|
|
496
479
|
|
|
497
480
|
async function openLink (code) {
|
|
498
481
|
const userCode = normalizeUserCode(code)
|
|
@@ -555,7 +538,6 @@ export function startApi ({ port = 0, host = '127.0.0.1', store, verifyUser, sit
|
|
|
555
538
|
try {
|
|
556
539
|
if (pathname.startsWith('/v1/file-data/') && files instanceof DiskStore) return await serveFileData(req, res, send, pathname.slice('/v1/file-data/'.length))
|
|
557
540
|
if (pathname === '/mcp') return await proxyMcp(req, res, send)
|
|
558
|
-
if (SEAM_PATH.test(pathname)) return await forwardSeam(req, res)
|
|
559
541
|
if (req.method === 'GET' && (pathname === '/v1/releases/latest' || pathname.startsWith('/v1/download/'))) return await serveRelease(req, res, send, pathname)
|
|
560
542
|
const url = new URL(req.url, 'http://x')
|
|
561
543
|
const route = routes.find(([m, re]) => m === req.method && re.test(url.pathname))
|
|
@@ -587,25 +569,6 @@ export function startApi ({ port = 0, host = '127.0.0.1', store, verifyUser, sit
|
|
|
587
569
|
}
|
|
588
570
|
})
|
|
589
571
|
|
|
590
|
-
// Seam's routes moved to Seam's own server (Seam's docs/seam-service.md): old seam commands and sites
|
|
591
|
-
// still call them here, so they go on to seamUrl as sent, and Seam's answer comes straight back.
|
|
592
|
-
async function forwardSeam (req, res) {
|
|
593
|
-
if (!seamUrl) throw new HttpError(404, 'not found')
|
|
594
|
-
const headers = {}
|
|
595
|
-
for (const h of ['authorization', 'content-type', 'accept']) if (req.headers[h]) headers[h] = req.headers[h]
|
|
596
|
-
const hasBody = !['GET', 'HEAD', 'DELETE'].includes(req.method)
|
|
597
|
-
let up
|
|
598
|
-
try {
|
|
599
|
-
up = await seamFetch(seamUrl.replace(/\/+$/, '') + req.url, { method: req.method, headers, ...(hasBody ? { body: await readRaw(req, SEAM_MAX_BODY), duplex: 'half' } : {}), redirect: 'manual' })
|
|
600
|
-
} catch (err) {
|
|
601
|
-
if (err instanceof HttpError) throw err
|
|
602
|
-
throw new HttpError(502, 'Seam did not answer; try again')
|
|
603
|
-
}
|
|
604
|
-
const body = Buffer.from(await up.arrayBuffer())
|
|
605
|
-
res.writeHead(up.status, { 'content-type': up.headers.get('content-type') || 'application/json', 'cache-control': 'no-store', ...cors(req) })
|
|
606
|
-
res.end(body)
|
|
607
|
-
}
|
|
608
|
-
|
|
609
572
|
// Downloads and the update check (releases.js): public, from the private repository's latest
|
|
610
573
|
// release, read as Quilt's GitHub App. A download is a redirect to GitHub's own short-lived link.
|
|
611
574
|
const releases = releaseSource({ github, fetch: githubFetch, now, apiUrl: api })
|
|
@@ -773,10 +736,6 @@ export function startApi ({ port = 0, host = '127.0.0.1', store, verifyUser, sit
|
|
|
773
736
|
// Which room a hosted agent's MCP request is about: shared with the relay (src/mcp-room.js).
|
|
774
737
|
export { joiningRoom, sessionArg } from '../mcp-room.js'
|
|
775
738
|
|
|
776
|
-
// Seam's routes, answered by Seam's own server now (forwardSeam). Its biggest body is a pack.
|
|
777
|
-
const SEAM_PATH = /^\/v1\/(quilts|imports|search|signing-keys)(\/|$)/
|
|
778
|
-
const SEAM_MAX_BODY = 96 * 1024 * 1024
|
|
779
|
-
|
|
780
739
|
function decodePart (s) {
|
|
781
740
|
try { return decodeURIComponent(s) } catch { throw new HttpError(400, 'bad path') }
|
|
782
741
|
}
|
|
@@ -902,16 +902,6 @@ export function createSupabaseStore ({ url, serviceKey, client, fetch: authFetch
|
|
|
902
902
|
await one(db.from('secret_data_keys').upsert({ scope_type: scopeType, scope_id: scopeId, version, sealed_key: sealedKey, provider }, { onConflict: 'scope_type,scope_id,version', ignoreDuplicates: true }))
|
|
903
903
|
return rowFrom(await one(db.from('secret_data_keys').select(SECRET_DATA_KEY).eq('scope_type', scopeType).eq('scope_id', scopeId).eq('version', version).single()))
|
|
904
904
|
},
|
|
905
|
-
// "Connect Seam" (routes/seam-connect.js): the person's Seam tokens, one row per Quilt user.
|
|
906
|
-
async seamLink (userId) {
|
|
907
|
-
const r = await one(db.from('seam_links').select('user_id,access_token,refresh_token,scope,expires_at,connected_at').eq('user_id', userId).maybeSingle())
|
|
908
|
-
return r ? { userId: r.user_id, access: r.access_token, refresh: r.refresh_token, scope: r.scope, expiresAt: Date.parse(r.expires_at), connectedAt: Date.parse(r.connected_at) } : null
|
|
909
|
-
},
|
|
910
|
-
async putSeamLink (userId, link) {
|
|
911
|
-
await one(db.from('seam_links').upsert({ user_id: userId, access_token: link.access, refresh_token: link.refresh, scope: link.scope || '', expires_at: ts(link.expiresAt), connected_at: ts(link.connectedAt ?? Date.now()), updated_at: new Date().toISOString() }, { onConflict: 'user_id' }))
|
|
912
|
-
return { userId, access: link.access, refresh: link.refresh, scope: link.scope || '', expiresAt: link.expiresAt, connectedAt: link.connectedAt ?? Date.now() }
|
|
913
|
-
},
|
|
914
|
-
async deleteSeamLink (userId) { await one(db.from('seam_links').delete().eq('user_id', userId)) },
|
|
915
905
|
async secretSettings (scopeType, scopeId) {
|
|
916
906
|
const r = rowFrom(await one(db.from('secret_scope_settings').select(SECRET_SETTINGS).eq('scope_type', scopeType).eq('scope_id', scopeId).maybeSingle()))
|
|
917
907
|
return r || { scopeType, scopeId, inheritOff: false, inheritOffBy: null, inheritOffAt: null, agentsOn: false, agents: 'all', updatedAt: null }
|