@kontextmind/kxm 0.7.45 → 0.7.47

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.
@@ -11,7 +11,7 @@
11
11
  "name": "kxm",
12
12
  "source": "./plugins/kxm",
13
13
  "description": "Durable workflows, peer agents, and kxm tui",
14
- "version": "0.7.45",
14
+ "version": "0.7.47",
15
15
  "category": "development",
16
16
  "tags": ["kxm", "multi-agent", "workflows", "mcp"]
17
17
  }
@@ -1,3 +1,20 @@
1
+ ---
2
+ schema: "kxm.doc.v1"
3
+ id: "KB-HUB-001"
4
+ type: "kb"
5
+ title: "Q&A: Authentik (OIDC) for user/role/agent authentication"
6
+ project: "kxm"
7
+ status: "draft"
8
+ owner: "@operator"
9
+ created: "2026-09-17"
10
+ updated: "2026-09-18"
11
+ authority: "instruction"
12
+ confidence: "reviewed"
13
+ summary: "Yes, but not by swapping the hub's checks for OIDC — the safest hook is a token broker that exchanges Authentik identity for the kxm tokens the hub already understands."
14
+ tags: ["hub", "authentik", "oidc", "auth"]
15
+ related: ["docs/operations.md", "docs/kb/qa-hub-on-a-public-host.md"]
16
+ ---
17
+
1
18
  # Q&A: Authentik (OIDC) for user/role/agent authentication
2
19
 
3
20
  > Researched by `claude --model fable` (planner, read-only) · 2026-09-17 · task_c0bb05339e15 · root review: pending
@@ -1,3 +1,20 @@
1
+ ---
2
+ schema: "kxm.doc.v1"
3
+ id: "KB-HUB-002"
4
+ type: "kb"
5
+ title: "Q&A: Extension install → kxm CLI bootstrap + hub auto-connect"
6
+ project: "kxm"
7
+ status: "draft"
8
+ owner: "@operator"
9
+ created: "2026-09-17"
10
+ updated: "2026-09-18"
11
+ authority: "instruction"
12
+ confidence: "reviewed"
13
+ summary: "Extension load attempts a hub connection and can auto-start a local hub with generated keys, but it does not bootstrap a global kxm CLI and failure warnings are diagnostic rather than actionable."
14
+ tags: ["hub", "extension", "bootstrap", "cli"]
15
+ related: ["docs/operations.md", "docs/getting-started.md"]
16
+ ---
17
+
1
18
  # Q&A: Extension install → kxm CLI bootstrap + hub auto-connect
2
19
 
3
20
  > Researched by `codex gpt-5.6-sol` (reviewer-cli, read-only) · 2026-09-17 · task_634d24e1225d · root review: pending
@@ -1,3 +1,20 @@
1
+ ---
2
+ schema: "kxm.doc.v1"
3
+ id: "KB-HUB-003"
4
+ type: "kb"
5
+ title: "Q&A: Hub on a public host — multiple users and projects?"
6
+ project: "kxm"
7
+ status: "draft"
8
+ owner: "@operator"
9
+ created: "2026-09-17"
10
+ updated: "2026-09-18"
11
+ authority: "instruction"
12
+ confidence: "reviewed"
13
+ summary: "One hub is one process and one SQLite database behind a TLS proxy; it is not multi-tenant and must never be exposed directly to the public internet."
14
+ tags: ["hub", "deployment", "security"]
15
+ related: ["docs/operations.md", "docs/kb/qa-authentik-authentication.md", "docs/kb/qa-what-the-hub-stores.md"]
16
+ ---
17
+
1
18
  # Q&A: Hub on a public host — multiple users and projects?
2
19
 
3
20
  > Researched by `claude --model fable` (planner, read-only) · 2026-09-17 · task_40b9d5015537 · root review: pending
@@ -1,3 +1,20 @@
1
+ ---
2
+ schema: "kxm.doc.v1"
3
+ id: "KB-HUB-004"
4
+ type: "kb"
5
+ title: "Q&A: Storage engine — SQLite vs DuckDB"
6
+ project: "kxm"
7
+ status: "draft"
8
+ owner: "@operator"
9
+ created: "2026-09-17"
10
+ updated: "2026-09-18"
11
+ authority: "instruction"
12
+ confidence: "reviewed"
13
+ summary: "The hub already uses SQLite; there is no DuckDB in this repository, and DuckDB should not become the hub's primary store."
14
+ tags: ["hub", "sqlite", "storage"]
15
+ related: ["docs/operations.md", "docs/kb/qa-what-the-hub-stores.md"]
16
+ ---
17
+
1
18
  # Q&A: Storage engine — SQLite vs DuckDB
2
19
 
