@supersuit/hypercontext 0.1.0 → 0.2.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/CHANGELOG.md +10 -0
- package/README.md +10 -4
- package/package.json +2 -2
- package/src/check.mjs +6 -3
- package/src/kinds.mjs +17 -11
- package/src/manifest.mjs +3 -1
- package/src/packages.mjs +28 -0
- package/src/render.mjs +4 -0
- package/src/stamp.mjs +29 -8
- package/standards/checkpoint/v1.json +0 -61
- package/standards/document/v1.json +0 -78
- package/standards/hdsop/v1.json +0 -61
- package/standards/recurrent/v1.json +0 -47
- package/standards/tile-app/v1.json +0 -58
- package/standards/workflow-catalog/v1.json +0 -47
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,15 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.2.0
|
|
4
|
+
|
|
5
|
+
Every kind is now checked by its own package, so `check` reports more findings on the same workspace: a minor version, because it changes what is checked.
|
|
6
|
+
|
|
7
|
+
- `document` is checked and stamped by `@supersuit/document-md`, `checkpoint` by `@supersuit/checkpoint-md`, `hdsop` and `workflow-catalog` by `@supersuit/hdsop-md` (one run covers both, each finding filed under the kind it is about), `recurrent` by `@supersuit/recurrent-md`, `tile-app` by `@supersuit/tile-app-md`. None of the six raises `validator:missing` any more.
|
|
8
|
+
- This package no longer ships manifests: each kind's comes from its package. A kind with no package and no manifest is listed as missing rather than crashing `check`.
|
|
9
|
+
- `recurrent` and `tile-app` are stamped. A recurrent goes through `recurrent-md migrate`, which moves its body labels into the header as it names the standard; a tile app through `tile-app-md stamp`.
|
|
10
|
+
- `stamp` repeats each package's closing count and every record it skipped, with the reason, so a catalog with no header or a headerless document is named in the report rather than lost.
|
|
11
|
+
- A kind whose package run also checks another (hdsop checks the catalog) runs when only the other kind has records.
|
|
12
|
+
|
|
3
13
|
## 0.1.0
|
|
4
14
|
|
|
5
15
|
- The header codec, `versionOf`, `bareStandard` and the byte-preserving `stampStandard` now come from `@supersuit/hypercontext-core`, a dependency at `^0.1.0`; they are re-exported here unchanged.
|
package/README.md
CHANGED
|
@@ -33,7 +33,13 @@ This package defines no record type. A kind's shape belongs to its package. The
|
|
|
33
33
|
| superobjective | /standards/superobjective | @supersuit/superobjective |
|
|
34
34
|
| piece | /standards/piece | @supersuit/piece-md |
|
|
35
35
|
| conversation | /standards/conversation | @supersuit/transcript-md |
|
|
36
|
-
| document
|
|
36
|
+
| document | /standards/document | @supersuit/document-md |
|
|
37
|
+
| checkpoint | /standards/checkpoint | @supersuit/checkpoint-md |
|
|
38
|
+
| hdsop, workflow-catalog | /standards/hdsop, /workflow-catalog | @supersuit/hdsop-md |
|
|
39
|
+
| recurrent | /standards/recurrent | @supersuit/recurrent-md |
|
|
40
|
+
| tile-app | /standards/tile-app | @supersuit/tile-app-md |
|
|
41
|
+
|
|
42
|
+
Every kind has a package. A kind added later without one would still be checked for the shared property, with a `validator:missing` warning saying nothing checks its shape.
|
|
37
43
|
|
|
38
44
|
Every standard lives at `https://hypercontext.wiki/standards/<kind>/v<N>`. `hypercontext kinds` prints the list.
|
|
39
45
|
|
|
@@ -55,15 +61,15 @@ npx @supersuit/hypercontext manifests --out static/standards # every kind's ma
|
|
|
55
61
|
kind records names standard context validated by
|
|
56
62
|
self 1 1/1 1/1 @supersuit/self-md@0.2.0
|
|
57
63
|
friend 833 833/833 5/833 @supersuit/friend-md@0.3.0
|
|
58
|
-
document 663 472/663 663/663
|
|
64
|
+
document 663 472/663 663/663 @supersuit/document-md@0.1.0
|
|
59
65
|
...
|
|
60
66
|
```
|
|
61
67
|
|
|
62
68
|
### The backfill goes through each kind's own package
|
|
63
69
|
|
|
64
|
-
`stamp` never writes a packaged kind's records itself. It runs the backfill that kind's package ships (`friend-md stamp`, `group-md migrate`, `superprojects migrate --stamp-standard`, `self-md stamp-standard`, `transcript-md stamp-standard`, `piece-md stamp`), because the package knows its own key order and everything else its writers keep. A kind with no package
|
|
70
|
+
`stamp` never writes a packaged kind's records itself. It runs the backfill that kind's package ships (`friend-md stamp`, `group-md migrate`, `superprojects migrate --stamp-standard`, `self-md stamp-standard`, `transcript-md stamp-standard`, `piece-md stamp`, `document-md stamp`, `checkpoint-md stamp`, `hdsop-md stamp`, `recurrent-md migrate`, `tile-app-md stamp`), because the package knows its own key order and everything else its writers keep. The report repeats each package's closing count and every record it skipped, with its reason (a document with no header, a workflow catalog with none). A kind with no package would be stamped here, by one byte-preserving edit: the line goes directly after `kind:` (or first), or an unversioned link of the same kind is upgraded where it stands, and every other byte of the file, line endings included, is unchanged. A file with no header is never given one; it is reported, because a record with no header needs writing, not stamping. A file that already names a standard, right or wrong, is left alone and the wrong one is reported.
|
|
65
71
|
|
|
66
|
-
|
|
72
|
+
A recurrent is stamped by `recurrent-md migrate`, which moves its bold body labels into the header in the same edit, so no field is ever kept twice. A tile app is stamped by `tile-app-md stamp`, a textual edit to `app.json` that adds `"standard"` as its first key. A kind marked `stampable: false` (none is, since 0.2.0) is never touched, and the report says why.
|
|
67
73
|
|
|
68
74
|
Linked files are never records here. A document symlinked in from another repository belongs to that repository; counting it would count it twice, and stamping it would write into a tree this check was never pointed at.
|
|
69
75
|
|
package/package.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@supersuit/hypercontext",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.2.0",
|
|
4
4
|
"description": "One check over a whole workspace: every record names the standard it follows, and every kind of record passes its own package's checks.",
|
|
5
5
|
"keywords": ["hypercontext", "records", "markdown", "frontmatter", "lint", "self-documenting", "agents", "supersuit"],
|
|
6
6
|
"type": "module",
|
|
7
7
|
"bin": { "hypercontext": "bin/hypercontext.mjs" },
|
|
8
8
|
"exports": { ".": "./src/index.mjs", "./package.json": "./package.json" },
|
|
9
|
-
"files": ["bin/", "src/", "docs/", "
|
|
9
|
+
"files": ["bin/", "src/", "docs/", "README.md", "CHANGELOG.md", "LICENSE"],
|
|
10
10
|
"scripts": {
|
|
11
11
|
"test": "node --test test/*.test.mjs",
|
|
12
12
|
"mutation-check": "node scripts/mutation-check.mjs"
|
package/src/check.mjs
CHANGED
|
@@ -27,9 +27,10 @@ const STANDARDS = Object.fromEntries(KINDS.map((k) => [k.kind, k.standard]));
|
|
|
27
27
|
* @param {boolean} [opts.online=false] also prove every standard the records name is live and matches its owner's manifest
|
|
28
28
|
* @param {Function} [opts.fetch] injected fetch for tests
|
|
29
29
|
* @param {object} [opts.fs] injected filesystem for tests
|
|
30
|
+
* @param {object[]} [opts.registry] the kinds to judge, KINDS unless a test supplies its own
|
|
30
31
|
*/
|
|
31
|
-
export async function check(workspace, { kinds, packagesDir, shapes = true, online = false, fetch, fs = fsDefault, read = (p) => readFileSync(p, 'utf8') } = {}) {
|
|
32
|
-
const wanted =
|
|
32
|
+
export async function check(workspace, { kinds, packagesDir, shapes = true, online = false, fetch, fs = fsDefault, read = (p) => readFileSync(p, 'utf8'), registry = KINDS } = {}) {
|
|
33
|
+
const wanted = registry.filter((k) => !kinds || kinds.includes(k.kind));
|
|
33
34
|
const rows = [];
|
|
34
35
|
const findings = [];
|
|
35
36
|
const seen = new Map(); // kind -> Set of standard URLs its records name
|
|
@@ -61,7 +62,9 @@ export async function check(workspace, { kinds, packagesDir, shapes = true, onli
|
|
|
61
62
|
} else if (k.sharesLint) {
|
|
62
63
|
row.validator = k.pkg.name;
|
|
63
64
|
row.validatorNote = `checked with ${k.sharesLint}`;
|
|
64
|
-
} else if (records.length === 0) {
|
|
65
|
+
} else if (records.length === 0 && !registry.some((x) => x.sharesLint === k.kind && findRecords(workspace, x.kind, fs).length)) {
|
|
66
|
+
// A kind whose run also checks another (hdsop checks the catalog) still runs when only the
|
|
67
|
+
// other kind has records.
|
|
65
68
|
row.validator = k.pkg.name;
|
|
66
69
|
row.validatorNote = 'nothing to check';
|
|
67
70
|
} else {
|
package/src/kinds.mjs
CHANGED
|
@@ -8,9 +8,9 @@
|
|
|
8
8
|
// rules (Gary, 2026-10-17: "AMNESIAC AIS need to be able to refer the standard a file/folder is
|
|
9
9
|
// supposed to uphold"; 2026-10-20: "every instance ... needs to be self documenting").
|
|
10
10
|
//
|
|
11
|
-
//
|
|
12
|
-
// the report
|
|
13
|
-
// same command that would close it.
|
|
11
|
+
// Every kind has its package (since 0.2.0). A kind added with `pkg: null` would still be checked
|
|
12
|
+
// for the shared property, and the report would say in one line that nothing checks its shape,
|
|
13
|
+
// so the gap is visible from the same command that would close it.
|
|
14
14
|
|
|
15
15
|
// The URL shapes and how a URL reads back as a version are shared by every record package, so they
|
|
16
16
|
// live in @supersuit/hypercontext-core and are re-exported here unchanged.
|
|
@@ -37,6 +37,8 @@ const url = (slug, v = CURRENT_VERSION) => standardUrl(slug, v);
|
|
|
37
37
|
|
|
38
38
|
const CONTEXT = Object.freeze(['id', 'summary', 'read_when', 'as_of', 'keep']);
|
|
39
39
|
const SUPERPROJECTS = Object.freeze({ name: '@supersuit/superprojects', repo: 'superprojects', bin: 'bin/superprojects.mjs' });
|
|
40
|
+
// One package owns both the workflow maps and the catalog that scores them; one run checks both.
|
|
41
|
+
const HDSOP = Object.freeze({ name: '@supersuit/hdsop-md', repo: 'hdsop-md', bin: 'bin/hdsop-md.mjs' });
|
|
40
42
|
|
|
41
43
|
/** @type {readonly Kind[]} */
|
|
42
44
|
export const KINDS = Object.freeze([
|
|
@@ -58,14 +60,18 @@ export const KINDS = Object.freeze([
|
|
|
58
60
|
pkg: { name: '@supersuit/piece-md', repo: 'piece-md', bin: 'bin/piece-md.mjs' } },
|
|
59
61
|
{ kind: 'conversation', label: 'conversations, transcript.md', standard: url('conversation'), format: 'md', context: [],
|
|
60
62
|
pkg: { name: '@supersuit/transcript-md', repo: 'transcript-md', bin: 'lib/freedom-conversations-cli.mjs' } },
|
|
61
|
-
{ kind: 'document', label: 'documents, documents/*.md', standard: url('document'), format: 'md', context: [],
|
|
62
|
-
|
|
63
|
-
{ kind: '
|
|
64
|
-
|
|
65
|
-
{ kind: '
|
|
66
|
-
|
|
67
|
-
{ kind: '
|
|
68
|
-
|
|
63
|
+
{ kind: 'document', label: 'documents, documents/*.md', standard: url('document'), format: 'md', context: [],
|
|
64
|
+
pkg: { name: '@supersuit/document-md', repo: 'document-md', bin: 'bin/document-md.mjs' } },
|
|
65
|
+
{ kind: 'checkpoint', label: 'checkpoints, checkpoints/*.md', standard: url('checkpoint'), format: 'md', context: [],
|
|
66
|
+
pkg: { name: '@supersuit/checkpoint-md', repo: 'checkpoint-md', bin: 'bin/checkpoint-md.mjs' } },
|
|
67
|
+
{ kind: 'hdsop', label: 'workflow maps, workflows/*.md', standard: url('hdsop'), format: 'md', context: [],
|
|
68
|
+
pkg: HDSOP },
|
|
69
|
+
{ kind: 'workflow-catalog', label: 'the workflow catalog, workflows/CATALOG.md', standard: url('workflow-catalog'), format: 'md', context: [],
|
|
70
|
+
pkg: HDSOP, sharesLint: 'hdsop' },
|
|
71
|
+
{ kind: 'recurrent', label: 'recurrents, recurrents/*.md', standard: url('recurrent'), format: 'md', context: [],
|
|
72
|
+
pkg: { name: '@supersuit/recurrent-md', repo: 'recurrent-md', bin: 'bin/recurrent-md.mjs' } },
|
|
73
|
+
{ kind: 'tile-app', label: 'tile apps, <app>/app.json', standard: url('tile-app'), format: 'json', context: [],
|
|
74
|
+
pkg: { name: '@supersuit/tile-app-md', repo: 'tile-app-md', bin: 'bin/tile-app-md.mjs' } },
|
|
69
75
|
]);
|
|
70
76
|
|
|
71
77
|
export const byKind = (k) => KINDS.find((x) => x.kind === k);
|
package/src/manifest.mjs
CHANGED
|
@@ -23,7 +23,9 @@ export function manifestHome(kind, { packagesDir } = {}) {
|
|
|
23
23
|
if (dir && existsSync(join(dir, 'standards', kind.kind))) return { dir: join(dir, 'standards', kind.kind), owner: kind.pkg.name };
|
|
24
24
|
return { dir: null, owner: kind.pkg.name };
|
|
25
25
|
}
|
|
26
|
-
|
|
26
|
+
// A kind with no package and no manifest here has none at all: missing, never a crash.
|
|
27
|
+
const own = join(OWN, kind.kind);
|
|
28
|
+
return { dir: existsSync(own) ? own : null, owner: '@supersuit/hypercontext' };
|
|
27
29
|
}
|
|
28
30
|
|
|
29
31
|
/** Every version a kind's owner ships a manifest for; [current] when none can be read. */
|
package/src/packages.mjs
CHANGED
|
@@ -122,6 +122,34 @@ export const LINTS = {
|
|
|
122
122
|
}
|
|
123
123
|
return { ran: true, findings };
|
|
124
124
|
},
|
|
125
|
+
// document-md takes every documents home in one call and names each finding by its home plus
|
|
126
|
+
// the document's path under it.
|
|
127
|
+
document: (dir, bin, ws, { homes }) => {
|
|
128
|
+
if (!homes.length) return { ran: true, findings: [] };
|
|
129
|
+
const r = runJson(dir, bin, ['lint', ...homes.map((h) => join(ws, h))]);
|
|
130
|
+
return r.ok
|
|
131
|
+
? { ran: true, findings: findingsOf(r.json).map((f) => normalize({ ...f, path: f.home && f.document ? relative(ws, join(f.home, f.document)) : f.document })) }
|
|
132
|
+
: { ran: false, note: r.error };
|
|
133
|
+
},
|
|
134
|
+
checkpoint: (dir, bin, ws) => {
|
|
135
|
+
const r = runJson(dir, bin, ['lint', join(ws, 'checkpoints')]);
|
|
136
|
+
return r.ok ? { ran: true, findings: findingsOf(r.json).map((f) => normalize(f, (s) => `checkpoints/${s}`)) } : { ran: false, note: r.error };
|
|
137
|
+
},
|
|
138
|
+
// One hdsop-md run checks the maps and the catalog; each finding says which kind it is about.
|
|
139
|
+
hdsop: (dir, bin, ws) => {
|
|
140
|
+
const r = runJson(dir, bin, ['lint', join(ws, 'workflows')]);
|
|
141
|
+
if (!r.ok) return { ran: false, note: r.error };
|
|
142
|
+
return { ran: true, findings: findingsOf(r.json).map((f) => ({ ...normalize(f, (s) => `workflows/${s}`), kind: f.kind === 'workflow-catalog' ? 'workflow-catalog' : 'hdsop' })) };
|
|
143
|
+
},
|
|
144
|
+
recurrent: (dir, bin, ws) => {
|
|
145
|
+
const r = runJson(dir, bin, ['lint', join(ws, 'recurrents')]);
|
|
146
|
+
return r.ok ? { ran: true, findings: findingsOf(r.json).map((f) => normalize({ ...f, path: f.recurrent ?? f.path }, (s) => `recurrents/${s}`)) } : { ran: false, note: r.error };
|
|
147
|
+
},
|
|
148
|
+
// tile-app-md finds the apps itself from the workspace, and names each by its absolute path.
|
|
149
|
+
'tile-app': (dir, bin, ws) => {
|
|
150
|
+
const r = runJson(dir, bin, ['lint', ws]);
|
|
151
|
+
return r.ok ? { ran: true, findings: findingsOf(r.json).map((f) => normalize(f, (s) => (s.startsWith('/') ? relative(ws, s) : s))) } : { ran: false, note: r.error };
|
|
152
|
+
},
|
|
125
153
|
// A conversation is checked in-process through the package's codec: one process per file
|
|
126
154
|
// would cost minutes on a workspace that holds thousands.
|
|
127
155
|
conversation: async (dir, _bin, ws, { records, read }) => {
|
package/src/render.mjs
CHANGED
|
@@ -41,6 +41,10 @@ export function renderStamp(s) {
|
|
|
41
41
|
if (!k.missing) continue;
|
|
42
42
|
const n = k.changed != null ? `${k.changed} of ${k.missing}` : `${k.missing}`;
|
|
43
43
|
lines.push(` ${k.kind}: ${n} via ${k.via}${k.note ? `; ${k.note}` : ''}${k.reasons ? `; skipped ${Object.entries(k.reasons).map(([r, c]) => `${c} (${r})`).join(', ')}` : ''}`);
|
|
44
|
+
// What the kind's own package said: its count, and each record it would not touch and why.
|
|
45
|
+
for (const l of k.said ?? []) lines.push(` ${l}`);
|
|
46
|
+
for (const l of (k.skippedLines ?? []).slice(0, 10)) lines.push(` ${l}`);
|
|
47
|
+
if ((k.skippedLines?.length ?? 0) > 10) lines.push(` ... and ${k.skippedLines.length - 10} more skipped (--json lists every one)`);
|
|
44
48
|
}
|
|
45
49
|
if (lines.length === 1) lines.push(' nothing: every record already names its standard.');
|
|
46
50
|
return lines.join('\n');
|
package/src/stamp.mjs
CHANGED
|
@@ -25,21 +25,39 @@ export const PACKAGE_STAMPS = {
|
|
|
25
25
|
piece: (ws, apply, { homes }) => homes.map((h) => ['stamp', join(ws, h), ...(apply ? ['--apply'] : [])]),
|
|
26
26
|
conversation: (ws, apply) => [['stamp-standard', '--workspace', ws, ...(apply ? ['--apply'] : [])]],
|
|
27
27
|
superproject: (ws, apply, { roots }) => roots.map((r) => ['migrate', '--root', join(ws, r), '--stamp-standard', ...(apply ? ['--apply'] : [])]),
|
|
28
|
+
document: (ws, apply, { homes }) => (homes.length ? [['stamp', ...homes.map((h) => join(ws, h)), ...(apply ? ['--apply'] : [])]] : []),
|
|
29
|
+
checkpoint: (ws, apply) => [['stamp', join(ws, 'checkpoints'), ...(apply ? ['--apply'] : [])]],
|
|
30
|
+
// One run stamps the maps and the catalog; it skips a catalog with no header and says why.
|
|
31
|
+
hdsop: (ws, apply) => [['stamp', join(ws, 'workflows'), ...(apply ? ['--apply'] : [])]],
|
|
32
|
+
// A recurrent's fields move from body labels into its header in the same edit that names its
|
|
33
|
+
// standard, so there is never a second copy of a field.
|
|
34
|
+
recurrent: (ws, apply) => [['migrate', join(ws, 'recurrents'), ...(apply ? ['--apply'] : [])]],
|
|
35
|
+
'tile-app': (ws, apply) => [['stamp', ws, ...(apply ? ['--apply'] : [])]],
|
|
28
36
|
};
|
|
29
37
|
|
|
38
|
+
// What a package's stamp printed that a person needs: every line naming a record it skipped
|
|
39
|
+
// (with its reason) and its closing count. Paths are made workspace-relative.
|
|
40
|
+
function said(stdout, ws) {
|
|
41
|
+
const lines = (stdout ?? '').split('\n').map((l) => l.trimEnd()).filter(Boolean);
|
|
42
|
+
if (!lines.length || lines[0].startsWith('{') || lines[0].startsWith('[')) return { skipped: [], summary: '' };
|
|
43
|
+
const rel = (l) => l.split(`${ws}/`).join('');
|
|
44
|
+
return { skipped: lines.filter((l) => /^skipped\s/.test(l)).map(rel), summary: rel(lines.at(-1)) };
|
|
45
|
+
}
|
|
46
|
+
|
|
30
47
|
/**
|
|
31
48
|
* @returns {Promise<{apply: boolean, kinds: Array<{kind, missing, via, changed?, skipped?, note?}>}>}
|
|
32
49
|
*/
|
|
33
|
-
export async function stamp(workspace, { kinds, apply = false, packagesDir, fs = fsDefault } = {}) {
|
|
50
|
+
export async function stamp(workspace, { kinds, apply = false, packagesDir, fs = fsDefault, registry = KINDS } = {}) {
|
|
34
51
|
const out = [];
|
|
35
52
|
const roots = superprojectRoots(workspace, fs);
|
|
36
53
|
const done = new Set();
|
|
37
|
-
|
|
54
|
+
const missingOf = (k, records) => records.filter((rel) => {
|
|
55
|
+
const text = readFileSync(join(workspace, rel), 'utf8');
|
|
56
|
+
return !judge(text, k, { alsoAccept: acceptedFor(k.kind, standardOf(text, k.format).data, STANDARDS) }).selfDocumenting;
|
|
57
|
+
});
|
|
58
|
+
for (const k of registry.filter((x) => !kinds || kinds.includes(x.kind))) {
|
|
38
59
|
const records = findRecords(workspace, k.kind, fs);
|
|
39
|
-
const missing = records
|
|
40
|
-
const text = readFileSync(join(workspace, rel), 'utf8');
|
|
41
|
-
return !judge(text, k, { alsoAccept: acceptedFor(k.kind, standardOf(text, k.format).data, STANDARDS) }).selfDocumenting;
|
|
42
|
-
});
|
|
60
|
+
const missing = missingOf(k, records);
|
|
43
61
|
const row = { kind: k.kind, records: records.length, missing: missing.length };
|
|
44
62
|
if (!missing.length) { out.push({ ...row, via: 'nothing to do' }); continue; }
|
|
45
63
|
if (k.stampable === false) { out.push({ ...row, via: 'not stamped', note: k.why }); continue; }
|
|
@@ -52,12 +70,15 @@ export async function stamp(workspace, { kinds, apply = false, packagesDir, fs =
|
|
|
52
70
|
if (!dir) { out.push({ ...row, via: 'not stamped', note: `${k.pkg.name} is not installed` }); continue; }
|
|
53
71
|
const runs = PACKAGE_STAMPS[lead](workspace, apply, { roots, homes: documentHomes(workspace, fs) }).map((args) => {
|
|
54
72
|
const r = spawnSync(process.execPath, [join(dir, k.pkg.bin), ...args], { encoding: 'utf8', maxBuffer: 64 * 1024 * 1024 });
|
|
55
|
-
return { args: args.join(' '), status: r.status, stderr: (r.stderr ?? '').trim().split('\n')[0] ?? '' };
|
|
73
|
+
return { args: args.join(' '), status: r.status, stderr: (r.stderr ?? '').trim().split('\n')[0] ?? '', ...said(r.stdout, workspace) };
|
|
56
74
|
});
|
|
57
75
|
// Exit 2 is a usage error in every one of these packages: the command this file names is
|
|
58
76
|
// not one that version knows, which is a version mismatch, never a record problem.
|
|
59
77
|
const failed = runs.filter((r) => r.status === 2 || r.status === null);
|
|
60
|
-
|
|
78
|
+
const skipped = runs.flatMap((r) => r.skipped);
|
|
79
|
+
const summary = runs.map((r) => r.summary).filter(Boolean);
|
|
80
|
+
out.push({ ...row, via: `${k.pkg.name}@${packageVersion(dir)}`, ...(failed.length ? { note: `did not run: ${failed.map((f) => `${f.args} (${f.stderr})`).join('; ')}` } : {}),
|
|
81
|
+
...(summary.length ? { said: summary } : {}), ...(skipped.length ? { skippedLines: skipped } : {}) });
|
|
61
82
|
continue;
|
|
62
83
|
}
|
|
63
84
|
if (k.pkg) { out.push({ ...row, via: 'not stamped', note: `${k.pkg.name} ships no stamp this package knows how to call` }); continue; }
|
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"manifest_version": 1,
|
|
3
|
-
"standard": "https://hypercontext.wiki/standards/checkpoint/v1",
|
|
4
|
-
"kind": "checkpoint",
|
|
5
|
-
"version": 1,
|
|
6
|
-
"title": "A session checkpoint",
|
|
7
|
-
"status": "current",
|
|
8
|
-
"superseded_by": null,
|
|
9
|
-
"latest": "https://hypercontext.wiki/standards/checkpoint",
|
|
10
|
-
"record": {
|
|
11
|
-
"path": "checkpoints/YYYY-MM-DD-HHMMSS-<slug>.md",
|
|
12
|
-
"format": "md"
|
|
13
|
-
},
|
|
14
|
-
"header": {
|
|
15
|
-
"required": [
|
|
16
|
-
"standard",
|
|
17
|
-
"kind",
|
|
18
|
-
"summary"
|
|
19
|
-
],
|
|
20
|
-
"keys": {
|
|
21
|
-
"standard": {
|
|
22
|
-
"const": "https://hypercontext.wiki/standards/checkpoint/v1"
|
|
23
|
-
},
|
|
24
|
-
"kind": {
|
|
25
|
-
"const": "checkpoint"
|
|
26
|
-
},
|
|
27
|
-
"summary": {
|
|
28
|
-
"type": "string"
|
|
29
|
-
},
|
|
30
|
-
"date": {
|
|
31
|
-
"type": "string"
|
|
32
|
-
},
|
|
33
|
-
"sha": {
|
|
34
|
-
"type": "string"
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
},
|
|
38
|
-
"validator": null,
|
|
39
|
-
"checked_by": {
|
|
40
|
-
"package": "@supersuit/hypercontext",
|
|
41
|
-
"implements_since": "0.1.0",
|
|
42
|
-
"check": "npx -y @supersuit/hypercontext@^0.1.0 check . --kind checkpoint --json",
|
|
43
|
-
"backfill": "npx -y @supersuit/hypercontext@^0.1.0 stamp . --kind checkpoint --apply",
|
|
44
|
-
"note": "No package checks this shape yet; only the shared property (the record names this standard) is checked."
|
|
45
|
-
},
|
|
46
|
-
"codes": [
|
|
47
|
-
{
|
|
48
|
-
"code": "self-doc:missing",
|
|
49
|
-
"level": "error",
|
|
50
|
-
"means": "the record names no standard, the unversioned URL written before versions, or another kind's standard",
|
|
51
|
-
"fix": "npx -y @supersuit/hypercontext@^0.1.0 stamp . --kind checkpoint --apply"
|
|
52
|
-
},
|
|
53
|
-
{
|
|
54
|
-
"code": "self-doc:version",
|
|
55
|
-
"level": "error",
|
|
56
|
-
"means": "the record names a version of this standard that the checker here does not implement",
|
|
57
|
-
"fix": "upgrade @supersuit/hypercontext, or rewrite the record to a version it implements"
|
|
58
|
-
}
|
|
59
|
-
],
|
|
60
|
-
"umbrella": "npx -y @supersuit/hypercontext check <workspace>"
|
|
61
|
-
}
|
|
@@ -1,78 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"manifest_version": 1,
|
|
3
|
-
"standard": "https://hypercontext.wiki/standards/document/v1",
|
|
4
|
-
"kind": "document",
|
|
5
|
-
"version": 1,
|
|
6
|
-
"title": "A document",
|
|
7
|
-
"status": "current",
|
|
8
|
-
"superseded_by": null,
|
|
9
|
-
"latest": "https://hypercontext.wiki/standards/document",
|
|
10
|
-
"record": {
|
|
11
|
-
"path": "documents/YYYY-MM-DD-HHMMSS-<slug>.md, or <superproject>/documents/",
|
|
12
|
-
"format": "md"
|
|
13
|
-
},
|
|
14
|
-
"header": {
|
|
15
|
-
"required": [
|
|
16
|
-
"standard",
|
|
17
|
-
"audience"
|
|
18
|
-
],
|
|
19
|
-
"keys": {
|
|
20
|
-
"standard": {
|
|
21
|
-
"const": "https://hypercontext.wiki/standards/document/v1"
|
|
22
|
-
},
|
|
23
|
-
"kind": {
|
|
24
|
-
"enum": [
|
|
25
|
-
"brief",
|
|
26
|
-
"spec",
|
|
27
|
-
"design",
|
|
28
|
-
"plan",
|
|
29
|
-
"decision",
|
|
30
|
-
"draft",
|
|
31
|
-
"analysis",
|
|
32
|
-
"transcript",
|
|
33
|
-
"other"
|
|
34
|
-
]
|
|
35
|
-
},
|
|
36
|
-
"status": {
|
|
37
|
-
"enum": [
|
|
38
|
-
"draft",
|
|
39
|
-
"active",
|
|
40
|
-
"approved",
|
|
41
|
-
"final",
|
|
42
|
-
"shipped",
|
|
43
|
-
"superseded"
|
|
44
|
-
]
|
|
45
|
-
},
|
|
46
|
-
"audience": {
|
|
47
|
-
"type": "string"
|
|
48
|
-
},
|
|
49
|
-
"created": {
|
|
50
|
-
"type": "string",
|
|
51
|
-
"pattern": "^[0-9]{4}-[0-9]{2}-[0-9]{2}"
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
},
|
|
55
|
-
"validator": null,
|
|
56
|
-
"checked_by": {
|
|
57
|
-
"package": "@supersuit/hypercontext",
|
|
58
|
-
"implements_since": "0.1.0",
|
|
59
|
-
"check": "npx -y @supersuit/hypercontext@^0.1.0 check . --kind document --json",
|
|
60
|
-
"backfill": "npx -y @supersuit/hypercontext@^0.1.0 stamp . --kind document --apply",
|
|
61
|
-
"note": "No package checks this shape yet; only the shared property (the record names this standard) is checked."
|
|
62
|
-
},
|
|
63
|
-
"codes": [
|
|
64
|
-
{
|
|
65
|
-
"code": "self-doc:missing",
|
|
66
|
-
"level": "error",
|
|
67
|
-
"means": "the record names no standard, the unversioned URL written before versions, or another kind's standard",
|
|
68
|
-
"fix": "npx -y @supersuit/hypercontext@^0.1.0 stamp . --kind document --apply"
|
|
69
|
-
},
|
|
70
|
-
{
|
|
71
|
-
"code": "self-doc:version",
|
|
72
|
-
"level": "error",
|
|
73
|
-
"means": "the record names a version of this standard that the checker here does not implement",
|
|
74
|
-
"fix": "upgrade @supersuit/hypercontext, or rewrite the record to a version it implements"
|
|
75
|
-
}
|
|
76
|
-
],
|
|
77
|
-
"umbrella": "npx -y @supersuit/hypercontext check <workspace>"
|
|
78
|
-
}
|
package/standards/hdsop/v1.json
DELETED
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"manifest_version": 1,
|
|
3
|
-
"standard": "https://hypercontext.wiki/standards/hdsop/v1",
|
|
4
|
-
"kind": "hdsop",
|
|
5
|
-
"version": 1,
|
|
6
|
-
"title": "A workflow map (HDSOP)",
|
|
7
|
-
"status": "current",
|
|
8
|
-
"superseded_by": null,
|
|
9
|
-
"latest": "https://hypercontext.wiki/standards/hdsop",
|
|
10
|
-
"record": {
|
|
11
|
-
"path": "workflows/<slug>.md",
|
|
12
|
-
"format": "md"
|
|
13
|
-
},
|
|
14
|
-
"header": {
|
|
15
|
-
"required": [
|
|
16
|
-
"standard",
|
|
17
|
-
"title",
|
|
18
|
-
"id"
|
|
19
|
-
],
|
|
20
|
-
"keys": {
|
|
21
|
-
"standard": {
|
|
22
|
-
"const": "https://hypercontext.wiki/standards/hdsop/v1"
|
|
23
|
-
},
|
|
24
|
-
"title": {
|
|
25
|
-
"type": "string"
|
|
26
|
-
},
|
|
27
|
-
"id": {
|
|
28
|
-
"type": "string"
|
|
29
|
-
},
|
|
30
|
-
"frequency": {
|
|
31
|
-
"type": "string"
|
|
32
|
-
},
|
|
33
|
-
"owner": {
|
|
34
|
-
"type": "string"
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
},
|
|
38
|
-
"validator": null,
|
|
39
|
-
"checked_by": {
|
|
40
|
-
"package": "@supersuit/hypercontext",
|
|
41
|
-
"implements_since": "0.1.0",
|
|
42
|
-
"check": "npx -y @supersuit/hypercontext@^0.1.0 check . --kind hdsop --json",
|
|
43
|
-
"backfill": "npx -y @supersuit/hypercontext@^0.1.0 stamp . --kind hdsop --apply",
|
|
44
|
-
"note": "No package checks this shape yet; only the shared property (the record names this standard) is checked."
|
|
45
|
-
},
|
|
46
|
-
"codes": [
|
|
47
|
-
{
|
|
48
|
-
"code": "self-doc:missing",
|
|
49
|
-
"level": "error",
|
|
50
|
-
"means": "the record names no standard, the unversioned URL written before versions, or another kind's standard",
|
|
51
|
-
"fix": "npx -y @supersuit/hypercontext@^0.1.0 stamp . --kind hdsop --apply"
|
|
52
|
-
},
|
|
53
|
-
{
|
|
54
|
-
"code": "self-doc:version",
|
|
55
|
-
"level": "error",
|
|
56
|
-
"means": "the record names a version of this standard that the checker here does not implement",
|
|
57
|
-
"fix": "upgrade @supersuit/hypercontext, or rewrite the record to a version it implements"
|
|
58
|
-
}
|
|
59
|
-
],
|
|
60
|
-
"umbrella": "npx -y @supersuit/hypercontext check <workspace>"
|
|
61
|
-
}
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"manifest_version": 1,
|
|
3
|
-
"standard": "https://hypercontext.wiki/standards/recurrent/v1",
|
|
4
|
-
"kind": "recurrent",
|
|
5
|
-
"version": 1,
|
|
6
|
-
"title": "A recurrent",
|
|
7
|
-
"status": "current",
|
|
8
|
-
"superseded_by": null,
|
|
9
|
-
"latest": "https://hypercontext.wiki/standards/recurrent",
|
|
10
|
-
"record": {
|
|
11
|
-
"path": "recurrents/<slug>.md",
|
|
12
|
-
"format": "md"
|
|
13
|
-
},
|
|
14
|
-
"header": {
|
|
15
|
-
"required": [
|
|
16
|
-
"standard"
|
|
17
|
-
],
|
|
18
|
-
"keys": {
|
|
19
|
-
"standard": {
|
|
20
|
-
"const": "https://hypercontext.wiki/standards/recurrent/v1"
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
},
|
|
24
|
-
"validator": null,
|
|
25
|
-
"checked_by": {
|
|
26
|
-
"package": "@supersuit/hypercontext",
|
|
27
|
-
"implements_since": "0.1.0",
|
|
28
|
-
"check": "npx -y @supersuit/hypercontext@^0.1.0 check . --kind recurrent --json",
|
|
29
|
-
"backfill": null,
|
|
30
|
-
"note": "A recurrent keeps its fields as bold labels in its body today; its writer converts it to a header before it can carry the standard, so no backfill runs."
|
|
31
|
-
},
|
|
32
|
-
"codes": [
|
|
33
|
-
{
|
|
34
|
-
"code": "self-doc:missing",
|
|
35
|
-
"level": "error",
|
|
36
|
-
"means": "the record names no standard, the unversioned URL written before versions, or another kind's standard",
|
|
37
|
-
"fix": "npx -y @supersuit/hypercontext@^0.1.0 stamp . --kind recurrent --apply"
|
|
38
|
-
},
|
|
39
|
-
{
|
|
40
|
-
"code": "self-doc:version",
|
|
41
|
-
"level": "error",
|
|
42
|
-
"means": "the record names a version of this standard that the checker here does not implement",
|
|
43
|
-
"fix": "upgrade @supersuit/hypercontext, or rewrite the record to a version it implements"
|
|
44
|
-
}
|
|
45
|
-
],
|
|
46
|
-
"umbrella": "npx -y @supersuit/hypercontext check <workspace>"
|
|
47
|
-
}
|
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"manifest_version": 1,
|
|
3
|
-
"standard": "https://hypercontext.wiki/standards/tile-app/v1",
|
|
4
|
-
"kind": "tile-app",
|
|
5
|
-
"version": 1,
|
|
6
|
-
"title": "A tile app",
|
|
7
|
-
"status": "current",
|
|
8
|
-
"superseded_by": null,
|
|
9
|
-
"latest": "https://hypercontext.wiki/standards/tile-app",
|
|
10
|
-
"record": {
|
|
11
|
-
"path": "helm/tile-apps/<id>/app.json",
|
|
12
|
-
"format": "json"
|
|
13
|
-
},
|
|
14
|
-
"header": {
|
|
15
|
-
"required": [
|
|
16
|
-
"standard",
|
|
17
|
-
"id",
|
|
18
|
-
"title"
|
|
19
|
-
],
|
|
20
|
-
"keys": {
|
|
21
|
-
"standard": {
|
|
22
|
-
"const": "https://hypercontext.wiki/standards/tile-app/v1"
|
|
23
|
-
},
|
|
24
|
-
"id": {
|
|
25
|
-
"type": "string"
|
|
26
|
-
},
|
|
27
|
-
"title": {
|
|
28
|
-
"type": "string"
|
|
29
|
-
},
|
|
30
|
-
"summary": {
|
|
31
|
-
"type": "string"
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
},
|
|
35
|
-
"validator": null,
|
|
36
|
-
"checked_by": {
|
|
37
|
-
"package": "@supersuit/hypercontext",
|
|
38
|
-
"implements_since": "0.1.0",
|
|
39
|
-
"check": "npx -y @supersuit/hypercontext@^0.1.0 check . --kind tile-app --json",
|
|
40
|
-
"backfill": null,
|
|
41
|
-
"note": "The Helm host reads app.json; the key is added once the host accepts it, so no backfill runs."
|
|
42
|
-
},
|
|
43
|
-
"codes": [
|
|
44
|
-
{
|
|
45
|
-
"code": "self-doc:missing",
|
|
46
|
-
"level": "error",
|
|
47
|
-
"means": "the record names no standard, the unversioned URL written before versions, or another kind's standard",
|
|
48
|
-
"fix": "npx -y @supersuit/hypercontext@^0.1.0 stamp . --kind tile-app --apply"
|
|
49
|
-
},
|
|
50
|
-
{
|
|
51
|
-
"code": "self-doc:version",
|
|
52
|
-
"level": "error",
|
|
53
|
-
"means": "the record names a version of this standard that the checker here does not implement",
|
|
54
|
-
"fix": "upgrade @supersuit/hypercontext, or rewrite the record to a version it implements"
|
|
55
|
-
}
|
|
56
|
-
],
|
|
57
|
-
"umbrella": "npx -y @supersuit/hypercontext check <workspace>"
|
|
58
|
-
}
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"manifest_version": 1,
|
|
3
|
-
"standard": "https://hypercontext.wiki/standards/workflow-catalog/v1",
|
|
4
|
-
"kind": "workflow-catalog",
|
|
5
|
-
"version": 1,
|
|
6
|
-
"title": "The workflow catalog",
|
|
7
|
-
"status": "current",
|
|
8
|
-
"superseded_by": null,
|
|
9
|
-
"latest": "https://hypercontext.wiki/standards/workflow-catalog",
|
|
10
|
-
"record": {
|
|
11
|
-
"path": "workflows/CATALOG.md",
|
|
12
|
-
"format": "md"
|
|
13
|
-
},
|
|
14
|
-
"header": {
|
|
15
|
-
"required": [
|
|
16
|
-
"standard"
|
|
17
|
-
],
|
|
18
|
-
"keys": {
|
|
19
|
-
"standard": {
|
|
20
|
-
"const": "https://hypercontext.wiki/standards/workflow-catalog/v1"
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
},
|
|
24
|
-
"validator": null,
|
|
25
|
-
"checked_by": {
|
|
26
|
-
"package": "@supersuit/hypercontext",
|
|
27
|
-
"implements_since": "0.1.0",
|
|
28
|
-
"check": "npx -y @supersuit/hypercontext@^0.1.0 check . --kind workflow-catalog --json",
|
|
29
|
-
"backfill": "npx -y @supersuit/hypercontext@^0.1.0 stamp . --kind workflow-catalog --apply",
|
|
30
|
-
"note": "No package checks this shape yet; only the shared property (the record names this standard) is checked."
|
|
31
|
-
},
|
|
32
|
-
"codes": [
|
|
33
|
-
{
|
|
34
|
-
"code": "self-doc:missing",
|
|
35
|
-
"level": "error",
|
|
36
|
-
"means": "the record names no standard, the unversioned URL written before versions, or another kind's standard",
|
|
37
|
-
"fix": "npx -y @supersuit/hypercontext@^0.1.0 stamp . --kind workflow-catalog --apply"
|
|
38
|
-
},
|
|
39
|
-
{
|
|
40
|
-
"code": "self-doc:version",
|
|
41
|
-
"level": "error",
|
|
42
|
-
"means": "the record names a version of this standard that the checker here does not implement",
|
|
43
|
-
"fix": "upgrade @supersuit/hypercontext, or rewrite the record to a version it implements"
|
|
44
|
-
}
|
|
45
|
-
],
|
|
46
|
-
"umbrella": "npx -y @supersuit/hypercontext check <workspace>"
|
|
47
|
-
}
|