@profile-as-code/core 0.1.1 → 0.1.2
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/dist/cite.d.ts +91 -0
- package/dist/cite.d.ts.map +1 -0
- package/dist/cite.js +440 -0
- package/dist/cite.js.map +1 -0
- package/dist/completeness.d.ts +1 -1
- package/dist/completeness.js +1 -1
- package/dist/generated/ai-policy.gen.d.ts +36 -0
- package/dist/generated/ai-policy.gen.d.ts.map +1 -0
- package/dist/generated/ai-policy.gen.js +31 -0
- package/dist/generated/ai-policy.gen.js.map +1 -0
- package/dist/generated/platforms.gen.d.ts +8 -0
- package/dist/generated/platforms.gen.d.ts.map +1 -1
- package/dist/generated/platforms.gen.js +68 -0
- package/dist/generated/platforms.gen.js.map +1 -1
- package/dist/generated/schema.zod.d.ts +20 -0
- package/dist/generated/schema.zod.d.ts.map +1 -1
- package/dist/generated/schema.zod.js +6 -1
- package/dist/generated/schema.zod.js.map +1 -1
- package/dist/geo.d.ts +11 -3
- package/dist/geo.d.ts.map +1 -1
- package/dist/geo.js +21 -8
- package/dist/geo.js.map +1 -1
- package/dist/index.d.ts +29 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +17 -1
- package/dist/index.js.map +1 -1
- package/dist/load.d.ts.map +1 -1
- package/dist/load.js +9 -0
- package/dist/load.js.map +1 -1
- package/dist/normalize.d.ts +57 -0
- package/dist/normalize.d.ts.map +1 -0
- package/dist/normalize.js +133 -0
- package/dist/normalize.js.map +1 -0
- package/dist/presence.d.ts +94 -0
- package/dist/presence.d.ts.map +1 -0
- package/dist/presence.js +217 -0
- package/dist/presence.js.map +1 -0
- package/dist/registry.d.ts +6 -3
- package/dist/registry.d.ts.map +1 -1
- package/dist/registry.js +8 -4
- package/dist/registry.js.map +1 -1
- package/dist/structured-data.d.ts +4 -3
- package/dist/structured-data.d.ts.map +1 -1
- package/dist/structured-data.js +72 -7
- package/dist/structured-data.js.map +1 -1
- package/dist/types.d.ts +15 -8
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js.map +1 -1
- package/package.json +1 -1
- package/dist/paste-source.d.ts +0 -14
- package/dist/paste-source.d.ts.map +0 -1
- package/dist/paste-source.js +0 -17
- package/dist/paste-source.js.map +0 -1
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* D23 — the presence surface and the release fan-out (SPEC §22, issue #262).
|
|
3
|
+
*
|
|
4
|
+
* The unit of first class is the **presence surface**, not the profile. Two
|
|
5
|
+
* consequences this module owns, both DERIVED and stored nowhere:
|
|
6
|
+
*
|
|
7
|
+
* presenceBoard(profile) the daily board: every surface a release has
|
|
8
|
+
* addressed, at its newest release, with state;
|
|
9
|
+
* releasePlan(profile, id?) one release's ordered fan-out + base text.
|
|
10
|
+
*
|
|
11
|
+
* **No second state model.** A surface's state is the ledger's own
|
|
12
|
+
* `in-sync` / `stale` / `never` (§19), derived from `deployments` for the release's
|
|
13
|
+
* own `changedUnits`:
|
|
14
|
+
*
|
|
15
|
+
* ANY changed unit has no ledger record on that surface → never
|
|
16
|
+
* every changed unit has a record, and some record's
|
|
17
|
+
* contentHash != the unit's current hash → stale
|
|
18
|
+
* every record matches → in-sync
|
|
19
|
+
*
|
|
20
|
+
* Partial coverage is NEVER in-sync: a release that changed two units and the
|
|
21
|
+
* surface confirmed only one still owes the other, and `missingUnits` names it.
|
|
22
|
+
*
|
|
23
|
+
* A surface the ledger cannot record (a repo-meta/distribution slug outside the
|
|
24
|
+
* platform enum) therefore reads `never`: the honest v1 answer — the plan names
|
|
25
|
+
* what must be touched; closing that loop is a later contract change, never a
|
|
26
|
+
* second state invented here.
|
|
27
|
+
*
|
|
28
|
+
* Offline, deterministic, no clock: ordering is kind rank → registry slug.
|
|
29
|
+
*/
|
|
30
|
+
import { type SurfaceKind } from "./generated/platforms.gen.js";
|
|
31
|
+
import type { LoadedProfile } from "./types.js";
|
|
32
|
+
/** A release row from the workspace (schema v1.15, D23). */
|
|
33
|
+
export type Release = NonNullable<LoadedProfile["releases"]>[number];
|
|
34
|
+
/** The state a surface carries for a release — the §19 ledger vocabulary. */
|
|
35
|
+
export type PresenceState = "in-sync" | "stale" | "never";
|
|
36
|
+
/** An addressed surface that the registry does not know is a typo, not a kind. */
|
|
37
|
+
export declare class PresenceError extends Error {
|
|
38
|
+
constructor(message: string);
|
|
39
|
+
}
|
|
40
|
+
export interface ReleaseSurface {
|
|
41
|
+
surface: string;
|
|
42
|
+
kind: SurfaceKind;
|
|
43
|
+
state: PresenceState;
|
|
44
|
+
/** changedUnits this surface still owes: no ledger record on the surface, or
|
|
45
|
+
* no SSOT unit behind the key (a release citing a deleted key). Any entry
|
|
46
|
+
* here means the surface is `never`, never a partial `in-sync`. */
|
|
47
|
+
missingUnits: string[];
|
|
48
|
+
}
|
|
49
|
+
export interface BaseText {
|
|
50
|
+
kind: SurfaceKind;
|
|
51
|
+
/** The factual spine: `"<frame>: v<version> (<date>) — <summary.en | id>"`. */
|
|
52
|
+
text: string;
|
|
53
|
+
}
|
|
54
|
+
export interface ReleasePlan {
|
|
55
|
+
release: {
|
|
56
|
+
id: string;
|
|
57
|
+
version: string;
|
|
58
|
+
date: string;
|
|
59
|
+
summary: string;
|
|
60
|
+
changedUnits: string[];
|
|
61
|
+
};
|
|
62
|
+
/** Ordered by kind (repo-meta → profile → distribution), then slug. */
|
|
63
|
+
surfaces: ReleaseSurface[];
|
|
64
|
+
/** One entry per kind PRESENT in `surfaces`, in fan-out order. */
|
|
65
|
+
baseText: BaseText[];
|
|
66
|
+
}
|
|
67
|
+
export interface PresenceRow extends ReleaseSurface {
|
|
68
|
+
/** The newest release that declares this surface. */
|
|
69
|
+
releaseId: string;
|
|
70
|
+
version: string;
|
|
71
|
+
}
|
|
72
|
+
export interface PresenceBoard {
|
|
73
|
+
releases: number;
|
|
74
|
+
latest: {
|
|
75
|
+
id: string;
|
|
76
|
+
version: string;
|
|
77
|
+
date: string;
|
|
78
|
+
} | null;
|
|
79
|
+
/** One row per surface, at the newest release that declares it. */
|
|
80
|
+
surfaces: PresenceRow[];
|
|
81
|
+
counts: Record<PresenceState, number>;
|
|
82
|
+
}
|
|
83
|
+
/** The release a caller asked for, or the newest one (no clock, no guess). */
|
|
84
|
+
export declare function selectRelease(profile: LoadedProfile, id?: string): Release;
|
|
85
|
+
/** One release's ordered fan-out and the per-kind factual spine. */
|
|
86
|
+
export declare function releasePlan(profile: LoadedProfile, id?: string): ReleasePlan;
|
|
87
|
+
/**
|
|
88
|
+
* The daily board (option B, operator 2026-10-28): every surface the workspace's
|
|
89
|
+
* releases have addressed, at its NEWEST release, with the same ledger-derived
|
|
90
|
+
* state. Deriving from the newest release keeps the board a reading of the
|
|
91
|
+
* releases, never a second ledger.
|
|
92
|
+
*/
|
|
93
|
+
export declare function presenceBoard(profile: LoadedProfile): PresenceBoard;
|
|
94
|
+
//# sourceMappingURL=presence.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"presence.d.ts","sourceRoot":"","sources":["../src/presence.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AAEH,OAAO,EAAkB,KAAK,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAEhF,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAEhD,4DAA4D;AAC5D,MAAM,MAAM,OAAO,GAAG,WAAW,CAAC,aAAa,CAAC,UAAU,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC;AAErE,6EAA6E;AAC7E,MAAM,MAAM,aAAa,GAAG,SAAS,GAAG,OAAO,GAAG,OAAO,CAAC;AAkB1D,kFAAkF;AAClF,qBAAa,aAAc,SAAQ,KAAK;IACtC,YAAY,OAAO,EAAE,MAAM,EAG1B;CACF;AAED,MAAM,WAAW,cAAc;IAC7B,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,WAAW,CAAC;IAClB,KAAK,EAAE,aAAa,CAAC;IACrB;;wEAEo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@
|
|
|
1
|
+
/**
|
|
2
|
+
* D23 — the presence surface and the release fan-out (SPEC §22, issue #262).
|
|
3
|
+
*
|
|
4
|
+
* The unit of first class is the **presence surface**, not the profile. Two
|
|
5
|
+
* consequences this module owns, both DERIVED and stored nowhere:
|
|
6
|
+
*
|
|
7
|
+
* presenceBoard(profile) the daily board: every surface a release has
|
|
8
|
+
* addressed, at its newest release, with state;
|
|
9
|
+
* releasePlan(profile, id?) one release's ordered fan-out + base text.
|
|
10
|
+
*
|
|
11
|
+
* **No second state model.** A surface's state is the ledger's own
|
|
12
|
+
* `in-sync` / `stale` / `never` (§19), derived from `deployments` for the release's
|
|
13
|
+
* own `changedUnits`:
|
|
14
|
+
*
|
|
15
|
+
* ANY changed unit has no ledger record on that surface → never
|
|
16
|
+
* every changed unit has a record, and some record's
|
|
17
|
+
* contentHash != the unit's current hash → stale
|
|
18
|
+
* every record matches → in-sync
|
|
19
|
+
*
|
|
20
|
+
* Partial coverage is NEVER in-sync: a release that changed two units and the
|
|
21
|
+
* surface confirmed only one still owes the other, and `missingUnits` names it.
|
|
22
|
+
*
|
|
23
|
+
* A surface the ledger cannot record (a repo-meta/distribution slug outside the
|
|
24
|
+
* platform enum) therefore reads `never`: the honest v1 answer — the plan names
|
|
25
|
+
* what must be touched; closing that loop is a later contract change, never a
|
|
26
|
+
* second state invented here.
|
|
27
|
+
*
|
|
28
|
+
* Offline, deterministic, no clock: ordering is kind rank → registry slug.
|
|
29
|
+
*/
|
|
30
|
+
import { PLATFORM_KINDS } from "./generated/platforms.gen.js";
|
|
31
|
+
import { trackableUnits } from "./ledger.js";
|
|
32
|
+
/** Fan-out order: the artifact's metadata → the identity bodies → the announcements. */
|
|
33
|
+
const KIND_RANK = {
|
|
34
|
+
"repo-meta": 0,
|
|
35
|
+
profile: 1,
|
|
36
|
+
distribution: 2,
|
|
37
|
+
};
|
|
38
|
+
/** The per-kind editorial frame of the base text. The COPY per channel lives in
|
|
39
|
+
* `skills/` (D23 item 4 / rule 7); this is only the factual spine a skill starts
|
|
40
|
+
* from, derived from the release row and nothing else. */
|
|
41
|
+
const BASE_FRAME = {
|
|
42
|
+
"repo-meta": "What shipped",
|
|
43
|
+
profile: "Now on the profile",
|
|
44
|
+
distribution: "Announcement",
|
|
45
|
+
};
|
|
46
|
+
/** An addressed surface that the registry does not know is a typo, not a kind. */
|
|
47
|
+
export class PresenceError extends Error {
|
|
48
|
+
constructor(message) {
|
|
49
|
+
super(message);
|
|
50
|
+
this.name = "PresenceError";
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
const byText = (a, b) => (a < b ? -1 : a > b ? 1 : 0);
|
|
54
|
+
/** Newest first: date desc, then id desc (a stable, clock-free tie-break). */
|
|
55
|
+
function newestFirst(a, b) {
|
|
56
|
+
if (a.date !== b.date)
|
|
57
|
+
return a.date < b.date ? 1 : -1;
|
|
58
|
+
return byText(b.id, a.id);
|
|
59
|
+
}
|
|
60
|
+
function kindOf(surface) {
|
|
61
|
+
const kind = PLATFORM_KINDS[surface];
|
|
62
|
+
if (kind === undefined) {
|
|
63
|
+
throw new PresenceError(`surface "${surface}" is not declared in platforms/registry.yaml — fix the release row (a typo must not silently build a plan)`);
|
|
64
|
+
}
|
|
65
|
+
return kind;
|
|
66
|
+
}
|
|
67
|
+
/** The §19 ledger derivation for one `(release, surface)` pair. */
|
|
68
|
+
function surfaceState(profile, release, surface, unitHashes) {
|
|
69
|
+
const missingUnits = [];
|
|
70
|
+
const changed = release.changedUnits ?? [];
|
|
71
|
+
if (changed.length === 0)
|
|
72
|
+
return { state: "never", missingUnits };
|
|
73
|
+
let stale = false;
|
|
74
|
+
for (const key of changed) {
|
|
75
|
+
const hash = unitHashes.get(key);
|
|
76
|
+
if (hash === undefined) {
|
|
77
|
+
missingUnits.push(key);
|
|
78
|
+
continue;
|
|
79
|
+
}
|
|
80
|
+
// `deployments` is keyed by ledger key then by the platform enum; a
|
|
81
|
+
// non-profile surface simply has no record there (→ never, declared above).
|
|
82
|
+
const record = profile.deployments[key]?.[surface];
|
|
83
|
+
// A changed unit with no record on THIS surface is a pending fan-out, not an
|
|
84
|
+
// absence to ignore: it makes the surface `never` (SPEC §7.8/§22.2).
|
|
85
|
+
if (record === undefined) {
|
|
86
|
+
missingUnits.push(key);
|
|
87
|
+
continue;
|
|
88
|
+
}
|
|
89
|
+
if (record.contentHash !== hash)
|
|
90
|
+
stale = true;
|
|
91
|
+
}
|
|
92
|
+
if (missingUnits.length > 0)
|
|
93
|
+
return { state: "never", missingUnits };
|
|
94
|
+
return { state: stale ? "stale" : "in-sync", missingUnits };
|
|
95
|
+
}
|
|
96
|
+
function unitHashMap(profile) {
|
|
97
|
+
const map = new Map();
|
|
98
|
+
for (const unit of trackableUnits(profile)) {
|
|
99
|
+
map.set(unit.key, unit.hash);
|
|
100
|
+
}
|
|
101
|
+
return map;
|
|
102
|
+
}
|
|
103
|
+
function compareSurfaces(a, b) {
|
|
104
|
+
const rank = KIND_RANK[a.kind] - KIND_RANK[b.kind];
|
|
105
|
+
return rank !== 0 ? rank : byText(a.surface, b.surface);
|
|
106
|
+
}
|
|
107
|
+
/**
|
|
108
|
+
* Release ids are addresses and surface lists are sets: a duplicate makes the
|
|
109
|
+
* answer ambiguous (`selectRelease` would silently return the first) and, in the
|
|
110
|
+
* ledger's own shape, duplicates are a D12 fail class. Refuse both with the exact
|
|
111
|
+
* reason, never pick a winner.
|
|
112
|
+
*/
|
|
113
|
+
function assertUniqueReleases(releases) {
|
|
114
|
+
const ids = new Set();
|
|
115
|
+
for (const release of releases) {
|
|
116
|
+
if (ids.has(release.id)) {
|
|
117
|
+
throw new PresenceError(`release id "${release.id}" is declared more than once — release ids must be unique`);
|
|
118
|
+
}
|
|
119
|
+
ids.add(release.id);
|
|
120
|
+
const surfaces = new Set();
|
|
121
|
+
for (const surface of release.surfaces) {
|
|
122
|
+
if (surfaces.has(surface)) {
|
|
123
|
+
throw new PresenceError(`release "${release.id}" declares surface "${surface}" more than once — surfaces must be unique`);
|
|
124
|
+
}
|
|
125
|
+
surfaces.add(surface);
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
/** The release a caller asked for, or the newest one (no clock, no guess). */
|
|
130
|
+
export function selectRelease(profile, id) {
|
|
131
|
+
assertUniqueReleases(profile.releases);
|
|
132
|
+
const releases = [...profile.releases].sort(newestFirst);
|
|
133
|
+
if (releases.length === 0) {
|
|
134
|
+
throw new PresenceError("the workspace declares no releases[] — add one to content/releases.yaml (schema v1.15, D23)");
|
|
135
|
+
}
|
|
136
|
+
if (id === undefined)
|
|
137
|
+
return releases[0];
|
|
138
|
+
const found = releases.find((release) => release.id === id);
|
|
139
|
+
if (found === undefined) {
|
|
140
|
+
throw new PresenceError(`release "${id}" is not declared — known releases: ${releases.map((r) => r.id).join(", ")}`);
|
|
141
|
+
}
|
|
142
|
+
return found;
|
|
143
|
+
}
|
|
144
|
+
/** One release's ordered fan-out and the per-kind factual spine. */
|
|
145
|
+
export function releasePlan(profile, id) {
|
|
146
|
+
const release = selectRelease(profile, id);
|
|
147
|
+
const unitHashes = unitHashMap(profile);
|
|
148
|
+
const surfaces = release.surfaces
|
|
149
|
+
.map((surface) => {
|
|
150
|
+
const kind = kindOf(surface);
|
|
151
|
+
return {
|
|
152
|
+
surface,
|
|
153
|
+
kind,
|
|
154
|
+
...surfaceState(profile, release, surface, unitHashes),
|
|
155
|
+
};
|
|
156
|
+
})
|
|
157
|
+
.sort(compareSurfaces);
|
|
158
|
+
const summary = release.summary?.en ?? release.id;
|
|
159
|
+
const kinds = [];
|
|
160
|
+
for (const row of surfaces)
|
|
161
|
+
if (!kinds.includes(row.kind))
|
|
162
|
+
kinds.push(row.kind);
|
|
163
|
+
const baseText = kinds.map((kind) => ({
|
|
164
|
+
kind,
|
|
165
|
+
text: `${BASE_FRAME[kind]}: v${release.version} (${release.date}) — ${summary}`,
|
|
166
|
+
}));
|
|
167
|
+
return {
|
|
168
|
+
release: {
|
|
169
|
+
id: release.id,
|
|
170
|
+
version: release.version,
|
|
171
|
+
date: release.date,
|
|
172
|
+
summary,
|
|
173
|
+
changedUnits: [...(release.changedUnits ?? [])],
|
|
174
|
+
},
|
|
175
|
+
surfaces,
|
|
176
|
+
baseText,
|
|
177
|
+
};
|
|
178
|
+
}
|
|
179
|
+
/**
|
|
180
|
+
* The daily board (option B, operator 2026-10-28): every surface the workspace's
|
|
181
|
+
* releases have addressed, at its NEWEST release, with the same ledger-derived
|
|
182
|
+
* state. Deriving from the newest release keeps the board a reading of the
|
|
183
|
+
* releases, never a second ledger.
|
|
184
|
+
*/
|
|
185
|
+
export function presenceBoard(profile) {
|
|
186
|
+
assertUniqueReleases(profile.releases);
|
|
187
|
+
const releases = [...profile.releases].sort(newestFirst);
|
|
188
|
+
const unitHashes = unitHashMap(profile);
|
|
189
|
+
const seen = new Map();
|
|
190
|
+
for (const release of releases) {
|
|
191
|
+
for (const surface of release.surfaces) {
|
|
192
|
+
if (seen.has(surface))
|
|
193
|
+
continue;
|
|
194
|
+
const kind = kindOf(surface);
|
|
195
|
+
const state = surfaceState(profile, release, surface, unitHashes);
|
|
196
|
+
seen.set(surface, {
|
|
197
|
+
surface,
|
|
198
|
+
kind,
|
|
199
|
+
...state,
|
|
200
|
+
releaseId: release.id,
|
|
201
|
+
version: release.version,
|
|
202
|
+
});
|
|
203
|
+
}
|
|
204
|
+
}
|
|
205
|
+
const rows = [...seen.values()].sort(compareSurfaces);
|
|
206
|
+
const counts = { "in-sync": 0, stale: 0, never: 0 };
|
|
207
|
+
for (const row of rows)
|
|
208
|
+
counts[row.state] += 1;
|
|
209
|
+
const latest = releases[0];
|
|
210
|
+
return {
|
|
211
|
+
releases: releases.length,
|
|
212
|
+
latest: latest === undefined ? null : { id: latest.id, version: latest.version, date: latest.date },
|
|
213
|
+
surfaces: rows,
|
|
214
|
+
counts,
|
|
215
|
+
};
|
|
216
|
+
}
|
|
217
|
+
//# sourceMappingURL=presence.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{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AACJ,CAAC"}
|
package/dist/registry.d.ts
CHANGED
|
@@ -64,13 +64,16 @@ export interface RegistryFinding {
|
|
|
64
64
|
export declare function checkRegistryIntegrity(profile: Profile): RegistryIssue[];
|
|
65
65
|
/**
|
|
66
66
|
* §18.8 checks — offline (no network, no randomness). Deterministic for a
|
|
67
|
-
* given
|
|
68
|
-
*
|
|
67
|
+
* given date: `credential-expiry` is keyed to `options.today` when the caller
|
|
68
|
+
* supplies one (a pinned `--now`), else to the machine's date — time is an
|
|
69
|
+
* INPUT, never a defect, and a caller that pins it gets reproducible bytes.
|
|
69
70
|
* - `check/credential-expired` (warn): `expires` in the past.
|
|
70
71
|
* - `check/private-in-public-output` (error, §18.5): a public-rendered surface
|
|
71
72
|
* (evidence claims — rendered on public platforms) references a credential or
|
|
72
73
|
* artifact with visibility `private`/`unlisted`. Renderers emit only public;
|
|
73
74
|
* this is the gate that fails the build on a leak instead of hiding silently.
|
|
74
75
|
*/
|
|
75
|
-
export declare function registryCheck(profile: LoadedProfile | Profile
|
|
76
|
+
export declare function registryCheck(profile: LoadedProfile | Profile, options?: {
|
|
77
|
+
today?: string;
|
|
78
|
+
}): RegistryFinding[];
|
|
76
79
|
//# sourceMappingURL=registry.d.ts.map
|
package/dist/registry.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"registry.d.ts","sourceRoot":"","sources":["../src/registry.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAEH,OAAO,KAAK,EAAE,mCAAmC,EAAE,aAAa,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAE9F;;;;;;GAMG;AACH,wBAAgB,aAAa,CAAC,KAAK,EAAE;IAAE,UAAU,CAAC,EAAE,MAAM,CAAA;CAAE,GAAG,OAAO,CAErE;AAED;;;;GAIG;AACH,wBAAgB,mBAAmB,CACjC,WAAW,EAAE,SAAS;IACpB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CA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mC,EAAE,CASvC;AAED,2DAA2D;AAC3D,MAAM,WAAW,aAAa;IAC5B,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,0FAA0F;AAC1F,MAAM,WAAW,eAAe;IAC9B,qEAAqE;IACrE,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC;IAC3B,8DAA8D;IAC9D,OAAO,EAAE,MAAM,CAAC;IAChB,yDAAyD;IACzD,IAAI,EAAE,MAAM,CAAC;CACd;AA4HD,kFAAkF;AAClF,wBAAgB,sBAAsB,CAAC,OAAO,EAAE,OAAO,GAAG,aAAa,EAAE,CAOxE;AAUD;;;;;;;;;;GAUG;AACH,wBAAgB,aAAa,CAC3B,OAAO,EAAE,aAAa,GAAG,OAAO,EAChC,OAAO,GAAE;IAAE,KAAK,CAAC,EAAE,MAAM,CAAA;CAAO,GAC/B,eAAe,EAAE,CAwFnB"}
|
package/dist/registry.js
CHANGED
|
@@ -143,19 +143,23 @@ function todayIso() {
|
|
|
143
143
|
}
|
|
144
144
|
/**
|
|
145
145
|
* §18.8 checks — offline (no network, no randomness). Deterministic for a
|
|
146
|
-
* given
|
|
147
|
-
*
|
|
146
|
+
* given date: `credential-expiry` is keyed to `options.today` when the caller
|
|
147
|
+
* supplies one (a pinned `--now`), else to the machine's date — time is an
|
|
148
|
+
* INPUT, never a defect, and a caller that pins it gets reproducible bytes.
|
|
148
149
|
* - `check/credential-expired` (warn): `expires` in the past.
|
|
149
150
|
* - `check/private-in-public-output` (error, §18.5): a public-rendered surface
|
|
150
151
|
* (evidence claims — rendered on public platforms) references a credential or
|
|
151
152
|
* artifact with visibility `private`/`unlisted`. Renderers emit only public;
|
|
152
153
|
* this is the gate that fails the build on a leak instead of hiding silently.
|
|
153
154
|
*/
|
|
154
|
-
export function registryCheck(profile) {
|
|
155
|
+
export function registryCheck(profile, options = {}) {
|
|
155
156
|
const findings = [];
|
|
156
157
|
const credentials = profile.credentials ?? [];
|
|
157
158
|
const artifacts = profile.artifacts ?? [];
|
|
158
|
-
|
|
159
|
+
// The expiry date is an INPUT: a caller that pinned a date (a preview's
|
|
160
|
+
// `--now`) must not receive a finding dated by the machine's clock, or the
|
|
161
|
+
// document contradicts itself (fresh review of #354, F1).
|
|
162
|
+
const today = options.today ?? todayIso();
|
|
159
163
|
for (const [index, credential] of credentials.entries()) {
|
|
160
164
|
if (credential.expires !== undefined && credential.expires < today) {
|
|
161
165
|
findings.push({
|
package/dist/registry.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"registry.js","sourceRoot":"","sources":["../src/registry.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAIH;;;;;;GAMG;AACH,MAAM,UAAU,aAAa,CAAC,KAA8B;IAC1D,OAAO,CAAC,KAAK,CAAC,UAAU,IAAI,QAAQ,CAAC,KAAK,QAAQ,CAAC;AACrD,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,mBAAmB,CACjC,WAOG;IAEH,OAAO,WAAW,CAAC,MAAM,CAAC,aAAa,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;QACnD,OAAO,EAAE,mCAA4C;QACrD,GAAG,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,CAAC,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;QACrC,GAAG,CAAC,CAAC,CAAC,SAAS,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,GAAG,EAAE,CAAC,CAAC,SAAS,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;QAC1D,GAAG,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,SAAS,EAAE,EAAE,OAAO,EAAE,cAAuB,EAAE,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;QAC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C,OAAO,CAAC,YAAY,IAAI,EAAE,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC;YACnE,QAAQ,CACN,SAAS,CAAC,GAAG,EAAE,WAAW,EAAE,SAAS,CAAC,EACtC,YAAY,MAAM,kBAAkB,MAAM,GAAG,EAC7C,aAAa,CACd,CAAC;QACJ,CAAC;IACH,CAAC;IACD,KAAK,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,IAAI,CAAC,OAAO,CAAC,YAAY,IAAI,EAAE,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC;QACnE,KAAK,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,IAAI,CAAC,GAAG,CAAC,YAAY,IAAI,EAAE,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC;YAC/D,QAAQ,CACN,SAAS,CAAC,GAAG,EAAE,WAAW,EAAE,SAAS,CAAC,EACtC,gBAAgB,MAAM,kBAAkB,MAAM,GAAG,EACjD,aAAa,CACd,CAAC;QACJ,CAAC;IACH,CAAC;IACD,KAAK,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,KAAK,IAAI,EAAE,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC;QAC9D,KAAK,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,IAAI,CAAC,KAAK,CAAC,YAAY,IAAI,EAAE,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC;YACjE,QAAQ,CACN,SAAS,CAAC,GAAG,EAAE,WAAW,EAAE,SAAS,CAAC,EACtC,SAAS,MAAM,kBAAkB,MAAM,GAAG,EAC1C,eAAe,CAChB,CAAC;QACJ,CAAC;IACH,CAAC;IACD,OAAO,QAAQ,CAAC;AAClB,CAAC"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* structured-data.ts — the entity's structured-data identity (SPEC §15.4, #103)
|
|
2
|
+
* structured-data.ts — the entity's structured-data identity (SPEC §15.4, #103) and,
|
|
3
|
+
* since v1.10 (#288), the `FAQPage` answer-surface node.
|
|
3
4
|
*
|
|
4
5
|
* ONE home for assembling the `schema.org` view of the entity: its canonical `@id`,
|
|
5
6
|
* the `sameAs` set, and the entity fields. Consumers are `geoCheck` (readiness +
|
|
@@ -20,9 +21,9 @@
|
|
|
20
21
|
* DECLARATIVE in v1.6 — no renderer emits it yet, M5 is the consumer)
|
|
21
22
|
*
|
|
22
23
|
* Absent `role` = `realization` → every pre-v1.6 workspace keeps VALIDATING unchanged
|
|
23
|
-
* (additive
|
|
24
|
+
* (additive). Output is NOT unchanged: see SPEC §15.4 for the three
|
|
24
25
|
* declared deltas. Sources: W3C WebSchemas/sameAs, schema.org datamodel.
|
|
25
|
-
* Classification
|
|
26
|
+
* Classification: SPEC §15.4 (link roles).
|
|
26
27
|
*/
|
|
27
28
|
import type { Identity, Lang, LinkRole, Profile, StructuredDataReadiness } from "./types.js";
|
|
28
29
|
/** Default when a link carries no explicit role — keeps pre-v1.6 output unchanged. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"structured-data.d.ts","sourceRoot":"","sources":["../src/structured-data.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"structured-data.d.ts","sourceRoot":"","sources":["../src/structured-data.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AAIH,OAAO,KAAK,EAEV,QAAQ,EACR,IAAI,EACJ,QAAQ,EACR,OAAO,EACP,uBAAuB,EACxB,MAAM,YAAY,CAAC;AAGpB,sFAAsF;AACtF,eAAO,MAAM,iBAAiB,EAAE,QAAwB,CAAC;AAEzD,4DAA4D;AAC5D,wBAAgB,QAAQ,CAAC,IAAI,EAAE;IAAE,IAAI,CAAC,EAAE,QAAQ,CAAA;CAAE,GAAG,QAAQ,CAE5D;AAED;;;;GAIG;AACH,wBAAgB,aAAa,CAAC,QAAQ,EAAE,QAAQ,GAAG,SAAS,EAAE,IAAI,EAAE,QAAQ,GAAG,MAAM,EAAE,CAEtF;AAED;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAgB,QAAQ,CAAC,QAAQ,EAAE,QAAQ,GAAG,SAAS,GAAG,MAAM,GAAG,SAAS,CAE3E;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,UAAU,CAAC,OAAO,EAAE,OAAO,GAAG,MAAM,EAAE,CAerD;AA2DD;;;;;GAKG;AACH,wBAAgB,cAAc,CAAC,OAAO,EAAE,OAAO,EAAE,IAAI,GAAE,IAAW,GAAG,uBAAuB,CAkL3F"}
|
package/dist/structured-data.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* structured-data.ts — the entity's structured-data identity (SPEC §15.4, #103)
|
|
2
|
+
* structured-data.ts — the entity's structured-data identity (SPEC §15.4, #103) and,
|
|
3
|
+
* since v1.10 (#288), the `FAQPage` answer-surface node.
|
|
3
4
|
*
|
|
4
5
|
* ONE home for assembling the `schema.org` view of the entity: its canonical `@id`,
|
|
5
6
|
* the `sameAs` set, and the entity fields. Consumers are `geoCheck` (readiness +
|
|
@@ -20,9 +21,9 @@
|
|
|
20
21
|
* DECLARATIVE in v1.6 — no renderer emits it yet, M5 is the consumer)
|
|
21
22
|
*
|
|
22
23
|
* Absent `role` = `realization` → every pre-v1.6 workspace keeps VALIDATING unchanged
|
|
23
|
-
* (additive
|
|
24
|
+
* (additive). Output is NOT unchanged: see SPEC §15.4 for the three
|
|
24
25
|
* declared deltas. Sources: W3C WebSchemas/sameAs, schema.org datamodel.
|
|
25
|
-
* Classification
|
|
26
|
+
* Classification: SPEC §15.4 (link roles).
|
|
26
27
|
*/
|
|
27
28
|
import { byteOrder } from "./byte-order.js";
|
|
28
29
|
import { credentialLdEntries } from "./registry.js";
|
|
@@ -107,6 +108,44 @@ function hasCredentialLd(profile) {
|
|
|
107
108
|
const entries = credentialLdEntries(profile.credentials ?? []);
|
|
108
109
|
return entries.length > 0 ? entries : undefined;
|
|
109
110
|
}
|
|
111
|
+
/**
|
|
112
|
+
* v1.10 (#288): the `FAQPage` node over root `faq[]` — the citable Q&A pairs,
|
|
113
|
+
* lang-sliced by the same rule the entity fields use (`[lang]` falling back to
|
|
114
|
+
* `en`; the empty-string value falls through too, the #84 empty=absent rule).
|
|
115
|
+
*
|
|
116
|
+
* UNDEFINED when the workspace declares no `faq`: a FAQPage with zero questions
|
|
117
|
+
* is not an answer surface, so an empty one is never emitted — the node exists
|
|
118
|
+
* only when the SSOT owns answers.
|
|
119
|
+
*
|
|
120
|
+
* `faq[].source` is projected as `Answer.citation` (schema.org `Answer` is a
|
|
121
|
+
* `CreativeWork`, so `citation` is the standard's own pointer property): the
|
|
122
|
+
* SSOT declares the pointer as the answer's backing, and dropping it would emit
|
|
123
|
+
* the assertion without its source (an answer with no pointer is a claim, §8).
|
|
124
|
+
*
|
|
125
|
+
* CONSUMER: `pasco entity --jsonld` emits this node as its own `<script>` block
|
|
126
|
+
* after the entity block, and `pasco entity --json` exposes it as `faqJsonLd`
|
|
127
|
+
* (SPEC §7.2, #360). The renderers still embed `jsonLd` only; the published-page
|
|
128
|
+
* consumer remains the M5 web renderer (`surface.kind`, D23), declared in SPEC
|
|
129
|
+
* §15.4. The node stays separate here — do not fold it into `jsonLd`.
|
|
130
|
+
*/
|
|
131
|
+
function faqNode(profile, lang) {
|
|
132
|
+
const rows = profile.faq;
|
|
133
|
+
if (!rows || rows.length === 0)
|
|
134
|
+
return undefined;
|
|
135
|
+
return {
|
|
136
|
+
"@context": "https://schema.org",
|
|
137
|
+
"@type": "FAQPage",
|
|
138
|
+
mainEntity: rows.map((row) => ({
|
|
139
|
+
"@type": "Question",
|
|
140
|
+
name: row.q[lang] || row.q.en,
|
|
141
|
+
acceptedAnswer: {
|
|
142
|
+
"@type": "Answer",
|
|
143
|
+
text: row.a[lang] || row.a.en,
|
|
144
|
+
...(row.source ? { citation: row.source } : {}),
|
|
145
|
+
},
|
|
146
|
+
})),
|
|
147
|
+
};
|
|
148
|
+
}
|
|
110
149
|
/**
|
|
111
150
|
* Assemble the entity's structured-data readiness AND its ready-to-embed JSON-LD.
|
|
112
151
|
*
|
|
@@ -126,7 +165,14 @@ export function structuredData(profile, lang = "en") {
|
|
|
126
165
|
// Empty = absent (issue #84/#86): `||` falls through at BOTH levels, and the readiness
|
|
127
166
|
// entity-field check below reads these same values, so there is one accessor rule.
|
|
128
167
|
const slogan = identity.tagline?.[lang] || identity.tagline?.en || undefined;
|
|
129
|
-
|
|
168
|
+
// v1.10 (#288): the definition IS the canonical description when declared —
|
|
169
|
+
// it wins over `mission` (the answer-engine sentence an LLM can quote); a
|
|
170
|
+
// brand without definition keeps the v1.9 behavior byte-identical
|
|
171
|
+
// (mission fallback, same emission slot, same key order).
|
|
172
|
+
const definition = identity.definition?.[lang] || identity.definition?.en || undefined;
|
|
173
|
+
const mission = identity.mission?.[lang] || identity.mission?.en || undefined;
|
|
174
|
+
const description = definition || mission;
|
|
175
|
+
const faq = faqNode(profile, lang);
|
|
130
176
|
// NB: `lang` is the COMPILE-time language. A renderer that overrides `opts.lang`
|
|
131
177
|
// cannot make the JSON-LD follow (it is assembled here, not there) — see the
|
|
132
178
|
// silent-divergence guard in both renderers.
|
|
@@ -173,7 +219,7 @@ export function structuredData(profile, lang = "en") {
|
|
|
173
219
|
// Annotated so the declared `jsonLd` interface is actually enforced: without
|
|
174
220
|
// it the object is built unannotated and spread into the return literal, so
|
|
175
221
|
// excess/missing keys were never checked (a key emitted here but undeclared
|
|
176
|
-
// in `StructuredDataReadiness` passed typecheck silently —
|
|
222
|
+
// in `StructuredDataReadiness` passed typecheck silently — review #186 F3).
|
|
177
223
|
const jsonLd = identity.name
|
|
178
224
|
? {
|
|
179
225
|
"@context": "https://schema.org",
|
|
@@ -195,9 +241,15 @@ export function structuredData(profile, lang = "en") {
|
|
|
195
241
|
completeness: populated / considered.length,
|
|
196
242
|
fields,
|
|
197
243
|
...(jsonLd ? { jsonLd } : {}),
|
|
244
|
+
...(faq ? { faqJsonLd: faq } : {}),
|
|
198
245
|
};
|
|
199
246
|
}
|
|
200
247
|
const role = currentRole(profile);
|
|
248
|
+
// v1.10 (#288): the answer-engine surface for the PERSON flavor — the canonical
|
|
249
|
+
// "X is a …" sentence. Person had NO description source in v1.9: it is emitted
|
|
250
|
+
// ONLY when `identity.definition` exists, never invented (absent = absent).
|
|
251
|
+
const definition = identity.definition?.[lang] || identity.definition?.en || undefined;
|
|
252
|
+
const faq = faqNode(profile, lang);
|
|
201
253
|
const fields = {
|
|
202
254
|
name: Boolean(identity.name),
|
|
203
255
|
sameAs,
|
|
@@ -209,17 +261,28 @@ export function structuredData(profile, lang = "en") {
|
|
|
209
261
|
// absent nationality leaves the completeness ratio (and every pre-v1.13 score)
|
|
210
262
|
// untouched. It is optional, never a `ready` gate.
|
|
211
263
|
...(identity.nationality !== undefined ? { nationality: identity.nationality } : {}),
|
|
264
|
+
...(definition ? { description: definition } : {}),
|
|
212
265
|
...(role.jobTitle ? { jobTitle: role.jobTitle } : {}),
|
|
213
266
|
...(role.worksFor ? { worksFor: role.worksFor } : {}),
|
|
214
267
|
};
|
|
215
|
-
const considered = [
|
|
268
|
+
const considered = [
|
|
269
|
+
"name",
|
|
270
|
+
"sameAs",
|
|
271
|
+
"email",
|
|
272
|
+
"image",
|
|
273
|
+
"address",
|
|
274
|
+
"jobTitle",
|
|
275
|
+
"worksFor",
|
|
276
|
+
"description",
|
|
277
|
+
];
|
|
216
278
|
const populated = 1 +
|
|
217
279
|
(sameAs.length > 0 ? 1 : 0) +
|
|
218
280
|
(identity.email !== undefined ? 1 : 0) +
|
|
219
281
|
(identity.photo ? 1 : 0) +
|
|
220
282
|
(identity.location ? 1 : 0) +
|
|
221
283
|
(role.jobTitle ? 1 : 0) +
|
|
222
|
-
(role.worksFor ? 1 : 0)
|
|
284
|
+
(role.worksFor ? 1 : 0) +
|
|
285
|
+
(definition ? 1 : 0);
|
|
223
286
|
// Same rule as the brand branch: `name` gates emission, nothing else (Option A).
|
|
224
287
|
const ready = Boolean(identity.name);
|
|
225
288
|
// Key order mirrors the pre-v1.6 github-readme emission (name → email → image →
|
|
@@ -234,6 +297,7 @@ export function structuredData(profile, lang = "en") {
|
|
|
234
297
|
"@type": "Person",
|
|
235
298
|
...(entityIdValue !== undefined ? { "@id": entityIdValue } : {}),
|
|
236
299
|
name: identity.name,
|
|
300
|
+
...(definition ? { description: definition } : {}),
|
|
237
301
|
...(identity.email !== undefined ? { email: identity.email } : {}),
|
|
238
302
|
...(identity.photo ? { image: identity.photo } : {}),
|
|
239
303
|
...(identity.location ? { address: identity.location } : {}),
|
|
@@ -260,6 +324,7 @@ export function structuredData(profile, lang = "en") {
|
|
|
260
324
|
completeness: populated / considered.length,
|
|
261
325
|
fields,
|
|
262
326
|
...(jsonLd ? { jsonLd } : {}),
|
|
327
|
+
...(faq ? { faqJsonLd: faq } : {}),
|
|
263
328
|
};
|
|
264
329
|
}
|
|
265
330
|
//# sourceMappingURL=structured-data.js.map
|