literally-aeo 0.4.1 → 0.4.3

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 (133) hide show
  1. package/README.md +16 -0
  2. package/dist/cli.mjs +1505 -549
  3. package/dist/lib/agents/copy-validation.js +3 -1
  4. package/dist/lib/agents/methodology.js +3 -3
  5. package/dist/lib/agents/verifier.js +2 -2
  6. package/dist/lib/bundle/contracts.js +1 -1
  7. package/dist/lib/bundle/export.js +13 -13
  8. package/dist/lib/bundle/journal.js +2 -2
  9. package/dist/lib/bundle/project-journal.js +5 -5
  10. package/dist/lib/bundle/project.js +11 -11
  11. package/dist/lib/bundle/read.js +14 -14
  12. package/dist/lib/bundle/recorder.js +3 -3
  13. package/dist/lib/bundle/redact.js +2 -2
  14. package/dist/lib/bundle/trace-coverage.js +2 -2
  15. package/dist/lib/bundle/verify-integrity.js +4 -4
  16. package/dist/lib/bundle/verify-measurement.js +2 -2
  17. package/dist/lib/bundle/verify-report.js +3 -3
  18. package/dist/lib/bundle/verify.js +8 -8
  19. package/dist/lib/checks/run-checks.js +4 -4
  20. package/dist/lib/chunks/{chunk-4KF5EVLI.js → chunk-2ANSPIUT.js} +2 -2
  21. package/dist/lib/chunks/{chunk-G22MXBBM.js → chunk-54GMIPWV.js} +1 -1
  22. package/dist/lib/chunks/{chunk-PI7PZKHP.js → chunk-65OIYOUH.js} +2 -2
  23. package/dist/lib/chunks/{chunk-2XMVEGQG.js → chunk-6MGXILUJ.js} +1 -1
  24. package/dist/lib/chunks/chunk-6OURIXQZ.js +472 -0
  25. package/dist/lib/chunks/{chunk-OBSW2WKF.js → chunk-746643QV.js} +1 -1
  26. package/dist/lib/chunks/{chunk-7DR2X7SF.js → chunk-74K4E3ZS.js} +1 -1
  27. package/dist/lib/chunks/{chunk-JVIOWZPG.js → chunk-7HCVSLVG.js} +1 -1
  28. package/dist/lib/chunks/{chunk-XX2TK6FI.js → chunk-7K2XT3WI.js} +5 -5
  29. package/dist/lib/chunks/{chunk-ABS5TK73.js → chunk-7K6CXSTL.js} +3 -1
  30. package/dist/lib/chunks/{chunk-CBOETT4C.js → chunk-7L4Y6N3V.js} +1 -1
  31. package/dist/lib/chunks/{chunk-FDCM7554.js → chunk-7QWT7LFM.js} +2 -2
  32. package/dist/lib/chunks/{chunk-4UN3YD5Z.js → chunk-7SA2CRSS.js} +1 -1
  33. package/dist/lib/chunks/{chunk-P7LGJGDL.js → chunk-ARKZ5PJN.js} +1 -1
  34. package/dist/lib/chunks/{chunk-4WPG2O2S.js → chunk-B6XGNJUU.js} +1 -1
  35. package/dist/lib/chunks/{chunk-5OL67GMN.js → chunk-BNX7S4GK.js} +4 -4
  36. package/dist/lib/chunks/chunk-BWBPEXEU.js +83 -0
  37. package/dist/lib/chunks/{chunk-U53GT2R7.js → chunk-BZAPAGXM.js} +1 -1
  38. package/dist/lib/chunks/{chunk-BNPWAQQG.js → chunk-C2Q7YE7Y.js} +6 -6
  39. package/dist/lib/chunks/{chunk-LYOCWN3R.js → chunk-D2LJMNH3.js} +2 -2
  40. package/dist/lib/chunks/{chunk-32HYNVPR.js → chunk-EVEJ3MFU.js} +3 -3
  41. package/dist/lib/chunks/{chunk-DGOFCRZM.js → chunk-GC7DISQO.js} +1 -1
  42. package/dist/lib/chunks/{chunk-BTRBLG6S.js → chunk-I6PQUKKF.js} +1 -1
  43. package/dist/lib/chunks/{chunk-6FGVCN4H.js → chunk-J5RYDPGP.js} +1 -1
  44. package/dist/lib/chunks/{chunk-JIUBLXR7.js → chunk-JHUI2K5X.js} +3 -3
  45. package/dist/lib/chunks/chunk-JQFLWUCA.js +123 -0
  46. package/dist/lib/chunks/{chunk-4RB3AOPT.js → chunk-JREYIUNG.js} +5 -5
  47. package/dist/lib/chunks/{chunk-42QARLUQ.js → chunk-JXQOWHWB.js} +3 -3
  48. package/dist/lib/chunks/{chunk-66BTHIL3.js → chunk-KFJ5O5CL.js} +2 -2
  49. package/dist/lib/chunks/{chunk-6P7EZJI7.js → chunk-KSJ3NZIJ.js} +4 -2
  50. package/dist/lib/chunks/{chunk-3RGUIUKU.js → chunk-L5HFTFFG.js} +2 -2
  51. package/dist/lib/chunks/{chunk-WBSJVDS2.js → chunk-LJD37WAV.js} +2 -2
  52. package/dist/lib/chunks/{chunk-QT5GTQGD.js → chunk-MKA2EP7M.js} +1 -1
  53. package/dist/lib/chunks/{chunk-CZMQ2DVJ.js → chunk-MMJ5UR2E.js} +1 -1
  54. package/dist/lib/chunks/{chunk-BWUOUP4J.js → chunk-MQFFMD4Q.js} +1 -1
  55. package/dist/lib/chunks/{chunk-7D7EOET3.js → chunk-NM2LUMQT.js} +4 -4
  56. package/dist/lib/chunks/{chunk-IJQEQL5Q.js → chunk-P5VVHTZU.js} +1 -1
  57. package/dist/lib/chunks/{chunk-OJQ66533.js → chunk-PFG3ESJE.js} +9 -9
  58. package/dist/lib/chunks/{chunk-WSATQQJI.js → chunk-Q7CWM6LZ.js} +6 -6
  59. package/dist/lib/chunks/{chunk-F6CC4WLO.js → chunk-R4HYBSQB.js} +1 -1
  60. package/dist/lib/chunks/{chunk-FWH3LYHG.js → chunk-R5NLULQW.js} +1 -1
  61. package/dist/lib/chunks/{chunk-WUDXMAJS.js → chunk-RM7U5M5L.js} +1 -1
  62. package/dist/lib/chunks/{chunk-3G6COT6E.js → chunk-RQ6GUJI5.js} +1 -1
  63. package/dist/lib/chunks/{chunk-TNTTIT2R.js → chunk-RUSMX6JH.js} +16 -7
  64. package/dist/lib/chunks/{chunk-G4GAGKSG.js → chunk-UNNRLD2U.js} +4 -4
  65. package/dist/lib/chunks/chunk-VFN2J4Z3.js +626 -0
  66. package/dist/lib/chunks/{chunk-BLDOQAEW.js → chunk-VPJN2GNC.js} +1 -1
  67. package/dist/lib/chunks/{chunk-3GDCPD5P.js → chunk-XSOTCSD3.js} +3 -3
  68. package/dist/lib/chunks/{chunk-WHW3NOG5.js → chunk-YX4EH6FR.js} +1 -1
  69. package/dist/lib/chunks/{chunk-TXGVQ6CN.js → chunk-ZC4MKS3J.js} +12 -12
  70. package/dist/lib/chunks/{chunk-VXO5RAR4.js → chunk-ZM4RHMBI.js} +1 -1
  71. package/dist/lib/cli/bundle-commands.js +60 -35
  72. package/dist/lib/cli/guide-command.js +1 -1
  73. package/dist/lib/cli/run-commands.js +40 -40
  74. package/dist/lib/cli/status-command.js +21 -21
  75. package/dist/lib/codex-workflow/aggregate.js +2 -2
  76. package/dist/lib/codex-workflow/author.js +5 -5
  77. package/dist/lib/codex-workflow/capture.js +5 -5
  78. package/dist/lib/codex-workflow/copy-editor.js +5 -5
  79. package/dist/lib/codex-workflow/copy.js +4 -4
  80. package/dist/lib/codex-workflow/finish.js +5 -5
  81. package/dist/lib/codex-workflow/loop.js +15 -15
  82. package/dist/lib/codex-workflow/run-source.js +5 -5
  83. package/dist/lib/codex-workflow/stage.js +6 -6
  84. package/dist/lib/engine/audit-file.js +3 -3
  85. package/dist/lib/engine/author.js +12 -12
  86. package/dist/lib/engine/cost-estimate.js +3 -3
  87. package/dist/lib/engine/local-run.js +20 -20
  88. package/dist/lib/engine/preflight.js +3 -3
  89. package/dist/lib/engine/rejudge.js +27 -27
  90. package/dist/lib/engine/resources.js +1 -1
  91. package/dist/lib/engine/run-bindings.js +3 -3
  92. package/dist/lib/engine/run-method.js +3 -3
  93. package/dist/lib/engine/run-models.js +4 -4
  94. package/dist/lib/engine/run-status.js +21 -21
  95. package/dist/lib/engine/templates.js +4 -4
  96. package/dist/lib/grounding/grounding-runtime.js +5 -5
  97. package/dist/lib/grounding/recorded-tools.js +4 -4
  98. package/dist/lib/pipeline.js +4 -4
  99. package/dist/lib/probes/bindings.js +2 -2
  100. package/dist/lib/probes/charged-trace.js +3 -3
  101. package/dist/lib/probes/probes.js +3 -3
  102. package/dist/lib/stores/files.js +3 -3
  103. package/dist/lib/stores/memory.js +2 -2
  104. package/dist/lib/stores/publication.js +2 -2
  105. package/dist/lib/viewer/alternatives.js +8 -0
  106. package/dist/lib/viewer/cited-domains.js +8 -0
  107. package/dist/lib/viewer/page.js +3 -1
  108. package/dist/lib/viewer/presentation.js +41 -0
  109. package/dist/lib/viewer/server.js +15 -10
  110. package/dist/types/agents/copy-validation.d.ts +2 -1
  111. package/dist/types/bundle/contracts.d.ts +1 -1
  112. package/dist/types/engine/resources.d.ts +2 -0
  113. package/dist/types/viewer/alternatives.d.ts +16 -0
  114. package/dist/types/viewer/cited-domains.d.ts +22 -0
  115. package/dist/types/viewer/page.d.ts +9 -2
  116. package/dist/types/viewer/presentation.d.ts +112 -0
  117. package/dist/types/viewer/server.d.ts +7 -3
  118. package/package.json +2 -1
  119. package/resources/fonts/Mulish-OFL.txt +93 -0
  120. package/resources/fonts/Mulish-VariableFont_wght.ttf +0 -0
  121. package/resources/fonts/SourceCodePro-OFL.txt +93 -0
  122. package/resources/fonts/SourceCodePro-VariableFont_wght.ttf +0 -0
  123. package/src/agents/copy-validation.ts +8 -2
  124. package/src/bundle/contracts.ts +1 -1
  125. package/src/cli/bundle-commands.ts +21 -0
  126. package/src/engine/resources.ts +9 -5
  127. package/src/report/core/rate-interval.ts +1 -2
  128. package/src/viewer/alternatives.ts +202 -0
  129. package/src/viewer/cited-domains.ts +127 -0
  130. package/src/viewer/page.ts +549 -236
  131. package/src/viewer/presentation.ts +759 -0
  132. package/src/viewer/server.ts +25 -4
  133. package/dist/lib/chunks/chunk-3TF4JGQA.js +0 -323
