@jini-ai/cms 0.3.11 → 0.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (258) hide show
  1. package/CHANGELOG.md +59 -0
  2. package/README.md +47 -19
  3. package/dist/content-types/agent-tools.d.ts +3 -56
  4. package/dist/content-types/agent-tools.js +22 -6
  5. package/dist/content-types/cleanup.d.ts +18 -13
  6. package/dist/content-types/cleanup.js +16 -11
  7. package/dist/content-types/errors.d.ts +57 -24
  8. package/dist/content-types/errors.js +56 -39
  9. package/dist/content-types/field-defs.d.ts +8 -4
  10. package/dist/content-types/field-defs.js +19 -14
  11. package/dist/content-types/index-provisioning.d.ts +61 -47
  12. package/dist/content-types/index-provisioning.js +90 -66
  13. package/dist/content-types/index.d.ts +4 -3
  14. package/dist/content-types/lifecycle-dispatch.d.ts +11 -5
  15. package/dist/content-types/lifecycle-dispatch.js +5 -4
  16. package/dist/content-types/lifecycle.d.ts +23 -18
  17. package/dist/content-types/lifecycle.js +71 -64
  18. package/dist/content-types/repo.memory.d.ts +5 -4
  19. package/dist/content-types/repo.memory.js +3 -2
  20. package/dist/content-types/tool-registrations.d.ts +6 -8
  21. package/dist/content-types/tool-registrations.js +24 -28
  22. package/dist/content-types/types.d.ts +17 -13
  23. package/dist/content-types/types.js +11 -5
  24. package/dist/content-types/write-service.d.ts +20 -22
  25. package/dist/content-types/write-service.js +78 -75
  26. package/dist/core/authorization.d.ts +15 -0
  27. package/dist/core/authorization.js +2 -0
  28. package/dist/core/commands/change-set.d.ts +15 -7
  29. package/dist/core/commands/command.d.ts +45 -26
  30. package/dist/core/commands/command.js +73 -63
  31. package/dist/core/entity-liveness.d.ts +11 -7
  32. package/dist/core/entity-liveness.js +5 -4
  33. package/dist/core/index.d.ts +12 -5
  34. package/dist/core/index.js +10 -4
  35. package/dist/core/ports.d.ts +25 -24
  36. package/dist/core/ports.js +1 -0
  37. package/dist/core/tools/args.d.ts +49 -0
  38. package/dist/core/tools/args.js +46 -0
  39. package/dist/core/tools/index.d.ts +3 -0
  40. package/dist/core/tools/index.js +3 -0
  41. package/dist/entries/agent-tools.d.ts +1 -73
  42. package/dist/entries/agent-tools.js +19 -13
  43. package/dist/entries/errors.d.ts +28 -14
  44. package/dist/entries/errors.js +17 -11
  45. package/dist/entries/field-validation.d.ts +5 -3
  46. package/dist/entries/field-validation.js +7 -5
  47. package/dist/entries/index.d.ts +2 -2
  48. package/dist/entries/lifecycle-dispatch.d.ts +5 -2
  49. package/dist/entries/lifecycle-dispatch.js +2 -1
  50. package/dist/entries/list.d.ts +4 -2
  51. package/dist/entries/list.js +4 -3
  52. package/dist/entries/repo.memory.d.ts +12 -10
  53. package/dist/entries/repo.memory.js +11 -10
  54. package/dist/entries/tool-registrations.d.ts +6 -8
  55. package/dist/entries/tool-registrations.js +42 -41
  56. package/dist/entries/types.d.ts +0 -7
  57. package/dist/entries/write-service.d.ts +28 -29
  58. package/dist/entries/write-service.js +114 -105
  59. package/dist/http/settings/cms-adapter.d.ts +20 -0
  60. package/dist/http/settings/cms-adapter.js +124 -0
  61. package/dist/http/settings/contracts.d.ts +135 -0
  62. package/dist/http/settings/contracts.js +2 -0
  63. package/dist/http/settings/http.d.ts +10 -0
  64. package/dist/http/settings/http.js +211 -0
  65. package/dist/http/settings/index.d.ts +5 -0
  66. package/dist/http/settings/index.js +4 -0
  67. package/dist/http/settings/shared.d.ts +68 -0
  68. package/dist/http/settings/shared.js +54 -0
  69. package/dist/http/settings/stream.d.ts +24 -0
  70. package/dist/http/settings/stream.js +147 -0
  71. package/dist/media/agent-tools.d.ts +1 -66
  72. package/dist/media/agent-tools.js +5 -1
  73. package/dist/media/blob-gc-lock.d.ts +6 -2
  74. package/dist/media/blob-gc-lock.js +4 -2
  75. package/dist/media/blob-gc.d.ts +64 -51
  76. package/dist/media/blob-gc.js +62 -52
  77. package/dist/media/blob-key.d.ts +1 -1
  78. package/dist/media/content-type-sniffer.d.ts +3 -1
  79. package/dist/media/content-type-sniffer.js +1 -1
  80. package/dist/media/html-attributes.d.ts +9 -5
  81. package/dist/media/html-attributes.js +8 -6
  82. package/dist/media/image-transformer.js +1 -1
  83. package/dist/media/image-transformer.sharp.d.ts +6 -0
  84. package/dist/media/image-transformer.sharp.js +12 -6
  85. package/dist/media/import/fetch-image.d.ts +24 -0
  86. package/dist/media/import/fetch-image.js +137 -0
  87. package/dist/media/import/index.d.ts +3 -0
  88. package/dist/media/import/index.js +3 -0
  89. package/dist/media/import/ports.d.ts +38 -0
  90. package/dist/media/index.d.ts +7 -1
  91. package/dist/media/index.js +1 -0
  92. package/dist/media/media-service.d.ts +14 -10
  93. package/dist/media/media-service.js +57 -52
  94. package/dist/media/ports.d.ts +3 -2
  95. package/dist/media/rendition-service.d.ts +3 -3
  96. package/dist/media/rendition-service.js +38 -37
  97. package/dist/media/repo.memory.d.ts +18 -7
  98. package/dist/media/repo.memory.js +12 -6
  99. package/dist/media/tool-registrations.d.ts +16 -15
  100. package/dist/media/tool-registrations.js +84 -72
  101. package/dist/media/transform-lock.d.ts +22 -12
  102. package/dist/media/transform-lock.js +14 -13
  103. package/dist/media/transform-registry.d.ts +3 -3
  104. package/dist/media/transform-registry.js +19 -18
  105. package/dist/media/transform-types.d.ts +8 -3
  106. package/dist/media/transform-types.js +10 -5
  107. package/dist/media/types.d.ts +21 -4
  108. package/dist/media/types.js +15 -2
  109. package/dist/navigation/agent-tools.d.ts +1 -80
  110. package/dist/navigation/agent-tools.js +15 -3
  111. package/dist/navigation/contracts.d.ts +1 -1
  112. package/dist/navigation/index.d.ts +2 -2
  113. package/dist/navigation/menu-service.d.ts +57 -40
  114. package/dist/navigation/menu-service.js +80 -69
  115. package/dist/navigation/ports.d.ts +1 -1
  116. package/dist/navigation/read-model.d.ts +3 -1
  117. package/dist/navigation/read-model.js +2 -2
  118. package/dist/navigation/reconcile.d.ts +2 -2
  119. package/dist/navigation/reconcile.js +2 -1
  120. package/dist/navigation/repo.memory.d.ts +7 -3
  121. package/dist/navigation/repo.memory.js +4 -2
  122. package/dist/navigation/resolver.d.ts +4 -1
  123. package/dist/navigation/resolver.js +1 -1
  124. package/dist/navigation/tool-registrations.d.ts +6 -8
  125. package/dist/navigation/tool-registrations.js +44 -42
  126. package/dist/navigation/types.d.ts +1 -1
  127. package/dist/presentation/presentation.d.ts +11 -3
  128. package/dist/presentation/presentation.js +13 -6
  129. package/dist/presentation/repo.memory.d.ts +6 -2
  130. package/dist/presentation/repo.memory.js +3 -2
  131. package/dist/settings/agent-tools.d.ts +2 -75
  132. package/dist/settings/agent-tools.js +49 -45
  133. package/dist/settings/agent-value-write-tools.d.ts +22 -0
  134. package/dist/settings/agent-value-write-tools.js +154 -0
  135. package/dist/settings/agent-writable-preferences.js +8 -20
  136. package/dist/settings/agent-write-denylist.d.ts +19 -0
  137. package/dist/settings/agent-write-denylist.js +15 -0
  138. package/dist/settings/change-feed.d.ts +11 -2
  139. package/dist/settings/change-feed.js +4 -4
  140. package/dist/settings/definitions-dispatch.d.ts +8 -3
  141. package/dist/settings/definitions-dispatch.js +5 -5
  142. package/dist/settings/dictionaries/index.d.ts +5 -2
  143. package/dist/settings/dictionaries/index.js +2 -2
  144. package/dist/settings/dictionaries/settings-dialog.ar.js +0 -1
  145. package/dist/settings/dictionaries/settings-dialog.bn.js +0 -1
  146. package/dist/settings/dictionaries/settings-dialog.de.js +0 -1
  147. package/dist/settings/dictionaries/settings-dialog.es.js +0 -1
  148. package/dist/settings/dictionaries/settings-dialog.fa.js +0 -1
  149. package/dist/settings/dictionaries/settings-dialog.fr.js +0 -1
  150. package/dist/settings/dictionaries/settings-dialog.hi.js +0 -1
  151. package/dist/settings/dictionaries/settings-dialog.hu.js +0 -1
  152. package/dist/settings/dictionaries/settings-dialog.id.js +0 -1
  153. package/dist/settings/dictionaries/settings-dialog.it.js +0 -1
  154. package/dist/settings/dictionaries/settings-dialog.ja.js +0 -1
  155. package/dist/settings/dictionaries/settings-dialog.ko.js +0 -1
  156. package/dist/settings/dictionaries/settings-dialog.pl.js +0 -1
  157. package/dist/settings/dictionaries/settings-dialog.pt-BR.js +0 -1
  158. package/dist/settings/dictionaries/settings-dialog.ru.js +0 -1
  159. package/dist/settings/dictionaries/settings-dialog.th.js +0 -1
  160. package/dist/settings/dictionaries/settings-dialog.tr.js +0 -1
  161. package/dist/settings/dictionaries/settings-dialog.uk.js +0 -1
  162. package/dist/settings/dictionaries/settings-dialog.ur.js +0 -1
  163. package/dist/settings/dictionaries/settings-dialog.zh-CN.js +0 -1
  164. package/dist/settings/dictionaries/settings-dialog.zh-TW.js +0 -1
  165. package/dist/settings/ensure-definitions.d.ts +5 -5
  166. package/dist/settings/errors.d.ts +7 -1
  167. package/dist/settings/errors.js +7 -1
  168. package/dist/settings/index.d.ts +4 -1
  169. package/dist/settings/index.js +1 -0
  170. package/dist/settings/ports.d.ts +6 -5
  171. package/dist/settings/principal-lookup.d.ts +9 -0
  172. package/dist/settings/principal-lookup.js +2 -0
  173. package/dist/settings/purge-service.d.ts +5 -4
  174. package/dist/settings/purge-service.js +3 -2
  175. package/dist/settings/settings.d.ts +22 -7
  176. package/dist/settings/settings.js +47 -26
  177. package/dist/settings/tool-registrations.d.ts +25 -32
  178. package/dist/settings/tool-registrations.js +66 -56
  179. package/dist/settings/types.d.ts +1 -1
  180. package/dist/settings/ui-tab-definitions.d.ts +1 -1
  181. package/dist/settings/write-service.d.ts +32 -26
  182. package/dist/settings/write-service.js +26 -20
  183. package/dist/taxonomy/agent-tools.d.ts +1 -66
  184. package/dist/taxonomy/agent-tools.js +25 -15
  185. package/dist/taxonomy/content-lookup.js +1 -1
  186. package/dist/taxonomy/index.d.ts +2 -2
  187. package/dist/taxonomy/merge-term.d.ts +7 -4
  188. package/dist/taxonomy/merge-term.js +7 -5
  189. package/dist/taxonomy/repo.memory.d.ts +42 -19
  190. package/dist/taxonomy/repo.memory.js +14 -12
  191. package/dist/taxonomy/validation-chain.d.ts +39 -18
  192. package/dist/taxonomy/validation-chain.js +35 -25
  193. package/dist/taxonomy/write-service.d.ts +103 -44
  194. package/dist/taxonomy/write-service.js +221 -179
  195. package/dist/trash/adapters/record-store.d.ts +52 -0
  196. package/dist/trash/adapters/record-store.js +36 -0
  197. package/dist/trash/cursor.d.ts +20 -0
  198. package/dist/trash/cursor.js +36 -0
  199. package/dist/trash/follow-ups.d.ts +76 -0
  200. package/dist/trash/follow-ups.js +46 -0
  201. package/dist/trash/index.d.ts +8 -0
  202. package/dist/trash/index.js +8 -0
  203. package/dist/trash/ports.d.ts +308 -0
  204. package/dist/trash/ports.js +2 -0
  205. package/dist/trash/repo.memory.d.ts +50 -0
  206. package/dist/trash/repo.memory.js +114 -0
  207. package/dist/trash/sweeper.d.ts +77 -0
  208. package/dist/trash/sweeper.js +127 -0
  209. package/dist/trash/write-service.d.ts +100 -0
  210. package/dist/trash/write-service.js +242 -0
  211. package/dist/workspace/agent-tools.d.ts +1 -59
  212. package/dist/workspace/agent-tools.js +27 -12
  213. package/dist/workspace/create.d.ts +31 -6
  214. package/dist/workspace/create.js +18 -5
  215. package/dist/workspace/delete.d.ts +18 -13
  216. package/dist/workspace/delete.js +20 -12
  217. package/dist/workspace/index.d.ts +1 -1
  218. package/dist/workspace/repo.memory.d.ts +19 -4
  219. package/dist/workspace/repo.memory.js +26 -4
  220. package/dist/workspace/tool-registrations.d.ts +2 -2
  221. package/dist/workspace/tool-registrations.js +13 -13
  222. package/dist/workspace/update.d.ts +6 -5
  223. package/dist/workspace/update.js +9 -8
  224. package/package.json +44 -38
  225. package/dist/identity/admin-crud-service.d.ts +0 -280
  226. package/dist/identity/admin-crud-service.js +0 -468
  227. package/dist/identity/agent-tool-input.d.ts +0 -58
  228. package/dist/identity/agent-tool-input.js +0 -126
  229. package/dist/identity/agent-tools.d.ts +0 -101
  230. package/dist/identity/agent-tools.js +0 -290
  231. package/dist/identity/auth-service.d.ts +0 -118
  232. package/dist/identity/auth-service.js +0 -170
  233. package/dist/identity/authorize.d.ts +0 -90
  234. package/dist/identity/authorize.js +0 -94
  235. package/dist/identity/grant-service.d.ts +0 -198
  236. package/dist/identity/grant-service.js +0 -361
  237. package/dist/identity/hasher.d.ts +0 -39
  238. package/dist/identity/hasher.js +0 -39
  239. package/dist/identity/index.d.ts +0 -62
  240. package/dist/identity/index.js +0 -54
  241. package/dist/identity/password-policy.d.ts +0 -57
  242. package/dist/identity/password-policy.js +0 -66
  243. package/dist/identity/permission-migrations.d.ts +0 -86
  244. package/dist/identity/permission-migrations.js +0 -67
  245. package/dist/identity/permissions.d.ts +0 -35
  246. package/dist/identity/permissions.js +0 -603
  247. package/dist/identity/ports.d.ts +0 -201
  248. package/dist/identity/repo.memory.d.ts +0 -164
  249. package/dist/identity/repo.memory.js +0 -224
  250. package/dist/identity/seed.d.ts +0 -54
  251. package/dist/identity/seed.js +0 -429
  252. package/dist/identity/tool-registrations.d.ts +0 -50
  253. package/dist/identity/tool-registrations.js +0 -419
  254. package/dist/identity/types.d.ts +0 -185
  255. package/dist/identity/types.js +0 -64
  256. package/dist/identity/username.d.ts +0 -12
  257. package/dist/identity/username.js +0 -14
  258. /package/dist/{identity → media/import}/ports.js +0 -0
