@intentset/publisher 0.13.0 → 0.15.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/README.md CHANGED
@@ -2,7 +2,8 @@
2
2
 
3
3
  Publishes reviewed knowledge for one audience and release (`spec/publication.md`): it projects the graph deny by
4
4
  default, checks that no excluded record's title or path leaks, and writes Markset documents with their provenance,
5
- an index, retrieval chunks, and `help.json`, the tips a product shows beside its controls.
5
+ an index, retrieval chunks, `help.json`, the tips a product shows beside its controls, and `snapshot.json`, the one
6
+ file that names the commit and graph hash it was published from.
6
7
 
7
8
  ## Install
8
9
 
@@ -25,7 +26,16 @@ installed. The command is always `@intentset/cli`'s: this package has no `intent
25
26
  for `intentset` alone would fetch an unrelated unscoped package from the registry.
26
27
 
27
28
  From code, `publish(graph, registries, request, { snapshot, publishedAt })` returns the documents, the index, the help
28
- file and the diagnostics, and refuses the whole request when any field is missing or undeclared (PUB001).
29
+ file, the snapshot file and the diagnostics, and refuses the whole request when any field is missing or undeclared
30
+ (PUB001). The snapshot, the commit and graph hash the run read, is named in `snapshot.json` and nowhere else; each
31
+ document pins what it was made from by its sources' hashes. So publishing the same knowledge at two commits writes
32
+ the same bytes in every file but that one.
33
+
34
+ **When the output is committed.** Publish with `--no-snapshot`, or ignore `snapshot.json` in version control. The
35
+ commit it names is the one checked out when the command ran, which is never the commit that will contain the output,
36
+ and it differs on every branch that changed a record, so branches would conflict on it. Git already records where
37
+ committed output came from. Keep the file when the output is deployed or handed to another system: nothing else says
38
+ which state of the model the documents were made from.
29
39
  `@intentset/help` reads the help file in the product.
30
40
 
31
41
  ## Learn more
@@ -13,14 +13,17 @@
13
13
  * path appears only in a projection that admits internal records; sources
14
14
  * outside the projection are counted, not named; availability is the
15
15
  * request's own values, so a document does not list the other editions,
16
- * roles or releases its knowledge also serves.
16
+ * roles or releases its knowledge also serves. The block carries no snapshot:
17
+ * that is the same for every document in a run and moves with any record in
18
+ * the model, so the run names it once, in the help file and the index
19
+ * (publication §2, §5; ADR 0019), and a document's bytes change only when what
20
+ * it was made from does.
17
21
  *
18
22
  * The result is checked as Markset before it is emitted: a Markset error is
19
23
  * PUB003, and a `:::` directive outside Markset's vocabulary is PUB004
20
24
  * (CLAUDE.md invariant 5: profiles never add a directive).
21
25
  */
22
26
  import type { Artifact, Diagnostic, Graph, Visibility } from "@intentset/core";
23
- import type { Snapshot } from "./project.ts";
24
27
  import { type PublicationRequest } from "./request.ts";
25
28
  export declare const PUBLICATION_PROFILE = "intentset/publication/0.2";
26
29
  /** The top-level frontmatter key of a generated document. */
