@augurworks/augur 0.15.1
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/CANVAS.md +858 -0
- package/INSTALL.md +603 -0
- package/LICENSE +27 -0
- package/README.md +150 -0
- package/TRADEMARKS.md +72 -0
- package/agents/README.md +65 -0
- package/agents/canon-extract.md +117 -0
- package/agents/canon.md +151 -0
- package/agents/canvas.md +88 -0
- package/agents/currency.md +74 -0
- package/agents/drafts.md +92 -0
- package/agents/identity.md +148 -0
- package/agents/prototype-contract.md +69 -0
- package/agents/publishing.md +324 -0
- package/agents/review-feedback.md +76 -0
- package/agents/space-json.md +132 -0
- package/agents/ui-skill.md +101 -0
- package/agents/working-marks.md +86 -0
- package/brand/augur-eye.svg +3 -0
- package/brand/augur-icon.svg +41 -0
- package/brand/augur-mark.svg +5 -0
- package/brand/lentianova-bulky.otf +0 -0
- package/brand/lentianova-median.otf +0 -0
- package/brand/lentianova.woff2 +0 -0
- package/build.js +8409 -0
- package/changelog.md +133 -0
- package/fonts/inter-latin-wght-normal.woff2 +0 -0
- package/package.json +57 -0
- package/pitis/PETS.md +121 -0
- package/pitis/README.md +117 -0
- package/pitis/index.html +266 -0
- package/pitis/piti.build.js +81 -0
- package/pitis/piti.js +929 -0
- package/pitis/roast-agent.md +185 -0
- package/realtime/src/index.js +119 -0
- package/realtime/wrangler.example.toml +44 -0
- package/scripts/adopt.mjs +106 -0
- package/scripts/board-snapshot.mjs +197 -0
- package/scripts/build-seed-pack.mjs +33 -0
- package/scripts/bundle-rekey.mjs +112 -0
- package/scripts/bundle-tenancy-rehearsal.mjs +781 -0
- package/scripts/canon-extract.mjs +578 -0
- package/scripts/canon.mjs +599 -0
- package/scripts/canvas-screen.mjs +333 -0
- package/scripts/check-local.mjs +136 -0
- package/scripts/clawd-art.mjs +75 -0
- package/scripts/clawd-canvas.mjs +741 -0
- package/scripts/cli.mjs +100 -0
- package/scripts/clone.mjs +422 -0
- package/scripts/close.mjs +30 -0
- package/scripts/connect.mjs +103 -0
- package/scripts/deploy.mjs +157 -0
- package/scripts/dev.mjs +54 -0
- package/scripts/doc-lint.mjs +143 -0
- package/scripts/export.mjs +300 -0
- package/scripts/fork.mjs +64 -0
- package/scripts/freeze.mjs +74 -0
- package/scripts/frontdoor-parity.mjs +180 -0
- package/scripts/hook.mjs +67 -0
- package/scripts/identity-rekey.mjs +112 -0
- package/scripts/init.mjs +122 -0
- package/scripts/land.mjs +40 -0
- package/scripts/lib/adapters.mjs +156 -0
- package/scripts/lib/board-snapshot.mjs +511 -0
- package/scripts/lib/draft.mjs +385 -0
- package/scripts/lib/graduate.mjs +276 -0
- package/scripts/lib/instance.mjs +74 -0
- package/scripts/lib/marks.mjs +107 -0
- package/scripts/lib/materialize.mjs +138 -0
- package/scripts/lib/merge3.mjs +124 -0
- package/scripts/lib/offline-posture.mjs +120 -0
- package/scripts/lib/offline-respawn.mjs +18 -0
- package/scripts/lib/offline-wrangler.mjs +78 -0
- package/scripts/lib/publish-compose.mjs +12 -0
- package/scripts/lib/publish-conflict.mjs +78 -0
- package/scripts/lib/publish-evidence.mjs +144 -0
- package/scripts/lib/refine-compare.mjs +140 -0
- package/scripts/lib/refine-ledger.mjs +150 -0
- package/scripts/lib/refine-png.mjs +149 -0
- package/scripts/lib/seed-pack-build.mjs +141 -0
- package/scripts/lib/state-compare.mjs +68 -0
- package/scripts/lib/store.mjs +122 -0
- package/scripts/login.mjs +84 -0
- package/scripts/mark.mjs +112 -0
- package/scripts/migrate-board-keys.mjs +164 -0
- package/scripts/migrate.mjs +265 -0
- package/scripts/no-foreign-vocabulary.mjs +216 -0
- package/scripts/no-product-names.mjs +157 -0
- package/scripts/no-tenant-globals.mjs +1134 -0
- package/scripts/offline.mjs +247 -0
- package/scripts/og.mjs +170 -0
- package/scripts/one-tenant-resolver.mjs +146 -0
- package/scripts/open.mjs +63 -0
- package/scripts/publish.mjs +1041 -0
- package/scripts/read.mjs +31 -0
- package/scripts/refine.mjs +455 -0
- package/scripts/release-drift.mjs +138 -0
- package/scripts/restore.mjs +322 -0
- package/scripts/review.mjs +125 -0
- package/scripts/save.mjs +21 -0
- package/scripts/shell-lint.mjs +189 -0
- package/scripts/ship.mjs +460 -0
- package/scripts/shoot.mjs +264 -0
- package/scripts/smoke-invite.mjs +113 -0
- package/scripts/state-inventory.mjs +223 -0
- package/scripts/status.mjs +177 -0
- package/scripts/sync.mjs +27 -0
- package/scripts/tenant-do-rehearsal.mjs +1314 -0
- package/scripts/ui-copy-lint.mjs +202 -0
- package/scripts/watch.mjs +32 -0
- package/scripts/wrangler-preflight.mjs +246 -0
- package/seed/CANON.md +43 -0
- package/seed/README.md +119 -0
- package/seed/prototype-status.json +9 -0
- package/seed/registry.json +88 -0
- package/seed/skills/starter-ui/SKILL.md +52 -0
- package/seed/skills/starter-ui/skill.json +11 -0
- package/seed/skills/starter-ui/starter-tokens.css +73 -0
- package/seed/skills/starter-ui/starter-ui.css +318 -0
- package/seed/skills/starter-ui/starter-ui.js +50 -0
- package/seed/space.json +5 -0
- package/seed/start-here/prototypes/connect-your-terminal/index.html +428 -0
- package/seed/start-here/prototypes/connect-your-terminal/preview.webp +0 -0
- package/seed/start-here/prototypes/sample-with-comments/index.html +172 -0
- package/seed/start-here/prototypes/sample-with-comments/preview.webp +0 -0
- package/seed/start-here/prototypes/set-up-your-design-system/index.html +353 -0
- package/seed/start-here/prototypes/set-up-your-design-system/preview.webp +0 -0
- package/seed/threads.json +52 -0
- package/seed/worked-examples/prototypes/field-readings/index.html +273 -0
- package/seed/worked-examples/prototypes/field-readings/preview.webp +0 -0
- package/seed/worked-examples/prototypes/slide-deck/index.html +214 -0
- package/seed/worked-examples/prototypes/slide-deck/preview.webp +0 -0
- package/seed/worked-examples/prototypes/specimen-viewer/index.html +203 -0
- package/seed/worked-examples/prototypes/specimen-viewer/preview.webp +0 -0
- package/src/_worker.js +12668 -0
- package/src/board-key.mjs +57 -0
- package/src/board-room.mjs +881 -0
- package/src/bundle-keys.mjs +138 -0
- package/src/canon/collect-in-browser.js +215 -0
- package/src/canon/emit.mjs +232 -0
- package/src/canon/observe.mjs +260 -0
- package/src/canon/schema.mjs +451 -0
- package/src/canvas/DSEG-LICENSE.txt +95 -0
- package/src/canvas/DSEG7Classic-Bold.woff2 +0 -0
- package/src/canvas/canvas.css +885 -0
- package/src/canvas/canvas.js +5780 -0
- package/src/canvas/capture.js +485 -0
- package/src/chrome/appchrome.mjs +568 -0
- package/src/currency.mjs +203 -0
- package/src/delete-confirmation.mjs +254 -0
- package/src/drafts/drafts.js +326 -0
- package/src/entry.js +58 -0
- package/src/galleries.mjs +400 -0
- package/src/health-cron.mjs +173 -0
- package/src/identity.json +1 -0
- package/src/kv-codec.mjs +135 -0
- package/src/kv-identity.mjs +259 -0
- package/src/mail.mjs +599 -0
- package/src/provenance.mjs +74 -0
- package/src/publish-compose.mjs +363 -0
- package/src/publish-fork.mjs +221 -0
- package/src/publish-units.mjs +44 -0
- package/src/purge.mjs +81 -0
- package/src/review/COMMENTING-UX.md +306 -0
- package/src/review/cat.png +0 -0
- package/src/review/comment-cursor.svg +7 -0
- package/src/review/comments.js +1738 -0
- package/src/room-ticket.mjs +96 -0
- package/src/roster-chip.mjs +32 -0
- package/src/seed-pack.mjs +261 -0
- package/src/state-inventory.mjs +249 -0
- package/src/sw-logic.mjs +48 -0
- package/src/tenant-cache.mjs +141 -0
- package/src/tenant-context.mjs +386 -0
- package/src/tenant-do.js +2940 -0
- package/src/tenant-host.mjs +144 -0
- package/src/tenant-quotas.mjs +140 -0
- package/src/unit-core.mjs +103 -0
- package/src/unit-object.mjs +338 -0
- package/templates/README.md +67 -0
- package/templates/shell/deploy.yml +145 -0
- package/templates/shell/engine-bump.yml +142 -0
- package/templates/shell/health.yml +233 -0
- package/templates/shell/kv-backup.yml +201 -0
- package/templates/shell/roster-update.yml +110 -0
- package/templates/shell/space-preflight.yml +35 -0
- package/templates/shell/space-rebake.yml +79 -0
- package/templates/shell/store-backup.yml +152 -0
- package/templates/shell/wrangler.example.toml +266 -0
- package/templates/space/publish.yml +91 -0
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
// build-seed-pack.mjs — build `dist/__seed/pack.json` by hand.
|
|
3
|
+
//
|
|
4
|
+
// node scripts/build-seed-pack.mjs [--out <dist>] [--print]
|
|
5
|
+
//
|
|
6
|
+
// build.js does this itself on every engine-only build (the deploy path); this is the same
|
|
7
|
+
// builder for a person who wants to see the document — `--print` writes the pack's summary
|
|
8
|
+
// (space, engine, files, threads) to stdout instead of the bytes. See
|
|
9
|
+
// scripts/lib/seed-pack-build.mjs for what the pack is and what it asserts.
|
|
10
|
+
|
|
11
|
+
import path from "node:path";
|
|
12
|
+
import { fileURLToPath } from "node:url";
|
|
13
|
+
import { buildSeedPack, writeSeedPack } from "./lib/seed-pack-build.mjs";
|
|
14
|
+
|
|
15
|
+
const ROOT = fileURLToPath(new URL("..", import.meta.url));
|
|
16
|
+
const argv = process.argv.slice(2);
|
|
17
|
+
const opt = (n) => { const i = argv.indexOf(n); return i > -1 && argv[i + 1] ? argv[i + 1] : null; };
|
|
18
|
+
|
|
19
|
+
const summary = (pack) => ({
|
|
20
|
+
format: pack.format, engine: pack.engine, space: pack.space.id,
|
|
21
|
+
files: Object.keys(pack.files).length,
|
|
22
|
+
prototypes: (pack.routing.publicPrefixes || []).length,
|
|
23
|
+
threads: Object.values(pack.threads).reduce((n, l) => n + l.length, 0),
|
|
24
|
+
connectCommandFile: pack.connectCommandFile,
|
|
25
|
+
});
|
|
26
|
+
|
|
27
|
+
if (argv.includes("--print")) {
|
|
28
|
+
console.log(JSON.stringify(summary(buildSeedPack({ engineRoot: ROOT })), null, 2));
|
|
29
|
+
} else {
|
|
30
|
+
const dist = path.resolve(opt("--out") || path.join(ROOT, "dist"));
|
|
31
|
+
const { file, pack } = writeSeedPack(dist, { engineRoot: ROOT });
|
|
32
|
+
console.error(`[seed-pack] wrote ${path.relative(process.cwd(), file)} — ${JSON.stringify(summary(pack))}`);
|
|
33
|
+
}
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
/**
|
|
3
|
+
* augur bundle-rekey — move a live workspace's published content onto the workspace
|
|
4
|
+
* segment, one page at a time, without an account credential.
|
|
5
|
+
*
|
|
6
|
+
* augur bundle-rekey what WOULD move (a dry run; the default)
|
|
7
|
+
* augur bundle-rekey --confirm <workspace> move it
|
|
8
|
+
* augur bundle-rekey --confirm <ws> --families spaces,config,assets
|
|
9
|
+
*
|
|
10
|
+
* `B-bundle-store-tenancy`. The store's keys now carry the workspace on a deployment that
|
|
11
|
+
* resolves one from the Host (`bundleKey` in src/_worker.js). A deployment that starts
|
|
12
|
+
* WRITING `t/<workspace>/…` does not thereby start reading what it wrote yesterday: the
|
|
13
|
+
* unprefixed keys stay where they are, and there is deliberately no read-through fallback
|
|
14
|
+
* to them, because an unprefixed key on a shared bucket belongs to whichever workspace the
|
|
15
|
+
* deployment served before the segment existed and nothing in the key says which. So a
|
|
16
|
+
* live workspace is MOVED, and this is the command that moves it.
|
|
17
|
+
*
|
|
18
|
+
* WHY THIS IS NOT `augur migrate`, and it is structural rather than a missing flag.
|
|
19
|
+
* `migrate` is origin-addressed — it writes INTO a workspace over `/__publish/*` and cannot
|
|
20
|
+
* name a key — and a restore lands every space at v1, so re-keying by exporting and
|
|
21
|
+
* restoring into the same workspace would strand the whole version history under the old
|
|
22
|
+
* prefix and start the new one at one. `rollback` would then reach nothing. This copies
|
|
23
|
+
* KEYS, so the history comes with it.
|
|
24
|
+
*
|
|
25
|
+
* ⚠️ IT IS A COPY AND NEVER A CUT. Nothing is deleted. That is what makes it safe to
|
|
26
|
+
* interrupt, safe to re-run, and what keeps `BUNDLE_TENANCY`'s per-family flag a revert:
|
|
27
|
+
* flip the word back and the unprefixed answer is still there. Reclaiming the originals is
|
|
28
|
+
* a separate act for after somebody has looked.
|
|
29
|
+
*
|
|
30
|
+
* ⚠️ IT IS CORRECT FOR EXACTLY ONE WORKSPACE PER DEPLOYMENT, and the worker refuses rather
|
|
31
|
+
* than trusting this script about it: a bucket that already holds a second workspace prefix
|
|
32
|
+
* answers `not-the-only-workspace`, because there the unprefixed keys cannot be said to be
|
|
33
|
+
* anybody's.
|
|
34
|
+
*
|
|
35
|
+
* WHAT DOES NOT MOVE, and must not: `blobs/` and `spaces/_engine/`. Both are shared across
|
|
36
|
+
* every workspace on the deployment by decision — the blob namespace is content-addressed
|
|
37
|
+
* and deduplicated, the engine chrome is one build serving everyone — so both are already
|
|
38
|
+
* at the key every workspace reads them at. The run reports them as `shared`.
|
|
39
|
+
*
|
|
40
|
+
* RUN IT BEHIND A FREEZE (`augur freeze`). `/__publish/` writes are refused while frozen and
|
|
41
|
+
* the `_state/*` routes are exempt, so a re-key runs with no publish racing it. Reads and
|
|
42
|
+
* sign-in are unaffected, so the site stays up for the whole move.
|
|
43
|
+
*
|
|
44
|
+
* Exit 0 when the move is complete (or was already), 1 on a refusal.
|
|
45
|
+
*/
|
|
46
|
+
import { target, apiClient } from "./lib/store.mjs";
|
|
47
|
+
|
|
48
|
+
const log = (m) => console.error(`\x1b[36m[bundle-rekey]\x1b[0m ${m}`);
|
|
49
|
+
const die = (m) => { log(m); process.exit(1); };
|
|
50
|
+
|
|
51
|
+
const args = process.argv.slice(2);
|
|
52
|
+
const opt = (f) => { const i = args.indexOf(f); return i >= 0 ? args[i + 1] : null; };
|
|
53
|
+
const CONFIRM = opt("--confirm");
|
|
54
|
+
const FAMILIES = (opt("--families") || "").split(",").map((s) => s.trim()).filter(Boolean);
|
|
55
|
+
const MAX_PAGES = Number(opt("--max-pages")) > 0 ? Number(opt("--max-pages")) : 200;
|
|
56
|
+
|
|
57
|
+
let origin, token;
|
|
58
|
+
try { ({ origin, token } = target()); } catch (e) { die(e.message); }
|
|
59
|
+
const req = apiClient(origin, token);
|
|
60
|
+
|
|
61
|
+
const call = async (body) => {
|
|
62
|
+
const res = await req("_state/rekey", {
|
|
63
|
+
method: "POST",
|
|
64
|
+
headers: { "content-type": "application/json" },
|
|
65
|
+
body: JSON.stringify(body),
|
|
66
|
+
});
|
|
67
|
+
let out;
|
|
68
|
+
try { out = await res.json(); } catch (e) { die(`${origin} answered ${res.status} with something that is not JSON`); }
|
|
69
|
+
if (!out.ok) {
|
|
70
|
+
if (out.reason === "not-the-only-workspace") {
|
|
71
|
+
die(`${origin} refused: this bucket already holds another workspace (${(out.others || []).join(", ")}).`
|
|
72
|
+
+ ` An unprefixed key there belongs to nobody in particular, so nothing may claim it.`);
|
|
73
|
+
}
|
|
74
|
+
if (out.reason === "confirm-mismatch") die(`${origin} refused: --confirm must be "${out.expected}"`);
|
|
75
|
+
die(`${origin} refused: ${out.reason}`);
|
|
76
|
+
}
|
|
77
|
+
return out;
|
|
78
|
+
};
|
|
79
|
+
|
|
80
|
+
const base = { ...(FAMILIES.length ? { families: FAMILIES } : {}) };
|
|
81
|
+
|
|
82
|
+
// The dry run always happens, confirmed or not: the number it prints is what the caller
|
|
83
|
+
// gets to check before anything is written, and after a real run it is the receipt.
|
|
84
|
+
const plan = await call(base);
|
|
85
|
+
if (plan.reason === "no-segment") {
|
|
86
|
+
log(`${origin} serves one workspace and writes no segment — there is nothing to move.`);
|
|
87
|
+
process.exit(0);
|
|
88
|
+
}
|
|
89
|
+
log(`${origin} — workspace ${plan.workspace} → ${plan.segment}`);
|
|
90
|
+
log(`families ${plan.families.join(", ")}; ${plan.considered} object(s) considered, `
|
|
91
|
+
+ `${plan.skipped} already there, ${plan.shared} deliberately shared (blobs/ and spaces/_engine/)`);
|
|
92
|
+
|
|
93
|
+
if (!CONFIRM) {
|
|
94
|
+
const left = plan.copied + plan.pending;
|
|
95
|
+
if (!left) { log("\x1b[32mnothing to move\x1b[0m — this workspace is already on the segment"); process.exit(0); }
|
|
96
|
+
log(`\x1b[33mwould copy ${left} object(s)\x1b[0m`);
|
|
97
|
+
for (const k of plan.keys) console.log(` ${k}`);
|
|
98
|
+
if (plan.keys.length < left) console.log(` … and ${left - plan.keys.length} more`);
|
|
99
|
+
console.log("\x1b[2mre-run with --confirm <workspace> to move them; nothing is ever deleted\x1b[0m");
|
|
100
|
+
process.exit(0);
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
let copied = 0, bytes = 0, pages = 0;
|
|
104
|
+
for (;;) {
|
|
105
|
+
const out = await call({ ...base, confirm: CONFIRM });
|
|
106
|
+
copied += out.copied; bytes += out.bytes; pages++;
|
|
107
|
+
if (out.copied) log(`page ${pages}: ${out.copied} copied (${(bytes / 1e6).toFixed(2)} MB so far)`);
|
|
108
|
+
if (out.done) break;
|
|
109
|
+
if (pages >= MAX_PAGES) die(`stopped after ${MAX_PAGES} pages with work left — re-run to continue`);
|
|
110
|
+
}
|
|
111
|
+
log(`\x1b[32mdone\x1b[0m — ${copied} object(s) copied, ${(bytes / 1e6).toFixed(2)} MB`);
|
|
112
|
+
console.log("\x1b[2mthe originals are untouched: this is a copy, and it is what the per-family revert reads\x1b[0m");
|