@kontextmind/kxm 0.7.91 → 0.7.93
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/workflows/default.yaml +1 -1
- package/CHANGELOG.md +212 -0
- package/README.md +3 -0
- package/docs/README.md +3 -0
- package/docs/agent-skills.md +123 -60
- package/docs/architecture.md +5 -2
- package/docs/cli-reference.md +3527 -0
- package/docs/config-reference.md +1943 -0
- package/docs/configuration.md +30 -4
- package/docs/continuous-improvement.md +122 -10
- package/docs/contracts/routing.md +95 -11
- package/docs/harness-routing.md +616 -0
- package/docs/kxm-handbook.md +106 -19
- package/docs/templates/README.md +1 -1
- package/docs/test-matrix.md +12 -6
- package/docs/troubleshooting.md +2 -2
- package/examples/project/.kxm/workflows/fix.yaml +1 -1
- package/examples/project/.kxm/workflows/improve.yaml +1 -1
- package/package.json +1 -1
- package/plugins/kxm/.claude-plugin/plugin.json +9 -10
- package/plugins/kxm/README.md +238 -56
- package/plugins/kxm/dist/claude-hook.js +10083 -0
- package/plugins/kxm/dist/cli.js +2487 -1848
- package/plugins/kxm/dist/client.js +64 -0
- package/plugins/kxm/dist/core.js +102 -9
- package/plugins/kxm/dist/extension.js +210 -68
- package/plugins/kxm/dist/mcp-server.js +217 -40
- package/plugins/kxm/dist/runtime-supervisor.js +1628 -157
- package/plugins/kxm/dist/runtime.js +1874 -298
- package/plugins/kxm/dist/server.js +416 -82
- package/plugins/kxm/package.json +1 -1
- package/plugins/kxm/skills/hints.json +1 -1
- package/plugins/kxm/skills/kxm/SKILL.md +48 -24
- package/plugins/kxm/skills/kxm/references/protocol.md +3 -3
- package/plugins/kxm/skills/kxm-context-memory/SKILL.md +67 -21
- package/plugins/kxm/skills/kxm-definitions/SKILL.md +9 -0
- package/plugins/kxm/skills/kxm-harness-auth/SKILL.md +82 -16
- package/plugins/kxm/skills/kxm-harvest/SKILL.md +1 -1
- package/plugins/kxm/skills/kxm-hub-ops/SKILL.md +55 -27
- package/plugins/kxm/skills/kxm-insights/SKILL.md +1 -1
- package/plugins/kxm/skills/kxm-mind/SKILL.md +2 -2
- package/plugins/kxm/skills/{kxm-setup → kxm-mind-setup}/SKILL.md +4 -4
- package/plugins/kxm/skills/kxm-peer/SKILL.md +68 -93
- package/plugins/kxm/skills/kxm-project-setup/SKILL.md +156 -23
- 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-query/SKILL.md +1 -1
- package/plugins/kxm/skills/kxm-routing-improve/SKILL.md +74 -15
- package/plugins/kxm/skills/kxm-runs/SKILL.md +46 -17
- package/plugins/kxm/skills/kxm-session/SKILL.md +64 -36
- package/plugins/kxm/skills/kxm-skill-lifecycle/SKILL.md +44 -15
- package/plugins/kxm/skills/kxm-tasks/SKILL.md +16 -4
- package/plugins/kxm/skills/kxm-triage/SKILL.md +1 -1
- package/plugins/kxm/skills/kxm-work/SKILL.md +1 -1
- package/plugins/kxm/skills/kxm-workflow/SKILL.md +60 -19
- package/plugins/kxm/src/arbiter.ts +67 -22
- package/plugins/kxm/src/autocomplete.ts +1 -1
- package/plugins/kxm/src/claude-hook.ts +192 -0
- package/plugins/kxm/src/cli/project.ts +11 -5
- package/plugins/kxm/src/cli/system.ts +85 -13
- package/plugins/kxm/src/cli/types.ts +4 -1
- package/plugins/kxm/src/cli/workflows.ts +18 -16
- package/plugins/kxm/src/cli.ts +23 -13
- package/plugins/kxm/src/client.ts +15 -4
- package/plugins/kxm/src/commands.ts +19 -9
- package/plugins/kxm/src/config.ts +42 -7
- package/plugins/kxm/src/context-packet.ts +14 -2
- package/plugins/kxm/src/context.ts +16 -5
- package/plugins/kxm/src/dispatch-context.ts +286 -0
- package/plugins/kxm/src/engine-plan.ts +40 -0
- package/plugins/kxm/src/engine.ts +138 -6
- package/plugins/kxm/src/hub-env.ts +17 -1
- package/plugins/kxm/src/hub.ts +92 -29
- package/plugins/kxm/src/improve-sources.ts +228 -0
- package/plugins/kxm/src/improve.ts +325 -140
- package/plugins/kxm/src/local-snapshot.ts +101 -42
- package/plugins/kxm/src/mcp-server.ts +129 -30
- package/plugins/kxm/src/memory.ts +43 -20
- package/plugins/kxm/src/project-config.ts +25 -0
- package/plugins/kxm/src/protocol.ts +11 -0
- package/plugins/kxm/src/relevance.ts +138 -0
- package/plugins/kxm/src/retrospective.ts +16 -10
- package/plugins/kxm/src/runtime-service.ts +8 -1
- package/plugins/kxm/src/runtime-supervisor.ts +16 -2
- package/plugins/kxm/src/session-token-hint.ts +17 -0
- package/plugins/kxm/src/suggest.ts +7 -7
- package/plugins/kxm/src/workflow-manager.ts +80 -78
- package/plugins/kxm/src/workflow.ts +202 -12
- package/scripts/build-runtime.mjs +7 -1
- package/scripts/check-generated.mjs +1 -0
- package/scripts/emit-codex-artifacts.mjs +1 -1
package/docs/kxm-handbook.md
CHANGED
|
@@ -353,6 +353,8 @@ The complete variable reference, limits, and examples are in
|
|
|
353
353
|
|
|
354
354
|
## Complete CLI guide
|
|
355
355
|
|
|
356
|
+
This section summarizes the most-used commands. The [CLI reference](cli-reference.md) documents every command and subcommand with its options, JSON output, and examples.
|
|
357
|
+
|
|
356
358
|
Global options can appear on the root or a command group:
|
|
357
359
|
|
|
358
360
|
```text
|
|
@@ -431,14 +433,26 @@ posts an exact failed signal and exits `4` on timeout.
|
|
|
431
433
|
### Improvement command
|
|
432
434
|
|
|
433
435
|
```text
|
|
434
|
-
kxm improve [--
|
|
436
|
+
kxm improve [report] [--file <path>] [--out-dir <path>]
|
|
435
437
|
```
|
|
436
438
|
|
|
437
|
-
This
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
439
|
+
This looks for agent steps a script, test or workflow `gate` could do instead of a
|
|
440
|
+
model. Run it from the project root. It reads the project's Runtime event store
|
|
441
|
+
read-only (the checkout's own `run-events.db` under the user state root) and then
|
|
442
|
+
`.kxm/logs/telemetry.jsonl`; `--file` reads only the named file. The output starts
|
|
443
|
+
with the sources it read and their counts, and an unreadable store exits 1 with
|
|
444
|
+
`improve_source_unreadable`. Each Runtime attempt's outcome is resolved from the
|
|
445
|
+
event log (`accepted` only when its run completed and the step was not re-entered).
|
|
446
|
+
|
|
447
|
+
Records group by workflow, step, agent role and ask. A group is a coded-repeat
|
|
448
|
+
candidate only when the same ask was decided in at least two runs, at least 0.75 of
|
|
449
|
+
its decided attempts were accepted, and its step writes no repository; otherwise the
|
|
450
|
+
row says why (`writes-repository` or `ask-not-repeated`). Candidates are written as
|
|
451
|
+
proposed JSON and diff files under `.kxm/candidates/` (not with `--dry-run`), and
|
|
452
|
+
each gets a promotion readiness line under `improvement.promotionPolicy`. Readiness
|
|
453
|
+
never authorizes: the command does not modify code, configuration, gates, or the
|
|
454
|
+
workflow journal, and activation is a reviewed Git change. See
|
|
455
|
+
[Continuous improvement](continuous-improvement.md#coded-repeats-kxm-improve).
|
|
442
456
|
|
|
443
457
|
### Context commands
|
|
444
458
|
|
|
@@ -669,8 +683,8 @@ These tools are available in Pi and Claude MCP:
|
|
|
669
683
|
| `kxm_workflow_get` | Read stages, evidence policies, waits, and journal |
|
|
670
684
|
| `kxm_workflow_checkpoint` | Submit a stage result with keyed evidence and verified message references |
|
|
671
685
|
| `kxm_workflow_wait` | Save evidence and pause until an authenticated callback |
|
|
672
|
-
| `kxm_workflow_record` | Record
|
|
673
|
-
| `kxm_improvement_report` | Summarize learning by improvement area |
|
|
686
|
+
| `kxm_workflow_record` | Record journal knowledge in one of ten categories, optionally bound to a stage with `stageId` |
|
|
687
|
+
| `kxm_improvement_report` | Summarize learning by improvement area, plus ranked, redacted signals merged across runs |
|
|
674
688
|
|
|
675
689
|
Claude MCP also exposes:
|
|
676
690
|
|
|
@@ -741,7 +755,7 @@ For every active stage:
|
|
|
741
755
|
|
|
742
756
|
1. call `kxm_workflow_get`;
|
|
743
757
|
2. follow only `currentStage`;
|
|
744
|
-
3. record material
|
|
758
|
+
3. record material knowledge in the journal categories below, passing the stage's `stageId`;
|
|
745
759
|
4. gather exact required evidence;
|
|
746
760
|
5. send peer-policy work with exact `workflowContext` when required;
|
|
747
761
|
6. checkpoint or enter an external wait; and
|
|
@@ -759,10 +773,20 @@ compute until the callback creates a fresh message.
|
|
|
759
773
|
| `decision` | Selected option and rationale |
|
|
760
774
|
| `contradiction` | Incompatible evidence, claims, requirements, or tests |
|
|
761
775
|
| `error` | Failed tools, assumptions, integrations, or gates |
|
|
762
|
-
| `lesson` | Evidence-supported reusable improvement |
|
|
776
|
+
| `lesson` | Evidence-supported reusable improvement (evidence required) |
|
|
777
|
+
| `observation` | Notable behavior without a causal claim |
|
|
778
|
+
| `hypothesis` | A falsifiable claim; keep it when disproven |
|
|
779
|
+
| `experiment` | A trial and its outcome, including failures |
|
|
780
|
+
| `state-change` | An authoritative project fact changed |
|
|
781
|
+
| `skill-candidate` | A reusable procedure backed by verified run or receipt evidence (evidence required) |
|
|
763
782
|
|
|
764
783
|
Areas are `harness`, `gates`, `implementation`, `workflow`, `documentation`,
|
|
765
|
-
`security`, or `other`.
|
|
784
|
+
`security`, or `other`. Pass `stageId` (`--stage-id` on the CLI) to bind an entry to
|
|
785
|
+
its stage: the hub derives the attempt (the current one for an active or waiting
|
|
786
|
+
stage, the last one consumed for a finished stage), and `area` may be omitted when the
|
|
787
|
+
stage declares one. An entry with neither an area nor such a stage is refused with
|
|
788
|
+
`invalid_improvement_area`. The journal covers hub webhook runs; a `kxm run` id is
|
|
789
|
+
refused with `workflow_not_found`.
|
|
766
790
|
|
|
767
791
|
---
|
|
768
792
|
|
|
@@ -888,16 +912,79 @@ through `kxm_context`, `kxm_recall`, `kxm_state`, `kxm_episode`, and
|
|
|
888
912
|
|
|
889
913
|
`kxm context get <project> --role <role> --task <task>` assembles a
|
|
890
914
|
token-budgeted packet. Roles shape selection: repro agents get prior
|
|
891
|
-
reproductions and
|
|
892
|
-
contradictions and failed approaches; implementers get the approved plan
|
|
893
|
-
skills; verifiers get acceptance evidence. Superseded and rejected
|
|
894
|
-
are excluded by default, and every packet is project-isolated.
|
|
915
|
+
reproductions, incidents and evidence; planners get state and decisions; critics
|
|
916
|
+
get contradictions and failed approaches; implementers get the approved plan,
|
|
917
|
+
skills and evidence; verifiers get acceptance evidence. Superseded and rejected
|
|
918
|
+
records are excluded by default, and every packet is project-isolated.
|
|
919
|
+
|
|
920
|
+
Selection is deterministic: no model, clock or randomness is involved, so the same
|
|
921
|
+
records and request give the same packet. An item is eligible when it is an open
|
|
922
|
+
contradiction or a requested kind that is not an inert proposal (non-current state
|
|
923
|
+
and proposed skills are never selected). Eligible items are ordered by nine keys, in
|
|
924
|
+
this order:
|
|
925
|
+
|
|
926
|
+
1. open contradictions first;
|
|
927
|
+
2. the requested project before `_shared` defaults;
|
|
928
|
+
3. items that share a word with the task before items that do not;
|
|
929
|
+
4. the role's kind priority;
|
|
930
|
+
5. a lexical BM25 relevance score over the item's summary and state key (fixed English
|
|
931
|
+
stopword list, plural folding);
|
|
932
|
+
6. confidence;
|
|
933
|
+
7. authority;
|
|
934
|
+
8. recency, newest first, from the item's own timestamps;
|
|
935
|
+
9. id, by code unit.
|
|
936
|
+
|
|
937
|
+
The budget is filled first-fit: an item that does not fit is skipped and smaller
|
|
938
|
+
items keep filling it, and a gap such as `budget of 4000 tokens reached; 2 candidates
|
|
939
|
+
deferred` reports what was left out. The packet has `currentState`, `knowledge`,
|
|
940
|
+
`evidence`, `episodes`, `skills` and `contradictions` sections, so every selected
|
|
941
|
+
item is delivered in one of them. The response's `audit.relevance` holds numbers only:
|
|
942
|
+
`taskTokens` (distinct task words), `matchedCandidates` (eligible items sharing a
|
|
943
|
+
task word) and `selected` (each selected item's rounded score, in `selectedIds`
|
|
944
|
+
order). The hub log records the task's size, never its text.
|
|
895
945
|
|
|
896
946
|
`kxm context recall <project> --query <text>` searches durable context records
|
|
897
|
-
and returns metadata only
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
947
|
+
and returns metadata only, with a numeric `relevance` per item. Items whose summary or
|
|
948
|
+
state key contains the query (ignoring case) come first, then items that share a word
|
|
949
|
+
with it ranked by relevance, then id; items with neither are left out.
|
|
950
|
+
`kxm context episode <project>` lists episodic learning records from workflow
|
|
951
|
+
journals (`--run` limits to one run). `kxm context explain <project> <itemId>`
|
|
952
|
+
explains which evidence and lineage back a context item.
|
|
953
|
+
|
|
954
|
+
### Context for Runtime-dispatched agents
|
|
955
|
+
|
|
956
|
+
When `kxm run` dispatches an agent step, the Runtime gives the agent the project's
|
|
957
|
+
authored memory (active `.kxm/memory/*.md` records in project or operator scope) and
|
|
958
|
+
its promoted skills whose content hash verifies, selected by the same arbiter for the
|
|
959
|
+
agent's role with the step instructions and prompt as the task, within 4,000 tokens
|
|
960
|
+
(or the role's budget when lower). The prompt renders them under **Environment &
|
|
961
|
+
Memory**, with promoted skills under **Active Skills**; at most five project items are
|
|
962
|
+
delivered because the prompt renders five.
|
|
963
|
+
|
|
964
|
+
Only committed content is delivered: the memory and promoted-skill files must be
|
|
965
|
+
tracked and clean at `HEAD` (`git status` over those paths), and the memory revision
|
|
966
|
+
must still match the one the run pinned when it was created. Otherwise the context is
|
|
967
|
+
withheld and the packet records a gap instead:
|
|
968
|
+
|
|
969
|
+
| Gap | Meaning |
|
|
970
|
+
|---|---|
|
|
971
|
+
| `dispatch_context_withheld:uncommitted` | A memory or promoted-skill file is modified, untracked or ignored |
|
|
972
|
+
| `dispatch_context_withheld:git_unavailable` | `git status` failed or timed out (5 s) |
|
|
973
|
+
| `dispatch_context_withheld:memory_revision_drift` | Memory or skills changed since the run pinned its revision |
|
|
974
|
+
| `dispatch_context_memory_unreadable` | A memory file does not parse |
|
|
975
|
+
| `dispatch_context_memory_rejected:<id>` | One record could not become a context item |
|
|
976
|
+
| `dispatch_context_skill_unverified:<id>` | A promoted skill's content does not match its hash |
|
|
977
|
+
| `dispatch_context_skills_unreadable` | The promoted skills could not be listed |
|
|
978
|
+
| `dispatch_context_render_deferred:<n>` | More project items were selected than the prompt renders |
|
|
979
|
+
| `dispatch_context_not_loaded` | The context could not be loaded for this step before dispatch |
|
|
980
|
+
| `dispatch_context_failed` | Loading or assembly failed unexpectedly |
|
|
981
|
+
|
|
982
|
+
Gaps go in the packet's `budget.unresolvedGaps`, never in the prompt, and a gap never
|
|
983
|
+
blocks dispatch: the step runs without the withheld context. Memory with `agent` or
|
|
984
|
+
`run` scope is not delivered, because nothing binds it to an agent or run. No hub
|
|
985
|
+
source (journal, stored state, contradictions) is read at dispatch, so a Runtime run
|
|
986
|
+
works with the hub down. A project with no memory and no promoted skill dispatches
|
|
987
|
+
exactly as before.
|
|
901
988
|
|
|
902
989
|
### Temporal state and promotion
|
|
903
990
|
|
package/docs/templates/README.md
CHANGED
|
@@ -10,7 +10,7 @@ This directory contains standardized Markdown documentation templates adapted fo
|
|
|
10
10
|
|
|
11
11
|
3. **Immutable Evidence Chains:** Every test or review report must reference an exact commit pin (`git rev-parse HEAD`), deterministic branch (`kxm/run-<id>-<description>`), and content-addressed artifact reference (`artifact:<path>@sha256:<digest>`).
|
|
12
12
|
|
|
13
|
-
4. **Context Arbiter Integration:** Frontmatter fields (`authority`, `confidence`, `summary`, `tags`)
|
|
13
|
+
4. **Context Arbiter Integration:** Frontmatter fields (`authority`, `confidence`, `summary`, `tags`) inform token budgeting in `kxm.context-packet.v2`: layer pruning plus lexical task-relevance ordering in the arbiter.
|
|
14
14
|
|
|
15
15
|
---
|
|
16
16
|
|
package/docs/test-matrix.md
CHANGED
|
@@ -2,8 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
The release gate executes every test, measures the core source directly, type-checks strict TypeScript, lints documentation, verifies package versions, validates Claude manifests, rebuilds the generated runtimes, and installs and executes the npm artifact outside the repository.
|
|
4
4
|
|
|
5
|
-
Run the commit gate with `npm run verify`. CI PR legs run `validate:
|
|
6
|
-
`check:generated`. Plugin validation is a hosted CI
|
|
5
|
+
Run the commit gate with `npm run verify`. CI PR legs run `validate:pr` plus
|
|
6
|
+
`check:generated`; pushes to main run `validate:ci`. Plugin validation is a hosted CI
|
|
7
|
+
job.
|
|
7
8
|
|
|
8
9
|
```powershell
|
|
9
10
|
npm run verify
|
|
@@ -35,13 +36,18 @@ npm run verify
|
|
|
35
36
|
| Claude MCP catalog, outbound and inbound tools, channel delivery | `test/core/mcp.test.ts` |
|
|
36
37
|
| Responsive metadata-only TUI, authenticated ops mode, presence-only fallback, observer filtering, key controls, and local body-free projection | `test/core/tui.test.ts`, `test/core/hub-api.test.ts` |
|
|
37
38
|
| Session manifest creation, fail-closed rosters, shared worker/result envelopes, and hub-owned envelope fields | `test/core/session.test.ts`, `test/core/cli.test.ts`, `test/core/envelope.test.ts`, `test/core/envelope-contract.test.ts` |
|
|
38
|
-
| Generic CLI/project telemetry classification, JSONL recovery, and proposed `kxm improve` output | `test/core/telemetry.test.ts`, `test/core/cli.test.ts` |
|
|
39
|
+
| Generic CLI/project telemetry classification, JSONL recovery, and proposed `kxm improve` output | `test/core/telemetry.test.ts`, `test/core/cli.test.ts`, `test/core/improve.test.ts` |
|
|
40
|
+
| `kxm improve` and `kxm routing report` read the project's Runtime event store read-only plus telemetry, resolve each attempt's outcome from the event log, drop simulated attempts and duplicate attempts, flag only same-ask repeats across runs, exclude write steps, and report promotion readiness that never authorizes | `test/core/improve.test.ts` (`kxm improve report resolves Runtime-settled attempts from the event log and flags only same-ask cross-run repeats`), `test/core/cli.test.ts`, `test/core/cli-experience.test.ts`, `test/core/commands-policy.test.ts` |
|
|
41
|
+
| Engine routing records carry the engine-reserved `workflowId`, `askSha256`, `objectiveSha256` and `stepWrites` keys (stable across runs), default `agentRole` to the agent, and record only `blocked` or `failed` at settlement | `test/core/route-admission.test.ts` |
|
|
42
|
+
| Runtime dispatch context: only committed, pinned project memory and hash-verified promoted skills reach a dispatched agent; malformed, drifted or uncommitted content is withheld with a `dispatch_context_*` gap outside the prompt, and the step still completes | `test/core/engine.test.ts` (`dispatch context: agents receive only committed, pinned memory and verified skills; anything else is withheld with a gap and the step still completes`) |
|
|
39
43
|
| Signed Jira webhook verification, filtering, dispatch, and retry deduplication | `test/core/hub-api.test.ts` |
|
|
40
44
|
| Ordered workflow checkpoints, normalized keyed evidence gates, unrelated-volume rejection, and warning/failure retry | `test/core/hub-api.test.ts`, `test/core/workflow.test.ts` |
|
|
41
45
|
| Run-start eligible-producer resolution, immutable workflow context, per-requirement message-reference verification, unique-producer quorum, and replay/cross-context rejection | `test/core/workflow-provenance.test.ts`, `test/core/workflow.test.ts`, `test/core/hub-api.test.ts`, `test/core/client.test.ts`, `test/core/store.test.ts` |
|
|
42
46
|
| Explicit current-attempt admin degradation, configured lower minimum, audit journal, idempotency, and forbidden or stale approvals | `test/core/workflow-provenance.test.ts`, `test/core/cli.test.ts` |
|
|
43
47
|
| Durable external waits, local/callback evidence accumulation, safe settlement, checkpoint/expiry race rejection, minimal signed responses, retry/conflict deduplication, separate secrets, and timeout notification | `test/core/hub-api.test.ts`, `test/core/workflow.test.ts`, `test/core/workflow-provenance.test.ts` |
|
|
44
48
|
| Plans, decisions, contradictions, errors, lessons, and improvement reports | `test/core/hub-api.test.ts`, `test/core/workflow.test.ts` |
|
|
49
|
+
| All ten journal categories and `stageId` through the shared `kxm_workflow_record` tool, hub-derived attempt, stage-default area, stage-bound hub-authored entries, ranked redacted cross-run signals, and retrospectives refreshed by late entries and promotions | `test/core/journal-evolution.test.ts` (`kxm_workflow_record binds stage provenance and the stage's area end to end, and hub-authored entries carry it too`), `test/core/workflow.test.ts`, `test/core/retrospective.test.ts`, `test/core/hub-api.test.ts` |
|
|
50
|
+
| Context packets rank by deterministic task relevance, fill the budget first-fit, deliver every selected item (including evidence) in a packet section, order ties newest first, and report numeric `audit.relevance`; recall ranks by phrase then relevance; hub logs carry sizes, not task or query text | `test/core/arbiter.test.ts` (`arbitrate ranks task-relevant candidates first, delivers every selected item in a packet section, orders ties newest first, and reports relevance`), `test/core/context-surfaces.test.ts` |
|
|
45
51
|
| Safe diagnostic classification and redaction | `test/core/diagnostics.test.ts`, `test/core/extension.test.ts`, `test/core/hub-api.test.ts` |
|
|
46
52
|
| Operator CLI init/validate/export/watch | `test/core/cli.test.ts`, `test/core/github-watch.test.ts` |
|
|
47
53
|
| Local and isolated-global packed npm CLI plus hub runtimes | `test/core/package-install.test.ts` |
|
|
@@ -115,12 +121,12 @@ When adding a feature, add executable coverage and update this matrix in the sam
|
|
|
115
121
|
| `test/core/context.test.ts` | Context schema round-trips, hostile input, cross-project fail-closed, storage upgrade |
|
|
116
122
|
| `test/core/state.test.ts` | Temporal state lifecycle, asOf queries, supersession, contradictions, restart durability |
|
|
117
123
|
| `test/core/context-authority.test.ts` | Authority grant floor, reserialization escalation, lineage bounds, control-plane smuggling |
|
|
118
|
-
| `test/core/arbiter.test.ts` | Role-aware packet assembly, budgets, contradiction routing, journal conversion, hub surfaces |
|
|
124
|
+
| `test/core/arbiter.test.ts` | Role-aware packet assembly, task-relevance ranking, first-fit budgets, the evidence section, contradiction routing, journal conversion, hub surfaces |
|
|
119
125
|
| `test/core/context-surfaces.test.ts` | CLI and Pi tool parity for the context API |
|
|
120
|
-
| `test/core/journal-evolution.test.ts` | New journal categories, evidence requirements, governed promotion |
|
|
126
|
+
| `test/core/journal-evolution.test.ts` | New journal categories, evidence requirements, governed promotion, stage provenance through the shared tool |
|
|
121
127
|
| `test/core/wiki.test.ts` | Wiki compilation determinism, lifecycle preservation, contradiction visibility, lint |
|
|
122
128
|
| `test/core/workflow-transitions.test.ts` | Typed back-edges, budgets, bypass protection, restart recovery |
|
|
123
129
|
| `test/core/fix-workflow.test.ts` | /fix end-to-end, independent repro-review oracle, wrong-seam invalidation, failed self-retry, plan-hash gating, exhaustion |
|
|
124
130
|
| `test/core/skills.test.ts` | Skill candidate lifecycle, quarantine, immutability, CLI |
|
|
125
131
|
| `test/core/routing.test.ts` | Behavioral hash, record parsing, comparisons, routing report |
|
|
126
|
-
| `test/core/
|
|
132
|
+
| `test/core/improve.test.ts` | Routing-record sources, event-log outcome resolution, same-ask candidacy, candidate files, promotion readiness |
|
package/docs/troubleshooting.md
CHANGED
|
@@ -24,7 +24,7 @@ KXM waits until Pi has exhausted its own automatic retries. It then keeps the in
|
|
|
24
24
|
|
|
25
25
|
### A worker heartbeat is healthy but one tool never finishes
|
|
26
26
|
|
|
27
|
-
Set `KXM_WORKER_TOOL_TIMEOUT_MS` above the longest legitimate tool call. Its 31-minute default intentionally gives a 30-minute `
|
|
27
|
+
Set `KXM_WORKER_TOOL_TIMEOUT_MS` above the longest legitimate tool call. Its 31-minute default intentionally gives a 30-minute `kxm_fanout` wait time to return durable pending handles before supervision intervenes. When that bound is exceeded, the structured worker log records `worker_tool_timeout` with only the allowlisted tool name and diagnostic class, the delivered hub request stays recoverable, and the RPC process is restarted. If the stuck worker was supposed to be read-only, also set `KXM_WORKER_TOOLS=read,grep,find,ls`; prompt wording alone does not remove shell or write capabilities.
|
|
28
28
|
|
|
29
29
|
### A hub or worker PID claim is stale
|
|
30
30
|
|
|
@@ -148,7 +148,7 @@ If the work is obsolete, the sender can call `kxm_cancel`. This changes hub stat
|
|
|
148
148
|
|
|
149
149
|
### `kxm_await` times out
|
|
150
150
|
|
|
151
|
-
|
|
151
|
+
`kxm_await` waits at most 60 seconds; that is both its default and its maximum. A timeout does not end the request. Use `kxm_get` to inspect the state, or `kxm_workflow_wait` for long external work. `cancelled`, `expired`, and `error` are terminal outcomes. Resend only when the task is safe to repeat, and use an idempotency key when retrying after an uncertain network result.
|
|
152
152
|
|
|
153
153
|
### A message disappears after completion
|
|
154
154
|
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"$schema": "https://json.schemastore.org/claude-code-plugin-manifest.json",
|
|
3
3
|
"name": "kxm",
|
|
4
4
|
"displayName": "KXM",
|
|
5
|
-
"version": "0.7.
|
|
5
|
+
"version": "0.7.93",
|
|
6
6
|
"description": "Headless multi-agent orchestration, durable workflows, and a live operator dashboard for Pi and Claude Code",
|
|
7
7
|
"author": {
|
|
8
8
|
"name": "KontextMind",
|
|
@@ -19,11 +19,10 @@
|
|
|
19
19
|
"hooks": [
|
|
20
20
|
{
|
|
21
21
|
"type": "command",
|
|
22
|
-
"command": "
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
"
|
|
26
|
-
"command": "kxm memory brief"
|
|
22
|
+
"command": "node",
|
|
23
|
+
"args": ["${CLAUDE_PLUGIN_ROOT}/dist/claude-hook.js", "session-start"],
|
|
24
|
+
"timeout": 5,
|
|
25
|
+
"statusMessage": "KXM brief"
|
|
27
26
|
}
|
|
28
27
|
]
|
|
29
28
|
}
|
|
@@ -38,21 +37,21 @@
|
|
|
38
37
|
"server_url": {
|
|
39
38
|
"type": "string",
|
|
40
39
|
"title": "KXM server URL",
|
|
41
|
-
"description": "URL of the
|
|
40
|
+
"description": "URL of the KXM hub (the operator starts it with kxm hub start)",
|
|
42
41
|
"default": "http://127.0.0.1:7331",
|
|
43
42
|
"required": true
|
|
44
43
|
},
|
|
45
44
|
"auth_token": {
|
|
46
45
|
"type": "string",
|
|
47
46
|
"title": "Authentication token",
|
|
48
|
-
"description": "Project
|
|
47
|
+
"description": "Project token for this project from the hub KXM_PROJECT_TOKENS. Leave blank on the machine that runs the hub to use the project token the hub saved for this project. The hub admin token is never used",
|
|
49
48
|
"sensitive": true,
|
|
50
49
|
"required": false
|
|
51
50
|
},
|
|
52
51
|
"agent_name": {
|
|
53
52
|
"type": "string",
|
|
54
53
|
"title": "Agent name",
|
|
55
|
-
"description": "
|
|
54
|
+
"description": "Name other agents see. The first active session in a project keeps it; a later concurrent session registers as <name>-<pid>",
|
|
56
55
|
"default": "claude",
|
|
57
56
|
"required": true
|
|
58
57
|
},
|
|
@@ -66,7 +65,7 @@
|
|
|
66
65
|
"project": {
|
|
67
66
|
"type": "string",
|
|
68
67
|
"title": "Project",
|
|
69
|
-
"description": "
|
|
68
|
+
"description": "Hub project key; must match a key in the hub KXM_PROJECT_TOKENS. Blank uses the package.json name, then the directory name",
|
|
70
69
|
"required": false
|
|
71
70
|
}
|
|
72
71
|
}
|