kojee-mcp 0.5.9 → 0.5.10

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.
@@ -2,6 +2,9 @@
2
2
  function sanitizeChannelAttr(value) {
3
3
  return String(value ?? "").replace(/["<>\u0000-\u001f\u007f]/g, "");
4
4
  }
5
+ function defangChannelBody(content) {
6
+ return String(content ?? "").replace(/<(\/?)channel/gi, "&lt;$1channel");
7
+ }
5
8
  function formatChannelEvents(events) {
6
9
  const header = `[${events.length} unread Tandem ${events.length === 1 ? "event" : "events"}]
7
10
 
@@ -9,7 +12,7 @@ function formatChannelEvents(events) {
9
12
  const bodies = events.map((evt) => {
10
13
  const attrs = Object.entries(evt.meta).map(([k, v]) => `${k}="${sanitizeChannelAttr(v)}"`).join(" ");
11
14
  return `<channel source="kojee-mcp" ${attrs}>
12
- ${evt.content}
15
+ ${defangChannelBody(evt.content)}
13
16
  </channel>`;
14
17
  });
15
18
  return header + bodies.join("\n\n");
package/dist/cli.js CHANGED
@@ -42,11 +42,11 @@ program.command("pair <code>").description("Pair this machine against Kojee usin
42
42
  });
43
43
  program.command("hook").description("Run a kojee MCP hook script (called by Claude Code via ~/.claude/settings.json)").requiredOption("--type <type>", "Hook type: stop, user-prompt-submit, or codex-stop").action(async (opts) => {
44
44
  if (opts.type === "stop") {
45
- const { runStopHook } = await import("./stop-hook-GEJF47SN.js");
45
+ const { runStopHook } = await import("./stop-hook-OTCJGL6V.js");
46
46
  await runStopHook();
47
47
  process.exit(0);
48
48
  } else if (opts.type === "user-prompt-submit") {
49
- const { runUserPromptSubmitHook } = await import("./user-prompt-submit-hook-DGRRFHOB.js");
49
+ const { runUserPromptSubmitHook } = await import("./user-prompt-submit-hook-QXMC7EZU.js");
50
50
  await runUserPromptSubmitHook();
51
51
  process.exit(0);
52
52
  } else if (opts.type === "codex-stop") {
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  formatChannelEvents
3
- } from "./chunk-PHXO5P25.js";
3
+ } from "./chunk-YKS6YZKM.js";
4
4
  import {
5
5
  readHookStdin
6
6
  } from "./chunk-LSUB6QMP.js";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  formatChannelEvents
3
- } from "./chunk-PHXO5P25.js";
3
+ } from "./chunk-YKS6YZKM.js";
4
4
  import {
5
5
  readHookStdin
6
6
  } from "./chunk-LSUB6QMP.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "kojee-mcp",
3
- "version": "0.5.9",
3
+ "version": "0.5.10",
4
4
  "type": "module",
5
5
  "main": "dist/index.js",
6
6
  "exports": {