@kontextmind/kxm 0.7.39 → 0.7.43
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/CHANGELOG.md +41 -7
- package/docs/README.md +5 -3
- package/docs/agent-skills.md +1 -1
- package/docs/architecture.md +1 -1
- package/docs/configuration.md +28 -5
- package/docs/{vnext → contracts}/README.md +7 -7
- package/docs/{vnext → contracts}/architecture.md +2 -2
- package/docs/{vnext → contracts}/migration.md +25 -25
- package/docs/{vnext → contracts}/routing.md +2 -2
- package/docs/{vnext → contracts}/synchronization.md +1 -1
- package/docs/{vnext → contracts}/validation.md +7 -7
- package/docs/getting-started.md +1 -1
- package/docs/kb/qa-authentik-authentication.md +47 -0
- package/docs/kb/qa-extension-install-and-hub-bootstrap.md +68 -0
- package/docs/kb/qa-hub-on-a-public-host.md +31 -0
- package/docs/kb/qa-sqlite-vs-duckdb.md +18 -0
- package/docs/kb/qa-what-the-hub-stores.md +47 -0
- package/docs/packages.md +91 -0
- package/docs/templates/architecture.md +1 -1
- package/docs/test-matrix.md +6 -6
- package/docs/tui-components.md +131 -0
- package/examples/README.md +2 -2
- package/examples/{vnext → project}/.kxm/agents/critic-3.yaml +1 -1
- package/examples/{vnext → project}/README.md +4 -4
- package/package.json +18 -8
- package/packages/core/tui/CHANGELOG.md +19 -0
- package/packages/core/tui/LICENSE +21 -0
- package/packages/core/tui/README.md +45 -0
- package/packages/core/tui/dist/index.js +1439 -0
- package/packages/core/tui/src/adapters/pi.ts +73 -0
- package/packages/core/tui/src/adapters/terminal.ts +106 -0
- package/packages/core/tui/src/exports/index.ts +30 -0
- package/packages/core/tui/src/services/registry.ts +274 -0
- package/packages/core/tui/src/tui/keys.ts +130 -0
- package/packages/core/tui/src/tui/layout.ts +117 -0
- package/packages/core/tui/src/tui/panel.ts +435 -0
- package/packages/core/tui/src/tui/panelComponent.ts +208 -0
- package/packages/core/tui/src/tui/render.ts +309 -0
- package/packages/core/tui/src/tui/theme.ts +145 -0
- package/packages/core/tui/src/types/surface.ts +407 -0
- package/plugins/kxm/.claude-plugin/plugin.json +1 -1
- package/plugins/kxm/dist/cli.js +681 -553
- package/plugins/kxm/dist/extension.js +18 -18
- package/plugins/kxm/dist/mcp-server.js +1 -1
- package/plugins/kxm/dist/{vnext-runtime-supervisor.js → runtime-supervisor.js} +553 -553
- package/plugins/kxm/dist/runtime.js +608 -608
- package/plugins/kxm/dist/server.js +13 -13
- package/plugins/kxm/package.json +2 -2
- package/plugins/kxm/skills/kxm-project-setup/SKILL.md +2 -2
- package/plugins/kxm/skills/kxm-runs/SKILL.md +3 -3
- package/plugins/kxm/skills/kxm-session/SKILL.md +1 -1
- package/plugins/kxm/skills/kxm-workflow/SKILL.md +1 -1
- package/plugins/kxm/src/autocomplete.ts +4 -4
- package/plugins/kxm/src/{vnext-bindings.ts → bindings.ts} +48 -48
- package/plugins/kxm/src/cli/hub.ts +3 -3
- package/plugins/kxm/src/cli/{vnext.ts → project.ts} +106 -106
- package/plugins/kxm/src/cli/roles.ts +9 -9
- package/plugins/kxm/src/cli/system.ts +2 -2
- package/plugins/kxm/src/cli/tasks.ts +8 -8
- package/plugins/kxm/src/cli/workflows.ts +8 -8
- package/plugins/kxm/src/cli.ts +47 -47
- package/plugins/kxm/src/config.ts +69 -14
- package/plugins/kxm/src/database.ts +4 -4
- package/plugins/kxm/src/{vnext-engine-artifacts.ts → engine-artifacts.ts} +7 -7
- package/plugins/kxm/src/{vnext-engine-command.ts → engine-command.ts} +40 -40
- package/plugins/kxm/src/{vnext-engine-compile.ts → engine-compile.ts} +64 -64
- package/plugins/kxm/src/{vnext-engine-evidence.ts → engine-evidence.ts} +26 -26
- package/plugins/kxm/src/{vnext-engine-fold.ts → engine-fold.ts} +99 -99
- package/plugins/kxm/src/{vnext-engine-gate-records.ts → engine-gate-records.ts} +105 -105
- package/plugins/kxm/src/{vnext-engine-plan.ts → engine-plan.ts} +69 -69
- package/plugins/kxm/src/{vnext-engine.ts → engine.ts} +502 -502
- package/plugins/kxm/src/gate-hash.ts +10 -0
- package/plugins/kxm/src/{vnext-harness.ts → harness.ts} +1 -1
- package/plugins/kxm/src/hub.ts +1 -1
- package/plugins/kxm/src/init-guide-setup.ts +3 -3
- package/plugins/kxm/src/{vnext-init.ts → init.ts} +93 -93
- package/plugins/kxm/src/kxm-install-kind.ts +1 -1
- package/plugins/kxm/src/kxm-update-config.ts +2 -2
- package/plugins/kxm/src/local-snapshot.ts +23 -23
- package/plugins/kxm/src/mcp-server.ts +1 -1
- package/plugins/kxm/src/{vnext-migrate.ts → migrate.ts} +123 -123
- package/plugins/kxm/src/model-inventory.ts +1 -1
- package/plugins/kxm/src/{vnext-oneshot-evidence.ts → oneshot-evidence.ts} +2 -2
- package/plugins/kxm/src/{vnext-oneshot-process.ts → oneshot-process.ts} +4 -4
- package/plugins/kxm/src/{vnext-oneshot-producer.ts → oneshot-producer.ts} +24 -24
- package/plugins/kxm/src/{vnext-permission.ts → permission.ts} +86 -86
- package/plugins/kxm/src/{vnext-pi-producer.ts → pi-producer.ts} +13 -13
- package/plugins/kxm/src/{vnext-config.ts → project-config.ts} +177 -177
- package/plugins/kxm/src/{vnext-repair.ts → repair.ts} +159 -159
- package/plugins/kxm/src/restricted-yaml.d.mts +3 -3
- package/plugins/kxm/src/restricted-yaml.mjs +4 -4
- package/plugins/kxm/src/{vnext-runtime-owner.ts → runtime-owner.ts} +35 -35
- package/plugins/kxm/src/{vnext-runtime.ts → runtime-service.ts} +136 -136
- package/plugins/kxm/src/{vnext-runtime-store.ts → runtime-store.ts} +145 -145
- package/plugins/kxm/src/{vnext-runtime-supervisor.ts → runtime-supervisor.ts} +80 -80
- package/plugins/kxm/src/runtime.ts +6 -6
- package/plugins/kxm/src/session-work.ts +3 -3
- package/plugins/kxm/src/studio-layout.ts +6 -6
- package/plugins/kxm/src/{vnext-template.ts → template.ts} +33 -33
- package/plugins/kxm/src/tui.ts +10 -24
- package/schemas/{vnext/README.md → README.md} +3 -3
- package/schemas/{vnext/agent.schema.json → agent.schema.json} +1 -1
- package/schemas/{vnext/assignment-result.schema.json → assignment-result.schema.json} +1 -1
- package/schemas/{vnext/backup-manifest.schema.json → backup-manifest.schema.json} +1 -1
- package/schemas/{vnext/candidate.schema.json → candidate.schema.json} +1 -1
- package/schemas/{vnext/common.schema.json → common.schema.json} +2 -2
- package/schemas/{vnext/context-candidate.schema.json → context-candidate.schema.json} +1 -1
- package/schemas/{vnext/context-packet.schema.json → context-packet.schema.json} +1 -1
- package/schemas/{vnext/delivery-manifest.schema.json → delivery-manifest.schema.json} +1 -1
- package/schemas/{vnext/drive-receipt.schema.json → drive-receipt.schema.json} +2 -2
- package/schemas/{vnext/environment.schema.json → environment.schema.json} +1 -1
- package/schemas/{vnext/gate-registry.schema.json → gate-registry.schema.json} +1 -1
- package/schemas/{vnext/handoff-manifest.schema.json → handoff-manifest.schema.json} +1 -1
- package/schemas/{vnext/init-operation.schema.json → init-operation.schema.json} +1 -1
- package/schemas/{vnext/local-repository-bindings.schema.json → local-repository-bindings.schema.json} +1 -1
- package/schemas/{vnext/memory-record.schema.json → memory-record.schema.json} +1 -1
- package/schemas/{vnext/migration-decision.schema.json → migration-decision.schema.json} +1 -1
- package/schemas/{vnext/migration-plan.schema.json → migration-plan.schema.json} +1 -1
- package/schemas/{vnext/migration-receipt.schema.json → migration-receipt.schema.json} +1 -1
- package/schemas/{vnext/model.schema.json → model.schema.json} +1 -1
- package/schemas/{vnext/modes.schema.json → modes.schema.json} +1 -1
- package/schemas/{vnext/permission-diff.schema.json → permission-diff.schema.json} +1 -1
- package/schemas/policy-draft/README.md +2 -2
- package/schemas/{vnext/prices.schema.json → prices.schema.json} +1 -1
- package/schemas/{vnext/project.schema.json → project.schema.json} +1 -1
- package/schemas/{vnext/repository.schema.json → repository.schema.json} +1 -1
- package/schemas/{vnext/role.schema.json → role.schema.json} +1 -1
- package/schemas/{vnext/run-event.schema.json → run-event.schema.json} +1 -1
- package/schemas/{vnext/session-brief.schema.json → session-brief.schema.json} +2 -2
- package/schemas/{vnext/sync-event.schema.json → sync-event.schema.json} +1 -1
- package/schemas/{vnext/template-provenance.schema.json → template-provenance.schema.json} +1 -1
- package/schemas/{vnext/workflow.schema.json → workflow.schema.json} +1 -1
- package/scripts/build-package.mjs +59 -0
- package/scripts/build-runtime.mjs +3 -2
- package/scripts/check-generated.mjs +2 -1
- package/scripts/check-versions.mjs +12 -1
- package/scripts/docker-install-smoke.mjs +268 -0
- package/scripts/emit-codex-artifacts.mjs +1 -1
- package/scripts/kxm-bump-version.mjs +53 -3
- package/scripts/kxm-runtime-supervisor.mjs +3 -3
- package/scripts/package-surfaces.mjs +39 -0
- package/scripts/roster-policy.mjs +1 -1
- package/plugins/kxm/src/vnext-gate-hash.ts +0 -10
- /package/docs/{vnext → contracts}/effects-and-recovery.md +0 -0
- /package/docs/{vnext → contracts}/lifecycles.md +0 -0
- /package/docs/{vnext → contracts}/terminology.md +0 -0
- /package/examples/{vnext → project}/.kxm/agents/coordinator.yaml +0 -0
- /package/examples/{vnext → project}/.kxm/agents/critic-1.yaml +0 -0
- /package/examples/{vnext → project}/.kxm/agents/critic-2.yaml +0 -0
- /package/examples/{vnext → project}/.kxm/agents/implementer.yaml +0 -0
- /package/examples/{vnext → project}/.kxm/agents/planner.yaml +0 -0
- /package/examples/{vnext → project}/.kxm/agents/reproducer.yaml +0 -0
- /package/examples/{vnext → project}/.kxm/agents/reviewer.yaml +0 -0
- /package/examples/{vnext → project}/.kxm/gates.yaml +0 -0
- /package/examples/{vnext → project}/.kxm/models/critic-claude.yaml +0 -0
- /package/examples/{vnext → project}/.kxm/models/critic-gemini.yaml +0 -0
- /package/examples/{vnext → project}/.kxm/models/critic-grok.yaml +0 -0
- /package/examples/{vnext → project}/.kxm/models/implementation.yaml +0 -0
- /package/examples/{vnext → project}/.kxm/models/primary.yaml +0 -0
- /package/examples/{vnext → project}/.kxm/prices.yaml +0 -0
- /package/examples/{vnext → project}/.kxm/project/env.yaml +0 -0
- /package/examples/{vnext → project}/.kxm/project.yaml +0 -0
- /package/examples/{vnext → project}/.kxm/repo/repo.yaml +0 -0
- /package/examples/{vnext → project}/.kxm/workflows/default.yaml +0 -0
- /package/examples/{vnext → project}/.kxm/workflows/fix.yaml +0 -0
- /package/examples/{vnext → project}/.kxm/workflows/improve.yaml +0 -0
- /package/examples/{vnext → project}/records/assignment-result-recorded.json +0 -0
- /package/examples/{vnext → project}/records/assignment-result.json +0 -0
- /package/examples/{vnext → project}/records/context-candidate.json +0 -0
- /package/examples/{vnext → project}/records/delivery-manifest.json +0 -0
- /package/examples/{vnext → project}/records/effect-uncertainty-resolved-sync.json +0 -0
- /package/examples/{vnext → project}/records/effect-uncertainty-resolved.json +0 -0
- /package/examples/{vnext → project}/records/run-created.json +0 -0
- /package/examples/{vnext → project}/records/sync-event.json +0 -0
- /package/examples/{vnext → project}/repositories/api/.kxm/repo/env.yaml +0 -0
- /package/examples/{vnext → project}/repositories/api/.kxm/repo/repo.yaml +0 -0
- /package/examples/{vnext → project}/repositories/web/.kxm/repo/repo.yaml +0 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kontextmind/kxm",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.43",
|
|
4
4
|
"description": "KXM local-first multi-agent orchestration and operator dashboard",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"author": "KontextMind",
|
|
@@ -32,14 +32,14 @@
|
|
|
32
32
|
"example": "node --disable-warning=ExperimentalWarning --experimental-strip-types examples/roundtrip.ts",
|
|
33
33
|
"build:mcp": "esbuild plugins/kxm/src/mcp-server.ts --bundle --platform=node --format=esm --target=node22 --alias:@modelcontextprotocol/sdk/server/index.js=./node_modules/@modelcontextprotocol/sdk/dist/esm/server/index.js --alias:@modelcontextprotocol/sdk/server/stdio.js=./node_modules/@modelcontextprotocol/sdk/dist/esm/server/stdio.js --alias:@modelcontextprotocol/sdk/types.js=./node_modules/@modelcontextprotocol/sdk/dist/esm/types.js --outfile=plugins/kxm/dist/mcp-server.js --banner:js=\"#!/usr/bin/env node\"",
|
|
34
34
|
"build:runtime": "node scripts/build-runtime.mjs",
|
|
35
|
-
"build": "npm run build:mcp && npm run build:runtime",
|
|
35
|
+
"build": "npm run build:mcp && npm run build:runtime && npm run build:packages",
|
|
36
36
|
"check:generated": "npm run build && node scripts/check-generated.mjs",
|
|
37
37
|
"test:core": "npm run build && node --disable-warning=ExperimentalWarning --experimental-strip-types --test --test-concurrency=4 test/core/*.test.ts",
|
|
38
38
|
"test:simulations": "npm run build && node --disable-warning=ExperimentalWarning --experimental-strip-types --test --test-concurrency=4 test/simulations/*.test.ts",
|
|
39
39
|
"test:complete": "npm run build && node --disable-warning=ExperimentalWarning --experimental-strip-types --test --test-concurrency=4 test/core/*.test.ts test/simulations/*.test.ts",
|
|
40
|
-
"test": "npm run test
|
|
41
|
-
"test:coverage:core": "npm run build && node --disable-warning=ExperimentalWarning --experimental-strip-types --test --test-concurrency=4 --experimental-test-coverage --test-coverage-lines=91 --test-coverage-branches=80 --test-coverage-functions=92 --test-coverage-include=plugins/kxm/src/**/*.ts --test-coverage-exclude=plugins/kxm/src/server.ts --test-coverage-exclude=plugins/kxm/src/mcp-server.ts --test-coverage-exclude=plugins/kxm/src/
|
|
42
|
-
"test:coverage:complete": "npm run build && node --disable-warning=ExperimentalWarning --experimental-strip-types --test --test-concurrency=4 --experimental-test-coverage --test-coverage-lines=93 --test-coverage-branches=80 --test-coverage-functions=93 --test-coverage-include=plugins/kxm/src/**/*.ts --test-coverage-exclude=plugins/kxm/src/server.ts --test-coverage-exclude=plugins/kxm/src/mcp-server.ts --test-coverage-exclude=plugins/kxm/src/
|
|
40
|
+
"test": "npm run build && node --disable-warning=ExperimentalWarning --experimental-strip-types --test --test-concurrency=4 test/core/*.test.ts packages/core/*/tests/unit/*.test.ts",
|
|
41
|
+
"test:coverage:core": "npm run build && node --disable-warning=ExperimentalWarning --experimental-strip-types --test --test-concurrency=4 --experimental-test-coverage --test-coverage-lines=91 --test-coverage-branches=80 --test-coverage-functions=92 --test-coverage-include=plugins/kxm/src/**/*.ts --test-coverage-exclude=plugins/kxm/src/server.ts --test-coverage-exclude=plugins/kxm/src/mcp-server.ts --test-coverage-exclude=plugins/kxm/src/runtime-supervisor.ts --test-coverage-include=packages/core/*/src/**/*.ts test/core/*.test.ts packages/core/*/tests/unit/*.test.ts",
|
|
42
|
+
"test:coverage:complete": "npm run build && node --disable-warning=ExperimentalWarning --experimental-strip-types --test --test-concurrency=4 --experimental-test-coverage --test-coverage-lines=93 --test-coverage-branches=80 --test-coverage-functions=93 --test-coverage-include=plugins/kxm/src/**/*.ts --test-coverage-exclude=plugins/kxm/src/server.ts --test-coverage-exclude=plugins/kxm/src/mcp-server.ts --test-coverage-exclude=plugins/kxm/src/runtime-supervisor.ts --test-coverage-include=packages/core/*/src/**/*.ts test/core/*.test.ts test/simulations/*.test.ts packages/core/*/tests/unit/*.test.ts",
|
|
43
43
|
"test:coverage": "npm run test:coverage:core",
|
|
44
44
|
"typecheck": "tsc --noEmit",
|
|
45
45
|
"lint:docs": "markdownlint-cli2",
|
|
@@ -49,7 +49,10 @@
|
|
|
49
49
|
"validate:claude": "claude plugin validate . --strict && claude plugin validate plugins/kxm --strict",
|
|
50
50
|
"validate:ci": "npm run test:coverage && npm run check && npm pack --dry-run",
|
|
51
51
|
"validate:pr": "npm run test:core && npm run check && npm run check:generated",
|
|
52
|
-
"validate": "npm run validate:ci && npm run validate:claude"
|
|
52
|
+
"validate": "npm run validate:ci && npm run validate:claude",
|
|
53
|
+
"test:packages": "npx nx run-many -t test --output-style=static",
|
|
54
|
+
"check:packages": "npx nx run-many -t build,test:coverage,typecheck --output-style=static",
|
|
55
|
+
"build:packages": "npx nx run-many -t build --output-style=stream"
|
|
53
56
|
},
|
|
54
57
|
"bin": {
|
|
55
58
|
"kxm": "./scripts/kxm.mjs"
|
|
@@ -60,7 +63,8 @@
|
|
|
60
63
|
"./client": "./plugins/kxm/dist/client.js",
|
|
61
64
|
"./extension": "./plugins/kxm/dist/extension.js",
|
|
62
65
|
"./mcp": "./plugins/kxm/dist/mcp-server.js",
|
|
63
|
-
"./package.json": "./package.json"
|
|
66
|
+
"./package.json": "./package.json",
|
|
67
|
+
"./tui": "./packages/core/tui/dist/index.js"
|
|
64
68
|
},
|
|
65
69
|
"pi": {
|
|
66
70
|
"extensions": [
|
|
@@ -96,6 +100,7 @@
|
|
|
96
100
|
"commander": "15.0.0",
|
|
97
101
|
"esbuild": "0.28.2",
|
|
98
102
|
"markdownlint-cli2": "0.23.2",
|
|
103
|
+
"nx": "23.2.1",
|
|
99
104
|
"tsx": "^4.23.13",
|
|
100
105
|
"typebox": "1.3.30",
|
|
101
106
|
"typescript": "7.0.2"
|
|
@@ -116,6 +121,8 @@
|
|
|
116
121
|
"plugins/kxm/package.json",
|
|
117
122
|
"plugins/kxm/README.md",
|
|
118
123
|
"plugins/kxm/dist",
|
|
124
|
+
"packages/core/tui/dist",
|
|
125
|
+
"packages/core/tui/src",
|
|
119
126
|
"plugins/kxm/skills",
|
|
120
127
|
"plugins/kxm/src",
|
|
121
128
|
"scripts",
|
|
@@ -127,5 +134,8 @@
|
|
|
127
134
|
"LICENSE",
|
|
128
135
|
"SECURITY.md"
|
|
129
136
|
],
|
|
130
|
-
"license": "MIT"
|
|
137
|
+
"license": "MIT",
|
|
138
|
+
"workspaces": [
|
|
139
|
+
"packages/core/*"
|
|
140
|
+
]
|
|
131
141
|
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to `@kontextmind/tui` are documented here. The repository
|
|
4
|
+
keeps one version across every package, checked by `npm run check:versions`.
|
|
5
|
+
|
|
6
|
+
## 0.7.1
|
|
7
|
+
|
|
8
|
+
### Added
|
|
9
|
+
|
|
10
|
+
- Surface contract `kxm.tui-contract.v1`: sections, fields, selectable choices
|
|
11
|
+
with `ready|available|blocked` status, owner actions, steps, progress, an
|
|
12
|
+
output tail, and bounded validation that refuses an oversized or malformed
|
|
13
|
+
published surface.
|
|
14
|
+
- Pure panel reducer that emits effects without writing, plus a plain-text
|
|
15
|
+
renderer, a Pi `Component` adapter, a standalone terminal adapter, and a
|
|
16
|
+
`ctx.ui.custom` adapter.
|
|
17
|
+
- Contribution registry: owners publish sections and handle their own writes; a
|
|
18
|
+
failed write returns as the old value plus the owner's reason.
|
|
19
|
+
- CLI palette shared with `kxm dash`, so one colour cannot mean two things.
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 KontextMind
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
# @kontextmind/tui
|
|
2
|
+
|
|
3
|
+
Reusable KXM terminal components: one declarative surface model, one renderer,
|
|
4
|
+
one input decoder, one contribution registry, and thin host adapters.
|
|
5
|
+
|
|
6
|
+
`kxm dash` and every configuration surface draw from here so a field looks,
|
|
7
|
+
keys, and fails the same way across the product. Guide:
|
|
8
|
+
[`docs/tui-components.md`](../../../docs/tui-components.md).
|
|
9
|
+
|
|
10
|
+
## Layout
|
|
11
|
+
|
|
12
|
+
```text
|
|
13
|
+
src/
|
|
14
|
+
types/ surface contract and its validation; imports nothing outside itself
|
|
15
|
+
tui/ pure controls: keys, layout, theme, panel reducer, renderer, component
|
|
16
|
+
services/ the contribution registry that routes every write to its owner
|
|
17
|
+
adapters/ host bindings: a standalone terminal session and the Pi TUI
|
|
18
|
+
exports/ the public surface; anything unexported may be reshaped
|
|
19
|
+
tests/
|
|
20
|
+
unit/ one file per layer
|
|
21
|
+
helpers/ the reference surface fixture
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
`src/` may import `@earendil-works/pi-tui` and nothing else external. No
|
|
25
|
+
`node:fs`, no hub, no SQLite: a control that reads disk cannot be rendered in a
|
|
26
|
+
test, and every control here is. The layer rules are enforced by
|
|
27
|
+
`test/core/package-layers.test.ts`, not by memory.
|
|
28
|
+
|
|
29
|
+
## Tasks
|
|
30
|
+
|
|
31
|
+
| Command | What it does |
|
|
32
|
+
|---|---|
|
|
33
|
+
| `bun run build` | Bundle `src/exports/index.ts` to `dist/index.js` |
|
|
34
|
+
| `bun run test` | Run the unit tests under Node |
|
|
35
|
+
| `bun run test:coverage` | Same, with the coverage floor |
|
|
36
|
+
| `bun run typecheck` | `tsc --noEmit` for this package |
|
|
37
|
+
|
|
38
|
+
From the repository root: `npx nx run tui:<target>` or
|
|
39
|
+
`npx nx run-many -t build,test`.
|
|
40
|
+
|
|
41
|
+
## Boundary
|
|
42
|
+
|
|
43
|
+
This package renders and routes. It does not own configuration, admit a writer,
|
|
44
|
+
or decide that work is green. Owners publish sections and perform their own
|
|
45
|
+
writes, so the panel can never become a second source of truth.
|