claude-alfred 0.3.13 → 0.3.14

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/cli.mjs CHANGED
@@ -371,7 +371,7 @@ const main = defineCommand({
371
371
  async run() {
372
372
  const { Store } = await import("./store-BffM-bi-.mjs").then((n) => (n.t(), n.r));
373
373
  const { Embedder } = await import("./embedder-D3hJoryD.mjs");
374
- const { serveMCP } = await import("./server-CgPMMrTO.mjs");
374
+ const { serveMCP } = await import("./server-9V6cWIBd.mjs");
375
375
  const store = Store.openDefault();
376
376
  let emb = null;
377
377
  try {
@@ -422,7 +422,7 @@ const main = defineCommand({
422
422
  description: "Event name"
423
423
  } },
424
424
  async run({ args }) {
425
- const { runHook } = await import("./dispatcher-wn96mbEP.mjs").then((n) => (n.i(), n.t));
425
+ const { runHook } = await import("./dispatcher-CLRAWyYx.mjs").then((n) => (n.i(), n.t));
426
426
  await runHook(args.event);
427
427
  }
428
428
  }),
@@ -3,7 +3,7 @@ import { n as __esmMin } from "./chunk-CAm0Jl7e.mjs";
3
3
  import { c as incrementHitCount, f as searchKnowledgeKeyword, i as getKnowledgeByIDs, l as init_knowledge } from "./knowledge-C7rEfFSX.mjs";
4
4
  import { r as vectorSearchKnowledge, t as init_vectors } from "./vectors-DHZGQ096.mjs";
5
5
  import { a as subTypeBoost, i as searchKnowledgeFTS, o as subTypeHalfLife, r as init_fts } from "./fts-DICqcpG_.mjs";
6
- import { i as init_dispatcher, n as emitAdditionalContext } from "./dispatcher-wn96mbEP.mjs";
6
+ import { i as init_dispatcher, n as emitAdditionalContext } from "./dispatcher-CLRAWyYx.mjs";
7
7
  //#region src/mcp/helpers.ts
8
8
  function truncate(s, maxLen) {
9
9
  const runes = [...s];
@@ -89,27 +89,27 @@ async function runHook(event) {
89
89
  }
90
90
  }
91
91
  async function handleSessionStart(ev, signal) {
92
- const { sessionStart } = await import("./session-start-tE5mAVMG.mjs");
92
+ const { sessionStart } = await import("./session-start-_MNVxux-.mjs");
93
93
  await sessionStart(ev, signal);
94
94
  }
95
95
  async function handlePreCompact(ev, signal) {
96
- const { preCompact } = await import("./pre-compact-BlQEQbZP.mjs");
96
+ const { preCompact } = await import("./pre-compact-B7PQb3TM.mjs");
97
97
  await preCompact(ev, signal);
98
98
  }
99
99
  async function handleUserPromptSubmit(ev, signal) {
100
- const { userPromptSubmit } = await import("./user-prompt-DG6scjP0.mjs");
100
+ const { userPromptSubmit } = await import("./user-prompt-CCU3XlOv.mjs");
101
101
  await userPromptSubmit(ev, signal);
102
102
  }
103
103
  async function handlePostToolUse(ev, signal) {
104
- const { postToolUse } = await import("./post-tool-CeSVspjd.mjs");
104
+ const { postToolUse } = await import("./post-tool-CsM0XliT.mjs");
105
105
  await postToolUse(ev, signal);
106
106
  }
107
107
  async function handlePreToolUse(ev, _signal) {
108
- const { preToolUse } = await import("./pre-tool-9mxFQxKH.mjs");
108
+ const { preToolUse } = await import("./pre-tool-ptD5st2b.mjs");
109
109
  await preToolUse(ev);
110
110
  }
111
111
  async function handleStop(ev, _signal) {
112
- const { stop } = await import("./stop-DItumrnH.mjs");
112
+ const { stop } = await import("./stop-_ovIig2U.mjs");
113
113
  await stop(ev);
114
114
  }
115
115
  var init_dispatcher = __esmMin((() => {}));
@@ -5,10 +5,10 @@ import { n as init_audit, t as appendAudit } from "./audit-e13xK9Fr.mjs";
5
5
  import { a as getKnowledgeStats, d as promoteSubType, l as init_knowledge, m as upsertKnowledge, o as getPromotionCandidates, r as getKnowledgeByID } from "./knowledge-C7rEfFSX.mjs";
6
6
  import { i as searchKnowledgeFTS, r as init_fts, t as detectKnowledgeConflicts } from "./fts-DICqcpG_.mjs";
7
7
  import { n as init_project, t as detectProject } from "./project-DCKke4_Q.mjs";
8
- import { a as notifyUser, i as init_dispatcher } from "./dispatcher-wn96mbEP.mjs";
9
- import { a as trackHitCounts, i as searchPipeline, n as init_directives, o as truncate, r as init_helpers, t as emitDirectives } from "./directives-D38Gs3Ld.mjs";
8
+ import { a as notifyUser, i as init_dispatcher } from "./dispatcher-CLRAWyYx.mjs";
9
+ import { a as trackHitCounts, i as searchPipeline, n as init_directives, o as truncate, r as init_helpers, t as emitDirectives } from "./directives-BWPf6KVs.mjs";
10
10
  import { n as openDefaultCached, t as init_store } from "./store-BffM-bi-.mjs";
11
- import { a as writeReviewGate, f as isSpecFilePath, n as init_review_gate, u as init_spec_guard } from "./review-gate-D6pA7CNB.mjs";
11
+ import { a as writeReviewGate, f as isSpecFilePath, n as init_review_gate, u as init_spec_guard } from "./review-gate-BQMnScje.mjs";
12
12
  import { c as readWaveProgress, i as parseWaveProgress, m as writeWaveProgress, n as addWorkedSlug, p as writeStateText, r as init_state, s as readStateText } from "./state-Bw1XMJxp.mjs";
13
13
  import { mkdirSync, renameSync, unlinkSync, writeFileSync } from "node:fs";
14
14
  import { join } from "node:path";
@@ -1,11 +1,11 @@
1
1
  #!/usr/bin/env node
2
2
  import "./types-K2jxpWyU.mjs";
3
3
  import "./audit-e13xK9Fr.mjs";
4
- import "./dispatcher-wn96mbEP.mjs";
5
- import "./directives-D38Gs3Ld.mjs";
6
- import { a as postToolUse, n as init_post_tool } from "./post-tool-sGk0fIBJ.mjs";
4
+ import "./dispatcher-CLRAWyYx.mjs";
5
+ import "./directives-BWPf6KVs.mjs";
6
+ import { a as postToolUse, n as init_post_tool } from "./post-tool-C0hkS1sJ.mjs";
7
7
  import "./store-BffM-bi-.mjs";
8
- import "./review-gate-D6pA7CNB.mjs";
8
+ import "./review-gate-BQMnScje.mjs";
9
9
  import "./state-Bw1XMJxp.mjs";
10
10
  init_post_tool();
11
11
  export { postToolUse };
@@ -5,7 +5,7 @@ import { r as init_epic, s as syncTaskStatus } from "./epic-CfxJ13zy.mjs";
5
5
  import { n as init_audit, t as appendAudit } from "./audit-e13xK9Fr.mjs";
6
6
  import { l as init_knowledge, m as upsertKnowledge } from "./knowledge-C7rEfFSX.mjs";
7
7
  import { n as init_project, t as detectProject } from "./project-DCKke4_Q.mjs";
8
- import { a as notifyUser, i as init_dispatcher } from "./dispatcher-wn96mbEP.mjs";
8
+ import { a as notifyUser, i as init_dispatcher } from "./dispatcher-CLRAWyYx.mjs";
9
9
  import { n as openDefaultCached, t as init_store } from "./store-BffM-bi-.mjs";
10
10
  import { readFileSync, writeFileSync } from "node:fs";
11
11
  import { join } from "node:path";
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import { n as __esmMin } from "./chunk-CAm0Jl7e.mjs";
3
3
  import { a as effectiveStatus, s as init_types } from "./types-K2jxpWyU.mjs";
4
- import { c as denyTool, d as isActiveSpecMalformed, f as isSpecFilePath, n as init_review_gate, p as tryReadActiveSpec, r as isGateActive, u as init_spec_guard } from "./review-gate-D6pA7CNB.mjs";
4
+ import { c as denyTool, d as isActiveSpecMalformed, f as isSpecFilePath, n as init_review_gate, p as tryReadActiveSpec, r as isGateActive, u as init_spec_guard } from "./review-gate-BQMnScje.mjs";
5
5
  import { a as readLastIntent, r as init_state, t as IMPLEMENT_INTENTS } from "./state-Bw1XMJxp.mjs";
6
6
  import { existsSync } from "node:fs";
7
7
  import { join } from "node:path";
@@ -20,11 +20,13 @@ function tryReadActiveSpec(cwd) {
20
20
  /**
21
21
  * Check if _active.md exists but cannot be parsed or has invalid enum values.
22
22
  * Used by PreToolUse to deny edits instead of silently allowing.
23
+ * Returns false when primary is empty (no active spec = valid state).
23
24
  */
24
25
  function isActiveSpecMalformed(cwd) {
25
26
  if (!cwd) return false;
26
27
  if (!existsSync(join(cwd, ".alfred", "specs", "_active.md"))) return false;
27
28
  try {
29
+ if (!readActiveState(cwd).primary) return false;
28
30
  return parseSpecState(cwd) === null;
29
31
  } catch {
30
32
  return true;
@@ -6,11 +6,11 @@ import { n as init_audit, t as appendAudit } from "./audit-e13xK9Fr.mjs";
6
6
  import { i as getKnowledgeByIDs, l as init_knowledge } from "./knowledge-C7rEfFSX.mjs";
7
7
  import { r as vectorSearchKnowledge, t as init_vectors } from "./vectors-DHZGQ096.mjs";
8
8
  import { a as subTypeBoost, i as searchKnowledgeFTS, r as init_fts } from "./fts-DICqcpG_.mjs";
9
- import "./dispatcher-wn96mbEP.mjs";
10
- import { o as truncate, r as init_helpers } from "./directives-D38Gs3Ld.mjs";
11
- import { c as updateTaskStatus, l as handleLedger, n as init_post_tool, o as post_tool_exports, s as init_status, u as init_ledger } from "./post-tool-sGk0fIBJ.mjs";
9
+ import "./dispatcher-CLRAWyYx.mjs";
10
+ import { o as truncate, r as init_helpers } from "./directives-BWPf6KVs.mjs";
11
+ import { c as updateTaskStatus, l as handleLedger, n as init_post_tool, o as post_tool_exports, s as init_status, u as init_ledger } from "./post-tool-C0hkS1sJ.mjs";
12
12
  import "./store-BffM-bi-.mjs";
13
- import { a as writeReviewGate, i as readReviewGate, n as init_review_gate, t as clearReviewGate } from "./review-gate-D6pA7CNB.mjs";
13
+ import { a as writeReviewGate, i as readReviewGate, n as init_review_gate, t as clearReviewGate } from "./review-gate-BQMnScje.mjs";
14
14
  import { c as readWaveProgress, m as writeWaveProgress, r as init_state } from "./state-Bw1XMJxp.mjs";
15
15
  import { existsSync, mkdirSync, readFileSync, readdirSync, rmSync, writeFileSync } from "node:fs";
16
16
  import { join, resolve } from "node:path";
@@ -3,8 +3,8 @@ import { n as __esmMin } from "./chunk-CAm0Jl7e.mjs";
3
3
  import { c as readActive, l as readActiveState, s as init_types, t as SpecDir } from "./types-K2jxpWyU.mjs";
4
4
  import { l as init_knowledge, m as upsertKnowledge, n as deleteOrphanKnowledge, s as getRecentDecisions, t as countKnowledge } from "./knowledge-C7rEfFSX.mjs";
5
5
  import { n as init_project, t as detectProject } from "./project-DCKke4_Q.mjs";
6
- import { a as notifyUser, i as init_dispatcher, r as extractSection } from "./dispatcher-wn96mbEP.mjs";
7
- import { n as init_directives, o as truncate, r as init_helpers, t as emitDirectives } from "./directives-D38Gs3Ld.mjs";
6
+ import { a as notifyUser, i as init_dispatcher, r as extractSection } from "./dispatcher-CLRAWyYx.mjs";
7
+ import { n as init_directives, o as truncate, r as init_helpers, t as emitDirectives } from "./directives-BWPf6KVs.mjs";
8
8
  import { n as openDefaultCached, t as init_store } from "./store-BffM-bi-.mjs";
9
9
  import { r as init_state, u as resetWorkedSlugs } from "./state-Bw1XMJxp.mjs";
10
10
  import { existsSync, readFileSync, readdirSync } from "node:fs";
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import { n as __esmMin } from "./chunk-CAm0Jl7e.mjs";
3
3
  import "./types-K2jxpWyU.mjs";
4
- import { l as hasUncheckedSelfReview, n as init_review_gate, o as blockStop, p as tryReadActiveSpec, r as isGateActive, s as countUncheckedTasks, u as init_spec_guard } from "./review-gate-D6pA7CNB.mjs";
4
+ import { l as hasUncheckedSelfReview, n as init_review_gate, o as blockStop, p as tryReadActiveSpec, r as isGateActive, s as countUncheckedTasks, u as init_spec_guard } from "./review-gate-BQMnScje.mjs";
5
5
  import { l as readWorkedSlugs, r as init_state } from "./state-Bw1XMJxp.mjs";
6
6
  //#region src/hooks/stop.ts
7
7
  /**
@@ -3,8 +3,8 @@ import { n as __esmMin } from "./chunk-CAm0Jl7e.mjs";
3
3
  import { l as readActiveState, s as init_types } from "./types-K2jxpWyU.mjs";
4
4
  import { a as subTypeBoost, r as init_fts } from "./fts-DICqcpG_.mjs";
5
5
  import { Embedder, t as init_embedder } from "./embedder-D3hJoryD.mjs";
6
- import "./dispatcher-wn96mbEP.mjs";
7
- import { a as trackHitCounts, i as searchPipeline, n as init_directives, o as truncate, r as init_helpers, t as emitDirectives } from "./directives-D38Gs3Ld.mjs";
6
+ import "./dispatcher-CLRAWyYx.mjs";
7
+ import { a as trackHitCounts, i as searchPipeline, n as init_directives, o as truncate, r as init_helpers, t as emitDirectives } from "./directives-BWPf6KVs.mjs";
8
8
  import { n as openDefaultCached, t as init_store } from "./store-BffM-bi-.mjs";
9
9
  import { d as writeLastIntent, f as writeStateJSON, l as readWorkedSlugs, o as readStateJSON, r as init_state, t as IMPLEMENT_INTENTS } from "./state-Bw1XMJxp.mjs";
10
10
  import { existsSync } from "node:fs";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "claude-alfred",
3
- "version": "0.3.13",
3
+ "version": "0.3.14",
4
4
  "type": "module",
5
5
  "bin": {
6
6
  "alfred": "dist/cli.mjs"