@habitat-ai/service 0.2.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 (33) hide show
  1. package/dist/client.d.ts +16 -0
  2. package/dist/client.js +16 -0
  3. package/dist/service/base.d.ts +28 -0
  4. package/dist/service/base.js +1 -0
  5. package/dist/service/contract.d.ts +10 -0
  6. package/dist/service/contract.js +5 -0
  7. package/dist/service/impl.d.ts +508 -0
  8. package/dist/service/impl.js +7 -0
  9. package/dist/service/modules/catalog/contract/catalog.d.ts +252 -0
  10. package/dist/service/modules/catalog/contract/catalog.js +13 -0
  11. package/dist/service/modules/catalog/contract/index.d.ts +3 -0
  12. package/dist/service/modules/catalog/contract/index.js +3 -0
  13. package/dist/service/modules/catalog/model/dto/catalog.d.ts +276 -0
  14. package/dist/service/modules/catalog/model/dto/catalog.js +380 -0
  15. package/dist/service/modules/catalog/model/dto/check.d.ts +104 -0
  16. package/dist/service/modules/catalog/model/dto/check.js +305 -0
  17. package/dist/service/modules/catalog/model/dto/structure.d.ts +23 -0
  18. package/dist/service/modules/catalog/model/dto/structure.js +93 -0
  19. package/dist/service/modules/catalog/model/policy/catalog.d.ts +109 -0
  20. package/dist/service/modules/catalog/model/policy/catalog.js +607 -0
  21. package/dist/service/modules/catalog/model/policy/check.d.ts +57 -0
  22. package/dist/service/modules/catalog/model/policy/check.js +207 -0
  23. package/dist/service/modules/catalog/model/policy/structure.d.ts +64 -0
  24. package/dist/service/modules/catalog/model/policy/structure.js +249 -0
  25. package/dist/service/modules/catalog/module.d.ts +521 -0
  26. package/dist/service/modules/catalog/module.js +12 -0
  27. package/dist/service/modules/catalog/router/catalog.router.d.ts +266 -0
  28. package/dist/service/modules/catalog/router/catalog.router.js +659 -0
  29. package/dist/service/modules/catalog/router.d.ts +265 -0
  30. package/dist/service/modules/catalog/router.js +3 -0
  31. package/dist/service/router.d.ts +267 -0
  32. package/dist/service/router.js +4 -0
  33. package/package.json +49 -0
