codiedev 0.10.0-beta.15 → 0.10.0-beta.17

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/dist/utils.js CHANGED
@@ -33,7 +33,7 @@ var __importStar = (this && this.__importStar) || (function () {
33
33
  };
34
34
  })();
35
35
  Object.defineProperty(exports, "__esModule", { value: true });
36
- exports.DIRECT_UPLOAD_THRESHOLD_CHARS = exports.SWEEP_MIN_AGE_MS = exports.CAPTURE_THROTTLE_MS = exports.FINISH_ORPHAN_AGE_MS = exports.CLAIM_STALE_MS = exports.UPLOAD_TTL_MS = exports.MAX_UPLOAD_ATTEMPTS = exports.PI_EXTENSION_SUBCOMMANDS = exports.CONFIG_PATH = exports.codiedevStateDir = exports.piExtensionPath = exports.inspectPiExtension = void 0;
36
+ exports.DIRECT_UPLOAD_THRESHOLD_CHARS = exports.SWEEP_MIN_AGE_MS = exports.CAPTURE_THROTTLE_MS = exports.FINISH_ORPHAN_AGE_MS = exports.CLAIM_STALE_MS = exports.UPLOAD_TTL_MS = exports.MAX_UPLOAD_ATTEMPTS = exports.CODIEDEV_INSTRUCTIONS_BODY = exports.PI_EXTENSION_SUBCOMMANDS = exports.CONFIG_PATH = exports.codiedevStateDir = exports.piExtensionPath = exports.inspectPiExtension = void 0;
37
37
  exports.readConfig = readConfig;
38
38
  exports.writeConfig = writeConfig;
39
39
  exports.writeConfigAtPath = writeConfigAtPath;
@@ -80,6 +80,9 @@ exports.ensureAllCodiedevHooksInstalled = ensureAllCodiedevHooksInstalled;
80
80
  exports.hasDirectHookPath = hasDirectHookPath;
81
81
  exports.migrateHooksToLauncher = migrateHooksToLauncher;
82
82
  exports.ensureSessionStartHookInstalled = ensureSessionStartHookInstalled;
83
+ exports.instructionsBody = instructionsBody;
84
+ exports.setProjectsFeature = setProjectsFeature;
85
+ exports.codiedevInstructionsText = codiedevInstructionsText;
83
86
  exports.installClaudeCodeInstructions = installClaudeCodeInstructions;
84
87
  exports.installCodexInstructions = installCodexInstructions;
85
88
  exports.copilotInstructionsPath = copilotInstructionsPath;
