@sentropic/focus 0.5.0 → 0.6.0-rc.13

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.
Files changed (69) hide show
  1. package/dist/artifact/check.d.ts +54 -0
  2. package/dist/artifact/check.d.ts.map +1 -0
  3. package/dist/artifact/check.js +148 -0
  4. package/dist/artifact/check.js.map +1 -0
  5. package/dist/artifact/index.d.ts +5 -0
  6. package/dist/artifact/index.d.ts.map +1 -0
  7. package/dist/artifact/index.js +3 -0
  8. package/dist/artifact/index.js.map +1 -0
  9. package/dist/artifact/manifest.d.ts +148 -0
  10. package/dist/artifact/manifest.d.ts.map +1 -0
  11. package/dist/artifact/manifest.js +485 -0
  12. package/dist/artifact/manifest.js.map +1 -0
  13. package/dist/cli/index.d.ts +1 -1
  14. package/dist/cli/index.d.ts.map +1 -1
  15. package/dist/cli/index.js +12 -3
  16. package/dist/cli/index.js.map +1 -1
  17. package/dist/index.d.ts +4 -2
  18. package/dist/index.d.ts.map +1 -1
  19. package/dist/index.js +2 -1
  20. package/dist/index.js.map +1 -1
  21. package/dist/model.d.ts +39 -5
  22. package/dist/model.d.ts.map +1 -1
  23. package/dist/model.js +3 -2
  24. package/dist/model.js.map +1 -1
  25. package/dist/registry/definitions.d.ts.map +1 -1
  26. package/dist/registry/definitions.js +44 -17
  27. package/dist/registry/definitions.js.map +1 -1
  28. package/dist/render/evidence.d.ts +13 -3
  29. package/dist/render/evidence.d.ts.map +1 -1
  30. package/dist/render/evidence.js +60 -7
  31. package/dist/render/evidence.js.map +1 -1
  32. package/dist/render/html.d.ts +3 -3
  33. package/dist/render/html.d.ts.map +1 -1
  34. package/dist/render/html.js +42 -6
  35. package/dist/render/html.js.map +1 -1
  36. package/dist/render/markdown-table.d.ts +5 -0
  37. package/dist/render/markdown-table.d.ts.map +1 -0
  38. package/dist/render/markdown-table.js +9 -0
  39. package/dist/render/markdown-table.js.map +1 -0
  40. package/dist/render/md.d.ts +3 -3
  41. package/dist/render/md.d.ts.map +1 -1
  42. package/dist/render/md.js +34 -5
  43. package/dist/render/md.js.map +1 -1
  44. package/dist/render/presentation.d.ts +2 -2
  45. package/dist/render/presentation.d.ts.map +1 -1
  46. package/dist/render/presentation.js +2 -2
  47. package/dist/render/presentation.js.map +1 -1
  48. package/dist/render/terminal.d.ts +3 -3
  49. package/dist/render/terminal.d.ts.map +1 -1
  50. package/dist/render/terminal.js +28 -8
  51. package/dist/render/terminal.js.map +1 -1
  52. package/dist/track/index.js +3 -3
  53. package/dist/track/index.js.map +1 -1
  54. package/dist/validation/index.d.ts +18 -3
  55. package/dist/validation/index.d.ts.map +1 -1
  56. package/dist/validation/index.js +212 -14
  57. package/dist/validation/index.js.map +1 -1
  58. package/dist/validation/readability.d.ts +14 -2
  59. package/dist/validation/readability.d.ts.map +1 -1
  60. package/dist/validation/readability.js +232 -14
  61. package/dist/validation/readability.js.map +1 -1
  62. package/package.json +8 -3
  63. package/registry/entries.v1.json +45 -6
  64. package/schemas/decision-dossier-document.v1.0.schema.json +193 -0
  65. package/schemas/decision-dossier-document.v1.schema.json +31 -7
  66. package/schemas/decision-dossier-document.v2.0.schema.json +925 -0
  67. package/schemas/decision-dossier-document.v2.schema.json +156 -6
  68. package/schemas/report-document.v1.schema.json +1068 -0
  69. package/skills/focus/SKILL.md +24 -4
