@contractspec/lib.contracts 1.52.0 → 1.54.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 (124) hide show
  1. package/dist/app-config/{contracts.d.ts → app-config.contracts.d.ts} +51 -51
  2. package/dist/app-config/{contracts.js → app-config.contracts.js} +1 -1
  3. package/dist/app-config/events.d.ts +27 -27
  4. package/dist/app-config/lifecycle-contracts.d.ts +54 -54
  5. package/dist/app-config/runtime.d.ts +4 -4
  6. package/dist/app-config/spec.d.ts +3 -3
  7. package/dist/capabilities/guards.d.ts +1 -1
  8. package/dist/capabilities/validation.d.ts +1 -1
  9. package/dist/contract-registry/schemas.d.ts +4 -4
  10. package/dist/data-views/data-views.d.ts +1 -1
  11. package/dist/data-views/index.d.ts +1 -1
  12. package/dist/data-views/registry.d.ts +1 -1
  13. package/dist/data-views/report/contractVerificationTable.d.ts +10 -0
  14. package/dist/data-views/report/contractVerificationTable.js +95 -0
  15. package/dist/data-views/runtime.d.ts +2 -2
  16. package/dist/data-views/spec.d.ts +1 -1
  17. package/dist/data-views/types.d.ts +2 -2
  18. package/dist/docs/capabilities/documentationSystem.capability.d.ts +7 -0
  19. package/dist/docs/capabilities/documentationSystem.capability.js +71 -0
  20. package/dist/docs/capabilities/index.d.ts +2 -0
  21. package/dist/docs/capabilities/index.js +3 -0
  22. package/dist/docs/commands/docsGenerate.command.d.ts +95 -0
  23. package/dist/docs/commands/docsGenerate.command.js +142 -0
  24. package/dist/docs/commands/docsPublish.command.d.ts +64 -0
  25. package/dist/docs/commands/docsPublish.command.js +107 -0
  26. package/dist/docs/commands/index.d.ts +3 -0
  27. package/dist/docs/commands/index.js +4 -0
  28. package/dist/docs/constants.d.ts +7 -0
  29. package/dist/docs/constants.js +10 -0
  30. package/dist/docs/contracts.d.ts +442 -0
  31. package/dist/docs/contracts.js +58 -0
  32. package/dist/docs/ensure-docblocks.d.ts +1 -0
  33. package/dist/docs/ensure-docblocks.js +1 -0
  34. package/dist/docs/events/docsGenerated.event.d.ts +62 -0
  35. package/dist/docs/events/docsGenerated.event.js +53 -0
  36. package/dist/docs/events/docsPublished.event.d.ts +70 -0
  37. package/dist/docs/events/docsPublished.event.js +57 -0
  38. package/dist/docs/events/index.d.ts +3 -0
  39. package/dist/docs/events/index.js +4 -0
  40. package/dist/docs/forms/docsSearch.form.d.ts +22 -0
  41. package/dist/docs/forms/docsSearch.form.js +113 -0
  42. package/dist/docs/forms/index.d.ts +2 -0
  43. package/dist/docs/forms/index.js +3 -0
  44. package/dist/docs/index.d.ts +23 -1
  45. package/dist/docs/index.js +25 -1
  46. package/dist/docs/presentations/docsLayout.presentation.d.ts +7 -0
  47. package/dist/docs/presentations/docsLayout.presentation.js +35 -0
  48. package/dist/docs/presentations/docsReferencePage.presentation.d.ts +7 -0
  49. package/dist/docs/presentations/docsReferencePage.presentation.js +35 -0
  50. package/dist/docs/presentations/index.d.ts +3 -0
  51. package/dist/docs/presentations/index.js +4 -0
  52. package/dist/docs/queries/contractReference.query.d.ts +217 -0
  53. package/dist/docs/queries/contractReference.query.js +125 -0
  54. package/dist/docs/queries/docsIndex.query.d.ts +272 -0
  55. package/dist/docs/queries/docsIndex.query.js +133 -0
  56. package/dist/docs/queries/index.d.ts +3 -0
  57. package/dist/docs/queries/index.js +4 -0
  58. package/dist/docs/tech/cli.docblock.js +10 -0
  59. package/dist/docs/tech/docs-system.docblock.d.ts +1 -0
  60. package/dist/docs/tech/docs-system.docblock.js +128 -0
  61. package/dist/docs/tech/report-verification-table.docblock.d.ts +1 -0
  62. package/dist/docs/tech/report-verification-table.docblock.js +50 -0
  63. package/dist/docs/views/contractReference.dataView.d.ts +7 -0
  64. package/dist/docs/views/contractReference.dataView.js +81 -0
  65. package/dist/docs/views/docsIndex.dataView.d.ts +7 -0
  66. package/dist/docs/views/docsIndex.dataView.js +136 -0
  67. package/dist/docs/views/exampleCatalog.dataView.d.ts +7 -0
  68. package/dist/docs/views/exampleCatalog.dataView.js +91 -0
  69. package/dist/docs/views/index.d.ts +4 -0
  70. package/dist/docs/views/index.js +5 -0
  71. package/dist/events.d.ts +1 -1
  72. package/dist/examples/schema.d.ts +17 -17
  73. package/dist/examples/types.d.ts +1 -1
  74. package/dist/experiments/spec.d.ts +2 -2
  75. package/dist/features/install.d.ts +1 -1
  76. package/dist/features/types.d.ts +3 -3
  77. package/dist/forms/forms.d.ts +1 -1
  78. package/dist/index.d.ts +40 -22
  79. package/dist/index.js +20 -2
  80. package/dist/install.d.ts +1 -1
  81. package/dist/integrations/openbanking/contracts/accounts.d.ts +66 -66
  82. package/dist/integrations/openbanking/contracts/balances.d.ts +34 -34
  83. package/dist/integrations/openbanking/contracts/transactions.d.ts +48 -48
  84. package/dist/integrations/openbanking/models.d.ts +55 -55
  85. package/dist/integrations/operations.d.ts +102 -102
  86. package/dist/integrations/providers/impls/stripe-payments.js +1 -1
  87. package/dist/integrations/spec.d.ts +2 -2
  88. package/dist/jsonschema.d.ts +1 -1
  89. package/dist/knowledge/operations.d.ts +66 -66
  90. package/dist/knowledge/spec.d.ts +1 -1
  91. package/dist/llm/exporters.d.ts +3 -3
  92. package/dist/llm/types.d.ts +1 -1
  93. package/dist/markdown.d.ts +1 -1
  94. package/dist/onboarding-base.d.ts +29 -29
  95. package/dist/operations/index.d.ts +4 -1
  96. package/dist/operations/index.js +4 -1
  97. package/dist/operations/operation.d.ts +3 -3
  98. package/dist/operations/registry.d.ts +1 -1
  99. package/dist/operations/report/getContractVerificationStatus.d.ts +75 -0
  100. package/dist/operations/report/getContractVerificationStatus.js +96 -0
  101. package/dist/operations/report/index.d.ts +13 -0
  102. package/dist/operations/report/index.js +45 -0
  103. package/dist/policy/validation.d.ts +1 -1
  104. package/dist/presentations/registry.d.ts +1 -1
  105. package/dist/registry.d.ts +1 -1
  106. package/dist/serialization/serializers.d.ts +3 -3
  107. package/dist/server/rest-elysia.d.ts +1 -1
  108. package/dist/server/rest-express.d.ts +1 -1
  109. package/dist/server/rest-generic.d.ts +1 -1
  110. package/dist/server/rest-next-app.d.ts +1 -1
  111. package/dist/server/rest-next-mcp.d.ts +1 -1
  112. package/dist/server/rest-next-pages.d.ts +1 -1
  113. package/dist/telemetry/spec.d.ts +1 -1
  114. package/dist/telemetry/tracker.d.ts +3 -2
  115. package/dist/tests/runner.d.ts +1 -1
  116. package/dist/themes.d.ts +1 -1
  117. package/dist/types.d.ts +2 -2
  118. package/dist/workflow/spec.d.ts +2 -2
  119. package/dist/workflow/validation.d.ts +2 -2
  120. package/dist/workspace-config/contractsrc-schema.d.ts +3 -3
  121. package/dist/workspace-config/contractsrc-schema.js +1 -0
  122. package/dist/workspace-config/contractsrc-types.d.ts +7 -8
  123. package/dist/workspace-config/index.d.ts +2 -2
  124. package/package.json +38 -11