@@ -3,7 +3,7 @@ import {
3
3
  } from "../chunks/chunk-YPMRZX4U.js";
4
4
  import {
5
5
  assertPublishable
6
- } from "../chunks/chunk-BTRBLG6S.js";
6
+ } from "../chunks/chunk-I6PQUKKF.js";
7
7
  import {
8
8
  validateReportArtifacts
9
9
  } from "../chunks/chunk-NZTOOSLX.js";
@@ -23,7 +23,7 @@ import "../chunks/chunk-7O3M6I2X.js";
23
23
  import "../chunks/chunk-3BJWRD4O.js";
24
24
  import "../chunks/chunk-TGTM5ZFR.js";
25
25
  import "../chunks/chunk-GZC3ASNL.js";
26
- import "../chunks/chunk-ABS5TK73.js";
26
+ import "../chunks/chunk-7K6CXSTL.js";
27
27
  import "../chunks/chunk-NANJGMEJ.js";
28
28
  import "../chunks/chunk-55U7PRRM.js";
29
29
  import "../chunks/chunk-7PLK6VGC.js";
@@ -2,9 +2,9 @@ import {
2
2
  assertPublishable,
3
3
  isCurrentValidation,
4
4
  sameTriple
5
- } from "../chunks/chunk-BTRBLG6S.js";
5
+ } from "../chunks/chunk-I6PQUKKF.js";
6
6
  import "../chunks/chunk-FWBVTM7F.js";