@@ -0,0 +1,54 @@
1
+ import type { FocusDocument } from "../model.js";
2
+ import type { ReadabilityOptions, ValidationIssue } from "../validation/index.js";
3
+ import type { FocusAnchorEntry } from "./manifest.js";
4
+ export interface FocusArtifactCheckOptions {
5
+ /** Optional previous focus.manifest.json: activates revision rules R3 and R4. */
6
+ readonly previousManifest?: unknown;
7
+ /** Maximum canonical UTF-8 byte length of dossier.json (defaults to 1 048 576; null disables). */
8
+ readonly maxDocumentBytes?: number | null;
9
+ /** Maximum UTF-16 length of `focus:<doc.ref>` bindingName (defaults to 128, radar profile). */
10
+ readonly maxBindingNameLength?: number;
11
+ /** Skip readability gate when caller checks structural/artifact identity only (defaults to false). */
12
+ readonly skipReadability?: boolean;
13
+ /** Optional readability profile forwarded to validateDecisionDossierReadability. */
14
+ readonly readabilityOptions?: ReadabilityOptions;
15
+ }
16
+ export interface FocusArtifactCheckOk {
17
+ readonly ok: true;
18
+ readonly document: FocusDocument;
19
+ readonly documentType: "decision" | "report";
20
+ readonly schemaId: string;
21
+ readonly bindingName: string;
22
+ readonly documentDigest: string;
23
+ readonly bytes: number;
24
+ readonly canonicalJson: string;
25
+ readonly anchors: readonly FocusAnchorEntry[];
26
+ readonly retiredRefs: readonly string[];
27
+ readonly revisionSeq: number;
28
+ }
29
+ export interface FocusArtifactCheckRefused {
30
+ readonly ok: false;
31
+ readonly issues: readonly ValidationIssue[];
32
+ }
33
+ export type FocusArtifactCheckResult = FocusArtifactCheckOk | FocusArtifactCheckRefused;
34
+ /** R5: non-empty, <= 128 characters, no whitespace and no control characters. */
35
+ export declare function isAnchorableId(value: string): boolean;
36
+ /**
37
+ * Common Focus artifact gate (FA-H1 / SPEC-r3 §2.4 & §2.7).
38
+ *
39
+ * Always checks:
40
+ * - Closed schema + semantic rules including R2 (`duplicate_id`) across all v1/v2 families
41
+ * - Presentation readability gate (unless `skipReadability: true`)
42
+ * - R5 (`focus-anchor-not-anchorable`) on `doc.ref` (header anchor) and every entity `id`
43
+ * - R6 (`focus-anchor-equals-document-ref`) on every entity `id`
44
+ * - `focus:<doc.ref>` bindingName profile ceiling (default 128)
45
+ * - Canonical `dossier.json` UTF-8 size ceiling (default 1 048 576 bytes)
46
+ *
47
+ * When `previousManifest` is provided, also checks:
48
+ * - R3 (`focus-anchor-kind-changed`) on every retained `id`
49
+ * - R4 (`focus-anchor-reused`) against cumulative `previousManifest.retiredRefs`
50
+ */
51
+ export declare function checkFocusArtifact(input: unknown, options?: FocusArtifactCheckOptions): FocusArtifactCheckResult;
52
+ /** Assert the common artifact gate or throw DecisionDossierValidationError with all structured issues. */
53
+ export declare function assertFocusArtifact(input: unknown, options?: FocusArtifactChe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,EAAE,MAAM,CAAC;CAC9B;AAED,MAAM,WAAW,yBAAyB;IACxC,QAAQ,CAAC,EAAE,EAAE,KAAK,CAAC;IACnB,QAAQ,CAAC,MAAM,EAAE,SAAS,eAAe,EAAE,CAAC;CAC7C;AAED,MAAM,MAAM,wBAAwB,GAChC,oBAAoB,GACpB,yBAAyB,CAAC;AAE9B,iFAAiF;AACjF,wBAAgB,cAAc,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAOrD;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,kBAAkB,CAChC,KAAK,EAAE,OAAO,EACd,OAAO,GAAE,yBAA8B,GACtC,wBAAwB,CA2H1B;AAED,0GAA0G;AAC1G,wBAAgB,mBAAmB,CACjC,KAAK,EAAE,OAAO,EACd,OAAO,GAAE,yBAA8B,GACtC,oBAAoB,CAMtB"}
@@ -0,0 +1,148 @@
1
+ import { isReportDocument } from "../model.js";
2
+ import { DecisionDossierValidationError, validateDecisionDossierReadability, validateFocusDocument, } from "../validation/index.js";
3
+ import { FOCUS_DEFAULT_MAX_BINDING_NAME_LENGTH, FOCUS_MAX_ANCHOR_LENGTH, FOCUS_MAX_DOCUMENT_BYTES, bindingNameForDocumentRef, canonicalJsonString, computeNextRevisionAndRetiredRefs, digestBytes, extractDocumentAnchors, extractDocumentAnchorsWithPaths, resolveDocumentSchemaId, validateFocusArtifactManifest, } from "./manifest.js";
4
+ const DISALLOWED_ANCHOR_CHARS_RE = /[\s\u0000-\u001f\u007f-\u009f]/;
5
+ /** R5: non-empty, <= 128 characters, no whitespace and no control characters. */
6
+ export function isAnchorableId(value) {
7
+ return (typeof value === "string" &&
8
+ value.length > 0 &&
9
+ value.length <= FOCUS_MAX_ANCHOR_LENGTH &&
10
+ !DISALLOWED_ANCHOR_CHARS_RE.test(value));
11
+ }
12
+ /**
13
+ * Common Focus artifact gate (FA-H1 / SPEC-r3 §2.4 & §2.7).
14
+ *
15
+ * Always checks:
16
+ * - Closed schema + semantic rules including R2 (`duplicate_id`) across all v1/v2 families
17
+ * - Presentation readability gate (unless `skipReadability: true`)
18
+ * - R5 (`focus-anchor-not-anchorable`) on `doc.ref` (header anchor) and every entity `id`
19
+ * - R6 (`focus-anchor-equals-document-ref`) on every entity `id`
20
+ * - `focus:<doc.ref>` bindingName profile ceiling (default 128)
21
+ * - Canonical `dossier.json` UTF-8 size ceiling (default 1 048 576 bytes)
22
+ *
23
+ * When `previousManifest` is provided, also checks:
24
+ * - R3 (`focus-anchor-kind-changed`) on every retained `id`
25
+ * - R4 (`focus-anchor-reused`) against cumulative `previousManifest.retiredRefs`
26
+ */
27
+ export function checkFocusArtifact(input, options = {}) {
28
+ const structural = validateFocusDocument(input);
29
+ if (!structural.ok)
30
+ return { ok: false, issues: structural.issues };
31
+ const doc = structural.value;
32
+ const issues = [];
33
+ if (!options.skipReadability) {
34
+ issues.push(...validateDecisionDossierReadability(doc, options.readabilityOptions));
35
+ }
36
+ // Header anchor (doc.ref) must satisfy R5 and profile bindingName length.
37
+ if (!isAnchorableId(doc.ref)) {
38
+ issues.push({
39
+ path: "$.ref",
40
+ code: "focus-anchor-not-anchorable",
41
+ message: `document ref ${JSON.stringify(doc.ref)} must be 1–${FOCUS_MAX_ANCHOR_LENGTH} characters with no whitespace or control characters`,
42
+ });
43
+ }
44
+ const maxBindingNameLength = options.maxBindingNameLength ?? FOCUS_DEFAULT_MAX_BINDING_NAME_LENGTH;
45
+ const bindingName = bindingNameForDocumentRef(doc.ref);
46
+ if (bindingName.length > maxBindingNameLength) {
47
+ issues.push({
48
+ path: "$.ref",
49
+ code: "focus-binding-name-too-long",
50
+ message: `bindingName "${bindingName}" has length ${bindingName.length}, exceeding profile limit ${maxBindingNameLength}`,
51
+ });
52
+ }
53
+ // R5 & R6 across every anchorable entity (section, option, source, citation, evidenceGroup, annex).
54
+ const anchorsWithPaths = extractDocumentAnchorsWithPaths(doc);
55
+ for (const entry of anchorsWithPaths) {
56
+ if (!isAnchorableId(entry.id)) {
57
+ issues.push({
58
+ path: entry.path,
59
+ code: "focus-anchor-not-anchorable",
60
+ message: `anchor id ${JSON.stringify(entry.id)} must be 1–${FOCUS_MAX_ANCHOR_LENGTH} characters with no whitespace or control characters`,
61
+ });
62
+ }
63
+ if (entry.id === doc.ref) {
64
+ issues.push({
65
+ path: entry.path,
66
+ code: "focus-anchor-equals-document-ref",
67
+ message: `node id "${entry.id}" collides with document ref "${doc.ref}", which is reserved for the header anchor`,
68
+ });
69
+ }
70
+ }
71
+ // Canonical bytes without trailing newline + document size ceiling.
72
+ const canonical = canonicalJsonString(doc);
73
+ const canonicalBytes = new TextEncoder().encode(canonical);
74
+ const digest = digestBytes(canonicalBytes);
75
+ const maxDocumentBytes = options.maxDocumentBytes === undefined ? FOCUS_MAX_DOCUMENT_BYTES : options.maxDocumentBytes;
76
+ if (maxDocumentBytes !== null && canonicalBytes.byteLength > maxDocumentBytes) {
77
+ issues.push({
78
+ path: "$",
79
+ code: "focus-document-too-large",
80
+ message: `canonical dossier.json is ${canonicalBytes.byteLength} bytes, exceeding the ${maxDocumentBytes}-byte limit`,
81
+ });
82
+ }
83
+ // Revision rules R3 & R4 apply only when previousManifest is supplied.
84
+ let previousManifest;
85
+ if (options.previousManifest !== undefined) {
86
+ const manifestCheck = validateFocusArtifactManifest(options.previousManifest);
87
+ if (!manifestCheck.ok) {
88
+ for (const issue of manifestCheck.issues) {
89
+ const suffix = issue.path === "$" ? "" : issue.path.slice(1);
90
+ issues.push({
91
+ path: `$.previousManifest${suffix}`,
92
+ code: issue.code,
93
+ message: issue.message,
94
+ });
95
+ }
96
+ }
97
+ else {
98
+ previousManifest = manifestCheck.value;
99
+ const previousById = new Map(previousManifest.anchors.map((a) => [a.id, a]));
100
+ const retiredSet = new Set(previousManifest.retiredRefs);
101
+ for (const entry of anchorsWithPaths) {
102
+ if (retiredSet.has(entry.id)) {
103
+ issues.push({
104
+ path: entry.path,
105
+ code: "focus-anchor-reused",
106
+ message: `retired anchor id "${entry.id}" cannot be reused in a later revision`,
107
+ });
108
+ continue;
109
+ }
110
+ const prev = previousById.get(entry.id);
111
+ if (prev !== undefined && (prev.family !== entry.family || prev.kind !== entry.kind)) {
112
+ issues.push({
113
+ path: entry.path,
114
+ code: "focus-anchor-kind-changed",
115
+ message: `anchor id "${entry.id}" changed from ${prev.family}/${prev.kind} to ${entry.family}/${entry.kind}`,
116
+ });
117
+ }
118
+ }
119
+ }
120
+ }
121
+ if (issues.length > 0) {
122
+ return { ok: false, issues };
123
+ }
124
+ const anchors = extractDocumentAnchors(doc);
125
+ const { seq, retiredRefs } = computeNextRevisionAndRetiredRefs(digest, anchors, previousManifest);
126
+ return {
127
+ ok: true,
128
+ document: doc,
129
+ documentType: isReportDocument(doc) ? "report" : "decision",
130
+ schemaId: resolveDocumentSchemaId(doc),
131
+ bindingName,
132
+ documentDigest: digest,
133
+ bytes: canonicalBytes.byteLength,
134
+ canonicalJson: canonical,
135
+ anchors,
136
+ retiredRefs,
137
+ revisionSeq: seq,
138
+ };
139
+ }
140
+ /** Assert the common artifact gate or throw DecisionDossierValidationError with all structured issues. */
141
+ export function assertFocusArtifact(input, options = {}) {
142
+ const result = checkFocusArtifact(input, options);
143
+ if (!result.ok) {
144
+ throw new DecisionDossierValidationError(result.issues);
145
+ }
146
+ return result;
147
+ }
148
+ //# sourceMappingURL=check.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"check.js","sourceRoot":"","sources":["../../src/artifact/check.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAE/C,OAAO,EACL,8BAA8B,EAC9B,kCAAkC,EAClC,qBAAqB,GACtB,MAAM,wBAAwB,CAAC;AAGhC,OAAO,EACL,qCAAqC,EACrC,uBAAuB,EACvB,wBAAwB,EACxB,yBAAyB,EACzB,mBAAmB,EACnB,iCAAiC,EACjC,WAAW,EACX,sBAAsB,EACtB,+BAA+B,EAC/B,uBAAuB,EACvB,6BAA6B,GAC9B,MAAM,eAAe,CAAC;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AC,CAAC,QAAQ,CAAC,CAAC,CAAC,UAAU;QAC3D,QAAQ,EAAE,uBAAuB,CAAC,GAAG,CAAC;QACtC,WAAW;QACX,cAAc,EAAE,MAAM;QACtB,KAAK,EAAE,cAAc,CAAC,UAAU;QAChC,aAAa,EAAE,SAAS;QACxB,OAAO;QACP,WAAW;QACX,WAAW,EAAE,GAAG;KACjB,CAAC;AACJ,CAAC;AAED,0GAA0G;AAC1G,MAAM,UAAU,mBAAmB,CACjC,KAAc,EACd,UAAqC,EAAE;IAEvC,MAAM,MAAM,GAAG,kBAAkB,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC;IAClD,IAAI,CAAC,MAAM,CAAC,EAAE,EAAE,CAAC;QACf,MAAM,IAAI,8BAA8B,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;IAC1D,CAAC;IACD,OAAO,MAAM,CAAC;AAChB,CAAC"}
@@ -0,0 +1,5 @@
1
+ export { FOCUS_ARTIFACT_TYPE, FOCUS_BINDING_NAME_PREFIX, FOCUS_DEFAULT_MAX_BINDING_NAME_LENGTH, FOCUS_DOCUMENT_PATH, FOCUS_DOSSIER_CONTRACT, FOCUS_MANIFEST_PATH, FOCUS_MAX_ANCHOR_LENGTH, FOCUS_MAX_DOCUMENT_BYTES, FOCUS_TEMPLATE_ID, FOCUS_VIEWS_CONTRACT, FOCUS_VIEWS_PATH, bindingNameForDocumentRef, buildDerivedFileEntry, buildFocusArtifactManifest, buildFocusViewsDocument, canonicalByteLength, canonicalJsonBytes, canonicalJsonString, computeNextRevisionAndRetiredRefs, digestBytes, documentDigest, extractDocumentAnchors, extractDocumentAnchorsWithPaths, isSafeBundleRelativePath, rendererManifestDigest, resolveDocumentSchemaId, validateFocusArtifactManifest, validateFocusViewsDocument, } from "./manifest.js";
2
+ export type { BuildFocusArtifactManifestInput, BuildFocusViewsDocumentInput, FocusAnchorEntry, FocusAnchorFamily, FocusAnchorWithPath, FocusArtifactManifest, FocusDerivedFileEntry, FocusDiagramDerivedEntry, FocusManifestDocument, FocusManifestFileEntry, FocusManifestGenerator, FocusManifestRenderer, FocusManifestRevision, FocusManifestValidator, FocusViewsDocument, } from "./manifest.js";
3
+ export { assertFocusArtifact, checkFocusArtifact, isAnchorableId, } from "./check.js";
4
+ export type { FocusArtifactCheckOk, FocusArtifactCheckOptions, FocusArtifactCheckRefused, FocusArtifactCheckResult, } from "./check.js";
5
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/artifact/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,mBAAmB,EACnB,yBAAyB,EACzB,qCAAqC,EACrC,mBAAmB,EACnB,sBAAsB,EACtB,mBAAmB,EACnB,uBAAuB,EACvB,wBAAwB,EACxB,iBAAiB,EACjB,oBAAoB,EACpB,gBAAgB,EAChB,yBAAyB,EACzB,qBAAqB,EACrB,0BAA0B,EAC1B,uBAAuB,EACvB,mBAAmB,EACnB,kBAAkB,EAClB,mBAAmB,EACnB,iCAAiC,EACjC,WAAW,EACX,cAAc,EACd,sBAAsB,EACtB,+BAA+B,EAC/B,wBAAwB,EACxB,sBAAsB,EACtB,uBAAuB,EACvB,6BAA6B,EAC7B,0BAA0B,GAC3B,MAAM,eAAe,CAAC;AACvB,YAAY,EACV,+BAA+B,EAC/B,4BAA4B,EAC5B,gBAAgB,EAChB,iBAAiB,EACjB,mBAAmB,EACnB,qBAAqB,EACrB,qBAAqB,EACrB,wBAAwB,EACxB,qBAAqB,EACrB,sBAAsB,EACtB,sBAAsB,EACtB,qBAAqB,EACrB,qBAAqB,EACrB,sBAAsB,EACtB,kBAAkB,GACnB,MAAM,eAAe,CAAC;AAEvB,OAAO,EACL,mBAAmB,EACnB,kBAAkB,EAClB,cAAc,GACf,MAAM,YAAY,CAAC;AACpB,YAAY,EACV,oBAAoB,EACpB,yBAAyB,EACzB,yBAAyB,EACzB,wBAAwB,GACzB,MAAM,YAAY,CAAC"}
@@ -0,0 +1,3 @@
1
+ export { FOCUS_ARTIFACT_TYPE, FOCUS_BINDING_NAME_PREFIX, FOCUS_DEFAULT_MAX_BINDING_NAME_LENGTH, FOCUS_DOCUMENT_PATH, FOCUS_DOSSIER_CONTRACT, FOCUS_MANIFEST_PATH, FOCUS_MAX_ANCHOR_LENGTH, FOCUS_MAX_DOCUMENT_BYTES, FOCUS_TEMPLATE_ID, FOCUS_VIEWS_CONTRACT, FOCUS_VIEWS_PATH, bindingNameForDocumentRef, buildDerivedFileEntry, buildFocusArtifactManifest, buildFocusViewsDocument, canonicalByteLength, canonicalJsonBytes, canonicalJsonString, computeNextRevisionAndRetiredRefs, digestBytes, documentDigest, extractDocumentAnchors, extractDocumentAnchorsWithPaths, isSafeBundleRelativePath, rendererManifestDigest, resolveDocumentSchemaId, validateFocusArtifactManifest, validateFocusViewsDocument, } from "./manifest.js";
2
+ export { assertFocusArtifact, checkFocusArtifact, isAnchorableId, } from "./check.js";
3
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/artifact/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,mBAAmB,EACnB,yBAAyB,EACzB,qCAAqC,EACrC,mBAAmB,EACnB,sBAAsB,EACtB,mBAAmB,EACnB,uBAAuB,EACvB,wBAAwB,EACxB,iBAAiB,EACjB,oBAAoB,EACpB,gBAAgB,EAChB,yBAAyB,EACzB,qBAAqB,EACrB,0BAA0B,EAC1B,uBAAuB,EACvB,mBAAmB,EACnB,kBAAkB,EAClB,mBAAmB,EACnB,iCAAiC,EACjC,WAAW,EACX,cAAc,EACd,sBAAsB,EACtB,+BAA+B,EAC/B,wBAAwB,EACxB,sBAAsB,EACtB,uBAAuB,EACvB,6BAA6B,EAC7B,0BAA0B,GAC3B,MAAM,eAAe,CAAC;AAmBvB,OAAO,EACL,mBAAmB,EACnB,kBAAkB,EAClB,cAAc,GACf,MAAM,YAAY,CAAC"}
@@ -0,0 +1,148 @@
1
+ import type { FocusDocument } from "../model.js";
2
+ import type { ValidationResult } from "../validation/index.js";
3
+ export declare const FOCUS_ARTIFACT_TYPE: "focus-dossier";
4
+ export declare const FOCUS_DOSSIER_CONTRACT: "focus-dossier/1";
5
+ export declare const FOCUS_VIEWS_CONTRACT: "focus-views/1";
6
+ export declare const FOCUS_TEMPLATE_ID: "focus-dossier";
7
+ export declare const FOCUS_DOCUMENT_PATH: "dossier.json";
8
+ export declare const FOCUS_MANIFEST_PATH: "focus.manifest.json";
9
+ export declare const FOCUS_VIEWS_PATH: "views.json";
10
+ export declare const FOCUS_BINDING_NAME_PREFIX: "focus:";
11
+ export declare const FOCUS_MAX_DOCUMENT_BYTES: 1048576;
12
+ export declare const FOCUS_MAX_ANCHOR_LENGTH: 128;
13
+ export declare const FOCUS_DEFAULT_MAX_BINDING_NAME_LENGTH: 128;
14
+ declare const ANCHOR_FAMILIES: readonly ["section", "option", "source", "citation", "evidenceGroup", "annex"];
15
+ export type FocusAnchorFamily = (typeof ANCHOR_FAMILIES)[number];
16
+ export interface FocusAnchorEntry {
17
+ readonly id: string;
18
+ readonly family: FocusAnchorFamily;
19
+ readonly kind: string;
20
+ }
21
+ export interface FocusAnchorWithPath extends FocusAnchorEntry {
22
+ readonly path: string;
23
+ }
24
+ export interface FocusManifestDocument {
25
+ readonly path: typeof FOCUS_DOCUMENT_PATH;
26
+ readonly schemaId: string;
27
+ readonly digest: string;
28
+ readonly bytes: number;
29
+ readonly type: "decision" | "report";
30
+ }
31
+ export interface FocusManifestFileEntry {
32
+ readonly path: string;
33
+ readonly digest: string;
34
+ readonly bytes: number;
35
+ }
36
+ export interface FocusManifestRenderer {
37
+ readonly name: string;
38
+ readonly version: string;
39
+ readonly entry: string;
40
+ readonly digest: string;
41
+ readonly files: readonly FocusManifestFileEntry[];
42
+ readonly capabilities: readonly string[];
43
+ }
44
+ export interface FocusManifestValidator {
45
+ readonly name: string;
46
+ readonly version: string;
47
+ readonly digest: string;
48
+ }
49
+ export interface FocusManifestRevision {
50
+ readonly seq: number;
51
+ readonly parentDigest: string | null;
52
+ readonly createdAt: string;
53
+ }
54
+ /** Derived companion file listed in focus.manifest.json (empty when no derived file is emitted). */
55
+ export interface FocusDerivedFileEntry {
56
+ readonly path: string;
57
+ readonly digest: string;
58
+ readonly bytes: number;
59
+ readonly mimeType: string;
60
+ }
61
+ export interface FocusManifestGenerator {
62
+ readonly name: string;
63
+ readonly version: string;
64
+ }
65
+ /** Contract focus-dossier/1 (SPEC-r3 §2.4 & Annexe A). */
66
+ export interface FocusArtifactManifest {
67
+ readonly artifactType: typeof FOCUS_ARTIFACT_TYPE;
68
+ readonly contract: typeof FOCUS_DOSSIER_CONTRACT;
69
+ readonly templateId: typeof FOCUS_TEMPLATE_ID;
70
+ readonly document: FocusManifestDocument;
71
+ readonly renderer: FocusManifestRenderer;
72
+ readonly validator: FocusManifestValidator;
73
+ readonly revision: FocusManifestRevision;
74
+ readonly anchors: readonly FocusAnchorEntry[];
75
+ readonly derived: readonly FocusDerivedFileEntry[];
76
+ readonly retiredRefs: readonly string[];
77
+ readonly generator: FocusManifestGenerator;
78
+ }
79
+ export interface FocusDiagramDerivedEntry {
80
+ readonly scene: Readonly<Record<string, unknown>>;
81
+ readonly views: Readonly<Record<string, unknown>>;
82
+ }
83
+ /** Contract focus-views/1 (SPEC-r3 §2.4.1): canonical, no timestamp. */
84
+ export interface FocusViewsDocument {
85
+ readonly contract: typeof FOCUS_VIEWS_CONTRACT;
86
+ readonly documentDigest: string;
87
+ readonly rendererDigest: string;
88
+ readonly diagrams: Readonly<Record<string, FocusDiagramDerivedEntry>>;
89
+ }
90
+ export interface BuildFocusArtifactManifestInput {
91
+ readonly document: FocusDocument;
92
+ readonly renderer: FocusManifestRenderer;
93
+ readonly validator: FocusManifestValidator;
94
+ readonly generator: FocusManifestGenerator;
95
+ readonly derived?: readonly FocusDerivedFileEntry[];
96
+ readonly previousManifest?: FocusArtifactManifest;
97
+ readonly createdAt: string;
98
+ }
99
+ export interface BuildFocusViewsDocumentInput {
100
+ readonly documentDigest: string;
101
+ readonly rendererDigest: string;
102
+ readonly diagrams: Readonly<Record<string, FocusDiagramDerivedEntry>>;
103
+ }
104
+ /** RFC 8785 canonical JSON string without trailing newline. */
105
+ export declare const canonicalJsonString: (value: unknown) => string;
106
+ /** UTF-8 bytes of RFC 8785 canonical JSON without trailing newline. */
107
+ export declare const canonicalJsonBytes: (value: unknown) => Uint8Array;
108
+ export declare const canonicalByteLength: (value: unknown) => number;
109
+ /** SHA-256 digest of raw bytes, prefixed with `sha256:`. Pure JS (Node & browser identical). */
110
+ export declare const digestBytes: (bytes: Uint8Array) => string;
111
+ /** Canonical document digest (`sha256:<hex>`), computed before any section enrichment. */
112
+ export declare const documentDigest: (doc: FocusDocument) => string;
113
+ /**
114
+ * Canonical SHA-256 digest of the DS static kit manifest (SPEC-r3 §2.4.1):
115
+ * RFC 8785 bytes without trailing newline, prefixed `sha256:`.
116
+ */
117
+ export declare const rendererManifestDigest: (staticManifest: Readonly<Record<string, unknown>>) => string;
118
+ export declare const bindingNameForDocumentRef: (ref: string) => string;
119
+ export declare const resolveDocumentSchemaId: (doc: FocusDocument) => string;
120
+ /** Safe relative bundle path: no leading slash, no traversal, no backslash, no drive letter. */
121
+ export declare function isSafeBundleRelativePath(path: string): boolean;
122
+ /** Extract every anchorable entity definition with its exact JSON path (SPEC-r3 §2.7 R1). */
123
+ export declare function extractDocumentAnchorsWithPaths(doc: FocusDocument): FocusAnchorWithPath[];
124
+ /** Deterministic anchor table (`id`, `family`, `kind`) for `focus.manifest.json`. */
125
+ export declare function extractDocumentAnchors(doc: FocusDocument): FocusAnchorEntry[];
126
+ /**
127
+ * Compute next revision metadata and cumulative retiredRefs (SPEC-r3 Annexe A & FA-H1 step 3):
128
+ * - First revision: seq = 1, parentDigest = null, retiredRefs = []
129
+ * - Same document (e.g., kit upgrade): seq, parentDigest and retiredRefs preserved
130
+ * - Changed document: seq = prev.seq + 1, parentDigest = prev.document.digest, retiredRefs accumulated
131
+ */
132
+ export declare function computeNextRevisionAndRetiredRefs(currentDigest: string, currentAnchors: readonly FocusAnchorEntry[], previousManifest?: FocusArtifactManifest): {
133
+ readonly seq: number;
134
+ readonly parentDigest: string | null;
135
+ readonly retiredRefs: readonly string[];
136
+ };
137
+ export declare function buildDerivedFileEntry(path: string, value: unknown, mimeType: string): FocusDerivedFileEntry;
138
+ export declare function buildFocusViewsDocument(input: BuildFocusViewsDocumentInput): FocusViewsDocument;
139
+ export declare function buildFocusArtifactManifest(input: BuildFocusArtifactManifestInput): FocusArtifactManifest;
140
+ /** Closed validation for focus-views/1 companion JSON (SPEC-r3 §2.4.1). */
141
+ export declare function validateFocusViewsDocument(value: unknown, expected?: {
142
+ readonly documentDigest?: string;
143
+ readonly rendererDigest?: string;
144
+ }): ValidationResult<FocusViewsDocument>;
145
+ /** Closed validation for focus-dossier/1 manifest (SPEC-r3 Annexe A). */
146
+ export declare function validateFocusArtifactManifest(value: unknown): ValidationResult<FocusArtifactManifest>;
147
+ export {};
148
+ //# sourceMappingURL=manifest.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"manifest.d.ts","sourceRoot":"","sources":["../../src/artifact/manifest.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAMjD,OAAO,KAAK,EAAmB,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAEhF,eAAO,MAAM,mBAAmB,EAAG,eAAwB,CAAC;AAC5D,eAAO,MAAM,sBAAsB,EAAG,iBAA0B,CAAC;AACjE,eAAO,MAAM,oBAAoB,EAAG,eAAwB,CAAC;AAC7D,eAAO,MAAM,iBAAiB,EAAG,eAAwB,CAAC;AAC1D,eAAO,MAAM,mBAAmB,EAAG,cAAuB,CAAC;AAC3D,eAAO,MAAM,mBAAmB,EAAG,qBAA8B,CAAC;AAClE,eAAO,MAAM,gBAAgB,EAAG,YAAqB,CAAC;AACtD,eAAO,MAAM,yBAAy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