@critical-path/core 0.51.0 → 0.51.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.
Files changed (3) hide show
  1. package/CHANGELOG.md +780 -0
  2. package/README.md +3 -0
  3. package/package.json +2 -1
package/CHANGELOG.md ADDED
@@ -0,0 +1,780 @@
1
+ # @critical-path/core
2
+
3
+ ## 0.51.1
4
+
5
+ ### Patch Changes
6
+
7
+ - da8c69b: Packages now include `CHANGELOG.md`, so agents and developers can read breaking changes in `node_modules`. READMEs link the new upgrade guide (`UPGRADING.md`, also at /getting-started/upgrading/ on the docs site), which coding agents in consumer apps can follow to migrate on their own.
8
+
9
+ ## 0.51.0
10
+
11
+ ### Minor Changes
12
+
13
+ - a7e9f4a: Tool fixes for the CLI, client, MCP and analysis queries.
14
+
15
+ - **BREAKING (server):** workload and ladder query parameters are validated with the new `WorkloadQuerySchema` and `LadderQuerySchema` (exported from core). Unknown or invalid values (e.g. `interval=fortnight`, `defaultWeeklyCapacityHours=abc`) return `400` instead of silently producing odd results.
16
+ - CLI `block`, `clarify` and `deliverable` merge into a task's existing `customFields` instead of replacing them. `deliverable` no longer swallows API errors. `subtask list` asks the server for the parent's subtasks instead of downloading every task. The CLI warns when sending an API key over plain HTTP to a remote host.
17
+ - CLI `propose` and `subtask`, `client.createSubtask` and MCP `create_task` no longer force `draft` or `todo`. New tasks use the project workflow's default status unless one is given.
18
+ - MCP `list_tasks` filters by `deliverableId`, `containerId` and `parentId` (`'none'` for top-level tasks). Resources and prompts wait for `engine.ready` and include at most 200 tasks. WebMCP sends standard `readOnlyHint`/`destructiveHint` annotations and registers nothing when its signal is already aborted.
19
+
20
+ ## 0.50.0
21
+
22
+ ### Minor Changes
23
+
24
+ - 7896d0d: Engine correctness fixes.
25
+
26
+ - Deleting a project no longer reloads every task in the project for each deleted task. Subtasks are found through the store's indexed parent filter, so large project deletes are no longer quadratic (they held the SQLite lock throughout).
27
+ - Auto-unblocking: `task.unblocked` is published only for tasks that were actually blocked. Canceled upstream tasks count as satisfied, and canceling a task also triggers the check. Upstream statuses are read with their own project's definitions, and upstream tasks the caller cannot read still block.
28
+ - **BREAKING:** `createTask`, `createContainer`, `createIteration` and `createDeliverable` reject unknown projects, and `addDependency` rejects missing tasks, even without an authorization policy. Adding an existing dependency returns it instead of creating a duplicate edge. A project's `workflowId` must name a workflow in the same tenant; cross-tenant workflows are also ignored when resolving.
29
+ - Engine `update*` methods ignore `id`, timestamps and ownership fields (`projectId`, `taskId`, `authorId`, `reactions`, and the tenant on actor views), not just the HTTP schemas. `updateWebhook` keeps `customFields`.
30
+
31
+ ## 0.49.0
32
+
33
+ ### Minor Changes
34
+
35
+ - bbc4305: `customFields` on every entity.
36
+
37
+ - Projects, workflows, teams, containers, iterations, comments, attachments, time entries, dependencies and webhooks now accept and return an optional `customFields` JSON object, as tasks and deliverables already did. Because request bodies are strict, this is the supported place for your own data. Task custom fields remain validated against `customFieldDefinitions`; on other entities any JSON object is stored as-is, and updates replace the whole object.
38
+ - `SQLiteStore` keeps it in each table's JSON `extra` column, which now exists on every table. The storage conformance suite round-trips `customFields` on every entity, so custom adapters must too.
39
+ - `UpdateIterationSchema` and `UpdateCommentSchema` are now strict, so unknown keys get `400` instead of being silently dropped.
40
+ - MCP `create_project`, `create_task`, `update_task`, `create_deliverable` and `add_comment` accept `customFields`.
41
+
42
+ ## 0.48.1
43
+
44
+ ### Patch Changes
45
+
46
+ - cb71e39: Workload: when no `endDate` is given, the date range now includes each undated task's derived end (start plus one day per 8 hours). Before, effort that ran past every recorded date (e.g. a task created on a weekend with no dates) fell outside every bucket and was dropped.
47
+
48
+ ## 0.48.0
49
+
50
+ ### Minor Changes
51
+
52
+ - f151568: Engine integrity fixes (security).
53
+
54
+ - **BREAKING (authorization):** adding, removing or changing an `admin` project member now also requires the new `project.manage_admins` action, which the role policy grants to `admin` (and superusers). Project managers can no longer promote themselves and then delete the project. Custom policies must grant `project.manage_admins` where admin changes should be allowed.
55
+ - Task `parentId` must name a task in the same project, and cannot be the task itself or one of its descendants. A cycle previously crashed `deleteTask` with unbounded recursion; cascades now also skip tasks they are already deleting.
56
+ - `logTime` adds hours atomically through a new optional `StorageAdapter.incrementTaskHours` (implemented by `SQLiteStore` and `InMemoryStore`), so concurrent logs are no longer lost.
57
+ - Events from cascades inside a store transaction (SQLite) are routed to the right tenant's webhooks. Their tenant is resolved inside the transaction, before the records are deleted.
58
+
59
+ ## 0.47.0
60
+
61
+ ### Minor Changes
62
+
63
+ - fde5883: Router hardening (security).
64
+
65
+ - **BREAKING:** built-in routes match exact paths only. An unknown sub-path returns `404` (e.g. `DELETE /tasks/:id/time-entries/x` used to delete the task), and a known path with the wrong method returns `405` with an `Allow` header. Only paths in `ROUTES` or the documented aliases are dispatched.
66
+ - **BREAKING:** non-empty request bodies must be `application/json` (or `+json`); others return `415`. This blocks cross-site form posts against cookie-based `getContext`. The client SDK already sends JSON.
67
+ - **BREAKING:** `POST /status` takes a strict body (`taskId` or `projectId` required) and requires `task.update` on the project, so it can no longer trigger webhooks in other tenants or anonymously. It publishes a well-formed `agent.status_updated` event through the new `engine.reportAgentStatus`; the event is in `DOMAIN_EVENT_NAMES`, so webhooks can subscribe to it.
68
+
69
+ ## 0.46.0
70
+
71
+ ### Minor Changes
72
+
73
+ - d82d168: Remaining effort and hidden work in critical path analysis.
74
+
75
+ - New `effort` option (`'estimate'` by default, or `'remaining'`), with a `criticalPathEffort` engine default. With `'remaining'`, in-progress tasks are scheduled for `max(0, estimate - loggedHours)`, divided by allocation. Available on both critical path methods, `?effort=`, the client and the MCP tools. `getTaskScheduledHours(task, effort)` takes the basis.
76
+ - New `includeHiddenWork` option for `calculatePortfolioCriticalPath` (`?includeHiddenWork=true`, client, MCP). It requires `workspace.manage`. Every other project in the caller's tenant then counts toward people's and teams' capacity without appearing in the results. Tasks from projects the caller cannot read appear only as `'hidden'`, and over-allocations are reported only when they involve a task in the results. `calculatePortfolioCPM` project inputs accept `background: 'visible' | 'hidden'`.
77
+
78
+ ## 0.45.0
79
+
80
+ ### Minor Changes
81
+
82
+ - 3c08dd9: Critical path analysis across projects, and finished tasks take no time.
83
+
84
+ - New `engine.calculatePortfolioCriticalPath({ projectIds?, projectOrder?, ...options })` and `calculatePortfolioCPM`. They analyse several projects together. Each project keeps its own start and calendar, dependencies between projects are honoured, and with `calendars: 'assignee'` and `levelResources: true`, people and team pools are shared, so nobody is booked above capacity across projects. `projectOrder` ranks projects for levelling. The result has one analysis per project, the latest end, and the combined `overallocations`.
85
+ - Only projects the caller can read are included. Without `projectIds`, unreadable projects are left out; unreadable or unknown ids are rejected. Runs above `portfolioTaskLimit` (engine config, default 5000 tasks) are rejected.
86
+ - REST: `GET /portfolio/critical-path?projectIds=...&projectOrder=...`. Client: `calculatePortfolioCriticalPath`. MCP: `calculate_portfolio_critical_path`.
87
+ - **BREAKING (behaviour):** completed and canceled tasks now take no time in all critical path analysis and occupy nobody when levelling, so durations and dates reflect remaining work. New helpers: `isTaskFinished` and `getTaskScheduledHours`.
88
+
89
+ ## 0.44.0
90
+
91
+ ### Minor Changes
92
+
93
+ - b3ef9c6: Team capacity pools in resource levelling.
94
+
95
+ - New `Team.headcount`: how many people the team can put on work at once. Default: its member count.
96
+ - When levelling, team-only tasks use slots in their team's pool, and tasks assigned to members also use slots in every team the member belongs to. Teams with no members and no `headcount` stay unconstrained. A delayed task is linked to the task whose finish freed its capacity, so slack follows the chain that caused the delay.
97
+ - **BREAKING (types):** `Overallocation.assigneeId` is optional. Entries have `teamId` for pools and a new `capacity` field (1 for a person, headcount for a team).
98
+ - Assignee-mode analysis only uses teams from the project's tenant.
99
+
100
+ ## 0.43.1
101
+
102
+ ### Patch Changes
103
+
104
+ - 867cdae: `engine.createTask` now stores every field accepted by `CreateTaskSchema` (including `todos`) instead of a hand-maintained list, so new task fields are no longer silently dropped on create. Keys outside the schema (`id`, timestamps, identity fields) are still discarded.
105
+
106
+ ## 0.43.0
107
+
108
+ ### Minor Changes
109
+
110
+ - efa342f: Partial task allocation.
111
+
112
+ - New `Task.allocation`, in (0, 1], default 1: the share of the assignee's time a task takes. Estimates are effort, so in critical path analysis (every mode) a task spans `effort / allocation` working hours. Results report `allocation` per task, and `durationHours` is the elapsed span. New helpers: `getTaskAllocation` and `getTaskElapsedHours`.
113
+ - Resource levelling uses capacity. Each assignee has 100% at any moment, so fractional tasks can run side by side and others wait for enough capacity. Slack links only tasks that cannot overlap.
114
+ - Assignee-mode results include `overallocations`: periods where an assignee is booked above 100%, with the total and the tasks involved. Empty after levelling.
115
+ - Fix: `createTask` stored only an explicit list of fields; it now keeps `allocation`.
116
+ - MCP `create_task` and `update_task` accept `allocation`.
117
+
118
+ ## 0.42.0
119
+
120
+ ### Minor Changes
121
+
122
+ - f548659: Resource levelling for critical path analysis.
123
+
124
+ - `calculateCriticalPath(id, { calendars: 'assignee', levelResources: true })`, or `criticalPathLevelResources` on the engine, schedules each assignee on one task at a time. Tasks are placed in priority order at the earliest time their predecessors are done and their assignee is free on their own calendar. Tasks are not split, and unassigned tasks are unconstrained.
125
+ - `levelingPriority`: `'slack'` (default: least unlevelled slack, then task priority), `'priority'`, `'dueDate'` or `'order'`.
126
+ - Slack and critical tasks are recomputed over dependencies plus each assignee's task sequence. Tasks report `levelingDelayHours` and `waitingOn`; the analysis reports `leveled` and `unleveledProjectEndDate`.
127
+ - REST: `?levelResources=true&levelingPriority=...` (400 for invalid values, or for levelling without `calendars=assignee`). Client options and MCP arguments to match.
128
+
129
+ ## 0.41.0
130
+
131
+ ### Minor Changes
132
+
133
+ - 65044e3: Work schedules honour their time zone.
134
+
135
+ - **BREAKING:** `WorkSchedule.timezone` (IANA name, default UTC) now applies. Hours, weekdays and holiday dates are wall-clock rules in that zone. `addWorkingHours`, `subtractWorkingHours`, `getWorkingHoursBetween`, `nextWorkingTime` and `previousWorkingTime` follow its UTC offset and daylight-saving changes. Day-level helpers use the local date an instant falls on. Critical path analysis (both modes) and workload inherit this, so work handed from a London assignee to a New York one continues at the New York assignee's next working moment.
136
+ - **BREAKING:** date-only strings and date-times without an offset (`2026-10-05T09:00`) are read as wall-clock time in the schedule's zone (UTC by default), instead of the server's local zone.
137
+ - Unknown zones are rejected by `WorkScheduleSchema` and throw a `RangeError` in calendar functions. New `isValidTimeZone` helper.
138
+ - Calendar arithmetic caches each schedule's per-day working windows and zone offsets, making critical path analysis on long projects about 8× faster. Treat schedule objects as immutable once used.
139
+
140
+ ## 0.40.0
141
+
142
+ ### Minor Changes
143
+
144
+ - cfd3215: Critical path analysis can schedule each task on its assignee's calendar.
145
+
146
+ - `calculateCriticalPath(projectId, { calendars: 'assignee' })`, or `criticalPathCalendars: 'assignee'` on the engine, schedules each task on the assignee's `schedule` (from `users`), then the task team's schedule, then the project calendar. Passes run on dates, so a Friday-off assignee pushes their successors to Monday. Slack is measured in each task's own working hours, and each task reports the `scheduleId` it used. Without a project start date, assignee mode starts today (UTC midnight). Calendars are evaluated in UTC.
147
+ - The default `'project'` mode is unchanged.
148
+ - REST: `GET /projects/:id/critical-path?calendars=assignee` (unknown values return 400). Client: `calculateCriticalPath(id, { calendars })`. MCP: a `calendars` argument on `calculate_critical_path`.
149
+ - New calendar helpers `nextWorkingTime` and `previousWorkingTime`, and `resolveTaskSchedule`.
150
+
151
+ ## 0.39.0
152
+
153
+ ### Minor Changes
154
+
155
+ - c7ad4d4: Atomic cascading deletes through an optional `StorageAdapter.transaction(fn)`.
156
+
157
+ - When the store provides `transaction`, the engine runs `deleteTask`, `deleteProject`, `deleteContainer`, `deleteIteration` and `deleteDeliverable` inside it. Domain events, `afterTask*` hooks and file deletions are deferred until commit, so a failed cascade (for example, a `beforeTaskDelete` hook throwing on a subtask) deletes nothing and publishes nothing.
158
+ - `SQLiteStore` implements it. Its constructor now returns a Proxy. Calls from inside an open transaction (found via `AsyncLocalStorage`) join it, other calls wait, and the transaction starts only after in-flight calls finish, so concurrent requests are never rolled back with it.
159
+ - `InMemoryStore` and `FirebaseStore` keep the previous non-transactional, idempotent cascades.
160
+
161
+ ## 0.38.0
162
+
163
+ ### Minor Changes
164
+
165
+ - 8e52679: Webhooks: DNS-aware SSRF checks and a durable outbox.
166
+
167
+ - Private-address detection now parses IPv4/IPv6 properly. It covers carrier-grade NAT, multicast, reserved and documentation ranges, encoded IPv4 (`http://2130706433/`), IPv4-mapped/NAT64/6to4 IPv6, and `*.local` names. `isPrivateAddress` is exported.
168
+ - **BREAKING:** before each attempt the webhook host is resolved (via `node:dns` where available, or `webhookDelivery.resolveHost`), and the delivery fails if any address is private, unless `allowPrivateUrls` is set. Redirects are no longer followed; a 3xx counts as a failed attempt.
169
+ - New `OutboxWebhookQueue` stores delivery attempts through the `WebhookOutboxStore` interface. `SQLiteStore`, `FirebaseStore` and `InMemoryStore` implement it. Claims are leased and delivery is at-least-once. Run it with `start()` or `processDue()`.
170
+ - `WebhookDeliveryQueue` gains an optional `attach(deliver)` hook.
171
+
172
+ ## 0.37.0
173
+
174
+ ### Minor Changes
175
+
176
+ - d4477b1: Team-based project membership and store-level tenant filtering.
177
+
178
+ - `project.members` entries can be teams: `{ teamId, role }` gives every user in `team.memberIds` that role. A user matching several entries gets all of their permissions. `AuthorizationRequest` gains `teamIds`, the actor's teams in their tenant. Memberships are cached per engine and refreshed whenever a team changes through the engine.
179
+ - **BREAKING (storage adapters):** `getProjects(filter?)` accepts `{ tenantId }`, applied by the store; SQLite uses a new index. The engine uses it for tenant-scoped actors instead of loading every project.
180
+
181
+ ## 0.36.1
182
+
183
+ ### Patch Changes
184
+
185
+ - 85d9bb5: Publish only what consumers need.
186
+
187
+ - Packages no longer ship compiled tests or TypeScript sources (`files: ["dist", "!dist/**/*.test.*"]`). `@critical-path/core` goes from 330 files to 146.
188
+ - `exports` maps list `types` first, as TypeScript's resolution expects.
189
+
190
+ ## 0.36.0
191
+
192
+ ### Minor Changes
193
+
194
+ - 810d8d1: Upload and request body limits.
195
+
196
+ - **@critical-path/core:** new `uploads: { maxBytes, allowedMimeTypes }` engine option, with `type/*` wildcards. It applies to direct uploads (decoded size), presigned uploads (content type) and registered attachments (declared size and type). Violations throw `ValidationError` (400).
197
+ - **@critical-path/server:** new `maxBodyBytes` router option (default 10 MiB). Larger bodies get `413`, checked while streaming rather than only through `Content-Length`. Previously bodies were read without any limit.
198
+
199
+ ## 0.35.0
200
+
201
+ ### Minor Changes
202
+
203
+ - b13f7c4: `InMemoryStore` returns copies.
204
+
205
+ - **BREAKING:** `InMemoryStore` deep-copies (`structuredClone`) every argument and result, so mutating a returned record, or an input object you keep using, no longer changes stored state. This matches SQLite and Firestore. Call `update*` to change records.
206
+ - The conformance suite checks that adapters return copies. `InMemoryFirestoreMock` now copies too, like real Firestore.
207
+
208
+ ## 0.34.0
209
+
210
+ ### Minor Changes
211
+
212
+ - 1cc0d4c: Domain events for every team, container and iteration change, and collision-safe ids.
213
+
214
+ - New events: `team.updated`, `team.deleted`, `container.updated`, `container.deleted`, `iteration.created`, `iteration.updated` and `iteration.deleted`. They are delivered to webhooks like other events; deleted events carry the ids needed to route them to the right tenant. Previously these changes published nothing.
215
+ - Event ids and the ids generated by `InMemoryStore`, `SQLiteStore` and domain entities now use `crypto.randomUUID()` (e.g. `task_<uuid>`) instead of 7 random characters, which were likely to collide at around a million records.
216
+
217
+ ## 0.33.0
218
+
219
+ ### Minor Changes
220
+
221
+ - aa94129: Storage adapter conformance suite and parity fixes.
222
+
223
+ - New `@critical-path/core/testing` entry with `runStorageAdapterConformance({ name, createStore, describe, it, expect })`, the suite the built-in adapters run, for verifying custom adapters.
224
+ - `SQLiteStore` no longer drops fields. Tasks keep `key`, `semanticStatus` and `todos`; projects keep `schedule`, `startDate` and `targetEndDate`; teams keep `weeklyCapacityHours` and `schedule`; attachments keep `artifactType`. Fields without a dedicated column are stored in a JSON `extra` column, which is added to existing databases automatically.
225
+ - `FirebaseStore` applies every filter passed to `getAttachments` and `getActivities` (previously only the first), returns activities newest first and comments oldest first.
226
+
227
+ ## 0.32.0
228
+
229
+ ### Minor Changes
230
+
231
+ - a3fe03d: Honour engine configuration options.
232
+
233
+ - **BREAKING:** `store` must be a storage adapter instance (e.g. `new SQLiteStore({ filename })`). Strings such as `'sqlite'` used to fall back to an in-memory store silently; they now throw.
234
+ - New `users` option: your app's user directory (an array, or a function called with the acting user), merged with `initialData.users`, which was previously ignored. New `engine.getUsers()`. Workload distribution now uses user names, weekly capacity and schedules.
235
+
236
+ ## 0.31.0
237
+
238
+ ### Minor Changes
239
+
240
+ - 40e5958: Real S3 uploads and signed URLs, and server-chosen storage keys.
241
+
242
+ **@critical-path/core**
243
+ - **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.
244
+ - **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.
245
+ - **BREAKING:** `engine.getPresignedAttachmentUploadUrl({ projectId, filename, contentType?, expiresInSeconds? })` generates the storage key under `projects/<projectId>/`, instead of accepting a caller-chosen `storageKey`.
246
+ - 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.
247
+ - New `buildStorageKey` (validates path prefixes, crypto-random component) and `contentDispositionFor`. HTML, SVG and script uploads are stored as downloads.
248
+
249
+ **@critical-path/server**
250
+ - **BREAKING:** `POST /attachments/presign` takes `{ projectId, filename, contentType?, expiresInSeconds? }`. `POST /attachments/upload` no longer accepts `pathPrefix`.
251
+
252
+ **@critical-path/client**
253
+ - `getPresignedAttachmentUploadUrl` and `uploadAttachmentFile` use the updated request bodies.
254
+
255
+ ## 0.30.0
256
+
257
+ ### Minor Changes
258
+
259
+ - cdb300a: Task filtering and pagination.
260
+
261
+ **@critical-path/core**
262
+ - New `engine.queryTasks(query)` and `engine.queryActivities(query)` return `Page<T>` (`{ items, nextCursor }`).
263
+ - Tasks are ordered oldest first, activities newest first, using keyset cursors on `createdAt` then `id`.
264
+ - Task filters: `status[]`, `priority[]`, `assigneeId` (also matches `assignees`), `iterationId`, `deliverableId`, `containerId`, `parentId` (`null` means top-level), `projectIds`.
265
+ - Results are limited to projects the actor can read.
266
+ - **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.
267
+
268
+ **@critical-path/server**
269
+ - **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`.
270
+
271
+ **@critical-path/client**
272
+ - `getTasks` and `getActivities` follow pagination and still return everything. New `queryTasks` and `queryActivities` return single pages.
273
+
274
+ **@critical-path/mcp**
275
+ - **BREAKING:** `list_tasks` returns `{ tasks, nextCursor }` and accepts `iterationId`, `limit` and `cursor`. It now filters in the store instead of loading every task.
276
+
277
+ ## 0.29.0
278
+
279
+ ### Minor Changes
280
+
281
+ - a019d37: Cascading deletes and dependency removal.
282
+
283
+ **@critical-path/core**
284
+ - **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.
285
+ - **BREAKING:** `deleteProject` also deletes containers, iterations, deliverables and project attachments. `project.deleted`'s `deletedTaskIds` includes subtasks.
286
+ - Deleting a container, iteration or deliverable clears the reference on its tasks; nested containers are detached.
287
+ - New `engine.removeDependency(id)` and `dependency.removed` event.
288
+ - **BREAKING (storage adapters):** `DependencyRepository` gains `getDependency` and `removeDependency`, and `TimeEntryRepository` gains `deleteTimeEntry`.
289
+ - `SQLiteStore` no longer returns `null` for unset optional fields.
290
+ - `FirebaseStore` updates now remove fields cleared with `undefined` (for example, reopening a completed task now clears `completedAt`).
291
+
292
+ **@critical-path/server**
293
+ - New `DELETE /tasks/:id/dependencies/:dependencyId`. `DELETE /tasks/:id` accepts `?subtasks=detach`.
294
+
295
+ **@critical-path/client**
296
+ - New `removeDependency(taskId, dependencyId)`. `deleteTask(id, { subtasks })`.
297
+
298
+ ## 0.28.0
299
+
300
+ ### Minor Changes
301
+
302
+ - 4fbbc40: Complete the plugin system.
303
+
304
+ **@critical-path/core**
305
+ - `plugin.init(engine)` now runs at startup. `engine.ready` resolves after seeding and every plugin's `init`; init failures reject `ready`.
306
+ - **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.
307
+ - **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`.
308
+ - After-hook errors are logged with the plugin id instead of failing an already-stored write.
309
+ - **BREAKING:** `beforeTaskDelete` and `afterTaskDelete` receive the task as a second argument.
310
+ - **BREAKING:** required custom fields are enforced even when `customFields` is omitted.
311
+ - New plugin `routes` and `middleware` types (`PluginRoute`, `PluginMiddleware`, `PluginRequestContext`).
312
+
313
+ **@critical-path/server**
314
+ - 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.
315
+ - Awaits `engine.ready` before handling requests.
316
+
317
+ **@critical-path/mcp**
318
+ - Awaits `engine.ready` before running tools.
319
+
320
+ ## 0.27.0
321
+
322
+ ### Minor Changes
323
+
324
+ - 1a516bd: Signed, retried webhooks driven by domain events.
325
+
326
+ **@critical-path/core**
327
+ - **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`.
328
+ - The payload is now `{ id, event, occurredAt, tenantId?, data }`, where `data` is the domain event payload.
329
+ - A status change delivers both `task.status_changed` and `task.updated` to webhooks subscribed to both.
330
+ - 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`.
331
+ - New `webhookDelivery` engine option:
332
+ - `timeoutMs` (default 10s), `maxAttempts` (default 5) and exponential `retryBaseDelayMs`.
333
+ - A pluggable `queue`; the default is in-process.
334
+ - `allowPrivateUrls` (default `false`).
335
+ - `onDelivered` and `onDeliveryFailed` callbacks.
336
+ - `engine.webhooks` exposes `deliver(job)` for custom queues and `idle()` for tests.
337
+ - `config.webhooks` are now honoured as static webhooks.
338
+ - 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`).
339
+ - **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`.
340
+ - New `DOMAIN_EVENT_NAMES`. The `project.deleted` and `workflow.deleted` payloads include `tenantId`; `attachment.deleted` includes `projectId`.
341
+
342
+ **@critical-path/server**
343
+ - New `GET/POST /webhooks` and `GET/PATCH/DELETE /webhooks/:id` routes. Event names are validated.
344
+
345
+ **@critical-path/client**
346
+ - New `getWebhooks`, `createWebhook`, `updateWebhook` and `deleteWebhook`.
347
+
348
+ ## 0.26.0
349
+
350
+ ### Minor Changes
351
+
352
+ - 719e844: Role-based authorization and multi-tenancy.
353
+
354
+ **@critical-path/core**
355
+ - New `authorize` engine option and `createRolePolicy()`:
356
+ - Project roles (`viewer`, `contributor`, `project_manager`, `admin`) come from `project.members`.
357
+ - Workspace superusers come from `actor.roles`.
358
+ - Authors manage their own comments and attachments.
359
+ - Checks run on `withActor` views. Unreadable or cross-tenant projects behave as not found, denied actions throw the new `ForbiddenError`, and lists are filtered.
360
+ - `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.
361
+ - **BREAKING:** `Project.members` is now `{ userId, role }[]` (was `string[]`). Project creators become `admin` members.
362
+ - New `engine.getActivities()` and `engine.getTimeEntries()`, which respect authorization.
363
+ - **BREAKING:** on views, presigned uploads require `projectId` and are confined to `projects/<projectId>/`. The presign request schema now requires `projectId`.
364
+ - `SQLiteStore` persists `tenantId` (migrated automatically).
365
+
366
+ **@critical-path/server**
367
+ - `RequestContext` gains `tenantId` and `roles`, which are passed to the actor. `ForbiddenError` maps to `403`. Activities and time entries are read through the engine.
368
+
369
+ **@critical-path/client / @critical-path/mcp**
370
+ - Rebuilt for the new presign `projectId` requirement and project member shape.
371
+
372
+ ## 0.25.0
373
+
374
+ ### Minor Changes
375
+
376
+ - fd79762: **BREAKING:** strict request bodies, no identity in payloads, and CORS off by default.
377
+
378
+ **@critical-path/core**
379
+ - Request schemas are strict: unknown keys, server-assigned fields and identity fields are rejected instead of stripped.
380
+ - 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'`.
381
+ - Schemas export request body types (`CreateTaskBody`, `UpdateTaskBody`, ...).
382
+
383
+ **@critical-path/server**
384
+ - Bodies containing unknown, server-assigned or identity fields return `400`.
385
+ - 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.
386
+ - `DELETE /comments/:id/reactions` takes `?emoji=` only.
387
+ - CORS is off by default (`cors: false`). Pass `cors: { origins: [...] }` to allow cross-origin browsers.
388
+
389
+ **@critical-path/client**
390
+ - 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.
391
+ - New `updateProject`, `deleteProject` and `addDependency`. `uploadAttachmentFile` base64-encodes binary data (previously it sent unusable JSON for `Uint8Array`/`ArrayBuffer`).
392
+ - 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`.
393
+
394
+ **@critical-path/mcp**
395
+ - Tool arguments are strict: undeclared arguments return an `isError` result.
396
+ - `add_comment` no longer takes `authorId`. With an `engine`, writes are attributed to the new `actor` server option (default `DEFAULT_MCP_ACTOR`).
397
+
398
+ **@critical-path/react / @critical-path/svelte**
399
+ - `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.
400
+
401
+ ## 0.24.0
402
+
403
+ ### Minor Changes
404
+
405
+ - b54e22c: Validate request bodies with shared zod schemas and publish an OpenAPI document.
406
+
407
+ **@critical-path/core**
408
+ - 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.
409
+ - `ValidationError` carries an optional `issues: { path, message }[]`.
410
+
411
+ **@critical-path/server**
412
+ - 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.
413
+ - 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.
414
+ - New `GET /openapi.json` and `buildOpenApiDocument()` (OpenAPI 3.1, request bodies generated from the validation schemas).
415
+
416
+ **@critical-path/mcp**
417
+ - Tool `inputSchema`s are generated from their zod schemas via the new `defineTool`, removing the hand-written JSON copies.
418
+
419
+ **@critical-path/svelte**
420
+ - Rebuilt with the bundled `@critical-path/mcp` changes.
421
+
422
+ ## 0.23.0
423
+
424
+ ### Minor Changes
425
+
426
+ - 6dd5529: Add request context, authentication hooks and actor attribution.
427
+
428
+ **@critical-path/core**
429
+ - 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.
430
+
431
+ **@critical-path/server**
432
+ - 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`).
433
+ - 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.
434
+ - `createSvelteKitHandler` options take `getContext(event)` so `event.locals` is available; `configOrRouter` is now optional.
435
+ - New `createUniversalHandler(config, options)` for Workers, Deno, Bun and Hono.
436
+ - `handleRequest(request, { getContext })` lets custom adapters supply a per-request resolver.
437
+
438
+ **@critical-path/mcp**
439
+ - 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.
440
+
441
+ ## 0.22.0
442
+
443
+ ### Minor Changes
444
+
445
+ - b243a37: Fix correctness and safety issues found in a code audit.
446
+
447
+ **@critical-path/core**
448
+ - `SQLiteStore` now loads `node:sqlite` via `process.getBuiltinModule`, fixing `require is not defined` when constructed from a filename in plain Node ESM.
449
+ - Removed the unused `better-sqlite3` runtime dependency.
450
+ - `engine.addDependency` now detects indirect cycles (e.g. A → B → C → D → A), not just cycles between direct neighbours.
451
+ - Fixed `generateKeyBetween` returning out-of-range, duplicate keys after repeated inserts after the same item. It now throws a `RangeError` when `a >= b`.
452
+ - Added `engine.deleteProject(id)`, which deletes a project's tasks through `deleteTask` and publishes a new `project.deleted` event and webhook.
453
+ - Added exported `ValidationError` and `NotFoundError` classes. `logTime` now rejects non-numeric hours.
454
+
455
+ **@critical-path/server**
456
+ - `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.
457
+ - Added `PATCH /projects/:id`.
458
+ - `DELETE` on a resource that does not exist now returns `404` instead of `200 { success: false }`.
459
+ - Malformed JSON returns `400`, validation errors `400`, `NotFoundError` `404`, and dependency cycles `409`. Unexpected errors return a generic `500` message outside development.
460
+ - `OPTIONS` preflight requests return `204` with CORS headers.
461
+ - 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'`).
462
+ - `createNextHandler` returns a callable handler that also exposes per-method properties, so `export { handler as GET }` works as documented.
463
+
464
+ **@critical-path/mcp**
465
+ - Tools excluded via the `tools` option can no longer be called by name.
466
+ - Tool arguments are validated with each tool's zod schema; undeclared fields are stripped.
467
+ - Tool listings include `title` and MCP `readOnlyHint` / `destructiveHint` annotations.
468
+
469
+ **@critical-path/svelte**
470
+ - Rebuilt with the bundled `@critical-path/mcp` WebMCP argument validation.
471
+
472
+ **@critical-path/client**
473
+ - Delete methods resolve to `false` when the server returns `404`, keeping their boolean contract with the new server behaviour.
474
+
475
+ ## 0.21.0
476
+
477
+ ### Minor Changes
478
+
479
+ - f3301bf: - Added comprehensive task lifecycle and semantic status predicates (`isDraftTask`, `isArchivedTask`, `isTrashedTask`, `isTrashedOrArchivedTask`, `isWorkflowTask`, `getTaskSemanticStatus`, `isTaskCompleted`, `isTaskInProgress`, `isTaskNotStarted`, `isTaskCanceled`, `isTaskActive`, `isTaskUnassigned`).
480
+ - Hardened mention extraction with markdown code suppression (`stripMarkdownCode`) to prevent code blocks, inline code, HTML elements, and URLs from triggering false positive mentions while preserving rich-text mention nodes.
481
+ - Added Base-62 fractional indexing utilities (`generateKeyBetween`, `generateNKeysBetween`) for zero-cost lexical task/item reordering without array shifting or bulk database rewrites.
482
+ - Added `completedAt` lifecycle timestamp tracking alongside `actualEndDate`, automatic timestamp assignment upon entering `completed` or `canceled`, and timestamp + progress reset upon reopening to `not_started` or `in_progress`.
483
+ - Added `isTempTaskId` utility and hardened optimistic temporary task handling in `@critical-path/svelte` (`TaskState`) and `@critical-path/react` (`useTasks`) with in-flight creation resolution and ID mapping to prevent 404 errors during rapid optimistic updates and deletions.
484
+
485
+ ## 0.20.2
486
+
487
+ ### Patch Changes
488
+
489
+ - b8a68dd: Track task blocked duration while active in progress:
490
+ - Add `blockedDurationSeconds` and `blockedSince` to `Task` and `TaskInferredActuals`
491
+ - Update `TaskEntity` to stamp `blockedSince` when blocked while `in_progress` and accumulate elapsed blocked time into `blockedDurationSeconds` upon unblocking or exiting `in_progress`
492
+ - Update `CriticalPathEngine.updateTask` and `checkAndUnblockDownstreamTasks` to manage `blockedSince` and `blockedDurationSeconds` lifecycle transitions
493
+ - Update SQLite storage schema and statements to persist `blockedDurationSeconds` and `blockedSince`
494
+
495
+ ## 0.20.1
496
+
497
+ ### Patch Changes
498
+
499
+ - 500b353: Standardize task blocker state on `isBlocked` as the single source of truth:
500
+ - Persist `isBlocked` and `blockedReason` on task creation in `engine.createTask`
501
+ - Rely strictly on `task.isBlocked` in `engine.updateTask` when detecting blocked transitions
502
+ - Remove redundant checks and mutations of `customFields.isBlocked` and `status === 'blocked'` during downstream dependency auto-unblocking
503
+ - Update `deriveTaskLifecycleState` to evaluate `task.isBlocked === true`
504
+
505
+ ## 0.20.0
506
+
507
+ ### Minor Changes
508
+
509
+ - c83235b: Add task execution timestamps and cumulative in-progress duration tracking:
510
+ - Introduce `actualDurationSeconds` and `inProgressSince` to `Task` and `TaskEntity`
511
+ - Automatically timestamp `actualStartDate` (retaining earliest) and begin session timer when transitioning to `in_progress`
512
+ - Automatically accumulate duration delta into `actualDurationSeconds` when leaving `in_progress` (pausing/completing)
513
+ - Automatically timestamp `actualEndDate` when entering `completed` or `canceled`, and reset `actualEndDate` to `undefined` upon reopening
514
+ - Mutually synchronize manual edits between `actualDurationSeconds` and `actualHours`
515
+ - Export `formatTaskDuration(seconds, options)` with dynamic scoping (`< 120s`, `< 1 day`, `>= 1 day`)
516
+ - Add `calendarDurationHours` and `actualDurationSeconds` to `TaskInferredActuals`
517
+
518
+ ## 0.19.1
519
+
520
+ ### Patch Changes
521
+
522
+ - f816145: Preserve real actor identity and metadata in `updateTask`, activity logs, and domain events, preventing status changes and updates from erroneously attributing the task's assignee as the initiating actor.
523
+
524
+ ## 0.19.0
525
+
526
+ ### Minor Changes
527
+
528
+ - 31a6dde: Promote task blocking state (`isBlocked: boolean` and `blockedReason: string | null`) to first-class fields on `Task`, `CreateTaskInput`, and `UpdateTaskInput`.
529
+
530
+ - **Domain Events**: Introduced `TaskBlockedEvent` (`task.blocked`) and updated `TaskUnblockedEvent` (`task.unblocked`) to support explicit unblocking.
531
+ - **Lifecycle Derivation**: Updated `deriveTaskStatus` and `deriveTaskLifecycleState` to reflect `task.isBlocked` directly alongside upstream dependency checks.
532
+ - **Engines & Storage**: Added `isBlocked` and `blockedReason` persistence to `SQLiteStore`, `FirebaseStore`, and `InMemoryStore`.
533
+ - **MCP Server**: Added `isBlocked` and `blockedReason` parameter options to `create_task` and `update_task` tool schemas.
534
+ - 31a6dde: Add comprehensive Work Schedule, Working Hours, Working Days & Holidays subsystem:
535
+ - Added `WorkSchedule`, `DaySchedule`, `WorkingHoursRange`, and `Holiday` types supporting custom shifts, weekend configurations, and organization/regional holidays.
536
+ - Integrated hierarchical calendar resolution: Task Assignee/Team -> Project -> Engine/Default (`DEFAULT_WORK_SCHEDULE`).
537
+ - Enhanced Critical Path Method (CPM) with calendar working-hours math (`earlyStartDate`, `earlyFinishDate`, `lateStartDate`, `lateFinishDate`, `totalWorkingHours`, `projectEndDate`) skipping weekends and holidays.
538
+ - Enhanced Workload & Capacity Engine with working-day effort distribution and holiday capacity deductions.
539
+ - Added working-days schedule variance (`scheduleVarianceWorkingDays`) to Reality Deltas in the Ladder of Abstraction.
540
+
541
+ ## 0.18.0
542
+
543
+ ### Minor Changes
544
+
545
+ - 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.
546
+
547
+ ## 0.17.0
548
+
549
+ ### Minor Changes
550
+
551
+ - 9c31e8d: Introduce comprehensive Task Metrics, Inferred Actuals, Progress Inference, Earned Value Management (EVM), and Time-Series Progress History Curve Profiling.
552
+ - **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.
553
+ - **Reality Delta**: Multi-dimensional variance analysis comparing planned estimates to logged hours (`effortVarianceHours`, `durationVarianceHours`, `accuracyRatio`, `isOverdue`, `isOverEstimate`).
554
+ - **Progress Inference**: Deterministic priority waterfall resolving completion progress across explicit values, checklist/todo completion ratios, logged effort, and elapsed schedule time.
555
+ - **Earned Value Management (EVM)**: Task-level PV, EV, AC, CV, SV, CPI, and SPI calculations.
556
+ - **Time-Series History & Curve Shapes**: Historical timeline reconstruction from activity logs with piecewise interpolation curve classification (`linear`, `s_curve`, `early_surge`, `late_rush`, `stalled`).
557
+ - **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`).
558
+
559
+ ## 0.16.0
560
+
561
+ ### Minor Changes
562
+
563
+ - e2a7eef: Introduce Ladder of Abstraction and Critical Path Method (CPM) timeline synthesis to the framework data model:
564
+ - **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`.
565
+ - **Server Router**: HTTP endpoints `GET /projects/:id/critical-path`, `GET /projects/:id/ladder`, and `GET /tasks/:id/ladder`.
566
+ - **Client SDK**: `CriticalPathClient` methods `calculateCriticalPath`, `getTimelineLadder`, and `getTaskLadder`.
567
+ - **MCP**: New AI tools `calculate_critical_path`, `get_timeline_ladder`, and `get_task_ladder`.
568
+ - **React**: Custom hooks `useTimelineLadder`, `useCriticalPath`, and `useTaskLadder`.
569
+ - **Svelte 5**: Svelte 5 Runes state classes `TimelineLadderState` and `CriticalPathState`.
570
+
571
+ ## 0.15.2
572
+
573
+ ### Patch Changes
574
+
575
+ - dbd2072: Add comprehensive unit test coverage for task state lifecycle behaviors and upstream/downstream dependency validation.
576
+
577
+ ## 0.15.1
578
+
579
+ ### Patch Changes
580
+
581
+ - f53afab: Add automated downstream task unblocking on task completion, full bidirectional VFX and Creative workflow transitions, and bidirectional dependency querying in FirebaseStore.
582
+
583
+ ## 0.15.0
584
+
585
+ ### Minor Changes
586
+
587
+ - 21eb85c: Implement Universal Semantic Statuses & System-Derived Implied Statuses (3-Tier Status Architecture)
588
+
589
+ - **Tier 1 (Universal Semantic Statuses)**: Defined canonical status enum `SemanticStatus = 'not_started' | 'in_progress' | 'completed' | 'canceled'` providing universal semantic meaning across any industry domain.
590
+ - **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.
591
+ - **Tier 3 (System-Derived Implied Statuses)**: Added `deriveTaskLifecycleState` and `engine.getTaskLifecycleState(taskId)` returning dynamic indicators:
592
+ - Dependency: `isReady`, `isBlocked`, `blockingTaskIds`
593
+ - Schedule: `isOverdue`, `isUpcoming`, `isUnplanned`
594
+ - Ownership: `isUnassigned`, `isStalled`
595
+ - Estimate/Pace: `isOverEstimate`, `isPaceWarning`
596
+ - Convenience flags: `isDone`, `isActive`, `isCancelled`
597
+ - **Domain Entities & Engine**: Added automatic timestamp progression (`actualStartDate`, `actualEndDate`), progress completion, and event emission driven by semantic status categories.
598
+ - **React UI Hooks**: Updated `useKanban` to support dynamic custom workflow columns without dropping tasks, plus added `groupBy: 'semantic' | 'workflow'` option.
599
+ - **Client SDK**: Added `client.getTaskLifecycleState(taskId)`.
600
+
601
+ ## 0.14.0
602
+
603
+ ### Minor Changes
604
+
605
+ - 3dc2798: feat(core): add readAttachmentText engine method, download on storage adapters, and artifactType metadata
606
+
607
+ ## 0.13.3
608
+
609
+ ### Patch Changes
610
+
611
+ - 573a4fa: Fix mention regex to avoid capturing trailing punctuation like periods or commas in unquoted handles
612
+
613
+ ## 0.13.2
614
+
615
+ ### Patch Changes
616
+
617
+ - 03d269c: Make getAllowedNextStatuses strictly forward and symmetrical with getAllowedPreviousStatuses by constraining to downstream statuses in workflow sequence.
618
+
619
+ ## 0.13.1
620
+
621
+ ### Patch Changes
622
+
623
+ - a7d17c0: Add backward status transitions to default workflows and align allowed previous statuses with workflow transitions
624
+
625
+ ## 0.13.0
626
+
627
+ ### Minor Changes
628
+
629
+ - a4a464b: Support multi-assignees and backward workflow status transitions:
630
+ - Add `TaskAssignee` interface (`id`, `name`, `role`, `type: 'user' | 'agent' | 'team'`, `avatarUrl`) and `assignees?: TaskAssignee[]` to `Task` entity and SQLite storage adapter.
631
+ - Add `getAllowedPreviousStatuses(workflow, currentStatus)` utility and `CriticalPathEngine.getAllowedPreviousTaskTransitions(taskId)` for calculating valid backward transitions.
632
+ - Expose `allowedPreviousStatuses` in server endpoint `GET /tasks/:taskId/transitions`.
633
+ - Add `getAllowedPreviousTaskTransitions(taskId)` to `CriticalPathClient` SDK.
634
+
635
+ ## 0.12.0
636
+
637
+ ### Minor Changes
638
+
639
+ - 5a5930f: Add first-class Deliverable entity, Creative Workflow presets, and reactive UI bindings:
640
+ - `@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.
641
+ - `@critical-path/server`: Added RESTful API endpoints for `/deliverables` and `/deliverables/:id/summary`.
642
+ - `@critical-path/client`: Added deliverable management and summary methods to `CriticalPathClient`.
643
+ - `@critical-path/react`: Added `useDeliverables` and `useDeliverableSummary` React hooks.
644
+ - `@critical-path/svelte`: Added `DeliverableState` and `createDeliverableState` Svelte 5 Runes state management.
645
+
646
+ ## 0.11.0
647
+
648
+ ### Minor Changes
649
+
650
+ - 55549e9: Support @mentions in comments with extraction and segmentation utilities
651
+
652
+ - Add `mentions?: string[]` to `Comment` interface
653
+ - Add `extractMentions` and `parseMentionSegments` utilities for mention parsing and UI rendering
654
+ - Auto-extract and populate mentions during `addComment` and `updateComment` in the engine
655
+ - Update SQLite comments schema with `mentions` column and migration
656
+ - Preserve and pass through mentions in server routes, client SDK, and Svelte bindings
657
+
658
+ ## 0.10.0
659
+
660
+ ### Minor Changes
661
+
662
+ - e9003d3: Add emoji reactions support for comment conversations with domain events, deduplication, REST endpoints, client SDK, and React/Svelte state integrations.
663
+
664
+ ## 0.9.0
665
+
666
+ ### Minor Changes
667
+
668
+ - e983557: Add first-class optional todo list (checklist) support to Task model and TaskEntity with helper methods (addTodo, toggleTodo, removeTodo) and updateTask helper in @critical-path/svelte.
669
+
670
+ ## 0.8.3
671
+
672
+ ### Patch Changes
673
+
674
+ - 2d5ff04: fix(core): decode base64 strings and data URIs into binary Uint8Array in storage adapters
675
+
676
+ ## 0.8.2
677
+
678
+ ### Patch Changes
679
+
680
+ - fix(core): decode base64 strings and data URIs into binary Uint8Array in storage adapters
681
+
682
+ ## 0.8.1
683
+
684
+ ### Patch Changes
685
+
686
+ - 315425c: fix(core): generate Firebase Storage download tokens and construct valid public URLs
687
+
688
+ ## 0.8.0
689
+
690
+ ### Minor Changes
691
+
692
+ - 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.
693
+
694
+ ## 0.7.0
695
+
696
+ ### Minor Changes
697
+
698
+ - a48a04a: Add threaded conversations, attachment metadata management, and storage adapters (S3 & Firebase Storage):
699
+
700
+ - **`@critical-path/core`**:
701
+ - Added `Attachment` entity, `CreateAttachmentInput`, `UploadFileInput`, and `FileStorageAdapter` contracts.
702
+ - 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).
703
+ - Extended `Comment` with `authorType` (`user`, `agent`, `system`) and `parentId` for threaded discussions.
704
+ - Implemented full comment and attachment repository methods across `InMemoryStore`, `SQLiteStore`, and `FirebaseStore`.
705
+ - Added engine operations for upload, presigning, and deleting attachments with domain events (`comment.*`, `attachment.*`) and webhooks.
706
+
707
+ - **`@critical-path/server`**:
708
+ - Added RESTful routes for comments (`GET/POST /tasks/:taskId/comments`, `GET/POST /comments`, `GET/PATCH/DELETE /comments/:id`).
709
+ - Added RESTful routes for attachments (`GET/POST /tasks/:taskId/attachments`, `GET/POST /attachments`, `GET/DELETE /attachments/:id`, `POST /attachments/presign`).
710
+
711
+ - **`@critical-path/client`**:
712
+ - Added SDK methods `getComments`, `getComment`, `addComment`, `updateComment`, `deleteComment`.
713
+ - Added SDK methods `getAttachments`, `getAttachment`, `createAttachment`, `deleteAttachment`, and `getPresignedAttachmentUploadUrl`.
714
+
715
+ - **`@critical-path/react`**:
716
+ - Added `useComments(taskId)` with reactive thread tree derivation (`threads` containing nested `replies`) and comment mutations.
717
+ - Added `useAttachments(filter)` with attachment creation and deletion.
718
+
719
+ - **`@critical-path/svelte`**:
720
+ - Added Svelte 5 Rune-based `CommentState` / `createCommentState(client, taskId)` with derived threaded hierarchy.
721
+ - Added Svelte 5 Rune-based `AttachmentState` / `createAttachmentState(client, filter)`.
722
+
723
+ ## 0.6.0
724
+
725
+ ### Minor Changes
726
+
727
+ - 6e9dece: Introduce Domain-Driven Design (DDD) constructs:
728
+ - Rich Domain Aggregates (`TaskEntity`, `ProjectEntity`, `BaseEntity`) encapsulating invariants, transitions, and uncommitted events.
729
+ - Typed `DomainEventBus` and domain event interfaces (`task.created`, `task.status_changed`, `time.logged`, `dependency.added`, etc.).
730
+ - DAG task dependency graph cycle detection (`detectDependencyCycle`, `CircularDependencyError`).
731
+ - Custom field value object validation (`validateCustomFieldValues`, `CustomFieldValidationError`).
732
+ - Interface segregation for discrete repositories (`ProjectRepository`, `TaskRepository`, `WorkflowRepository`, etc.).
733
+
734
+ ## 0.5.2
735
+
736
+ ### Patch Changes
737
+
738
+ - c24b76c: Set `isDefault: false` on DEFAULT_SOFTWARE_WORKFLOW so only DEFAULT_SIMPLE_WORKFLOW is default
739
+
740
+ ## 0.5.1
741
+
742
+ ### Patch Changes
743
+
744
+ - 34067fd: Make node:sqlite import browser-safe for web bundlers
745
+
746
+ ## 0.5.0
747
+
748
+ ### Minor Changes
749
+
750
+ - 83a5c17: Add `DEFAULT_VFX_WORKFLOW` preset and validation suite for Software Development and Visual Effects (VFX) production use cases.
751
+
752
+ ## 0.4.0
753
+
754
+ ### Minor Changes
755
+
756
+ - 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.
757
+
758
+ ## 0.3.0
759
+
760
+ ### Minor Changes
761
+
762
+ - 4b92228: Add project short key utilities (`generateProjectKey`, `validateProjectKey`, `formatTaskKey`) and automatic key generation fallback in `createProject`.
763
+
764
+ ## 0.2.1
765
+
766
+ ### Patch Changes
767
+
768
+ - df22aad: Remove implicit InMemoryFirestoreMock fallback and require explicit db parameter in FirebaseStore constructor
769
+
770
+ ## 0.2.0
771
+
772
+ ### Minor Changes
773
+
774
+ - 755286a: Add native `SQLiteStore` (using `node:sqlite`) and `FirebaseStore` (Firestore) storage adapters with full CRUD support for projects, tasks, sprints, comments, activities, time entries, dependencies, and webhooks.
775
+
776
+ ## 0.1.2
777
+
778
+ ### Patch Changes
779
+
780
+ - Initial open-source release of the core headless domain engine, plugin lifecycle hooks, and in-memory store.
package/README.md CHANGED
@@ -2,6 +2,9 @@
2
2
 
3
3
  > The foundational domain engine, Domain-Driven Design (DDD) aggregate roots, domain event bus, graph cycle detection, and storage adapters for **Critical Path**.
4
4
 
5
+ > **Upgrading?** Upgrade every `@critical-path/*` package together. Coding agents: follow [UPGRADING.md](https://github.com/Pixerate/critical-path/blob/main/UPGRADING.md); breaking changes are marked **BREAKING** in this package's `CHANGELOG.md`.
6
+
7
+
5
8
  ---
6
9
 
7
10
  ## 📦 Features
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@critical-path/core",
3
- "version": "0.51.0",
3
+ "version": "0.51.1",
4
4
  "description": "Core headless domain engine, plugin architecture, and data stores for Critical Path",
5
5
  "author": "Jack James",
6
6
  "license": "MIT",
@@ -39,6 +39,7 @@
39
39
  },
40
40
  "files": [
41
41
  "dist",
42
+ "CHANGELOG.md",
42
43
  "!dist/**/*.test.*"
43
44
  ],
44
45
  "scripts": {