@critical-path/mcp 0.11.7 → 0.11.8

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@critical-path/mcp",
3
- "version": "0.11.7",
3
+ "version": "0.11.8",
4
4
  "description": "Standard Model Context Protocol (MCP) server and client-side WebMCP support for Critical Path",
5
5
  "author": "Jack James",
6
6
  "license": "MIT",
@@ -19,24 +19,24 @@
19
19
  },
20
20
  "exports": {
21
21
  ".": {
22
- "import": "./dist/index.js",
23
- "types": "./dist/index.d.ts"
22
+ "types": "./dist/index.d.ts",
23
+ "import": "./dist/index.js"
24
24
  },
25
25
  "./server": {
26
- "import": "./dist/server/index.js",
27
- "types": "./dist/server/index.d.ts"
26
+ "types": "./dist/server/index.d.ts",
27
+ "import": "./dist/server/index.js"
28
28
  },
29
29
  "./web": {
30
- "import": "./dist/web/index.js",
31
- "types": "./dist/web/index.d.ts"
30
+ "types": "./dist/web/index.d.ts",
31
+ "import": "./dist/web/index.js"
32
32
  }
33
33
  },
34
34
  "dependencies": {
35
35
  "@modelcontextprotocol/sdk": "^1.6.0",
36
36
  "zod": "^3.24.0",
37
37
  "zod-to-json-schema": "^3.25.2",
38
- "@critical-path/client": "0.20.5",
39
- "@critical-path/core": "0.36.0"
38
+ "@critical-path/client": "0.20.6",
39
+ "@critical-path/core": "0.36.1"
40
40
  },
