@lssm/example.workflow-system 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 (70) hide show
  1. package/dist/approval/approval.contracts.js +2 -1
  2. package/dist/approval/approval.contracts.js.map +1 -1
  3. package/dist/approval/approval.event.d.ts +32 -32
  4. package/dist/approval/approval.event.d.ts.map +1 -1
  5. package/dist/approval/approval.schema.d.ts +24 -24
  6. package/dist/entities/approval.d.ts +36 -36
  7. package/dist/entities/index.d.ts +127 -127
  8. package/dist/entities/instance.d.ts +47 -47
  9. package/dist/entities/instance.d.ts.map +1 -1
  10. package/dist/entities/step.d.ts +32 -32
  11. package/dist/entities/step.d.ts.map +1 -1
  12. package/dist/entities/workflow.d.ts +23 -23
  13. package/dist/entities/workflow.d.ts.map +1 -1
  14. package/dist/instance/instance.contracts.d.ts +256 -256
  15. package/dist/instance/instance.contracts.d.ts.map +1 -1
  16. package/dist/instance/instance.contracts.js +2 -1
  17. package/dist/instance/instance.contracts.js.map +1 -1
  18. package/dist/instance/instance.enum.d.ts +2 -2
  19. package/dist/instance/instance.enum.d.ts.map +1 -1
  20. package/dist/instance/instance.event.d.ts +87 -87
  21. package/dist/instance/instance.schema.d.ts +54 -54
  22. package/dist/instance/instance.schema.d.ts.map +1 -1
  23. package/dist/libs/contracts/dist/capabilities/index.js +1 -0
  24. package/dist/libs/contracts/dist/client/react/feature-render.js +2 -1
  25. package/dist/libs/contracts/dist/client/react/form-render.js +1 -1
  26. package/dist/libs/contracts/dist/data-views/data-views.js +1 -0
  27. package/dist/libs/contracts/dist/docs/tech/llm/llm-integration.docblock.js +2 -2
  28. package/dist/libs/contracts/dist/docs/tech/llm/llm-integration.docblock.js.map +1 -1
  29. package/dist/libs/contracts/dist/forms/forms.js +1 -0
  30. package/dist/libs/contracts/dist/index.js +15 -12
  31. package/dist/libs/contracts/dist/index.js.map +1 -1
  32. package/dist/libs/contracts/dist/install.js +1 -1
  33. package/dist/libs/contracts/dist/integrations/openbanking/contracts/accounts.js +2 -1
  34. package/dist/libs/contracts/dist/integrations/openbanking/contracts/accounts.js.map +1 -1
  35. package/dist/libs/contracts/dist/integrations/openbanking/contracts/balances.js +2 -1
  36. package/dist/libs/contracts/dist/integrations/openbanking/contracts/balances.js.map +1 -1
  37. package/dist/libs/contracts/dist/integrations/openbanking/contracts/transactions.js +2 -1
  38. package/dist/libs/contracts/dist/integrations/openbanking/contracts/transactions.js.map +1 -1
  39. package/dist/libs/contracts/dist/integrations/{contracts.js → operations.js} +4 -3
  40. package/dist/libs/contracts/dist/integrations/operations.js.map +1 -0
  41. package/dist/libs/contracts/dist/knowledge/{contracts.js → operations.js} +4 -3
  42. package/dist/libs/contracts/dist/knowledge/operations.js.map +1 -0
  43. package/dist/libs/contracts/dist/llm/exporters.js +1 -0
  44. package/dist/libs/contracts/dist/llm/exporters.js.map +1 -1
  45. package/dist/libs/contracts/dist/onboarding-base.js +2 -1
  46. package/dist/libs/contracts/dist/onboarding-base.js.map +1 -1
  47. package/dist/libs/contracts/dist/operations/index.js +2 -0
  48. package/dist/libs/contracts/dist/{operation.js → operations/operation.js} +1 -1
  49. package/dist/libs/contracts/dist/operations/operation.js.map +1 -0
  50. package/dist/libs/contracts/dist/operations/registry.js +2 -0
  51. package/dist/libs/contracts/dist/presentations/index.js +2 -0
  52. package/dist/libs/contracts/dist/presentations/presentations.js +2 -0
  53. package/dist/libs/contracts/dist/{presentations.v2.js → presentations/transform-engine.js} +2 -2
  54. package/dist/libs/contracts/dist/presentations/transform-engine.js.map +1 -0
  55. package/dist/libs/contracts/dist/server/mcp/registerPresentations.js +3 -2
  56. package/dist/workflow/workflow.contracts.d.ts +246 -246
  57. package/dist/workflow/workflow.contracts.d.ts.map +1 -1
  58. package/dist/workflow/workflow.contracts.js +2 -1
  59. package/dist/workflow/workflow.contracts.js.map +1 -1
  60. package/dist/workflow/workflow.enum.d.ts +5 -5
  61. package/dist/workflow/workflow.event.d.ts +33 -33
  62. package/package.json +11 -11
  63. package/dist/libs/contracts/dist/data-views.js +0 -1
  64. package/dist/libs/contracts/dist/forms.js +0 -1
  65. package/dist/libs/contracts/dist/integrations/contracts.js.map +0 -1
  66. package/dist/libs/contracts/dist/knowledge/contracts.js.map +0 -1
  67. package/dist/libs/contracts/dist/operation.js.map +0 -1
  68. package/dist/libs/contracts/dist/presentations.js +0 -2
  69. package/dist/libs/contracts/dist/presentations.v2.js.map +0 -1
  70. package/dist/libs/contracts/dist/registry.js +0 -3
@@ -1,220 +1,220 @@
1
- import * as _lssm_lib_schema1127 from "@lssm/lib.schema";
1
+ import * as _lssm_lib_schema848 from "@lssm/lib.schema";
2
2
 
3
3
  //#region src/instance/instance.schema.d.ts
4
4
  /**
5
5
  * A running workflow instance.
6
6
  */