@@ -45,7 +48,6 @@ export interface PublicationMeta {
45
48
  sources: SourceStamp[];
46
49
  /** How many explained artifacts are outside the projection and so not named. */
47
50
  withheldSources: number;
48
- snapshot: Snapshot;
49
51
  audience: string;
50
52
  /** The request's values, and the flags the knowledge requires (every one of them named by the request). */
51
53
  availability: {
@@ -60,7 +62,6 @@ export interface PublicationMeta {
60
62
  publishedAt: string;
61
63
  }
62
64
  export interface GenerateOptions {
63
- snapshot: Snapshot;
64
65
  publishedAt: string;
65
66
  }
66
67
  export interface GeneratedDocument {
@@ -1 +1 @@
1
- {"version":3,"file":"generate.d.ts","sourceRoot":"","sources":["../src/generate.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,OAAO,KAAK,EAAE,QAAQ,EAAE,UAAU,EAAE,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAK/E,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AAC7C,OAAO,EAAE,KAAK,kBAAkB,EAAU,MAAM,cAAc,CAAC;AAG/D,eAAO,MAAM,mBAAmB,8BAA8B,CAAC;AAC/D,6DAA6D;AAC7D,eAAO,MAAM,eAAe,0BAA0B,CAAC;AAEvD,MAAM,WAAW,WAAW;IAC1B,EAAE,EAAE,MAAM,CAAC;IACX,gEAAgE;IAChE,QAAQ,EAAE,MAAM,GAAG,IAAI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B,OAAO,EAAE,eAAe,GACvB;IAAE,QAAQ,EAAE,iBAAiB,GAAG,IAAI,CAAC;IAAC,WAAW,EAAE,UAAU,EAAE,CAAA;CAAE,CA0BnE;AAED,iGAAiG;AACjG,wBAAgB,cAAc,CAAC,QAAQ,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,GAAG,UAAU,EAAE,CAsEtG"}
package/dist/generate.js CHANGED
@@ -40,7 +40,6 @@ export function publicationMeta(graph, artifact, request, options) {
40
40
  source,
41
41
  sources,
42
42
  withheldSources,
43
- snapshot: { commit: options.snapshot.commit, graphHash: options.snapshot.graphHash },
44
43
  audience: request.audience,
45
44
  availability: {
46
45
  product: request.product,
@@ -1 +1 @@
1
- {"version":3,"file":"generate.js","sourceRoot":"","sources":["../src/generate.ts"],"names":[],"mappings":"AAsBA,OAAO,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAC5D,OAAO,EAAE,qBAAqB,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAC5E,OAAO,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAC3C,OAAO,EAAE,qBAAqB,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAEtE,OAAO,EAA2B,MAAM,EAAE,MAAM,cAAc,CAAC;AAC/D,OAAO,EAAkB,QAAQ,EAAE,MAAM,WAAW,CAAC;AAErD,MAAM,CAAC,MAAM,mBAAmB,GAAG,2BAA2B,CAAC;AAC/D,6DAA6D;AAC7D,MAAM,CAAC,MAAM,eAAe,GAAG,uBAAuB,CAAC;AA2CvD,kEAAkE;AAClE,MAAM,UAAU,UAAU,CAAC,EAAU;IACnC,OAAO,4CAA4C,EAAE,oBAAoB,CAAC;AAC5E,CAAC;AAED,8GAA8G;AAC9G,MAAM,UAAU,eAAe,CAC7B,KAAY,EACZ,QAAkB,EAClB,OAA2B,EAC3B,OAAwB;IAExB,MAAM,EAAE,IAAI,EAAE,GAAG,QAAQ,CAAC;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C,QAAQ,EAAE,IAAI,CAAC;YAClC,OAAO,EAAE,8BAA8B,EAAE,0BAA0B,CAAC,CAAC,IAAI,KAAK,CAAC,CAAC,OAAO,CAAC,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,GAAG;YAC7G,WAAW,EACT,2GAA2G;SAC9G,CAAC,CACH,CAAC;IACJ,CAAC;IACD,OAAO,WAAW,CAAC;AACrB,CAAC"}
package/dist/help.d.ts CHANGED
@@ -10,9 +10,12 @@
10
10
  * binds a control to the ID has already written it where the same reader can
11
11
  * see it, and nothing else of that artifact is carried: never its title, path,
12
12
  * status or prose. Two documents tipping one ID: the lower knowledge ID wins.
13
+ *
14
+ * It carries no snapshot: the run names the commit and graph hash it was
15
+ * published from in the snapshot file alone (snapshot.ts, ADR 0021), so this
16
+ * file's bytes change only when a tip, a published document or the request does.
13
17
  */
14
18
  import type { Graph, Visibility } from "@intentset/core";
15
- import type { Snapshot } from "./project.ts";
16
19
  import type { PublicationRequest } from "./request.ts";
17
20
  export declare const HELP_PROFILE = "intentset/help/0.2";
18
21
  /** The file's name beside the published documents. */
@@ -34,7 +37,6 @@ export interface HelpFile {
34
37
  profile: typeof HELP_PROFILE;
35
38
  derived: true;
36
39
  projection: Visibility;
37
- snapshot: Snapshot;
38
40
  audience: string;
39
41
  availability: {
40
42
  product: string;
@@ -50,7 +52,6 @@ export interface HelpFile {
50
52
  tips: Record<string, HelpTip>;
51
53
  }
52
54
  export interface HelpOptions {
53
- snapshot: Snapshot;
54
55
  publishedAt: string;
55
56
  }
56
57
  /** The help file for the documents a run published, which are given by knowledge ID. */
@@ -1 +1 @@
1
- {"version":3,"file":"help.d.ts","sourceRoot":"","sources":["../src/help.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AACH,OAAO,KAAK,EAAY,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAEnE,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AAC7C,OAAO,KAAK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,OAAO,EAAE,WAAW,GACnB,QAAQ,CA+BV"}
package/dist/help.js CHANGED
@@ -24,7 +24,6 @@ export function helpFile(graph, publishedIds, request, options) {
24
24
  profile: HELP_PROFILE,
25
25
  derived: true,
26
26
  projection: request.visibility,
27
- snapshot: { commit: options.snapshot.commit, graphHash: options.snapshot.graphHash },
28
27
  audience: request.audience,
29
28
  availability: {
30
29
  product: request.product,
package/dist/help.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"help.js","sourceRoot":"","sources":["../src/help.ts"],"names":[],"mappings":"AAcA,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAIjD,MAAM,CAAC,MAAM,YAAY,GAAG,oBAAoB,CAAC;AACjD,sDAAsD;AACtD,MAAM,CAAC,MAAM,SAAS,GAAG,WAAW,CAAC;AAoCrC,wFAAwF;AACxF,MAAM,UAAU,QAAQ,CACtB,KAAY,EACZ,YAA+B,EAC/B,OAA2B,EAC3B,OAAoB;IAEpB,MAAM,GAAG,GAAG,CAAC,GAAG,YAAY,CAAC,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC;IACnD,MAAM,SAAS,GAAoB,EAAE,CAAC;IACtC,MAAM,IAAI,GAA4B,EAAE,CAAC;IACzC,MAAM,OAAO,GAAG,IAAI,GAAG,EAAmB,CAAC;IAC3C,KAAK,MAAM,EAAE,IAAI,GAAG,EAAE,CAAC;QACrB,MAAM,QAAQ,GAAG,KAAK,CAAC,SAAS,CAAC,GAAG,CAAC,EAAE,CAAa,CAAC;QACrD,SAAS,CAAC,IAAI,CAAC,EAAE,EAAE,EAAE,KAAK,EAAE,QAAQ,CAAC,IAAI,CAAC,KAAK,EAAE,IAAI,EAAE,GAAG,EAAE,KAAK,EAAE,CAAC,CAAC;QACrE,KAAK,MAAM,GAAG,IAAI,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,IAAI,EAAE,CAAC,CAAC,IAAI,CAAC,cAAc,CAAC,EAAE,CAA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,EAAE,YAAY;QACrB,OAAO,EAAE,IAAI;QACb,UAAU,EAAE,OAAO,CAAC,UAAU;QAC9B,QAAQ,EAAE,OAAO,CAAC,QAAQ;QAC1B,YAAY,EAAE;YACZ,OAAO,EAAE,OAAO,CAAC,OAAO;YACxB,OAAO,EAAE,OAAO,CAAC,OAAO;YACxB,IAAI,EAAE,OAAO,CAAC,IAAI;YAClB,OAAO,EAAE,OAAO,CAAC,OAAO;YACxB,KAAK,EAAE,CAAC,GAAG,IAAI,GAAG,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC,cAAc,CAAC;SACxD;QACD,WAAW,EAAE,OAAO,CAAC,WAAW;QAChC,SAAS;QACT,IAAI;KACL,CAAC;AACJ,CAAC"}
package/dist/index.d.ts CHANGED
@@ -12,5 +12,6 @@ export { type PublicationIndex, type PublishOptions, type PublishResult, type Pu
12
12
  export { type Reference, type ReferenceKind, checkReferences, checkTitles, findReferences, resolveTarget, titlePattern, } from "./references.ts";
13
13
  export { type IndexedRequest, PROJECTION_ADMITS, type PublicationRequest, REQUEST_DIMENSIONS, type RequestDimension, admits, checkRequest, indexedRequest, } from "./request.ts";
14
14
  export { CURRENT_PIN, PIN_KINDS, type PinKind, REVIEW_EXTENSION, type ReviewRecord, type ReviewStatus, bindReviewPins, knowledgeReport, pinHash, readReviewRecord, reviewSources, reviewStatus, } from "./review.ts";
15
+ export { SNAPSHOT_FILE, SNAPSHOT_PROFILE, type SnapshotFile, snapshotFile } from "./snapshot.ts";
15
16
  export { YamlEmitError, type YamlValue, emitYaml } from "./yaml.ts";
16
17
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAC3C,OAAO,EAAE,KAAK,KAAK,EAAE,KAAK,YAAY,EAAE,KAAK,WAAW,EAAE,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AAE,MAAM,WAAW,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAC3C,OAAO,EAAE,KAAK,KAAK,EAAE,KAAK,YAAY,EAAE,KAAK,WAAW,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACxF,OAAO,EACL,KAAK,eAAe,EACpB,KAAK,iBAAiB,EACtB,eAAe,EACf,mBAAmB,EACnB,KAAK,eAAe,EACpB,KAAK,WAAW,EAChB,cAAc,EACd,gBAAgB,EAChB,UAAU,EACV,aAAa,EACb,eAAe,GAChB,MAAM,eAAe,CAAC;AACvB,OAAO,EACL,SAAS,EACT,YAAY,EACZ,KAAK,QAAQ,EACb,KAAK,aAAa,EAClB,KAAK,WAAW,EAChB,KAAK,OAAO,EACZ,QAAQ,GACT,MAAM,WAAW,CAAC;AACnB,OAAO,EACL,iBAAiB,EACjB,KAAK,SAAS,EACd,KAAK,eAAe,EACpB,KAAK,cAAc,EACnB,KAAK,UAAU,EACf,KAAK,QAAQ,EACb,eAAe,EACf,cAAc,EACd,OAAO,GACR,MAAM,cAAc,CAAC;AACtB,OAAO,EACL,KAAK,gBAAgB,EACrB,KAAK,cAAc,EACnB,KAAK,aAAa,EAClB,KAAK,iBAAiB,EACtB,eAAe,EACf,KAAK,aAAa,EAClB,OAAO,EACP,cAAc,GACf,MAAM,cAAc,CAAC;AACtB,OAAO,EACL,KAAK,SAAS,EACd,KAAK,aAAa,EAClB,eAAe,EACf,WAAW,EACX,cAAc,EACd,aAAa,EACb,YAAY,GACb,MAAM,iBAAiB,CAAC;AACzB,OAAO,EACL,KAAK,cAAc,EACnB,iBAAiB,EACjB,KAAK,kBAAkB,EACvB,kBAAkB,EAClB,KAAK,gBAAgB,EACrB,MAAM,EACN,YAAY,EACZ,cAAc,GACf,MAAM,cAAc,CAAC;AACtB,OAAO,EACL,WAAW,EACX,SAAS,EACT,KAAK,OAAO,EACZ,gBAAgB,EAChB,KAAK,YAAY,EACjB,KAAK,YAAY,EACjB,cAAc,EACd,eAAe,EACf,OAAO,EACP,gBAAgB,EAChB,aAAa,EACb,YAAY,GACb,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,aAAa,EAAE,gBAAgB,EAAE,KAAK,YAAY,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AACjG,OAAO,EAAE,aAAa,EAAE,KAAK,SAAS,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC"}
package/dist/index.js CHANGED
@@ -12,5 +12,6 @@ export { REFUSAL_REASONS, publish, renderDocument, } from "./publish.js";
12
12
  export { checkReferences, checkTitles, findReferences, resolveTarget, titlePattern, } from "./references.js";
13
13
  export { PROJECTION_ADMITS, REQUEST_DIMENSIONS, admits, checkRequest, indexedRequest, } from "./request.js";
14
14
  export { CURRENT_PIN, PIN_KINDS, REVIEW_EXTENSION, bindReviewPins, knowledgeReport, pinHash, readReviewRecord, reviewSources, reviewStatus, } from "./review.js";
15
+ export { SNAPSHOT_FILE, SNAPSHOT_PROFILE, snapshotFile } from "./snapshot.js";
15
16
  export { YamlEmitError, emitYaml } from "./yaml.js";
16
17
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAC3C,OAAO,EAAmD,QAAQ,EAAE,MAAM,aAAa,CAAC;AACxF,OAAO,EAGL,eAAe,EACf,mBAAmB,EAGnB,cAAc,EACd,gBAAgB,EAChB,UAAU,EACV,aAAa,EACb,eAAe,GAChB,MAAM,eAAe,CAAC;AACvB,OAAO,EACL,SAAS,EACT,YAAY,EAKZ,QAAQ,GACT,MAAM,WAAW,CAAC;AACnB,OAAO,EACL,iBAAiB,EAMjB,eAAe,EACf,cAAc,EACd,OAAO,GACR,MAAM,cAAc,CAAC;AACtB,OAAO,EAKL,eAAe,EAEf,OAAO,EACP,cAAc,GACf,MAAM,cAAc,CAAC;AACtB,OAAO,EAGL,eAAe,EACf,WAAW,EACX,cAAc,EACd,aAAa,EACb,YAAY,GACb,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAEL,iBAAiB,EAEjB,kBAAkB,EAElB,MAAM,EACN,YAAY,EACZ,cAAc,GACf,MAAM,cAAc,CAAC;AACtB,OAAO,EACL,WAAW,EACX,SAAS,EAET,gBAAgB,EAGhB,cAAc,EACd,eAAe,EACf,OAAO,EACP,gBAAgB,EAChB,aAAa,EACb,YAAY,GACb,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,aAAa,EAAkB,QAAQ,EAAE,MAAM,WAAW,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAC3C,OAAO,EAAmD,QAAQ,EAAE,MAAM,aAAa,CAAC;AACxF,OAAO,EAGL,eAAe,EACf,mBAAmB,EAGnB,cAAc,EACd,gBAAgB,EAChB,UAAU,EACV,aAAa,EACb,eAAe,GAChB,MAAM,eAAe,CAAC;AACvB,OAAO,EACL,SAAS,EACT,YAAY,EAKZ,QAAQ,GACT,MAAM,WAAW,CAAC;AACnB,OAAO,EACL,iBAAiB,EAMjB,eAAe,EACf,cAAc,EACd,OAAO,GACR,MAAM,cAAc,CAAC;AACtB,OAAO,EAKL,eAAe,EAEf,OAAO,EACP,cAAc,GACf,MAAM,cAAc,CAAC;AACtB,OAAO,EAGL,eAAe,EACf,WAAW,EACX,cAAc,EACd,aAAa,EACb,YAAY,GACb,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAEL,iBAAiB,EAEjB,kBAAkB,EAElB,MAAM,EACN,YAAY,EACZ,cAAc,GACf,MAAM,cAAc,CAAC;AACtB,OAAO,EACL,WAAW,EACX,SAAS,EAET,gBAAgB,EAGhB,cAAc,EACd,eAAe,EACf,OAAO,EACP,gBAAgB,EAChB,aAAa,EACb,YAAY,GACb,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,aAAa,EAAE,gBAAgB,EAAqB,YAAY,EAAE,MAAM,eAAe,CAAC;AACjG,OAAO,EAAE,aAAa,EAAkB,QAAQ,EAAE,MAAM,WAAW,CAAC"}
package/dist/publish.d.ts CHANGED
@@ -4,6 +4,7 @@ import { type HelpFile } from "./help.ts";
4
4
  import { type Snapshot } from "./project.ts";
5
5
  import { type IndexedRequest, type PublicationRequest } from "./request.ts";
6
6
  import type { ReviewStatus } from "./review.ts";
7
+ import { type SnapshotFile } from "./snapshot.ts";
7
8
  /** Why a document that passed the projection was still not published. */
8
9
  export declare const REFUSAL_REASONS: readonly ["reference", "title", "directive", "markset"];
9
10
  export type RefusalReason = (typeof REFUSAL_REASONS)[number];
@@ -19,7 +20,6 @@ export interface PublishedDocument extends GeneratedDocument {
19
20
  html?: string;
20
21
  }
21
22
  export interface PublicationIndex {
22
- snapshot: Snapshot;
23
23
  /** The request without authorization flags, or null when it was refused. */
24
24
  request: IndexedRequest | null;
25
25
  published: string[];
@@ -31,6 +31,8 @@ export interface PublishResult {
31
31
  index: PublicationIndex;
32
32
  /** The help file (spec/publication.md §5), or null when the request was refused. */
33
33
  help: HelpFile | null;
34
+ /** The snapshot file (spec/publication.md §6): the only part of the result that names the snapshot. */
35
+ snapshot: SnapshotFile;
34
36
  diagnostics: Diagnostic[];
35
37
  ok: boolean;
36
38
  }
@@ -1 +1 @@
1
- {"version":3,"file":"publish.d.ts","sourceRoot":"","sources":["../src/publish.ts"],"names":[],"mappings":"AA0BA,OAAO,EAEL,KAAK,UAAU,EACf,KAAK,KAAK,EACV,KAAK,UAAU,EAIhB,MAAM,iBAAiB,CAAC;AAIzB,OAAO,EAAE,KAAK,iBAAiB,EAAE,KAAK,eAAe,EAAoB,MAAM,eAAe,CAAC;AAC/F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MAAM,WAAW,gBAAgB;IAC/B,4EAA4E;IAC5E,OAAO,EAAE,cAAc,GAAG,IAAI,CAAC;IAC/B,SAAS,EAAE,MAAM,EAAE,CAAC;IACpB,+DAA+D;IAC/D,cAAc,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CACxC;AAED,MAAM,WAAW,aAAa;IAC5B,SAAS,EAAE,iBAAiB,EAAE,CAAC;IAC/B,KAAK,EAAE,gBAAgB,CAAC;IACxB,oFAAoF;IACpF,IAAI,EAAE,QAAQ,GAAG,IAAI,CAAC;IACtB,uGAAuG;IACvG,QAAQ,EAAE,YAAY,CAAC;IACvB,WAAW,EAAE,UAAU,EAAE,CAAC;IAC1B,EAAE,EAAE,OAAO,CAAC;CACb;AAED,wBAAgB,OAAO,CACrB,KAAK,EAAE,KAAK,EACZ,UAAU,EAAE,UAAU,EACtB,OAAO,EAAE,kBAAkB,EAC3B,OAAO,EAAE,cAAc,GACtB,aAAa,CA+Ef;AAUD;;;;;GAKG;AACH,wBAAgB,cAAc,CAAC,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,eAAe,GAAG,MAAM,CAOpF"}
package/dist/publish.js CHANGED
@@ -15,13 +15,18 @@
15
15
  * The help file (help.ts) carries every published document's tips, keyed by
16
16
  * the ID each explains, for a product's runtime.
17
17
  *
18
- * The index is what a customer-facing tool may read (Core §10): the snapshot,
19
- * the request without its authorization flags, the published IDs, and the
20
- * number of artifacts excluded for each reason. It names nothing that was not
21
- * published.
18
+ * The index is what a customer-facing tool may read (Core §10): the request
19
+ * without its authorization flags, the published IDs, and the number of
20
+ * artifacts excluded for each reason. It names nothing that was not published.
22
21
  *
23
- * Deterministic: the same graph, request, snapshot and `publishedAt` give the
24
- * same bytes.
22
+ * The snapshot file (snapshot.ts) is the one place a publication names the
23
+ * commit and graph hash it was made from (ADR 0019, ADR 0021). Both move with
24
+ * every commit that changes a record, so no document, chunk, index or help
25
+ * file carries them: their bytes change only when what they say does.
26
+ *
27
+ * Deterministic: the same graph, request and `publishedAt` give the same
28
+ * documents, index and help file, whatever the commit; the snapshot file is
29
+ * the same bytes for the same snapshot.
25
30
  */
26
31
  import { readFileSync } from "node:fs";
27
32
  import { canonicalJson, hasErrors, sortDiagnostics, } from "@intentset/core";
@@ -33,6 +38,7 @@ import { helpFile } from "./help.js";
33
38
  import { project } from "./project.js";
34
39
  import { checkReferences, checkTitles } from "./references.js";
35
40
  import { admits, indexedRequest } from "./request.js";
41
+ import { snapshotFile } from "./snapshot.js";
36
42
  /** Why a document that passed the projection was still not published. */
37
43
  export const REFUSAL_REASONS = ["reference", "title", "directive", "markset"];
38
44
  export function publish(graph, registries, request, options) {
@@ -102,8 +108,8 @@ export function publish(graph, registries, request, options) {
102
108
  help: req === null
103
109
  ? null
104
110
  : helpFile(graph, documents.map((document) => document.id), req, options),
111
+ snapshot: snapshotFile(options.snapshot),
105
112
  index: {
106
- snapshot: { commit: options.snapshot.commit, graphHash: options.snapshot.graphHash },
107
113
  request: req === null ? null : indexedRequest(req),
108
114
  published: documents.map((document) => document.id),
109
115
  excludedCounts,
@@ -1 +1 @@
1
- {"version":3,"file":"publish.js","sourceRoot":"","sources":["../src/publish.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACvC,OAAO,EAKL,aAAa,EACb,SAAS,EACT,eAAe,GAChB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AACrD,OAAO,EAAE,qBAAqB,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AAC9E,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AACjD,OAAO,EAAgD,gBAAgB,EAAE,MAAM,eAAe,CAAC;AAC/F,OAAO,EAAiB,QAAQ,EAAE,MAAM,WAAW,CAAC;AACpD,OAAO,EAAuC,OAAO,EAAE,MAAM,cAAc,CAA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;IAC1E,MAAM,IAAI,GAAG,UAAU,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC,GAAG,EAAE,EAAE,UAAU,EAAE,EAAE,MAAM,EAAE,iBAAiB,EAAE,EAAE,EAAE,CAAC,CAAC;IACrG,MAAM,IAAI,GAAG,+CAA+C,eAAe,CAAC,aAAa,CAAC,WAAW,CAAC,CAAC,MAAM,CAAC;IAC9G,MAAM,MAAM,GAAG,0BAA0B,CAAC;IAC1C,MAAM,EAAE,GAAG,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;IAChC,IAAI,EAAE,KAAK,CAAC,CAAC;QAAE,MAAM,IAAI,KAAK,CAAC,2DAA2D,CAAC,CAAC;IAC5F,OAAO,IAAI,CAAC,KAAK,CAAC,CAAC,EAAE,EAAE,GAAG,MAAM,CAAC,MAAM,CAAC,GAAG,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,EAAE,GAAG,MAAM,CAAC,MAAM,CAAC,CAAC;AACnF,CAAC;AAED,SAAS,eAAe,CAAC,KAAa;IACpC,OAAO,KAAK,CAAC,OAAO,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC,OAAO,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC,OAAO,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC,OAAO,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC;AAC1G,CAAC"}
@@ -0,0 +1,28 @@
1
+ /**
2
+ * The snapshot file (spec/publication.md §6): the commit and graph hash a
3
+ * publication was made from, in a file of its own beside the documents.
4
+ *
5
+ * It is the one file of a publication that names the snapshot (ADR 0021).
6
+ * Both values move with every commit that changes a record, so any other
7
+ * file that carried them would be rewritten by every publication, whatever
8
+ * it says; with them here, the documents, the index, the help file and the
9
+ * chunks are the same bytes for the same model, request and `publishedAt`,
10
+ * at any commit. The file carries nothing of the request, so every
11
+ * projection published in one run writes the same bytes.
12
+ */
13
+ import type { Snapshot } from "./project.ts";
14
+ export declare const SNAPSHOT_PROFILE = "intentset/snapshot/0.2";
15
+ /** The file's name beside the published documents. */
16
+ export declare const SNAPSHOT_FILE = "snapshot.json";
17
+ /** `snapshot.json`, in the order it is written. */
18
+ export interface SnapshotFile {
19
+ profile: typeof SNAPSHOT_PROFILE;
20
+ derived: true;
21
+ /** The commit published from, or null when none could be read. */
22
+ commit: string | null;
23
+ /** The hash of the graph published from. */
24
+ graphHash: string;
25
+ }
26
+ /** The snapshot file for a publication made from `snapshot`. */
27
+ export declare function snapshotFile(snapshot: Snapshot): SnapshotFile;
28
+ //# sourceMappingURL=snapshot.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"snapshot.d.ts","sourceRoot":"","sources":["../src/snapshot.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AACH,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AAE7C,eAAO,MAAM,gBAAgB,2BAA2B,CAAC;AACzD,sDAAsD;AACtD,eAAO,MAAM,aAAa,kBAAkB,CAAC;AAE7C,mDAAmD;AACnD,MAAM,WAAW,YAAY;IAC3B,OAAO,EAAE,OAAO,gBAAgB,CAAC;IACjC,OAAO,EAAE,IAAI,CAAC;IACd,kEAAkE;IAClE,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,4CAA4C;IAC5C,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,gEAAgE;AAChE,wBAAgB,YAAY,CAAC,QAAQ,EAAE,QAAQ,GAAG,YAAY,CAE7D"}
@@ -0,0 +1,8 @@
1
+ export const SNAPSHOT_PROFILE = "intentset/snapshot/0.2";
2
+ /** The file's name beside the published documents. */
3
+ export const SNAPSHOT_FILE = "snapshot.json";
4
+ /** The snapshot file for a publication made from `snapshot`. */
5
+ export function snapshotFile(snapshot) {
6
+ return { profile: SNAPSHOT_PROFILE, derived: true, commit: snapshot.commit, graphHash: snapshot.graphHash };
7
+ }
8
+ //# sourceMappingURL=snapshot.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"snapshot.js","sourceRoot":"","sources":["../src/snapshot.ts"],"names":[],"mappings":"AAcA,MAAM,CAAC,MAAM,gBAAgB,GAAG,wBAAwB,CAAC;AACzD,sDAAsD;AACtD,MAAM,CAAC,MAAM,aAAa,GAAG,eAAe,CAAC;AAY7C,gEAAgE;AAChE,MAAM,UAAU,YAAY,CAAC,QAAkB;IAC7C,OAAO,EAAE,OAAO,EAAE,gBAAgB,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,CAAC,MAAM,EAAE,SAAS,EAAE,QAAQ,CAAC,SAAS,EAAE,CAAC;AAC9G,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@intentset/publisher",
3
- "version": "0.13.0",
3
+ "version": "0.15.0",
4
4
  "description": "Audience and release projection of reviewed knowledge into Markset documents with provenance.",
5
5
  "keywords": [
6
6
  "intentset",
@@ -35,8 +35,8 @@
35
35
  }
36
36
  },
37
37
  "dependencies": {
38
- "@intentset/core": "^0.13.0",
39
- "@intentset/markset-adapter": "^0.13.0",
38
+ "@intentset/core": "^0.15.0",
39
+ "@intentset/markset-adapter": "^0.15.0",
40
40
  "@markset-lang/parser": "0.4.1",
41
41
  "@markset-lang/render-html": "0.4.1"
42
42
  }
package/src/generate.ts CHANGED
@@ -13,7 +13,11 @@
13
13
  * path appears only in a projection that admits internal records; sources
14
14
  * outside the projection are counted, not named; availability is the
15
15
  * request's own values, so a document does not list the other editions,
16
- * roles or releases its knowledge also serves.
16
+ * roles or releases its knowledge also serves. The block carries no snapshot:
17
+ * that is the same for every document in a run and moves with any record in
18
+ * the model, so the run names it once, in the help file and the index
19
+ * (publication §2, §5; ADR 0019), and a document's bytes change only when what
20
+ * it was made from does.
17
21
  *
18
22
  * The result is checked as Markset before it is emitted: a Markset error is
19
23
  * PUB003, and a `:::` directive outside Markset's vocabulary is PUB004
@@ -24,7 +28,6 @@ import { marksetCarrier } from "@intentset/markset-adapter";
24
28
  import { BLOCK_DIRECTIVE_NAMES, parseDocument } from "@markset-lang/parser";
25
29
  import { bodyLineOffset } from "./body.ts";
26
30
  import { publicationDiagnostic, sortedUnique } from "./diagnostic.ts";
27
- import type { Snapshot } from "./project.ts";
28
31
  import { type PublicationRequest, admits } from "./request.ts";
29
32
  import { type YamlValue, emitYaml } from "./yaml.ts";
30
33
 
@@ -51,7 +54,6 @@ export interface PublicationMeta {
51
54
  sources: SourceStamp[];
52
55
  /** How many explained artifacts are outside the projection and so not named. */
53
56
  withheldSources: number;
54
- snapshot: Snapshot;
55
57
  audience: string;
56
58
  /** The request's values, and the flags the knowledge requires (every one of them named by the request). */
57
59
  availability: { product: string; release: string; role: string; edition: string; flags: string[] };
@@ -61,7 +63,6 @@ export interface PublicationMeta {
61
63
  }
62
64
 
63
65
  export interface GenerateOptions {
64
- snapshot: Snapshot;
65
66
  publishedAt: string;
66
67
  }
67
68
 
@@ -109,7 +110,6 @@ export function publicationMeta(
109
110
  source,
110
111
  sources,
111
112
  withheldSources,
112
- snapshot: { commit: options.snapshot.commit, graphHash: options.snapshot.graphHash },
113
113
  audience: request.audience,
114
114
  availability: {
115
115
  product: request.product,
package/src/help.ts CHANGED
@@ -10,10 +10,13 @@
10
10
  * binds a control to the ID has already written it where the same reader can
11
11
  * see it, and nothing else of that artifact is carried: never its title, path,
12
12
  * status or prose. Two documents tipping one ID: the lower knowledge ID wins.
13
+ *
14
+ * It carries no snapshot: the run names the commit and graph hash it was
15
+ * published from in the snapshot file alone (snapshot.ts, ADR 0021), so this
16
+ * file's bytes change only when a tip, a published document or the request does.
13
17
  */
14
18
  import type { Artifact, Graph, Visibility } from "@intentset/core";
15
19
  import { compareStrings } from "./diagnostic.ts";
16
- import type { Snapshot } from "./project.ts";
17
20
  import type { PublicationRequest } from "./request.ts";
18
21
 
19
22
  export const HELP_PROFILE = "intentset/help/0.2";
@@ -39,7 +42,6 @@ export interface HelpFile {
39
42
  profile: typeof HELP_PROFILE;
40
43
  derived: true;
41
44
  projection: Visibility;
42
- snapshot: Snapshot;
43
45
  audience: string;
44
46
  availability: { product: string; release: string; role: string; edition: string; flags: string[] };
45
47
  publishedAt: string;
@@ -50,7 +52,6 @@ export interface HelpFile {
50
52
  }
51
53
 
52
54
  export interface HelpOptions {
53
- snapshot: Snapshot;
54
55
  publishedAt: string;
55
56
  }
56
57
 
@@ -79,7 +80,6 @@ export function helpFile(
79
80
  profile: HELP_PROFILE,
80
81
  derived: true,
81
82
  projection: request.visibility,
82
- snapshot: { commit: options.snapshot.commit, graphHash: options.snapshot.graphHash },
83
83
  audience: request.audience,
84
84
  availability: {
85
85
  product: request.product,
package/src/index.ts CHANGED
@@ -81,4 +81,5 @@ export {
81
81
  reviewSources,
82
82
  reviewStatus,
83
83
  } from "./review.ts";
84
+ export { SNAPSHOT_FILE, SNAPSHOT_PROFILE, type SnapshotFile, snapshotFile } from "./snapshot.ts";
84
85
  export { YamlEmitError, type YamlValue, emitYaml } from "./yaml.ts";
package/src/publish.ts CHANGED
@@ -15,13 +15,18 @@
15
15
  * The help file (help.ts) carries every published document's tips, keyed by
16
16
  * the ID each explains, for a product's runtime.
17
17
  *
18
- * The index is what a customer-facing tool may read (Core §10): the snapshot,
19
- * the request without its authorization flags, the published IDs, and the
20
- * number of artifacts excluded for each reason. It names nothing that was not
21
- * published.
18
+ * The index is what a customer-facing tool may read (Core §10): the request
19
+ * without its authorization flags, the published IDs, and the number of
20
+ * artifacts excluded for each reason. It names nothing that was not published.
22
21
  *
23
- * Deterministic: the same graph, request, snapshot and `publishedAt` give the
24
- * same bytes.
22
+ * The snapshot file (snapshot.ts) is the one place a publication names the
23
+ * commit and graph hash it was made from (ADR 0019, ADR 0021). Both move with
24
+ * every commit that changes a record, so no document, chunk, index or help
25
+ * file carries them: their bytes change only when what they say does.
26
+ *
27
+ * Deterministic: the same graph, request and `publishedAt` give the same
28
+ * documents, index and help file, whatever the commit; the snapshot file is
29
+ * the same bytes for the same snapshot.
25
30
  */
26
31
  import { readFileSync } from "node:fs";
27
32
  import {
@@ -42,6 +47,7 @@ import { type ExclusionReason, type Snapshot, project } from "./project.ts";
42
47
  import { checkReferences, checkTitles } from "./references.ts";
43
48
  import { type IndexedRequest, type PublicationRequest, admits, indexedRequest } from "./request.ts";
44
49
  import type { ReviewStatus } from "./review.ts";
50
+ import { type SnapshotFile, snapshotFile } from "./snapshot.ts";
45
51
 
46
52
  /** Why a document that passed the projection was still not published. */
47
53
  export const REFUSAL_REASONS = ["reference", "title", "directive", "markset"] as const;
@@ -61,7 +67,6 @@ export interface PublishedDocument extends GeneratedDocument {
61
67
  }
62
68
 
63
69
  export interface PublicationIndex {
64
- snapshot: Snapshot;
65
70
  /** The request without authorization flags, or null when it was refused. */
66
71
  request: IndexedRequest | null;
67
72
  published: string[];
@@ -74,6 +79,8 @@ export interface PublishResult {
74
79
  index: PublicationIndex;
75
80
  /** The help file (spec/publication.md §5), or null when the request was refused. */
76
81
  help: HelpFile | null;
82
+ /** The snapshot file (spec/publication.md §6): the only part of the result that names the snapshot. */
83
+ snapshot: SnapshotFile;
77
84
  diagnostics: Diagnostic[];
78
85
  ok: boolean;
79
86
  }
@@ -153,8 +160,8 @@ export function publish(
153
160
  req,
154
161
  options,
155
162
  ),
163
+ snapshot: snapshotFile(options.snapshot),
156
164
  index: {
157
- snapshot: { commit: options.snapshot.commit, graphHash: options.snapshot.graphHash },
158
165
  request: req === null ? null : indexedRequest(req),
159
166
  published: documents.map((document) => document.id),
160
167
  excludedCounts,
@@ -0,0 +1,32 @@
1
+ /**
2
+ * The snapshot file (spec/publication.md §6): the commit and graph hash a
3
+ * publication was made from, in a file of its own beside the documents.
4
+ *
5
+ * It is the one file of a publication that names the snapshot (ADR 0021).
6
+ * Both values move with every commit that changes a record, so any other
7
+ * file that carried them would be rewritten by every publication, whatever
8
+ * it says; with them here, the documents, the index, the help file and the
9
+ * chunks are the same bytes for the same model, request and `publishedAt`,
10
+ * at any commit. The file carries nothing of the request, so every
11
+ * projection published in one run writes the same bytes.
12
+ */
13
+ import type { Snapshot } from "./project.ts";
14
+
15
+ export const SNAPSHOT_PROFILE = "intentset/snapshot/0.2";
16
+ /** The file's name beside the published documents. */
17
+ export const SNAPSHOT_FILE = "snapshot.json";
18
+
19
+ /** `snapshot.json`, in the order it is written. */
20
+ export interface SnapshotFile {
21
+ profile: typeof SNAPSHOT_PROFILE;
22
+ derived: true;
23
+ /** The commit published from, or null when none could be read. */
24
+ commit: string | null;
25
+ /** The hash of the graph published from. */
26
+ graphHash: string;
27
+ }
28
+
29
+ /** The snapshot file for a publication made from `snapshot`. */
30
+ export function snapshotFile(snapshot: Snapshot): SnapshotFile {
31
+ return { profile: SNAPSHOT_PROFILE, derived: true, commit: snapshot.commit, graphHash: snapshot.graphHash };
32
+ }