7
- import "../chunks/chunk-ABS5TK73.js";
7
+ import "../chunks/chunk-7K6CXSTL.js";
8
8
  import "../chunks/chunk-NANJGMEJ.js";
9
9
  import "../chunks/chunk-55U7PRRM.js";
10
10
  import "../chunks/chunk-7PLK6VGC.js";
@@ -0,0 +1,8 @@
1
+ import {
2
+ rankAlternatives
3
+ } from "../chunks/chunk-JQFLWUCA.js";
4
+ import "../chunks/chunk-GMGKKE5N.js";
5
+ import "../chunks/chunk-QTXOW5XC.js";
6
+ export {
7
+ rankAlternatives
8
+ };
@@ -0,0 +1,8 @@
1
+ import {
2
+ groupCitedDomains
3
+ } from "../chunks/chunk-BWBPEXEU.js";
4
+ import "../chunks/chunk-UGCT46PC.js";
5
+ import "../chunks/chunk-QTXOW5XC.js";
6
+ export {
7
+ groupCitedDomains
8
+ };
@@ -1,6 +1,8 @@
1
1
  import {
2
+ viewerFontFiles,
2
3
  viewerPage
3
- } from "../chunks/chunk-3TF4JGQA.js";
4
+ } from "../chunks/chunk-VFN2J4Z3.js";
4
5
  export {
6
+ viewerFontFiles,
5
7
  viewerPage
6
8
  };