@@ -0,0 +1,125 @@
1
+ import { defineQuery } from "../../operations/operation.js";
2
+ import "../../operations/index.js";
3
+ import { DOCS_DOMAIN, DOCS_OWNERS, DOCS_STABILITY, DOCS_TAGS } from "../constants.js";
4
+ import { docId } from "../registry.js";
5
+ import "../ensure-docblocks.js";
6
+ import { ScalarTypeEnum, SchemaModel } from "@contractspec/lib.schema";
7
+
8
+ //#region src/docs/queries/contractReference.query.ts
9
+ const ContractReferenceInput = new SchemaModel({
10
+ name: "ContractReferenceInput",
11
+ fields: {
12
+ key: {
13
+ type: ScalarTypeEnum.String_unsecure(),
14
+ isOptional: false
15
+ },
16
+ version: {
17
+ type: ScalarTypeEnum.String_unsecure(),
18
+ isOptional: true
19
+ },
20
+ type: {
21
+ type: ScalarTypeEnum.String_unsecure(),
22
+ isOptional: true
23
+ },
24
+ format: {
25
+ type: ScalarTypeEnum.String_unsecure(),
26
+ isOptional: true
27
+ },
28
+ includeSchema: {
29
+ type: ScalarTypeEnum.Boolean(),
30
+ isOptional: true
31
+ }
32
+ }
33
+ });
34
+ const ContractReferenceModel = new SchemaModel({
35
+ name: "ContractReference",
36
+ fields: {
37
+ key: {
38
+ type: ScalarTypeEnum.String_unsecure(),
39
+ isOptional: false
40
+ },
41
+ version: {
42
+ type: ScalarTypeEnum.String_unsecure(),
43
+ isOptional: false
44
+ },
45
+ type: {
46
+ type: ScalarTypeEnum.String_unsecure(),
47
+ isOptional: false
48
+ },
49
+ title: {
50
+ type: ScalarTypeEnum.String_unsecure(),
51
+ isOptional: true
52
+ },
53
+ description: {
54
+ type: ScalarTypeEnum.String_unsecure(),
55
+ isOptional: true
56
+ },
57
+ markdown: {
58
+ type: ScalarTypeEnum.String_unsecure(),
59
+ isOptional: true
60
+ },
61
+ route: {
62
+ type: ScalarTypeEnum.String_unsecure(),
63
+ isOptional: true
64
+ },
65
+ schema: {
66
+ type: ScalarTypeEnum.JSONObject(),
67
+ isOptional: true
68
+ },
69
+ policy: {
70
+ type: ScalarTypeEnum.JSONObject(),
71
+ isOptional: true
72
+ },
73
+ tags: {
74
+ type: ScalarTypeEnum.String_unsecure(),
75
+ isOptional: true,
76
+ isArray: true
77
+ },
78
+ owners: {
79
+ type: ScalarTypeEnum.String_unsecure(),
80
+ isOptional: true,
81
+ isArray: true
82
+ },
83
+ stability: {
84
+ type: ScalarTypeEnum.String_unsecure(),
85
+ isOptional: true
86
+ }
87
+ }
88
+ });
89
+ const ContractReferenceOutput = new SchemaModel({
90
+ name: "ContractReferenceOutput",
91
+ fields: { reference: {
92
+ type: ContractReferenceModel,
93
+ isOptional: false
94
+ } }
95
+ });
96
+ const ContractReferenceQuery = defineQuery({
97
+ meta: {
98
+ key: "docs.contract.reference",
99
+ title: "Contract Reference",
100
+ version: "1.0.0",
101
+ description: "Resolve a contract into a documentation-ready reference.",
102
+ goal: "Expose a canonical reference view for any ContractSpec surface.",
103
+ context: "Used by docs generators and UI to render consistent reference pages.",
104
+ domain: DOCS_DOMAIN,
105
+ owners: DOCS_OWNERS,
106
+ tags: [...DOCS_TAGS, "reference"],
107
+ stability: DOCS_STABILITY,
108
+ docId: [docId("docs.tech.docs-reference")]
109
+ },
110
+ capability: {
111
+ key: "docs.system",
112
+ version: "1.0.0"
113
+ },
114
+ io: {
115
+ input: ContractReferenceInput,
116
+ output: ContractReferenceOutput
117
+ },
118
+ policy: {
119
+ auth: "anonymous",
120
+ pii: []
121
+ }
122
+ });
123
+
124
+ //#endregion
125
+ export { ContractReferenceInput, ContractReferenceModel, ContractReferenceOutput, ContractReferenceQuery };
@@ -0,0 +1,272 @@
1
+ import { OperationSpec } from "../../operations/operation.js";
2
+ import "../../index.js";
3
+ import * as _contractspec_lib_schema426 from "@contractspec/lib.schema";
4
+ import { SchemaModel } from "@contractspec/lib.schema";
5
+
6
+ //#region src/docs/queries/docsIndex.query.d.ts
7
+ declare const DocSummaryModel: SchemaModel<{
8
+ id: {
9
+ type: _contractspec_lib_schema426.FieldType<string, string>;
10
+ isOptional: false;
11
+ };
12
+ title: {
13
+ type: _contractspec_lib_schema426.FieldType<string, string>;
14
+ isOptional: false;
15
+ };
16
+ summary: {
17
+ type: _contractspec_lib_schema426.FieldType<string, string>;
18
+ isOptional: true;
19
+ };
20
+ route: {
21
+ type: _contractspec_lib_schema426.FieldType<string, string>;
22
+ isOptional: true;
23
+ };
24
+ visibility: {
25
+ type: _contractspec_lib_schema426.FieldType<string, string>;
26
+ isOptional: true;
27
+ };
28
+ kind: {
29
+ type: _contractspec_lib_schema426.FieldType<string, string>;
30
+ isOptional: true;
31
+ };
32
+ version: {
33
+ type: _contractspec_lib_schema426.FieldType<string, string>;
34
+ isOptional: true;
35
+ };
36
+ tags: {
37
+ type: _contractspec_lib_schema426.FieldType<string, string>;
38
+ isOptional: true;
39
+ isArray: true;
40
+ };
41
+ }>;
42
+ declare const DocsIndexInput: SchemaModel<{
43
+ query: {
44
+ type: _contractspec_lib_schema426.FieldType<string, string>;
45
+ isOptional: true;
46
+ };
47
+ tag: {
48
+ type: _contractspec_lib_schema426.FieldType<string, string>;
49
+ isOptional: true;
50
+ isArray: true;
51
+ };
52
+ visibility: {
53
+ type: _contractspec_lib_schema426.FieldType<string, string>;
54
+ isOptional: true;
55
+ };
56
+ kind: {
57
+ type: _contractspec_lib_schema426.FieldType<string, string>;
58
+ isOptional: true;
59
+ };
60
+ limit: {
61
+ type: _contractspec_lib_schema426.FieldType<number, number>;
62
+ isOptional: true;
63
+ };
64
+ offset: {
65
+ type: _contractspec_lib_schema426.FieldType<number, number>;
66
+ isOptional: true;
67
+ };
68
+ }>;
69
+ declare const DocsIndexOutput: SchemaModel<{
70
+ items: {
71
+ type: SchemaModel<{
72
+ id: {
73
+ type: _contractspec_lib_schema426.FieldType<string, string>;
74
+ isOptional: false;
75
+ };
76
+ title: {
77
+ type: _contractspec_lib_schema426.FieldType<string, string>;
78
+ isOptional: false;
79
+ };
80
+ summary: {
81
+ type: _contractspec_lib_schema426.FieldType<string, string>;
82
+ isOptional: true;
83
+ };
84
+ route: {
85
+ type: _contractspec_lib_schema426.FieldType<string, string>;
86
+ isOptional: true;
87
+ };
88
+ visibility: {
89
+ type: _contractspec_lib_schema426.FieldType<string, string>;
90
+ isOptional: true;
91
+ };
92
+ kind: {
93
+ type: _contractspec_lib_schema426.FieldType<string, string>;
94
+ isOptional: true;
95
+ };
96
+ version: {
97
+ type: _contractspec_lib_schema426.FieldType<string, string>;
98
+ isOptional: true;
99
+ };
100
+ tags: {
101
+ type: _contractspec_lib_schema426.FieldType<string, string>;
102
+ isOptional: true;
103
+ isArray: true;
104
+ };
105
+ }>;
106
+ isOptional: true;
107
+ isArray: true;
108
+ };
109
+ docs: {
110
+ type: SchemaModel<{
111
+ id: {
112
+ type: _contractspec_lib_schema426.FieldType<string, string>;
113
+ isOptional: false;
114
+ };
115
+ title: {
116
+ type: _contractspec_lib_schema426.FieldType<string, string>;
117
+ isOptional: false;
118
+ };
119
+ summary: {
120
+ type: _contractspec_lib_schema426.FieldType<string, string>;
121
+ isOptional: true;
122
+ };
123
+ route: {
124
+ type: _contractspec_lib_schema426.FieldType<string, string>;
125
+ isOptional: true;
126
+ };
127
+ visibility: {
128
+ type: _contractspec_lib_schema426.FieldType<string, string>;
129
+ isOptional: true;
130
+ };
131
+ kind: {
132
+ type: _contractspec_lib_schema426.FieldType<string, string>;
133
+ isOptional: true;
134
+ };
135
+ version: {
136
+ type: _contractspec_lib_schema426.FieldType<string, string>;
137
+ isOptional: true;
138
+ };
139
+ tags: {
140
+ type: _contractspec_lib_schema426.FieldType<string, string>;
141
+ isOptional: true;
142
+ isArray: true;
143
+ };
144
+ }>;
145
+ isOptional: false;
146
+ isArray: true;
147
+ };
148
+ total: {
149
+ type: _contractspec_lib_schema426.FieldType<number, number>;
150
+ isOptional: true;
151
+ };
152
+ nextOffset: {
153
+ type: _contractspec_lib_schema426.FieldType<number, number>;
154
+ isOptional: true;
155
+ };
156
+ }>;
157
+ declare const DocsIndexQuery: OperationSpec<SchemaModel<{
158
+ query: {
159
+ type: _contractspec_lib_schema426.FieldType<string, string>;
160
+ isOptional: true;
161
+ };
162
+ tag: {
163
+ type: _contractspec_lib_schema426.FieldType<string, string>;
164
+ isOptional: true;
165
+ isArray: true;
166
+ };
167
+ visibility: {
168
+ type: _contractspec_lib_schema426.FieldType<string, string>;
169
+ isOptional: true;
170
+ };
171
+ kind: {
172
+ type: _contractspec_lib_schema426.FieldType<string, string>;
173
+ isOptional: true;
174
+ };
175
+ limit: {
176
+ type: _contractspec_lib_schema426.FieldType<number, number>;
177
+ isOptional: true;
178
+ };
179
+ offset: {
180
+ type: _contractspec_lib_schema426.FieldType<number, number>;
181
+ isOptional: true;
182
+ };
183
+ }>, SchemaModel<{
184
+ items: {
185
+ type: SchemaModel<{
186
+ id: {
187
+ type: _contractspec_lib_schema426.FieldType<string, string>;
188
+ isOptional: false;
189
+ };
190
+ title: {
191
+ type: _contractspec_lib_schema426.FieldType<string, string>;
192
+ isOptional: false;
193
+ };
194
+ summary: {
195
+ type: _contractspec_lib_schema426.FieldType<string, string>;
196
+ isOptional: true;
197
+ };
198
+ route: {
199
+ type: _contractspec_lib_schema426.FieldType<string, string>;
200
+ isOptional: true;
201
+ };
202
+ visibility: {
203
+ type: _contractspec_lib_schema426.FieldType<string, string>;
204
+ isOptional: true;
205
+ };
206
+ kind: {
207
+ type: _contractspec_lib_schema426.FieldType<string, string>;
208
+ isOptional: true;
209
+ };
210
+ version: {
211
+ type: _contractspec_lib_schema426.FieldType<string, string>;
212
+ isOptional: true;
213
+ };
214
+ tags: {
215
+ type: _contractspec_lib_schema426.FieldType<string, string>;
216
+ isOptional: true;
217
+ isArray: true;
218
+ };
219
+ }>;
220
+ isOptional: true;
221
+ isArray: true;
222
+ };
223
+ docs: {
224
+ type: SchemaModel<{
225
+ id: {
226
+ type: _contractspec_lib_schema426.FieldType<string, string>;
227
+ isOptional: false;
228
+ };
229
+ title: {
230
+ type: _contractspec_lib_schema426.FieldType<string, string>;
231
+ isOptional: false;
232
+ };
233
+ summary: {
234
+ type: _contractspec_lib_schema426.FieldType<string, string>;
235
+ isOptional: true;
236
+ };
237
+ route: {
238
+ type: _contractspec_lib_schema426.FieldType<string, string>;
239
+ isOptional: true;
240
+ };
241
+ visibility: {
242
+ type: _contractspec_lib_schema426.FieldType<string, string>;
243
+ isOptional: true;
244
+ };
245
+ kind: {
246
+ type: _contractspec_lib_schema426.FieldType<string, string>;
247
+ isOptional: true;
248
+ };
249
+ version: {
250
+ type: _contractspec_lib_schema426.FieldType<string, string>;
251
+ isOptional: true;
252
+ };
253
+ tags: {
254
+ type: _contractspec_lib_schema426.FieldType<string, string>;
255
+ isOptional: true;
256
+ isArray: true;
257
+ };
258
+ }>;
259
+ isOptional: false;
260
+ isArray: true;
261
+ };
262
+ total: {
263
+ type: _contractspec_lib_schema426.FieldType<number, number>;
264
+ isOptional: true;
265
+ };
266
+ nextOffset: {
267
+ type: _contractspec_lib_schema426.FieldType<number, number>;
268
+ isOptional: true;
269
+ };
270
+ }>, undefined>;
271
+ //#endregion
272
+ export { DocSummaryModel, DocsIndexInput, DocsIndexOutput, DocsIndexQuery };
@@ -0,0 +1,133 @@
1
+ import { defineQuery } from "../../operations/operation.js";
2
+ import "../../operations/index.js";
3
+ import { DOCS_DOMAIN, DOCS_OWNERS, DOCS_STABILITY, DOCS_TAGS } from "../constants.js";
4
+ import { docId } from "../registry.js";
5
+ import "../ensure-docblocks.js";
6
+ import { ScalarTypeEnum, SchemaModel } from "@contractspec/lib.schema";
7
+
8
+ //#region src/docs/queries/docsIndex.query.ts
9
+ const DocSummaryModel = new SchemaModel({
10
+ name: "DocSummary",
11
+ fields: {
12
+ id: {
13
+ type: ScalarTypeEnum.String_unsecure(),
14
+ isOptional: false
15
+ },
16
+ title: {
17
+ type: ScalarTypeEnum.String_unsecure(),
18
+ isOptional: false
19
+ },
20
+ summary: {
21
+ type: ScalarTypeEnum.String_unsecure(),
22
+ isOptional: true
23
+ },
24
+ route: {
25
+ type: ScalarTypeEnum.String_unsecure(),
26
+ isOptional: true
27
+ },
28
+ visibility: {
29
+ type: ScalarTypeEnum.String_unsecure(),
30
+ isOptional: true
31
+ },
32
+ kind: {
33
+ type: ScalarTypeEnum.String_unsecure(),
34
+ isOptional: true
35
+ },
36
+ version: {
37
+ type: ScalarTypeEnum.String_unsecure(),
38
+ isOptional: true
39
+ },
40
+ tags: {
41
+ type: ScalarTypeEnum.String_unsecure(),
42
+ isOptional: true,
43
+ isArray: true
44
+ }
45
+ }
46
+ });
47
+ const DocsIndexInput = new SchemaModel({
48
+ name: "DocsIndexInput",
49
+ fields: {
50
+ query: {
51
+ type: ScalarTypeEnum.String_unsecure(),
52
+ isOptional: true
53
+ },
54
+ tag: {
55
+ type: ScalarTypeEnum.String_unsecure(),
56
+ isOptional: true,
57
+ isArray: true
58
+ },
59
+ visibility: {
60
+ type: ScalarTypeEnum.String_unsecure(),
61
+ isOptional: true
62
+ },
63
+ kind: {
64
+ type: ScalarTypeEnum.String_unsecure(),
65
+ isOptional: true
66
+ },
67
+ limit: {
68
+ type: ScalarTypeEnum.Int_unsecure(),
69
+ isOptional: true
70
+ },
71
+ offset: {
72
+ type: ScalarTypeEnum.Int_unsecure(),
73
+ isOptional: true
74
+ }
75
+ }
76
+ });
77
+ const DocsIndexOutput = new SchemaModel({
78
+ name: "DocsIndexOutput",
79
+ fields: {
80
+ items: {
81
+ type: DocSummaryModel,
82
+ isOptional: true,
83
+ isArray: true
84
+ },
85
+ docs: {
86
+ type: DocSummaryModel,
87
+ isOptional: false,
88
+ isArray: true
89
+ },
90
+ total: {
91
+ type: ScalarTypeEnum.Int_unsecure(),
92
+ isOptional: true
93
+ },
94
+ nextOffset: {
95
+ type: ScalarTypeEnum.Int_unsecure(),
96
+ isOptional: true
97
+ }
98
+ }
99
+ });
100
+ const DocsIndexQuery = defineQuery({
101
+ meta: {
102
+ key: "docs.search",
103
+ title: "Docs Index",
104
+ version: "1.0.0",
105
+ description: "Search and filter DocBlocks by query, tag, or visibility.",
106
+ goal: "Provide a consistent index of documentation entries for UI and MCP.",
107
+ context: "Used by docs surfaces to list and filter DocBlocks without coupling to storage.",
108
+ domain: DOCS_DOMAIN,
109
+ owners: DOCS_OWNERS,
110
+ tags: [
111
+ ...DOCS_TAGS,
112
+ "search",
113
+ "index"
114
+ ],
115
+ stability: DOCS_STABILITY,
116
+ docId: [docId("docs.tech.docs-search")]
117
+ },
118
+ capability: {
119
+ key: "docs.system",
120
+ version: "1.0.0"
121
+ },
122
+ io: {
123
+ input: DocsIndexInput,
124
+ output: DocsIndexOutput
125
+ },
126
+ policy: {
127
+ auth: "anonymous",
128
+ pii: []
129
+ }
130
+ });
131
+
132
+ //#endregion
133
+ export { DocSummaryModel, DocsIndexInput, DocsIndexOutput, DocsIndexQuery };
@@ -0,0 +1,3 @@
1
+ import { DocSummaryModel, DocsIndexInput, DocsIndexOutput, DocsIndexQuery } from "./docsIndex.query.js";
2
+ import { ContractReferenceInput, ContractReferenceModel, ContractReferenceOutput, ContractReferenceQuery } from "./contractReference.query.js";
3
+ export { ContractReferenceInput, ContractReferenceModel, ContractReferenceOutput, ContractReferenceQuery, DocSummaryModel, DocsIndexInput, DocsIndexOutput, DocsIndexQuery };
@@ -0,0 +1,4 @@
1
+ import { DocSummaryModel, DocsIndexInput, DocsIndexOutput, DocsIndexQuery } from "./docsIndex.query.js";
2
+ import { ContractReferenceInput, ContractReferenceModel, ContractReferenceOutput, ContractReferenceQuery } from "./contractReference.query.js";
3
+
4
+ export { ContractReferenceInput, ContractReferenceModel, ContractReferenceOutput, ContractReferenceQuery, DocSummaryModel, DocsIndexInput, DocsIndexOutput, DocsIndexQuery };
@@ -60,6 +60,10 @@ Generate implementation code from contract specs using AI agents or templates.
60
60
  contractspec build src/contracts/signup.contracts.ts --agent-mode claude-code
