@aiwg/cli 2026.9.0 → 2026.9.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.
- package/agentic/code/providers/capability-matrix.yaml +41 -0
- package/agentic/code/providers/model-capabilities.v1.json +11 -0
- package/agentic/code/providers/model-catalog.v1.json +8 -0
- package/agentic/code/providers/pi/aiwg-bridge.ts +26 -0
- package/bin/aiwg.mjs +15 -3
- package/dist/src/api/index.d.ts +3 -0
- package/dist/src/api/index.js +3 -0
- package/dist/src/auth/credential-store.js +6 -0
- package/dist/src/channel/manager.mjs +2 -2
- package/dist/src/cli/handlers/dataset.js +186 -0
- package/dist/src/cli/handlers/help.js +2 -1
- package/dist/src/cli/handlers/index.js +5 -1
- package/dist/src/cli/handlers/init.js +1 -0
- package/dist/src/cli/handlers/output-mode.js +18 -1
- package/dist/src/cli/handlers/run.js +11 -3
- package/dist/src/cli/handlers/schema.js +221 -0
- package/dist/src/cli/handlers/sessions.js +30 -12
- package/dist/src/cli/handlers/steward.js +11 -1
- package/dist/src/cli/handlers/use.js +6 -2
- package/dist/src/cli/hooks/builtin/activity-log-hook.js +6 -0
- package/dist/src/cli/router.js +1 -1
- package/dist/src/cli/scope-resolver.js +22 -0
- package/dist/src/dataset/adapter-sdk.d.ts +41 -0
- package/dist/src/dataset/adapter-sdk.js +147 -0
- package/dist/src/dataset/adapter-types.d.ts +179 -0
- package/dist/src/dataset/adapter-types.js +2 -0
- package/dist/src/dataset/adapters.d.ts +104 -0
- package/dist/src/dataset/adapters.js +518 -0
- package/dist/src/dataset/conformance-types.d.ts +84 -0
- package/dist/src/dataset/conformance-types.js +3 -0
- package/dist/src/dataset/conformance.d.ts +13 -0
- package/dist/src/dataset/conformance.js +90 -0
- package/dist/src/dataset/contracts.d.ts +17 -0
- package/dist/src/dataset/contracts.js +236 -0
- package/dist/src/dataset/file-orchestration-repository.d.ts +19 -0
- package/dist/src/dataset/file-orchestration-repository.js +68 -0
- package/dist/src/dataset/fortemi-execution-bridge.d.ts +33 -0
- package/dist/src/dataset/fortemi-execution-bridge.js +35 -0
- package/dist/src/dataset/index.d.ts +21 -0
- package/dist/src/dataset/index.js +21 -0
- package/dist/src/dataset/ledger-types.d.ts +141 -0
- package/dist/src/dataset/ledger-types.js +2 -0
- package/dist/src/dataset/ledger.d.ts +27 -0
- package/dist/src/dataset/ledger.js +100 -0
- package/dist/src/dataset/local-execution-backend.d.ts +10 -0
- package/dist/src/dataset/local-execution-backend.js +32 -0
- package/dist/src/dataset/orchestration-repository.d.ts +29 -0
- package/dist/src/dataset/orchestration-repository.js +34 -0
- package/dist/src/dataset/orchestration-service.d.ts +56 -0
- package/dist/src/dataset/orchestration-service.js +466 -0
- package/dist/src/dataset/orchestration-types.d.ts +83 -0
- package/dist/src/dataset/orchestration-types.js +2 -0
- package/dist/src/dataset/presentation.d.ts +3 -0
- package/dist/src/dataset/presentation.js +8 -0
- package/dist/src/dataset/projections.d.ts +42 -0
- package/dist/src/dataset/projections.js +192 -0
- package/dist/src/dataset/schema-governance.d.ts +71 -0
- package/dist/src/dataset/schema-governance.js +135 -0
- package/dist/src/dataset/standards-types.d.ts +66 -0
- package/dist/src/dataset/standards-types.js +10 -0
- package/dist/src/dataset/standards.d.ts +13 -0
- package/dist/src/dataset/standards.js +291 -0
- package/dist/src/dataset/types.d.ts +258 -0
- package/dist/src/dataset/types.js +2 -0
- package/dist/src/extensions/commands/definitions.js +27 -1
- package/dist/src/installation/manager.mjs +5 -1
- package/dist/src/models/model-capabilities.v1.json +11 -0
- package/dist/src/models/model-catalog.v1.json +8 -0
- package/dist/src/models/model-discovery.js +32 -0
- package/dist/src/models/provider-policy.js +3 -2
- package/dist/src/output-modes/index.js +4 -0
- package/dist/src/output-modes/registry.js +68 -24
- package/dist/src/output-modes/runtime.js +10 -8
- package/dist/src/plugin/skill-command-translator.js +1 -0
- package/dist/src/providers/capability-matrix.yaml +41 -0
- package/dist/src/providers/provider-definitions.js +72 -0
- package/dist/src/providers/provider-inventory.js +1 -0
- package/dist/src/schema/catalog.js +234 -0
- package/dist/src/schema/compatibility.js +42 -0
- package/dist/src/schema/diagnostics.js +36 -0
- package/dist/src/schema/index.js +8 -0
- package/dist/src/schema/policy.js +58 -0
- package/dist/src/schema/resolver.js +76 -0
- package/dist/src/schema/types.js +2 -0
- package/dist/src/schema/validator.js +82 -0
- package/dist/src/sessions/adapters/pi.js +141 -0
- package/dist/src/sessions/contracts.js +1 -1
- package/dist/src/sessions/index.js +1 -0
- package/dist/src/sessions/workspace-discovery.js +10 -0
- package/dist/src/storage/backends/fortemi.js +6 -0
- package/dist/src/storage/config.js +18 -4
- package/dist/src/storage/fortemi-qualification.js +106 -0
- package/dist/src/storage/index.js +1 -0
- package/dist/src/storage/types.js +1 -1
- package/package.json +3 -1
- package/schemas/dataset/conformance-manifest.v1.schema.json +35 -0
- package/schemas/dataset/conformance-receipt.v1.schema.json +22 -0
- package/schemas/dataset/dataset-contracts.v1.schema.json +117 -0
- package/schemas/dataset/dataset-deprecations.v1.schema.json +37 -0
- package/schemas/dataset/dataset-schema-governance.v1.schema.json +92 -0
- package/schemas/dataset/dataset-standards-exchange.v1.schema.json +59 -0
- package/schemas/dataset/profiles/openlineage-1.0.0.schema.json +15 -0
- package/schemas/dataset/profiles/prov-json-20130430.schema.json +12 -0
- package/schemas/dataset/run-ledger.v1.schema.json +39 -0
- package/schemas/dataset/source-adapter.v1.schema.json +112 -0
- package/tools/agents/deploy-agents.mjs +9 -3
- package/tools/agents/providers/pi.mjs +176 -0
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://aiwg.io/schemas/dataset/dataset-contracts.v1.schema.json",
|
|
4
|
+
"title": "AIWG Dataset Intelligence Contracts v1",
|
|
5
|
+
"oneOf": [
|
|
6
|
+
{ "$ref": "#/$defs/DatasetSource" }, { "$ref": "#/$defs/Dataset" },
|
|
7
|
+
{ "$ref": "#/$defs/DatasetRevision" }, { "$ref": "#/$defs/Distribution" },
|
|
8
|
+
{ "$ref": "#/$defs/CapabilityProfile" }, { "$ref": "#/$defs/ProcessingPlan" },
|
|
9
|
+
{ "$ref": "#/$defs/ProcessingRun" }, { "$ref": "#/$defs/DerivedArtifact" },
|
|
10
|
+
{ "$ref": "#/$defs/ProvenanceAssertion" }, { "$ref": "#/$defs/Relationship" },
|
|
11
|
+
{ "$ref": "#/$defs/Checkpoint" }, { "$ref": "#/$defs/RunReceipt" }
|
|
12
|
+
],
|
|
13
|
+
"$defs": {
|
|
14
|
+
"contractVersion": { "const": "aiwg.dataset/v1" },
|
|
15
|
+
"id": { "type": "string", "minLength": 1, "maxLength": 1024 },
|
|
16
|
+
"scopedId": { "type": "string", "minLength": 3, "maxLength": 1024, "pattern": "^[A-Za-z][A-Za-z0-9+.-]*:.+$" },
|
|
17
|
+
"timestamp": { "type": "string", "format": "date-time" },
|
|
18
|
+
"nonNegativeInteger": { "type": "integer", "minimum": 0 },
|
|
19
|
+
"digest": {
|
|
20
|
+
"type": "object", "additionalProperties": false, "required": ["algorithm", "value"],
|
|
21
|
+
"properties": { "algorithm": { "const": "sha256" }, "value": { "type": "string", "pattern": "^[a-f0-9]{64}$" } }
|
|
22
|
+
},
|
|
23
|
+
"schemaBinding": {
|
|
24
|
+
"type": "object", "additionalProperties": false, "required": ["id", "version"],
|
|
25
|
+
"properties": { "id": { "$ref": "#/$defs/id" }, "version": { "type": "string", "minLength": 1 }, "digest": { "$ref": "#/$defs/digest" } }
|
|
26
|
+
},
|
|
27
|
+
"privacy": { "enum": ["public", "internal", "confidential", "restricted"] },
|
|
28
|
+
"artifactClass": { "enum": ["canonical", "derived", "regenerable-index", "cache", "distribution", "portable-export"] },
|
|
29
|
+
"policy": {
|
|
30
|
+
"type": "object", "additionalProperties": false,
|
|
31
|
+
"required": ["privacy", "intendedUse", "locality", "network", "authorizationRefs"],
|
|
32
|
+
"properties": {
|
|
33
|
+
"privacy": { "$ref": "#/$defs/privacy" }, "rights": { "type": "string" }, "license": { "type": "string" },
|
|
34
|
+
"retention": { "type": "object", "additionalProperties": false, "required": ["policy"], "properties": { "policy": { "type": "string", "minLength": 1 }, "expiresAt": { "$ref": "#/$defs/timestamp" } } },
|
|
35
|
+
"intendedUse": { "type": "array", "items": { "type": "string", "minLength": 1 }, "uniqueItems": true },
|
|
36
|
+
"locality": { "enum": ["local-only", "approved-regions", "unrestricted"] },
|
|
37
|
+
"network": { "enum": ["offline", "allowlisted", "online"] },
|
|
38
|
+
"authorizationRefs": { "type": "array", "items": { "$ref": "#/$defs/id" }, "uniqueItems": true }
|
|
39
|
+
},
|
|
40
|
+
"propertyNames": { "not": { "pattern": "^(password|passwd|secret|token|api[-_]?key|private[-_]?key|credential)s?$" } }
|
|
41
|
+
},
|
|
42
|
+
"adapter": {
|
|
43
|
+
"type": "object", "additionalProperties": false, "required": ["id", "version", "configDigest"],
|
|
44
|
+
"properties": { "id": { "$ref": "#/$defs/id" }, "version": { "type": "string", "minLength": 1 }, "configDigest": { "$ref": "#/$defs/digest" } }
|
|
45
|
+
},
|
|
46
|
+
"evidence": {
|
|
47
|
+
"type": "object", "additionalProperties": false, "required": ["locator", "method", "confidence", "privacy"],
|
|
48
|
+
"properties": { "locator": { "$ref": "#/$defs/id" }, "method": { "type": "string", "minLength": 1 }, "confidence": { "type": "number", "minimum": 0, "maximum": 1 }, "privacy": { "$ref": "#/$defs/privacy" } }
|
|
49
|
+
},
|
|
50
|
+
"baseProperties": {
|
|
51
|
+
"contractVersion": { "$ref": "#/$defs/contractVersion" }, "id": { "$ref": "#/$defs/id" }
|
|
52
|
+
},
|
|
53
|
+
"DatasetSource": {
|
|
54
|
+
"type": "object", "additionalProperties": false, "required": ["contractVersion", "kind", "id", "sourceType", "locator", "policy", "adapter"],
|
|
55
|
+
"properties": { "contractVersion": { "$ref": "#/$defs/contractVersion" }, "kind": { "const": "DatasetSource" }, "id": { "$ref": "#/$defs/id" }, "sourceType": { "type": "string", "minLength": 1 }, "locator": { "$ref": "#/$defs/id" }, "policy": { "$ref": "#/$defs/policy" }, "schema": { "$ref": "#/$defs/schemaBinding" }, "adapter": { "$ref": "#/$defs/adapter" } }
|
|
56
|
+
},
|
|
57
|
+
"Dataset": {
|
|
58
|
+
"type": "object", "additionalProperties": false, "required": ["contractVersion", "kind", "id", "artifactClass", "logicalId", "title", "owner", "policy"],
|
|
59
|
+
"properties": { "contractVersion": { "$ref": "#/$defs/contractVersion" }, "kind": { "const": "Dataset" }, "id": { "$ref": "#/$defs/id" }, "artifactClass": { "const": "canonical" }, "logicalId": { "$ref": "#/$defs/id" }, "title": { "type": "string", "minLength": 1 }, "description": { "type": "string" }, "owner": { "$ref": "#/$defs/id" }, "policy": { "$ref": "#/$defs/policy" } }
|
|
60
|
+
},
|
|
61
|
+
"DatasetRevision": {
|
|
62
|
+
"type": "object", "additionalProperties": false, "required": ["contractVersion", "kind", "id", "artifactClass", "datasetId", "revisionId", "manifestDigest", "sourceIds", "createdAt"],
|
|
63
|
+
"properties": { "contractVersion": { "$ref": "#/$defs/contractVersion" }, "kind": { "const": "DatasetRevision" }, "id": { "$ref": "#/$defs/id" }, "artifactClass": { "const": "canonical" }, "datasetId": { "$ref": "#/$defs/id" }, "revisionId": { "$ref": "#/$defs/id" }, "manifestDigest": { "$ref": "#/$defs/digest" }, "contentDigest": { "$ref": "#/$defs/digest" }, "sourceIds": { "type": "array", "minItems": 1, "uniqueItems": true, "items": { "$ref": "#/$defs/id" } }, "createdAt": { "$ref": "#/$defs/timestamp" }, "schema": { "$ref": "#/$defs/schemaBinding" } }
|
|
64
|
+
},
|
|
65
|
+
"Distribution": {
|
|
66
|
+
"type": "object", "additionalProperties": false, "required": ["contractVersion", "kind", "id", "datasetRevisionId", "artifactClass", "mediaType", "locator", "digest"],
|
|
67
|
+
"properties": { "contractVersion": { "$ref": "#/$defs/contractVersion" }, "kind": { "const": "Distribution" }, "id": { "$ref": "#/$defs/id" }, "datasetRevisionId": { "$ref": "#/$defs/id" }, "artifactClass": { "enum": ["distribution", "portable-export"] }, "mediaType": { "type": "string", "minLength": 1 }, "locator": { "$ref": "#/$defs/id" }, "digest": { "$ref": "#/$defs/digest" }, "schema": { "$ref": "#/$defs/schemaBinding" } }
|
|
68
|
+
},
|
|
69
|
+
"capabilitySpec": {
|
|
70
|
+
"type": "object", "additionalProperties": false, "required": ["name", "requirement", "degradation"],
|
|
71
|
+
"properties": { "name": { "$ref": "#/$defs/id" }, "requirement": { "enum": ["required", "optional"] }, "acceptedVersions": { "type": "array", "items": { "type": "string", "minLength": 1 }, "uniqueItems": true }, "degradation": { "type": "object", "additionalProperties": false, "required": ["action"], "properties": { "action": { "enum": ["fail", "disable", "fallback"] }, "fallbackCapability": { "$ref": "#/$defs/id" }, "reason": { "type": "string" } } } }
|
|
72
|
+
},
|
|
73
|
+
"CapabilityProfile": {
|
|
74
|
+
"type": "object", "additionalProperties": false, "required": ["contractVersion", "kind", "id", "capabilities"],
|
|
75
|
+
"properties": { "contractVersion": { "$ref": "#/$defs/contractVersion" }, "kind": { "const": "CapabilityProfile" }, "id": { "$ref": "#/$defs/id" }, "capabilities": { "type": "array", "items": { "$ref": "#/$defs/capabilitySpec" } } }
|
|
76
|
+
},
|
|
77
|
+
"processingStep": {
|
|
78
|
+
"type": "object", "additionalProperties": false, "required": ["id", "operation", "implementation", "configDigest"],
|
|
79
|
+
"properties": { "id": { "$ref": "#/$defs/id" }, "operation": { "type": "string", "minLength": 1 }, "implementation": { "type": "object", "additionalProperties": false, "required": ["id", "version"], "properties": { "id": { "$ref": "#/$defs/id" }, "version": { "type": "string", "minLength": 1 }, "digest": { "$ref": "#/$defs/digest" } } }, "inputSchema": { "$ref": "#/$defs/schemaBinding" }, "outputSchema": { "$ref": "#/$defs/schemaBinding" }, "configDigest": { "$ref": "#/$defs/digest" } }
|
|
80
|
+
},
|
|
81
|
+
"ProcessingPlan": {
|
|
82
|
+
"type": "object", "additionalProperties": false, "required": ["contractVersion", "kind", "id", "datasetRevisionId", "capabilityProfileId", "steps", "artifactClasses", "createdBy", "source", "adapter", "schemas", "capabilities", "capabilityDecision", "policy", "execution", "estimates", "approvals", "planDigest"],
|
|
83
|
+
"properties": { "contractVersion": { "$ref": "#/$defs/contractVersion" }, "kind": { "const": "ProcessingPlan" }, "id": { "$ref": "#/$defs/id" }, "datasetRevisionId": { "$ref": "#/$defs/id" }, "capabilityProfileId": { "$ref": "#/$defs/id" }, "steps": { "type": "array", "minItems": 1, "items": { "$ref": "#/$defs/processingStep" } }, "artifactClasses": { "type": "array", "minItems": 1, "uniqueItems": true, "items": { "$ref": "#/$defs/artifactClass" } }, "createdBy": { "$ref": "#/$defs/id" }, "source": { "type": "object", "additionalProperties": false, "required": ["id", "revisionId", "identity"], "properties": { "id": { "$ref": "#/$defs/id" }, "revisionId": { "$ref": "#/$defs/id" }, "identity": { "$ref": "#/$defs/id" } } }, "adapter": { "type": "object", "additionalProperties": false, "required": ["id", "version", "configDigest"], "properties": { "id": { "$ref": "#/$defs/id" }, "version": { "type": "string", "minLength": 1 }, "configDigest": { "$ref": "#/$defs/digest" } } }, "schemas": { "type": "array", "items": { "$ref": "#/$defs/schemaBinding" } }, "capabilities": { "type": "array", "items": { "$ref": "#/$defs/capabilitySpec" } }, "capabilityDecision": { "type": "object", "additionalProperties": false, "required": ["contractVersion", "satisfied", "degraded"], "properties": { "contractVersion": { "$ref": "#/$defs/contractVersion" }, "satisfied": { "type": "array", "items": { "type": "string" } }, "degraded": { "type": "array", "items": { "type": "object" } } } }, "policy": { "$ref": "#/$defs/policy" }, "execution": { "type": "object", "additionalProperties": false, "required": ["locality", "backend"], "properties": { "locality": { "enum": ["local", "remote"] }, "backend": { "type": "string", "minLength": 1 }, "fallback": { "type": "string", "minLength": 1 } } }, "estimates": { "type": "object", "additionalProperties": false, "required": ["reads", "writes"], "properties": { "reads": { "type": "integer", "minimum": 0 }, "writes": { "type": "integer", "minimum": 0 }, "bytes": { "type": "integer", "minimum": 0 }, "cost": { "type": "number", "minimum": 0 }, "currency": { "type": "string" } } }, "approvals": { "type": "array", "items": { "type": "object", "additionalProperties": false, "required": ["id", "required", "reason"], "properties": { "id": { "$ref": "#/$defs/id" }, "required": { "type": "boolean" }, "reason": { "type": "string", "minLength": 1 }, "threshold": { "type": "number", "minimum": 0 } } } }, "reconciliation": { "type": "object", "additionalProperties": false, "required": ["tombstones", "previewDigest", "approvalThreshold"], "properties": { "tombstones": { "type": "integer", "minimum": 0 }, "previewDigest": { "$ref": "#/$defs/digest" }, "approvalThreshold": { "type": "number", "minimum": 0 } } }, "planDigest": { "$ref": "#/$defs/digest" } }
|
|
84
|
+
},
|
|
85
|
+
"runOutcome": { "enum": ["preview", "attempted", "committed", "rejected", "cancelled", "failed"] },
|
|
86
|
+
"ProcessingRun": {
|
|
87
|
+
"type": "object", "additionalProperties": false, "required": ["contractVersion", "kind", "id", "runId", "planId", "planDigest", "attempt", "outcome", "startedAt", "executor"],
|
|
88
|
+
"properties": { "contractVersion": { "$ref": "#/$defs/contractVersion" }, "kind": { "const": "ProcessingRun" }, "id": { "$ref": "#/$defs/id" }, "runId": { "$ref": "#/$defs/scopedId" }, "planId": { "$ref": "#/$defs/id" }, "planDigest": { "$ref": "#/$defs/digest" }, "attempt": { "type": "integer", "minimum": 1 }, "outcome": { "$ref": "#/$defs/runOutcome" }, "startedAt": { "$ref": "#/$defs/timestamp" }, "endedAt": { "$ref": "#/$defs/timestamp" }, "executor": { "type": "object", "additionalProperties": false, "required": ["id", "version"], "properties": { "id": { "$ref": "#/$defs/id" }, "version": { "type": "string", "minLength": 1 } } }, "diagnosticCodes": { "type": "array", "items": { "type": "string", "minLength": 1 }, "uniqueItems": true } }
|
|
89
|
+
},
|
|
90
|
+
"DerivedArtifact": {
|
|
91
|
+
"type": "object", "additionalProperties": false, "required": ["contractVersion", "kind", "id", "artifactClass", "sourceRevisionId", "runId", "locator", "digest", "regenerable"],
|
|
92
|
+
"properties": { "contractVersion": { "$ref": "#/$defs/contractVersion" }, "kind": { "const": "DerivedArtifact" }, "id": { "$ref": "#/$defs/id" }, "artifactClass": { "enum": ["derived", "regenerable-index", "cache", "distribution", "portable-export"] }, "sourceRevisionId": { "$ref": "#/$defs/id" }, "runId": { "$ref": "#/$defs/scopedId" }, "locator": { "$ref": "#/$defs/id" }, "digest": { "$ref": "#/$defs/digest" }, "schema": { "$ref": "#/$defs/schemaBinding" }, "regenerable": { "type": "boolean" } }
|
|
93
|
+
},
|
|
94
|
+
"ProvenanceAssertion": {
|
|
95
|
+
"type": "object", "additionalProperties": false, "required": ["contractVersion", "kind", "id", "basis", "subjectId", "predicate", "objectId", "evidence", "assertedBy", "assertedAt"],
|
|
96
|
+
"properties": { "contractVersion": { "$ref": "#/$defs/contractVersion" }, "kind": { "const": "ProvenanceAssertion" }, "id": { "$ref": "#/$defs/id" }, "basis": { "enum": ["declared", "observed", "imported", "inferred"] }, "subjectId": { "$ref": "#/$defs/id" }, "predicate": { "type": "string", "minLength": 1 }, "objectId": { "$ref": "#/$defs/id" }, "sourceRevisionId": { "$ref": "#/$defs/id" }, "runId": { "$ref": "#/$defs/scopedId" }, "evidence": { "type": "array", "items": { "$ref": "#/$defs/evidence" } }, "assertedBy": { "$ref": "#/$defs/id" }, "assertedAt": { "$ref": "#/$defs/timestamp" } },
|
|
97
|
+
"allOf": [{ "if": { "properties": { "basis": { "const": "observed" } }, "required": ["basis"] }, "then": { "properties": { "runId": {} }, "required": ["runId"] } }]
|
|
98
|
+
},
|
|
99
|
+
"Relationship": {
|
|
100
|
+
"type": "object", "additionalProperties": false, "required": ["contractVersion", "kind", "id", "relationshipType", "direction", "sourceId", "targetId", "basis", "evidence"],
|
|
101
|
+
"properties": { "contractVersion": { "$ref": "#/$defs/contractVersion" }, "kind": { "const": "Relationship" }, "id": { "$ref": "#/$defs/id" }, "relationshipType": { "type": "string", "minLength": 1 }, "direction": { "enum": ["outbound", "inbound"] }, "sourceId": { "$ref": "#/$defs/id" }, "targetId": { "$ref": "#/$defs/id" }, "basis": { "enum": ["declared", "observed", "imported", "inferred"] }, "sourceRevisionId": { "$ref": "#/$defs/id" }, "runId": { "$ref": "#/$defs/scopedId" }, "evidence": { "type": "array", "items": { "$ref": "#/$defs/evidence" } } },
|
|
102
|
+
"allOf": [{ "if": { "properties": { "basis": { "const": "observed" } }, "required": ["basis"] }, "then": { "properties": { "runId": {} }, "required": ["runId"] } }]
|
|
103
|
+
},
|
|
104
|
+
"Checkpoint": {
|
|
105
|
+
"type": "object", "additionalProperties": false, "required": ["contractVersion", "kind", "id", "sourceId", "sourceSchema", "adapter", "planDigest", "opaqueCursor", "createdAt"],
|
|
106
|
+
"properties": { "contractVersion": { "$ref": "#/$defs/contractVersion" }, "kind": { "const": "Checkpoint" }, "id": { "$ref": "#/$defs/id" }, "sourceId": { "$ref": "#/$defs/id" }, "sourceSchema": { "$ref": "#/$defs/schemaBinding" }, "adapter": { "type": "object", "additionalProperties": false, "required": ["id", "version"], "properties": { "id": { "$ref": "#/$defs/id" }, "version": { "type": "string", "minLength": 1 } } }, "planDigest": { "$ref": "#/$defs/digest" }, "opaqueCursor": { "type": "string", "minLength": 1 }, "priorCommittedReceiptId": { "$ref": "#/$defs/id" }, "createdAt": { "$ref": "#/$defs/timestamp" } }
|
|
107
|
+
},
|
|
108
|
+
"RunReceipt": {
|
|
109
|
+
"type": "object", "additionalProperties": false, "required": ["contractVersion", "kind", "id", "runId", "planId", "planDigest", "outcome", "committed", "attemptedRecords", "committedRecords", "rejectedRecords", "receiptDigest", "createdAt"],
|
|
110
|
+
"properties": { "contractVersion": { "$ref": "#/$defs/contractVersion" }, "kind": { "const": "RunReceipt" }, "id": { "$ref": "#/$defs/id" }, "runId": { "$ref": "#/$defs/scopedId" }, "planId": { "$ref": "#/$defs/id" }, "planDigest": { "$ref": "#/$defs/digest" }, "outcome": { "$ref": "#/$defs/runOutcome" }, "committed": { "type": "boolean" }, "attemptedRecords": { "$ref": "#/$defs/nonNegativeInteger" }, "committedRecords": { "$ref": "#/$defs/nonNegativeInteger" }, "rejectedRecords": { "$ref": "#/$defs/nonNegativeInteger" }, "checkpointBeforeId": { "$ref": "#/$defs/id" }, "checkpointAfterId": { "$ref": "#/$defs/id" }, "priorCommittedReceiptId": { "$ref": "#/$defs/id" }, "receiptDigest": { "$ref": "#/$defs/digest" }, "createdAt": { "$ref": "#/$defs/timestamp" }, "diagnosticCodes": { "type": "array", "items": { "type": "string", "minLength": 1 }, "uniqueItems": true } },
|
|
111
|
+
"allOf": [
|
|
112
|
+
{ "if": { "properties": { "outcome": { "const": "committed" } }, "required": ["outcome"] }, "then": { "properties": { "committed": { "const": true } } } },
|
|
113
|
+
{ "if": { "not": { "properties": { "outcome": { "const": "committed" } }, "required": ["outcome"] } }, "then": { "properties": { "committed": { "const": false } } } }
|
|
114
|
+
]
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://aiwg.io/schemas/dataset/dataset-deprecations.v1.schema.json",
|
|
4
|
+
"title": "Dataset deprecation inventory v1",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"additionalProperties": false,
|
|
7
|
+
"required": ["schemaVersion", "updatedAt", "entries"],
|
|
8
|
+
"properties": {
|
|
9
|
+
"$schema": { "const": "https://aiwg.io/schemas/dataset/dataset-deprecations.v1.schema.json" },
|
|
10
|
+
"schemaVersion": { "const": "aiwg.dataset-deprecations/v1" },
|
|
11
|
+
"updatedAt": { "type": "string", "format": "date" },
|
|
12
|
+
"entries": {
|
|
13
|
+
"type": "array",
|
|
14
|
+
"items": { "$ref": "#/$defs/entry" }
|
|
15
|
+
}
|
|
16
|
+
},
|
|
17
|
+
"$defs": {
|
|
18
|
+
"nonEmpty": { "type": "string", "minLength": 1 },
|
|
19
|
+
"entry": {
|
|
20
|
+
"type": "object",
|
|
21
|
+
"additionalProperties": false,
|
|
22
|
+
"required": ["id", "legacySurface", "replacement", "status", "deprecationRelease", "deprecationDate", "supportWindow", "detector", "rollback", "removalCriteria"],
|
|
23
|
+
"properties": {
|
|
24
|
+
"id": { "$ref": "#/$defs/nonEmpty" },
|
|
25
|
+
"legacySurface": { "$ref": "#/$defs/nonEmpty" },
|
|
26
|
+
"replacement": { "$ref": "#/$defs/nonEmpty" },
|
|
27
|
+
"status": { "enum": ["announced", "deprecated", "removal-eligible", "retired"] },
|
|
28
|
+
"deprecationRelease": { "$ref": "#/$defs/nonEmpty" },
|
|
29
|
+
"deprecationDate": { "type": "string", "format": "date" },
|
|
30
|
+
"supportWindow": { "$ref": "#/$defs/nonEmpty" },
|
|
31
|
+
"detector": { "$ref": "#/$defs/nonEmpty" },
|
|
32
|
+
"rollback": { "$ref": "#/$defs/nonEmpty" },
|
|
33
|
+
"removalCriteria": { "type": "array", "minItems": 1, "items": { "$ref": "#/$defs/nonEmpty" } }
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
}
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://aiwg.io/schemas/dataset/dataset-schema-governance.v1.schema.json",
|
|
4
|
+
"title": "AIWG Dataset Schema Governance Records v1",
|
|
5
|
+
"oneOf": [
|
|
6
|
+
{ "$ref": "#/$defs/DatasetSchemaCandidate" },
|
|
7
|
+
{ "$ref": "#/$defs/DatasetSchemaPromotionReceipt" },
|
|
8
|
+
{ "$ref": "#/$defs/DatasetSchemaImpactReport" },
|
|
9
|
+
{ "$ref": "#/$defs/AdapterManifest" },
|
|
10
|
+
{ "$ref": "#/$defs/AdapterConfiguration" },
|
|
11
|
+
{ "$ref": "#/$defs/DiscoveredRecord" },
|
|
12
|
+
{ "$ref": "#/$defs/ExchangeProfile" }
|
|
13
|
+
],
|
|
14
|
+
"$defs": {
|
|
15
|
+
"version": { "const": "aiwg.dataset-schema-governance/v1" },
|
|
16
|
+
"id": { "type": "string", "minLength": 1, "maxLength": 2048 },
|
|
17
|
+
"timestamp": { "type": "string", "format": "date-time" },
|
|
18
|
+
"digest": {
|
|
19
|
+
"type": "object", "additionalProperties": false, "required": ["algorithm", "value"],
|
|
20
|
+
"properties": { "algorithm": { "const": "sha256" }, "value": { "type": "string", "pattern": "^[a-f0-9]{64}$" } }
|
|
21
|
+
},
|
|
22
|
+
"schemaBinding": {
|
|
23
|
+
"type": "object", "additionalProperties": false, "required": ["id", "version", "digest"],
|
|
24
|
+
"properties": { "id": { "$ref": "#/$defs/id" }, "version": { "type": "string", "minLength": 1 }, "digest": { "$ref": "#/$defs/digest" } }
|
|
25
|
+
},
|
|
26
|
+
"compatibility": {
|
|
27
|
+
"type": "object", "additionalProperties": false, "required": ["status", "reasons"],
|
|
28
|
+
"properties": {
|
|
29
|
+
"status": { "enum": ["compatible", "breaking", "unknown"] },
|
|
30
|
+
"baseline": { "$ref": "#/$defs/id" },
|
|
31
|
+
"reasons": { "type": "array", "minItems": 1, "items": { "type": "string", "minLength": 1 } }
|
|
32
|
+
}
|
|
33
|
+
},
|
|
34
|
+
"DatasetSchemaCandidate": {
|
|
35
|
+
"type": "object", "additionalProperties": false,
|
|
36
|
+
"required": ["schemaVersion", "kind", "id", "status", "sourceRevisionId", "inferredSchema", "inferredSchemaDigest", "inference", "observedAt"],
|
|
37
|
+
"properties": {
|
|
38
|
+
"schemaVersion": { "$ref": "#/$defs/version" }, "kind": { "const": "DatasetSchemaCandidate" }, "id": { "$ref": "#/$defs/id" }, "status": { "const": "candidate" },
|
|
39
|
+
"sourceRevisionId": { "$ref": "#/$defs/id" }, "inferredSchema": { "type": "object" }, "inferredSchemaDigest": { "$ref": "#/$defs/digest" },
|
|
40
|
+
"inference": {
|
|
41
|
+
"type": "object", "additionalProperties": false, "required": ["method", "tool", "toolVersion"],
|
|
42
|
+
"properties": { "method": { "type": "string", "minLength": 1 }, "tool": { "$ref": "#/$defs/id" }, "toolVersion": { "type": "string", "minLength": 1 }, "runId": { "$ref": "#/$defs/id" } }
|
|
43
|
+
},
|
|
44
|
+
"observedAt": { "$ref": "#/$defs/timestamp" }
|
|
45
|
+
}
|
|
46
|
+
},
|
|
47
|
+
"DatasetSchemaPromotionReceipt": {
|
|
48
|
+
"type": "object", "additionalProperties": false,
|
|
49
|
+
"required": ["schemaVersion", "kind", "id", "status", "candidateId", "candidateDigest", "promotedSchema", "reviewer", "reviewedAt", "decisionEvidence", "compatibility"],
|
|
50
|
+
"properties": {
|
|
51
|
+
"schemaVersion": { "$ref": "#/$defs/version" }, "kind": { "const": "DatasetSchemaPromotionReceipt" }, "id": { "$ref": "#/$defs/id" }, "status": { "const": "promoted" },
|
|
52
|
+
"candidateId": { "$ref": "#/$defs/id" }, "candidateDigest": { "$ref": "#/$defs/digest" }, "promotedSchema": { "$ref": "#/$defs/schemaBinding" },
|
|
53
|
+
"reviewer": { "$ref": "#/$defs/id" }, "reviewedAt": { "$ref": "#/$defs/timestamp" }, "decisionEvidence": { "$ref": "#/$defs/id" }, "compatibility": { "$ref": "#/$defs/compatibility" }
|
|
54
|
+
}
|
|
55
|
+
},
|
|
56
|
+
"impactTarget": {
|
|
57
|
+
"type": "object", "additionalProperties": false, "required": ["target", "disposition", "reason"],
|
|
58
|
+
"properties": {
|
|
59
|
+
"target": { "enum": ["adapter", "checkpoint-state", "processing-plan", "index", "derived-artifact", "consumer"] },
|
|
60
|
+
"disposition": { "enum": ["compatible", "review-required", "migration-required"] }, "reason": { "type": "string", "minLength": 1 }
|
|
61
|
+
}
|
|
62
|
+
},
|
|
63
|
+
"DatasetSchemaImpactReport": {
|
|
64
|
+
"type": "object", "additionalProperties": false,
|
|
65
|
+
"required": ["schemaVersion", "kind", "schemaId", "baseline", "compatibility", "targets"],
|
|
66
|
+
"properties": {
|
|
67
|
+
"schemaVersion": { "$ref": "#/$defs/version" }, "kind": { "const": "DatasetSchemaImpactReport" }, "schemaId": { "$ref": "#/$defs/id" }, "baseline": { "$ref": "#/$defs/id" },
|
|
68
|
+
"compatibility": { "$ref": "#/$defs/compatibility" }, "targets": { "type": "array", "minItems": 6, "maxItems": 6, "items": { "$ref": "#/$defs/impactTarget" } }
|
|
69
|
+
}
|
|
70
|
+
},
|
|
71
|
+
"AdapterManifest": {
|
|
72
|
+
"type": "object", "additionalProperties": false, "required": ["schemaVersion", "kind", "id", "adapterVersion", "configSchema", "recordSchema", "checkpointSchema", "capabilities"],
|
|
73
|
+
"properties": {
|
|
74
|
+
"schemaVersion": { "$ref": "#/$defs/version" }, "kind": { "const": "AdapterManifest" }, "id": { "$ref": "#/$defs/id" }, "adapterVersion": { "type": "string", "minLength": 1 },
|
|
75
|
+
"configSchema": { "$ref": "#/$defs/schemaBinding" }, "recordSchema": { "$ref": "#/$defs/schemaBinding" }, "checkpointSchema": { "$ref": "#/$defs/schemaBinding" },
|
|
76
|
+
"capabilities": { "type": "array", "items": { "type": "string", "minLength": 1 }, "uniqueItems": true }
|
|
77
|
+
}
|
|
78
|
+
},
|
|
79
|
+
"AdapterConfiguration": {
|
|
80
|
+
"type": "object", "additionalProperties": false, "required": ["schemaVersion", "kind", "id", "adapterId", "binding", "values"],
|
|
81
|
+
"properties": { "schemaVersion": { "$ref": "#/$defs/version" }, "kind": { "const": "AdapterConfiguration" }, "id": { "$ref": "#/$defs/id" }, "adapterId": { "$ref": "#/$defs/id" }, "binding": { "$ref": "#/$defs/schemaBinding" }, "values": { "type": "object", "propertyNames": { "not": { "pattern": "^(password|passwd|secret|token|api[-_]?key|private[-_]?key|credential)s?$" } } } }
|
|
82
|
+
},
|
|
83
|
+
"DiscoveredRecord": {
|
|
84
|
+
"type": "object", "additionalProperties": false, "required": ["schemaVersion", "kind", "id", "sourceRevisionId", "binding", "recordDigest", "value"],
|
|
85
|
+
"properties": { "schemaVersion": { "$ref": "#/$defs/version" }, "kind": { "const": "DiscoveredRecord" }, "id": { "$ref": "#/$defs/id" }, "sourceRevisionId": { "$ref": "#/$defs/id" }, "binding": { "$ref": "#/$defs/schemaBinding" }, "recordDigest": { "$ref": "#/$defs/digest" }, "value": {} }
|
|
86
|
+
},
|
|
87
|
+
"ExchangeProfile": {
|
|
88
|
+
"type": "object", "additionalProperties": false, "required": ["schemaVersion", "kind", "id", "standard", "standardVersion", "binding", "direction", "lossPolicy"],
|
|
89
|
+
"properties": { "schemaVersion": { "$ref": "#/$defs/version" }, "kind": { "const": "ExchangeProfile" }, "id": { "$ref": "#/$defs/id" }, "standard": { "type": "string", "minLength": 1 }, "standardVersion": { "type": "string", "minLength": 1 }, "binding": { "$ref": "#/$defs/schemaBinding" }, "direction": { "enum": ["import", "export", "round-trip"] }, "lossPolicy": { "enum": ["lossless", "report", "reject"] } }
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://aiwg.io/schemas/dataset/dataset-standards-exchange.v1.schema.json",
|
|
4
|
+
"title": "AIWG Dataset Standards Exchange v1",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"required": ["schemaVersion", "profile", "value", "loss"],
|
|
7
|
+
"properties": {
|
|
8
|
+
"schemaVersion": { "const": "aiwg.dataset-standards-exchange/v1" },
|
|
9
|
+
"profile": {
|
|
10
|
+
"type": "object", "required": ["id", "version"], "additionalProperties": false,
|
|
11
|
+
"properties": { "id": { "type": "string", "minLength": 1 }, "version": { "type": "string", "minLength": 1 } }
|
|
12
|
+
},
|
|
13
|
+
"value": {},
|
|
14
|
+
"loss": { "$ref": "#/$defs/lossReport" }
|
|
15
|
+
},
|
|
16
|
+
"additionalProperties": false,
|
|
17
|
+
"$defs": {
|
|
18
|
+
"schemaReference": {
|
|
19
|
+
"type": "object", "required": ["id", "version"], "additionalProperties": false,
|
|
20
|
+
"properties": { "id": { "type": "string", "format": "uri" }, "version": { "type": "string", "minLength": 1 } }
|
|
21
|
+
},
|
|
22
|
+
"profileDescriptor": {
|
|
23
|
+
"type": "object",
|
|
24
|
+
"required": ["id", "standard", "version", "direction", "inputSchema", "outputSchema", "mappingImplementation", "supportedFeatures", "roundTripFields", "extensionNamespace", "unknownExtensionPolicy", "maturity", "useCases", "coverageBoundary"],
|
|
25
|
+
"additionalProperties": false,
|
|
26
|
+
"properties": {
|
|
27
|
+
"id": { "type": "string", "minLength": 1 },
|
|
28
|
+
"standard": { "enum": ["w3c-prov-json", "openlineage", "dcat", "croissant", "data-package", "ro-crate"] },
|
|
29
|
+
"version": { "type": "string", "minLength": 1 },
|
|
30
|
+
"direction": { "enum": ["import", "export", "round-trip"] },
|
|
31
|
+
"inputSchema": { "$ref": "#/$defs/schemaReference" }, "outputSchema": { "$ref": "#/$defs/schemaReference" },
|
|
32
|
+
"mappingImplementation": { "type": "string", "minLength": 1 },
|
|
33
|
+
"supportedFeatures": { "type": "array", "items": { "type": "string" }, "uniqueItems": true },
|
|
34
|
+
"roundTripFields": { "type": "array", "items": { "type": "string" }, "uniqueItems": true },
|
|
35
|
+
"extensionNamespace": { "type": "string", "format": "uri", "pattern": "/$" },
|
|
36
|
+
"unknownExtensionPolicy": { "enum": ["preserve", "report", "reject"] },
|
|
37
|
+
"maturity": { "enum": ["stable", "candidate", "descriptor-only"] },
|
|
38
|
+
"useCases": { "type": "array", "minItems": 1, "items": { "type": "string", "minLength": 1 } },
|
|
39
|
+
"coverageBoundary": { "type": "string", "minLength": 1 }
|
|
40
|
+
}
|
|
41
|
+
},
|
|
42
|
+
"lossItem": {
|
|
43
|
+
"type": "object", "required": ["category", "reason"], "additionalProperties": false,
|
|
44
|
+
"properties": {
|
|
45
|
+
"category": { "enum": ["mapped", "omitted", "synthesized", "unsupported", "extension-carried"] },
|
|
46
|
+
"sourcePath": { "type": "string" }, "targetPath": { "type": "string" }, "reason": { "type": "string", "minLength": 1 }, "extensionNamespace": { "type": "string", "format": "uri" }
|
|
47
|
+
}
|
|
48
|
+
},
|
|
49
|
+
"lossReport": {
|
|
50
|
+
"type": "object", "required": ["schemaVersion", "profileId", "profileVersion", "direction", "sourceDigest", "items", "counts"], "additionalProperties": false,
|
|
51
|
+
"properties": {
|
|
52
|
+
"schemaVersion": { "const": "aiwg.dataset-standards-exchange/v1" }, "profileId": { "type": "string" }, "profileVersion": { "type": "string" }, "direction": { "enum": ["import", "export"] },
|
|
53
|
+
"sourceDigest": { "type": "object", "required": ["algorithm", "value"], "additionalProperties": false, "properties": { "algorithm": { "const": "sha256" }, "value": { "type": "string", "pattern": "^[a-f0-9]{64}$" } } },
|
|
54
|
+
"items": { "type": "array", "items": { "$ref": "#/$defs/lossItem" } },
|
|
55
|
+
"counts": { "type": "object", "required": ["mapped", "omitted", "synthesized", "unsupported", "extension-carried"], "additionalProperties": false, "properties": { "mapped": { "type": "integer", "minimum": 0 }, "omitted": { "type": "integer", "minimum": 0 }, "synthesized": { "type": "integer", "minimum": 0 }, "unsupported": { "type": "integer", "minimum": 0 }, "extension-carried": { "type": "integer", "minimum": 0 } } }
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://aiwg.io/schemas/dataset/profiles/openlineage-1.0.0.schema.json",
|
|
4
|
+
"title": "OpenLineage RunEvent 1.0.0 supported profile",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"required": ["eventTime", "eventType", "run", "job"],
|
|
7
|
+
"properties": {
|
|
8
|
+
"eventTime": { "type": "string", "format": "date-time" }, "eventType": { "enum": ["START", "RUNNING", "COMPLETE", "ABORT", "FAIL", "OTHER"] },
|
|
9
|
+
"run": { "type": "object", "required": ["runId"], "properties": { "runId": { "type": "string", "minLength": 1 }, "facets": { "type": "object" } }, "additionalProperties": false },
|
|
10
|
+
"job": { "$ref": "#/$defs/named" }, "inputs": { "type": "array", "items": { "$ref": "#/$defs/named" } }, "outputs": { "type": "array", "items": { "$ref": "#/$defs/named" } },
|
|
11
|
+
"producer": { "type": "string", "format": "uri" }, "schemaURL": { "type": "string", "format": "uri" }
|
|
12
|
+
},
|
|
13
|
+
"additionalProperties": true,
|
|
14
|
+
"$defs": { "named": { "type": "object", "required": ["namespace", "name"], "properties": { "namespace": { "type": "string" }, "name": { "type": "string" }, "facets": { "type": "object" } }, "additionalProperties": false } }
|
|
15
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://aiwg.io/schemas/dataset/profiles/prov-json-20130430.schema.json",
|
|
4
|
+
"title": "W3C PROV-JSON 2013-04-30 supported profile",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"properties": {
|
|
7
|
+
"prefix": { "type": "object" }, "entity": { "$ref": "#/$defs/map" }, "activity": { "$ref": "#/$defs/map" }, "agent": { "$ref": "#/$defs/map" },
|
|
8
|
+
"wasDerivedFrom": { "$ref": "#/$defs/map" }, "wasGeneratedBy": { "$ref": "#/$defs/map" }, "used": { "$ref": "#/$defs/map" }, "wasAttributedTo": { "$ref": "#/$defs/map" }, "wasAssociatedWith": { "$ref": "#/$defs/map" }, "alternateOf": { "$ref": "#/$defs/map" }
|
|
9
|
+
},
|
|
10
|
+
"additionalProperties": true,
|
|
11
|
+
"$defs": { "map": { "type": "object", "additionalProperties": { "type": "object" } } }
|
|
12
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://aiwg.io/schemas/dataset/run-ledger.v1.schema.json",
|
|
4
|
+
"title": "AIWG Canonical Run and Evidence Ledger v1",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"additionalProperties": false,
|
|
7
|
+
"required": ["schemaVersion", "eventId", "sequence", "recordedAt", "producer", "record", "eventDigest"],
|
|
8
|
+
"properties": {
|
|
9
|
+
"schemaVersion": { "const": "aiwg.run-ledger/v1" },
|
|
10
|
+
"eventId": { "$ref": "#/$defs/scopedId" },
|
|
11
|
+
"runId": { "$ref": "#/$defs/scopedId" },
|
|
12
|
+
"sequence": { "type": "integer", "minimum": 1 },
|
|
13
|
+
"recordedAt": { "type": "string", "format": "date-time" },
|
|
14
|
+
"producer": { "$ref": "#/$defs/producer" },
|
|
15
|
+
"record": { "oneOf": [
|
|
16
|
+
{ "$ref": "#/$defs/entity" }, { "$ref": "#/$defs/activity" }, { "$ref": "#/$defs/agent" },
|
|
17
|
+
{ "$ref": "#/$defs/evidence" }, { "$ref": "#/$defs/assertion" }, { "$ref": "#/$defs/correction" }, { "$ref": "#/$defs/supersession" }
|
|
18
|
+
] },
|
|
19
|
+
"eventDigest": { "$ref": "#/$defs/digest" }
|
|
20
|
+
},
|
|
21
|
+
"$defs": {
|
|
22
|
+
"id": { "type": "string", "minLength": 1, "maxLength": 2048 },
|
|
23
|
+
"scopedId": { "type": "string", "minLength": 3, "maxLength": 2048, "pattern": "^[A-Za-z][A-Za-z0-9+.-]*:.+$" },
|
|
24
|
+
"digest": { "type": "object", "additionalProperties": false, "required": ["algorithm", "value"], "properties": { "algorithm": { "const": "sha256" }, "value": { "type": "string", "pattern": "^[a-f0-9]{64}$" } } },
|
|
25
|
+
"privacy": { "enum": ["public", "internal", "confidential", "restricted"] },
|
|
26
|
+
"producer": { "type": "object", "additionalProperties": false, "required": ["id", "version"], "properties": { "id": { "$ref": "#/$defs/id" }, "version": { "type": "string", "minLength": 1 } } },
|
|
27
|
+
"locator": {
|
|
28
|
+
"type": "object", "additionalProperties": false, "required": ["scheme", "value"],
|
|
29
|
+
"properties": { "scheme": { "enum": ["file", "uri", "json-pointer", "line-column", "record-key", "external-id"] }, "value": { "$ref": "#/$defs/id" }, "field": { "type": "string", "minLength": 1 }, "line": { "type": "integer", "minimum": 1 }, "column": { "type": "integer", "minimum": 1 } }
|
|
30
|
+
},
|
|
31
|
+
"entity": { "type": "object", "additionalProperties": false, "required": ["recordType", "id", "entityType", "privacy"], "properties": { "recordType": { "const": "entity" }, "id": { "$ref": "#/$defs/id" }, "entityType": { "type": "string", "minLength": 1 }, "revision": { "type": "string", "minLength": 1 }, "digest": { "$ref": "#/$defs/digest" }, "privacy": { "$ref": "#/$defs/privacy" }, "retentionPolicy": { "type": "string", "minLength": 1 } } },
|
|
32
|
+
"activity": { "type": "object", "additionalProperties": false, "required": ["recordType", "id", "activityType"], "properties": { "recordType": { "const": "activity" }, "id": { "$ref": "#/$defs/id" }, "activityType": { "type": "string", "minLength": 1 }, "runId": { "$ref": "#/$defs/scopedId" }, "startedAt": { "type": "string", "format": "date-time" }, "endedAt": { "type": "string", "format": "date-time" }, "planDigest": { "$ref": "#/$defs/digest" } } },
|
|
33
|
+
"agent": { "type": "object", "additionalProperties": false, "required": ["recordType", "id", "principalKind"], "properties": { "recordType": { "const": "agent" }, "id": { "$ref": "#/$defs/id" }, "principalKind": { "enum": ["person", "organization", "software", "service"] }, "version": { "type": "string", "minLength": 1 } } },
|
|
34
|
+
"evidence": { "type": "object", "additionalProperties": false, "required": ["recordType", "id", "source", "method", "confidence", "privacy", "responsibleAgentId", "observedAt"], "properties": { "recordType": { "const": "evidence" }, "id": { "$ref": "#/$defs/id" }, "source": { "$ref": "#/$defs/locator" }, "target": { "$ref": "#/$defs/locator" }, "method": { "type": "string", "minLength": 1 }, "confidence": { "type": "number", "minimum": 0, "maximum": 1 }, "privacy": { "$ref": "#/$defs/privacy" }, "retentionPolicy": { "type": "string", "minLength": 1 }, "runId": { "$ref": "#/$defs/scopedId" }, "responsibleAgentId": { "$ref": "#/$defs/id" }, "observedAt": { "type": "string", "format": "date-time" } } },
|
|
35
|
+
"assertion": { "type": "object", "additionalProperties": false, "required": ["recordType", "id", "subjectId", "predicate", "objectId", "basis", "evidenceIds", "privacy"], "properties": { "recordType": { "const": "assertion" }, "id": { "$ref": "#/$defs/id" }, "subjectId": { "$ref": "#/$defs/id" }, "predicate": { "type": "string", "minLength": 1 }, "objectId": { "$ref": "#/$defs/id" }, "basis": { "enum": ["declared", "observed", "imported", "inferred"] }, "evidenceIds": { "type": "array", "items": { "$ref": "#/$defs/id" }, "uniqueItems": true }, "activityId": { "$ref": "#/$defs/id" }, "runId": { "$ref": "#/$defs/scopedId" }, "field": { "type": "string", "minLength": 1 }, "privacy": { "$ref": "#/$defs/privacy" }, "retentionPolicy": { "type": "string", "minLength": 1 } }, "allOf": [{ "if": { "properties": { "basis": { "const": "observed" } }, "required": ["basis"] }, "then": { "properties": { "runId": {}, "evidenceIds": { "type": "array", "minItems": 1 } }, "required": ["runId"] } }] },
|
|
36
|
+
"correction": { "type": "object", "additionalProperties": false, "required": ["recordType", "id", "correctsEventId", "reason", "responsibleAgentId"], "properties": { "recordType": { "const": "correction" }, "id": { "$ref": "#/$defs/id" }, "correctsEventId": { "$ref": "#/$defs/id" }, "replacementEventId": { "$ref": "#/$defs/id" }, "reason": { "type": "string", "minLength": 1 }, "responsibleAgentId": { "$ref": "#/$defs/id" } } },
|
|
37
|
+
"supersession": { "type": "object", "additionalProperties": false, "required": ["recordType", "id", "supersedesEventId", "successorEventId"], "properties": { "recordType": { "const": "supersession" }, "id": { "$ref": "#/$defs/id" }, "supersedesEventId": { "$ref": "#/$defs/id" }, "successorEventId": { "$ref": "#/$defs/id" }, "reason": { "type": "string", "minLength": 1 } } }
|
|
38
|
+
}
|
|
39
|
+
}
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://aiwg.io/schemas/dataset/source-adapter.v1.schema.json",
|
|
4
|
+
"title": "AIWG dataset source adapter contracts v1",
|
|
5
|
+
"oneOf": [
|
|
6
|
+
{ "$ref": "#/$defs/manifest" },
|
|
7
|
+
{ "$ref": "#/$defs/checkpoint" },
|
|
8
|
+
{ "$ref": "#/$defs/qualificationReport" },
|
|
9
|
+
{ "$ref": "#/$defs/configurationEnvelope" }
|
|
10
|
+
],
|
|
11
|
+
"$defs": {
|
|
12
|
+
"digest": {
|
|
13
|
+
"type": "object",
|
|
14
|
+
"additionalProperties": false,
|
|
15
|
+
"required": ["algorithm", "value"],
|
|
16
|
+
"properties": { "algorithm": { "const": "sha256" }, "value": { "type": "string", "pattern": "^[a-f0-9]{64}$" } }
|
|
17
|
+
},
|
|
18
|
+
"binding": {
|
|
19
|
+
"type": "object",
|
|
20
|
+
"additionalProperties": false,
|
|
21
|
+
"required": ["id", "version", "digest"],
|
|
22
|
+
"properties": {
|
|
23
|
+
"id": { "type": "string", "minLength": 1 },
|
|
24
|
+
"version": { "type": "string", "pattern": "^[0-9]+\\.[0-9]+\\.[0-9]+$" },
|
|
25
|
+
"digest": { "$ref": "#/$defs/digest" }
|
|
26
|
+
}
|
|
27
|
+
},
|
|
28
|
+
"schemaDeclaration": {
|
|
29
|
+
"type": "object",
|
|
30
|
+
"additionalProperties": false,
|
|
31
|
+
"required": ["id", "version", "digest", "dialect", "schema"],
|
|
32
|
+
"properties": {
|
|
33
|
+
"id": { "type": "string", "minLength": 1 },
|
|
34
|
+
"version": { "type": "string", "pattern": "^[0-9]+\\.[0-9]+\\.[0-9]+$" },
|
|
35
|
+
"digest": { "$ref": "#/$defs/digest" },
|
|
36
|
+
"dialect": { "const": "https://json-schema.org/draft/2020-12/schema" },
|
|
37
|
+
"schema": { "type": "object" }
|
|
38
|
+
}
|
|
39
|
+
},
|
|
40
|
+
"limits": {
|
|
41
|
+
"type": "object",
|
|
42
|
+
"additionalProperties": false,
|
|
43
|
+
"required": ["maxRecords", "maxBytes", "maxRecordBytes", "timeoutMs", "maxRedirects", "maxDepth"],
|
|
44
|
+
"properties": {
|
|
45
|
+
"maxRecords": { "type": "integer", "minimum": 1 }, "maxBytes": { "type": "integer", "minimum": 1 },
|
|
46
|
+
"maxRecordBytes": { "type": "integer", "minimum": 1 }, "timeoutMs": { "type": "integer", "minimum": 1 },
|
|
47
|
+
"maxRedirects": { "type": "integer", "minimum": 0 }, "maxDepth": { "type": "integer", "minimum": 1 }
|
|
48
|
+
}
|
|
49
|
+
},
|
|
50
|
+
"manifest": {
|
|
51
|
+
"type": "object",
|
|
52
|
+
"additionalProperties": false,
|
|
53
|
+
"required": ["contractVersion", "kind", "id", "version", "packageDigest", "datasetContractRange", "sourceKinds", "schemas", "capabilities", "limits", "maturity", "publisher", "trust", "permissions", "incremental"],
|
|
54
|
+
"properties": {
|
|
55
|
+
"contractVersion": { "const": "aiwg.dataset.adapter/v1" }, "kind": { "const": "AdapterManifest" },
|
|
56
|
+
"id": { "type": "string", "pattern": "^[a-z0-9][a-z0-9._-]+$" }, "version": { "type": "string", "pattern": "^[0-9]+\\.[0-9]+\\.[0-9]+$" },
|
|
57
|
+
"packageDigest": { "$ref": "#/$defs/digest" }, "datasetContractRange": { "type": "string", "minLength": 1 },
|
|
58
|
+
"sourceKinds": { "type": "array", "minItems": 1, "uniqueItems": true, "items": { "type": "string", "minLength": 1 } },
|
|
59
|
+
"schemas": {
|
|
60
|
+
"type": "object", "additionalProperties": false, "required": ["config", "discoveredRecord", "checkpoint"],
|
|
61
|
+
"properties": { "config": { "$ref": "#/$defs/schemaDeclaration" }, "discoveredRecord": { "$ref": "#/$defs/schemaDeclaration" }, "checkpoint": { "$ref": "#/$defs/schemaDeclaration" } }
|
|
62
|
+
},
|
|
63
|
+
"capabilities": { "type": "array", "uniqueItems": true, "items": { "enum": ["discovery", "preview", "streaming-read", "checkpoint", "tombstone"] } },
|
|
64
|
+
"limits": { "$ref": "#/$defs/limits" }, "maturity": { "enum": ["experimental", "qualified", "stable"] },
|
|
65
|
+
"publisher": { "type": "object", "additionalProperties": false, "required": ["id"], "properties": { "id": { "type": "string", "minLength": 1 }, "url": { "type": "string", "format": "uri" } } },
|
|
66
|
+
"trust": { "type": "object", "additionalProperties": false, "required": ["state"], "properties": { "state": { "enum": ["builtin", "verified", "untrusted"] }, "signature": { "type": "string" } } },
|
|
67
|
+
"permissions": {
|
|
68
|
+
"type": "object", "additionalProperties": false, "required": ["locality", "network", "credentials"],
|
|
69
|
+
"properties": { "locality": { "enum": ["local", "remote"] }, "network": { "enum": ["none", "https-allowlisted"] }, "credentials": { "enum": ["none", "locator-only"] } }
|
|
70
|
+
},
|
|
71
|
+
"incremental": {
|
|
72
|
+
"type": "object", "additionalProperties": false, "required": ["ordering", "sameCursorTieHandling", "lateArrivals", "tombstones", "checkpointCompatibility"],
|
|
73
|
+
"properties": { "ordering": { "type": "string", "minLength": 1 }, "sameCursorTieHandling": { "type": "string", "minLength": 1 }, "lateArrivals": { "type": "string", "minLength": 1 }, "tombstones": { "type": "string", "minLength": 1 }, "checkpointCompatibility": { "type": "string", "minLength": 1 } }
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
},
|
|
77
|
+
"checkpoint": {
|
|
78
|
+
"type": "object", "additionalProperties": false,
|
|
79
|
+
"required": ["contractVersion", "kind", "adapter", "sourceIdentity", "cursor", "schema", "createdAt"],
|
|
80
|
+
"properties": {
|
|
81
|
+
"contractVersion": { "const": "aiwg.dataset.adapter/v1" }, "kind": { "const": "AdapterCheckpoint" },
|
|
82
|
+
"adapter": { "type": "object", "additionalProperties": false, "required": ["id", "version"], "properties": { "id": { "type": "string" }, "version": { "type": "string" } } },
|
|
83
|
+
"sourceIdentity": { "type": "string", "minLength": 1 }, "cursor": { "type": "string" }, "tieBreaker": { "type": "string" },
|
|
84
|
+
"schema": { "$ref": "#/$defs/binding" }, "createdAt": { "type": "string", "format": "date-time" }
|
|
85
|
+
}
|
|
86
|
+
},
|
|
87
|
+
"credentialLocator": {
|
|
88
|
+
"type": "object", "additionalProperties": false, "required": ["kind", "locator"],
|
|
89
|
+
"properties": { "kind": { "enum": ["opaque", "environment", "keychain", "vault"] }, "locator": { "type": "string", "minLength": 1, "maxLength": 512 } }
|
|
90
|
+
},
|
|
91
|
+
"configurationEnvelope": {
|
|
92
|
+
"type": "object", "additionalProperties": false, "required": ["contractVersion", "kind", "adapter", "config", "credentialLocators"],
|
|
93
|
+
"properties": {
|
|
94
|
+
"contractVersion": { "const": "aiwg.dataset.adapter/v1" }, "kind": { "const": "AdapterConfiguration" },
|
|
95
|
+
"adapter": { "type": "object", "required": ["id", "version"], "properties": { "id": { "type": "string" }, "version": { "type": "string" } } }, "config": { "type": "object" },
|
|
96
|
+
"credentialLocators": { "type": "object", "additionalProperties": { "$ref": "#/$defs/credentialLocator" } }
|
|
97
|
+
}
|
|
98
|
+
},
|
|
99
|
+
"qualificationReport": {
|
|
100
|
+
"type": "object", "additionalProperties": false,
|
|
101
|
+
"required": ["contractVersion", "kind", "adapter", "schemas", "fixtureRevision", "cells", "qualifiedAt", "qualified", "stableEligible"],
|
|
102
|
+
"properties": {
|
|
103
|
+
"contractVersion": { "const": "aiwg.dataset.adapter/v1" }, "kind": { "const": "AdapterQualificationReport" },
|
|
104
|
+
"adapter": { "type": "object", "required": ["id", "version", "packageDigest"], "properties": { "id": { "type": "string" }, "version": { "type": "string" }, "packageDigest": { "$ref": "#/$defs/digest" } } },
|
|
105
|
+
"schemas": { "type": "object", "required": ["config", "record", "checkpoint"], "properties": { "config": { "$ref": "#/$defs/binding" }, "record": { "$ref": "#/$defs/binding" }, "checkpoint": { "$ref": "#/$defs/binding" } } },
|
|
106
|
+
"fixtureRevision": { "type": "string", "minLength": 1 },
|
|
107
|
+
"cells": { "type": "array", "items": { "type": "object", "required": ["name", "source", "passed", "evidence"], "properties": { "name": { "type": "string" }, "source": { "enum": ["fixture", "real-source"] }, "passed": { "type": "boolean" }, "evidence": { "type": "array", "items": { "type": "string" } } } } },
|
|
108
|
+
"qualifiedAt": { "type": "string", "format": "date-time" }, "qualified": { "type": "boolean" }, "stableEligible": { "type": "boolean" }
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
}
|