@critical-path/core 0.36.0 → 0.36.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 (185) hide show
  1. package/package.json +5 -1
  2. package/CHANGELOG.md +0 -593
  3. package/dist/deliverables.test.d.ts +0 -2
  4. package/dist/deliverables.test.d.ts.map +0 -1
  5. package/dist/deliverables.test.js +0 -232
  6. package/dist/deliverables.test.js.map +0 -1
  7. package/dist/domain/calendar.test.d.ts +0 -2
  8. package/dist/domain/calendar.test.d.ts.map +0 -1
  9. package/dist/domain/calendar.test.js +0 -181
  10. package/dist/domain/calendar.test.js.map +0 -1
  11. package/dist/domain/cpm.test.d.ts +0 -2
  12. package/dist/domain/cpm.test.d.ts.map +0 -1
  13. package/dist/domain/cpm.test.js +0 -166
  14. package/dist/domain/cpm.test.js.map +0 -1
  15. package/dist/domain/ddd.test.d.ts +0 -2
  16. package/dist/domain/ddd.test.d.ts.map +0 -1
  17. package/dist/domain/ddd.test.js +0 -349
  18. package/dist/domain/ddd.test.js.map +0 -1
  19. package/dist/domain/ladder.test.d.ts +0 -2
  20. package/dist/domain/ladder.test.d.ts.map +0 -1
  21. package/dist/domain/ladder.test.js +0 -213
  22. package/dist/domain/ladder.test.js.map +0 -1
  23. package/dist/domain/metrics.test.d.ts +0 -2
  24. package/dist/domain/metrics.test.d.ts.map +0 -1
  25. package/dist/domain/metrics.test.js +0 -252
  26. package/dist/domain/metrics.test.js.map +0 -1
  27. package/dist/domain/task-duration.test.d.ts +0 -2
  28. package/dist/domain/task-duration.test.d.ts.map +0 -1
  29. package/dist/domain/task-duration.test.js +0 -307
  30. package/dist/domain/task-duration.test.js.map +0 -1
  31. package/dist/domain/workload.test.d.ts +0 -2
  32. package/dist/domain/workload.test.d.ts.map +0 -1
  33. package/dist/domain/workload.test.js +0 -261
  34. package/dist/domain/workload.test.js.map +0 -1
  35. package/dist/engine/actor.test.d.ts +0 -2
  36. package/dist/engine/actor.test.d.ts.map +0 -1
  37. package/dist/engine/actor.test.js +0 -54
  38. package/dist/engine/actor.test.js.map +0 -1
  39. package/dist/engine/authorization.test.d.ts +0 -2
  40. package/dist/engine/authorization.test.d.ts.map +0 -1
  41. package/dist/engine/authorization.test.js +0 -154
  42. package/dist/engine/authorization.test.js.map +0 -1
  43. package/dist/engine/cascade.test.d.ts +0 -2
  44. package/dist/engine/cascade.test.d.ts.map +0 -1
  45. package/dist/engine/cascade.test.js +0 -99
  46. package/dist/engine/cascade.test.js.map +0 -1
  47. package/dist/engine/config.test.d.ts +0 -2
  48. package/dist/engine/config.test.d.ts.map +0 -1
  49. package/dist/engine/config.test.js +0 -46
  50. package/dist/engine/config.test.js.map +0 -1
  51. package/dist/engine/entity-events.test.d.ts +0 -2
  52. package/dist/engine/entity-events.test.d.ts.map +0 -1
  53. package/dist/engine/entity-events.test.js +0 -61
  54. package/dist/engine/entity-events.test.js.map +0 -1
  55. package/dist/index.test.d.ts +0 -2
  56. package/dist/index.test.d.ts.map +0 -1
  57. package/dist/index.test.js +0 -429
  58. package/dist/index.test.js.map +0 -1
  59. package/dist/plugins/plugins.test.d.ts +0 -2
  60. package/dist/plugins/plugins.test.d.ts.map +0 -1
  61. package/dist/plugins/plugins.test.js +0 -137
  62. package/dist/plugins/plugins.test.js.map +0 -1
  63. package/dist/schemas/schemas.test.d.ts +0 -2
  64. package/dist/schemas/schemas.test.d.ts.map +0 -1
  65. package/dist/schemas/schemas.test.js +0 -58
  66. package/dist/schemas/schemas.test.js.map +0 -1
  67. package/dist/status.test.d.ts +0 -2
  68. package/dist/status.test.d.ts.map +0 -1
  69. package/dist/status.test.js +0 -295
  70. package/dist/status.test.js.map +0 -1
  71. package/dist/storage/storage.test.d.ts +0 -2
  72. package/dist/storage/storage.test.d.ts.map +0 -1
  73. package/dist/storage/storage.test.js +0 -236
  74. package/dist/storage/storage.test.js.map +0 -1
  75. package/dist/storage/upload-limits.test.d.ts +0 -2
  76. package/dist/storage/upload-limits.test.d.ts.map +0 -1
  77. package/dist/storage/upload-limits.test.js +0 -31
  78. package/dist/storage/upload-limits.test.js.map +0 -1
  79. package/dist/store/conformance.test.d.ts +0 -2
  80. package/dist/store/conformance.test.d.ts.map +0 -1
  81. package/dist/store/conformance.test.js +0 -15
  82. package/dist/store/conformance.test.js.map +0 -1
  83. package/dist/store/firebase.test.d.ts +0 -2
  84. package/dist/store/firebase.test.d.ts.map +0 -1
  85. package/dist/store/firebase.test.js +0 -103
  86. package/dist/store/firebase.test.js.map +0 -1
  87. package/dist/store/query.test.d.ts +0 -2
  88. package/dist/store/query.test.d.ts.map +0 -1
  89. package/dist/store/query.test.js +0 -89
  90. package/dist/store/query.test.js.map +0 -1
  91. package/dist/store/sqlite.test.d.ts +0 -2
  92. package/dist/store/sqlite.test.d.ts.map +0 -1
  93. package/dist/store/sqlite.test.js +0 -177
  94. package/dist/store/sqlite.test.js.map +0 -1
  95. package/dist/task-state.test.d.ts +0 -2
  96. package/dist/task-state.test.d.ts.map +0 -1
  97. package/dist/task-state.test.js +0 -423
  98. package/dist/task-state.test.js.map +0 -1
  99. package/dist/use-case-validation.test.d.ts +0 -2
  100. package/dist/use-case-validation.test.d.ts.map +0 -1
  101. package/dist/use-case-validation.test.js +0 -281
  102. package/dist/use-case-validation.test.js.map +0 -1
  103. package/dist/utils/fractional-index.test.d.ts +0 -2
  104. package/dist/utils/fractional-index.test.d.ts.map +0 -1
  105. package/dist/utils/fractional-index.test.js +0 -182
  106. package/dist/utils/fractional-index.test.js.map +0 -1
  107. package/dist/utils/key.test.d.ts +0 -2
  108. package/dist/utils/key.test.d.ts.map +0 -1
  109. package/dist/utils/key.test.js +0 -65
  110. package/dist/utils/key.test.js.map +0 -1
  111. package/dist/utils/mentions.test.d.ts +0 -2
  112. package/dist/utils/mentions.test.d.ts.map +0 -1
  113. package/dist/utils/mentions.test.js +0 -114
  114. package/dist/utils/mentions.test.js.map +0 -1
  115. package/dist/webhooks/webhooks.test.d.ts +0 -2
  116. package/dist/webhooks/webhooks.test.d.ts.map +0 -1
  117. package/dist/webhooks/webhooks.test.js +0 -154
  118. package/dist/webhooks/webhooks.test.js.map +0 -1
  119. package/src/deliverables.test.ts +0 -284
  120. package/src/domain/authorization.ts +0 -82
  121. package/src/domain/calendar.test.ts +0 -216
  122. package/src/domain/calendar.ts +0 -502
  123. package/src/domain/cpm.test.ts +0 -189
  124. package/src/domain/cpm.ts +0 -258
  125. package/src/domain/custom-fields.ts +0 -172
  126. package/src/domain/ddd.test.ts +0 -442
  127. package/src/domain/entities.ts +0 -798
  128. package/src/domain/errors.ts +0 -38
  129. package/src/domain/events.ts +0 -369
  130. package/src/domain/graph.ts +0 -70
  131. package/src/domain/index.ts +0 -12
  132. package/src/domain/ladder.test.ts +0 -251
  133. package/src/domain/ladder.ts +0 -474
  134. package/src/domain/metrics.test.ts +0 -288
  135. package/src/domain/metrics.ts +0 -497
  136. package/src/domain/task-duration.test.ts +0 -354
  137. package/src/domain/workload.test.ts +0 -311
  138. package/src/domain/workload.ts +0 -457
  139. package/src/engine/actor.test.ts +0 -63
  140. package/src/engine/authorization.test.ts +0 -199
  141. package/src/engine/cascade.test.ts +0 -121
  142. package/src/engine/config.test.ts +0 -51
  143. package/src/engine/entity-events.test.ts +0 -67
  144. package/src/engine/index.ts +0 -2495
  145. package/src/index.test.ts +0 -514
  146. package/src/index.ts +0 -9
  147. package/src/plugins/index.ts +0 -103
  148. package/src/plugins/plugins.test.ts +0 -161
  149. package/src/schemas/index.ts +0 -402
  150. package/src/schemas/schemas.test.ts +0 -116
  151. package/src/status.test.ts +0 -354
  152. package/src/storage/file-storage.ts +0 -200
  153. package/src/storage/firebase-storage.ts +0 -209
  154. package/src/storage/index.ts +0 -3
  155. package/src/storage/s3.ts +0 -151
  156. package/src/storage/storage.test.ts +0 -274
  157. package/src/storage/upload-limits.test.ts +0 -41
  158. package/src/store/conformance.test.ts +0 -15
  159. package/src/store/firebase.test.ts +0 -131
  160. package/src/store/firebase.ts +0 -658
  161. package/src/store/index.ts +0 -623
  162. package/src/store/query.test.ts +0 -110
  163. package/src/store/query.ts +0 -113
  164. package/src/store/sqlite.test.ts +0 -218
  165. package/src/store/sqlite.ts +0 -1480
  166. package/src/task-state.test.ts +0 -506
  167. package/src/testing/conformance.ts +0 -319
  168. package/src/testing/index.ts +0 -1
  169. package/src/types/index.ts +0 -871
  170. package/src/use-case-validation.test.ts +0 -324
  171. package/src/utils/fractional-index.test.ts +0 -228
  172. package/src/utils/fractional-index.ts +0 -254
  173. package/src/utils/index.ts +0 -7
  174. package/src/utils/key.test.ts +0 -76
  175. package/src/utils/key.ts +0 -62
  176. package/src/utils/mentions.test.ts +0 -132
  177. package/src/utils/mentions.ts +0 -131
  178. package/src/utils/status.ts +0 -419
  179. package/src/utils/workflow.ts +0 -306
  180. package/src/webhooks/dispatcher.ts +0 -190
  181. package/src/webhooks/index.ts +0 -2
  182. package/src/webhooks/signature.ts +0 -57
  183. package/src/webhooks/webhooks.test.ts +0 -201
  184. package/tsconfig.json +0 -8
  185. package/tsconfig.tsbuildinfo +0 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@critical-path/core",
