literally-aeo 0.2.1 → 0.2.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (90) hide show
  1. package/dist/cli.mjs +48 -21
  2. package/dist/lib/agents/author-validation.js +3 -1
  3. package/dist/lib/agents/copy-validation.js +1 -1
  4. package/dist/lib/agents/copywriter-input.js +1 -1
  5. package/dist/lib/agents/facts.js +1 -1
  6. package/dist/lib/agents/verifier.js +1 -1
  7. package/dist/lib/analysis/progress.js +2 -2
  8. package/dist/lib/bundle/contracts.js +1 -1
  9. package/dist/lib/bundle/export.js +8 -8
  10. package/dist/lib/bundle/journal.js +2 -2
  11. package/dist/lib/bundle/project-journal.js +5 -5
  12. package/dist/lib/bundle/project.js +6 -6
  13. package/dist/lib/bundle/read.js +9 -9
  14. package/dist/lib/bundle/recorder.js +3 -3
  15. package/dist/lib/bundle/redact.js +2 -2
  16. package/dist/lib/bundle/trace-coverage.js +2 -2
  17. package/dist/lib/bundle/verify-integrity.js +4 -4
  18. package/dist/lib/bundle/verify-measurement.js +2 -2
  19. package/dist/lib/bundle/verify-report.js +3 -3
  20. package/dist/lib/bundle/verify.js +8 -8
  21. package/dist/lib/checks/money-pages.js +13 -0
  22. package/dist/lib/checks/run-checks.js +4 -4
  23. package/dist/lib/chunks/{chunk-XAKME6NM.js → chunk-3CMPR6ZZ.js} +1 -1
  24. package/dist/lib/chunks/{chunk-VPXYGN4I.js → chunk-4GLW3ZRO.js} +14 -19
  25. package/dist/lib/chunks/{chunk-SD7LR26G.js → chunk-7DNLRXEY.js} +1 -1
  26. package/dist/lib/chunks/{chunk-E3OGPTUY.js → chunk-7YZPEX3T.js} +2 -2
  27. package/dist/lib/chunks/{chunk-SLAPBFRH.js → chunk-AT3XMGES.js} +4 -4
  28. package/dist/lib/chunks/{chunk-AK6YNTCV.js → chunk-BYHXNFWN.js} +1 -1
  29. package/dist/lib/chunks/{chunk-PXB4PWJI.js → chunk-EOO5RBUW.js} +2 -2
  30. package/dist/lib/chunks/chunk-FK2JQHAX.js +30 -0
  31. package/dist/lib/chunks/{chunk-MTDYBJXH.js → chunk-GLUGYZQO.js} +1 -1
  32. package/dist/lib/chunks/{chunk-QJZTDZMB.js → chunk-HCUJ2J7P.js} +5 -5
  33. package/dist/lib/chunks/{chunk-SMPP7B7F.js → chunk-HGGOGCPX.js} +4 -4
  34. package/dist/lib/chunks/{chunk-AJKV46SM.js → chunk-HGGRPOSA.js} +3 -3
  35. package/dist/lib/chunks/{chunk-3GPUCXVA.js → chunk-J7QKT5E7.js} +10 -10
  36. package/dist/lib/chunks/{chunk-FIC7JSR4.js → chunk-JYCVBFH5.js} +2 -2
  37. package/dist/lib/chunks/{chunk-RPTADJXD.js → chunk-KFAT65P7.js} +1 -1
  38. package/dist/lib/chunks/{chunk-DDS4G4DO.js → chunk-LTCDLURT.js} +3 -3
  39. package/dist/lib/chunks/{chunk-OQFAMKLN.js → chunk-OOLWU667.js} +1 -1
  40. package/dist/lib/chunks/{chunk-FL6LN2K6.js → chunk-PIF3GL62.js} +5 -5
  41. package/dist/lib/chunks/{chunk-W5X7WJYL.js → chunk-PIFTG6YW.js} +3 -3
  42. package/dist/lib/chunks/{chunk-JXBLGCXZ.js → chunk-PKNODC6Y.js} +1 -1
  43. package/dist/lib/chunks/{chunk-KSOHZKV5.js → chunk-QD3JXA3Y.js} +6 -6
  44. package/dist/lib/chunks/{chunk-YZEZRQIG.js → chunk-RIJERFGU.js} +1 -1
  45. package/dist/lib/chunks/{chunk-AAFHXNLU.js → chunk-S6QOXJAL.js} +3 -3
  46. package/dist/lib/chunks/{chunk-HI3PD3KR.js → chunk-T6XZQOXS.js} +5 -5
  47. package/dist/lib/chunks/{chunk-SQQ56UP2.js → chunk-UNCUG2YS.js} +1 -1
  48. package/dist/lib/chunks/{chunk-7LBSNDRR.js → chunk-VHKHYAC5.js} +20 -1
  49. package/dist/lib/chunks/{chunk-XNTFOVCE.js → chunk-VXYQWE45.js} +2 -2
  50. package/dist/lib/chunks/{chunk-R2AJYV6A.js → chunk-XA27KAUV.js} +1 -1
  51. package/dist/lib/chunks/{chunk-3OWJBGQE.js → chunk-XSER7WEB.js} +1 -1
  52. package/dist/lib/chunks/{chunk-T5XQ6NXD.js → chunk-YEUCAPKP.js} +1 -1
  53. package/dist/lib/chunks/{chunk-6JICXLDA.js → chunk-YGLWQFKL.js} +1 -1
  54. package/dist/lib/chunks/{chunk-66DVMLGR.js → chunk-ZOGIJGU3.js} +1 -1
  55. package/dist/lib/cli/bundle-commands.js +27 -26
  56. package/dist/lib/cli/run-commands.js +31 -30
  57. package/dist/lib/cli/status-command.js +16 -15
  58. package/dist/lib/codex-workflow/author.js +4 -3
  59. package/dist/lib/codex-workflow/capture.js +2 -2
  60. package/dist/lib/codex-workflow/copy-editor.js +1 -1
  61. package/dist/lib/codex-workflow/copy.js +1 -1
  62. package/dist/lib/codex-workflow/finish.js +1 -1
  63. package/dist/lib/codex-workflow/loop.js +10 -9
  64. package/dist/lib/codex-workflow/run-source.js +5 -5
  65. package/dist/lib/codex-workflow/stage.js +5 -4
  66. package/dist/lib/engine/audit-file.js +4 -3
  67. package/dist/lib/engine/author.js +11 -10
  68. package/dist/lib/engine/local-run.js +15 -14
  69. package/dist/lib/engine/preflight.js +2 -2
  70. package/dist/lib/engine/rejudge.js +21 -20
  71. package/dist/lib/engine/run-status.js +16 -15
  72. package/dist/lib/engine/templates.js +5 -4
  73. package/dist/lib/grounding/grounding-runtime.js +5 -5
  74. package/dist/lib/grounding/recorded-tools.js +4 -4
  75. package/dist/lib/models/supported-models.js +1 -1
  76. package/dist/lib/pipeline.js +1 -1
  77. package/dist/lib/probes/probes.js +1 -1
  78. package/dist/lib/stores/files.js +3 -3
  79. package/dist/lib/stores/memory.js +1 -1
  80. package/dist/lib/stores/publication.js +1 -1
  81. package/dist/lib/viewer/server.js +9 -9
  82. package/dist/types/bundle/contracts.d.ts +1 -1
  83. package/dist/types/checks/money-pages.d.ts +19 -0
  84. package/package.json +1 -1
  85. package/src/agents/author-validation.ts +22 -1
  86. package/src/bundle/contracts.ts +1 -1
  87. package/src/checks/money-pages.ts +48 -0
  88. package/src/engine/audit-file.ts +20 -30
  89. package/src/models/supported-models.ts +3 -3
  90. package/dist/lib/chunks/{chunk-JYFEXVWC.js → chunk-R5UPOEWE.js} +3 -3