@@ -0,0 +1,41 @@
1
+ import {
2
+ presentReport
3
+ } from "../chunks/chunk-6OURIXQZ.js";
4
+ import "../chunks/chunk-JQFLWUCA.js";
5
+ import "../chunks/chunk-BWBPEXEU.js";
6
+ import "../chunks/chunk-M3WZCV65.js";
7
+ import "../chunks/chunk-2QLAFBCG.js";
8
+ import "../chunks/chunk-6MGXILUJ.js";
9
+ import "../chunks/chunk-WSFXGX7S.js";
10
+ import "../chunks/chunk-7O3M6I2X.js";
11
+ import "../chunks/chunk-E6NQQU6V.js";
12
+ import "../chunks/chunk-UGCT46PC.js";
13
+ import "../chunks/chunk-GMGKKE5N.js";
14
+ import "../chunks/chunk-FXR6P7HY.js";
15
+ import "../chunks/chunk-JQ3P552S.js";
16
+ import "../chunks/chunk-QTXOW5XC.js";
17
+ import "../chunks/chunk-TPPBTN3E.js";
18
+ import "../chunks/chunk-3YPAIXFG.js";
19
+ import "../chunks/chunk-E4HADK7C.js";
20
+ import "../chunks/chunk-PT6PK2MJ.js";
21
+ import "../chunks/chunk-EZD2C7QS.js";
22
+ import "../chunks/chunk-X3HRV5CF.js";
23
+ import "../chunks/chunk-EUXNCXCR.js";
24
+ import "../chunks/chunk-WJUHRJVW.js";
25
+ import "../chunks/chunk-6RAKXYSR.js";
26
+ import "../chunks/chunk-D5B4ZOW6.js";
27
+ import "../chunks/chunk-2A327DMI.js";
28
+ import "../chunks/chunk-3F5ZP2EO.js";
29
+ import "../chunks/chunk-QBD24WTZ.js";
30
+ import "../chunks/chunk-72ZLXWD4.js";
31
+ import "../chunks/chunk-N5IAPSLM.js";
32
+ import "../chunks/chunk-SZ2UBZKG.js";
33
+ import "../chunks/chunk-E5COBP7A.js";
34
+ import "../chunks/chunk-LTPLZSXI.js";
35
+ import "../chunks/chunk-2MGARWKY.js";
36
+ import "../chunks/chunk-7MR6IJ7I.js";
37
+ import "../chunks/chunk-H56DDRKE.js";
38
+ import "../chunks/chunk-PKB6JRJM.js";
39
+ export {
40
+ presentReport
41
+ };
@@ -1,13 +1,16 @@
1
1
  import {
2
2
  startViewer
3
- } from "../chunks/chunk-TNTTIT2R.js";
4
- import "../chunks/chunk-3TF4JGQA.js";
5
- import "../chunks/chunk-XX2TK6FI.js";
6
- import "../chunks/chunk-32HYNVPR.js";
7
- import "../chunks/chunk-3G6COT6E.js";
8
- import "../chunks/chunk-66BTHIL3.js";
3
+ } from "../chunks/chunk-RUSMX6JH.js";
4
+ import "../chunks/chunk-VFN2J4Z3.js";
5
+ import "../chunks/chunk-6OURIXQZ.js";
6
+ import "../chunks/chunk-JQFLWUCA.js";
7
+ import "../chunks/chunk-BWBPEXEU.js";
8
+ import "../chunks/chunk-7K2XT3WI.js";
9
+ import "../chunks/chunk-EVEJ3MFU.js";
10
+ import "../chunks/chunk-RQ6GUJI5.js";
11
+ import "../chunks/chunk-KFJ5O5CL.js";
9
12
  import "../chunks/chunk-M3WZCV65.js";
10
- import "../chunks/chunk-WUDXMAJS.js";
13
+ import "../chunks/chunk-RM7U5M5L.js";
11
14
  import "../chunks/chunk-77EQ3RT6.js";
12
15
  import "../chunks/chunk-SFPPZGTA.js";
13
16
  import "../chunks/chunk-SN3DKEOY.js";
@@ -15,8 +18,8 @@ import "../chunks/chunk-BYPCNCN3.js";
15
18
  import "../chunks/chunk-JEAZREDN.js";
16
19
  import "../chunks/chunk-JHOLYLI4.js";
17
20
  import "../chunks/chunk-SREGO3PU.js";
18
- import "../chunks/chunk-CBOETT4C.js";
19
- import "../chunks/chunk-BWUOUP4J.js";
21
+ import "../chunks/chunk-7L4Y6N3V.js";
22
+ import "../chunks/chunk-MQFFMD4Q.js";
20
23
  import "../chunks/chunk-W46Y7KBR.js";
21
24
  import "../chunks/chunk-2QLAFBCG.js";
22
25
  import "../chunks/chunk-YQD5ITKI.js";
@@ -28,7 +31,7 @@ import "../chunks/chunk-UWXR24TV.js";
28
31
  import "../chunks/chunk-TCOH3FGE.js";
29
32
  import "../chunks/chunk-XPUCJQIB.js";
30
33
  import "../chunks/chunk-CRVCWDH6.js";
31
- import "../chunks/chunk-2XMVEGQG.js";
34
+ import "../chunks/chunk-6MGXILUJ.js";
32
35
  import "../chunks/chunk-WSFXGX7S.js";
33
36
  import "../chunks/chunk-7O3M6I2X.js";
34
37
  import "../chunks/chunk-E6NQQU6V.js";
@@ -37,6 +40,7 @@ import "../chunks/chunk-TGTM5ZFR.js";
37
40
  import "../chunks/chunk-WZA4H4TG.js";
38
41
  import "../chunks/chunk-74UNVGWB.js";
39
42
  import "../chunks/chunk-UGCT46PC.js";
