@pathmode/mcp-server 1.4.3 → 1.4.5

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/README.md CHANGED
@@ -6,7 +6,7 @@ No signup. No API key. Just add the MCP server and start talking.
6
6
 
7
7
  ## Intent Compiler
8
8
 
9
- The Intent Compiler turns Claude Code into a Socratic product thinking partner. Describe a problem, paste a support ticket, or explain what's broken — Claude challenges vague thinking, asks pointed questions, and builds a structured spec.
9
+ The Intent Compiler turns Claude Code into a Socratic product thinking partner. Describe a problem, paste a support ticket, or explain what's broken — Claude challenges vague thinking, asks pointed questions, runs live quality checks on weak fields, and builds a structured spec.
10
10
 
11
11
  ```
12
12
  > Help me write an intent spec for our checkout flow
@@ -257,7 +257,7 @@ Full privacy policy: [pathmode.io/privacy](https://pathmode.io/privacy)
257
257
  ## Links
258
258
 
259
259
  - [Intent Compiler page](https://pathmode.io/intent-compiler) — Overview and setup guide
260
- - [Try in browser](https://pathmode.io/sandbox) — Interactive sandbox, no install needed
260
+ - [Intent Compiler](https://pathmode.io/intent-compiler) — Interactive setup and product overview
261
261
  - [Pathmode](https://pathmode.io) — Full platform for teams
262
262
  - [Issues](https://github.com/pathmodeio/mcp-server/issues)
263
263
 
@@ -7,20 +7,27 @@ export interface PathmodeConfig {
7
7
  apiUrl: string;
8
8
  workspaceId: string;
9
9
  }
10
+ export interface ApiStructuredOutcome {
11
+ id: string;
12
+ text: string;
13
+ priority?: 'must' | 'should' | 'could';
14
+ }
10
15
  export interface ApiIntent {
11
16
  id: string;
12
17
  workspaceId: string;
13
18
  productId?: string;
14
- journeyId?: string;
15
- stageId?: string;
16
19
  stageName?: string;
17
20
  status: string;
18
21
  version: number;
19
22
  objective: string;
20
23
  problemSeverity?: string;
21
24
  title: string;
22
- outcomes: string[];
25
+ outcomes: ApiStructuredOutcome[];
23
26
  healthMetrics: string[];
27
+ scope?: {
28
+ inScope?: string[];
29
+ outOfScope?: string[];
30
+ };
24
31
  strategicAlignment?: string;
25
32
  alignmentNotes?: string;
26
33
  context: Record<string, any>;
@@ -47,7 +54,10 @@ export interface CreateIntentInput {
47
54
  title: string;
48
55
  objective: string;
49
56
  productId: string;
50
- outcomes?: string[];
57
+ outcomes?: (string | {
58
+ text: string;
59
+ priority?: string;
60
+ })[];
51
61
  constraints?: string[];
52
62
  healthMetrics?: string[];
53
63
  edgeCases?: {
@@ -60,11 +70,18 @@ export interface CreateIntentInput {
60
70
  e2eTests?: string[];
61
71
  };
62
72
  problemSeverity?: string;
73
+ scope?: {
74
+ inScope?: string[];
75
+ outOfScope?: string[];
76
+ };
63
77
  }
64
78
  export interface UpdateIntentInput {
65
79
  title?: string;
66
80
  objective?: string;
67
- outcomes?: string[];
81
+ outcomes?: (string | {
82
+ text: string;
83
+ priority?: string;
84
+ })[];
68
85
  constraints?: string[];
69
86
  healthMetrics?: string[];
70
87
  edgeCases?: {
@@ -78,6 +95,10 @@ export interface UpdateIntentInput {
78
95
  };
79
96
  problemSeverity?: string;
80
97
  evidenceAnchors?: Record<string, string[]>;
98
+ scope?: {
99
+ inScope?: string[];
100
+ outOfScope?: string[];
101
+ };
81
102
  }
82
103
  export interface EvidenceQuery {
83
104
  productId?: string;
@@ -1 +1 @@
1
- {"version":3,"file":"","sourceRoot":"","sources":["file:///Users/jannelammi/code/Pathmode/packages/mcp-server/src/api-client.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAMH,MAAM,WAAW,cAAc;IAC3B,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;IACf,WAAW,EAAE,MAAM,CAAC;CACvB;AAED,MAAM,WAAW,SAAS;IACtB,EAAE,EAAE,MAAM,CAAC;IACX,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB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
package/dist/index.js CHANGED
@@ -33531,6 +33531,7 @@ exports.loadConfig = loadConfig;
33531
33531
  const fs_1 = __importDefault(__nccwpck_require__(9896));
33532
33532
  const path_1 = __importDefault(__nccwpck_require__(6928));
33533
33533
  const os_1 = __importDefault(__nccwpck_require__(857));
33534
+ const isDebug = process.env.PATHMODE_MCP_DEBUG === '1';
33534
33535
  const CONFIG_DIR = path_1.default.join(os_1.default.homedir(), '.pathmode');
33535
33536
  const CONFIG_FILE = path_1.default.join(CONFIG_DIR, 'config.json');
33536
33537
  function loadConfig() {
@@ -33563,7 +33564,8 @@ class PathmodeClient {
33563
33564
  }
33564
33565
  async fetch(path, options = {}) {
33565
33566
  const url = `${this.apiUrl}/api/v1${path}`;
33566
- console.error(`[pathmode-mcp] fetch: ${url}, key prefix: ${this.apiKey.substring(0, 16)}`);
33567
+ if (isDebug)
33568
+ console.error(`[pathmode-mcp] fetch: ${url}`);
33567
33569
  const response = await fetch(url, {
33568
33570
  ...options,
33569
33571
  headers: {
@@ -33574,7 +33576,7 @@ class PathmodeClient {
33574
33576
  });
33575
33577
  if (!response.ok) {
33576
33578
  const body = await response.json().catch(() => ({ error: response.statusText }));
33577
- console.error(`[pathmode-mcp] ${response.status}: ${JSON.stringify(body)}, key length: ${this.apiKey.length}`);
33579
+ console.error(`[pathmode-mcp] API error ${response.status}: ${body.error || response.statusText}`);
33578
33580
  throw new Error(`API error (${response.status}): ${body.error || response.statusText}`);
33579
33581
  }
33580
33582
  return response;
@@ -33700,6 +33702,54 @@ exports.getCompileIntentPrompt = getCompileIntentPrompt;
33700
33702
  exports.formatIntentMd = formatIntentMd;
33701
33703
  exports.formatCursorRules = formatCursorRules;
33702
33704
  exports.formatClaudeMdSection = formatClaudeMdSection;
33705
+ /** Extract text from a string or structured outcome. */
33706
+ function getOutcomeText(o) {
33707
+ return typeof o === 'string' ? o : o.text;
33708
+ }
33709
+ /** Get priority label prefix for an outcome. */
33710
+ function getPriorityLabel(o) {
33711
+ if (typeof o === 'string' || !o.priority)
33712
+ return '';
33713
+ return `[${o.priority.toUpperCase()}] `;
33714
+ }
33715
+ function getLiveQualityCheckPromptBlock() {
33716
+ return `LIVE QUALITY CHECKS:
33717
+ - After EVERY meaningful user answer, silently update your current draft and run a quality pass before asking the next question.
33718
+ - Do NOT dump the full rubric every turn. Surface only the single most important failing check right now.
33719
+ - State the issue plainly, then ask ONE pointed follow-up question that resolves that weakness.
33720
+
33721
+ QUALITY RUBRIC:
33722
+ 1. Objective quality
33723
+ - Reject vague words like "improve", "better", "enhance", "optimize", "streamline".
33724
+ - Reject objectives that are too broad, too short, or missing who is affected and why it matters.
33725
+ - If the same objective could describe five different projects, it is still vague.
33726
+
33727
+ 2. Outcome quality
33728
+ - Outcomes must be observable state changes, not implementation steps or task lists.
33729
+ - Push back on outcomes like "add a dashboard", "build retry logic", "create a modal", "improve UX".
33730
+ - Prefer outcomes like "Users see retry guidance within 5 seconds of failure".
33731
+
33732
+ 3. Testability
33733
+ - If an outcome cannot be checked by a test, metric, or concrete manual observation, it is not ready.
33734
+ - Push toward measurable language: percentages, timing thresholds, binary states, visible user actions, or explicit system behavior.
33735
+
33736
+ 4. Objective/outcome consistency
33737
+ - Check whether the proposed outcomes actually prove the objective is solved.
33738
+ - Call out mismatches directly: "The objective is about speed, but the outcomes only mention clarity."
33739
+
33740
+ 5. Edge-case coverage
33741
+ - Before the spec is ready, require at least one embarrassing failure mode, boundary condition, timeout, empty state, permission issue, or concurrency issue.
33742
+
33743
+ 6. Verification quality
33744
+ - As soon as an outcome becomes clear, ask what evidence would prove it worked.
33745
+ - Verification can be a test, a metric, or a manual check, but it must be concrete.
33746
+
33747
+ EXAMPLES OF HOW TO SURFACE A FAILING CHECK:
33748
+ - "Quality check: the objective is still vague. It says improve, but not what breaks today."
33749
+ - "Quality check: that outcome is an implementation step, not a user-visible result."
33750
+ - "Quality check: your outcomes don't yet prove the problem is solved."
33751
+ - "Quality check: we still have no failure mode, so this spec is not ready yet."`;
33752
+ }
33703
33753
  // ============================================================
33704
33754
  // Compile Intent Prompt
33705
33755
  // ============================================================
@@ -33708,47 +33758,44 @@ exports.formatClaudeMdSection = formatClaudeMdSection;
33708
33758
  * Adapted from intentDesignerMachine.ts conversationFirstPreamble for terminal use.
33709
33759
  */
33710
33760
  function getCompileIntentPrompt() {
33711
- return `You are a sharp product thinking partner. Your job is to help the user build a structured intent spec through conversation — challenging their thinking until the intent is so clear it's almost obvious what to build.
33761
+ return `You are a sharp product thinking partner. Your job is to help the user build a structured intent spec through conversation — challenging their thinking until the intent is so clear it's almost obvious what to build. Your overarching goal is to actively prevent a spec from feeling complete before it is operationally sharp.
33712
33762
 
33713
33763
  RULES:
33714
- - Push back on vague language. If the user says "improve the experience", ask: "What specific moment is broken? What would the user see differently?"
33715
33764
  - Ask ONE pointed question at a time. Never list 3 questions.
33716
- - When the user gives a clear answer, propose how you'd write that as a spec field. Explain WHY you worded it that way.
33717
- - Look for inconsistencies between what they say the problem is and what outcomes they propose.
33718
33765
  - Be direct and concise. No pleasantries. No "Great question!" or "That's a good point!"
33719
- - When the spec has existing content, critique it before adding more. Quality over quantity.
33766
+ - Push back on vague language. If the user says "improve the experience", ask: "What specific moment is broken? What would the user see differently?"
33767
+ - CONTRADICTION DETECTION: Actively hunt for inconsistencies. Examples: "Your objective says speed, but your outcomes only mention visibility" or "You want no extra steps, but your constraint adds mandatory confirmation." Call them out bluntly.
33768
+
33769
+ ${getLiveQualityCheckPromptBlock()}
33770
+
33771
+ EVIDENCE-FIRST GROUNDING:
33772
+ - Begin by asking for ONE concrete artifact: a direct user quote, a specific drop-off metric, a support ticket, or an observed failure. Reduce "cleanly written but weakly justified" specs by forcing reality early.
33773
+
33774
+ EARLIER VERIFICATION BACK-CHAINING:
33775
+ - Do not wait until the end to figure out verification.
33776
+ - The moment the user proposes an outcome, back-chain perfectly: "If we achieve that outcome, exactly how will we know it worked? What test or metric proves it?" Outcomes and verification must be paired immediately.
33720
33777
 
33721
- VOICE:
33722
- - Short sentences. Direct. Like a smart colleague, not a consultant.
33723
- - Use concrete examples when challenging: "When you say 'faster', do you mean 2 seconds or 20 seconds?"
33724
- - When you write spec fields, use precise language. No filler words.
33778
+ VISIBLE COMPLETENESS STATE:
33779
+ Once the conversation is underway, append a small checklist at the bottom of your messages to keep the state explicit. Do not mark an item complete until it genuinely meets a high quality bar.
33780
+
33781
+ STATUS:
33782
+ [ ] Objective clear enough (and backed by evidence)
33783
+ [ ] At least 2 testable outcomes
33784
+ [ ] At least 1 failure mode (edge case)
33785
+ [ ] Scope boundaries named (constraints / out of scope)
33786
+ [ ] Verification present or explicitly deferred
33725
33787
 
33726
33788
  CONVERSATION FLOW (guidance, not rigid steps):
33727
- 1. **Problem** — What's broken? What's the pain? What happens today that shouldn't?
33728
- 2. **Goal** — What specific user outcome would solve this? Make it concrete and singular.
33729
- 3. **Outcomes** — Observable, testable state changes. Not activities, not implementations.
33730
- 4. **Edge Cases** — What's the most embarrassing way this could fail in a demo?
33731
- 5. **Review** — Play devil's advocate. What's missing? What would you cut?
33732
-
33733
- You are NOT bound by this order. Follow the user's thinking wherever it goes. If they start with edge cases, work backwards to the objective.
33734
-
33735
- BUILDING THE SPEC:
33736
- As the conversation progresses, keep a mental model of the spec fields:
33737
- - **Title**: Short name for the intent (what is this?)
33738
- - **Objective**: Why this matters — the problem and who has it
33739
- - **Outcomes**: 2-5 observable, testable results (not activities)
33740
- - **Constraints**: Hard limits the implementation must respect
33741
- - **Edge Cases**: Scenario + expected behavior pairs
33742
- - **Health Metrics**: What to monitor after shipping (optional)
33743
- - **Verification**: How to confirm it actually works (optional)
33789
+ 1. **Evidence & Problem** — Ground the intent in a real artifact. What's broken?
33790
+ 2. **Objective** — What specific user outcome solves this pain? Make it concrete.
33791
+ 3. **Outcomes & Verification** — Observable state changes. Instantly back-chain to verification.
33792
+ 4. **Scope & Constraints** — What are the hard boundaries?
33793
+ 5. **Edge Cases** — What's the worst way this could fail?
33744
33794
 
33745
33795
  When you have enough clarity on ANY field, state it clearly:
33746
- > **Proposed Objective**: "Reduce failed deliveries in multi-unit buildings from 23% to under 5% by fixing address resolution at the driver app level."
33747
-
33748
- Then ask if that captures it or needs refinement.
33796
+ > **Proposed Objective**: "Reduce checkout drop-off by 15% by showing upfront shipping costs."
33749
33797
 
33750
- WHEN THE SPEC FEELS READY:
33751
- Once you have at minimum a title, objective, and 2+ outcomes:
33798
+ WHEN THE SPEC FEELS READY AND ALL STATUS ITEMS ARE [X]:
33752
33799
  1. Present the full spec as a summary for the user to review
33753
33800
  2. Ask if they want to save it
33754
33801
  3. When confirmed, call the \`intent_save\` tool with the complete spec
@@ -33756,6 +33803,8 @@ Once you have at minimum a title, objective, and 2+ outcomes:
33756
33803
  5. Mention: "For dependency tracking, team collaboration, and governance, connect this to Pathmode at pathmode.io"
33757
33804
 
33758
33805
  IMPORTANT:
33806
+ - Do not switch into passive note-taking. Use the quality checks continuously while the spec is still forming.
33807
+ - If a field fails a quality check, challenge it before moving on.
33759
33808
  - The spec fields in \`intent_save\` must use this exact structure:
33760
33809
  - title: string
33761
33810
  - objective: string
@@ -33763,9 +33812,10 @@ IMPORTANT:
33763
33812
  - constraints: string[] (optional)
33764
33813
  - edgeCases: { scenario: string, expectedBehavior: string }[] (optional)
33765
33814
  - healthMetrics: string[] (optional)
33815
+ - scope: { inScope?: string[], outOfScope?: string[] } (optional)
33766
33816
  - verification: { manualChecks?: string[], unitTests?: string[], e2eTests?: string[] } (optional)
33767
33817
 
33768
- Now, ask the user what they're working on. If they've already described something, dig into it.`;
33818
+ Now, start the conversation. If they haven't provided one yet, ask for the concrete evidence (quote, metric, or ticket) driving this work.`;
33769
33819
  }