@@ -30,22 +30,22 @@
30
30
  *
31
31
  * Deliberate absences (the point of a catalog, not an oversight):
32
32
  * - There is no delete/purge tool: `write-service.ts` exposes no delete function at all (confirmed
33
- * by reading the whole file) — there is nothing to wrap or exclude on that front.
33
+ * by reading the whole file) — there is nothing to wrap or exclude on that front.
34
34
  * - `collections_entry_update`'s schema omits `bodyJson` even though `updateEntry` itself accepts an
35
- * optional `bodyJson` (REQ-44/45, used internally by `widgets/embed-service.ts`'s own guardrailed
36
- * mutation path). The generic Collections admin route (`entries/update.ts`) never forwards
37
- * `body.bodyJson` at all — only `title`/`fieldsJson`/`expectedVersion` — so exposing it here would
38
- * invent capability beyond what the human admin UI's own Collections editor exposes. Omitting it
39
- * from the input is enough: `updateEntry` leaves `bodyJson` unchanged whenever the field is
40
- * `undefined`, so this exclusion changes nothing about what a call can still do.
35
+ * optional `bodyJson` (used internally by `widgets/embed-service.ts`'s own guardrailed
36
+ * mutation path). The generic Collections admin route (`entries/update.ts`) never forwards
37
+ * `body.bodyJson` at all — only `title`/`fieldsJson`/`expectedVersion` — so exposing it here would
38
+ * invent capability beyond what the human admin UI's own Collections editor exposes. Omitting it
39
+ * from the input is enough: `updateEntry` leaves `bodyJson` unchanged whenever the field is
40
+ * `undefined`, so this exclusion changes nothing about what a call can still do.
41
41
  * - `collections_entry_list`'s schema omits `status`/`orderBy`/`limit` even though