3
20
  > Answered by root from direct repo evidence · 2026-09-17 · task_279246b4dddb
@@ -1,3 +1,20 @@
1
+ ---
2
+ schema: "kxm.doc.v1"
3
+ id: "KB-HUB-005"
4
+ type: "kb"
5
+ title: "Q&A: What is all stored on the hub?"
6
+ project: "kxm"
7
+ status: "draft"
8
+ owner: "@operator"
9
+ created: "2026-09-17"
10
+ updated: "2026-09-18"
11
+ authority: "instruction"
12
+ confidence: "reviewed"
13
+ summary: "The hub persists agent records, message bodies, workflow runs, journal/evidence, context items, runtime events, and raw tokens in user-state hub-env.json."
14
+ tags: ["hub", "storage", "privacy"]
15
+ related: ["docs/operations.md", "docs/kb/qa-sqlite-vs-duckdb.md"]
16
+ ---
17
+
1
18
  # Q&A: What is all stored on the hub?
2
19
 
3
20
  > Researched by `codex gpt-5.6-sol` (reviewer-cli, read-only) · 2026-09-17 · task_85bd0119c40a · root review: pending
@@ -18,7 +18,7 @@ kxm hub start
18
18
  ```
19
19
 
20
20
  These operator commands assume the packed release CLI installation from
21
- [Getting started](getting-started.md#install-the-operator-command). From a
21
+ [Getting started](getting-started.md#1-install). From a
22
22
  source clone, use `npm run hub` instead.
23
23
 
24
24
  When `KXM_AUTH_TOKEN` is not set, `kxm hub start` loads the persisted hub
@@ -227,3 +227,11 @@ place from v0.4 databases.
227
227
  - **Rollback**: schema downgrades are not supported (a newer database refuses
228
228
  to open on an older runtime). Restore a database backup taken before the
229
229
  upgrade instead.
230
+
231
+ ## Hub Q&A / knowledge base
232
+
233
+ - [What is all stored on the hub?](kb/qa-what-the-hub-stores.md)
234
+ - [Storage engine — SQLite vs DuckDB](kb/qa-sqlite-vs-duckdb.md)
235
+ - [Hub on a public host — multiple users and projects?](kb/qa-hub-on-a-public-host.md)
236
+ - [Authentik (OIDC) for user/role/agent authentication](kb/qa-authentik-authentication.md)
237
+ - [Extension install → kxm CLI bootstrap + hub auto-connect](kb/qa-extension-install-and-hub-bootstrap.md)
@@ -115,7 +115,7 @@ CLI matches source.
115
115
  `pi install git:github.com/kontextmind/kxm@main` installs the Pi extension
116
116
  and Agent Skill, not a global operator command. Install the versioned `.tgz`
117
117
  release asset through the authenticated `gh release download` flow in
118
- [Getting started](getting-started.md#install-the-operator-command), or run
118
+ [Getting started](getting-started.md#1-install), or run
119
119
  `node scripts/kxm.mjs` from a clone after `npm ci`. `npx kxm` and a
120
120
  global `git+https` npm install are not supported installation paths.
121
121
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kontextmind/kxm",
3
- "version": "0.7.45",
3
+ "version": "0.7.47",
4
4
  "description": "KXM local-first multi-agent orchestration and operator dashboard",
5
5
  "type": "module",
6
6
  "author": "KontextMind",
@@ -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.45",
5
+ "version": "0.7.47",
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",
@@ -22051,6 +22051,8 @@ var KxmSchemaRegistry = class {
22051
22051
  permissionDiffValidator;
22052
22052
  runEventValidator;
22053
22053
  driveReceiptValidator;
22054
+ coordinatorValidator;
22055
+ intakeMessageValidator;
22054
22056
  constructor(schemasDir = DEFAULT_SCHEMA_DIR) {
22055
22057
  this.schemasDir = resolve3(schemasDir);
22056
22058
  this.ajv = new import__.Ajv2020({ allErrors: true, strict: true, strictRequired: false });
@@ -22068,6 +22070,8 @@ var KxmSchemaRegistry = class {
22068
22070
  const permissionDiffFile = "permission-diff.schema.json";
22069
22071
  const runEventFile = "run-event.schema.json";
22070
22072
  const driveReceiptFile = "drive-receipt.schema.json";
22073
+ const coordinatorFile = "coordinator.schema.json";
22074
+ const intakeMessageFile = "intake-message.schema.json";
22071
22075
  this.ajv.addSchema(readJsonObject(join6(this.schemasDir, localBindingsFile)));
22072
22076
  this.ajv.addSchema(readJsonObject(join6(this.schemasDir, templateProvenanceFile)));
22073
22077
  this.ajv.addSchema(readJsonObject(join6(this.schemasDir, initOperationFile)));
@@ -22077,6 +22081,8 @@ var KxmSchemaRegistry = class {
22077
22081
  this.ajv.addSchema(readJsonObject(join6(this.schemasDir, permissionDiffFile)));
22078
22082
  this.ajv.addSchema(readJsonObject(join6(this.schemasDir, runEventFile)));
22079
22083
  this.ajv.addSchema(readJsonObject(join6(this.schemasDir, driveReceiptFile)));
22084
+ this.ajv.addSchema(readJsonObject(join6(this.schemasDir, coordinatorFile)));
22085
+ this.ajv.addSchema(readJsonObject(join6(this.schemasDir, intakeMessageFile)));
22080
22086
  for (const [kind, definition] of Object.entries(RESOURCE_SCHEMA)) {
22081
22087
  const validator = this.ajv.getSchema(`https://schemas.kxm.dev/${definition.file}`);
