@contractspec/lib.contracts 1.46.2 → 1.47.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (103) hide show
  1. package/dist/app-config/app-config.capability.d.ts +7 -0
  2. package/dist/app-config/app-config.capability.js +23 -0
  3. package/dist/app-config/app-config.feature.d.ts +1 -2
  4. package/dist/app-config/app-config.feature.js +9 -2
  5. package/dist/app-config/contracts.d.ts +50 -50
  6. package/dist/app-config/events.d.ts +27 -27
  7. package/dist/app-config/index.d.ts +4 -3
  8. package/dist/app-config/index.js +3 -2
  9. package/dist/app-config/lifecycle-contracts.d.ts +55 -55
  10. package/dist/app-config/runtime.d.ts +6 -6
  11. package/dist/app-config/spec.d.ts +9 -5
  12. package/dist/app-config/spec.js +5 -1
  13. package/dist/contract-registry/schemas.d.ts +2 -2
  14. package/dist/data-views/runtime.d.ts +5 -1
  15. package/dist/data-views/runtime.js +34 -7
  16. package/dist/data-views/spec.d.ts +1 -1
  17. package/dist/docs/index.js +2 -1
  18. package/dist/docs/tech/cli.docblock.d.ts +6 -0
  19. package/dist/docs/tech/cli.docblock.js +138 -0
  20. package/dist/docs/tech/contracts/vertical-pocket-family-office.docblock.js +106 -1
  21. package/dist/docs/tech/studio/project-access-teams.docblock.js +3 -1
  22. package/dist/examples/index.d.ts +9 -1
  23. package/dist/examples/index.js +8 -1
  24. package/dist/examples/registry.d.ts +3 -25
  25. package/dist/examples/registry.js +4 -60
  26. package/dist/examples/schema.d.ts +17 -17
  27. package/dist/examples/types.d.ts +1 -1
  28. package/dist/features/types.d.ts +1 -1
  29. package/dist/index.d.ts +27 -26
  30. package/dist/index.js +6 -6
  31. package/dist/install.d.ts +1 -1
  32. package/dist/integrations/index.d.ts +2 -2
  33. package/dist/integrations/index.js +2 -2
  34. package/dist/integrations/integrations.capability.d.ts +7 -0
  35. package/dist/integrations/integrations.capability.js +17 -0
  36. package/dist/integrations/integrations.feature.d.ts +1 -2
  37. package/dist/integrations/integrations.feature.js +9 -2
  38. package/dist/integrations/openbanking/contracts/accounts.d.ts +66 -66
  39. package/dist/integrations/openbanking/contracts/balances.d.ts +34 -34
  40. package/dist/integrations/openbanking/models.d.ts +55 -55
  41. package/dist/integrations/openbanking/openbanking.capability.d.ts +7 -0
  42. package/dist/integrations/openbanking/openbanking.capability.js +21 -0
  43. package/dist/integrations/openbanking/openbanking.feature.d.ts +1 -2
  44. package/dist/integrations/openbanking/openbanking.feature.js +9 -2
  45. package/dist/integrations/operations.d.ts +102 -102
  46. package/dist/integrations/providers/elevenlabs.d.ts +1 -0
  47. package/dist/integrations/providers/elevenlabs.js +3 -2
  48. package/dist/integrations/providers/gcs-storage.d.ts +1 -0
  49. package/dist/integrations/providers/gcs-storage.js +3 -2
  50. package/dist/integrations/providers/gmail.d.ts +1 -0
  51. package/dist/integrations/providers/gmail.js +3 -2
  52. package/dist/integrations/providers/google-calendar.d.ts +1 -0
  53. package/dist/integrations/providers/google-calendar.js +3 -2
  54. package/dist/integrations/providers/impls/provider-factory.js +2 -1
  55. package/dist/integrations/providers/mistral.d.ts +1 -0
  56. package/dist/integrations/providers/mistral.js +3 -2
  57. package/dist/integrations/providers/postmark.d.ts +1 -0
  58. package/dist/integrations/providers/postmark.js +3 -2
  59. package/dist/integrations/providers/powens.d.ts +1 -0
  60. package/dist/integrations/providers/powens.js +3 -2
  61. package/dist/integrations/providers/qdrant.d.ts +1 -0
  62. package/dist/integrations/providers/qdrant.js +3 -2
  63. package/dist/integrations/providers/stripe.d.ts +1 -0
  64. package/dist/integrations/providers/stripe.js +3 -2
  65. package/dist/integrations/providers/twilio-sms.d.ts +1 -0
  66. package/dist/integrations/providers/twilio-sms.js +3 -2
  67. package/dist/integrations/spec.d.ts +5 -1
  68. package/dist/integrations/spec.js +5 -1
  69. package/dist/knowledge/knowledge.capability.d.ts +7 -0
  70. package/dist/knowledge/knowledge.capability.js +21 -0
  71. package/dist/knowledge/knowledge.feature.d.ts +1 -2
  72. package/dist/knowledge/knowledge.feature.js +9 -2
  73. package/dist/knowledge/operations.d.ts +66 -66
  74. package/dist/llm/exporters.d.ts +1 -1
  75. package/dist/llm/types.d.ts +1 -1
  76. package/dist/onboarding-base.d.ts +29 -29
  77. package/dist/operations/operation.d.ts +1 -1
  78. package/dist/server/mcp/createMcpServer.js +1 -1
  79. package/dist/server/mcp/mcpTypes.d.ts +1 -1
  80. package/dist/server/mcp/registerPresentations.js +1 -1
  81. package/dist/server/mcp/registerResources.js +2 -2
  82. package/dist/tests/index.d.ts +2 -2
  83. package/dist/tests/index.js +2 -2
  84. package/dist/tests/spec.d.ts +2 -1
  85. package/dist/tests/spec.js +4 -1
  86. package/dist/types.d.ts +2 -2
  87. package/dist/workflow/index.d.ts +8 -1
  88. package/dist/workflow/index.js +8 -1
  89. package/dist/workflow/runner.d.ts +2 -2
  90. package/dist/workflow/spec.d.ts +1 -1
  91. package/dist/workflow/validation.d.ts +1 -1
  92. package/dist/workspace-config/contractsrc-schema.d.ts +45 -974
  93. package/dist/workspace-config/contractsrc-schema.js +89 -55
  94. package/dist/workspace-config/contractsrc-types.d.ts +346 -0
  95. package/dist/workspace-config/contractsrc-types.js +0 -0
  96. package/dist/workspace-config/index.d.ts +3 -2
  97. package/package.json +27 -25
  98. package/dist/docs/tech/contracts/create-subscription.docblock.d.ts +0 -6
  99. package/dist/docs/tech/contracts/create-subscription.docblock.js +0 -21
  100. package/dist/docs/tech/contracts/graphql-typed-outputs.docblock.d.ts +0 -6
  101. package/dist/docs/tech/contracts/graphql-typed-outputs.docblock.js +0 -21
  102. package/dist/docs/tech/templates/runtime.docblock.d.ts +0 -6
  103. package/dist/docs/tech/templates/runtime.docblock.js +0 -21