43
+ import "../chunks/chunk-GMGKKE5N.js";
40
44
  import "../chunks/chunk-BBK54RVK.js";
41
45
  import "../chunks/chunk-PO2J5OQ3.js";
42
46
  import "../chunks/chunk-55KFAM4X.js";
@@ -44,6 +48,7 @@ import "../chunks/chunk-J63WQUKR.js";
44
48
  import "../chunks/chunk-55U7PRRM.js";
45
49
  import "../chunks/chunk-7PLK6VGC.js";
46
50
  import "../chunks/chunk-6FHT2AHR.js";
51
+ import "../chunks/chunk-FXR6P7HY.js";
47
52
  import "../chunks/chunk-KQCRJIEG.js";
48
53
  import "../chunks/chunk-DHQKAIOP.js";
49
54
  import "../chunks/chunk-JQ3P552S.js";
@@ -3,7 +3,7 @@ import type { GroundingBundle } from '../grounding/schema';
3
3
  import { type InternalModelRoleConfig } from '../models/profiles';
4
4
  import { type ReportFact } from './facts';
5
5
  import { type AeoAgentCopyDraft, type AeoReportCopy } from './copy-schema';
6
- export declare const copyCheckerVersion = 7;
6
+ export declare const copyCheckerVersion = 8;
7
7
  export declare const premiseVerifierPromptVersion = 4;
8
8
  /** Host framing every narrative block rests on whether or not the writer
9
9
  * declares it: the report identity and publisher, the captured surfaces,
@@ -139,6 +139,7 @@ export declare const validateHumanCopy: (args: {
139
139
  }) => Promise<Omit<CopyValidationResult, "provenance"> & {
140
140
  provenance?: HumanCopyProvenance;
141
141
  }>;
142
+ export declare const isStoredProvenance: (value: unknown) => value is CopyProvenance;
142
143
  /**
143
144
  * assertCopyValidation checks the stored receipt, recomputed from immutable
144
145
  * data inside every publication transaction. No human approval or allowPartial
@@ -1,6 +1,6 @@
1
1
  import { z } from 'zod';
2
2
  export declare const toolId = "literally-aeo";
3
- export declare const toolVersion = "0.4.1";
3
+ export declare const toolVersion = "0.4.3";
4
4
  export declare const bundleSchemaVersion = 3;
5
5
  export declare const readableBundleSchemaVersions: readonly number[];
6
6
  export declare const traceSchemaVersion = 1;
@@ -5,6 +5,8 @@ export type EngineResources = {
5
5
  editorial: string;
6
6
  /** The operator guide `literally-aeo guide` prints. */
7
7
  guide: string;
8
+ /** The report viewer's fonts, served on loopback beside the page. */
9
+ fonts: string;
8
10
  };
9
11
  /** engineResources finds the resources of the running engine. */
10
12
  export declare const engineResources: () => Promise<EngineResources>;
