@lssm/example.team-hub 0.0.0-canary-20251221132705 → 0.0.0-canary-20251221153314

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 (61) hide show
  1. package/dist/announcement/announcement.contracts.d.ts +16 -16
  2. package/dist/announcement/announcement.contracts.d.ts.map +1 -1
  3. package/dist/announcement/announcement.contracts.js +1 -1
  4. package/dist/announcement/announcement.schema.d.ts +15 -15
  5. package/dist/announcement/announcement.schema.d.ts.map +1 -1
  6. package/dist/entities/index.d.ts +137 -137
  7. package/dist/events.d.ts +78 -78
  8. package/dist/events.d.ts.map +1 -1
  9. package/dist/libs/contracts/dist/capabilities/index.js +1 -0
  10. package/dist/libs/contracts/dist/client/react/feature-render.js +2 -1
  11. package/dist/libs/contracts/dist/client/react/form-render.js +1 -1
  12. package/dist/libs/contracts/dist/data-views/data-views.js +1 -0
  13. package/dist/libs/contracts/dist/docs/tech/llm/llm-integration.docblock.js +2 -2
  14. package/dist/libs/contracts/dist/docs/tech/llm/llm-integration.docblock.js.map +1 -1
  15. package/dist/libs/contracts/dist/forms/forms.js +1 -0
  16. package/dist/libs/contracts/dist/index.js +15 -12
  17. package/dist/libs/contracts/dist/index.js.map +1 -1
  18. package/dist/libs/contracts/dist/install.js +1 -1
  19. package/dist/libs/contracts/dist/integrations/openbanking/contracts/accounts.js +2 -1
  20. package/dist/libs/contracts/dist/integrations/openbanking/contracts/accounts.js.map +1 -1
  21. package/dist/libs/contracts/dist/integrations/openbanking/contracts/balances.js +2 -1
  22. package/dist/libs/contracts/dist/integrations/openbanking/contracts/balances.js.map +1 -1
  23. package/dist/libs/contracts/dist/integrations/openbanking/contracts/transactions.js +2 -1
  24. package/dist/libs/contracts/dist/integrations/openbanking/contracts/transactions.js.map +1 -1
  25. package/dist/libs/contracts/dist/integrations/{contracts.js → operations.js} +4 -3
  26. package/dist/libs/contracts/dist/integrations/operations.js.map +1 -0
  27. package/dist/libs/contracts/dist/knowledge/{contracts.js → operations.js} +4 -3
  28. package/dist/libs/contracts/dist/knowledge/operations.js.map +1 -0
  29. package/dist/libs/contracts/dist/llm/exporters.js +1 -0
  30. package/dist/libs/contracts/dist/llm/exporters.js.map +1 -1
  31. package/dist/libs/contracts/dist/onboarding-base.js +2 -1
  32. package/dist/libs/contracts/dist/onboarding-base.js.map +1 -1
  33. package/dist/libs/contracts/dist/operations/index.js +2 -0
  34. package/dist/libs/contracts/dist/{operation.js → operations/operation.js} +1 -1
  35. package/dist/libs/contracts/dist/operations/operation.js.map +1 -0
  36. package/dist/libs/contracts/dist/operations/registry.js +2 -0
  37. package/dist/libs/contracts/dist/presentations/index.js +2 -0
  38. package/dist/libs/contracts/dist/presentations/presentations.js +2 -0
  39. package/dist/libs/contracts/dist/{presentations.v2.js → presentations/transform-engine.js} +2 -2
  40. package/dist/libs/contracts/dist/presentations/transform-engine.js.map +1 -0
  41. package/dist/libs/contracts/dist/server/mcp/registerPresentations.js +3 -2
  42. package/dist/ritual/ritual.contracts.d.ts +28 -28
  43. package/dist/ritual/ritual.contracts.d.ts.map +1 -1
  44. package/dist/ritual/ritual.contracts.js +1 -1
  45. package/dist/ritual/ritual.schema.d.ts +20 -20
  46. package/dist/space/space.contracts.d.ts +13 -13
  47. package/dist/space/space.contracts.d.ts.map +1 -1
  48. package/dist/space/space.contracts.js +1 -1
  49. package/dist/space/space.schema.d.ts +12 -12
  50. package/dist/task/task.contracts.d.ts +60 -60
  51. package/dist/task/task.contracts.d.ts.map +1 -1
  52. package/dist/task/task.contracts.js +1 -1
  53. package/package.json +10 -10
  54. package/dist/libs/contracts/dist/data-views.js +0 -1
  55. package/dist/libs/contracts/dist/forms.js +0 -1
  56. package/dist/libs/contracts/dist/integrations/contracts.js.map +0 -1
  57. package/dist/libs/contracts/dist/knowledge/contracts.js.map +0 -1
  58. package/dist/libs/contracts/dist/operation.js.map +0 -1
  59. package/dist/libs/contracts/dist/presentations.js +0 -2
  60. package/dist/libs/contracts/dist/presentations.v2.js.map +0 -1
  61. package/dist/libs/contracts/dist/registry.js +0 -3
@@ -1,58 +1,58 @@
1
- import * as _lssm_lib_schema324 from "@lssm/lib.schema";
2
- import * as _lssm_lib_contracts15 from "@lssm/lib.contracts";
1
+ import * as _lssm_lib_schema248 from "@lssm/lib.schema";
2
+ import * as _lssm_lib_contracts3 from "@lssm/lib.contracts";
3
3
 
4
4
  //#region src/task/task.contracts.d.ts