@@ -0,0 +1,521 @@
1
+ /** Catalog implementer exposing the vocabulary required by resolve and check. */
2
+ export declare const module: import("@orpc/server").SharedRouterImplementerWithMiddlewares<{
3
+ resolve: import("@orpc/contract").ProcedureContract<import("packages/typebox-adapter/dist/index.js").TypeBoxStandardSchema<import("typebox").TObject<{}>>, import("packages/typebox-adapter/dist/index.js").TypeBoxStandardSchema<import("typebox").TUnion<[import("typebox").TObject<{
4
+ _tag: import("typebox").TLiteral<"Resolved">;
5
+ catalog: import("typebox").TObject<{
6
+ schemaVersion: import("typebox").TLiteral<3>;
7
+ policyPack: import("typebox").TObject<{
8
+ name: import("typebox").TString;
9
+ version: import("typebox").TString;
10
+ protocolVersion: import("typebox").TLiteral<1>;
11
+ blueprints: import("typebox").TArray<import("typebox").TObject<{
12
+ id: import("typebox").TString;
13
+ version: import("typebox").TInteger;
14
+ path: import("typebox").TString;
15
+ }>>;
16
+ }>;
17
+ blueprints: import("typebox").TArray<import("typebox").TObject<{
18
+ definition: import("typebox").TObject<{
19
+ schemaVersion: import("typebox").TLiteral<1>;
20
+ id: import("typebox").TString;
21
+ version: import("typebox").TInteger;
22
+ rules: import("typebox").TArray<import("typebox").TObject<{
23
+ id: import("typebox").TString;
24
+ lane: import("typebox").TUnion<[import("typebox").TLiteral<"enforced">, import("typebox").TLiteral<"advisory">]>;
25
+ message: import("typebox").TString;
26
+ remediate: import("typebox").TUnion<[import("typebox").TString, import("typebox").TNull]>;
27
+ runner: import("typebox").TUnion<[import("typebox").TObject<{
28
+ name: import("typebox").TLiteral<"habitat">;
29
+ mode: import("typebox").TLiteral<"structure">;
30
+ structure: import("typebox").TString;
31
+ }>, import("typebox").TObject<{
32
+ name: import("typebox").TLiteral<"grit">;
33
+ pattern: import("typebox").TString;
34
+ patternName: import("typebox").TString;
35
+ acquisition: import("typebox").TObject<{
36
+ kind: import("typebox").TUnion<[import("typebox").TLiteral<"check">, import("typebox").TLiteral<"apply-dry-run">]>;
37
+ rootRoles: import("typebox").TArray<import("typebox").TString>;
38
+ selections: import("typebox").TArray<import("typebox").TString>;
39
+ }>;
40
+ }>]>;
41
+ }>>;
42
+ instance: import("typebox").TObject<{
43
+ manifest: import("typebox").TLiteral<"habitat.toml">;
44
+ anchorRoot: import("typebox").TString;
45
+ roots: import("typebox").TArray<import("typebox").TObject<{
46
+ id: import("typebox").TString;
47
+ required: import("typebox").TBoolean;
48
+ kind: import("typebox").TUnion<[import("typebox").TLiteral<"directory">, import("typebox").TLiteral<"file">]>;
49
+ }>>;
50
+ selections: import("typebox").TArray<import("typebox").TObject<{
51
+ id: import("typebox").TString;
52
+ root: import("typebox").TString;
53
+ kind: import("typebox").TUnion<[import("typebox").TLiteral<"directory">, import("typebox").TLiteral<"file">]>;
54
+ memberPattern: import("typebox").TString;
55
+ pathTemplate: import("typebox").TString;
56
+ }>>;
57
+ }>;
58
+ }>;
59
+ provenance: import("typebox").TObject<{
60
+ kind: import("typebox").TLiteral<"local">;
61
+ authorityRoot: import("typebox").TString;
62
+ relativePath: import("typebox").TString;
63
+ }>;
64
+ }>>;
65
+ instances: import("typebox").TArray<import("typebox").TObject<{
66
+ id: import("typebox").TString;
67
+ ownerProject: import("typebox").TString;
68
+ blueprint: import("typebox").TString;
69
+ blueprintVersion: import("typebox").TInteger;
70
+ manifestPath: import("typebox").TString;
71
+ roots: import("typebox").TArray<import("typebox").TObject<{
72
+ id: import("typebox").TString;
73
+ required: import("typebox").TBoolean;
74
+ kind: import("typebox").TUnion<[import("typebox").TLiteral<"directory">, import("typebox").TLiteral<"file">]>;
75
+ path: import("typebox").TString;
76
+ }>>;
77
+ selections: import("typebox").TArray<import("typebox").TObject<{
78
+ id: import("typebox").TString;
79
+ root: import("typebox").TString;
80
+ members: import("typebox").TArray<import("typebox").TObject<{
81
+ id: import("typebox").TString;
82
+ kind: import("typebox").TUnion<[import("typebox").TLiteral<"directory">, import("typebox").TLiteral<"file">]>;
83
+ path: import("typebox").TString;
84
+ }>>;
85
+ }>>;
86
+ }>>;
87
+ applications: import("typebox").TArray<import("typebox").TObject<{
88
+ ownerProject: import("typebox").TString;
89
+ instanceId: import("typebox").TString;
90
+ blueprint: import("typebox").TString;
91
+ blueprintVersion: import("typebox").TInteger;
92
+ ruleId: import("typebox").TString;
93
+ manifestPath: import("typebox").TString;
94
+ lane: import("typebox").TUnion<[import("typebox").TLiteral<"enforced">, import("typebox").TLiteral<"advisory">]>;
95
+ message: import("typebox").TString;
96
+ remediate: import("typebox").TUnion<[import("typebox").TString, import("typebox").TNull]>;
97
+ provenance: import("typebox").TObject<{
98
+ kind: import("typebox").TLiteral<"local">;
99
+ authorityRoot: import("typebox").TString;
100
+ relativePath: import("typebox").TString;
101
+ }>;
102
+ runner: import("typebox").TUnion<[import("typebox").TObject<{
103
+ name: import("typebox").TLiteral<"habitat">;
104
+ mode: import("typebox").TLiteral<"structure">;
105
+ structure: import("typebox").TObject<{
106
+ provenance: import("typebox").TObject<{
107
+ kind: import("typebox").TLiteral<"local">;
108
+ authorityRoot: import("typebox").TString;
109
+ relativePath: import("typebox").TString;
110
+ }>;
111
+ relativePath: import("typebox").TString;
112
+ absolutePath: import("typebox").TString;
113
+ }>;
114
+ rootBindings: import("typebox").TArray<import("typebox").TObject<{
115
+ rootRole: import("typebox").TString;
116
+ required: import("typebox").TBoolean;
117
+ kind: import("typebox").TUnion<[import("typebox").TLiteral<"directory">, import("typebox").TLiteral<"file">]>;
118
+ path: import("typebox").TOptional<import("typebox").TString>;
119
+ }>>;
120
+ }>, import("typebox").TObject<{
121
+ name: import("typebox").TLiteral<"grit">;
122
+ pattern: import("typebox").TObject<{
123
+ provenance: import("typebox").TObject<{
124
+ kind: import("typebox").TLiteral<"local">;
125
+ authorityRoot: import("typebox").TString;
126
+ relativePath: import("typebox").TString;
127
+ }>;
128
+ relativePath: import("typebox").TString;
129
+ absolutePath: import("typebox").TString;
130
+ }>;
131
+ patternName: import("typebox").TString;
132
+ acquisition: import("typebox").TObject<{
133
+ kind: import("typebox").TUnion<[import("typebox").TLiteral<"check">, import("typebox").TLiteral<"apply-dry-run">]>;
134
+ entries: import("typebox").TArray<import("typebox").TObject<{
135
+ source: import("typebox").TUnion<[import("typebox").TObject<{
136
+ kind: import("typebox").TLiteral<"root-role">;
137
+ id: import("typebox").TString;
138
+ }>, import("typebox").TObject<{
139
+ kind: import("typebox").TLiteral<"selection">;
140
+ id: import("typebox").TString;
141
+ member: import("typebox").TString;
142
+ }>]>;
143
+ kind: import("typebox").TUnion<[import("typebox").TLiteral<"directory">, import("typebox").TLiteral<"file">]>;
144
+ path: import("typebox").TString;
145
+ }>>;
146
+ }>;
147
+ }>]>;
148
+ }>>;
149
+ compatibility: import("typebox").TObject<{
150
+ schemaVersion: import("typebox").TLiteral<2>;
151
+ ownerRoots: import("typebox").TRecord<"^.*$", import("typebox").TString>;
152
+ rules: import("typebox").TArray<import("typebox").TObject<{
153
+ id: import("typebox").TString;
154
+ ownerProject: import("typebox").TString;
155
+ manifestPath: import("typebox").TString;
156
+ }>>;
157
+ }>;
158
+ }>;
159
+ }>, import("typebox").TObject<{
160
+ _tag: import("typebox").TLiteral<"Rejected">;
161
+ issues: import("typebox").TArray<import("typebox").TObject<{
162
+ code: import("typebox").TUnion<[import("typebox").TLiteral<"authority-anchor-mismatch">, import("typebox").TLiteral<"authority-blueprint-missing">, import("typebox").TLiteral<"authority-compatibility-invalid">, import("typebox").TLiteral<"authority-definition-invalid">, import("typebox").TLiteral<"authority-definition-kind-mismatch">, import("typebox").TLiteral<"authority-duplicate-blueprint">, import("typebox").TLiteral<"authority-duplicate-instance">, import("typebox").TLiteral<"authority-duplicate-rule">, import("typebox").TLiteral<"authority-filesystem-failed">, import("typebox").TLiteral<"authority-json-invalid">, import("typebox").TLiteral<"authority-manifest-invalid">, import("typebox").TLiteral<"authority-order-invalid">, import("typebox").TLiteral<"authority-path-escape">, import("typebox").TLiteral<"authority-path-invalid">, import("typebox").TLiteral<"authority-path-kind-mismatch">, import("typebox").TLiteral<"authority-path-missing">, import("typebox").TLiteral<"authority-package-name-mismatch">, import("typebox").TLiteral<"authority-policy-pack-members-unsupported">, import("typebox").TLiteral<"authority-resolution-failed">, import("typebox").TLiteral<"authority-rule-invalid">, import("typebox").TLiteral<"authority-schema-invalid">, import("typebox").TLiteral<"authority-toml-invalid">, import("typebox").TLiteral<"authority-version-mismatch">, import("typebox").TLiteral<"authority-workspace-root-invalid">]>;
163
+ path: import("typebox").TString;
164
+ message: import("typebox").TString;
165
+ }>>;
166
+ }>]>>, object>;
167
+ check: import("@orpc/contract").ProcedureContract<import("packages/typebox-adapter/dist/index.js").TypeBoxStandardSchema<import("typebox").TObject<{
168
+ selectors: import("typebox").TOptional<import("typebox").TObject<{
169
+ owner: import("typebox").TOptional<import("typebox").TString>;
170
+ instance: import("typebox").TOptional<import("typebox").TString>;
171
+ rule: import("typebox").TOptional<import("typebox").TString>;
172
+ rules: import("typebox").TOptional<import("typebox").TArray<import("typebox").TString>>;
173
+ runner: import("typebox").TOptional<import("typebox").TString>;
174
+ }>>;
175
+ }>>, import("packages/typebox-adapter/dist/index.js").TypeBoxStandardSchema<import("typebox").TUnion<[import("typebox").TObject<{
176
+ _tag: import("typebox").TLiteral<"CatalogRejected">;
177
+ issues: import("typebox").TArray<import("typebox").TObject<{
178
+ code: import("typebox").TUnion<[import("typebox").TLiteral<"authority-anchor-mismatch">, import("typebox").TLiteral<"authority-blueprint-missing">, import("typebox").TLiteral<"authority-compatibility-invalid">, import("typebox").TLiteral<"authority-definition-invalid">, import("typebox").TLiteral<"authority-definition-kind-mismatch">, import("typebox").TLiteral<"authority-duplicate-blueprint">, import("typebox").TLiteral<"authority-duplicate-instance">, import("typebox").TLiteral<"authority-duplicate-rule">, import("typebox").TLiteral<"authority-filesystem-failed">, import("typebox").TLiteral<"authority-json-invalid">, import("typebox").TLiteral<"authority-manifest-invalid">, import("typebox").TLiteral<"authority-order-invalid">, import("typebox").TLiteral<"authority-path-escape">, import("typebox").TLiteral<"authority-path-invalid">, import("typebox").TLiteral<"authority-path-kind-mismatch">, import("typebox").TLiteral<"authority-path-missing">, import("typebox").TLiteral<"authority-package-name-mismatch">, import("typebox").TLiteral<"authority-policy-pack-members-unsupported">, import("typebox").TLiteral<"authority-resolution-failed">, import("typebox").TLiteral<"authority-rule-invalid">, import("typebox").TLiteral<"authority-schema-invalid">, import("typebox").TLiteral<"authority-toml-invalid">, import("typebox").TLiteral<"authority-version-mismatch">, import("typebox").TLiteral<"authority-workspace-root-invalid">]>;
179
+ path: import("typebox").TString;
180
+ message: import("typebox").TString;
181
+ }>>;
182
+ }>, import("typebox").TObject<{
183
+ _tag: import("typebox").TLiteral<"SelectionRejected">;
184
+ issues: import("typebox").TArray<import("typebox").TObject<{
185
+ code: import("typebox").TUnion<[import("typebox").TLiteral<"selector-empty">, import("typebox").TLiteral<"selector-unknown">, import("typebox").TLiteral<"selector-wrong-namespace">, import("typebox").TLiteral<"runner-unsupported">]>;
186
+ selector: import("typebox").TString;
187
+ message: import("typebox").TString;
188
+ }>>;
189
+ }>, import("typebox").TObject<{
190
+ _tag: import("typebox").TLiteral<"Completed">;
191
+ ok: import("typebox").TBoolean;
192
+ applications: import("typebox").TArray<import("typebox").TUnion<[import("typebox").TObject<{
193
+ ownerProject: import("typebox").TString;
194
+ instanceId: import("typebox").TString;
195
+ ruleId: import("typebox").TString;
196
+ runner: import("typebox").TLiteral<"grit">;
197
+ lane: import("typebox").TUnion<[import("typebox").TLiteral<"enforced">, import("typebox").TLiteral<"advisory">]>;
198
+ locked: import("typebox").TLiteral<false>;
199
+ status: import("typebox").TUnion<[import("typebox").TLiteral<"pass">, import("typebox").TLiteral<"fail">, import("typebox").TLiteral<"advisory-findings">, import("typebox").TLiteral<"error">]>;
200
+ message: import("typebox").TString;
201
+ remediate: import("typebox").TUnion<[import("typebox").TString, import("typebox").TNull]>;
202
+ disposition: import("typebox").TUnion<[import("typebox").TObject<{
203
+ kind: import("typebox").TLiteral<"evaluated">;
204
+ }>, import("typebox").TObject<{
205
+ kind: import("typebox").TLiteral<"failed">;
206
+ reason: import("typebox").TUnion<[import("typebox").TUnion<[import("typebox").TLiteral<"InvalidInput">, import("typebox").TLiteral<"SetupFailed">, import("typebox").TLiteral<"ExecutionFailed">, import("typebox").TLiteral<"TimedOut">, import("typebox").TLiteral<"InvalidOutput">]>, import("typebox").TLiteral<"PatternReadFailed">, import("typebox").TLiteral<"PatternInvalid">, import("typebox").TLiteral<"FindingPathInvalid">]>;
207
+ detail: import("typebox").TString;
208
+ }>]>;
209
+ findings: import("typebox").TArray<import("typebox").TObject<{
210
+ path: import("typebox").TString;
211
+ start: import("typebox").TObject<{
212
+ line: import("typebox").TReadonly<import("typebox").TInteger>;
213
+ column: import("typebox").TReadonly<import("typebox").TInteger>;
214
+ offset: import("typebox").TReadonly<import("typebox").TInteger>;
215
+ }>;
216
+ end: import("typebox").TObject<{
217
+ line: import("typebox").TReadonly<import("typebox").TInteger>;
218
+ column: import("typebox").TReadonly<import("typebox").TInteger>;
219
+ offset: import("typebox").TReadonly<import("typebox").TInteger>;
220
+ }>;
221
+ message: import("typebox").TUnion<[import("typebox").TString, import("typebox").TNull]>;
222
+ severity: import("typebox").TUnion<[import("typebox").TLiteral<"error">, import("typebox").TLiteral<"advisory">]>;
223
+ baselined: import("typebox").TLiteral<false>;
224
+ }>>;
225
+ }>, import("typebox").TObject<{
226
+ ownerProject: import("typebox").TString;
227
+ instanceId: import("typebox").TString;
228
+ ruleId: import("typebox").TString;
229
+ runner: import("typebox").TLiteral<"habitat">;
230
+ lane: import("typebox").TUnion<[import("typebox").TLiteral<"enforced">, import("typebox").TLiteral<"advisory">]>;
231
+ locked: import("typebox").TLiteral<false>;
232
+ status: import("typebox").TUnion<[import("typebox").TLiteral<"pass">, import("typebox").TLiteral<"fail">, import("typebox").TLiteral<"advisory-findings">, import("typebox").TLiteral<"error">]>;
233
+ message: import("typebox").TString;
234
+ remediate: import("typebox").TUnion<[import("typebox").TString, import("typebox").TNull]>;
235
+ disposition: import("typebox").TUnion<[import("typebox").TObject<{
236
+ kind: import("typebox").TLiteral<"evaluated">;
237
+ }>, import("typebox").TObject<{
238
+ kind: import("typebox").TLiteral<"failed">;
239
+ reason: import("typebox").TUnion<[import("typebox").TLiteral<"StructureReadFailed">, import("typebox").TLiteral<"StructureInvalid">, import("typebox").TLiteral<"InventoryFailed">, import("typebox").TLiteral<"StructureObservationFailed">]>;
240
+ detail: import("typebox").TString;
241
+ }>]>;
242
+ findings: import("typebox").TArray<import("typebox").TObject<{
243
+ path: import("typebox").TString;
244
+ code: import("typebox").TUnion<[import("typebox").TLiteral<"root-missing">, import("typebox").TLiteral<"wrong-root-kind">, import("typebox").TLiteral<"missing-required-child">, import("typebox").TLiteral<"forbidden-child">, import("typebox").TLiteral<"unexpected-child">]>;
245
+ message: import("typebox").TString;
246
+ severity: import("typebox").TUnion<[import("typebox").TLiteral<"error">, import("typebox").TLiteral<"advisory">]>;
247
+ baselined: import("typebox").TLiteral<false>;
248
+ }>>;
249
+ }>]>>;
250
+ }>]>>, object>;
251
+ }, import("../../base.js").Context & object, {
252
+ fileSystem: import("effect/FileSystem").FileSystem;
253
+ path: import("effect/Path").Path;
254
+ ruleEvaluation: import("resources/rule-evaluation/dist/contract.js").RuleEvaluationResource<never>;
255
+ sourceInventory: import("resources/source-inventory/dist/contract.js").SourceInventoryResource<never>;
256
+ workspaceRoot: string;
257
+ policyPack: import("../../base.js").SelectedPolicyPack;
258
+ }> & {
259
+ resolve: import("@orpc/server").ProcedureImplementer<import("../../base.js").Context & object, {
260
+ fileSystem: import("effect/FileSystem").FileSystem;
261
+ path: import("effect/Path").Path;
262
+ ruleEvaluation: import("resources/rule-evaluation/dist/contract.js").RuleEvaluationResource<never>;
263
+ sourceInventory: import("resources/source-inventory/dist/contract.js").SourceInventoryResource<never>;
264
+ workspaceRoot: string;
265
+ policyPack: import("../../base.js").SelectedPolicyPack;
266
+ }, import("packages/typebox-adapter/dist/index.js").TypeBoxStandardSchema<import("typebox").TObject<{}>>, import("packages/typebox-adapter/dist/index.js").TypeBoxStandardSchema<import("typebox").TUnion<[import("typebox").TObject<{
267
+ _tag: import("typebox").TLiteral<"Resolved">;
268
+ catalog: import("typebox").TObject<{
269
+ schemaVersion: import("typebox").TLiteral<3>;
270
+ policyPack: import("typebox").TObject<{
271
+ name: import("typebox").TString;
272
+ version: import("typebox").TString;
273
+ protocolVersion: import("typebox").TLiteral<1>;
274
+ blueprints: import("typebox").TArray<import("typebox").TObject<{
275
+ id: import("typebox").TString;
276
+ version: import("typebox").TInteger;
277
+ path: import("typebox").TString;
278
+ }>>;
279
+ }>;
280
+ blueprints: import("typebox").TArray<import("typebox").TObject<{
281
+ definition: import("typebox").TObject<{
282
+ schemaVersion: import("typebox").TLiteral<1>;
283
+ id: import("typebox").TString;
284
+ version: import("typebox").TInteger;
285
+ rules: import("typebox").TArray<import("typebox").TObject<{
286
+ id: import("typebox").TString;
287
+ lane: import("typebox").TUnion<[import("typebox").TLiteral<"enforced">, import("typebox").TLiteral<"advisory">]>;
288
+ message: import("typebox").TString;
289
+ remediate: import("typebox").TUnion<[import("typebox").TString, import("typebox").TNull]>;
290
+ runner: import("typebox").TUnion<[import("typebox").TObject<{
291
+ name: import("typebox").TLiteral<"habitat">;
292
+ mode: import("typebox").TLiteral<"structure">;
293
+ structure: import("typebox").TString;
294
+ }>, import("typebox").TObject<{
295
+ name: import("typebox").TLiteral<"grit">;
296
+ pattern: import("typebox").TString;
297
+ patternName: import("typebox").TString;
298
+ acquisition: import("typebox").TObject<{
299
+ kind: import("typebox").TUnion<[import("typebox").TLiteral<"check">, import("typebox").TLiteral<"apply-dry-run">]>;
300
+ rootRoles: import("typebox").TArray<import("typebox").TString>;
301
+ selections: import("typebox").TArray<import("typebox").TString>;
302
+ }>;
303
+ }>]>;
304
+ }>>;
305
+ instance: import("typebox").TObject<{
306
+ manifest: import("typebox").TLiteral<"habitat.toml">;
307
+ anchorRoot: import("typebox").TString;
308
+ roots: import("typebox").TArray<import("typebox").TObject<{
309
+ id: import("typebox").TString;
310
+ required: import("typebox").TBoolean;
311
+ kind: import("typebox").TUnion<[import("typebox").TLiteral<"directory">, import("typebox").TLiteral<"file">]>;
312
+ }>>;
313
+ selections: import("typebox").TArray<import("typebox").TObject<{
314
+ id: import("typebox").TString;
315
+ root: import("typebox").TString;
316
+ kind: import("typebox").TUnion<[import("typebox").TLiteral<"directory">, import("typebox").TLiteral<"file">]>;
317
+ memberPattern: import("typebox").TString;
318
+ pathTemplate: import("typebox").TString;
319
+ }>>;
320
+ }>;
321
+ }>;
322
+ provenance: import("typebox").TObject<{
323
+ kind: import("typebox").TLiteral<"local">;
324
+ authorityRoot: import("typebox").TString;
325
+ relativePath: import("typebox").TString;
326
+ }>;
327
+ }>>;
328
+ instances: import("typebox").TArray<import("typebox").TObject<{
329
+ id: import("typebox").TString;
330
+ ownerProject: import("typebox").TString;
331
+ blueprint: import("typebox").TString;
332
+ blueprintVersion: import("typebox").TInteger;
333
+ manifestPath: import("typebox").TString;
334
+ roots: import("typebox").TArray<import("typebox").TObject<{
335
+ id: import("typebox").TString;
336
+ required: import("typebox").TBoolean;
337
+ kind: import("typebox").TUnion<[import("typebox").TLiteral<"directory">, import("typebox").TLiteral<"file">]>;
338
+ path: import("typebox").TString;
339
+ }>>;
340
+ selections: import("typebox").TArray<import("typebox").TObject<{
341
+ id: import("typebox").TString;
342
+ root: import("typebox").TString;
343
+ members: import("typebox").TArray<import("typebox").TObject<{
344
+ id: import("typebox").TString;
345
+ kind: import("typebox").TUnion<[import("typebox").TLiteral<"directory">, import("typebox").TLiteral<"file">]>;
346
+ path: import("typebox").TString;
347
+ }>>;
348
+ }>>;
349
+ }>>;
350
+ applications: import("typebox").TArray<import("typebox").TObject<{
351
+ ownerProject: import("typebox").TString;
352
+ instanceId: import("typebox").TString;
353
+ blueprint: import("typebox").TString;
354
+ blueprintVersion: import("typebox").TInteger;
355
+ ruleId: import("typebox").TString;
356
+ manifestPath: import("typebox").TString;
357
+ lane: import("typebox").TUnion<[import("typebox").TLiteral<"enforced">, import("typebox").TLiteral<"advisory">]>;
358
+ message: import("typebox").TString;
359
+ remediate: import("typebox").TUnion<[import("typebox").TString, import("typebox").TNull]>;
360
+ provenance: import("typebox").TObject<{
361
+ kind: import("typebox").TLiteral<"local">;
362
+ authorityRoot: import("typebox").TString;
363
+ relativePath: import("typebox").TString;
364
+ }>;
365
+ runner: import("typebox").TUnion<[import("typebox").TObject<{
366
+ name: import("typebox").TLiteral<"habitat">;
367
+ mode: import("typebox").TLiteral<"structure">;
368
+ structure: import("typebox").TObject<{
369
+ provenance: import("typebox").TObject<{
370
+ kind: import("typebox").TLiteral<"local">;
371
+ authorityRoot: import("typebox").TString;
372
+ relativePath: import("typebox").TString;
373
+ }>;
374
+ relativePath: import("typebox").TString;
375
+ absolutePath: import("typebox").TString;
376
+ }>;
377
+ rootBindings: import("typebox").TArray<import("typebox").TObject<{
378
+ rootRole: import("typebox").TString;
379
+ required: import("typebox").TBoolean;
380
+ kind: import("typebox").TUnion<[import("typebox").TLiteral<"directory">, import("typebox").TLiteral<"file">]>;
381
+ path: import("typebox").TOptional<import("typebox").TString>;
382
+ }>>;
383
+ }>, import("typebox").TObject<{
384
+ name: import("typebox").TLiteral<"grit">;
385
+ pattern: import("typebox").TObject<{
386
+ provenance: import("typebox").TObject<{
387
+ kind: import("typebox").TLiteral<"local">;
388
+ authorityRoot: import("typebox").TString;
389
+ relativePath: import("typebox").TString;
390
+ }>;
391
+ relativePath: import("typebox").TString;
392
+ absolutePath: import("typebox").TString;
393
+ }>;
394
+ patternName: import("typebox").TString;
395
+ acquisition: import("typebox").TObject<{
396
+ kind: import("typebox").TUnion<[import("typebox").TLiteral<"check">, import("typebox").TLiteral<"apply-dry-run">]>;
397
+ entries: import("typebox").TArray<import("typebox").TObject<{
398
+ source: import("typebox").TUnion<[import("typebox").TObject<{
399
+ kind: import("typebox").TLiteral<"root-role">;
400
+ id: import("typebox").TString;
401
+ }>, import("typebox").TObject<{
402
+ kind: import("typebox").TLiteral<"selection">;
403
+ id: import("typebox").TString;
404
+ member: import("typebox").TString;
405
+ }>]>;
406
+ kind: import("typebox").TUnion<[import("typebox").TLiteral<"directory">, import("typebox").TLiteral<"file">]>;
407
+ path: import("typebox").TString;
408
+ }>>;
409
+ }>;
410
+ }>]>;
411
+ }>>;
412
+ compatibility: import("typebox").TObject<{
413
+ schemaVersion: import("typebox").TLiteral<2>;
414
+ ownerRoots: import("typebox").TRecord<"^.*$", import("typebox").TString>;
415
+ rules: import("typebox").TArray<import("typebox").TObject<{
416
+ id: import("typebox").TString;
417
+ ownerProject: import("typebox").TString;
418
+ manifestPath: import("typebox").TString;
419
+ }>>;
420
+ }>;
421
+ }>;
422
+ }>, import("typebox").TObject<{
423
+ _tag: import("typebox").TLiteral<"Rejected">;
424
+ issues: import("typebox").TArray<import("typebox").TObject<{
425
+ code: import("typebox").TUnion<[import("typebox").TLiteral<"authority-anchor-mismatch">, import("typebox").TLiteral<"authority-blueprint-missing">, import("typebox").TLiteral<"authority-compatibility-invalid">, import("typebox").TLiteral<"authority-definition-invalid">, import("typebox").TLiteral<"authority-definition-kind-mismatch">, import("typebox").TLiteral<"authority-duplicate-blueprint">, import("typebox").TLiteral<"authority-duplicate-instance">, import("typebox").TLiteral<"authority-duplicate-rule">, import("typebox").TLiteral<"authority-filesystem-failed">, import("typebox").TLiteral<"authority-json-invalid">, import("typebox").TLiteral<"authority-manifest-invalid">, import("typebox").TLiteral<"authority-order-invalid">, import("typebox").TLiteral<"authority-path-escape">, import("typebox").TLiteral<"authority-path-invalid">, import("typebox").TLiteral<"authority-path-kind-mismatch">, import("typebox").TLiteral<"authority-path-missing">, import("typebox").TLiteral<"authority-package-name-mismatch">, import("typebox").TLiteral<"authority-policy-pack-members-unsupported">, import("typebox").TLiteral<"authority-resolution-failed">, import("typebox").TLiteral<"authority-rule-invalid">, import("typebox").TLiteral<"authority-schema-invalid">, import("typebox").TLiteral<"authority-toml-invalid">, import("typebox").TLiteral<"authority-version-mismatch">, import("typebox").TLiteral<"authority-workspace-root-invalid">]>;
426
+ path: import("typebox").TString;
427
+ message: import("typebox").TString;
428
+ }>>;
429
+ }>]>>, object>;
430
+ check: import("@orpc/server").ProcedureImplementer<import("../../base.js").Context & object, {
431
+ fileSystem: import("effect/FileSystem").FileSystem;
432
+ path: import("effect/Path").Path;
433
+ ruleEvaluation: import("resources/rule-evaluation/dist/contract.js").RuleEvaluationResource<never>;
434
+ sourceInventory: import("resources/source-inventory/dist/contract.js").SourceInventoryResource<never>;
435
+ workspaceRoot: string;
436
+ policyPack: import("../../base.js").SelectedPolicyPack;
437
+ }, import("packages/typebox-adapter/dist/index.js").TypeBoxStandardSchema<import("typebox").TObject<{
438
+ selectors: import("typebox").TOptional<import("typebox").TObject<{
439
+ owner: import("typebox").TOptional<import("typebox").TString>;
440
+ instance: import("typebox").TOptional<import("typebox").TString>;
441
+ rule: import("typebox").TOptional<import("typebox").TString>;
442
+ rules: import("typebox").TOptional<import("typebox").TArray<import("typebox").TString>>;
443
+ runner: import("typebox").TOptional<import("typebox").TString>;
444
+ }>>;
445
+ }>>, import("packages/typebox-adapter/dist/index.js").TypeBoxStandardSchema<import("typebox").TUnion<[import("typebox").TObject<{
446
+ _tag: import("typebox").TLiteral<"CatalogRejected">;
447
+ issues: import("typebox").TArray<import("typebox").TObject<{
448
+ code: import("typebox").TUnion<[import("typebox").TLiteral<"authority-anchor-mismatch">, import("typebox").TLiteral<"authority-blueprint-missing">, import("typebox").TLiteral<"authority-compatibility-invalid">, import("typebox").TLiteral<"authority-definition-invalid">, import("typebox").TLiteral<"authority-definition-kind-mismatch">, import("typebox").TLiteral<"authority-duplicate-blueprint">, import("typebox").TLiteral<"authority-duplicate-instance">, import("typebox").TLiteral<"authority-duplicate-rule">, import("typebox").TLiteral<"authority-filesystem-failed">, import("typebox").TLiteral<"authority-json-invalid">, import("typebox").TLiteral<"authority-manifest-invalid">, import("typebox").TLiteral<"authority-order-invalid">, import("typebox").TLiteral<"authority-path-escape">, import("typebox").TLiteral<"authority-path-invalid">, import("typebox").TLiteral<"authority-path-kind-mismatch">, import("typebox").TLiteral<"authority-path-missing">, import("typebox").TLiteral<"authority-package-name-mismatch">, import("typebox").TLiteral<"authority-policy-pack-members-unsupported">, import("typebox").TLiteral<"authority-resolution-failed">, import("typebox").TLiteral<"authority-rule-invalid">, import("typebox").TLiteral<"authority-schema-invalid">, import("typebox").TLiteral<"authority-toml-invalid">, import("typebox").TLiteral<"authority-version-mismatch">, import("typebox").TLiteral<"authority-workspace-root-invalid">]>;
449
+ path: import("typebox").TString;
450
+ message: import("typebox").TString;
451
+ }>>;
452
+ }>, import("typebox").TObject<{
453
+ _tag: import("typebox").TLiteral<"SelectionRejected">;
454
+ issues: import("typebox").TArray<import("typebox").TObject<{
455
+ code: import("typebox").TUnion<[import("typebox").TLiteral<"selector-empty">, import("typebox").TLiteral<"selector-unknown">, import("typebox").TLiteral<"selector-wrong-namespace">, import("typebox").TLiteral<"runner-unsupported">]>;
456
+ selector: import("typebox").TString;
457
+ message: import("typebox").TString;
458
+ }>>;
459
+ }>, import("typebox").TObject<{
460
+ _tag: import("typebox").TLiteral<"Completed">;
461
+ ok: import("typebox").TBoolean;
462
+ applications: import("typebox").TArray<import("typebox").TUnion<[import("typebox").TObject<{
463
+ ownerProject: import("typebox").TString;
464
+ instanceId: import("typebox").TString;
465
+ ruleId: import("typebox").TString;
466
+ runner: import("typebox").TLiteral<"grit">;
467
+ lane: import("typebox").TUnion<[import("typebox").TLiteral<"enforced">, import("typebox").TLiteral<"advisory">]>;
468
+ locked: import("typebox").TLiteral<false>;
469
+ status: import("typebox").TUnion<[import("typebox").TLiteral<"pass">, import("typebox").TLiteral<"fail">, import("typebox").TLiteral<"advisory-findings">, import("typebox").TLiteral<"error">]>;
470
+ message: import("typebox").TString;
471
+ remediate: import("typebox").TUnion<[import("typebox").TString, import("typebox").TNull]>;
472
+ disposition: import("typebox").TUnion<[import("typebox").TObject<{
473
+ kind: import("typebox").TLiteral<"evaluated">;
474
+ }>, import("typebox").TObject<{
475
+ kind: import("typebox").TLiteral<"failed">;
476
+ reason: import("typebox").TUnion<[import("typebox").TUnion<[import("typebox").TLiteral<"InvalidInput">, import("typebox").TLiteral<"SetupFailed">, import("typebox").TLiteral<"ExecutionFailed">, import("typebox").TLiteral<"TimedOut">, import("typebox").TLiteral<"InvalidOutput">]>, import("typebox").TLiteral<"PatternReadFailed">, import("typebox").TLiteral<"PatternInvalid">, import("typebox").TLiteral<"FindingPathInvalid">]>;
477
+ detail: import("typebox").TString;
478
+ }>]>;
479
+ findings: import("typebox").TArray<import("typebox").TObject<{
480
+ path: import("typebox").TString;
481
+ start: import("typebox").TObject<{
482
+ line: import("typebox").TReadonly<import("typebox").TInteger>;
483
+ column: import("typebox").TReadonly<import("typebox").TInteger>;
484
+ offset: import("typebox").TReadonly<import("typebox").TInteger>;
485
+ }>;
486
+ end: import("typebox").TObject<{
487
+ line: import("typebox").TReadonly<import("typebox").TInteger>;
488
+ column: import("typebox").TReadonly<import("typebox").TInteger>;
489
+ offset: import("typebox").TReadonly<import("typebox").TInteger>;
490
+ }>;
491
+ message: import("typebox").TUnion<[import("typebox").TString, import("typebox").TNull]>;
492
+ severity: import("typebox").TUnion<[import("typebox").TLiteral<"error">, import("typebox").TLiteral<"advisory">]>;
493
+ baselined: import("typebox").TLiteral<false>;
494
+ }>>;
495
+ }>, import("typebox").TObject<{
496
+ ownerProject: import("typebox").TString;
497
+ instanceId: import("typebox").TString;
498
+ ruleId: import("typebox").TString;
499
+ runner: import("typebox").TLiteral<"habitat">;
500
+ lane: import("typebox").TUnion<[import("typebox").TLiteral<"enforced">, import("typebox").TLiteral<"advisory">]>;
501
+ locked: import("typebox").TLiteral<false>;
502
+ status: import("typebox").TUnion<[import("typebox").TLiteral<"pass">, import("typebox").TLiteral<"fail">, import("typebox").TLiteral<"advisory-findings">, import("typebox").TLiteral<"error">]>;
503
+ message: import("typebox").TString;
504
+ remediate: import("typebox").TUnion<[import("typebox").TString, import("typebox").TNull]>;
505
+ disposition: import("typebox").TUnion<[import("typebox").TObject<{
506
+ kind: import("typebox").TLiteral<"evaluated">;
507
+ }>, import("typebox").TObject<{
508
+ kind: import("typebox").TLiteral<"failed">;
509
+ reason: import("typebox").TUnion<[import("typebox").TLiteral<"StructureReadFailed">, import("typebox").TLiteral<"StructureInvalid">, import("typebox").TLiteral<"InventoryFailed">, import("typebox").TLiteral<"StructureObservationFailed">]>;
510
+ detail: import("typebox").TString;
511
+ }>]>;
512
+ findings: import("typebox").TArray<import("typebox").TObject<{
513
+ path: import("typebox").TString;
514
+ code: import("typebox").TUnion<[import("typebox").TLiteral<"root-missing">, import("typebox").TLiteral<"wrong-root-kind">, import("typebox").TLiteral<"missing-required-child">, import("typebox").TLiteral<"forbidden-child">, import("typebox").TLiteral<"unexpected-child">]>;
515
+ message: import("typebox").TString;
516
+ severity: import("typebox").TUnion<[import("typebox").TLiteral<"error">, import("typebox").TLiteral<"advisory">]>;
517
+ baselined: import("typebox").TLiteral<false>;
518
+ }>>;
519
+ }>]>>;
520
+ }>]>>, object>;
521
+ };
@@ -0,0 +1,12 @@
1
+ import { service } from "../../impl.js";
2
+ /** Catalog implementer exposing the vocabulary required by resolve and check. */
3
+ export const module = service.catalog.use(async ({ context, next }) => next({
4
+ context: {
5
+ fileSystem: context.deps.fileSystem,
6
+ path: context.deps.path,
7
+ ruleEvaluation: context.deps.ruleEvaluation,
8
+ sourceInventory: context.deps.sourceInventory,
9
+ workspaceRoot: context.scope.workspaceRoot,
10
+ policyPack: context.config.policyPack,
11
+ },
12
+ }));