@kontextmind/kxm 0.6.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/.claude-plugin/marketplace.json +19 -0
- package/.kxm/README.md +14 -0
- package/.kxm/assets/README.md +5 -0
- package/.kxm/assets/retrospectives/README.md +5 -0
- package/.kxm/config/README.md +5 -0
- package/.kxm/config/agents.json +43 -0
- package/.kxm/config/env.example +56 -0
- package/.kxm/config/update.example.yaml +9 -0
- package/.kxm/config/workflows/fix.json +160 -0
- package/.kxm/config/workflows/jira-development.json +116 -0
- package/.kxm/config/workflows/provenance-quorum.json +150 -0
- package/.kxm/config/workflows/v04-dogfood.json +72 -0
- package/CHANGELOG.md +465 -0
- package/LICENSE +21 -0
- package/README.md +306 -0
- package/SECURITY.md +72 -0
- package/docs/README.md +48 -0
- package/docs/agent-communication-envelopes-and-gates.md +553 -0
- package/docs/architecture.md +242 -0
- package/docs/assignment-runner.md +241 -0
- package/docs/configuration.md +361 -0
- package/docs/continuous-improvement.md +114 -0
- package/docs/getting-started.md +253 -0
- package/docs/kxm-handbook.md +1090 -0
- package/docs/operations.md +205 -0
- package/docs/provenance-gates.md +291 -0
- package/docs/skills.md +45 -0
- package/docs/templates/README.md +95 -0
- package/docs/templates/adr.md +88 -0
- package/docs/templates/architecture.md +120 -0
- package/docs/templates/bug-fix.md +109 -0
- package/docs/templates/feature.md +108 -0
- package/docs/templates/handoff.md +72 -0
- package/docs/templates/postmortem.md +77 -0
- package/docs/templates/research.md +100 -0
- package/docs/templates/review.md +85 -0
- package/docs/templates/runbook.md +73 -0
- package/docs/templates/test-plan.md +87 -0
- package/docs/templates/test-report.md +72 -0
- package/docs/test-matrix.md +121 -0
- package/docs/troubleshooting.md +249 -0
- package/docs/vnext/README.md +62 -0
- package/docs/vnext/architecture.md +185 -0
- package/docs/vnext/effects-and-recovery.md +172 -0
- package/docs/vnext/lifecycles.md +235 -0
- package/docs/vnext/migration.md +220 -0
- package/docs/vnext/routing.md +184 -0
- package/docs/vnext/synchronization.md +172 -0
- package/docs/vnext/terminology.md +240 -0
- package/docs/vnext/validation.md +335 -0
- package/docs/webhook-workflows.md +240 -0
- package/docs/workflow-guide.md +1150 -0
- package/examples/README.md +102 -0
- package/examples/provenance-workflow.json +40 -0
- package/examples/requester.ts +30 -0
- package/examples/reviewer-agent.ts +29 -0
- package/examples/roundtrip.ts +46 -0
- package/examples/vnext/.kxm/agents/coordinator.yaml +16 -0
- package/examples/vnext/.kxm/agents/critic-1.yaml +16 -0
- package/examples/vnext/.kxm/agents/critic-2.yaml +15 -0
- package/examples/vnext/.kxm/agents/critic-3.yaml +15 -0
- package/examples/vnext/.kxm/agents/implementer.yaml +15 -0
- package/examples/vnext/.kxm/agents/planner.yaml +13 -0
- package/examples/vnext/.kxm/agents/reproducer.yaml +15 -0
- package/examples/vnext/.kxm/agents/reviewer.yaml +15 -0
- package/examples/vnext/.kxm/gates.yaml +8 -0
- package/examples/vnext/.kxm/models/critic-claude.yaml +11 -0
- package/examples/vnext/.kxm/models/critic-gemini.yaml +11 -0
- package/examples/vnext/.kxm/models/critic-grok.yaml +12 -0
- package/examples/vnext/.kxm/models/implementation.yaml +14 -0
- package/examples/vnext/.kxm/models/primary.yaml +17 -0
- package/examples/vnext/.kxm/prices.yaml +111 -0
- package/examples/vnext/.kxm/project/env.yaml +7 -0
- package/examples/vnext/.kxm/project.yaml +32 -0
- package/examples/vnext/.kxm/repo/repo.yaml +8 -0
- package/examples/vnext/.kxm/workflows/default.yaml +92 -0
- package/examples/vnext/.kxm/workflows/fix.yaml +376 -0
- package/examples/vnext/.kxm/workflows/improve.yaml +57 -0
- package/examples/vnext/README.md +53 -0
- package/examples/vnext/records/assignment-result-recorded.json +63 -0
- package/examples/vnext/records/assignment-result.json +46 -0
- package/examples/vnext/records/context-candidate.json +42 -0
- package/examples/vnext/records/delivery-manifest.json +66 -0
- package/examples/vnext/records/effect-uncertainty-resolved-sync.json +67 -0
- package/examples/vnext/records/effect-uncertainty-resolved.json +62 -0
- package/examples/vnext/records/run-created.json +54 -0
- package/examples/vnext/records/sync-event.json +65 -0
- package/examples/vnext/repositories/api/.kxm/repo/env.yaml +7 -0
- package/examples/vnext/repositories/api/.kxm/repo/repo.yaml +8 -0
- package/examples/vnext/repositories/web/.kxm/repo/repo.yaml +8 -0
- package/examples/workflow-signal.ts +63 -0
- package/package.json +129 -0
- package/plugins/kxm/.claude-plugin/plugin.json +73 -0
- package/plugins/kxm/.mcp.json +19 -0
- package/plugins/kxm/README.md +93 -0
- package/plugins/kxm/dist/cli.js +42853 -0
- package/plugins/kxm/dist/client.js +416 -0
- package/plugins/kxm/dist/core.js +1823 -0
- package/plugins/kxm/dist/extension.js +3797 -0
- package/plugins/kxm/dist/mcp-server.js +17104 -0
- package/plugins/kxm/dist/runtime.js +23361 -0
- package/plugins/kxm/dist/server.js +13640 -0
- package/plugins/kxm/dist/vnext-runtime-supervisor.js +21109 -0
- package/plugins/kxm/package.json +12 -0
- package/plugins/kxm/skills/kxm/SKILL.md +97 -0
- package/plugins/kxm/skills/kxm/references/protocol.md +103 -0
- package/plugins/kxm/skills/kxm-session/SKILL.md +53 -0
- package/plugins/kxm/src/arbiter.ts +355 -0
- package/plugins/kxm/src/artifacts-exist.ts +62 -0
- package/plugins/kxm/src/autocomplete.ts +236 -0
- package/plugins/kxm/src/cli.ts +3707 -0
- package/plugins/kxm/src/client.ts +614 -0
- package/plugins/kxm/src/commands.ts +1063 -0
- package/plugins/kxm/src/config.ts +290 -0
- package/plugins/kxm/src/context/providers.ts +101 -0
- package/plugins/kxm/src/context-packet.ts +332 -0
- package/plugins/kxm/src/context.ts +499 -0
- package/plugins/kxm/src/core.ts +6 -0
- package/plugins/kxm/src/database.ts +563 -0
- package/plugins/kxm/src/diagnostics.ts +184 -0
- package/plugins/kxm/src/envelope.ts +118 -0
- package/plugins/kxm/src/extension.ts +895 -0
- package/plugins/kxm/src/external-effects.ts +299 -0
- package/plugins/kxm/src/github-watch.ts +255 -0
- package/plugins/kxm/src/hub-binding.ts +160 -0
- package/plugins/kxm/src/hub.ts +2502 -0
- package/plugins/kxm/src/improve.ts +383 -0
- package/plugins/kxm/src/inbox.ts +10 -0
- package/plugins/kxm/src/kxm-install-kind.ts +113 -0
- package/plugins/kxm/src/kxm-update-config.ts +39 -0
- package/plugins/kxm/src/kxm-update.ts +238 -0
- package/plugins/kxm/src/local-snapshot.ts +406 -0
- package/plugins/kxm/src/logger.ts +198 -0
- package/plugins/kxm/src/mcp-server.ts +143 -0
- package/plugins/kxm/src/memory.ts +385 -0
- package/plugins/kxm/src/nous-pi.ts +287 -0
- package/plugins/kxm/src/nous-provider.ts +729 -0
- package/plugins/kxm/src/price-calc.ts +87 -0
- package/plugins/kxm/src/prices.ts +121 -0
- package/plugins/kxm/src/protocol.ts +172 -0
- package/plugins/kxm/src/recovery.ts +211 -0
- package/plugins/kxm/src/redact.ts +26 -0
- package/plugins/kxm/src/retrospective.ts +400 -0
- package/plugins/kxm/src/routing.ts +830 -0
- package/plugins/kxm/src/runtime.ts +9 -0
- package/plugins/kxm/src/server.ts +117 -0
- package/plugins/kxm/src/session-work.ts +571 -0
- package/plugins/kxm/src/session.ts +184 -0
- package/plugins/kxm/src/skills.ts +535 -0
- package/plugins/kxm/src/state.ts +326 -0
- package/plugins/kxm/src/store.ts +637 -0
- package/plugins/kxm/src/studio-layout.ts +268 -0
- package/plugins/kxm/src/suggest.ts +162 -0
- package/plugins/kxm/src/task-manager.ts +244 -0
- package/plugins/kxm/src/telemetry.ts +116 -0
- package/plugins/kxm/src/tui.ts +1046 -0
- package/plugins/kxm/src/vnext-bindings.ts +403 -0
- package/plugins/kxm/src/vnext-config.ts +1646 -0
- package/plugins/kxm/src/vnext-engine-artifacts.ts +86 -0
- package/plugins/kxm/src/vnext-engine-command.ts +533 -0
- package/plugins/kxm/src/vnext-engine-compile.ts +722 -0
- package/plugins/kxm/src/vnext-engine-evidence.ts +273 -0
- package/plugins/kxm/src/vnext-engine-fold.ts +1400 -0
- package/plugins/kxm/src/vnext-engine-gate-records.ts +583 -0
- package/plugins/kxm/src/vnext-engine-plan.ts +717 -0
- package/plugins/kxm/src/vnext-engine.ts +2458 -0
- package/plugins/kxm/src/vnext-gate-hash.ts +10 -0
- package/plugins/kxm/src/vnext-harness.ts +1142 -0
- package/plugins/kxm/src/vnext-init.ts +430 -0
- package/plugins/kxm/src/vnext-migrate.ts +1848 -0
- package/plugins/kxm/src/vnext-oneshot-producer.ts +424 -0
- package/plugins/kxm/src/vnext-permission.ts +936 -0
- package/plugins/kxm/src/vnext-pi-producer.ts +628 -0
- package/plugins/kxm/src/vnext-repair.ts +1094 -0
- package/plugins/kxm/src/vnext-runtime-owner.ts +320 -0
- package/plugins/kxm/src/vnext-runtime-store.ts +1560 -0
- package/plugins/kxm/src/vnext-runtime-supervisor.ts +586 -0
- package/plugins/kxm/src/vnext-runtime.ts +663 -0
- package/plugins/kxm/src/vnext-template.ts +247 -0
- package/plugins/kxm/src/wiki.ts +313 -0
- package/plugins/kxm/src/workflow.ts +1548 -0
- package/schemas/vnext/README.md +46 -0
- package/schemas/vnext/agent.schema.json +40 -0
- package/schemas/vnext/assignment-result.schema.json +66 -0
- package/schemas/vnext/backup-manifest.schema.json +89 -0
- package/schemas/vnext/candidate.schema.json +109 -0
- package/schemas/vnext/common.schema.json +422 -0
- package/schemas/vnext/context-candidate.schema.json +76 -0
- package/schemas/vnext/context-packet.schema.json +192 -0
- package/schemas/vnext/delivery-manifest.schema.json +159 -0
- package/schemas/vnext/environment.schema.json +66 -0
- package/schemas/vnext/gate-registry.schema.json +109 -0
- package/schemas/vnext/handoff-manifest.schema.json +146 -0
- package/schemas/vnext/init-operation.schema.json +61 -0
- package/schemas/vnext/local-repository-bindings.schema.json +30 -0
- package/schemas/vnext/memory-record.schema.json +45 -0
- package/schemas/vnext/migration-decision.schema.json +26 -0
- package/schemas/vnext/migration-plan.schema.json +123 -0
- package/schemas/vnext/migration-receipt.schema.json +52 -0
- package/schemas/vnext/model.schema.json +42 -0
- package/schemas/vnext/permission-diff.schema.json +57 -0
- package/schemas/vnext/prices.schema.json +115 -0
- package/schemas/vnext/project.schema.json +85 -0
- package/schemas/vnext/repository.schema.json +24 -0
- package/schemas/vnext/run-event.schema.json +460 -0
- package/schemas/vnext/session-brief.schema.json +153 -0
- package/schemas/vnext/sync-event.schema.json +234 -0
- package/schemas/vnext/template-provenance.schema.json +38 -0
- package/schemas/vnext/workflow.schema.json +248 -0
- package/scripts/assignment-run.d.mts +354 -0
- package/scripts/assignment-run.mjs +4451 -0
- package/scripts/build-runtime.mjs +56 -0
- package/scripts/check-generated.mjs +77 -0
- package/scripts/check-versions.mjs +34 -0
- package/scripts/emit-codex-artifacts.d.mts +9 -0
- package/scripts/emit-codex-artifacts.mjs +91 -0
- package/scripts/harness-run.d.mts +83 -0
- package/scripts/harness-run.mjs +2095 -0
- package/scripts/kxm-hub.mjs +105 -0
- package/scripts/kxm-publish-npm.mjs +327 -0
- package/scripts/kxm-release-github.mjs +472 -0
- package/scripts/kxm-runtime-supervisor.mjs +7 -0
- package/scripts/kxm-worker.mjs +1127 -0
- package/scripts/kxm.mjs +27 -0
- package/scripts/roster-policy.d.mts +20 -0
- package/scripts/roster-policy.mjs +161 -0
- package/scripts/smoke-multi-pi.mjs +479 -0
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
# KXM vNext schemas
|
|
2
|
+
|
|
3
|
+
These draft 2020-12 JSON Schemas validate parsed YAML configuration, bounded
|
|
4
|
+
Runtime-local records, and JSON events/results for the planned vNext contract.
|
|
5
|
+
|
|
6
|
+
| Schema | Identity |
|
|
7
|
+
|---|---|
|
|
8
|
+
| `project.schema.json` | `kxm.project.v1` |
|
|
9
|
+
| `repository.schema.json` | `kxm.repository.v1` |
|
|
10
|
+
| `agent.schema.json` | `kxm.agent.v1` |
|
|
11
|
+
| `model.schema.json` | `kxm.model.v1` |
|
|
12
|
+
| `environment.schema.json` | `kxm.environment.v1` |
|
|
13
|
+
| `workflow.schema.json` | `kxm.workflow.v1` |
|
|
14
|
+
| `template-provenance.schema.json` | `kxm.template-provenance.v1` |
|
|
15
|
+
| `local-repository-bindings.schema.json` | `kxm.local-repository-bindings.v1` |
|
|
16
|
+
| `init-operation.schema.json` | `kxm.init-operation.v1` |
|
|
17
|
+
| `migration-plan.schema.json` | `kxm.migration-plan.v1` |
|
|
18
|
+
| `migration-decision.schema.json` | `kxm.migration-decision.v1` |
|
|
19
|
+
| `migration-receipt.schema.json` | `kxm.migration-receipt.v1` |
|
|
20
|
+
| `permission-diff.schema.json` | `kxm.permission-diff.v1` |
|
|
21
|
+
| `run-event.schema.json` | `kxm.run-event.v1` |
|
|
22
|
+
| `sync-event.schema.json` | `kxm.sync-event.v1` |
|
|
23
|
+
| `assignment-result.schema.json` | `kxm.assignment-result.v1` |
|
|
24
|
+
| `delivery-manifest.schema.json` | `kxm.delivery-manifest.v1` |
|
|
25
|
+
| `context-candidate.schema.json` | `kxm.context-candidate.v1` |
|
|
26
|
+
| `candidate.schema.json` | `kxm.candidate.v1` |
|
|
27
|
+
|
|
28
|
+
`common.schema.json` supplies bounded shared definitions. JSON Schema is only
|
|
29
|
+
one validation layer; cross-file references, state-machine semantics,
|
|
30
|
+
permission diffs, model diversity, path portability, and snapshot reproduction
|
|
31
|
+
are deterministic semantic checks described in
|
|
32
|
+
[`docs/vnext/validation.md`](../../docs/vnext/validation.md).
|
|
33
|
+
|
|
34
|
+
Unknown fields fail closed. A new field requires a reviewed schema revision;
|
|
35
|
+
do not add generic metadata escape hatches to event or synchronization payloads.
|
|
36
|
+
|
|
37
|
+
`kxm.run-event.v1` `run.created` records declared inventory as `repositoryIds`
|
|
38
|
+
and `executorIds` (empty executor inventory is valid). `repositories` /
|
|
39
|
+
`executors` object arrays remain optional prepared snapshots/resolutions and
|
|
40
|
+
are not emitted by the D2 engine. `memoryRevision` is required;
|
|
41
|
+
`ctxrev_absent` is the explicit none value until E5. D2 event types have
|
|
42
|
+
closed payload contracts for the identity, status, and result fields the
|
|
43
|
+
engine emits. `assignment.result_recorded` requires `assignmentId` and
|
|
44
|
+
`resultClass`; class `outcome` requires `outcome`, and the non-outcome
|
|
45
|
+
classes forbid it. Shared future event types stay in the enum; this slice
|
|
46
|
+
does not emit `waiting` or `blocked_uncertain` run transitions.
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://schemas.kxm.dev/vnext/agent.schema.json",
|
|
4
|
+
"title": "KXM agent definition",
|
|
5
|
+
"description": "The filename determines the agent identity.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"required": ["schema", "purpose"],
|
|
8
|
+
"properties": {
|
|
9
|
+
"schema": { "const": "kxm.agent.v1" },
|
|
10
|
+
"purpose": { "type": "string", "minLength": 1, "maxLength": 2000 },
|
|
11
|
+
"instructions": { "type": "string", "maxLength": 16000 },
|
|
12
|
+
"model": { "$ref": "common.schema.json#/$defs/modelSelector" },
|
|
13
|
+
"executor": { "$ref": "common.schema.json#/$defs/identifier" },
|
|
14
|
+
"harness": { "$ref": "common.schema.json#/$defs/identifier" },
|
|
15
|
+
"tools": { "$ref": "common.schema.json#/$defs/toolPolicy" },
|
|
16
|
+
"defaultRepositoryAccess": { "$ref": "common.schema.json#/$defs/repositoryAccess" },
|
|
17
|
+
"repositories": {
|
|
18
|
+
"type": "object",
|
|
19
|
+
"propertyNames": { "$ref": "common.schema.json#/$defs/identifier" },
|
|
20
|
+
"additionalProperties": { "$ref": "common.schema.json#/$defs/repositoryAccess" },
|
|
21
|
+
"maxProperties": 64
|
|
22
|
+
},
|
|
23
|
+
"secrets": {
|
|
24
|
+
"type": "array",
|
|
25
|
+
"items": { "$ref": "common.schema.json#/$defs/secretGrant" },
|
|
26
|
+
"maxItems": 64
|
|
27
|
+
},
|
|
28
|
+
"network": { "enum": ["none", "provider-only", "restricted", "host"] },
|
|
29
|
+
"resultSchema": { "type": "string", "minLength": 1, "maxLength": 512 },
|
|
30
|
+
"session": {
|
|
31
|
+
"type": "object",
|
|
32
|
+
"properties": {
|
|
33
|
+
"reuse": { "const": "compatible-run-scope" },
|
|
34
|
+
"maxIdleMs": { "$ref": "common.schema.json#/$defs/durationMs" }
|
|
35
|
+
},
|
|
36
|
+
"additionalProperties": false
|
|
37
|
+
}
|
|
38
|
+
},
|
|
39
|
+
"additionalProperties": false
|
|
40
|
+
}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://schemas.kxm.dev/vnext/assignment-result.schema.json",
|
|
4
|
+
"title": "KXM structured assignment result",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"required": [
|
|
7
|
+
"schema",
|
|
8
|
+
"projectId",
|
|
9
|
+
"runId",
|
|
10
|
+
"stepId",
|
|
11
|
+
"stepAttempt",
|
|
12
|
+
"assignmentId",
|
|
13
|
+
"attemptId",
|
|
14
|
+
"status",
|
|
15
|
+
"outcome",
|
|
16
|
+
"summary",
|
|
17
|
+
"timing"
|
|
18
|
+
],
|
|
19
|
+
"properties": {
|
|
20
|
+
"schema": { "const": "kxm.assignment-result.v1" },
|
|
21
|
+
"projectId": { "$ref": "common.schema.json#/$defs/opaqueId" },
|
|
22
|
+
"runId": { "$ref": "common.schema.json#/$defs/opaqueId" },
|
|
23
|
+
"stepId": { "$ref": "common.schema.json#/$defs/identifier" },
|
|
24
|
+
"stepAttempt": { "type": "integer", "minimum": 1 },
|
|
25
|
+
"assignmentId": { "$ref": "common.schema.json#/$defs/opaqueId" },
|
|
26
|
+
"attemptId": { "$ref": "common.schema.json#/$defs/opaqueId" },
|
|
27
|
+
"status": { "enum": ["passed", "failed", "blocked_uncertain", "cancelled"] },
|
|
28
|
+
"outcome": { "$ref": "common.schema.json#/$defs/identifier" },
|
|
29
|
+
"summary": { "type": "string", "minLength": 1, "maxLength": 4000 },
|
|
30
|
+
"evidenceRefs": {
|
|
31
|
+
"type": "array",
|
|
32
|
+
"items": { "$ref": "common.schema.json#/$defs/evidenceRef" },
|
|
33
|
+
"maxItems": 64
|
|
34
|
+
},
|
|
35
|
+
"artifacts": {
|
|
36
|
+
"type": "array",
|
|
37
|
+
"items": { "$ref": "common.schema.json#/$defs/artifactRef" },
|
|
38
|
+
"maxItems": 64
|
|
39
|
+
},
|
|
40
|
+
"repositoryOutputs": {
|
|
41
|
+
"type": "array",
|
|
42
|
+
"items": {
|
|
43
|
+
"type": "object",
|
|
44
|
+
"required": ["repositoryId", "baseCommit", "contentSnapshotHash"],
|
|
45
|
+
"properties": {
|
|
46
|
+
"repositoryId": { "$ref": "common.schema.json#/$defs/identifier" },
|
|
47
|
+
"baseCommit": { "$ref": "common.schema.json#/$defs/gitCommit" },
|
|
48
|
+
"contentSnapshotHash": { "$ref": "common.schema.json#/$defs/sha256" },
|
|
49
|
+
"outputCommit": { "$ref": "common.schema.json#/$defs/gitCommit" },
|
|
50
|
+
"changes": { "$ref": "common.schema.json#/$defs/fileChanges" }
|
|
51
|
+
},
|
|
52
|
+
"additionalProperties": false
|
|
53
|
+
},
|
|
54
|
+
"maxItems": 64
|
|
55
|
+
},
|
|
56
|
+
"receipts": {
|
|
57
|
+
"type": "array",
|
|
58
|
+
"items": { "$ref": "common.schema.json#/$defs/receipt" },
|
|
59
|
+
"maxItems": 64
|
|
60
|
+
},
|
|
61
|
+
"timing": { "$ref": "common.schema.json#/$defs/timing" },
|
|
62
|
+
"usage": { "$ref": "common.schema.json#/$defs/usage" },
|
|
63
|
+
"error": { "$ref": "common.schema.json#/$defs/errorSummary" }
|
|
64
|
+
},
|
|
65
|
+
"additionalProperties": false
|
|
66
|
+
}
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://schemas.kxm.dev/vnext/backup-manifest.schema.json",
|
|
4
|
+
"title": "KXM SQLite stores backup manifest",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"required": [
|
|
7
|
+
"schema",
|
|
8
|
+
"backupId",
|
|
9
|
+
"createdAt",
|
|
10
|
+
"stores"
|
|
11
|
+
],
|
|
12
|
+
"properties": {
|
|
13
|
+
"schema": {
|
|
14
|
+
"const": "kxm.backup-manifest.v1"
|
|
15
|
+
},
|
|
16
|
+
"backupId": {
|
|
17
|
+
"$ref": "common.schema.json#/$defs/opaqueId"
|
|
18
|
+
},
|
|
19
|
+
"createdAt": {
|
|
20
|
+
"$ref": "common.schema.json#/$defs/timestamp"
|
|
21
|
+
},
|
|
22
|
+
"projectRoot": {
|
|
23
|
+
"type": "string",
|
|
24
|
+
"maxLength": 1024
|
|
25
|
+
},
|
|
26
|
+
"stores": {
|
|
27
|
+
"type": "array",
|
|
28
|
+
"items": {
|
|
29
|
+
"$ref": "#/$defs/backupStoreRecord"
|
|
30
|
+
},
|
|
31
|
+
"minItems": 1,
|
|
32
|
+
"maxItems": 64
|
|
33
|
+
},
|
|
34
|
+
"manifestSha256": {
|
|
35
|
+
"$ref": "common.schema.json#/$defs/sha256"
|
|
36
|
+
}
|
|
37
|
+
},
|
|
38
|
+
"additionalProperties": false,
|
|
39
|
+
"$defs": {
|
|
40
|
+
"backupStoreRecord": {
|
|
41
|
+
"type": "object",
|
|
42
|
+
"required": [
|
|
43
|
+
"storeId",
|
|
44
|
+
"sourcePath",
|
|
45
|
+
"backupFile",
|
|
46
|
+
"schemaVersion",
|
|
47
|
+
"sha256",
|
|
48
|
+
"bytes",
|
|
49
|
+
"integrity"
|
|
50
|
+
],
|
|
51
|
+
"properties": {
|
|
52
|
+
"storeId": {
|
|
53
|
+
"type": "string",
|
|
54
|
+
"minLength": 1,
|
|
55
|
+
"maxLength": 128,
|
|
56
|
+
"pattern": "^[a-zA-Z0-9_.:-]+$"
|
|
57
|
+
},
|
|
58
|
+
"sourcePath": {
|
|
59
|
+
"type": "string",
|
|
60
|
+
"minLength": 1,
|
|
61
|
+
"maxLength": 1024
|
|
62
|
+
},
|
|
63
|
+
"backupFile": {
|
|
64
|
+
"type": "string",
|
|
65
|
+
"minLength": 1,
|
|
66
|
+
"maxLength": 256,
|
|
67
|
+
"pattern": "^[a-zA-Z0-9_.-]+$"
|
|
68
|
+
},
|
|
69
|
+
"schemaVersion": {
|
|
70
|
+
"type": "integer",
|
|
71
|
+
"minimum": 0,
|
|
72
|
+
"maximum": 1000000
|
|
73
|
+
},
|
|
74
|
+
"sha256": {
|
|
75
|
+
"$ref": "common.schema.json#/$defs/sha256"
|
|
76
|
+
},
|
|
77
|
+
"bytes": {
|
|
78
|
+
"type": "integer",
|
|
79
|
+
"minimum": 0,
|
|
80
|
+
"maximum": 107374182400
|
|
81
|
+
},
|
|
82
|
+
"integrity": {
|
|
83
|
+
"const": "ok"
|
|
84
|
+
}
|
|
85
|
+
},
|
|
86
|
+
"additionalProperties": false
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
}
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://schemas.kxm.dev/vnext/candidate.schema.json",
|
|
4
|
+
"title": "KXM coded-repeat improvement candidate",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"required": [
|
|
7
|
+
"schema",
|
|
8
|
+
"id",
|
|
9
|
+
"kind",
|
|
10
|
+
"summary",
|
|
11
|
+
"evidenceRefs",
|
|
12
|
+
"baselineMetrics",
|
|
13
|
+
"declaredOutcome",
|
|
14
|
+
"measure",
|
|
15
|
+
"proposedDiffPath",
|
|
16
|
+
"status",
|
|
17
|
+
"createdAt"
|
|
18
|
+
],
|
|
19
|
+
"properties": {
|
|
20
|
+
"schema": {
|
|
21
|
+
"const": "kxm.candidate.v1"
|
|
22
|
+
},
|
|
23
|
+
"id": {
|
|
24
|
+
"$ref": "common.schema.json#/$defs/opaqueId"
|
|
25
|
+
},
|
|
26
|
+
"kind": {
|
|
27
|
+
"enum": [
|
|
28
|
+
"gate",
|
|
29
|
+
"skill",
|
|
30
|
+
"workflow-step"
|
|
31
|
+
]
|
|
32
|
+
},
|
|
33
|
+
"summary": {
|
|
34
|
+
"type": "string",
|
|
35
|
+
"minLength": 1,
|
|
36
|
+
"maxLength": 2000
|
|
37
|
+
},
|
|
38
|
+
"evidenceRefs": {
|
|
39
|
+
"type": "array",
|
|
40
|
+
"items": {
|
|
41
|
+
"type": "string",
|
|
42
|
+
"minLength": 1,
|
|
43
|
+
"maxLength": 256
|
|
44
|
+
},
|
|
45
|
+
"minItems": 1,
|
|
46
|
+
"maxItems": 64
|
|
47
|
+
},
|
|
48
|
+
"baselineMetrics": {
|
|
49
|
+
"type": "object",
|
|
50
|
+
"required": [
|
|
51
|
+
"recurrence",
|
|
52
|
+
"meanCost",
|
|
53
|
+
"meanLatency",
|
|
54
|
+
"verifyPassRate",
|
|
55
|
+
"rework"
|
|
56
|
+
],
|
|
57
|
+
"properties": {
|
|
58
|
+
"recurrence": {
|
|
59
|
+
"type": "integer",
|
|
60
|
+
"minimum": 1
|
|
61
|
+
},
|
|
62
|
+
"meanCost": {
|
|
63
|
+
"type": "number",
|
|
64
|
+
"minimum": 0
|
|
65
|
+
},
|
|
66
|
+
"meanLatency": {
|
|
67
|
+
"type": "number",
|
|
68
|
+
"minimum": 0
|
|
69
|
+
},
|
|
70
|
+
"verifyPassRate": {
|
|
71
|
+
"type": "number",
|
|
72
|
+
"minimum": 0,
|
|
73
|
+
"maximum": 1
|
|
74
|
+
},
|
|
75
|
+
"rework": {
|
|
76
|
+
"type": "integer",
|
|
77
|
+
"minimum": 0
|
|
78
|
+
}
|
|
79
|
+
},
|
|
80
|
+
"additionalProperties": false
|
|
81
|
+
},
|
|
82
|
+
"declaredOutcome": {
|
|
83
|
+
"type": "string",
|
|
84
|
+
"minLength": 1,
|
|
85
|
+
"maxLength": 2000
|
|
86
|
+
},
|
|
87
|
+
"measure": {
|
|
88
|
+
"type": "string",
|
|
89
|
+
"minLength": 1,
|
|
90
|
+
"maxLength": 2000
|
|
91
|
+
},
|
|
92
|
+
"proposedDiffPath": {
|
|
93
|
+
"$ref": "common.schema.json#/$defs/relativePath"
|
|
94
|
+
},
|
|
95
|
+
"status": {
|
|
96
|
+
"enum": [
|
|
97
|
+
"proposed",
|
|
98
|
+
"evaluating",
|
|
99
|
+
"review-required",
|
|
100
|
+
"promoted",
|
|
101
|
+
"rejected"
|
|
102
|
+
]
|
|
103
|
+
},
|
|
104
|
+
"createdAt": {
|
|
105
|
+
"$ref": "common.schema.json#/$defs/timestamp"
|
|
106
|
+
}
|
|
107
|
+
},
|
|
108
|
+
"additionalProperties": false
|
|
109
|
+
}
|