@contractspec/lib.contracts 1.44.0 → 1.45.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 (163) hide show
  1. package/README.md +1 -1
  2. package/dist/app-config/app-config.feature.js +6 -6
  3. package/dist/app-config/contracts.d.ts +50 -50
  4. package/dist/app-config/contracts.js +13 -13
  5. package/dist/app-config/events.d.ts +27 -27
  6. package/dist/app-config/events.js +12 -12
  7. package/dist/app-config/lifecycle-contracts.d.ts +54 -54
  8. package/dist/app-config/lifecycle-contracts.js +19 -19
  9. package/dist/app-config/lifecycle.d.ts +2 -2
  10. package/dist/app-config/runtime.d.ts +3 -3
  11. package/dist/app-config/spec.d.ts +10 -12
  12. package/dist/app-config/spec.js +5 -26
  13. package/dist/capabilities/capabilities.d.ts +4 -11
  14. package/dist/capabilities/capabilities.js +3 -5
  15. package/dist/capabilities/openbanking.js +10 -10
  16. package/dist/client/react/form-render.js +1 -0
  17. package/dist/contract-registry/schemas.d.ts +8 -8
  18. package/dist/contract-registry/schemas.js +1 -1
  19. package/dist/contract-registry/types.d.ts +1 -1
  20. package/dist/data-views/data-views.js +1 -0
  21. package/dist/data-views/registry.d.ts +3 -37
  22. package/dist/data-views/registry.js +4 -66
  23. package/dist/data-views/runtime.d.ts +1 -1
  24. package/dist/data-views/runtime.js +2 -0
  25. package/dist/data-views/spec.d.ts +2 -2
  26. package/dist/docs/index.d.ts +2 -2
  27. package/dist/docs/index.js +2 -2
  28. package/dist/docs/presentations.d.ts +2 -4
  29. package/dist/docs/presentations.js +2 -4
  30. package/dist/docs/tech/contracts/ops-to-presentation-linking.docblock.js +1 -1
  31. package/dist/docs/tech/contracts/tests.docblock.js +1 -1
  32. package/dist/docs/tech/lifecycle-stage-system.docblock.js +1 -1
  33. package/dist/docs/tech-contracts.docs.js +1 -1
  34. package/dist/docs/types.d.ts +1 -1
  35. package/dist/events.d.ts +3 -3
  36. package/dist/examples/docs/examples.docblock.d.ts +6 -0
  37. package/dist/examples/docs/examples.docblock.js +165 -0
  38. package/dist/examples/index.d.ts +5 -0
  39. package/dist/examples/index.js +6 -0
  40. package/dist/examples/registry.d.ts +65 -0
  41. package/dist/examples/registry.js +144 -0
  42. package/dist/examples/schema.d.ts +282 -0
  43. package/dist/examples/schema.js +125 -0
  44. package/dist/examples/types.d.ts +167 -0
  45. package/dist/examples/types.js +43 -0
  46. package/dist/examples/validation.d.ts +65 -0
  47. package/dist/examples/validation.js +144 -0
  48. package/dist/experiments/docs/experiments.docblock.js +1 -1
  49. package/dist/experiments/evaluator.d.ts +1 -1
  50. package/dist/experiments/spec-resolver.d.ts +2 -2
  51. package/dist/experiments/spec.d.ts +6 -8
  52. package/dist/experiments/spec.js +5 -23
  53. package/dist/features/index.d.ts +9 -1
  54. package/dist/features/index.js +8 -1
  55. package/dist/features/install.js +2 -2
  56. package/dist/features/types.d.ts +7 -7
  57. package/dist/forms/forms.d.ts +2 -2
  58. package/dist/forms/forms.js +3 -6
  59. package/dist/index.d.ts +13 -8
  60. package/dist/index.js +11 -2
  61. package/dist/install.d.ts +9 -9
  62. package/dist/integrations/connection.d.ts +1 -1
  63. package/dist/integrations/docs/integrations.docblock.js +1 -1
  64. package/dist/integrations/integrations.feature.js +8 -8
  65. package/dist/integrations/openbanking/contracts/accounts.d.ts +66 -66
  66. package/dist/integrations/openbanking/contracts/accounts.js +3 -3
  67. package/dist/integrations/openbanking/contracts/balances.d.ts +34 -34
  68. package/dist/integrations/openbanking/contracts/balances.js +2 -2
  69. package/dist/integrations/openbanking/contracts/transactions.d.ts +48 -48
  70. package/dist/integrations/openbanking/contracts/transactions.js +2 -2
  71. package/dist/integrations/openbanking/models.d.ts +55 -55
  72. package/dist/integrations/openbanking/openbanking.feature.js +10 -10
  73. package/dist/integrations/operations.d.ts +102 -102
  74. package/dist/integrations/operations.js +10 -10
  75. package/dist/integrations/providers/elevenlabs.js +2 -2
  76. package/dist/integrations/providers/gcs-storage.js +2 -2
  77. package/dist/integrations/providers/gmail.js +3 -3
  78. package/dist/integrations/providers/google-calendar.js +2 -2
  79. package/dist/integrations/providers/mistral.js +3 -3
  80. package/dist/integrations/providers/postmark.js +2 -2
  81. package/dist/integrations/providers/powens.js +4 -4
  82. package/dist/integrations/providers/qdrant.js +3 -3
  83. package/dist/integrations/providers/stripe.js +2 -2
  84. package/dist/integrations/providers/twilio-sms.js +2 -2
  85. package/dist/integrations/runtime.d.ts +5 -5
  86. package/dist/integrations/spec.d.ts +3 -5
  87. package/dist/integrations/spec.js +5 -26
  88. package/dist/jobs/gcp-cloud-tasks.js +1 -1
  89. package/dist/jobs/gcp-pubsub.js +1 -1
  90. package/dist/jobs/handlers/ping-handler.d.ts +3 -3
  91. package/dist/jobs/handlers/ping-handler.js +2 -2
  92. package/dist/jobs/memory-queue.js +1 -1
  93. package/dist/jobs/queue.d.ts +4 -4
  94. package/dist/jobs/scaleway-sqs-queue.js +2 -2
  95. package/dist/jsonschema.d.ts +4 -4
  96. package/dist/knowledge/binding.d.ts +1 -1
  97. package/dist/knowledge/knowledge.feature.js +8 -8
  98. package/dist/knowledge/operations.d.ts +66 -66
  99. package/dist/knowledge/operations.js +12 -12
  100. package/dist/knowledge/source.d.ts +1 -1
  101. package/dist/knowledge/spaces/email-threads.js +2 -2
  102. package/dist/knowledge/spaces/financial-docs.js +2 -2
  103. package/dist/knowledge/spaces/financial-overview.js +2 -2
  104. package/dist/knowledge/spaces/product-canon.js +2 -2
  105. package/dist/knowledge/spaces/support-faq.js +2 -2
  106. package/dist/knowledge/spaces/uploaded-docs.js +2 -2
  107. package/dist/knowledge/spec.d.ts +3 -5
  108. package/dist/knowledge/spec.js +6 -28
  109. package/dist/llm/exporters.js +2 -2
  110. package/dist/llm/types.d.ts +4 -4
  111. package/dist/markdown.js +1 -1
  112. package/dist/migrations.d.ts +2 -2
  113. package/dist/migrations.js +7 -9
  114. package/dist/onboarding-base.d.ts +29 -29
  115. package/dist/onboarding-base.js +4 -4
  116. package/dist/openapi.js +9 -2
  117. package/dist/operations/operation.d.ts +3 -3
  118. package/dist/operations/registry.d.ts +9 -58
  119. package/dist/operations/registry.js +17 -93
  120. package/dist/ownership.d.ts +1 -1
  121. package/dist/policy/docs/policy.docblock.js +1 -1
  122. package/dist/policy/engine.js +2 -0
  123. package/dist/policy/spec.d.ts +1 -1
  124. package/dist/prompt.d.ts +6 -6
  125. package/dist/promptRegistry.d.ts +4 -4
  126. package/dist/promptRegistry.js +2 -5
  127. package/dist/regenerator/docs/regenerator.docblock.js +1 -1
  128. package/dist/regenerator/types.d.ts +1 -1
  129. package/dist/registry.d.ts +3 -2
  130. package/dist/registry.js +5 -5
  131. package/dist/resources.d.ts +5 -5
  132. package/dist/server/graphql-pothos.js +2 -2
  133. package/dist/server/mcp/registerTools.js +1 -1
  134. package/dist/server/rest-elysia.d.ts +1 -1
  135. package/dist/server/rest-elysia.js +1 -1
  136. package/dist/server/rest-express.d.ts +1 -1
  137. package/dist/server/rest-express.js +1 -1
  138. package/dist/server/rest-generic.d.ts +1 -1
  139. package/dist/server/rest-generic.js +1 -1
  140. package/dist/server/rest-next-app.d.ts +1 -1
  141. package/dist/server/rest-next-mcp.d.ts +1 -1
  142. package/dist/server/rest-next-mcp.js +1 -1
  143. package/dist/server/rest-next-pages.d.ts +1 -1
  144. package/dist/telemetry/docs/telemetry.docblock.js +1 -1
  145. package/dist/telemetry/spec.d.ts +7 -7
  146. package/dist/telemetry/spec.js +17 -44
  147. package/dist/telemetry/tracker.d.ts +2 -2
  148. package/dist/tests/runner.d.ts +1 -1
  149. package/dist/tests/spec.d.ts +5 -5
  150. package/dist/tests/spec.js +3 -5
  151. package/dist/themes.d.ts +4 -6
  152. package/dist/themes.js +5 -27
  153. package/dist/translations/catalog.d.ts +1 -1
  154. package/dist/types.d.ts +5 -5
  155. package/dist/workflow/adapters/db-adapter.js +3 -3
  156. package/dist/workflow/runner.d.ts +4 -2
  157. package/dist/workflow/spec.d.ts +4 -17
  158. package/dist/workflow/spec.js +4 -48
  159. package/dist/workflow/state.d.ts +1 -1
  160. package/dist/workflow/validation.js +1 -1
  161. package/dist/workspace-config/contractsrc-schema.d.ts +419 -419
  162. package/dist/workspace-config/contractsrc-schema.js +86 -86
  163. package/package.json +28 -12