33770
33820
  // ============================================================
33771
33821
  // Format: intent.md
@@ -33801,7 +33851,21 @@ function formatIntentMd(spec) {
33801
33851
  sections.push('');
33802
33852
  sections.push('## Outcomes');
33803
33853
  for (const outcome of spec.outcomes) {
33804
- sections.push(`- [ ] ${outcome}`);
33854
+ sections.push(`- [ ] ${getPriorityLabel(outcome)}${getOutcomeText(outcome)}`);
33855
+ }
33856
+ }
33857
+ if (spec.scope?.inScope?.length || spec.scope?.outOfScope?.length) {
33858
+ sections.push('');
33859
+ sections.push('## Scope');
33860
+ if (spec.scope.inScope?.length) {
33861
+ sections.push('**In scope:**');
33862
+ for (const s of spec.scope.inScope)
33863
+ sections.push(`- ${s}`);
33864
+ }
33865
+ if (spec.scope.outOfScope?.length) {
33866
+ sections.push('**Out of scope:**');
33867
+ for (const s of spec.scope.outOfScope)
33868
+ sections.push(`- ${s}`);
33805
33869
  }
33806
33870
  }
33807
33871
  if (spec.constraints?.length) {
@@ -33877,7 +33941,21 @@ function formatCursorRules(spec) {
33877
33941
  sections.push('# SUCCESS OUTCOMES');
33878
33942
  sections.push('Your implementation MUST satisfy ALL of these:');
33879
33943
  for (const outcome of spec.outcomes) {
33880
- sections.push(`- ${outcome}`);
33944
+ sections.push(`- ${getPriorityLabel(outcome)}${getOutcomeText(outcome)}`);
33945
+ }
33946
+ }
33947
+ if (spec.scope?.inScope?.length || spec.scope?.outOfScope?.length) {
33948
+ sections.push('');
33949
+ sections.push('# SCOPE');
33950
+ if (spec.scope.inScope?.length) {
33951
+ sections.push('IN SCOPE (you may modify):');
33952
+ for (const s of spec.scope.inScope)
33953
+ sections.push(`- ${s}`);
33954
+ }
33955
+ if (spec.scope.outOfScope?.length) {
33956
+ sections.push('OUT OF SCOPE (do NOT touch):');
33957
+ for (const s of spec.scope.outOfScope)
33958
+ sections.push(`- ${s}`);
33881
33959
  }
33882
33960
  }
33883
33961
  if (spec.constraints?.length) {
@@ -33950,7 +34028,19 @@ function formatClaudeMdSection(spec) {
33950
34028
  }
33951
34029
  if (spec.outcomes?.length) {
33952
34030
  sections.push('**Outcomes**:');
33953
- sections.push(spec.outcomes.map(o => `- [ ] ${o}`).join('\n'));
34031
+ sections.push(spec.outcomes.map(o => `- [ ] ${getPriorityLabel(o)}${getOutcomeText(o)}`).join('\n'));
34032
+ }
34033
+ if (spec.scope?.inScope?.length || spec.scope?.outOfScope?.length) {
34034
+ const scopeParts = ['**Scope**:'];
34035
+ if (spec.scope?.inScope?.length) {
34036
+ scopeParts.push('In scope:');
34037
+ scopeParts.push(...spec.scope.inScope.map(s => `- ${s}`));
34038
+ }
34039
+ if (spec.scope?.outOfScope?.length) {
34040
+ scopeParts.push('Out of scope:');
34041
+ scopeParts.push(...spec.scope.outOfScope.map(s => `- ${s}`));
34042
+ }
34043
+ sections.push(scopeParts.join('\n'));
33954
34044
  }
33955
34045
  if (spec.constraints?.length) {
33956
34046
  sections.push('**Constraints**:');
@@ -34024,6 +34114,14 @@ function readIntentFile(filePath) {
34024
34114
  const constraints = extractListSection(body, 'Constraints');
34025
34115
  const healthMetrics = extractListSection(body, 'Health Metrics');
34026
34116
  const edgeCases = extractEdgeCases(body);
34117
+ const scope = extractScope(body);
34118
+ const parsedVerification = extractVerification(body);
34119
+ const frontmatterVerification = data.verification && typeof data.verification === 'object'
34120
+ ? data.verification
34121
+ : null;
34122
+ const verification = Object.keys(parsedVerification).length > 0
34123
+ ? parsedVerification
34124
+ : (frontmatterVerification || {});
34027
34125
  return {
34028
34126
  id: data.id || path_1.default.basename(filePath, '.md'),
34029
34127
  status: data.status || 'draft',
@@ -34036,7 +34134,8 @@ function readIntentFile(filePath) {
34036
34134
  constraints,
34037
34135
  edgeCases,
34038
34136
  healthMetrics,
34039
- verification: data.verification || {},
34137
+ scope: scope || undefined,
34138
+ verification,
34040
34139
  source: 'local',
34041
34140
  };
34042
34141
  }
@@ -34090,6 +34189,72 @@ function extractEdgeCases(body) {
34090
34189
  }
34091
34190
  return cases;
34092
34191
  }
34192
+ /**
34193
+ * Extract Scope section with **In scope:** and **Out of scope:** sub-lists.
34194
+ * Matches the format emitted by formatIntentMd().
34195
+ */
34196
+ function extractScope(body) {
34197
+ const section = extractSection(body, 'Scope');
34198
+ if (!section)
34199
+ return null;
34200
+ const inScope = [];
34201
+ const outOfScope = [];
34202
+ let target = null;
34203
+ for (const line of section.split('\n')) {
34204
+ if (/^\*\*In scope[:\*]*/.test(line.trim())) {
34205
+ target = inScope;
34206
+ continue;
34207
+ }
34208
+ if (/^\*\*Out of scope[:\*]*/.test(line.trim())) {
34209
+ target = outOfScope;
34210
+ continue;
34211
+ }
34212
+ if (target && line.match(/^[-*]\s/)) {
34213
+ target.push(line.replace(/^[-*]\s+/, '').trim());
34214
+ }
34215
+ }
34216
+ if (inScope.length === 0 && outOfScope.length === 0)
34217
+ return null;
34218
+ const result = {};
34219
+ if (inScope.length > 0)
34220
+ result.inScope = inScope;
34221
+ if (outOfScope.length > 0)
34222
+ result.outOfScope = outOfScope;
34223
+ return result;
34224
+ }
34225
+ /**
34226
+ * Extract Verification section with **E2E Tests**, **Unit Tests**, **Manual Checks** sub-lists.
34227
+ * Matches the format emitted by formatIntentMd().
34228
+ */
34229
+ function extractVerification(body) {
34230
+ const section = extractSection(body, 'Verification');
34231
+ if (!section)
34232
+ return {};
34233
+ const result = {};
34234
+ let currentKey = null;
34235
+ for (const line of section.split('\n')) {
34236
+ const trimmed = line.trim();
34237
+ if (/^\*\*E2E Tests?\*?\*?:?/.test(trimmed)) {
34238
+ currentKey = 'e2eTests';
34239
+ result[currentKey] = [];
34240
+ continue;
34241
+ }
34242
+ if (/^\*\*Unit Tests?\*?\*?:?/.test(trimmed)) {
34243
+ currentKey = 'unitTests';
34244
+ result[currentKey] = [];
34245
+ continue;
34246
+ }
34247
+ if (/^\*\*Manual Checks?\*?\*?:?/.test(trimmed)) {
34248
+ currentKey = 'manualChecks';
34249
+ result[currentKey] = [];
34250
+ continue;
34251
+ }
34252
+ if (currentKey && trimmed.match(/^[-*]\s/)) {
34253
+ result[currentKey].push(trimmed.replace(/^[-*]\s+(\[.\]\s+)?/, '').trim());
34254
+ }
34255
+ }
34256
+ return result;
34257
+ }
34093
34258
 
34094
34259
 
34095
34260
  /***/ }),
@@ -64018,9 +64183,12 @@ function startMcpServer() {
64018
64183
  // ─── MCP Server ───────────────────────────────────────────────
64019
64184
  const isLocalMode = process.argv.includes('--local');
64020
64185
  let client = null;
64186
+ const isDebug = process.env.PATHMODE_MCP_DEBUG === '1';
64021
64187
  if (!isLocalMode) {
64022
64188
  const config = (0, api_client_1.loadConfig)();
64023
- console.error(`[pathmode-mcp] API key present: ${!!config?.apiKey}, prefix: ${config?.apiKey?.substring(0, 16) || 'none'}, url: ${config?.apiUrl || 'none'}`);
64189
+ if (isDebug) {
64190
+ console.error(`[pathmode-mcp] API key present: ${!!config?.apiKey}, url: ${config?.apiUrl || 'none'}`);
64191
+ }
64024
64192
  if (config) {
64025
64193
  client = new api_client_1.PathmodeClient(config);
64026
64194
  }
@@ -64031,11 +64199,24 @@ function startMcpServer() {
64031
64199
  // ============================================================
64032
64200
  const server = new mcp_js_1.McpServer({
64033
64201
  name: 'pathmode',
64034
- version: '1.3.0',
64202
+ version: '1.4.4',
64035
64203
  });
64036
64204
  // Annotation presets
64037
64205
  const READ_ONLY = { readOnlyHint: true, openWorldHint: true };
64038
64206
  const WRITE_OP = { readOnlyHint: false, destructiveHint: false, openWorldHint: true };
64207
+ // Cloud-mode guard — returns a clean error instead of crashing on client!
64208
+ const CLOUD_REQUIRED_MSG = 'This tool requires a Pathmode API key. Run `npx @pathmode/mcp-server setup pm_live_xxx` to connect, or set the PATHMODE_API_KEY environment variable.';
64209
+ function requireCloudClient() {
64210
+ if (!client)
64211
+ throw new CloudClientError();
64212
+ return client;
64213
+ }
64214
+ class CloudClientError extends Error {
64215
+ constructor() { super(CLOUD_REQUIRED_MSG); this.name = 'CloudClientError'; }
64216
+ }
64217
+ // Note: The MCP SDK catches errors thrown in tool handlers and returns them as
64218
+ // error text results. CloudClientError thrown by requireCloudClient() will
64219
+ // surface its message to the client without crashing the server.
64039
64220
  // ============================================================
64040
64221
  // Tools — Read Operations
64041
64222
  // ============================================================
@@ -64054,9 +64235,10 @@ function startMcpServer() {
64054
64235
  }
64055
64236
  return { content: [{ type: 'text', text: JSON.stringify(current, null, 2) }] };
64056
64237
  }
64057
- const intents = await client.listIntents(status || 'approved');
64238
+ const cloud = requireCloudClient();
64239
+ const intents = await cloud.listIntents(status || 'approved');
64058
64240
  if (intents.length === 0) {
64059
- const allIntents = await client.listIntents();
64241
+ const allIntents = await cloud.listIntents();
64060
64242
  if (allIntents.length === 0) {
64061
64243
  return { content: [{ type: 'text', text: 'No intents found in workspace.' }] };
64062
64244
  }
@@ -64080,7 +64262,8 @@ function startMcpServer() {
64080
64262
  }]
64081
64263
  };
64082
64264
  }
64083
- const intents = await client.listIntents(status);
64265
+ const cloud = requireCloudClient();
64266
+ const intents = await cloud.listIntents(status);
64084
64267
  return {
64085
64268
  content: [{
64086
64269
  type: 'text',
@@ -64103,7 +64286,7 @@ function startMcpServer() {
64103
64286
  return { content: [{ type: 'text', text: JSON.stringify(intent, null, 2) }] };
64104
64287
  }
64105
64288
  try {
64106
- const intent = await client.getIntent(intentId);
64289
+ const intent = await requireCloudClient().getIntent(intentId);
64107
64290
  return { content: [{ type: 'text', text: JSON.stringify(intent, null, 2) }] };
64108
64291
  }
64109
64292
  catch (e) {
@@ -64119,7 +64302,7 @@ function startMcpServer() {
64119
64302
  if (isLocalMode) {
64120
64303
  return { content: [{ type: 'text', text: 'Relations are not available in local mode.' }] };
64121
64304
  }
64122
- const intent = await client.getIntent(intentId);
64305
+ const intent = await requireCloudClient().getIntent(intentId);
64123
64306
  return {
64124
64307
  content: [{
64125
64308
  type: 'text',
@@ -64144,16 +64327,16 @@ function startMcpServer() {
64144
64327
  const intents = (0, local_reader_1.readLocalIntents)();
64145
64328
  const q = query.toLowerCase();
64146
64329
  const matches = intents.filter(i => {
64147
- const text = [i.title, i.objective, ...i.outcomes, ...i.constraints].join(' ').toLowerCase();
64330
+ const text = [i.title, i.objective, ...i.outcomes.map((o) => typeof o === 'string' ? o : o.text), ...i.constraints].join(' ').toLowerCase();
64148
64331
  return text.includes(q) && (!status || i.status === status);
64149
64332
  });
64150
64333
  return { content: [{ type: 'text', text: JSON.stringify({ results: matches, count: matches.length, query }, null, 2) }] };
64151
64334
  }
64152
64335
  try {
64153
- const intents = await client.listIntents(status);
64336
+ const intents = await requireCloudClient().listIntents(status);
64154
64337
  const q = query.toLowerCase();
64155
64338
  const matches = intents.filter(i => {
64156
- const text = [i.title, i.objective, ...(i.outcomes || []), ...(i.constraints || [])].join(' ').toLowerCase();
64339
+ const text = [i.title, i.objective, ...(i.outcomes || []).map((o) => typeof o === 'string' ? o : o.text), ...(i.constraints || [])].join(' ').toLowerCase();
64157
64340
  return text.includes(q);
64158
64341
  });
64159
64342
  const results = matches.map(i => ({
@@ -64182,7 +64365,7 @@ function startMcpServer() {
64182
64365
  return { content: [{ type: 'text', text: 'Graph analysis requires cloud mode.' }] };
64183
64366
  }
64184
64367
  try {
64185
- const intents = await client.listIntents();
64368
+ const intents = await requireCloudClient().listIntents();
64186
64369
  if (intents.length === 0) {
64187
64370
  return { content: [{ type: 'text', text: 'No intents found in workspace.' }] };
64188
64371
  }
@@ -64210,7 +64393,7 @@ function startMcpServer() {
64210
64393
  }
64211
64394
  }
64212
64395
  }
64213
- // Detect cycles
64396
+ // Detect cycles (iterative DFS with neighbor iterators)
64214
64397
  const WHITE = 0, GRAY = 1, BLACK = 2;
64215
64398
  const color = new Map();
64216
64399
  const parent = new Map();
@@ -64220,31 +64403,36 @@ function startMcpServer() {
64220
64403
  for (const startId of forward.keys()) {
64221
64404
  if (color.get(startId) !== WHITE)
64222
64405
  continue;
64223
- const stack = [startId];
64406
+ // Each stack frame: [nodeId, iterator over its neighbors]
64407
+ const stack = [];
64408
+ color.set(startId, GRAY);
64224
64409
  parent.set(startId, null);
64410
+ stack.push([startId, (forward.get(startId) || new Set()).values()]);
64225
64411
  while (stack.length > 0) {
64226
- const id = stack[stack.length - 1];
64227
- if (color.get(id) === WHITE) {
64228
- color.set(id, GRAY);
64229
- for (const dep of forward.get(id) || new Set()) {
64230
- if (color.get(dep) === WHITE) {
64231
- parent.set(dep, id);
64232
- stack.push(dep);
64233
- }
64234
- else if (color.get(dep) === GRAY) {
64235
- const cycle = [dep];
64236
- let cur = id;
64237
- while (cur !== dep) {
64238
- cycle.push(cur);
64239
- cur = parent.get(cur);
64240
- }
64241
- cycle.push(dep);
64242
- cycle.reverse();
64243
- cycles.push(cycle);
64412
+ const [id, iter] = stack[stack.length - 1];
64413
+ const next = iter.next();
64414
+ if (!next.done) {
64415
+ const dep = next.value;
64416
+ if (color.get(dep) === WHITE) {
64417
+ color.set(dep, GRAY);
64418
+ parent.set(dep, id);
64419
+ stack.push([dep, (forward.get(dep) || new Set()).values()]);
64420
+ }
64421
+ else if (color.get(dep) === GRAY) {
64422
+ // Back edge — extract cycle from parent chain
64423
+ const cycle = [dep];
64424
+ let cur = id;
64425
+ while (cur !== dep) {
64426
+ cycle.push(cur);
64427
+ cur = parent.get(cur);
64244
64428
  }
64429
+ cycle.push(dep);
64430
+ cycle.reverse();
64431
+ cycles.push(cycle);
64245
64432
  }
64246
64433
  }
64247
64434
  else {
64435
+ // All neighbors explored — mark finished
64248
64436
  color.set(id, BLACK);
64249
64437
  stack.pop();
64250
64438
  }
@@ -64366,7 +64554,7 @@ function startMcpServer() {
64366
64554
  return { content: [{ type: 'text', text: 'Export requires cloud mode. Use PATHMODE_API_KEY to connect.' }] };
64367
64555
  }
64368
64556
  try {
64369
- const content = await client.exportContext(format, intentId, productId);
64557
+ const content = await requireCloudClient().exportContext(format, intentId, productId);
64370
64558
  return { content: [{ type: 'text', text: content }] };
64371
64559
  }
64372
64560
  catch (e) {
@@ -64385,7 +64573,7 @@ function startMcpServer() {
64385
64573
  if (isLocalMode) {
64386
64574
  return { content: [{ type: 'text', text: 'Agent prompts require cloud mode for full context generation.' }] };
64387
64575
  }
64388
- const result = await client.getIntentPrompt(intentId, 'claude-code', mode || 'execute');
64576
+ const result = await requireCloudClient().getIntentPrompt(intentId, 'claude-code', mode || 'execute');
64389
64577
  return {
64390
64578
  content: [{
64391
64579
  type: 'text',
@@ -64401,7 +64589,7 @@ function startMcpServer() {
64401
64589
  if (isLocalMode) {
64402
64590
  return { content: [{ type: 'text', text: 'Workspace details are not available in local mode.' }] };
64403
64591
  }
64404
- const workspace = await client.getWorkspace();
64592
+ const workspace = await requireCloudClient().getWorkspace();
64405
64593
  return {
64406
64594
  content: [{
64407
64595
  type: 'text',
@@ -64417,7 +64605,7 @@ function startMcpServer() {
64417
64605
  if (isLocalMode) {
64418
64606
  return { content: [{ type: 'text', text: 'Constitution rules are not available in local mode.' }] };
64419
64607
  }
64420
- const result = await client.getConstitution();
64608
+ const result = await requireCloudClient().getConstitution();
64421
64609
  return {
64422
64610
  content: [{
64423
64611
  type: 'text',
@@ -64440,7 +64628,7 @@ function startMcpServer() {
64440
64628
  if (isLocalMode) {
64441
64629
  return { content: [{ type: 'text', text: 'Status updates are not available in local mode. Use cloud mode.' }] };
64442
64630
  }
64443
- const result = await client.updateIntentStatus(intentId, status);
64631
+ const result = await requireCloudClient().updateIntentStatus(intentId, status);
64444
64632
  let responseText = `Intent ${intentId} status updated to "${status}".`;
64445
64633
  // Surface verification checklist for shipped/verified transitions
64446
64634
  if (result.verificationChecklist && result.verificationChecklist.length > 0) {
@@ -64469,7 +64657,7 @@ function startMcpServer() {
64469
64657
  if (isLocalMode) {
64470
64658
  return { content: [{ type: 'text', text: 'Notes are not available in local mode. Use cloud mode.' }] };
64471
64659
  }
64472
- const result = await client.logNote(intentId, note, 'mcp');
64660
+ const result = await requireCloudClient().logNote(intentId, note, 'mcp');
64473
64661
  return {
64474
64662
  content: [{
64475
64663
  type: 'text',
@@ -64503,7 +64691,7 @@ function startMcpServer() {
64503
64691
  if (isLocalMode) {
64504
64692
  return { content: [{ type: 'text', text: 'Creating intents requires cloud mode. Use PATHMODE_API_KEY to connect.' }] };
64505
64693
  }
64506
- const result = await client.createIntent({ productId, ...rest });
64694
+ const result = await requireCloudClient().createIntent({ productId, ...rest });
64507
64695
  return {
64508
64696
  content: [{
64509
64697
  type: 'text',
@@ -64537,7 +64725,7 @@ function startMcpServer() {
64537
64725
  if (isLocalMode) {
64538
64726
  return { content: [{ type: 'text', text: 'Updating intents requires cloud mode.' }] };
64539
64727
  }
64540
- const result = await client.updateIntent(intentId, updates);
64728
+ const result = await requireCloudClient().updateIntent(intentId, updates);
64541
64729
  const changedFields = Object.keys(updates).filter(k => updates[k] !== undefined);
64542
64730
  return {
64543
64731
  content: [{
@@ -64562,7 +64750,7 @@ function startMcpServer() {
64562
64750
  if (isLocalMode) {
64563
64751
  return { content: [{ type: 'text', text: 'Evidence queries require cloud mode.' }] };
64564
64752
  }
64565
- const result = await client.queryEvidence(filters);
64753
+ const result = await requireCloudClient().queryEvidence(filters);
64566
64754
  return {
64567
64755
  content: [{
64568
64756
  type: 'text',
@@ -64582,14 +64770,14 @@ function startMcpServer() {
64582
64770
  severity: zod_1.z.enum(['low', 'medium', 'high', 'critical']).optional().describe('Severity level (required for friction type)'),
64583
64771
  sentiment: zod_1.z.enum(['positive', 'negative', 'neutral', 'mixed']).optional().describe('Emotional sentiment'),
64584
64772
  tags: zod_1.z.array(zod_1.z.string()).optional().describe('Category tags (e.g., ["Onboarding", "Performance"])'),
64585
- stage: zod_1.z.string().optional().describe('User journey stage (e.g., "Discovery", "Checkout")'),
64773
+ stage: zod_1.z.string().optional().describe('Workflow stage (e.g., "Discovery", "Checkout")'),
64586
64774
  },
64587
64775
  annotations: WRITE_OP,
64588
64776
  }, async ({ productId, ...rest }) => {
64589
64777
  if (isLocalMode) {
64590
64778
  return { content: [{ type: 'text', text: 'Creating evidence requires cloud mode.' }] };
64591
64779
  }
64592
- const result = await client.createEvidence({ productId, ...rest });
64780
+ const result = await requireCloudClient().createEvidence({ productId, ...rest });
64593
64781
  return {
64594
64782
  content: [{
64595
64783
  type: 'text',
@@ -64610,7 +64798,7 @@ function startMcpServer() {
64610
64798
  if (isLocalMode) {
64611
64799
  return { content: [{ type: 'text', text: 'Evidence linking requires cloud mode.' }] };
64612
64800
  }
64613
- const result = await client.linkEvidence(intentId, { link, unlink });
64801
+ const result = await requireCloudClient().linkEvidence(intentId, { link, unlink });
64614
64802
  const actions = [];
64615
64803
  if (link && link.length > 0)
64616
64804
  actions.push(`linked ${result.linked} evidence items`);
@@ -64637,7 +64825,7 @@ function startMcpServer() {
64637
64825
  return { content: [{ type: 'text', text: 'Verification requires cloud mode.' }] };
64638
64826
  }
64639
64827
  try {
64640
- const result = await client.verifyImplementation(intentId, summary, codeChanges);
64828
+ const result = await requireCloudClient().verifyImplementation(intentId, summary, codeChanges);
64641
64829
  let text = `Verification ${result.pass ? 'PASSED' : 'FAILED'} (score: ${result.score}/100)\n\n`;
64642
64830
  text += `${result.summary}\n\n`;
64643
64831
  for (const r of result.results) {
@@ -64714,6 +64902,10 @@ function startMcpServer() {
64714
64902
  expectedBehavior: zod_1.z.string(),
64715
64903
  })).optional().describe('Failure modes and boundary conditions'),
64716
64904
  healthMetrics: zod_1.z.array(zod_1.z.string()).optional().describe('What to monitor after shipping'),
64905
+ scope: zod_1.z.object({
64906
+ inScope: zod_1.z.array(zod_1.z.string()).optional().describe('What is in scope for this intent'),
64907
+ outOfScope: zod_1.z.array(zod_1.z.string()).optional().describe('What is explicitly out of scope'),
64908
+ }).optional().describe('Scope boundaries — what to build and what to avoid'),
64717
64909
  verification: zod_1.z.object({
64718
64910
  manualChecks: zod_1.z.array(zod_1.z.string()).optional(),
64719
64911
  unitTests: zod_1.z.array(zod_1.z.string()).optional(),
@@ -64797,15 +64989,27 @@ function startMcpServer() {
64797
64989
  }]
64798
64990
  };
64799
64991
  }
64800
- const intents = await client.listIntents('approved');
64801
- const current = intents[0] || (await client.listIntents())[0] || null;
64802
- return {
64803
- contents: [{
64804
- uri: uri.href,
64805
- mimeType: 'application/json',
64806
- text: JSON.stringify(current, null, 2),
64807
- }]
64808
- };
64992
+ try {
64993
+ const cloud = requireCloudClient();
64994
+ const intents = await cloud.listIntents('approved');
64995
+ const current = intents[0] || (await cloud.listIntents())[0] || null;
64996
+ return {
64997
+ contents: [{
64998
+ uri: uri.href,
64999
+ mimeType: 'application/json',
65000
+ text: JSON.stringify(current, null, 2),
65001
+ }]
65002
+ };
65003
+ }
65004
+ catch {
65005
+ return {
65006
+ contents: [{
65007
+ uri: uri.href,
65008
+ mimeType: 'application/json',
65009
+ text: JSON.stringify({ error: CLOUD_REQUIRED_MSG }),
65010
+ }]
65011
+ };
65012
+ }
64809
65013
  });
64810
65014
  server.resource('intent://graph', 'intent://graph', async (uri) => {
64811
65015
  if (isLocalMode) {
@@ -64817,20 +65021,31 @@ function startMcpServer() {
64817
65021
  }]
64818
65022
  };
64819
65023
  }
64820
- const intents = await client.listIntents();
64821
- const graph = intents.map(i => ({
64822
- id: i.id,
64823
- title: i.title,
64824
- status: i.status,
64825
- relations: i.relations,
64826
- }));
64827
- return {
64828
- contents: [{
64829
- uri: uri.href,
64830
- mimeType: 'application/json',
64831
- text: JSON.stringify(graph, null, 2),
64832
- }]
64833
- };
65024
+ try {
65025
+ const intents = await requireCloudClient().listIntents();
65026
+ const graph = intents.map(i => ({
65027
+ id: i.id,
65028
+ title: i.title,
65029
+ status: i.status,
65030
+ relations: i.relations,
65031
+ }));
65032
+ return {
65033
+ contents: [{
65034
+ uri: uri.href,
65035
+ mimeType: 'application/json',
65036
+ text: JSON.stringify(graph, null, 2),
65037
+ }]
65038
+ };
65039
+ }
65040
+ catch {
65041
+ return {
65042
+ contents: [{
65043
+ uri: uri.href,
65044
+ mimeType: 'application/json',
65045
+ text: JSON.stringify({ error: CLOUD_REQUIRED_MSG }),
65046
+ }]
65047
+ };
65048
+ }
64834
65049
  });
64835
65050
  server.resource('intent://workspace-strategy', 'intent://workspace-strategy', async (uri) => {
64836
65051
  if (isLocalMode) {
@@ -64843,7 +65058,7 @@ function startMcpServer() {
64843
65058
  };
64844
65059
  }
64845
65060
  try {
64846
- const workspace = await client.getWorkspace();
65061
+ const workspace = await requireCloudClient().getWorkspace();
64847
65062
  return {
64848
65063
  contents: [{
64849
65064
  uri: uri.href,
@@ -12,13 +12,21 @@ export interface IntentFields {
12
12
  id?: string;
13
13
  title: string;
14
14
  objective: string;
15
- outcomes: string[];
15
+ outcomes: (string | {
16
+ id?: string;
17
+ text: string;
18
+ priority?: 'must' | 'should' | 'could';
19
+ })[];
16
20
  constraints?: string[];
17
21
  edgeCases?: {
18
22
  scenario: string;
19
23
  expectedBehavior: string;
20
24
  }[];
21
25
  healthMetrics?: string[];
26
+ scope?: {
27
+ inScope?: string[];
28
+ outOfScope?: string[];
29
+ };
22
30
  verification?: {
23
31
  manualChecks?: string[];
24
32
  unitTests?: string[];
@@ -1 +1 @@
1
- {"version":3,"file":"","sourceRoot":"","sources":["file:///Users/jannelammi/code/Pathmode/packages/mcp-server/src/intent-compiler.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAMH,MAAM,WAAW,YAAY;IACzB,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,MAAM,EAAE,CAAC;IACnB,WAAW,CAAC,EAAE,MAAM,EAAE,CAAC;IACvB,SAAS,CAAC,EAAE;QAAE,QAAQ,EAAE,MAAM,CAAC;QAAC,gBAAgB,EAAE,MAAM,CAAA;KAAE,EAAE,CAAC;IAC7D,aAAa,CAAC,EAAE,MAAM,EAAE,CAAC;IACzB,YAAY,CAAC,EAAE;QACX,YAAY,CAAC,EAAE,MAAM,EAAE,CAAC;QACxB,SAAS,CAAC,EAAE,MAAM,EAAE,CAAC;QACrB,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC;KACvB,CAAC;CACL;AAMD;;;GAGG;AACH,wBAAgB,sBAAsB,IAAI,MAAM,CA2D/C;AAOD;;;GAGG;AACH,wBAAgB,cAAc,CAAC,IAAI,EAAE,YAAY,GAAG,MAAM,CAkFzD;AAOD;;;GAGG;AACH,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,YAAY,GAAG,MAAM,CA2E5D;AAOD;;;;GAIG;AACH,wBAAgB,qBAAqB,CAAC,IAAI,E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sDhE"}
@@ -17,6 +17,10 @@ export interface LocalIntent {
17
17
  expectedBehavior: string;
18
18
  }[];
19
19
  healthMetrics: string[];
20
+ scope?: {
21
+ inScope?: string[];
22
+ outOfScope?: string[];
23
+ };
20
24
  verification: Record<string, any>;
21
25
  source: 'local';
22
26
  }
@@ -1 +1 @@
1
- {"version":3,"file":"","sourceRoot":"","sources":["file:///Users/jannelammi/code/Pathmode/packages/mcp-server/src/local-reader.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAMH,MAAM,WAAW,WAAW;IACxB,EAAE,EAAE,MAAM,CAAC;IACX,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;IAClB,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,MAAM,EAAE,CAAC;IACnB,WAAW,EAAE,MAAM,EAAE,CAAC;IACtB,SAAS,EAAE;QAAE,QAAQ,EAAE,MAAM,CAAC;QAAC,gBAAgB,EAAE,MAAM,CAAA;KAAE,EAAE,CAAC;IAC5D,aAAa,EAAE,MAAM,EAAE,CAAC;IACxB,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAClC,MAAM,EAAE,OAAO,CAAC;CACnB;AAED;;GAEG;AACH,wBAAgB,gBAAgB,IAAI,WAAW,EAAE,CAmBhD"}
1
+ {"version":3,"file":"","sourceRoot":"","sources":["file:///Users/jannelammi/code/Pathmode/packages/mcp-server/src/local-reader.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAMH,MAAM,WAAW,WAAW;IACxB,EAAE,EAAE,MAAM,CAAC;IACX,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;IAClB,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,MAAM,EAAE,CAAC;IACnB,WAAW,EAAE,MAAM,EAAE,CAAC;IACtB,SAAS,EAAE;QAAE,QAAQ,EAAE,MAAM,CAAC;QAAC,gBAAgB,EAAE,MAAM,CAAA;KAAE,EAAE,CAAC;IAC5D,aAAa,EAAE,MAAM,EAAE,CAAC;IACxB,KAAK,CAAC,EAAE;QAAE,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;QAAC,UAAU,CAAC,EAAE,MAAM,EAAE,CAAA;KAAE,CAAC;IACtD,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAClC,MAAM,EAAE,OAAO,CAAC;CACnB;AAED;;GAEG;AACH,wBAAgB,gBAAgB,IAAI,WAAW,EAAE,CAmBhD"}
package/manifest.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "manifest_version": "0.3",
3
3
  "name": "pathmode",
4
4
  "display_name": "Pathmode",
5
- "version": "1.4.0",
5
+ "version": "1.4.4",
6
6
  "description": "Build structured intent specs through Socratic AI conversation, or connect to your Intent Layer for strategic context and dependency graphs.",
7
7
  "long_description": "Pathmode MCP Server includes the Intent Compiler — a zero-config Socratic conversation that helps you build structured intent specs (objectives, outcomes, constraints, edge cases) right in Claude Code. No signup needed. For teams, connect to your Pathmode workspace for dependency graph analysis (critical path, bottlenecks, cycles), workspace strategy context, and governance — so AI agents build the right thing, not just any thing.",
8
8
  "author": {
package/package.json CHANGED
@@ -1,6 +1,9 @@
1
1
  {
2
2
  "name": "@pathmode/mcp-server",
3
- "version": "1.4.3",
3
+ "version": "1.4.5",
4
+ "publishConfig": {
5
+ "access": "public"
6
+ },
4
7
  "mcpName": "io.github.pathmodeio/mcp-server",
5
8
  "description": "Pathmode MCP Server — Build structured intent specs through Socratic AI conversation (zero-config), or connect to your Intent Layer for strategic context, dependency graphs, and implementation prompts.",
6
9
  "main": "dist/index.js",