@@ -0,0 +1,16 @@
1
+ import type { AeoMatrixRow } from '../report/core/schema';
2
+ export type RankedAlternative = {
3
+ name: string;
4
+ domain?: string;
5
+ /** Answers that name the alternative, each counted once. */
6
+ mentioning: number;
7
+ captured: number;
8
+ };
9
+ type Prospect = {
10
+ name: string;
11
+ domain: string;
12
+ };
13
+ /** rankAlternatives orders a section's alternatives by the answers that
14
+ * name them, most first. */
15
+ export declare const rankAlternatives: (matrix: ReadonlyArray<Pick<AeoMatrixRow, "qualifiedCompetitors" | "competitors">>, prospect: Prospect) => RankedAlternative[];
16
+ export {};
@@ -0,0 +1,22 @@
1
+ import type { AeoVisibility } from '../report/core/schema';
2
+ export type CitedUrl = {
3
+ url: string;
4
+ count: number;
5
+ /** Distinct surfaces and question texts that cited the URL, first seen first. */
6
+ surfaces: string[];
7
+ prompts: string[];
8
+ };
9
+ export type CitedDomain = {
10
+ domain: string;
11
+ count: number;
12
+ isBrand: boolean;
13
+ /** The brand's citations by host; present on the brand's row only. */
14
+ hosts?: Array<{
15
+ label: string;
16
+ count: number;
17
+ }>;
18
+ urls: CitedUrl[];
19
+ };
20
+ /** groupCitedDomains lists the brand's row first, then every other domain
21
+ * by citations, most first. */
22
+ export declare const groupCitedDomains: (visibility: Pick<AeoVisibility, "matrix" | "prompts">, brandDomain: string) => CitedDomain[];
@@ -1,2 +1,9 @@
1
- /** viewerPage is the document served at /, bound to one launch's nonce. */
2
- export declare const viewerPage: (nonce: string) => string;
1
+ /** The hosted report's two typefaces, shipped unmodified under the SIL Open
2
+ * Font License (src/viewer/fonts) and served by the viewer itself. */
3
+ export declare const viewerFontFiles: {
4
+ readonly body: "Mulish-VariableFont_wght.ttf";
5
+ readonly mono: "SourceCodePro-VariableFont_wght.ttf";
6
+ };
7
+ /** viewerPage is the document served at /, bound to one launch's nonce. The
8
+ * launch token, when the viewer serves fonts, is what their URLs carry. */
9
+ export declare const viewerPage: (nonce: string, fontToken?: string) => string;
@@ -0,0 +1,112 @@
1
+ import { type SourceMixCounts } from '../report/core/schema';
2
+ import { type CitedDomain } from './cited-domains';
3
+ export type IntervalView = {
4
+ text: string;
5
+ /** The interval named for a screen reader, which reaches it alone. */
6
+ label: string;
7
+ counts: string;
8
+ };
9
+ export type RateView = {
10
+ percent: string;
11
+ interval?: IntervalView;
12
+ };
13
+ export type ScorecardView = {
14
+ headline: string;
15
+ headlineInterval?: IntervalView;
16
+ label: string;
17
+ detail?: string;
18
+ detailInterval?: IntervalView;
19
+ };
20
+ export type RunView = {
21
+ runNumber: number;
22
+ surface: string;
23
+ cliVersion?: string;
24
+ status: 'primary' | 'mentioned' | 'absent' | 'no_overview';
25
+ retrieval?: 'searched' | 'memory' | 'unknown';
26
+ snippet?: string;
27
+ /** The captured answer, when the bundle holds it. */
28
+ answer?: string;
29
+ mentionedBrands: string[];
30
+ citedUrls: string[];
31
+ };
32
+ export type CellView = {
33
+ status: 'no_data' | 'absent' | 'primary' | 'mentioned';
34
+ mentioned: number;
35
+ runs: RunView[];
36
+ };
37
+ export type SectionView = {
38
+ key: string;
39
+ title: string;
40
+ scorecards: ScorecardView[];
41
+ surfaceRates: Array<{
42
+ surface: string;
43
+ shareOfVoice: RateView;
44
+ citationRate: RateView;
45
+ }>;
46
+ matrix: {
47
+ assistantSurfaces: string[];
48
+ agentSurfaces: string[];
49
+ rows: Array<{
50
+ prompt: string;
51
+ category: string;
52
+ cells: CellView[];
53
+ }>;
54
+ };
55
+ alternatives: Array<{
56
+ name: string;
57
+ domain?: string;
58
+ share: number;
59
+ percent: string;
60
+ mentioning: number;
61
+ captured: number;
62
+ }>;
63
+ citedDomains: CitedDomain[];
64
+ sourceMix?: {
65
+ rows: Array<{
66
+ surface: string;
67
+ counts: SourceMixCounts;
68
+ }>;
69
+ total: SourceMixCounts;
70
+ };
71
+ perception?: {
72
+ positive: number;
73
+ neutral: number;
74
+ negative: number;
75
+ phrases: Array<{
76
+ text: string;
77
+ count: number;
78
+ surfaces: string[];
79
+ }>;
80
+ };
81
+ };
82
+ export type ReportPresentation = {
83
+ outcome: 'shown';
84
+ brand: {
85
+ name: string;
86
+ domain: string;
87
+ };
88
+ hero: {
89
+ title: string;
90
+ subtitle: string;
91
+ measuredOn: string;
92
+ probeCount: number;
93
+ facts: string[];
94
+ };
95
+ intro?: {
96
+ heading: string;
97
+ lead: string;
98
+ };
99
+ sections: SectionView[];
100
+ footer: {
101
+ baseline: string;
102
+ methodology: string[];
103
+ notes: string[];
104
+ };
105
+ } | {
106
+ outcome: 'missing';
107
+ } | {
108
+ outcome: 'unreadable';
109
+ reason: string;
110
+ };
111
+ /** presentReport derives the page's report from a bundle's files. */
112
+ export declare const presentReport: (files: ReadonlyMap<string, Buffer>) => ReportPresentation;
@@ -8,7 +8,11 @@ export type ViewerServer = {
8
8
  url: string;
9
9
  close: () => Promise<void>;
10
10
  };
11
- /** startViewer serves a bundle on loopback until closed. */
12
- export declare const startViewer: (bundle: ViewerBundle, { port }?: {
11
+ export type ViewerOptions = {
13
12
  port?: number;
14
- }) => Promise<ViewerServer>;
13
+ /** The page's fonts by file name (viewerFontFiles), from the engine's
14
+ * resources; without them the page falls back to system fonts. */
15
+ fonts?: ReadonlyMap<string, Buffer>;
16
+ };
17
+ /** startViewer serves a bundle on loopback until closed. */
18
+ export declare const startViewer: (bundle: ViewerBundle, { port, fonts }?: ViewerOptions) => Promise<ViewerServer>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "literally-aeo",
3
- "version": "0.4.1",
3
+ "version": "0.4.3",
4
4
  "description": "Literally.dev AEO: run an AI visibility audit locally and verify its evidence offline.",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -49,6 +49,7 @@
49
49
  "!src/**/__fixtures__",
50
50
  "!src/**/*-fixture.ts",
51
51
  "!src/**/*-fixtures.ts",
52
+ "!src/viewer/fonts",
52
53
  "README.md",
53
54
  "LICENSE"
54
55
  ],
