agentskeptic 0.1.4 → 0.1.6
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 +5 -3
- package/dist/bootstrap/bootstrapReadmeTemplate.d.ts +3 -0
- package/dist/bootstrap/bootstrapReadmeTemplate.d.ts.map +1 -0
- package/dist/bootstrap/bootstrapReadmeTemplate.js +17 -0
- package/dist/bootstrap/bootstrapReadmeTemplate.js.map +1 -0
- package/dist/bootstrap/parseBootstrapPackInput.d.ts +16 -0
- package/dist/bootstrap/parseBootstrapPackInput.d.ts.map +1 -0
- package/dist/bootstrap/parseBootstrapPackInput.js +95 -0
- package/dist/bootstrap/parseBootstrapPackInput.js.map +1 -0
- package/dist/bootstrap/parseBootstrapPackInput.test.d.ts +2 -0
- package/dist/bootstrap/parseBootstrapPackInput.test.d.ts.map +1 -0
- package/dist/bootstrap/parseBootstrapPackInput.test.js +46 -0
- package/dist/bootstrap/parseBootstrapPackInput.test.js.map +1 -0
- package/dist/bootstrap/runBootstrapSubcommand.d.ts +9 -0
- package/dist/bootstrap/runBootstrapSubcommand.d.ts.map +1 -0
- package/dist/bootstrap/runBootstrapSubcommand.js +263 -0
- package/dist/bootstrap/runBootstrapSubcommand.js.map +1 -0
- package/dist/bootstrap/synthesizeQuickInputFromOpenAiV1.d.ts +6 -0
- package/dist/bootstrap/synthesizeQuickInputFromOpenAiV1.d.ts.map +1 -0
- package/dist/bootstrap/synthesizeQuickInputFromOpenAiV1.js +16 -0
- package/dist/bootstrap/synthesizeQuickInputFromOpenAiV1.js.map +1 -0
- package/dist/cli.js +8 -0
- package/dist/cli.js.map +1 -1
- package/dist/cliOperationalCodes.d.ts +7 -0
- package/dist/cliOperationalCodes.d.ts.map +1 -1
- package/dist/cliOperationalCodes.js +7 -0
- package/dist/cliOperationalCodes.js.map +1 -1
- package/dist/commercial/licensePreflight.test.js +47 -18
- package/dist/commercial/licensePreflight.test.js.map +1 -1
- package/dist/debugServer.d.ts +2 -0
- package/dist/debugServer.d.ts.map +1 -1
- package/dist/debugServer.js +13 -12
- package/dist/debugServer.js.map +1 -1
- package/dist/debugServer.test.js +31 -2
- package/dist/debugServer.test.js.map +1 -1
- package/dist/discovery-payload-v1.json +46 -2
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/loadEvents.d.ts +2 -0
- package/dist/loadEvents.d.ts.map +1 -1
- package/dist/loadEvents.js +11 -0
- package/dist/loadEvents.js.map +1 -1
- package/dist/operationalDisposition.d.ts +56 -0
- package/dist/operationalDisposition.d.ts.map +1 -1
- package/dist/operationalDisposition.js +56 -0
- package/dist/operationalDisposition.js.map +1 -1
- package/dist/quickVerify/buildQuickContractEventsNdjson.d.ts +5 -0
- package/dist/quickVerify/buildQuickContractEventsNdjson.d.ts.map +1 -1
- package/dist/quickVerify/buildQuickContractEventsNdjson.js +27 -14
- package/dist/quickVerify/buildQuickContractEventsNdjson.js.map +1 -1
- package/dist/quickVerify/exportTool.d.ts +7 -1
- package/dist/quickVerify/exportTool.d.ts.map +1 -1
- package/dist/quickVerify/exportTool.js +26 -0
- package/dist/quickVerify/exportTool.js.map +1 -1
- package/dist/quickVerify/formatQuickVerifyHumanReport.js +1 -1
- package/dist/quickVerify/formatQuickVerifyHumanReport.js.map +1 -1
- package/dist/quickVerify/formatQuickVerifyHumanReport.test.js +2 -2
- package/dist/quickVerify/formatQuickVerifyHumanReport.test.js.map +1 -1
- package/dist/quickVerify/ingest.d.ts.map +1 -1
- package/dist/quickVerify/ingest.js +43 -0
- package/dist/quickVerify/ingest.js.map +1 -1
- package/dist/quickVerify/quickVerifyProductTruth.d.ts +5 -1
- package/dist/quickVerify/quickVerifyProductTruth.d.ts.map +1 -1
- package/dist/quickVerify/quickVerifyProductTruth.js +6 -0
- package/dist/quickVerify/quickVerifyProductTruth.js.map +1 -1
- package/dist/quickVerify/quickVerifyScope.d.ts +1 -1
- package/dist/quickVerify/quickVerifyScope.d.ts.map +1 -1
- package/dist/quickVerify/quickVerifyScope.js +1 -1
- package/dist/quickVerify/quickVerifyScope.js.map +1 -1
- package/dist/quickVerify/runQuickVerify.d.ts.map +1 -1
- package/dist/quickVerify/runQuickVerify.js +35 -8
- package/dist/quickVerify/runQuickVerify.js.map +1 -1
- package/dist/quickVerify/tableScoring.d.ts.map +1 -1
- package/dist/quickVerify/tableScoring.js +6 -1
- package/dist/quickVerify/tableScoring.js.map +1 -1
- package/dist/schemaLoad.d.ts +1 -1
- package/dist/schemaLoad.d.ts.map +1 -1
- package/dist/schemaLoad.js +2 -0
- package/dist/schemaLoad.js.map +1 -1
- package/dist/standardVerifyWorkflowCli.d.ts +5 -0
- package/dist/standardVerifyWorkflowCli.d.ts.map +1 -1
- package/dist/standardVerifyWorkflowCli.js +14 -7
- package/dist/standardVerifyWorkflowCli.js.map +1 -1
- package/package.json +16 -6
- package/schemas/bootstrap-pack-input-v1.schema.json +61 -0
- package/schemas/quick-verify-report.schema.json +2 -2
- package/scripts/discovery-acquisition.lib.cjs +42 -0
- package/scripts/discovery-payload.lib.cjs +5 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "agentskeptic",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.6",
|
|
4
4
|
"description": "Green agent traces and tool success flags often hide missing or wrong database rows. AgentSkeptic runs read-only SQL at verification time against persisted state vs structured tool activity—not chat narratives.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -18,13 +18,13 @@
|
|
|
18
18
|
"start": "npm run build && node scripts/demo.mjs",
|
|
19
19
|
"dev": "npm run dev -w agentskeptic-web",
|
|
20
20
|
"test:vitest": "vitest run",
|
|
21
|
-
"test:node:sqlite": "node --test --test-force-exit test/reconciler.sqlite.test.mjs test/pipeline.sqlite.test.mjs test/withWorkflowVerification.test.mjs test/workflowTruthReport.test.mjs test/cli.test.mjs test/stable-failure-consistency.test.mjs test/workflow-result-consumer-contract.test.mjs test/workflow-result-stdout-version.test.mjs test/docs-relational-ssot.test.mjs test/tools-registry-relational-surface.test.mjs test/docs-contract.test.mjs test/docs-commercial-enforce-gate-normative.test.mjs test/docs-remediation-doctrine.test.mjs test/bundle-signature-fixture.test.mjs test/bundle-signature-codes-doc.test.mjs test/bundle-signature-cli-write.test.mjs test/quick-verify.sqlite.test.mjs test/quickVerifyPostbuildGate.test.mjs test/npm-scripts-contract.test.mjs test/removed-script-names-ban.test.mjs test/docs-workflow-result-normative-prose.test.mjs test/enforce-oss-forbidden.test.mjs test/docs-enforce-stream-contract.test.mjs test/docs-quick-enforce-link.test.mjs test/commercial-pricing-policy-parity.test.mjs test/distribution-requirement-clauses.test.mjs test/distribution-traceability-literals.test.mjs test/distribution-ssot-clause-coverage.test.mjs test/distribution-consumer-pipeline.test.mjs test/discovery-payload.test.mjs test/redaction-rules.test.mjs test/indexable-guide-paths-fs.contract.test.mjs test/npm-pack-discovery-scripts.test.mjs test/registry-metadata-parity.test.mjs",
|
|
21
|
+
"test:node:sqlite": "node scripts/assert-dependency-security-pins.mjs && node --test --test-force-exit test/reconciler.sqlite.test.mjs test/pipeline.sqlite.test.mjs test/withWorkflowVerification.test.mjs test/workflowTruthReport.test.mjs test/cli.test.mjs test/stable-failure-consistency.test.mjs test/workflow-result-consumer-contract.test.mjs test/workflow-result-stdout-version.test.mjs test/docs-relational-ssot.test.mjs test/tools-registry-relational-surface.test.mjs test/docs-contract.test.mjs test/docs-commercial-enforce-gate-normative.test.mjs test/docs-remediation-doctrine.test.mjs test/bundle-signature-fixture.test.mjs test/bundle-signature-codes-doc.test.mjs test/bundle-signature-cli-write.test.mjs test/quick-verify.sqlite.test.mjs test/bootstrap-pack.test.mjs test/quickVerifyPostbuildGate.test.mjs test/npm-scripts-contract.test.mjs test/langgraph-reference-emitter-before-cli-spawn.test.mjs test/removed-script-names-ban.test.mjs test/docs-workflow-result-normative-prose.test.mjs test/enforce-oss-forbidden.test.mjs test/docs-enforce-stream-contract.test.mjs test/docs-quick-enforce-link.test.mjs test/commercial-pricing-policy-parity.test.mjs test/distribution-requirement-clauses.test.mjs test/distribution-traceability-literals.test.mjs test/distribution-ssot-clause-coverage.test.mjs test/distribution-consumer-pipeline.test.mjs test/discovery-payload.test.mjs test/redaction-rules.test.mjs test/indexable-guide-paths-fs.contract.test.mjs test/npm-pack-discovery-scripts.test.mjs test/registry-metadata-parity.test.mjs test/docs-related-exists-export-ssot-negative.mjs test/dependency-security-pins.schema.contract.test.mjs test/drizzle-identifier-safety.contract.test.mjs",
|
|
22
22
|
"test:postgres": "node scripts/pg-ci-init.mjs && node --test --test-force-exit test/postgres-session-readonly.test.mjs test/postgres-privilege.test.mjs test/pipeline.postgres.test.mjs test/ci-workflow-truth-postgres-contract.test.mjs test/quick-verify.postgres.test.mjs",
|
|
23
23
|
"test:workflow-truth-contract": "node --test --test-force-exit test/ci-workflow-truth-postgres-contract.test.mjs",
|
|
24
24
|
"validate-ttfv": "node scripts/validate-ttfv.mjs",
|
|
25
|
-
"test": "npm run build && npm run test:vitest && npm run test:node:sqlite && node scripts/first-run.mjs && npm run partner-quickstart && node test/partner-quickstart.adversarial.mjs && npm run check:partner-quickstart-ssot && node dist/cli.js assurance run --manifest examples/assurance/manifest.json && node scripts/commercial-enforce-test-harness.mjs && npm run build && npm run validate-ttfv",
|
|
25
|
+
"test": "npm run build && npm run test:vitest && npm run test:vitest -w agentskeptic-web -- __tests__/langgraph-reference-primacy.dom.test.tsx && npm run test:node:sqlite && node scripts/first-run.mjs && npm run partner-quickstart && node scripts/langgraph-reference-verify.mjs && node test/partner-quickstart.adversarial.mjs && npm run check:partner-quickstart-ssot && node dist/cli.js assurance run --manifest examples/assurance/manifest.json && node scripts/commercial-enforce-test-harness.mjs && npm run build && npm run validate-ttfv && node scripts/related-exists-export-user-outcome.mjs",
|
|
26
26
|
"test:debug-ui": "playwright test",
|
|
27
|
-
"test:ci": "npm run build && npm run test:vitest && npm run test:node:sqlite && node scripts/first-run.mjs && npm run partner-quickstart && node test/partner-quickstart.adversarial.mjs && npm run check:partner-quickstart-ssot && node dist/cli.js assurance run --manifest examples/assurance/manifest.json && npm run test:postgres && node scripts/run-partner-quickstart-postgres-ci.mjs && node scripts/commercial-enforce-test-harness.mjs --require-postgres && npx playwright install chromium && npm run test:debug-ui && npm run build && npm run validate-ttfv",
|
|
27
|
+
"test:ci": "npm run build && npm run test:vitest && npm run test:vitest -w agentskeptic-web -- __tests__/langgraph-reference-primacy.dom.test.tsx && npm run test:node:sqlite && node scripts/first-run.mjs && npm run partner-quickstart && node scripts/langgraph-reference-verify.mjs && node test/partner-quickstart.adversarial.mjs && npm run check:partner-quickstart-ssot && node dist/cli.js assurance run --manifest examples/assurance/manifest.json && npm run test:postgres && node scripts/run-partner-quickstart-postgres-ci.mjs && node scripts/commercial-enforce-test-harness.mjs --require-postgres && npx playwright install chromium && npm run test:debug-ui && npm run build && npm run validate-ttfv && node scripts/related-exists-export-user-outcome.mjs",
|
|
28
28
|
"example:workflow-hook": "npm run build && node examples/workflow-runner.mjs",
|
|
29
29
|
"agentskeptic": "node dist/cli.js",
|
|
30
30
|
"migrate:workflow-result-v11": "npm run build && node scripts/migrate-workflow-result-v11.mjs",
|
|
@@ -38,6 +38,7 @@
|
|
|
38
38
|
"sync:public-product-anchors": "node scripts/public-product-anchors.cjs",
|
|
39
39
|
"distribution:consumer-pipeline": "node scripts/distribution-consumer-pipeline.mjs",
|
|
40
40
|
"check:discovery-acquisition": "node scripts/validate-discovery-acquisition.mjs",
|
|
41
|
+
"verify:web-marketing-copy": "node scripts/validate-discovery-acquisition.mjs && node --test test/visitor-problem-outcome.test.mjs && npm run build -w agentskeptic-web && node scripts/run-website-vitest-with-reuse.mjs && node scripts/website-holistic-gate.mjs",
|
|
41
42
|
"check:public-product-anchors": "node scripts/public-product-anchors.cjs --check",
|
|
42
43
|
"test:commercial-layer": "node scripts/validate-commercial-funnel.mjs",
|
|
43
44
|
"build:website": "npm run build && npm run build -w agentskeptic-web",
|
|
@@ -52,21 +53,30 @@
|
|
|
52
53
|
"node": "22.x"
|
|
53
54
|
},
|
|
54
55
|
"devDependencies": {
|
|
56
|
+
"@lhci/cli": "0.15.1",
|
|
55
57
|
"@playwright/test": "^1.51.0",
|
|
56
58
|
"@types/node": "^22.10.2",
|
|
57
59
|
"@types/pg": "^8.20.0",
|
|
58
60
|
"@types/picomatch": "^4.0.3",
|
|
59
|
-
"ajv": "^8.17.1",
|
|
60
|
-
"ajv-formats": "^3.0.1",
|
|
61
61
|
"stripe": "^17.5.0",
|
|
62
62
|
"typescript": "^5.7.2",
|
|
63
63
|
"vitest": "^3.2.4"
|
|
64
64
|
},
|
|
65
65
|
"dependencies": {
|
|
66
|
+
"ajv": "^8.17.1",
|
|
67
|
+
"ajv-formats": "^3.0.1",
|
|
66
68
|
"pg": "^8.20.0",
|
|
67
69
|
"picomatch": "^4.0.4",
|
|
68
70
|
"yaml": "^2.8.3"
|
|
69
71
|
},
|
|
72
|
+
"overrides": {
|
|
73
|
+
"esbuild": "0.25.12",
|
|
74
|
+
"tmp": "0.2.4",
|
|
75
|
+
"cookie": "0.7.2",
|
|
76
|
+
"agentskeptic-web": {
|
|
77
|
+
"agentskeptic": "file:."
|
|
78
|
+
}
|
|
79
|
+
},
|
|
70
80
|
"repository": {
|
|
71
81
|
"type": "git",
|
|
72
82
|
"url": "git+https://github.com/jwekavanagh/agentskeptic.git"
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://agentskeptic.com/schemas/bootstrap-pack-input-v1.schema.json",
|
|
4
|
+
"title": "BootstrapPackInputV1",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"additionalProperties": false,
|
|
7
|
+
"required": ["schemaVersion", "workflowId", "openaiChatCompletion"],
|
|
8
|
+
"properties": {
|
|
9
|
+
"schemaVersion": { "type": "integer", "const": 1 },
|
|
10
|
+
"workflowId": {
|
|
11
|
+
"type": "string",
|
|
12
|
+
"pattern": "^[a-zA-Z0-9_-]{1,128}$"
|
|
13
|
+
},
|
|
14
|
+
"openaiChatCompletion": {
|
|
15
|
+
"type": "object",
|
|
16
|
+
"required": ["choices"],
|
|
17
|
+
"additionalProperties": true,
|
|
18
|
+
"properties": {
|
|
19
|
+
"choices": {
|
|
20
|
+
"type": "array",
|
|
21
|
+
"minItems": 1,
|
|
22
|
+
"items": {
|
|
23
|
+
"type": "object",
|
|
24
|
+
"required": ["message"],
|
|
25
|
+
"additionalProperties": true,
|
|
26
|
+
"properties": {
|
|
27
|
+
"message": {
|
|
28
|
+
"type": "object",
|
|
29
|
+
"required": ["tool_calls"],
|
|
30
|
+
"additionalProperties": true,
|
|
31
|
+
"properties": {
|
|
32
|
+
"tool_calls": {
|
|
33
|
+
"type": "array",
|
|
34
|
+
"items": {
|
|
35
|
+
"type": "object",
|
|
36
|
+
"required": ["id", "type", "function"],
|
|
37
|
+
"additionalProperties": false,
|
|
38
|
+
"properties": {
|
|
39
|
+
"id": { "type": "string", "minLength": 1 },
|
|
40
|
+
"type": { "type": "string", "const": "function" },
|
|
41
|
+
"function": {
|
|
42
|
+
"type": "object",
|
|
43
|
+
"required": ["name", "arguments"],
|
|
44
|
+
"additionalProperties": false,
|
|
45
|
+
"properties": {
|
|
46
|
+
"name": { "type": "string", "minLength": 1 },
|
|
47
|
+
"arguments": { "type": "string" }
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
}
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
"quick_verify_inferred_row_and_related_exists_only",
|
|
42
42
|
"no_multi_effect_contract",
|
|
43
43
|
"no_destructive_or_forbidden_row_contract",
|
|
44
|
-
"
|
|
44
|
+
"contract_replay_export_row_and_eligible_related_exists_tools"
|
|
45
45
|
]
|
|
46
46
|
},
|
|
47
47
|
"ingestContract": { "type": "string", "const": "structured_tool_activity" },
|
|
@@ -244,7 +244,7 @@
|
|
|
244
244
|
}
|
|
245
245
|
},
|
|
246
246
|
"quickVerifyProvisional": { "type": "boolean", "const": true },
|
|
247
|
-
"contractReplayPartialCoverage": { "type": "boolean"
|
|
247
|
+
"contractReplayPartialCoverage": { "type": "boolean" }
|
|
248
248
|
}
|
|
249
249
|
}
|
|
250
250
|
}
|
|
@@ -117,6 +117,39 @@ function validateIndexableGuides(discovery) {
|
|
|
117
117
|
}
|
|
118
118
|
}
|
|
119
119
|
|
|
120
|
+
/**
|
|
121
|
+
* @param {Record<string, unknown>} discovery
|
|
122
|
+
*/
|
|
123
|
+
function validateIndexableExamples(discovery) {
|
|
124
|
+
const ex = /** @type {{ path: string; navLabel: string; problemAnchor: string; embedKey: string }[]} */ (
|
|
125
|
+
discovery.indexableExamples
|
|
126
|
+
);
|
|
127
|
+
if (!Array.isArray(ex)) {
|
|
128
|
+
throw new Error("discovery-acquisition: indexableExamples must be an array");
|
|
129
|
+
}
|
|
130
|
+
if (ex.length !== 2) {
|
|
131
|
+
throw new Error("discovery-acquisition: indexableExamples must have length exactly 2");
|
|
132
|
+
}
|
|
133
|
+
if (ex[0].path !== "/examples/wf-complete" || ex[1].path !== "/examples/wf-missing") {
|
|
134
|
+
throw new Error(
|
|
135
|
+
"discovery-acquisition: indexableExamples paths must be /examples/wf-complete then /examples/wf-missing",
|
|
136
|
+
);
|
|
137
|
+
}
|
|
138
|
+
if (ex[0].embedKey !== "wf_complete" || ex[1].embedKey !== "wf_missing") {
|
|
139
|
+
throw new Error(
|
|
140
|
+
"discovery-acquisition: indexableExamples embedKey order must be wf_complete then wf_missing",
|
|
141
|
+
);
|
|
142
|
+
}
|
|
143
|
+
for (let i = 0; i < ex.length; i++) {
|
|
144
|
+
const row = ex[i];
|
|
145
|
+
const nl = String(row.navLabel);
|
|
146
|
+
const pa = String(row.problemAnchor);
|
|
147
|
+
if (nl.includes("`") || pa.includes("`")) {
|
|
148
|
+
throw new Error(`discovery-acquisition: indexableExamples[${i}] must not contain backtick`);
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
|
|
120
153
|
/**
|
|
121
154
|
* @param {string} baseLlms
|
|
122
155
|
* @param {Record<string, unknown>} discovery
|
|
@@ -136,6 +169,13 @@ function appendDiscoveryLlmsAppendix(baseLlms, discovery, canonicalOrigin) {
|
|
|
136
169
|
out += `- ${origin}${String(g.path)}\n`;
|
|
137
170
|
}
|
|
138
171
|
}
|
|
172
|
+
const examples = /** @type {{ path: string }[] | undefined} */ (discovery.indexableExamples);
|
|
173
|
+
if (Array.isArray(examples) && examples.length > 0) {
|
|
174
|
+
out += "\n## Indexable examples\n";
|
|
175
|
+
for (const ex of examples) {
|
|
176
|
+
out += `- ${origin}${String(ex.path)}\n`;
|
|
177
|
+
}
|
|
178
|
+
}
|
|
139
179
|
const demo = discovery.shareableTerminalDemo;
|
|
140
180
|
if (demo && typeof demo.title === "string" && typeof demo.transcript === "string") {
|
|
141
181
|
out += `\n## ${demo.title}\n\n\`\`\`text\n${demo.transcript}\n\`\`\`\n`;
|
|
@@ -182,6 +222,7 @@ function validateDiscoveryAcquisition(root) {
|
|
|
182
222
|
);
|
|
183
223
|
}
|
|
184
224
|
validateIndexableGuides(discovery);
|
|
225
|
+
validateIndexableExamples(discovery);
|
|
185
226
|
return discovery;
|
|
186
227
|
}
|
|
187
228
|
|
|
@@ -191,5 +232,6 @@ module.exports = {
|
|
|
191
232
|
appendDiscoveryLlmsAppendix,
|
|
192
233
|
validateDiscoveryAcquisition,
|
|
193
234
|
validateIndexableGuides,
|
|
235
|
+
validateIndexableExamples,
|
|
194
236
|
discoveryPaths,
|
|
195
237
|
};
|
|
@@ -125,6 +125,7 @@ function buildDiscoveryPayload(root) {
|
|
|
125
125
|
relatedQueries: llms.relatedQueries.map(String),
|
|
126
126
|
demandMoments: /** @type {string[]} */ (discovery.demandMoments).map(String),
|
|
127
127
|
indexableGuides: /** @type {unknown} */ (discovery.indexableGuides),
|
|
128
|
+
indexableExamples: /** @type {unknown} */ (discovery.indexableExamples),
|
|
128
129
|
shareableTerminalDemo: {
|
|
129
130
|
title: String(demo.title),
|
|
130
131
|
transcript: String(demo.transcript),
|
|
@@ -137,7 +138,7 @@ function buildDiscoveryPayload(root) {
|
|
|
137
138
|
* @param {Record<string, unknown>} payload
|
|
138
139
|
*/
|
|
139
140
|
function discoveryObjectFromAppendix(payload) {
|
|
140
|
-
const ap = /** @type {{ slug: string; visitorProblemAnswer: string; intentPhrases: string[]; notFor: string[]; relatedQueries: string[]; demandMoments: string[]; indexableGuides?: { path: string; navLabel: string; problemAnchor: string }[]; shareableTerminalDemo?: { title: string; transcript: string } }} */ (
|
|
141
|
+
const ap = /** @type {{ slug: string; visitorProblemAnswer: string; intentPhrases: string[]; notFor: string[]; relatedQueries: string[]; demandMoments: string[]; indexableGuides?: { path: string; navLabel: string; problemAnchor: string }[]; indexableExamples?: { path: string; navLabel: string; problemAnchor: string; embedKey: string }[]; shareableTerminalDemo?: { title: string; transcript: string } }} */ (
|
|
141
142
|
payload.appendix
|
|
142
143
|
);
|
|
143
144
|
const out = {
|
|
@@ -156,6 +157,9 @@ function discoveryObjectFromAppendix(payload) {
|
|
|
156
157
|
if (Array.isArray(ap.indexableGuides)) {
|
|
157
158
|
Object.assign(out, { indexableGuides: ap.indexableGuides });
|
|
158
159
|
}
|
|
160
|
+
if (Array.isArray(ap.indexableExamples)) {
|
|
161
|
+
Object.assign(out, { indexableExamples: ap.indexableExamples });
|
|
162
|
+
}
|
|
159
163
|
return out;
|
|
160
164
|
}
|
|
161
165
|
|