agentskeptic 1.2.1 → 1.4.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 +22 -34
- package/config/marketing.json +6 -5
- package/dist/actionableFailure.d.ts.map +1 -1
- package/dist/actionableFailure.js +15 -0
- package/dist/actionableFailure.js.map +1 -1
- package/dist/assurance/assurancePathArgs.d.ts.map +1 -1
- package/dist/assurance/assurancePathArgs.js +1 -0
- package/dist/assurance/assurancePathArgs.js.map +1 -1
- package/dist/certificateDigest.d.ts +4 -0
- package/dist/certificateDigest.d.ts.map +1 -0
- package/dist/certificateDigest.js +7 -0
- package/dist/certificateDigest.js.map +1 -0
- package/dist/certificateDigest.test.d.ts +2 -0
- package/dist/certificateDigest.test.d.ts.map +1 -0
- package/dist/certificateDigest.test.js +14 -0
- package/dist/certificateDigest.test.js.map +1 -0
- package/dist/cli/initCommand.d.ts +2 -0
- package/dist/cli/initCommand.d.ts.map +1 -0
- package/dist/cli/initCommand.js +135 -0
- package/dist/cli/initCommand.js.map +1 -0
- package/dist/cli/lockOrchestration.d.ts.map +1 -1
- package/dist/cli/lockOrchestration.js +29 -4
- package/dist/cli/lockOrchestration.js.map +1 -1
- package/dist/cli/migrateCommand.d.ts +6 -0
- package/dist/cli/migrateCommand.d.ts.map +1 -0
- package/dist/cli/migrateCommand.js +97 -0
- package/dist/cli/migrateCommand.js.map +1 -0
- package/dist/cli.js +99 -109
- package/dist/cli.js.map +1 -1
- package/dist/cliArgv.test.d.ts +2 -0
- package/dist/cliArgv.test.d.ts.map +1 -0
- package/dist/cliArgv.test.js +34 -0
- package/dist/cliArgv.test.js.map +1 -0
- package/dist/cliOperationalCodes.d.ts +6 -0
- package/dist/cliOperationalCodes.d.ts.map +1 -1
- package/dist/cliOperationalCodes.js +6 -0
- package/dist/cliOperationalCodes.js.map +1 -1
- package/dist/commercial/activationCorrelation.d.ts +3 -0
- package/dist/commercial/activationCorrelation.d.ts.map +1 -0
- package/dist/commercial/activationCorrelation.js +6 -0
- package/dist/commercial/activationCorrelation.js.map +1 -0
- package/dist/commercial/getCurrentUsage.d.ts +16 -0
- package/dist/commercial/getCurrentUsage.d.ts.map +1 -0
- package/dist/commercial/getCurrentUsage.js +12 -0
- package/dist/commercial/getCurrentUsage.js.map +1 -0
- package/dist/commercial/licensePreflight.d.ts +1 -0
- package/dist/commercial/licensePreflight.d.ts.map +1 -1
- package/dist/commercial/licensePreflight.js +12 -77
- package/dist/commercial/licensePreflight.js.map +1 -1
- package/dist/commercial/postVerifyOutcomeBeacon.d.ts +2 -0
- package/dist/commercial/postVerifyOutcomeBeacon.d.ts.map +1 -1
- package/dist/commercial/postVerifyOutcomeBeacon.js +8 -13
- package/dist/commercial/postVerifyOutcomeBeacon.js.map +1 -1
- package/dist/compare.acceptance.test.js +25 -0
- package/dist/compare.acceptance.test.js.map +1 -1
- package/dist/compareRunManifest.d.ts +32 -0
- package/dist/compareRunManifest.d.ts.map +1 -0
- package/dist/compareRunManifest.js +60 -0
- package/dist/compareRunManifest.js.map +1 -0
- package/dist/debug-ui/app.js +4 -3
- package/dist/debugPanels.d.ts +0 -3
- package/dist/debugPanels.d.ts.map +1 -1
- package/dist/debugPanels.js +0 -23
- package/dist/debugPanels.js.map +1 -1
- package/dist/debugPanels.test.js +16 -15
- package/dist/debugPanels.test.js.map +1 -1
- package/dist/debugServer.d.ts.map +1 -1
- package/dist/debugServer.js +18 -15
- package/dist/debugServer.js.map +1 -1
- package/dist/debugServer.test.js +6 -3
- package/dist/debugServer.test.js.map +1 -1
- package/dist/decisionGate.assertSafe.test.js +2 -2
- package/dist/decisionGate.assertSafe.test.js.map +1 -1
- package/dist/decisionGate.d.ts +2 -1
- package/dist/decisionGate.d.ts.map +1 -1
- package/dist/decisionGate.js +2 -1
- package/dist/decisionGate.js.map +1 -1
- package/dist/decisionGate.persistBundle.test.js +3 -3
- package/dist/decisionGate.persistBundle.test.js.map +1 -1
- package/dist/discovery-payload-v1.json +3 -1
- package/dist/enforceCli.d.ts.map +1 -1
- package/dist/enforceCli.js +15 -40
- package/dist/enforceCli.js.map +1 -1
- package/dist/enforceStateful.d.ts +2 -0
- package/dist/enforceStateful.d.ts.map +1 -0
- package/dist/enforceStateful.js +88 -0
- package/dist/enforceStateful.js.map +1 -0
- package/dist/enforcementProjection.d.ts +17 -0
- package/dist/enforcementProjection.d.ts.map +1 -0
- package/dist/enforcementProjection.js +20 -0
- package/dist/enforcementProjection.js.map +1 -0
- package/dist/executionTrace.test.js +35 -0
- package/dist/executionTrace.test.js.map +1 -1
- package/dist/executionTraceDiff.d.ts +36 -0
- package/dist/executionTraceDiff.d.ts.map +1 -0
- package/dist/executionTraceDiff.js +86 -0
- package/dist/executionTraceDiff.js.map +1 -0
- package/dist/executionTraceDiff.test.d.ts +2 -0
- package/dist/executionTraceDiff.test.d.ts.map +1 -0
- package/dist/executionTraceDiff.test.js +44 -0
- package/dist/executionTraceDiff.test.js.map +1 -0
- package/dist/failureOriginCatalog.d.ts.map +1 -1
- package/dist/failureOriginCatalog.js +3 -0
- package/dist/failureOriginCatalog.js.map +1 -1
- package/dist/firstFiveMinutesChecklist.d.ts +1 -1
- package/dist/firstFiveMinutesChecklist.d.ts.map +1 -1
- package/dist/firstFiveMinutesChecklist.js +2 -2
- package/dist/firstFiveMinutesChecklist.js.map +1 -1
- package/dist/index.d.ts +13 -7
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +10 -7
- package/dist/index.js.map +1 -1
- package/dist/operationalDisposition.d.ts +48 -0
- package/dist/operationalDisposition.d.ts.map +1 -1
- package/dist/operationalDisposition.js +48 -0
- package/dist/operationalDisposition.js.map +1 -1
- package/dist/publicDistribution.generated.d.ts +1 -1
- package/dist/publicDistribution.generated.js +1 -1
- package/dist/registryDraft/buildRegistryDraftPrompt.js +2 -2
- package/dist/registryDraft/createRegistryDraftAjv.js +2 -2
- package/dist/registryDraft/index.d.ts +1 -0
- package/dist/registryDraft/index.d.ts.map +1 -1
- package/dist/registryDraft/index.js +1 -0
- package/dist/registryDraft/index.js.map +1 -1
- package/dist/registryDraft/openAiLlmResponseSchema.d.ts +6 -0
- package/dist/registryDraft/openAiLlmResponseSchema.d.ts.map +1 -0
- package/dist/registryDraft/openAiLlmResponseSchema.js +12 -0
- package/dist/registryDraft/openAiLlmResponseSchema.js.map +1 -0
- package/dist/regressionArtifact.d.ts +63 -0
- package/dist/regressionArtifact.d.ts.map +1 -0
- package/dist/regressionArtifact.js +290 -0
- package/dist/regressionArtifact.js.map +1 -0
- package/dist/runComparison.d.ts +0 -1
- package/dist/runComparison.d.ts.map +1 -1
- package/dist/runComparison.js +0 -83
- package/dist/runComparison.js.map +1 -1
- package/dist/runComparison.test.js +101 -57
- package/dist/runComparison.test.js.map +1 -1
- package/dist/schema-validation.test.js +37 -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 +10 -0
- package/dist/schemaLoad.js.map +1 -1
- package/dist/sdk/AgentSkeptic.d.ts +37 -0
- package/dist/sdk/AgentSkeptic.d.ts.map +1 -0
- package/dist/sdk/AgentSkeptic.js +45 -0
- package/dist/sdk/AgentSkeptic.js.map +1 -0
- package/dist/sdk/Gate.d.ts +3 -0
- package/dist/sdk/Gate.d.ts.map +1 -0
- package/dist/sdk/Gate.js +2 -0
- package/dist/sdk/Gate.js.map +1 -0
- package/dist/sdk/_generated/openapi-types.d.ts +1034 -0
- package/dist/sdk/_generated/openapi-types.d.ts.map +1 -0
- package/dist/sdk/_generated/openapi-types.js +6 -0
- package/dist/sdk/_generated/openapi-types.js.map +1 -0
- package/dist/sdk/deprecate.d.ts +6 -0
- package/dist/sdk/deprecate.d.ts.map +1 -0
- package/dist/sdk/deprecate.js +14 -0
- package/dist/sdk/deprecate.js.map +1 -0
- package/dist/sdk/deprecatedPublicApi.d.ts +18 -0
- package/dist/sdk/deprecatedPublicApi.d.ts.map +1 -0
- package/dist/sdk/deprecatedPublicApi.js +36 -0
- package/dist/sdk/deprecatedPublicApi.js.map +1 -0
- package/dist/sdk/errors.d.ts +23 -0
- package/dist/sdk/errors.d.ts.map +1 -0
- package/dist/sdk/errors.js +28 -0
- package/dist/sdk/errors.js.map +1 -0
- package/dist/sdk/frameworks/next.d.ts +12 -0
- package/dist/sdk/frameworks/next.d.ts.map +1 -0
- package/dist/sdk/frameworks/next.js +29 -0
- package/dist/sdk/frameworks/next.js.map +1 -0
- package/dist/sdk/transport.d.ts +35 -0
- package/dist/sdk/transport.d.ts.map +1 -0
- package/dist/sdk/transport.js +180 -0
- package/dist/sdk/transport.js.map +1 -0
- package/dist/sortedJsonStringify.d.ts +2 -0
- package/dist/sortedJsonStringify.d.ts.map +1 -0
- package/dist/sortedJsonStringify.js +23 -0
- package/dist/sortedJsonStringify.js.map +1 -0
- package/dist/standardVerifyWorkflowCli.d.ts.map +1 -1
- package/dist/standardVerifyWorkflowCli.js +3 -2
- package/dist/standardVerifyWorkflowCli.js.map +1 -1
- package/dist/telemetry/maybeEmitOssClaimTicketUrl.d.ts +2 -0
- package/dist/telemetry/maybeEmitOssClaimTicketUrl.d.ts.map +1 -1
- package/dist/telemetry/maybeEmitOssClaimTicketUrl.js +13 -2
- package/dist/telemetry/maybeEmitOssClaimTicketUrl.js.map +1 -1
- package/dist/telemetry/postOssClaimContinuation.d.ts +1 -1
- package/dist/telemetry/postOssClaimContinuation.d.ts.map +1 -1
- package/dist/telemetry/postOssClaimContinuation.js +10 -6
- package/dist/telemetry/postOssClaimContinuation.js.map +1 -1
- package/dist/telemetry/postOssClaimTicket.d.ts +8 -0
- package/dist/telemetry/postOssClaimTicket.d.ts.map +1 -1
- package/dist/telemetry/postOssClaimTicket.js +31 -5
- package/dist/telemetry/postOssClaimTicket.js.map +1 -1
- package/dist/truthLayerError.d.ts +5 -2
- package/dist/truthLayerError.d.ts.map +1 -1
- package/dist/truthLayerError.js +6 -4
- package/dist/truthLayerError.js.map +1 -1
- package/dist/types.d.ts +10 -1
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js.map +1 -1
- package/dist/verificationDiagnostics.d.ts.map +1 -1
- package/dist/verificationDiagnostics.js +4 -1
- package/dist/verificationDiagnostics.js.map +1 -1
- package/dist/verificationPolicy.d.ts.map +1 -1
- package/dist/verificationPolicy.js +13 -0
- package/dist/verificationPolicy.js.map +1 -1
- package/dist/verificationUserPhrases.d.ts.map +1 -1
- package/dist/verificationUserPhrases.js +3 -0
- package/dist/verificationUserPhrases.js.map +1 -1
- package/dist/verify/batchVerifyTelemetrySubcommand.d.ts.map +1 -1
- package/dist/verify/batchVerifyTelemetrySubcommand.js +8 -1
- package/dist/verify/batchVerifyTelemetrySubcommand.js.map +1 -1
- package/dist/verifyAgentskeptic.d.ts +1 -1
- package/dist/verifyAgentskeptic.d.ts.map +1 -1
- package/dist/verifyAgentskeptic.js +3 -3
- package/dist/verifyAgentskeptic.js.map +1 -1
- package/dist/verifyAgentskeptic.test.js +5 -5
- package/dist/verifyAgentskeptic.test.js.map +1 -1
- package/dist/wireReasonCodes.d.ts +3 -0
- package/dist/wireReasonCodes.d.ts.map +1 -1
- package/dist/wireReasonCodes.js +3 -0
- package/dist/wireReasonCodes.js.map +1 -1
- package/package.json +47 -9
- package/schemas/agentskeptic-error-codes.json +608 -0
- package/schemas/compare-run-manifest-v1.schema.json +65 -0
- package/schemas/conformance-normalized-result.schema.json +73 -0
- package/schemas/connector-capabilities.schema.json +38 -0
- package/schemas/contract/v1.json +65 -0
- package/schemas/contract-manifest.schema.json +130 -0
- package/schemas/execution-trace-view.schema.json +1 -1
- package/schemas/openapi-commercial-v1.in.yaml +584 -14
- package/schemas/openapi-commercial-v1.yaml +584 -14
- package/schemas/{registry-draft-response-v1.schema.json → registry-draft-llm-partial-v1.schema.json} +9 -5
- package/schemas/registry-draft-response-v2.schema.json +52 -0
- package/schemas/regression-artifact-v1.schema.json +212 -0
- package/scripts/discovery-payload.lib.cjs +9 -3
- package/scripts/emit-primary-marketing.cjs +37 -0
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://agentskeptic.com/schemas/registry-draft-response-v2.schema.json",
|
|
4
|
+
"title": "RegistryDraftResponseEnvelopeV2",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"additionalProperties": false,
|
|
7
|
+
"required": ["schemaVersion", "draft", "assumptions", "warnings", "disclaimer", "model", "quickIngestInput"],
|
|
8
|
+
"properties": {
|
|
9
|
+
"schemaVersion": { "type": "integer", "const": 2 },
|
|
10
|
+
"draft": {
|
|
11
|
+
"type": "object",
|
|
12
|
+
"additionalProperties": false,
|
|
13
|
+
"required": ["tools"],
|
|
14
|
+
"properties": {
|
|
15
|
+
"tools": {
|
|
16
|
+
"$ref": "https://agentskeptic.com/schemas/tools-registry.schema.json"
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
},
|
|
20
|
+
"assumptions": {
|
|
21
|
+
"type": "array",
|
|
22
|
+
"items": { "type": "string" }
|
|
23
|
+
},
|
|
24
|
+
"warnings": {
|
|
25
|
+
"type": "array",
|
|
26
|
+
"items": { "type": "string" }
|
|
27
|
+
},
|
|
28
|
+
"disclaimer": { "type": "string", "minLength": 1 },
|
|
29
|
+
"model": {
|
|
30
|
+
"type": "object",
|
|
31
|
+
"additionalProperties": false,
|
|
32
|
+
"required": ["provider", "model"],
|
|
33
|
+
"properties": {
|
|
34
|
+
"provider": { "type": "string", "const": "openai" },
|
|
35
|
+
"model": { "type": "string", "minLength": 1 }
|
|
36
|
+
}
|
|
37
|
+
},
|
|
38
|
+
"quickIngestInput": {
|
|
39
|
+
"type": "object",
|
|
40
|
+
"additionalProperties": false,
|
|
41
|
+
"required": ["encoding", "body"],
|
|
42
|
+
"properties": {
|
|
43
|
+
"encoding": { "type": "string", "const": "utf8" },
|
|
44
|
+
"body": {
|
|
45
|
+
"type": "string",
|
|
46
|
+
"maxLength": 65536,
|
|
47
|
+
"description": "NDJSON in quick ingest form; same cap tier as HTTP request body for registry-draft."
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
}
|
|
@@ -0,0 +1,212 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$id": "https://agentskeptic.com/schemas/regression-artifact-v1.schema.json",
|
|
3
|
+
"title": "RegressionArtifactV1",
|
|
4
|
+
"type": "object",
|
|
5
|
+
"additionalProperties": false,
|
|
6
|
+
"required": [
|
|
7
|
+
"schemaVersion",
|
|
8
|
+
"artifactSource",
|
|
9
|
+
"manifestSha256",
|
|
10
|
+
"workflowId",
|
|
11
|
+
"certificateProfile",
|
|
12
|
+
"verification",
|
|
13
|
+
"outcomeCertificates",
|
|
14
|
+
"tracePairwise",
|
|
15
|
+
"narrative",
|
|
16
|
+
"humanText",
|
|
17
|
+
"narrativeHtml"
|
|
18
|
+
],
|
|
19
|
+
"properties": {
|
|
20
|
+
"schemaVersion": { "const": 1 },
|
|
21
|
+
"artifactSource": { "type": "string", "enum": ["cli_manifest", "debug_corpus"] },
|
|
22
|
+
"manifestSha256": { "type": "string", "pattern": "^[a-f0-9]{64}$" },
|
|
23
|
+
"workflowId": { "type": "string", "minLength": 1 },
|
|
24
|
+
"certificateProfile": {
|
|
25
|
+
"oneOf": [
|
|
26
|
+
{
|
|
27
|
+
"type": "object",
|
|
28
|
+
"additionalProperties": false,
|
|
29
|
+
"required": ["mode", "outcomeCertificateRunKind"],
|
|
30
|
+
"properties": {
|
|
31
|
+
"mode": { "const": "uniform" },
|
|
32
|
+
"outcomeCertificateRunKind": {
|
|
33
|
+
"type": "string",
|
|
34
|
+
"enum": ["contract_sql", "contract_sql_langgraph_checkpoint_trust"]
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
"type": "object",
|
|
40
|
+
"additionalProperties": false,
|
|
41
|
+
"required": ["mode", "entries"],
|
|
42
|
+
"properties": {
|
|
43
|
+
"mode": { "const": "perRun" },
|
|
44
|
+
"entries": {
|
|
45
|
+
"type": "array",
|
|
46
|
+
"minItems": 1,
|
|
47
|
+
"items": {
|
|
48
|
+
"type": "object",
|
|
49
|
+
"additionalProperties": false,
|
|
50
|
+
"required": ["runIndex", "outcomeCertificateRunKind"],
|
|
51
|
+
"properties": {
|
|
52
|
+
"runIndex": { "type": "integer", "minimum": 0 },
|
|
53
|
+
"outcomeCertificateRunKind": {
|
|
54
|
+
"type": "string",
|
|
55
|
+
"enum": ["contract_sql", "contract_sql_langgraph_checkpoint_trust"]
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
]
|
|
63
|
+
},
|
|
64
|
+
"verification": { "$ref": "https://agentskeptic.com/schemas/run-comparison-report.schema.json" },
|
|
65
|
+
"outcomeCertificates": {
|
|
66
|
+
"type": "array",
|
|
67
|
+
"items": {
|
|
68
|
+
"type": "object",
|
|
69
|
+
"additionalProperties": false,
|
|
70
|
+
"required": [
|
|
71
|
+
"runIndex",
|
|
72
|
+
"displayLabel",
|
|
73
|
+
"outcomeCertificateRunKind",
|
|
74
|
+
"certificateCanonicalDigest",
|
|
75
|
+
"certificate"
|
|
76
|
+
],
|
|
77
|
+
"properties": {
|
|
78
|
+
"runIndex": { "type": "integer", "minimum": 0 },
|
|
79
|
+
"displayLabel": { "type": "string", "minLength": 1 },
|
|
80
|
+
"outcomeCertificateRunKind": {
|
|
81
|
+
"type": "string",
|
|
82
|
+
"enum": ["contract_sql", "contract_sql_langgraph_checkpoint_trust"]
|
|
83
|
+
},
|
|
84
|
+
"certificateCanonicalDigest": { "type": "string", "pattern": "^[a-f0-9]{64}$" },
|
|
85
|
+
"certificate": { "$ref": "https://agentskeptic.com/schemas/outcome-certificate-v1.schema.json" }
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
},
|
|
89
|
+
"tracePairwise": {
|
|
90
|
+
"type": "object",
|
|
91
|
+
"additionalProperties": false,
|
|
92
|
+
"required": [
|
|
93
|
+
"priorRunIndex",
|
|
94
|
+
"currentRunIndex",
|
|
95
|
+
"viewBuild",
|
|
96
|
+
"bySeq",
|
|
97
|
+
"seqTimelineOrderDiverged",
|
|
98
|
+
"nonToolEventCounts"
|
|
99
|
+
],
|
|
100
|
+
"properties": {
|
|
101
|
+
"priorRunIndex": { "type": "integer", "minimum": 0 },
|
|
102
|
+
"currentRunIndex": { "type": "integer", "minimum": 0 },
|
|
103
|
+
"viewBuild": {
|
|
104
|
+
"type": "object",
|
|
105
|
+
"additionalProperties": false,
|
|
106
|
+
"required": ["prior", "current"],
|
|
107
|
+
"properties": {
|
|
108
|
+
"prior": { "$ref": "https://agentskeptic.com/schemas/execution-trace-view.schema.json" },
|
|
109
|
+
"current": { "$ref": "https://agentskeptic.com/schemas/execution-trace-view.schema.json" }
|
|
110
|
+
}
|
|
111
|
+
},
|
|
112
|
+
"bySeq": {
|
|
113
|
+
"type": "array",
|
|
114
|
+
"items": {
|
|
115
|
+
"type": "object",
|
|
116
|
+
"additionalProperties": false,
|
|
117
|
+
"required": ["seq", "class", "prior", "current"],
|
|
118
|
+
"properties": {
|
|
119
|
+
"seq": { "type": "integer", "minimum": 0 },
|
|
120
|
+
"class": { "type": "string", "enum": ["only_in_prior", "only_in_current", "in_both"] },
|
|
121
|
+
"prior": { "oneOf": [{ "type": "null" }, { "$ref": "#/$defs/evaluatedNodeSummary" }] },
|
|
122
|
+
"current": { "oneOf": [{ "type": "null" }, { "$ref": "#/$defs/evaluatedNodeSummary" }] }
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
},
|
|
126
|
+
"seqTimelineOrderDiverged": { "type": "boolean" },
|
|
127
|
+
"nonToolEventCounts": {
|
|
128
|
+
"type": "object",
|
|
129
|
+
"additionalProperties": false,
|
|
130
|
+
"required": ["prior", "current"],
|
|
131
|
+
"properties": {
|
|
132
|
+
"prior": { "type": "object", "additionalProperties": { "type": "integer", "minimum": 0 } },
|
|
133
|
+
"current": { "type": "object", "additionalProperties": { "type": "integer", "minimum": 0 } }
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
},
|
|
138
|
+
"narrative": {
|
|
139
|
+
"type": "object",
|
|
140
|
+
"additionalProperties": false,
|
|
141
|
+
"required": [
|
|
142
|
+
"classification",
|
|
143
|
+
"whyItMatters",
|
|
144
|
+
"headline",
|
|
145
|
+
"structural",
|
|
146
|
+
"traceSummary"
|
|
147
|
+
],
|
|
148
|
+
"properties": {
|
|
149
|
+
"classification": {
|
|
150
|
+
"type": "string",
|
|
151
|
+
"enum": ["improving", "worsening", "unchanged", "mixed"]
|
|
152
|
+
},
|
|
153
|
+
"whyItMatters": { "type": "string" },
|
|
154
|
+
"headline": { "type": "string" },
|
|
155
|
+
"structural": {
|
|
156
|
+
"type": "object",
|
|
157
|
+
"additionalProperties": false,
|
|
158
|
+
"required": [
|
|
159
|
+
"introducedLogicalStepKeysCount",
|
|
160
|
+
"resolvedLogicalStepKeysCount",
|
|
161
|
+
"recurringSignatureCount"
|
|
162
|
+
],
|
|
163
|
+
"properties": {
|
|
164
|
+
"introducedLogicalStepKeysCount": { "type": "integer", "minimum": 0 },
|
|
165
|
+
"resolvedLogicalStepKeysCount": { "type": "integer", "minimum": 0 },
|
|
166
|
+
"recurringSignatureCount": { "type": "integer", "minimum": 0 }
|
|
167
|
+
}
|
|
168
|
+
},
|
|
169
|
+
"traceSummary": {
|
|
170
|
+
"type": "object",
|
|
171
|
+
"additionalProperties": false,
|
|
172
|
+
"required": [
|
|
173
|
+
"seqTimelineOrderDiverged",
|
|
174
|
+
"onlyInPriorSeqCount",
|
|
175
|
+
"onlyInCurrentSeqCount",
|
|
176
|
+
"inBothCount",
|
|
177
|
+
"nonToolCountsDiverged"
|
|
178
|
+
],
|
|
179
|
+
"properties": {
|
|
180
|
+
"seqTimelineOrderDiverged": { "type": "boolean" },
|
|
181
|
+
"onlyInPriorSeqCount": { "type": "integer", "minimum": 0 },
|
|
182
|
+
"onlyInCurrentSeqCount": { "type": "integer", "minimum": 0 },
|
|
183
|
+
"inBothCount": { "type": "integer", "minimum": 0 },
|
|
184
|
+
"nonToolCountsDiverged": { "type": "boolean" }
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
},
|
|
189
|
+
"humanText": { "type": "string" },
|
|
190
|
+
"narrativeHtml": { "type": "string", "minLength": 1 }
|
|
191
|
+
},
|
|
192
|
+
"$defs": {
|
|
193
|
+
"evaluatedNodeSummary": {
|
|
194
|
+
"type": "object",
|
|
195
|
+
"additionalProperties": false,
|
|
196
|
+
"required": [
|
|
197
|
+
"ingestIndex",
|
|
198
|
+
"traceStepKind",
|
|
199
|
+
"engineStepStatus",
|
|
200
|
+
"truthOutcomeLabel",
|
|
201
|
+
"toolId"
|
|
202
|
+
],
|
|
203
|
+
"properties": {
|
|
204
|
+
"ingestIndex": { "type": "integer", "minimum": 0 },
|
|
205
|
+
"traceStepKind": { "type": "string" },
|
|
206
|
+
"engineStepStatus": { "oneOf": [{ "type": "string" }, { "type": "null" }] },
|
|
207
|
+
"truthOutcomeLabel": { "oneOf": [{ "type": "string" }, { "type": "null" }] },
|
|
208
|
+
"toolId": { "oneOf": [{ "type": "string" }, { "type": "null" }] }
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
}
|
|
@@ -143,8 +143,10 @@ function buildDiscoveryPayload(root) {
|
|
|
143
143
|
const { owner, repo } = parseGithubRepoFromUrl(anchors.gitRepositoryUrl);
|
|
144
144
|
const llmsRaw = `https://raw.githubusercontent.com/${owner}/${repo}/refs/heads/${DISCOVERY_LLM_BRANCH}/llms.txt`;
|
|
145
145
|
const llmsBlob = `https://github.com/${owner}/${repo}/blob/${DISCOVERY_LLM_BRANCH}/llms.txt`;
|
|
146
|
-
const
|
|
146
|
+
const integratorGuideSsotRaw = `https://raw.githubusercontent.com/${owner}/${repo}/refs/heads/${DISCOVERY_LLM_BRANCH}/docs/integrate.md`;
|
|
147
147
|
const openapiRaw = `https://raw.githubusercontent.com/${owner}/${repo}/refs/heads/${DISCOVERY_LLM_BRANCH}/schemas/openapi-commercial-v1.yaml`;
|
|
148
|
+
const contractManifestCanonical = `${canonicalOrigin}/contract/v1.json`;
|
|
149
|
+
const contractManifestRaw = `https://raw.githubusercontent.com/${owner}/${repo}/refs/heads/${DISCOVERY_LLM_BRANCH}/schemas/contract/v1.json`;
|
|
148
150
|
const llms = /** @type {{ intentPhrases: string[]; notFor: string[]; relatedQueries: string[] }} */ (
|
|
149
151
|
discovery.llms
|
|
150
152
|
);
|
|
@@ -163,7 +165,9 @@ function buildDiscoveryPayload(root) {
|
|
|
163
165
|
npm: String(anchors.npmPackageUrl),
|
|
164
166
|
llmsRaw,
|
|
165
167
|
llmsBlob,
|
|
166
|
-
|
|
168
|
+
integratorGuideSsotRaw,
|
|
169
|
+
contractManifestCanonical,
|
|
170
|
+
contractManifestRaw,
|
|
167
171
|
},
|
|
168
172
|
appendix: {
|
|
169
173
|
slug: String(discovery.slug),
|
|
@@ -247,7 +251,7 @@ function renderLlmsTextFromPayload(payload) {
|
|
|
247
251
|
"",
|
|
248
252
|
"## Primary links",
|
|
249
253
|
`- Canonical site: ${links.site}`,
|
|
250
|
-
`- Integrator
|
|
254
|
+
`- Integrator guide (v2 SSOT): ${links.integratorGuideSsotRaw}`,
|
|
251
255
|
`- First-run integration: ${integrateUrl}`,
|
|
252
256
|
`- Learn: ${learnHubUrl}`,
|
|
253
257
|
`- OpenAPI (canonical): ${openapiSelfCanonical}`,
|
|
@@ -255,6 +259,8 @@ function renderLlmsTextFromPayload(payload) {
|
|
|
255
259
|
`- Source repository: ${links.repo}`,
|
|
256
260
|
`- npm package: ${links.npm}`,
|
|
257
261
|
`- llms.txt (repo raw): ${links.llmsRaw}`,
|
|
262
|
+
`- Verification Contract Manifest (canonical): ${links.contractManifestCanonical}`,
|
|
263
|
+
`- Verification Contract Manifest (repo raw): ${links.contractManifestRaw}`,
|
|
258
264
|
"",
|
|
259
265
|
];
|
|
260
266
|
const base = lines.join("\n");
|
|
@@ -29,8 +29,23 @@ const TOKENS = [
|
|
|
29
29
|
"__DISTRIBUTION_NPM_URL__",
|
|
30
30
|
"__OPENAPI_SELF_URL__",
|
|
31
31
|
"__SERVERS_ORIGIN__",
|
|
32
|
+
"__CONTRACT_URL__",
|
|
33
|
+
"__CONTRACT_VERSION__",
|
|
34
|
+
"__CONTRACT_SHA__",
|
|
32
35
|
];
|
|
33
36
|
|
|
37
|
+
const CONTRACT_MANIFEST_PATH = join(ROOT, "schemas", "contract", "v1.json");
|
|
38
|
+
|
|
39
|
+
function loadContractManifestPin() {
|
|
40
|
+
const m = JSON.parse(readFileSync(CONTRACT_MANIFEST_PATH, "utf8"));
|
|
41
|
+
const head = m.history[m.history.length - 1];
|
|
42
|
+
return {
|
|
43
|
+
url: String(m.publicUrl),
|
|
44
|
+
version: String(head.manifestVersion),
|
|
45
|
+
manifestSha256: String(head.manifestSha256),
|
|
46
|
+
};
|
|
47
|
+
}
|
|
48
|
+
|
|
34
49
|
/**
|
|
35
50
|
* @param {string} haystack
|
|
36
51
|
* @param {string} needle
|
|
@@ -47,6 +62,8 @@ function countOccurrences(haystack, needle) {
|
|
|
47
62
|
return n;
|
|
48
63
|
}
|
|
49
64
|
|
|
65
|
+
const PRODUCT_VERSION_TOKEN = "__PRODUCT_VERSION__";
|
|
66
|
+
|
|
50
67
|
function validateOpenapiTemplate() {
|
|
51
68
|
const template = readFileSync(OPENAPI_IN, "utf8");
|
|
52
69
|
for (const tok of TOKENS) {
|
|
@@ -55,6 +72,10 @@ function validateOpenapiTemplate() {
|
|
|
55
72
|
throw new Error(`openapi template: token ${tok} must appear exactly once, found ${c}`);
|
|
56
73
|
}
|
|
57
74
|
}
|
|
75
|
+
const vTok = countOccurrences(template, PRODUCT_VERSION_TOKEN);
|
|
76
|
+
if (vTok !== 1) {
|
|
77
|
+
throw new Error(`openapi template: token ${PRODUCT_VERSION_TOKEN} must appear exactly once, found ${vTok}`);
|
|
78
|
+
}
|
|
58
79
|
}
|
|
59
80
|
|
|
60
81
|
function escapeYamlDoubleQuotedOneLiner(s) {
|
|
@@ -142,6 +163,8 @@ function writeAgentsMd(anchors, discovery) {
|
|
|
142
163
|
const branch = dp.DISCOVERY_LLM_BRANCH;
|
|
143
164
|
const llmsRaw = `https://raw.githubusercontent.com/${owner}/${repo}/refs/heads/${branch}/llms.txt`;
|
|
144
165
|
const openapiRaw = `https://raw.githubusercontent.com/${owner}/${repo}/refs/heads/${branch}/schemas/openapi-commercial-v1.yaml`;
|
|
166
|
+
const contractRaw = `https://raw.githubusercontent.com/${owner}/${repo}/refs/heads/${branch}/schemas/contract/v1.json`;
|
|
167
|
+
const contractPin = loadContractManifestPin();
|
|
145
168
|
const body = `# AGENTS
|
|
146
169
|
|
|
147
170
|
Normative **public distribution** and anchor sync: [\`docs/public-distribution.md\`](docs/public-distribution.md) (same content as ${url}).
|
|
@@ -151,6 +174,8 @@ Normative **public distribution** and anchor sync: [\`docs/public-distribution.m
|
|
|
151
174
|
- Committed \`llms.txt\` at repo root (same bytes as site \`/llms.txt\` after prebuild sync).
|
|
152
175
|
- Raw GitHub \`llms.txt\`: ${llmsRaw}
|
|
153
176
|
- OpenAPI YAML (repo raw): ${openapiRaw}
|
|
177
|
+
- Verification Contract Manifest (canonical): ${contractPin.url}
|
|
178
|
+
- Verification Contract Manifest (repo raw): ${contractRaw}
|
|
154
179
|
- Acquisition page (canonical): ${acquisitionUrl}
|
|
155
180
|
`;
|
|
156
181
|
writeFileSync(join(ROOT, "AGENTS.md"), body, "utf8");
|
|
@@ -178,12 +203,23 @@ function syncPrimaryMarketing() {
|
|
|
178
203
|
const integrateUrl = `${canonicalOrigin}/integrate`;
|
|
179
204
|
|
|
180
205
|
const template = readFileSync(OPENAPI_IN, "utf8");
|
|
206
|
+
const pkgForVersion = JSON.parse(readFileSync(PKG_PATH, "utf8"));
|
|
207
|
+
const productSemver = String(pkgForVersion.version ?? "").trim();
|
|
208
|
+
if (!productSemver) {
|
|
209
|
+
throw new Error("emit-primary-marketing: package.json missing version (OpenAPI __PRODUCT_VERSION__)");
|
|
210
|
+
}
|
|
211
|
+
const contractPin = loadContractManifestPin();
|
|
212
|
+
|
|
181
213
|
let mid = template;
|
|
214
|
+
mid = mid.replace(PRODUCT_VERSION_TOKEN, JSON.stringify(productSemver));
|
|
182
215
|
mid = mid.replace("__IDENTITY_ONE_LINER__", escaped);
|
|
183
216
|
mid = mid.replace("__DISTRIBUTION_CONTACT_URL__", canonicalOrigin);
|
|
184
217
|
mid = mid.replace("__DISTRIBUTION_INTEGRATE_URL__", integrateUrl);
|
|
185
218
|
mid = mid.replace("__DISTRIBUTION_REPO_URL__", anchors.gitRepositoryUrl);
|
|
186
219
|
mid = mid.replace("__DISTRIBUTION_NPM_URL__", anchors.npmPackageUrl);
|
|
220
|
+
mid = mid.replace("__CONTRACT_URL__", contractPin.url);
|
|
221
|
+
mid = mid.replace("__CONTRACT_VERSION__", JSON.stringify(contractPin.version));
|
|
222
|
+
mid = mid.replace("__CONTRACT_SHA__", JSON.stringify(contractPin.manifestSha256));
|
|
187
223
|
|
|
188
224
|
const repoYaml = mid
|
|
189
225
|
.replace("__SERVERS_ORIGIN__", canonicalOrigin)
|
|
@@ -252,6 +288,7 @@ function syncPrimaryMarketing() {
|
|
|
252
288
|
`- **Canonical site:** ${canonicalOrigin}`,
|
|
253
289
|
`- **Integrate:** ${integrateUrl}`,
|
|
254
290
|
`- **OpenAPI (canonical):** ${openapiSelfCanonical}`,
|
|
291
|
+
`- **Verification Contract Manifest:** ${contractPin.url}`,
|
|
255
292
|
`- **llms.txt (agents, site):** ${canonicalOrigin}/llms.txt`,
|
|
256
293
|
`- **llms.txt (repo, raw):** ${pl.llmsRaw}`,
|
|
257
294
|
`- **llms.txt (repo, blob):** ${pl.llmsBlob}`,
|