@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,266 @@
1
+ import { type FileSystem, type Path } from "effect";
2
+ /** Grouped catalog operation tree consumed by the module composition face. */
3
+ export declare const catalog: {
4
+ resolve: import("@orpc/server").ImplementedProcedure<import("../../../base.js").Context & object, {
5
+ fileSystem: FileSystem.FileSystem;
6
+ path: Path.Path;
7
+ ruleEvaluation: import("@habitat-ai/resource-rule-evaluation").RuleEvaluationResource<never>;
8
+ sourceInventory: import("@habitat-ai/resource-source-inventory").SourceInventoryResource<never>;
9
+ workspaceRoot: string;
10
+ policyPack: import("../../../base.js").SelectedPolicyPack;
11
+ }, 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<{
12
+ _tag: import("typebox").TLiteral<"Resolved">;
13
+ catalog: import("typebox").TObject<{
14
+ schemaVersion: import("typebox").TLiteral<3>;
15
+ policyPack: import("typebox").TObject<{
16
+ name: import("typebox").TString;
17
+ version: import("typebox").TString;
18
+ protocolVersion: import("typebox").TLiteral<1>;
19
+ blueprints: import("typebox").TArray<import("typebox").TObject<{
20
+ id: import("typebox").TString;
21
+ version: import("typebox").TInteger;
22
+ path: import("typebox").TString;
23
+ }>>;
24
+ }>;
25
+ blueprints: import("typebox").TArray<import("typebox").TObject<{
26
+ definition: import("typebox").TObject<{
27
+ schemaVersion: import("typebox").TLiteral<1>;
28
+ id: import("typebox").TString;
29
+ version: import("typebox").TInteger;
30
+ rules: import("typebox").TArray<import("typebox").TObject<{
31
+ id: import("typebox").TString;
32
+ lane: import("typebox").TUnion<[import("typebox").TLiteral<"enforced">, import("typebox").TLiteral<"advisory">]>;
33
+ message: import("typebox").TString;
34
+ remediate: import("typebox").TUnion<[import("typebox").TString, import("typebox").TNull]>;
35
+ runner: import("typebox").TUnion<[import("typebox").TObject<{
36
+ name: import("typebox").TLiteral<"habitat">;
37
+ mode: import("typebox").TLiteral<"structure">;
38
+ structure: import("typebox").TString;
39
+ }>, import("typebox").TObject<{
40
+ name: import("typebox").TLiteral<"grit">;
41
+ pattern: import("typebox").TString;
42
+ patternName: import("typebox").TString;
43
+ acquisition: import("typebox").TObject<{
44
+ kind: import("typebox").TUnion<[import("typebox").TLiteral<"check">, import("typebox").TLiteral<"apply-dry-run">]>;
45
+ rootRoles: import("typebox").TArray<import("typebox").TString>;
46
+ selections: import("typebox").TArray<import("typebox").TString>;
47
+ }>;
48
+ }>]>;
49
+ }>>;
50
+ instance: import("typebox").TObject<{
51
+ manifest: import("typebox").TLiteral<"habitat.toml">;
52
+ anchorRoot: import("typebox").TString;
53
+ roots: import("typebox").TArray<import("typebox").TObject<{
54
+ id: import("typebox").TString;
55
+ required: import("typebox").TBoolean;
56
+ kind: import("typebox").TUnion<[import("typebox").TLiteral<"directory">, import("typebox").TLiteral<"file">]>;
57
+ }>>;
58
+ selections: import("typebox").TArray<import("typebox").TObject<{
59
+ id: import("typebox").TString;
60
+ root: import("typebox").TString;
61
+ kind: import("typebox").TUnion<[import("typebox").TLiteral<"directory">, import("typebox").TLiteral<"file">]>;
62
+ memberPattern: import("typebox").TString;
63
+ pathTemplate: import("typebox").TString;
64
+ }>>;
65
+ }>;
66
+ }>;
67
+ provenance: import("typebox").TObject<{
68
+ kind: import("typebox").TLiteral<"local">;
69
+ authorityRoot: import("typebox").TString;
70
+ relativePath: import("typebox").TString;
71
+ }>;
72
+ }>>;
73
+ instances: import("typebox").TArray<import("typebox").TObject<{
74
+ id: import("typebox").TString;
75
+ ownerProject: import("typebox").TString;
76
+ blueprint: import("typebox").TString;
77
+ blueprintVersion: import("typebox").TInteger;
78
+ manifestPath: import("typebox").TString;
79
+ roots: import("typebox").TArray<import("typebox").TObject<{
80
+ id: import("typebox").TString;
81
+ required: import("typebox").TBoolean;
82
+ kind: import("typebox").TUnion<[import("typebox").TLiteral<"directory">, import("typebox").TLiteral<"file">]>;
83
+ path: import("typebox").TString;
84
+ }>>;
85
+ selections: import("typebox").TArray<import("typebox").TObject<{
86
+ id: import("typebox").TString;
87
+ root: import("typebox").TString;
88
+ members: import("typebox").TArray<import("typebox").TObject<{
89
+ id: import("typebox").TString;
90
+ kind: import("typebox").TUnion<[import("typebox").TLiteral<"directory">, import("typebox").TLiteral<"file">]>;
91
+ path: import("typebox").TString;
92
+ }>>;
93
+ }>>;
94
+ }>>;
95
+ applications: import("typebox").TArray<import("typebox").TObject<{
96
+ ownerProject: import("typebox").TString;
97
+ instanceId: import("typebox").TString;
98
+ blueprint: import("typebox").TString;
99
+ blueprintVersion: import("typebox").TInteger;
100
+ ruleId: import("typebox").TString;
101
+ manifestPath: import("typebox").TString;
102
+ lane: import("typebox").TUnion<[import("typebox").TLiteral<"enforced">, import("typebox").TLiteral<"advisory">]>;
103
+ message: import("typebox").TString;
104
+ remediate: import("typebox").TUnion<[import("typebox").TString, import("typebox").TNull]>;
105
+ provenance: import("typebox").TObject<{
106
+ kind: import("typebox").TLiteral<"local">;
107
+ authorityRoot: import("typebox").TString;
108
+ relativePath: import("typebox").TString;
109
+ }>;
110
+ runner: import("typebox").TUnion<[import("typebox").TObject<{
111
+ name: import("typebox").TLiteral<"habitat">;
112
+ mode: import("typebox").TLiteral<"structure">;
113
+ structure: import("typebox").TObject<{
114
+ provenance: import("typebox").TObject<{
115
+ kind: import("typebox").TLiteral<"local">;
116
+ authorityRoot: import("typebox").TString;
117
+ relativePath: import("typebox").TString;
118
+ }>;
119
+ relativePath: import("typebox").TString;
120
+ absolutePath: import("typebox").TString;
121
+ }>;
122
+ rootBindings: import("typebox").TArray<import("typebox").TObject<{
123
+ rootRole: import("typebox").TString;
124
+ required: import("typebox").TBoolean;
125
+ kind: import("typebox").TUnion<[import("typebox").TLiteral<"directory">, import("typebox").TLiteral<"file">]>;
126
+ path: import("typebox").TOptional<import("typebox").TString>;
127
+ }>>;
128
+ }>, import("typebox").TObject<{
129
+ name: import("typebox").TLiteral<"grit">;
130
+ pattern: import("typebox").TObject<{
131
+ provenance: import("typebox").TObject<{
132
+ kind: import("typebox").TLiteral<"local">;
133
+ authorityRoot: import("typebox").TString;
134
+ relativePath: import("typebox").TString;
135
+ }>;
136
+ relativePath: import("typebox").TString;
137
+ absolutePath: import("typebox").TString;
138
+ }>;
139
+ patternName: import("typebox").TString;
140
+ acquisition: import("typebox").TObject<{
141
+ kind: import("typebox").TUnion<[import("typebox").TLiteral<"check">, import("typebox").TLiteral<"apply-dry-run">]>;
142
+ entries: import("typebox").TArray<import("typebox").TObject<{
143
+ source: import("typebox").TUnion<[import("typebox").TObject<{
144
+ kind: import("typebox").TLiteral<"root-role">;
145
+ id: import("typebox").TString;
146
+ }>, import("typebox").TObject<{
147
+ kind: import("typebox").TLiteral<"selection">;
148
+ id: import("typebox").TString;
149
+ member: import("typebox").TString;
150
+ }>]>;
151
+ kind: import("typebox").TUnion<[import("typebox").TLiteral<"directory">, import("typebox").TLiteral<"file">]>;
152
+ path: import("typebox").TString;
153
+ }>>;
154
+ }>;
155
+ }>]>;
156
+ }>>;
157
+ compatibility: import("typebox").TObject<{
158
+ schemaVersion: import("typebox").TLiteral<2>;
159
+ ownerRoots: import("typebox").TRecord<"^.*$", import("typebox").TString>;
160
+ rules: import("typebox").TArray<import("typebox").TObject<{
161
+ id: import("typebox").TString;
162
+ ownerProject: import("typebox").TString;
163
+ manifestPath: import("typebox").TString;
164
+ }>>;
165
+ }>;
166
+ }>;
167
+ }>, import("typebox").TObject<{
168
+ _tag: import("typebox").TLiteral<"Rejected">;
169
+ issues: import("typebox").TArray<import("typebox").TObject<{
170
+ 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">]>;
171
+ path: import("typebox").TString;
172
+ message: import("typebox").TString;
173
+ }>>;
174
+ }>]>>, object>;
175
+ check: import("@orpc/server").ImplementedProcedure<import("../../../base.js").Context & object, {
176
+ fileSystem: FileSystem.FileSystem;
177
+ path: Path.Path;
178
+ ruleEvaluation: import("@habitat-ai/resource-rule-evaluation").RuleEvaluationResource<never>;
179
+ sourceInventory: import("@habitat-ai/resource-source-inventory").SourceInventoryResource<never>;
180
+ workspaceRoot: string;
181
+ policyPack: import("../../../base.js").SelectedPolicyPack;
182
+ }, import("packages/typebox-adapter/dist/index.js").TypeBoxStandardSchema<import("typebox").TObject<{
183
+ selectors: import("typebox").TOptional<import("typebox").TObject<{
184
+ owner: import("typebox").TOptional<import("typebox").TString>;
185
+ instance: import("typebox").TOptional<import("typebox").TString>;
186
+ rule: import("typebox").TOptional<import("typebox").TString>;
187
+ rules: import("typebox").TOptional<import("typebox").TArray<import("typebox").TString>>;
188
+ runner: import("typebox").TOptional<import("typebox").TString>;
189
+ }>>;
190
+ }>>, import("packages/typebox-adapter/dist/index.js").TypeBoxStandardSchema<import("typebox").TUnion<[import("typebox").TObject<{
191
+ _tag: import("typebox").TLiteral<"CatalogRejected">;
192
+ issues: import("typebox").TArray<import("typebox").TObject<{
193
+ 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">]>;
194
+ path: import("typebox").TString;
195
+ message: import("typebox").TString;
196
+ }>>;
197
+ }>, import("typebox").TObject<{
198
+ _tag: import("typebox").TLiteral<"SelectionRejected">;
199
+ issues: import("typebox").TArray<import("typebox").TObject<{
200
+ 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">]>;
201
+ selector: import("typebox").TString;
202
+ message: import("typebox").TString;
203
+ }>>;
204
+ }>, import("typebox").TObject<{
205
+ _tag: import("typebox").TLiteral<"Completed">;
206
+ ok: import("typebox").TBoolean;
207
+ applications: import("typebox").TArray<import("typebox").TUnion<[import("typebox").TObject<{
208
+ ownerProject: import("typebox").TString;
209
+ instanceId: import("typebox").TString;
210
+ ruleId: import("typebox").TString;
211
+ runner: import("typebox").TLiteral<"grit">;
212
+ lane: import("typebox").TUnion<[import("typebox").TLiteral<"enforced">, import("typebox").TLiteral<"advisory">]>;
213
+ locked: import("typebox").TLiteral<false>;
214
+ status: import("typebox").TUnion<[import("typebox").TLiteral<"pass">, import("typebox").TLiteral<"fail">, import("typebox").TLiteral<"advisory-findings">, import("typebox").TLiteral<"error">]>;
215
+ message: import("typebox").TString;
216
+ remediate: import("typebox").TUnion<[import("typebox").TString, import("typebox").TNull]>;
217
+ disposition: import("typebox").TUnion<[import("typebox").TObject<{
218
+ kind: import("typebox").TLiteral<"evaluated">;
219
+ }>, import("typebox").TObject<{
220
+ kind: import("typebox").TLiteral<"failed">;
221
+ 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">]>;
222
+ detail: import("typebox").TString;
223
+ }>]>;
224
+ findings: import("typebox").TArray<import("typebox").TObject<{
225
+ path: import("typebox").TString;
226
+ start: import("typebox").TObject<{
227
+ line: import("typebox").TReadonly<import("typebox").TInteger>;
228
+ column: import("typebox").TReadonly<import("typebox").TInteger>;
229
+ offset: import("typebox").TReadonly<import("typebox").TInteger>;
230
+ }>;
231
+ end: import("typebox").TObject<{
232
+ line: import("typebox").TReadonly<import("typebox").TInteger>;
233
+ column: import("typebox").TReadonly<import("typebox").TInteger>;
234
+ offset: import("typebox").TReadonly<import("typebox").TInteger>;
235
+ }>;
236
+ message: import("typebox").TUnion<[import("typebox").TString, import("typebox").TNull]>;
237
+ severity: import("typebox").TUnion<[import("typebox").TLiteral<"error">, import("typebox").TLiteral<"advisory">]>;
238
+ baselined: import("typebox").TLiteral<false>;
239
+ }>>;
240
+ }>, import("typebox").TObject<{
241
+ ownerProject: import("typebox").TString;
242
+ instanceId: import("typebox").TString;
243
+ ruleId: import("typebox").TString;
244
+ runner: import("typebox").TLiteral<"habitat">;
245
+ lane: import("typebox").TUnion<[import("typebox").TLiteral<"enforced">, import("typebox").TLiteral<"advisory">]>;
246
+ locked: import("typebox").TLiteral<false>;
247
+ status: import("typebox").TUnion<[import("typebox").TLiteral<"pass">, import("typebox").TLiteral<"fail">, import("typebox").TLiteral<"advisory-findings">, import("typebox").TLiteral<"error">]>;
248
+ message: import("typebox").TString;
249
+ remediate: import("typebox").TUnion<[import("typebox").TString, import("typebox").TNull]>;
250
+ disposition: import("typebox").TUnion<[import("typebox").TObject<{
251
+ kind: import("typebox").TLiteral<"evaluated">;
252
+ }>, import("typebox").TObject<{
253
+ kind: import("typebox").TLiteral<"failed">;
254
+ reason: import("typebox").TUnion<[import("typebox").TLiteral<"StructureReadFailed">, import("typebox").TLiteral<"StructureInvalid">, import("typebox").TLiteral<"InventoryFailed">, import("typebox").TLiteral<"StructureObservationFailed">]>;
255
+ detail: import("typebox").TString;
256
+ }>]>;
257
+ findings: import("typebox").TArray<import("typebox").TObject<{
258
+ path: import("typebox").TString;
259
+ 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">]>;
260
+ message: import("typebox").TString;
261
+ severity: import("typebox").TUnion<[import("typebox").TLiteral<"error">, import("typebox").TLiteral<"advisory">]>;
262
+ baselined: import("typebox").TLiteral<false>;
263
+ }>>;
264
+ }>]>>;
265
+ }>]>>, object>;
266
+ };