@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,172 @@
|
|
|
1
|
+
# Hub synchronization contract
|
|
2
|
+
|
|
3
|
+
> **Status.** `kxm.sync-event.v1` is a **schema-tested contract**. There is no
|
|
4
|
+
> outbox table, sync transform, or hub ingestion in source. Implementation
|
|
5
|
+
> begins in [Phase 8](../../plans/implementation-plan.md#phase-8-multi-project-hub-vnext).
|
|
6
|
+
|
|
7
|
+
Synchronization is summary-first, project-scoped, at-least-once, and
|
|
8
|
+
allowlist-based. The full local event is never placed directly in the outbox.
|
|
9
|
+
|
|
10
|
+
## Representations
|
|
11
|
+
|
|
12
|
+
### Local event
|
|
13
|
+
|
|
14
|
+
The home Runtime's immutable recovery record. It may contain bounded local data
|
|
15
|
+
or references to protected local content.
|
|
16
|
+
|
|
17
|
+
### Sync-safe event
|
|
18
|
+
|
|
19
|
+
A new object conforming to `kxm.sync-event.v1`. It is derived before the outbox
|
|
20
|
+
and contains only schema-declared fields. It references its source event by ID
|
|
21
|
+
and preserves the run sequence.
|
|
22
|
+
|
|
23
|
+
```text
|
|
24
|
+
local event
|
|
25
|
+
→ choose allowed event fields
|
|
26
|
+
→ apply project policy
|
|
27
|
+
→ replace registered secret values
|
|
28
|
+
→ remove absolute paths
|
|
29
|
+
→ enforce type and length bounds
|
|
30
|
+
→ classify/redact
|
|
31
|
+
→ validate kxm.sync-event.v1
|
|
32
|
+
→ append outbox row
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
A denylist-only sanitizer is insufficient.
|
|
36
|
+
|
|
37
|
+
## Default policy
|
|
38
|
+
|
|
39
|
+
```yaml
|
|
40
|
+
prompts: title-only
|
|
41
|
+
results: bounded-summary
|
|
42
|
+
evidence: references
|
|
43
|
+
artifacts: metadata
|
|
44
|
+
fileChanges: paths-only
|
|
45
|
+
rawLogs: false
|
|
46
|
+
diffs: false
|
|
47
|
+
environmentValues: false
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
Normal projects do not need to materialize this policy.
|
|
51
|
+
|
|
52
|
+
## Field allowlist
|
|
53
|
+
|
|
54
|
+
| Category | Synchronized by default | Excluded by default |
|
|
55
|
+
|---|---|---|
|
|
56
|
+
| Identity | Project, run, workflow, step, assignment, attempt, Runtime IDs | Local account names not needed for authorization |
|
|
57
|
+
| Lifecycle | Event type, sequence, state, outcome, retry/transition counts | Raw child process output |
|
|
58
|
+
| Recovery/control | Resolved effect policy, lease/fencing identity and expiry, actor identity, resolution action, supplied evidence refs | Unstructured operator/tool bodies or secret-bearing receipt URLs |
|
|
59
|
+
| Time | UTC event times, monotonic-derived durations | Host clock internals |
|
|
60
|
+
| Model | Exact provider/model/profile/tags, capability result | Provider tokens and raw requests |
|
|
61
|
+
| Usage | Input/output/cache tokens, reported/estimated cost and currency | Provider billing credentials |
|
|
62
|
+
| Prompt | Bounded display title and prompt hash | Full prompt |
|
|
63
|
+
| Result | Bounded summary and outcome | Full model output or reasoning |
|
|
64
|
+
| Repository | Logical ID, commit/ref/PR receipt, relative changed paths | Absolute paths, file content, diff |
|
|
65
|
+
| Environment | Variable name, scope, resolution status, source kind/version | Values and low-entropy value hashes |
|
|
66
|
+
| Evidence | ID, kind, hash, status, producer metadata permitted by policy | Evidence body |
|
|
67
|
+
| Artifact | ID, kind, hash, size, classification, availability | Artifact bytes |
|
|
68
|
+
| Error | Allowlisted class, component, retryability | Raw provider/tool error body |
|
|
69
|
+
| Learning | Bounded candidate summary, confidence, evidence references | Raw reasoning or automatic activation command |
|
|
70
|
+
| Secret | Reference name/version and grant status when required | Secret value, derived value, credential-store path |
|
|
71
|
+
|
|
72
|
+
Repository paths are normalized, repository-relative, and policy-filtered.
|
|
73
|
+
Sensitive-path policy may replace even a relative path with a classification or
|
|
74
|
+
hash.
|
|
75
|
+
|
|
76
|
+
## Schema-level exclusions
|
|
77
|
+
|
|
78
|
+
`kxm.sync-event.v1` uses `additionalProperties: false` throughout its payload.
|
|
79
|
+
It contains no generic `data`, `metadata`, `context`, `log`, `prompt`, `output`,
|
|
80
|
+
free-form environment map, or `errorBody` escape hatch. Its `environment` field
|
|
81
|
+
is a closed array of name/scope/status/source/version records and cannot carry
|
|
82
|
+
values. Extensions require a new reviewed schema revision.
|
|
83
|
+
|
|
84
|
+
The outbox stores only the already-derived sync object plus retry transport
|
|
85
|
+
metadata. It does not retain the full local source payload for later redaction.
|
|
86
|
+
|
|
87
|
+
## Redaction
|
|
88
|
+
|
|
89
|
+
Before transformation, the Runtime registers resolved secret values with an
|
|
90
|
+
in-memory redactor. The transform also removes:
|
|
91
|
+
|
|
92
|
+
- bearer/API/SSH credential shapes;
|
|
93
|
+
- absolute Windows, UNC, POSIX, and home paths;
|
|
94
|
+
- disallowed control characters;
|
|
95
|
+
- excessive text and collection sizes;
|
|
96
|
+
- fields not selected by the schema;
|
|
97
|
+
- content that violates project classification policy.
|
|
98
|
+
|
|
99
|
+
High-entropy detection is defense in depth, not the primary boundary. Secret
|
|
100
|
+
values MUST NOT be persisted merely to support later redaction.
|
|
101
|
+
|
|
102
|
+
## Ordering and idempotency
|
|
103
|
+
|
|
104
|
+
- The home Runtime assigns the run sequence.
|
|
105
|
+
- The hub accepts an exact event once by `{projectId, runId, sequence}`.
|
|
106
|
+
- Repeating identical bytes is idempotent.
|
|
107
|
+
- Reusing a sequence with different content is a conflict and security alert.
|
|
108
|
+
- A gap remains pending until filled or explicitly declared unavailable.
|
|
109
|
+
- Hub projections never invent missing events.
|
|
110
|
+
- A hub acknowledgement advances the outbox cursor; loss before acknowledgement
|
|
111
|
+
causes a safe transport retry.
|
|
112
|
+
|
|
113
|
+
Synchronization delay does not pause local execution except when the next action
|
|
114
|
+
requires a shared-operation lease.
|
|
115
|
+
|
|
116
|
+
## Prompts and evidence on demand
|
|
117
|
+
|
|
118
|
+
The hub normally displays the run title and bounded summary. When an authorized
|
|
119
|
+
user requests more content:
|
|
120
|
+
|
|
121
|
+
```text
|
|
122
|
+
hub/TUI request
|
|
123
|
+
→ home Runtime verifies project, actor, policy, and current availability
|
|
124
|
+
→ Runtime redacts and bounds the selected content
|
|
125
|
+
→ stream response
|
|
126
|
+
→ retain only if an explicit artifact policy permits it
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
The UI labels live content and retention. An offline Runtime simply makes the
|
|
130
|
+
local body unavailable; the hub does not substitute a summary as if it were the
|
|
131
|
+
body.
|
|
132
|
+
|
|
133
|
+
## Learning synchronization
|
|
134
|
+
|
|
135
|
+
Candidates synchronize because the hub coordinates comparison and promotion.
|
|
136
|
+
They remain evidence with explicit source references, confidence, and status.
|
|
137
|
+
No candidate payload may contain tools, secret grants, approval state, or an
|
|
138
|
+
automatic activation instruction.
|
|
139
|
+
|
|
140
|
+
Offline runs may synchronize candidates after reconnecting. They cannot claim a
|
|
141
|
+
new memory revision or promote one while offline.
|
|
142
|
+
|
|
143
|
+
## Environment and secrets
|
|
144
|
+
|
|
145
|
+
A safe environment record may say:
|
|
146
|
+
|
|
147
|
+
```yaml
|
|
148
|
+
name: DATABASE_URL
|
|
149
|
+
scope: repository:api
|
|
150
|
+
status: resolved
|
|
151
|
+
source: secret-ref
|
|
152
|
+
version: credential-version-7
|
|
153
|
+
```
|
|
154
|
+
|
|
155
|
+
It cannot include a value, a reversible encoding, a value hash for a
|
|
156
|
+
low-entropy secret, or a local credential-store path.
|
|
157
|
+
|
|
158
|
+
## Logs
|
|
159
|
+
|
|
160
|
+
Structured lifecycle summaries synchronize. Raw harness, model, tool, build,
|
|
161
|
+
and process logs stay in Runtime-local protected storage. An explicit reviewed
|
|
162
|
+
policy may upload a redacted/encrypted log artifact, which remains an artifact
|
|
163
|
+
transfer rather than an unrestricted event field.
|
|
164
|
+
|
|
165
|
+
## Policy changes
|
|
166
|
+
|
|
167
|
+
`kxm.project.v1` expresses only the safe default event policy. Expanding prompt,
|
|
168
|
+
evidence, diff, artifact, or log transfer requires a future versioned content-
|
|
169
|
+
transfer policy and schema; it cannot be enabled through an unknown field.
|
|
170
|
+
Such expansion is permission-increasing, requires trust review, and affects
|
|
171
|
+
future runs only. The active run records the policy revision used for every
|
|
172
|
+
outbox transform.
|
|
@@ -0,0 +1,240 @@
|
|
|
1
|
+
# Canonical terminology
|
|
2
|
+
|
|
3
|
+
Use these terms consistently in schemas, code, CLI help, TUI labels, events,
|
|
4
|
+
and documentation.
|
|
5
|
+
|
|
6
|
+
## Configuration and topology
|
|
7
|
+
|
|
8
|
+
### Project
|
|
9
|
+
|
|
10
|
+
A coordinated product or body of work. A project has one stable `projectId`,
|
|
11
|
+
one authoritative Git-tracked project root, and one or more repositories.
|
|
12
|
+
|
|
13
|
+
### Project root
|
|
14
|
+
|
|
15
|
+
The single control Git root containing `.kxm/project.yaml`, project agent/model/
|
|
16
|
+
workflow definitions, and project-scoped skills and knowledge.
|
|
17
|
+
|
|
18
|
+
### Control repository
|
|
19
|
+
|
|
20
|
+
The repository containing the project root. It may also contain application
|
|
21
|
+
code and may therefore be a member repository.
|
|
22
|
+
|
|
23
|
+
### Member repository
|
|
24
|
+
|
|
25
|
+
A Git repository bound to a project under a stable logical `repositoryId`.
|
|
26
|
+
Absolute local paths are host bindings, not project configuration.
|
|
27
|
+
|
|
28
|
+
### Resource definition
|
|
29
|
+
|
|
30
|
+
One minimal Git-tracked file defining a project, repository, agent, model
|
|
31
|
+
profile, workflow, or environment override. For agents, models, and workflows,
|
|
32
|
+
the path and filename determine type and identity.
|
|
33
|
+
|
|
34
|
+
### Configuration revision
|
|
35
|
+
|
|
36
|
+
The content hash of the complete validated resource bundle used by a run. It
|
|
37
|
+
includes uncommitted project-root content when a validated dirty snapshot is
|
|
38
|
+
used.
|
|
39
|
+
|
|
40
|
+
### Memory revision
|
|
41
|
+
|
|
42
|
+
An immutable identifier for the promoted factual state visible to a run.
|
|
43
|
+
Candidates generated during the run do not change its pinned revision.
|
|
44
|
+
|
|
45
|
+
## Runtime and execution
|
|
46
|
+
|
|
47
|
+
### Runtime
|
|
48
|
+
|
|
49
|
+
The auto-started per-user/per-machine KXM process that owns run execution,
|
|
50
|
+
local event stores, workspaces, harness sessions, secrets resolution, and the
|
|
51
|
+
synchronization outbox.
|
|
52
|
+
|
|
53
|
+
### Home Runtime
|
|
54
|
+
|
|
55
|
+
The one Runtime recorded in `homeRuntimeId` when a run is accepted. Ownership is
|
|
56
|
+
immutable unless a later explicit takeover/fencing protocol is implemented.
|
|
57
|
+
|
|
58
|
+
### Hub
|
|
59
|
+
|
|
60
|
+
The optional multi-project service that submits run requests, grants leases,
|
|
61
|
+
synchronizes safe events and promoted facts, and exposes aggregate read models.
|
|
62
|
+
It is not an execution owner.
|
|
63
|
+
|
|
64
|
+
### Executor
|
|
65
|
+
|
|
66
|
+
A backend that prepares an assignment environment and supervises a process.
|
|
67
|
+
`local` and `ssh` are executor kinds; `exe.dev` is the first built-in SSH
|
|
68
|
+
profile.
|
|
69
|
+
|
|
70
|
+
### Harness
|
|
71
|
+
|
|
72
|
+
The coding-agent runtime inside an executor. Pi is the initial harness. A
|
|
73
|
+
harness owns provider authentication and model-session mechanics.
|
|
74
|
+
|
|
75
|
+
### Network policy
|
|
76
|
+
|
|
77
|
+
An agent ceiling with these meanings:
|
|
78
|
+
|
|
79
|
+
- `none`: no network-capable tools or executor access;
|
|
80
|
+
- `provider-only`: only harness-owned model-provider traffic;
|
|
81
|
+
- `restricted`: provider traffic plus destinations allowlisted by trusted
|
|
82
|
+
adapters or host policy;
|
|
83
|
+
- `host`: normal network access of the Runtime OS user.
|
|
84
|
+
|
|
85
|
+
This is a capability ceiling, not a guarantee of packet-level containment in
|
|
86
|
+
the trusted-local release. Strong enforcement requires the later sandbox/
|
|
87
|
+
container phase.
|
|
88
|
+
|
|
89
|
+
### Coordinator
|
|
90
|
+
|
|
91
|
+
The logical project agent that interprets workflow intent and emits structured
|
|
92
|
+
commands. Every run receives a separate physical coordinator session.
|
|
93
|
+
|
|
94
|
+
### Agent definition
|
|
95
|
+
|
|
96
|
+
A Git-tracked logical role describing purpose and ceilings for models, tools,
|
|
97
|
+
repositories, secrets, executor, and results.
|
|
98
|
+
|
|
99
|
+
### Agent instance
|
|
100
|
+
|
|
101
|
+
One logical occurrence of an agent in a step, identified within the run by
|
|
102
|
+
`agentId` and `instanceNo`.
|
|
103
|
+
|
|
104
|
+
### Physical agent session
|
|
105
|
+
|
|
106
|
+
A harness conversation and process binding identified by
|
|
107
|
+
`{runId, agentId, instanceNo, scopeEpoch}`.
|
|
108
|
+
|
|
109
|
+
### Scope epoch
|
|
110
|
+
|
|
111
|
+
A monotonically increasing integer that forces a clean session when repository,
|
|
112
|
+
secret, tool, model, or disclosure scope narrows or otherwise becomes
|
|
113
|
+
incompatible with retained history.
|
|
114
|
+
|
|
115
|
+
## Workflow hierarchy
|
|
116
|
+
|
|
117
|
+
### Run request
|
|
118
|
+
|
|
119
|
+
A hub or local request asking a Runtime to start work. It is not a run until a
|
|
120
|
+
Runtime accepts it and appends `run.created`.
|
|
121
|
+
|
|
122
|
+
### Run
|
|
123
|
+
|
|
124
|
+
One immutable-config execution of a workflow owned by one home Runtime.
|
|
125
|
+
|
|
126
|
+
### Step
|
|
127
|
+
|
|
128
|
+
One ordered top-level workflow state. Only one top-level step is active at a
|
|
129
|
+
time. A step may contain bounded dynamic assignments.
|
|
130
|
+
|
|
131
|
+
### Step attempt
|
|
132
|
+
|
|
133
|
+
One entry into a step. A declared back-edge creates a new attempt; evidence from
|
|
134
|
+
an earlier attempt does not satisfy a later one unless policy explicitly allows
|
|
135
|
+
reuse.
|
|
136
|
+
|
|
137
|
+
### Assignment
|
|
138
|
+
|
|
139
|
+
One logical unit of agent or deterministic work inside the active step. Its
|
|
140
|
+
`assignmentId` remains stable across recovery attempts.
|
|
141
|
+
|
|
142
|
+
### Attempt
|
|
143
|
+
|
|
144
|
+
One physical execution of an assignment, identified by a unique `attemptId`.
|
|
145
|
+
Calling a new process a resume does not make it the same attempt.
|
|
146
|
+
|
|
147
|
+
### Join policy
|
|
148
|
+
|
|
149
|
+
The Runtime-enforced rule that determines whether an assignment panel has
|
|
150
|
+
settled sufficiently for a step outcome. The coordinator cannot override it.
|
|
151
|
+
|
|
152
|
+
### MOA
|
|
153
|
+
|
|
154
|
+
A mixture-of-agents panel. The reviewed template default (see `fix.yaml`) is three provider-distinct isolated
|
|
155
|
+
instances, all-settled, with at least two valid completions before coordinator
|
|
156
|
+
synthesis. The compiled kind default stays a single assignment until Phase 7.
|
|
157
|
+
|
|
158
|
+
## Evidence and effects
|
|
159
|
+
|
|
160
|
+
### Evidence reference
|
|
161
|
+
|
|
162
|
+
A durable identifier or hash for a result, receipt, artifact, test, message, or
|
|
163
|
+
other record. A caller-authored description is not proof of an external effect.
|
|
164
|
+
|
|
165
|
+
### Producer policy
|
|
166
|
+
|
|
167
|
+
A requirement that counts distinct Runtime-observed assignment producers from
|
|
168
|
+
a declared eligible agent set for one exact run, step, and step attempt. A
|
|
169
|
+
producer is bound to its assignment, physical attempt, agent definition, scope
|
|
170
|
+
epoch, and pinned model. Multiple results from one assignment count once.
|
|
171
|
+
Distinct producer records prove routed execution provenance, not correctness,
|
|
172
|
+
non-collusion, or human independence.
|
|
173
|
+
|
|
174
|
+
### Artifact
|
|
175
|
+
|
|
176
|
+
Content produced or consumed by a run and managed under a declared retention
|
|
177
|
+
and transfer policy. Hub synchronization carries metadata by default, not the
|
|
178
|
+
content.
|
|
179
|
+
|
|
180
|
+
### Effect
|
|
181
|
+
|
|
182
|
+
A read or mutation caused by a tool, gate, delivery adapter, or executor action.
|
|
183
|
+
Every effect has a Runtime-owned classification used for recovery.
|
|
184
|
+
|
|
185
|
+
### Receipt
|
|
186
|
+
|
|
187
|
+
A durable, queryable external identifier proving the observed outcome of an
|
|
188
|
+
effect, such as an exact Git ref, pull request ID, or deployment ID.
|
|
189
|
+
|
|
190
|
+
### Lease
|
|
191
|
+
|
|
192
|
+
A time-bounded hub grant fencing a shared mutable action. A lease is not needed
|
|
193
|
+
for local work or uniquely namespaced external work.
|
|
194
|
+
|
|
195
|
+
### `blocked_uncertain`
|
|
196
|
+
|
|
197
|
+
A durable state meaning KXM cannot prove whether a non-idempotent or unknown
|
|
198
|
+
effect occurred. It forbids automatic replay until deterministic reconciliation
|
|
199
|
+
or an audited human resolution supplies evidence.
|
|
200
|
+
|
|
201
|
+
## Context and improvement
|
|
202
|
+
|
|
203
|
+
### Temporal state
|
|
204
|
+
|
|
205
|
+
Promoted factual project state with current, superseded, proposed, and rejected
|
|
206
|
+
lifecycle records. It informs work but does not grant capabilities.
|
|
207
|
+
|
|
208
|
+
### Candidate
|
|
209
|
+
|
|
210
|
+
A proposed KB, skill, workflow, agent, model, environment, or template change
|
|
211
|
+
with evidence and evaluation state. A candidate is not active configuration.
|
|
212
|
+
|
|
213
|
+
### Promotion
|
|
214
|
+
|
|
215
|
+
An authorized decision to make a factual state current or to accept a reviewed
|
|
216
|
+
Git change. Offline runs may propose candidates but cannot promote hub state.
|
|
217
|
+
|
|
218
|
+
## Observability
|
|
219
|
+
|
|
220
|
+
### Local event
|
|
221
|
+
|
|
222
|
+
The complete Runtime event used for local recovery and projection. It may refer
|
|
223
|
+
to protected local content.
|
|
224
|
+
|
|
225
|
+
### Sync-safe event
|
|
226
|
+
|
|
227
|
+
An allowlisted, bounded, redacted derivative placed in the Runtime outbox. It
|
|
228
|
+
contains no local payload by construction.
|
|
229
|
+
|
|
230
|
+
### Active time
|
|
231
|
+
|
|
232
|
+
Wall-clock interval from run creation to terminal settlement.
|
|
233
|
+
|
|
234
|
+
### Agent time
|
|
235
|
+
|
|
236
|
+
The sum of assignment-attempt execution durations. It may exceed active time
|
|
237
|
+
when assignments overlap.
|
|
238
|
+
|
|
239
|
+
Durations use monotonic clocks. UTC timestamps exist for display and audit, not
|
|
240
|
+
for duration arithmetic.
|