41
41
  "devDependencies": {
42
42
  "@types/node": "^24.0.0",
@@ -46,6 +46,10 @@
46
46
  "engines": {
47
47
  "node": ">=24.0.0"
48
48
  },
49
+ "files": [
50
+ "dist",
51
+ "!dist/**/*.test.*"
52
+ ],
49
53
  "scripts": {
50
54
  "build": "tsc --build",
51
55
  "test": "vitest run",
package/CHANGELOG.md DELETED
@@ -1,429 +0,0 @@
1
- # @critical-path/mcp
2
-
3
- ## 0.11.7
4
-
5
- ### Patch Changes
6
-
7
- - Updated dependencies [810d8d1]
8
- - @critical-path/core@0.36.0
9
- - @critical-path/client@0.20.5
10
-
11
- ## 0.11.6
12
-
13
- ### Patch Changes
14
-
15
- - Updated dependencies [b13f7c4]
16
- - @critical-path/core@0.35.0
17
- - @critical-path/client@0.20.4
18
-
19
- ## 0.11.5
20
-
21
- ### Patch Changes
22
-
23
- - Updated dependencies [1cc0d4c]
24
- - @critical-path/core@0.34.0
25
- - @critical-path/client@0.20.3
26
-
27
- ## 0.11.4
28
-
29
- ### Patch Changes
30
-
31
- - Updated dependencies [aa94129]
32
- - @critical-path/core@0.33.0
33
- - @critical-path/client@0.20.2
34
-
35
- ## 0.11.3
36
-
37
- ### Patch Changes
38
-
39
- - Updated dependencies [a3fe03d]
40
- - @critical-path/core@0.32.0
41
- - @critical-path/client@0.20.1
42
-
43
- ## 0.11.2
44
-
45
- ### Patch Changes
46
-
47
- - Updated dependencies [40e5958]
48
- - @critical-path/core@0.31.0
49
- - @critical-path/client@0.20.0
50
-
51
- ## 0.11.1
52
-
53
- ### Patch Changes
54
-
55
- - Updated dependencies [b453472]
56
- - @critical-path/client@0.19.0
57
-
58
- ## 0.11.0
59
-
60
- ### Minor Changes
61
-
62
- - cdb300a: Task filtering and pagination.
63
-
64
- **@critical-path/core**
65
- - New `engine.queryTasks(query)` and `engine.queryActivities(query)` return `Page<T>` (`{ items, nextCursor }`).
66
- - Tasks are ordered oldest first, activities newest first, using keyset cursors on `createdAt` then `id`.
67
- - Task filters: `status[]`, `priority[]`, `assigneeId` (also matches `assignees`), `iterationId`, `deliverableId`, `containerId`, `parentId` (`null` means top-level), `projectIds`.
68
- - Results are limited to projects the actor can read.
69
- - **BREAKING (storage adapters):** `queryTasks` and `queryActivities` are required. `SQLiteStore` filters and pages in SQL and adds indexes for tasks, activities, comments and dependencies. Helpers (`paginate`, `matchesTaskQuery`, cursors, `DEFAULT_PAGE_SIZE` / `MAX_PAGE_SIZE`) are exported for custom adapters.
70
-
71
- **@critical-path/server**
72
- - **BREAKING:** `GET /tasks` and `GET /activities` are paginated (default 100, max 500) and return `nextCursor`. `GET /tasks` accepts the filters above as query parameters. Unknown parameters return `400`.
73
-
74
- **@critical-path/client**
75
- - `getTasks` and `getActivities` follow pagination and still return everything. New `queryTasks` and `queryActivities` return single pages.
76
-
77
- **@critical-path/mcp**
78
- - **BREAKING:** `list_tasks` returns `{ tasks, nextCursor }` and accepts `iterationId`, `limit` and `cursor`. It now filters in the store instead of loading every task.
79
-
80
- ### Patch Changes
81
-
82
- - Updated dependencies [cdb300a]
83
- - @critical-path/core@0.30.0
84
- - @critical-path/client@0.18.0
85
-
86
- ## 0.10.4
87
-
88
- ### Patch Changes
89
-
90
- - Updated dependencies [a019d37]
91
- - @critical-path/core@0.29.0
92
- - @critical-path/client@0.17.0
93
-
94
- ## 0.10.3
95
-
96
- ### Patch Changes
97
-
98
- - 4fbbc40: Complete the plugin system.
99
-
100
- **@critical-path/core**
101
- - `plugin.init(engine)` now runs at startup. `engine.ready` resolves after seeding and every plugin's `init`; init failures reject `ready`.
102
- - **BREAKING:** `customFieldTypes` is now `CustomFieldType[]` (`{ type, label?, validate(value, definition) }`), not unused definitions. Projects may use registered types in `customFieldDefinitions`; unknown types are rejected on project create and update. New `validateCustomFieldDefinitions`, and `validateCustomFieldValues` accepts the registered types.
103
- - **BREAKING:** before-hook output is now validated (workflow transitions, custom fields) like caller input. Hooks cannot change a task's `projectId` (rejected on create, ignored on update), `id` or `createdAt`.
104
- - After-hook errors are logged with the plugin id instead of failing an already-stored write.
105
- - **BREAKING:** `beforeTaskDelete` and `afterTaskDelete` receive the task as a second argument.
106
- - **BREAKING:** required custom fields are enforced even when `customFields` is omitted.
107
- - New plugin `routes` and `middleware` types (`PluginRoute`, `PluginMiddleware`, `PluginRequestContext`).
108
-
109
- **@critical-path/server**
110
- - Serves plugin `routes` (with `:param` patterns) before built-in routes, and runs plugin `middleware` around every routed request after authentication. Handlers receive the caller's `withActor` engine.
111
- - Awaits `engine.ready` before handling requests.
112
-
113
- **@critical-path/mcp**
114
- - Awaits `engine.ready` before running tools.
115
- - Updated dependencies [4fbbc40]
116
- - @critical-path/core@0.28.0
117
- - @critical-path/client@0.16.1
118
-
119
- ## 0.10.2
120
-
121
- ### Patch Changes
122
-
123
- - Updated dependencies [1a516bd]
124
- - @critical-path/core@0.27.0
125
- - @critical-path/client@0.16.0
126
-
127
- ## 0.10.1
128
-
129
- ### Patch Changes
130
-
131
- - 719e844: Role-based authorization and multi-tenancy.
132
-
133
- **@critical-path/core**
134
- - New `authorize` engine option and `createRolePolicy()`:
135
- - Project roles (`viewer`, `contributor`, `project_manager`, `admin`) come from `project.members`.
136
- - Workspace superusers come from `actor.roles`.
137
- - Authors manage their own comments and attachments.
138
- - Checks run on `withActor` views. Unreadable or cross-tenant projects behave as not found, denied actions throw the new `ForbiddenError`, and lists are filtered.
139
- - `Actor` gains `tenantId` and `roles`. Projects, workflows and teams gain `tenantId`, stamped from the actor and never accepted from payloads. Reads are scoped to the actor's tenant, including the default-workflow fallback.
140
- - **BREAKING:** `Project.members` is now `{ userId, role }[]` (was `string[]`). Project creators become `admin` members.
141
- - New `engine.getActivities()` and `engine.getTimeEntries()`, which respect authorization.
142
- - **BREAKING:** on views, presigned uploads require `projectId` and are confined to `projects/<projectId>/`. The presign request schema now requires `projectId`.
143
- - `SQLiteStore` persists `tenantId` (migrated automatically).
144
-
145
- **@critical-path/server**
146
- - `RequestContext` gains `tenantId` and `roles`, which are passed to the actor. `ForbiddenError` maps to `403`. Activities and time entries are read through the engine.
147
-
148
- **@critical-path/client / @critical-path/mcp**
149
- - Rebuilt for the new presign `projectId` requirement and project member shape.
150
- - Updated dependencies [719e844]
151
- - @critical-path/core@0.26.0
152
- - @critical-path/client@0.15.1
153
-
154
- ## 0.10.0
155
-
156
- ### Minor Changes
157
-
158
- - fd79762: **BREAKING:** strict request bodies, no identity in payloads, and CORS off by default.
159
-
160
- **@critical-path/core**
161
- - Request schemas are strict: unknown keys, server-assigned fields and identity fields are rejected instead of stripped.
162
- - Identity is never read from payloads. `updateTask` no longer reads `actorId`/`actorName`/`actorType`/`actor` from the update object; pass them as the third `options` argument or use `withActor`. `addComment`, `addCommentReaction`, `removeCommentReaction` and `createAttachment` take the actor from `withActor`, falling back to an optional `authorId`/`userId`/`uploaderId`, then `'system'`.
163
- - Schemas export request body types (`CreateTaskBody`, `UpdateTaskBody`, ...).
164
-
165
- **@critical-path/server**
166
- - Bodies containing unknown, server-assigned or identity fields return `400`.
167
- - Every request runs as the `getContext` user, or `ANONYMOUS_ACTOR` (`anonymous`). Authors of comments, reactions, attachments and time entries are no longer accepted from bodies.
168
- - `DELETE /comments/:id/reactions` takes `?emoji=` only.
169
- - CORS is off by default (`cors: false`). Pass `cors: { origins: [...] }` to allow cross-origin browsers.
170
-
171
- **@critical-path/client**
172
- - Method parameters use the server's body types, so identity fields no longer type-check. `addCommentReaction`/`removeCommentReaction` take `{ emoji }`; `addTodo`/`toggleTodo` drop the actor options argument.
173
- - New `updateProject`, `deleteProject` and `addDependency`. `uploadAttachmentFile` base64-encodes binary data (previously it sent unusable JSON for `Uint8Array`/`ArrayBuffer`).
174
- - CLI: `--author`, `--actor-id`, `--actor-name`, `--agent-name` and `CRITICAL_PATH_AUTHOR_ID`/`ACTOR_ID`/`AGENT_NAME` are removed; identity comes from the `--key` token via the server's `getContext`.
175
-
176
- **@critical-path/mcp**
177
- - Tool arguments are strict: undeclared arguments return an `isError` result.
178
- - `add_comment` no longer takes `authorId`. With an `engine`, writes are attributed to the new `actor` server option (default `DEFAULT_MCP_ACTOR`).
179
-
180
- **@critical-path/react / @critical-path/svelte**
181
- - `addReaction`/`removeReaction` take `(commentId, emoji)`; comment and attachment inputs no longer accept `authorId`/`uploaderId`. Task, comment and deliverable update parameters use the schema body types.
182
-
183
- ### Patch Changes
184
-
185
- - Updated dependencies [fd79762]
186
- - @critical-path/core@0.25.0
187
- - @critical-path/client@0.15.0
188
-
189
- ## 0.9.0
190
-
191
- ### Minor Changes
192
-
193
- - b54e22c: Validate request bodies with shared zod schemas and publish an OpenAPI document.
194
-
195
- **@critical-path/core**
196
- - New `@critical-path/core/schemas` subpath with create/update schemas for every resource and `parsePayload(schema, data)`. Kept off the package root so browser bundles do not include zod. `zod` is now a dependency of core.
197
- - `ValidationError` carries an optional `issues: { path, message }[]`.
198
-
199
- **@critical-path/server**
200
- - All request bodies are validated. Invalid bodies return `400` with `issues`. Server-assigned fields (`id`, `createdAt`, `updatedAt`, task `key`, owning `projectId` on updates) and unknown keys are stripped, so a `PATCH` can no longer move a task to another project.
201
- - Comments, reactions and attachments require an author unless `getContext` resolves the caller. Attachment `mimeType` and `sizeBytes` default to `application/octet-stream` and `0` for linked files.
202
- - New `GET /openapi.json` and `buildOpenApiDocument()` (OpenAPI 3.1, request bodies generated from the validation schemas).
203
-
204
- **@critical-path/mcp**
205
- - Tool `inputSchema`s are generated from their zod schemas via the new `defineTool`, removing the hand-written JSON copies.
206
-
207
- **@critical-path/svelte**
208
- - Rebuilt with the bundled `@critical-path/mcp` changes.
209
-
210
- ### Patch Changes
211
-
212
- - Updated dependencies [b54e22c]
213
- - @critical-path/core@0.24.0
214
- - @critical-path/client@0.14.9
215
-
216
- ## 0.8.0
217
-
218
- ### Minor Changes
219
-
220
- - 6dd5529: Add request context, authentication hooks and actor attribution.
221
-
222
- **@critical-path/core**
223
- - New `engine.withActor(actor)` returns a per-request view that attributes every mutation (activity log, comment authors, reactions, time entries, attachment uploaders, task reporters) to the actor and ignores identity fields supplied in payloads. New exported `Actor` type.
224
-
225
- **@critical-path/server**
226
- - New router options, accepted by all adapters as a second argument: `getContext` (resolve the caller per request), `requireAuth` (401 without a user), `basePath` (exact mount path), and `cors` (origin allow-list, credentials, or `false`).
227
- - With a resolved user, identity fields in request bodies (`actorId`, `authorId`, `userId`, `uploaderId`) are ignored. Reaction routes no longer require `userId` in the body when a user is resolved.
228
- - `createSvelteKitHandler` options take `getContext(event)` so `event.locals` is available; `configOrRouter` is now optional.
229
- - New `createUniversalHandler(config, options)` for Workers, Deno, Bun and Hono.
230
- - `handleRequest(request, { getContext })` lets custom adapters supply a per-request resolver.
231
-
232
- **@critical-path/mcp**
233
- - CLI `--api` mode reads `CRITICAL_PATH_API_TOKEN` (sent as a Bearer token) and accepts repeatable `--header "Name: value"`, warning when credentials would go over plain http to a remote host.
234
-
235
- ### Patch Changes
236
-
237
- - Updated dependencies [6dd5529]
238
- - @critical-path/core@0.23.0
239
- - @critical-path/client@0.14.8
240
-
241
- ## 0.7.0
242
-
243
- ### Minor Changes
244
-
245
- - b243a37: Fix correctness and safety issues found in a code audit.
246
-
247
- **@critical-path/core**
248
- - `SQLiteStore` now loads `node:sqlite` via `process.getBuiltinModule`, fixing `require is not defined` when constructed from a filename in plain Node ESM.
249
- - Removed the unused `better-sqlite3` runtime dependency.
250
- - `engine.addDependency` now detects indirect cycles (e.g. A → B → C → D → A), not just cycles between direct neighbours.
251
- - Fixed `generateKeyBetween` returning out-of-range, duplicate keys after repeated inserts after the same item. It now throws a `RangeError` when `a >= b`.
252
- - Added `engine.deleteProject(id)`, which deletes a project's tasks through `deleteTask` and publishes a new `project.deleted` event and webhook.
253
- - Added exported `ValidationError` and `NotFoundError` classes. `logTime` now rejects non-numeric hours.
254
-
255
- **@critical-path/server**
256
- - `DELETE /projects/:id`, `POST /tasks/:id/dependencies` and `POST /time-entries` now go through the engine, so cycle checks, hour validation, roll-ups, events and webhooks apply.
257
- - Added `PATCH /projects/:id`.
258
- - `DELETE` on a resource that does not exist now returns `404` instead of `200 { success: false }`.
259
- - Malformed JSON returns `400`, validation errors `400`, `NotFoundError` `404`, and dependency cycles `409`. Unexpected errors return a generic `500` message outside development.
260
- - `OPTIONS` preflight requests return `204` with CORS headers.
261
- - New router/adapter options: `onError(error, request)` to report unexpected errors or return a custom response, and `exposeErrors` to include real messages in 500 responses (defaults to on only when `NODE_ENV === 'development'`).
262
- - `createNextHandler` returns a callable handler that also exposes per-method properties, so `export { handler as GET }` works as documented.
263
-
264
- **@critical-path/mcp**
265
- - Tools excluded via the `tools` option can no longer be called by name.
266
- - Tool arguments are validated with each tool's zod schema; undeclared fields are stripped.
267
- - Tool listings include `title` and MCP `readOnlyHint` / `destructiveHint` annotations.
268
-
269
- **@critical-path/svelte**
270
- - Rebuilt with the bundled `@critical-path/mcp` WebMCP argument validation.
271
-
272
- **@critical-path/client**
273
- - Delete methods resolve to `false` when the server returns `404`, keeping their boolean contract with the new server behaviour.
274
-
275
- ### Patch Changes
276
-
277
- - Updated dependencies [b243a37]
278
- - @critical-path/core@0.22.0
279
- - @critical-path/client@0.14.7
280
-
281
- ## 0.6.9
282
-
283
- ### Patch Changes
284
-
285
- - Updated dependencies [f3301bf]
286
- - @critical-path/core@0.21.0
287
- - @critical-path/client@0.14.6
288
-
289
- ## 0.6.8
290
-
291
- ### Patch Changes
292
-
293
- - Updated dependencies [8acf018]
294
- - @critical-path/client@0.14.5
295
-
296
- ## 0.6.7
297
-
298
- ### Patch Changes
299
-
300
- - Updated dependencies [b8a68dd]
301
- - @critical-path/core@0.20.2
302
- - @critical-path/client@0.14.4
303
-
304
- ## 0.6.6
305
-
306
- ### Patch Changes
307
-
308
- - Updated dependencies [500b353]
309
- - @critical-path/core@0.20.1
310
- - @critical-path/client@0.14.3
311
-
312
- ## 0.6.5
313
-
314
- ### Patch Changes
315
-
316
- - Updated dependencies [c83235b]
317
- - @critical-path/core@0.20.0
318
- - @critical-path/client@0.14.2
319
-
320
- ## 0.6.4
321
-
322
- ### Patch Changes
323
-
324
- - Updated dependencies [f816145]
325
- - @critical-path/core@0.19.1
326
- - @critical-path/client@0.14.1
327
-
328
- ## 0.6.3
329
-
330
- ### Patch Changes
331
-
332
- - Updated dependencies [f539a11]
333
- - @critical-path/client@0.14.0
334
-
335
- ## 0.6.2
336
-
337
- ### Patch Changes
338
-
339
- - Updated dependencies [1c85472]
340
- - @critical-path/client@0.13.1
341
-
342
- ## 0.6.1
343
-
344
- ### Patch Changes
345
-
346
- - Updated dependencies [b86b6fc]
347
- - @critical-path/client@0.13.0
348
-
349
- ## 0.6.0
350
-
351
- ### Minor Changes
352
-
353
- - 31a6dde: Promote task blocking state (`isBlocked: boolean` and `blockedReason: string | null`) to first-class fields on `Task`, `CreateTaskInput`, and `UpdateTaskInput`.
354
-
355
- - **Domain Events**: Introduced `TaskBlockedEvent` (`task.blocked`) and updated `TaskUnblockedEvent` (`task.unblocked`) to support explicit unblocking.
356
- - **Lifecycle Derivation**: Updated `deriveTaskStatus` and `deriveTaskLifecycleState` to reflect `task.isBlocked` directly alongside upstream dependency checks.
357
- - **Engines & Storage**: Added `isBlocked` and `blockedReason` persistence to `SQLiteStore`, `FirebaseStore`, and `InMemoryStore`.
358
- - **MCP Server**: Added `isBlocked` and `blockedReason` parameter options to `create_task` and `update_task` tool schemas.
359
-
360
- ### Patch Changes
361
-
362
- - Updated dependencies [31a6dde]
363
- - Updated dependencies [31a6dde]
364
- - @critical-path/core@0.19.0
365
- - @critical-path/client@0.12.1
366
-
367
- ## 0.5.0
368
-
369
- ### Minor Changes
370
-
371
- - adf44f6: Add headless workload and capacity distribution engine for streamgraphs, stacked area charts, and team capacity planning. Features include contiguous calendar bucketing (`day`, `week`, `month`), multi-dimension grouping (`assignee`, `team`, `taskType`, `priority`, `status`), effort metric distribution (`scheduled`, `logged`, `remaining`, `blended`), tabular zero-filled series matrix for D3 stack layouts, and capacity/utilization thresholds.
372
-
373
- ### Patch Changes
374
-
375
- - Updated dependencies [adf44f6]
376
- - @critical-path/core@0.18.0
377
- - @critical-path/client@0.12.0
378
-
379
- ## 0.4.0
380
-
381
- ### Minor Changes
382
-
383
- - 9c31e8d: Introduce comprehensive Task Metrics, Inferred Actuals, Progress Inference, Earned Value Management (EVM), and Time-Series Progress History Curve Profiling.
384
- - **Inferred Actuals**: Automatic start/completion auto-stamping on workflow transitions with fallback inference from activity logs, plus automatic completion timestamp clearing on task re-open.
385
- - **Reality Delta**: Multi-dimensional variance analysis comparing planned estimates to logged hours (`effortVarianceHours`, `durationVarianceHours`, `accuracyRatio`, `isOverdue`, `isOverEstimate`).
386
- - **Progress Inference**: Deterministic priority waterfall resolving completion progress across explicit values, checklist/todo completion ratios, logged effort, and elapsed schedule time.
387
- - **Earned Value Management (EVM)**: Task-level PV, EV, AC, CV, SV, CPI, and SPI calculations.
388
- - **Time-Series History & Curve Shapes**: Historical timeline reconstruction from activity logs with piecewise interpolation curve classification (`linear`, `s_curve`, `early_surge`, `late_rush`, `stalled`).
389
- - **Full-Stack Integration**: REST endpoints (`/tasks/:id/metrics`, `/tasks/:id/progress-history`), Client SDK methods, React `useTaskMetrics` hook, Svelte 5 `TaskMetricsState`, and MCP tools (`get_task_metrics`, `get_task_progress_history`).
390
-
391
- ### Patch Changes
392
-
393
- - Updated dependencies [9c31e8d]
394
- - @critical-path/core@0.17.0
395
- - @critical-path/client@0.11.0
396
-
397
- ## 0.3.1
398
-
399
- ### Patch Changes
400
-
401
- - b4b2c98: Generalize tool descriptions for timeline ladder of abstraction tools.
402
-
403
- ## 0.3.0
404
-
405
- ### Minor Changes
406
-
407
- - e2a7eef: Introduce Ladder of Abstraction and Critical Path Method (CPM) timeline synthesis to the framework data model:
408
- - **Core Domain**: Multi-scale timeline synthesis model across Macro phase rollups, Standard CPM Gantt schedule (early/late bounds, float/slack calculation, bottleneck identification), and Concrete grounding (deliverables, file attachments, daily effort distribution, and reality deltas). Added `calculateCriticalPath`, `getTimelineLadder`, and `getTaskLadder` to `CriticalPathEngine`.
409
- - **Server Router**: HTTP endpoints `GET /projects/:id/critical-path`, `GET /projects/:id/ladder`, and `GET /tasks/:id/ladder`.
410
- - **Client SDK**: `CriticalPathClient` methods `calculateCriticalPath`, `getTimelineLadder`, and `getTaskLadder`.
411
- - **MCP**: New AI tools `calculate_critical_path`, `get_timeline_ladder`, and `get_task_ladder`.
412
- - **React**: Custom hooks `useTimelineLadder`, `useCriticalPath`, and `useTaskLadder`.
413
- - **Svelte 5**: Svelte 5 Runes state classes `TimelineLadderState` and `CriticalPathState`.
414
-
415
- ### Patch Changes
416
-
417
- - Updated dependencies [e2a7eef]
418
- - @critical-path/core@0.16.0
419
- - @critical-path/client@0.10.0
420
-
421
- ## 0.2.0
422
-
423
- ### Minor Changes
424
-
425
- - ed51060: Add Model Context Protocol (MCP) server and client-side WebMCP support:
426
- - New `@critical-path/mcp` package providing standard MCP server (`createCriticalPathMcpServer`, stdio transport, resources, prompts) and CLI (`npx @critical-path/mcp`).
427
- - Client-side WebMCP browser integration (`registerWebMcpTools`) adhering to W3C WebML CG specification with ambient project scoping.
428
- - First-class React hook `useWebMCP` in `@critical-path/react`.
429
- - First-class Svelte 5 runes state `WebMcpState` and `createWebMcpState` in `@critical-path/svelte`.
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=args.test.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"args.test.d.ts","sourceRoot":"","sources":["../../src/bin/args.test.ts"],"names":[],"mappings":""}
@@ -1,24 +0,0 @@
1
- import { describe, it, expect } from 'vitest';
2
- import { parseArgs, buildApiHeaders, isInsecureRemote } from './args.js';
3
- describe('MCP CLI arguments', () => {
4
- it('collects repeated --header flags', () => {
5
- const options = parseArgs(['--api', 'https://x.test/api', '--header', 'X-Tenant: acme', '--header', 'X-Trace: 1']);
6
- expect(options.api).toBe('https://x.test/api');
7
- expect(options.headers).toEqual(['X-Tenant: acme', 'X-Trace: 1']);
8
- });
9
- it('builds headers from the token env var and flags, with flags taking precedence', () => {
10
- expect(buildApiHeaders(['X-Tenant: acme'], { CRITICAL_PATH_API_TOKEN: 'secret' })).toEqual({
11
- Authorization: 'Bearer secret',
12
- 'X-Tenant': 'acme'
13
- });
14
- expect(buildApiHeaders(['Authorization: Basic abc'], { CRITICAL_PATH_API_TOKEN: 'secret' }).Authorization).toBe('Basic abc');
15
- expect(() => buildApiHeaders(['no-colon'], {})).toThrow(/Expected "Name: value"/);
16
- });
17
- it('flags plain http to remote hosts only', () => {
18
- expect(isInsecureRemote('http://api.example.com')).toBe(true);
19
- expect(isInsecureRemote('https://api.example.com')).toBe(false);
20
- expect(isInsecureRemote('http://localhost:3000/api')).toBe(false);
21
- expect(isInsecureRemote('http://127.0.0.1:3000')).toBe(false);
22
- });
23
- });
24
- //# sourceMappingURL=args.test.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"args.test.js","sourceRoot":"","sources":["../../src/bin/args.test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAC9C,OAAO,EAAE,SAAS,EAAE,eAAe,EAAE,gBAAgB,EAAE,MAAM,WAAW,CAAC;AAEzE,QAAQ,CAAC,mBAAmB,EAAE,GAAG,EAAE;IACjC,EAAE,CAAC,kCAAkC,EAAE,GAAG,EAAE;QAC1C,MAAM,OAAO,GAAG,SAAS,CAAC,CAAC,OAAO,EAAE,oBAAoB,EAAE,UAAU,EAAE,gBAAgB,EAAE,UAAU,EAAE,YAAY,CAAC,CAAC,CAAC;QACnH,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,oBAAoB,CAAC,CAAC;QAC/C,MAAM,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,OAAO,CAAC,CAAC,gBAAgB,EAAE,YAAY,CAAC,CAAC,CAAC;IACpE,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,+EAA+E,EAAE,GAAG,EAAE;QACvF,MAAM,CAAC,eAAe,CAAC,CAAC,gBAAgB,CAAC,EAAE,EAAE,uBAAuB,EAAE,QAAQ,EAAE,CAAC,CAAC,CAAC,OAAO,CAAC;YACzF,aAAa,EAAE,eAAe;YAC9B,UAAU,EAAE,MAAM;SACnB,CAAC,CAAC;QACH,MAAM,CAAC,eAAe,CAAC,CAAC,0BAA0B,CAAC,EAAE,EAAE,uBAAuB,EAAE,QAAQ,EAAE,CAAC,CAAC,aAAa,CAAC,CAAC,IAAI,CAC7G,WAAW,CACZ,CAAC;QACF,MAAM,CAAC,GAAG,EAAE,CAAC,eAAe,CAAC,CAAC,UAAU,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,OAAO,CAAC,wBAAwB,CAAC,CAAC;IACpF,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,uCAAuC,EAAE,GAAG,EAAE;QAC/C,MAAM,CAAC,gBAAgB,CAAC,wBAAwB,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAC9D,MAAM,CAAC,gBAAgB,CAAC,yBAAyB,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;QAChE,MAAM,CAAC,gBAAgB,CAAC,2BAA2B,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;QAClE,MAAM,CAAC,gBAAgB,CAAC,uBAAuB,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IAChE,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=index.test.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.test.d.ts","sourceRoot":"","sources":["../src/index.test.ts"],"names":[],"mappings":""}