agentskeptic 0.2.1 → 1.0.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 +7 -2
- package/dist/actionableFailure.remediationExhaustive.test.js +4 -4
- package/dist/actionableFailure.remediationExhaustive.test.js.map +1 -1
- package/dist/ciLockWorkflow.js +1 -1
- package/dist/cli/lockOrchestration.d.ts.map +1 -1
- package/dist/cli/lockOrchestration.js +40 -45
- package/dist/cli/lockOrchestration.js.map +1 -1
- package/dist/cli/lockOrchestration.test.js +6 -1
- package/dist/cli/lockOrchestration.test.js.map +1 -1
- package/dist/cli.js +26 -23
- package/dist/cli.js.map +1 -1
- package/dist/cliArgv.d.ts +2 -1
- package/dist/cliArgv.d.ts.map +1 -1
- package/dist/cliArgv.js +3 -2
- package/dist/cliArgv.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/crossing/runCrossingSubcommand.js +8 -8
- package/dist/index.d.ts +4 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -1
- package/dist/index.js.map +1 -1
- package/dist/outcomeCertificate.d.ts +48 -0
- package/dist/outcomeCertificate.d.ts.map +1 -0
- package/dist/outcomeCertificate.js +135 -0
- package/dist/outcomeCertificate.js.map +1 -0
- package/dist/outcomeCertificate.test.d.ts +2 -0
- package/dist/outcomeCertificate.test.d.ts.map +1 -0
- package/dist/outcomeCertificate.test.js +72 -0
- package/dist/outcomeCertificate.test.js.map +1 -0
- package/dist/planTransition.test.js +4 -4
- package/dist/publicDistribution.generated.d.ts +1 -1
- package/dist/publicDistribution.generated.js +1 -1
- package/dist/schemaLoad.d.ts +1 -1
- package/dist/schemaLoad.d.ts.map +1 -1
- package/dist/schemaLoad.js +5 -0
- package/dist/schemaLoad.js.map +1 -1
- package/dist/shareReport/postPublicVerificationReport.d.ts +6 -0
- package/dist/shareReport/postPublicVerificationReport.d.ts.map +1 -1
- package/dist/shareReport/postPublicVerificationReport.js +3 -1
- package/dist/shareReport/postPublicVerificationReport.js.map +1 -1
- package/dist/standardVerifyWorkflowCli.d.ts +14 -4
- package/dist/standardVerifyWorkflowCli.d.ts.map +1 -1
- package/dist/standardVerifyWorkflowCli.js +35 -22
- package/dist/standardVerifyWorkflowCli.js.map +1 -1
- package/dist/verify/batchVerifyTelemetrySubcommand.d.ts.map +1 -1
- package/dist/verify/batchVerifyTelemetrySubcommand.js +20 -17
- package/dist/verify/batchVerifyTelemetrySubcommand.js.map +1 -1
- package/dist/verifyAgentskeptic.d.ts +3 -6
- package/dist/verifyAgentskeptic.d.ts.map +1 -1
- package/dist/verifyAgentskeptic.js +10 -3
- package/dist/verifyAgentskeptic.js.map +1 -1
- package/dist/verifyAgentskeptic.test.js +10 -12
- package/dist/verifyAgentskeptic.test.js.map +1 -1
- package/package.json +3 -2
- package/schemas/openapi-commercial-v1.in.yaml +3 -3
- package/schemas/openapi-commercial-v1.yaml +3 -3
- package/schemas/outcome-certificate-v1.schema.json +66 -0
- package/schemas/public-verification-report-v2.schema.json +15 -0
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import { existsSync } from "node:fs";
|
|
2
2
|
import path from "node:path";
|
|
3
|
+
import { CLI_OPERATIONAL_CODES } from "./failureCatalog.js";
|
|
4
|
+
import { buildOutcomeCertificateFromWorkflowResult } from "./outcomeCertificate.js";
|
|
3
5
|
import { verifyWorkflow } from "./pipeline.js";
|
|
6
|
+
import { loadSchemaValidator } from "./schemaLoad.js";
|
|
4
7
|
import { TruthLayerError } from "./truthLayerError.js";
|
|
5
8
|
const POSTGRES_URL_RE = /^postgres(ql)?:\/\//i;
|
|
6
9
|
const PROJECT_LAYOUT_MISSING = "PROJECT_VERIFICATION_LAYOUT_MISSING";
|
|
@@ -13,7 +16,7 @@ function verificationDatabaseFromUrl(databaseUrl, projectRoot) {
|
|
|
13
16
|
/**
|
|
14
17
|
* Default adoption path: reads `agentskeptic/events.ndjson` and `agentskeptic/tools.json`
|
|
15
18
|
* under `projectRoot`, verifies `workflowId` against `databaseUrl` (SQLite path or postgres URL).
|
|
16
|
-
* For arbitrary paths use `verifyWorkflow
|
|
19
|
+
* Returns the public Outcome Certificate v1 (contract_sql). For arbitrary paths use `verifyWorkflow`.
|
|
17
20
|
*/
|
|
18
21
|
export async function verifyAgentskeptic(options) {
|
|
19
22
|
const projectRoot = options.projectRoot ?? process.cwd();
|
|
@@ -33,7 +36,11 @@ export async function verifyAgentskeptic(options) {
|
|
|
33
36
|
logStep: () => { },
|
|
34
37
|
truthReport: () => { },
|
|
35
38
|
});
|
|
36
|
-
const
|
|
37
|
-
|
|
39
|
+
const certificate = buildOutcomeCertificateFromWorkflowResult(result, "contract_sql");
|
|
40
|
+
const validate = loadSchemaValidator("outcome-certificate-v1");
|
|
41
|
+
if (!validate(certificate)) {
|
|
42
|
+
throw new TruthLayerError(CLI_OPERATIONAL_CODES.WORKFLOW_RESULT_SCHEMA_INVALID, JSON.stringify(validate.errors ?? []));
|
|
43
|
+
}
|
|
44
|
+
return certificate;
|
|
38
45
|
}
|
|
39
46
|
//# sourceMappingURL=verifyAgentskeptic.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"verifyAgentskeptic.js","sourceRoot":"","sources":["../src/verifyAgentskeptic.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAC/C,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"verifyAgentskeptic.js","sourceRoot":"","sources":["../src/verifyAgentskeptic.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAA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,CAAC,YAAY,CAAC,EAAE,CAAC;QACzD,MAAM,IAAI,eAAe,CACvB,sBAAsB,EACtB,GAAG,UAAU,KAAK,YAAY,EAAE,CACjC,CAAC;IACJ,CAAC;IAED,MAAM,QAAQ,GAAG,2BAA2B,CAAC,OAAO,CAAC,WAAW,EAAE,YAAY,CAAC,CAAC;IAChF,MAAM,MAAM,GAAG,MAAM,cAAc,CAAC;QAClC,UAAU,EAAE,OAAO,CAAC,UAAU;QAC9B,UAAU;QACV,YAAY;QACZ,QAAQ;QACR,OAAO,EAAE,GAAG,EAAE,GAAE,CAAC;QACjB,WAAW,EAAE,GAAG,EAAE,GAAE,CAAC;KACtB,CAAC,CAAC;IAEH,MAAM,WAAW,GAAG,yCAAyC,CAAC,MAAM,EAAE,cAAc,CAAC,CAAC;IACtF,MAAM,QAAQ,GAAG,mBAAmB,CAAC,wBAAwB,CAAC,CAAC;IAC/D,IAAI,CAAC,QAAQ,CAAC,WAAW,CAAC,EAAE,CAAC;QAC3B,MAAM,IAAI,eAAe,CACvB,qBAAqB,CAAC,8BAA8B,EACpD,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC,MAAM,IAAI,EAAE,CAAC,CACtC,CAAC;IACJ,CAAC;IACD,OAAO,WAAW,CAAC;AACrB,CAAC"}
|
|
@@ -22,37 +22,35 @@ function seedTempProject() {
|
|
|
22
22
|
return dir;
|
|
23
23
|
}
|
|
24
24
|
describe("verifyAgentskeptic", () => {
|
|
25
|
-
it("wf_complete:
|
|
25
|
+
it("wf_complete: contract certificate matches expectations and permits high-stakes reliance", async () => {
|
|
26
26
|
const projectRoot = seedTempProject();
|
|
27
27
|
try {
|
|
28
28
|
const dbPath = join(projectRoot, "demo.db");
|
|
29
|
-
const
|
|
29
|
+
const certificate = await verifyAgentskeptic({
|
|
30
30
|
workflowId: "wf_complete",
|
|
31
31
|
databaseUrl: dbPath,
|
|
32
32
|
projectRoot,
|
|
33
33
|
});
|
|
34
|
-
expect(
|
|
35
|
-
expect(
|
|
36
|
-
expect(
|
|
34
|
+
expect(certificate.stateRelation).toBe("matches_expectations");
|
|
35
|
+
expect(certificate.highStakesReliance).toBe("permitted");
|
|
36
|
+
expect(certificate.runKind).toBe("contract_sql");
|
|
37
37
|
}
|
|
38
38
|
finally {
|
|
39
39
|
rmSync(projectRoot, { recursive: true, force: true });
|
|
40
40
|
}
|
|
41
41
|
});
|
|
42
|
-
it("wf_missing:
|
|
42
|
+
it("wf_missing: mismatch and prohibited reliance; explanation cites ROW_ABSENT", async () => {
|
|
43
43
|
const projectRoot = seedTempProject();
|
|
44
44
|
try {
|
|
45
45
|
const dbPath = join(projectRoot, "demo.db");
|
|
46
|
-
const
|
|
46
|
+
const certificate = await verifyAgentskeptic({
|
|
47
47
|
workflowId: "wf_missing",
|
|
48
48
|
databaseUrl: dbPath,
|
|
49
49
|
projectRoot,
|
|
50
50
|
});
|
|
51
|
-
expect(
|
|
52
|
-
expect(
|
|
53
|
-
expect(
|
|
54
|
-
expect(result.steps[0]?.status).toBe("missing");
|
|
55
|
-
expect(result.steps[0]?.reasons[0]?.code).toBe("ROW_ABSENT");
|
|
51
|
+
expect(certificate.stateRelation).toBe("does_not_match");
|
|
52
|
+
expect(certificate.highStakesReliance).toBe("prohibited");
|
|
53
|
+
expect(certificate.explanation.details.some((d) => d.code === "ROW_ABSENT")).toBe(true);
|
|
56
54
|
}
|
|
57
55
|
finally {
|
|
58
56
|
rmSync(projectRoot, { recursive: true, force: true });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"verifyAgentskeptic.test.js","sourceRoot":"","sources":["../src/verifyAgentskeptic.test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,WAAW,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACjG,OAAO,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AACjC,OAAO,IAAI,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,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I,CAAC;gBACH,MAAM,kBAAkB,CAAC;oBACvB,UAAU,EAAE,aAAa;oBACzB,WAAW,EAAE,IAAI,CAAC,WAAW,EAAE,SAAS,CAAC;oBACzC,WAAW;iBACZ,CAAC,CAAC;YACL,CAAC;YAAC,OAAO,CAAC,EAAE,CAAC;gBACX,MAAM,CAAC,CAAC,CAAC,CAAC,cAAc,CAAC,eAAe,CAAC,CAAC;gBAC1C,MAAM,GAAG,GAAG,MAAM,CAAE,CAAW,CAAC,OAAO,CAAC,CAAC;gBACzC,MAAM,CAAC,GAAG,CAAC,CAAC,SAAS,CAAC,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,WAAW,EAAE,cAAc,EAAE,YAAY,CAAC,CAAC,CAAC,CAAC;YACzF,CAAC;QACH,CAAC;gBAAS,CAAC;YACT,MAAM,CAAC,WAAW,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;QACxD,CAAC;IACH,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "agentskeptic",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "1.0.0",
|
|
4
4
|
"description": "Traces say success while rows are missing or wrong. AgentSkeptic runs read-only SQL at verification time on Postgres or SQLite—ground truth from structured tool activity, not trace color alone.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -14,6 +14,7 @@
|
|
|
14
14
|
},
|
|
15
15
|
"exports": {
|
|
16
16
|
".": "./dist/index.js",
|
|
17
|
+
"./schemaLoad": "./dist/schemaLoad.js",
|
|
17
18
|
"./registryDraft": "./dist/registryDraft/index.js",
|
|
18
19
|
"./bootstrapPackSynthesis": "./dist/bootstrap/bootstrapPackSynthesis.js",
|
|
19
20
|
"./verificationHypothesisContract": "./dist/telemetry/verificationHypothesisContract.js"
|
|
@@ -26,7 +27,7 @@
|
|
|
26
27
|
"dev": "npm run dev -w agentskeptic-web",
|
|
27
28
|
"test:vitest": "vitest run",
|
|
28
29
|
"verify:decision-readiness": "npm run test:vitest -w agentskeptic-web -- __tests__/githubHeadingSlug.contract.test.ts __tests__/integrateActivationNorthStar.contract.test.ts __tests__/integrate-page-completion-semantics.contract.test.tsx __tests__/growth-metrics-ssot.contract.test.ts __tests__/repo-reference-integrity.growth-observability.test.ts",
|
|
29
|
-
"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/post-product-activation-install-id.test.mjs test/workflow-lineage-classify.test.mjs test/resolve-telemetry-source.test.mjs test/github-workflows-agentskeptic-telemetry-env.test.mjs test/maybe-emit-oss-claim-telemetry-off.test.mjs test/first-run-verify-output.integration.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/crossing-cli.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/oss-output-lock-batch.test.mjs test/lock-success-monetized-footer.integration.test.mjs test/docs-enforce-stream-contract.test.mjs test/docs-quick-enforce-link.test.mjs test/commercial-pricing-policy-parity.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/quick-param-pointer.gates.test.mjs test/dependency-security-pins.schema.contract.test.mjs test/drizzle-identifier-safety.contract.test.mjs test/assert-destructive-postgres-urls.test.mjs test/readme-wedge-inevitability.test.mjs test/adoption-complete-surface-parity.test.mjs test/adoption-epistemics-contract.test.mjs test/integrate-spine-contract.test.mjs test/integrate-spine-ssot-fixtures.test.mjs test/integrate-route-copy-absence.test.mjs test/adoption-validation-registry.test.mjs test/decision-ready-surfaces-manifest.test.mjs test/oss-legacy-handoff-ban.test.mjs test/sync-adoption-canonical-to-llms.test.mjs test/verify-agentskeptic-consumer.e2e.test.mjs",
|
|
30
|
+
"test:node:sqlite": "node scripts/assert-dependency-security-pins.mjs && node scripts/assert-no-legacy-verify-surface.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/post-product-activation-install-id.test.mjs test/workflow-lineage-classify.test.mjs test/resolve-telemetry-source.test.mjs test/github-workflows-agentskeptic-telemetry-env.test.mjs test/maybe-emit-oss-claim-telemetry-off.test.mjs test/first-run-verify-output.integration.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/crossing-cli.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/oss-output-lock-batch.test.mjs test/lock-success-monetized-footer.integration.test.mjs test/docs-enforce-stream-contract.test.mjs test/docs-quick-enforce-link.test.mjs test/commercial-pricing-policy-parity.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/quick-param-pointer.gates.test.mjs test/dependency-security-pins.schema.contract.test.mjs test/drizzle-identifier-safety.contract.test.mjs test/assert-destructive-postgres-urls.test.mjs test/readme-wedge-inevitability.test.mjs test/adoption-complete-surface-parity.test.mjs test/adoption-epistemics-contract.test.mjs test/integrate-spine-contract.test.mjs test/integrate-spine-ssot-fixtures.test.mjs test/integrate-route-copy-absence.test.mjs test/adoption-validation-registry.test.mjs test/decision-ready-surfaces-manifest.test.mjs test/oss-legacy-handoff-ban.test.mjs test/sync-adoption-canonical-to-llms.test.mjs test/verify-agentskeptic-consumer.e2e.test.mjs",
|
|
30
31
|
"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",
|
|
31
32
|
"test:workflow-truth-contract": "node --test --test-force-exit test/ci-workflow-truth-postgres-contract.test.mjs",
|
|
32
33
|
"validate-ttfv": "node scripts/validate-ttfv.mjs",
|
|
@@ -107,8 +107,8 @@ components:
|
|
|
107
107
|
schemas:
|
|
108
108
|
PublicVerificationReportCreate:
|
|
109
109
|
description: >
|
|
110
|
-
|
|
111
|
-
|
|
110
|
+
POST accepts schemaVersion 2 only: { "schemaVersion": 2, "certificate": <OutcomeCertificateV1> } per
|
|
111
|
+
schemas/public-verification-report-v2.schema.json. Legacy v1 envelopes are rejected with HTTP 400.
|
|
112
112
|
type: object
|
|
113
113
|
additionalProperties: true
|
|
114
114
|
PublicVerificationReportCreated:
|
|
@@ -121,7 +121,7 @@ components:
|
|
|
121
121
|
properties:
|
|
122
122
|
schemaVersion:
|
|
123
123
|
type: integer
|
|
124
|
-
const:
|
|
124
|
+
const: 2
|
|
125
125
|
id:
|
|
126
126
|
type: string
|
|
127
127
|
format: uuid
|
|
@@ -107,8 +107,8 @@ components:
|
|
|
107
107
|
schemas:
|
|
108
108
|
PublicVerificationReportCreate:
|
|
109
109
|
description: >
|
|
110
|
-
|
|
111
|
-
|
|
110
|
+
POST accepts schemaVersion 2 only: { "schemaVersion": 2, "certificate": <OutcomeCertificateV1> } per
|
|
111
|
+
schemas/public-verification-report-v2.schema.json. Legacy v1 envelopes are rejected with HTTP 400.
|
|
112
112
|
type: object
|
|
113
113
|
additionalProperties: true
|
|
114
114
|
PublicVerificationReportCreated:
|
|
@@ -121,7 +121,7 @@ components:
|
|
|
121
121
|
properties:
|
|
122
122
|
schemaVersion:
|
|
123
123
|
type: integer
|
|
124
|
-
const:
|
|
124
|
+
const: 2
|
|
125
125
|
id:
|
|
126
126
|
type: string
|
|
127
127
|
format: uuid
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$id": "https://agentskeptic.com/schemas/outcome-certificate-v1.schema.json",
|
|
3
|
+
"title": "OutcomeCertificateV1",
|
|
4
|
+
"type": "object",
|
|
5
|
+
"additionalProperties": false,
|
|
6
|
+
"required": [
|
|
7
|
+
"schemaVersion",
|
|
8
|
+
"workflowId",
|
|
9
|
+
"runKind",
|
|
10
|
+
"stateRelation",
|
|
11
|
+
"highStakesReliance",
|
|
12
|
+
"relianceRationale",
|
|
13
|
+
"intentSummary",
|
|
14
|
+
"explanation",
|
|
15
|
+
"steps",
|
|
16
|
+
"humanReport"
|
|
17
|
+
],
|
|
18
|
+
"properties": {
|
|
19
|
+
"schemaVersion": { "type": "integer", "const": 1 },
|
|
20
|
+
"workflowId": { "type": "string", "minLength": 1, "maxLength": 512 },
|
|
21
|
+
"runKind": { "type": "string", "enum": ["contract_sql", "quick_preview"] },
|
|
22
|
+
"stateRelation": {
|
|
23
|
+
"type": "string",
|
|
24
|
+
"enum": ["matches_expectations", "does_not_match", "not_established"]
|
|
25
|
+
},
|
|
26
|
+
"highStakesReliance": { "type": "string", "enum": ["permitted", "prohibited"] },
|
|
27
|
+
"relianceRationale": { "type": "string", "minLength": 1, "maxLength": 8192 },
|
|
28
|
+
"intentSummary": { "type": "string", "minLength": 1, "maxLength": 8192 },
|
|
29
|
+
"explanation": {
|
|
30
|
+
"type": "object",
|
|
31
|
+
"additionalProperties": false,
|
|
32
|
+
"required": ["headline", "details"],
|
|
33
|
+
"properties": {
|
|
34
|
+
"headline": { "type": "string", "minLength": 1, "maxLength": 2048 },
|
|
35
|
+
"details": {
|
|
36
|
+
"type": "array",
|
|
37
|
+
"items": {
|
|
38
|
+
"type": "object",
|
|
39
|
+
"additionalProperties": false,
|
|
40
|
+
"required": ["code", "message"],
|
|
41
|
+
"properties": {
|
|
42
|
+
"code": { "type": "string", "minLength": 1, "maxLength": 256 },
|
|
43
|
+
"message": { "type": "string", "minLength": 1, "maxLength": 4096 }
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
},
|
|
49
|
+
"steps": {
|
|
50
|
+
"type": "array",
|
|
51
|
+
"items": {
|
|
52
|
+
"type": "object",
|
|
53
|
+
"additionalProperties": false,
|
|
54
|
+
"required": ["seq", "declaredAction", "expectedOutcome", "observedOutcome"],
|
|
55
|
+
"properties": {
|
|
56
|
+
"seq": { "type": "integer", "minimum": 0 },
|
|
57
|
+
"toolId": { "type": "string", "maxLength": 512 },
|
|
58
|
+
"declaredAction": { "type": "string", "minLength": 1, "maxLength": 4096 },
|
|
59
|
+
"expectedOutcome": { "type": "string", "minLength": 1, "maxLength": 4096 },
|
|
60
|
+
"observedOutcome": { "type": "string", "minLength": 1, "maxLength": 8192 }
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
},
|
|
64
|
+
"humanReport": { "type": "string", "minLength": 1, "maxLength": 1048576 }
|
|
65
|
+
}
|
|
66
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$id": "https://agentskeptic.com/schemas/public-verification-report-v2.schema.json",
|
|
3
|
+
"title": "PublicVerificationReportEnvelopeV2",
|
|
4
|
+
"type": "object",
|
|
5
|
+
"additionalProperties": false,
|
|
6
|
+
"required": ["schemaVersion", "certificate"],
|
|
7
|
+
"properties": {
|
|
8
|
+
"schemaVersion": { "type": "integer", "const": 2 },
|
|
9
|
+
"certificate": {
|
|
10
|
+
"$ref": "https://agentskeptic.com/schemas/outcome-certificate-v1.schema.json"
|
|
11
|
+
},
|
|
12
|
+
"cliVersion": { "type": "string", "maxLength": 128 },
|
|
13
|
+
"createdFrom": { "type": "string", "maxLength": 256 }
|
|
14
|
+
}
|
|
15
|
+
}
|