agentskeptic 1.0.4 → 1.2.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 +15 -17
- package/config/marketing.json +186 -0
- package/dist/actionableFailure.d.ts.map +1 -1
- package/dist/actionableFailure.js +80 -0
- package/dist/actionableFailure.js.map +1 -1
- package/dist/assurance/buildAssuranceOutput.d.ts +29 -0
- package/dist/assurance/buildAssuranceOutput.d.ts.map +1 -0
- package/dist/assurance/buildAssuranceOutput.js +53 -0
- package/dist/assurance/buildAssuranceOutput.js.map +1 -0
- package/dist/assurance/checkStale.d.ts +7 -0
- package/dist/assurance/checkStale.d.ts.map +1 -1
- package/dist/assurance/checkStale.js +14 -3
- package/dist/assurance/checkStale.js.map +1 -1
- package/dist/assurance/runAssurance.d.ts.map +1 -1
- package/dist/assurance/runAssurance.js +26 -3
- package/dist/assurance/runAssurance.js.map +1 -1
- package/dist/bootstrap/executeBootstrapPack.d.ts.map +1 -1
- package/dist/bootstrap/executeBootstrapPack.js +3 -2
- package/dist/bootstrap/executeBootstrapPack.js.map +1 -1
- package/dist/cli/lockOrchestration.js +1 -1
- package/dist/cli/runFunnelAnonSet.js +1 -1
- package/dist/cli.js +37 -5
- package/dist/cli.js.map +1 -1
- package/dist/cliArgv.d.ts.map +1 -1
- package/dist/cliArgv.js +4 -2
- package/dist/cliArgv.js.map +1 -1
- package/dist/cliOperationalCodes.d.ts +1 -0
- package/dist/cliOperationalCodes.d.ts.map +1 -1
- package/dist/cliOperationalCodes.js +1 -0
- package/dist/cliOperationalCodes.js.map +1 -1
- package/dist/commercial/licensePreflight.d.ts.map +1 -1
- package/dist/commercial/licensePreflight.js.map +1 -1
- package/dist/commercial/verifyWorkloadClassify.d.ts +2 -7
- package/dist/commercial/verifyWorkloadClassify.d.ts.map +1 -1
- package/dist/commercial/verifyWorkloadClassify.js +1 -1
- package/dist/commercial/verifyWorkloadClassify.js.map +1 -1
- package/dist/commercial/verifyWorkloadClassify.test.js +7 -0
- package/dist/commercial/verifyWorkloadClassify.test.js.map +1 -1
- package/dist/crossing/crossingDecisionReadyFooter.d.ts +1 -1
- package/dist/crossing/crossingDecisionReadyFooter.d.ts.map +1 -1
- package/dist/crossing/crossingDecisionReadyFooter.js +1 -1
- package/dist/crossing/crossingDecisionReadyFooter.js.map +1 -1
- package/dist/debug-ui/app.css +42 -0
- package/dist/debug-ui/app.js +202 -12
- package/dist/debug-ui/index.html +11 -4
- package/dist/debug-ui/urlState.d.ts +15 -0
- package/dist/debug-ui/urlState.js +92 -0
- package/dist/debugCorpus.test.js +33 -7
- package/dist/debugCorpus.test.js.map +1 -1
- package/dist/debugServer.js +1 -1
- package/dist/debugServer.js.map +1 -1
- package/dist/debugServer.test.js +12 -6
- package/dist/debugServer.test.js.map +1 -1
- package/dist/debugUiUrlState.test.d.ts +2 -0
- package/dist/debugUiUrlState.test.d.ts.map +1 -0
- package/dist/debugUiUrlState.test.js +49 -0
- package/dist/debugUiUrlState.test.js.map +1 -0
- package/dist/decisionGate.d.ts.map +1 -1
- package/dist/decisionGate.js +2 -5
- package/dist/decisionGate.js.map +1 -1
- package/dist/discovery-payload-v1.json +23 -27
- package/dist/failureOriginCatalog.d.ts.map +1 -1
- package/dist/failureOriginCatalog.js +16 -0
- package/dist/failureOriginCatalog.js.map +1 -1
- package/dist/firstFiveMinutesChecklist.d.ts +11 -0
- package/dist/firstFiveMinutesChecklist.d.ts.map +1 -0
- package/dist/firstFiveMinutesChecklist.js +18 -0
- package/dist/firstFiveMinutesChecklist.js.map +1 -0
- package/dist/funnel/workflowLineageClassify.d.ts +1 -1
- package/dist/funnel/workflowLineageClassify.js +1 -1
- package/dist/langGraphCheckpointTrustGate.d.ts.map +1 -1
- package/dist/langGraphCheckpointTrustGate.js +2 -5
- package/dist/langGraphCheckpointTrustGate.js.map +1 -1
- package/dist/operationalDisposition.d.ts +8 -0
- package/dist/operationalDisposition.d.ts.map +1 -1
- package/dist/operationalDisposition.js +8 -0
- package/dist/operationalDisposition.js.map +1 -1
- package/dist/pipeline.d.ts +1 -0
- package/dist/pipeline.d.ts.map +1 -1
- package/dist/pipeline.js +18 -18
- package/dist/pipeline.js.map +1 -1
- package/dist/publicDistribution.generated.d.ts +2 -2
- package/dist/publicDistribution.generated.d.ts.map +1 -1
- package/dist/publicDistribution.generated.js +7 -8
- package/dist/publicDistribution.generated.js.map +1 -1
- package/dist/quickVerify/runQuickVerify.js +1 -1
- package/dist/quickVerify/runQuickVerify.js.map +1 -1
- package/dist/quickVerify/verifyExecution.d.ts +1 -1
- package/dist/quickVerify/verifyExecution.d.ts.map +1 -1
- package/dist/quickVerify/verifyExecution.js +3 -2
- package/dist/quickVerify/verifyExecution.js.map +1 -1
- package/dist/reconciler.d.ts +6 -2
- package/dist/reconciler.d.ts.map +1 -1
- package/dist/reconciler.js +17 -11
- package/dist/reconciler.js.map +1 -1
- package/dist/registryDraft/createRegistryDraftAjv.d.ts +1 -1
- package/dist/registryDraft/createRegistryDraftAjv.js +1 -1
- package/dist/relationalInvariant.d.ts +13 -3
- package/dist/relationalInvariant.d.ts.map +1 -1
- package/dist/relationalInvariant.existsSql.test.js +1 -1
- package/dist/relationalInvariant.existsSql.test.js.map +1 -1
- package/dist/relationalInvariant.js +59 -39
- package/dist/relationalInvariant.js.map +1 -1
- package/dist/relationalInvariant.test.js +2 -2
- package/dist/relationalInvariant.test.js.map +1 -1
- package/dist/resolveExpectation.d.ts +18 -2
- package/dist/resolveExpectation.d.ts.map +1 -1
- package/dist/resolveExpectation.js +332 -1
- package/dist/resolveExpectation.js.map +1 -1
- package/dist/resolveExpectation.test.js +25 -0
- package/dist/resolveExpectation.test.js.map +1 -1
- package/dist/runComparison.d.ts.map +1 -1
- package/dist/runComparison.js +18 -3
- package/dist/runComparison.js.map +1 -1
- package/dist/schema-validation.test.js +29 -0
- package/dist/schema-validation.test.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/sqlDialect.d.ts +8 -0
- package/dist/sqlDialect.d.ts.map +1 -0
- package/dist/sqlDialect.js +37 -0
- package/dist/sqlDialect.js.map +1 -0
- package/dist/stateWitness.d.ts +4 -0
- package/dist/stateWitness.d.ts.map +1 -0
- package/dist/stateWitness.js +383 -0
- package/dist/stateWitness.js.map +1 -0
- package/dist/stateWitness.test.d.ts +2 -0
- package/dist/stateWitness.test.d.ts.map +1 -0
- package/dist/stateWitness.test.js +120 -0
- package/dist/stateWitness.test.js.map +1 -0
- package/dist/telemetry/ossClaimOrigin.d.ts +1 -1
- package/dist/telemetry/ossClaimOrigin.js +1 -1
- package/dist/telemetry/verificationHypothesisContract.d.ts +1 -1
- package/dist/telemetry/verificationHypothesisContract.js +1 -1
- package/dist/types.d.ts +105 -2
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js.map +1 -1
- package/dist/verificationConnections.d.ts +10 -0
- package/dist/verificationConnections.d.ts.map +1 -0
- package/dist/verificationConnections.js +190 -0
- package/dist/verificationConnections.js.map +1 -0
- package/dist/verificationDatabaseUrl.d.ts +11 -0
- package/dist/verificationDatabaseUrl.d.ts.map +1 -0
- package/dist/verificationDatabaseUrl.js +41 -0
- package/dist/verificationDatabaseUrl.js.map +1 -0
- package/dist/verificationDatabaseUrl.test.d.ts +2 -0
- package/dist/verificationDatabaseUrl.test.d.ts.map +1 -0
- package/dist/verificationDatabaseUrl.test.js +66 -0
- package/dist/verificationDatabaseUrl.test.js.map +1 -0
- package/dist/verificationDiagnostics.d.ts.map +1 -1
- package/dist/verificationDiagnostics.js +29 -8
- package/dist/verificationDiagnostics.js.map +1 -1
- package/dist/verificationDiagnostics.test.js +15 -0
- package/dist/verificationDiagnostics.test.js.map +1 -1
- package/dist/verificationPolicy.d.ts +2 -1
- package/dist/verificationPolicy.d.ts.map +1 -1
- package/dist/verificationPolicy.js +84 -0
- package/dist/verificationPolicy.js.map +1 -1
- package/dist/verificationPolicy.test.js +7 -0
- package/dist/verificationPolicy.test.js.map +1 -1
- package/dist/verificationUserPhrases.d.ts.map +1 -1
- package/dist/verificationUserPhrases.js +18 -0
- package/dist/verificationUserPhrases.js.map +1 -1
- package/dist/vitestMonorepoRoot.d.ts +10 -0
- package/dist/vitestMonorepoRoot.d.ts.map +1 -0
- package/dist/vitestMonorepoRoot.js +97 -0
- package/dist/vitestMonorepoRoot.js.map +1 -0
- package/dist/wireReasonCodes.d.ts +18 -0
- package/dist/wireReasonCodes.d.ts.map +1 -1
- package/dist/wireReasonCodes.js +18 -0
- package/dist/wireReasonCodes.js.map +1 -1
- package/package.json +29 -34
- package/schemas/assurance-output-v1.schema.json +81 -0
- package/schemas/openapi-commercial-v1.in.yaml +36 -3
- package/schemas/openapi-commercial-v1.yaml +37 -4
- package/schemas/tools-registry.schema.json +103 -0
- package/schemas/workflow-engine-result.schema.json +69 -1
- package/schemas/workflow-truth-report.schema.json +12 -0
- package/scripts/discovery-acquisition.lib.cjs +6 -17
- package/scripts/discovery-payload.lib.cjs +5 -3
- package/scripts/emit-primary-marketing.cjs +326 -0
- package/scripts/origin.cjs +52 -0
- package/scripts/public-product-anchors.cjs +3 -0
- package/scripts/validate-marketing.cjs +156 -0
|
@@ -0,0 +1,156 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
const { readFileSync } = require("node:fs");
|
|
4
|
+
const { join } = require("node:path");
|
|
5
|
+
|
|
6
|
+
const BANNED = /\b(crossing success|PatternComplete|IntegrateSpine|Outcome Certificate|AC-)\b/i;
|
|
7
|
+
|
|
8
|
+
const URL_IN_TEXT = /https?:\/\/[^[\s<>"')]+/gi;
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* True if the string contains a URL whose host is GitHub (github.com or a subdomain).
|
|
12
|
+
* Uses URL parsing so substrings like "evil.com/.../github.com" do not false-positive.
|
|
13
|
+
* @param {string} s
|
|
14
|
+
*/
|
|
15
|
+
function textContainsGithubHostUrl(s) {
|
|
16
|
+
for (const m of s.matchAll(URL_IN_TEXT)) {
|
|
17
|
+
try {
|
|
18
|
+
const { hostname } = new URL(m[0]);
|
|
19
|
+
if (hostname === "github.com" || hostname.endsWith(".github.com")) {
|
|
20
|
+
return true;
|
|
21
|
+
}
|
|
22
|
+
} catch {
|
|
23
|
+
// ignore invalid URL fragments
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
return false;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* @param {string} root
|
|
31
|
+
*/
|
|
32
|
+
function loadMarketing(root) {
|
|
33
|
+
const p = join(root, "config", "marketing.json");
|
|
34
|
+
return JSON.parse(readFileSync(p, "utf8"));
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* @param {string} s
|
|
39
|
+
*/
|
|
40
|
+
function wordCount(s) {
|
|
41
|
+
return String(s)
|
|
42
|
+
.trim()
|
|
43
|
+
.split(/\s+/)
|
|
44
|
+
.filter(Boolean).length;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
* @param {Record<string, unknown>} m
|
|
49
|
+
*/
|
|
50
|
+
function validateMarketingValue(m) {
|
|
51
|
+
if (m.schemaVersion !== 1) {
|
|
52
|
+
throw new Error("marketing: schemaVersion must be 1");
|
|
53
|
+
}
|
|
54
|
+
const required = [
|
|
55
|
+
"slug",
|
|
56
|
+
"identityOneLiner",
|
|
57
|
+
"productionCanonicalOrigin",
|
|
58
|
+
"gitRepositoryUrl",
|
|
59
|
+
"gitRepositoryGitUrl",
|
|
60
|
+
"npmPackageUrl",
|
|
61
|
+
"bugsUrl",
|
|
62
|
+
"keywords",
|
|
63
|
+
"heroTitle",
|
|
64
|
+
"heroSubtitle",
|
|
65
|
+
"visitorProblemAnswer",
|
|
66
|
+
"heroOutcome",
|
|
67
|
+
"heroMechanism",
|
|
68
|
+
"guaranteeFootnote",
|
|
69
|
+
"pageMetadata",
|
|
70
|
+
"readmeFold",
|
|
71
|
+
"shareableTerminalDemo",
|
|
72
|
+
"cliFollowupLines",
|
|
73
|
+
"r2",
|
|
74
|
+
"site",
|
|
75
|
+
"integratePage",
|
|
76
|
+
"problemIndex",
|
|
77
|
+
"llms",
|
|
78
|
+
];
|
|
79
|
+
for (const k of required) {
|
|
80
|
+
if (m[k] === undefined || m[k] === null) {
|
|
81
|
+
throw new Error(`marketing: missing required key ${k}`);
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
if (!Array.isArray(m.keywords) || m.keywords.length === 0) {
|
|
85
|
+
throw new Error("marketing: keywords must be a non-empty array");
|
|
86
|
+
}
|
|
87
|
+
const ho = String(m.heroOutcome);
|
|
88
|
+
if (wordCount(ho) > 20) {
|
|
89
|
+
throw new Error(`marketing: heroOutcome must be at most 20 words (got ${wordCount(ho)})`);
|
|
90
|
+
}
|
|
91
|
+
if (String(m.heroMechanism).length > 200) {
|
|
92
|
+
throw new Error("marketing: heroMechanism must be at most 200 characters");
|
|
93
|
+
}
|
|
94
|
+
for (const field of [ho, String(m.heroMechanism)]) {
|
|
95
|
+
if (BANNED.test(field)) {
|
|
96
|
+
throw new Error(`marketing: banned term in home hero text: ${field.slice(0, 80)}`);
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
const g = String(m.guaranteeFootnote);
|
|
100
|
+
if (!g.toLowerCase().includes("read-only")) {
|
|
101
|
+
throw new Error("marketing: guaranteeFootnote must mention read-only");
|
|
102
|
+
}
|
|
103
|
+
if (textContainsGithubHostUrl(g)) {
|
|
104
|
+
throw new Error("marketing: guaranteeFootnote must not include a GitHub URL (site-local copy only)");
|
|
105
|
+
}
|
|
106
|
+
if (g.toLowerCase().includes("causality")) {
|
|
107
|
+
throw new Error("marketing: guaranteeFootnote must not contain the word causality");
|
|
108
|
+
}
|
|
109
|
+
const cmd = String(m.integratePage.packLedCommand);
|
|
110
|
+
if (!cmd.includes("agentskeptic crossing")) {
|
|
111
|
+
throw new Error("marketing: packLedCommand must include agentskeptic crossing");
|
|
112
|
+
}
|
|
113
|
+
if (!cmd.includes("--events")) {
|
|
114
|
+
throw new Error("marketing: packLedCommand must be pack-led (--events)");
|
|
115
|
+
}
|
|
116
|
+
if (!cmd.includes("tools.json")) {
|
|
117
|
+
throw new Error("marketing: packLedCommand must reference tools.json");
|
|
118
|
+
}
|
|
119
|
+
if (!Array.isArray(m.integratePage.requirements) || m.integratePage.requirements.length < 1) {
|
|
120
|
+
throw new Error("marketing: integratePage.requirements must be a non-empty array");
|
|
121
|
+
}
|
|
122
|
+
if (m.integratePage.requirements.length < 1 || m.integratePage.requirements.length > 5) {
|
|
123
|
+
throw new Error("marketing: integratePage.requirements must have 1–5 items");
|
|
124
|
+
}
|
|
125
|
+
const v = String(m.visitorProblemAnswer);
|
|
126
|
+
if (v.toLowerCase().includes("causality")) {
|
|
127
|
+
throw new Error("marketing: visitorProblemAnswer must not contain causality");
|
|
128
|
+
}
|
|
129
|
+
const demo = m.shareableTerminalDemo;
|
|
130
|
+
if (demo && String(demo.transcript).includes("```")) {
|
|
131
|
+
throw new Error("marketing: shareableTerminalDemo.transcript must not contain ```");
|
|
132
|
+
}
|
|
133
|
+
if (!m.readmeFold || !Array.isArray(m.readmeFold.templateLines)) {
|
|
134
|
+
throw new Error("marketing: readmeFold.templateLines required");
|
|
135
|
+
}
|
|
136
|
+
return m;
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
/**
|
|
140
|
+
* @param {string} root
|
|
141
|
+
*/
|
|
142
|
+
function validateMarketing(root) {
|
|
143
|
+
return validateMarketingValue(loadMarketing(root));
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
if (require.main === module) {
|
|
147
|
+
try {
|
|
148
|
+
validateMarketing(join(__dirname, ".."));
|
|
149
|
+
process.exit(0);
|
|
150
|
+
} catch (e) {
|
|
151
|
+
console.error(e instanceof Error ? e.message : e);
|
|
152
|
+
process.exit(1);
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
module.exports = { validateMarketing, validateMarketingValue, loadMarketing };
|