@@ -1,52 +1,52 @@
1
- import { EventSpecMeta } from "../events.js";
2
1
  import { OperationSpec } from "../operations/operation.js";
3
2
  import { OperationSpecRegistry } from "../operations/registry.js";
4
3
  import "../operations/index.js";
4
+ import { EventSpecMeta } from "../events.js";
5
5
  import "../index.js";
6
- import * as _contractspec_lib_schema102 from "@contractspec/lib.schema";
6
+ import * as _contractspec_lib_schema200 from "@contractspec/lib.schema";
7
7
  import { SchemaModel } from "@contractspec/lib.schema";
8
8
 
9
9
  //#region src/app-config/lifecycle-contracts.d.ts
10
10
  declare const CreateTenantConfigDraftCommand: OperationSpec<SchemaModel<{
11
11
  tenantId: {
12
- type: _contractspec_lib_schema102.FieldType<string, string>;
12
+ type: _contractspec_lib_schema200.FieldType<string, string>;
13
13
  isOptional: false;
14
14
  };
15
15
  appId: {
16
- type: _contractspec_lib_schema102.FieldType<string, string>;
16
+ type: _contractspec_lib_schema200.FieldType<string, string>;
17
17
  isOptional: false;
18
18
  };
19
19
  blueprintName: {
20
- type: _contractspec_lib_schema102.FieldType<string, string>;
20
+ type: _contractspec_lib_schema200.FieldType<string, string>;
21
21
  isOptional: false;
22
22
  };
23
23
  blueprintVersion: {
24
- type: _contractspec_lib_schema102.FieldType<number, number>;
24
+ type: _contractspec_lib_schema200.FieldType<number, number>;
25
25
  isOptional: false;
26
26
  };
27
27
  environment: {
28
- type: _contractspec_lib_schema102.FieldType<string, string>;
28
+ type: _contractspec_lib_schema200.FieldType<string, string>;
29
29
  isOptional: true;
30
30
  };
31
31
  fromVersion: {
32
- type: _contractspec_lib_schema102.FieldType<string, string>;
32
+ type: _contractspec_lib_schema200.FieldType<string, string>;
33
33
  isOptional: true;
34
34
  };
35
35
  createdBy: {
36
- type: _contractspec_lib_schema102.FieldType<string, string>;
36
+ type: _contractspec_lib_schema200.FieldType<string, string>;
37
37
  isOptional: false;
38
38
  };
39
39
  }>, SchemaModel<{
40
40
  version: {
41
- type: _contractspec_lib_schema102.FieldType<string, string>;
41
+ type: _contractspec_lib_schema200.FieldType<string, string>;
42
42
  isOptional: false;
43
43
  };
44
44
  status: {
45
- type: _contractspec_lib_schema102.FieldType<string, string>;
45
+ type: _contractspec_lib_schema200.FieldType<string, string>;
46
46
  isOptional: false;
47
47
  };
48
48
  createdAt: {
49
- type: _contractspec_lib_schema102.FieldType<Date, string>;
49
+ type: _contractspec_lib_schema200.FieldType<Date, string>;
50
50
  isOptional: false;
51
51
  };
52
52
  }>, {
@@ -55,32 +55,32 @@ declare const CreateTenantConfigDraftCommand: OperationSpec<SchemaModel<{
55
55
  }[]>;
56
56
  declare const PromoteTenantConfigToPreviewCommand: OperationSpec<SchemaModel<{
57
57
  tenantId: {
58
- type: _contractspec_lib_schema102.FieldType<string, string>;
58
+ type: _contractspec_lib_schema200.FieldType<string, string>;
59
59
  isOptional: false;
60
60
  };
61
61
  appId: {
62
- type: _contractspec_lib_schema102.FieldType<string, string>;
62
+ type: _contractspec_lib_schema200.FieldType<string, string>;
63
63
  isOptional: false;
64
64
  };
65
65
  version: {
66
- type: _contractspec_lib_schema102.FieldType<string, string>;
66
+ type: _contractspec_lib_schema200.FieldType<string, string>;
67
67
  isOptional: false;
68
68
  };
69
69
  promotedBy: {
70
- type: _contractspec_lib_schema102.FieldType<string, string>;
70
+ type: _contractspec_lib_schema200.FieldType<string, string>;
71
71
  isOptional: false;
72
72
  };
73
73
  }>, SchemaModel<{
74
74
  version: {
75
- type: _contractspec_lib_schema102.FieldType<string, string>;
75
+ type: _contractspec_lib_schema200.FieldType<string, string>;
76
76
  isOptional: false;
77
77
  };
78
78
  status: {
79
- type: _contractspec_lib_schema102.FieldType<string, string>;
79
+ type: _contractspec_lib_schema200.FieldType<string, string>;
80
80
  isOptional: false;
81
81
  };
82
82
  warnings: {
83
- type: _contractspec_lib_schema102.FieldType<string, string>;
83
+ type: _contractspec_lib_schema200.FieldType<string, string>;
84
84
  isOptional: true;
85
85
  isArray: true;
86
86
  };
@@ -90,44 +90,44 @@ declare const PromoteTenantConfigToPreviewCommand: OperationSpec<SchemaModel<{
90
90
  }[]>;
91
91
  declare const PublishTenantConfigCommand: OperationSpec<SchemaModel<{
92
92
  tenantId: {
93
- type: _contractspec_lib_schema102.FieldType<string, string>;
93
+ type: _contractspec_lib_schema200.FieldType<string, string>;
94
94
  isOptional: false;
95
95
  };
96
96
  appId: {
97
- type: _contractspec_lib_schema102.FieldType<string, string>;
97
+ type: _contractspec_lib_schema200.FieldType<string, string>;
98
98
  isOptional: false;
99
99
  };
100
100
  version: {
101
- type: _contractspec_lib_schema102.FieldType<string, string>;
101
+ type: _contractspec_lib_schema200.FieldType<string, string>;
102
102
  isOptional: false;
103
103
  };
104
104
  environment: {
105
- type: _contractspec_lib_schema102.FieldType<string, string>;
105
+ type: _contractspec_lib_schema200.FieldType<string, string>;
106
106
  isOptional: true;
107
107
  };
108
108
  publishedBy: {
109
- type: _contractspec_lib_schema102.FieldType<string, string>;
109
+ type: _contractspec_lib_schema200.FieldType<string, string>;
110
110
  isOptional: false;
111
111
  };
112
112
  changeSummary: {
113
- type: _contractspec_lib_schema102.FieldType<string, string>;
113
+ type: _contractspec_lib_schema200.FieldType<string, string>;
114
114
  isOptional: true;
115
115
  };
116
116
  }>, SchemaModel<{
117
117
  version: {
118
- type: _contractspec_lib_schema102.FieldType<string, string>;
118
+ type: _contractspec_lib_schema200.FieldType<string, string>;
119
119
  isOptional: false;
120
120
  };
121
121
  status: {
122
- type: _contractspec_lib_schema102.FieldType<string, string>;
122
+ type: _contractspec_lib_schema200.FieldType<string, string>;
123
123
  isOptional: false;
124
124
  };
125
125
  previousVersion: {
126
- type: _contractspec_lib_schema102.FieldType<string, string>;
126
+ type: _contractspec_lib_schema200.FieldType<string, string>;
127
127
  isOptional: true;
128
128
  };
129
129
  publishedAt: {
130
- type: _contractspec_lib_schema102.FieldType<Date, string>;
130
+ type: _contractspec_lib_schema200.FieldType<Date, string>;
131
131
  isOptional: false;
132
132
  };
133
133
  }>, {
@@ -136,40 +136,40 @@ declare const PublishTenantConfigCommand: OperationSpec<SchemaModel<{
136
136
  }[]>;
137
137
  declare const RollbackTenantConfigCommand: OperationSpec<SchemaModel<{
138
138
  tenantId: {
139
- type: _contractspec_lib_schema102.FieldType<string, string>;
139
+ type: _contractspec_lib_schema200.FieldType<string, string>;
140
140
  isOptional: false;
141
141
  };
142
142
  appId: {
143
- type: _contractspec_lib_schema102.FieldType<string, string>;
143
+ type: _contractspec_lib_schema200.FieldType<string, string>;
144
144
  isOptional: false;
145
145
  };
146
146
  toVersion: {
147
- type: _contractspec_lib_schema102.FieldType<string, string>;
147
+ type: _contractspec_lib_schema200.FieldType<string, string>;
148
148
  isOptional: false;
149
149
  };
150
150
  environment: {
151
- type: _contractspec_lib_schema102.FieldType<string, string>;
151
+ type: _contractspec_lib_schema200.FieldType<string, string>;
152
152
  isOptional: true;
153
153
  };
154
154
  rolledBackBy: {
155
- type: _contractspec_lib_schema102.FieldType<string, string>;
155
+ type: _contractspec_lib_schema200.FieldType<string, string>;
156
156
  isOptional: false;
157
157
  };
158
158
  reason: {
159
- type: _contractspec_lib_schema102.FieldType<string, string>;
159
+ type: _contractspec_lib_schema200.FieldType<string, string>;
160
160
  isOptional: false;
161
161
  };
162
162
  }>, SchemaModel<{
163
163
  newVersion: {
164
- type: _contractspec_lib_schema102.FieldType<string, string>;
164
+ type: _contractspec_lib_schema200.FieldType<string, string>;
165
165
  isOptional: false;
166
166
  };
167
167
  status: {
168
- type: _contractspec_lib_schema102.FieldType<string, string>;
168
+ type: _contractspec_lib_schema200.FieldType<string, string>;
169
169
  isOptional: false;
170
170
  };
171
171
  rolledBackFrom: {
172
- type: _contractspec_lib_schema102.FieldType<number, number>;
172
+ type: _contractspec_lib_schema200.FieldType<number, number>;
173
173
  isOptional: false;
174
174
  };
175
175
  }>, {
@@ -178,22 +178,22 @@ declare const RollbackTenantConfigCommand: OperationSpec<SchemaModel<{
178
178
  }[]>;
179
179
  declare const ListTenantConfigVersionsQuery: OperationSpec<SchemaModel<{
180
180
  tenantId: {
181
- type: _contractspec_lib_schema102.FieldType<string, string>;
181
+ type: _contractspec_lib_schema200.FieldType<string, string>;
182
182
  isOptional: false;
183
183
  };
184
184
  appId: {
185
- type: _contractspec_lib_schema102.FieldType<string, string>;
185
+ type: _contractspec_lib_schema200.FieldType<string, string>;
186
186
  isOptional: false;
187
187
  };
188
188
  }>, SchemaModel<{
189
189
  versions: {
190
190
  type: SchemaModel<{
191
191
  meta: {
192
- type: _contractspec_lib_schema102.FieldType<Record<string, unknown>, Record<string, unknown>>;
192
+ type: _contractspec_lib_schema200.FieldType<Record<string, unknown>, Record<string, unknown>>;
193
193
  isOptional: false;
194
194
  };
195
195
  config: {
196
- type: _contractspec_lib_schema102.FieldType<Record<string, unknown>, Record<string, unknown>>;
196
+ type: _contractspec_lib_schema200.FieldType<Record<string, unknown>, Record<string, unknown>>;
197
197
  isOptional: false;
198
198
  };
199
199
  }>;
@@ -203,35 +203,35 @@ declare const ListTenantConfigVersionsQuery: OperationSpec<SchemaModel<{
203
203
  transitions: {
204
204
  type: SchemaModel<{
205
205
  tenantId: {
206
- type: _contractspec_lib_schema102.FieldType<string, string>;
206
+ type: _contractspec_lib_schema200.FieldType<string, string>;
207
207
  isOptional: false;
208
208
  };
209
209
  appId: {
210
- type: _contractspec_lib_schema102.FieldType<string, string>;
210
+ type: _contractspec_lib_schema200.FieldType<string, string>;
211
211
  isOptional: false;
212
212
  };
213
213
  fromStatus: {
214
- type: _contractspec_lib_schema102.FieldType<string, string>;
214
+ type: _contractspec_lib_schema200.FieldType<string, string>;
215
215
  isOptional: false;
216
216
  };
217
217
  toStatus: {
218
- type: _contractspec_lib_schema102.FieldType<string, string>;
218
+ type: _contractspec_lib_schema200.FieldType<string, string>;
219
219
  isOptional: false;
220
220
  };
221
221
  version: {
222
- type: _contractspec_lib_schema102.FieldType<string, string>;
222
+ type: _contractspec_lib_schema200.FieldType<string, string>;
223
223
  isOptional: false;
224
224
  };
225
225
  timestamp: {
226
- type: _contractspec_lib_schema102.FieldType<Date, string>;
226
+ type: _contractspec_lib_schema200.FieldType<Date, string>;
227
227
  isOptional: false;
228
228
  };
229
229
  actor: {
230
- type: _contractspec_lib_schema102.FieldType<string, string>;
230
+ type: _contractspec_lib_schema200.FieldType<string, string>;
231
231
  isOptional: false;
232
232
  };
233
233
  reason: {
234
- type: _contractspec_lib_schema102.FieldType<string, string>;
234
+ type: _contractspec_lib_schema200.FieldType<string, string>;
235
235
  isOptional: true;
236
236
  };
237
237
  }>;
@@ -241,26 +241,26 @@ declare const ListTenantConfigVersionsQuery: OperationSpec<SchemaModel<{
241
241
  }>, undefined>;
242
242
  declare const GetTenantConfigVersionQuery: OperationSpec<SchemaModel<{
243
243
  tenantId: {
244
- type: _contractspec_lib_schema102.FieldType<string, string>;
244
+ type: _contractspec_lib_schema200.FieldType<string, string>;
245
245
  isOptional: false;
246
246
  };
247
247
  appId: {
248
- type: _contractspec_lib_schema102.FieldType<string, string>;
248
+ type: _contractspec_lib_schema200.FieldType<string, string>;
249
249
  isOptional: false;
250
250
  };
251
251
  version: {
252
- type: _contractspec_lib_schema102.FieldType<string, string>;
252
+ type: _contractspec_lib_schema200.FieldType<string, string>;
253
253
  isOptional: false;
254
254
  };
255
255
  }>, SchemaModel<{
256
256
  version: {
257
257
  type: SchemaModel<{
258
258
  meta: {
259
- type: _contractspec_lib_schema102.FieldType<Record<string, unknown>, Record<string, unknown>>;
259
+ type: _contractspec_lib_schema200.FieldType<Record<string, unknown>, Record<string, unknown>>;
260
260
  isOptional: false;
261
261
  };
262
262
  config: {
263
- type: _contractspec_lib_schema102.FieldType<Record<string, unknown>, Record<string, unknown>>;
263
+ type: _contractspec_lib_schema200.FieldType<Record<string, unknown>, Record<string, unknown>>;
264
264
  isOptional: false;
265
265
  };
266
266
  }>;
@@ -1,7 +1,11 @@
1
- import { CapabilityRef, CapabilityRegistry, CapabilitySpec } from "../capabilities/capabilities.js";
2
- import "../capabilities/index.js";
3
1
  import { PolicyRef, PolicySpec } from "../policy/spec.js";
4
2
  import { TelemetryRegistry, TelemetrySpec } from "../telemetry/spec.js";
3
+ import { CapabilityRef, CapabilityRegistry, CapabilitySpec } from "../capabilities/capabilities.js";
4
+ import "../capabilities/index.js";
5
+ import { ExperimentRef, ExperimentRegistry, ExperimentSpec } from "../experiments/spec.js";
6
+ import { FeatureModuleSpec, FeatureRef } from "../features/types.js";
7
+ import { FeatureRegistry } from "../features/registry.js";
8
+ import "../features/index.js";
5
9
  import { DataViewSpec } from "../data-views/spec.js";
6
10
  import { DataViewRegistry } from "../data-views/registry.js";
7
11
  import "../data-views/index.js";
@@ -17,10 +21,6 @@ import { AppKnowledgeBinding } from "../knowledge/binding.js";
17
21
  import { ResolvedBranding } from "./branding.js";
18
22
  import { Locale, TranslationEntry } from "../translations/catalog.js";
19
23
  import { AppBlueprintSpec, AppIntegrationSlot, AppRouteConfig, AppThemeBinding, FeatureFlagState, SpecPointer, TelemetryBinding, TenantAppConfig, TranslationCatalogPointer } from "./spec.js";
20
- import { ExperimentRef, ExperimentRegistry, ExperimentSpec } from "../experiments/spec.js";
21
- import { FeatureModuleSpec, FeatureRef } from "../features/types.js";
22
- import { FeatureRegistry } from "../features/registry.js";
23
- import "../features/index.js";
24
24
 
25
25
  //#region src/app-config/runtime.d.ts
26
26
  interface ResolvedIntegration {
@@ -1,7 +1,10 @@
1
1
  import { OwnerShipMeta } from "../ownership.js";
2
+ import { PolicyRef } from "../policy/spec.js";
2
3
  import { CapabilityRef } from "../capabilities/capabilities.js";
3
4
  import "../capabilities/index.js";
4
- import { PolicyRef } from "../policy/spec.js";
5
+ import { ExperimentRef } from "../experiments/spec.js";
6
+ import { FeatureModuleSpec, FeatureRef } from "../features/types.js";
7
+ import "../features/index.js";
5
8
  import { ThemeRef } from "../themes.js";
6
9
  import { IntegrationCategory, IntegrationOwnershipMode } from "../integrations/spec.js";
7
10
  import { AppIntegrationBinding } from "../integrations/binding.js";
@@ -10,9 +13,6 @@ import { BrandingDefaults, TenantBrandingConfig } from "./branding.js";
10
13
  import { Locale, TranslationEntry } from "../translations/catalog.js";
11
14
  import { ConfigStatus } from "./lifecycle.js";
12
15
  import { SpecContractRegistry } from "../registry.js";
13
- import { ExperimentRef } from "../experiments/spec.js";
14
- import { FeatureRef } from "../features/types.js";
15
- import "../features/index.js";
16
16
 
17
17
  //#region src/app-config/spec.d.ts
18
18
  interface SpecPointer {
@@ -167,5 +167,9 @@ interface TenantAppConfig {
167
167
  branding?: TenantBrandingConfig;
168
168
  notes?: string;
169
169
  }
170
+ /**
171
+ * Helper to define an AppConfig.
172
+ */
173
+ declare const defineAppConfig: (spec: FeatureModuleSpec) => FeatureModuleSpec;
170
174
  //#endregion
171
- export { AppBlueprintMeta, AppBlueprintRegistry, AppBlueprintSpec, AppIntegrationSlot, AppRouteConfig, AppThemeBinding, FeatureFlagState, SpecPointer, TelemetryBinding, TenantAppConfig, TenantAppConfigMeta, TenantRouteOverride, TenantSpecOverride, TranslationCatalogPointer, makeAppBlueprintKey };
175
+ export { AppBlueprintMeta, AppBlueprintRegistry, AppBlueprintSpec, AppIntegrationSlot, AppRouteConfig, AppThemeBinding, FeatureFlagState, SpecPointer, TelemetryBinding, TenantAppConfig, TenantAppConfigMeta, TenantRouteOverride, TenantSpecOverride, TranslationCatalogPointer, defineAppConfig, makeAppBlueprintKey };
@@ -10,6 +10,10 @@ var AppBlueprintRegistry = class extends SpecContractRegistry {
10
10
  function makeAppBlueprintKey(meta) {
11
11
  return blueprintKey(meta);
12
12
  }
13
+ /**
14
+ * Helper to define an AppConfig.
15
+ */
16
+ const defineAppConfig = (spec) => spec;
13
17
 
14
18
  //#endregion
15
- export { AppBlueprintRegistry, makeAppBlueprintKey };
19
+ export { AppBlueprintRegistry, defineAppConfig, makeAppBlueprintKey };
@@ -46,9 +46,9 @@ declare const ContractRegistryItemSchema: z.ZodObject<{
46
46
  description: z.ZodString;
47
47
  meta: z.ZodObject<{
48
48
  stability: z.ZodEnum<{
49
+ experimental: "experimental";
49
50
  idea: "idea";
50
51
  in_creation: "in_creation";
51
- experimental: "experimental";
52
52
  beta: "beta";
53
53
  stable: "stable";
54
54
  deprecated: "deprecated";
@@ -95,9 +95,9 @@ declare const ContractRegistryManifestSchema: z.ZodObject<{
95
95
  description: z.ZodString;
96
96
  meta: z.ZodObject<{
97
97
  stability: z.ZodEnum<{
98
+ experimental: "experimental";
98
99
  idea: "idea";
99
100
  in_creation: "in_creation";
100
- experimental: "experimental";
101
101
  beta: "beta";
102
102
  stable: "stable";
103
103
  deprecated: "deprecated";
@@ -1,10 +1,14 @@
1
+ import { OperationSpecRegistry } from "../operations/registry.js";
2
+ import "../operations/index.js";
1
3
  import { DataViewSpec } from "./spec.js";
2
4
  import { DataViewRegistry } from "./registry.js";
3
5
  import "./index.js";
6
+ import { HandlerCtx } from "../types.js";
4
7
 
5
8
  //#region src/data-views/runtime.d.ts
6
9
  interface DataViewRuntimeConfig {
7
10
  registry: DataViewRegistry;
11
+ operationRegistry: OperationSpecRegistry;
8
12
  }
9
13
  interface DataViewResult<T = unknown> {
10
14
  data: T[];
@@ -19,7 +23,7 @@ declare class DataViewRuntime {
19
23
  constructor(config: DataViewRuntimeConfig);
20
24
  register(spec: DataViewSpec): void;
21
25
  getSpec(name: string, version?: string): DataViewSpec | undefined;
22
- executeQuery(specName: string, _params: unknown): Promise<DataViewResult>;
26
+ executeQuery(specName: string, params: unknown, ctx: HandlerCtx): Promise<DataViewResult>;
23
27
  invalidate(specName: string): void;
24
28
  subscribe(specName: string, callback: () => void): () => void;
25
29
  private notifySubscribers;
@@ -1,6 +1,10 @@
1
+ import "../operations/index.js";
1
2
  import "./index.js";
2
3
 
3
4
  //#region src/data-views/runtime.ts
5
+ function isPaginatedResult(value) {
6
+ return typeof value === "object" && value !== null && "items" in value && Array.isArray(value.items);
7
+ }
4
8
  var DataViewRuntime = class {
5
9
  cache = /* @__PURE__ */ new Map();
6
10
  subscriptions = /* @__PURE__ */ new Map();
@@ -13,13 +17,36 @@ var DataViewRuntime = class {
13
17
  getSpec(name, version) {
14
18
  return this.config.registry.get(name, version);
15
19
  }
16
- async executeQuery(specName, _params) {
17
- if (!this.getSpec(specName)) throw new Error(`DataView spec not found: ${specName}`);
18
- return {
19
- data: [],
20
- total: 0,
21
- loading: false
22
- };
20
+ async executeQuery(specName, params, ctx) {
21
+ const spec = this.getSpec(specName);
22
+ if (!spec) throw new Error(`DataView spec not found: ${specName}`);
23
+ const opRef = spec.source.primary;
24
+ if (!opRef) throw new Error(`DataView spec ${specName} missing primary source`);
25
+ try {
26
+ const result = await this.config.operationRegistry.execute(opRef.key, opRef.version, params, ctx);
27
+ if (Array.isArray(result)) return {
28
+ data: result,
29
+ total: result.length,
30
+ loading: false
31
+ };
32
+ if (isPaginatedResult(result)) return {
33
+ data: result.items,
34
+ total: result.total ?? result.items.length,
35
+ loading: false
36
+ };
37
+ return {
38
+ data: [result],
39
+ total: 1,
40
+ loading: false
41
+ };
42
+ } catch (error) {
43
+ return {
44
+ data: [],
45
+ total: 0,
46
+ loading: false,
47
+ error: error instanceof Error ? error : new Error(String(error))
48
+ };
49
+ }
23
50
  }
24
51
  invalidate(specName) {
25
52
  this.cache.delete(specName);
@@ -1,5 +1,5 @@
1
- import { DataViewConfig, DataViewMeta, DataViewSource, DataViewStates } from "./types.js";
2
1
  import { ExperimentRef } from "../experiments/spec.js";
2
+ import { DataViewConfig, DataViewMeta, DataViewSource, DataViewStates } from "./types.js";
3
3
 
4
4
  //#region src/data-views/spec.d.ts
5
5
 
@@ -7,11 +7,11 @@ import "./tech/lifecycle-stage-system.docblock.js";
7
7
  import "./tech/presentation-runtime.docblock.js";
8
8
  import "./tech/auth/better-auth-nextjs.docblock.js";
9
9
  import "./tech/schema/README.docblock.js";
10
- import "./tech/templates/runtime.docblock.js";
11
10
  import "../workflow/overview.docblock.js";
12
11
  import "./tech/mcp-endpoints.docblock.js";
13
12
  import "./tech/vscode-extension.docblock.js";
14
13
  import "./tech/telemetry-ingest.docblock.js";
14
+ import "./tech/contracts/README.docblock.js";
15
15
  import "./tech/contracts/openapi-export.docblock.js";
16
16
  import "./tech/contracts/openapi-import.docblock.js";
17
17
  import "../workspace-config/workspace-config.docblock.js";
@@ -25,5 +25,6 @@ import "./tech/studio/learning-journeys.docblock.js";
25
25
  import "./tech/studio/project-access-teams.docblock.js";
26
26
  import "./tech/studio/team-invitations.docblock.js";
27
27
  import "./tech/llm/llm-integration.docblock.js";
28
+ import "./tech/cli.docblock.js";
28
29
 
29
30
  export { DocRegistry, defaultDocRegistry, docBlockToPresentationSpec, docBlocksToPresentationRoutes, docBlocksToPresentationSpecs, docId, listRegisteredDocBlocks, mapDocRoutes, metaDocs, registerDocBlocks, techContractsDocs };
@@ -0,0 +1,6 @@
1
+ import { DocBlock } from "../types.js";
2
+
3
+ //#region src/docs/tech/cli.docblock.d.ts
4
+ declare const tech_cli_DocBlocks: DocBlock[];
5
+ //#endregion
6
+ export { tech_cli_DocBlocks };
@@ -0,0 +1,138 @@
1
+ import { registerDocBlocks } from "../registry.js";
2
+
3
+ //#region src/docs/tech/cli.docblock.ts
4
+ const tech_cli_DocBlocks = [{
5
+ id: "docs.tech.cli.contractspec",
6
+ title: "ContractSpec CLI",
7
+ summary: "The command-line interface for creating, building, and validating contract specifications.",
8
+ kind: "reference",
9
+ visibility: "public",
10
+ route: "/docs/tech/cli/contractspec",
11
+ tags: [
12
+ "cli",
13
+ "tooling",
14
+ "reference"
15
+ ],
16
+ owners: ["@contractspec/app.cli-contractspec"],
17
+ body: `# ContractSpec CLI
18
+
19
+ The \`@contractspec/app.cli-contractspec\` package provides the command-line interface for the ContractSpec ecosystem.
20
+
21
+ It is also exposed via \`@contractspec/apps-registry/contractspec\` for convenience.
22
+
23
+ ## Installation
24
+
25
+ \`\`\`bash
26
+ bun add -D @contractspec/app.cli-contractspec
27
+ \`\`\`
28
+
29
+ ## Quick Start
30
+
31
+ \`\`\`bash
32
+ # Create a new contract spec interactively
33
+ contractspec create
34
+
35
+ # Create with AI assistance
36
+ contractspec create --ai
37
+
38
+ # Build implementation from spec
39
+ contractspec build src/contracts/mySpec.ts
40
+
41
+ # Validate a spec
42
+ contractspec validate src/contracts/mySpec.ts
43
+ \`\`\`
44
+
45
+ ## Core Commands
46
+
47
+ ### \`create\`
48
+
49
+ Interactive wizard to create contract specifications.
50
+
51
+ \`\`\`bash
52
+ contractspec create --type operation --ai
53
+ \`\`\`
54
+
55
+ ### \`build\`
56
+
57
+ Generate implementation code from contract specs using AI agents or templates.
58
+
59
+ \`\`\`bash
60
+ contractspec build src/contracts/signup.contracts.ts --agent-mode claude-code
61
+ \`\`\`
62
+
63
+ ### \`validate\`
64
+
65
+ Validate contract specifications and verify implementations.
66
+
67
+ \`\`\`bash
68
+ contractspec validate src/contracts/signup.contracts.ts --check-implementation
69
+ \`\`\`
70
+
71
+ ### \`watch\`
72
+
73
+ Watch contract specifications and auto-regenerate on changes.
74
+
75
+ \`\`\`bash
76
+ contractspec watch --build --validate
77
+ \`\`\`
78
+
79
+ ### \`list\`
80
+
81
+ List all contract specifications in the project.
82
+
83
+ \`\`\`bash
84
+ contractspec list --owner @team-platform
85
+ \`\`\`
86
+
87
+ ### \`cleanup\` / \`clean\`
88
+
89
+ Clean generated files and build artifacts.
90
+
91
+ \`\`\`bash
92
+ contractspec clean
93
+ \`\`\`
94
+
95
+ ### \`deps\`
96
+
97
+ Analyze contract dependencies and relationships (circular dependencies, missing refs).
98
+
99
+ \`\`\`bash
100
+ contractspec deps --circular
101
+ \`\`\`
102
+
103
+ ### \`diff\`
104
+
105
+ Compare contract specifications and show differences (breaking changes, semantic diff).
106
+
107
+ \`\`\`bash
108
+ contractspec diff spec1.ts spec2.ts --breaking
109
+ \`\`\`
110
+
111
+ ### \`ci\`
112
+
113
+ Run all validation checks for CI/CD pipelines (structure, integrity, deps, doctor, handlers, tests).
114
+
115
+ \`\`\`bash
116
+ contractspec ci --format sarif --output results.sarif
117
+ \`\`\`
118
+
119
+ ## Configuration
120
+
121
+ The CLI is configured via \`.contractsrc.json\` in your project root.
122
+
123
+ \`\`\`json
124
+ {
125
+ "aiProvider": "claude",
126
+ "aiModel": "claude-3-7-sonnet-20250219",
127
+ "agentMode": "claude-code",
128
+ "outputDir": "./src"
129
+ }
130
+ \`\`\`
131
+
132
+ For full documentation, refer to the [package README](https://github.com/contractspec/monorepo/tree/main/packages/apps/cli-contractspec).
133
+ `
134
+ }];
135
+ registerDocBlocks(tech_cli_DocBlocks);
136
+
137
+ //#endregion
138
+ export { tech_cli_DocBlocks };