@habitat-ai/service 0.2.0 → 0.2.1
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.
- package/dist/service/impl.d.ts +222 -2
- package/dist/service/modules/catalog/contract/catalog.d.ts +111 -1
- package/dist/service/modules/catalog/model/dto/catalog.d.ts +124 -5
- package/dist/service/modules/catalog/model/dto/catalog.js +141 -10
- package/dist/service/modules/catalog/model/dto/check.d.ts +60 -0
- package/dist/service/modules/catalog/model/dto/check.js +135 -98
- package/dist/service/modules/catalog/model/dto/structure.d.ts +18 -0
- package/dist/service/modules/catalog/model/dto/structure.js +39 -0
- package/dist/service/modules/catalog/model/policy/catalog.d.ts +16 -4
- package/dist/service/modules/catalog/model/policy/catalog.js +104 -9
- package/dist/service/modules/catalog/model/policy/check.d.ts +14 -2
- package/dist/service/modules/catalog/model/policy/check.js +70 -7
- package/dist/service/modules/catalog/model/policy/structure.d.ts +10 -4
- package/dist/service/modules/catalog/model/policy/structure.js +45 -2
- package/dist/service/modules/catalog/module.d.ts +222 -2
- package/dist/service/modules/catalog/router/catalog.router.d.ts +111 -1
- package/dist/service/modules/catalog/router/catalog.router.js +191 -6
- package/dist/service/modules/catalog/router.d.ts +111 -1
- package/dist/service/router.d.ts +111 -1
- package/package.json +9 -4
|
@@ -157,9 +157,59 @@ export declare const router: {
|
|
|
157
157
|
schemaVersion: import("typebox").TLiteral<2>;
|
|
158
158
|
ownerRoots: import("typebox").TRecord<"^.*$", import("typebox").TString>;
|
|
159
159
|
rules: import("typebox").TArray<import("typebox").TObject<{
|
|
160
|
-
|
|
160
|
+
ruleId: import("typebox").TString;
|
|
161
161
|
ownerProject: import("typebox").TString;
|
|
162
162
|
manifestPath: import("typebox").TString;
|
|
163
|
+
lane: import("typebox").TLiteral<"enforced">;
|
|
164
|
+
message: import("typebox").TString;
|
|
165
|
+
remediate: import("typebox").TUnion<[import("typebox").TString, import("typebox").TNull]>;
|
|
166
|
+
provenance: import("typebox").TObject<{
|
|
167
|
+
kind: import("typebox").TLiteral<"local">;
|
|
168
|
+
authorityRoot: import("typebox").TString;
|
|
169
|
+
relativePath: import("typebox").TString;
|
|
170
|
+
}>;
|
|
171
|
+
coveragePatterns: import("typebox").TArray<import("typebox").TString>;
|
|
172
|
+
baseline: import("typebox").TObject<{
|
|
173
|
+
provenance: import("typebox").TObject<{
|
|
174
|
+
kind: import("typebox").TLiteral<"local">;
|
|
175
|
+
authorityRoot: import("typebox").TString;
|
|
176
|
+
relativePath: import("typebox").TString;
|
|
177
|
+
}>;
|
|
178
|
+
relativePath: import("typebox").TString;
|
|
179
|
+
absolutePath: import("typebox").TString;
|
|
180
|
+
}>;
|
|
181
|
+
runner: import("typebox").TUnion<[import("typebox").TObject<{
|
|
182
|
+
name: import("typebox").TLiteral<"habitat">;
|
|
183
|
+
mode: import("typebox").TLiteral<"structure">;
|
|
184
|
+
structure: import("typebox").TObject<{
|
|
185
|
+
provenance: import("typebox").TObject<{
|
|
186
|
+
kind: import("typebox").TLiteral<"local">;
|
|
187
|
+
authorityRoot: import("typebox").TString;
|
|
188
|
+
relativePath: import("typebox").TString;
|
|
189
|
+
}>;
|
|
190
|
+
relativePath: import("typebox").TString;
|
|
191
|
+
absolutePath: import("typebox").TString;
|
|
192
|
+
}>;
|
|
193
|
+
}>, import("typebox").TObject<{
|
|
194
|
+
name: import("typebox").TLiteral<"grit">;
|
|
195
|
+
pattern: import("typebox").TObject<{
|
|
196
|
+
provenance: import("typebox").TObject<{
|
|
197
|
+
kind: import("typebox").TLiteral<"local">;
|
|
198
|
+
authorityRoot: import("typebox").TString;
|
|
199
|
+
relativePath: import("typebox").TString;
|
|
200
|
+
}>;
|
|
201
|
+
relativePath: import("typebox").TString;
|
|
202
|
+
absolutePath: import("typebox").TString;
|
|
203
|
+
}>;
|
|
204
|
+
patternName: import("typebox").TString;
|
|
205
|
+
acquisition: import("typebox").TObject<{
|
|
206
|
+
kind: import("typebox").TLiteral<"check">;
|
|
207
|
+
entries: import("typebox").TArray<import("typebox").TObject<{
|
|
208
|
+
kind: import("typebox").TUnion<[import("typebox").TLiteral<"directory">, import("typebox").TLiteral<"file">]>;
|
|
209
|
+
path: import("typebox").TString;
|
|
210
|
+
}>>;
|
|
211
|
+
}>;
|
|
212
|
+
}>]>;
|
|
163
213
|
}>>;
|
|
164
214
|
}>;
|
|
165
215
|
}>;
|
|
@@ -236,6 +286,42 @@ export declare const router: {
|
|
|
236
286
|
severity: import("typebox").TUnion<[import("typebox").TLiteral<"error">, import("typebox").TLiteral<"advisory">]>;
|
|
237
287
|
baselined: import("typebox").TLiteral<false>;
|
|
238
288
|
}>>;
|
|
289
|
+
}>, import("typebox").TObject<{
|
|
290
|
+
ownerProject: import("typebox").TString;
|
|
291
|
+
instanceId: import("typebox").TNull;
|
|
292
|
+
ruleId: import("typebox").TString;
|
|
293
|
+
runner: import("typebox").TLiteral<"grit">;
|
|
294
|
+
lane: import("typebox").TUnion<[import("typebox").TLiteral<"enforced">, import("typebox").TLiteral<"advisory">]>;
|
|
295
|
+
locked: import("typebox").TLiteral<true>;
|
|
296
|
+
status: import("typebox").TUnion<[import("typebox").TLiteral<"pass">, import("typebox").TLiteral<"fail">, import("typebox").TLiteral<"advisory-findings">, import("typebox").TLiteral<"error">]>;
|
|
297
|
+
message: import("typebox").TString;
|
|
298
|
+
remediate: import("typebox").TUnion<[import("typebox").TString, import("typebox").TNull]>;
|
|
299
|
+
disposition: import("typebox").TUnion<[import("typebox").TObject<{
|
|
300
|
+
kind: import("typebox").TLiteral<"evaluated">;
|
|
301
|
+
}>, import("typebox").TObject<{
|
|
302
|
+
kind: import("typebox").TLiteral<"not-applicable">;
|
|
303
|
+
reason: import("typebox").TLiteral<"no-matched-acquisition-roots">;
|
|
304
|
+
}>, import("typebox").TObject<{
|
|
305
|
+
kind: import("typebox").TLiteral<"failed">;
|
|
306
|
+
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">]>;
|
|
307
|
+
detail: import("typebox").TString;
|
|
308
|
+
}>]>;
|
|
309
|
+
findings: import("typebox").TArray<import("typebox").TObject<{
|
|
310
|
+
path: import("typebox").TString;
|
|
311
|
+
start: import("typebox").TObject<{
|
|
312
|
+
line: import("typebox").TReadonly<import("typebox").TInteger>;
|
|
313
|
+
column: import("typebox").TReadonly<import("typebox").TInteger>;
|
|
314
|
+
offset: import("typebox").TReadonly<import("typebox").TInteger>;
|
|
315
|
+
}>;
|
|
316
|
+
end: import("typebox").TObject<{
|
|
317
|
+
line: import("typebox").TReadonly<import("typebox").TInteger>;
|
|
318
|
+
column: import("typebox").TReadonly<import("typebox").TInteger>;
|
|
319
|
+
offset: import("typebox").TReadonly<import("typebox").TInteger>;
|
|
320
|
+
}>;
|
|
321
|
+
message: import("typebox").TUnion<[import("typebox").TString, import("typebox").TNull]>;
|
|
322
|
+
severity: import("typebox").TUnion<[import("typebox").TLiteral<"error">, import("typebox").TLiteral<"advisory">]>;
|
|
323
|
+
baselined: import("typebox").TLiteral<false>;
|
|
324
|
+
}>>;
|
|
239
325
|
}>, import("typebox").TObject<{
|
|
240
326
|
ownerProject: import("typebox").TString;
|
|
241
327
|
instanceId: import("typebox").TString;
|
|
@@ -260,6 +346,30 @@ export declare const router: {
|
|
|
260
346
|
severity: import("typebox").TUnion<[import("typebox").TLiteral<"error">, import("typebox").TLiteral<"advisory">]>;
|
|
261
347
|
baselined: import("typebox").TLiteral<false>;
|
|
262
348
|
}>>;
|
|
349
|
+
}>, import("typebox").TObject<{
|
|
350
|
+
ownerProject: import("typebox").TString;
|
|
351
|
+
instanceId: import("typebox").TNull;
|
|
352
|
+
ruleId: import("typebox").TString;
|
|
353
|
+
runner: import("typebox").TLiteral<"habitat">;
|
|
354
|
+
lane: import("typebox").TUnion<[import("typebox").TLiteral<"enforced">, import("typebox").TLiteral<"advisory">]>;
|
|
355
|
+
locked: import("typebox").TLiteral<true>;
|
|
356
|
+
status: import("typebox").TUnion<[import("typebox").TLiteral<"pass">, import("typebox").TLiteral<"fail">, import("typebox").TLiteral<"advisory-findings">, import("typebox").TLiteral<"error">]>;
|
|
357
|
+
message: import("typebox").TString;
|
|
358
|
+
remediate: import("typebox").TUnion<[import("typebox").TString, import("typebox").TNull]>;
|
|
359
|
+
disposition: import("typebox").TUnion<[import("typebox").TObject<{
|
|
360
|
+
kind: import("typebox").TLiteral<"evaluated">;
|
|
361
|
+
}>, import("typebox").TObject<{
|
|
362
|
+
kind: import("typebox").TLiteral<"failed">;
|
|
363
|
+
reason: import("typebox").TUnion<[import("typebox").TLiteral<"StructureReadFailed">, import("typebox").TLiteral<"StructureInvalid">, import("typebox").TLiteral<"InventoryFailed">, import("typebox").TLiteral<"StructureObservationFailed">]>;
|
|
364
|
+
detail: import("typebox").TString;
|
|
365
|
+
}>]>;
|
|
366
|
+
findings: import("typebox").TArray<import("typebox").TObject<{
|
|
367
|
+
path: import("typebox").TString;
|
|
368
|
+
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">]>;
|
|
369
|
+
message: import("typebox").TString;
|
|
370
|
+
severity: import("typebox").TUnion<[import("typebox").TLiteral<"error">, import("typebox").TLiteral<"advisory">]>;
|
|
371
|
+
baselined: import("typebox").TLiteral<false>;
|
|
372
|
+
}>>;
|
|
263
373
|
}>]>>;
|
|
264
374
|
}>]>>, object>;
|
|
265
375
|
};
|
package/dist/service/router.d.ts
CHANGED
|
@@ -158,9 +158,59 @@ export declare const router: {
|
|
|
158
158
|
schemaVersion: import("typebox").TLiteral<2>;
|
|
159
159
|
ownerRoots: import("typebox").TRecord<"^.*$", import("typebox").TString>;
|
|
160
160
|
rules: import("typebox").TArray<import("typebox").TObject<{
|
|
161
|
-
|
|
161
|
+
ruleId: import("typebox").TString;
|
|
162
162
|
ownerProject: import("typebox").TString;
|
|
163
163
|
manifestPath: import("typebox").TString;
|
|
164
|
+
lane: import("typebox").TLiteral<"enforced">;
|
|
165
|
+
message: import("typebox").TString;
|
|
166
|
+
remediate: import("typebox").TUnion<[import("typebox").TString, import("typebox").TNull]>;
|
|
167
|
+
provenance: import("typebox").TObject<{
|
|
168
|
+
kind: import("typebox").TLiteral<"local">;
|
|
169
|
+
authorityRoot: import("typebox").TString;
|
|
170
|
+
relativePath: import("typebox").TString;
|
|
171
|
+
}>;
|
|
172
|
+
coveragePatterns: import("typebox").TArray<import("typebox").TString>;
|
|
173
|
+
baseline: import("typebox").TObject<{
|
|
174
|
+
provenance: import("typebox").TObject<{
|
|
175
|
+
kind: import("typebox").TLiteral<"local">;
|
|
176
|
+
authorityRoot: import("typebox").TString;
|
|
177
|
+
relativePath: import("typebox").TString;
|
|
178
|
+
}>;
|
|
179
|
+
relativePath: import("typebox").TString;
|
|
180
|
+
absolutePath: import("typebox").TString;
|
|
181
|
+
}>;
|
|
182
|
+
runner: import("typebox").TUnion<[import("typebox").TObject<{
|
|
183
|
+
name: import("typebox").TLiteral<"habitat">;
|
|
184
|
+
mode: import("typebox").TLiteral<"structure">;
|
|
185
|
+
structure: import("typebox").TObject<{
|
|
186
|
+
provenance: import("typebox").TObject<{
|
|
187
|
+
kind: import("typebox").TLiteral<"local">;
|
|
188
|
+
authorityRoot: import("typebox").TString;
|
|
189
|
+
relativePath: import("typebox").TString;
|
|
190
|
+
}>;
|
|
191
|
+
relativePath: import("typebox").TString;
|
|
192
|
+
absolutePath: import("typebox").TString;
|
|
193
|
+
}>;
|
|
194
|
+
}>, import("typebox").TObject<{
|
|
195
|
+
name: import("typebox").TLiteral<"grit">;
|
|
196
|
+
pattern: import("typebox").TObject<{
|
|
197
|
+
provenance: import("typebox").TObject<{
|
|
198
|
+
kind: import("typebox").TLiteral<"local">;
|
|
199
|
+
authorityRoot: import("typebox").TString;
|
|
200
|
+
relativePath: import("typebox").TString;
|
|
201
|
+
}>;
|
|
202
|
+
relativePath: import("typebox").TString;
|
|
203
|
+
absolutePath: import("typebox").TString;
|
|
204
|
+
}>;
|
|
205
|
+
patternName: import("typebox").TString;
|
|
206
|
+
acquisition: import("typebox").TObject<{
|
|
207
|
+
kind: import("typebox").TLiteral<"check">;
|
|
208
|
+
entries: import("typebox").TArray<import("typebox").TObject<{
|
|
209
|
+
kind: import("typebox").TUnion<[import("typebox").TLiteral<"directory">, import("typebox").TLiteral<"file">]>;
|
|
210
|
+
path: import("typebox").TString;
|
|
211
|
+
}>>;
|
|
212
|
+
}>;
|
|
213
|
+
}>]>;
|
|
164
214
|
}>>;
|
|
165
215
|
}>;
|
|
166
216
|
}>;
|
|
@@ -237,6 +287,42 @@ export declare const router: {
|
|
|
237
287
|
severity: import("typebox").TUnion<[import("typebox").TLiteral<"error">, import("typebox").TLiteral<"advisory">]>;
|
|
238
288
|
baselined: import("typebox").TLiteral<false>;
|
|
239
289
|
}>>;
|
|
290
|
+
}>, import("typebox").TObject<{
|
|
291
|
+
ownerProject: import("typebox").TString;
|
|
292
|
+
instanceId: import("typebox").TNull;
|
|
293
|
+
ruleId: import("typebox").TString;
|
|
294
|
+
runner: import("typebox").TLiteral<"grit">;
|
|
295
|
+
lane: import("typebox").TUnion<[import("typebox").TLiteral<"enforced">, import("typebox").TLiteral<"advisory">]>;
|
|
296
|
+
locked: import("typebox").TLiteral<true>;
|
|
297
|
+
status: import("typebox").TUnion<[import("typebox").TLiteral<"pass">, import("typebox").TLiteral<"fail">, import("typebox").TLiteral<"advisory-findings">, import("typebox").TLiteral<"error">]>;
|
|
298
|
+
message: import("typebox").TString;
|
|
299
|
+
remediate: import("typebox").TUnion<[import("typebox").TString, import("typebox").TNull]>;
|
|
300
|
+
disposition: import("typebox").TUnion<[import("typebox").TObject<{
|
|
301
|
+
kind: import("typebox").TLiteral<"evaluated">;
|
|
302
|
+
}>, import("typebox").TObject<{
|
|
303
|
+
kind: import("typebox").TLiteral<"not-applicable">;
|
|
304
|
+
reason: import("typebox").TLiteral<"no-matched-acquisition-roots">;
|
|
305
|
+
}>, import("typebox").TObject<{
|
|
306
|
+
kind: import("typebox").TLiteral<"failed">;
|
|
307
|
+
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">]>;
|
|
308
|
+
detail: import("typebox").TString;
|
|
309
|
+
}>]>;
|
|
310
|
+
findings: import("typebox").TArray<import("typebox").TObject<{
|
|
311
|
+
path: import("typebox").TString;
|
|
312
|
+
start: import("typebox").TObject<{
|
|
313
|
+
line: import("typebox").TReadonly<import("typebox").TInteger>;
|
|
314
|
+
column: import("typebox").TReadonly<import("typebox").TInteger>;
|
|
315
|
+
offset: import("typebox").TReadonly<import("typebox").TInteger>;
|
|
316
|
+
}>;
|
|
317
|
+
end: import("typebox").TObject<{
|
|
318
|
+
line: import("typebox").TReadonly<import("typebox").TInteger>;
|
|
319
|
+
column: import("typebox").TReadonly<import("typebox").TInteger>;
|
|
320
|
+
offset: import("typebox").TReadonly<import("typebox").TInteger>;
|
|
321
|
+
}>;
|
|
322
|
+
message: import("typebox").TUnion<[import("typebox").TString, import("typebox").TNull]>;
|
|
323
|
+
severity: import("typebox").TUnion<[import("typebox").TLiteral<"error">, import("typebox").TLiteral<"advisory">]>;
|
|
324
|
+
baselined: import("typebox").TLiteral<false>;
|
|
325
|
+
}>>;
|
|
240
326
|
}>, import("typebox").TObject<{
|
|
241
327
|
ownerProject: import("typebox").TString;
|
|
242
328
|
instanceId: import("typebox").TString;
|
|
@@ -261,6 +347,30 @@ export declare const router: {
|
|
|
261
347
|
severity: import("typebox").TUnion<[import("typebox").TLiteral<"error">, import("typebox").TLiteral<"advisory">]>;
|
|
262
348
|
baselined: import("typebox").TLiteral<false>;
|
|
263
349
|
}>>;
|
|
350
|
+
}>, import("typebox").TObject<{
|
|
351
|
+
ownerProject: import("typebox").TString;
|
|
352
|
+
instanceId: import("typebox").TNull;
|
|
353
|
+
ruleId: import("typebox").TString;
|
|
354
|
+
runner: import("typebox").TLiteral<"habitat">;
|
|
355
|
+
lane: import("typebox").TUnion<[import("typebox").TLiteral<"enforced">, import("typebox").TLiteral<"advisory">]>;
|
|
356
|
+
locked: import("typebox").TLiteral<true>;
|
|
357
|
+
status: import("typebox").TUnion<[import("typebox").TLiteral<"pass">, import("typebox").TLiteral<"fail">, import("typebox").TLiteral<"advisory-findings">, import("typebox").TLiteral<"error">]>;
|
|
358
|
+
message: import("typebox").TString;
|
|
359
|
+
remediate: import("typebox").TUnion<[import("typebox").TString, import("typebox").TNull]>;
|
|
360
|
+
disposition: import("typebox").TUnion<[import("typebox").TObject<{
|
|
361
|
+
kind: import("typebox").TLiteral<"evaluated">;
|
|
362
|
+
}>, import("typebox").TObject<{
|
|
363
|
+
kind: import("typebox").TLiteral<"failed">;
|
|
364
|
+
reason: import("typebox").TUnion<[import("typebox").TLiteral<"StructureReadFailed">, import("typebox").TLiteral<"StructureInvalid">, import("typebox").TLiteral<"InventoryFailed">, import("typebox").TLiteral<"StructureObservationFailed">]>;
|
|
365
|
+
detail: import("typebox").TString;
|
|
366
|
+
}>]>;
|
|
367
|
+
findings: import("typebox").TArray<import("typebox").TObject<{
|
|
368
|
+
path: import("typebox").TString;
|
|
369
|
+
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">]>;
|
|
370
|
+
message: import("typebox").TString;
|
|
371
|
+
severity: import("typebox").TUnion<[import("typebox").TLiteral<"error">, import("typebox").TLiteral<"advisory">]>;
|
|
372
|
+
baselined: import("typebox").TLiteral<false>;
|
|
373
|
+
}>>;
|
|
264
374
|
}>]>>;
|
|
265
375
|
}>]>>, object>;
|
|
266
376
|
};
|
package/package.json
CHANGED
|
@@ -1,7 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@habitat-ai/service",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.1",
|
|
4
4
|
"private": false,
|
|
5
|
+
"repository": {
|
|
6
|
+
"type": "git",
|
|
7
|
+
"url": "git+https://github.com/rawr-ai/rawr-hq-template.git",
|
|
8
|
+
"directory": "services/habitat"
|
|
9
|
+
},
|
|
5
10
|
"type": "module",
|
|
6
11
|
"packageManager": "bun@1.3.14",
|
|
7
12
|
"files": [
|
|
@@ -19,13 +24,13 @@
|
|
|
19
24
|
"test": "bun test test"
|
|
20
25
|
},
|
|
21
26
|
"dependencies": {
|
|
22
|
-
"@habitat-ai/resource-rule-evaluation": "0.2.
|
|
23
|
-
"@habitat-ai/resource-source-inventory": "0.2.
|
|
27
|
+
"@habitat-ai/resource-rule-evaluation": "0.2.1",
|
|
28
|
+
"@habitat-ai/resource-source-inventory": "0.2.1",
|
|
24
29
|
"@opentelemetry/api": "^1.9.0",
|
|
25
30
|
"@orpc/contract": "2.0.0-beta.20",
|
|
26
31
|
"@orpc/experimental-effect": "2.0.0-beta.20",
|
|
27
32
|
"@orpc/server": "2.0.0-beta.20",
|
|
28
|
-
"@habitat-ai/typebox-adapter": "0.1.
|
|
33
|
+
"@habitat-ai/typebox-adapter": "0.1.1",
|
|
29
34
|
"effect": "4.0.0-beta.101",
|
|
30
35
|
"picomatch": "4.0.4",
|
|
31
36
|
"smol-toml": "1.7.0",
|