@@ -2,47 +2,47 @@ import { AnyOperationSpec, OperationSpec } from "../operations/operation.js";
2
2
  import { OperationSpecRegistry } from "../operations/registry.js";
3
3
  import "../operations/index.js";
4
4
  import "../index.js";
5
- import * as _contractspec_lib_schema209 from "@contractspec/lib.schema";
5
+ import * as _contractspec_lib_schema327 from "@contractspec/lib.schema";
6
6
  import { SchemaModel } from "@contractspec/lib.schema";
7
7
 
8
8
  //#region src/knowledge/operations.d.ts
9
9
  declare const CreateKnowledgeSource: OperationSpec<SchemaModel<{
10
10
  tenantId: {
11
- type: _contractspec_lib_schema209.FieldType<string, string>;
11
+ type: _contractspec_lib_schema327.FieldType<string, string>;
12
12
  isOptional: false;
13
13
  };
14
14
  spaceKey: {
15
- type: _contractspec_lib_schema209.FieldType<string, string>;
15
+ type: _contractspec_lib_schema327.FieldType<string, string>;
16
16
  isOptional: false;
17
17
  };
18
18
  spaceVersion: {
19
- type: _contractspec_lib_schema209.FieldType<number, number>;
19
+ type: _contractspec_lib_schema327.FieldType<string, string>;
20
20
  isOptional: false;
21
21
  };
22
22
  label: {
23
- type: _contractspec_lib_schema209.FieldType<string, string>;
23
+ type: _contractspec_lib_schema327.FieldType<string, string>;
24
24
  isOptional: false;
25
25
  };
26
26
  sourceType: {
27
- type: _contractspec_lib_schema209.FieldType<string, string>;
27
+ type: _contractspec_lib_schema327.FieldType<string, string>;
28
28
  isOptional: false;
29
29
  };
30
30
  config: {
31
- type: _contractspec_lib_schema209.FieldType<Record<string, unknown>, Record<string, unknown>>;
31
+ type: _contractspec_lib_schema327.FieldType<Record<string, unknown>, Record<string, unknown>>;
32
32
  isOptional: false;
33
33
  };
34
34
  syncSchedule: {
35
35
  type: SchemaModel<{
36
36
  enabled: {
37
- type: _contractspec_lib_schema209.FieldType<boolean, boolean>;
37
+ type: _contractspec_lib_schema327.FieldType<boolean, boolean>;
38
38
  isOptional: false;
39
39
  };
40
40
  cron: {
41
- type: _contractspec_lib_schema209.FieldType<string, string>;
41
+ type: _contractspec_lib_schema327.FieldType<string, string>;
42
42
  isOptional: true;
43
43
  };
44
44
  intervalMs: {
45
- type: _contractspec_lib_schema209.FieldType<number, number>;
45
+ type: _contractspec_lib_schema327.FieldType<number, number>;
46
46
  isOptional: true;
47
47
  };
48
48
  }>;
@@ -50,92 +50,92 @@ declare const CreateKnowledgeSource: OperationSpec<SchemaModel<{
50
50
  };
51
51
  }>, SchemaModel<{
52
52
  id: {
53
- type: _contractspec_lib_schema209.FieldType<string, string>;
53
+ type: _contractspec_lib_schema327.FieldType<string, string>;
54
54
  isOptional: false;
55
55
  };
56
56
  tenantId: {
57
- type: _contractspec_lib_schema209.FieldType<string, string>;
57
+ type: _contractspec_lib_schema327.FieldType<string, string>;
58
58
  isOptional: false;
59
59
  };
60
60
  spaceKey: {
61
- type: _contractspec_lib_schema209.FieldType<string, string>;
61
+ type: _contractspec_lib_schema327.FieldType<string, string>;
62
62
  isOptional: false;
63
63
  };
64
64
  spaceVersion: {
65
- type: _contractspec_lib_schema209.FieldType<number, number>;
65
+ type: _contractspec_lib_schema327.FieldType<string, string>;
66
66
  isOptional: false;
67
67
  };
68
68
  label: {
69
- type: _contractspec_lib_schema209.FieldType<string, string>;
69
+ type: _contractspec_lib_schema327.FieldType<string, string>;
70
70
  isOptional: false;
71
71
  };
72
72
  sourceType: {
73
- type: _contractspec_lib_schema209.FieldType<string, string>;
73
+ type: _contractspec_lib_schema327.FieldType<string, string>;
74
74
  isOptional: false;
75
75
  };
76
76
  syncSchedule: {
77
77
  type: SchemaModel<{
78
78
  enabled: {
79
- type: _contractspec_lib_schema209.FieldType<boolean, boolean>;
79
+ type: _contractspec_lib_schema327.FieldType<boolean, boolean>;
80
80
  isOptional: false;
81
81
  };
82
82
  cron: {
83
- type: _contractspec_lib_schema209.FieldType<string, string>;
83
+ type: _contractspec_lib_schema327.FieldType<string, string>;
84
84
  isOptional: true;
85
85
  };
86
86
  intervalMs: {
87
- type: _contractspec_lib_schema209.FieldType<number, number>;
87
+ type: _contractspec_lib_schema327.FieldType<number, number>;
88
88
  isOptional: true;
89
89
  };
90
90
  }>;
91
91
  isOptional: true;
92
92
  };
93
93
  lastSyncStatus: {
94
- type: _contractspec_lib_schema209.FieldType<string, string>;
94
+ type: _contractspec_lib_schema327.FieldType<string, string>;
95
95
  isOptional: true;
96
96
  };
97
97
  lastSyncAt: {
98
- type: _contractspec_lib_schema209.FieldType<Date, string>;
98
+ type: _contractspec_lib_schema327.FieldType<Date, string>;
99
99
  isOptional: true;
100
100
  };
101
101
  itemsProcessed: {
102
- type: _contractspec_lib_schema209.FieldType<number, number>;
102
+ type: _contractspec_lib_schema327.FieldType<number, number>;
103
103
  isOptional: true;
104
104
  };
105
105
  createdAt: {
106
- type: _contractspec_lib_schema209.FieldType<Date, string>;
106
+ type: _contractspec_lib_schema327.FieldType<Date, string>;
107
107
  isOptional: true;
108
108
  };
109
109
  updatedAt: {
110
- type: _contractspec_lib_schema209.FieldType<Date, string>;
110
+ type: _contractspec_lib_schema327.FieldType<Date, string>;
111
111
  isOptional: true;
112
112
  };
113
113
  }>, undefined>;
114
114
  declare const UpdateKnowledgeSource: OperationSpec<SchemaModel<{
115
115
  sourceId: {
116
- type: _contractspec_lib_schema209.FieldType<string, string>;
116
+ type: _contractspec_lib_schema327.FieldType<string, string>;
117
117
  isOptional: false;
118
118
  };
119
119
  label: {
120
- type: _contractspec_lib_schema209.FieldType<string, string>;
120
+ type: _contractspec_lib_schema327.FieldType<string, string>;
121
121
  isOptional: true;
122
122
  };
123
123
  config: {
124
- type: _contractspec_lib_schema209.FieldType<Record<string, unknown>, Record<string, unknown>>;
124
+ type: _contractspec_lib_schema327.FieldType<Record<string, unknown>, Record<string, unknown>>;
125
125
  isOptional: true;
126
126
  };
127
127
  syncSchedule: {
128
128
  type: SchemaModel<{
129
129
  enabled: {
130
- type: _contractspec_lib_schema209.FieldType<boolean, boolean>;
130
+ type: _contractspec_lib_schema327.FieldType<boolean, boolean>;
131
131
  isOptional: false;
132
132
  };
133
133
  cron: {
134
- type: _contractspec_lib_schema209.FieldType<string, string>;
134
+ type: _contractspec_lib_schema327.FieldType<string, string>;
135
135
  isOptional: true;
136
136
  };
137
137
  intervalMs: {
138
- type: _contractspec_lib_schema209.FieldType<number, number>;
138
+ type: _contractspec_lib_schema327.FieldType<number, number>;
139
139
  isOptional: true;
140
140
  };
141
141
  }>;
@@ -143,149 +143,149 @@ declare const UpdateKnowledgeSource: OperationSpec<SchemaModel<{
143
143
  };
144
144
  }>, SchemaModel<{
145
145
  id: {
146
- type: _contractspec_lib_schema209.FieldType<string, string>;
146
+ type: _contractspec_lib_schema327.FieldType<string, string>;
147
147
  isOptional: false;
148
148
  };
149
149
  tenantId: {
150
- type: _contractspec_lib_schema209.FieldType<string, string>;
150
+ type: _contractspec_lib_schema327.FieldType<string, string>;
151
151
  isOptional: false;
152
152
  };
153
153
  spaceKey: {
154
- type: _contractspec_lib_schema209.FieldType<string, string>;
154
+ type: _contractspec_lib_schema327.FieldType<string, string>;
155
155
  isOptional: false;
156
156
  };
157
157
  spaceVersion: {
158
- type: _contractspec_lib_schema209.FieldType<number, number>;
158
+ type: _contractspec_lib_schema327.FieldType<string, string>;
159
159
  isOptional: false;
160
160
  };
161
161
  label: {
162
- type: _contractspec_lib_schema209.FieldType<string, string>;
162
+ type: _contractspec_lib_schema327.FieldType<string, string>;
163
163
  isOptional: false;
164
164
  };
165
165
  sourceType: {
166
- type: _contractspec_lib_schema209.FieldType<string, string>;
166
+ type: _contractspec_lib_schema327.FieldType<string, string>;
167
167
  isOptional: false;
168
168
  };
169
169
  syncSchedule: {
170
170
  type: SchemaModel<{
171
171
  enabled: {
172
- type: _contractspec_lib_schema209.FieldType<boolean, boolean>;
172
+ type: _contractspec_lib_schema327.FieldType<boolean, boolean>;
173
173
  isOptional: false;
174
174
  };
175
175
  cron: {
176
- type: _contractspec_lib_schema209.FieldType<string, string>;
176
+ type: _contractspec_lib_schema327.FieldType<string, string>;
177
177
  isOptional: true;
178
178
  };
179
179
  intervalMs: {
180
- type: _contractspec_lib_schema209.FieldType<number, number>;
180
+ type: _contractspec_lib_schema327.FieldType<number, number>;
181
181
  isOptional: true;
182
182
  };
183
183
  }>;
184
184
  isOptional: true;
185
185
  };
186
186
  lastSyncStatus: {
187
- type: _contractspec_lib_schema209.FieldType<string, string>;
187
+ type: _contractspec_lib_schema327.FieldType<string, string>;
188
188
  isOptional: true;
189
189
  };
190
190
  lastSyncAt: {
191
- type: _contractspec_lib_schema209.FieldType<Date, string>;
191
+ type: _contractspec_lib_schema327.FieldType<Date, string>;
192
192
  isOptional: true;
193
193
  };
194
194
  itemsProcessed: {
195
- type: _contractspec_lib_schema209.FieldType<number, number>;
195
+ type: _contractspec_lib_schema327.FieldType<number, number>;
196
196
  isOptional: true;
197
197
  };
198
198
  createdAt: {
199
- type: _contractspec_lib_schema209.FieldType<Date, string>;
199
+ type: _contractspec_lib_schema327.FieldType<Date, string>;
200
200
  isOptional: true;
201
201
  };
202
202
  updatedAt: {
203
- type: _contractspec_lib_schema209.FieldType<Date, string>;
203
+ type: _contractspec_lib_schema327.FieldType<Date, string>;
204
204
  isOptional: true;
205
205
  };
206
206
  }>, undefined>;
207
207
  declare const DeleteKnowledgeSource: OperationSpec<SchemaModel<{
208
208
  sourceId: {
209
- type: _contractspec_lib_schema209.FieldType<string, string>;
209
+ type: _contractspec_lib_schema327.FieldType<string, string>;
210
210
  isOptional: false;
211
211
  };
212
212
  }>, SchemaModel<{
213
213
  success: {
214
- type: _contractspec_lib_schema209.FieldType<boolean, boolean>;
214
+ type: _contractspec_lib_schema327.FieldType<boolean, boolean>;
215
215
  isOptional: false;
216
216
  };
217
217
  }>, undefined>;
218
218
  declare const ListKnowledgeSources: OperationSpec<SchemaModel<{
219
219
  tenantId: {
220
- type: _contractspec_lib_schema209.FieldType<string, string>;
220
+ type: _contractspec_lib_schema327.FieldType<string, string>;
221
221
  isOptional: false;
222
222
  };
223
223
  spaceKey: {
224
- type: _contractspec_lib_schema209.FieldType<string, string>;
224
+ type: _contractspec_lib_schema327.FieldType<string, string>;
225
225
  isOptional: true;
226
226
  };
227
227
  }>, SchemaModel<{
228
228
  sources: {
229
229
  type: SchemaModel<{
230
230
  id: {
231
- type: _contractspec_lib_schema209.FieldType<string, string>;
231
+ type: _contractspec_lib_schema327.FieldType<string, string>;
232
232
  isOptional: false;
233
233
  };
234
234
  tenantId: {
235
- type: _contractspec_lib_schema209.FieldType<string, string>;
235
+ type: _contractspec_lib_schema327.FieldType<string, string>;
236
236
  isOptional: false;
237
237
  };
238
238
  spaceKey: {
239
- type: _contractspec_lib_schema209.FieldType<string, string>;
239
+ type: _contractspec_lib_schema327.FieldType<string, string>;
240
240
  isOptional: false;
241
241
  };
242
242
  spaceVersion: {
243
- type: _contractspec_lib_schema209.FieldType<number, number>;
243
+ type: _contractspec_lib_schema327.FieldType<string, string>;
244
244
  isOptional: false;
245
245
  };
246
246
  label: {
247
- type: _contractspec_lib_schema209.FieldType<string, string>;
247
+ type: _contractspec_lib_schema327.FieldType<string, string>;
248
248
  isOptional: false;
249
249
  };
250
250
  sourceType: {
251
- type: _contractspec_lib_schema209.FieldType<string, string>;
251
+ type: _contractspec_lib_schema327.FieldType<string, string>;
252
252
  isOptional: false;
253
253
  };
254
254
  syncSchedule: {
255
255
  type: SchemaModel<{
256
256
  enabled: {
257
- type: _contractspec_lib_schema209.FieldType<boolean, boolean>;
257
+ type: _contractspec_lib_schema327.FieldType<boolean, boolean>;
258
258
  isOptional: false;
259
259
  };
260
260
  cron: {
261
- type: _contractspec_lib_schema209.FieldType<string, string>;
261
+ type: _contractspec_lib_schema327.FieldType<string, string>;
262
262
  isOptional: true;
263
263
  };
264
264
  intervalMs: {
265
- type: _contractspec_lib_schema209.FieldType<number, number>;
265
+ type: _contractspec_lib_schema327.FieldType<number, number>;
266
266
  isOptional: true;
267
267
  };
268
268
  }>;
269
269
  isOptional: true;
270
270
  };
271
271
  lastSyncStatus: {
272
- type: _contractspec_lib_schema209.FieldType<string, string>;
272
+ type: _contractspec_lib_schema327.FieldType<string, string>;
273
273
  isOptional: true;
274
274
  };
275
275
  lastSyncAt: {
276
- type: _contractspec_lib_schema209.FieldType<Date, string>;
276
+ type: _contractspec_lib_schema327.FieldType<Date, string>;
277
277
  isOptional: true;
278
278
  };
279
279
  itemsProcessed: {
280
- type: _contractspec_lib_schema209.FieldType<number, number>;
280
+ type: _contractspec_lib_schema327.FieldType<number, number>;
281
281
  isOptional: true;
282
282
  };
283
283
  createdAt: {
284
- type: _contractspec_lib_schema209.FieldType<Date, string>;
284
+ type: _contractspec_lib_schema327.FieldType<Date, string>;
285
285
  isOptional: true;
286
286
  };
287
287
  updatedAt: {
288
- type: _contractspec_lib_schema209.FieldType<Date, string>;
288
+ type: _contractspec_lib_schema327.FieldType<Date, string>;
289
289
  isOptional: true;
290
290
  };
291
291
  }>;
@@ -295,20 +295,20 @@ declare const ListKnowledgeSources: OperationSpec<SchemaModel<{
295
295
  }>, undefined>;
296
296
  declare const TriggerKnowledgeSourceSync: OperationSpec<SchemaModel<{
297
297
  sourceId: {
298
- type: _contractspec_lib_schema209.FieldType<string, string>;
298
+ type: _contractspec_lib_schema327.FieldType<string, string>;
299
299
  isOptional: false;
300
300
  };
301
301
  }>, SchemaModel<{
302
302
  success: {
303
- type: _contractspec_lib_schema209.FieldType<boolean, boolean>;
303
+ type: _contractspec_lib_schema327.FieldType<boolean, boolean>;
304
304
  isOptional: false;
305
305
  };
306
306
  itemsProcessed: {
307
- type: _contractspec_lib_schema209.FieldType<number, number>;
307
+ type: _contractspec_lib_schema327.FieldType<number, number>;
308
308
  isOptional: true;
309
309
  };
310
310
  error: {
311
- type: _contractspec_lib_schema209.FieldType<string, string>;
311
+ type: _contractspec_lib_schema327.FieldType<string, string>;
312
312
  isOptional: true;
313
313
  };
314
314
  }>, undefined>;
@@ -36,7 +36,7 @@ const KnowledgeSourceRecord = new SchemaModel({
36
36
  isOptional: false
37
37
  },
38
38
  spaceVersion: {
39
- type: ScalarTypeEnum.Int_unsecure(),
39
+ type: ScalarTypeEnum.String_unsecure(),
40
40
  isOptional: false
41
41
  },
42
42
  label: {
@@ -85,7 +85,7 @@ const CreateKnowledgeSourceInput = new SchemaModel({
85
85
  isOptional: false
86
86
  },
87
87
  spaceVersion: {
88
- type: ScalarTypeEnum.Int_unsecure(),
88
+ type: ScalarTypeEnum.String_unsecure(),
89
89
  isOptional: false
90
90
  },
91
91
  label: {
@@ -190,7 +190,7 @@ const CreateKnowledgeSource = defineCommand({
190
190
  meta: {
191
191
  key: "knowledge.source.create",
192
192
  title: "Create Knowledge Source",
193
- version: 1,
193
+ version: "1.0.0",
194
194
  description: "Create a knowledge source binding for a tenant.",
195
195
  goal: "Onboard a new knowledge ingestion source such as Notion or uploads.",
196
196
  context: "Used by Ops and App Studio to configure knowledge ingestion per tenant and space.",
@@ -206,7 +206,7 @@ const CreateKnowledgeSource = defineCommand({
206
206
  auth: "admin",
207
207
  policies: [{
208
208
  key: "platform.knowledge.manage",
209
- version: 1
209
+ version: "1.0.0"
210
210
  }]
211
211
  }
212
212
  });
@@ -214,7 +214,7 @@ const UpdateKnowledgeSource = defineCommand({
214
214
  meta: {
215
215
  key: "knowledge.source.update",
216
216
  title: "Update Knowledge Source",
217
- version: 1,
217
+ version: "1.0.0",
218
218
  description: "Update metadata or configuration for a knowledge source.",
219
219
  goal: "Allow rotation of credentials, sync schedules, and labels.",
220
220
  context: "Supports editing how a tenant ingests knowledge (e.g., toggling sync cadence).",
@@ -230,7 +230,7 @@ const UpdateKnowledgeSource = defineCommand({
230
230
  auth: "admin",
231
231
  policies: [{
232
232
  key: "platform.knowledge.manage",
233
- version: 1
233
+ version: "1.0.0"
234
234
  }]
235
235
  }
236
236
  });
@@ -238,7 +238,7 @@ const DeleteKnowledgeSource = defineCommand({
238
238
  meta: {
239
239
  key: "knowledge.source.delete",
240
240
  title: "Delete Knowledge Source",
241
- version: 1,
241
+ version: "1.0.0",
242
242
  description: "Delete a knowledge source binding for a tenant.",
243
243
  goal: "Remove obsolete or compromised knowledge ingestion paths.",
244
244
  context: "Ensures ephemeral or external sources can be removed cleanly without leaving residual bindings.",
@@ -254,7 +254,7 @@ const DeleteKnowledgeSource = defineCommand({
254
254
  auth: "admin",
255
255
  policies: [{
256
256
  key: "platform.knowledge.manage",
257
- version: 1
257
+ version: "1.0.0"
258
258
  }]
259
259
  }
260
260
  });
@@ -262,7 +262,7 @@ const ListKnowledgeSources = defineQuery({
262
262
  meta: {
263
263
  key: "knowledge.source.list",
264
264
  title: "List Knowledge Sources",
265
- version: 1,
265
+ version: "1.0.0",
266
266
  description: "List knowledge sources configured for a tenant.",
267
267
  goal: "Provide visibility into knowledge ingest configuration and schedules.",
268
268
  context: "Used by App Studio and Ops flows to surface knowledge sources and their health.",
@@ -278,7 +278,7 @@ const ListKnowledgeSources = defineQuery({
278
278
  auth: "admin",
279
279
  policies: [{
280
280
  key: "platform.knowledge.read",
281
- version: 1
281
+ version: "1.0.0"
282
282
  }]
283
283
  }
284
284
  });
@@ -286,7 +286,7 @@ const TriggerKnowledgeSourceSync = defineCommand({
286
286
  meta: {
287
287
  key: "knowledge.source.triggerSync",
288
288
  title: "Trigger Knowledge Source Sync",
289
- version: 1,
289
+ version: "1.0.0",
290
290
  description: "Trigger an immediate sync for a knowledge source.",
291
291
  goal: "Support manual or automated sync retries for knowledge ingestion.",
292
292
  context: "Invoked by Ops tooling or monitors when knowledge content must be refreshed or reprocessed.",
@@ -302,7 +302,7 @@ const TriggerKnowledgeSourceSync = defineCommand({
302
302
  auth: "admin",
303
303
  policies: [{
304
304
  key: "platform.knowledge.manage",
305
- version: 1
305
+ version: "1.0.0"
306
306
  }]
307
307
  }
308
308
  });
@@ -4,7 +4,7 @@ interface KnowledgeSourceMeta {
4
4
  id: string;
5
5
  tenantId: string;
6
6
  spaceKey: string;
7
- spaceVersion: number;
7
+ spaceVersion: string;
8
8
  label: string;
9
9
  sourceType: KnowledgeSourceType;
10
10
  createdAt: string | Date;
@@ -4,7 +4,7 @@ import { StabilityEnum } from "../../ownership.js";
4
4
  const emailThreadsKnowledgeSpace = {
5
5
  meta: {
6
6
  key: "knowledge.email-threads",
7
- version: 1,
7
+ version: "1.0.0",
8
8
  category: "operational",
9
9
  title: "Operational Email Threads",
10
10
  description: "Indexed copies of operational email threads used for support, onboarding, and workflows.",
@@ -17,7 +17,7 @@ const emailThreadsKnowledgeSpace = {
17
17
  access: {
18
18
  policy: {
19
19
  key: "knowledge.access.email-threads",
20
- version: 1
20
+ version: "1.0.0"
21
21
  },
22
22
  trustLevel: "medium",
23
23
  automationWritable: true
@@ -4,7 +4,7 @@ import { StabilityEnum } from "../../ownership.js";
4
4
  const financialDocsKnowledgeSpace = {
5
5
  meta: {
6
6
  key: "knowledge.financial-docs",
7
- version: 1,
7
+ version: "1.0.0",
8
8
  category: "canonical",
9
9
  title: "Household Financial Documents",
10
10
  description: "Invoices, bills, and contracts powering Pocket Family Office financial automation.",
@@ -17,7 +17,7 @@ const financialDocsKnowledgeSpace = {
17
17
  access: {
18
18
  policy: {
19
19
  key: "knowledge.access.financial-docs",
20
- version: 1
20
+ version: "1.0.0"
21
21
  },
22
22
  trustLevel: "high",
23
23
  automationWritable: true
@@ -4,7 +4,7 @@ import { StabilityEnum } from "../../ownership.js";
4
4
  const financialOverviewKnowledgeSpace = {
5
5
  meta: {
6
6
  key: "knowledge.financial-overview",
7
- version: 1,
7
+ version: "1.0.0",
8
8
  category: "operational",
9
9
  title: "Derived Financial Summaries",
10
10
  description: "Aggregated cashflow summaries, category breakdowns, and balance trends derived from open banking data.",
@@ -21,7 +21,7 @@ const financialOverviewKnowledgeSpace = {
21
21
  access: {
22
22
  policy: {
23
23
  key: "knowledge.access.financial-overview",
24
- version: 1
24
+ version: "1.0.0"
25
25
  },
26
26
  trustLevel: "medium",
27
27
  automationWritable: true
@@ -4,7 +4,7 @@ import { StabilityEnum } from "../../ownership.js";
4
4
  const productCanonKnowledgeSpace = {
5
5
  meta: {
6
6
  key: "knowledge.product-canon",
7
- version: 1,
7
+ version: "1.0.0",
8
8
  category: "canonical",
9
9
  title: "Product Canon Knowledge Space",
10
10
  description: "Authoritative product knowledge covering strategy, roadmap, and delivery canon.",
@@ -17,7 +17,7 @@ const productCanonKnowledgeSpace = {
17
17
  access: {
18
18
  policy: {
19
19
  key: "knowledge.access.product-canon",
20
- version: 1
20
+ version: "1.0.0"
21
21
  },
22
22
  trustLevel: "high",
23
23
  automationWritable: false
@@ -4,7 +4,7 @@ import { StabilityEnum } from "../../ownership.js";
4
4
  const supportFaqKnowledgeSpace = {
5
5
  meta: {
6
6
  key: "knowledge.support-faq",
7
- version: 1,
7
+ version: "1.0.0",
8
8
  category: "operational",
9
9
  title: "Support & Success FAQ",
10
10
  description: "Operational knowledge base for customer support and success.",
@@ -20,7 +20,7 @@ const supportFaqKnowledgeSpace = {
20
20
  access: {
21
21
  policy: {
22
22
  key: "knowledge.access.support",
23
- version: 1
23
+ version: "1.0.0"
24
24
  },
25
25
  trustLevel: "medium",
26
26
  automationWritable: true
@@ -4,7 +4,7 @@ import { StabilityEnum } from "../../ownership.js";
4
4
  const uploadedDocsKnowledgeSpace = {
5
5
  meta: {
6
6
  key: "knowledge.uploaded-docs",
7
- version: 1,
7
+ version: "1.0.0",
8
8
  category: "external",
9
9
  title: "Uploaded Knowledge Assets",
10
10
  description: "Documents uploaded by households, including invoices, contracts, and reference files.",
@@ -17,7 +17,7 @@ const uploadedDocsKnowledgeSpace = {
17
17
  access: {
18
18
  policy: {
19
19
  key: "knowledge.access.uploaded-docs",
20
- version: 1
20
+ version: "1.0.0"
21
21
  },
22
22
  trustLevel: "medium",
23
23
  automationWritable: true
@@ -1,5 +1,6 @@
1
1
  import { OwnerShipMeta } from "../ownership.js";
2
2
  import { PolicyRef } from "../policy/spec.js";
3
+ import { SpecContractRegistry } from "../registry.js";
3
4
 
4
5
  //#region src/knowledge/spec.d.ts
5
6
  type KnowledgeCategory = 'canonical' | 'operational' | 'external' | 'ephemeral';
@@ -36,11 +37,8 @@ interface KnowledgeSpaceSpec {
36
37
  /** Documentation. */
37
38
  description?: string;
38
39
  }
39
- declare class KnowledgeSpaceRegistry {
40
- private readonly items;
41
- register(spec: KnowledgeSpaceSpec): this;
42
- list(): KnowledgeSpaceSpec[];
43
- get(key: string, version?: number): KnowledgeSpaceSpec | undefined;
40
+ declare class KnowledgeSpaceRegistry extends SpecContractRegistry<'knowledge-space', KnowledgeSpaceSpec> {
41
+ constructor(items?: KnowledgeSpaceSpec[]);
44
42
  getByCategory(category: KnowledgeCategory): KnowledgeSpaceSpec[];
45
43
  }
46
44
  declare function makeKnowledgeSpaceKey(meta: KnowledgeSpaceMeta): string;
@@ -1,38 +1,16 @@
1
+ import { SpecContractRegistry } from "../registry.js";
2
+
1
3
  //#region src/knowledge/spec.ts
2
- const knowledgeKey = (meta) => `${meta.key}.v${meta.version}`;
3
- var KnowledgeSpaceRegistry = class {
4
- items = /* @__PURE__ */ new Map();
5
- register(spec) {
6
- const key = knowledgeKey(spec.meta);
7
- if (this.items.has(key)) throw new Error(`Duplicate KnowledgeSpaceSpec ${key}`);
8
- this.items.set(key, spec);
9
- return this;
10
- }
11
- list() {
12
- return [...this.items.values()];
13
- }
14
- get(key, version) {
15
- if (version != null) return this.items.get(knowledgeKey({
16
- key,
17
- version
18
- }));
19
- let latest;
20
- let maxVersion = -Infinity;
21
- for (const spec of this.items.values()) {
22
- if (spec.meta.key !== key) continue;
23
- if (spec.meta.version > maxVersion) {
24
- maxVersion = spec.meta.version;
25
- latest = spec;
26
- }
27
- }
28
- return latest;
4
+ var KnowledgeSpaceRegistry = class extends SpecContractRegistry {
5
+ constructor(items) {
6
+ super("knowledge-space", items);
29
7
  }
30
8
  getByCategory(category) {
31
9
  return this.list().filter((spec) => spec.meta.category === category);
32
10
  }
33
11
  };
34
12
  function makeKnowledgeSpaceKey(meta) {
35
- return knowledgeKey(meta);
13
+ return `${meta.key}.v${meta.version}`;
36
14
  }
37
15
 
38
16
  //#endregion