7
- declare const WorkflowInstanceModel: _lssm_lib_schema1127.SchemaModel<{
7
+ declare const WorkflowInstanceModel: _lssm_lib_schema848.SchemaModel<{
8
8
  id: {
9
- type: _lssm_lib_schema1127.FieldType<string, string>;
9
+ type: _lssm_lib_schema848.FieldType<string, string>;
10
10
  isOptional: false;
11
11
  };
12
12
  workflowDefinitionId: {
13
- type: _lssm_lib_schema1127.FieldType<string, string>;
13
+ type: _lssm_lib_schema848.FieldType<string, string>;
14
14
  isOptional: false;
15
15
  };
16
16
  referenceId: {
17
- type: _lssm_lib_schema1127.FieldType<string, string>;
17
+ type: _lssm_lib_schema848.FieldType<string, string>;
18
18
  isOptional: true;
19
19
  };
20
20
  referenceType: {
21
- type: _lssm_lib_schema1127.FieldType<string, string>;
21
+ type: _lssm_lib_schema848.FieldType<string, string>;
22
22
  isOptional: true;
23
23
  };
24
24
  status: {
25
- type: _lssm_lib_schema1127.EnumType<[string, string, string, string, string, string, string, string]>;
25
+ type: _lssm_lib_schema848.EnumType<[string, string, string, string, string, string, string, string]>;
26
26
  isOptional: false;
27
27
  };
28
28
  currentStepId: {
29
- type: _lssm_lib_schema1127.FieldType<string, string>;
29
+ type: _lssm_lib_schema848.FieldType<string, string>;
30
30
  isOptional: true;
31
31
  };
32
32
  contextData: {
33
- type: _lssm_lib_schema1127.FieldType<unknown, unknown>;
33
+ type: _lssm_lib_schema848.FieldType<unknown, unknown>;
34
34
  isOptional: true;
35
35
  };
36
36
  triggeredBy: {
37
- type: _lssm_lib_schema1127.FieldType<string, string>;
37
+ type: _lssm_lib_schema848.FieldType<string, string>;
38
38
  isOptional: false;
39
39
  };
40
40
  organizationId: {
41
- type: _lssm_lib_schema1127.FieldType<string, string>;
41
+ type: _lssm_lib_schema848.FieldType<string, string>;
42
42
  isOptional: false;
43
43
  };
44
44
  priority: {
45
- type: _lssm_lib_schema1127.FieldType<number, number>;
45
+ type: _lssm_lib_schema848.FieldType<number, number>;
46
46
  isOptional: false;
47
47
  };
48
48
  dueAt: {
49
- type: _lssm_lib_schema1127.FieldType<Date, string>;
49
+ type: _lssm_lib_schema848.FieldType<Date, string>;
50
50
  isOptional: true;
51
51
  };
52
52
  outcome: {
53
- type: _lssm_lib_schema1127.FieldType<string, string>;
53
+ type: _lssm_lib_schema848.FieldType<string, string>;
54
54
  isOptional: true;
55
55
  };
56
56
  resultData: {
57
- type: _lssm_lib_schema1127.FieldType<unknown, unknown>;
57
+ type: _lssm_lib_schema848.FieldType<unknown, unknown>;
58
58
  isOptional: true;
59
59
  };
60
60
  errorMessage: {
61
- type: _lssm_lib_schema1127.FieldType<string, string>;
61
+ type: _lssm_lib_schema848.FieldType<string, string>;
62
62
  isOptional: true;
63
63
  };
64
64
  createdAt: {
65
- type: _lssm_lib_schema1127.FieldType<Date, string>;
65
+ type: _lssm_lib_schema848.FieldType<Date, string>;
66
66
  isOptional: false;
67
67
  };
68
68
  startedAt: {
69
- type: _lssm_lib_schema1127.FieldType<Date, string>;
69
+ type: _lssm_lib_schema848.FieldType<Date, string>;
70
70
  isOptional: true;
71
71
  };
72
72
  completedAt: {
73
- type: _lssm_lib_schema1127.FieldType<Date, string>;
73
+ type: _lssm_lib_schema848.FieldType<Date, string>;
74
74
  isOptional: true;
75
75
  };
76
76
  }>;
77
77
  /**
78
78
  * Input for starting a workflow.
79
79
  */
80
- declare const StartWorkflowInputModel: _lssm_lib_schema1127.SchemaModel<{
80
+ declare const StartWorkflowInputModel: _lssm_lib_schema848.SchemaModel<{
81
81
  workflowKey: {
82
- type: _lssm_lib_schema1127.FieldType<string, string>;
82
+ type: _lssm_lib_schema848.FieldType<string, string>;
83
83
  isOptional: false;
84
84
  };
85
85
  contextData: {
86
- type: _lssm_lib_schema1127.FieldType<unknown, unknown>;
86
+ type: _lssm_lib_schema848.FieldType<unknown, unknown>;
87
87
  isOptional: true;
88
88
  };
89
89
  referenceId: {
90
- type: _lssm_lib_schema1127.FieldType<string, string>;
90
+ type: _lssm_lib_schema848.FieldType<string, string>;
91
91
  isOptional: true;
92
92
  };
93
93
  referenceType: {
94
- type: _lssm_lib_schema1127.FieldType<string, string>;
94
+ type: _lssm_lib_schema848.FieldType<string, string>;
95
95
  isOptional: true;
96
96
  };
97
97
  priority: {
98
- type: _lssm_lib_schema1127.FieldType<number, number>;
98
+ type: _lssm_lib_schema848.FieldType<number, number>;
99
99
  isOptional: true;
100
100
  };
101
101
  dueAt: {
102
- type: _lssm_lib_schema1127.FieldType<Date, string>;
102
+ type: _lssm_lib_schema848.FieldType<Date, string>;
103
103
  isOptional: true;
104
104
  };
105
105
  }>;
106
106
  /**
107
107
  * Input for transitioning a workflow.
108
108
  */
109
- declare const TransitionInputModel: _lssm_lib_schema1127.SchemaModel<{
109
+ declare const TransitionInputModel: _lssm_lib_schema848.SchemaModel<{
110
110
  instanceId: {
111
- type: _lssm_lib_schema1127.FieldType<string, string>;
111
+ type: _lssm_lib_schema848.FieldType<string, string>;
112
112
  isOptional: false;
113
113
  };
114
114
  action: {
115
- type: _lssm_lib_schema1127.FieldType<string, string>;
115
+ type: _lssm_lib_schema848.FieldType<string, string>;
116
116
  isOptional: false;
117
117
  };
118
118
  data: {
119
- type: _lssm_lib_schema1127.FieldType<unknown, unknown>;
119
+ type: _lssm_lib_schema848.FieldType<unknown, unknown>;
120
120
  isOptional: true;
121
121
  };
122
122
  comment: {
123
- type: _lssm_lib_schema1127.FieldType<string, string>;
123
+ type: _lssm_lib_schema848.FieldType<string, string>;
124
124
  isOptional: true;
125
125
  };
126
126
  }>;
127
127
  /**
128
128
  * Result of a workflow transition.
129
129
  */
130
- declare const TransitionResultModel: _lssm_lib_schema1127.SchemaModel<{
130
+ declare const TransitionResultModel: _lssm_lib_schema848.SchemaModel<{
131
131
  success: {
132
- type: _lssm_lib_schema1127.FieldType<boolean, boolean>;
132
+ type: _lssm_lib_schema848.FieldType<boolean, boolean>;
133
133
  isOptional: false;
134
134
  };
135
135
  instance: {
136
- type: _lssm_lib_schema1127.SchemaModel<{
136
+ type: _lssm_lib_schema848.SchemaModel<{
137
137
  id: {
138
- type: _lssm_lib_schema1127.FieldType<string, string>;
138
+ type: _lssm_lib_schema848.FieldType<string, string>;
139
139
  isOptional: false;
140
140
  };
141
141
  workflowDefinitionId: {
142
- type: _lssm_lib_schema1127.FieldType<string, string>;
142
+ type: _lssm_lib_schema848.FieldType<string, string>;
143
143
  isOptional: false;
144
144
  };
145
145
  referenceId: {
146
- type: _lssm_lib_schema1127.FieldType<string, string>;
146
+ type: _lssm_lib_schema848.FieldType<string, string>;
147
147
  isOptional: true;
148
148
  };
149
149
  referenceType: {
150
- type: _lssm_lib_schema1127.FieldType<string, string>;
150
+ type: _lssm_lib_schema848.FieldType<string, string>;
151
151
  isOptional: true;
152
152
  };
153
153
  status: {
154
- type: _lssm_lib_schema1127.EnumType<[string, string, string, string, string, string, string, string]>;
154
+ type: _lssm_lib_schema848.EnumType<[string, string, string, string, string, string, string, string]>;
155
155
  isOptional: false;
156
156
  };
157
157
  currentStepId: {
158
- type: _lssm_lib_schema1127.FieldType<string, string>;
158
+ type: _lssm_lib_schema848.FieldType<string, string>;
159
159
  isOptional: true;
160
160
  };
161
161
  contextData: {
162
- type: _lssm_lib_schema1127.FieldType<unknown, unknown>;
162
+ type: _lssm_lib_schema848.FieldType<unknown, unknown>;
163
163
  isOptional: true;
164
164
  };
165
165
  triggeredBy: {
166
- type: _lssm_lib_schema1127.FieldType<string, string>;
166
+ type: _lssm_lib_schema848.FieldType<string, string>;
167
167
  isOptional: false;
168
168
  };
169
169
  organizationId: {
170
- type: _lssm_lib_schema1127.FieldType<string, string>;
170
+ type: _lssm_lib_schema848.FieldType<string, string>;
171
171
  isOptional: false;
172
172
  };
173
173
  priority: {
174
- type: _lssm_lib_schema1127.FieldType<number, number>;
174
+ type: _lssm_lib_schema848.FieldType<number, number>;
175
175
  isOptional: false;
176
176
  };
177
177
  dueAt: {
178
- type: _lssm_lib_schema1127.FieldType<Date, string>;
178
+ type: _lssm_lib_schema848.FieldType<Date, string>;
179
179
  isOptional: true;
180
180
  };
181
181
  outcome: {
182
- type: _lssm_lib_schema1127.FieldType<string, string>;
182
+ type: _lssm_lib_schema848.FieldType<string, string>;
183
183
  isOptional: true;
184
184
  };
185
185
  resultData: {
186
- type: _lssm_lib_schema1127.FieldType<unknown, unknown>;
186
+ type: _lssm_lib_schema848.FieldType<unknown, unknown>;
187
187
  isOptional: true;
188
188
  };
189
189
  errorMessage: {
190
- type: _lssm_lib_schema1127.FieldType<string, string>;
190
+ type: _lssm_lib_schema848.FieldType<string, string>;
191
191
  isOptional: true;
192
192
  };
193
193
  createdAt: {
194
- type: _lssm_lib_schema1127.FieldType<Date, string>;
194
+ type: _lssm_lib_schema848.FieldType<Date, string>;
195
195
  isOptional: false;
196
196
  };
197
197
  startedAt: {
198
- type: _lssm_lib_schema1127.FieldType<Date, string>;
198
+ type: _lssm_lib_schema848.FieldType<Date, string>;
199
199
  isOptional: true;
200
200
  };
201
201
  completedAt: {
202
- type: _lssm_lib_schema1127.FieldType<Date, string>;
202
+ type: _lssm_lib_schema848.FieldType<Date, string>;
203
203
  isOptional: true;
204
204
  };
205
205
  }>;
206
206
  isOptional: false;
207
207
  };
208
208
  previousStepKey: {
209
- type: _lssm_lib_schema1127.FieldType<string, string>;
209
+ type: _lssm_lib_schema848.FieldType<string, string>;
210
210
  isOptional: true;
211
211
  };
212
212
  currentStepKey: {
213
- type: _lssm_lib_schema1127.FieldType<string, string>;
213
+ type: _lssm_lib_schema848.FieldType<string, string>;
214
214
  isOptional: true;
215
215
  };
216
216
  message: {
217
- type: _lssm_lib_schema1127.FieldType<string, string>;
217
+ type: _lssm_lib_schema848.FieldType<string, string>;
218
218
  isOptional: true;
219
219
  };
220
220
  }>;
@@ -1 +1 @@
1
- {"version":3,"file":"instance.schema.d.ts","names":[],"sources":["../../src/instance/instance.schema.ts"],"sourcesContent":[],"mappings":";;;;;;AAMa,cAAA,qBAqCX,uBArCgC,WAqChC,CAAA;EAAA,EAAA,EAAA;UAAA,oBAAA,CAAA;;;;;;;;;;;;;;;;;;;;wCArCgC,CAAA,MAAA,EAAA,MAAA,CAAA;IAAA,UAAA,EAAA,IAAA;EA0CrB,CAAA;EAcX,WAAA,EAAA;;;;;;;;EAdkC,cAAA,EAAA;IAmBvB,IAAA,gCASX,CAAA,MAAA,EAAA,MAAA,CAAA;IAAA,UAAA,EAAA,KAAA;;;;qBAT+B;EAAA,CAAA;EAcpB,KAAA,EAAA;IAgBX,IAAA,gCAAA,KAAA,EAAA,MAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;CAhBgC,CAAA;;;;cAjCrB,8CAAuB;;UAclC,oBAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;cAKW,2CAAoB;;UAS/B,oBAAA,CAAA;;;;;;;;;;;;;;;;;;;cAKW,4CAAqB;;UAgBhC,oBAAA,CAAA"}
1
+ {"version":3,"file":"instance.schema.d.ts","names":[],"sources":["../../src/instance/instance.schema.ts"],"sourcesContent":[],"mappings":";;;;;;AAMa,cAAA,qBAqCX,sBArCgC,WAqChC,CAAA;EAAA,EAAA,EAAA;UAAA,mBAAA,CAAA;;;;;;;;;;;;;;;;;;;;uCArCgC,CAAA,MAAA,EAAA,MAAA,CAAA;IAAA,UAAA,EAAA,IAAA;EA0CrB,CAAA;EAcX,WAAA,EAAA;;;;;;;;EAdkC,cAAA,EAAA;IAmBvB,IAAA,+BASX,CAAA,MAAA,EAAA,MAAA,CAAA;IAAA,UAAA,EAAA,KAAA;;;;qBAT+B;EAAA,CAAA;EAcpB,KAAA,EAAA;IAgBX,IAAA,+BAAA,KAAA,EAAA,MAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;CAhBgC,CAAA;;;;cAjCrB,6CAAuB;;UAclC,mBAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;cAKW,0CAAoB;;UAS/B,mBAAA,CAAA;;;;;;;;;;;;;;;;;;;cAKW,2CAAqB;;UAgBhC,mBAAA,CAAA"}
@@ -0,0 +1 @@
1
+ import "./openbanking.js";
@@ -1,2 +1,3 @@
1
- import "../../presentations.v2.js";
1
+ import "../../presentations/transform-engine.js";
2
+ import "../../presentations/index.js";
2
3
  import "react";
@@ -1,4 +1,4 @@
1
- import "../../forms.js";
1
+ import "../../forms/forms.js";
2
2
  import "react";
3
3
  import "react-hook-form";
4
4
  import "@hookform/resolvers/zod";
@@ -0,0 +1 @@
1
+ import "../registry-utils.js";
@@ -88,11 +88,11 @@ llm.verify { specPath: "path/to/my.spec.ts", implementationPath: "path/to/impl.t
88
88
  ### Programmatic Usage
89
89
 
90
90
  \`\`\`typescript
91
- import { specToFullMarkdown, specToAgentPrompt } from '@lssm/lib.contracts/llm';
91
+ import { operationSpecToFullMarkdown, operationSpecToAgentPrompt } from '@lssm/lib.contracts/llm';
92
92
  import { createAgentGuideService, createVerifyService } from '@lssm/bundle.contractspec-workspace';
93
93
 
94
94
  // Export
95
- const markdown = specToFullMarkdown(mySpec);
95
+ const markdown = operationSpecToFullMarkdown(mySpec);
96
96
 
97
97
  // Generate guide
98
98
  const guideService = createAgentGuideService({ defaultAgent: 'claude-code' });
@@ -1 +1 @@
1
- {"version":3,"file":"llm-integration.docblock.js","names":[],"sources":["../../../../../../../../../libs/contracts/dist/docs/tech/llm/llm-integration.docblock.js"],"sourcesContent":["import { registerDocBlocks } from \"../../registry.js\";\n\n//#region src/docs/tech/llm/llm-integration.docblock.ts\nconst tech_llm_integration_DocBlocks = [\n\t{\n\t\tid: \"docs.tech.llm.overview\",\n\t\ttitle: \"LLM Integration Overview\",\n\t\tsummary: \"Export specs to LLM-friendly formats, generate implementation guides, and verify implementations.\",\n\t\tkind: \"reference\",\n\t\tvisibility: \"public\",\n\t\troute: \"/docs/tech/llm/overview\",\n\t\ttags: [\n\t\t\t\"llm\",\n\t\t\t\"ai\",\n\t\t\t\"export\",\n\t\t\t\"guide\",\n\t\t\t\"verify\"\n\t\t],\n\t\tbody: `# LLM Integration\n\nContractSpec provides first-class LLM integration to bridge specifications and AI coding agents.\n\n## Core Features\n\n### 1. Multi-Format Export\n\nExport specs to markdown in formats optimized for LLM consumption:\n\n- **Context format**: Summary for understanding (goal, context, acceptance criteria)\n- **Full format**: Complete spec with all details (I/O schemas, policy, events)\n- **Prompt format**: Actionable prompt with implementation instructions\n\n### 2. Implementation Guidance\n\nGenerate agent-specific implementation plans:\n\n- **Claude Code**: Extended thinking mode with structured prompts\n- **Cursor CLI**: Background/composer mode with .mdc rules generation\n- **Generic MCP**: Standard format for any MCP-compatible agent\n\n### 3. Tiered Verification\n\nVerify implementations against specs:\n\n- **Tier 1 (Structure)**: Types, exports, imports validation\n- **Tier 2 (Behavior)**: Scenario coverage, error handling, events\n- **Tier 3 (AI Review)**: Semantic compliance analysis via LLM\n\n## Access Points\n\n| Surface | Commands/Tools |\n|---------|---------------|\n| CLI | \\`contractspec llm export\\`, \\`guide\\`, \\`verify\\`, \\`copy\\` |\n| MCP | \\`llm.export\\`, \\`llm.guide\\`, \\`llm.verify\\` tools |\n| VSCode | Export to LLM, Generate Guide, Verify, Copy commands |\n\n## Quick Start\n\n### CLI Usage\n\n\\`\\`\\`bash\n# Export spec as markdown\ncontractspec llm export path/to/my.spec.ts --format full\n\n# Generate implementation guide\ncontractspec llm guide path/to/my.spec.ts --agent claude-code\n\n# Verify implementation\ncontractspec llm verify path/to/my.spec.ts path/to/impl.ts --tier 2\n\n# Copy spec to clipboard\ncontractspec llm copy path/to/my.spec.ts --format context\n\\`\\`\\`\n\n### MCP Usage\n\n\\`\\`\\`\n# Export spec\nllm.export { specPath: \"path/to/my.spec.ts\", format: \"full\" }\n\n# Generate guide\nllm.guide { specPath: \"path/to/my.spec.ts\", agent: \"cursor-cli\" }\n\n# Verify implementation\nllm.verify { specPath: \"path/to/my.spec.ts\", implementationPath: \"path/to/impl.ts\", tier: \"2\" }\n\\`\\`\\`\n\n### Programmatic Usage\n\n\\`\\`\\`typescript\nimport { specToFullMarkdown, specToAgentPrompt } from '@lssm/lib.contracts/llm';\nimport { createAgentGuideService, createVerifyService } from '@lssm/bundle.contractspec-workspace';\n\n// Export\nconst markdown = specToFullMarkdown(mySpec);\n\n// Generate guide\nconst guideService = createAgentGuideService({ defaultAgent: 'claude-code' });\nconst guide = guideService.generateGuide(mySpec);\n\n// Verify\nconst verifyService = createVerifyService();\nconst result = await verifyService.verify(mySpec, implementationCode, {\n tiers: ['structure', 'behavior']\n});\n\\`\\`\\`\n`\n\t},\n\t{\n\t\tid: \"docs.tech.llm.export-formats\",\n\t\ttitle: \"LLM Export Formats\",\n\t\tsummary: \"Detailed explanation of the three export formats for LLM consumption.\",\n\t\tkind: \"reference\",\n\t\tvisibility: \"public\",\n\t\troute: \"/docs/tech/llm/export-formats\",\n\t\ttags: [\n\t\t\t\"llm\",\n\t\t\t\"export\",\n\t\t\t\"markdown\"\n\t\t],\n\t\tbody: `# LLM Export Formats\n\nContractSpec provides three export formats optimized for different LLM use cases.\n\n## Context Format\n\nBest for: Understanding what a spec does, providing background to LLMs.\n\nIncludes:\n- Spec name, version, type\n- Goal and context\n- Description\n- Acceptance scenarios\n\nExample:\n\n\\`\\`\\`markdown\n# users.createUser (v1)\n\n> Create a new user account with email verification.\n\n**Type:** command | **Stability:** stable\n\n## Goal\nCreate a new user in the system and trigger email verification.\n\n## Context\nPart of the user onboarding flow. Called after signup form submission.\n\n## Acceptance Criteria\n### Happy path\n**Given:** Valid email and password\n**When:** User submits registration\n**Then:** Account is created, verification email is sent\n\\`\\`\\`\n\n## Full Format\n\nBest for: Complete documentation, implementation reference.\n\nIncludes everything:\n- All metadata\n- JSON schemas for I/O\n- Error definitions\n- Policy (auth, rate limits, PII)\n- Events emitted\n- Examples\n- Transport configuration\n\n## Prompt Format\n\nBest for: Feeding directly to coding agents.\n\nIncludes:\n- Task header with clear instructions\n- Full spec context\n- Implementation requirements\n- Task-specific guidance (implement/test/refactor/review)\n- Expected output format\n\nThe prompt format adapts based on task type:\n- **implement**: Full implementation with tests\n- **test**: Test generation for existing code\n- **refactor**: Refactoring while maintaining behavior\n- **review**: Code review against spec\n`\n\t},\n\t{\n\t\tid: \"docs.tech.llm.agent-adapters\",\n\t\ttitle: \"Agent Adapters\",\n\t\tsummary: \"Adapters for different AI coding agents (Claude, Cursor, MCP).\",\n\t\tkind: \"reference\",\n\t\tvisibility: \"public\",\n\t\troute: \"/docs/tech/llm/agent-adapters\",\n\t\ttags: [\n\t\t\t\"llm\",\n\t\t\t\"agents\",\n\t\t\t\"claude\",\n\t\t\t\"cursor\",\n\t\t\t\"mcp\"\n\t\t],\n\t\tbody: `# Agent Adapters\n\nContractSpec provides specialized adapters for different AI coding agents.\n\n## Claude Code Adapter\n\nOptimized for Anthropic Claude's extended thinking and code generation.\n\nFeatures:\n- Structured markdown with clear sections\n- Checklists for steps and verification\n- Icons for file operations (📝 create, ✏️ modify)\n- System prompt for ContractSpec context\n\nUsage:\n\\`\\`\\`typescript\nconst guideService = createAgentGuideService({ defaultAgent: 'claude-code' });\nconst result = guideService.generateGuide(spec, { agent: 'claude-code' });\n// result.prompt.systemPrompt - Claude system context\n// result.prompt.taskPrompt - Task-specific instructions\n\\`\\`\\`\n\n## Cursor CLI Adapter\n\nOptimized for Cursor's background/composer mode.\n\nFeatures:\n- Compact format for context efficiency\n- .mdc cursor rules generation\n- Integration with Cursor's file system\n- Concise step lists\n\nGenerate Cursor Rules:\n\\`\\`\\`typescript\nconst cursorRules = guideService.generateAgentConfig(spec, 'cursor-cli');\n// Save to .cursor/rules/my-spec.mdc\n\\`\\`\\`\n\n## Generic MCP Adapter\n\nWorks with any MCP-compatible agent (Cline, Aider, etc.).\n\nFeatures:\n- Standard markdown format\n- Table-based metadata\n- JSON resource format support\n- Prompt message format\n\nThe generic adapter is the default and works across all agents.\n\n## Choosing an Adapter\n\n| Agent | Best For | Key Features |\n|-------|----------|--------------|\n| Claude Code | Complex implementations | Extended thinking, detailed steps |\n| Cursor CLI | IDE-integrated work | Cursor rules, compact format |\n| Generic MCP | Any MCP agent | Universal compatibility |\n`\n\t},\n\t{\n\t\tid: \"docs.tech.llm.verification\",\n\t\ttitle: \"Implementation Verification\",\n\t\tsummary: \"Tiered verification of implementations against specifications.\",\n\t\tkind: \"reference\",\n\t\tvisibility: \"public\",\n\t\troute: \"/docs/tech/llm/verification\",\n\t\ttags: [\n\t\t\t\"llm\",\n\t\t\t\"verify\",\n\t\t\t\"validation\",\n\t\t\t\"testing\"\n\t\t],\n\t\tbody: `# Implementation Verification\n\nContractSpec provides tiered verification to check if implementations comply with specs.\n\n## Verification Tiers\n\n### Tier 1: Structure (Fast)\n\nChecks TypeScript structure against spec requirements:\n\n| Check | What it validates |\n|-------|------------------|\n| Handler export | Function is properly exported |\n| Contracts import | Imports from @lssm/lib.contracts |\n| Schema import | Imports from @lssm/lib.schema |\n| No \\`any\\` type | TypeScript strict compliance |\n| Error handling | Error codes are referenced |\n| Event emission | Event patterns exist |\n| Input validation | Validation patterns used |\n| Async patterns | Async/await for commands |\n\n### Tier 2: Behavior (Comprehensive)\n\nChecks implementation coverage of spec behaviors:\n\n| Check | What it validates |\n|-------|------------------|\n| Scenario coverage | Acceptance scenarios implemented |\n| Example coverage | Example I/O values referenced |\n| Error cases | All error conditions handled |\n| Event conditions | Events emitted correctly |\n| Idempotency | Idempotent patterns (if required) |\n\n### Tier 3: AI Review (Deep)\n\nUses LLM for semantic analysis:\n\n- Does the implementation fulfill the spec's intent?\n- Are edge cases properly handled?\n- Is the code quality acceptable?\n- Are there any subtle violations?\n\nRequires AI API key configuration.\n\n## Running Verification\n\n\\`\\`\\`typescript\nconst verifyService = createVerifyService({\n aiApiKey: process.env.ANTHROPIC_API_KEY, // Optional, for Tier 3\n aiProvider: 'anthropic',\n});\n\nconst result = await verifyService.verify(spec, implementationCode, {\n tiers: ['structure', 'behavior'],\n failFast: false,\n includeSuggestions: true,\n});\n\nconsole.log(result.passed); // true/false\nconsole.log(result.score); // 0-100\nconsole.log(result.summary); // Human-readable summary\n\\`\\`\\`\n\n## Verification Report\n\nThe report includes:\n\n- **passed**: Overall compliance\n- **score**: 0-100 score\n- **issues**: Array of problems found\n- **suggestions**: Recommended fixes\n- **coverage**: Metrics on scenario/error/field coverage\n\nEach issue has:\n- **severity**: error, warning, or info\n- **category**: type, export, import, scenario, error_handling, semantic\n- **message**: Description of the issue\n- **suggestion**: How to fix it\n`\n\t}\n];\nregisterDocBlocks(tech_llm_integration_DocBlocks);\n\n//#endregion\nexport { tech_llm_integration_DocBlocks };"],"mappings":";;;AAGA,MAAM,iCAAiC;CACtC;EACC,IAAI;EACJ,OAAO;EACP,SAAS;EACT,MAAM;EACN,YAAY;EACZ,OAAO;EACP,MAAM;GACL;GACA;GACA;GACA;GACA;GACA;EACD,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAyFN;CACD;EACC,IAAI;EACJ,OAAO;EACP,SAAS;EACT,MAAM;EACN,YAAY;EACZ,OAAO;EACP,MAAM;GACL;GACA;GACA;GACA;EACD,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAkEN;CACD;EACC,IAAI;EACJ,OAAO;EACP,SAAS;EACT,MAAM;EACN,YAAY;EACZ,OAAO;EACP,MAAM;GACL;GACA;GACA;GACA;GACA;GACA;EACD,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA0DN;CACD;EACC,IAAI;EACJ,OAAO;EACP,SAAS;EACT,MAAM;EACN,YAAY;EACZ,OAAO;EACP,MAAM;GACL;GACA;GACA;GACA;GACA;EACD,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA+EN;CACD;AACD,kBAAkB,+BAA+B"}
1
+ {"version":3,"file":"llm-integration.docblock.js","names":[],"sources":["../../../../../../../../../libs/contracts/dist/docs/tech/llm/llm-integration.docblock.js"],"sourcesContent":["import { registerDocBlocks } from \"../../registry.js\";\n\n//#region src/docs/tech/llm/llm-integration.docblock.ts\nconst tech_llm_integration_DocBlocks = [\n\t{\n\t\tid: \"docs.tech.llm.overview\",\n\t\ttitle: \"LLM Integration Overview\",\n\t\tsummary: \"Export specs to LLM-friendly formats, generate implementation guides, and verify implementations.\",\n\t\tkind: \"reference\",\n\t\tvisibility: \"public\",\n\t\troute: \"/docs/tech/llm/overview\",\n\t\ttags: [\n\t\t\t\"llm\",\n\t\t\t\"ai\",\n\t\t\t\"export\",\n\t\t\t\"guide\",\n\t\t\t\"verify\"\n\t\t],\n\t\tbody: `# LLM Integration\n\nContractSpec provides first-class LLM integration to bridge specifications and AI coding agents.\n\n## Core Features\n\n### 1. Multi-Format Export\n\nExport specs to markdown in formats optimized for LLM consumption:\n\n- **Context format**: Summary for understanding (goal, context, acceptance criteria)\n- **Full format**: Complete spec with all details (I/O schemas, policy, events)\n- **Prompt format**: Actionable prompt with implementation instructions\n\n### 2. Implementation Guidance\n\nGenerate agent-specific implementation plans:\n\n- **Claude Code**: Extended thinking mode with structured prompts\n- **Cursor CLI**: Background/composer mode with .mdc rules generation\n- **Generic MCP**: Standard format for any MCP-compatible agent\n\n### 3. Tiered Verification\n\nVerify implementations against specs:\n\n- **Tier 1 (Structure)**: Types, exports, imports validation\n- **Tier 2 (Behavior)**: Scenario coverage, error handling, events\n- **Tier 3 (AI Review)**: Semantic compliance analysis via LLM\n\n## Access Points\n\n| Surface | Commands/Tools |\n|---------|---------------|\n| CLI | \\`contractspec llm export\\`, \\`guide\\`, \\`verify\\`, \\`copy\\` |\n| MCP | \\`llm.export\\`, \\`llm.guide\\`, \\`llm.verify\\` tools |\n| VSCode | Export to LLM, Generate Guide, Verify, Copy commands |\n\n## Quick Start\n\n### CLI Usage\n\n\\`\\`\\`bash\n# Export spec as markdown\ncontractspec llm export path/to/my.spec.ts --format full\n\n# Generate implementation guide\ncontractspec llm guide path/to/my.spec.ts --agent claude-code\n\n# Verify implementation\ncontractspec llm verify path/to/my.spec.ts path/to/impl.ts --tier 2\n\n# Copy spec to clipboard\ncontractspec llm copy path/to/my.spec.ts --format context\n\\`\\`\\`\n\n### MCP Usage\n\n\\`\\`\\`\n# Export spec\nllm.export { specPath: \"path/to/my.spec.ts\", format: \"full\" }\n\n# Generate guide\nllm.guide { specPath: \"path/to/my.spec.ts\", agent: \"cursor-cli\" }\n\n# Verify implementation\nllm.verify { specPath: \"path/to/my.spec.ts\", implementationPath: \"path/to/impl.ts\", tier: \"2\" }\n\\`\\`\\`\n\n### Programmatic Usage\n\n\\`\\`\\`typescript\nimport { operationSpecToFullMarkdown, operationSpecToAgentPrompt } from '@lssm/lib.contracts/llm';\nimport { createAgentGuideService, createVerifyService } from '@lssm/bundle.contractspec-workspace';\n\n// Export\nconst markdown = operationSpecToFullMarkdown(mySpec);\n\n// Generate guide\nconst guideService = createAgentGuideService({ defaultAgent: 'claude-code' });\nconst guide = guideService.generateGuide(mySpec);\n\n// Verify\nconst verifyService = createVerifyService();\nconst result = await verifyService.verify(mySpec, implementationCode, {\n tiers: ['structure', 'behavior']\n});\n\\`\\`\\`\n`\n\t},\n\t{\n\t\tid: \"docs.tech.llm.export-formats\",\n\t\ttitle: \"LLM Export Formats\",\n\t\tsummary: \"Detailed explanation of the three export formats for LLM consumption.\",\n\t\tkind: \"reference\",\n\t\tvisibility: \"public\",\n\t\troute: \"/docs/tech/llm/export-formats\",\n\t\ttags: [\n\t\t\t\"llm\",\n\t\t\t\"export\",\n\t\t\t\"markdown\"\n\t\t],\n\t\tbody: `# LLM Export Formats\n\nContractSpec provides three export formats optimized for different LLM use cases.\n\n## Context Format\n\nBest for: Understanding what a spec does, providing background to LLMs.\n\nIncludes:\n- Spec name, version, type\n- Goal and context\n- Description\n- Acceptance scenarios\n\nExample:\n\n\\`\\`\\`markdown\n# users.createUser (v1)\n\n> Create a new user account with email verification.\n\n**Type:** command | **Stability:** stable\n\n## Goal\nCreate a new user in the system and trigger email verification.\n\n## Context\nPart of the user onboarding flow. Called after signup form submission.\n\n## Acceptance Criteria\n### Happy path\n**Given:** Valid email and password\n**When:** User submits registration\n**Then:** Account is created, verification email is sent\n\\`\\`\\`\n\n## Full Format\n\nBest for: Complete documentation, implementation reference.\n\nIncludes everything:\n- All metadata\n- JSON schemas for I/O\n- Error definitions\n- Policy (auth, rate limits, PII)\n- Events emitted\n- Examples\n- Transport configuration\n\n## Prompt Format\n\nBest for: Feeding directly to coding agents.\n\nIncludes:\n- Task header with clear instructions\n- Full spec context\n- Implementation requirements\n- Task-specific guidance (implement/test/refactor/review)\n- Expected output format\n\nThe prompt format adapts based on task type:\n- **implement**: Full implementation with tests\n- **test**: Test generation for existing code\n- **refactor**: Refactoring while maintaining behavior\n- **review**: Code review against spec\n`\n\t},\n\t{\n\t\tid: \"docs.tech.llm.agent-adapters\",\n\t\ttitle: \"Agent Adapters\",\n\t\tsummary: \"Adapters for different AI coding agents (Claude, Cursor, MCP).\",\n\t\tkind: \"reference\",\n\t\tvisibility: \"public\",\n\t\troute: \"/docs/tech/llm/agent-adapters\",\n\t\ttags: [\n\t\t\t\"llm\",\n\t\t\t\"agents\",\n\t\t\t\"claude\",\n\t\t\t\"cursor\",\n\t\t\t\"mcp\"\n\t\t],\n\t\tbody: `# Agent Adapters\n\nContractSpec provides specialized adapters for different AI coding agents.\n\n## Claude Code Adapter\n\nOptimized for Anthropic Claude's extended thinking and code generation.\n\nFeatures:\n- Structured markdown with clear sections\n- Checklists for steps and verification\n- Icons for file operations (📝 create, ✏️ modify)\n- System prompt for ContractSpec context\n\nUsage:\n\\`\\`\\`typescript\nconst guideService = createAgentGuideService({ defaultAgent: 'claude-code' });\nconst result = guideService.generateGuide(spec, { agent: 'claude-code' });\n// result.prompt.systemPrompt - Claude system context\n// result.prompt.taskPrompt - Task-specific instructions\n\\`\\`\\`\n\n## Cursor CLI Adapter\n\nOptimized for Cursor's background/composer mode.\n\nFeatures:\n- Compact format for context efficiency\n- .mdc cursor rules generation\n- Integration with Cursor's file system\n- Concise step lists\n\nGenerate Cursor Rules:\n\\`\\`\\`typescript\nconst cursorRules = guideService.generateAgentConfig(spec, 'cursor-cli');\n// Save to .cursor/rules/my-spec.mdc\n\\`\\`\\`\n\n## Generic MCP Adapter\n\nWorks with any MCP-compatible agent (Cline, Aider, etc.).\n\nFeatures:\n- Standard markdown format\n- Table-based metadata\n- JSON resource format support\n- Prompt message format\n\nThe generic adapter is the default and works across all agents.\n\n## Choosing an Adapter\n\n| Agent | Best For | Key Features |\n|-------|----------|--------------|\n| Claude Code | Complex implementations | Extended thinking, detailed steps |\n| Cursor CLI | IDE-integrated work | Cursor rules, compact format |\n| Generic MCP | Any MCP agent | Universal compatibility |\n`\n\t},\n\t{\n\t\tid: \"docs.tech.llm.verification\",\n\t\ttitle: \"Implementation Verification\",\n\t\tsummary: \"Tiered verification of implementations against specifications.\",\n\t\tkind: \"reference\",\n\t\tvisibility: \"public\",\n\t\troute: \"/docs/tech/llm/verification\",\n\t\ttags: [\n\t\t\t\"llm\",\n\t\t\t\"verify\",\n\t\t\t\"validation\",\n\t\t\t\"testing\"\n\t\t],\n\t\tbody: `# Implementation Verification\n\nContractSpec provides tiered verification to check if implementations comply with specs.\n\n## Verification Tiers\n\n### Tier 1: Structure (Fast)\n\nChecks TypeScript structure against spec requirements:\n\n| Check | What it validates |\n|-------|------------------|\n| Handler export | Function is properly exported |\n| Contracts import | Imports from @lssm/lib.contracts |\n| Schema import | Imports from @lssm/lib.schema |\n| No \\`any\\` type | TypeScript strict compliance |\n| Error handling | Error codes are referenced |\n| Event emission | Event patterns exist |\n| Input validation | Validation patterns used |\n| Async patterns | Async/await for commands |\n\n### Tier 2: Behavior (Comprehensive)\n\nChecks implementation coverage of spec behaviors:\n\n| Check | What it validates |\n|-------|------------------|\n| Scenario coverage | Acceptance scenarios implemented |\n| Example coverage | Example I/O values referenced |\n| Error cases | All error conditions handled |\n| Event conditions | Events emitted correctly |\n| Idempotency | Idempotent patterns (if required) |\n\n### Tier 3: AI Review (Deep)\n\nUses LLM for semantic analysis:\n\n- Does the implementation fulfill the spec's intent?\n- Are edge cases properly handled?\n- Is the code quality acceptable?\n- Are there any subtle violations?\n\nRequires AI API key configuration.\n\n## Running Verification\n\n\\`\\`\\`typescript\nconst verifyService = createVerifyService({\n aiApiKey: process.env.ANTHROPIC_API_KEY, // Optional, for Tier 3\n aiProvider: 'anthropic',\n});\n\nconst result = await verifyService.verify(spec, implementationCode, {\n tiers: ['structure', 'behavior'],\n failFast: false,\n includeSuggestions: true,\n});\n\nconsole.log(result.passed); // true/false\nconsole.log(result.score); // 0-100\nconsole.log(result.summary); // Human-readable summary\n\\`\\`\\`\n\n## Verification Report\n\nThe report includes:\n\n- **passed**: Overall compliance\n- **score**: 0-100 score\n- **issues**: Array of problems found\n- **suggestions**: Recommended fixes\n- **coverage**: Metrics on scenario/error/field coverage\n\nEach issue has:\n- **severity**: error, warning, or info\n- **category**: type, export, import, scenario, error_handling, semantic\n- **message**: Description of the issue\n- **suggestion**: How to fix it\n`\n\t}\n];\nregisterDocBlocks(tech_llm_integration_DocBlocks);\n\n//#endregion\nexport { tech_llm_integration_DocBlocks };"],"mappings":";;;AAGA,MAAM,iCAAiC;CACtC;EACC,IAAI;EACJ,OAAO;EACP,SAAS;EACT,MAAM;EACN,YAAY;EACZ,OAAO;EACP,MAAM;GACL;GACA;GACA;GACA;GACA;GACA;EACD,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAyFN;CACD;EACC,IAAI;EACJ,OAAO;EACP,SAAS;EACT,MAAM;EACN,YAAY;EACZ,OAAO;EACP,MAAM;GACL;GACA;GACA;GACA;EACD,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAkEN;CACD;EACC,IAAI;EACJ,OAAO;EACP,SAAS;EACT,MAAM;EACN,YAAY;EACZ,OAAO;EACP,MAAM;GACL;GACA;GACA;GACA;GACA;GACA;EACD,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA0DN;CACD;EACC,IAAI;EACJ,OAAO;EACP,SAAS;EACT,MAAM;EACN,YAAY;EACZ,OAAO;EACP,MAAM;GACL;GACA;GACA;GACA;GACA;EACD,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA+EN;CACD;AACD,kBAAkB,+BAA+B"}
@@ -0,0 +1 @@
1
+ import "../registry-utils.js";
@@ -1,17 +1,19 @@
1
- import { defineCommand, defineQuery } from "./operation.js";
2
- import { GroupingStrategies, init_registry_utils } from "./registry-utils.js";
3
- import "./data-views.js";
1
+ import { defineCommand, defineQuery } from "./operations/operation.js";
4
2
  import { K5 } from "./schema/dist/index.js";
5
3
  import { defineEvent } from "./events.js";
4
+ import { GroupingStrategies, init_registry_utils } from "./registry-utils.js";
5
+ import "./operations/registry.js";
6
+ import "./operations/index.js";
6
7
  import "./features.js";
7
- import "./forms.js";
8
- import "./presentations.v2.js";
8
+ import "./presentations/transform-engine.js";
9
+ import "./presentations/presentations.js";
10
+ import "./presentations/index.js";
9
11
  import "./client/react/feature-render.js";
12
+ import "./forms/forms.js";
10
13
  import "./client/react/form-render.js";
11
14
  import "./client/index.js";
12
15
  import "./jsonschema.js";
13
16
  import "./server/graphql-pothos.js";
14
- import "./presentations.js";
15
17
  import "./server/mcp/createMcpServer.js";
16
18
  import "./server/rest-generic.js";
17
19
  import "./server/rest-elysia.js";
@@ -19,10 +21,9 @@ import "./server/rest-express.js";
19
21
  import "./server/rest-next-app.js";
20
22
  import "./server/rest-next-pages.js";
21
23
  import "./server/index.js";
22
- import { docBlockToPresentationSpec, docBlockToPresentationV2, docBlocksToPresentationRoutes } from "./docs/presentations.js";
23
- import { DocRegistry, defaultDocRegistry, registerDocBlocks } from "./docs/registry.js";
24
- import "./registry.js";
25
24
  import { OwnersEnum, StabilityEnum } from "./ownership.js";
25
+ import "./capabilities/openbanking.js";
26
+ import "./capabilities/index.js";
26
27
  import { ContractRegistryFileSchema, ContractRegistryItemSchema, ContractRegistryItemTypeSchema } from "./contract-registry/schemas.js";
27
28
  import "./contract-registry/index.js";
28
29
  import "./install.js";
@@ -31,7 +32,7 @@ import "./prompt.js";
31
32
  import "./promptRegistry.js";
32
33
  import "./resources.js";
33
34
  import { CompleteOnboardingBaseInput, CompleteOnboardingBaseOutput, DeleteOnboardingDraftOutput, GetOnboardingDraftOutput, SaveOnboardingDraftInput, SaveOnboardingDraftOutput } from "./onboarding-base.js";
34
- import "./capabilities/openbanking.js";
35
+ import "./data-views/data-views.js";
35
36
  import "./telemetry/tracker.js";
36
37
  import "./telemetry/index.js";
37
38
  import "./tests/runner.js";
@@ -62,8 +63,8 @@ import "./knowledge/spaces/uploaded-docs.js";
62
63
  import "./knowledge/spaces/financial-docs.js";
63
64
  import "./knowledge/spaces/financial-overview.js";
64
65
  import "./knowledge/index.js";
65
- import "./integrations/contracts.js";
66
- import "./knowledge/contracts.js";
66
+ import "./integrations/operations.js";
67
+ import "./knowledge/operations.js";
67
68
  import "./regenerator/service.js";
68
69
  import "./regenerator/index.js";
69
70
  import { FolderConventionsSchema, OpenApiConfigSchema, OpenApiExportConfigSchema, OpenApiSourceConfigSchema } from "./workspace-config/contractsrc-schema.js";
@@ -71,6 +72,8 @@ import "./workspace-config/index.js";
71
72
  import "./workflow/spec.js";
72
73
  import "./workflow/runner.js";
73
74
  import "./workflow/index.js";
75
+ import { docBlockToPresentationSpec, docBlockToPresentationV2, docBlocksToPresentationRoutes } from "./docs/presentations.js";
76
+ import { DocRegistry, defaultDocRegistry, registerDocBlocks } from "./docs/registry.js";
74
77
  import { techContractsDocs } from "./docs/tech-contracts.docs.js";
75
78
  import { metaDocs } from "./docs/meta.docs.js";
76
79
  import "./docs/index.js";
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":[],"sources":["../../../../../../libs/contracts/dist/index.js"],"sourcesContent":["import { CapabilityRegistry, capabilityKey, defineCapability } from \"./capabilities.js\";\nimport { GroupingStrategies, filterBy, getUniqueDomains, getUniqueOwners, getUniqueTags, groupBy, groupByMultiple, groupByToArray, init_registry_utils } from \"./registry-utils.js\";\nimport { DataViewRegistry, dataViewKey } from \"./data-views.js\";\nimport { K5 } from \"./schema/dist/index.js\";\nimport { defineEvent, eventKey } from \"./events.js\";\nimport { FeatureRegistry, installFeature, validateFeatureTargetsV2 } from \"./features.js\";\nimport { FormRegistry, buildZodWithRelations, defineFormSpec, evalPredicate } from \"./forms.js\";\nimport { schemaToMarkdown, schemaToMarkdownDetail, schemaToMarkdownList, schemaToMarkdownSummary, schemaToMarkdownTable } from \"./schema-to-markdown.js\";\nimport { TransformEngine, createDefaultTransformEngine, registerBasicValidation, registerDefaultReactRenderer, registerReactToMarkdownRenderer } from \"./presentations.v2.js\";\nimport { createEngineWithDefaults, createFeatureModule, registerFeature, renderFeaturePresentation } from \"./client/react/feature-render.js\";\nimport { createFormRenderer } from \"./client/react/form-render.js\";\nimport { shadcnDriver } from \"./client/react/drivers/shadcn.js\";\nimport { rnReusablesDriver } from \"./client/react/drivers/rn-reusables.js\";\nimport \"./client/index.js\";\nimport { defaultGqlField, defaultMcpTool, defaultRestPath, jsonSchemaForSpec } from \"./jsonschema.js\";\nimport { registerContractsOnBuilder } from \"./server/graphql-pothos.js\";\nimport { PresentationRegistry, jsonSchemaForPresentation } from \"./presentations.js\";\nimport { createMcpServer } from \"./server/mcp/createMcpServer.js\";\nimport { createFetchHandler } from \"./server/rest-generic.js\";\nimport { elysiaPlugin } from \"./server/rest-elysia.js\";\nimport { expressRouter } from \"./server/rest-express.js\";\nimport { makeNextAppHandler } from \"./server/rest-next-app.js\";\nimport { makeNextPagesHandler } from \"./server/rest-next-pages.js\";\nimport \"./server/index.js\";\nimport { defineCommand, defineQuery, isEmitDeclRef } from \"./operation.js\";\nimport { docBlockToPresentationSpec, docBlockToPresentationV2, docBlocksToPresentationRoutes, docBlocksToPresentationSpecs, mapDocRoutes } from \"./docs/presentations.js\";\nimport { DocRegistry, defaultDocRegistry, docId, listRegisteredDocBlocks, registerDocBlocks } from \"./docs/registry.js\";\nimport { OperationSpecRegistry, opKey } from \"./registry.js\";\nimport { Owners, OwnersEnum, StabilityEnum, Tags, TagsEnum } from \"./ownership.js\";\nimport { ContractRegistryFileSchema, ContractRegistryItemSchema, ContractRegistryItemTypeSchema, ContractRegistryManifestSchema } from \"./contract-registry/schemas.js\";\nimport \"./contract-registry/index.js\";\nimport { installOp, makeEmit, op } from \"./install.js\";\nimport { openApiForRegistry } from \"./openapi.js\";\nimport { definePrompt } from \"./prompt.js\";\nimport { PromptRegistry } from \"./promptRegistry.js\";\nimport { ResourceRegistry, defineResourceTemplate, isResourceRef, resourceRef } from \"./resources.js\";\nimport { CompleteOnboardingBaseInput, CompleteOnboardingBaseOutput, CompleteOnboardingBaseSpec, DeleteOnboardingDraftBaseSpec, DeleteOnboardingDraftOutput, GetOnboardingDraftBaseSpec, GetOnboardingDraftOutput, SaveOnboardingDraftBaseSpec, SaveOnboardingDraftInput, SaveOnboardingDraftOutput } from \"./onboarding-base.js\";\nimport { openBankingAccountsReadCapability, openBankingBalancesReadCapability, openBankingTransactionsReadCapability, registerOpenBankingCapabilities } from \"./capabilities/openbanking.js\";\nimport { PolicyRegistry, makePolicyKey } from \"./policy/spec.js\";\nimport { PolicyEngine } from \"./policy/engine.js\";\nimport { OPAPolicyAdapter, buildOPAInput } from \"./policy/opa-adapter.js\";\nimport { ThemeRegistry, makeThemeRef } from \"./themes.js\";\nimport { MigrationRegistry } from \"./migrations.js\";\nimport { TelemetryRegistry, makeTelemetryKey } from \"./telemetry/spec.js\";\nimport { TelemetryTracker } from \"./telemetry/tracker.js\";\nimport { TelemetryAnomalyMonitor } from \"./telemetry/anomaly.js\";\nimport \"./telemetry/index.js\";\nimport { TestRegistry, makeTestKey } from \"./tests/spec.js\";\nimport { TestRunner } from \"./tests/runner.js\";\nimport \"./tests/index.js\";\nimport { ExperimentRegistry, makeExperimentKey } from \"./experiments/spec.js\";\nimport { ExperimentEvaluator } from \"./experiments/evaluator.js\";\nimport { AppBlueprintRegistry, makeAppBlueprintKey } from \"./app-config/spec.js\";\nimport { composeAppConfig, resolveAppConfig } from \"./app-config/runtime.js\";\nimport { IntegrationSpecRegistry, makeIntegrationSpecKey } from \"./integrations/spec.js\";\nimport { registerStripeIntegration, stripeIntegrationSpec } from \"./integrations/providers/stripe.js\";\nimport { postmarkIntegrationSpec, registerPostmarkIntegration } from \"./integrations/providers/postmark.js\";\nimport { qdrantIntegrationSpec, registerQdrantIntegration } from \"./integrations/providers/qdrant.js\";\nimport { mistralIntegrationSpec, registerMistralIntegration } from \"./integrations/providers/mistral.js\";\nimport { elevenLabsIntegrationSpec, registerElevenLabsIntegration } from \"./integrations/providers/elevenlabs.js\";\nimport { gmailIntegrationSpec, registerGmailIntegration } from \"./integrations/providers/gmail.js\";\nimport { googleCalendarIntegrationSpec, registerGoogleCalendarIntegration } from \"./integrations/providers/google-calendar.js\";\nimport { registerTwilioSmsIntegration, twilioSmsIntegrationSpec } from \"./integrations/providers/twilio-sms.js\";\nimport { gcsStorageIntegrationSpec, registerGcsStorageIntegration } from \"./integrations/providers/gcs-storage.js\";\nimport { powensIntegrationSpec, registerPowensIntegration } from \"./integrations/providers/powens.js\";\nimport { createDefaultIntegrationSpecRegistry } from \"./integrations/providers/registry.js\";\nimport { AccountBalanceRecord, BankAccountRecord, BankTransactionRecord } from \"./integrations/openbanking/models.js\";\nimport { OPENBANKING_PII_FIELDS, OPENBANKING_TELEMETRY_EVENTS, redactOpenBankingTelemetryPayload } from \"./integrations/openbanking/telemetry.js\";\nimport { OpenBankingGetAccount, OpenBankingListAccounts, OpenBankingSyncAccounts } from \"./integrations/openbanking/contracts/accounts.js\";\nimport { OpenBankingListTransactions, OpenBankingSyncTransactions } from \"./integrations/openbanking/contracts/transactions.js\";\nimport { OpenBankingGetBalances, OpenBankingRefreshBalances } from \"./integrations/openbanking/contracts/balances.js\";\nimport { OpenBankingFeature } from \"./integrations/openbanking/openbanking.feature.js\";\nimport { registerOpenBankingContracts } from \"./integrations/openbanking/contracts/index.js\";\nimport { assertPrimaryOpenBankingReady, ensurePrimaryOpenBankingIntegration } from \"./integrations/openbanking/guards.js\";\nimport \"./integrations/index.js\";\nimport { KnowledgeSpaceRegistry, makeKnowledgeSpaceKey } from \"./knowledge/spec.js\";\nimport { productCanonKnowledgeSpace, registerProductCanonKnowledgeSpace } from \"./knowledge/spaces/product-canon.js\";\nimport { registerSupportFaqKnowledgeSpace, supportFaqKnowledgeSpace } from \"./knowledge/spaces/support-faq.js\";\nimport { emailThreadsKnowledgeSpace, registerEmailThreadsKnowledgeSpace } from \"./knowledge/spaces/email-threads.js\";\nimport { registerUploadedDocsKnowledgeSpace, uploadedDocsKnowledgeSpace } from \"./knowledge/spaces/uploaded-docs.js\";\nimport { financialDocsKnowledgeSpace, registerFinancialDocsKnowledgeSpace } from \"./knowledge/spaces/financial-docs.js\";\nimport { financialOverviewKnowledgeSpace, registerFinancialOverviewKnowledgeSpace } from \"./knowledge/spaces/financial-overview.js\";\nimport \"./knowledge/index.js\";\nimport { CreateIntegrationConnection, DeleteIntegrationConnection, ListIntegrationConnections, TestIntegrationConnection, UpdateIntegrationConnection, integrationContracts, registerIntegrationContracts } from \"./integrations/contracts.js\";\nimport { CreateKnowledgeSource, DeleteKnowledgeSource, ListKnowledgeSources, TriggerKnowledgeSourceSync, UpdateKnowledgeSource, knowledgeContracts, registerKnowledgeContracts } from \"./knowledge/contracts.js\";\nimport { behaviorToEnvelope, errorToEnvelope, telemetryToEnvelope } from \"./regenerator/utils.js\";\nimport { RegeneratorService } from \"./regenerator/service.js\";\nimport { ProposalExecutor } from \"./regenerator/executor.js\";\nimport { ExecutorProposalSink } from \"./regenerator/sinks.js\";\nimport \"./regenerator/index.js\";\nimport { ContractsrcSchema, DEFAULT_CONTRACTSRC, FolderConventionsSchema, OpenApiConfigSchema, OpenApiExportConfigSchema, OpenApiSourceConfigSchema } from \"./workspace-config/contractsrc-schema.js\";\nimport \"./workspace-config/index.js\";\nimport { WorkflowRegistry } from \"./workflow/spec.js\";\nimport { WorkflowValidationError, assertWorkflowSpecValid, validateWorkflowSpec } from \"./workflow/validation.js\";\nimport { evaluateExpression } from \"./workflow/expression.js\";\nimport { WorkflowPreFlightError, WorkflowRunner } from \"./workflow/runner.js\";\nimport { InMemoryStateStore } from \"./workflow/adapters/memory-store.js\";\nimport { PrismaStateStore } from \"./workflow/adapters/db-adapter.js\";\nimport { createFileStateStore } from \"./workflow/adapters/file-adapter.js\";\nimport \"./workflow/index.js\";\nimport { techContractsDocs } from \"./docs/tech-contracts.docs.js\";\nimport { metaDocs } from \"./docs/meta.docs.js\";\nimport \"./docs/index.js\";\nimport { docBlockToMarkdown, eventToMarkdown, exportFeature, exportSpec, featureToMarkdown, presentationToMarkdown, specToAgentPrompt, specToContextMarkdown, specToFullMarkdown } from \"./llm/exporters.js\";\nimport { AGENT_SYSTEM_PROMPTS, formatPlanForAgent, generateFixViolationsPrompt, generateImplementationPlan, generateImplementationPrompt, generateReviewPrompt, generateTestPrompt, generateVerificationPrompt } from \"./llm/prompts.js\";\nimport \"./llm/index.js\";\n\n//#region src/index.ts\ninit_registry_utils();\n\n//#endregion\nexport { AGENT_SYSTEM_PROMPTS, AccountBalanceRecord, AppBlueprintRegistry, BankAccountRecord, BankTransactionRecord, CapabilityRegistry, CompleteOnboardingBaseInput, CompleteOnboardingBaseOutput, CompleteOnboardingBaseSpec, ContractRegistryFileSchema, ContractRegistryItemSchema, ContractRegistryItemTypeSchema, ContractRegistryManifestSchema, ContractsrcSchema, CreateIntegrationConnection, CreateKnowledgeSource, DEFAULT_CONTRACTSRC, DataViewRegistry, DeleteIntegrationConnection, DeleteKnowledgeSource, DeleteOnboardingDraftBaseSpec, DeleteOnboardingDraftOutput, DocRegistry, ExecutorProposalSink, ExperimentEvaluator, ExperimentRegistry, FeatureRegistry, FolderConventionsSchema, FormRegistry, GetOnboardingDraftBaseSpec, GetOnboardingDraftOutput, GroupingStrategies, InMemoryStateStore, IntegrationSpecRegistry, KnowledgeSpaceRegistry, ListIntegrationConnections, ListKnowledgeSources, MigrationRegistry, OPAPolicyAdapter, OPENBANKING_PII_FIELDS, OPENBANKING_TELEMETRY_EVENTS, OpenApiConfigSchema, OpenApiExportConfigSchema, OpenApiSourceConfigSchema, OpenBankingFeature, OpenBankingGetAccount, OpenBankingGetBalances, OpenBankingListAccounts, OpenBankingListTransactions, OpenBankingRefreshBalances, OpenBankingSyncAccounts, OpenBankingSyncTransactions, OperationSpecRegistry, Owners, OwnersEnum, PolicyEngine, PolicyRegistry, PresentationRegistry, PrismaStateStore, PromptRegistry, ProposalExecutor, RegeneratorService, ResourceRegistry, SaveOnboardingDraftBaseSpec, SaveOnboardingDraftInput, SaveOnboardingDraftOutput, StabilityEnum, Tags, TagsEnum, TelemetryAnomalyMonitor, TelemetryRegistry, TelemetryTracker, TestIntegrationConnection, TestRegistry, TestRunner, ThemeRegistry, TransformEngine, TriggerKnowledgeSourceSync, UpdateIntegrationConnection, UpdateKnowledgeSource, WorkflowPreFlightError, WorkflowRegistry, WorkflowRunner, WorkflowValidationError, assertPrimaryOpenBankingReady, assertWorkflowSpecValid, behaviorToEnvelope, buildOPAInput, buildZodWithRelations, capabilityKey, composeAppConfig, createDefaultIntegrationSpecRegistry, createDefaultTransformEngine, createEngineWithDefaults, createFeatureModule, createFetchHandler, createFileStateStore, createFormRenderer, createMcpServer, dataViewKey, defaultDocRegistry, defaultGqlField, defaultMcpTool, defaultRestPath, defineCapability, defineCommand, defineEvent, defineFormSpec, definePrompt, defineQuery, defineResourceTemplate, K5 as defineSchemaModel, docBlockToMarkdown, docBlockToPresentationSpec, docBlockToPresentationV2, docBlocksToPresentationRoutes, docBlocksToPresentationSpecs, docId, elevenLabsIntegrationSpec, elysiaPlugin, emailThreadsKnowledgeSpace, ensurePrimaryOpenBankingIntegration, errorToEnvelope, evalPredicate, evaluateExpression, eventKey, eventToMarkdown, exportFeature, exportSpec, expressRouter, featureToMarkdown, filterBy, financialDocsKnowledgeSpace, financialOverviewKnowledgeSpace, formatPlanForAgent, gcsStorageIntegrationSpec, generateFixViolationsPrompt, generateImplementationPlan, generateImplementationPrompt, generateReviewPrompt, generateTestPrompt, generateVerificationPrompt, getUniqueDomains, getUniqueOwners, getUniqueTags, gmailIntegrationSpec, googleCalendarIntegrationSpec, groupBy, groupByMultiple, groupByToArray, installFeature, installOp, integrationContracts, isEmitDeclRef, isResourceRef, jsonSchemaForPresentation, jsonSchemaForSpec, knowledgeContracts, listRegisteredDocBlocks, makeAppBlueprintKey, makeEmit, makeExperimentKey, makeIntegrationSpecKey, makeKnowledgeSpaceKey, makeNextAppHandler, makeNextPagesHandler, makePolicyKey, makeTelemetryKey, makeTestKey, makeThemeRef, mapDocRoutes, metaDocs, mistralIntegrationSpec, op, opKey, openApiForRegistry, openBankingAccountsReadCapability, openBankingBalancesReadCapability, openBankingTransactionsReadCapability, postmarkIntegrationSpec, powensIntegrationSpec, presentationToMarkdown, productCanonKnowledgeSpace, qdrantIntegrationSpec, redactOpenBankingTelemetryPayload, registerBasicValidation, registerContractsOnBuilder, registerDefaultReactRenderer, registerDocBlocks, registerElevenLabsIntegration, registerEmailThreadsKnowledgeSpace, registerFeature, registerFinancialDocsKnowledgeSpace, registerFinancialOverviewKnowledgeSpace, registerGcsStorageIntegration, registerGmailIntegration, registerGoogleCalendarIntegration, registerIntegrationContracts, registerKnowledgeContracts, registerMistralIntegration, registerOpenBankingCapabilities, registerOpenBankingContracts, registerPostmarkIntegration, registerPowensIntegration, registerProductCanonKnowledgeSpace, registerQdrantIntegration, registerReactToMarkdownRenderer, registerStripeIntegration, registerSupportFaqKnowledgeSpace, registerTwilioSmsIntegration, registerUploadedDocsKnowledgeSpace, renderFeaturePresentation, resolveAppConfig, resourceRef, rnReusablesDriver, schemaToMarkdown, schemaToMarkdownDetail, schemaToMarkdownList, schemaToMarkdownSummary, schemaToMarkdownTable, shadcnDriver, specToAgentPrompt, specToContextMarkdown, specToFullMarkdown, stripeIntegrationSpec, supportFaqKnowledgeSpace, techContractsDocs, telemetryToEnvelope, twilioSmsIntegrationSpec, uploadedDocsKnowledgeSpace, validateFeatureTargetsV2, validateWorkflowSpec };"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA4GA,qBAAqB"}
1
+ {"version":3,"file":"index.js","names":[],"sources":["../../../../../../libs/contracts/dist/index.js"],"sourcesContent":["import { K5 } from \"./schema/dist/index.js\";\nimport { defineEvent, eventKey } from \"./events.js\";\nimport { GroupingStrategies, filterBy, getUniqueDomains, getUniqueOwners, getUniqueTags, groupBy, groupByMultiple, groupByToArray, init_registry_utils } from \"./registry-utils.js\";\nimport { FeatureRegistry, installFeature, validateFeatureTargetsV2 } from \"./features.js\";\nimport { schemaToMarkdown, schemaToMarkdownDetail, schemaToMarkdownList, schemaToMarkdownSummary, schemaToMarkdownTable } from \"./schema-to-markdown.js\";\nimport { TransformEngine, createDefaultTransformEngine, registerBasicValidation, registerDefaultReactRenderer, registerReactToMarkdownRenderer } from \"./presentations/transform-engine.js\";\nimport { PresentationRegistry, jsonSchemaForPresentation } from \"./presentations/presentations.js\";\nimport \"./presentations/index.js\";\nimport { createEngineWithDefaults, createFeatureModule, registerFeature, renderFeaturePresentation } from \"./client/react/feature-render.js\";\nimport { FormRegistry, buildZodWithRelations, defineFormSpec, evalPredicate } from \"./forms/forms.js\";\nimport { createFormRenderer } from \"./client/react/form-render.js\";\nimport { shadcnDriver } from \"./client/react/drivers/shadcn.js\";\nimport { rnReusablesDriver } from \"./client/react/drivers/rn-reusables.js\";\nimport \"./client/index.js\";\nimport { defaultGqlField, defaultMcpTool, defaultRestPath, jsonSchemaForSpec } from \"./jsonschema.js\";\nimport { registerContractsOnBuilder } from \"./server/graphql-pothos.js\";\nimport { createMcpServer } from \"./server/mcp/createMcpServer.js\";\nimport { createFetchHandler } from \"./server/rest-generic.js\";\nimport { elysiaPlugin } from \"./server/rest-elysia.js\";\nimport { expressRouter } from \"./server/rest-express.js\";\nimport { makeNextAppHandler } from \"./server/rest-next-app.js\";\nimport { makeNextPagesHandler } from \"./server/rest-next-pages.js\";\nimport \"./server/index.js\";\nimport { CapabilityRegistry, capabilityKey, defineCapability } from \"./capabilities/capabilities.js\";\nimport { Owners, OwnersEnum, StabilityEnum, Tags, TagsEnum } from \"./ownership.js\";\nimport { openBankingAccountsReadCapability, openBankingBalancesReadCapability, openBankingTransactionsReadCapability, registerOpenBankingCapabilities } from \"./capabilities/openbanking.js\";\nimport \"./capabilities/index.js\";\nimport { ContractRegistryFileSchema, ContractRegistryItemSchema, ContractRegistryItemTypeSchema, ContractRegistryManifestSchema } from \"./contract-registry/schemas.js\";\nimport \"./contract-registry/index.js\";\nimport { defineCommand, defineQuery, isEmitDeclRef } from \"./operations/operation.js\";\nimport { OperationSpecRegistry, opKey } from \"./operations/registry.js\";\nimport { installOp, makeEmit, op } from \"./install.js\";\nimport { openApiForRegistry } from \"./openapi.js\";\nimport { definePrompt } from \"./prompt.js\";\nimport { PromptRegistry } from \"./promptRegistry.js\";\nimport \"./operations/index.js\";\nimport { ResourceRegistry, defineResourceTemplate, isResourceRef, resourceRef } from \"./resources.js\";\nimport { CompleteOnboardingBaseInput, CompleteOnboardingBaseOutput, CompleteOnboardingBaseSpec, DeleteOnboardingDraftBaseSpec, DeleteOnboardingDraftOutput, GetOnboardingDraftBaseSpec, GetOnboardingDraftOutput, SaveOnboardingDraftBaseSpec, SaveOnboardingDraftInput, SaveOnboardingDraftOutput } from \"./onboarding-base.js\";\nimport { DataViewRegistry, dataViewKey } from \"./data-views/data-views.js\";\nimport { DataViewQueryGenerator } from \"./data-views/query-generator.js\";\nimport { DataViewRuntime } from \"./data-views/runtime.js\";\nimport { PolicyRegistry, makePolicyKey } from \"./policy/spec.js\";\nimport { PolicyEngine } from \"./policy/engine.js\";\nimport { OPAPolicyAdapter, buildOPAInput } from \"./policy/opa-adapter.js\";\nimport { ThemeRegistry, makeThemeRef } from \"./themes.js\";\nimport { MigrationRegistry } from \"./migrations.js\";\nimport { TelemetryRegistry, makeTelemetryKey } from \"./telemetry/spec.js\";\nimport { TelemetryTracker } from \"./telemetry/tracker.js\";\nimport { TelemetryAnomalyMonitor } from \"./telemetry/anomaly.js\";\nimport \"./telemetry/index.js\";\nimport { TestRegistry, makeTestKey } from \"./tests/spec.js\";\nimport { TestRunner } from \"./tests/runner.js\";\nimport \"./tests/index.js\";\nimport { ExperimentRegistry, makeExperimentKey } from \"./experiments/spec.js\";\nimport { ExperimentEvaluator } from \"./experiments/evaluator.js\";\nimport { AppBlueprintRegistry, makeAppBlueprintKey } from \"./app-config/spec.js\";\nimport { composeAppConfig, resolveAppConfig } from \"./app-config/runtime.js\";\nimport { IntegrationSpecRegistry, makeIntegrationSpecKey } from \"./integrations/spec.js\";\nimport { registerStripeIntegration, stripeIntegrationSpec } from \"./integrations/providers/stripe.js\";\nimport { postmarkIntegrationSpec, registerPostmarkIntegration } from \"./integrations/providers/postmark.js\";\nimport { qdrantIntegrationSpec, registerQdrantIntegration } from \"./integrations/providers/qdrant.js\";\nimport { mistralIntegrationSpec, registerMistralIntegration } from \"./integrations/providers/mistral.js\";\nimport { elevenLabsIntegrationSpec, registerElevenLabsIntegration } from \"./integrations/providers/elevenlabs.js\";\nimport { gmailIntegrationSpec, registerGmailIntegration } from \"./integrations/providers/gmail.js\";\nimport { googleCalendarIntegrationSpec, registerGoogleCalendarIntegration } from \"./integrations/providers/google-calendar.js\";\nimport { registerTwilioSmsIntegration, twilioSmsIntegrationSpec } from \"./integrations/providers/twilio-sms.js\";\nimport { gcsStorageIntegrationSpec, registerGcsStorageIntegration } from \"./integrations/providers/gcs-storage.js\";\nimport { powensIntegrationSpec, registerPowensIntegration } from \"./integrations/providers/powens.js\";\nimport { createDefaultIntegrationSpecRegistry } from \"./integrations/providers/registry.js\";\nimport { AccountBalanceRecord, BankAccountRecord, BankTransactionRecord } from \"./integrations/openbanking/models.js\";\nimport { OPENBANKING_PII_FIELDS, OPENBANKING_TELEMETRY_EVENTS, redactOpenBankingTelemetryPayload } from \"./integrations/openbanking/telemetry.js\";\nimport { OpenBankingGetAccount, OpenBankingListAccounts, OpenBankingSyncAccounts } from \"./integrations/openbanking/contracts/accounts.js\";\nimport { OpenBankingListTransactions, OpenBankingSyncTransactions } from \"./integrations/openbanking/contracts/transactions.js\";\nimport { OpenBankingGetBalances, OpenBankingRefreshBalances } from \"./integrations/openbanking/contracts/balances.js\";\nimport { OpenBankingFeature } from \"./integrations/openbanking/openbanking.feature.js\";\nimport { registerOpenBankingContracts } from \"./integrations/openbanking/contracts/index.js\";\nimport { assertPrimaryOpenBankingReady, ensurePrimaryOpenBankingIntegration } from \"./integrations/openbanking/guards.js\";\nimport \"./integrations/index.js\";\nimport { KnowledgeSpaceRegistry, makeKnowledgeSpaceKey } from \"./knowledge/spec.js\";\nimport { productCanonKnowledgeSpace, registerProductCanonKnowledgeSpace } from \"./knowledge/spaces/product-canon.js\";\nimport { registerSupportFaqKnowledgeSpace, supportFaqKnowledgeSpace } from \"./knowledge/spaces/support-faq.js\";\nimport { emailThreadsKnowledgeSpace, registerEmailThreadsKnowledgeSpace } from \"./knowledge/spaces/email-threads.js\";\nimport { registerUploadedDocsKnowledgeSpace, uploadedDocsKnowledgeSpace } from \"./knowledge/spaces/uploaded-docs.js\";\nimport { financialDocsKnowledgeSpace, registerFinancialDocsKnowledgeSpace } from \"./knowledge/spaces/financial-docs.js\";\nimport { financialOverviewKnowledgeSpace, registerFinancialOverviewKnowledgeSpace } from \"./knowledge/spaces/financial-overview.js\";\nimport \"./knowledge/index.js\";\nimport { CreateIntegrationConnection, DeleteIntegrationConnection, ListIntegrationConnections, TestIntegrationConnection, UpdateIntegrationConnection, integrationContracts, registerIntegrationContracts } from \"./integrations/operations.js\";\nimport { CreateKnowledgeSource, DeleteKnowledgeSource, ListKnowledgeSources, TriggerKnowledgeSourceSync, UpdateKnowledgeSource, knowledgeContracts, registerKnowledgeContracts } from \"./knowledge/operations.js\";\nimport { behaviorToEnvelope, errorToEnvelope, telemetryToEnvelope } from \"./regenerator/utils.js\";\nimport { RegeneratorService } from \"./regenerator/service.js\";\nimport { ProposalExecutor } from \"./regenerator/executor.js\";\nimport { ExecutorProposalSink } from \"./regenerator/sinks.js\";\nimport \"./regenerator/index.js\";\nimport { ContractsrcSchema, DEFAULT_CONTRACTSRC, FolderConventionsSchema, OpenApiConfigSchema, OpenApiExportConfigSchema, OpenApiSourceConfigSchema } from \"./workspace-config/contractsrc-schema.js\";\nimport \"./workspace-config/index.js\";\nimport { WorkflowRegistry } from \"./workflow/spec.js\";\nimport { WorkflowValidationError, assertWorkflowSpecValid, validateWorkflowSpec } from \"./workflow/validation.js\";\nimport { evaluateExpression } from \"./workflow/expression.js\";\nimport { WorkflowPreFlightError, WorkflowRunner } from \"./workflow/runner.js\";\nimport { InMemoryStateStore } from \"./workflow/adapters/memory-store.js\";\nimport { PrismaStateStore } from \"./workflow/adapters/db-adapter.js\";\nimport { createFileStateStore } from \"./workflow/adapters/file-adapter.js\";\nimport \"./workflow/index.js\";\nimport { docBlockToPresentationSpec, docBlockToPresentationV2, docBlocksToPresentationRoutes, docBlocksToPresentationSpecs, mapDocRoutes } from \"./docs/presentations.js\";\nimport { DocRegistry, defaultDocRegistry, docId, listRegisteredDocBlocks, registerDocBlocks } from \"./docs/registry.js\";\nimport { techContractsDocs } from \"./docs/tech-contracts.docs.js\";\nimport { metaDocs } from \"./docs/meta.docs.js\";\nimport \"./docs/index.js\";\nimport { docBlockToMarkdown, eventToMarkdown, exportFeature, exportSpec, featureToMarkdown, operationSpecToAgentPrompt, operationSpecToContextMarkdown, operationSpecToFullMarkdown, presentationToMarkdown } from \"./llm/exporters.js\";\nimport { AGENT_SYSTEM_PROMPTS, formatPlanForAgent, generateFixViolationsPrompt, generateImplementationPlan, generateImplementationPrompt, generateReviewPrompt, generateTestPrompt, generateVerificationPrompt } from \"./llm/prompts.js\";\nimport \"./llm/index.js\";\n\n//#region src/index.ts\ninit_registry_utils();\n\n//#endregion\nexport { AGENT_SYSTEM_PROMPTS, AccountBalanceRecord, AppBlueprintRegistry, BankAccountRecord, BankTransactionRecord, CapabilityRegistry, CompleteOnboardingBaseInput, CompleteOnboardingBaseOutput, CompleteOnboardingBaseSpec, ContractRegistryFileSchema, ContractRegistryItemSchema, ContractRegistryItemTypeSchema, ContractRegistryManifestSchema, ContractsrcSchema, CreateIntegrationConnection, CreateKnowledgeSource, DEFAULT_CONTRACTSRC, DataViewQueryGenerator, DataViewRegistry, DataViewRuntime, DeleteIntegrationConnection, DeleteKnowledgeSource, DeleteOnboardingDraftBaseSpec, DeleteOnboardingDraftOutput, DocRegistry, ExecutorProposalSink, ExperimentEvaluator, ExperimentRegistry, FeatureRegistry, FolderConventionsSchema, FormRegistry, GetOnboardingDraftBaseSpec, GetOnboardingDraftOutput, GroupingStrategies, InMemoryStateStore, IntegrationSpecRegistry, KnowledgeSpaceRegistry, ListIntegrationConnections, ListKnowledgeSources, MigrationRegistry, OPAPolicyAdapter, OPENBANKING_PII_FIELDS, OPENBANKING_TELEMETRY_EVENTS, OpenApiConfigSchema, OpenApiExportConfigSchema, OpenApiSourceConfigSchema, OpenBankingFeature, OpenBankingGetAccount, OpenBankingGetBalances, OpenBankingListAccounts, OpenBankingListTransactions, OpenBankingRefreshBalances, OpenBankingSyncAccounts, OpenBankingSyncTransactions, OperationSpecRegistry, Owners, OwnersEnum, PolicyEngine, PolicyRegistry, PresentationRegistry, PrismaStateStore, PromptRegistry, ProposalExecutor, RegeneratorService, ResourceRegistry, SaveOnboardingDraftBaseSpec, SaveOnboardingDraftInput, SaveOnboardingDraftOutput, StabilityEnum, Tags, TagsEnum, TelemetryAnomalyMonitor, TelemetryRegistry, TelemetryTracker, TestIntegrationConnection, TestRegistry, TestRunner, ThemeRegistry, TransformEngine, TriggerKnowledgeSourceSync, UpdateIntegrationConnection, UpdateKnowledgeSource, WorkflowPreFlightError, WorkflowRegistry, WorkflowRunner, WorkflowValidationError, assertPrimaryOpenBankingReady, assertWorkflowSpecValid, behaviorToEnvelope, buildOPAInput, buildZodWithRelations, capabilityKey, composeAppConfig, createDefaultIntegrationSpecRegistry, createDefaultTransformEngine, createEngineWithDefaults, createFeatureModule, createFetchHandler, createFileStateStore, createFormRenderer, createMcpServer, dataViewKey, defaultDocRegistry, defaultGqlField, defaultMcpTool, defaultRestPath, defineCapability, defineCommand, defineEvent, defineFormSpec, definePrompt, defineQuery, defineResourceTemplate, K5 as defineSchemaModel, docBlockToMarkdown, docBlockToPresentationSpec, docBlockToPresentationV2, docBlocksToPresentationRoutes, docBlocksToPresentationSpecs, docId, elevenLabsIntegrationSpec, elysiaPlugin, emailThreadsKnowledgeSpace, ensurePrimaryOpenBankingIntegration, errorToEnvelope, evalPredicate, evaluateExpression, eventKey, eventToMarkdown, exportFeature, exportSpec, expressRouter, featureToMarkdown, filterBy, financialDocsKnowledgeSpace, financialOverviewKnowledgeSpace, formatPlanForAgent, gcsStorageIntegrationSpec, generateFixViolationsPrompt, generateImplementationPlan, generateImplementationPrompt, generateReviewPrompt, generateTestPrompt, generateVerificationPrompt, getUniqueDomains, getUniqueOwners, getUniqueTags, gmailIntegrationSpec, googleCalendarIntegrationSpec, groupBy, groupByMultiple, groupByToArray, installFeature, installOp, integrationContracts, isEmitDeclRef, isResourceRef, jsonSchemaForPresentation, jsonSchemaForSpec, knowledgeContracts, listRegisteredDocBlocks, makeAppBlueprintKey, makeEmit, makeExperimentKey, makeIntegrationSpecKey, makeKnowledgeSpaceKey, makeNextAppHandler, makeNextPagesHandler, makePolicyKey, makeTelemetryKey, makeTestKey, makeThemeRef, mapDocRoutes, metaDocs, mistralIntegrationSpec, op, opKey, openApiForRegistry, openBankingAccountsReadCapability, openBankingBalancesReadCapability, openBankingTransactionsReadCapability, operationSpecToAgentPrompt, operationSpecToContextMarkdown, operationSpecToFullMarkdown, postmarkIntegrationSpec, powensIntegrationSpec, presentationToMarkdown, productCanonKnowledgeSpace, qdrantIntegrationSpec, redactOpenBankingTelemetryPayload, registerBasicValidation, registerContractsOnBuilder, registerDefaultReactRenderer, registerDocBlocks, registerElevenLabsIntegration, registerEmailThreadsKnowledgeSpace, registerFeature, registerFinancialDocsKnowledgeSpace, registerFinancialOverviewKnowledgeSpace, registerGcsStorageIntegration, registerGmailIntegration, registerGoogleCalendarIntegration, registerIntegrationContracts, registerKnowledgeContracts, registerMistralIntegration, registerOpenBankingCapabilities, registerOpenBankingContracts, registerPostmarkIntegration, registerPowensIntegration, registerProductCanonKnowledgeSpace, registerQdrantIntegration, registerReactToMarkdownRenderer, registerStripeIntegration, registerSupportFaqKnowledgeSpace, registerTwilioSmsIntegration, registerUploadedDocsKnowledgeSpace, renderFeaturePresentation, resolveAppConfig, resourceRef, rnReusablesDriver, schemaToMarkdown, schemaToMarkdownDetail, schemaToMarkdownList, schemaToMarkdownSummary, schemaToMarkdownTable, shadcnDriver, stripeIntegrationSpec, supportFaqKnowledgeSpace, techContractsDocs, telemetryToEnvelope, twilioSmsIntegrationSpec, uploadedDocsKnowledgeSpace, validateFeatureTargetsV2, validateWorkflowSpec };"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAiHA,qBAAqB"}
@@ -1,2 +1,2 @@
1
- import "./registry.js";
1
+ import "./operations/registry.js";
2
2
  import "zod";
@@ -1,5 +1,6 @@
1
- import { defineCommand, defineQuery } from "../../../operation.js";
1
+ import { defineCommand, defineQuery } from "../../../operations/operation.js";
2
2
  import { E5, x8 } from "../../../schema/dist/index.js";
3
+ import "../../../operations/index.js";
3
4
  import { BankAccountRecord } from "../models.js";
4
5
  import { OPENBANKING_TELEMETRY_EVENTS } from "../telemetry.js";
5
6
 
@@ -1 +1 @@
1
- {"version":3,"file":"accounts.js","names":[],"sources":["../../../../../../../../../libs/contracts/dist/integrations/openbanking/contracts/accounts.js"],"sourcesContent":["import { E5, x8 } from \"../../../schema/dist/index.js\";\nimport { defineCommand, defineQuery } from \"../../../operation.js\";\nimport { BankAccountRecord } from \"../models.js\";\nimport { OPENBANKING_TELEMETRY_EVENTS } from \"../telemetry.js\";\n\n//#region src/integrations/openbanking/contracts/accounts.ts\nconst OpenBankingListAccountsInput = new x8({\n\tname: \"OpenBankingListAccountsInput\",\n\tdescription: \"Parameters for listing bank accounts through the open banking provider.\",\n\tfields: {\n\t\ttenantId: {\n\t\t\ttype: E5.ID(),\n\t\t\tisOptional: false\n\t\t},\n\t\tuserId: {\n\t\t\ttype: E5.ID(),\n\t\t\tisOptional: false\n\t\t},\n\t\tconnectionId: {\n\t\t\ttype: E5.ID(),\n\t\t\tisOptional: true\n\t\t},\n\t\tincludeBalances: {\n\t\t\ttype: E5.Boolean(),\n\t\t\tisOptional: true\n\t\t},\n\t\tinstitutionId: {\n\t\t\ttype: E5.String_unsecure(),\n\t\t\tisOptional: true\n\t\t},\n\t\tcursor: {\n\t\t\ttype: E5.String_unsecure(),\n\t\t\tisOptional: true\n\t\t},\n\t\tpageSize: {\n\t\t\ttype: E5.Int_unsecure(),\n\t\t\tisOptional: true\n\t\t}\n\t}\n});\nconst OpenBankingListAccountsOutput = new x8({\n\tname: \"OpenBankingListAccountsOutput\",\n\tdescription: \"Paginated list of bank accounts available to the tenant and user.\",\n\tfields: {\n\t\taccounts: {\n\t\t\ttype: BankAccountRecord,\n\t\t\tisOptional: false,\n\t\t\tisArray: true\n\t\t},\n\t\tnextCursor: {\n\t\t\ttype: E5.String_unsecure(),\n\t\t\tisOptional: true\n\t\t},\n\t\thasMore: {\n\t\t\ttype: E5.Boolean(),\n\t\t\tisOptional: true\n\t\t}\n\t}\n});\nconst OpenBankingGetAccountInput = new x8({\n\tname: \"OpenBankingGetAccountInput\",\n\tdescription: \"Parameters for retrieving a specific bank account.\",\n\tfields: {\n\t\ttenantId: {\n\t\t\ttype: E5.ID(),\n\t\t\tisOptional: false\n\t\t},\n\t\taccountId: {\n\t\t\ttype: E5.ID(),\n\t\t\tisOptional: false\n\t\t},\n\t\tincludeBalances: {\n\t\t\ttype: E5.Boolean(),\n\t\t\tisOptional: true\n\t\t},\n\t\tincludeLatestTransactions: {\n\t\t\ttype: E5.Boolean(),\n\t\t\tisOptional: true\n\t\t}\n\t}\n});\nconst OpenBankingSyncAccountsInput = new x8({\n\tname: \"OpenBankingSyncAccountsInput\",\n\tdescription: \"Command payload to trigger an account synchronisation against the open banking provider.\",\n\tfields: {\n\t\ttenantId: {\n\t\t\ttype: E5.ID(),\n\t\t\tisOptional: false\n\t\t},\n\t\tuserId: {\n\t\t\ttype: E5.ID(),\n\t\t\tisOptional: true\n\t\t},\n\t\tconnectionId: {\n\t\t\ttype: E5.ID(),\n\t\t\tisOptional: false\n\t\t},\n\t\taccountIds: {\n\t\t\ttype: E5.ID(),\n\t\t\tisArray: true,\n\t\t\tisOptional: true\n\t\t},\n\t\tforceFullRefresh: {\n\t\t\ttype: E5.Boolean(),\n\t\t\tisOptional: true\n\t\t},\n\t\ttriggerWorkflows: {\n\t\t\ttype: E5.Boolean(),\n\t\t\tisOptional: true\n\t\t}\n\t}\n});\nconst OpenBankingSyncAccountsOutput = new x8({\n\tname: \"OpenBankingSyncAccountsOutput\",\n\tdescription: \"Result of a bank account synchronisation run.\",\n\tfields: {\n\t\tsynced: {\n\t\t\ttype: E5.Int_unsecure(),\n\t\t\tisOptional: false\n\t\t},\n\t\tfailed: {\n\t\t\ttype: E5.Int_unsecure(),\n\t\t\tisOptional: false\n\t\t},\n\t\terrors: {\n\t\t\ttype: E5.String_unsecure(),\n\t\t\tisArray: true,\n\t\t\tisOptional: true\n\t\t},\n\t\tnextSyncSuggestedAt: {\n\t\t\ttype: E5.DateTime(),\n\t\t\tisOptional: true\n\t\t}\n\t}\n});\nconst OpenBankingListAccounts = defineQuery({\n\tmeta: {\n\t\tname: \"openbanking.accounts.list\",\n\t\tversion: 1,\n\t\tdescription: \"List bank accounts available to a tenant/user via Powens Open Banking.\",\n\t\tgoal: \"Provide downstream workflows with the set of accounts accessible via the configured open banking connection.\",\n\t\tcontext: \"Used by Pocket Family Office dashboards and sync workflows to enumerate bank accounts prior to syncing balances or transactions.\",\n\t\towners: [\"platform.finance\"],\n\t\ttags: [\n\t\t\t\"open-banking\",\n\t\t\t\"powens\",\n\t\t\t\"accounts\"\n\t\t],\n\t\tstability: \"experimental\"\n\t},\n\tio: {\n\t\tinput: OpenBankingListAccountsInput,\n\t\toutput: OpenBankingListAccountsOutput\n\t},\n\tpolicy: { auth: \"user\" }\n});\nconst OpenBankingGetAccount = defineQuery({\n\tmeta: {\n\t\tname: \"openbanking.accounts.get\",\n\t\tversion: 1,\n\t\tdescription: \"Retrieve the canonical bank account record for the given account identifier.\",\n\t\tgoal: \"Allow user-facing experiences and automations to display up-to-date account metadata.\",\n\t\tcontext: \"Invoked by UI surfaces and workflow automation steps that require detailed metadata for a specific bank account.\",\n\t\towners: [\"platform.finance\"],\n\t\ttags: [\n\t\t\t\"open-banking\",\n\t\t\t\"powens\",\n\t\t\t\"accounts\"\n\t\t],\n\t\tstability: \"experimental\"\n\t},\n\tio: {\n\t\tinput: OpenBankingGetAccountInput,\n\t\toutput: BankAccountRecord\n\t},\n\tpolicy: { auth: \"user\" }\n});\nconst OpenBankingSyncAccounts = defineCommand({\n\tmeta: {\n\t\tname: \"openbanking.accounts.sync\",\n\t\tversion: 1,\n\t\tdescription: \"Initiate a synchronisation run to refresh bank account metadata from Powens.\",\n\t\tgoal: \"Keep canonical bank account records aligned with the external open banking provider.\",\n\t\tcontext: \"Triggered by scheduled workflows or manual operator actions to reconcile account metadata prior to transaction/balance syncs.\",\n\t\towners: [\"platform.finance\"],\n\t\ttags: [\n\t\t\t\"open-banking\",\n\t\t\t\"powens\",\n\t\t\t\"accounts\"\n\t\t],\n\t\tstability: \"experimental\"\n\t},\n\tio: {\n\t\tinput: OpenBankingSyncAccountsInput,\n\t\toutput: OpenBankingSyncAccountsOutput\n\t},\n\tpolicy: { auth: \"admin\" },\n\ttelemetry: {\n\t\tsuccess: {\n\t\t\tevent: { name: OPENBANKING_TELEMETRY_EVENTS.accountsSynced },\n\t\t\tproperties: ({ input, output }) => {\n\t\t\t\tconst payload = input;\n\t\t\t\tconst result = output;\n\t\t\t\treturn {\n\t\t\t\t\ttenantId: payload?.tenantId,\n\t\t\t\t\tconnectionId: payload?.connectionId,\n\t\t\t\t\tsynced: result?.synced,\n\t\t\t\t\tfailed: result?.failed\n\t\t\t\t};\n\t\t\t}\n\t\t},\n\t\tfailure: {\n\t\t\tevent: { name: OPENBANKING_TELEMETRY_EVENTS.accountsSyncFailed },\n\t\t\tproperties: ({ input, error }) => {\n\t\t\t\tconst payload = input;\n\t\t\t\treturn {\n\t\t\t\t\ttenantId: payload?.tenantId,\n\t\t\t\t\tconnectionId: payload?.connectionId,\n\t\t\t\t\terror: error instanceof Error ? error.message : String(error ?? \"unknown\")\n\t\t\t\t};\n\t\t\t}\n\t\t}\n\t}\n});\nconst openBankingAccountContracts = {\n\tOpenBankingListAccounts,\n\tOpenBankingGetAccount,\n\tOpenBankingSyncAccounts\n};\nfunction registerOpenBankingAccountContracts(registry) {\n\treturn registry.register(OpenBankingListAccounts).register(OpenBankingGetAccount).register(OpenBankingSyncAccounts);\n}\n\n//#endregion\nexport { OpenBankingGetAccount, OpenBankingListAccounts, OpenBankingSyncAccounts, openBankingAccountContracts, registerOpenBankingAccountContracts };"],"mappings":"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"}
1
+ {"version":3,"file":"accounts.js","names":[],"sources":["../../../../../../../../../libs/contracts/dist/integrations/openbanking/contracts/accounts.js"],"sourcesContent":["import { E5, x8 } from \"../../../schema/dist/index.js\";\nimport { defineCommand, defineQuery } from \"../../../operations/operation.js\";\nimport \"../../../operations/index.js\";\nimport { BankAccountRecord } from \"../models.js\";\nimport { OPENBANKING_TELEMETRY_EVENTS } from \"../telemetry.js\";\n\n//#region src/integrations/openbanking/contracts/accounts.ts\nconst OpenBankingListAccountsInput = new x8({\n\tname: \"OpenBankingListAccountsInput\",\n\tdescription: \"Parameters for listing bank accounts through the open banking provider.\",\n\tfields: {\n\t\ttenantId: {\n\t\t\ttype: E5.ID(),\n\t\t\tisOptional: false\n\t\t},\n\t\tuserId: {\n\t\t\ttype: E5.ID(),\n\t\t\tisOptional: false\n\t\t},\n\t\tconnectionId: {\n\t\t\ttype: E5.ID(),\n\t\t\tisOptional: true\n\t\t},\n\t\tincludeBalances: {\n\t\t\ttype: E5.Boolean(),\n\t\t\tisOptional: true\n\t\t},\n\t\tinstitutionId: {\n\t\t\ttype: E5.String_unsecure(),\n\t\t\tisOptional: true\n\t\t},\n\t\tcursor: {\n\t\t\ttype: E5.String_unsecure(),\n\t\t\tisOptional: true\n\t\t},\n\t\tpageSize: {\n\t\t\ttype: E5.Int_unsecure(),\n\t\t\tisOptional: true\n\t\t}\n\t}\n});\nconst OpenBankingListAccountsOutput = new x8({\n\tname: \"OpenBankingListAccountsOutput\",\n\tdescription: \"Paginated list of bank accounts available to the tenant and user.\",\n\tfields: {\n\t\taccounts: {\n\t\t\ttype: BankAccountRecord,\n\t\t\tisOptional: false,\n\t\t\tisArray: true\n\t\t},\n\t\tnextCursor: {\n\t\t\ttype: E5.String_unsecure(),\n\t\t\tisOptional: true\n\t\t},\n\t\thasMore: {\n\t\t\ttype: E5.Boolean(),\n\t\t\tisOptional: true\n\t\t}\n\t}\n});\nconst OpenBankingGetAccountInput = new x8({\n\tname: \"OpenBankingGetAccountInput\",\n\tdescription: \"Parameters for retrieving a specific bank account.\",\n\tfields: {\n\t\ttenantId: {\n\t\t\ttype: E5.ID(),\n\t\t\tisOptional: false\n\t\t},\n\t\taccountId: {\n\t\t\ttype: E5.ID(),\n\t\t\tisOptional: false\n\t\t},\n\t\tincludeBalances: {\n\t\t\ttype: E5.Boolean(),\n\t\t\tisOptional: true\n\t\t},\n\t\tincludeLatestTransactions: {\n\t\t\ttype: E5.Boolean(),\n\t\t\tisOptional: true\n\t\t}\n\t}\n});\nconst OpenBankingSyncAccountsInput = new x8({\n\tname: \"OpenBankingSyncAccountsInput\",\n\tdescription: \"Command payload to trigger an account synchronisation against the open banking provider.\",\n\tfields: {\n\t\ttenantId: {\n\t\t\ttype: E5.ID(),\n\t\t\tisOptional: false\n\t\t},\n\t\tuserId: {\n\t\t\ttype: E5.ID(),\n\t\t\tisOptional: true\n\t\t},\n\t\tconnectionId: {\n\t\t\ttype: E5.ID(),\n\t\t\tisOptional: false\n\t\t},\n\t\taccountIds: {\n\t\t\ttype: E5.ID(),\n\t\t\tisArray: true,\n\t\t\tisOptional: true\n\t\t},\n\t\tforceFullRefresh: {\n\t\t\ttype: E5.Boolean(),\n\t\t\tisOptional: true\n\t\t},\n\t\ttriggerWorkflows: {\n\t\t\ttype: E5.Boolean(),\n\t\t\tisOptional: true\n\t\t}\n\t}\n});\nconst OpenBankingSyncAccountsOutput = new x8({\n\tname: \"OpenBankingSyncAccountsOutput\",\n\tdescription: \"Result of a bank account synchronisation run.\",\n\tfields: {\n\t\tsynced: {\n\t\t\ttype: E5.Int_unsecure(),\n\t\t\tisOptional: false\n\t\t},\n\t\tfailed: {\n\t\t\ttype: E5.Int_unsecure(),\n\t\t\tisOptional: false\n\t\t},\n\t\terrors: {\n\t\t\ttype: E5.String_unsecure(),\n\t\t\tisArray: true,\n\t\t\tisOptional: true\n\t\t},\n\t\tnextSyncSuggestedAt: {\n\t\t\ttype: E5.DateTime(),\n\t\t\tisOptional: true\n\t\t}\n\t}\n});\nconst OpenBankingListAccounts = defineQuery({\n\tmeta: {\n\t\tname: \"openbanking.accounts.list\",\n\t\tversion: 1,\n\t\tdescription: \"List bank accounts available to a tenant/user via Powens Open Banking.\",\n\t\tgoal: \"Provide downstream workflows with the set of accounts accessible via the configured open banking connection.\",\n\t\tcontext: \"Used by Pocket Family Office dashboards and sync workflows to enumerate bank accounts prior to syncing balances or transactions.\",\n\t\towners: [\"platform.finance\"],\n\t\ttags: [\n\t\t\t\"open-banking\",\n\t\t\t\"powens\",\n\t\t\t\"accounts\"\n\t\t],\n\t\tstability: \"experimental\"\n\t},\n\tio: {\n\t\tinput: OpenBankingListAccountsInput,\n\t\toutput: OpenBankingListAccountsOutput\n\t},\n\tpolicy: { auth: \"user\" }\n});\nconst OpenBankingGetAccount = defineQuery({\n\tmeta: {\n\t\tname: \"openbanking.accounts.get\",\n\t\tversion: 1,\n\t\tdescription: \"Retrieve the canonical bank account record for the given account identifier.\",\n\t\tgoal: \"Allow user-facing experiences and automations to display up-to-date account metadata.\",\n\t\tcontext: \"Invoked by UI surfaces and workflow automation steps that require detailed metadata for a specific bank account.\",\n\t\towners: [\"platform.finance\"],\n\t\ttags: [\n\t\t\t\"open-banking\",\n\t\t\t\"powens\",\n\t\t\t\"accounts\"\n\t\t],\n\t\tstability: \"experimental\"\n\t},\n\tio: {\n\t\tinput: OpenBankingGetAccountInput,\n\t\toutput: BankAccountRecord\n\t},\n\tpolicy: { auth: \"user\" }\n});\nconst OpenBankingSyncAccounts = defineCommand({\n\tmeta: {\n\t\tname: \"openbanking.accounts.sync\",\n\t\tversion: 1,\n\t\tdescription: \"Initiate a synchronisation run to refresh bank account metadata from Powens.\",\n\t\tgoal: \"Keep canonical bank account records aligned with the external open banking provider.\",\n\t\tcontext: \"Triggered by scheduled workflows or manual operator actions to reconcile account metadata prior to transaction/balance syncs.\",\n\t\towners: [\"platform.finance\"],\n\t\ttags: [\n\t\t\t\"open-banking\",\n\t\t\t\"powens\",\n\t\t\t\"accounts\"\n\t\t],\n\t\tstability: \"experimental\"\n\t},\n\tio: {\n\t\tinput: OpenBankingSyncAccountsInput,\n\t\toutput: OpenBankingSyncAccountsOutput\n\t},\n\tpolicy: { auth: \"admin\" },\n\ttelemetry: {\n\t\tsuccess: {\n\t\t\tevent: { name: OPENBANKING_TELEMETRY_EVENTS.accountsSynced },\n\t\t\tproperties: ({ input, output }) => {\n\t\t\t\tconst payload = input;\n\t\t\t\tconst result = output;\n\t\t\t\treturn {\n\t\t\t\t\ttenantId: payload?.tenantId,\n\t\t\t\t\tconnectionId: payload?.connectionId,\n\t\t\t\t\tsynced: result?.synced,\n\t\t\t\t\tfailed: result?.failed\n\t\t\t\t};\n\t\t\t}\n\t\t},\n\t\tfailure: {\n\t\t\tevent: { name: OPENBANKING_TELEMETRY_EVENTS.accountsSyncFailed },\n\t\t\tproperties: ({ input, error }) => {\n\t\t\t\tconst payload = input;\n\t\t\t\treturn {\n\t\t\t\t\ttenantId: payload?.tenantId,\n\t\t\t\t\tconnectionId: payload?.connectionId,\n\t\t\t\t\terror: error instanceof Error ? error.message : String(error ?? \"unknown\")\n\t\t\t\t};\n\t\t\t}\n\t\t}\n\t}\n});\nconst openBankingAccountContracts = {\n\tOpenBankingListAccounts,\n\tOpenBankingGetAccount,\n\tOpenBankingSyncAccounts\n};\nfunction registerOpenBankingAccountContracts(registry) {\n\treturn registry.register(OpenBankingListAccounts).register(OpenBankingGetAccount).register(OpenBankingSyncAccounts);\n}\n\n//#endregion\nexport { OpenBankingGetAccount, OpenBankingListAccounts, OpenBankingSyncAccounts, openBankingAccountContracts, registerOpenBankingAccountContracts };"],"mappings":"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"}
@@ -1,5 +1,6 @@
1
- import { defineCommand, defineQuery } from "../../../operation.js";
1
+ import { defineCommand, defineQuery } from "../../../operations/operation.js";
2
2
  import { E5, x8 } from "../../../schema/dist/index.js";
3
+ import "../../../operations/index.js";
3
4
  import { AccountBalanceRecord } from "../models.js";
4
5
  import { OPENBANKING_TELEMETRY_EVENTS } from "../telemetry.js";
5
6