@aiwg/cli 2026.9.20 → 2026.9.24
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 +58 -6
- package/agentic/code/providers/model-capabilities.v1.json +34 -0
- package/agentic/code/providers/model-catalog.v1.json +55 -13
- package/bin/aiwg.mjs +2 -0
- package/dist/src/api/index.d.ts +1 -0
- package/dist/src/api/index.js +1 -0
- package/dist/src/artifacts/cli.js +23 -18
- package/dist/src/artifacts/enrichment/cli.js +1 -1
- package/dist/src/artifacts/fortemi-core-query-adapter.js +6 -2
- package/dist/src/artifacts/query-engine.js +14 -4
- package/dist/src/artifacts/views/cli.js +1 -1
- package/dist/src/audit/operator-decision.js +10 -0
- package/dist/src/auth/credential-store.js +127 -27
- package/dist/src/catalog/builtin-models.json +272 -40
- package/dist/src/catalog/cli.js +1 -1
- package/dist/src/catalog/cli.mjs +1 -1
- package/dist/src/cli/handlers/effect.js +872 -0
- package/dist/src/cli/handlers/help.js +2 -0
- package/dist/src/cli/handlers/index.js +4 -2
- package/dist/src/cli/handlers/models.js +41 -10
- package/dist/src/cli/handlers/ralph.js +1 -1
- package/dist/src/cli/handlers/sessions.js +113 -37
- package/dist/src/cli/handlers/subcommands.js +31 -0
- package/dist/src/cli/handlers/use.js +46 -9
- package/dist/src/cli/handlers/utilities.js +10 -0
- package/dist/src/cli/handlers/workspace.js +3 -1
- package/dist/src/cli/scope-resolver.js +112 -9
- package/dist/src/cli/services/deployment-verification.js +5 -0
- package/dist/src/config/aiwg-config.js +3 -0
- package/dist/src/decision/acceptance-rollout.js +93 -0
- package/dist/src/decision/acceptance.js +175 -0
- package/dist/src/decision/adapters/jev.js +234 -13
- package/dist/src/decision/adapters/llm-subagent.js +60 -12
- package/dist/src/decision/admission.js +550 -0
- package/dist/src/decision/batch-benchmark.js +47 -0
- package/dist/src/decision/batch-receipts/accounting.js +75 -0
- package/dist/src/decision/batch-receipts/export.js +40 -0
- package/dist/src/decision/batch-receipts/index.js +9 -0
- package/dist/src/decision/batch-receipts/protection.js +40 -0
- package/dist/src/decision/batch-receipts/receipt.js +44 -0
- package/dist/src/decision/batch-receipts/result-store.js +341 -0
- package/dist/src/decision/batch-receipts/store.js +362 -0
- package/dist/src/decision/batch-receipts/types.js +2 -0
- package/dist/src/decision/batch-receipts/validate.js +127 -0
- package/dist/src/decision/batch.js +68 -0
- package/dist/src/decision/calibration/index.js +4 -0
- package/dist/src/decision/calibration/receipts.js +130 -0
- package/dist/src/decision/calibration/registry.js +258 -0
- package/dist/src/decision/calibration/types.js +2 -0
- package/dist/src/decision/compile-cache/benchmark.js +62 -0
- package/dist/src/decision/compile-cache/compatibility.js +65 -0
- package/dist/src/decision/compile-cache/file-store.js +280 -0
- package/dist/src/decision/compile-cache/identity.js +26 -0
- package/dist/src/decision/compile-cache/index.js +9 -0
- package/dist/src/decision/compile-cache/prefix.js +21 -0
- package/dist/src/decision/compile-cache/records.js +86 -0
- package/dist/src/decision/compile-cache/runtime.js +68 -0
- package/dist/src/decision/compile-cache/store.js +108 -0
- package/dist/src/decision/compile-cache/types.js +2 -0
- package/dist/src/decision/context-plan.js +234 -0
- package/dist/src/decision/context-qualification.js +60 -0
- package/dist/src/decision/ensemble/aggregate.js +215 -0
- package/dist/src/decision/ensemble/contract.js +316 -0
- package/dist/src/decision/ensemble/drift.js +51 -0
- package/dist/src/decision/ensemble/index.js +6 -0
- package/dist/src/decision/ensemble/report.js +71 -0
- package/dist/src/decision/ensemble/types.js +2 -0
- package/dist/src/decision/evaluate.js +1024 -78
- package/dist/src/decision/file-lifecycle-store.js +168 -0
- package/dist/src/decision/graph-beam.js +40 -0
- package/dist/src/decision/graph-budget.js +110 -0
- package/dist/src/decision/graph-decision-bridge.js +93 -0
- package/dist/src/decision/graph-evidence.js +123 -0
- package/dist/src/decision/graph-flow-adapter.js +56 -0
- package/dist/src/decision/graph-flow.js +105 -0
- package/dist/src/decision/graph-parallel.js +79 -0
- package/dist/src/decision/graph-patterns.js +20 -0
- package/dist/src/decision/graph-run-store.js +66 -0
- package/dist/src/decision/graph-run.js +166 -0
- package/dist/src/decision/graph-skill-bridge.js +91 -0
- package/dist/src/decision/graph-templates.js +56 -0
- package/dist/src/decision/graph.js +115 -0
- package/dist/src/decision/index.js +35 -0
- package/dist/src/decision/job-accounting.js +93 -0
- package/dist/src/decision/job-contract.js +186 -0
- package/dist/src/decision/job-effects.js +95 -0
- package/dist/src/decision/job-evaluate.js +80 -0
- package/dist/src/decision/job-gateway.js +121 -0
- package/dist/src/decision/job-http.js +194 -0
- package/dist/src/decision/job-payload-store.js +258 -0
- package/dist/src/decision/job-poll-limiter.js +92 -0
- package/dist/src/decision/job-quota.js +158 -0
- package/dist/src/decision/job-runtime.js +240 -0
- package/dist/src/decision/job-scheduler.js +26 -0
- package/dist/src/decision/job-service.js +117 -0
- package/dist/src/decision/job-store.js +264 -0
- package/dist/src/decision/job-worker.js +141 -0
- package/dist/src/decision/lifecycle.js +148 -0
- package/dist/src/decision/patterns/artifacts.js +173 -0
- package/dist/src/decision/patterns/catalog.js +108 -0
- package/dist/src/decision/patterns/durable-review.js +237 -0
- package/dist/src/decision/patterns/index.js +8 -0
- package/dist/src/decision/patterns/playground.js +401 -0
- package/dist/src/decision/patterns/recorded.js +43 -0
- package/dist/src/decision/patterns/specs.js +174 -0
- package/dist/src/decision/patterns/types.js +2 -0
- package/dist/src/decision/portable-secrets.js +53 -0
- package/dist/src/decision/projection.js +210 -0
- package/dist/src/decision/qualification/capture.js +67 -0
- package/dist/src/decision/qualification/drift.js +68 -0
- package/dist/src/decision/qualification/gate-evidence.js +172 -0
- package/dist/src/decision/qualification/gates.js +83 -0
- package/dist/src/decision/qualification/index.js +12 -0
- package/dist/src/decision/qualification/load.js +282 -0
- package/dist/src/decision/qualification/manifest.js +37 -0
- package/dist/src/decision/qualification/privacy.js +41 -0
- package/dist/src/decision/qualification/quality.js +213 -0
- package/dist/src/decision/qualification/release.js +116 -0
- package/dist/src/decision/qualification/runner.js +408 -0
- package/dist/src/decision/qualification/types.js +2 -0
- package/dist/src/decision/receipts.js +30 -7
- package/dist/src/decision/result-cache/index.js +6 -0
- package/dist/src/decision/result-cache/integrity.js +28 -0
- package/dist/src/decision/result-cache/key.js +28 -0
- package/dist/src/decision/result-cache/service.js +92 -0
- package/dist/src/decision/result-cache/store.js +327 -0
- package/dist/src/decision/result-cache/types.js +3 -0
- package/dist/src/decision/review/authorization.js +110 -0
- package/dist/src/decision/review/effect-ledger-adapter.js +321 -0
- package/dist/src/decision/review/index.js +12 -0
- package/dist/src/decision/review/migrate.js +34 -0
- package/dist/src/decision/review/operator-audit.js +59 -0
- package/dist/src/decision/review/recovery-adapters.js +252 -0
- package/dist/src/decision/review/recovery.js +33 -0
- package/dist/src/decision/review/service.js +498 -0
- package/dist/src/decision/review/store.js +219 -0
- package/dist/src/decision/review/types.js +2 -0
- package/dist/src/decision/review/validate.js +205 -0
- package/dist/src/decision/scheduler.js +115 -0
- package/dist/src/decision/telemetry/context.js +42 -0
- package/dist/src/decision/telemetry/debug-sidecar.js +152 -0
- package/dist/src/decision/telemetry/exporter.js +77 -0
- package/dist/src/decision/telemetry/file-debug-backend.js +112 -0
- package/dist/src/decision/telemetry/index.js +13 -0
- package/dist/src/decision/telemetry/mapping.js +146 -0
- package/dist/src/decision/telemetry/metrics.js +164 -0
- package/dist/src/decision/telemetry/otlp-http.js +183 -0
- package/dist/src/decision/telemetry/redaction.js +93 -0
- package/dist/src/decision/telemetry/retention.js +109 -0
- package/dist/src/decision/telemetry/runtime.js +310 -0
- package/dist/src/decision/telemetry/trace.js +158 -0
- package/dist/src/decision/telemetry/types.js +3 -0
- package/dist/src/decision/validate.js +135 -5
- package/dist/src/effects/checkpoint-sinks.js +94 -0
- package/dist/src/effects/checkpoint.js +76 -0
- package/dist/src/effects/decision-links.js +54 -0
- package/dist/src/effects/errors.js +48 -0
- package/dist/src/effects/identity.js +178 -0
- package/dist/src/effects/index.js +25 -0
- package/dist/src/effects/keyring.js +160 -0
- package/dist/src/effects/keys.js +130 -0
- package/dist/src/effects/ledger.js +435 -0
- package/dist/src/effects/lifecycle.js +110 -0
- package/dist/src/effects/lock-recovery.js +269 -0
- package/dist/src/effects/reader.js +103 -0
- package/dist/src/effects/records.js +114 -0
- package/dist/src/effects/redaction.js +51 -0
- package/dist/src/effects/schema.js +73 -0
- package/dist/src/effects/store.js +239 -0
- package/dist/src/effects/types.js +49 -0
- package/dist/src/effects/verifiers/decision.js +168 -0
- package/dist/src/effects/verifiers/file.js +106 -0
- package/dist/src/effects/verifiers/git.js +206 -0
- package/dist/src/effects/verifiers/index.js +90 -0
- package/dist/src/effects/verifiers/registry.js +148 -0
- package/dist/src/effects/verifiers/review.js +123 -0
- package/dist/src/effects/verifiers/tracker.js +299 -0
- package/dist/src/effects/verifiers/types.js +21 -0
- package/dist/src/effects/verify.js +295 -0
- package/dist/src/evidence/bundle.js +2 -0
- package/dist/src/extensions/commands/definitions.js +28 -0
- package/dist/src/extensions/manifest.js +1 -0
- package/dist/src/marketplace/provenance.js +25 -27
- package/dist/src/mcp/cli.mjs +11 -1
- package/dist/src/mcp/grok-build-config.mjs +189 -0
- package/dist/src/mcp/registry.js +21 -1
- package/dist/src/mcp/registry.mjs +20 -1
- package/dist/src/models/grok-build-models.js +356 -0
- package/dist/src/models/index.js +1 -0
- package/dist/src/models/model-capabilities.v1.json +34 -0
- package/dist/src/models/model-catalog.v1.json +55 -13
- package/dist/src/models/model-discovery.js +41 -5
- package/dist/src/models/provider-policy.js +3 -2
- package/dist/src/plugin/skill-command-translator.js +1 -0
- package/dist/src/providers/capability-matrix.yaml +58 -6
- package/dist/src/providers/grok-build-acp.js +192 -0
- package/dist/src/providers/grok-build-dispatch.js +251 -0
- package/dist/src/providers/grok-build-headless.js +170 -0
- package/dist/src/providers/muse-paths.js +105 -0
- package/dist/src/providers/provider-definitions.js +93 -7
- package/dist/src/providers/provider-definitions.mjs +21 -1
- package/dist/src/providers/provider-inventory.js +3 -0
- package/dist/src/security/artifact-attestation.js +4 -8
- package/dist/src/security/signing.js +119 -0
- package/dist/src/sessions/adapters/grok-build.js +187 -0
- package/dist/src/sessions/adapters/muse.js +412 -0
- package/dist/src/sessions/contracts.js +1 -1
- package/dist/src/sessions/grok-build-cli.js +196 -0
- package/dist/src/sessions/index.js +3 -0
- package/dist/src/sessions/workspace-discovery.js +9 -5
- package/dist/src/skills/deployer.js +33 -5
- package/dist/src/smiths/context-pipeline/claude-hook.js +2 -0
- package/dist/src/smiths/context-pipeline/context-file-safety.js +18 -0
- package/dist/src/smiths/context-pipeline/finalization.js +1 -32
- package/dist/src/smiths/context-pipeline/generator.js +12 -0
- package/dist/src/smiths/context-pipeline/index.js +1 -1
- package/dist/src/smiths/context-pipeline/managed-hook.js +2 -0
- package/dist/src/smiths/context-pipeline/muse-bridge.js +50 -0
- package/dist/src/smiths/context-pipeline/provider-policy.js +5 -0
- package/dist/src/smiths/context-pipeline/workspace-context.js +22 -16
- package/dist/src/smiths/hook-bridge/grok-build-translator.js +64 -0
- package/dist/src/smiths/hook-bridge/index.js +3 -0
- package/dist/src/smiths/hook-bridge/shim.js +2 -0
- package/dist/src/smiths/hook-bridge/types.js +5 -0
- package/dist/src/smiths/skillsmith/collision-detector.js +1 -0
- package/dist/src/storage/protected-files.js +102 -0
- package/dist/src/tracker/forge-http.js +371 -0
- package/dist/src/tracker/project-inputs.js +41 -0
- package/package.json +2 -1
- package/schemas/decision/BatchReceipt.v1.schema.json +50 -0
- package/schemas/decision/CalibrationArtifact.v1.schema.json +76 -0
- package/schemas/decision/CalibrationCompatibility.v1.schema.json +18 -0
- package/schemas/decision/CalibrationGovernanceReceipt.v1.schema.json +44 -0
- package/schemas/decision/DecisionAdmissionEvidence.v1.schema.json +43 -0
- package/schemas/decision/DecisionBinding.schema.json +309 -0
- package/schemas/decision/DecisionBinding.v1alpha2.schema.json +369 -0
- package/schemas/decision/DecisionCacheTelemetry.v1.schema.json +20 -0
- package/schemas/decision/DecisionChampionChallenger.v1.schema.json +100 -0
- package/schemas/decision/DecisionCompileCacheEntry.v1.schema.json +35 -0
- package/schemas/decision/DecisionCompileCacheIdentity.v1.schema.json +26 -0
- package/schemas/decision/DecisionCompileCacheTombstone.v1.schema.json +31 -0
- package/schemas/decision/DecisionContextEvidence.v1.schema.json +136 -0
- package/schemas/decision/DecisionDefinition.schema.json +159 -0
- package/schemas/decision/DecisionDefinition.v1alpha2.schema.json +203 -0
- package/schemas/decision/DecisionDriftResponse.v1.schema.json +55 -0
- package/schemas/decision/DecisionEnsembleAggregate.v1.schema.json +86 -0
- package/schemas/decision/DecisionEnsembleIntegrityReport.v1.schema.json +64 -0
- package/schemas/decision/DecisionEnsemblePolicy.v1.schema.json +130 -0
- package/schemas/decision/DecisionGraph.v1.schema.json +77 -0
- package/schemas/decision/DecisionJob.v1.schema.json +71 -0
- package/schemas/decision/DecisionLifecyclePolicy.v1.schema.json +52 -0
- package/schemas/decision/DecisionProjectionPolicy.v1.schema.json +65 -0
- package/schemas/decision/DecisionProviderPrefixCompatibility.v1.schema.json +45 -0
- package/schemas/decision/DecisionProviderPrefixEvidence.v1.schema.json +17 -0
- package/schemas/decision/DecisionProviderPrefixIdentity.v1.schema.json +36 -0
- package/schemas/decision/DecisionResult.schema.json +524 -0
- package/schemas/decision/DecisionResult.v1alpha2.schema.json +619 -0
- package/schemas/decision/DecisionResultCacheEntry.v1.schema.json +53 -0
- package/schemas/decision/DecisionReview.schema.json +29 -0
- package/schemas/decision/DecisionRuleset.schema.json +313 -0
- package/schemas/decision/DecisionRuleset.v1alpha2.schema.json +313 -0
- package/schemas/decision/DecisionTelemetryTrace.v1.schema.json +95 -0
- package/schemas/decision/RulesetResult.schema.json +721 -0
- package/schemas/decision/RulesetResult.v1alpha2.schema.json +891 -0
- package/schemas/security/pr-evidence-receipt.v1.schema.json +77 -0
- package/schemas/security/threat-assessment-report.v1.schema.json +71 -1
- package/tools/agents/deploy-agents.mjs +21 -6
- package/tools/agents/providers/base.mjs +7 -4
- package/tools/agents/providers/codex.mjs +1 -1
- package/tools/agents/providers/grok-build.d.mts +7 -0
- package/tools/agents/providers/grok-build.mjs +249 -9
- package/tools/agents/providers/model-role.mjs +6 -3
- package/tools/agents/providers/muse-hooks.mjs +785 -0
- package/tools/agents/providers/muse-paths.mjs +112 -0
- package/tools/agents/providers/muse.mjs +336 -0
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://aiwg.io/schemas/decision/DecisionReview.schema.json",
|
|
4
|
+
"title": "DecisionReview",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"additionalProperties": false,
|
|
7
|
+
"required": ["apiVersion", "kind", "schema", "revision", "reviewId", "tenantId", "projectId", "requesterId", "sourceReceipt", "evidencePins", "policyPins", "reasonCodes", "riskTier", "presentation", "proposals", "decisions", "events", "status", "createdAtEpochMs", "updatedAtEpochMs", "expiresAtEpochMs", "quorum", "continuation"],
|
|
8
|
+
"properties": {
|
|
9
|
+
"apiVersion": { "const": "decision.aiwg.io/v1alpha1" }, "kind": { "const": "DecisionReview" }, "schema": { "const": "decision-review/v1" },
|
|
10
|
+
"revision": { "type": "integer", "minimum": 1 }, "reviewId": { "type": "string", "minLength": 1 }, "tenantId": { "type": "string", "minLength": 1 }, "projectId": { "type": "string", "minLength": 1 }, "requesterId": { "type": "string", "minLength": 1 },
|
|
11
|
+
"sourceReceipt": { "$ref": "#/$defs/sourceReceipt" }, "evidencePins": { "type": "array", "items": { "$ref": "#/$defs/pin" } }, "policyPins": { "type": "array", "items": { "$ref": "#/$defs/pin" } },
|
|
12
|
+
"reasonCodes": { "type": "array", "items": { "type": "string" }, "uniqueItems": true }, "riskTier": { "type": "string", "minLength": 1 }, "presentation": { "type": "object" },
|
|
13
|
+
"proposals": { "type": "array", "minItems": 1, "items": { "$ref": "#/$defs/proposal" } }, "decisions": { "type": "array", "items": { "$ref": "#/$defs/decision" } }, "events": { "type": "array", "minItems": 1, "items": { "$ref": "#/$defs/event" } },
|
|
14
|
+
"status": { "enum": ["pending", "claimed", "approved", "rejected", "expired", "escalated", "canceled", "resuming", "completed", "execution-failed", "tombstoned"] },
|
|
15
|
+
"createdAtEpochMs": { "type": "integer", "minimum": 0 }, "updatedAtEpochMs": { "type": "integer", "minimum": 0 }, "expiresAtEpochMs": { "type": "integer", "minimum": 0 }, "retentionUntilEpochMs": { "type": "integer", "minimum": 0 }, "escalationAtEpochMs": { "type": "integer", "minimum": 0 }, "quorum": { "type": "integer", "minimum": 1, "maximum": 16 },
|
|
16
|
+
"continuation": { "type": "object", "additionalProperties": false, "required": ["id", "tokenDigest"], "properties": { "id": { "type": "string", "minLength": 1 }, "tokenDigest": { "$ref": "#/$defs/digest" } } }, "effectReceipt": { "$ref": "#/$defs/effect" }, "executionError": { "type": "string" },
|
|
17
|
+
"lifecycle": { "type": "object", "additionalProperties": false, "required": ["legalHold"], "properties": { "legalHold": { "type": "boolean" }, "tombstonedAtEpochMs": { "type": "integer", "minimum": 0 }, "tombstoneReason": { "type": "string" } } }
|
|
18
|
+
},
|
|
19
|
+
"$defs": {
|
|
20
|
+
"digest": { "type": "string", "pattern": "^sha256:[a-f0-9]{64}$" },
|
|
21
|
+
"actor": { "type": "object", "additionalProperties": false, "required": ["id", "roles", "authorityContext"], "properties": { "id": { "type": "string", "minLength": 1 }, "roles": { "type": "array", "items": { "type": "string" } }, "authorityContext": { "type": "string" } } },
|
|
22
|
+
"pin": { "type": "object", "additionalProperties": false, "required": ["id", "version", "digest"], "properties": { "id": { "type": "string" }, "version": { "type": "string" }, "digest": { "$ref": "#/$defs/digest" } } },
|
|
23
|
+
"sourceReceipt": { "type": "object", "additionalProperties": false, "required": ["id", "digest"], "properties": { "id": { "type": "string" }, "digest": { "$ref": "#/$defs/digest" } } },
|
|
24
|
+
"proposal": { "type": "object", "additionalProperties": false, "required": ["version", "action", "actionDigest", "createdAtEpochMs", "editor", "rationale"], "properties": { "version": { "type": "integer", "minimum": 1 }, "action": {}, "actionDigest": { "$ref": "#/$defs/digest" }, "createdAtEpochMs": { "type": "integer" }, "editor": { "$ref": "#/$defs/actor" }, "rationale": { "type": "string" } } },
|
|
25
|
+
"decision": { "type": "object", "additionalProperties": false, "required": ["reviewer", "proposalVersion", "decision", "rationale", "atEpochMs"], "properties": { "reviewer": { "$ref": "#/$defs/actor" }, "proposalVersion": { "type": "integer" }, "decision": { "enum": ["approve", "reject"] }, "rationale": { "type": "string" }, "atEpochMs": { "type": "integer" } } },
|
|
26
|
+
"event": { "type": "object", "additionalProperties": false, "required": ["sequence", "type", "atEpochMs", "actor", "proposalVersion", "rationale"], "properties": { "sequence": { "type": "integer" }, "type": { "enum": ["created", "claimed", "approved", "rejected", "edited", "expired", "escalated", "canceled", "resumed", "execution-completed", "execution-failed", "legal-hold-placed", "legal-hold-released", "tombstoned", "authorization-denied", "sensitive-view-accessed"] }, "atEpochMs": { "type": "integer" }, "actor": { "$ref": "#/$defs/actor" }, "proposalVersion": { "type": "integer" }, "rationale": { "type": "string" }, "operatorDecisionEventId": { "type": "string", "minLength": 1 }, "data": { "type": "object" } } },
|
|
27
|
+
"effect": { "type": "object", "additionalProperties": false, "required": ["effectId", "continuationId", "proposalVersion", "completedAtEpochMs", "result"], "properties": { "effectId": { "type": "string" }, "continuationId": { "type": "string" }, "proposalVersion": { "type": "integer" }, "completedAtEpochMs": { "type": "integer" }, "result": {} } }
|
|
28
|
+
}
|
|
29
|
+
}
|
|
@@ -0,0 +1,313 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://aiwg.io/schemas/decision/DecisionRuleset.v1alpha1.schema.json",
|
|
4
|
+
"type": "object",
|
|
5
|
+
"properties": {
|
|
6
|
+
"apiVersion": {
|
|
7
|
+
"const": "decision.aiwg.io/v1alpha1"
|
|
8
|
+
},
|
|
9
|
+
"kind": {
|
|
10
|
+
"const": "DecisionRuleset"
|
|
11
|
+
},
|
|
12
|
+
"metadata": {
|
|
13
|
+
"type": "object",
|
|
14
|
+
"properties": {
|
|
15
|
+
"id": {
|
|
16
|
+
"type": "string",
|
|
17
|
+
"minLength": 1
|
|
18
|
+
},
|
|
19
|
+
"version": {
|
|
20
|
+
"type": "string",
|
|
21
|
+
"pattern": "^\\d+\\.\\d+\\.\\d+$"
|
|
22
|
+
},
|
|
23
|
+
"description": {
|
|
24
|
+
"type": "string",
|
|
25
|
+
"minLength": 1
|
|
26
|
+
}
|
|
27
|
+
},
|
|
28
|
+
"required": [
|
|
29
|
+
"id",
|
|
30
|
+
"version",
|
|
31
|
+
"description"
|
|
32
|
+
],
|
|
33
|
+
"additionalProperties": false
|
|
34
|
+
},
|
|
35
|
+
"spec": {
|
|
36
|
+
"type": "object",
|
|
37
|
+
"properties": {
|
|
38
|
+
"purpose": {
|
|
39
|
+
"type": "string",
|
|
40
|
+
"minLength": 1
|
|
41
|
+
},
|
|
42
|
+
"inputSchema": {
|
|
43
|
+
"type": "object"
|
|
44
|
+
},
|
|
45
|
+
"evaluations": {
|
|
46
|
+
"type": "array",
|
|
47
|
+
"items": {
|
|
48
|
+
"type": "object",
|
|
49
|
+
"properties": {
|
|
50
|
+
"alias": {
|
|
51
|
+
"type": "string",
|
|
52
|
+
"minLength": 1
|
|
53
|
+
},
|
|
54
|
+
"decision": {
|
|
55
|
+
"type": "object",
|
|
56
|
+
"properties": {
|
|
57
|
+
"id": {
|
|
58
|
+
"type": "string",
|
|
59
|
+
"minLength": 1
|
|
60
|
+
},
|
|
61
|
+
"version": {
|
|
62
|
+
"type": "string",
|
|
63
|
+
"pattern": "^\\d+\\.\\d+\\.\\d+$"
|
|
64
|
+
},
|
|
65
|
+
"digest": {
|
|
66
|
+
"type": "string",
|
|
67
|
+
"pattern": "^sha256:[0-9a-f]{64}$"
|
|
68
|
+
}
|
|
69
|
+
},
|
|
70
|
+
"required": [
|
|
71
|
+
"id",
|
|
72
|
+
"version",
|
|
73
|
+
"digest"
|
|
74
|
+
],
|
|
75
|
+
"additionalProperties": false
|
|
76
|
+
},
|
|
77
|
+
"inputPointer": {
|
|
78
|
+
"type": "string",
|
|
79
|
+
"pattern": "^(|/(?:[^~]|~[01])*)$"
|
|
80
|
+
}
|
|
81
|
+
},
|
|
82
|
+
"required": [
|
|
83
|
+
"alias",
|
|
84
|
+
"decision",
|
|
85
|
+
"inputPointer"
|
|
86
|
+
],
|
|
87
|
+
"additionalProperties": false
|
|
88
|
+
},
|
|
89
|
+
"minItems": 1
|
|
90
|
+
},
|
|
91
|
+
"rules": {
|
|
92
|
+
"type": "array",
|
|
93
|
+
"items": {
|
|
94
|
+
"type": "object",
|
|
95
|
+
"properties": {
|
|
96
|
+
"id": {
|
|
97
|
+
"type": "string",
|
|
98
|
+
"minLength": 1
|
|
99
|
+
},
|
|
100
|
+
"priority": {
|
|
101
|
+
"type": "integer",
|
|
102
|
+
"minimum": -9007199254740991,
|
|
103
|
+
"maximum": 9007199254740991
|
|
104
|
+
},
|
|
105
|
+
"when": {
|
|
106
|
+
"$ref": "#/$defs/predicate"
|
|
107
|
+
},
|
|
108
|
+
"outcome": {}
|
|
109
|
+
},
|
|
110
|
+
"required": [
|
|
111
|
+
"id",
|
|
112
|
+
"priority",
|
|
113
|
+
"when",
|
|
114
|
+
"outcome"
|
|
115
|
+
],
|
|
116
|
+
"additionalProperties": false
|
|
117
|
+
},
|
|
118
|
+
"minItems": 1
|
|
119
|
+
},
|
|
120
|
+
"composition": {
|
|
121
|
+
"enum": [
|
|
122
|
+
"first-match",
|
|
123
|
+
"collect"
|
|
124
|
+
]
|
|
125
|
+
},
|
|
126
|
+
"conflict": {
|
|
127
|
+
"enum": [
|
|
128
|
+
"error",
|
|
129
|
+
"review"
|
|
130
|
+
]
|
|
131
|
+
},
|
|
132
|
+
"defaultOutcome": {},
|
|
133
|
+
"failureOutcome": {},
|
|
134
|
+
"outputSchema": {
|
|
135
|
+
"type": "object"
|
|
136
|
+
}
|
|
137
|
+
},
|
|
138
|
+
"required": [
|
|
139
|
+
"purpose",
|
|
140
|
+
"inputSchema",
|
|
141
|
+
"evaluations",
|
|
142
|
+
"rules",
|
|
143
|
+
"composition",
|
|
144
|
+
"conflict",
|
|
145
|
+
"defaultOutcome",
|
|
146
|
+
"failureOutcome",
|
|
147
|
+
"outputSchema"
|
|
148
|
+
],
|
|
149
|
+
"additionalProperties": false
|
|
150
|
+
}
|
|
151
|
+
},
|
|
152
|
+
"required": [
|
|
153
|
+
"apiVersion",
|
|
154
|
+
"kind",
|
|
155
|
+
"metadata",
|
|
156
|
+
"spec"
|
|
157
|
+
],
|
|
158
|
+
"additionalProperties": false,
|
|
159
|
+
"$defs": {
|
|
160
|
+
"predicate": {
|
|
161
|
+
"oneOf": [
|
|
162
|
+
{
|
|
163
|
+
"type": "object",
|
|
164
|
+
"properties": {
|
|
165
|
+
"op": {
|
|
166
|
+
"enum": [
|
|
167
|
+
"eq",
|
|
168
|
+
"ne",
|
|
169
|
+
"lt",
|
|
170
|
+
"lte",
|
|
171
|
+
"gt",
|
|
172
|
+
"gte",
|
|
173
|
+
"exists"
|
|
174
|
+
]
|
|
175
|
+
},
|
|
176
|
+
"left": {
|
|
177
|
+
"type": "object",
|
|
178
|
+
"properties": {
|
|
179
|
+
"source": {
|
|
180
|
+
"enum": [
|
|
181
|
+
"input",
|
|
182
|
+
"decision"
|
|
183
|
+
]
|
|
184
|
+
},
|
|
185
|
+
"alias": {
|
|
186
|
+
"type": "string",
|
|
187
|
+
"minLength": 1
|
|
188
|
+
},
|
|
189
|
+
"pointer": {
|
|
190
|
+
"type": "string",
|
|
191
|
+
"pattern": "^(|/(?:[^~]|~[01])*)$"
|
|
192
|
+
}
|
|
193
|
+
},
|
|
194
|
+
"required": [
|
|
195
|
+
"source",
|
|
196
|
+
"pointer"
|
|
197
|
+
],
|
|
198
|
+
"additionalProperties": false,
|
|
199
|
+
"allOf": [
|
|
200
|
+
{
|
|
201
|
+
"if": {
|
|
202
|
+
"properties": {
|
|
203
|
+
"source": {
|
|
204
|
+
"const": "decision"
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
},
|
|
208
|
+
"then": {
|
|
209
|
+
"properties": {
|
|
210
|
+
"alias": {}
|
|
211
|
+
},
|
|
212
|
+
"required": [
|
|
213
|
+
"alias"
|
|
214
|
+
]
|
|
215
|
+
},
|
|
216
|
+
"else": {
|
|
217
|
+
"not": {
|
|
218
|
+
"properties": {
|
|
219
|
+
"alias": {}
|
|
220
|
+
},
|
|
221
|
+
"required": [
|
|
222
|
+
"alias"
|
|
223
|
+
]
|
|
224
|
+
}
|
|
225
|
+
}
|
|
226
|
+
}
|
|
227
|
+
]
|
|
228
|
+
},
|
|
229
|
+
"right": {}
|
|
230
|
+
},
|
|
231
|
+
"required": [
|
|
232
|
+
"op",
|
|
233
|
+
"left"
|
|
234
|
+
],
|
|
235
|
+
"additionalProperties": false,
|
|
236
|
+
"allOf": [
|
|
237
|
+
{
|
|
238
|
+
"if": {
|
|
239
|
+
"properties": {
|
|
240
|
+
"op": {
|
|
241
|
+
"const": "exists"
|
|
242
|
+
}
|
|
243
|
+
}
|
|
244
|
+
},
|
|
245
|
+
"then": {
|
|
246
|
+
"not": {
|
|
247
|
+
"properties": {
|
|
248
|
+
"right": {}
|
|
249
|
+
},
|
|
250
|
+
"required": [
|
|
251
|
+
"right"
|
|
252
|
+
]
|
|
253
|
+
}
|
|
254
|
+
},
|
|
255
|
+
"else": {
|
|
256
|
+
"properties": {
|
|
257
|
+
"right": {}
|
|
258
|
+
},
|
|
259
|
+
"required": [
|
|
260
|
+
"right"
|
|
261
|
+
]
|
|
262
|
+
}
|
|
263
|
+
}
|
|
264
|
+
]
|
|
265
|
+
},
|
|
266
|
+
{
|
|
267
|
+
"type": "object",
|
|
268
|
+
"properties": {
|
|
269
|
+
"all": {
|
|
270
|
+
"type": "array",
|
|
271
|
+
"items": {
|
|
272
|
+
"$ref": "#/$defs/predicate"
|
|
273
|
+
},
|
|
274
|
+
"minItems": 1
|
|
275
|
+
}
|
|
276
|
+
},
|
|
277
|
+
"required": [
|
|
278
|
+
"all"
|
|
279
|
+
],
|
|
280
|
+
"additionalProperties": false
|
|
281
|
+
},
|
|
282
|
+
{
|
|
283
|
+
"type": "object",
|
|
284
|
+
"properties": {
|
|
285
|
+
"any": {
|
|
286
|
+
"type": "array",
|
|
287
|
+
"items": {
|
|
288
|
+
"$ref": "#/$defs/predicate"
|
|
289
|
+
},
|
|
290
|
+
"minItems": 1
|
|
291
|
+
}
|
|
292
|
+
},
|
|
293
|
+
"required": [
|
|
294
|
+
"any"
|
|
295
|
+
],
|
|
296
|
+
"additionalProperties": false
|
|
297
|
+
},
|
|
298
|
+
{
|
|
299
|
+
"type": "object",
|
|
300
|
+
"properties": {
|
|
301
|
+
"not": {
|
|
302
|
+
"$ref": "#/$defs/predicate"
|
|
303
|
+
}
|
|
304
|
+
},
|
|
305
|
+
"required": [
|
|
306
|
+
"not"
|
|
307
|
+
],
|
|
308
|
+
"additionalProperties": false
|
|
309
|
+
}
|
|
310
|
+
]
|
|
311
|
+
}
|
|
312
|
+
}
|
|
313
|
+
}
|
|
@@ -0,0 +1,313 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://aiwg.io/schemas/decision/DecisionRuleset.v1alpha2.schema.json",
|
|
4
|
+
"type": "object",
|
|
5
|
+
"properties": {
|
|
6
|
+
"apiVersion": {
|
|
7
|
+
"const": "decision.aiwg.io/v1alpha2"
|
|
8
|
+
},
|
|
9
|
+
"kind": {
|
|
10
|
+
"const": "DecisionRuleset"
|
|
11
|
+
},
|
|
12
|
+
"metadata": {
|
|
13
|
+
"type": "object",
|
|
14
|
+
"properties": {
|
|
15
|
+
"id": {
|
|
16
|
+
"type": "string",
|
|
17
|
+
"minLength": 1
|
|
18
|
+
},
|
|
19
|
+
"version": {
|
|
20
|
+
"type": "string",
|
|
21
|
+
"pattern": "^\\d+\\.\\d+\\.\\d+$"
|
|
22
|
+
},
|
|
23
|
+
"description": {
|
|
24
|
+
"type": "string",
|
|
25
|
+
"minLength": 1
|
|
26
|
+
}
|
|
27
|
+
},
|
|
28
|
+
"required": [
|
|
29
|
+
"id",
|
|
30
|
+
"version",
|
|
31
|
+
"description"
|
|
32
|
+
],
|
|
33
|
+
"additionalProperties": false
|
|
34
|
+
},
|
|
35
|
+
"spec": {
|
|
36
|
+
"type": "object",
|
|
37
|
+
"properties": {
|
|
38
|
+
"purpose": {
|
|
39
|
+
"type": "string",
|
|
40
|
+
"minLength": 1
|
|
41
|
+
},
|
|
42
|
+
"inputSchema": {
|
|
43
|
+
"type": "object"
|
|
44
|
+
},
|
|
45
|
+
"evaluations": {
|
|
46
|
+
"type": "array",
|
|
47
|
+
"items": {
|
|
48
|
+
"type": "object",
|
|
49
|
+
"properties": {
|
|
50
|
+
"alias": {
|
|
51
|
+
"type": "string",
|
|
52
|
+
"minLength": 1
|
|
53
|
+
},
|
|
54
|
+
"decision": {
|
|
55
|
+
"type": "object",
|
|
56
|
+
"properties": {
|
|
57
|
+
"id": {
|
|
58
|
+
"type": "string",
|
|
59
|
+
"minLength": 1
|
|
60
|
+
},
|
|
61
|
+
"version": {
|
|
62
|
+
"type": "string",
|
|
63
|
+
"pattern": "^\\d+\\.\\d+\\.\\d+$"
|
|
64
|
+
},
|
|
65
|
+
"digest": {
|
|
66
|
+
"type": "string",
|
|
67
|
+
"pattern": "^sha256:[0-9a-f]{64}$"
|
|
68
|
+
}
|
|
69
|
+
},
|
|
70
|
+
"required": [
|
|
71
|
+
"id",
|
|
72
|
+
"version",
|
|
73
|
+
"digest"
|
|
74
|
+
],
|
|
75
|
+
"additionalProperties": false
|
|
76
|
+
},
|
|
77
|
+
"inputPointer": {
|
|
78
|
+
"type": "string",
|
|
79
|
+
"pattern": "^(|/(?:[^~]|~[01])*)$"
|
|
80
|
+
}
|
|
81
|
+
},
|
|
82
|
+
"required": [
|
|
83
|
+
"alias",
|
|
84
|
+
"decision",
|
|
85
|
+
"inputPointer"
|
|
86
|
+
],
|
|
87
|
+
"additionalProperties": false
|
|
88
|
+
},
|
|
89
|
+
"minItems": 1
|
|
90
|
+
},
|
|
91
|
+
"rules": {
|
|
92
|
+
"type": "array",
|
|
93
|
+
"items": {
|
|
94
|
+
"type": "object",
|
|
95
|
+
"properties": {
|
|
96
|
+
"id": {
|
|
97
|
+
"type": "string",
|
|
98
|
+
"minLength": 1
|
|
99
|
+
},
|
|
100
|
+
"priority": {
|
|
101
|
+
"type": "integer",
|
|
102
|
+
"minimum": -9007199254740991,
|
|
103
|
+
"maximum": 9007199254740991
|
|
104
|
+
},
|
|
105
|
+
"when": {
|
|
106
|
+
"$ref": "#/$defs/predicate"
|
|
107
|
+
},
|
|
108
|
+
"outcome": {}
|
|
109
|
+
},
|
|
110
|
+
"required": [
|
|
111
|
+
"id",
|
|
112
|
+
"priority",
|
|
113
|
+
"when",
|
|
114
|
+
"outcome"
|
|
115
|
+
],
|
|
116
|
+
"additionalProperties": false
|
|
117
|
+
},
|
|
118
|
+
"minItems": 1
|
|
119
|
+
},
|
|
120
|
+
"composition": {
|
|
121
|
+
"enum": [
|
|
122
|
+
"first-match",
|
|
123
|
+
"collect"
|
|
124
|
+
]
|
|
125
|
+
},
|
|
126
|
+
"conflict": {
|
|
127
|
+
"enum": [
|
|
128
|
+
"error",
|
|
129
|
+
"review"
|
|
130
|
+
]
|
|
131
|
+
},
|
|
132
|
+
"defaultOutcome": {},
|
|
133
|
+
"failureOutcome": {},
|
|
134
|
+
"outputSchema": {
|
|
135
|
+
"type": "object"
|
|
136
|
+
}
|
|
137
|
+
},
|
|
138
|
+
"required": [
|
|
139
|
+
"purpose",
|
|
140
|
+
"inputSchema",
|
|
141
|
+
"evaluations",
|
|
142
|
+
"rules",
|
|
143
|
+
"composition",
|
|
144
|
+
"conflict",
|
|
145
|
+
"defaultOutcome",
|
|
146
|
+
"failureOutcome",
|
|
147
|
+
"outputSchema"
|
|
148
|
+
],
|
|
149
|
+
"additionalProperties": false
|
|
150
|
+
}
|
|
151
|
+
},
|
|
152
|
+
"required": [
|
|
153
|
+
"apiVersion",
|
|
154
|
+
"kind",
|
|
155
|
+
"metadata",
|
|
156
|
+
"spec"
|
|
157
|
+
],
|
|
158
|
+
"additionalProperties": false,
|
|
159
|
+
"$defs": {
|
|
160
|
+
"predicate": {
|
|
161
|
+
"oneOf": [
|
|
162
|
+
{
|
|
163
|
+
"type": "object",
|
|
164
|
+
"properties": {
|
|
165
|
+
"op": {
|
|
166
|
+
"enum": [
|
|
167
|
+
"eq",
|
|
168
|
+
"ne",
|
|
169
|
+
"lt",
|
|
170
|
+
"lte",
|
|
171
|
+
"gt",
|
|
172
|
+
"gte",
|
|
173
|
+
"exists"
|
|
174
|
+
]
|
|
175
|
+
},
|
|
176
|
+
"left": {
|
|
177
|
+
"type": "object",
|
|
178
|
+
"properties": {
|
|
179
|
+
"source": {
|
|
180
|
+
"enum": [
|
|
181
|
+
"input",
|
|
182
|
+
"decision"
|
|
183
|
+
]
|
|
184
|
+
},
|
|
185
|
+
"alias": {
|
|
186
|
+
"type": "string",
|
|
187
|
+
"minLength": 1
|
|
188
|
+
},
|
|
189
|
+
"pointer": {
|
|
190
|
+
"type": "string",
|
|
191
|
+
"pattern": "^(|/(?:[^~]|~[01])*)$"
|
|
192
|
+
}
|
|
193
|
+
},
|
|
194
|
+
"required": [
|
|
195
|
+
"source",
|
|
196
|
+
"pointer"
|
|
197
|
+
],
|
|
198
|
+
"additionalProperties": false,
|
|
199
|
+
"allOf": [
|
|
200
|
+
{
|
|
201
|
+
"if": {
|
|
202
|
+
"properties": {
|
|
203
|
+
"source": {
|
|
204
|
+
"const": "decision"
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
},
|
|
208
|
+
"then": {
|
|
209
|
+
"properties": {
|
|
210
|
+
"alias": {}
|
|
211
|
+
},
|
|
212
|
+
"required": [
|
|
213
|
+
"alias"
|
|
214
|
+
]
|
|
215
|
+
},
|
|
216
|
+
"else": {
|
|
217
|
+
"not": {
|
|
218
|
+
"properties": {
|
|
219
|
+
"alias": {}
|
|
220
|
+
},
|
|
221
|
+
"required": [
|
|
222
|
+
"alias"
|
|
223
|
+
]
|
|
224
|
+
}
|
|
225
|
+
}
|
|
226
|
+
}
|
|
227
|
+
]
|
|
228
|
+
},
|
|
229
|
+
"right": {}
|
|
230
|
+
},
|
|
231
|
+
"required": [
|
|
232
|
+
"op",
|
|
233
|
+
"left"
|
|
234
|
+
],
|
|
235
|
+
"additionalProperties": false,
|
|
236
|
+
"allOf": [
|
|
237
|
+
{
|
|
238
|
+
"if": {
|
|
239
|
+
"properties": {
|
|
240
|
+
"op": {
|
|
241
|
+
"const": "exists"
|
|
242
|
+
}
|
|
243
|
+
}
|
|
244
|
+
},
|
|
245
|
+
"then": {
|
|
246
|
+
"not": {
|
|
247
|
+
"properties": {
|
|
248
|
+
"right": {}
|
|
249
|
+
},
|
|
250
|
+
"required": [
|
|
251
|
+
"right"
|
|
252
|
+
]
|
|
253
|
+
}
|
|
254
|
+
},
|
|
255
|
+
"else": {
|
|
256
|
+
"properties": {
|
|
257
|
+
"right": {}
|
|
258
|
+
},
|
|
259
|
+
"required": [
|
|
260
|
+
"right"
|
|
261
|
+
]
|
|
262
|
+
}
|
|
263
|
+
}
|
|
264
|
+
]
|
|
265
|
+
},
|
|
266
|
+
{
|
|
267
|
+
"type": "object",
|
|
268
|
+
"properties": {
|
|
269
|
+
"all": {
|
|
270
|
+
"type": "array",
|
|
271
|
+
"items": {
|
|
272
|
+
"$ref": "#/$defs/predicate"
|
|
273
|
+
},
|
|
274
|
+
"minItems": 1
|
|
275
|
+
}
|
|
276
|
+
},
|
|
277
|
+
"required": [
|
|
278
|
+
"all"
|
|
279
|
+
],
|
|
280
|
+
"additionalProperties": false
|
|
281
|
+
},
|
|
282
|
+
{
|
|
283
|
+
"type": "object",
|
|
284
|
+
"properties": {
|
|
285
|
+
"any": {
|
|
286
|
+
"type": "array",
|
|
287
|
+
"items": {
|
|
288
|
+
"$ref": "#/$defs/predicate"
|
|
289
|
+
},
|
|
290
|
+
"minItems": 1
|
|
291
|
+
}
|
|
292
|
+
},
|
|
293
|
+
"required": [
|
|
294
|
+
"any"
|
|
295
|
+
],
|
|
296
|
+
"additionalProperties": false
|
|
297
|
+
},
|
|
298
|
+
{
|
|
299
|
+
"type": "object",
|
|
300
|
+
"properties": {
|
|
301
|
+
"not": {
|
|
302
|
+
"$ref": "#/$defs/predicate"
|
|
303
|
+
}
|
|
304
|
+
},
|
|
305
|
+
"required": [
|
|
306
|
+
"not"
|
|
307
|
+
],
|
|
308
|
+
"additionalProperties": false
|
|
309
|
+
}
|
|
310
|
+
]
|
|
311
|
+
}
|
|
312
|
+
}
|
|
313
|
+
}
|