@@ -0,0 +1,93 @@
1
+ Copyright 2016 The Mulish Project Authors (https://github.com/googlefonts/mulish)
2
+
3
+ This Font Software is licensed under the SIL Open Font License, Version 1.1.
4
+ This license is copied below, and is also available with a FAQ at:
5
+ http://scripts.sil.org/OFL
6
+
7
+
8
+ -----------------------------------------------------------
9
+ SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
10
+ -----------------------------------------------------------
11
+
12
+ PREAMBLE
13
+ The goals of the Open Font License (OFL) are to stimulate worldwide
14
+ development of collaborative font projects, to support the font creation
15
+ efforts of academic and linguistic communities, and to provide a free and
16
+ open framework in which fonts may be shared and improved in partnership
17
+ with others.
18
+
19
+ The OFL allows the licensed fonts to be used, studied, modified and
20
+ redistributed freely as long as they are not sold by themselves. The
21
+ fonts, including any derivative works, can be bundled, embedded,
22
+ redistributed and/or sold with any software provided that any reserved
23
+ names are not used by derivative works. The fonts and derivatives,
24
+ however, cannot be released under any other type of license. The
25
+ requirement for fonts to remain under this license does not apply
26
+ to any document created using the fonts or their derivatives.
27
+
28
+ DEFINITIONS
29
+ "Font Software" refers to the set of files released by the Copyright
30
+ Holder(s) under this license and clearly marked as such. This may
31
+ include source files, build scripts and documentation.
32
+
33
+ "Reserved Font Name" refers to any names specified as such after the
34
+ copyright statement(s).
35
+
36
+ "Original Version" refers to the collection of Font Software components as
37
+ distributed by the Copyright Holder(s).
38
+
39
+ "Modified Version" refers to any derivative made by adding to, deleting,
40
+ or substituting -- in part or in whole -- any of the components of the
41
+ Original Version, by changing formats or by porting the Font Software to a
42
+ new environment.
43
+
44
+ "Author" refers to any designer, engineer, programmer, technical
45
+ writer or other person who contributed to the Font Software.
46
+
47
+ PERMISSION & CONDITIONS
48
+ Permission is hereby granted, free of charge, to any person obtaining
49
+ a copy of the Font Software, to use, study, copy, merge, embed, modify,
50
+ redistribute, and sell modified and unmodified copies of the Font
51
+ Software, subject to the following conditions:
52
+
53
+ 1) Neither the Font Software nor any of its individual components,
54
+ in Original or Modified Versions, may be sold by itself.
55
+
56
+ 2) Original or Modified Versions of the Font Software may be bundled,
57
+ redistributed and/or sold with any software, provided that each copy
58
+ contains the above copyright notice and this license. These can be
59
+ included either as stand-alone text files, human-readable headers or
60
+ in the appropriate machine-readable metadata fields within text or
61
+ binary files as long as those fields can be easily viewed by the user.
62
+
63
+ 3) No Modified Version of the Font Software may use the Reserved Font
64
+ Name(s) unless explicit written permission is granted by the corresponding
65
+ Copyright Holder. This restriction only applies to the primary font name as
66
+ presented to the users.
67
+
68
+ 4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
69
+ Software shall not be used to promote, endorse or advertise any
70
+ Modified Version, except to acknowledge the contribution(s) of the
71
+ Copyright Holder(s) and the Author(s) or with their explicit written
72
+ permission.
73
+
74
+ 5) The Font Software, modified or unmodified, in part or in whole,
75
+ must be distributed entirely under this license, and must not be
76
+ distributed under any other license. The requirement for fonts to
77
+ remain under this license does not apply to any document created
78
+ using the Font Software.
79
+
80
+ TERMINATION
81
+ This license becomes null and void if any of the above conditions are
82
+ not met.
83
+
84
+ DISCLAIMER
85
+ THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
86
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
87
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
88
+ OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
89
+ COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
90
+ INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
91
+ DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
92
+ FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
93
+ OTHER DEALINGS IN THE FONT SOFTWARE.
@@ -0,0 +1,93 @@
1
+ Copyright 2010, 2012 Adobe Systems Incorporated (http://www.adobe.com/), with Reserved Font Name 'Source'. All Rights Reserved. Source is a trademark of Adobe Systems Incorporated in the United States and/or other countries.
2
+
3
+ This Font Software is licensed under the SIL Open Font License, Version 1.1.
4
+
5
+ This license is copied below, and is also available with a FAQ at: http://scripts.sil.org/OFL
6
+
7
+
8
+ -----------------------------------------------------------
9
+ SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
10
+ -----------------------------------------------------------
11
+
12
+ PREAMBLE
13
+ The goals of the Open Font License (OFL) are to stimulate worldwide
14
+ development of collaborative font projects, to support the font creation
15
+ efforts of academic and linguistic communities, and to provide a free and
16
+ open framework in which fonts may be shared and improved in partnership
17
+ with others.
18
+
19
+ The OFL allows the licensed fonts to be used, studied, modified and
20
+ redistributed freely as long as they are not sold by themselves. The
21
+ fonts, including any derivative works, can be bundled, embedded,
22
+ redistributed and/or sold with any software provided that any reserved
23
+ names are not used by derivative works. The fonts and derivatives,
24
+ however, cannot be released under any other type of license. The
25
+ requirement for fonts to remain under this license does not apply
26
+ to any document created using the fonts or their derivatives.
27
+
28
+ DEFINITIONS
29
+ "Font Software" refers to the set of files released by the Copyright
30
+ Holder(s) under this license and clearly marked as such. This may
31
+ include source files, build scripts and documentation.
32
+
33
+ "Reserved Font Name" refers to any names specified as such after the
34
+ copyright statement(s).
35
+
36
+ "Original Version" refers to the collection of Font Software components as
37
+ distributed by the Copyright Holder(s).
38
+
39
+ "Modified Version" refers to any derivative made by adding to, deleting,
40
+ or substituting -- in part or in whole -- any of the components of the
41
+ Original Version, by changing formats or by porting the Font Software to a
42
+ new environment.
43
+
44
+ "Author" refers to any designer, engineer, programmer, technical
45
+ writer or other person who contributed to the Font Software.
46
+
47
+ PERMISSION & CONDITIONS
48
+ Permission is hereby granted, free of charge, to any person obtaining
49
+ a copy of the Font Software, to use, study, copy, merge, embed, modify,
50
+ redistribute, and sell modified and unmodified copies of the Font
51
+ Software, subject to the following conditions:
52
+
53
+ 1) Neither the Font Software nor any of its individual components,
54
+ in Original or Modified Versions, may be sold by itself.
55
+
56
+ 2) Original or Modified Versions of the Font Software may be bundled,
57
+ redistributed and/or sold with any software, provided that each copy
58
+ contains the above copyright notice and this license. These can be
59
+ included either as stand-alone text files, human-readable headers or
60
+ in the appropriate machine-readable metadata fields within text or
61
+ binary files as long as those fields can be easily viewed by the user.
62
+
63
+ 3) No Modified Version of the Font Software may use the Reserved Font
64
+ Name(s) unless explicit written permission is granted by the corresponding
65
+ Copyright Holder. This restriction only applies to the primary font name as
66
+ presented to the users.
67
+
68
+ 4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
69
+ Software shall not be used to promote, endorse or advertise any
70
+ Modified Version, except to acknowledge the contribution(s) of the
71
+ Copyright Holder(s) and the Author(s) or with their explicit written
72
+ permission.
73
+
74
+ 5) The Font Software, modified or unmodified, in part or in whole,
75
+ must be distributed entirely under this license, and must not be
76
+ distributed under any other license. The requirement for fonts to
77
+ remain under this license does not apply to any document created
78
+ using the Font Software.
79
+
80
+ TERMINATION
81
+ This license becomes null and void if any of the above conditions are
82
+ not met.
83
+
84
+ DISCLAIMER
85
+ THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
86
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
87
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
88
+ OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
89
+ COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
90
+ INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
91
+ DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
92
+ FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
93
+ OTHER DEALINGS IN THE FONT SOFTWARE.
@@ -33,7 +33,12 @@ import {
33
33
  type CopyBlock,
34
34
  } from './copy-schema';
