@critical-path/server 0.23.4 → 0.24.1
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 +2 -0
- package/dist/openapi.d.ts.map +1 -1
- package/dist/openapi.js +1 -0
- package/dist/openapi.js.map +1 -1
- package/dist/router.d.ts +8 -0
- package/dist/router.d.ts.map +1 -1
- package/dist/router.js +33 -1
- package/dist/router.js.map +1 -1
- package/package.json +12 -8
- package/CHANGELOG.md +0 -678
- package/dist/index.test.d.ts +0 -2
- package/dist/index.test.d.ts.map +0 -1
- package/dist/index.test.js +0 -861
- package/dist/index.test.js.map +0 -1
- package/dist/openapi.test.d.ts +0 -2
- package/dist/openapi.test.d.ts.map +0 -1
- package/dist/openapi.test.js +0 -91
- package/dist/openapi.test.js.map +0 -1
- package/src/adapters/next.ts +0 -42
- package/src/adapters/sveltekit.ts +0 -38
- package/src/adapters/universal.ts +0 -16
- package/src/index.test.ts +0 -1028
- package/src/index.ts +0 -5
- package/src/openapi.test.ts +0 -102
- package/src/openapi.ts +0 -186
- package/src/router.ts +0 -895
- package/tsconfig.json +0 -8
- package/tsconfig.tsbuildinfo +0 -1
package/CHANGELOG.md
DELETED
|
@@ -1,678 +0,0 @@
|
|
|
1
|
-
# @critical-path/server
|
|
2
|
-
|
|
3
|
-
## 0.23.4
|
|
4
|
-
|
|
5
|
-
### Patch Changes
|
|
6
|
-
|
|
7
|
-
- Updated dependencies [b13f7c4]
|
|
8
|
-
- @critical-path/core@0.35.0
|
|
9
|
-
|
|
10
|
-
## 0.23.3
|
|
11
|
-
|
|
12
|
-
### Patch Changes
|
|
13
|
-
|
|
14
|
-
- Updated dependencies [1cc0d4c]
|
|
15
|
-
- @critical-path/core@0.34.0
|
|
16
|
-
|
|
17
|
-
## 0.23.2
|
|
18
|
-
|
|
19
|
-
### Patch Changes
|
|
20
|
-
|
|
21
|
-
- Updated dependencies [aa94129]
|
|
22
|
-
- @critical-path/core@0.33.0
|
|
23
|
-
|
|
24
|
-
## 0.23.1
|
|
25
|
-
|
|
26
|
-
### Patch Changes
|
|
27
|
-
|
|
28
|
-
- Updated dependencies [a3fe03d]
|
|
29
|
-
- @critical-path/core@0.32.0
|
|
30
|
-
|
|
31
|
-
## 0.23.0
|
|
32
|
-
|
|
33
|
-
### Minor Changes
|
|
34
|
-
|
|
35
|
-
- 40e5958: Real S3 uploads and signed URLs, and server-chosen storage keys.
|
|
36
|
-
|
|
37
|
-
**@critical-path/core**
|
|
38
|
-
- **BREAKING:** `S3StorageAdapter` now takes your AWS SDK v3 `client`, `commands` (`PutObjectCommand`, `DeleteObjectCommand`, optional `GetObjectCommand`) and a `presign` function (`getSignedUrl` from `@aws-sdk/s3-request-presigner`). Uploads send real commands and propagate S3 errors; previously failures were swallowed and reported as success. Presigned uploads are actually signed and cover `Content-Type`. New `signedDownloads` for private buckets. The unused `accessKeyId`/`secretAccessKey`/`sessionToken`/`s3Client` options are removed.
|
|
39
|
-
- **BREAKING:** `FirebaseStorageAdapter` requires a `bucket`; it no longer silently uses an in-memory mock. It throws instead of returning a public URL when the bucket cannot sign uploads.
|
|
40
|
-
- **BREAKING:** `engine.getPresignedAttachmentUploadUrl({ projectId, filename, contentType?, expiresInSeconds? })` generates the storage key under `projects/<projectId>/`, instead of accepting a caller-chosen `storageKey`.
|
|
41
|
-
- Attachments created through an actor view must use a `storageKey` under their project's prefix, so callers cannot register (and then delete) other projects' files. Uploads through views are always stored under the project prefix.
|
|
42
|
-
- New `buildStorageKey` (validates path prefixes, crypto-random component) and `contentDispositionFor`. HTML, SVG and script uploads are stored as downloads.
|
|
43
|
-
|
|
44
|
-
**@critical-path/server**
|
|
45
|
-
- **BREAKING:** `POST /attachments/presign` takes `{ projectId, filename, contentType?, expiresInSeconds? }`. `POST /attachments/upload` no longer accepts `pathPrefix`.
|
|
46
|
-
|
|
47
|
-
**@critical-path/client**
|
|
48
|
-
- `getPresignedAttachmentUploadUrl` and `uploadAttachmentFile` use the updated request bodies.
|
|
49
|
-
|
|
50
|
-
### Patch Changes
|
|
51
|
-
|
|
52
|
-
- Updated dependencies [40e5958]
|
|
53
|
-
- @critical-path/core@0.31.0
|
|
54
|
-
|
|
55
|
-
## 0.22.0
|
|
56
|
-
|
|
57
|
-
### Minor Changes
|
|
58
|
-
|
|
59
|
-
- cdb300a: Task filtering and pagination.
|
|
60
|
-
|
|
61
|
-
**@critical-path/core**
|
|
62
|
-
- New `engine.queryTasks(query)` and `engine.queryActivities(query)` return `Page<T>` (`{ items, nextCursor }`).
|
|
63
|
-
- Tasks are ordered oldest first, activities newest first, using keyset cursors on `createdAt` then `id`.
|
|
64
|
-
- Task filters: `status[]`, `priority[]`, `assigneeId` (also matches `assignees`), `iterationId`, `deliverableId`, `containerId`, `parentId` (`null` means top-level), `projectIds`.
|
|
65
|
-
- Results are limited to projects the actor can read.
|
|
66
|
-
- **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.
|
|
67
|
-
|
|
68
|
-
**@critical-path/server**
|
|
69
|
-
- **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`.
|
|
70
|
-
|
|
71
|
-
**@critical-path/client**
|
|
72
|
-
- `getTasks` and `getActivities` follow pagination and still return everything. New `queryTasks` and `queryActivities` return single pages.
|
|
73
|
-
|
|
74
|
-
**@critical-path/mcp**
|
|
75
|
-
- **BREAKING:** `list_tasks` returns `{ tasks, nextCursor }` and accepts `iterationId`, `limit` and `cursor`. It now filters in the store instead of loading every task.
|
|
76
|
-
|
|
77
|
-
### Patch Changes
|
|
78
|
-
|
|
79
|
-
- Updated dependencies [cdb300a]
|
|
80
|
-
- @critical-path/core@0.30.0
|
|
81
|
-
|
|
82
|
-
## 0.21.0
|
|
83
|
-
|
|
84
|
-
### Minor Changes
|
|
85
|
-
|
|
86
|
-
- a019d37: Cascading deletes and dependency removal.
|
|
87
|
-
|
|
88
|
-
**@critical-path/core**
|
|
89
|
-
- **BREAKING:** `deleteTask` now also deletes subtasks (recursively), dependencies, comments, attachments (including stored files and comment attachments) and time entries. Pass `{ subtasks: 'detach' }` to keep subtasks.
|
|
90
|
-
- **BREAKING:** `deleteProject` also deletes containers, iterations, deliverables and project attachments. `project.deleted`'s `deletedTaskIds` includes subtasks.
|
|
91
|
-
- Deleting a container, iteration or deliverable clears the reference on its tasks; nested containers are detached.
|
|
92
|
-
- New `engine.removeDependency(id)` and `dependency.removed` event.
|
|
93
|
-
- **BREAKING (storage adapters):** `DependencyRepository` gains `getDependency` and `removeDependency`, and `TimeEntryRepository` gains `deleteTimeEntry`.
|
|
94
|
-
- `SQLiteStore` no longer returns `null` for unset optional fields.
|
|
95
|
-
- `FirebaseStore` updates now remove fields cleared with `undefined` (for example, reopening a completed task now clears `completedAt`).
|
|
96
|
-
|
|
97
|
-
**@critical-path/server**
|
|
98
|
-
- New `DELETE /tasks/:id/dependencies/:dependencyId`. `DELETE /tasks/:id` accepts `?subtasks=detach`.
|
|
99
|
-
|
|
100
|
-
**@critical-path/client**
|
|
101
|
-
- New `removeDependency(taskId, dependencyId)`. `deleteTask(id, { subtasks })`.
|
|
102
|
-
|
|
103
|
-
### Patch Changes
|
|
104
|
-
|
|
105
|
-
- Updated dependencies [a019d37]
|
|
106
|
-
- @critical-path/core@0.29.0
|
|
107
|
-
|
|
108
|
-
## 0.20.0
|
|
109
|
-
|
|
110
|
-
### Minor Changes
|
|
111
|
-
|
|
112
|
-
- 4fbbc40: Complete the plugin system.
|
|
113
|
-
|
|
114
|
-
**@critical-path/core**
|
|
115
|
-
- `plugin.init(engine)` now runs at startup. `engine.ready` resolves after seeding and every plugin's `init`; init failures reject `ready`.
|
|
116
|
-
- **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.
|
|
117
|
-
- **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`.
|
|
118
|
-
- After-hook errors are logged with the plugin id instead of failing an already-stored write.
|
|
119
|
-
- **BREAKING:** `beforeTaskDelete` and `afterTaskDelete` receive the task as a second argument.
|
|
120
|
-
- **BREAKING:** required custom fields are enforced even when `customFields` is omitted.
|
|
121
|
-
- New plugin `routes` and `middleware` types (`PluginRoute`, `PluginMiddleware`, `PluginRequestContext`).
|
|
122
|
-
|
|
123
|
-
**@critical-path/server**
|
|
124
|
-
- 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.
|
|
125
|
-
- Awaits `engine.ready` before handling requests.
|
|
126
|
-
|
|
127
|
-
**@critical-path/mcp**
|
|
128
|
-
- Awaits `engine.ready` before running tools.
|
|
129
|
-
|
|
130
|
-
### Patch Changes
|
|
131
|
-
|
|
132
|
-
- Updated dependencies [4fbbc40]
|
|
133
|
-
- @critical-path/core@0.28.0
|
|
134
|
-
|
|
135
|
-
## 0.19.0
|
|
136
|
-
|
|
137
|
-
### Minor Changes
|
|
138
|
-
|
|
139
|
-
- 1a516bd: Signed, retried webhooks driven by domain events.
|
|
140
|
-
|
|
141
|
-
**@critical-path/core**
|
|
142
|
-
- **BREAKING:** webhooks are delivered from the domain event bus instead of ad-hoc calls, so every published event is deliverable, including `task.updated`, `time.logged` and `dependency.added`.
|
|
143
|
-
- The payload is now `{ id, event, occurredAt, tenantId?, data }`, where `data` is the domain event payload.
|
|
144
|
-
- A status change delivers both `task.status_changed` and `task.updated` to webhooks subscribed to both.
|
|
145
|
-
- Deliveries carry `X-CriticalPath-Event`, `X-CriticalPath-Delivery` (stable across retries), `X-CriticalPath-Timestamp` and `X-CriticalPath-Signature` (HMAC-SHA256). New exports: `verifyWebhookSignature`, `signWebhookPayload`, `generateWebhookSecret`.
|
|
146
|
-
- New `webhookDelivery` engine option:
|
|
147
|
-
- `timeoutMs` (default 10s), `maxAttempts` (default 5) and exponential `retryBaseDelayMs`.
|
|
148
|
-
- A pluggable `queue`; the default is in-process.
|
|
149
|
-
- `allowPrivateUrls` (default `false`).
|
|
150
|
-
- `onDelivered` and `onDeliveryFailed` callbacks.
|
|
151
|
-
- `engine.webhooks` exposes `deliver(job)` for custom queues and `idle()` for tests.
|
|
152
|
-
- `config.webhooks` are now honoured as static webhooks.
|
|
153
|
-
- New engine methods `getWebhooks`, `getWebhook`, `createWebhook` and `updateWebhook`/`deleteWebhook`. They require `workspace.manage` and are tenant-scoped. Secrets are generated when omitted, returned only on creation, and redacted afterwards (`PublicWebhook.hasSecret`).
|
|
154
|
-
- **BREAKING:** `WebhookRepository` gains `getWebhook`, `updateWebhook` and `deleteWebhook`; custom storage adapters must implement them. `Webhook` gains `tenantId`, and `WebhookEvent` is now any domain event name or `'*'`. SQLite now persists the webhook `name` and `tenantId`.
|
|
155
|
-
- New `DOMAIN_EVENT_NAMES`. The `project.deleted` and `workflow.deleted` payloads include `tenantId`; `attachment.deleted` includes `projectId`.
|
|
156
|
-
|
|
157
|
-
**@critical-path/server**
|
|
158
|
-
- New `GET/POST /webhooks` and `GET/PATCH/DELETE /webhooks/:id` routes. Event names are validated.
|
|
159
|
-
|
|
160
|
-
**@critical-path/client**
|
|
161
|
-
- New `getWebhooks`, `createWebhook`, `updateWebhook` and `deleteWebhook`.
|
|
162
|
-
|
|
163
|
-
### Patch Changes
|
|
164
|
-
|
|
165
|
-
- Updated dependencies [1a516bd]
|
|
166
|
-
- @critical-path/core@0.27.0
|
|
167
|
-
|
|
168
|
-
## 0.18.0
|
|
169
|
-
|
|
170
|
-
### Minor Changes
|
|
171
|
-
|
|
172
|
-
- 719e844: Role-based authorization and multi-tenancy.
|
|
173
|
-
|
|
174
|
-
**@critical-path/core**
|
|
175
|
-
- New `authorize` engine option and `createRolePolicy()`:
|
|
176
|
-
- Project roles (`viewer`, `contributor`, `project_manager`, `admin`) come from `project.members`.
|
|
177
|
-
- Workspace superusers come from `actor.roles`.
|
|
178
|
-
- Authors manage their own comments and attachments.
|
|
179
|
-
- Checks run on `withActor` views. Unreadable or cross-tenant projects behave as not found, denied actions throw the new `ForbiddenError`, and lists are filtered.
|
|
180
|
-
- `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.
|
|
181
|
-
- **BREAKING:** `Project.members` is now `{ userId, role }[]` (was `string[]`). Project creators become `admin` members.
|
|
182
|
-
- New `engine.getActivities()` and `engine.getTimeEntries()`, which respect authorization.
|
|
183
|
-
- **BREAKING:** on views, presigned uploads require `projectId` and are confined to `projects/<projectId>/`. The presign request schema now requires `projectId`.
|
|
184
|
-
- `SQLiteStore` persists `tenantId` (migrated automatically).
|
|
185
|
-
|
|
186
|
-
**@critical-path/server**
|
|
187
|
-
- `RequestContext` gains `tenantId` and `roles`, which are passed to the actor. `ForbiddenError` maps to `403`. Activities and time entries are read through the engine.
|
|
188
|
-
|
|
189
|
-
**@critical-path/client / @critical-path/mcp**
|
|
190
|
-
- Rebuilt for the new presign `projectId` requirement and project member shape.
|
|
191
|
-
|
|
192
|
-
### Patch Changes
|
|
193
|
-
|
|
194
|
-
- Updated dependencies [719e844]
|
|
195
|
-
- @critical-path/core@0.26.0
|
|
196
|
-
|
|
197
|
-
## 0.17.0
|
|
198
|
-
|
|
199
|
-
### Minor Changes
|
|
200
|
-
|
|
201
|
-
- fd79762: **BREAKING:** strict request bodies, no identity in payloads, and CORS off by default.
|
|
202
|
-
|
|
203
|
-
**@critical-path/core**
|
|
204
|
-
- Request schemas are strict: unknown keys, server-assigned fields and identity fields are rejected instead of stripped.
|
|
205
|
-
- 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'`.
|
|
206
|
-
- Schemas export request body types (`CreateTaskBody`, `UpdateTaskBody`, ...).
|
|
207
|
-
|
|
208
|
-
**@critical-path/server**
|
|
209
|
-
- Bodies containing unknown, server-assigned or identity fields return `400`.
|
|
210
|
-
- 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.
|
|
211
|
-
- `DELETE /comments/:id/reactions` takes `?emoji=` only.
|
|
212
|
-
- CORS is off by default (`cors: false`). Pass `cors: { origins: [...] }` to allow cross-origin browsers.
|
|
213
|
-
|
|
214
|
-
**@critical-path/client**
|
|
215
|
-
- 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.
|
|
216
|
-
- New `updateProject`, `deleteProject` and `addDependency`. `uploadAttachmentFile` base64-encodes binary data (previously it sent unusable JSON for `Uint8Array`/`ArrayBuffer`).
|
|
217
|
-
- 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`.
|
|
218
|
-
|
|
219
|
-
**@critical-path/mcp**
|
|
220
|
-
- Tool arguments are strict: undeclared arguments return an `isError` result.
|
|
221
|
-
- `add_comment` no longer takes `authorId`. With an `engine`, writes are attributed to the new `actor` server option (default `DEFAULT_MCP_ACTOR`).
|
|
222
|
-
|
|
223
|
-
**@critical-path/react / @critical-path/svelte**
|
|
224
|
-
- `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.
|
|
225
|
-
|
|
226
|
-
### Patch Changes
|
|
227
|
-
|
|
228
|
-
- Updated dependencies [fd79762]
|
|
229
|
-
- @critical-path/core@0.25.0
|
|
230
|
-
|
|
231
|
-
## 0.16.0
|
|
232
|
-
|
|
233
|
-
### Minor Changes
|
|
234
|
-
|
|
235
|
-
- b54e22c: Validate request bodies with shared zod schemas and publish an OpenAPI document.
|
|
236
|
-
|
|
237
|
-
**@critical-path/core**
|
|
238
|
-
- 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.
|
|
239
|
-
- `ValidationError` carries an optional `issues: { path, message }[]`.
|
|
240
|
-
|
|
241
|
-
**@critical-path/server**
|
|
242
|
-
- 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.
|
|
243
|
-
- 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.
|
|
244
|
-
- New `GET /openapi.json` and `buildOpenApiDocument()` (OpenAPI 3.1, request bodies generated from the validation schemas).
|
|
245
|
-
|
|
246
|
-
**@critical-path/mcp**
|
|
247
|
-
- Tool `inputSchema`s are generated from their zod schemas via the new `defineTool`, removing the hand-written JSON copies.
|
|
248
|
-
|
|
249
|
-
**@critical-path/svelte**
|
|
250
|
-
- Rebuilt with the bundled `@critical-path/mcp` changes.
|
|
251
|
-
|
|
252
|
-
### Patch Changes
|
|
253
|
-
|
|
254
|
-
- Updated dependencies [b54e22c]
|
|
255
|
-
- @critical-path/core@0.24.0
|
|
256
|
-
|
|
257
|
-
## 0.15.0
|
|
258
|
-
|
|
259
|
-
### Minor Changes
|
|
260
|
-
|
|
261
|
-
- 6dd5529: Add request context, authentication hooks and actor attribution.
|
|
262
|
-
|
|
263
|
-
**@critical-path/core**
|
|
264
|
-
- 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.
|
|
265
|
-
|
|
266
|
-
**@critical-path/server**
|
|
267
|
-
- 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`).
|
|
268
|
-
- 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.
|
|
269
|
-
- `createSvelteKitHandler` options take `getContext(event)` so `event.locals` is available; `configOrRouter` is now optional.
|
|
270
|
-
- New `createUniversalHandler(config, options)` for Workers, Deno, Bun and Hono.
|
|
271
|
-
- `handleRequest(request, { getContext })` lets custom adapters supply a per-request resolver.
|
|
272
|
-
|
|
273
|
-
**@critical-path/mcp**
|
|
274
|
-
- 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.
|
|
275
|
-
|
|
276
|
-
### Patch Changes
|
|
277
|
-
|
|
278
|
-
- Updated dependencies [6dd5529]
|
|
279
|
-
- @critical-path/core@0.23.0
|
|
280
|
-
|
|
281
|
-
## 0.14.0
|
|
282
|
-
|
|
283
|
-
### Minor Changes
|
|
284
|
-
|
|
285
|
-
- b243a37: Fix correctness and safety issues found in a code audit.
|
|
286
|
-
|
|
287
|
-
**@critical-path/core**
|
|
288
|
-
- `SQLiteStore` now loads `node:sqlite` via `process.getBuiltinModule`, fixing `require is not defined` when constructed from a filename in plain Node ESM.
|
|
289
|
-
- Removed the unused `better-sqlite3` runtime dependency.
|
|
290
|
-
- `engine.addDependency` now detects indirect cycles (e.g. A → B → C → D → A), not just cycles between direct neighbours.
|
|
291
|
-
- Fixed `generateKeyBetween` returning out-of-range, duplicate keys after repeated inserts after the same item. It now throws a `RangeError` when `a >= b`.
|
|
292
|
-
- Added `engine.deleteProject(id)`, which deletes a project's tasks through `deleteTask` and publishes a new `project.deleted` event and webhook.
|
|
293
|
-
- Added exported `ValidationError` and `NotFoundError` classes. `logTime` now rejects non-numeric hours.
|
|
294
|
-
|
|
295
|
-
**@critical-path/server**
|
|
296
|
-
- `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.
|
|
297
|
-
- Added `PATCH /projects/:id`.
|
|
298
|
-
- `DELETE` on a resource that does not exist now returns `404` instead of `200 { success: false }`.
|
|
299
|
-
- Malformed JSON returns `400`, validation errors `400`, `NotFoundError` `404`, and dependency cycles `409`. Unexpected errors return a generic `500` message outside development.
|
|
300
|
-
- `OPTIONS` preflight requests return `204` with CORS headers.
|
|
301
|
-
- 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'`).
|
|
302
|
-
- `createNextHandler` returns a callable handler that also exposes per-method properties, so `export { handler as GET }` works as documented.
|
|
303
|
-
|
|
304
|
-
**@critical-path/mcp**
|
|
305
|
-
- Tools excluded via the `tools` option can no longer be called by name.
|
|
306
|
-
- Tool arguments are validated with each tool's zod schema; undeclared fields are stripped.
|
|
307
|
-
- Tool listings include `title` and MCP `readOnlyHint` / `destructiveHint` annotations.
|
|
308
|
-
|
|
309
|
-
**@critical-path/svelte**
|
|
310
|
-
- Rebuilt with the bundled `@critical-path/mcp` WebMCP argument validation.
|
|
311
|
-
|
|
312
|
-
**@critical-path/client**
|
|
313
|
-
- Delete methods resolve to `false` when the server returns `404`, keeping their boolean contract with the new server behaviour.
|
|
314
|
-
|
|
315
|
-
### Patch Changes
|
|
316
|
-
|
|
317
|
-
- Updated dependencies [b243a37]
|
|
318
|
-
- @critical-path/core@0.22.0
|
|
319
|
-
|
|
320
|
-
## 0.13.5
|
|
321
|
-
|
|
322
|
-
### Patch Changes
|
|
323
|
-
|
|
324
|
-
- Updated dependencies [f3301bf]
|
|
325
|
-
- @critical-path/core@0.21.0
|
|
326
|
-
|
|
327
|
-
## 0.13.4
|
|
328
|
-
|
|
329
|
-
### Patch Changes
|
|
330
|
-
|
|
331
|
-
- Updated dependencies [b8a68dd]
|
|
332
|
-
- @critical-path/core@0.20.2
|
|
333
|
-
|
|
334
|
-
## 0.13.3
|
|
335
|
-
|
|
336
|
-
### Patch Changes
|
|
337
|
-
|
|
338
|
-
- Updated dependencies [500b353]
|
|
339
|
-
- @critical-path/core@0.20.1
|
|
340
|
-
|
|
341
|
-
## 0.13.2
|
|
342
|
-
|
|
343
|
-
### Patch Changes
|
|
344
|
-
|
|
345
|
-
- Updated dependencies [c83235b]
|
|
346
|
-
- @critical-path/core@0.20.0
|
|
347
|
-
|
|
348
|
-
## 0.13.1
|
|
349
|
-
|
|
350
|
-
### Patch Changes
|
|
351
|
-
|
|
352
|
-
- Updated dependencies [f816145]
|
|
353
|
-
- @critical-path/core@0.19.1
|
|
354
|
-
|
|
355
|
-
## 0.13.0
|
|
356
|
-
|
|
357
|
-
### Minor Changes
|
|
358
|
-
|
|
359
|
-
- b86b6fc: Introduce `critical-path` CLI commands (`status`, `block`, `clarify`, `propose`, `deliverable`, `comment`) and `CriticalPathClient.updateStatus` for agent execution telemetry and task management.
|
|
360
|
-
|
|
361
|
-
## 0.12.1
|
|
362
|
-
|
|
363
|
-
### Patch Changes
|
|
364
|
-
|
|
365
|
-
- Updated dependencies [31a6dde]
|
|
366
|
-
- Updated dependencies [31a6dde]
|
|
367
|
-
- @critical-path/core@0.19.0
|
|
368
|
-
|
|
369
|
-
## 0.12.0
|
|
370
|
-
|
|
371
|
-
### Minor Changes
|
|
372
|
-
|
|
373
|
-
- 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.
|
|
374
|
-
|
|
375
|
-
### Patch Changes
|
|
376
|
-
|
|
377
|
-
- Updated dependencies [adf44f6]
|
|
378
|
-
- @critical-path/core@0.18.0
|
|
379
|
-
|
|
380
|
-
## 0.11.0
|
|
381
|
-
|
|
382
|
-
### Minor Changes
|
|
383
|
-
|
|
384
|
-
- 9c31e8d: Introduce comprehensive Task Metrics, Inferred Actuals, Progress Inference, Earned Value Management (EVM), and Time-Series Progress History Curve Profiling.
|
|
385
|
-
- **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.
|
|
386
|
-
- **Reality Delta**: Multi-dimensional variance analysis comparing planned estimates to logged hours (`effortVarianceHours`, `durationVarianceHours`, `accuracyRatio`, `isOverdue`, `isOverEstimate`).
|
|
387
|
-
- **Progress Inference**: Deterministic priority waterfall resolving completion progress across explicit values, checklist/todo completion ratios, logged effort, and elapsed schedule time.
|
|
388
|
-
- **Earned Value Management (EVM)**: Task-level PV, EV, AC, CV, SV, CPI, and SPI calculations.
|
|
389
|
-
- **Time-Series History & Curve Shapes**: Historical timeline reconstruction from activity logs with piecewise interpolation curve classification (`linear`, `s_curve`, `early_surge`, `late_rush`, `stalled`).
|
|
390
|
-
- **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`).
|
|
391
|
-
|
|
392
|
-
### Patch Changes
|
|
393
|
-
|
|
394
|
-
- Updated dependencies [9c31e8d]
|
|
395
|
-
- @critical-path/core@0.17.0
|
|
396
|
-
|
|
397
|
-
## 0.10.0
|
|
398
|
-
|
|
399
|
-
### Minor Changes
|
|
400
|
-
|
|
401
|
-
- e2a7eef: Introduce Ladder of Abstraction and Critical Path Method (CPM) timeline synthesis to the framework data model:
|
|
402
|
-
- **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`.
|
|
403
|
-
- **Server Router**: HTTP endpoints `GET /projects/:id/critical-path`, `GET /projects/:id/ladder`, and `GET /tasks/:id/ladder`.
|
|
404
|
-
- **Client SDK**: `CriticalPathClient` methods `calculateCriticalPath`, `getTimelineLadder`, and `getTaskLadder`.
|
|
405
|
-
- **MCP**: New AI tools `calculate_critical_path`, `get_timeline_ladder`, and `get_task_ladder`.
|
|
406
|
-
- **React**: Custom hooks `useTimelineLadder`, `useCriticalPath`, and `useTaskLadder`.
|
|
407
|
-
- **Svelte 5**: Svelte 5 Runes state classes `TimelineLadderState` and `CriticalPathState`.
|
|
408
|
-
|
|
409
|
-
### Patch Changes
|
|
410
|
-
|
|
411
|
-
- Updated dependencies [e2a7eef]
|
|
412
|
-
- @critical-path/core@0.16.0
|
|
413
|
-
|
|
414
|
-
## 0.9.2
|
|
415
|
-
|
|
416
|
-
### Patch Changes
|
|
417
|
-
|
|
418
|
-
- Updated dependencies [dbd2072]
|
|
419
|
-
- @critical-path/core@0.15.2
|
|
420
|
-
|
|
421
|
-
## 0.9.1
|
|
422
|
-
|
|
423
|
-
### Patch Changes
|
|
424
|
-
|
|
425
|
-
- Updated dependencies [f53afab]
|
|
426
|
-
- @critical-path/core@0.15.1
|
|
427
|
-
|
|
428
|
-
## 0.9.0
|
|
429
|
-
|
|
430
|
-
### Minor Changes
|
|
431
|
-
|
|
432
|
-
- 21eb85c: Implement Universal Semantic Statuses & System-Derived Implied Statuses (3-Tier Status Architecture)
|
|
433
|
-
|
|
434
|
-
- **Tier 1 (Universal Semantic Statuses)**: Defined canonical status enum `SemanticStatus = 'not_started' | 'in_progress' | 'completed' | 'canceled'` providing universal semantic meaning across any industry domain.
|
|
435
|
-
- **Tier 2 (Workflow-Defined Statuses)**: Updated `StatusDefinition` to map domain-specific statuses to a semantic `category`. Updated built-in workflows (Software, Creative, VFX, Simple) to classify statuses by category.
|
|
436
|
-
- **Tier 3 (System-Derived Implied Statuses)**: Added `deriveTaskLifecycleState` and `engine.getTaskLifecycleState(taskId)` returning dynamic indicators:
|
|
437
|
-
- Dependency: `isReady`, `isBlocked`, `blockingTaskIds`
|
|
438
|
-
- Schedule: `isOverdue`, `isUpcoming`, `isUnplanned`
|
|
439
|
-
- Ownership: `isUnassigned`, `isStalled`
|
|
440
|
-
- Estimate/Pace: `isOverEstimate`, `isPaceWarning`
|
|
441
|
-
- Convenience flags: `isDone`, `isActive`, `isCancelled`
|
|
442
|
-
- **Domain Entities & Engine**: Added automatic timestamp progression (`actualStartDate`, `actualEndDate`), progress completion, and event emission driven by semantic status categories.
|
|
443
|
-
- **React UI Hooks**: Updated `useKanban` to support dynamic custom workflow columns without dropping tasks, plus added `groupBy: 'semantic' | 'workflow'` option.
|
|
444
|
-
- **Client SDK**: Added `client.getTaskLifecycleState(taskId)`.
|
|
445
|
-
|
|
446
|
-
### Patch Changes
|
|
447
|
-
|
|
448
|
-
- Updated dependencies [21eb85c]
|
|
449
|
-
- @critical-path/core@0.15.0
|
|
450
|
-
|
|
451
|
-
## 0.8.4
|
|
452
|
-
|
|
453
|
-
### Patch Changes
|
|
454
|
-
|
|
455
|
-
- Updated dependencies [3dc2798]
|
|
456
|
-
- @critical-path/core@0.14.0
|
|
457
|
-
|
|
458
|
-
## 0.8.3
|
|
459
|
-
|
|
460
|
-
### Patch Changes
|
|
461
|
-
|
|
462
|
-
- Updated dependencies [573a4fa]
|
|
463
|
-
- @critical-path/core@0.13.3
|
|
464
|
-
|
|
465
|
-
## 0.8.2
|
|
466
|
-
|
|
467
|
-
### Patch Changes
|
|
468
|
-
|
|
469
|
-
- Updated dependencies [03d269c]
|
|
470
|
-
- @critical-path/core@0.13.2
|
|
471
|
-
|
|
472
|
-
## 0.8.1
|
|
473
|
-
|
|
474
|
-
### Patch Changes
|
|
475
|
-
|
|
476
|
-
- Updated dependencies [a7d17c0]
|
|
477
|
-
- @critical-path/core@0.13.1
|
|
478
|
-
|
|
479
|
-
## 0.8.0
|
|
480
|
-
|
|
481
|
-
### Minor Changes
|
|
482
|
-
|
|
483
|
-
- a4a464b: Support multi-assignees and backward workflow status transitions:
|
|
484
|
-
- Add `TaskAssignee` interface (`id`, `name`, `role`, `type: 'user' | 'agent' | 'team'`, `avatarUrl`) and `assignees?: TaskAssignee[]` to `Task` entity and SQLite storage adapter.
|
|
485
|
-
- Add `getAllowedPreviousStatuses(workflow, currentStatus)` utility and `CriticalPathEngine.getAllowedPreviousTaskTransitions(taskId)` for calculating valid backward transitions.
|
|
486
|
-
- Expose `allowedPreviousStatuses` in server endpoint `GET /tasks/:taskId/transitions`.
|
|
487
|
-
- Add `getAllowedPreviousTaskTransitions(taskId)` to `CriticalPathClient` SDK.
|
|
488
|
-
|
|
489
|
-
### Patch Changes
|
|
490
|
-
|
|
491
|
-
- Updated dependencies [a4a464b]
|
|
492
|
-
- @critical-path/core@0.13.0
|
|
493
|
-
|
|
494
|
-
## 0.7.0
|
|
495
|
-
|
|
496
|
-
### Minor Changes
|
|
497
|
-
|
|
498
|
-
- 5a5930f: Add first-class Deliverable entity, Creative Workflow presets, and reactive UI bindings:
|
|
499
|
-
- `@critical-path/core`: Added `Deliverable` entity, `DeliverableSummary` rollup computation, `DEFAULT_CREATIVE_WORKFLOW` preset, `deliverableId` on tasks, store implementations (InMemory, SQLite, Firebase), domain events, and webhook integration.
|
|
500
|
-
- `@critical-path/server`: Added RESTful API endpoints for `/deliverables` and `/deliverables/:id/summary`.
|
|
501
|
-
- `@critical-path/client`: Added deliverable management and summary methods to `CriticalPathClient`.
|
|
502
|
-
- `@critical-path/react`: Added `useDeliverables` and `useDeliverableSummary` React hooks.
|
|
503
|
-
- `@critical-path/svelte`: Added `DeliverableState` and `createDeliverableState` Svelte 5 Runes state management.
|
|
504
|
-
|
|
505
|
-
### Patch Changes
|
|
506
|
-
|
|
507
|
-
- Updated dependencies [5a5930f]
|
|
508
|
-
- @critical-path/core@0.12.0
|
|
509
|
-
|
|
510
|
-
## 0.6.0
|
|
511
|
-
|
|
512
|
-
### Minor Changes
|
|
513
|
-
|
|
514
|
-
- 55549e9: Support @mentions in comments with extraction and segmentation utilities
|
|
515
|
-
|
|
516
|
-
- Add `mentions?: string[]` to `Comment` interface
|
|
517
|
-
- Add `extractMentions` and `parseMentionSegments` utilities for mention parsing and UI rendering
|
|
518
|
-
- Auto-extract and populate mentions during `addComment` and `updateComment` in the engine
|
|
519
|
-
- Update SQLite comments schema with `mentions` column and migration
|
|
520
|
-
- Preserve and pass through mentions in server routes, client SDK, and Svelte bindings
|
|
521
|
-
|
|
522
|
-
### Patch Changes
|
|
523
|
-
|
|
524
|
-
- Updated dependencies [55549e9]
|
|
525
|
-
- @critical-path/core@0.11.0
|
|
526
|
-
|
|
527
|
-
## 0.5.0
|
|
528
|
-
|
|
529
|
-
### Minor Changes
|
|
530
|
-
|
|
531
|
-
- e9003d3: Add emoji reactions support for comment conversations with domain events, deduplication, REST endpoints, client SDK, and React/Svelte state integrations.
|
|
532
|
-
|
|
533
|
-
### Patch Changes
|
|
534
|
-
|
|
535
|
-
- Updated dependencies [e9003d3]
|
|
536
|
-
- @critical-path/core@0.10.0
|
|
537
|
-
|
|
538
|
-
## 0.4.4
|
|
539
|
-
|
|
540
|
-
### Patch Changes
|
|
541
|
-
|
|
542
|
-
- Updated dependencies [e983557]
|
|
543
|
-
- @critical-path/core@0.9.0
|
|
544
|
-
|
|
545
|
-
## 0.4.3
|
|
546
|
-
|
|
547
|
-
### Patch Changes
|
|
548
|
-
|
|
549
|
-
- 2d5ff04: fix(core): decode base64 strings and data URIs into binary Uint8Array in storage adapters
|
|
550
|
-
- Updated dependencies [2d5ff04]
|
|
551
|
-
- @critical-path/core@0.8.3
|
|
552
|
-
|
|
553
|
-
## 0.4.2
|
|
554
|
-
|
|
555
|
-
### Patch Changes
|
|
556
|
-
|
|
557
|
-
- fix(core): decode base64 strings and data URIs into binary Uint8Array in storage adapters
|
|
558
|
-
- Updated dependencies
|
|
559
|
-
- @critical-path/core@0.8.2
|
|
560
|
-
|
|
561
|
-
## 0.4.1
|
|
562
|
-
|
|
563
|
-
### Patch Changes
|
|
564
|
-
|
|
565
|
-
- 315425c: fix(core): generate Firebase Storage download tokens and construct valid public URLs
|
|
566
|
-
- Updated dependencies [315425c]
|
|
567
|
-
- @critical-path/core@0.8.1
|
|
568
|
-
|
|
569
|
-
## 0.4.0
|
|
570
|
-
|
|
571
|
-
### Minor Changes
|
|
572
|
-
|
|
573
|
-
- 1811922: Add attachment URL validation against large data URIs, sanitize undefined properties in FirebaseStore, provide direct attachment upload routes & SDK methods, and introduce TaskActivityState for combined comment & attachment threads.
|
|
574
|
-
|
|
575
|
-
### Patch Changes
|
|
576
|
-
|
|
577
|
-
- Updated dependencies [1811922]
|
|
578
|
-
- @critical-path/core@0.8.0
|
|
579
|
-
|
|
580
|
-
## 0.3.0
|
|
581
|
-
|
|
582
|
-
### Minor Changes
|
|
583
|
-
|
|
584
|
-
- a48a04a: Add threaded conversations, attachment metadata management, and storage adapters (S3 & Firebase Storage):
|
|
585
|
-
|
|
586
|
-
- **`@critical-path/core`**:
|
|
587
|
-
- Added `Attachment` entity, `CreateAttachmentInput`, `UploadFileInput`, and `FileStorageAdapter` contracts.
|
|
588
|
-
- Added `InMemoryFileStore`, duck-typed `S3StorageAdapter` (compatible with AWS SDK v3, v2, MinIO, and Cloudflare R2), and `FirebaseStorageAdapter` (compatible with Google Cloud Storage and Firebase Admin SDK).
|
|
589
|
-
- Extended `Comment` with `authorType` (`user`, `agent`, `system`) and `parentId` for threaded discussions.
|
|
590
|
-
- Implemented full comment and attachment repository methods across `InMemoryStore`, `SQLiteStore`, and `FirebaseStore`.
|
|
591
|
-
- Added engine operations for upload, presigning, and deleting attachments with domain events (`comment.*`, `attachment.*`) and webhooks.
|
|
592
|
-
|
|
593
|
-
- **`@critical-path/server`**:
|
|
594
|
-
- Added RESTful routes for comments (`GET/POST /tasks/:taskId/comments`, `GET/POST /comments`, `GET/PATCH/DELETE /comments/:id`).
|
|
595
|
-
- Added RESTful routes for attachments (`GET/POST /tasks/:taskId/attachments`, `GET/POST /attachments`, `GET/DELETE /attachments/:id`, `POST /attachments/presign`).
|
|
596
|
-
|
|
597
|
-
- **`@critical-path/client`**:
|
|
598
|
-
- Added SDK methods `getComments`, `getComment`, `addComment`, `updateComment`, `deleteComment`.
|
|
599
|
-
- Added SDK methods `getAttachments`, `getAttachment`, `createAttachment`, `deleteAttachment`, and `getPresignedAttachmentUploadUrl`.
|
|
600
|
-
|
|
601
|
-
- **`@critical-path/react`**:
|
|
602
|
-
- Added `useComments(taskId)` with reactive thread tree derivation (`threads` containing nested `replies`) and comment mutations.
|
|
603
|
-
- Added `useAttachments(filter)` with attachment creation and deletion.
|
|
604
|
-
|
|
605
|
-
- **`@critical-path/svelte`**:
|
|
606
|
-
- Added Svelte 5 Rune-based `CommentState` / `createCommentState(client, taskId)` with derived threaded hierarchy.
|
|
607
|
-
- Added Svelte 5 Rune-based `AttachmentState` / `createAttachmentState(client, filter)`.
|
|
608
|
-
|
|
609
|
-
### Patch Changes
|
|
610
|
-
|
|
611
|
-
- Updated dependencies [a48a04a]
|
|
612
|
-
- @critical-path/core@0.7.0
|
|
613
|
-
|
|
614
|
-
## 0.2.4
|
|
615
|
-
|
|
616
|
-
### Patch Changes
|
|
617
|
-
|
|
618
|
-
- Updated dependencies [6e9dece]
|
|
619
|
-
- @critical-path/core@0.6.0
|
|
620
|
-
|
|
621
|
-
## 0.2.3
|
|
622
|
-
|
|
623
|
-
### Patch Changes
|
|
624
|
-
|
|
625
|
-
- Updated dependencies [c24b76c]
|
|
626
|
-
- @critical-path/core@0.5.2
|
|
627
|
-
|
|
628
|
-
## 0.2.2
|
|
629
|
-
|
|
630
|
-
### Patch Changes
|
|
631
|
-
|
|
632
|
-
- Updated dependencies [34067fd]
|
|
633
|
-
- @critical-path/core@0.5.1
|
|
634
|
-
|
|
635
|
-
## 0.2.1
|
|
636
|
-
|
|
637
|
-
### Patch Changes
|
|
638
|
-
|
|
639
|
-
- Updated dependencies [83a5c17]
|
|
640
|
-
- @critical-path/core@0.5.0
|
|
641
|
-
|
|
642
|
-
## 0.2.0
|
|
643
|
-
|
|
644
|
-
### Minor Changes
|
|
645
|
-
|
|
646
|
-
- 35576a6: Introduce Workflow concept to the project management model with status definitions, allowed transition validation, task types, webhook events (workflow.created, workflow.updated, workflow.deleted), server routes, SDK methods, and React/Svelte state hooks.
|
|
647
|
-
|
|
648
|
-
### Patch Changes
|
|
649
|
-
|
|
650
|
-
- Updated dependencies [35576a6]
|
|
651
|
-
- @critical-path/core@0.4.0
|
|
652
|
-
|
|
653
|
-
## 0.1.5
|
|
654
|
-
|
|
655
|
-
### Patch Changes
|
|
656
|
-
|
|
657
|
-
- Updated dependencies [4b92228]
|
|
658
|
-
- @critical-path/core@0.3.0
|
|
659
|
-
|
|
660
|
-
## 0.1.4
|
|
661
|
-
|
|
662
|
-
### Patch Changes
|
|
663
|
-
|
|
664
|
-
- Updated dependencies [df22aad]
|
|
665
|
-
- @critical-path/core@0.2.1
|
|
666
|
-
|
|
667
|
-
## 0.1.3
|
|
668
|
-
|
|
669
|
-
### Patch Changes
|
|
670
|
-
|
|
671
|
-
- Updated dependencies [755286a]
|
|
672
|
-
- @critical-path/core@0.2.0
|
|
673
|
-
|
|
674
|
-
## 0.1.2
|
|
675
|
-
|
|
676
|
-
### Patch Changes
|
|
677
|
-
|
|
678
|
-
- Initial open-source release of the Web Fetch API router with adapters for Next.js App Router and SvelteKit.
|
package/dist/index.test.d.ts
DELETED
package/dist/index.test.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.test.d.ts","sourceRoot":"","sources":["../src/index.test.ts"],"names":[],"mappings":""}
|