@@ -1,11 +1,11 @@
1
1
  import {
2
2
  startViewer
3
- } from "../chunks/chunk-XNTFOVCE.js";
3
+ } from "../chunks/chunk-VXYQWE45.js";
4
4
  import "../chunks/chunk-ZXQPD4OC.js";
5
- import "../chunks/chunk-HI3PD3KR.js";
6
- import "../chunks/chunk-AJKV46SM.js";
7
- import "../chunks/chunk-66DVMLGR.js";
8
- import "../chunks/chunk-SD7LR26G.js";
5
+ import "../chunks/chunk-T6XZQOXS.js";
6
+ import "../chunks/chunk-HGGRPOSA.js";
7
+ import "../chunks/chunk-ZOGIJGU3.js";
8
+ import "../chunks/chunk-7DNLRXEY.js";
9
9
  import "../chunks/chunk-MENTBQGB.js";
10
10
  import "../chunks/chunk-I3UE52ZV.js";
11
11
  import "../chunks/chunk-K4Y5NT4M.js";
@@ -14,11 +14,11 @@ import "../chunks/chunk-6KHQ7DXP.js";
14
14
  import "../chunks/chunk-RXSHKWZJ.js";
15
15
  import "../chunks/chunk-SIJOQRRK.js";
16
16
  import "../chunks/chunk-SREGO3PU.js";