61
61
  \`\`\`
62
62
 
63
+ Available agent modes: simple, cursor, claude-code, openai-codex, opencode (alias for opencode-sdk).
64
+
65
+ OpenCode uses \`@opencode-ai/sdk\` via dynamic import and is ideal for teams running a self-hosted, open backend.
66
+
63
67
  ### \`validate\`
64
68
 
65
69
  Validate contract specifications and verify implementations.
@@ -68,6 +72,12 @@ Validate contract specifications and verify implementations.
68
72
  contractspec validate src/contracts/signup.contracts.ts --check-implementation
69
73
  \`\`\`
70
74
 
75
+ You can also validate with OpenCode:
76
+
77
+ \`\`\`bash
78
+ contractspec validate src/contracts/signup.contracts.ts --check-implementation --agent-mode opencode
79
+ \`\`\`
80
+
71
81
  ### \`watch\`
72
82
 
73
83
  Watch contract specifications and auto-regenerate on changes.
@@ -0,0 +1 @@
1
+ export { };
@@ -0,0 +1,128 @@
1
+ import { registerDocBlocks } from "../registry.js";
2
+
3
+ //#region src/docs/tech/docs-system.docblock.ts
4
+ registerDocBlocks([
5
+ {
6
+ id: "docs.tech.docs-system",
7
+ title: "Docs system overview",
8
+ summary: "How ContractSpec generates, indexes, and presents documentation.",
9
+ kind: "reference",
10
+ visibility: "public",
11
+ route: "/docs/tech/docs/system",
12
+ tags: [
13
+ "docs",
14
+ "system",
15
+ "contracts"
16
+ ],
17
+ body: `# Docs system overview
18
+
19
+ ContractSpec treats documentation as a first-class output of your specs. The docs system combines:
20
+
21
+ - Contract operations and schemas
22
+ - DocBlocks (goal/how/usage/reference)
23
+ - Presentations for rendering
24
+
25
+ The result is a consistent docs surface across CLI, web, and MCP.
26
+
27
+ ## Key surfaces
28
+
29
+ - Generation: \`docs.generate\`
30
+ - Index/search: \`docs.search\`
31
+ - Contract reference: \`docs.contract.reference\`
32
+ - Publish: \`docs.publish\`
33
+ `
34
+ },
35
+ {
36
+ id: "docs.tech.docs-generator",
37
+ title: "Docs generator",
38
+ summary: "Generate reference docs and metadata from ContractSpecs.",
39
+ kind: "how",
40
+ visibility: "public",
41
+ route: "/docs/tech/docs/generator",
42
+ tags: [
43
+ "docs",
44
+ "generator",
45
+ "cli"
46
+ ],
47
+ body: `# Docs generator
48
+
49
+ The generator produces documentation artifacts from registered ContractSpecs and DocBlocks.
50
+
51
+ ## Outputs
52
+
53
+ - Reference pages for operations, events, forms, data views, and presentations
54
+ - Search index metadata (DocBlocks + routes)
55
+ - Contract schemas rendered to markdown or JSON
56
+ `
57
+ },
58
+ {
59
+ id: "docs.tech.docs-search",
60
+ title: "Docs index and search",
61
+ summary: "Search DocBlocks by query, tag, kind, or visibility.",
62
+ kind: "reference",
63
+ visibility: "public",
64
+ route: "/docs/tech/docs/search",
65
+ tags: ["docs", "search"],
66
+ body: `# Docs index and search
67
+
68
+ The docs index is the canonical list of DocBlocks exposed to UI and MCP surfaces.
69
+
70
+ ## Query
71
+
72
+ - Operation: \`docs.search\`
73
+ - Filters: query, tag, kind, visibility
74
+ `
75
+ },
76
+ {
77
+ id: "docs.tech.docs-reference",
78
+ title: "Contract reference pages",
79
+ summary: "Resolve any spec into a docs-ready reference payload.",
80
+ kind: "reference",
81
+ visibility: "public",
82
+ route: "/docs/tech/docs/reference",
83
+ tags: ["docs", "reference"],
84
+ body: `# Contract reference
85
+
86
+ Contract reference pages are generated from spec metadata plus schema details.
87
+
88
+ ## Query
89
+
90
+ - Operation: \`docs.contract.reference\`
91
+ `
92
+ },
93
+ {
94
+ id: "docs.tech.docs-publish",
95
+ title: "Docs publish",
96
+ summary: "Publish generated artifacts to the docs host.",
97
+ kind: "how",
98
+ visibility: "public",
99
+ route: "/docs/tech/docs/publish",
100
+ tags: ["docs", "publish"],
101
+ body: `# Docs publish
102
+
103
+ Publishing moves generated artifacts to a hosting target with versioning.
104
+
105
+ ## Command
106
+
107
+ - Operation: \`docs.publish\`
108
+ `
109
+ },
110
+ {
111
+ id: "docs.tech.docs-examples",
112
+ title: "Examples catalog",
113
+ summary: "Document and surface example projects with sandbox support.",
114
+ kind: "reference",
115
+ visibility: "public",
116
+ route: "/docs/tech/docs/examples",
117
+ tags: ["docs", "examples"],
118
+ body: `# Examples catalog
119
+
120
+ Examples are registered as ExampleSpecs and surface DocBlocks for discovery.
121
+
122
+ - Docs index tags should include \`examples\` to populate the catalog.
123
+ - Sandbox support is available under \`/sandbox\`.
124
+ `
125
+ }
126
+ ]);
127
+
128
+ //#endregion