@kontextmind/kxm 0.7.95 → 0.7.97
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 +1 -1
- package/.kxm/README.md +39 -9
- package/CHANGELOG.md +23 -1
- package/README.md +147 -257
- package/SECURITY.md +21 -12
- package/docs/README.md +133 -54
- package/docs/adr/ADR-0002-browser-automation-steel-doks.md +24 -18
- package/docs/adr/ADR-0003-sqlite-only-store.md +100 -0
- package/docs/adr/ADR-0004-edge-identity-authentik.md +99 -0
- package/docs/adr/README.md +33 -0
- package/docs/concepts/architecture.md +262 -0
- package/docs/concepts/data-and-storage.md +194 -0
- package/docs/concepts/trust-model.md +153 -0
- package/docs/contracts/README.md +22 -14
- package/docs/contracts/effects-and-recovery.md +3 -0
- package/docs/contracts/migration.md +2 -2
- package/docs/contracts/routing.md +6 -5
- package/docs/contributing/assignment-runner.md +388 -0
- package/docs/contributing/ci-and-release.md +231 -0
- package/docs/contributing/development.md +362 -0
- package/docs/contributing/harness-routing-internals.md +192 -0
- package/docs/{packages.md → contributing/packages.md} +13 -15
- package/docs/{skills → contributing}/repo-work-delivery.md +20 -21
- package/docs/contributing/test-matrix.md +208 -0
- package/docs/{tui-components.md → contributing/tui-components.md} +30 -22
- package/docs/contributing/writing-docs.md +340 -0
- package/docs/glossary.md +471 -0
- package/docs/guides/agent-skills.md +137 -0
- package/docs/guides/browser-automation.md +160 -0
- package/docs/guides/context-and-memory.md +352 -0
- package/docs/guides/continuous-improvement.md +228 -0
- package/docs/guides/governed-skills.md +173 -0
- package/docs/guides/nous-providers.md +186 -0
- package/docs/guides/peer-messaging.md +304 -0
- package/docs/guides/pi-workers.md +219 -0
- package/docs/guides/provenance-gates.md +313 -0
- package/docs/guides/webhook-workflows.md +399 -0
- package/docs/kb/how-credentials-retrieved-safely.md +38 -12
- package/docs/kb/how-to-capture-and-annotate-section.md +15 -13
- package/docs/kb/how-to-connect-playwright-to-steel.md +16 -11
- package/docs/kb/how-to-recover-expired-session-or-orphan.md +26 -16
- package/docs/kb/how-to-resume-after-mfa.md +19 -11
- package/docs/kb/how-to-take-over-session.md +17 -13
- package/docs/kb/why-authentication-disappeared.md +22 -14
- package/docs/kb/why-automation-opened-different-browser.md +23 -14
- package/docs/kb/why-session-viewer-cannot-control.md +13 -12
- package/docs/operations/backup-and-restore.md +248 -0
- package/docs/operations/deploy.md +307 -0
- package/docs/operations/monitoring.md +209 -0
- package/docs/operations/runtime-sync.md +192 -0
- package/docs/operations/troubleshooting.md +266 -0
- package/docs/operations/upgrade.md +124 -0
- package/docs/prompts/browser-annotate-feedback.md +7 -7
- package/docs/prompts/browser-diagnose-recover.md +11 -10
- package/docs/prompts/browser-explore.md +7 -7
- package/docs/prompts/browser-repro-fix.md +7 -7
- package/docs/prompts/browser-start.md +12 -11
- package/docs/prompts/browser-takeover.md +8 -8
- package/docs/{cli-reference.md → reference/cli-reference.md} +88 -46
- package/docs/{config-reference.md → reference/config-reference.md} +159 -148
- package/docs/reference/configuration.md +299 -0
- package/docs/reference/harness-routing.md +508 -0
- package/docs/reference/http-api.md +203 -0
- package/docs/reference/tools.md +370 -0
- package/docs/{workflow-guide.md → reference/workflow-catalog.md} +92 -153
- package/docs/reference/workflow-definitions.md +286 -0
- package/docs/start/first-workflow.md +287 -0
- package/docs/start/install.md +146 -0
- package/docs/start/quickstart-claude-code.md +405 -0
- package/docs/start/quickstart-pi.md +213 -0
- package/docs/templates/README.md +78 -73
- package/docs/templates/adr.md +13 -13
- package/docs/templates/architecture.md +55 -71
- package/docs/templates/bug-fix.md +13 -16
- package/docs/templates/feature.md +14 -19
- package/docs/templates/handoff.md +44 -46
- package/docs/templates/postmortem.md +30 -43
- package/docs/templates/research.md +15 -20
- package/docs/templates/review.md +49 -50
- package/docs/templates/runbook.md +38 -30
- package/docs/templates/test-plan.md +16 -23
- package/docs/templates/test-report.md +14 -17
- package/examples/README.md +9 -5
- package/examples/provenance-workflow.json +1 -1
- package/examples/webhook-workflows/jira-development.json +59 -0
- package/examples/webhook-workflows/jira-issue-updated.json +12 -0
- package/examples/workflow-signal.ts +4 -5
- package/package.json +1 -1
- package/packages/core/tui/README.md +1 -1
- package/plugins/kxm/.claude-plugin/plugin.json +1 -1
- package/plugins/kxm/README.md +31 -32
- package/plugins/kxm/dist/claude-hook.js +11 -1
- package/plugins/kxm/dist/cli.js +164 -79
- package/plugins/kxm/dist/client.js +3 -1
- package/plugins/kxm/dist/core.js +11 -1
- package/plugins/kxm/dist/extension.js +45 -13
- package/plugins/kxm/dist/mcp-server.js +20 -4
- package/plugins/kxm/dist/runtime-supervisor.js +1 -3
- package/plugins/kxm/dist/runtime.js +18 -4
- package/plugins/kxm/dist/server.js +115 -20
- package/plugins/kxm/package.json +1 -1
- package/plugins/kxm/skills/kxm/references/protocol.md +3 -1
- package/plugins/kxm/skills/kxm-browser-auth/SKILL.md +1 -1
- package/plugins/kxm/skills/kxm-browser-diagnostics/SKILL.md +5 -5
- package/plugins/kxm/skills/kxm-browser-explore/SKILL.md +2 -2
- package/plugins/kxm/skills/kxm-browser-session/SKILL.md +10 -13
- package/plugins/kxm/skills/kxm-browser-takeover/SKILL.md +1 -1
- package/plugins/kxm/skills/kxm-browser-verify/SKILL.md +1 -1
- package/plugins/kxm/skills/kxm-context-memory/SKILL.md +13 -4
- package/plugins/kxm/skills/kxm-hub-ops/SKILL.md +3 -1
- package/plugins/kxm/skills/kxm-mind-setup/SKILL.md +2 -1
- package/plugins/kxm/skills/kxm-project-setup/SKILL.md +31 -54
- package/plugins/kxm/skills/kxm-projects/SKILL.md +1 -1
- package/plugins/kxm/skills/kxm-protocol/SKILL.md +1 -1
- package/plugins/kxm/skills/kxm-routing-improve/SKILL.md +15 -7
- package/plugins/kxm/skills/kxm-runs/SKILL.md +11 -5
- package/plugins/kxm/skills/kxm-session/SKILL.md +1 -1
- package/plugins/kxm/skills/kxm-tasks/SKILL.md +9 -7
- package/plugins/kxm/skills/kxm-workflow/SKILL.md +10 -2
- package/plugins/kxm/src/cli/system.ts +1 -1
- package/plugins/kxm/src/cli/workflows.ts +12 -7
- package/plugins/kxm/src/cli.ts +22 -8
- package/plugins/kxm/src/client.ts +4 -0
- package/plugins/kxm/src/commands.ts +23 -1
- package/plugins/kxm/src/extension.ts +20 -14
- package/plugins/kxm/src/github-watch.ts +8 -5
- package/plugins/kxm/src/hub-env.ts +19 -1
- package/plugins/kxm/src/hub.ts +105 -21
- package/plugins/kxm/src/improve-sources.ts +2 -7
- package/plugins/kxm/src/init-guide-setup.ts +1 -1
- package/plugins/kxm/src/mcp-server.ts +9 -2
- package/plugins/kxm/src/modes.ts +1 -1
- package/plugins/kxm/src/runtime-store.ts +23 -0
- package/plugins/kxm/src/workflow.ts +70 -1
- package/schemas/README.md +1 -1
- package/scripts/smoke-multi-pi.mjs +5 -1
- package/docs/agent-communication-envelopes-and-gates.md +0 -553
- package/docs/agent-skills.md +0 -198
- package/docs/architecture.md +0 -245
- package/docs/assignment-runner.md +0 -264
- package/docs/browser-automation.md +0 -139
- package/docs/configuration.md +0 -437
- package/docs/continuous-improvement.md +0 -226
- package/docs/getting-started.md +0 -277
- package/docs/harness-routing.md +0 -616
- package/docs/kb/qa-authentik-authentication.md +0 -97
- package/docs/kb/qa-extension-install-and-hub-bootstrap.md +0 -85
- package/docs/kb/qa-hub-on-a-public-host.md +0 -48
- package/docs/kb/qa-sqlite-vs-duckdb.md +0 -35
- package/docs/kb/qa-what-the-hub-stores.md +0 -64
- package/docs/kxm-handbook.md +0 -1181
- package/docs/operations.md +0 -510
- package/docs/operator-pi-packages.md +0 -67
- package/docs/provenance-gates.md +0 -295
- package/docs/skills.md +0 -47
- package/docs/test-matrix.md +0 -132
- package/docs/troubleshooting.md +0 -322
- package/docs/webhook-workflows.md +0 -240
package/.kxm/README.md
CHANGED
|
@@ -1,14 +1,44 @@
|
|
|
1
|
-
#
|
|
1
|
+
# The `.kxm` directory
|
|
2
2
|
|
|
3
|
-
`.kxm
|
|
3
|
+
`.kxm/` holds a KXM project's reviewable definition and its local workspace. You
|
|
4
|
+
commit the configuration; logs, restart state and generated files stay on the
|
|
5
|
+
machine. This directory is the KXM repository's own project. In your project,
|
|
6
|
+
`kxm init` creates the core files: `project.yaml`, `repo/repo.yaml`, two agents,
|
|
7
|
+
a `default` workflow, `gates.yaml` and `template-provenance.yaml`.
|
|
4
8
|
|
|
5
|
-
|
|
9
|
+
## Layout
|
|
10
|
+
|
|
11
|
+
| Path | Contents | Git |
|
|
6
12
|
|---|---|---|
|
|
7
|
-
| `
|
|
8
|
-
| `
|
|
9
|
-
| `
|
|
10
|
-
| `
|
|
13
|
+
| `project.yaml` | Project identity, repositories and defaults (`kxm.project.v1`) | Tracked |
|
|
14
|
+
| `repo/repo.yaml` | This repository's definition (`kxm.repository.v1`) | Tracked |
|
|
15
|
+
| `agents/`, `models/`, `workflows/` | Agents, model profiles and workflows, one YAML file each | Tracked |
|
|
16
|
+
| `gates.yaml` | The executable gate registry | Tracked |
|
|
17
|
+
| `roles/`, `routes.yaml`, `prices.yaml` | Role rosters, admitted model routes, dated list prices | Tracked |
|
|
18
|
+
| `roster.yaml` | The developer assignment roster for this repository | Tracked, and must be committed |
|
|
19
|
+
| `template-provenance.yaml` | Hashes of the template `kxm init` used | Tracked |
|
|
20
|
+
| `models/inventory.yaml` | The discovered model catalog | Generated; track it for a reviewed snapshot |
|
|
21
|
+
| `config.yaml` | Shared personalization settings | Tracked if the project shares them |
|
|
22
|
+
| `memory/` | Project memory facts that `kxm memory` projects into `AGENTS.md`, `CLAUDE.md` and `GEMINI.md` | Tracked |
|
|
23
|
+
| `assets/` | Intentional workflow inputs and outputs; `assets/generated/` is for machine output | Tracked intentionally; `generated/` ignored |
|
|
24
|
+
| `tasks/` | Task records from `kxm task` | Your choice |
|
|
25
|
+
| `logs/` | Hub, worker and agent logs | Ignored |
|
|
26
|
+
| `state/` | The hub database `kxm.db`, Pi sessions and restart state | Ignored |
|
|
27
|
+
| `run/` | SSH control sockets from `kxm ssh` | Ignored |
|
|
28
|
+
|
|
29
|
+
The [configuration reference](../docs/reference/config-reference.md#workspace-layout-tracked-ignored-and-state)
|
|
30
|
+
describes every file, the ignore rules to add, and the state KXM keeps outside
|
|
31
|
+
the project.
|
|
11
32
|
|
|
12
|
-
|
|
33
|
+
## Rules
|
|
13
34
|
|
|
14
|
-
|
|
35
|
+
- **No secrets here.** Keep tokens, webhook secrets and credentials in
|
|
36
|
+
environment variables or a secret manager. Never commit logs, SQLite files, or
|
|
37
|
+
raw prompts.
|
|
38
|
+
- **YAML only.** JSON definitions in a `config/` subdirectory are a retired
|
|
39
|
+
format: their presence makes the project refuse to load with
|
|
40
|
+
`legacy_state_unsupported`. The hub may create an empty `config/` directory;
|
|
41
|
+
that alone is harmless.
|
|
42
|
+
- **Moving the workspace.** `KXM_WORKSPACE_DIR`, `KXM_LOGS_DIR`,
|
|
43
|
+
`KXM_ASSETS_DIR` and `KXM_STATE_DIR` relocate `logs/`, `assets/` and
|
|
44
|
+
`state/`. The configuration files always stay in `<project root>/.kxm/`.
|
package/CHANGELOG.md
CHANGED
|
@@ -271,7 +271,7 @@ All notable user-facing changes are documented here. The project follows [Semant
|
|
|
271
271
|
a message naming the process that recreates the store (`kxm hub start` for hub state, the Runtime for registry/event stores; `kxm init` is project-only) — and the refusal never
|
|
272
272
|
advances `user_version`, so the store stays identifiably old (WAL sidecars may still be
|
|
273
273
|
checkpointed by opening the file, so the whole state set remains the backup unit — see
|
|
274
|
-
[`docs/operations.md`](docs/operations.md)). Relabelling a store it refused to open would
|
|
274
|
+
[`docs/operations.md`](docs/operations/deploy.md)). Relabelling a store it refused to open would
|
|
275
275
|
only hide the problem until a query hit a missing column. The coordinator fingerprint no
|
|
276
276
|
longer recomputes over stored authority to forgive rows written before set canonicalisation:
|
|
277
277
|
a stale coordinator is re-bound. Intake tests go from 23 to 22; the two forced-race tests
|
|
@@ -307,6 +307,28 @@ All notable user-facing changes are documented here. The project follows [Semant
|
|
|
307
307
|
|
|
308
308
|
### Fixed
|
|
309
309
|
|
|
310
|
+
- **Signed webhooks cannot be replayed.** KXM's own webhook senders now sign the
|
|
311
|
+
timestamp, delivery ID, definition, run and signal key along with the body
|
|
312
|
+
(`x-kxm-signature`, `x-kxm-timestamp`, `x-kxm-delivery-id`; see
|
|
313
|
+
`docs/guides/webhook-workflows.md#kxm-sender-contract`), and the hub refuses a signature
|
|
314
|
+
more than 300 seconds old. Every `generic` workflow start and every signal callback
|
|
315
|
+
must use this contract; a body-only `X-Hub-Signature-256` there is refused. Jira and
|
|
316
|
+
GitHub deliveries keep their provider signature, and a signed body starts at most one
|
|
317
|
+
run (`webhook_payload_replayed`). A reused delivery ID with a different body is
|
|
318
|
+
refused with 409 `webhook_delivery_conflict`, and a duplicate start returns only
|
|
319
|
+
`duplicate`, `runId` and `status`. Update any custom sender to the new contract.
|
|
320
|
+
- **Agents never borrow the hub admin token.** With `KXM_AUTH_TOKEN` unset, the Pi
|
|
321
|
+
extension and the `kxm peer` / `kxm workflow` agent commands used the persisted admin
|
|
322
|
+
token. They now use only this project's saved project token, as the Claude MCP server
|
|
323
|
+
does, and otherwise stop with a message naming the fix (`project_token_missing`, exit 2,
|
|
324
|
+
on the CLI).
|
|
325
|
+
- **The hop limit bounds agent forwarding chains.** `kxm_send` and `kxm_fanout` from Pi
|
|
326
|
+
or the Claude MCP server send one hop past the inbound request being handled, so a
|
|
327
|
+
chain of agents forwarding to each other stops at `hop_limit_reached`.
|
|
328
|
+
- **Workflow prompts no longer point agents at `.kxm/config`**, a path KXM refuses.
|
|
329
|
+
- **`kxm gate signal` and `kxm workflow wait` inside a KXM project reach the hub for hub
|
|
330
|
+
runs.** They go to the local Runtime only for a run its store holds.
|
|
331
|
+
|
|
310
332
|
- **The Claude plugin's SessionStart hook is one bundled, read-only, project-scoped
|
|
311
333
|
script.** The two shell hooks it replaces (`kxm session brief --status` and
|
|
312
334
|
`kxm memory brief`) exited 127 without `kxm` on `PATH`, ran whichever `kxm` was on
|
package/README.md
CHANGED
|
@@ -1,310 +1,200 @@
|
|
|
1
1
|
# KXM
|
|
2
2
|
|
|
3
3
|
[](https://github.com/kontextmind/kxm/actions/workflows/ci.yml)
|
|
4
|
-
[](https://www.npmjs.com/package/@kontextmind/kxm)
|
|
5
5
|
[](https://nodejs.org/)
|
|
6
|
+
[](LICENSE)
|
|
6
7
|
|
|
7
|
-
|
|
8
|
+
**KXM gives coding agents (Claude Code, Pi and other harnesses) a durable, authenticated message and workflow plane, so they can delegate bounded work to each other and prove who answered, without sharing one giant context.**
|
|
9
|
+
|
|
10
|
+
KXM runs on your machine: one `kxm` CLI, a local [hub](docs/glossary.md#hub) for messages and webhook workflows, and a local [Runtime](docs/glossary.md#runtime) for workflow runs. Your project is reviewable YAML in Git, every agent keeps its own context and its own safety controls, and the docs say plainly what KXM does not guarantee ([Status and limits](#status-and-limits)).
|
|
11
|
+
|
|
12
|
+
## What makes KXM different
|
|
13
|
+
|
|
14
|
+
- **Durable messages, not chat.** Every request is a SQLite record that moves from `queued` to `delivered` to `replied`, survives hub and agent restarts, and deduplicates retries by idempotency key. Agents authenticate with a project token and see only their own project's peers. [Message peer agents](docs/guides/peer-messaging.md)
|
|
15
|
+
- **Provenance you can check.** A quorum gate counts only replies the hub itself routed, from distinct eligible peers, for the exact run, stage and attempt. Text a coordinator writes never counts. It proves who answered, not that the answer is right. [Peer provenance and quorum gates](docs/guides/provenance-gates.md)
|
|
16
|
+
- **Workflows that release the turn.** Signed Jira, GitHub or generic webhooks start durable runs. A coordinator can park a stage, give up its turn, and resume only when a signed CI, review or merge callback arrives. [Run webhook workflows](docs/guides/webhook-workflows.md)
|
|
17
|
+
- **Local-first and reviewable.** The project lives in `.kxm/*.yaml`. `kxm trust diff` lists every permission expansion, and `kxm trust check` fails on any expansion beyond the base revision. `kxm run` executes workflows in an event-sourced Runtime that works with the hub down and ends each drive with a receipt it verifies. [Architecture](docs/concepts/architecture.md)
|
|
18
|
+
- **Native harnesses, fail-closed auth, honest cost.** Before a live run dispatches, KXM checks that the harness hosts the model and runs only admitted routes. KXM will not run a model on Pi when its vendor has its own harness, at dispatch or when a worker starts; route admission is a second layer, and a few reseller and policy cases [remain operator decisions](docs/reference/harness-routing.md#where-the-code-is-looser-than-the-rules). A logged-out harness stops the run instead of billing another provider, and cost is recorded as metered, unmetered or unknown. [Harness routing](docs/reference/harness-routing.md)
|
|
19
|
+
- **Context that ranks, learning that only proposes.** Context packets are ranked deterministically for the role and task and filled to a token budget, and they carry the selected evidence itself. Hub workflow journals feed `kxm_improvement_report`, and `kxm improve` reads the Runtime's settled attempts and routing telemetry. Both only propose: readiness never authorizes, and nothing changes until a person merges a reviewed Git change. [Context and memory](docs/guides/context-and-memory.md) · [Continuous improvement](docs/guides/continuous-improvement.md)
|
|
20
|
+
- **One plane for every harness.** A Claude Code plugin (MCP tools, pushed channel, a read-only SessionStart brief), a Pi extension with the same tools, portable Agent Skills, and the `kxm` CLI all work against the same hub. [Claude Code plugin](plugins/kxm/README.md) · [Agent skills](docs/guides/agent-skills.md)
|
|
21
|
+
|
|
22
|
+
## How it fits together
|
|
23
|
+
|
|
24
|
+
Claude Code, Pi and the operator CLI talk to one hub on your machine, while the Runtime executes workflow runs locally and syncs their summaries to the hub.
|
|
25
|
+
|
|
26
|
+
```mermaid
|
|
27
|
+
flowchart LR
|
|
28
|
+
subgraph Clients["Agents and operator"]
|
|
29
|
+
CC["Claude Code<br/>plugin: MCP stdio, channel, SessionStart hook"]
|
|
30
|
+
PI["Pi<br/>extension and skills"]
|
|
31
|
+
CLI["kxm CLI<br/>operator"]
|
|
32
|
+
end
|
|
33
|
+
subgraph Machine["Your machine: loopback by default"]
|
|
34
|
+
HUB[("KXM hub<br/>HTTP and SSE, SQLite kxm.db")]
|
|
35
|
+
RT["Runtime supervisor<br/>runs, event store, outbox"]
|
|
36
|
+
end
|
|
37
|
+
GIT[["Git repository<br/>.kxm/*.yaml"]]
|
|
38
|
+
EXT["Webhooks and CI<br/>signed starts and callbacks"]
|
|
39
|
+
CC -->|"MCP tools, SSE"| HUB
|
|
40
|
+
PI -->|"HTTP, SSE"| HUB
|
|
41
|
+
CLI -->|"admin and project APIs"| HUB
|
|
42
|
+
EXT -->|"HMAC-signed"| HUB
|
|
43
|
+
CLI -->|"kxm run, kxm runs"| RT
|
|
44
|
+
RT -->|"sync events, outbound only"| HUB
|
|
45
|
+
GIT -.->|"reviewed config"| CLI
|
|
46
|
+
GIT -.->|"pinned per run"| RT
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
- The **hub** authenticates agents, stores messages and webhook workflow runs, and pushes events. It routes work but never runs a model or merges agent contexts, and it refuses to listen beyond loopback without a token.
|
|
50
|
+
- The **Runtime supervisor** owns the runs `kxm run` creates, as an append-only event log per project. It listens only on `127.0.0.1` and pushes sync-safe events to the hub whenever it can reach one. [Architecture](docs/concepts/architecture.md) explains each component and lifecycle.
|
|
51
|
+
|
|
52
|
+
## Feature tour
|
|
53
|
+
|
|
54
|
+
| Capability | Learn more |
|
|
55
|
+
|---|---|
|
|
56
|
+
| **Peer messaging**: discover peers, send, await, fan out to one to three peers, cancel and reply | [Message peer agents](docs/guides/peer-messaging.md) |
|
|
57
|
+
| **Claude Code plugin**: 19 MCP tools, pushed channel or pull mode, and a SessionStart brief | [Claude Code plugin](plugins/kxm/README.md) |
|
|
58
|
+
| **Supervised Pi workers**: restarts, model fallbacks, tool allowlists and one Pi session per workflow run | [Run supervised Pi workers](docs/guides/pi-workers.md) |
|
|
59
|
+
| **Webhook workflows**: signed starts, ordered stages, checkpoints, durable waits and signed callbacks | [Run webhook workflows](docs/guides/webhook-workflows.md) |
|
|
60
|
+
| **Provenance and quorum gates**: hub-verified peer evidence, with an admin-only degradation path | [Peer provenance and quorum gates](docs/guides/provenance-gates.md) |
|
|
61
|
+
| **Local Runtime runs**: `kxm.workflow.v1` steps and gates, `kxm run`, simulated or live drives, verified receipts, cancel and recovery | [Run your first workflow](docs/start/first-workflow.md) · [Workflow definition reference](docs/reference/workflow-definitions.md) |
|
|
62
|
+
| **Trust review**: permission diffs for changes to the project definition in `.kxm/` | [Reviewed Git configuration](docs/concepts/architecture.md#configuration-is-reviewed-git-yaml) · [`kxm trust`](docs/reference/cli-reference.md#kxm-trust) |
|
|
63
|
+
| **Harness routing and admission**: `kxm harness`, `kxm models` and `kxm routes` | [Harness routing](docs/reference/harness-routing.md) |
|
|
64
|
+
| **Context and memory**: role-aware packets, recall, temporal state, episodes, a compiled wiki, and Git memory projected into `AGENTS.md`, `CLAUDE.md` and `GEMINI.md` | [Context and memory](docs/guides/context-and-memory.md) |
|
|
65
|
+
| **Continuous improvement**: journals, retrospectives, improvement reports and coded-repeat candidates | [Continuous improvement](docs/guides/continuous-improvement.md) |
|
|
66
|
+
| **Governed skills**: candidates, recorded evaluations, promotion or rejection, hash pinning | [Governed skills](docs/guides/governed-skills.md) |
|
|
67
|
+
| **Agent Skills**: a portable `SKILL.md` suite that covers every `kxm` command | [Agent skills](docs/guides/agent-skills.md) |
|
|
68
|
+
| **Live dashboard**: `kxm dash` screens for agents, tasks, workflows, plans, inbox and processes | [Monitor KXM](docs/operations/monitoring.md) |
|
|
69
|
+
| **Backup and restore**: the six state roots, `kxm backup` and `kxm restore`, and what each one covers | [Back up and restore KXM](docs/operations/backup-and-restore.md) |
|
|
70
|
+
| **Runtime sync and leases**: the outbox, refused-event recovery and fenced leases | [Runtime sync](docs/operations/runtime-sync.md) |
|
|
71
|
+
| **Hosted deployment**: supervision, and a pattern for one hub and Runtime per tenant behind an authenticating proxy | [Deploy KXM](docs/operations/deploy.md) |
|
|
72
|
+
| **Browser automation**: Steel sessions, Playwright and human takeover skills | [Browser automation](docs/guides/browser-automation.md) |
|
|
73
|
+
| **Everything else**: tasks, goals, suggestions, SSH workers, Studio layouts and shell completion | [KXM CLI reference](docs/reference/cli-reference.md) |
|
|
8
74
|
|
|
9
|
-
|
|
75
|
+
## Quick start: Claude Code
|
|
10
76
|
|
|
11
|
-
|
|
77
|
+
<a id="set-up-a-new-project-with-claude-code"></a>
|
|
12
78
|
|
|
13
|
-
|
|
79
|
+
You need Node.js 22.19 or newer on the 22.x line, or Node.js 24 or newer, plus Git and Claude Code. These steps connect a Claude Code session in one of your repositories to a hub on the same machine.
|
|
14
80
|
|
|
15
|
-
|
|
16
|
-
- **Stay productive.** Poll for a result or wait only when the reply blocks progress.
|
|
17
|
-
- **Mix harnesses.** Connect native Pi sessions and Claude Code through the same hub.
|
|
18
|
-
- **Keep control.** Authentication, project isolation, message limits, and normal agent approval rules remain in place.
|
|
19
|
-
- **Install using native formats.** One repository packages a Pi extension, an Agent Skill, and a Claude Code marketplace plugin.
|
|
20
|
-
- **Start from real events.** Signed Jira, GitHub, or generic webhooks can prompt durable, long-lived coordinators.
|
|
21
|
-
- **Release idle turns.** Coordinators can wait durably for signed CI, review, merge, or Jira callbacks and resume only when work remains.
|
|
22
|
-
- **Verify peer provenance.** Per-requirement quorum gates count unique eligible producers from immutable, attempt-bound replied messages rather than coordinator-authored claims.
|
|
23
|
-
- **Learn from every run.** Capture plans, decisions, contradictions, errors, and lessons without turning unreviewed opinions into policy.
|
|
81
|
+
1. Install the CLI and initialize KXM in your repository. `kxm init` writes no ignore rules, so add them, then review and commit `.kxm/`:
|
|
24
82
|
|
|
25
|
-
|
|
83
|
+
```bash
|
|
84
|
+
npm install --global --omit=peer @kontextmind/kxm
|
|
85
|
+
cd <your-repo>
|
|
86
|
+
kxm init
|
|
87
|
+
printf '%s\n' '.kxm/state/' '.kxm/logs/' '.kxm/backups/' >> .gitignore
|
|
88
|
+
```
|
|
26
89
|
|
|
27
|
-
|
|
90
|
+
2. In a second terminal, in the same repository, start the hub with a token for this project. Pick any `<hub-project>` key, for example the repository name:
|
|
28
91
|
|
|
29
|
-
|
|
92
|
+
```bash
|
|
93
|
+
PROJECT_TOKEN="$(openssl rand -hex 32)" # keep a copy in your password manager
|
|
94
|
+
export KXM_PROJECT_TOKENS="{\"<hub-project>\":\"$PROJECT_TOKEN\"}"
|
|
95
|
+
kxm hub start # runs in the foreground; keep this terminal open
|
|
96
|
+
```
|
|
30
97
|
|
|
31
|
-
|
|
98
|
+
> [!IMPORTANT]
|
|
99
|
+
> `KXM_PROJECT_TOKENS` replaces the hub's saved token map. If this hub already serves other projects, list every one of them. The [Claude Code quick start](docs/start/quickstart-claude-code.md) has a command that merges the map for you.
|
|
32
100
|
|
|
33
|
-
|
|
101
|
+
3. Back in the first terminal, bind this machine to the hub and check it:
|
|
34
102
|
|
|
35
|
-
```
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
New-Item -ItemType Directory -Force -Path $releaseDir | Out-Null
|
|
40
|
-
gh release download "v$version" --repo kontextmind/kxm --pattern $asset --dir $releaseDir --clobber
|
|
41
|
-
npm install --global --omit=peer (Join-Path $releaseDir $asset)
|
|
42
|
-
pi install git:github.com/kontextmind/kxm@main
|
|
43
|
-
```
|
|
103
|
+
```bash
|
|
104
|
+
kxm hub bind http://127.0.0.1:7331
|
|
105
|
+
kxm hub view
|
|
106
|
+
```
|
|
44
107
|
|
|
45
|
-
|
|
108
|
+
Expected output:
|
|
46
109
|
|
|
47
|
-
```
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
gh release download "v${version}" --repo kontextmind/kxm \
|
|
52
|
-
--pattern "$asset" --dir .kxm-release --clobber
|
|
53
|
-
npm install --global --omit=peer ".kxm-release/$asset"
|
|
54
|
-
pi install git:github.com/kontextmind/kxm@main
|
|
55
|
-
```
|
|
110
|
+
```text
|
|
111
|
+
bound hub http://127.0.0.1:7331 · loopback · health=on
|
|
112
|
+
hub health=true ready=true · loopback hub
|
|
113
|
+
```
|
|
56
114
|
|
|
57
|
-
|
|
115
|
+
4. Install the plugin. In Claude Code:
|
|
58
116
|
|
|
59
|
-
|
|
117
|
+
```text
|
|
118
|
+
/plugin marketplace add kontextmind/kxm
|
|
119
|
+
/plugin install kxm@kxm
|
|
120
|
+
/reload-plugins
|
|
121
|
+
```
|
|
60
122
|
|
|
61
|
-
|
|
62
|
-
kxm init
|
|
63
|
-
```
|
|
64
|
-
|
|
65
|
-
### 3. Start the hub in another terminal
|
|
123
|
+
When Claude Code asks for the plugin options, set `project` to `<hub-project>` and leave `auth_token` blank. On the machine that runs the hub, a blank token uses the project token the hub saved for `<hub-project>`, and only that one. On another machine, enter the project token at `/plugin configure kxm@kxm`. Never enter the hub admin token.
|
|
66
124
|
|
|
67
|
-
|
|
125
|
+
5. Ask Claude to call `kxm_list`. It lists this session as an agent in `<hub-project>`.
|
|
68
126
|
|
|
69
|
-
|
|
127
|
+
Next, [run your first workflow](docs/start/first-workflow.md). The full [Claude Code quick start](docs/start/quickstart-claude-code.md) also shows how to <a id="add-claude-code-to-an-existing-kxm-project"></a>[add Claude Code to an existing KXM project](docs/start/quickstart-claude-code.md#add-claude-code-to-an-existing-project) and how to <a id="update-an-existing-install"></a>[update the CLI and the plugin](docs/start/quickstart-claude-code.md#update-kxm-and-the-plugin).
|
|
70
128
|
|
|
71
|
-
|
|
72
|
-
$env:KXM_AUTH_TOKEN = "replace-with-an-admin-token"
|
|
73
|
-
$env:KXM_PROJECT_TOKENS = '{"demo":"replace-with-a-demo-project-token"}'
|
|
74
|
-
kxm hub start
|
|
75
|
-
```
|
|
129
|
+
## Quick start: Pi
|
|
76
130
|
|
|
77
|
-
|
|
131
|
+
These steps add a Pi agent to the same hub and project. Install the CLI and the Pi package, which provides the KXM extension and skills:
|
|
78
132
|
|
|
79
133
|
```bash
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
The hub listens on `http://127.0.0.1:7331`.
|
|
86
|
-
|
|
87
|
-
### 4. Bind this machine to the hub
|
|
88
|
-
|
|
89
|
-
```text
|
|
90
|
-
kxm hub bind http://127.0.0.1:7331
|
|
91
|
-
```
|
|
92
|
-
|
|
93
|
-
### 5. Confirm the session
|
|
94
|
-
|
|
95
|
-
```text
|
|
96
|
-
kxm session brief
|
|
97
|
-
```
|
|
98
|
-
|
|
99
|
-
### 6. Open Pi and check the hub
|
|
100
|
-
|
|
101
|
-
Give agents the project token, not the administrative token.
|
|
102
|
-
|
|
103
|
-
PowerShell:
|
|
104
|
-
|
|
105
|
-
```powershell
|
|
106
|
-
$env:KXM_SERVER_URL = "http://127.0.0.1:7331"
|
|
107
|
-
$env:KXM_AUTH_TOKEN = "replace-with-a-demo-project-token"
|
|
108
|
-
$env:KXM_PROJECT = "demo"
|
|
109
|
-
$env:KXM_AGENT_NAME = "planner"
|
|
110
|
-
$env:KXM_AGENT_PURPOSE = "Plans work and coordinates handoffs"
|
|
111
|
-
pi
|
|
134
|
+
npm install --global --omit=peer @kontextmind/kxm
|
|
135
|
+
pi install git:github.com/kontextmind/kxm@main
|
|
136
|
+
cd <your-repo>
|
|
137
|
+
kxm init # skip if .kxm/project.yaml already exists
|
|
112
138
|
```
|
|
113
139
|
|
|
114
|
-
|
|
140
|
+
Start and bind the hub as in steps 2 and 3 above, then start Pi as an agent of `<hub-project>`. Give it the project token (`PROJECT_TOKEN` from step 2), never the admin token:
|
|
115
141
|
|
|
116
142
|
```bash
|
|
117
|
-
export
|
|
118
|
-
export KXM_AUTH_TOKEN="replace-with-
|
|
119
|
-
export KXM_PROJECT=demo
|
|
143
|
+
export KXM_PROJECT=<hub-project>
|
|
144
|
+
export KXM_AUTH_TOKEN="replace-with-the-project-token"
|
|
120
145
|
export KXM_AGENT_NAME=planner
|
|
121
146
|
export KXM_AGENT_PURPOSE="Plans work and coordinates handoffs"
|
|
122
147
|
pi
|
|
123
148
|
```
|
|
124
149
|
|
|
125
|
-
In Pi
|
|
150
|
+
In Pi:
|
|
126
151
|
|
|
127
|
-
|
|
152
|
+
```text
|
|
153
|
+
/kxm hub
|
|
154
|
+
```
|
|
128
155
|
|
|
129
|
-
|
|
156
|
+
Pi reports the hub's health, its own agent name and how many agents are online, for example `kxm hub view: health=ok; planner; 2 online agent(s)`. Start a second agent the same way under another `KXM_AGENT_NAME`, and ask one to send the other a request. [Quick start: Pi](docs/start/quickstart-pi.md) walks through it, including mixed Pi and Claude Code pools.
|
|
130
157
|
|
|
131
|
-
|
|
158
|
+
<details><summary>PowerShell</summary>
|
|
132
159
|
|
|
133
160
|
```powershell
|
|
134
|
-
#
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
$
|
|
138
|
-
$env:
|
|
139
|
-
$env:KXM_WEBHOOK_WORKFLOWS_FILE = ".kxm/config/workflows/jira-development.json"
|
|
140
|
-
kxm gate validate --file .kxm/config/workflows/jira-development.json
|
|
161
|
+
# Step 1: ignore runtime state
|
|
162
|
+
Add-Content .gitignore ".kxm/state/", ".kxm/logs/", ".kxm/backups/"
|
|
163
|
+
# Step 2: start the hub with a token for this project
|
|
164
|
+
$ProjectToken = [Convert]::ToHexString([Security.Cryptography.RandomNumberGenerator]::GetBytes(32)).ToLower()
|
|
165
|
+
$env:KXM_PROJECT_TOKENS = @{ "<hub-project>" = $ProjectToken } | ConvertTo-Json -Compress
|
|
141
166
|
kxm hub start
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
In a separately supervised coordinator terminal, give the single writer only
|
|
145
|
-
the project credential and the tools required by the full Jira lifecycle. This
|
|
146
|
-
PowerShell example uses the Windows shell tool; replace `powershell` with `bash`
|
|
147
|
-
on macOS or Linux.
|
|
148
|
-
|
|
149
|
-
```powershell
|
|
167
|
+
# Pi: start an agent with the project token
|
|
168
|
+
$env:KXM_PROJECT = "<hub-project>"
|
|
150
169
|
$env:KXM_AUTH_TOKEN = "replace-with-the-project-token"
|
|
151
|
-
$
|
|
152
|
-
|
|
153
|
-
"kxm_list", "kxm_send", "kxm_fanout", "kxm_get", "kxm_await",
|
|
154
|
-
"kxm_workflow_get", "kxm_workflow_checkpoint", "kxm_workflow_wait",
|
|
155
|
-
"kxm_workflow_record", "kxm_improvement_report"
|
|
156
|
-
) -join ","
|
|
157
|
-
kxm agent worker --name coordinator --project product --model openrouter/qwen/qwen3-coder-plus `
|
|
158
|
-
--fallback-models antigravity/gemini-3.1-pro --tools $coordinatorTools `
|
|
159
|
-
--session-isolation workflow --fresh-start
|
|
160
|
-
```
|
|
161
|
-
|
|
162
|
-
Give review-only peers `read,grep,find,ls`; do not copy the coordinator's shell
|
|
163
|
-
or write capabilities to them. In an operator terminal, start and inspect work,
|
|
164
|
-
then run external watchers with the separate callback secret:
|
|
165
|
-
|
|
166
|
-
```powershell
|
|
167
|
-
$env:KXM_WORKFLOW_SECRET = "replace-with-the-workflow-start-secret"
|
|
168
|
-
$env:KXM_WORKFLOW_ID = "jira-development"
|
|
169
|
-
$env:KXM_WORKFLOW_SIGNAL_SECRET = "replace-with-the-callback-secret"
|
|
170
|
-
$env:GITHUB_TOKEN = "replace-with-a-checks-read-token"
|
|
171
|
-
kxm workflow start jira-development --payload '@ticket.json'
|
|
172
|
-
kxm workflow list
|
|
173
|
-
kxm workflow get run_123
|
|
174
|
-
kxm gate github watch --run-id run_123 --stage-id push-watch `
|
|
175
|
-
--signal-key pr-42-checks --repo org/repo --pr 42 --required ci
|
|
176
|
-
kxm workflow export run_123
|
|
177
|
-
kxm hub stop
|
|
178
|
-
```
|
|
179
|
-
|
|
180
|
-
Use `--dry-run --json` to inspect mutation plans without exposing configured
|
|
181
|
-
token or secret values. Terminal workflows export proposed Markdown and JSON
|
|
182
|
-
retrospectives automatically; review them before adopting any improvement as
|
|
183
|
-
policy. Provenance quorum degradation is a separate admin-only operation; use
|
|
184
|
-
the [provenance runbook](docs/provenance-gates.md#degrade-only-through-an-explicit-admin-decision)
|
|
185
|
-
only for a workflow whose evidence policy declares a lower minimum.
|
|
186
|
-
|
|
187
|
-
## What is included?
|
|
188
|
-
|
|
189
|
-
| Component | What it does | Packaging |
|
|
190
|
-
|---|---|---|
|
|
191
|
-
| KXM hub | Persists presence and routes authenticated HTTP/SSE messages | Node.js executable + SQLite |
|
|
192
|
-
| Pi extension | Adds communication, workflow, journal, and improvement tools | `pi.extensions` |
|
|
193
|
-
| Agent Skill | Teaches agents a safe, efficient coordination workflow | `pi.skills` and `SKILL.md` |
|
|
194
|
-
| Claude bridge | Exposes the same workflow plane through MCP and optional channel events | Claude Code plugin |
|
|
195
|
-
| Marketplace | Makes the Claude plugin installable from this repository | Claude marketplace catalog |
|
|
196
|
-
|
|
197
|
-
## How it works
|
|
198
|
-
|
|
199
|
-
```text
|
|
200
|
-
Pi planner ──HTTP──┐
|
|
201
|
-
├── KXM hub ──SSE──> addressed inbound requests
|
|
202
|
-
Pi reviewer ─HTTP──┤ │
|
|
203
|
-
│ └── presence, heartbeats, message state
|
|
204
|
-
Claude Code ─MCP───┘
|
|
170
|
+
$env:KXM_AGENT_NAME = "planner"
|
|
171
|
+
pi
|
|
205
172
|
```
|
|
206
173
|
|
|
207
|
-
|
|
174
|
+
</details>
|
|
208
175
|
|
|
209
176
|
## Documentation
|
|
210
177
|
|
|
211
|
-
|
|
212
|
-
|---|---|
|
|
213
|
-
| Install, configure, and use every KXM surface | [KXM Handbook](docs/kxm-handbook.md) |
|
|
214
|
-
| Complete a Pi-to-Pi or Pi-to-Claude setup | [Getting started](docs/getting-started.md) |
|
|
215
|
-
| Configure the hub or an agent | [Configuration reference](docs/configuration.md) |
|
|
216
|
-
| Look up any `kxm` command, option, or output | [CLI reference](docs/cli-reference.md) |
|
|
217
|
-
| Write project, workflow, agent, role, route, or price files | [Configuration file reference](docs/config-reference.md) |
|
|
218
|
-
| Choose a native harness or OpenRouter for the same model | [Native harness or OpenRouter](docs/harness-routing.md) |
|
|
219
|
-
| Understand components and message flow | [Architecture](docs/architecture.md) |
|
|
220
|
-
| Learn about agent skills | [Agent Skills](docs/agent-skills.md) |
|
|
221
|
-
| Run the hub responsibly | [Operations guide](docs/operations.md) |
|
|
222
|
-
| Fix connection or delivery problems | [Troubleshooting](docs/troubleshooting.md) |
|
|
223
|
-
| See which behaviors and examples are verified | [Test matrix](docs/test-matrix.md) |
|
|
224
|
-
| Start work from Jira or another webhook | [Webhook workflows](docs/webhook-workflows.md) |
|
|
225
|
-
| Require verified replies from eligible peers | [Peer provenance and quorum gates](docs/provenance-gates.md) |
|
|
226
|
-
| Improve the harness and delivery process from evidence | [Continuous improvement](docs/continuous-improvement.md) |
|
|
227
|
-
| Navigate Area → Workflow → Stage → Role taxonomy | [Workflow guide](docs/workflow-guide.md) |
|
|
228
|
-
| Develop or submit a change | [Contributing](CONTRIBUTING.md) |
|
|
229
|
-
| Report a vulnerability | [Security policy](SECURITY.md) |
|
|
230
|
-
| Review user-facing changes | [Changelog](CHANGELOG.md) |
|
|
231
|
-
|
|
232
|
-
The [documentation index](docs/README.md) describes the intended audience and scope of each guide.
|
|
233
|
-
|
|
234
|
-
## Claude Code installation
|
|
235
|
-
|
|
236
|
-
Inside Claude Code:
|
|
178
|
+
The [documentation index](docs/README.md) groups every page by what you want to do:
|
|
237
179
|
|
|
238
|
-
|
|
239
|
-
/
|
|
240
|
-
/
|
|
241
|
-
/
|
|
242
|
-
|
|
180
|
+
- [Start here](docs/README.md#start-here): install, the quick starts, your first workflow and the glossary.
|
|
181
|
+
- [Guides](docs/README.md#guides): peer messaging, Pi workers, webhook workflows, provenance gates, context and memory, skills and improvement.
|
|
182
|
+
- [Reference](docs/README.md#reference): the CLI, configuration files, harness routing, tools, HTTP API and workflow definitions.
|
|
183
|
+
- [Concepts](docs/README.md#concepts): architecture, the trust model, data and storage, decisions and contracts.
|
|
184
|
+
- [Operations](docs/README.md#operations): deploy, monitor, back up and restore, upgrade, Runtime sync and troubleshooting.
|
|
185
|
+
- [Contributing](docs/README.md#contributing): development, CI and release, writing docs and the test matrix.
|
|
243
186
|
|
|
244
|
-
|
|
187
|
+
## Status and limits
|
|
245
188
|
|
|
246
|
-
|
|
189
|
+
KXM is under active development and is published to npm as [`@kontextmind/kxm`](https://www.npmjs.com/package/@kontextmind/kxm). Merged pull requests ship as patch releases, and the [changelog](CHANGELOG.md) is not split per release: everything released since its newest dated section is still listed under **Unreleased**. It is built for one workstation or one trusted team host, with these deliberate limits, which [Architecture](docs/concepts/architecture.md#limits-and-trade-offs) and the [trust model](docs/concepts/trust-model.md) cover in detail:
|
|
247
190
|
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
Without channel mode, ordinary MCP tools still work; use `kxm_inbox` and `kxm_reply` for inbound requests. See [Getting started](docs/getting-started.md#connect-claude-code) for the complete flow.
|
|
253
|
-
|
|
254
|
-
## Production boundaries
|
|
255
|
-
|
|
256
|
-
The codebase is structured, typed, persisted, tested, packaged, and CI-gated. The current hub is suitable for production use on one workstation or a controlled trusted-team host, with these deliberate limits:
|
|
257
|
-
|
|
258
|
-
- One process owns one SQLite database; there is no clustering, leader election, or shared-state failover.
|
|
259
|
-
- Project tokens isolate hub access by project, but there are no per-user roles or external identity provider.
|
|
260
|
-
- Peer quorum proves durable message provenance only within the shared project-credential boundary; it does not prove truth, model independence, non-collusion, or human approval.
|
|
261
|
-
- Delivery is durable and retry-safe when callers supply an idempotency key, but it is not exactly-once execution.
|
|
262
|
-
- Rate-limit counters reset after restart, and capacity depends on the host and SQLite workload.
|
|
263
|
-
- The hub does not coordinate filesystem ownership; use separate worktrees or a single-writer rule.
|
|
264
|
-
- A non-loopback deployment requires authentication, TLS termination, process supervision, and network access controls.
|
|
265
|
-
|
|
266
|
-
The [operations guide](docs/operations.md) explains backup, recovery, monitoring, upgrade, and the safe deployment envelope.
|
|
267
|
-
|
|
268
|
-
## Package standards
|
|
269
|
-
|
|
270
|
-
This repository follows the native package structures for:
|
|
271
|
-
|
|
272
|
-
- [Pi package discovery](https://pi.dev/docs/latest/packages) through the `pi-package` keyword and `pi.extensions` / `pi.skills` manifests;
|
|
273
|
-
- portable [Pi Agent Skills](https://pi.dev/docs/latest/skills) using `<skill-name>/SKILL.md`;
|
|
274
|
-
- [Claude Code plugins](https://code.claude.com/docs/en/plugins-reference) through `.claude-plugin/plugin.json`;
|
|
275
|
-
- [Claude marketplaces](https://code.claude.com/docs/en/plugin-marketplaces) through `.claude-plugin/marketplace.json`;
|
|
276
|
-
- standard MCP stdio tools and the optional [Claude channel](https://code.claude.com/docs/en/channels-reference) capability.
|
|
277
|
-
|
|
278
|
-
## Development
|
|
279
|
-
|
|
280
|
-
```powershell
|
|
281
|
-
npm ci
|
|
282
|
-
npm run verify
|
|
283
|
-
```
|
|
284
|
-
|
|
285
|
-
`npm run verify` includes `check:generated`. CI also runs `validate:ci` and
|
|
286
|
-
plugin validation (`claude plugin validate`) as a hosted job. See
|
|
287
|
-
[Contributing](CONTRIBUTING.md) before changing the protocol or generated
|
|
288
|
-
runtimes.
|
|
289
|
-
|
|
290
|
-
## Repository layout
|
|
291
|
-
|
|
292
|
-
```text
|
|
293
|
-
.kxm/ Workspace configuration, logs, assets, and state
|
|
294
|
-
.claude-plugin/ Claude marketplace catalog
|
|
295
|
-
.github/ CI and contribution templates
|
|
296
|
-
docs/ User, operator, and architecture guides
|
|
297
|
-
plugins/kxm/
|
|
298
|
-
├── .claude-plugin/ Claude plugin manifest
|
|
299
|
-
├── dist/ Generated self-contained CLI, hub, and MCP runtimes
|
|
300
|
-
├── skills/ Portable Agent Skill
|
|
301
|
-
└── src/ Pi extension, hub, client, and MCP source
|
|
302
|
-
scripts/ Build and consistency helpers
|
|
303
|
-
test/ Integration tests
|
|
304
|
-
examples/ Executable transport scenarios and callback sender
|
|
305
|
-
scripts/kxm-worker.mjs Restarting headless Pi RPC worker
|
|
306
|
-
```
|
|
191
|
+
- **Single node.** One hub process owns one SQLite database. There is no clustering, replication or failover.
|
|
192
|
+
- **At-least-once.** Messages survive restarts and retries deduplicate by idempotency key, but work can run more than once. Make external side effects idempotent.
|
|
193
|
+
- **Not a sandbox.** KXM does not contain what an agent's tools can do. Use separate worktrees or a single writer, and separate OS accounts for agents you do not trust.
|
|
194
|
+
- **Provenance, not truth.** A quorum shows which agents answered through the hub under one project credential. It does not prove correctness, model independence or human approval.
|
|
307
195
|
|
|
308
|
-
##
|
|
196
|
+
## Contributing, security and license
|
|
309
197
|
|
|
310
|
-
[
|
|
198
|
+
- **Contributing:** read [CONTRIBUTING.md](CONTRIBUTING.md), [Develop KXM](docs/contributing/development.md) and the [code of conduct](CODE_OF_CONDUCT.md), and run `npm ci` and `npm run verify` before you open a pull request.
|
|
199
|
+
- **Security:** report a suspected vulnerability privately, as [SECURITY.md](SECURITY.md) describes.
|
|
200
|
+
- **License:** [MIT](LICENSE) © KontextMind contributors.
|