35
35
 
36
- export const copyCheckerVersion = 7;
36
+ // 8: receipts issued under premise verifier prompt 4. A receipt names its
37
+ // checker, and the checker names the verifier prompt it was issued under
38
+ // (assertCopyValidation), so a new verifier prompt is a new checker: 0.4.1
39
+ // moved the prompt and left this at 7, which read every earlier receipt as
40
+ // issued under the new prompt and refused it.
41
+ export const copyCheckerVersion = 8;
37
42
  // 4: the verifier refuses a comparison of two rates or counts
38
43
  // (unsupported_rate_comparison).
39
44
  export const premiseVerifierPromptVersion = 4;
@@ -1082,7 +1087,7 @@ const isStoredReceipt = (
1082
1087
  return isRecord(value);
1083
1088
  };
1084
1089
 
1085
- const isStoredProvenance = (value: unknown): value is CopyProvenance => {
1090
+ export const isStoredProvenance = (value: unknown): value is CopyProvenance => {
1086
1091
  return isRecord(value) && (value.kind === 'agent' || value.kind === 'human');
1087
1092
  };
1088
1093
 
@@ -1117,6 +1122,7 @@ export const assertCopyValidation = (args: {
1117
1122
  4: 2,
1118
1123
  5: 3,
1119
1124
  6: 3,
1125
+ 7: 3,
1120
1126
  [copyCheckerVersion]: premiseVerifierPromptVersion,
1121
1127
  };
1122
1128
  const verifierPromptVersion = receipt
@@ -13,7 +13,7 @@ import { canonicalDigest } from './json';
13
13
  export const toolId = 'literally-aeo';
14
14
  // The package version, recorded in every journal and bundle; the build and
15
15
  // version.spec.ts refuse a mismatch with package.json.
16
- export const toolVersion = '0.4.1';
16
+ export const toolVersion = '0.4.3';
17
17
  // Version 2: config.json may set chatProbes, and agentProbes.runsPerPrompt
18
18
  // above 2. A verifier that reads only version 1 then refuses the bundle as
19
19
  // unsupported instead of dropping its depth and failing it.