@@ -964,7 +967,23 @@ function installOpenCodeCapturePlugin() {
964
967
  ` const id = input?.sessionID ?? input?.sessionId ?? "unknown";\n` +
965
968
  ` const cwd = await resolveCwd(id);\n` +
966
969
  ` const prompt = Array.isArray(output?.parts) ? output.parts.filter((part) => part?.type === "text").map((part) => part.text || "").join("\\n") : "";\n` +
967
- ` const decision = invokeSync(PROMPT, { session_id: id, cwd, prompt });\n` +
970
+ ` const decision = invokeSync(PROMPT, { session_id: id, cwd, prompt, launch: LAUNCH });\n` +
971
+ ` if (decision?.decision === "block") {\n` +
972
+ ` // A key in the prompt (Team Security setting): stop it before the model.\n` +
973
+ ` const reason = String(decision.reason || "Codiedev stopped this prompt.");\n` +
974
+ ` const toast = { title: "Prompt not sent", message: reason, variant: "error", duration: 12000 };\n` +
975
+ ` // Older SDKs take { body }, newer ones the fields themselves. The TUI\n` +
976
+ ` // follows a stopped prompt with its own generic \"Failed to send\n` +
977
+ ` // prompt\" toast; show ours now and again just after, so ours stays up.\n` +
978
+ ` const show = () => { try { Promise.resolve(client.tui.showToast({ body: toast, ...toast })).catch(() => {}); } catch {} };\n` +
979
+ ` show();\n` +
980
+ ` setTimeout(show, 600);\n` +
981
+ ` if (process.env.CODIEDEV_PROMPT_BLOCK_OUTPUT === "marker") {\n` +
982
+ ` process.stderr.write("__CODIEDEV_PROMPT_BLOCKED__" + JSON.stringify({ reason }) + "\\n");\n` +
983
+ ` process.exit(3);\n` +
984
+ ` }\n` +
985
+ ` throw new Error(reason);\n` +
986
+ ` }\n` +
968
987
  ` const context = decision?.hookSpecificOutput?.additionalContext;\n` +
969
988
  ` if (context && Array.isArray(output?.parts)) {\n` +
970
989
  ` // Preserve the native part IDs required by current engine schemas.\n` +
@@ -1021,7 +1040,8 @@ function ensureOpenCodePluginCurrent() {
1021
1040
  try {
1022
1041
  if (!fs.existsSync(OPENCODE_PLUGIN_PATH))
1023
1042
  return;
1024
- if (!fs.readFileSync(OPENCODE_PLUGIN_PATH, "utf8").includes("SECURITY_PRE"))
1043
+ const current = fs.readFileSync(OPENCODE_PLUGIN_PATH, "utf8");
1044
+ if (!current.includes("SECURITY_PRE") && current.includes("CODIEDEV_PROMPT_BLOCK_OUTPUT"))
1025
1045
  return;
1026
1046
  installOpenCodeCapturePlugin();
1027
1047
  }
@@ -1109,7 +1129,15 @@ function piExtensionSource() {
1109
1129
  ` pi.on("input", async (event, ctx) => {\n` +
1110
1130
  ` if (event?.source === "extension") return { action: "continue" };\n` +
1111
1131
  ` const s = current(ctx);\n` +
1112
- ` const decision = invokeSync(PROMPT, { session_id: s.id, cwd: s.cwd, prompt: event?.text ?? "" });\n` +
1132
+ ` const decision = invokeSync(PROMPT, { session_id: s.id, cwd: s.cwd, prompt: event?.text ?? "", launch: LAUNCH });\n` +
1133
+ ` if (decision?.decision === "block") {\n` +
1134
+ ` // A key in the prompt (Team Security setting): pi never sends it.\n` +
1135
+ ` const reason = String(decision.reason || "Codiedev stopped this prompt.");\n` +
1136
+ ` if (ctx?.hasUI) { try { ctx.ui.notify(reason, "error"); } catch { process.stderr.write("\\n" + reason + "\\n"); } }\n` +
1137
+ ` else process.stderr.write("\\n" + reason + "\\n");\n` +
1138
+ ` pendingContext = null;\n` +
1139
+ ` return { action: "handled" };\n` +
1140
+ ` }\n` +
1113
1141
  ` pendingContext = decision?.hookSpecificOutput?.additionalContext || null;\n` +
1114
1142
  ` return { action: "continue" };\n` +
1115
1143
  ` });\n\n` +
@@ -1399,7 +1427,7 @@ const CODEX_USER_INSTRUCTIONS_PATH = path.join((0, harnessDirs_1.codexHome)(), "
1399
1427
  const CODEX_CONFIG_PATH = path.join((0, harnessDirs_1.codexHome)(), "config.toml");
1400
1428
  const CODIEDEV_INSTRUCTIONS_BEGIN = "<!-- codiedev-cli:begin -->";
1401
1429
  const CODIEDEV_INSTRUCTIONS_END = "<!-- codiedev-cli:end -->";
1402
- const CODIEDEV_INSTRUCTIONS_BODY = `## Codiedev — team artifact layer
1430
+ exports.CODIEDEV_INSTRUCTIONS_BODY = `## Codiedev — team artifact layer
1403
1431
 
1404
1432
  This machine is connected to Codiedev. Teammates share specs, reviews,
1405
1433
  decisions, and messages via a CLI on every dev's machine.
@@ -1417,14 +1445,21 @@ but does not install a global \`codiedev\` executable.
1417
1445
  | "push this spec" / "save this as a skill" | \`codiedev push <file.md>\` |
1418
1446
  | "pull X" / "grab the latest spec-X" / "what did a teammate push?" | \`codiedev pull <key>\` |
1419
1447
  | "delete X" / "remove that test push" / "rm spec-old" | \`codiedev delete <key>\` (always confirm with the user first) |
1420
- | "ping a teammate about this" / "ask someone for their take" | \`codiedev ping <name> "<msg>" [--with <key>]\` |
1448
+ | "ping a teammate about this" / "send them this spec" / "send them this file" | \`codiedev ping <name> "<msg>" [--with <key>] [--file <path>]\` (\`--with\` also gives them access) |
1421
1449
  | "any messages?" / "check my inbox" / "what did a teammate say?" | \`codiedev inbox\` |
1422
1450
  | "read that reply" / "mark that ping read" | \`codiedev read <ping-id>\` |
1451
+ | "reply to that" / "tell them X" (answering a message from \`codiedev inbox\`) | \`codiedev reply <ping-id> "<msg>" [--file <path>]\` (not a new ping: this threads it and marks theirs answered) |
1423
1452
  | "note that X is a follow-up" / "remember X" | \`codiedev note "<text>"\` |
1424
- | "share with a teammate" / "give someone access" (no notification) | \`codiedev share <key> <name> [--role read\\|edit]\` |
1425
- | "send this to a teammate" / "ask someone to look at this" | \`codiedev send <key> <name> ["<msg>"]\` |
1453
+ | "create a project" / "add these as tasks to X" / "turn my call notes into tickets" / "put Gateway under Platform" | \`codiedev project create "<name>" [--in <parent key>]\`; \`codiedev project move <key> --in <parent key>\` (or \`--top\`); \`codiedev task add <project> "<title>" [--body-file f.md] [--priority urgent\\|high\\|medium\\|low]\` (one call per task); add \`--assignee <teammate>\` to hand it off (they get a ping) |
1454
+ | "go to project X" / "what's the easiest thing in X?" / "work on WEB-3" | \`codiedev project show <key\\|name>\`; \`codiedev project next <key>\` (most urgent first; read them to judge which is easiest); \`codiedev task show <ID>\` then \`codiedev task start <ID>\` from the repo on a feature branch named with the ID, e.g. \`web-3-fix-login\` (the ID in the branch or PR title links the PR; merging closes the task; several PRs can link, it closes when they have all merged) |
1455
+ | "share project X with Sam" / "invite Sam to WEB" | \`codiedev project invite <key> <teammate>\` (they see it in their Break Room and get a ping) |
1456
+ | "give WEB-3 to Sam" / "find the task about X" / "rename or archive project X" | \`codiedev task assign <ID> <teammate\\|me\\|none>\`; \`codiedev task search "<words>"\`; \`codiedev project edit <key> --name "…" [--description "…"]\`; \`codiedev project archive <key>\` (\`project restore <key>\` undoes) |
1457
+ | "tell my bot when a task is done" / "send events to my Slack app" / "webhook for pings" | \`codiedev webhooks add <https-url> [--events task.done,ping.received] [--project KEY]\` (prints the signing secret once); \`codiedev webhooks list\`, \`test <id>\`, \`rm <id>\`. Agents can call the same /api/cli/work ops with their run token (cdvr_) |
1458
+ | "make that ping a task" / "track Sam's request in WEB" | \`codiedev task add <project> --from-ping <ping-id> ["<title>"]\` (ping id from \`codiedev inbox\`; Sam gets one reply in that thread when it's done, so don't also reply "done") |
1459
+ | "what am I working on?" / "my tasks" / "attach the spec to WEB-3" | \`codiedev task mine\`; \`codiedev task attach <ID> <library-key>\` (or \`--with <key>\` on \`task add\`). \`task start\` prints the body, attached docs to \`codiedev pull\`, the PR, past sessions and where your last one left off: read it before working |
1460
+ | "mark it done" / "add details to WEB-3" / "ask Sam for feedback on WEB-3" | \`codiedev task done <ID>\`; \`codiedev task state <ID> <state>\`; \`codiedev task edit <ID> --append "<notes>"\`; \`codiedev task comment <ID> "<text>"\`; \`codiedev task ask <ID> <teammate> "<question>"\` |
1461
+ | "share with a teammate" / "give someone access" (no notification) | \`codiedev ping <name> --with <key> [--edit]\` (no message = silent share) |
1426
1462
  | "find something about X" / "has anyone solved Y?" | \`codiedev search "<query>" [--limit N]\` |
1427
- | "why did we…?" / "what does the team know about X?" | \`codiedev ask "<question>"\` (synthesized answer + citations) |
1428
1463
  | "show my library" / "what artifacts exist?" | \`codiedev library [--scope mine\\|shared\\|all] [--kind doc\\|skill]\` |
1429
1464
  | "run my agent's test cases" / "check the dataset on model Y" / "run v2 of the dataset" | \`codiedev traces cases <agent> [--dataset <name> [--version <n>]] [--model <id>]\` (writes cases + RUN_CASES.md + results.json; follow it, then \`codiedev traces report <results.json>\`) |
1430
1465
  | "how are my agents doing?" / "what's failing this week?" / "show the booking agent's failed runs" / "why did run X fail?" | \`codiedev traces overview\`; \`codiedev traces runs <agent> [--failed] [--flag <issue>] [--days n]\`; \`codiedev traces run <run> --agent <name>\` (add \`--json\` to read the data yourself) |
@@ -1433,15 +1468,49 @@ but does not install a global \`codiedev\` executable.
1433
1468
  | "put this week's failed runs in the review queue" | \`codiedev traces queue list\`; \`codiedev traces queue add <queue> --agent <name> [--failed] [--days n]\` |
1434
1469
  | "have a judge score 10% of my agent's runs" / "turn off automatic scoring" | \`codiedev traces judge <agent> --on --scores <a,b> --sample 10 [--budget 25]\`; \`--off\`; no flags shows it |
1435
1470
  | "import these test cases from a CSV" / "add an example to the dataset" / "save the dataset as a version" | \`codiedev traces import <agent> <file> --dataset <name>\`; \`codiedev traces add-example <agent> --dataset <name> --input "…" [--expected "…"]\`; \`codiedev traces save-version <dataset>\`; \`codiedev traces versions <dataset>\` |
1471
+ | "make a starter pack" / "add this to our pack" / "package these skills for my team" | write a \`<slug>.pack.md\` (start from \`codiedev pack export <slug> --manifest --out .\` for an existing pack), then \`codiedev pack apply <file> [--publish]\` — see **Starter packs** below |
1472
+ | "publish the pack" / "ship the pack to my team" | \`codiedev pack publish <slug> [--channel stable\\|beta\\|alpha]\` |
1436
1473
  | "what was the last eval on X?" / "file these eval results" | \`codiedev evals last <subject>\` before starting a related eval; \`codiedev evals report <run.json>\` after each variant runs (scores only — \`codiedev evals help\` for the shape) |
1437
1474
 
1475
+ **Starter packs** (team managers and admins): a pack.md is frontmatter
1476
+ (\`name:\`, \`slug:\`, optional \`description:\`) then sections. Ask the user
1477
+ what to include, write the file, run \`codiedev pack apply <file> --dry-run\`
1478
+ to show them, then apply for real:
1479
+
1480
+ \`\`\`
1481
+ ---
1482
+ name: "Healthcare scan"
1483
+ slug: "healthcare-scan"
1484
+ ---
1485
+
1486
+ # Healthcare scan
1487
+
1488
+ ## Skills
1489
+
1490
+ - ./skills/healthcare-scan
1491
+ - lint.md @teammate@example.com
1492
+
1493
+ ## Files
1494
+
1495
+ - runner <- ~/.claude/runner
1496
+ \`\`\`
1497
+
1498
+ Under **Skills**, a local path (\`./…\`, \`~/…\` or \`/…\`) to a skill folder
1499
+ or SKILL.md is pushed to the library and added, with the rest of its folder
1500
+ shipped as the skill's files; \`<key> @<author email>\` adds a teammate's
1501
+ library skill. **Files** maps local folders to paths in the pack
1502
+ (\`.\` is the pack root). In skills, point at shipped files relative to the
1503
+ skill's folder or with \`\${CLAUDE_PLUGIN_ROOT}/…\`. Applying changes the
1504
+ draft; \`--publish\` (or \`codiedev pack publish\`) sends it to the team.
1505
+
1438
1506
  **Just push the file — we'll figure out where it goes.** Every artifact
1439
1507
  is classified into one of two kinds at upload time:
1440
1508
 
1441
1509
  - **skill** — the file has SKILL.md frontmatter (\`name:\` + \`description:\`
1442
- inside a \`---\` block). Lands under \`Artifacts → Skills tab\` and is
1510
+ inside a \`---\` block). Shows on the Skills page in the portal and is
1443
1511
  invokable as a slash command (\`/<name>\`).
1444
- - **doc** — everything else. Lands under \`Artifacts → My artifacts\`.
1512
+ - **doc** — everything else. Lives in the library: list it with
1513
+ \`codiedev library\`, fetch it with \`codiedev pull <key>\`.
1445
1514
 
1446
1515
  Detection is content-based, not filename-based. The filename prefix
1447
1516
  (\`spec-\` / \`decision-\` / \`proposal-\` / \`bugfix-\` / \`review-\` /
@@ -1465,16 +1534,39 @@ If ambiguous, the CLI returns candidates — retry with the full email.
1465
1534
  \`codiedev search "<query>"\` first. If prior art exists, pull it and
1466
1535
  iterate rather than duplicating.
1467
1536
 
1468
- **Sharing vs sending:** \`codiedev share\` is silent (access only, no
1469
- notification). \`codiedev send\` both grants access AND pings the
1470
- recipient. Use send when the user is actively looping someone in.
1537
+ **One command for messaging and sharing:** \`codiedev ping\`. A message
1538
+ lands in their inbox and emails them; \`--with <key>\` also gives them read
1539
+ access (\`--edit\` for edit). With \`--with\` and no message it's a silent
1540
+ share. (\`codiedev send\` / \`share\` still work as aliases.)
1471
1541
 
1472
1542
  **Errors:**
1473
1543
  - "not connected" → user needs to run \`npx codiedev connect\` with their
1474
1544
  API token from https://codiedev.com/portal/integrations/claude-code
1475
1545
  - "ambiguous recipient" → surface candidates to the user
1476
1546
  `;
1477
- function writeInstructionsBlock(targetPath, body = CODIEDEV_INSTRUCTIONS_BODY) {
1547
+ const PROJECTS_ROW = /`codiedev (?:project|task|webhooks) /;
1548
+ function instructionsBody(projects = readConfig()?.features?.projects === true) {
1549
+ if (projects)
1550
+ return exports.CODIEDEV_INSTRUCTIONS_BODY;
1551
+ return exports.CODIEDEV_INSTRUCTIONS_BODY.split("\n")
1552
+ .filter((line) => !(line.startsWith("| ") && PROJECTS_ROW.test(line)))
1553
+ .join("\n");
1554
+ }
1555
+ function setProjectsFeature(on) {
1556
+ const config = readConfig();
1557
+ if (!config || (config.features?.projects === true) === on)
1558
+ return;
1559
+ try {
1560
+ writeConfig({ ...config, features: { ...config.features, projects: on } });
1561
+ refreshInstalledInstructions();
1562
+ }
1563
+ catch {
1564
+ }
1565
+ }
1566
+ function codiedevInstructionsText() {
1567
+ return `${teamSkillContext_1.TEAM_SKILL_CONTEXT}\n\n${instructionsBody()}\n`;
1568
+ }
1569
+ function writeInstructionsBlock(targetPath, body = instructionsBody()) {
1478
1570
  const dir = path.dirname(targetPath);
1479
1571
  if (!fs.existsSync(dir)) {
1480
1572
  fs.mkdirSync(dir, { recursive: true });
@@ -1516,10 +1608,10 @@ function piInstructionsPath() {
1516
1608
  return path.join((0, harnessDirs_1.piAgentDir)(), "AGENTS.md");
1517
1609
  }
1518
1610
  function installPiInstructions() {
1519
- writeInstructionsBlock(piInstructionsPath(), `${teamSkillContext_1.TEAM_SKILL_CONTEXT}\n\n${CODIEDEV_INSTRUCTIONS_BODY}`);
1611
+ writeInstructionsBlock(piInstructionsPath(), `${teamSkillContext_1.TEAM_SKILL_CONTEXT}\n\n${instructionsBody()}`);
1520
1612
  }
1521
1613
  function installCopilotInstructions() {
1522
- writeInstructionsBlock(copilotInstructionsPath(), `${teamSkillContext_1.TEAM_SKILL_CONTEXT}\n\n${CODIEDEV_INSTRUCTIONS_BODY}`);
1614
+ writeInstructionsBlock(copilotInstructionsPath(), `${teamSkillContext_1.TEAM_SKILL_CONTEXT}\n\n${instructionsBody()}`);
1523
1615
  }
1524
1616
  const CURSOR_INSTRUCTIONS_FRONTMATTER = `---
1525
1617
  description: Codiedev team artifact layer — push, pull, search, ping, and share artifacts with teammates
@@ -1534,7 +1626,7 @@ function installCursorInstructions() {
1534
1626
  const block = CURSOR_INSTRUCTIONS_FRONTMATTER +
1535
1627
  CODIEDEV_INSTRUCTIONS_BEGIN +
1536
1628
  "\n" +
1537
- `${teamSkillContext_1.TEAM_SKILL_CONTEXT}\n\n${CODIEDEV_INSTRUCTIONS_BODY}` +
1629
+ `${teamSkillContext_1.TEAM_SKILL_CONTEXT}\n\n${instructionsBody()}` +
1538
1630
  "\n" +
1539
1631
  CODIEDEV_INSTRUCTIONS_END +
1540
1632
  "\n";
@@ -1550,7 +1642,7 @@ function installCursorInstructions() {
1550
1642
  existing.slice(0, beginIdx) +
1551
1643
  CODIEDEV_INSTRUCTIONS_BEGIN +
1552
1644
  "\n" +
1553
- `${teamSkillContext_1.TEAM_SKILL_CONTEXT}\n\n${CODIEDEV_INSTRUCTIONS_BODY}` +
1645
+ `${teamSkillContext_1.TEAM_SKILL_CONTEXT}\n\n${instructionsBody()}` +
1554
1646
  "\n" +
1555
1647
  CODIEDEV_INSTRUCTIONS_END +
1556
1648
  existing.slice(endIdx + CODIEDEV_INSTRUCTIONS_END.length);
@@ -1561,10 +1653,10 @@ function installCursorInstructions() {
1561
1653
  fs.writeFileSync(CURSOR_RULES_PATH, next, "utf8");
1562
1654
  }
1563
1655
  function installedInstructionsTargets() {
1564
- const withTeamContext = `${teamSkillContext_1.TEAM_SKILL_CONTEXT}\n\n${CODIEDEV_INSTRUCTIONS_BODY}`;
1656
+ const withTeamContext = `${teamSkillContext_1.TEAM_SKILL_CONTEXT}\n\n${instructionsBody()}`;
1565
1657
  return [
1566
- { path: CLAUDE_USER_INSTRUCTIONS_PATH, body: CODIEDEV_INSTRUCTIONS_BODY },
1567
- { path: CODEX_USER_INSTRUCTIONS_PATH, body: CODIEDEV_INSTRUCTIONS_BODY },
1658
+ { path: CLAUDE_USER_INSTRUCTIONS_PATH, body: instructionsBody() },
1659
+ { path: CODEX_USER_INSTRUCTIONS_PATH, body: instructionsBody() },
1568
1660
  { path: copilotInstructionsPath(), body: withTeamContext },
1569
1661
  { path: CURSOR_RULES_PATH, body: withTeamContext },
1570
1662
  { path: piInstructionsPath(), body: withTeamContext },
@@ -1875,7 +1967,7 @@ function installCursorHook() {
1875
1967
  replaceManaged("stop", ["backup-cursor"]);
1876
1968
  replaceManaged("subagentStart", ["observe-cursor"]);
1877
1969
  replaceManaged("subagentStop", ["observe-cursor"]);
1878
- replaceManaged("beforeSubmitPrompt", []);
1970
+ replaceManaged("beforeSubmitPrompt", ["prompt-guard-cursor"]);
1879
1971
  replaceManaged("preToolUse", []);
1880
1972
  replaceManaged("postToolUse", ["observe-cursor"]);
1881
1973
  replaceManaged("postToolUseFailure", ["observe-cursor"]);
@@ -1970,13 +2062,16 @@ function ensureCursorCodiedevHooksInstalled() {
1970
2062
  ["postToolUseFailure", "observe-cursor"],
1971
2063
  ["subagentStart", "observe-cursor"],
1972
2064
  ["subagentStop", "observe-cursor"],
2065
+ ["beforeSubmitPrompt", "prompt-guard-cursor"],
1973
2066
  ];
1974
2067
  const hasStaleSecurity = [
1975
2068
  "beforeSubmitPrompt", "preToolUse", "postToolUse", "postToolUseFailure",
1976
2069
  ].some((eventName) => {
1977
2070
  const entries = hooks[eventName];
1978
- return Array.isArray(entries) && entries.some((entry) => (0, detection_1.isCodiedevHookCommand)(entry.command) &&
1979
- !String(entry.command).trim().endsWith("observe-cursor"));
2071
+ return Array.isArray(entries) && entries.some((entry) => {
2072
+ const command = String(entry.command ?? "").trim();
2073
+ return (0, detection_1.isCodiedevHookCommand)(command) && !command.endsWith("observe-cursor") && !command.endsWith("prompt-guard-cursor");
2074
+ });
1980
2075
  });
1981
2076
  if (required.every(([eventName, subcommand]) => has(eventName, subcommand)) && !hasStaleSecurity) {
1982
2077
  return;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "codiedev",
3
- "version": "0.10.0-beta.15",
3
+ "version": "0.10.0-beta.17",
4
4
  "description": "Connect Claude Code, Codex, Cursor, OpenCode, or VS Code Copilot to Codiedev for team session capture and artifact collaboration — and run the governed Codie harness",
5
5
  "bin": {
6
6
  "codiedev": "dist/cli.js",
@@ -63,7 +63,7 @@
63
63
  "@modelcontextprotocol/sdk": "^1.30.0"
64
64
  },
65
65
  "overrides": {
66
- "@hono/node-server": "^2.1.5",
66
+ "@hono/node-server": "^2.1.8",
67
67
  "ip-address": "^10.7.4",
68
68
  "esbuild": "^0.28.1"
69
69
  }
@@ -1,55 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.runAsk = runAsk;
4
- const shared_1 = require("./shared");
5
- function parseArgs(args) {
6
- const question = args
7
- .filter((a) => !a.startsWith("--"))
8
- .join(" ")
9
- .trim();
10
- if (!question) {
11
- console.error('Usage: codiedev ask "<question>"');
12
- console.error('Example: codiedev ask "why did we drop pg-bouncer?"');
13
- process.exit(1);
14
- }
15
- return { question };
16
- }
17
- async function runAsk(args) {
18
- const { question } = parseArgs(args);
19
- const config = (0, shared_1.requireConfig)();
20
- const start = Date.now();
21
- try {
22
- const res = await (0, shared_1.apiRequest)("POST", "/api/cli/ask", {
23
- config,
24
- body: { question },
25
- });
26
- (0, shared_1.recordAgentEvent)(config, {
27
- tool: "codiedev_ask",
28
- ok: true,
29
- latencyMs: Date.now() - start,
30
- });
31
- console.log("");
32
- console.log(res.answer);
33
- if (res.citations.length > 0) {
34
- console.log("");
35
- console.log("Sources:");
36
- for (const c of res.citations) {
37
- const label = c.kind === "artifact"
38
- ? `[${c.type}] ${c.title}`
39
- : `[session] ${c.title}`;
40
- console.log(` • ${label}`);
41
- }
42
- }
43
- console.log("");
44
- }
45
- catch (err) {
46
- (0, shared_1.recordAgentEvent)(config, {
47
- tool: "codiedev_ask",
48
- ok: false,
49
- latencyMs: Date.now() - start,
50
- error: err.message,
51
- });
52
- console.error(`Ask failed: ${err.message}`);
53
- process.exit(1);
54
- }
55
- }