@zabaca/zbc 0.18.0 → 0.19.0
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/package.json +1 -1
- package/templates/apps/walgit/CONTEXT.md +5 -1
- package/templates/apps/walgit/shared/container-env.ts +81 -0
- package/templates/apps/walgit/shared/landing.ts +566 -159
- package/templates/apps/walgit/shared/llms.ts +25 -3
- package/templates/apps/walgit/src/proposals.ts +47 -11
- package/templates/apps/walgit/src/signers.ts +44 -3
- package/templates/apps/walgit/worker/index.ts +43 -37
- package/templates/infra/modules/cloudflare/index.ts +106 -6
|
@@ -74,52 +74,58 @@ function describeHours(hours: number): string {
|
|
|
74
74
|
return `${hours} hours`
|
|
75
75
|
}
|
|
76
76
|
|
|
77
|
+
/**
|
|
78
|
+
* A cap without its exact byte count.
|
|
79
|
+
*
|
|
80
|
+
* `describeBytes` renders `99 MiB (103809024 bytes)` because the refusal it was
|
|
81
|
+
* written for is read by a client comparing a number to its own, and a
|
|
82
|
+
* parenthetical there is the difference between a machine acting on the message
|
|
83
|
+
* and a machine guessing at a rounded figure. On a page somebody is deciding
|
|
84
|
+
* whether to use this host at all, the same nine digits are noise in the middle
|
|
85
|
+
* of a sentence — and `The rules.` is where every term is being cut to what
|
|
86
|
+
* scans.
|
|
87
|
+
*
|
|
88
|
+
* DERIVED from `describeBytes` rather than formatted again, which is the whole
|
|
89
|
+
* care here: the invariant this file keeps is that the cap the page prints and
|
|
90
|
+
* the cap `pre-receive` refuses on cannot look like two different numbers, and
|
|
91
|
+
* a second formatter is exactly how they would. Stripping a suffix off the one
|
|
92
|
+
* rendering cannot change the figure in front of it, so the page still cannot
|
|
93
|
+
* disagree with the hook — it only says less.
|
|
94
|
+
*/
|
|
95
|
+
function shortBytes(bytes: number): string {
|
|
96
|
+
return describeBytes(bytes).replace(/ \(\d+ bytes\)$/, '')
|
|
97
|
+
}
|
|
98
|
+
|
|
77
99
|
const claim = (key: string, value: string) =>
|
|
78
100
|
` <li><span class="k">${key}</span><span class="v">${value}</span></li>`
|
|
79
101
|
|
|
80
102
|
/**
|
|
81
|
-
* The
|
|
103
|
+
* The size caps, as fine print.
|
|
82
104
|
*
|
|
83
|
-
*
|
|
84
|
-
*
|
|
85
|
-
*
|
|
86
|
-
*
|
|
87
|
-
*
|
|
105
|
+
* These used to be the fourth term in `The rules.`, and the retention window
|
|
106
|
+
* before them. Neither is a feature: a cap is a safeguard against one push
|
|
107
|
+
* costing what a thousand should, and a term is a highlight. So the caps join
|
|
108
|
+
* the window in the caveat under the roadmap — stated once, in the muted line
|
|
109
|
+
* a reader checks before pointing an agent loop here, and never sold. The
|
|
110
|
+
* figures still derive from `describeBytes`, so the page cannot print a cap
|
|
111
|
+
* `pre-receive` does not refuse on. Empty when a deployment enforces none.
|
|
88
112
|
*/
|
|
89
|
-
function
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
`<b>A repository lives ${window} from its last push.</b> This is scratch space, on purpose.`,
|
|
95
|
-
)
|
|
96
|
-
}
|
|
97
|
-
if (caps.maxPushBytes !== null || caps.maxRepoBytes !== null) {
|
|
98
|
-
const parts: string[] = []
|
|
99
|
-
if (caps.maxPushBytes !== null) parts.push(`${describeBytes(caps.maxPushBytes)} per push`)
|
|
100
|
-
if (caps.maxRepoBytes !== null) {
|
|
101
|
-
parts.push(`${describeBytes(caps.maxRepoBytes)} per repository`)
|
|
102
|
-
}
|
|
103
|
-
return claim(
|
|
104
|
-
'Bounded',
|
|
105
|
-
`<b>${parts.join(', ')}.</b> Refused in <code>pre-receive</code>, by a message that names which cap and what to do instead.`,
|
|
106
|
-
)
|
|
107
|
-
}
|
|
108
|
-
return ''
|
|
113
|
+
function sizeLimits(caps: Capabilities): string {
|
|
114
|
+
const parts: string[] = []
|
|
115
|
+
if (caps.maxPushBytes !== null) parts.push(`${shortBytes(caps.maxPushBytes)} per push`)
|
|
116
|
+
if (caps.maxRepoBytes !== null) parts.push(`${shortBytes(caps.maxRepoBytes)} per repository`)
|
|
117
|
+
return parts.join(', ')
|
|
109
118
|
}
|
|
110
119
|
|
|
111
120
|
/**
|
|
112
|
-
* What one client may spend in a window (`src/rate-limit.ts`).
|
|
121
|
+
* What one client may spend in a window (`src/rate-limit.ts`), as fine print.
|
|
113
122
|
*
|
|
114
|
-
*
|
|
115
|
-
*
|
|
116
|
-
*
|
|
117
|
-
*
|
|
118
|
-
* reason every other limit is on this page at all.
|
|
119
|
-
*
|
|
120
|
-
* Absent when the deployment bounds nothing per source, which is the default.
|
|
123
|
+
* Was its own term, `Throughput`, framed as an allowance. Same demotion as the
|
|
124
|
+
* size caps and for the same reason: a rate limit is a safeguard, and the page
|
|
125
|
+
* should not be selling its safeguards. Empty when the deployment bounds
|
|
126
|
+
* nothing per source, which is the default.
|
|
121
127
|
*/
|
|
122
|
-
function
|
|
128
|
+
function sourceLimits(caps: Capabilities): string {
|
|
123
129
|
if (!caps.sourceLimited) return ''
|
|
124
130
|
const window = describeWindow(caps.rateWindowSeconds)
|
|
125
131
|
const parts: string[] = []
|
|
@@ -128,19 +134,60 @@ function sourceLimitClaim(caps: Capabilities): string {
|
|
|
128
134
|
}
|
|
129
135
|
if (caps.maxPushesPerSource !== null) parts.push(`${caps.maxPushesPerSource} pushes`)
|
|
130
136
|
if (caps.maxPushBytesPerSource !== null) {
|
|
131
|
-
parts.push(
|
|
137
|
+
parts.push(shortBytes(caps.maxPushBytesPerSource))
|
|
132
138
|
}
|
|
133
|
-
return
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
139
|
+
return `${parts.join(', ')} per client per ${window}`
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
/**
|
|
143
|
+
* The limits sentence in the caveat, or nothing.
|
|
144
|
+
*
|
|
145
|
+
* One sentence, two clauses, each absent where nothing is enforced — so a
|
|
146
|
+
* deployment that bounds nothing prints no reassuring "no limits" it cannot
|
|
147
|
+
* back, exactly as the terms did.
|
|
148
|
+
*/
|
|
149
|
+
function limits(caps: Capabilities): string {
|
|
150
|
+
const clauses = [sizeLimits(caps), sourceLimits(caps)].filter((c) => c !== '')
|
|
151
|
+
return clauses.length === 0 ? '' : ` Limits: ${clauses.join('; ')}.`
|
|
137
152
|
}
|
|
138
153
|
|
|
139
154
|
/** The permanence sentence, which turns on the same variable as the claim. */
|
|
140
155
|
function permanence(caps: Capabilities): string {
|
|
141
156
|
return caps.retentionHours === null
|
|
142
|
-
? '
|
|
143
|
-
: `Not permanent: ${describeHours(caps.retentionHours)} from the last push,
|
|
157
|
+
? 'Built as a working surface rather than an archive: nothing here is a promise to keep your history.'
|
|
158
|
+
: `Not permanent: ${describeHours(caps.retentionHours)} from the last push, an unclaimed repository is collected.`
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
/**
|
|
162
|
+
* The chapter break before the client.
|
|
163
|
+
*
|
|
164
|
+
* The two sections above it are about the host: get a repository, own it. The
|
|
165
|
+
* two below are about a different problem — several agents inside one branch,
|
|
166
|
+
* none knowing what the others just did — and the thing that solves it is not
|
|
167
|
+
* the host but a command run in the clone. Without a break the page slides
|
|
168
|
+
* from one into the other and a reader takes the socket for another feature
|
|
169
|
+
* of the same thing. A rule, a kicker, a heading, one paragraph and the
|
|
170
|
+
* command: it names the problem and the client and hands over the one thing
|
|
171
|
+
* to run, and argues nothing — the two sections under it are the argument.
|
|
172
|
+
* The command lives here rather than beside the socket because it is the
|
|
173
|
+
* client's, not the socket's: both sections below are what it does.
|
|
174
|
+
*
|
|
175
|
+
* Gated on `events` exactly as they are: no socket, no client to introduce.
|
|
176
|
+
*/
|
|
177
|
+
function clientChapter(caps: Capabilities): string {
|
|
178
|
+
if (!caps.events) return ''
|
|
179
|
+
return `
|
|
180
|
+
<section class="chapter">
|
|
181
|
+
<span class="kicker">the client</span>
|
|
182
|
+
<h2>Many agents, one branch.</h2>
|
|
183
|
+
<p>Getting a repository is solved above. Keeping several agents straight inside one is the other problem, and git has no opinion on it. <code>@zabaca/agentgit</code> is one command, run in the clone, that keeps it current and speaks only when it matters.</p>
|
|
184
|
+
<div class="term term-solo">
|
|
185
|
+
<pre id="watch-cmd"><span class="p">$</span> bunx @zabaca/agentgit watch</pre>
|
|
186
|
+
<button class="copy" id="copy-watch" type="button" aria-live="polite" aria-label="Copy the watch command">Copy</button>
|
|
187
|
+
</div>
|
|
188
|
+
<p class="under"><span>npx</span> too · <span>--once</span> waits for the handoff</p>
|
|
189
|
+
</section>
|
|
190
|
+
`
|
|
144
191
|
}
|
|
145
192
|
|
|
146
193
|
/**
|
|
@@ -175,14 +222,6 @@ function eventsSection(host: string, caps: Capabilities): string {
|
|
|
175
222
|
</div>
|
|
176
223
|
|
|
177
224
|
<div class="split-show">
|
|
178
|
-
<div>
|
|
179
|
-
<div class="term term-solo">
|
|
180
|
-
<pre id="watch-cmd"><span class="p">$</span> bunx @zabaca/agentgit watch</pre>
|
|
181
|
-
<button class="copy" id="copy-watch" type="button" aria-live="polite" aria-label="Copy the watch command">Copy</button>
|
|
182
|
-
</div>
|
|
183
|
-
<p class="under"><span>npx</span> too · <span>--once</span> waits for the handoff</p>
|
|
184
|
-
</div>
|
|
185
|
-
|
|
186
225
|
<div class="panel wire" id="wire">
|
|
187
226
|
<div class="panel-head">
|
|
188
227
|
<span><span class="pulse"></span>${socket}</span>
|
|
@@ -202,6 +241,58 @@ function eventsSection(host: string, caps: Capabilities): string {
|
|
|
202
241
|
`
|
|
203
242
|
}
|
|
204
243
|
|
|
244
|
+
/**
|
|
245
|
+
* The collision, which is the half of `watch` that a timer could never do.
|
|
246
|
+
*
|
|
247
|
+
* The section above sells the socket: no polling, no webhook. This one sells
|
|
248
|
+
* what the socket is FOR. Being told main moved is an event; being told *main
|
|
249
|
+
* moved in the file you are editing right now* is a decision the agent can
|
|
250
|
+
* act on, and it is the one thing on this page a cron job could not replicate.
|
|
251
|
+
*
|
|
252
|
+
* Every sentence here is a behaviour of `packages/agentgit/src/watch.ts`, and
|
|
253
|
+
* the transcript is a line it prints. `git stash create` is why uncommitted
|
|
254
|
+
* work counts — `merge-tree` compares commits, so an agent mid-task would be
|
|
255
|
+
* invisible to it without the throwaway commit. The notice fires on CHANGE
|
|
256
|
+
* only, and clears itself, which is the whole reason an agent keeps believing
|
|
257
|
+
* the channel. And it never merges: a line and a file list is information, a
|
|
258
|
+
* merge attempt would be work the agent did not ask for.
|
|
259
|
+
*
|
|
260
|
+
* Gated on `events` exactly as the section above: there is no collision notice
|
|
261
|
+
* without a socket to carry the event that triggers it.
|
|
262
|
+
*/
|
|
263
|
+
function collisionSection(host: string, caps: Capabilities): string {
|
|
264
|
+
if (!caps.events) return ''
|
|
265
|
+
const socket = `wss://${host}${EVENTS_PATH}`
|
|
266
|
+
|
|
267
|
+
return `
|
|
268
|
+
<section class="split">
|
|
269
|
+
<div class="split-say">
|
|
270
|
+
<h2>Stop discovering conflicts at push time.</h2>
|
|
271
|
+
<p>Two agents on one branch meet when the second one pushes — an hour of work later, with a merge to resolve cold. The client checks the moment the first push lands, uncommitted edits included.</p>
|
|
272
|
+
<p><strong>It says so once.</strong> Reported when it appears, cleared when it goes, never repeated.</p>
|
|
273
|
+
<p><strong>It touches nothing.</strong> No merge, no stash, no rebase. The line names the files; the call is yours.</p>
|
|
274
|
+
</div>
|
|
275
|
+
|
|
276
|
+
<div class="split-show">
|
|
277
|
+
<div class="panel wire">
|
|
278
|
+
<div class="panel-head">
|
|
279
|
+
<span><span class="pulse"></span>${socket}</span>
|
|
280
|
+
</div>
|
|
281
|
+
<pre class="tx"><span class="ln" style="--d:0ms"><span class="c"># you are editing src/index.ts. nothing committed yet.</span>
|
|
282
|
+
</span><span class="ln" style="--d:900ms">
|
|
283
|
+
<span class="ok">study-42 main: origin/main is ef759899</span>
|
|
284
|
+
</span><span class="ln" style="--d:1250ms"><span class="no">study-42 main: COLLIDES with your work in src/index.ts</span>
|
|
285
|
+
</span><span class="ln" style="--d:2300ms">
|
|
286
|
+
<span class="c"># you rebase, or finish first and resolve. your call.</span>
|
|
287
|
+
</span><span class="ln" style="--d:3300ms">
|
|
288
|
+
<span class="ok">study-42 main: no longer collides with your work</span><span class="caret"></span></span></pre>
|
|
289
|
+
<div class="panel-foot">Said once when it appears, once when it clears. Never repeated.</div>
|
|
290
|
+
</div>
|
|
291
|
+
</div>
|
|
292
|
+
</section>
|
|
293
|
+
`
|
|
294
|
+
}
|
|
295
|
+
|
|
205
296
|
/**
|
|
206
297
|
* Append-only, whose second clause makes the same promise `Public` does.
|
|
207
298
|
*
|
|
@@ -226,8 +317,12 @@ function appendOnlyClaim(caps: Capabilities): string {
|
|
|
226
317
|
'<b>Nothing you push can be destroyed.</b> ' +
|
|
227
318
|
(caps.namesCanRefuse
|
|
228
319
|
? 'Whoever the name takes a push from may add; no one may rewrite or delete.'
|
|
229
|
-
: 'Anyone may add; no one may rewrite or delete.')
|
|
230
|
-
|
|
320
|
+
: 'Anyone may add; no one may rewrite or delete.'),
|
|
321
|
+
// The sentence that used to close this term — a rewrite is turned away
|
|
322
|
+
// before anything uploads, by a message naming the remedy — is the foot of
|
|
323
|
+
// the refusal panel two sections up, word for word. Saying it in both
|
|
324
|
+
// places cost this term half its length to repeat a thing the page has
|
|
325
|
+
// already SHOWN, which is the stronger telling of the two.
|
|
231
326
|
)
|
|
232
327
|
}
|
|
233
328
|
|
|
@@ -334,7 +429,7 @@ function proposalsClaim(caps: Capabilities): string {
|
|
|
334
429
|
if (!caps.proposals) return ''
|
|
335
430
|
return claim(
|
|
336
431
|
'Proposals',
|
|
337
|
-
'<b>A claimed name takes a change from anyone who may read it.</b> Push to <code>refs/walgit/proposals/<branch>/<your-id></code
|
|
432
|
+
'<b>A claimed name takes a change from anyone who may read it.</b> Push to <code>refs/walgit/proposals/<branch>/<your-id></code>. A Signer merges it, and <em>merged</em> means the branch\u2019s history contains it.',
|
|
338
433
|
)
|
|
339
434
|
}
|
|
340
435
|
|
|
@@ -342,7 +437,7 @@ function privateClaim(caps: Capabilities): string {
|
|
|
342
437
|
if (!caps.namesCanBePrivate) return ''
|
|
343
438
|
return claim(
|
|
344
439
|
'Private',
|
|
345
|
-
'<b>A claimed name can refuse a stranger reading it.</b> Write a <b>Reader List</b> beside the signers
|
|
440
|
+
'<b>A claimed name can refuse a stranger reading it.</b> Write a <b>Reader List</b> beside the signers, and the key that signs your pushes is the key that reads.',
|
|
346
441
|
)
|
|
347
442
|
}
|
|
348
443
|
|
|
@@ -367,23 +462,18 @@ function privateClaim(caps: Capabilities): string {
|
|
|
367
462
|
* summary of it, so the two arguments read together and the terms below read as
|
|
368
463
|
* what both of them settle.
|
|
369
464
|
*
|
|
370
|
-
* The right column is
|
|
371
|
-
*
|
|
372
|
-
*
|
|
373
|
-
*
|
|
374
|
-
*
|
|
375
|
-
*
|
|
376
|
-
*
|
|
377
|
-
*
|
|
378
|
-
*
|
|
379
|
-
*
|
|
380
|
-
*
|
|
381
|
-
*
|
|
382
|
-
* `signers`. A reader who has a PGP key would claim the name and then be locked
|
|
383
|
-
* out of it by their own next push.
|
|
384
|
-
*
|
|
385
|
-
* What is left to `/llms.txt` (`shared/llms.ts`) is `set -e` and the second
|
|
386
|
-
* key: this panel is the argument, and that document is the manual.
|
|
465
|
+
* The right column is one thing: the refusal a stranger reads. The six
|
|
466
|
+
* commands that write the list used to sit above it — first in full, then
|
|
467
|
+
* behind a disclosure — and both were the tallest thing on a pitch page, beside
|
|
468
|
+
* prose that had been cut to three sentences. They are gone from the page
|
|
469
|
+
* entirely, not abbreviated: every shorter form tried hands a reader a command
|
|
470
|
+
* that fails (only the `git push` pushes their project's `HEAD` at the signers
|
|
471
|
+
* ref; without `-c user.email` a fresh container aborts; without
|
|
472
|
+
* `-c gpg.format=ssh` a PGP holder signs with the wrong key and is locked out of
|
|
473
|
+
* the name they just claimed). Zero lines is the one abbreviation with no
|
|
474
|
+
* footgun. The recipe is in `/llms.txt` (`shared/llms.ts`), whole, which the
|
|
475
|
+
* closing block and the footer both link — this section is the argument, and
|
|
476
|
+
* that document is the manual.
|
|
387
477
|
*
|
|
388
478
|
* **The transcript is an excerpt, and says so.** Every line of it is a line
|
|
389
479
|
* `heldMessage` (`src/signers.ts`) actually writes, and `landing.test.ts`
|
|
@@ -412,43 +502,71 @@ function privateClaim(caps: Capabilities): string {
|
|
|
412
502
|
* enforce it would be the promise `appendOnlyClaim` just stopped making,
|
|
413
503
|
* reappearing two sections up the page.
|
|
414
504
|
*/
|
|
505
|
+
/**
|
|
506
|
+
* The handoff, which used to be one sentence under the hero.
|
|
507
|
+
*
|
|
508
|
+
* *"Handing work to another agent is the URL, and there is nothing else to
|
|
509
|
+
* send"* was the hero's second lede, and it was the second-best sentence on the
|
|
510
|
+
* page carrying its own argument in a place built for one. A section gives it
|
|
511
|
+
* the shape the other arguments have: the pain first, then what the URL
|
|
512
|
+
* replaces, then the one thing to send.
|
|
513
|
+
*
|
|
514
|
+
* "Nothing else to send" is only true where nothing else is asked for. On a
|
|
515
|
+
* credentialed deployment the receiving agent needs the host's token as well,
|
|
516
|
+
* so the closing sentence is rendered from `publicAccess` — the same rule
|
|
517
|
+
* `heroUnder` follows, one section down from where it made the same promise.
|
|
518
|
+
*/
|
|
519
|
+
function handoffSection(host: string, caps: Capabilities): string {
|
|
520
|
+
const send = caps.publicAccess
|
|
521
|
+
? 'There is nothing else to send: no invite, no token, no archive of a working directory.'
|
|
522
|
+
: 'There is nothing else to send but the one token the host already asks every agent for.'
|
|
523
|
+
|
|
524
|
+
return `
|
|
525
|
+
<section class="split">
|
|
526
|
+
<div class="split-say">
|
|
527
|
+
<h2>Hand it to the next agent. Send the URL.</h2>
|
|
528
|
+
<p>Work passes between agents as a tarball, a shared volume, or a token to a repository somebody had to create first — and the agent receiving it starts by working out which.</p>
|
|
529
|
+
<p><strong>Here the handoff is the URL.</strong> Push, send the address, and the next agent clones it. ${send}</p>
|
|
530
|
+
<p><strong>Nobody set it up.</strong> The repository came into being on the first push, so there was never a step before the handoff.</p>
|
|
531
|
+
</div>
|
|
532
|
+
|
|
533
|
+
<div class="split-show">
|
|
534
|
+
<div class="panel">
|
|
535
|
+
<div class="panel-head"><span>the whole handoff</span></div>
|
|
536
|
+
<pre class="tx"><span class="ln" style="--d:0ms"><span class="c"># agent A, done for now.</span>
|
|
537
|
+
</span><span class="ln" style="--d:200ms"><span class="p">$</span> git push agentgit main
|
|
538
|
+
</span><span class="ln" style="--d:1000ms">
|
|
539
|
+
<span class="c"># what it sends. all of it.</span>
|
|
540
|
+
</span><span class="ln" style="--d:1250ms"><span class="ok">https://${host}/study-42.git</span>
|
|
541
|
+
</span><span class="ln" style="--d:2200ms">
|
|
542
|
+
<span class="c"># agent B, in a different sandbox.</span>
|
|
543
|
+
</span><span class="ln" style="--d:2450ms"><span class="p">$</span> git clone https://${host}/study-42.git<span class="caret"></span></span></pre>
|
|
544
|
+
<div class="panel-foot">A URL is the one thing every sandbox can already receive.</div>
|
|
545
|
+
</div>
|
|
546
|
+
</div>
|
|
547
|
+
</section>
|
|
548
|
+
`
|
|
549
|
+
}
|
|
550
|
+
|
|
415
551
|
function ownershipCost(caps: Capabilities): string {
|
|
416
552
|
return caps.appendOnly
|
|
417
|
-
?
|
|
418
|
-
:
|
|
553
|
+
? "An unclaimed name takes anyone's push, and append-only keeps it forever — a stranger's branch in your agent's repository is <em>there for good</em>. Claim the name and that stops."
|
|
554
|
+
: "An unclaimed name takes anyone's push — a branch, a moved <code>main</code>, a deleted ref — and <em>whoever pushes last wins</em>. Claim the name and your history is yours."
|
|
419
555
|
}
|
|
420
556
|
|
|
421
|
-
function ownershipSection(
|
|
557
|
+
function ownershipSection(caps: Capabilities): string {
|
|
422
558
|
if (!caps.namesCanBeClaimed) return ''
|
|
423
559
|
|
|
424
560
|
return `
|
|
425
561
|
<section class="split">
|
|
426
562
|
<div class="split-say">
|
|
427
|
-
<h2>
|
|
563
|
+
<h2>Claim it. Only your keys push.</h2>
|
|
428
564
|
<p>${ownershipCost(caps)}</p>
|
|
429
|
-
<p><strong>
|
|
430
|
-
<p><strong>List two keys.</strong> There is
|
|
565
|
+
<p><strong>Claiming one takes a single push.</strong> Write the fingerprints you trust to <code>${SIGNERS_REF}</code>; from then on only their pushes land. No account, no invite, no dashboard.</p>
|
|
566
|
+
<p><strong>List two keys.</strong> There is nothing to reset, so a second one is your way back in.</p>
|
|
431
567
|
</div>
|
|
432
568
|
|
|
433
569
|
<div class="split-show">
|
|
434
|
-
<div>
|
|
435
|
-
<div class="term term-solo">
|
|
436
|
-
<pre><span class="c"># a repository whose tree is one file: signers.</span>
|
|
437
|
-
<span class="p">$</span> git init -q claim && cd claim
|
|
438
|
-
<span class="p">$</span> ssh-keygen -lf $HOME/.ssh/id_ed25519.pub \\
|
|
439
|
-
| awk '{print $2}' > signers
|
|
440
|
-
<span class="p">$</span> git add signers
|
|
441
|
-
<span class="p">$</span> git -c user.email=agent@localhost \\
|
|
442
|
-
-c user.name=agent commit -qm claim
|
|
443
|
-
<span class="p">$</span> git -c gpg.format=ssh \\
|
|
444
|
-
-c user.signingkey=$HOME/.ssh/id_ed25519.pub \\
|
|
445
|
-
push --signed=if-asked \\
|
|
446
|
-
https://${host}/$NAME.git \\
|
|
447
|
-
HEAD:${SIGNERS_REF}</pre>
|
|
448
|
-
</div>
|
|
449
|
-
<p class="under">List a second key · the full recipe is in <span>/llms.txt</span></p>
|
|
450
|
-
</div>
|
|
451
|
-
|
|
452
570
|
<div class="panel">
|
|
453
571
|
<div class="panel-head">
|
|
454
572
|
<span>what a stranger reads</span>
|
|
@@ -461,7 +579,126 @@ function ownershipSection(host: string, caps: Capabilities): string {
|
|
|
461
579
|
</span><span class="ln"><span class="c"> git push --signed=yes origin HEAD:refs/heads/<branch></span>
|
|
462
580
|
</span><span class="ln"><span class="c">…</span>
|
|
463
581
|
</span><span class="ln"><span class="ok">Nothing was uploaded; the repository is unchanged.</span></span></pre>
|
|
464
|
-
<div class="panel-foot">
|
|
582
|
+
<div class="panel-foot">Turned away before anything is uploaded. The message names a free name to use instead, and how to be added to this one.</div>
|
|
583
|
+
</div>
|
|
584
|
+
</div>
|
|
585
|
+
</section>
|
|
586
|
+
`
|
|
587
|
+
}
|
|
588
|
+
|
|
589
|
+
/**
|
|
590
|
+
* Letting another agent push, which is the step the claim section leaves open.
|
|
591
|
+
*
|
|
592
|
+
* Two routes, rendered from `proposals`. Where Proposals are on, the new agent
|
|
593
|
+
* ASKS: a signed Proposal against the Signer List itself, carrying its own
|
|
594
|
+
* fingerprint line, and a Signer runs `agentgit accept` — which is the page's
|
|
595
|
+
* whole pitch (no invite, no seat, no dashboard) applied to access itself.
|
|
596
|
+
* Where they are off, what exists is the grant: a listed key adds the line and
|
|
597
|
+
* pushes the list signed, and the fingerprint reaches that key out of band.
|
|
598
|
+
*
|
|
599
|
+
* The target is `SIGNERS_TARGET` in `src/proposals.ts` (ADR-0018, amended by
|
|
600
|
+
* #160): `walgit/signers` in the slot a branch name takes. `landing.test.ts`
|
|
601
|
+
* pins the spelling against that constant, and the success line is the one
|
|
602
|
+
* `runAccept` in `packages/agentgit/src/accept.ts` prints for this path.
|
|
603
|
+
*
|
|
604
|
+
* The grant illustration is the DIFF, not the commands: those are the six the
|
|
605
|
+
* claim recipe needs and every shorter form is one that fails. The Proposal
|
|
606
|
+
* illustration IS commands, because there are exactly two and both are whole.
|
|
607
|
+
*/
|
|
608
|
+
function grantSection(host: string, caps: Capabilities): string {
|
|
609
|
+
if (!caps.namesCanBeClaimed) return ''
|
|
610
|
+
|
|
611
|
+
if (caps.proposals) {
|
|
612
|
+
return `
|
|
613
|
+
<section class="split">
|
|
614
|
+
<div class="split-say">
|
|
615
|
+
<h2>Let another agent push.</h2>
|
|
616
|
+
<p>A claimed name refuses the next agent too — that is what claiming is for. Letting one in is not a seat, a role or an invite: the agent asks, and a Signer says yes.</p>
|
|
617
|
+
<p><strong>The new agent proposes itself.</strong> A signed push of the Signer List with its own line added, to the Proposals namespace, from any key that may read the name.</p>
|
|
618
|
+
<p><strong>A Signer accepts.</strong> One command in its clone, and the next push from the new key lands. Nothing is retroactive, in either direction.</p>
|
|
619
|
+
</div>
|
|
620
|
+
|
|
621
|
+
<div class="split-show">
|
|
622
|
+
<div class="panel">
|
|
623
|
+
<div class="panel-head">
|
|
624
|
+
<span>the whole grant</span>
|
|
625
|
+
</div>
|
|
626
|
+
<pre class="tx"><span class="ln"><span class="c"># agent B, anywhere it may read the name.</span>
|
|
627
|
+
</span><span class="ln"><span class="p">$</span> git push --signed=yes agentgit \\
|
|
628
|
+
HEAD:refs/walgit/proposals/walgit/signers/kq3LmW
|
|
629
|
+
</span><span class="ln">
|
|
630
|
+
<span class="c"># agent A, a Signer, in its clone.</span>
|
|
631
|
+
</span><span class="ln"><span class="p">$</span> agentgit accept kq3LmW
|
|
632
|
+
</span><span class="ln"><span class="ok">accepted kq3LmW (5b1c09e4) onto ${SIGNERS_REF} — it is now e0a7d2c1</span></span></pre>
|
|
633
|
+
<div class="panel-foot">Two commands, one each. Nobody sent a fingerprint anywhere.</div>
|
|
634
|
+
</div>
|
|
635
|
+
</div>
|
|
636
|
+
</section>
|
|
637
|
+
`
|
|
638
|
+
}
|
|
639
|
+
|
|
640
|
+
return `
|
|
641
|
+
<section class="split">
|
|
642
|
+
<div class="split-say">
|
|
643
|
+
<h2>Let another agent push.</h2>
|
|
644
|
+
<p>A claimed name refuses the next agent too — that is what claiming is for. Letting one in is a line in a file, not a seat, a role or an invite.</p>
|
|
645
|
+
<p><strong>The new agent sends its fingerprint.</strong> <code>ssh-keygen -lf</code> prints it. A listed key adds the line to <code>signers</code> and pushes the list, signed.</p>
|
|
646
|
+
<p><strong>The grant governs the next push.</strong> Nothing is retroactive, in either direction: remove the line the same way.</p>
|
|
647
|
+
</div>
|
|
648
|
+
|
|
649
|
+
<div class="split-show">
|
|
650
|
+
<div class="panel">
|
|
651
|
+
<div class="panel-head">
|
|
652
|
+
<span>the whole grant</span>
|
|
653
|
+
</div>
|
|
654
|
+
<pre class="tx"><span class="ln"><span class="c"># ${SIGNERS_REF}, one commit later</span>
|
|
655
|
+
</span><span class="ln"><span class="c">--- a/signers</span>
|
|
656
|
+
</span><span class="ln"><span class="c">+++ b/signers</span>
|
|
657
|
+
</span><span class="ln"> SHA256:9fXbQ2… <span class="c"># agent A</span>
|
|
658
|
+
</span><span class="ln"><span class="ok">+SHA256:kq3LmW… <span class="c"># agent B</span></span></span></pre>
|
|
659
|
+
<div class="panel-foot">Pushed by a key already on the list. Agent B's next push lands.</div>
|
|
660
|
+
</div>
|
|
661
|
+
</div>
|
|
662
|
+
</section>
|
|
663
|
+
`
|
|
664
|
+
}
|
|
665
|
+
|
|
666
|
+
/**
|
|
667
|
+
* Going private, which is the second file on the same ref.
|
|
668
|
+
*
|
|
669
|
+
* Claimed is who may WRITE (`signers`); Private is who may READ (`readers`),
|
|
670
|
+
* beside it on the same commit chain, written by the same signed push. Three
|
|
671
|
+
* rules from `shared/llms.ts` are the ones every agent gets wrong, so the
|
|
672
|
+
* section states all three: an empty Reader List is valid and means only the
|
|
673
|
+
* Signers read; Signers read without being listed; and your own pushes are
|
|
674
|
+
* gated too, because a push begins with a read. The manual carries the fourth,
|
|
675
|
+
* which is the credential-helper line to run before writing the file.
|
|
676
|
+
*
|
|
677
|
+
* Gated on `namesCanBePrivate`, which already requires everything the claim
|
|
678
|
+
* section needs plus the private seed — so this never renders where the claim
|
|
679
|
+
* section does not.
|
|
680
|
+
*/
|
|
681
|
+
function privateSection(host: string, caps: Capabilities): string {
|
|
682
|
+
if (!caps.namesCanBePrivate) return ''
|
|
683
|
+
|
|
684
|
+
return `
|
|
685
|
+
<section class="split">
|
|
686
|
+
<div class="split-say">
|
|
687
|
+
<h2>Keep it to yourselves.</h2>
|
|
688
|
+
<p>Claimed says who may push. Everyone can still clone it, and work in progress is not always something to leave in the open.</p>
|
|
689
|
+
<p><strong>Private is a second file.</strong> Write <code>readers</code> beside <code>signers</code>, one fingerprint per line, and every clone, fetch and watch is refused unless the reader proves a listed key. Empty means only the Signers read.</p>
|
|
690
|
+
<p><strong>Signers read without being listed.</strong> So <code>readers</code> is for agents that may read and not push — and your own pushes are gated too, since a push begins with a read.</p>
|
|
691
|
+
</div>
|
|
692
|
+
|
|
693
|
+
<div class="split-show">
|
|
694
|
+
<div class="panel">
|
|
695
|
+
<div class="panel-head">
|
|
696
|
+
<span>what a stranger reads</span>
|
|
697
|
+
</div>
|
|
698
|
+
<pre class="tx"><span class="ln"><span class="p">$</span> git clone https://${host}/study-42.git
|
|
699
|
+
</span><span class="ln"><span class="c">Cloning into 'study-42'...</span>
|
|
700
|
+
</span><span class="ln"><span class="no">fatal: could not read Username for 'https://${host}'</span></span></pre>
|
|
701
|
+
<div class="panel-foot">A 401 is the whole answer: taken, and kept private by a Reader List. The manual has the one line that makes your own clone pass.</div>
|
|
465
702
|
</div>
|
|
466
703
|
</div>
|
|
467
704
|
</section>
|
|
@@ -481,8 +718,8 @@ function signingClaim(caps: Capabilities): string {
|
|
|
481
718
|
'Attributed',
|
|
482
719
|
"<b>A push signed with your key records that key's fingerprint.</b> " +
|
|
483
720
|
(caps.namesCanRefuse
|
|
484
|
-
? 'Unsigned is fine unless a name has written a Signer List
|
|
485
|
-
: 'Nothing is refused for being unsigned
|
|
721
|
+
? 'Unsigned is fine unless a name has written a Signer List. The fingerprint is the whole identity.'
|
|
722
|
+
: 'Nothing is refused for being unsigned. The fingerprint is the whole identity.') +
|
|
486
723
|
' <code>git push --signed=if-asked</code>.',
|
|
487
724
|
)
|
|
488
725
|
}
|
|
@@ -506,15 +743,13 @@ function claims(caps: Capabilities): string {
|
|
|
506
743
|
publicClaim(caps),
|
|
507
744
|
privateClaim(caps),
|
|
508
745
|
proposalsClaim(caps),
|
|
509
|
-
thirdClaim(caps),
|
|
510
|
-
sourceLimitClaim(caps),
|
|
511
746
|
signingClaim(caps),
|
|
512
747
|
// Unconditional, unlike every term above it: nothing in `/robots.txt` is
|
|
513
748
|
// read from a flag. It is the one claim on this page addressed to the
|
|
514
749
|
// crawler rather than to the agent driving it.
|
|
515
750
|
claim(
|
|
516
751
|
'Crawlable',
|
|
517
|
-
`<b><code>/robots.txt</code> says yes, out loud.</b> <code>Allow: /</code> for every agent, and <code>Content-Signal: ${CONTENT_SIGNAL}</code
|
|
752
|
+
`<b><code>/robots.txt</code> says yes, out loud.</b> <code>Allow: /</code> for every agent, and <code>Content-Signal: ${CONTENT_SIGNAL}</code> — told so in the one file it checks.`,
|
|
518
753
|
),
|
|
519
754
|
]
|
|
520
755
|
.filter((term) => term !== '')
|
|
@@ -560,13 +795,13 @@ function heroUnder(caps: Capabilities): string {
|
|
|
560
795
|
/**
|
|
561
796
|
* The first two roadmap rows, which are the two the gate makes untrue.
|
|
562
797
|
*
|
|
563
|
-
* The roadmap is "
|
|
798
|
+
* The roadmap is "where this is going, in the order it gets there", so a
|
|
564
799
|
* deployment where a name can already refuse a stranger must not go on calling
|
|
565
800
|
* ownership Next. Same rule as every limit on this page, applied to a promise
|
|
566
801
|
* instead of a cap.
|
|
567
802
|
*
|
|
568
803
|
* Where it shipped the row does not become a `Shipped` row — it LEAVES. This
|
|
569
|
-
* list is what is
|
|
804
|
+
* list is what is still ahead, and a section above now states ownership as a rule
|
|
570
805
|
* of the host; carrying it in both places would be the page describing one
|
|
571
806
|
* capability twice, once as a fact and once as an achievement. Only Private
|
|
572
807
|
* stays, because Private is genuinely still missing and the row was wrong about
|
|
@@ -593,18 +828,18 @@ function roadmapOwnership(caps: Capabilities): string {
|
|
|
593
828
|
return ` <li data-next>
|
|
594
829
|
<span class="when">Next</span>
|
|
595
830
|
<h3>Ownership</h3>
|
|
596
|
-
<p>
|
|
831
|
+
<p>A name only your keys can write to. Who pushed is already recorded; what is left is the rule that says the first key to push a name keeps it — and because un-claiming is hard to take back, it gets designed carefully rather than quickly.</p>
|
|
597
832
|
</li>
|
|
598
833
|
<li>
|
|
599
834
|
<span class="when">After ownership</span>
|
|
600
835
|
<h3>Private</h3>
|
|
601
|
-
<p>
|
|
836
|
+
<p>Reads closed to everyone but the keys you list — gated on the same fingerprint a signed push already carries, once holding a name means something.</p>
|
|
602
837
|
</li>`
|
|
603
838
|
}
|
|
604
839
|
return ` <li>
|
|
605
|
-
<span class="when">Unblocked
|
|
840
|
+
<span class="when">Unblocked</span>
|
|
606
841
|
<h3>Private</h3>
|
|
607
|
-
<p>
|
|
842
|
+
<p>Reads closed to everyone but the keys you list. Holding a name is what makes that possible, and nothing else stands in the way of it — but it is not built yet, and today a claimed repository reads as openly as any other.</p>
|
|
608
843
|
</li>`
|
|
609
844
|
}
|
|
610
845
|
|
|
@@ -627,15 +862,44 @@ function roadmapPulls(caps: Capabilities): string {
|
|
|
627
862
|
// capability in two contradictory places.
|
|
628
863
|
if (caps.proposals) return ''
|
|
629
864
|
const missing = caps.appendOnly
|
|
630
|
-
? 'Append-only already makes a proposal safe to push. What is
|
|
631
|
-
: 'A branch is already the whole of a proposal. What is
|
|
865
|
+
? 'Append-only already makes a proposal safe to push. What is left is a way to say a branch is one, and a way to say it landed — not a review UI.'
|
|
866
|
+
: 'A branch is already the whole of a proposal. What is left is a way to say that is what it is, and a way to say it landed — not a review UI.'
|
|
632
867
|
return ` <li>
|
|
633
|
-
<span class="when">
|
|
868
|
+
<span class="when">In design</span>
|
|
634
869
|
<h3>Pull requests</h3>
|
|
635
870
|
<p>${missing}</p>
|
|
636
871
|
</li>`
|
|
637
872
|
}
|
|
638
873
|
|
|
874
|
+
/**
|
|
875
|
+
* The standfirst under `What's next.`, which has to survive the rows leaving.
|
|
876
|
+
*
|
|
877
|
+
* The two functions above are the page's best rule applied to a promise: a row
|
|
878
|
+
* LEAVES when its deployment ships the thing, so the list is always what is
|
|
879
|
+
* still ahead. What nobody checked is what the sentence above the list says
|
|
880
|
+
* once three of the four rows have left. *"Where this is going, in the order it
|
|
881
|
+
* gets there"* promises a sequence, and on the deployment that has shipped the
|
|
882
|
+
* most — Signer Lists, Reader Lists and Proposals all on, which is agentgit —
|
|
883
|
+
* the list under it is one row. A standfirst describing an ORDER over a single
|
|
884
|
+
* item reads as a roadmap that ran out rather than one that was delivered.
|
|
885
|
+
*
|
|
886
|
+
* So the lede is rendered from the same fragments the list is built from: the
|
|
887
|
+
* rows are COUNTED out of the markup rather than re-derived from the flags,
|
|
888
|
+
* because a count computed from the capabilities is a second reading of the
|
|
889
|
+
* same question and the two would eventually disagree. `<h3>` is one per row.
|
|
890
|
+
*
|
|
891
|
+
* The no-date promise is in both spellings. It is the one thing on this page
|
|
892
|
+
* that is not rendered from config, so it is the one sentence that has to admit
|
|
893
|
+
* as much however many rows are left to admit it about.
|
|
894
|
+
*/
|
|
895
|
+
function roadmapLede(caps: Capabilities): string {
|
|
896
|
+
const rows = 1 + (roadmapOwnership(caps) + roadmapPulls(caps)).split('<h3>').length - 1
|
|
897
|
+
|
|
898
|
+
return rows === 1
|
|
899
|
+
? 'One thing is left, and nothing here is a date — it is designed in the open before it ships.'
|
|
900
|
+
: 'Where this is going, in the order it gets there. Nothing here is a date — each one is designed in the open before it ships.'
|
|
901
|
+
}
|
|
902
|
+
|
|
639
903
|
/**
|
|
640
904
|
* The live client, shipped only where there is a socket to open.
|
|
641
905
|
*
|
|
@@ -722,13 +986,78 @@ ${rows.join('\n')}
|
|
|
722
986
|
`
|
|
723
987
|
}
|
|
724
988
|
|
|
989
|
+
/**
|
|
990
|
+
* The last thing on the page, which used to be a takedown address.
|
|
991
|
+
*
|
|
992
|
+
* The page's whole asset is two commands that work, and they appeared once,
|
|
993
|
+
* above the fold, and never again — so a reader who scrolled the argument to
|
|
994
|
+
* its end was returned nothing to do. `Who runs this.` is the right block to
|
|
995
|
+
* have last of the informational ones and the wrong one to LEAVE last: it is
|
|
996
|
+
* addressed to somebody who is not about to push, and it was closing a page
|
|
997
|
+
* for everybody who was.
|
|
998
|
+
*
|
|
999
|
+
* The commands are the hero's, not a second copy of them: the name field above
|
|
1000
|
+
* echoes into this block as well (`repo-echo-end`), so what a visitor reads
|
|
1001
|
+
* here is the name they typed there, and the copy button reads its text out of
|
|
1002
|
+
* the block beside it exactly as the other two do.
|
|
1003
|
+
*
|
|
1004
|
+
* The client is named only where there is a socket to open, the same gate
|
|
1005
|
+
* `eventsSection` sits behind — a page that linked a watcher for a stream its
|
|
1006
|
+
* own Worker answers 404 for would be the one lie this file exists to prevent.
|
|
1007
|
+
*/
|
|
1008
|
+
function closeSection(host: string, caps: Capabilities): string {
|
|
1009
|
+
const line = caps.publicAccess
|
|
1010
|
+
? 'No account, no key. The name you pick <em>is</em> the repository, and it exists the moment the push lands.'
|
|
1011
|
+
: 'The name you pick <em>is</em> the repository, and it exists the moment the push lands.'
|
|
1012
|
+
|
|
1013
|
+
const client = caps.events
|
|
1014
|
+
? ' · keep a clone current with <a href="https://www.npmjs.com/package/@zabaca/agentgit">@zabaca/agentgit</a>'
|
|
1015
|
+
: ''
|
|
1016
|
+
|
|
1017
|
+
return `
|
|
1018
|
+
<section class="close">
|
|
1019
|
+
<h2>Push something.</h2>
|
|
1020
|
+
<p>${line}</p>
|
|
1021
|
+
<div class="term">
|
|
1022
|
+
<pre id="cmd-end"><span class="p">$</span> git remote add agentgit https://${host}/<span id="repo-echo-end">my-thing</span>.git
|
|
1023
|
+
<span class="p">$</span> git push agentgit main</pre>
|
|
1024
|
+
<button class="copy" id="copy-end" type="button" aria-live="polite" aria-label="Copy the two commands">Copy</button>
|
|
1025
|
+
</div>
|
|
1026
|
+
<p class="under">The whole manual is <a href="/llms.txt">/llms.txt</a>${client}</p>
|
|
1027
|
+
</section>
|
|
1028
|
+
`
|
|
1029
|
+
}
|
|
1030
|
+
|
|
1031
|
+
/**
|
|
1032
|
+
* The footer, which is where a reader goes looking for the source.
|
|
1033
|
+
*
|
|
1034
|
+
* It said `Open source` and `Run your own: zbc add walgit` as plain text, which
|
|
1035
|
+
* is a claim with nowhere to check it: the page carried exactly two anchors,
|
|
1036
|
+
* one of them an in-page skip link, so anybody who wanted the repository, the
|
|
1037
|
+
* client or the manual had to retype a path from memory.
|
|
1038
|
+
*
|
|
1039
|
+
* The client's entry is gated like every other mention of it. The source and
|
|
1040
|
+
* the manual are not: walgit is open source wherever it is deployed, and
|
|
1041
|
+
* `/llms.txt` is served by every deployment.
|
|
1042
|
+
*/
|
|
1043
|
+
function footerLinks(caps: Capabilities): string {
|
|
1044
|
+
const rows = [
|
|
1045
|
+
' <a href="https://github.com/Zabaca/zbc">Open source</a>',
|
|
1046
|
+
caps.events
|
|
1047
|
+
? ' <a href="https://www.npmjs.com/package/@zabaca/agentgit">@zabaca/agentgit</a>'
|
|
1048
|
+
: '',
|
|
1049
|
+
' <a href="/llms.txt">The manual</a>',
|
|
1050
|
+
]
|
|
1051
|
+
return rows.filter((row) => row !== '').join('\n')
|
|
1052
|
+
}
|
|
1053
|
+
|
|
725
1054
|
/**
|
|
726
1055
|
* Every substitution passes a FUNCTION, never the string itself.
|
|
727
1056
|
*
|
|
728
1057
|
* `String.replace` reads `$` sequences in a replacement STRING as capture-group
|
|
729
|
-
* references, and these fragments
|
|
730
|
-
* `<span class="p">$</span>`, the
|
|
731
|
-
*
|
|
1058
|
+
* references, and these fragments carry them: every shell prompt is
|
|
1059
|
+
* `<span class="p">$</span>`, and the hero's credentialed form is
|
|
1060
|
+
* `https://walgit:$TOKEN@`. Today every one of those is left literal — there are no capture
|
|
732
1061
|
* groups in a string pattern — but that is a rule about what the fragments
|
|
733
1062
|
* happen to contain, re-checked on every copy edit, and the failure it guards
|
|
734
1063
|
* is silent: a command on the page that quietly differs from the one anybody
|
|
@@ -747,17 +1076,31 @@ export function renderLanding(
|
|
|
747
1076
|
*/
|
|
748
1077
|
operator: Operator | null = null,
|
|
749
1078
|
): string {
|
|
750
|
-
return
|
|
751
|
-
.
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
1079
|
+
return (
|
|
1080
|
+
PAGE.replaceAll('{{HOST}}', () => host)
|
|
1081
|
+
// `replaceAll`, because the sentence written to travel now travels in
|
|
1082
|
+
// three places: the description, the Open Graph card and the Twitter card.
|
|
1083
|
+
// One rendering, substituted thrice — not three strings to keep in step.
|
|
1084
|
+
.replaceAll('{{META_DESCRIPTION}}', () => metaDescription(caps))
|
|
1085
|
+
.replace('{{HERO_UNDER}}', () => heroUnder(caps))
|
|
1086
|
+
.replace('{{CLAIMS}}', () => claims(caps))
|
|
1087
|
+
.replace('{{ROADMAP_LEDE}}', () => roadmapLede(caps))
|
|
1088
|
+
.replace('{{ROADMAP_OWNERSHIP}}', () => roadmapOwnership(caps))
|
|
1089
|
+
.replace('{{ROADMAP_PULLS}}', () => roadmapPulls(caps))
|
|
1090
|
+
.replace('{{CLIENT}}', () => clientChapter(caps))
|
|
1091
|
+
.replace('{{EVENTS}}', () => eventsSection(host, caps))
|
|
1092
|
+
.replace('{{COLLISION}}', () => collisionSection(host, caps))
|
|
1093
|
+
.replace('{{HANDOFF}}', () => handoffSection(host, caps))
|
|
1094
|
+
.replace('{{OWNERSHIP}}', () => ownershipSection(caps))
|
|
1095
|
+
.replace('{{GRANT}}', () => grantSection(host, caps))
|
|
1096
|
+
.replace('{{PRIVATE}}', () => privateSection(host, caps))
|
|
1097
|
+
.replace('{{CLOSE}}', () => closeSection(host, caps))
|
|
1098
|
+
.replace('{{FOOTER_LINKS}}', () => footerLinks(caps))
|
|
1099
|
+
.replace('{{WIRE_SCRIPT}}', () => (caps.events ? wireScript() : ''))
|
|
1100
|
+
.replace('{{PERMANENCE}}', () => permanence(caps))
|
|
1101
|
+
.replace('{{LIMITS}}', () => limits(caps))
|
|
1102
|
+
.replace('{{OPERATOR}}', () => operatorSection(caps, operator))
|
|
1103
|
+
)
|
|
761
1104
|
}
|
|
762
1105
|
|
|
763
1106
|
const WIRE_CLIENT = `
|
|
@@ -780,19 +1123,26 @@ const WIRE_CLIENT = `
|
|
|
780
1123
|
// takes them away to give them back in order, so no JavaScript, a script
|
|
781
1124
|
// that fails, or a request for less motion all leave the whole transcript
|
|
782
1125
|
// on screen.
|
|
783
|
-
|
|
784
|
-
|
|
1126
|
+
//
|
|
1127
|
+
// Every transcript on the page, not one by id: the collision panel below
|
|
1128
|
+
// the socket panel is the same illustration with a different script, and
|
|
1129
|
+
// each one arms and plays on its own as it scrolls into view.
|
|
1130
|
+
var txs = document.querySelectorAll(".tx");
|
|
1131
|
+
if (!txs.length || !("IntersectionObserver" in window)) return;
|
|
785
1132
|
if (window.matchMedia && window.matchMedia("(prefers-reduced-motion: reduce)").matches) return;
|
|
786
1133
|
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
1134
|
+
Array.prototype.forEach.call(txs, function (tx) {
|
|
1135
|
+
tx.classList.add("armed");
|
|
1136
|
+
var io = new IntersectionObserver(function (entries) {
|
|
1137
|
+
if (!entries[0] || !entries[0].isIntersecting) return;
|
|
1138
|
+
io.disconnect();
|
|
1139
|
+
// Played once. A transcript that restarted every time it came back
|
|
1140
|
+
// into view would read as a loop rather than as something that
|
|
1141
|
+
// happened.
|
|
1142
|
+
tx.classList.add("play");
|
|
1143
|
+
}, { threshold: 0.35 });
|
|
1144
|
+
io.observe(tx);
|
|
1145
|
+
});
|
|
796
1146
|
`
|
|
797
1147
|
|
|
798
1148
|
const PAGE = `<!doctype html>
|
|
@@ -802,6 +1152,30 @@ const PAGE = `<!doctype html>
|
|
|
802
1152
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
803
1153
|
<title>agentgit — Git for AI agents</title>
|
|
804
1154
|
<meta name="description" content="{{META_DESCRIPTION}}">
|
|
1155
|
+
<!-- The card this page becomes when somebody posts the link.
|
|
1156
|
+
The placement of this whole document is justified by aggregator traffic —
|
|
1157
|
+
a link on one sends thousands of people to the root, which is why the
|
|
1158
|
+
Worker answers it and never wakes the container. That argument was being
|
|
1159
|
+
made by a page with no card: posted to HN, Reddit, Slack or Discord it
|
|
1160
|
+
rendered as a bare hostname, so the one sentence written to travel
|
|
1161
|
+
(metaDescription) travelled nowhere.
|
|
1162
|
+
Same two strings as the title and the description, deliberately: a card
|
|
1163
|
+
that says something the page does not is the drift every rendered claim
|
|
1164
|
+
here exists to prevent, so the description below is the SAME rendering,
|
|
1165
|
+
not a second copy of it.
|
|
1166
|
+
No picture, and no card layout that needs one. A preview image has to be
|
|
1167
|
+
a fetchable raster at a stable URL, which means an asset in the Worker
|
|
1168
|
+
bundle and a route serving it, and neither exists yet. The summary card is
|
|
1169
|
+
the one that is honest without a picture; the wide variant pointing at
|
|
1170
|
+
nothing degrades worse than this does. -->
|
|
1171
|
+
<meta property="og:type" content="website">
|
|
1172
|
+
<meta property="og:site_name" content="agentgit">
|
|
1173
|
+
<meta property="og:title" content="agentgit — Git for AI agents">
|
|
1174
|
+
<meta property="og:description" content="{{META_DESCRIPTION}}">
|
|
1175
|
+
<meta property="og:url" content="https://{{HOST}}/">
|
|
1176
|
+
<meta name="twitter:card" content="summary">
|
|
1177
|
+
<meta name="twitter:title" content="agentgit — Git for AI agents">
|
|
1178
|
+
<meta name="twitter:description" content="{{META_DESCRIPTION}}">
|
|
805
1179
|
<!-- The agent-facing version of this page. GET / splits on Accept: a browser
|
|
806
1180
|
gets this HTML, everything else gets the manual as text. Fetch tools that
|
|
807
1181
|
agents drive send a browser's Accept, so they land here; this is how they
|
|
@@ -907,19 +1281,12 @@ const PAGE = `<!doctype html>
|
|
|
907
1281
|
font-size: clamp(1.15rem, 2.9vw, 1.5rem);
|
|
908
1282
|
line-height: 1.5;
|
|
909
1283
|
color: var(--bone);
|
|
910
|
-
|
|
1284
|
+
/* Three lines, one sentence each, broken by hand — so the column has to
|
|
1285
|
+
hold the longest of them unwrapped, and the promise is 42 characters. */
|
|
1286
|
+
max-width: 46ch;
|
|
911
1287
|
margin: 0 0 2.75rem;
|
|
912
1288
|
}
|
|
913
1289
|
.lede em { font-style: normal; color: var(--copper); }
|
|
914
|
-
/* The second half of the pitch — what the service is FOR, as opposed to what
|
|
915
|
-
it does — set a step down so the two read as one thought rather than as
|
|
916
|
-
two competing opening lines. */
|
|
917
|
-
.lede-2 {
|
|
918
|
-
font-size: clamp(1.02rem, 2.3vw, 1.2rem);
|
|
919
|
-
color: var(--muted);
|
|
920
|
-
max-width: 44ch;
|
|
921
|
-
}
|
|
922
|
-
|
|
923
1290
|
/* ── the command, which is the CTA ────────────────────── */
|
|
924
1291
|
|
|
925
1292
|
.cta { margin: 0 0 1rem; max-width: 44rem; }
|
|
@@ -1157,7 +1524,9 @@ const PAGE = `<!doctype html>
|
|
|
1157
1524
|
display: grid;
|
|
1158
1525
|
grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
|
|
1159
1526
|
gap: 0 2.5rem;
|
|
1160
|
-
|
|
1527
|
+
/* The illustration sits at the vertical middle of the prose beside it,
|
|
1528
|
+
so a shorter transcript is not left hanging off the top of a column. */
|
|
1529
|
+
align-items: center;
|
|
1161
1530
|
}
|
|
1162
1531
|
/* A grid item defaults to min-width:auto, so a track cannot shrink below its
|
|
1163
1532
|
content's min-content width — and .tx is white-space:pre with 53-character
|
|
@@ -1261,6 +1630,39 @@ const PAGE = `<!doctype html>
|
|
|
1261
1630
|
margin: 0;
|
|
1262
1631
|
}
|
|
1263
1632
|
|
|
1633
|
+
/* A chapter break: the rule says "different subject", the kicker names it,
|
|
1634
|
+
and the paragraph is the widest prose on the page because it has no
|
|
1635
|
+
illustration to share the row with. */
|
|
1636
|
+
.chapter {
|
|
1637
|
+
margin-top: 6rem;
|
|
1638
|
+
padding-top: 2.5rem;
|
|
1639
|
+
border-top: 1px solid var(--rule-2);
|
|
1640
|
+
}
|
|
1641
|
+
.chapter .kicker {
|
|
1642
|
+
display: block;
|
|
1643
|
+
font-family: var(--mono);
|
|
1644
|
+
font-size: .72rem;
|
|
1645
|
+
letter-spacing: .12em;
|
|
1646
|
+
text-transform: uppercase;
|
|
1647
|
+
color: var(--verdi);
|
|
1648
|
+
margin-bottom: 1rem;
|
|
1649
|
+
}
|
|
1650
|
+
.chapter p { max-width: 58ch; }
|
|
1651
|
+
.chapter .term-solo { margin-top: 1.75rem; }
|
|
1652
|
+
|
|
1653
|
+
/* The last block, and the only one after it is the footer. The command is
|
|
1654
|
+
the point of it, so the prose above is one line and the type is the
|
|
1655
|
+
hero's rather than a section's. */
|
|
1656
|
+
.close { margin-top: 5rem; }
|
|
1657
|
+
.close p { font-size: 1.08rem; max-width: 50ch; margin-bottom: 1.4rem; }
|
|
1658
|
+
/* Not the faint italic every other section's em is: this one is stress on
|
|
1659
|
+
the word the whole page turns on, not something the tool said. */
|
|
1660
|
+
.close p em { font-style: normal; color: var(--copper); }
|
|
1661
|
+
/* The hero's width, not the 34rem of .term-solo: this is the same command,
|
|
1662
|
+
and at 34rem the host is long enough to push the URL into a scroll nobody
|
|
1663
|
+
scrolls — a closing command a reader cannot read is not a call to act. */
|
|
1664
|
+
.close .term { max-width: 44rem; margin-bottom: .75rem; }
|
|
1665
|
+
|
|
1264
1666
|
footer {
|
|
1265
1667
|
margin-top: 5rem;
|
|
1266
1668
|
padding-top: 1.4rem;
|
|
@@ -1303,9 +1705,7 @@ const PAGE = `<!doctype html>
|
|
|
1303
1705
|
|
|
1304
1706
|
<h1>Git for AI agents<span class="dot">.</span></h1>
|
|
1305
1707
|
|
|
1306
|
-
<p class="lede">Your agent
|
|
1307
|
-
|
|
1308
|
-
<p class="lede lede-2">Scratch repositories, and the handoff between two agents: <em>handing work to another agent is the URL</em>, and there is nothing else to send.</p>
|
|
1708
|
+
<p class="lede">You have GitHub.<br>Your agent does not.<br><em>Push to a name and the repository exists.</em></p>
|
|
1309
1709
|
|
|
1310
1710
|
<div class="cta">
|
|
1311
1711
|
<label class="repo-field" for="repo">
|
|
@@ -1324,7 +1724,7 @@ const PAGE = `<!doctype html>
|
|
|
1324
1724
|
</div>
|
|
1325
1725
|
</div>
|
|
1326
1726
|
<p class="under" id="repo-help">{{HERO_UNDER}}</p>
|
|
1327
|
-
{{
|
|
1727
|
+
{{HANDOFF}}{{OWNERSHIP}}{{GRANT}}{{PRIVATE}}{{CLIENT}}{{EVENTS}}{{COLLISION}}
|
|
1328
1728
|
<section>
|
|
1329
1729
|
<h2>The rules.</h2>
|
|
1330
1730
|
<ul class="claims">
|
|
@@ -1333,25 +1733,25 @@ const PAGE = `<!doctype html>
|
|
|
1333
1733
|
</section>
|
|
1334
1734
|
|
|
1335
1735
|
<section>
|
|
1336
|
-
<h2>
|
|
1337
|
-
<p>
|
|
1736
|
+
<h2>What's next.</h2>
|
|
1737
|
+
<p>{{ROADMAP_LEDE}}</p>
|
|
1338
1738
|
<ul class="road">
|
|
1339
1739
|
{{ROADMAP_OWNERSHIP}}
|
|
1340
1740
|
{{ROADMAP_PULLS}}
|
|
1341
1741
|
<li>
|
|
1342
|
-
<span class="when">
|
|
1742
|
+
<span class="when">Soon</span>
|
|
1343
1743
|
<h3>CI</h3>
|
|
1344
|
-
<p>A ref moving is already an event
|
|
1744
|
+
<p>A ref moving is already an event and the client already runs a command on it, so the step left is running that command somewhere other than your laptop.</p>
|
|
1345
1745
|
</li>
|
|
1346
1746
|
</ul>
|
|
1347
|
-
<p class="caveat">{{PERMANENCE}} Not a place for anything you cannot lose
|
|
1747
|
+
<p class="caveat">{{PERMANENCE}} Not a place for anything you cannot lose.{{LIMITS}}</p>
|
|
1348
1748
|
</section>
|
|
1349
|
-
{{OPERATOR}}
|
|
1749
|
+
{{OPERATOR}}{{CLOSE}}
|
|
1350
1750
|
</main>
|
|
1351
1751
|
|
|
1352
1752
|
<footer>
|
|
1353
1753
|
<span>agentgit</span>
|
|
1354
|
-
|
|
1754
|
+
{{FOOTER_LINKS}}
|
|
1355
1755
|
<span>Run your own: <code>zbc add walgit</code></span>
|
|
1356
1756
|
</footer>
|
|
1357
1757
|
</div>
|
|
@@ -1367,7 +1767,10 @@ const PAGE = `<!doctype html>
|
|
|
1367
1767
|
// near-identical prompts at the same time, and a plain name is probably
|
|
1368
1768
|
// taken — is better given as the default anyone starts from.
|
|
1369
1769
|
var field = document.getElementById("repo");
|
|
1370
|
-
|
|
1770
|
+
// Both places the command appears: the hero, and the closing block that
|
|
1771
|
+
// sends a reader who scrolled the whole page back to it. One field feeds
|
|
1772
|
+
// both, so the page never shows two different names.
|
|
1773
|
+
var echoes = [document.getElementById("repo-echo"), document.getElementById("repo-echo-end")];
|
|
1371
1774
|
|
|
1372
1775
|
var chars = "abcdefghjkmnpqrstuvwxyz23456789";
|
|
1373
1776
|
var suffix = "";
|
|
@@ -1382,7 +1785,10 @@ const PAGE = `<!doctype html>
|
|
|
1382
1785
|
};
|
|
1383
1786
|
|
|
1384
1787
|
var render = function () {
|
|
1385
|
-
|
|
1788
|
+
var name = clean(field.value) || "my-thing";
|
|
1789
|
+
for (var e = 0; e < echoes.length; e++) {
|
|
1790
|
+
if (echoes[e]) echoes[e].textContent = name;
|
|
1791
|
+
}
|
|
1386
1792
|
};
|
|
1387
1793
|
|
|
1388
1794
|
field.value = "my-thing-" + suffix;
|
|
@@ -1457,6 +1863,7 @@ const PAGE = `<!doctype html>
|
|
|
1457
1863
|
|
|
1458
1864
|
copy(document.getElementById("copy"));
|
|
1459
1865
|
copy(document.getElementById("copy-watch"));
|
|
1866
|
+
copy(document.getElementById("copy-end"));
|
|
1460
1867
|
|
|
1461
1868
|
{{WIRE_SCRIPT}}
|
|
1462
1869
|
})();
|