5
- declare const ListTasksInputModel: _lssm_lib_schema324.SchemaModel<{
5
+ declare const ListTasksInputModel: _lssm_lib_schema248.SchemaModel<{
6
6
  spaceId: {
7
- type: _lssm_lib_schema324.FieldType<string, string>;
7
+ type: _lssm_lib_schema248.FieldType<string, string>;
8
8
  isOptional: true;
9
9
  };
10
10
  status: {
11
- type: _lssm_lib_schema324.FieldType<string, string>;
11
+ type: _lssm_lib_schema248.FieldType<string, string>;
12
12
  isOptional: true;
13
13
  };
14
14
  assigneeId: {
15
- type: _lssm_lib_schema324.FieldType<string, string>;
15
+ type: _lssm_lib_schema248.FieldType<string, string>;
16
16
  isOptional: true;
17
17
  };
18
18
  limit: {
19
- type: _lssm_lib_schema324.FieldType<number, number>;
19
+ type: _lssm_lib_schema248.FieldType<number, number>;
20
20
  isOptional: true;
21
21
  };
22
22
  offset: {
23
- type: _lssm_lib_schema324.FieldType<number, number>;
23
+ type: _lssm_lib_schema248.FieldType<number, number>;
24
24
  isOptional: true;
25
25
  };
26
26
  }>;
27
- declare const ListTasksOutputModel: _lssm_lib_schema324.SchemaModel<{
27
+ declare const ListTasksOutputModel: _lssm_lib_schema248.SchemaModel<{
28
28
  tasks: {
29
- type: _lssm_lib_schema324.SchemaModel<{
29
+ type: _lssm_lib_schema248.SchemaModel<{
30
30
  id: {
31
- type: _lssm_lib_schema324.FieldType<string, string>;
31
+ type: _lssm_lib_schema248.FieldType<string, string>;
32
32
  isOptional: false;
33
33
  };
34
34
  spaceId: {
35
- type: _lssm_lib_schema324.FieldType<string, string>;
35
+ type: _lssm_lib_schema248.FieldType<string, string>;
36
36
  isOptional: false;
37
37
  };
38
38
  title: {
39
- type: _lssm_lib_schema324.FieldType<string, string>;
39
+ type: _lssm_lib_schema248.FieldType<string, string>;
40
40
  isOptional: false;
41
41
  };
42
42
  status: {
43
- type: _lssm_lib_schema324.FieldType<string, string>;
43
+ type: _lssm_lib_schema248.FieldType<string, string>;
44
44
  isOptional: false;
45
45
  };
46
46
  priority: {
47
- type: _lssm_lib_schema324.FieldType<string, string>;
47
+ type: _lssm_lib_schema248.FieldType<string, string>;
48
48
  isOptional: false;
49
49
  };
50
50
  assigneeId: {
51
- type: _lssm_lib_schema324.FieldType<string, string>;
51
+ type: _lssm_lib_schema248.FieldType<string, string>;
52
52
  isOptional: true;
53
53
  };
54
54
  dueDate: {
55
- type: _lssm_lib_schema324.FieldType<Date, string>;
55
+ type: _lssm_lib_schema248.FieldType<Date, string>;
56
56
  isOptional: true;
57
57
  };
58
58
  }>;
@@ -60,60 +60,60 @@ declare const ListTasksOutputModel: _lssm_lib_schema324.SchemaModel<{
60
60
  isList: boolean;
61
61
  };
62
62
  total: {
63
- type: _lssm_lib_schema324.FieldType<number, number>;
63
+ type: _lssm_lib_schema248.FieldType<number, number>;
64
64
  isOptional: false;
65
65
  };
66
66
  }>;
67
- declare const ListTasksOperation: _lssm_lib_contracts15.OperationSpec<_lssm_lib_schema324.SchemaModel<{
67
+ declare const ListTasksOperation: _lssm_lib_contracts3.OperationSpec<_lssm_lib_schema248.SchemaModel<{
68
68
  spaceId: {
69
- type: _lssm_lib_schema324.FieldType<string, string>;
69
+ type: _lssm_lib_schema248.FieldType<string, string>;
70
70
  isOptional: true;
71
71
  };
72
72
  status: {
73
- type: _lssm_lib_schema324.FieldType<string, string>;
73
+ type: _lssm_lib_schema248.FieldType<string, string>;
74
74
  isOptional: true;
75
75
  };
76
76
  assigneeId: {
77
- type: _lssm_lib_schema324.FieldType<string, string>;
77
+ type: _lssm_lib_schema248.FieldType<string, string>;
78
78
  isOptional: true;
79
79
  };
80
80
  limit: {
81
- type: _lssm_lib_schema324.FieldType<number, number>;
81
+ type: _lssm_lib_schema248.FieldType<number, number>;
82
82
  isOptional: true;
83
83
  };
84
84
  offset: {
85
- type: _lssm_lib_schema324.FieldType<number, number>;
85
+ type: _lssm_lib_schema248.FieldType<number, number>;
86
86
  isOptional: true;
87
87
  };
88
- }>, _lssm_lib_schema324.SchemaModel<{
88
+ }>, _lssm_lib_schema248.SchemaModel<{
89
89
  tasks: {
90
- type: _lssm_lib_schema324.SchemaModel<{
90
+ type: _lssm_lib_schema248.SchemaModel<{
91
91
  id: {
92
- type: _lssm_lib_schema324.FieldType<string, string>;
92
+ type: _lssm_lib_schema248.FieldType<string, string>;
93
93
  isOptional: false;
94
94
  };
95
95
  spaceId: {
96
- type: _lssm_lib_schema324.FieldType<string, string>;
96
+ type: _lssm_lib_schema248.FieldType<string, string>;
97
97
  isOptional: false;
98
98
  };
99
99
  title: {
100
- type: _lssm_lib_schema324.FieldType<string, string>;
100
+ type: _lssm_lib_schema248.FieldType<string, string>;
101
101
  isOptional: false;
102
102
  };
103
103
  status: {
104
- type: _lssm_lib_schema324.FieldType<string, string>;
104
+ type: _lssm_lib_schema248.FieldType<string, string>;
105
105
  isOptional: false;
106
106
  };
107
107
  priority: {
108
- type: _lssm_lib_schema324.FieldType<string, string>;
108
+ type: _lssm_lib_schema248.FieldType<string, string>;
109
109
  isOptional: false;
110
110
  };
111
111
  assigneeId: {
112
- type: _lssm_lib_schema324.FieldType<string, string>;
112
+ type: _lssm_lib_schema248.FieldType<string, string>;
113
113
  isOptional: true;
114
114
  };
115
115
  dueDate: {
116
- type: _lssm_lib_schema324.FieldType<Date, string>;
116
+ type: _lssm_lib_schema248.FieldType<Date, string>;
117
117
  isOptional: true;
118
118
  };
119
119
  }>;
@@ -121,107 +121,107 @@ declare const ListTasksOperation: _lssm_lib_contracts15.OperationSpec<_lssm_lib_
121
121
  isList: boolean;
122
122
  };
123
123
  total: {
124
- type: _lssm_lib_schema324.FieldType<number, number>;
124
+ type: _lssm_lib_schema248.FieldType<number, number>;
125
125
  isOptional: false;
126
126
  };
127
127
  }>, undefined>;
128
128
  /**
129
129
  * Create a task.
130
130
  */
131
- declare const CreateTaskContract: _lssm_lib_contracts15.OperationSpec<_lssm_lib_schema324.SchemaModel<{
131
+ declare const CreateTaskContract: _lssm_lib_contracts3.OperationSpec<_lssm_lib_schema248.SchemaModel<{
132
132
  spaceId: {
133
- type: _lssm_lib_schema324.FieldType<string, string>;
133
+ type: _lssm_lib_schema248.FieldType<string, string>;
134
134
  isOptional: false;
135
135
  };
136
136
  title: {
137
- type: _lssm_lib_schema324.FieldType<string, string>;
137
+ type: _lssm_lib_schema248.FieldType<string, string>;
138
138
  isOptional: false;
139
139
  };
140
140
  description: {
141
- type: _lssm_lib_schema324.FieldType<string, string>;
141
+ type: _lssm_lib_schema248.FieldType<string, string>;
142
142
  isOptional: true;
143
143
  };
144
144
  priority: {
145
- type: _lssm_lib_schema324.FieldType<string, string>;
145
+ type: _lssm_lib_schema248.FieldType<string, string>;
146
146
  isOptional: true;
147
147
  };
148
148
  assigneeId: {
149
- type: _lssm_lib_schema324.FieldType<string, string>;
149
+ type: _lssm_lib_schema248.FieldType<string, string>;
150
150
  isOptional: true;
151
151
  };
152
152
  dueDate: {
153
- type: _lssm_lib_schema324.FieldType<Date, string>;
153
+ type: _lssm_lib_schema248.FieldType<Date, string>;
154
154
  isOptional: true;
155
155
  };
156
- }>, _lssm_lib_schema324.SchemaModel<{
156
+ }>, _lssm_lib_schema248.SchemaModel<{
157
157
  id: {
158
- type: _lssm_lib_schema324.FieldType<string, string>;
158
+ type: _lssm_lib_schema248.FieldType<string, string>;
159
159
  isOptional: false;
160
160
  };
161
161
  spaceId: {
162
- type: _lssm_lib_schema324.FieldType<string, string>;
162
+ type: _lssm_lib_schema248.FieldType<string, string>;
163
163
  isOptional: false;
164
164
  };
165
165
  title: {
166
- type: _lssm_lib_schema324.FieldType<string, string>;
166
+ type: _lssm_lib_schema248.FieldType<string, string>;
167
167
  isOptional: false;
168
168
  };
169
169
  status: {
170
- type: _lssm_lib_schema324.FieldType<string, string>;
170
+ type: _lssm_lib_schema248.FieldType<string, string>;
171
171
  isOptional: false;
172
172
  };
173
173
  priority: {
174
- type: _lssm_lib_schema324.FieldType<string, string>;
174
+ type: _lssm_lib_schema248.FieldType<string, string>;
175
175
  isOptional: false;
176
176
  };
177
177
  assigneeId: {
178
- type: _lssm_lib_schema324.FieldType<string, string>;
178
+ type: _lssm_lib_schema248.FieldType<string, string>;
179
179
  isOptional: true;
180
180
  };
181
181
  dueDate: {
182
- type: _lssm_lib_schema324.FieldType<Date, string>;
182
+ type: _lssm_lib_schema248.FieldType<Date, string>;
183
183
  isOptional: true;
184
184
  };
185
185
  }>, undefined>;
186
186
  /**
187
187
  * Update task status.
188
188
  */
189
- declare const UpdateTaskStatusContract: _lssm_lib_contracts15.OperationSpec<_lssm_lib_schema324.SchemaModel<{
189
+ declare const UpdateTaskStatusContract: _lssm_lib_contracts3.OperationSpec<_lssm_lib_schema248.SchemaModel<{
190
190
  taskId: {
191
- type: _lssm_lib_schema324.FieldType<string, string>;
191
+ type: _lssm_lib_schema248.FieldType<string, string>;
192
192
  isOptional: false;
193
193
  };
194
194
  status: {
195
- type: _lssm_lib_schema324.FieldType<string, string>;
195
+ type: _lssm_lib_schema248.FieldType<string, string>;
196
196
  isOptional: false;
197
197
  };
198
- }>, _lssm_lib_schema324.SchemaModel<{
198
+ }>, _lssm_lib_schema248.SchemaModel<{
199
199
  id: {
200
- type: _lssm_lib_schema324.FieldType<string, string>;
200
+ type: _lssm_lib_schema248.FieldType<string, string>;
201
201
  isOptional: false;
202
202
  };
203
203
  spaceId: {
204
- type: _lssm_lib_schema324.FieldType<string, string>;
204
+ type: _lssm_lib_schema248.FieldType<string, string>;
205
205
  isOptional: false;
206
206
  };
207
207
  title: {
208
- type: _lssm_lib_schema324.FieldType<string, string>;
208
+ type: _lssm_lib_schema248.FieldType<string, string>;
209
209
  isOptional: false;
210
210
  };
211
211
  status: {
212
- type: _lssm_lib_schema324.FieldType<string, string>;
212
+ type: _lssm_lib_schema248.FieldType<string, string>;
213
213
  isOptional: false;
214
214
  };
215
215
  priority: {
216
- type: _lssm_lib_schema324.FieldType<string, string>;
216
+ type: _lssm_lib_schema248.FieldType<string, string>;
217
217
  isOptional: false;
218
218
  };
219
219
  assigneeId: {
220
- type: _lssm_lib_schema324.FieldType<string, string>;
220
+ type: _lssm_lib_schema248.FieldType<string, string>;
221
221
  isOptional: true;
222
222
  };
223
223
  dueDate: {
224
- type: _lssm_lib_schema324.FieldType<Date, string>;
224
+ type: _lssm_lib_schema248.FieldType<Date, string>;
225
225
  isOptional: true;
226
226
  };
227
227
  }>, undefined>;
@@ -1 +1 @@
1
- {"version":3,"file":"task.contracts.d.ts","names":[],"sources":["../../src/task/task.contracts.ts"],"sourcesContent":[],"mappings":";;;;cAYa,yCAAmB;;UAU9B,mBAAA,CAAA;;EAVW,CAAA;EAUX,MAAA,EAAA;;;;;uCAV8B,CAAA,MAAA,EAAA,MAAA,CAAA;IAAA,UAAA,EAAA,IAAA;EAYnB,CAAA;EAOX,KAAA,EAAA;;;;;;;;;cAPW,0CAAoB;;IAAA,IAAA,iCAAA,CAAA;MASpB,EAAA,EAAA;QAgBX,IAAA,EAlBA,mBAAA,CAAA,SAkBA,CAAA,MAAA,EAAA,MAAA,CAAA;;;;;kBAhB6B,EAAA,KAAA;MAAA,CAAA;;;;;;;;;;;kBAAA,EAAA,KAAA;MAAA,CAAA;MAuBlB,UAAA,EAAA;QAgBX,IAAA,+BAAA,CAAA,MAAA,EAAA,MAAA,CAAA;;;;;;;;IAhB6B,UAAA,EAAA,KAAA;;;;;;;;cAvBlB,0CAAkB,kCAAA;;IAuBA,IAAA,EAP7B,mBAAA,CAAA,SAO6B,CAAA,MAAA,EAAA,MAAA,CAAA;IAqBlB,UAAA,EAAA,IAAA;EAgBX,CAAA;;uCAhBmC,CAAA,MAAA,EAAA,MAAA,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;;;;cAuBlB,yCAAkB,kCAAA;;UAgB7B,mBAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;UAhB6B,mBAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAqBlB,+CAAwB,kCAAA;;UAgBnC,mBAAA,CAAA;;;;;;;;;UAhBmC,mBAAA,CAAA"}
@@ -1,5 +1,5 @@
1
1
  import { E5, K5 } from "../libs/schema/dist/index.js";
2
- import { defineCommand, defineQuery } from "../libs/contracts/dist/operation.js";
2
+ import { defineCommand, defineQuery } from "../libs/contracts/dist/operations/operation.js";
3
3
  import "../libs/contracts/dist/index.js";
4
4
  import { CreateTaskInputModel, TaskModel, UpdateTaskStatusInputModel } from "./task.schema.js";
5
5
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lssm/example.team-hub",
3
- "version": "0.0.0-canary-20251221132705",
3
+ "version": "0.0.0-canary-20251221153314",
4
4
  "description": "Team Hub example with spaces, tasks, rituals, and announcements",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",
@@ -18,18 +18,18 @@
18
18
  "lint:check": "eslint src"
19
19
  },
20
20
  "dependencies": {
21
- "@lssm/lib.schema": "0.0.0-canary-20251221132705",
22
- "@lssm/lib.contracts": "0.0.0-canary-20251221132705",
23
- "@lssm/lib.bus": "0.0.0-canary-20251221132705",
24
- "@lssm/lib.identity-rbac": "0.0.0-canary-20251221132705",
25
- "@lssm/lib.jobs": "0.0.0-canary-20251221132705",
26
- "@lssm/module.audit-trail": "0.0.0-canary-20251221132705",
27
- "@lssm/module.notifications": "0.0.0-canary-20251221132705",
21
+ "@lssm/lib.schema": "0.0.0-canary-20251221153314",
22
+ "@lssm/lib.contracts": "0.0.0-canary-20251221153314",
23
+ "@lssm/lib.bus": "0.0.0-canary-20251221153314",
24
+ "@lssm/lib.identity-rbac": "0.0.0-canary-20251221153314",
25
+ "@lssm/lib.jobs": "0.0.0-canary-20251221153314",
26
+ "@lssm/module.audit-trail": "0.0.0-canary-20251221153314",
27
+ "@lssm/module.notifications": "0.0.0-canary-20251221153314",
28
28
  "zod": "^4.1.13"
29
29
  },
30
30
  "devDependencies": {
31
- "@lssm/tool.typescript": "0.0.0-canary-20251221132705",
32
- "@lssm/tool.tsdown": "0.0.0-canary-20251221132705",
31
+ "@lssm/tool.typescript": "0.0.0-canary-20251221153314",
32
+ "@lssm/tool.tsdown": "0.0.0-canary-20251221153314",
33
33
  "typescript": "^5.9.3"
34
34
  },
35
35
  "exports": {
@@ -1 +0,0 @@
1
- import "./registry-utils.js";
@@ -1 +0,0 @@
1
- import "./registry-utils.js";
@@ -1 +0,0 @@
1
- {"version":3,"file":"contracts.js","names":[],"sources":["../../../../../../../libs/contracts/dist/integrations/contracts.js"],"sourcesContent":["import { E5, x8 } from \"../schema/dist/index.js\";\nimport { defineCommand, defineQuery } from \"../operation.js\";\n\n//#region src/integrations/contracts.ts\nconst IntegrationConnectionRecord = new x8({\n\tname: \"IntegrationConnectionRecord\",\n\tfields: {\n\t\tid: {\n\t\t\ttype: E5.ID(),\n\t\t\tisOptional: false\n\t\t},\n\t\ttenantId: {\n\t\t\ttype: E5.ID(),\n\t\t\tisOptional: false\n\t\t},\n\t\tintegrationKey: {\n\t\t\ttype: E5.NonEmptyString(),\n\t\t\tisOptional: false\n\t\t},\n\t\tintegrationVersion: {\n\t\t\ttype: E5.Int_unsecure(),\n\t\t\tisOptional: false\n\t\t},\n\t\tlabel: {\n\t\t\ttype: E5.String_unsecure(),\n\t\t\tisOptional: false\n\t\t},\n\t\townershipMode: {\n\t\t\ttype: E5.String_unsecure(),\n\t\t\tisOptional: false\n\t\t},\n\t\texternalAccountId: {\n\t\t\ttype: E5.String_unsecure(),\n\t\t\tisOptional: true\n\t\t},\n\t\tsecretProvider: {\n\t\t\ttype: E5.String_unsecure(),\n\t\t\tisOptional: false\n\t\t},\n\t\tsecretRef: {\n\t\t\ttype: E5.String_unsecure(),\n\t\t\tisOptional: false\n\t\t},\n\t\tstatus: {\n\t\t\ttype: E5.String_unsecure(),\n\t\t\tisOptional: false\n\t\t},\n\t\tenvironment: {\n\t\t\ttype: E5.String_unsecure(),\n\t\t\tisOptional: true\n\t\t},\n\t\thealthStatus: {\n\t\t\ttype: E5.String_unsecure(),\n\t\t\tisOptional: true\n\t\t},\n\t\thealthCheckedAt: {\n\t\t\ttype: E5.DateTime(),\n\t\t\tisOptional: true\n\t\t},\n\t\thealthLatencyMs: {\n\t\t\ttype: E5.Float_unsecure(),\n\t\t\tisOptional: true\n\t\t},\n\t\thealthErrorCode: {\n\t\t\ttype: E5.String_unsecure(),\n\t\t\tisOptional: true\n\t\t},\n\t\thealthErrorMessage: {\n\t\t\ttype: E5.String_unsecure(),\n\t\t\tisOptional: true\n\t\t},\n\t\tusageRequestCount: {\n\t\t\ttype: E5.Int_unsecure(),\n\t\t\tisOptional: true\n\t\t},\n\t\tusageSuccessCount: {\n\t\t\ttype: E5.Int_unsecure(),\n\t\t\tisOptional: true\n\t\t},\n\t\tusageErrorCount: {\n\t\t\ttype: E5.Int_unsecure(),\n\t\t\tisOptional: true\n\t\t},\n\t\tusageLastUsedAt: {\n\t\t\ttype: E5.DateTime(),\n\t\t\tisOptional: true\n\t\t},\n\t\tusageLastErrorAt: {\n\t\t\ttype: E5.DateTime(),\n\t\t\tisOptional: true\n\t\t},\n\t\tusageLastErrorCode: {\n\t\t\ttype: E5.String_unsecure(),\n\t\t\tisOptional: true\n\t\t},\n\t\tcreatedAt: {\n\t\t\ttype: E5.DateTime(),\n\t\t\tisOptional: true\n\t\t},\n\t\tupdatedAt: {\n\t\t\ttype: E5.DateTime(),\n\t\t\tisOptional: true\n\t\t}\n\t}\n});\nconst CreateIntegrationConnectionInput = new x8({\n\tname: \"CreateIntegrationConnectionInput\",\n\tfields: {\n\t\ttenantId: {\n\t\t\ttype: E5.ID(),\n\t\t\tisOptional: false\n\t\t},\n\t\tintegrationKey: {\n\t\t\ttype: E5.NonEmptyString(),\n\t\t\tisOptional: false\n\t\t},\n\t\tintegrationVersion: {\n\t\t\ttype: E5.Int_unsecure(),\n\t\t\tisOptional: false\n\t\t},\n\t\tlabel: {\n\t\t\ttype: E5.String_unsecure(),\n\t\t\tisOptional: false\n\t\t},\n\t\townershipMode: {\n\t\t\ttype: E5.String_unsecure(),\n\t\t\tisOptional: false\n\t\t},\n\t\texternalAccountId: {\n\t\t\ttype: E5.String_unsecure(),\n\t\t\tisOptional: true\n\t\t},\n\t\tsecretProvider: {\n\t\t\ttype: E5.String_unsecure(),\n\t\t\tisOptional: false\n\t\t},\n\t\tsecretRef: {\n\t\t\ttype: E5.String_unsecure(),\n\t\t\tisOptional: false\n\t\t},\n\t\tenvironment: {\n\t\t\ttype: E5.String_unsecure(),\n\t\t\tisOptional: true\n\t\t},\n\t\tconfig: {\n\t\t\ttype: E5.JSONObject(),\n\t\t\tisOptional: false\n\t\t}\n\t}\n});\nconst UpdateIntegrationConnectionInput = new x8({\n\tname: \"UpdateIntegrationConnectionInput\",\n\tfields: {\n\t\tconnectionId: {\n\t\t\ttype: E5.ID(),\n\t\t\tisOptional: false\n\t\t},\n\t\tlabel: {\n\t\t\ttype: E5.String_unsecure(),\n\t\t\tisOptional: true\n\t\t},\n\t\tstatus: {\n\t\t\ttype: E5.String_unsecure(),\n\t\t\tisOptional: true\n\t\t},\n\t\townershipMode: {\n\t\t\ttype: E5.String_unsecure(),\n\t\t\tisOptional: true\n\t\t},\n\t\texternalAccountId: {\n\t\t\ttype: E5.String_unsecure(),\n\t\t\tisOptional: true\n\t\t},\n\t\tsecretProvider: {\n\t\t\ttype: E5.String_unsecure(),\n\t\t\tisOptional: true\n\t\t},\n\t\tsecretRef: {\n\t\t\ttype: E5.String_unsecure(),\n\t\t\tisOptional: true\n\t\t},\n\t\tconfig: {\n\t\t\ttype: E5.JSONObject(),\n\t\t\tisOptional: true\n\t\t}\n\t}\n});\nconst DeleteIntegrationConnectionInput = new x8({\n\tname: \"DeleteIntegrationConnectionInput\",\n\tfields: { connectionId: {\n\t\ttype: E5.ID(),\n\t\tisOptional: false\n\t} }\n});\nconst ListIntegrationConnectionsInput = new x8({\n\tname: \"ListIntegrationConnectionsInput\",\n\tfields: {\n\t\ttenantId: {\n\t\t\ttype: E5.ID(),\n\t\t\tisOptional: false\n\t\t},\n\t\tcategory: {\n\t\t\ttype: E5.String_unsecure(),\n\t\t\tisOptional: true\n\t\t},\n\t\tstatus: {\n\t\t\ttype: E5.String_unsecure(),\n\t\t\tisOptional: true\n\t\t}\n\t}\n});\nconst ListIntegrationConnectionsOutput = new x8({\n\tname: \"ListIntegrationConnectionsOutput\",\n\tfields: { connections: {\n\t\ttype: IntegrationConnectionRecord,\n\t\tisOptional: false,\n\t\tisArray: true\n\t} }\n});\nconst TestIntegrationConnectionInput = new x8({\n\tname: \"TestIntegrationConnectionInput\",\n\tfields: { connectionId: {\n\t\ttype: E5.ID(),\n\t\tisOptional: false\n\t} }\n});\nconst TestIntegrationConnectionOutput = new x8({\n\tname: \"TestIntegrationConnectionOutput\",\n\tfields: {\n\t\tsuccess: {\n\t\t\ttype: E5.Boolean(),\n\t\t\tisOptional: false\n\t\t},\n\t\tstatus: {\n\t\t\ttype: E5.String_unsecure(),\n\t\t\tisOptional: true\n\t\t},\n\t\tlatencyMs: {\n\t\t\ttype: E5.Float_unsecure(),\n\t\t\tisOptional: true\n\t\t},\n\t\terror: {\n\t\t\ttype: E5.String_unsecure(),\n\t\t\tisOptional: true\n\t\t},\n\t\terrorCode: {\n\t\t\ttype: E5.String_unsecure(),\n\t\t\tisOptional: true\n\t\t}\n\t}\n});\nconst DeleteIntegrationConnectionOutput = new x8({\n\tname: \"DeleteIntegrationConnectionOutput\",\n\tfields: { success: {\n\t\ttype: E5.Boolean(),\n\t\tisOptional: false\n\t} }\n});\nconst CreateIntegrationConnection = defineCommand({\n\tmeta: {\n\t\tname: \"integrations.connection.create\",\n\t\tversion: 1,\n\t\tdescription: \"Create a new integration connection for a tenant.\",\n\t\tgoal: \"Provision a tenant-scoped connection to an external provider.\",\n\t\tcontext: \"Used by Ops or the App Studio to configure external integrations such as Stripe or Qdrant.\",\n\t\towners: [\"platform.integrations\"],\n\t\ttags: [\"integration\", \"connections\"],\n\t\tstability: \"experimental\"\n\t},\n\tio: {\n\t\tinput: CreateIntegrationConnectionInput,\n\t\toutput: IntegrationConnectionRecord\n\t},\n\tpolicy: {\n\t\tauth: \"admin\",\n\t\tpolicies: [{\n\t\t\tname: \"platform.integration.manage\",\n\t\t\tversion: 1\n\t\t}]\n\t}\n});\nconst UpdateIntegrationConnection = defineCommand({\n\tmeta: {\n\t\tname: \"integrations.connection.update\",\n\t\tversion: 1,\n\t\tdescription: \"Update metadata or credentials for an integration connection.\",\n\t\tgoal: \"Allow secure rotation of credentials and metadata adjustments.\",\n\t\tcontext: \"Supports rotating API keys, toggling status, or updating labels for tenant integrations.\",\n\t\towners: [\"platform.integrations\"],\n\t\ttags: [\"integration\", \"connections\"],\n\t\tstability: \"experimental\"\n\t},\n\tio: {\n\t\tinput: UpdateIntegrationConnectionInput,\n\t\toutput: IntegrationConnectionRecord\n\t},\n\tpolicy: {\n\t\tauth: \"admin\",\n\t\tpolicies: [{\n\t\t\tname: \"platform.integration.manage\",\n\t\t\tversion: 1\n\t\t}]\n\t}\n});\nconst DeleteIntegrationConnection = defineCommand({\n\tmeta: {\n\t\tname: \"integrations.connection.delete\",\n\t\tversion: 1,\n\t\tdescription: \"Delete an integration connection for a tenant.\",\n\t\tgoal: \"Safely remove credentials and disable connector usage.\",\n\t\tcontext: \"Ensures connections are de-provisioned when no longer needed or breached.\",\n\t\towners: [\"platform.integrations\"],\n\t\ttags: [\"integration\", \"connections\"],\n\t\tstability: \"experimental\"\n\t},\n\tio: {\n\t\tinput: DeleteIntegrationConnectionInput,\n\t\toutput: DeleteIntegrationConnectionOutput\n\t},\n\tpolicy: {\n\t\tauth: \"admin\",\n\t\tpolicies: [{\n\t\t\tname: \"platform.integration.manage\",\n\t\t\tversion: 1\n\t\t}]\n\t}\n});\nconst ListIntegrationConnections = defineQuery({\n\tmeta: {\n\t\tname: \"integrations.connection.list\",\n\t\tversion: 1,\n\t\tdescription: \"List integration connections for a tenant.\",\n\t\tgoal: \"Provide visibility into configured integrations and their status.\",\n\t\tcontext: \"Used by the App Studio and Ops flows to show bindings and health.\",\n\t\towners: [\"platform.integrations\"],\n\t\ttags: [\"integration\", \"connections\"],\n\t\tstability: \"experimental\"\n\t},\n\tio: {\n\t\tinput: ListIntegrationConnectionsInput,\n\t\toutput: ListIntegrationConnectionsOutput\n\t},\n\tpolicy: {\n\t\tauth: \"admin\",\n\t\tpolicies: [{\n\t\t\tname: \"platform.integration.read\",\n\t\t\tversion: 1\n\t\t}]\n\t}\n});\nconst TestIntegrationConnection = defineCommand({\n\tmeta: {\n\t\tname: \"integrations.connection.test\",\n\t\tversion: 1,\n\t\tdescription: \"Run a health check against a configured integration connection.\",\n\t\tgoal: \"Validate credentials and connectivity for external providers.\",\n\t\tcontext: \"Triggered manually or by background monitors to confirm provider availability.\",\n\t\towners: [\"platform.integrations\"],\n\t\ttags: [\"integration\", \"connections\"],\n\t\tstability: \"experimental\"\n\t},\n\tio: {\n\t\tinput: TestIntegrationConnectionInput,\n\t\toutput: TestIntegrationConnectionOutput\n\t},\n\tpolicy: {\n\t\tauth: \"admin\",\n\t\tpolicies: [{\n\t\t\tname: \"platform.integration.manage\",\n\t\t\tversion: 1\n\t\t}]\n\t}\n});\nconst integrationContracts = {\n\tCreateIntegrationConnection,\n\tUpdateIntegrationConnection,\n\tDeleteIntegrationConnection,\n\tListIntegrationConnections,\n\tTestIntegrationConnection\n};\nfunction registerIntegrationContracts(registry) {\n\treturn registry.register(CreateIntegrationConnection).register(UpdateIntegrationConnection).register(DeleteIntegrationConnection).register(ListIntegrationConnections).register(TestIntegrationConnection);\n}\n\n//#endregion\nexport { CreateIntegrationConnection, DeleteIntegrationConnection, ListIntegrationConnections, TestIntegrationConnection, UpdateIntegrationConnection, integrationContracts, registerIntegrationContracts };"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B;EACjC,MAAM,CAAC,eAAe,cAAc;EACpC,WAAW;EACX;CACD,IAAI;EACH,OAAO;EACP,QAAQ;EACR;CACD,QAAQ;EACP,MAAM;EACN,UAAU,CAAC;GACV,MAAM;GACN,SAAS;GACT,CAAC;EACF;CACD,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"contracts.js","names":[],"sources":["../../../../../../../libs/contracts/dist/knowledge/contracts.js"],"sourcesContent":["import { E5, x8 } from \"../schema/dist/index.js\";\nimport { defineCommand, defineQuery } from \"../operation.js\";\n\n//#region src/knowledge/contracts.ts\nconst KnowledgeSyncSchedule = new x8({\n\tname: \"KnowledgeSyncSchedule\",\n\tfields: {\n\t\tenabled: {\n\t\t\ttype: E5.Boolean(),\n\t\t\tisOptional: false\n\t\t},\n\t\tcron: {\n\t\t\ttype: E5.String_unsecure(),\n\t\t\tisOptional: true\n\t\t},\n\t\tintervalMs: {\n\t\t\ttype: E5.Int_unsecure(),\n\t\t\tisOptional: true\n\t\t}\n\t}\n});\nconst KnowledgeSourceRecord = new x8({\n\tname: \"KnowledgeSourceRecord\",\n\tfields: {\n\t\tid: {\n\t\t\ttype: E5.ID(),\n\t\t\tisOptional: false\n\t\t},\n\t\ttenantId: {\n\t\t\ttype: E5.ID(),\n\t\t\tisOptional: false\n\t\t},\n\t\tspaceKey: {\n\t\t\ttype: E5.NonEmptyString(),\n\t\t\tisOptional: false\n\t\t},\n\t\tspaceVersion: {\n\t\t\ttype: E5.Int_unsecure(),\n\t\t\tisOptional: false\n\t\t},\n\t\tlabel: {\n\t\t\ttype: E5.String_unsecure(),\n\t\t\tisOptional: false\n\t\t},\n\t\tsourceType: {\n\t\t\ttype: E5.String_unsecure(),\n\t\t\tisOptional: false\n\t\t},\n\t\tsyncSchedule: {\n\t\t\ttype: KnowledgeSyncSchedule,\n\t\t\tisOptional: true\n\t\t},\n\t\tlastSyncStatus: {\n\t\t\ttype: E5.String_unsecure(),\n\t\t\tisOptional: true\n\t\t},\n\t\tlastSyncAt: {\n\t\t\ttype: E5.DateTime(),\n\t\t\tisOptional: true\n\t\t},\n\t\titemsProcessed: {\n\t\t\ttype: E5.Int_unsecure(),\n\t\t\tisOptional: true\n\t\t},\n\t\tcreatedAt: {\n\t\t\ttype: E5.DateTime(),\n\t\t\tisOptional: true\n\t\t},\n\t\tupdatedAt: {\n\t\t\ttype: E5.DateTime(),\n\t\t\tisOptional: true\n\t\t}\n\t}\n});\nconst CreateKnowledgeSourceInput = new x8({\n\tname: \"CreateKnowledgeSourceInput\",\n\tfields: {\n\t\ttenantId: {\n\t\t\ttype: E5.ID(),\n\t\t\tisOptional: false\n\t\t},\n\t\tspaceKey: {\n\t\t\ttype: E5.NonEmptyString(),\n\t\t\tisOptional: false\n\t\t},\n\t\tspaceVersion: {\n\t\t\ttype: E5.Int_unsecure(),\n\t\t\tisOptional: false\n\t\t},\n\t\tlabel: {\n\t\t\ttype: E5.String_unsecure(),\n\t\t\tisOptional: false\n\t\t},\n\t\tsourceType: {\n\t\t\ttype: E5.NonEmptyString(),\n\t\t\tisOptional: false\n\t\t},\n\t\tconfig: {\n\t\t\ttype: E5.JSONObject(),\n\t\t\tisOptional: false\n\t\t},\n\t\tsyncSchedule: {\n\t\t\ttype: KnowledgeSyncSchedule,\n\t\t\tisOptional: true\n\t\t}\n\t}\n});\nconst UpdateKnowledgeSourceInput = new x8({\n\tname: \"UpdateKnowledgeSourceInput\",\n\tfields: {\n\t\tsourceId: {\n\t\t\ttype: E5.ID(),\n\t\t\tisOptional: false\n\t\t},\n\t\tlabel: {\n\t\t\ttype: E5.String_unsecure(),\n\t\t\tisOptional: true\n\t\t},\n\t\tconfig: {\n\t\t\ttype: E5.JSONObject(),\n\t\t\tisOptional: true\n\t\t},\n\t\tsyncSchedule: {\n\t\t\ttype: KnowledgeSyncSchedule,\n\t\t\tisOptional: true\n\t\t}\n\t}\n});\nconst DeleteKnowledgeSourceInput = new x8({\n\tname: \"DeleteKnowledgeSourceInput\",\n\tfields: { sourceId: {\n\t\ttype: E5.ID(),\n\t\tisOptional: false\n\t} }\n});\nconst DeleteKnowledgeSourceOutput = new x8({\n\tname: \"DeleteKnowledgeSourceOutput\",\n\tfields: { success: {\n\t\ttype: E5.Boolean(),\n\t\tisOptional: false\n\t} }\n});\nconst ListKnowledgeSourcesInput = new x8({\n\tname: \"ListKnowledgeSourcesInput\",\n\tfields: {\n\t\ttenantId: {\n\t\t\ttype: E5.ID(),\n\t\t\tisOptional: false\n\t\t},\n\t\tspaceKey: {\n\t\t\ttype: E5.NonEmptyString(),\n\t\t\tisOptional: true\n\t\t}\n\t}\n});\nconst ListKnowledgeSourcesOutput = new x8({\n\tname: \"ListKnowledgeSourcesOutput\",\n\tfields: { sources: {\n\t\ttype: KnowledgeSourceRecord,\n\t\tisOptional: false,\n\t\tisArray: true\n\t} }\n});\nconst TriggerKnowledgeSyncInput = new x8({\n\tname: \"TriggerKnowledgeSyncInput\",\n\tfields: { sourceId: {\n\t\ttype: E5.ID(),\n\t\tisOptional: false\n\t} }\n});\nconst TriggerKnowledgeSyncOutput = new x8({\n\tname: \"TriggerKnowledgeSyncOutput\",\n\tfields: {\n\t\tsuccess: {\n\t\t\ttype: E5.Boolean(),\n\t\t\tisOptional: false\n\t\t},\n\t\titemsProcessed: {\n\t\t\ttype: E5.Int_unsecure(),\n\t\t\tisOptional: true\n\t\t},\n\t\terror: {\n\t\t\ttype: E5.String_unsecure(),\n\t\t\tisOptional: true\n\t\t}\n\t}\n});\nconst CreateKnowledgeSource = defineCommand({\n\tmeta: {\n\t\tname: \"knowledge.source.create\",\n\t\tversion: 1,\n\t\tdescription: \"Create a knowledge source binding for a tenant.\",\n\t\tgoal: \"Onboard a new knowledge ingestion source such as Notion or uploads.\",\n\t\tcontext: \"Used by Ops and App Studio to configure knowledge ingestion per tenant and space.\",\n\t\towners: [\"platform.knowledge\"],\n\t\ttags: [\"knowledge\", \"sources\"],\n\t\tstability: \"experimental\"\n\t},\n\tio: {\n\t\tinput: CreateKnowledgeSourceInput,\n\t\toutput: KnowledgeSourceRecord\n\t},\n\tpolicy: {\n\t\tauth: \"admin\",\n\t\tpolicies: [{\n\t\t\tname: \"platform.knowledge.manage\",\n\t\t\tversion: 1\n\t\t}]\n\t}\n});\nconst UpdateKnowledgeSource = defineCommand({\n\tmeta: {\n\t\tname: \"knowledge.source.update\",\n\t\tversion: 1,\n\t\tdescription: \"Update metadata or configuration for a knowledge source.\",\n\t\tgoal: \"Allow rotation of credentials, sync schedules, and labels.\",\n\t\tcontext: \"Supports editing how a tenant ingests knowledge (e.g., toggling sync cadence).\",\n\t\towners: [\"platform.knowledge\"],\n\t\ttags: [\"knowledge\", \"sources\"],\n\t\tstability: \"experimental\"\n\t},\n\tio: {\n\t\tinput: UpdateKnowledgeSourceInput,\n\t\toutput: KnowledgeSourceRecord\n\t},\n\tpolicy: {\n\t\tauth: \"admin\",\n\t\tpolicies: [{\n\t\t\tname: \"platform.knowledge.manage\",\n\t\t\tversion: 1\n\t\t}]\n\t}\n});\nconst DeleteKnowledgeSource = defineCommand({\n\tmeta: {\n\t\tname: \"knowledge.source.delete\",\n\t\tversion: 1,\n\t\tdescription: \"Delete a knowledge source binding for a tenant.\",\n\t\tgoal: \"Remove obsolete or compromised knowledge ingestion paths.\",\n\t\tcontext: \"Ensures ephemeral or external sources can be removed cleanly without leaving residual bindings.\",\n\t\towners: [\"platform.knowledge\"],\n\t\ttags: [\"knowledge\", \"sources\"],\n\t\tstability: \"experimental\"\n\t},\n\tio: {\n\t\tinput: DeleteKnowledgeSourceInput,\n\t\toutput: DeleteKnowledgeSourceOutput\n\t},\n\tpolicy: {\n\t\tauth: \"admin\",\n\t\tpolicies: [{\n\t\t\tname: \"platform.knowledge.manage\",\n\t\t\tversion: 1\n\t\t}]\n\t}\n});\nconst ListKnowledgeSources = defineQuery({\n\tmeta: {\n\t\tname: \"knowledge.source.list\",\n\t\tversion: 1,\n\t\tdescription: \"List knowledge sources configured for a tenant.\",\n\t\tgoal: \"Provide visibility into knowledge ingest configuration and schedules.\",\n\t\tcontext: \"Used by App Studio and Ops flows to surface knowledge sources and their health.\",\n\t\towners: [\"platform.knowledge\"],\n\t\ttags: [\"knowledge\", \"sources\"],\n\t\tstability: \"experimental\"\n\t},\n\tio: {\n\t\tinput: ListKnowledgeSourcesInput,\n\t\toutput: ListKnowledgeSourcesOutput\n\t},\n\tpolicy: {\n\t\tauth: \"admin\",\n\t\tpolicies: [{\n\t\t\tname: \"platform.knowledge.read\",\n\t\t\tversion: 1\n\t\t}]\n\t}\n});\nconst TriggerKnowledgeSourceSync = defineCommand({\n\tmeta: {\n\t\tname: \"knowledge.source.triggerSync\",\n\t\tversion: 1,\n\t\tdescription: \"Trigger an immediate sync for a knowledge source.\",\n\t\tgoal: \"Support manual or automated sync retries for knowledge ingestion.\",\n\t\tcontext: \"Invoked by Ops tooling or monitors when knowledge content must be refreshed or reprocessed.\",\n\t\towners: [\"platform.knowledge\"],\n\t\ttags: [\"knowledge\", \"sources\"],\n\t\tstability: \"experimental\"\n\t},\n\tio: {\n\t\tinput: TriggerKnowledgeSyncInput,\n\t\toutput: TriggerKnowledgeSyncOutput\n\t},\n\tpolicy: {\n\t\tauth: \"admin\",\n\t\tpolicies: [{\n\t\t\tname: \"platform.knowledge.manage\",\n\t\t\tversion: 1\n\t\t}]\n\t}\n});\nconst knowledgeContracts = {\n\tCreateKnowledgeSource,\n\tUpdateKnowledgeSource,\n\tDeleteKnowledgeSource,\n\tListKnowledgeSources,\n\tTriggerKnowledgeSourceSync\n};\nfunction registerKnowledgeContracts(registry) {\n\treturn registry.register(CreateKnowledgeSource).register(UpdateKnowledgeSource).register(DeleteKnowledgeSource).register(ListKnowledgeSources).register(TriggerKnowledgeSourceSync);\n}\n\n//#endregion\nexport { CreateKnowledgeSource, DeleteKnowledgeSource, ListKnowledgeSources, TriggerKnowledgeSourceSync, UpdateKnowledgeSource, knowledgeContracts, registerKnowledgeContracts };"],"mappings":";;;;AAIA,MAAM,wBAAwB,IAAI,GAAG;CACp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c;CAChD,MAAM;EACL,MAAM;EACN,SAAS;EACT,aAAa;EACb,MAAM;EACN,SAAS;EACT,QAAQ,CAAC,qBAAqB;EAC9B,MAAM,CAAC,aAAa,UAAU;EAC9B,WAAW;EACX;CACD,IAAI;EACH,OAAO;EACP,QAAQ;EACR;CACD,QAAQ;EACP,MAAM;EACN,UAAU,CAAC;GACV,MAAM;GACN,SAAS;GACT,CAAC;EACF;CACD,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"operation.js","names":[],"sources":["../../../../../../libs/contracts/dist/operation.js"],"sourcesContent":["//#region src/operation.ts\nconst isEmitDeclRef = (e) => \"ref\" in e;\n/**\n* Helper to define a Command (write operation).\n* Sets `kind: 'command'` and defaults `idempotent: false`.\n*/\nconst defineCommand = (spec) => ({\n\t...spec,\n\tmeta: {\n\t\t...spec.meta,\n\t\tkind: \"command\"\n\t},\n\tpolicy: {\n\t\t...spec.policy,\n\t\tidempotent: spec.policy?.[\"policy\"]?.idempotent ?? false\n\t}\n});\n/**\n* Helper to define a Query (read-only operation).\n* Sets `kind: 'query'` and forces `idempotent: true`.\n*/\nconst defineQuery = (spec) => ({\n\t...spec,\n\tmeta: {\n\t\t...spec.meta,\n\t\tkind: \"query\"\n\t},\n\tpolicy: {\n\t\t...spec.policy,\n\t\tidempotent: true\n\t}\n});\n\n//#endregion\nexport { defineCommand, defineQuery, isEmitDeclRef };"],"mappings":";;;;;AAMA,MAAM,iBAAiB,UAAU;CAChC,GAAG;CACH,MAAM;EACL,GAAG,KAAK;EACR,MAAM;EACN;CACD,QAAQ;EACP,GAAG,KAAK;EACR,YAAY,KAAK,SAAS,WAAW,cAAc;EACnD;CACD;;;;;AAKD,MAAM,eAAe,UAAU;CAC9B,GAAG;CACH,MAAM;EACL,GAAG,KAAK;EACR,MAAM;EACN;CACD,QAAQ;EACP,GAAG,KAAK;EACR,YAAY;EACZ;CACD"}
@@ -1,2 +0,0 @@
1
- import "./registry-utils.js";
2
- import z from "zod";
@@ -1 +0,0 @@
1
- {"version":3,"file":"presentations.v2.js","names":[],"sources":["../../../../../../libs/contracts/dist/presentations.v2.js"],"sourcesContent":["import { schemaToMarkdown } from \"./schema-to-markdown.js\";\nimport React from \"react\";\nimport TurndownService from \"turndown\";\n\n//#region src/presentations.v2.ts\n/**\n* Pluggable transform engine that renders descriptors to various targets\n* and runs validators (e.g., basic metadata checks, PII redaction policies).\n*/\nconst turndown = new TurndownService();\nfunction renderTextNode(node) {\n\tconst text = node.text ?? \"\";\n\tif (!node.marks || node.marks.length === 0) return text;\n\treturn node.marks.reduce((acc, mark) => {\n\t\tswitch (mark.type) {\n\t\t\tcase \"bold\": return `**${acc}**`;\n\t\t\tcase \"italic\": return `*${acc}*`;\n\t\t\tcase \"underline\": return `__${acc}__`;\n\t\t\tcase \"strike\": return `~~${acc}~~`;\n\t\t\tcase \"code\": return `\\`${acc}\\``;\n\t\t\tcase \"link\": {\n\t\t\t\tconst href = mark.attrs?.href ?? \"\";\n\t\t\t\treturn href ? `[${acc}](${href})` : acc;\n\t\t\t}\n\t\t\tdefault: return acc;\n\t\t}\n\t}, text);\n}\nfunction renderInline(nodes) {\n\tif (!nodes?.length) return \"\";\n\treturn nodes.map((child) => renderNode(child)).join(\"\");\n}\nfunction renderList(nodes, ordered = false) {\n\tif (!nodes?.length) return \"\";\n\tlet counter = 1;\n\treturn nodes.map((item) => {\n\t\tconst body = renderInline(item.content ?? []);\n\t\tif (!body) return \"\";\n\t\treturn `${ordered ? `${counter++}. ` : \"- \"}${body}`;\n\t}).filter(Boolean).join(\"\\n\");\n}\nfunction renderNode(node) {\n\tswitch (node.type) {\n\t\tcase \"doc\": return renderInline(node.content);\n\t\tcase \"paragraph\": {\n\t\t\tconst text = renderInline(node.content);\n\t\t\treturn text.trim().length ? text : \"\";\n\t\t}\n\t\tcase \"heading\": {\n\t\t\tconst levelAttr = node.attrs?.level;\n\t\t\tconst levelVal = typeof levelAttr === \"number\" ? levelAttr : 1;\n\t\t\tconst level = Math.min(Math.max(levelVal, 1), 6);\n\t\t\treturn `${\"#\".repeat(level)} ${renderInline(node.content)}`.trim();\n\t\t}\n\t\tcase \"bullet_list\": return renderList(node.content, false);\n\t\tcase \"ordered_list\": return renderList(node.content, true);\n\t\tcase \"list_item\": return renderInline(node.content);\n\t\tcase \"blockquote\": return renderInline(node.content).split(\"\\n\").map((line) => `> ${line}`).join(\"\\n\");\n\t\tcase \"code_block\": {\n\t\t\tconst body = renderInline(node.content);\n\t\t\treturn body ? `\\`\\`\\`\\n${body}\\n\\`\\`\\`` : \"\";\n\t\t}\n\t\tcase \"horizontal_rule\": return \"---\";\n\t\tcase \"hard_break\": return \"\\n\";\n\t\tcase \"text\": return renderTextNode(node);\n\t\tdefault:\n\t\t\tif (node.text) return renderTextNode(node);\n\t\t\treturn \"\";\n\t}\n}\nfunction blockNoteToMarkdown(docJson) {\n\tif (typeof docJson === \"string\") return docJson;\n\tif (docJson && typeof docJson === \"object\" && \"html\" in docJson) {\n\t\tconst html = String(docJson.html);\n\t\treturn turndown.turndown(html);\n\t}\n\tconst root = docJson;\n\tif (root?.type === \"doc\" || root?.content) return (root.content ?? []).map((n) => renderNode(n)).filter(Boolean).join(\"\\n\\n\").trim();\n\ttry {\n\t\treturn JSON.stringify(docJson, null, 2);\n\t} catch {\n\t\treturn String(docJson);\n\t}\n}\nvar TransformEngine = class {\n\trenderers = /* @__PURE__ */ new Map();\n\tvalidators = [];\n\tregister(renderer) {\n\t\tconst arr = this.renderers.get(renderer.target) ?? [];\n\t\tarr.push(renderer);\n\t\tthis.renderers.set(renderer.target, arr);\n\t\treturn this;\n\t}\n\t/**\n\t* Register a renderer that will be tried BEFORE existing renderers for the same target.\n\t* Useful for custom renderers that should take priority over default ones.\n\t*/\n\tprependRegister(renderer) {\n\t\tconst arr = this.renderers.get(renderer.target) ?? [];\n\t\tarr.unshift(renderer);\n\t\tthis.renderers.set(renderer.target, arr);\n\t\treturn this;\n\t}\n\taddValidator(v) {\n\t\tthis.validators.push(v);\n\t\treturn this;\n\t}\n\tasync render(target, desc, ctx) {\n\t\tif (!desc.targets.includes(target)) throw new Error(`Target ${target} not declared for ${desc.meta.name}.v${desc.meta.version}`);\n\t\tfor (const v of this.validators) await v.validate(desc, target, ctx);\n\t\tconst arr = this.renderers.get(target) ?? [];\n\t\tfor (const r of arr) try {\n\t\t\treturn await r.render(desc, ctx);\n\t\t} catch (_e) {}\n\t\tthrow new Error(`No renderer available for ${target}`);\n\t}\n};\n/** Create a TransformEngine instance with default markdown/json/xml renderers. */\nfunction createDefaultTransformEngine() {\n\tconst engine = new TransformEngine();\n\tconst applyPii = (desc, obj) => {\n\t\tconst clone = JSON.parse(JSON.stringify(obj));\n\t\tconst paths = desc.policy?.pii ?? [];\n\t\tconst setAtPath = (root, path) => {\n\t\t\tconst segs = path.replace(/^\\//, \"\").replace(/\\[(\\d+)\\]/g, \".$1\").split(\".\").filter(Boolean);\n\t\t\tlet cur = root;\n\t\t\tfor (let i = 0; i < segs.length - 1; i++) {\n\t\t\t\tconst k = segs[i];\n\t\t\t\tif (!k) continue;\n\t\t\t\tif (cur && typeof cur === \"object\" && k in cur) cur = cur[k];\n\t\t\t\telse return;\n\t\t\t}\n\t\t\tconst last = segs[segs.length - 1];\n\t\t\tif (cur && typeof cur === \"object\" && last && last in cur) cur[last] = \"[REDACTED]\";\n\t\t};\n\t\tfor (const p of paths) setAtPath(clone, p);\n\t\treturn clone;\n\t};\n\tengine.register({\n\t\ttarget: \"markdown\",\n\t\tasync render(desc, ctx) {\n\t\t\tlet data = ctx?.data;\n\t\t\tif (!data && ctx?.fetchData) data = await ctx.fetchData();\n\t\t\tif (desc.source.type === \"component\" && desc.source.props && data !== void 0) {\n\t\t\t\tconst isArray = Array.isArray(data);\n\t\t\t\tconst isSimpleObject = !isArray && typeof data === \"object\" && data !== null && !Object.values(data).some((v) => Array.isArray(v) || typeof v === \"object\" && v !== null);\n\t\t\t\tif (isArray || isSimpleObject) return {\n\t\t\t\t\tmimeType: \"text/markdown\",\n\t\t\t\t\tbody: schemaToMarkdown(desc.source.props, data, {\n\t\t\t\t\t\ttitle: desc.meta.description ?? desc.meta.name,\n\t\t\t\t\t\tdescription: `${desc.meta.name} v${desc.meta.version}`\n\t\t\t\t\t})\n\t\t\t\t};\n\t\t\t\tthrow new Error(`Complex data structure for ${desc.meta.name} - expecting custom renderer`);\n\t\t\t}\n\t\t\tif (desc.source.type === \"blocknotejs\") {\n\t\t\t\tconst redacted = applyPii(desc, { text: blockNoteToMarkdown(desc.source.docJson) });\n\t\t\t\treturn {\n\t\t\t\t\tmimeType: \"text/markdown\",\n\t\t\t\t\tbody: String(redacted.text)\n\t\t\t\t};\n\t\t\t}\n\t\t\tif (desc.source.type === \"component\" && data !== void 0) throw new Error(`No schema (source.props) available for ${desc.meta.name} - expecting custom renderer`);\n\t\t\tif (desc.source.type === \"component\") return {\n\t\t\t\tmimeType: \"text/markdown\",\n\t\t\t\tbody: `${`# ${desc.meta.name} v${desc.meta.version}`}${desc.meta.description ? `\\n\\n${desc.meta.description}` : \"\"}${desc.meta.tags && desc.meta.tags.length ? `\\n\\nTags: ${desc.meta.tags.join(\", \")}` : \"\"}${desc.meta.owners && desc.meta.owners.length ? `\\n\\nOwners: ${desc.meta.owners.join(\", \")}` : \"\"}${`\\n\\nComponent: \\`${desc.source.componentKey}\\``}${desc.policy?.pii?.length ? `\\n\\nRedacted paths: ${desc.policy.pii.map((p) => `\\`${p}\\``).join(\", \")}` : \"\"}`\n\t\t\t};\n\t\t\tthrow new Error(\"unsupported\");\n\t\t}\n\t});\n\tengine.register({\n\t\ttarget: \"application/json\",\n\t\tasync render(desc) {\n\t\t\tconst payload = applyPii(desc, {\n\t\t\t\tmeta: desc.meta,\n\t\t\t\tsource: desc.source\n\t\t\t});\n\t\t\treturn {\n\t\t\t\tmimeType: \"application/json\",\n\t\t\t\tbody: JSON.stringify(payload, null, 2)\n\t\t\t};\n\t\t}\n\t});\n\tengine.register({\n\t\ttarget: \"application/xml\",\n\t\tasync render(desc) {\n\t\t\tconst json = applyPii(desc, {\n\t\t\t\tmeta: desc.meta,\n\t\t\t\tsource: desc.source\n\t\t\t});\n\t\t\treturn {\n\t\t\t\tmimeType: \"application/xml\",\n\t\t\t\tbody: `<presentation name=\"${desc.meta.name}\" version=\"${desc.meta.version}\"><json>${encodeURIComponent(JSON.stringify(json))}</json></presentation>`\n\t\t\t};\n\t\t}\n\t});\n\treturn engine;\n}\n/** Register a default React target renderer that returns a serializable descriptor. */\nfunction registerDefaultReactRenderer(engine) {\n\tengine.register({\n\t\ttarget: \"react\",\n\t\tasync render(desc) {\n\t\t\tif (desc.source.type === \"component\") {\n\t\t\t\tconst props = desc.source.props ? desc.source.props.getZod().safeParse({}).success ? {} : void 0 : void 0;\n\t\t\t\treturn {\n\t\t\t\t\tkind: \"react_component\",\n\t\t\t\t\tcomponentKey: desc.source.componentKey,\n\t\t\t\t\tprops\n\t\t\t\t};\n\t\t\t}\n\t\t\treturn {\n\t\t\t\tkind: \"blocknotejs\",\n\t\t\t\tdocJson: desc.source.docJson,\n\t\t\t\tblockConfig: desc.source.blockConfig\n\t\t\t};\n\t\t}\n\t});\n\treturn engine;\n}\n/**\n* Add basic validators (e.g., meta.description presence) to the engine.\n*/\nfunction registerBasicValidation(engine) {\n\tengine.addValidator({ validate(desc) {\n\t\tif (!desc.meta.description || desc.meta.description.length < 3) throw new Error(`Presentation ${desc.meta.name}.v${desc.meta.version} missing meta.description`);\n\t} });\n\treturn engine;\n}\n/**\n* Register a React-to-markdown renderer that renders React components to HTML\n* and converts them to markdown using turndown.\n* This renderer takes priority over the default metadata-only renderer.\n*/\nfunction registerReactToMarkdownRenderer(engine, componentMap) {\n\tconst turndownService = new TurndownService({\n\t\theadingStyle: \"atx\",\n\t\tcodeBlockStyle: \"fenced\",\n\t\tbulletListMarker: \"-\"\n\t});\n\tturndownService.addRule(\"link\", {\n\t\tfilter: \"a\",\n\t\treplacement: (content, node) => {\n\t\t\tconst href = node.href;\n\t\t\tif (href && content) return `[${content}](${href})`;\n\t\t\treturn content || \"\";\n\t\t}\n\t});\n\tengine.prependRegister({\n\t\ttarget: \"markdown\",\n\t\tasync render(desc, _ctx) {\n\t\t\tif (desc.source.type !== \"component\") throw new Error(\"React-to-markdown renderer only handles component presentations\");\n\t\t\tconst { renderToStaticMarkup } = await import(\"react-dom/server\");\n\t\t\tconst Component = componentMap[desc.source.componentKey];\n\t\t\tif (!Component) throw new Error(`Component ${desc.source.componentKey} not found in componentMap`);\n\t\t\tlet html;\n\t\t\ttry {\n\t\t\t\thtml = renderToStaticMarkup(React.createElement(Component, desc.source.props ? {} : void 0));\n\t\t\t} catch (error) {\n\t\t\t\tthrow new Error(`Failed to render component ${desc.source.componentKey}: ${error instanceof Error ? error.message : \"Unknown error\"}`);\n\t\t\t}\n\t\t\tlet markdown;\n\t\t\ttry {\n\t\t\t\tmarkdown = turndownService.turndown(html);\n\t\t\t} catch (error) {\n\t\t\t\tthrow new Error(`Failed to convert HTML to markdown: ${error instanceof Error ? error.message : \"Unknown error\"}`);\n\t\t\t}\n\t\t\tif (desc.policy?.pii && desc.policy.pii.length > 0) return {\n\t\t\t\tmimeType: \"text/markdown\",\n\t\t\t\tbody: markdown.replace(/\\[REDACTED\\]/g, \"[REDACTED]\")\n\t\t\t};\n\t\t\treturn {\n\t\t\t\tmimeType: \"text/markdown\",\n\t\t\t\tbody: markdown\n\t\t\t};\n\t\t}\n\t});\n\treturn engine;\n}\n\n//#endregion\nexport { TransformEngine, createDefaultTransformEngine, registerBasicValidation, registerDefaultReactRenderer, registerReactToMarkdownRenderer };"],"mappings":";;;;;;;;AASA,MAAM,WAAW,IAAI,iBAAiB"}
@@ -1,3 +0,0 @@
1
- import "./registry-utils.js";
2
- import "./events.js";
3
- import { defaultDocRegistry, registerDocBlocks } from "./docs/registry.js";