17
- import "../chunks/chunk-AK6YNTCV.js";
18
- import "../chunks/chunk-JXBLGCXZ.js";
17
+ import "../chunks/chunk-BYHXNFWN.js";
18
+ import "../chunks/chunk-PKNODC6Y.js";
19
19
  import "../chunks/chunk-W46Y7KBR.js";
20
20
  import "../chunks/chunk-2QLAFBCG.js";
21
- import "../chunks/chunk-T5XQ6NXD.js";
21
+ import "../chunks/chunk-YEUCAPKP.js";
22
22
  import "../chunks/chunk-JKPBXPCW.js";
23
23
  import "../chunks/chunk-7O3M6I2X.js";
24
24
  import "../chunks/chunk-E6NQQU6V.js";
@@ -38,10 +38,10 @@ import "../chunks/chunk-KQCRJIEG.js";
38
38
  import "../chunks/chunk-JQ3P552S.js";
39
39
  import "../chunks/chunk-7YDXD4MD.js";
40
40
  import "../chunks/chunk-N2XIGMJ6.js";
41
- import "../chunks/chunk-HOJXKHPX.js";
42
41
  import "../chunks/chunk-ESEMYWUH.js";
43
42
  import "../chunks/chunk-NL2LDKXX.js";
44
43
  import "../chunks/chunk-H2KDLDK6.js";
44
+ import "../chunks/chunk-HOJXKHPX.js";
45
45
  import "../chunks/chunk-QTXOW5XC.js";
46
46
  import "../chunks/chunk-DL6YQDTE.js";
47
47
  import "../chunks/chunk-BFWK3TBN.js";
@@ -1,6 +1,6 @@
1
1
  import { z } from 'zod';
2
2
  export declare const toolId = "literally-aeo";
3
- export declare const toolVersion = "0.2.1";
3
+ export declare const toolVersion = "0.2.2";
4
4
  export declare const bundleSchemaVersion = 2;
5
5
  export declare const readableBundleSchemaVersions: readonly number[];
6
6
  export declare const traceSchemaVersion = 1;
@@ -0,0 +1,19 @@
1
+ export declare const maxMoneyPages = 20;
2
+ /** Why a money page is refused: another site's page, or a URL the guard
3
+ * would never fetch. Each caller words the remedy its own input offers. */
4
+ export type MoneyPageProblem = {
5
+ kind: 'off_site';
6
+ } | {
7
+ kind: 'unsafe_url';
8
+ message: string;
9
+ };
10
+ /**
11
+ * moneyPageProblem says why the site checks may not fetch a page, or
12
+ * undefined when they may. The page must be on the brand's site or its
13
+ * subdomains (or on a host the operator allowed), and public https with no
14
+ * port or credentials.
15
+ */
16
+ export declare const moneyPageProblem: (page: string, site: {
17
+ domain: string;
18
+ checkHosts?: readonly string[];
19
+ }) => MoneyPageProblem | undefined;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "literally-aeo",
3
- "version": "0.2.1",
3
+ "version": "0.2.2",
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",
@@ -1,6 +1,7 @@
1
1
  import { aeoAuditConfigSchema, type AeoAuditConfig } from '../schema';
2
2
  import { normalizeDomain } from '../analysis/scoring';
3
3
  import banlist from '../author/banlist.json';
4
+ import { maxMoneyPages, moneyPageProblem } from '../checks/money-pages';
4
5
  import { canonicalResearchUrl, fetchGroundingSource } from '../grounding/fetch';
5
6
  import { SourceRetrievalError } from '../grounding/guarded-request';
6
7
  import { credentialDetected } from './credentials';
