@pathmode/mcp-server 1.13.1 → 1.14.0
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 +4 -2
- package/dist/api-client.d.ts +121 -1
- package/dist/api-client.d.ts.map +1 -1
- package/dist/index.js +641 -24
- package/dist/intent-compiler.d.ts +15 -8
- package/dist/intent-compiler.d.ts.map +1 -1
- package/dist/local-reader.d.ts +7 -0
- package/dist/local-reader.d.ts.map +1 -1
- package/dist/measurement-schema.d.ts +325 -0
- package/dist/measurement-schema.d.ts.map +1 -0
- package/dist/push-spec.d.ts +78 -0
- package/dist/push-spec.d.ts.map +1 -0
- package/manifest.json +1 -1
- package/package.json +1 -1
- package/skills/compile-intent/SKILL.md +5 -0
- package/skills/handoff-intent/SKILL.md +5 -1
- package/skills/preflight/SKILL.md +1 -1
|
@@ -58,9 +58,18 @@ export interface IntentFields {
|
|
|
58
58
|
unitTests?: string[];
|
|
59
59
|
e2eTests?: string[];
|
|
60
60
|
};
|
|
61
|
+
/** What the repo actually looks like where this change lands, as prose.
|
|
62
|
+
* The LOCAL counterpart of `implementationContext`: keyless mode has no analyzer,
|
|
63
|
+
* so the agent already sitting in the repo gathers it and hands it back. Free text
|
|
64
|
+
* on purpose — an agent reading the working tree beats any fixed shape we could
|
|
65
|
+
* impose, and the section round-trips through intent.md verbatim. */
|
|
66
|
+
implementationContextText?: string;
|
|
61
67
|
/** Repo-analysis context (cloud intents). Richer than the structured fields:
|
|
62
68
|
* risks are real edge cases, verificationSuggestions are sharp grader checks. */
|
|
63
69
|
implementationContext?: {
|
|
70
|
+
/** Absent means 'analyzer'. See bindsGradingCriteria below for why this matters. */
|
|
71
|
+
source?: 'analyzer' | 'agent';
|
|
72
|
+
promotedAt?: string;
|
|
64
73
|
relevantAreas?: {
|
|
65
74
|
path: string;
|
|
66
75
|
reason: string;
|
|
@@ -87,15 +96,13 @@ export interface IntentMdOptions {
|
|
|
87
96
|
readiness?: string;
|
|
88
97
|
/** Canonical record URL (cloud intents). Omitted when this file is the only copy. */
|
|
89
98
|
source?: string;
|
|
99
|
+
/** The server's opaque content token for this spec, as of the last push or pull. Carried, never
|
|
100
|
+
* computed here: the client cannot derive it (this package imports nothing from the app) and
|
|
101
|
+
* must not, so the algorithm can change without a release of a version users pin. Sent back as
|
|
102
|
+
* `expectedVersion` on the next push, which is what makes a concurrent edit a 409 instead of a
|
|
103
|
+
* silent overwrite. Absent means this file has never been in the cloud. */
|
|
104
|
+
specVersion?: string;
|
|
90
105
|
}
|
|
91
|
-
/**
|
|
92
|
-
* Generate intent.md content with YAML frontmatter.
|
|
93
|
-
* Adapted from lib/agentPromptGenerator.ts generateIntentMd().
|
|
94
|
-
*
|
|
95
|
-
* `spec.id`, `opts.version`, and `opts.status` are preserved rather than reset — an intent that
|
|
96
|
-
* is saved twice must keep its identity and its lifecycle state. Only a genuinely new intent
|
|
97
|
-
* (no id) gets a minted id, version 1, and status 'draft'.
|
|
98
|
-
*/
|
|
99
106
|
export declare function formatIntentMd(spec: IntentFields, opts?: IntentMdOptions): string;
|
|
100
107
|
/**
|
|
101
108
|
* Generate .cursorrules content for a single intent.
|
|
@@ -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,cAAc;IAC3B,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,EAAE,CAAC;IACvB,UAAU,CAAC,EAAE,MAAM,CAAC;CACvB;
|
|
1
|
+
{"version":3,"file":"","sourceRoot":"","sources":["file:///Users/jannelammi/code/Pathmode/packages/mcp-server/src/intent-compiler.ts"],"names":[],"mappings":"AAAA;;;;;;;;;G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DD,wBAAgB,cAAc,CAAC,IAAI,EAAE,YAAY,EAAE,IAAI,GAAE,eAAoB,GAAG,MAAM,CA4GrF;AAOD;;;GAGG;AACH,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,YAAY,GAAG,MAAM,CAwF5D;AAOD;;;;GAIG;AACH,wBAAgB,qBAAqB,CAAC,IAAI,EAAE,YAAY,GAAG,MAAM,CA4DhE;AAOD,MAAM,WAAW,oBAAoB;IACjC;;;;OAIG;IACH,iBAAiB,CAAC,EAAE,MAAM,EAAE,CAAC;IAC7B,0EAA0E;IAC1E,aAAa,CAAC,EAAE,MAAM,CAAC;CAC1B;AA2MD;;;;;;;;;;GAUG;AACH,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,YAAY,EAAE,IAAI,GAAE,oBAAyB,GAAG,MAAM,CAmC/F"}
|
package/dist/local-reader.d.ts
CHANGED
|
@@ -35,6 +35,10 @@ export interface LocalIntent {
|
|
|
35
35
|
objective: string;
|
|
36
36
|
/** Author-written as-is behavior, from the `## Current State` section. */
|
|
37
37
|
currentState?: string;
|
|
38
|
+
/** What the repo looks like where this lands, from `## Implementation Context`.
|
|
39
|
+
* Free text, gathered by the agent in the working tree; `###` sub-headings survive
|
|
40
|
+
* because only `##` opens a new section. */
|
|
41
|
+
implementationContext?: string;
|
|
38
42
|
title: string;
|
|
39
43
|
stageName?: string;
|
|
40
44
|
severity?: string;
|
|
@@ -59,6 +63,9 @@ export interface LocalIntentMeta {
|
|
|
59
63
|
version: number;
|
|
60
64
|
status: string;
|
|
61
65
|
created?: string;
|
|
66
|
+
/** The server's token as of the last sync. Present only on cloud-backed files; its presence is
|
|
67
|
+
* what tells a save whether this spec already exists in a workspace. */
|
|
68
|
+
specVersion?: string;
|
|
62
69
|
}
|
|
63
70
|
/**
|
|
64
71
|
* Read all intent.md files from the current directory and subdirectories (1 level deep).
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"","sourceRoot":"","sources":["file:///Users/jannelammi/code/P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,CAAC,OAAO,EAAE,MAAM,EAAE,UAAU,SAAW,GAAG,WAAW,CAiCvF"}
|
|
@@ -0,0 +1,325 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Input schema for the `record_outcome_measurement` tool.
|
|
3
|
+
*
|
|
4
|
+
* **This mirrors `lib/outcomeMeasurementRecord.ts` in the web app and must stay in step
|
|
5
|
+
* with it.** It cannot import it: this package publishes to npm as a standalone bundle
|
|
6
|
+
* (ncc, no workspace deps), so reaching into the app's `lib/` would drag the web app into
|
|
7
|
+
* the published artifact.
|
|
8
|
+
*
|
|
9
|
+
* Duplication is the cost, drift is the risk, and drift already happened once — the first
|
|
10
|
+
* version of this tool accepted requests the API then rejected: both outcome selectors
|
|
11
|
+
* omitted, a rolling window with no duration, a fixed window with no bounds, a free-form
|
|
12
|
+
* `evaluatedAt`, and unbounded strings where the API caps length. Every one of those cost
|
|
13
|
+
* an agent a network round trip to learn something it could have been told locally.
|
|
14
|
+
* `measurement-schema.test.ts` pins the cases so the next drift fails in CI instead.
|
|
15
|
+
*
|
|
16
|
+
* Bounds below are the API's: 500 chars for text values, 100 for short identifiers, 50 for
|
|
17
|
+
* units and source labels.
|
|
18
|
+
*/
|
|
19
|
+
import { z } from 'zod';
|
|
20
|
+
export declare const comparatorEnum: z.ZodEnum<["gt", "gte", "lt", "lte", "eq"]>;
|
|
21
|
+
export declare const windowKindEnum: z.ZodEnum<["rolling", "fixed", "since_ship"]>;
|
|
22
|
+
export declare const queryRefShape: z.ZodObject<{
|
|
23
|
+
kind: z.ZodString;
|
|
24
|
+
id: z.ZodString;
|
|
25
|
+
}, "strip", z.ZodTypeAny, {
|
|
26
|
+
kind: string;
|
|
27
|
+
id: string;
|
|
28
|
+
}, {
|
|
29
|
+
kind: string;
|
|
30
|
+
id: string;
|
|
31
|
+
}>;
|
|
32
|
+
/**
|
|
33
|
+
* Refinements do not appear in the JSON Schema the model sees, so the requirement is also
|
|
34
|
+
* stated in each `describe`. The refinement is what stops a malformed window reaching the
|
|
35
|
+
* API; the description is what stops the model producing one in the first place.
|
|
36
|
+
*/
|
|
37
|
+
export declare const windowShape: z.ZodEffects<z.ZodEffects<z.ZodObject<{
|
|
38
|
+
kind: z.ZodEnum<["rolling", "fixed", "since_ship"]>;
|
|
39
|
+
duration: z.ZodOptional<z.ZodString>;
|
|
40
|
+
start: z.ZodOptional<z.ZodString>;
|
|
41
|
+
end: z.ZodOptional<z.ZodString>;
|
|
42
|
+
}, "strip", z.ZodTypeAny, {
|
|
43
|
+
kind: "rolling" | "fixed" | "since_ship";
|
|
44
|
+
duration?: string | undefined;
|
|
45
|
+
start?: string | undefined;
|
|
46
|
+
end?: string | undefined;
|
|
47
|
+
}, {
|
|
48
|
+
kind: "rolling" | "fixed" | "since_ship";
|
|
49
|
+
duration?: string | undefined;
|
|
50
|
+
start?: string | undefined;
|
|
51
|
+
end?: string | undefined;
|
|
52
|
+
}>, {
|
|
53
|
+
kind: "rolling" | "fixed" | "since_ship";
|
|
54
|
+
duration?: string | undefined;
|
|
55
|
+
start?: string | undefined;
|
|
56
|
+
end?: string | undefined;
|
|
57
|
+
}, {
|
|
58
|
+
kind: "rolling" | "fixed" | "since_ship";
|
|
59
|
+
duration?: string | undefined;
|
|
60
|
+
start?: string | undefined;
|
|
61
|
+
end?: string | undefined;
|
|
62
|
+
}>, {
|
|
63
|
+
kind: "rolling" | "fixed" | "since_ship";
|
|
64
|
+
duration?: string | undefined;
|
|
65
|
+
start?: string | undefined;
|
|
66
|
+
end?: string | undefined;
|
|
67
|
+
}, {
|
|
68
|
+
kind: "rolling" | "fixed" | "since_ship";
|
|
69
|
+
duration?: string | undefined;
|
|
70
|
+
start?: string | undefined;
|
|
71
|
+
end?: string | undefined;
|
|
72
|
+
}>;
|
|
73
|
+
export declare const expectationShape: z.ZodObject<{
|
|
74
|
+
operator: z.ZodEnum<["gt", "gte", "lt", "lte", "eq"]>;
|
|
75
|
+
target: z.ZodNumber;
|
|
76
|
+
unit: z.ZodOptional<z.ZodString>;
|
|
77
|
+
}, "strip", z.ZodTypeAny, {
|
|
78
|
+
target: number;
|
|
79
|
+
operator: "gt" | "gte" | "lt" | "lte" | "eq";
|
|
80
|
+
unit?: string | undefined;
|
|
81
|
+
}, {
|
|
82
|
+
target: number;
|
|
83
|
+
operator: "gt" | "gte" | "lt" | "lte" | "eq";
|
|
84
|
+
unit?: string | undefined;
|
|
85
|
+
}>;
|
|
86
|
+
export declare const provenanceShape: z.ZodObject<{
|
|
87
|
+
provider: z.ZodString;
|
|
88
|
+
queryRef: z.ZodObject<{
|
|
89
|
+
kind: z.ZodString;
|
|
90
|
+
id: z.ZodString;
|
|
91
|
+
}, "strip", z.ZodTypeAny, {
|
|
92
|
+
kind: string;
|
|
93
|
+
id: string;
|
|
94
|
+
}, {
|
|
95
|
+
kind: string;
|
|
96
|
+
id: string;
|
|
97
|
+
}>;
|
|
98
|
+
queryVersion: z.ZodOptional<z.ZodString>;
|
|
99
|
+
window: z.ZodEffects<z.ZodEffects<z.ZodObject<{
|
|
100
|
+
kind: z.ZodEnum<["rolling", "fixed", "since_ship"]>;
|
|
101
|
+
duration: z.ZodOptional<z.ZodString>;
|
|
102
|
+
start: z.ZodOptional<z.ZodString>;
|
|
103
|
+
end: z.ZodOptional<z.ZodString>;
|
|
104
|
+
}, "strip", z.ZodTypeAny, {
|
|
105
|
+
kind: "rolling" | "fixed" | "since_ship";
|
|
106
|
+
duration?: string | undefined;
|
|
107
|
+
start?: string | undefined;
|
|
108
|
+
end?: string | undefined;
|
|
109
|
+
}, {
|
|
110
|
+
kind: "rolling" | "fixed" | "since_ship";
|
|
111
|
+
duration?: string | undefined;
|
|
112
|
+
start?: string | undefined;
|
|
113
|
+
end?: string | undefined;
|
|
114
|
+
}>, {
|
|
115
|
+
kind: "rolling" | "fixed" | "since_ship";
|
|
116
|
+
duration?: string | undefined;
|
|
117
|
+
start?: string | undefined;
|
|
118
|
+
end?: string | undefined;
|
|
119
|
+
}, {
|
|
120
|
+
kind: "rolling" | "fixed" | "since_ship";
|
|
121
|
+
duration?: string | undefined;
|
|
122
|
+
start?: string | undefined;
|
|
123
|
+
end?: string | undefined;
|
|
124
|
+
}>, {
|
|
125
|
+
kind: "rolling" | "fixed" | "since_ship";
|
|
126
|
+
duration?: string | undefined;
|
|
127
|
+
start?: string | undefined;
|
|
128
|
+
end?: string | undefined;
|
|
129
|
+
}, {
|
|
130
|
+
kind: "rolling" | "fixed" | "since_ship";
|
|
131
|
+
duration?: string | undefined;
|
|
132
|
+
start?: string | undefined;
|
|
133
|
+
end?: string | undefined;
|
|
134
|
+
}>;
|
|
135
|
+
evaluatedAt: z.ZodOptional<z.ZodString>;
|
|
136
|
+
expectation: z.ZodOptional<z.ZodObject<{
|
|
137
|
+
operator: z.ZodEnum<["gt", "gte", "lt", "lte", "eq"]>;
|
|
138
|
+
target: z.ZodNumber;
|
|
139
|
+
unit: z.ZodOptional<z.ZodString>;
|
|
140
|
+
}, "strip", z.ZodTypeAny, {
|
|
141
|
+
target: number;
|
|
142
|
+
operator: "gt" | "gte" | "lt" | "lte" | "eq";
|
|
143
|
+
unit?: string | undefined;
|
|
144
|
+
}, {
|
|
145
|
+
target: number;
|
|
146
|
+
operator: "gt" | "gte" | "lt" | "lte" | "eq";
|
|
147
|
+
unit?: string | undefined;
|
|
148
|
+
}>>;
|
|
149
|
+
rawResponse: z.ZodOptional<z.ZodUnknown>;
|
|
150
|
+
recordedByTool: z.ZodOptional<z.ZodString>;
|
|
151
|
+
}, "strip", z.ZodTypeAny, {
|
|
152
|
+
provider: string;
|
|
153
|
+
queryRef: {
|
|
154
|
+
kind: string;
|
|
155
|
+
id: string;
|
|
156
|
+
};
|
|
157
|
+
window: {
|
|
158
|
+
kind: "rolling" | "fixed" | "since_ship";
|
|
159
|
+
duration?: string | undefined;
|
|
160
|
+
start?: string | undefined;
|
|
161
|
+
end?: string | undefined;
|
|
162
|
+
};
|
|
163
|
+
queryVersion?: string | undefined;
|
|
164
|
+
evaluatedAt?: string | undefined;
|
|
165
|
+
expectation?: {
|
|
166
|
+
target: number;
|
|
167
|
+
operator: "gt" | "gte" | "lt" | "lte" | "eq";
|
|
168
|
+
unit?: string | undefined;
|
|
169
|
+
} | undefined;
|
|
170
|
+
rawResponse?: unknown;
|
|
171
|
+
recordedByTool?: string | undefined;
|
|
172
|
+
}, {
|
|
173
|
+
provider: string;
|
|
174
|
+
queryRef: {
|
|
175
|
+
kind: string;
|
|
176
|
+
id: string;
|
|
177
|
+
};
|
|
178
|
+
window: {
|
|
179
|
+
kind: "rolling" | "fixed" | "since_ship";
|
|
180
|
+
duration?: string | undefined;
|
|
181
|
+
start?: string | undefined;
|
|
182
|
+
end?: string | undefined;
|
|
183
|
+
};
|
|
184
|
+
queryVersion?: string | undefined;
|
|
185
|
+
evaluatedAt?: string | undefined;
|
|
186
|
+
expectation?: {
|
|
187
|
+
target: number;
|
|
188
|
+
operator: "gt" | "gte" | "lt" | "lte" | "eq";
|
|
189
|
+
unit?: string | undefined;
|
|
190
|
+
} | undefined;
|
|
191
|
+
rawResponse?: unknown;
|
|
192
|
+
recordedByTool?: string | undefined;
|
|
193
|
+
}>;
|
|
194
|
+
/** The tool's field map, in the ZodRawShape form `registerTool` expects. */
|
|
195
|
+
export declare const recordOutcomeMeasurementInputSchema: {
|
|
196
|
+
intentId: z.ZodString;
|
|
197
|
+
outcomeId: z.ZodOptional<z.ZodString>;
|
|
198
|
+
outcomeIndex: z.ZodOptional<z.ZodNumber>;
|
|
199
|
+
actualValue: z.ZodString;
|
|
200
|
+
numericValue: z.ZodOptional<z.ZodNumber>;
|
|
201
|
+
baselineValue: z.ZodOptional<z.ZodString>;
|
|
202
|
+
unit: z.ZodOptional<z.ZodString>;
|
|
203
|
+
met: z.ZodOptional<z.ZodBoolean>;
|
|
204
|
+
source: z.ZodOptional<z.ZodString>;
|
|
205
|
+
measurement: z.ZodOptional<z.ZodObject<{
|
|
206
|
+
provider: z.ZodString;
|
|
207
|
+
queryRef: z.ZodObject<{
|
|
208
|
+
kind: z.ZodString;
|
|
209
|
+
id: z.ZodString;
|
|
210
|
+
}, "strip", z.ZodTypeAny, {
|
|
211
|
+
kind: string;
|
|
212
|
+
id: string;
|
|
213
|
+
}, {
|
|
214
|
+
kind: string;
|
|
215
|
+
id: string;
|
|
216
|
+
}>;
|
|
217
|
+
queryVersion: z.ZodOptional<z.ZodString>;
|
|
218
|
+
window: z.ZodEffects<z.ZodEffects<z.ZodObject<{
|
|
219
|
+
kind: z.ZodEnum<["rolling", "fixed", "since_ship"]>;
|
|
220
|
+
duration: z.ZodOptional<z.ZodString>;
|
|
221
|
+
start: z.ZodOptional<z.ZodString>;
|
|
222
|
+
end: z.ZodOptional<z.ZodString>;
|
|
223
|
+
}, "strip", z.ZodTypeAny, {
|
|
224
|
+
kind: "rolling" | "fixed" | "since_ship";
|
|
225
|
+
duration?: string | undefined;
|
|
226
|
+
start?: string | undefined;
|
|
227
|
+
end?: string | undefined;
|
|
228
|
+
}, {
|
|
229
|
+
kind: "rolling" | "fixed" | "since_ship";
|
|
230
|
+
duration?: string | undefined;
|
|
231
|
+
start?: string | undefined;
|
|
232
|
+
end?: string | undefined;
|
|
233
|
+
}>, {
|
|
234
|
+
kind: "rolling" | "fixed" | "since_ship";
|
|
235
|
+
duration?: string | undefined;
|
|
236
|
+
start?: string | undefined;
|
|
237
|
+
end?: string | undefined;
|
|
238
|
+
}, {
|
|
239
|
+
kind: "rolling" | "fixed" | "since_ship";
|
|
240
|
+
duration?: string | undefined;
|
|
241
|
+
start?: string | undefined;
|
|
242
|
+
end?: string | undefined;
|
|
243
|
+
}>, {
|
|
244
|
+
kind: "rolling" | "fixed" | "since_ship";
|
|
245
|
+
duration?: string | undefined;
|
|
246
|
+
start?: string | undefined;
|
|
247
|
+
end?: string | undefined;
|
|
248
|
+
}, {
|
|
249
|
+
kind: "rolling" | "fixed" | "since_ship";
|
|
250
|
+
duration?: string | undefined;
|
|
251
|
+
start?: string | undefined;
|
|
252
|
+
end?: string | undefined;
|
|
253
|
+
}>;
|
|
254
|
+
evaluatedAt: z.ZodOptional<z.ZodString>;
|
|
255
|
+
expectation: z.ZodOptional<z.ZodObject<{
|
|
256
|
+
operator: z.ZodEnum<["gt", "gte", "lt", "lte", "eq"]>;
|
|
257
|
+
target: z.ZodNumber;
|
|
258
|
+
unit: z.ZodOptional<z.ZodString>;
|
|
259
|
+
}, "strip", z.ZodTypeAny, {
|
|
260
|
+
target: number;
|
|
261
|
+
operator: "gt" | "gte" | "lt" | "lte" | "eq";
|
|
262
|
+
unit?: string | undefined;
|
|
263
|
+
}, {
|
|
264
|
+
target: number;
|
|
265
|
+
operator: "gt" | "gte" | "lt" | "lte" | "eq";
|
|
266
|
+
unit?: string | undefined;
|
|
267
|
+
}>>;
|
|
268
|
+
rawResponse: z.ZodOptional<z.ZodUnknown>;
|
|
269
|
+
recordedByTool: z.ZodOptional<z.ZodString>;
|
|
270
|
+
}, "strip", z.ZodTypeAny, {
|
|
271
|
+
provider: string;
|
|
272
|
+
queryRef: {
|
|
273
|
+
kind: string;
|
|
274
|
+
id: string;
|
|
275
|
+
};
|
|
276
|
+
window: {
|
|
277
|
+
kind: "rolling" | "fixed" | "since_ship";
|
|
278
|
+
duration?: string | undefined;
|
|
279
|
+
start?: string | undefined;
|
|
280
|
+
end?: string | undefined;
|
|
281
|
+
};
|
|
282
|
+
queryVersion?: string | undefined;
|
|
283
|
+
evaluatedAt?: string | undefined;
|
|
284
|
+
expectation?: {
|
|
285
|
+
target: number;
|
|
286
|
+
operator: "gt" | "gte" | "lt" | "lte" | "eq";
|
|
287
|
+
unit?: string | undefined;
|
|
288
|
+
} | undefined;
|
|
289
|
+
rawResponse?: unknown;
|
|
290
|
+
recordedByTool?: string | undefined;
|
|
291
|
+
}, {
|
|
292
|
+
provider: string;
|
|
293
|
+
queryRef: {
|
|
294
|
+
kind: string;
|
|
295
|
+
id: string;
|
|
296
|
+
};
|
|
297
|
+
window: {
|
|
298
|
+
kind: "rolling" | "fixed" | "since_ship";
|
|
299
|
+
duration?: string | undefined;
|
|
300
|
+
start?: string | undefined;
|
|
301
|
+
end?: string | undefined;
|
|
302
|
+
};
|
|
303
|
+
queryVersion?: string | undefined;
|
|
304
|
+
evaluatedAt?: string | undefined;
|
|
305
|
+
expectation?: {
|
|
306
|
+
target: number;
|
|
307
|
+
operator: "gt" | "gte" | "lt" | "lte" | "eq";
|
|
308
|
+
unit?: string | undefined;
|
|
309
|
+
} | undefined;
|
|
310
|
+
rawResponse?: unknown;
|
|
311
|
+
recordedByTool?: string | undefined;
|
|
312
|
+
}>>;
|
|
313
|
+
};
|
|
314
|
+
/**
|
|
315
|
+
* The one constraint that cannot live in the field map.
|
|
316
|
+
*
|
|
317
|
+
* `registerTool` takes a ZodRawShape and builds the object itself, so an object-level
|
|
318
|
+
* `.refine()` across two sibling fields has nowhere to attach. Checking it in the handler
|
|
319
|
+
* keeps the failure local and the message identical to the API's, instead of spending a
|
|
320
|
+
* round trip to be told the same thing.
|
|
321
|
+
*/
|
|
322
|
+
export declare function outcomeSelectorError(input: {
|
|
323
|
+
outcomeId?: string;
|
|
324
|
+
outcomeIndex?: number;
|
|
325
|
+
}): string | null;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"","sourceRoot":"","sources":["file:///Users/jannelammi/code/Pathmode/packages/mcp-server/src/measurement-schema.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAMxB,eAAO,MAAM,cAAc,6CAA2C,CAAC;AACvE,eAAO,MAAM,cAAc,+CAA6C,CAAC;AAEzE,eAAO,MAAM,aAAa;;;;;;;;;EAGxB,CAAC;AAEH;;;;GAIG;AACH,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAclB,CAAC;AAEP,eAAO,MAAM,gBAAgB;;;;;;;;;;;;EAI3B,CAAC;AAEH,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAS1B,CAAC;AAEH,4EAA4E;AAC5E,eAAO,MAAM,mCAAmC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAW/C,CAAC;AAEF;;;;;;;GAOG;AACH,wBAAgB,oBAAoB,CAAC,KAAK,EAAE;IAAE,SAAS,CAAC,EAAE,MAAM,CAAC;IAAC,YAAY,CAAC,EAAE,MAAM,CAAA;CAAE,GAAG,MAAM,GAAG,IAAI,CAKxG"}
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Push a saved spec to the workspace, in the order that makes a retry repair rather than duplicate.
|
|
3
|
+
*
|
|
4
|
+
* Three legs, and the split between them is the whole design:
|
|
5
|
+
*
|
|
6
|
+
* 1. **Identity** (create or update). The only leg allowed to fail the save. It settles what this
|
|
7
|
+
* spec IS and returns the server's opaque version token.
|
|
8
|
+
* 2. **The file write**, via `onIdentitySettled`, immediately after leg 1 and BEFORE the rest.
|
|
9
|
+
* 3. **Enrichment** (decisions, implementation context). These report; they never fail the save.
|
|
10
|
+
*
|
|
11
|
+
* Why the file cannot wait until every leg succeeds: the write is what puts `specVersion` on disk,
|
|
12
|
+
* and `specVersion` on disk is what makes the NEXT save an update. Defer the write and a failure in
|
|
13
|
+
* leg 3 leaves a cloud record with no local token — so the next save looks like a first save and
|
|
14
|
+
* creates a SECOND intent. Refusing to write would not prevent divergence, it would manufacture
|
|
15
|
+
* duplicates, which is worse than the state it was avoiding.
|
|
16
|
+
*
|
|
17
|
+
* Enrichment goes through dedicated endpoints rather than fields on create because each is validated
|
|
18
|
+
* there: evidence ids are checked against the workspace so provenance cannot be fabricated, and
|
|
19
|
+
* implementation context is stamped with its source so unpromoted agent content stays out of the
|
|
20
|
+
* grading rubric. Riding along on create would bypass both.
|
|
21
|
+
*
|
|
22
|
+
* A failed enrichment leg is recoverable by saving again: its content is already in the local file,
|
|
23
|
+
* and the retry is an update.
|
|
24
|
+
*/
|
|
25
|
+
export interface PushClient {
|
|
26
|
+
createIntent(input: any): Promise<{
|
|
27
|
+
id: string;
|
|
28
|
+
specVersion?: string;
|
|
29
|
+
}>;
|
|
30
|
+
/** Used to recover when a create commits but its response is lost. */
|
|
31
|
+
getIntent?(id: string): Promise<{
|
|
32
|
+
id: string;
|
|
33
|
+
specVersion?: string;
|
|
34
|
+
}>;
|
|
35
|
+
updateIntent(id: string, input: any): Promise<{
|
|
36
|
+
id: string;
|
|
37
|
+
specVersion?: string;
|
|
38
|
+
}>;
|
|
39
|
+
recordDecision(intentId: string, input: any): Promise<unknown>;
|
|
40
|
+
saveImplementationContext(intentId: string, input: any): Promise<unknown>;
|
|
41
|
+
}
|
|
42
|
+
export interface PushSpecInput {
|
|
43
|
+
client: PushClient;
|
|
44
|
+
/** Local id, used when the server does not hand back its own. */
|
|
45
|
+
id: string;
|
|
46
|
+
/** Present when this file is already cloud-backed; drives update-vs-create and 409 protection. */
|
|
47
|
+
existingSpecVersion?: string;
|
|
48
|
+
payload: Record<string, unknown>;
|
|
49
|
+
decisions?: {
|
|
50
|
+
choice: string;
|
|
51
|
+
reason: string;
|
|
52
|
+
ruledOut?: string;
|
|
53
|
+
}[];
|
|
54
|
+
implementationContext?: string;
|
|
55
|
+
/** Called once identity is settled, before any enrichment. This is the file write. */
|
|
56
|
+
onIdentitySettled: (result: {
|
|
57
|
+
canonicalId: string;
|
|
58
|
+
specVersion?: string;
|
|
59
|
+
sourceUrl: string;
|
|
60
|
+
}) => void;
|
|
61
|
+
}
|
|
62
|
+
export type PushSpecResult = {
|
|
63
|
+
ok: true;
|
|
64
|
+
canonicalId: string;
|
|
65
|
+
specVersion?: string;
|
|
66
|
+
sourceUrl: string;
|
|
67
|
+
didNotTravel: string[];
|
|
68
|
+
} | {
|
|
69
|
+
ok: false;
|
|
70
|
+
error: string;
|
|
71
|
+
code?: string;
|
|
72
|
+
products?: {
|
|
73
|
+
id: string;
|
|
74
|
+
name: string;
|
|
75
|
+
isExample?: boolean;
|
|
76
|
+
}[];
|
|
77
|
+
};
|
|
78
|
+
export declare function pushSpec(input: PushSpecInput): Promise<PushSpecResult>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"","sourceRoot":"","sources":["file:///Users/jannelammi/code/Pathmode/packages/mcp-server/src/push-spec.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAEH,MAAM,WAAW,UAAU;IACvB,YAAY,CAAC,KAAK,EAAE,GAAG,GAAG,OAAO,CAAC;QAAE,EAAE,EAAE,MAAM,CAAC;QAAC,WAAW,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IACxE,sEAAsE;IACtE,SAAS,CAAC,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC;QAAE,EAAE,EAAE,MAAM,CAAC;QAAC,WAAW,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IACtE,YAAY,CAAC,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,GAAG,GAAG,OAAO,CAAC;QAAE,EAAE,EAAE,MAAM,CAAC;QAAC,WAAW,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IACpF,cAAc,CAAC,QAAQ,EAAE,MAAM,EAAE,KAAK,EAAE,GAAG,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;IAC/D,yBAAyB,CAAC,QAAQ,EAAE,MAAM,EAAE,KAAK,EAAE,GAAG,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;CAC7E;AAED,MAAM,WAAW,aAAa;IAC1B,MAAM,EAAE,UAAU,CAAC;IACnB,iEAAiE;IACjE,EAAE,EAAE,MAAM,CAAC;IACX,kGAAkG;IAClG,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACjC,SAAS,CAAC,EAAE;QAAE,MAAM,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAC;QAAC,QAAQ,CAAC,EAAE,MAAM,CAAA;KAAE,EAAE,CAAC;IACpE,qBAAqB,CAAC,EAAE,MAAM,CAAC;IAC/B,sFAAsF;IACtF,iBAAiB,EAAE,CAAC,MAAM,EAAE;QAAE,WAAW,EAAE,MAAM,CAAC;QAAC,WAAW,CAAC,EAAE,MAAM,CAAC;QAAC,SAAS,EAAE,MAAM,CAAA;KAAE,KAAK,IAAI,CAAC;CACzG;AAED,MAAM,MAAM,cAAc,GACpB;IAAE,EAAE,EAAE,IAAI,CAAC;IAAC,WAAW,EAAE,MAAM,CAAC;IAAC,WAAW,CAAC,EAAE,MAAM,CAAC;IAAC,SAAS,EAAE,MAAM,CAAC;IAAC,YAAY,EAAE,MAAM,EAAE,CAAA;CAAE,GAClG;IAAE,EAAE,EAAE,KAAK,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,IAAI,CAAC,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,EAAE;QAAE,EAAE,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAC;QAAC,SAAS,CAAC,EAAE,OAAO,CAAA;KAAE,EAAE,CAAA;CAAE,CAAC;AAElH,wBAAsB,QAAQ,CAAC,KAAK,EAAE,aAAa,GAAG,OAAO,CAAC,cAAc,CAAC,CAsE5E"}
|
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.
|
|
5
|
+
"version": "1.14.0",
|
|
6
6
|
"description": "Deterministic preflight for the intent you hand to a coding agent: six calibrated gates, the exact blockers named, no model call, no key needed.",
|
|
7
7
|
"long_description": "Pathmode MCP Server runs a deterministic preflight before your coding agent builds: check_intent_readiness scores an intent spec against six calibrated gates (title, objective, outcomes, constraints, edge cases, verification) and names the exact blockers, with no model call and no account. Keyless local mode works out of the box; specs live in intent.md in your repo, plain markdown you own, and skills for drafting, pressure-testing, and handing off intent ride along. Connect a Pathmode workspace with an API key to sync intent and evidence across a team, analyze dependency graphs, and verify pull requests against the outcomes you agreed to.",
|
|
8
8
|
"author": {
|
package/package.json
CHANGED
|
@@ -9,6 +9,8 @@ Invoke the `compile-intent` MCP prompt from the @pathmode/mcp-server. This start
|
|
|
9
9
|
|
|
10
10
|
For each question you ask, propose your best-guess answer based on the conversation so far. Don't make the user generate from a blank page.
|
|
11
11
|
|
|
12
|
+
Before the spec is finished, gather implementation context. You are already sitting in the repo, so read it: which files and modules this change lands in, what already exists there, what it would touch, and how it could be verified. Pass it to `intent_save` as `implementationContext` — in both modes. A brand-new spec has no intent id yet, so there is nothing to address a separate call to; `intent_save` carries the context through as part of the save. Use `record_implementation_context` only to update the context on an intent that already exists. It is free text, sub-headings welcome, and it is advisory — it never changes the readiness verdict. Its job is to stop the implementing agent from rediscovering the codebase from scratch, and to catch the case where the thing being specified half-exists already.
|
|
13
|
+
|
|
12
14
|
When the spec is ready, call the `intent_save` MCP tool to write `intent.md` to the project root.
|
|
13
15
|
|
|
14
16
|
</what-to-do>
|
|
@@ -34,6 +36,9 @@ status: "draft"
|
|
|
34
36
|
## Objective
|
|
35
37
|
[What needs to change and for whom]
|
|
36
38
|
|
|
39
|
+
## Implementation Context
|
|
40
|
+
[What the repo actually looks like where this lands — read from the working tree, not guessed]
|
|
41
|
+
|
|
37
42
|
## Outcomes
|
|
38
43
|
- [ ] [Observable state change, testable in under 5 minutes]
|
|
39
44
|
|
|
@@ -16,7 +16,9 @@ Summarize the session in four buckets:
|
|
|
16
16
|
|
|
17
17
|
For each decision and discovery, call `log_implementation_note` with a self-contained summary. Assume the next reader has none of this conversation's context.
|
|
18
18
|
|
|
19
|
-
If
|
|
19
|
+
If the work is going out as a pull request, name the intent where the merge can find it: branch `intent/<intent-id>`, or `pathmode:<intent-id>` anywhere in the PR body. Without that reference the merge cannot connect the code to the spec, and the whole delivery loop stays dark.
|
|
20
|
+
|
|
21
|
+
If outcomes are delivered, propose a status bump — but read "Status bumps" below first: when a PR is involved, the merge owns that transition, not you. If the spec needs amendments based on what was learned, propose them.
|
|
20
22
|
|
|
21
23
|
</what-to-do>
|
|
22
24
|
|
|
@@ -35,6 +37,8 @@ The "why" and the "what's still implicit" are the parts that disappear if you do
|
|
|
35
37
|
- `shipped` — code is merged AND the outcome is observable in production
|
|
36
38
|
- `verified` — the outcome metric has held for at least one full cycle (e.g., one week, one release)
|
|
37
39
|
|
|
40
|
+
**When the change ships through a pull request, do NOT call `update_intent_status` yourself.** If the workspace has GitHub connected, the merge reads the real diff, grades it against the spec, moves the intent to Shipped, and records what the verdict rested on. The webhook skips intents that are already shipped, so flipping it early does not just duplicate that work — it suppresses it, replacing a diff-backed verdict with an unverified one. Stamp the reference, let the merge fire, and bump the status by hand only when the change will never appear in a PR.
|
|
41
|
+
|
|
38
42
|
Do NOT bump to `shipped` if outcomes are only partially delivered. Either leave the status and log the partial delivery as a note, or propose a spec amendment that scopes the outcome to what was actually shipped.
|
|
39
43
|
|
|
40
44
|
## Difference from a commit message
|
|
@@ -9,7 +9,7 @@ Call the `check_intent_readiness` MCP tool (Pathmode). With no arguments it chec
|
|
|
9
9
|
|
|
10
10
|
Show the user the verdict block exactly as returned — the blocker strings are the calibrated gate output, do not paraphrase them.
|
|
11
11
|
|
|
12
|
-
If the verdict fails: repair, one blocker at a time. For each failing gate, ask the user ONE targeted question, and propose your best-guess answer from the spec and the codebase so they can correct rather than compose. Apply the agreed fix to the spec (`intent_save` in local mode), then re-run `check_intent_readiness`. Stop when the verdict passes or the user explicitly accepts a named gap.
|
|
12
|
+
If the verdict fails: repair, one blocker at a time. For each failing gate, ask the user ONE targeted question, and propose your best-guess answer from the spec and the codebase so they can correct rather than compose. Apply the agreed fix to the spec (`intent_save` in local mode), then re-run `check_intent_readiness`. When you read the codebase to propose an answer, keep what you learned: pass it to `intent_save` as `implementationContext` (or `record_implementation_context` in cloud mode) instead of discarding it. It does not affect the verdict, and it saves the implementing agent from rediscovering what you just read. Stop when the verdict passes or the user explicitly accepts a named gap.
|
|
13
13
|
|
|
14
14
|
If the verdict passes: say so and stop. Do not invent extra requirements beyond the six gates.
|
|
15
15
|
|