@kontextmind/kxm 0.7.96 → 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.
Files changed (41) hide show
  1. package/.claude-plugin/marketplace.json +1 -1
  2. package/CHANGELOG.md +22 -0
  3. package/docs/concepts/trust-model.md +3 -2
  4. package/docs/glossary.md +1 -1
  5. package/docs/guides/peer-messaging.md +2 -2
  6. package/docs/guides/pi-workers.md +1 -1
  7. package/docs/guides/webhook-workflows.md +53 -18
  8. package/docs/operations/deploy.md +1 -1
  9. package/docs/operations/troubleshooting.md +3 -2
  10. package/docs/reference/cli-reference.md +6 -6
  11. package/docs/reference/configuration.md +2 -2
  12. package/docs/reference/http-api.md +6 -6
  13. package/docs/reference/tools.md +1 -1
  14. package/docs/reference/workflow-definitions.md +2 -2
  15. package/docs/start/quickstart-pi.md +1 -1
  16. package/examples/workflow-signal.ts +4 -5
  17. package/package.json +1 -1
  18. package/plugins/kxm/.claude-plugin/plugin.json +1 -1
  19. package/plugins/kxm/dist/claude-hook.js +11 -1
  20. package/plugins/kxm/dist/cli.js +159 -74
  21. package/plugins/kxm/dist/client.js +3 -1
  22. package/plugins/kxm/dist/core.js +11 -1
  23. package/plugins/kxm/dist/extension.js +45 -13
  24. package/plugins/kxm/dist/mcp-server.js +20 -4
  25. package/plugins/kxm/dist/runtime-supervisor.js +1 -3
  26. package/plugins/kxm/dist/runtime.js +17 -3
  27. package/plugins/kxm/dist/server.js +115 -20
  28. package/plugins/kxm/package.json +1 -1
  29. package/plugins/kxm/src/cli/workflows.ts +12 -7
  30. package/plugins/kxm/src/cli.ts +19 -5
  31. package/plugins/kxm/src/client.ts +4 -0
  32. package/plugins/kxm/src/commands.ts +23 -1
  33. package/plugins/kxm/src/extension.ts +20 -14
  34. package/plugins/kxm/src/github-watch.ts +8 -5
  35. package/plugins/kxm/src/hub-env.ts +19 -1
  36. package/plugins/kxm/src/hub.ts +105 -21
  37. package/plugins/kxm/src/improve-sources.ts +2 -7
  38. package/plugins/kxm/src/mcp-server.ts +9 -2
  39. package/plugins/kxm/src/runtime-store.ts +23 -0
  40. package/plugins/kxm/src/workflow.ts +70 -1
  41. package/scripts/smoke-multi-pi.mjs +5 -1
@@ -423,10 +423,14 @@ export async function runRealSmoke(options = {}) {
423
423
  stage = "workflow-journal-checkpoint";
424
424
  const resumedOperator = values["durable-restart-resume"];
425
425
  const payload = JSON.stringify({ event: "smoke.requested" });
426
+ // KXM webhook contract (workflowWebhookSignedMaterial in plugins/kxm/src/workflow.ts).
427
+ const deliveryId = `smoke-${randomUUID()}`;
428
+ const timestamp = String(Math.floor(Date.now() / 1_000));
429
+ const signedMaterial = ["kxm-webhook-v1", "start", timestamp, deliveryId, "real-pi-smoke", "", ""].join("\n") + "\n" + payload;
426
430
  const started = await api(baseUrl, "/v1/webhooks/real-pi-smoke", {
427
431
  method: "POST",
428
432
  authToken,
429
- headers: { "x-mesh-event": "smoke.requested", "x-kxm-delivery-id": `smoke-${randomUUID()}`, "x-hub-signature": `sha256=${createHmac("sha256", webhookSecret).update(payload).digest("hex")}` },
433
+ headers: { "x-kxm-delivery-id": deliveryId, "x-kxm-timestamp": timestamp, "x-kxm-signature": `sha256=${createHmac("sha256", webhookSecret).update(signedMaterial).digest("hex")}` },
430
434
  body: payload,
431
435
  });
432
436
  await api(baseUrl, `/v1/workflows/${encodeURIComponent(started.run.id)}/journal`, {