3
- "version": "0.36.0",
3
+ "version": "0.36.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",
@@ -36,6 +36,10 @@
36
36
  "dependencies": {
37
37
  "zod": "^3.25.76"
38
38
  },
39
+ "files": [
40
+ "dist",
41
+ "!dist/**/*.test.*"
42
+ ],
39
43
  "scripts": {
40
44
  "build": "tsc --build",
41
45
  "test": "vitest run",
package/CHANGELOG.md DELETED
@@ -1,593 +0,0 @@
1
- # @critical-path/core
2
-
3
- ## 0.36.0
4
-
5
- ### Minor Changes
6
-
7
- - 810d8d1: Upload and request body limits.
8
-
9
- - **@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).
10
- - **@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.
11
-
12
- ## 0.35.0
13
-
14
- ### Minor Changes
15
-
16
- - b13f7c4: `InMemoryStore` returns copies.
17
-
18
- - **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.
19
- - The conformance suite checks that adapters return copies. `InMemoryFirestoreMock` now copies too, like real Firestore.
20
-
21
- ## 0.34.0
22
-
23
- ### Minor Changes
24
-
25
- - 1cc0d4c: Domain events for every team, container and iteration change, and collision-safe ids.
26
-
27
- - 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.
28
- - 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.
29
-
30
- ## 0.33.0
31
-
32
- ### Minor Changes
33
-
34
- - aa94129: Storage adapter conformance suite and parity fixes.
35
-
36
- - New `@critical-path/core/testing` entry with `runStorageAdapterConformance({ name, createStore, describe, it, expect })`, the suite the built-in adapters run, for verifying custom adapters.
37
- - `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.
38
- - `FirebaseStore` applies every filter passed to `getAttachments` and `getActivities` (previously only the first), returns activities newest first and comments oldest first.
39
-
40
- ## 0.32.0
41
-
42
- ### Minor Changes
43
-
44
- - a3fe03d: Honour engine configuration options.
45
-
46
- - **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.
47
- - 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.
48
-
49
- ## 0.31.0
50
-
51
- ### Minor Changes
52
-
53
- - 40e5958: Real S3 uploads and signed URLs, and server-chosen storage keys.
54
-
55
- **@critical-path/core**
56
- - **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.
57
- - **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.
58
- - **BREAKING:** `engine.getPresignedAttachmentUploadUrl({ projectId, filename, contentType?, expiresInSeconds? })` generates the storage key under `projects/<projectId>/`, instead of accepting a caller-chosen `storageKey`.
59
- - 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.
60
- - New `buildStorageKey` (validates path prefixes, crypto-random component) and `contentDispositionFor`. HTML, SVG and script uploads are stored as downloads.
61
-
62
- **@critical-path/server**
63
- - **BREAKING:** `POST /attachments/presign` takes `{ projectId, filename, contentType?, expiresInSeconds? }`. `POST /attachments/upload` no longer accepts `pathPrefix`.
64
-
65
- **@critical-path/client**
66
- - `getPresignedAttachmentUploadUrl` and `uploadAttachmentFile` use the updated request bodies.
67
-
68
- ## 0.30.0
69
-
70
- ### Minor Changes
71
-
72
- - cdb300a: Task filtering and pagination.
73
-
74
- **@critical-path/core**
75
- - New `engine.queryTasks(query)` and `engine.queryActivities(query)` return `Page<T>` (`{ items, nextCursor }`).
76
- - Tasks are ordered oldest first, activities newest first, using keyset cursors on `createdAt` then `id`.
77
- - Task filters: `status[]`, `priority[]`, `assigneeId` (also matches `assignees`), `iterationId`, `deliverableId`, `containerId`, `parentId` (`null` means top-level), `projectIds`.
78
- - Results are limited to projects the actor can read.
79
- - **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.
80
-
81
- **@critical-path/server**
82
- - **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`.
83
-
84
- **@critical-path/client**
85
- - `getTasks` and `getActivities` follow pagination and still return everything. New `queryTasks` and `queryActivities` return single pages.
86
-
87
- **@critical-path/mcp**
88
- - **BREAKING:** `list_tasks` returns `{ tasks, nextCursor }` and accepts `iterationId`, `limit` and `cursor`. It now filters in the store instead of loading every task.
89
-
90
- ## 0.29.0
91
-
92
- ### Minor Changes
93
-
94
- - a019d37: Cascading deletes and dependency removal.
95
-
96
- **@critical-path/core**
97
- - **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.
98
- - **BREAKING:** `deleteProject` also deletes containers, iterations, deliverables and project attachments. `project.deleted`'s `deletedTaskIds` includes subtasks.
99
- - Deleting a container, iteration or deliverable clears the reference on its tasks; nested containers are detached.
100
- - New `engine.removeDependency(id)` and `dependency.removed` event.
101
- - **BREAKING (storage adapters):** `DependencyRepository` gains `getDependency` and `removeDependency`, and `TimeEntryRepository` gains `deleteTimeEntry`.
102
- - `SQLiteStore` no longer returns `null` for unset optional fields.
103
- - `FirebaseStore` updates now remove fields cleared with `undefined` (for example, reopening a completed task now clears `completedAt`).
104
-
105
- **@critical-path/server**
106
- - New `DELETE /tasks/:id/dependencies/:dependencyId`. `DELETE /tasks/:id` accepts `?subtasks=detach`.
107
-
108
- **@critical-path/client**
109
- - New `removeDependency(taskId, dependencyId)`. `deleteTask(id, { subtasks })`.
110
-
111
- ## 0.28.0
112
-
113
- ### Minor Changes
114
-
115
- - 4fbbc40: Complete the plugin system.
116
-
117
- **@critical-path/core**
118
- - `plugin.init(engine)` now runs at startup. `engine.ready` resolves after seeding and every plugin's `init`; init failures reject `ready`.
119
- - **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.
120
- - **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`.
121
- - After-hook errors are logged with the plugin id instead of failing an already-stored write.
122
- - **BREAKING:** `beforeTaskDelete` and `afterTaskDelete` receive the task as a second argument.
123
- - **BREAKING:** required custom fields are enforced even when `customFields` is omitted.
124
- - New plugin `routes` and `middleware` types (`PluginRoute`, `PluginMiddleware`, `PluginRequestContext`).
125
-
126
- **@critical-path/server**
127
- - 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.
128
- - Awaits `engine.ready` before handling requests.
129
-
130
- **@critical-path/mcp**
131
- - Awaits `engine.ready` before running tools.
132
-
133
- ## 0.27.0
134
-
135
- ### Minor Changes
136
-
137
- - 1a516bd: Signed, retried webhooks driven by domain events.
138
-
139
- **@critical-path/core**
140
- - **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`.
141
- - The payload is now `{ id, event, occurredAt, tenantId?, data }`, where `data` is the domain event payload.
142
- - A status change delivers both `task.status_changed` and `task.updated` to webhooks subscribed to both.
143
- - 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`.
144
- - New `webhookDelivery` engine option:
145
- - `timeoutMs` (default 10s), `maxAttempts` (default 5) and exponential `retryBaseDelayMs`.
146
- - A pluggable `queue`; the default is in-process.
147
- - `allowPrivateUrls` (default `false`).
148
- - `onDelivered` and `onDeliveryFailed` callbacks.
149
- - `engine.webhooks` exposes `deliver(job)` for custom queues and `idle()` for tests.
150
- - `config.webhooks` are now honoured as static webhooks.
151
- - 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`).
152
- - **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`.
153
- - New `DOMAIN_EVENT_NAMES`. The `project.deleted` and `workflow.deleted` payloads include `tenantId`; `attachment.deleted` includes `projectId`.
154
-
155
- **@critical-path/server**
156
- - New `GET/POST /webhooks` and `GET/PATCH/DELETE /webhooks/:id` routes. Event names are validated.
157
-
158
- **@critical-path/client**
159
- - New `getWebhooks`, `createWebhook`, `updateWebhook` and `deleteWebhook`.
160
-
161
- ## 0.26.0
162
-
163
- ### Minor Changes
164
-
165
- - 719e844: Role-based authorization and multi-tenancy.
166
-
167
- **@critical-path/core**
168
- - New `authorize` engine option and `createRolePolicy()`:
169
- - Project roles (`viewer`, `contributor`, `project_manager`, `admin`) come from `project.members`.
170
- - Workspace superusers come from `actor.roles`.
171
- - Authors manage their own comments and attachments.
172
- - Checks run on `withActor` views. Unreadable or cross-tenant projects behave as not found, denied actions throw the new `ForbiddenError`, and lists are filtered.
173
- - `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.
174
- - **BREAKING:** `Project.members` is now `{ userId, role }[]` (was `string[]`). Project creators become `admin` members.
175
- - New `engine.getActivities()` and `engine.getTimeEntries()`, which respect authorization.
176
- - **BREAKING:** on views, presigned uploads require `projectId` and are confined to `projects/<projectId>/`. The presign request schema now requires `projectId`.
177
- - `SQLiteStore` persists `tenantId` (migrated automatically).
178
-
179
- **@critical-path/server**
180
- - `RequestContext` gains `tenantId` and `roles`, which are passed to the actor. `ForbiddenError` maps to `403`. Activities and time entries are read through the engine.
181
-
182
- **@critical-path/client / @critical-path/mcp**
183
- - Rebuilt for the new presign `projectId` requirement and project member shape.
184
-
185
- ## 0.25.0
186
-
187
- ### Minor Changes
188
-
189
- - fd79762: **BREAKING:** strict request bodies, no identity in payloads, and CORS off by default.
190
-
191
- **@critical-path/core**
192
- - Request schemas are strict: unknown keys, server-assigned fields and identity fields are rejected instead of stripped.
193
- - 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'`.
194
- - Schemas export request body types (`CreateTaskBody`, `UpdateTaskBody`, ...).
195
-
196
- **@critical-path/server**
197
- - Bodies containing unknown, server-assigned or identity fields return `400`.
198
- - 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.
199
- - `DELETE /comments/:id/reactions` takes `?emoji=` only.
200
- - CORS is off by default (`cors: false`). Pass `cors: { origins: [...] }` to allow cross-origin browsers.
201
-
202
- **@critical-path/client**
203
- - 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.
204
- - New `updateProject`, `deleteProject` and `addDependency`. `uploadAttachmentFile` base64-encodes binary data (previously it sent unusable JSON for `Uint8Array`/`ArrayBuffer`).
205
- - 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`.
206
-
207
- **@critical-path/mcp**
208
- - Tool arguments are strict: undeclared arguments return an `isError` result.
209
- - `add_comment` no longer takes `authorId`. With an `engine`, writes are attributed to the new `actor` server option (default `DEFAULT_MCP_ACTOR`).
210
-
211
- **@critical-path/react / @critical-path/svelte**
212
- - `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.
213
-
214
- ## 0.24.0
215
-
216
- ### Minor Changes
217
-
218
- - b54e22c: Validate request bodies with shared zod schemas and publish an OpenAPI document.
219
-
220
- **@critical-path/core**
221
- - 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.
222
- - `ValidationError` carries an optional `issues: { path, message }[]`.
223
-
224
- **@critical-path/server**
225
- - 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.
226
- - 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.
227
- - New `GET /openapi.json` and `buildOpenApiDocument()` (OpenAPI 3.1, request bodies generated from the validation schemas).
228
-
229
- **@critical-path/mcp**
230
- - Tool `inputSchema`s are generated from their zod schemas via the new `defineTool`, removing the hand-written JSON copies.
231
-
232
- **@critical-path/svelte**
233
- - Rebuilt with the bundled `@critical-path/mcp` changes.
234
-
235
- ## 0.23.0
236
-
237
- ### Minor Changes
238
-
239
- - 6dd5529: Add request context, authentication hooks and actor attribution.
240
-
241
- **@critical-path/core**
242
- - 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.
243
-
244
- **@critical-path/server**
245
- - 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`).
246
- - 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.
247
- - `createSvelteKitHandler` options take `getContext(event)` so `event.locals` is available; `configOrRouter` is now optional.
248
- - New `createUniversalHandler(config, options)` for Workers, Deno, Bun and Hono.
249
- - `handleRequest(request, { getContext })` lets custom adapters supply a per-request resolver.
250
-
251
- **@critical-path/mcp**
252
- - 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.
253
-
254
- ## 0.22.0
255
-
256
- ### Minor Changes
257
-
258
- - b243a37: Fix correctness and safety issues found in a code audit.
259
-
260
- **@critical-path/core**
261
- - `SQLiteStore` now loads `node:sqlite` via `process.getBuiltinModule`, fixing `require is not defined` when constructed from a filename in plain Node ESM.
262
- - Removed the unused `better-sqlite3` runtime dependency.
263
- - `engine.addDependency` now detects indirect cycles (e.g. A → B → C → D → A), not just cycles between direct neighbours.
264
- - Fixed `generateKeyBetween` returning out-of-range, duplicate keys after repeated inserts after the same item. It now throws a `RangeError` when `a >= b`.
265
- - Added `engine.deleteProject(id)`, which deletes a project's tasks through `deleteTask` and publishes a new `project.deleted` event and webhook.
266
- - Added exported `ValidationError` and `NotFoundError` classes. `logTime` now rejects non-numeric hours.
267
-
268
- **@critical-path/server**
269
- - `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.
270
- - Added `PATCH /projects/:id`.
271
- - `DELETE` on a resource that does not exist now returns `404` instead of `200 { success: false }`.
272
- - Malformed JSON returns `400`, validation errors `400`, `NotFoundError` `404`, and dependency cycles `409`. Unexpected errors return a generic `500` message outside development.
273
- - `OPTIONS` preflight requests return `204` with CORS headers.
274
- - 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'`).
275
- - `createNextHandler` returns a callable handler that also exposes per-method properties, so `export { handler as GET }` works as documented.
276
-
277
- **@critical-path/mcp**
278
- - Tools excluded via the `tools` option can no longer be called by name.
279
- - Tool arguments are validated with each tool's zod schema; undeclared fields are stripped.
280
- - Tool listings include `title` and MCP `readOnlyHint` / `destructiveHint` annotations.
281
-
282
- **@critical-path/svelte**
283
- - Rebuilt with the bundled `@critical-path/mcp` WebMCP argument validation.
284
-
285
- **@critical-path/client**
286
- - Delete methods resolve to `false` when the server returns `404`, keeping their boolean contract with the new server behaviour.
287
-
288
- ## 0.21.0
289
-
290
- ### Minor Changes
291
-
292
- - f3301bf: - Added comprehensive task lifecycle and semantic status predicates (`isDraftTask`, `isArchivedTask`, `isTrashedTask`, `isTrashedOrArchivedTask`, `isWorkflowTask`, `getTaskSemanticStatus`, `isTaskCompleted`, `isTaskInProgress`, `isTaskNotStarted`, `isTaskCanceled`, `isTaskActive`, `isTaskUnassigned`).
293
- - 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.
294
- - Added Base-62 fractional indexing utilities (`generateKeyBetween`, `generateNKeysBetween`) for zero-cost lexical task/item reordering without array shifting or bulk database rewrites.
295
- - 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`.
296
- - 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.
297
-
298
- ## 0.20.2
299
-
300
- ### Patch Changes
301
-
302
- - b8a68dd: Track task blocked duration while active in progress:
303
- - Add `blockedDurationSeconds` and `blockedSince` to `Task` and `TaskInferredActuals`
304
- - Update `TaskEntity` to stamp `blockedSince` when blocked while `in_progress` and accumulate elapsed blocked time into `blockedDurationSeconds` upon unblocking or exiting `in_progress`
305
- - Update `CriticalPathEngine.updateTask` and `checkAndUnblockDownstreamTasks` to manage `blockedSince` and `blockedDurationSeconds` lifecycle transitions
306
- - Update SQLite storage schema and statements to persist `blockedDurationSeconds` and `blockedSince`
307
-
308
- ## 0.20.1
309
-
310
- ### Patch Changes
311
-
312
- - 500b353: Standardize task blocker state on `isBlocked` as the single source of truth:
313
- - Persist `isBlocked` and `blockedReason` on task creation in `engine.createTask`
314
- - Rely strictly on `task.isBlocked` in `engine.updateTask` when detecting blocked transitions
315
- - Remove redundant checks and mutations of `customFields.isBlocked` and `status === 'blocked'` during downstream dependency auto-unblocking
316
- - Update `deriveTaskLifecycleState` to evaluate `task.isBlocked === true`
317
-
318
- ## 0.20.0
319
-
320
- ### Minor Changes
321
-
322
- - c83235b: Add task execution timestamps and cumulative in-progress duration tracking:
323
- - Introduce `actualDurationSeconds` and `inProgressSince` to `Task` and `TaskEntity`
324
- - Automatically timestamp `actualStartDate` (retaining earliest) and begin session timer when transitioning to `in_progress`
325
- - Automatically accumulate duration delta into `actualDurationSeconds` when leaving `in_progress` (pausing/completing)
326
- - Automatically timestamp `actualEndDate` when entering `completed` or `canceled`, and reset `actualEndDate` to `undefined` upon reopening
327
- - Mutually synchronize manual edits between `actualDurationSeconds` and `actualHours`
328
- - Export `formatTaskDuration(seconds, options)` with dynamic scoping (`< 120s`, `< 1 day`, `>= 1 day`)
329
- - Add `calendarDurationHours` and `actualDurationSeconds` to `TaskInferredActuals`
330
-
331
- ## 0.19.1
332
-
333
- ### Patch Changes
334
-
335
- - 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.
336
-
337
- ## 0.19.0
338
-
339
- ### Minor Changes
340
-
341
- - 31a6dde: Promote task blocking state (`isBlocked: boolean` and `blockedReason: string | null`) to first-class fields on `Task`, `CreateTaskInput`, and `UpdateTaskInput`.
342
-
343
- - **Domain Events**: Introduced `TaskBlockedEvent` (`task.blocked`) and updated `TaskUnblockedEvent` (`task.unblocked`) to support explicit unblocking.
344
- - **Lifecycle Derivation**: Updated `deriveTaskStatus` and `deriveTaskLifecycleState` to reflect `task.isBlocked` directly alongside upstream dependency checks.
345
- - **Engines & Storage**: Added `isBlocked` and `blockedReason` persistence to `SQLiteStore`, `FirebaseStore`, and `InMemoryStore`.
346
- - **MCP Server**: Added `isBlocked` and `blockedReason` parameter options to `create_task` and `update_task` tool schemas.
347
- - 31a6dde: Add comprehensive Work Schedule, Working Hours, Working Days & Holidays subsystem:
348
- - Added `WorkSchedule`, `DaySchedule`, `WorkingHoursRange`, and `Holiday` types supporting custom shifts, weekend configurations, and organization/regional holidays.
349
- - Integrated hierarchical calendar resolution: Task Assignee/Team -> Project -> Engine/Default (`DEFAULT_WORK_SCHEDULE`).
350
- - Enhanced Critical Path Method (CPM) with calendar working-hours math (`earlyStartDate`, `earlyFinishDate`, `lateStartDate`, `lateFinishDate`, `totalWorkingHours`, `projectEndDate`) skipping weekends and holidays.
351
- - Enhanced Workload & Capacity Engine with working-day effort distribution and holiday capacity deductions.
352
- - Added working-days schedule variance (`scheduleVarianceWorkingDays`) to Reality Deltas in the Ladder of Abstraction.
353
-
354
- ## 0.18.0
355
-
356
- ### Minor Changes
357
-
358
- - 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.
359
-
360
- ## 0.17.0
361
-
362
- ### Minor Changes
363
-
364
- - 9c31e8d: Introduce comprehensive Task Metrics, Inferred Actuals, Progress Inference, Earned Value Management (EVM), and Time-Series Progress History Curve Profiling.
365
- - **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.
366
- - **Reality Delta**: Multi-dimensional variance analysis comparing planned estimates to logged hours (`effortVarianceHours`, `durationVarianceHours`, `accuracyRatio`, `isOverdue`, `isOverEstimate`).
367
- - **Progress Inference**: Deterministic priority waterfall resolving completion progress across explicit values, checklist/todo completion ratios, logged effort, and elapsed schedule time.
368
- - **Earned Value Management (EVM)**: Task-level PV, EV, AC, CV, SV, CPI, and SPI calculations.
369
- - **Time-Series History & Curve Shapes**: Historical timeline reconstruction from activity logs with piecewise interpolation curve classification (`linear`, `s_curve`, `early_surge`, `late_rush`, `stalled`).
370
- - **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`).
371
-
372
- ## 0.16.0
373
-
374
- ### Minor Changes
375
-
376
- - e2a7eef: Introduce Ladder of Abstraction and Critical Path Method (CPM) timeline synthesis to the framework data model:
377
- - **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`.
378
- - **Server Router**: HTTP endpoints `GET /projects/:id/critical-path`, `GET /projects/:id/ladder`, and `GET /tasks/:id/ladder`.
379
- - **Client SDK**: `CriticalPathClient` methods `calculateCriticalPath`, `getTimelineLadder`, and `getTaskLadder`.
380
- - **MCP**: New AI tools `calculate_critical_path`, `get_timeline_ladder`, and `get_task_ladder`.
381
- - **React**: Custom hooks `useTimelineLadder`, `useCriticalPath`, and `useTaskLadder`.
382
- - **Svelte 5**: Svelte 5 Runes state classes `TimelineLadderState` and `CriticalPathState`.
383
-
384
- ## 0.15.2
385
-
386
- ### Patch Changes
387
-
388
- - dbd2072: Add comprehensive unit test coverage for task state lifecycle behaviors and upstream/downstream dependency validation.
389
-
390
- ## 0.15.1
391
-
392
- ### Patch Changes
393
-
394
- - f53afab: Add automated downstream task unblocking on task completion, full bidirectional VFX and Creative workflow transitions, and bidirectional dependency querying in FirebaseStore.
395
-
396
- ## 0.15.0
397
-
398
- ### Minor Changes
399
-
400
- - 21eb85c: Implement Universal Semantic Statuses & System-Derived Implied Statuses (3-Tier Status Architecture)
401
-
402
- - **Tier 1 (Universal Semantic Statuses)**: Defined canonical status enum `SemanticStatus = 'not_started' | 'in_progress' | 'completed' | 'canceled'` providing universal semantic meaning across any industry domain.
403
- - **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.
404
- - **Tier 3 (System-Derived Implied Statuses)**: Added `deriveTaskLifecycleState` and `engine.getTaskLifecycleState(taskId)` returning dynamic indicators:
405
- - Dependency: `isReady`, `isBlocked`, `blockingTaskIds`
406
- - Schedule: `isOverdue`, `isUpcoming`, `isUnplanned`
407
- - Ownership: `isUnassigned`, `isStalled`
408
- - Estimate/Pace: `isOverEstimate`, `isPaceWarning`
409
- - Convenience flags: `isDone`, `isActive`, `isCancelled`
410
- - **Domain Entities & Engine**: Added automatic timestamp progression (`actualStartDate`, `actualEndDate`), progress completion, and event emission driven by semantic status categories.
411
- - **React UI Hooks**: Updated `useKanban` to support dynamic custom workflow columns without dropping tasks, plus added `groupBy: 'semantic' | 'workflow'` option.
412
- - **Client SDK**: Added `client.getTaskLifecycleState(taskId)`.
413
-
414
- ## 0.14.0
415
-
416
- ### Minor Changes
417
-
418
- - 3dc2798: feat(core): add readAttachmentText engine method, download on storage adapters, and artifactType metadata
419
-
420
- ## 0.13.3
421
-
422
- ### Patch Changes
423
-
424
- - 573a4fa: Fix mention regex to avoid capturing trailing punctuation like periods or commas in unquoted handles
425
-
426
- ## 0.13.2
427
-
428
- ### Patch Changes
429
-
430
- - 03d269c: Make getAllowedNextStatuses strictly forward and symmetrical with getAllowedPreviousStatuses by constraining to downstream statuses in workflow sequence.
431
-
432
- ## 0.13.1
433
-
434
- ### Patch Changes
435
-
436
- - a7d17c0: Add backward status transitions to default workflows and align allowed previous statuses with workflow transitions
437
-
438
- ## 0.13.0
439
-
440
- ### Minor Changes
441
-
442
- - a4a464b: Support multi-assignees and backward workflow status transitions:
443
- - Add `TaskAssignee` interface (`id`, `name`, `role`, `type: 'user' | 'agent' | 'team'`, `avatarUrl`) and `assignees?: TaskAssignee[]` to `Task` entity and SQLite storage adapter.
444
- - Add `getAllowedPreviousStatuses(workflow, currentStatus)` utility and `CriticalPathEngine.getAllowedPreviousTaskTransitions(taskId)` for calculating valid backward transitions.
445
- - Expose `allowedPreviousStatuses` in server endpoint `GET /tasks/:taskId/transitions`.
446
- - Add `getAllowedPreviousTaskTransitions(taskId)` to `CriticalPathClient` SDK.
447
-
448
- ## 0.12.0
449
-
450
- ### Minor Changes
451
-
452
- - 5a5930f: Add first-class Deliverable entity, Creative Workflow presets, and reactive UI bindings:
453
- - `@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.
454
- - `@critical-path/server`: Added RESTful API endpoints for `/deliverables` and `/deliverables/:id/summary`.
455
- - `@critical-path/client`: Added deliverable management and summary methods to `CriticalPathClient`.
456
- - `@critical-path/react`: Added `useDeliverables` and `useDeliverableSummary` React hooks.
457
- - `@critical-path/svelte`: Added `DeliverableState` and `createDeliverableState` Svelte 5 Runes state management.
458
-
459
- ## 0.11.0
460
-
461
- ### Minor Changes
462
-
463
- - 55549e9: Support @mentions in comments with extraction and segmentation utilities
464
-
465
- - Add `mentions?: string[]` to `Comment` interface
466
- - Add `extractMentions` and `parseMentionSegments` utilities for mention parsing and UI rendering
467
- - Auto-extract and populate mentions during `addComment` and `updateComment` in the engine
468
- - Update SQLite comments schema with `mentions` column and migration
469
- - Preserve and pass through mentions in server routes, client SDK, and Svelte bindings
470
-
471
- ## 0.10.0
472
-
473
- ### Minor Changes
474
-
475
- - e9003d3: Add emoji reactions support for comment conversations with domain events, deduplication, REST endpoints, client SDK, and React/Svelte state integrations.
476
-
477
- ## 0.9.0
478
-
479
- ### Minor Changes
480
-
481
- - 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.
482
-
483
- ## 0.8.3
484
-
485
- ### Patch Changes
486
-
487
- - 2d5ff04: fix(core): decode base64 strings and data URIs into binary Uint8Array in storage adapters
488
-
489
- ## 0.8.2
490
-
491
- ### Patch Changes
492
-
493
- - fix(core): decode base64 strings and data URIs into binary Uint8Array in storage adapters
494
-
495
- ## 0.8.1
496
-
497
- ### Patch Changes
498
-
499
- - 315425c: fix(core): generate Firebase Storage download tokens and construct valid public URLs
500
-
501
- ## 0.8.0
502
-
503
- ### Minor Changes
504
-
505
- - 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.
506
-
507
- ## 0.7.0
508
-
509
- ### Minor Changes
510
-
511
- - a48a04a: Add threaded conversations, attachment metadata management, and storage adapters (S3 & Firebase Storage):
512
-
513
- - **`@critical-path/core`**:
514
- - Added `Attachment` entity, `CreateAttachmentInput`, `UploadFileInput`, and `FileStorageAdapter` contracts.
515
- - 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).
516
- - Extended `Comment` with `authorType` (`user`, `agent`, `system`) and `parentId` for threaded discussions.
517
- - Implemented full comment and attachment repository methods across `InMemoryStore`, `SQLiteStore`, and `FirebaseStore`.
518
- - Added engine operations for upload, presigning, and deleting attachments with domain events (`comment.*`, `attachment.*`) and webhooks.
519
-
520
- - **`@critical-path/server`**:
521
- - Added RESTful routes for comments (`GET/POST /tasks/:taskId/comments`, `GET/POST /comments`, `GET/PATCH/DELETE /comments/:id`).
522
- - Added RESTful routes for attachments (`GET/POST /tasks/:taskId/attachments`, `GET/POST /attachments`, `GET/DELETE /attachments/:id`, `POST /attachments/presign`).
523
-
524
- - **`@critical-path/client`**:
525
- - Added SDK methods `getComments`, `getComment`, `addComment`, `updateComment`, `deleteComment`.
526
- - Added SDK methods `getAttachments`, `getAttachment`, `createAttachment`, `deleteAttachment`, and `getPresignedAttachmentUploadUrl`.
527
-
528
- - **`@critical-path/react`**:
529
- - Added `useComments(taskId)` with reactive thread tree derivation (`threads` containing nested `replies`) and comment mutations.
530
- - Added `useAttachments(filter)` with attachment creation and deletion.
531
-
532
- - **`@critical-path/svelte`**:
533
- - Added Svelte 5 Rune-based `CommentState` / `createCommentState(client, taskId)` with derived threaded hierarchy.
534
- - Added Svelte 5 Rune-based `AttachmentState` / `createAttachmentState(client, filter)`.
535
-
536
- ## 0.6.0
537
-
538
- ### Minor Changes
539
-
540
- - 6e9dece: Introduce Domain-Driven Design (DDD) constructs:
541
- - Rich Domain Aggregates (`TaskEntity`, `ProjectEntity`, `BaseEntity`) encapsulating invariants, transitions, and uncommitted events.
542
- - Typed `DomainEventBus` and domain event interfaces (`task.created`, `task.status_changed`, `time.logged`, `dependency.added`, etc.).
543
- - DAG task dependency graph cycle detection (`detectDependencyCycle`, `CircularDependencyError`).
544
- - Custom field value object validation (`validateCustomFieldValues`, `CustomFieldValidationError`).
545
- - Interface segregation for discrete repositories (`ProjectRepository`, `TaskRepository`, `WorkflowRepository`, etc.).
546
-
547
- ## 0.5.2
548
-
549
- ### Patch Changes
550
-
551
- - c24b76c: Set `isDefault: false` on DEFAULT_SOFTWARE_WORKFLOW so only DEFAULT_SIMPLE_WORKFLOW is default
552
-
553
- ## 0.5.1
554
-
555
- ### Patch Changes
556
-
557
- - 34067fd: Make node:sqlite import browser-safe for web bundlers
558
-
559
- ## 0.5.0
560
-
561
- ### Minor Changes
562
-
563
- - 83a5c17: Add `DEFAULT_VFX_WORKFLOW` preset and validation suite for Software Development and Visual Effects (VFX) production use cases.
564
-
565
- ## 0.4.0
566
-
567
- ### Minor Changes
568
-
569
- - 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.
570
-
571
- ## 0.3.0
572
-
573
- ### Minor Changes
574
-
575
- - 4b92228: Add project short key utilities (`generateProjectKey`, `validateProjectKey`, `formatTaskKey`) and automatic key generation fallback in `createProject`.
576
-
577
- ## 0.2.1
578
-
579
- ### Patch Changes
580
-
581
- - df22aad: Remove implicit InMemoryFirestoreMock fallback and require explicit db parameter in FirebaseStore constructor
582
-
583
- ## 0.2.0
584
-
585
- ### Minor Changes
586
-
587
- - 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.
588
-
589
- ## 0.1.2
590
-
591
- ### Patch Changes
592
-
593
- - Initial open-source release of the core headless domain engine, plugin lifecycle hooks, and in-memory store.
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=deliverables.test.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"deliverables.test.d.ts","sourceRoot":"","sources":["../src/deliverables.test.ts"],"names":[],"mappings":""}