@@ -277,7 +278,9 @@ export const validateAuthorOutput = async (args: {
277
278
 
278
279
  if (
279
280
  !underHost(normalizeDomain(config.brand.domain), host) ||
280
- config.moneyPages.some((url) => !underHost(normalizeDomain(url), host)) ||
281
+ config.moneyPages.some(
282
+ (url) => moneyPageProblem(url, { domain: host })?.kind === 'off_site',
283
+ ) ||
281
284
  competitors.some((competitor) =>
282
285
  args.protectedClientHosts.some((client) =>
283
286
  underHost(normalizeDomain(competitor.domain), normalizeDomain(client)),
@@ -293,6 +296,24 @@ export const validateAuthorOutput = async (args: {
293
296
  };
294
297
  }
295
298
 
299
+ // The site checks fetch and render every money page: a page the guard
300
+ // would refuse, or more than it may fetch, is the author's to repair.
301
+ config.moneyPages.forEach((url, index) => {
302
+ const problem = moneyPageProblem(url, { domain: host });
303
+
304
+ if (problem?.kind === 'unsafe_url') {
305
+ errors.push(
306
+ `moneyPages.${index}: Use a public https URL with no port or credentials (${problem.message})`,
307
+ );
308
+ }
309
+ });
310
+
311
+ if (config.moneyPages.length > maxMoneyPages) {
312
+ errors.push(
313
+ `moneyPages: Keep the ${maxMoneyPages} pages that matter most; the site checks fetch at most ${maxMoneyPages}.`,
314
+ );
315
+ }
316
+
296
317
  // Repairable only once the submission is the right company's: a wrong
297
318
  // host with one attributed claim must not spend a repair session first.
298
319
  notes.data.proposedFacts.forEach((fact, index) => {
@@ -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.2.1';
16
+ export const toolVersion = '0.2.2';
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.
@@ -0,0 +1,48 @@
1
+ import {
2
+ SourceRetrievalError,
3
+ validateResearchUrl,
4
+ } from '../grounding/guarded-request';
5
+ import { urlIsOnDomain } from '../report/core/domain-match';
6
+
7
+ // ============================================================================
8
+ // Which money pages the site checks may fetch and render
9
+ // (specs/aeo-checks-and-reach-spec.md §3.3). One rule for every place a
10
+ // config is admitted: audit.json, the author's output and the hosted
11
+ // platform. The verifier never applies it: stored bundles keep verifying.
12
+ // ============================================================================
13
+
14
+ export const maxMoneyPages = 20;
15
+
16
+ /** Why a money page is refused: another site's page, or a URL the guard
17
+ * would never fetch. Each caller words the remedy its own input offers. */
18
+ export type MoneyPageProblem =
19
+ { kind: 'off_site' } | { kind: 'unsafe_url'; message: string };
20
+
21
+ /**
22
+ * moneyPageProblem says why the site checks may not fetch a page, or
23
+ * undefined when they may. The page must be on the brand's site or its
24
+ * subdomains (or on a host the operator allowed), and public https with no
25
+ * port or credentials.
26
+ */
27
+ export const moneyPageProblem = (
28
+ page: string,
29
+ site: { domain: string; checkHosts?: readonly string[] },
30
+ ): MoneyPageProblem | undefined => {
31
+ const hosts = [site.domain, ...(site.checkHosts ?? [])];
32
+
33
+ if (!hosts.some((host) => urlIsOnDomain(page, host))) {
34
+ return { kind: 'off_site' };
35
+ }
36
+
37
+ try {
38
+ validateResearchUrl(page);
39
+ } catch (err) {
40
+ if (err instanceof SourceRetrievalError) {
41
+ return { kind: 'unsafe_url', message: err.message };
42
+ }
43
+
44
+ throw err;
45
+ }
46
+
47
+ return undefined;
48
+ };
@@ -1,5 +1,10 @@
1
1
  import { readFile } from 'node:fs/promises';
2
2
  import { z } from 'zod';
3
+ import {
4
+ maxMoneyPages,
5
+ moneyPageProblem,
6
+ type MoneyPageProblem,
7
+ } from '../checks/money-pages';
3
8
  import {
4
9
  SourceRetrievalError,
5
10
  validateResearchUrl,
@@ -9,7 +14,6 @@ import { localModelProfile } from '../models/local-profile';
9
14
  import { resolveSupportedModel } from '../models/supported-models';
10
15
  import { resolveDataForSeoLocale } from '../probes/dataforseo-locale';
11
16
  import { probeLimitsSchema } from '../probes/limits';
12
- import { urlIsOnDomain } from '../report/core/domain-match';
13
17
  import {
14
18
  aeoAuditConfigSchema,
15
19
  aeoSurfaceSchema,
@@ -114,35 +118,18 @@ const checkHostProblem = (host: string): string | undefined => {
114
118
  return `Use a bare public host name such as docs.acme.example, not ${JSON.stringify(host)}.`;
115
119
  };
116
120
 
117
- /**
118
- * Why a money page is refused. The site checks fetch and render it, so it
119
- * must be public https on the brand's site or its subdomains, or on a host
120
- * the operator named in runPolicy.checkHosts.
121
- */
122
- const moneyPageProblem = (
121
+ /** A refused money page in audit.json's terms: checkHosts is the remedy
122
+ * for a page on another site. */
123
+ const describeMoneyPageProblem = (
123
124
  page: string,
124
- file: {
125
- brand: { domain: string };
126
- runPolicy: { checkHosts: readonly string[] };
127
- },
128
- ): string | undefined => {
129
- try {
130
- validateResearchUrl(page);
131
- } catch (err) {
132
- if (err instanceof SourceRetrievalError) {
133
- return `A money page must be a public https URL with no port or credentials: ${err.message}`;
134
- }
135
-
136
- throw err;
125
+ domain: string,
126
+ problem: MoneyPageProblem,
127
+ ): string => {
128
+ if (problem.kind === 'unsafe_url') {
129
+ return `A money page must be a public https URL with no port or credentials: ${problem.message}`;
137
130
  }
138
131
 
139
- const hosts = [file.brand.domain, ...file.runPolicy.checkHosts];
140
-
141
- if (hosts.some((host) => urlIsOnDomain(page, host))) {
142
- return undefined;
143
- }
144
-
145
- return `${page} is not on ${file.brand.domain} or its subdomains. Name its host in runPolicy.checkHosts to let the site checks fetch it.`;
132
+ return `${page} is not on ${domain} or its subdomains. Name its host in runPolicy.checkHosts to let the site checks fetch it.`;
146
133
  };
147
134
 
148
135
  export const auditFileSchema = z
@@ -167,7 +154,7 @@ export const auditFileSchema = z
167
154
  chatProbes: chatProbeConfigSchema.optional(),
168
155
  geography: z.string().default('us'),
169
156
  language: z.string().default('en'),
170
- moneyPages: z.array(z.url()).max(20).default([]),
157
+ moneyPages: z.array(z.url()).max(maxMoneyPages).default([]),
171
158
  productBrief: z.string().trim().min(1),
172
159
  // `full` researches and adjudicates the claims answers make about the
173
160
  // product; `extraction_only` keeps the claim inventory and skips both.
@@ -201,12 +188,15 @@ export const auditFileSchema = z
201
188
  }
202
189
 
203
190
  for (const [index, page] of file.moneyPages.entries()) {
204
- const problem = moneyPageProblem(page, file);
191
+ const problem = moneyPageProblem(page, {
192
+ domain: file.brand.domain,
193
+ checkHosts: file.runPolicy.checkHosts,
194
+ });
205
195
 
206
196
  if (problem !== undefined) {
207
197
  context.addIssue({
208
198
  code: 'custom',
209
- message: problem,
199
+ message: describeMoneyPageProblem(page, file.brand.domain, problem),
210
200
  path: ['moneyPages', index],
211
201
  });
212
202
  }
@@ -42,7 +42,7 @@ export const supportedModels: readonly SupportedModel[] = [
42
42
  id: 'anthropic/claude-opus-5.5',
43
43
  label: 'Claude Opus 5.5',
44
44
  pricingUsdPerMillion: { input: 4, output: 20, cachedInput: 0.2 },
45
- pricingCheckedAt: '2026-11-04',
45
+ pricingCheckedAt: '2026-11-08',
46
46
  contextWindow: 1_000_000,
47
47
  maxOutputTokens: 128_000,
48
48
  thinkingInOutput: true,
@@ -53,8 +53,8 @@ export const supportedModels: readonly SupportedModel[] = [
53
53
  {
54
54
  id: 'anthropic/claude-sonnet-5.5',
55
55
  label: 'Claude Sonnet 5.5',
56
- pricingUsdPerMillion: { input: 2, output: 10, cachedInput: 0.2 },
57
- pricingCheckedAt: '2026-11-04',
56
+ pricingUsdPerMillion: { input: 2, output: 10, cachedInput: 0.1 },
57
+ pricingCheckedAt: '2026-11-08',
58
58
  contextWindow: 1_000_000,
59
59
  maxOutputTokens: 128_000,
60
60
  thinkingInOutput: true,
@@ -5,12 +5,12 @@ import {
5
5
  import {
6
6
  plannedProbeUnitsForSection
7
7
  } from "./chunk-7YDXD4MD.js";
8
- import {
9
- isDomainCited
10
- } from "./chunk-HOJXKHPX.js";
11
8
  import {
12
9
  contentHash
13
10
  } from "./chunk-H2KDLDK6.js";
11
+ import {
12
+ isDomainCited
13
+ } from "./chunk-HOJXKHPX.js";
14
14
  import {
15
15
  normalizeDomain
16
16
  } from "./chunk-QTXOW5XC.js";