42
- * `EntryListPort.listByWorkspace` supports all three (added for `widgets/resolvers/recent-entries.ts`'s
43
- * own bounded-query need) — `server/routes/admin/entries/list.ts` only ever forwards `type` from
44
- * its query string, so the other three are not part of what the Collections admin list screen
45
- * itself can do; adding them here would again exceed the human surface this catalog mirrors.
42
+ * `EntryListPort.listByWorkspace` supports all three (added for `widgets/resolvers/recent-entries.ts`'s
43
+ * own bounded-query need) — `server/routes/admin/entries/list.ts` only ever forwards `type` from
44
+ * its query string, so the other three are not part of what the Collections admin list screen
45
+ * itself can do; adding them here would again exceed the human surface this catalog mirrors.
46
46
  *
47
47
  * What IS included, and why it is safe: all four write-service functions are `admin.collections.*`
48
- * self-enforcing (each opens with its own `deps.authorize()` call before any other side effect —
48
+ * self-enforcing (each opens with its own `deps.authorize` call before any other side effect —
49
49
  * confirmed by reading `write-service.ts` directly), and `publishEntry`/`unpublishEntry` are ordinary,
50
50
  * fully reversible status flips with a full revision trail (`entryRepo.appendRevision`) — publishing
51
51
  * and unpublishing are each other's own undo.
@@ -55,7 +55,13 @@
55
55
  *
56
56
  * Architectural role:
57
57
  * `features/entries` domain declaration. No dependencies.
58
- */
58
+ * See docs/decisions/DR-002-content-lifecycle-and-cleanup.md.
59
+ *
60
+ *
61
+ * JSON Schema for this tool's `input`, published to the model via `ToolDescriptor.inputSchema`
62
+ * (`@jini-ai/core`'s `registration-kit.ts`'s `buildDomainRegistrations`, which refuses to wire any
63
+ * tool lacking one).
64
+ */
59
65
  const ENTRY_ID_SCHEMA = {
60
66
  type: "string",
61
67
  minLength: 1,
@@ -9,35 +9,49 @@
9
9
  * `features/entries` domain logic. No dependencies.
10
10
  */
11
11
  export declare class ForbiddenError extends Error {
12
- constructor(message: string);
12
+ constructor({ message }: {
13
+ message: string;
14
+ }, _optional?: Record<string, never>);
13
15
  }
14
16
  export declare class EntryNotFoundError extends Error {
15
- constructor(message: string);
17
+ constructor(requiredArgs: {
18
+ message: string;
19
+ }, optionalArgs?: Record<string, never>);
16
20
  }
17
- /** REQ-29/AC-29 — the owning content type does not exist, or (INV-01) exists only in a different workspace. */
21
+ /** — the owning content type does not exist, or exists only in a different workspace. See docs/decisions/DR-002-content-lifecycle-and-cleanup.md. */
18
22
  export declare class ContentTypeNotFoundError extends Error {
19
- constructor(message: string);
23
+ constructor(requiredArgs: {
24
+ message: string;
25
+ }, optionalArgs?: Record<string, never>);
20
26
  }
21
- /** REQ-10 (create) / REQ-28 (update/publish/unpublish) — the owning content type's status forbids this write. */
27
+ /** (create) / (update/publish/unpublish) — the owning content type's status forbids this write. See docs/decisions/DR-002-content-lifecycle-and-cleanup.md. */
22
28
  export declare class ContentTypeNotActiveError extends Error {
23
- constructor(message: string);
29
+ constructor(requiredArgs: {
30
+ message: string;
31
+ }, optionalArgs?: Record<string, never>);
24
32
  }
25
- /** AC-21 — a second entry submitted with an identical `(workspaceId, type, slug)`. */
33
+ /** — a second entry submitted with an identical `(workspaceId, type, slug)`. See docs/decisions/DR-002-content-lifecycle-and-cleanup.md. */
26
34
  export declare class EntrySlugConflictError extends Error {
27
- constructor(message: string);
35
+ constructor(requiredArgs: {
36
+ message: string;
37
+ }, optionalArgs?: Record<string, never>);
28
38
  }
29
39
  export declare class VersionConflictError extends Error {
30
- constructor(message: string);
40
+ constructor(requiredArgs: {
41
+ message: string;
42
+ }, optionalArgs?: Record<string, never>);
31
43
  }
32
- /** REQ-14/15 — `fieldsJson` failed `validateFieldsAgainstSchema` against the owning type's current schema. */
44
+ /** — `fieldsJson` failed `validateFieldsAgainstSchema` against the owning type's current schema. See docs/decisions/DR-002-content-lifecycle-and-cleanup.md. */
33
45
  export declare class EntryFieldValidationError extends Error {
34
46
  readonly fieldErrors: Array<{
35
47
  field: string;
36
48
  reason: string;
37
49
  }>;
38
- constructor(fieldErrors: Array<{
39
- field: string;
40
- reason: string;
41
- }>);
50
+ constructor(requiredArgs: {
51
+ fieldErrors: Array<{
52
+ field: string;
53
+ reason: string;
54
+ }>;
55
+ }, optionalArgs?: Record<string, never>);
42
56
  }
43
57
  //# sourceMappingURL=errors.d.ts.map
@@ -9,48 +9,54 @@
9
9
  * `features/entries` domain logic. No dependencies.
10
10
  */
11
11
  export class ForbiddenError extends Error {
12
- constructor(message) {
12
+ constructor({ message }, _optional = {}) {
13
13
  super(message);
14
14
  this.name = "ForbiddenError";
15
15
  }
16
16
  }
17
17
  export class EntryNotFoundError extends Error {
18
- constructor(message) {
18
+ constructor(requiredArgs, optionalArgs = {}) {
19
+ const { message } = requiredArgs;
19
20
  super(message);
20
21
  this.name = "ENTRY_NOT_FOUND";
21
22
  }
22
23
  }
23
- /** REQ-29/AC-29 — the owning content type does not exist, or (INV-01) exists only in a different workspace. */
24
+ /** — the owning content type does not exist, or exists only in a different workspace. See docs/decisions/DR-002-content-lifecycle-and-cleanup.md. */
24
25
  export class ContentTypeNotFoundError extends Error {
25
- constructor(message) {
26
+ constructor(requiredArgs, optionalArgs = {}) {
27
+ const { message } = requiredArgs;
26
28
  super(message);
27
29
  this.name = "CONTENT_TYPE_NOT_FOUND";
28
30
  }
29
31
  }
30
- /** REQ-10 (create) / REQ-28 (update/publish/unpublish) — the owning content type's status forbids this write. */
32
+ /** (create) / (update/publish/unpublish) — the owning content type's status forbids this write. See docs/decisions/DR-002-content-lifecycle-and-cleanup.md. */
31
33
  export class ContentTypeNotActiveError extends Error {
32
- constructor(message) {
34
+ constructor(requiredArgs, optionalArgs = {}) {
35
+ const { message } = requiredArgs;
33
36
  super(message);
34
37
  this.name = "ContentTypeNotActiveError";
35
38
  }
36
39
  }
37
- /** AC-21 — a second entry submitted with an identical `(workspaceId, type, slug)`. */
40
+ /** — a second entry submitted with an identical `(workspaceId, type, slug)`. See docs/decisions/DR-002-content-lifecycle-and-cleanup.md. */
38
41
  export class EntrySlugConflictError extends Error {
39
- constructor(message) {
42
+ constructor(requiredArgs, optionalArgs = {}) {
43
+ const { message } = requiredArgs;
40
44
  super(message);
41
45
  this.name = "ENTRY_SLUG_CONFLICT";
42
46
  }
43
47
  }
44
48
  export class VersionConflictError extends Error {
45
- constructor(message) {
49
+ constructor(requiredArgs, optionalArgs = {}) {
50
+ const { message } = requiredArgs;
46
51
  super(message);
47
52
  this.name = "VersionConflictError";
48
53
  }
49
54
  }
50
- /** REQ-14/15 — `fieldsJson` failed `validateFieldsAgainstSchema` against the owning type's current schema. */
55
+ /** — `fieldsJson` failed `validateFieldsAgainstSchema` against the owning type's current schema. See docs/decisions/DR-002-content-lifecycle-and-cleanup.md. */
51
56
  export class EntryFieldValidationError extends Error {
52
57
  fieldErrors;
53
- constructor(fieldErrors) {
58
+ constructor(requiredArgs, optionalArgs = {}) {
59
+ const { fieldErrors } = requiredArgs;
54
60
  super(`fieldsJson failed schema validation: ${fieldErrors.map((e) => `${e.field}: ${e.reason}`).join("; ")}`);
55
61
  this.name = "EntryFieldValidationError";
56
62
  this.fieldErrors = fieldErrors;
@@ -37,16 +37,18 @@ export interface ValidateFieldsResult {
37
37
  fieldErrors: FieldValidationError[];
38
38
  }
39
39
  /**
40
- * REQ-14/15 — validates a candidate `fieldsJson` payload against a content type's current field
41
- * schema: envelope shape first (AC-50), then per-key unrecognized-field rejection (AC-22) and
42
- * kind-conformance (AC-49), then a required-field-missing pass (AC-23).
40
+ * — validates a candidate `fieldsJson` payload against a content type's current field
41
+ * schema: envelope shape first, then per-key unrecognized-field rejection and
42
+ * kind-conformance, then a required-field-missing pass.
43
43
  *
44
44
  * @complexity O(f) in the number of schema fields plus O(k) in the number of submitted keys.
45
45
  * @overallScore 100
46
+ * See docs/decisions/DR-002-content-lifecycle-and-cleanup.md.
46
47
  */
47
48
  export declare function validateFieldsAgainstSchema(required: {
48
49
  schema: ContentTypeFieldDef[];
49
50
  fieldsJson: unknown;
51
+ }, optional?: {
50
52
  /** The `ext` sub-key this content type's fields live under. Defaults to `"site"` — every existing caller keeps identical behavior unless it opts into a different owner namespace. */
51
53
  owner?: string | undefined;
52
54
  }): ValidateFieldsResult;
@@ -120,15 +120,17 @@ function conformsToKind(value, kind) {
120
120
  }
121
121
  }
122
122
  /**
123
- * REQ-14/15 — validates a candidate `fieldsJson` payload against a content type's current field
124
- * schema: envelope shape first (AC-50), then per-key unrecognized-field rejection (AC-22) and
125
- * kind-conformance (AC-49), then a required-field-missing pass (AC-23).
123
+ * — validates a candidate `fieldsJson` payload against a content type's current field
124
+ * schema: envelope shape first, then per-key unrecognized-field rejection and
125
+ * kind-conformance, then a required-field-missing pass.
126
126
  *
127
127
  * @complexity O(f) in the number of schema fields plus O(k) in the number of submitted keys.
128
128
  * @overallScore 100
129
+ * See docs/decisions/DR-002-content-lifecycle-and-cleanup.md.
129
130
  */
130
- export function validateFieldsAgainstSchema(required) {
131
- const { schema, fieldsJson, owner = "site" } = required;
131
+ export function validateFieldsAgainstSchema(required, optional = {}) {
132
+ const { schema, fieldsJson } = required;
133
+ const { owner = "site" } = optional;
132
134
  const ext = isPlainObject(fieldsJson) ? fieldsJson.ext : undefined;
133
135
  const ownerBag = isPlainObject(ext) ? ext[owner] : undefined;
134
136
  if (!isPlainObject(fieldsJson) || !isPlainObject(ext) || !isPlainObject(ownerBag)) {
@@ -10,7 +10,7 @@
10
10
  * them is type-only and one-directional, and keeping the entry points separate is what makes that
11
11
  * checkable rather than merely intended.
12
12
  */
13
- export type { EntryStatus, EntryFieldsJson, EntryRecord, OwningContentType, ActorIdentityInput, Result, } from "./types.js";
13
+ export type { EntryStatus, EntryFieldsJson, EntryRecord, OwningContentType, ActorIdentityInput, } from "./types.js";
14
14
  export type { EntryListPort } from "./list.js";
15
15
  export { listEntries } from "./list.js";
16
16
  export type { FieldValidationError, ValidateFieldsResult, } from "./field-validation.js";
@@ -37,7 +37,7 @@ export { createEntry, updateEntry, publishEntry, unpublishEntry, importEntry } f
37
37
  */
38
38
  export { InMemoryEntryRepo, toEntryOutbox } from "./repo.memory.js";
39
39
  /** The agent-tool surface for this domain (see `agent-tools.ts` for what is deliberately omitted). */
40
- export { entriesAgentToolCatalog, type AgentToolDefinition as EntriesAgentToolDefinition, type AgentToolSideEffect as EntriesAgentToolSideEffect, } from "./agent-tools.js";
40
+ export { entriesAgentToolCatalog, } from "./agent-tools.js";
41
41
  /**
42
42
  * The agent-tool wiring for this domain.
43
43
  *
@@ -1,5 +1,6 @@
1
1
  import { type PublishUnpublishEntryRequired } from "./write-service.js";
2
- import type { EntryRecord, Result } from "./types.js";
2
+ import type { Result } from "@jini-ai/core/primitives";
3
+ import type { EntryRecord } from "./types.js";
3
4
  /**
4
5
  * @file Entry publish/unpublish `op` dispatch (the closed-union-dispatch convention, same
5
6
  * shape as `features/content-types/lifecycle-dispatch.ts`).
@@ -7,7 +8,9 @@ import type { EntryRecord, Result } from "./types.js";
7
8
  export declare const ENTRY_LIFECYCLE_OP_NAMES: readonly ["publish", "unpublish"];
8
9
  export type EntryLifecycleOp = (typeof ENTRY_LIFECYCLE_OP_NAMES)[number];
9
10
  /** Narrows an untrusted `op` string to {@link EntryLifecycleOp}, or `null` if it isn't one. */
10
- export declare function parseEntryLifecycleOp(op: unknown): EntryLifecycleOp | null;
11
+ export declare function parseEntryLifecycleOp(requiredArgs: {
12
+ op: unknown;
13
+ }, optionalArgs?: Record<string, never>): EntryLifecycleOp | null;
11
14
  export type EntryLifecycleHandler = (required: PublishUnpublishEntryRequired) => Promise<Result<{
12
15
  entry: EntryRecord;
13
16
  }, Error>>;
@@ -5,7 +5,8 @@ import { publishEntry, unpublishEntry } from "./write-service.js";
5
5
  */
6
6
  export const ENTRY_LIFECYCLE_OP_NAMES = ["publish", "unpublish"];
7
7
  /** Narrows an untrusted `op` string to {@link EntryLifecycleOp}, or `null` if it isn't one. */
8
- export function parseEntryLifecycleOp(op) {
8
+ export function parseEntryLifecycleOp(requiredArgs, optionalArgs = {}) {
9
+ const { op } = requiredArgs;
9
10
  return typeof op === "string" && ENTRY_LIFECYCLE_OP_NAMES.includes(op) ? op : null;
10
11
  }
11
12
  const entryLifecycleOps = {
@@ -22,8 +22,9 @@ export interface EntryListPort {
22
22
  * `limit` are pushed down into the query itself (not applied client-side after a full scan) by
23
23
  * every real adapter — a caller needing a bounded, sorted read (e.g. a resolver's cost clamp)
24
24
  * must supply them rather than fetching everything and truncating in memory. */
25
- listByWorkspace(params: {
25
+ listByWorkspace(required: {
26
26
  workspaceId: string;
27
+ }, optional?: {
27
28
  type?: string | undefined;
28
29
  status?: EntryStatus | undefined;
29
30
  orderBy?: "updatedAt" | undefined;
@@ -40,8 +41,9 @@ export interface EntryListPort {
40
41
  export declare function listEntries(required: {
41
42
  repo: EntryListPort;
42
43
  workspaceId: string;
44
+ }, optional?: {
43
45
  type?: string | undefined;
44
- }, _optional?: Record<string, never>): Promise<{
46
+ }): Promise<{
45
47
  items: EntryRecord[];
46
48
  }>;
47
49
  //# sourceMappingURL=list.d.ts.map
@@ -4,9 +4,10 @@
4
4
  * @complexity O(1) plus one `EntryListPort.listByWorkspace()` call.
5
5
  * @overallScore 100
6
6
  */
7
- export async function listEntries(required, _optional = {}) {
8
- const { repo, workspaceId, type } = required;
9
- const items = await repo.listByWorkspace({ workspaceId, type });
7
+ export async function listEntries(required, optional = {}) {
8
+ const { repo, workspaceId } = required;
9
+ const { type } = optional;
10
+ const items = await repo.listByWorkspace({ workspaceId }, { type });
10
11
  return { items };
11
12
  }
12
13
  //# sourceMappingURL=list.js.map
@@ -1,3 +1,4 @@
1
+ import type { Clock } from "@jini-ai/core/primitives";
1
2
  import type { EntryRepoPort, EntryRevisionInput, OutboxPort } from "./write-service.js";
2
3
  import type { EntryListPort } from "./list.js";
3
4
  import type { EntryRecord, EntryStatus } from "./types.js";
@@ -21,14 +22,17 @@ export declare class InMemoryEntryRepo implements EntryRepoPort, EntryListPort {
21
22
  }): Promise<EntryRecord | null>;
22
23
  save(row: EntryRecord): Promise<void>;
23
24
  appendRevision(revision: EntryRevisionInput): Promise<void>;
24
- transaction<T>(fn: () => Promise<T>): Promise<T>;
25
- listByWorkspace(params: {
25
+ transaction<T>({ fn }: {
26
+ fn: () => Promise<T>;
27
+ }): Promise<T>;
28
+ listByWorkspace(required: {
26
29
  workspaceId: string;
27
- type?: string;
28
- status?: EntryStatus;
29
- orderBy?: "updatedAt";
30
- orderDirection?: "asc" | "desc";
31
- limit?: number;
30
+ }, optional?: {
31
+ type?: string | undefined;
32
+ status?: EntryStatus | undefined;
33
+ orderBy?: "updatedAt" | undefined;
34
+ orderDirection?: "asc" | "desc" | undefined;
35
+ limit?: number | undefined;
32
36
  }): Promise<EntryRecord[]>;
33
37
  }
34
38
  /** Adapts a real `core/ports` `OutboxPort` into the narrower `{enqueue({name,payload})}` shape
@@ -53,9 +57,7 @@ export declare function toEntryOutbox(deps: {
53
57
  payload: Record<string, unknown>;
54
58
  }): Promise<void>;
55
59
  };
56
- clock: {
57
- nowIso(): string;
58
- };
60
+ clock: Clock;
59
61
  idGen: {
60
62
  newId(): string;
61
63
  };
@@ -1,3 +1,4 @@
1
+ import { nowIso as kernelNowIso } from "@jini-ai/core/primitives";
1
2
  /**
2
3
  * @file In-memory `EntryRepoPort` + `EntryListPort` double (same disclosed rule-of-two-until-a-
3
4
  * real-adapter-exists precedent as `features/content-types/repo.memory.ts` — see that file's
@@ -27,20 +28,20 @@ export class InMemoryEntryRepo {
27
28
  async appendRevision(revision) {
28
29
  this.revisions.push(revision);
29
30
  }
30
- async transaction(fn) {
31
+ async transaction({ fn }) {
31
32
  return fn();
32
33
  }
33
- async listByWorkspace(params) {
34
+ async listByWorkspace(required, optional = {}) {
34
35
  let rows = [...this.byId.values()]
35
- .filter((row) => row.workspaceId === params.workspaceId)
36
- .filter((row) => !params.type || row.type === params.type)
37
- .filter((row) => !params.status || row.status === params.status);
38
- if (params.orderBy === "updatedAt") {
39
- const dir = params.orderDirection === "asc" ? 1 : -1;
36
+ .filter((row) => row.workspaceId === required.workspaceId)
37
+ .filter((row) => !optional.type || row.type === optional.type)
38
+ .filter((row) => !optional.status || row.status === optional.status);
39
+ if (optional.orderBy === "updatedAt") {
40
+ const dir = optional.orderDirection === "asc" ? 1 : -1;
40
41
  rows = rows.sort((a, b) => (a.updatedAt < b.updatedAt ? -dir : a.updatedAt > b.updatedAt ? dir : 0));
41
42
  }
42
- if (typeof params.limit === "number") {
43
- rows = rows.slice(0, params.limit);
43
+ if (typeof optional.limit === "number") {
44
+ rows = rows.slice(0, optional.limit);
44
45
  }
45
46
  return rows.map((row) => ({ ...row }));
46
47
  }
@@ -64,7 +65,7 @@ export function toEntryOutbox(deps) {
64
65
  id: deps.idGen.newId(),
65
66
  workspaceId: deps.workspaceId,
66
67
  name: event.name,
67
- occurredAt: deps.clock.nowIso(),
68
+ occurredAt: kernelNowIso({ clock: deps.clock }),
68
69
  payload: event.payload,
69
70
  });
70
71
  },
@@ -1,3 +1,5 @@
1
+ import type { IdGenerator } from "@jini-ai/core/primitives";
2
+ import type { Clock } from "@jini-ai/core/primitives";
1
3
  /**
2
4
  * @file Entries' half of the shared agent-tool-registration convention: maps `agent-tools.ts`'s 5
3
5
  * catalog entries onto `write-service.ts`'s create/update/publish/unpublish and `list.ts`'s read, as
@@ -15,14 +17,14 @@
15
17
  */
16
18
  import type { AuthorizeFn } from "../core/commands/command.js";
17
19
  import type { OutboxPort } from "../core/ports.js";
18
- import { type DerivedRiskByToolId, type ToolRegistration } from "../core/tools/registration-kit.js";
20
+ import { type DerivedRiskByToolId, type ToolRegistration } from "@jini-ai/core";
19
21
  import { type EntryListPort } from "./list.js";
20
22
  import { type ContentTypeLookupPort, type EntryRepoPort } from "./write-service.js";
21
23
  /**
22
24
  * The exact slice of the route-deps bag Entries' tool handlers read. Declared structurally (rather
23
25
  * than importing `server/routes/types`'s `RouteDeps`) so this module carries no back-edge into the
24
26
  * composition root. `server/routes/*` satisfies this structurally by passing its existing
25
- * `RouteDeps` object; nothing there changes.
27
+ * `RouteDeps` object with the kernel clock/ID contracts.
26
28
  *
27
29
  * `contentTypeRepo` is typed as `write-service.ts`'s own `ContentTypeLookupPort` — the narrow
28
30
  * lookup contract Entries itself declares, not content-types' full `ContentTypeRepoPort` — mirroring
@@ -32,12 +34,8 @@ import { type ContentTypeLookupPort, type EntryRepoPort } from "./write-service.
32
34
  export interface EntriesToolDeps {
33
35
  authorize: AuthorizeFn;
34
36
  workspaceId: string;
35
- clock: {
36
- nowIso(): string;
37
- };
38
- idGen: {
39
- newId(): string;
40
- };
37
+ clock: Clock;
38
+ idGen: IdGenerator;
41
39
  outbox: OutboxPort;
42
40
  entryRepo: EntryRepoPort & EntryListPort;
43
41
  contentTypeRepo: ContentTypeLookupPort;
@@ -1,10 +1,11 @@
1
- import { AGENT_TOOL_PRINCIPAL_KIND, buildDomainRegistrations, fromResult, indexCatalogById, optionalString, requireInputRecord, requireNumber, requireString, requireToolPermission, withSchemaOnRejection, } from "../core/tools/registration-kit.js";
1
+ import { AGENT_TOOL_PRINCIPAL_KIND, buildDomainRegistrations, fromResult, indexCatalogById, optionalString, requireInputRecord, requireNumber, requireString, withSchemaOnRejection } from "@jini-ai/core";
2
+ import { adaptLegacyAuthorize, requireToolPermission } from "../core/tools/index.js";
2
3
  import { entriesAgentToolCatalog } from "./agent-tools.js";
3
4
  import { EntryFieldValidationError } from "./errors.js";
4
5
  import { listEntries } from "./list.js";
5
6
  import { createEntry, publishEntry, unpublishEntry, updateEntry } from "./write-service.js";
6
7
  import { toEntryOutbox } from "./repo.memory.js";
7
- const CATALOG_BY_ID = indexCatalogById(entriesAgentToolCatalog);
8
+ const CATALOG_BY_ID = indexCatalogById({ catalog: entriesAgentToolCatalog });
8
9
  /**
9
10
  * This wiring layer's OWN risk classification, authored from what each handler below actually
10
11
  * calls. See `DerivedRiskByToolId` in the kit for why it is independent of the catalog's own
@@ -27,7 +28,7 @@ export const entriesDerivedRisk = new Map([
27
28
  * only. A not-found, a tombstoned-type rejection, or a version conflict is not a shape problem
28
29
  * retrying the SAME input would ever resolve.
29
30
  */
30
- function isEntriesShapeRejection(error) {
31
+ function isEntriesShapeRejection({ error }) {
31
32
  return error instanceof EntryFieldValidationError;
32
33
  }
33
34
  /** Shared dependency bag for `write-service.ts` calls — every mutating handler here takes this
@@ -39,7 +40,7 @@ function entriesDeps(routeDeps) {
39
40
  contentTypeRepo: routeDeps.contentTypeRepo,
40
41
  clock: routeDeps.clock,
41
42
  ids: routeDeps.idGen,
42
- authorize: routeDeps.authorize,
43
+ authorize: adaptLegacyAuthorize({ authorize: routeDeps.authorize }),
43
44
  outbox: toEntryOutbox(routeDeps),
44
45
  };
45
46
  }
@@ -61,70 +62,70 @@ function toEntryToolView(entry) {
61
62
  };
62
63
  }
63
64
  function fromEntryResult(fn) {
64
- return fromResult(fn).then(({ entry }) => ({ entry: toEntryToolView(entry) }));
65
+ return fromResult({ fn: fn }).then(({ entry }) => ({ entry: toEntryToolView(entry) }));
65
66
  }
66
67
  export function buildEntriesRegistrations(routeDeps) {
67
68
  const handlers = {
68
69
  collections_entry_list: async (ctx) => {
69
- const input = ctx.input !== undefined ? requireInputRecord(ctx.input) : {};
70
- await requireToolPermission(routeDeps, { principalId: ctx.principal.id, permission: "admin.collections.read", entityType: "entry" });
71
- const { items } = await listEntries({ repo: routeDeps.entryRepo, workspaceId: routeDeps.workspaceId, type: optionalString(input, "type") });
70
+ const input = ctx.input !== undefined ? requireInputRecord({ input: ctx.input }) : {};
71
+ await requireToolPermission({ authorize: adaptLegacyAuthorize({ authorize: routeDeps.authorize }), workspaceId: routeDeps.workspaceId, principalId: ctx.principal.id, permission: "admin.collections.read" }, { entityType: "entry" });
72
+ const { items } = await listEntries({ repo: routeDeps.entryRepo, workspaceId: routeDeps.workspaceId }, { type: optionalString({ input, key: "type" }) });
72
73
  return { items: items.map(toEntryToolView) };
73
74
  },
74
75
  collections_entry_create: async (ctx) => {
75
- const input = requireInputRecord(ctx.input);
76
- return withSchemaOnRejection({ toolId: "collections_entry_create", catalog: CATALOG_BY_ID, isShapeRejection: isEntriesShapeRejection }, () => fromEntryResult(() => createEntry({
77
- deps: entriesDeps(routeDeps),
78
- input: {
79
- actorId: ctx.principal.id,
80
- principalKind: AGENT_TOOL_PRINCIPAL_KIND,
81
- workspaceId: routeDeps.workspaceId,
82
- type: requireString(input, "type"),
83
- slug: requireString(input, "slug"),
84
- title: requireString(input, "title"),
85
- fieldsJson: input.fieldsJson ?? { ext: { site: {} } },
86
- bodyJson: input.bodyJson,
87
- },
88
- })));
76
+ const input = requireInputRecord({ input: ctx.input });
77
+ return withSchemaOnRejection({ toolId: "collections_entry_create", catalog: CATALOG_BY_ID, isShapeRejection: isEntriesShapeRejection, fn: () => fromEntryResult(() => createEntry({
78
+ deps: entriesDeps(routeDeps),
79
+ input: {
80
+ actorId: ctx.principal.id,
81
+ principalKind: AGENT_TOOL_PRINCIPAL_KIND,
82
+ workspaceId: routeDeps.workspaceId,
83
+ type: requireString({ input, key: "type" }),
84
+ slug: requireString({ input, key: "slug" }),
85
+ title: requireString({ input, key: "title" }),
86
+ fieldsJson: input.fieldsJson ?? { ext: { site: {} } },
87
+ bodyJson: input.bodyJson,
88
+ },
89
+ })) });
89
90
  },
90
91
  collections_entry_update: async (ctx) => {
91
- const input = requireInputRecord(ctx.input);
92
- return withSchemaOnRejection({ toolId: "collections_entry_update", catalog: CATALOG_BY_ID, isShapeRejection: isEntriesShapeRejection }, () => fromEntryResult(() => updateEntry({
93
- deps: entriesDeps(routeDeps),
94
- input: {
95
- actorId: ctx.principal.id,
96
- principalKind: AGENT_TOOL_PRINCIPAL_KIND,
97
- workspaceId: routeDeps.workspaceId,
98
- id: requireString(input, "id"),
99
- title: typeof input.title === "string" ? input.title : undefined,
100
- fieldsJson: input.fieldsJson,
101
- expectedVersion: requireNumber(input, "expectedVersion"),
102
- },
103
- })));
92
+ const input = requireInputRecord({ input: ctx.input });
93
+ return withSchemaOnRejection({ toolId: "collections_entry_update", catalog: CATALOG_BY_ID, isShapeRejection: isEntriesShapeRejection, fn: () => fromEntryResult(() => updateEntry({
94
+ deps: entriesDeps(routeDeps),
95
+ input: {
96
+ actorId: ctx.principal.id,
97
+ principalKind: AGENT_TOOL_PRINCIPAL_KIND,
98
+ workspaceId: routeDeps.workspaceId,
99
+ id: requireString({ input, key: "id" }),
100
+ title: typeof input.title === "string" ? input.title : undefined,
101
+ fieldsJson: input.fieldsJson,
102
+ expectedVersion: requireNumber({ input, key: "expectedVersion" }),
103
+ },
104
+ })) });
104
105
  },
105
106
  collections_entry_publish: async (ctx) => {
106
- const input = requireInputRecord(ctx.input);
107
+ const input = requireInputRecord({ input: ctx.input });
107
108
  return fromEntryResult(() => publishEntry({
108
109
  deps: entriesDeps(routeDeps),
109
110
  input: {
110
111
  actorId: ctx.principal.id,
111
112
  principalKind: AGENT_TOOL_PRINCIPAL_KIND,
112
113
  workspaceId: routeDeps.workspaceId,
113
- id: requireString(input, "id"),
114
- expectedVersion: requireNumber(input, "expectedVersion"),
114
+ id: requireString({ input, key: "id" }),
115
+ expectedVersion: requireNumber({ input, key: "expectedVersion" }),
115
116
  },
116
117
  }));
117
118
  },
118
119
  collections_entry_unpublish: async (ctx) => {
119
- const input = requireInputRecord(ctx.input);
120
+ const input = requireInputRecord({ input: ctx.input });
120
121
  return fromEntryResult(() => unpublishEntry({
121
122
  deps: entriesDeps(routeDeps),
122
123
  input: {
123
124
  actorId: ctx.principal.id,
124
125
  principalKind: AGENT_TOOL_PRINCIPAL_KIND,
125
126
  workspaceId: routeDeps.workspaceId,
126
- id: requireString(input, "id"),
127
- expectedVersion: requireNumber(input, "expectedVersion"),
127
+ id: requireString({ input, key: "id" }),
128
+ expectedVersion: requireNumber({ input, key: "expectedVersion" }),
128
129
  },
129
130
  }));
130
131
  },
@@ -45,11 +45,4 @@ export interface ActorIdentityInput {
45
45
  delegatedByWorkspaceId?: string | null;
46
46
  delegatedById?: string | null;
47
47
  }
48
- export type Result<T, E> = {
49
- ok: true;
50
- value: T;
51
- } | {
52
- ok: false;
53
- error: E;
54
- };
55
48
  //# sourceMappingURL=types.d.ts.map