22082
22088
  if (!validator) throw new Error(`schema did not compile: ${definition.file}`);
@@ -22091,6 +22097,8 @@ var KxmSchemaRegistry = class {
22091
22097
  const permissionDiffValidator = this.ajv.getSchema(`https://schemas.kxm.dev/${permissionDiffFile}`);
22092
22098
  const runEventValidator = this.ajv.getSchema(`https://schemas.kxm.dev/${runEventFile}`);
22093
22099
  const driveReceiptValidator = this.ajv.getSchema(`https://schemas.kxm.dev/${driveReceiptFile}`);
22100
+ const coordinatorValidator = this.ajv.getSchema(`https://schemas.kxm.dev/${coordinatorFile}`);
22101
+ const intakeMessageValidator = this.ajv.getSchema(`https://schemas.kxm.dev/${intakeMessageFile}`);
22094
22102
  if (!localBindingsValidator) throw new Error(`schema did not compile: ${localBindingsFile}`);
22095
22103
  if (!templateProvenanceValidator) throw new Error(`schema did not compile: ${templateProvenanceFile}`);
22096
22104
  if (!initOperationValidator) throw new Error(`schema did not compile: ${initOperationFile}`);
@@ -22100,6 +22108,8 @@ var KxmSchemaRegistry = class {
22100
22108
  if (!permissionDiffValidator) throw new Error(`schema did not compile: ${permissionDiffFile}`);
22101
22109
  if (!runEventValidator) throw new Error(`schema did not compile: ${runEventFile}`);
22102
22110
  if (!driveReceiptValidator) throw new Error(`schema did not compile: ${driveReceiptFile}`);
22111
+ if (!coordinatorValidator) throw new Error(`schema did not compile: ${coordinatorFile}`);
22112
+ if (!intakeMessageValidator) throw new Error(`schema did not compile: ${intakeMessageFile}`);
22103
22113
  this.localBindingsValidator = localBindingsValidator;
22104
22114
  this.templateProvenanceValidator = templateProvenanceValidator;
22105
22115
  this.initOperationValidator = initOperationValidator;
@@ -22109,6 +22119,8 @@ var KxmSchemaRegistry = class {
22109
22119
  this.permissionDiffValidator = permissionDiffValidator;
22110
22120
  this.runEventValidator = runEventValidator;
22111
22121
  this.driveReceiptValidator = driveReceiptValidator;
22122
+ this.coordinatorValidator = coordinatorValidator;
22123
+ this.intakeMessageValidator = intakeMessageValidator;
22112
22124
  }
22113
22125
  validate(kind, value, file) {
22114
22126
  const definition = RESOURCE_SCHEMA[kind];
@@ -24018,7 +24030,7 @@ function restoreBackup(manifestPathOrDir, options = {}) {
24018
24030
  if (store.storeId === "registry" || store.storeId === "binding-store") {
24019
24031
  maxSupported = 1;
24020
24032
  } else if (store.storeId.startsWith("events:")) {
24021
- maxSupported = 4;
24033
+ maxSupported = 5;
24022
24034
  }
24023
24035
  let targetPath = store.sourcePath;
24024
24036
  if (options.projectRoot && manifest.projectRoot && targetPath.startsWith(manifest.projectRoot)) {
@@ -24260,6 +24272,111 @@ var KxmRuntimeRegistry = class {
24260
24272
  }
24261
24273
  };
24262
24274
  var DRIVE_RECEIPT_MAX_BYTES = 8 * 1024;
24275
+ var EVENT_STORE_TABLES = {
24276
+ runs: ["run_id", "project_id", "home_runtime_id", "workflow_id", "prompt_sha256", "status", "config_revision", "memory_revision", "executor_policy_revision", "tool_policy_revision", "created_at", "updated_at"],
24277
+ events: ["project_id", "run_id", "sequence", "event_id", "event_type", "command_id", "occurred_at", "recorded_at", "monotonic_ns", "config_revision", "memory_revision", "executor_policy_revision", "tool_policy_revision", "payload", "schema", "home_runtime_id"],
24278
+ commands: ["command_id", "run_id", "kind", "result", "recorded_at"],
24279
+ run_plans: ["run_id", "run_plan_hash", "envelope", "pinned_sequence"],
24280
+ run_state: ["run_id", "last_sequence", "state"],
24281
+ attempt_capabilities: ["attempt_id", "run_id", "assignment_id", "step_id", "step_attempt", "producer_id", "capability_hash", "state"],
24282
+ gate_attempts: [
24283
+ "attempt_id",
24284
+ "run_id",
24285
+ "project_id",
24286
+ "home_runtime_id",
24287
+ "step_id",
24288
+ "step_attempt",
24289
+ "assignment_id",
24290
+ "effect_id",
24291
+ "gate_id",
24292
+ "gate_kind",
24293
+ "expect",
24294
+ "gate_definition_hash",
24295
+ "registry_hash",
24296
+ "run_plan_hash",
24297
+ "control_project_key",
24298
+ "producer_id",
24299
+ "intent_event_id",
24300
+ "content_hash"
24301
+ ],
24302
+ gate_observations: [
24303
+ "observation_id",
24304
+ "attempt_id",
24305
+ "run_id",
24306
+ "project_id",
24307
+ "home_runtime_id",
24308
+ "step_id",
24309
+ "step_attempt",
24310
+ "assignment_id",
24311
+ "effect_id",
24312
+ "completeness",
24313
+ "spawned",
24314
+ "pid",
24315
+ "exit_code",
24316
+ "signal",
24317
+ "exit_observed",
24318
+ "close_observed",
24319
+ "stop_cause",
24320
+ "signals_attempted",
24321
+ "error_class",
24322
+ "stdout_sha256",
24323
+ "stdout_bytes",
24324
+ "stdout_complete",
24325
+ "stderr_sha256",
24326
+ "stderr_bytes",
24327
+ "stderr_complete",
24328
+ "checked_count",
24329
+ "failed_count",
24330
+ "elapsed_ms",
24331
+ "started_at",
24332
+ "finished_at",
24333
+ "recorded_event_id",
24334
+ "content_hash"
24335
+ ],
24336
+ gate_evidence: [
24337
+ "evidence_id",
24338
+ "attempt_id",
24339
+ "observation_id",
24340
+ "run_id",
24341
+ "project_id",
24342
+ "home_runtime_id",
24343
+ "step_id",
24344
+ "step_attempt",
24345
+ "assignment_id",
24346
+ "effect_id",
24347
+ "evidence_key",
24348
+ "kind",
24349
+ "expect",
24350
+ "outcome",
24351
+ "settled_event_id",
24352
+ "content_hash"
24353
+ ],
24354
+ drive_receipts: ["drive_id", "run_id", "project_id", "opened_sequence", "last_sequence", "closed_at", "schema", "receipt"],
24355
+ coordinators: [
24356
+ "coordinator_id",
24357
+ "project_id",
24358
+ "role",
24359
+ "channel",
24360
+ "ceiling_hash",
24361
+ "config_revision",
24362
+ "bound_at",
24363
+ "schema",
24364
+ "record"
24365
+ ],
24366
+ intake_messages: [
24367
+ "message_id",
24368
+ "project_id",
24369
+ "coordinator_id",
24370
+ "idempotency_key",
24371
+ "content_hash",
24372
+ "received_at",
24373
+ "dispatch_state",
24374
+ "schema",
24375
+ "record"
24376
+ ],
24377
+ project_controls: ["project_id", "paused", "reason", "updated_at", "actor", "schema", "record"]
24378
+ };
24379
+ var KXM_EVENT_STORE_TABLE_NAMES = Object.keys(EVENT_STORE_TABLES).sort();
24263
24380
 
24264
24381
  // plugins/kxm/src/engine-compile.ts
24265
24382
  var KXM_COMPILED_WORKFLOW_SCHEMA = "kxm.compiled-workflow.v1";
@@ -17121,7 +17121,7 @@ async function deliverInboxNotification(messageId, delivered, notify) {
17121
17121
  }
17122
17122
 
17123
17123
  // plugins/kxm/src/mcp-server.ts
17124
- var VERSION = "0.7.45";
17124
+ var VERSION = "0.7.47";
17125
17125
  var inbox = /* @__PURE__ */ new Map();
17126
17126
  var notifiedInbox = /* @__PURE__ */ new Set();
17127
17127
  var meshClient;