@hasna/instructions 0.3.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 (152) hide show
  1. package/LICENSE +191 -0
  2. package/README.md +180 -0
  3. package/dist/cli/index.d.ts +3 -0
  4. package/dist/cli/index.d.ts.map +1 -0
  5. package/dist/cli/index.js +8080 -0
  6. package/dist/cli/output.test.d.ts +2 -0
  7. package/dist/cli/output.test.d.ts.map +1 -0
  8. package/dist/cli/session.test.d.ts +2 -0
  9. package/dist/cli/session.test.d.ts.map +1 -0
  10. package/dist/cli/storage.d.ts +3 -0
  11. package/dist/cli/storage.d.ts.map +1 -0
  12. package/dist/cli/storage.test.d.ts +2 -0
  13. package/dist/cli/storage.test.d.ts.map +1 -0
  14. package/dist/db/configs.d.ts +10 -0
  15. package/dist/db/configs.d.ts.map +1 -0
  16. package/dist/db/configs.test.d.ts +2 -0
  17. package/dist/db/configs.test.d.ts.map +1 -0
  18. package/dist/db/database.d.ts +7 -0
  19. package/dist/db/database.d.ts.map +1 -0
  20. package/dist/db/database.test.d.ts +2 -0
  21. package/dist/db/database.test.d.ts.map +1 -0
  22. package/dist/db/machines.d.ts +9 -0
  23. package/dist/db/machines.d.ts.map +1 -0
  24. package/dist/db/machines.test.d.ts +2 -0
  25. package/dist/db/machines.test.d.ts.map +1 -0
  26. package/dist/db/pg-migrations.d.ts +7 -0
  27. package/dist/db/pg-migrations.d.ts.map +1 -0
  28. package/dist/db/profiles.d.ts +14 -0
  29. package/dist/db/profiles.d.ts.map +1 -0
  30. package/dist/db/profiles.test.d.ts +2 -0
  31. package/dist/db/profiles.test.d.ts.map +1 -0
  32. package/dist/db/remote-storage.d.ts +13 -0
  33. package/dist/db/remote-storage.d.ts.map +1 -0
  34. package/dist/db/snapshots.d.ts +8 -0
  35. package/dist/db/snapshots.d.ts.map +1 -0
  36. package/dist/db/snapshots.test.d.ts +2 -0
  37. package/dist/db/snapshots.test.d.ts.map +1 -0
  38. package/dist/db/storage-sync.d.ts +53 -0
  39. package/dist/db/storage-sync.d.ts.map +1 -0
  40. package/dist/db/storage-sync.test.d.ts +2 -0
  41. package/dist/db/storage-sync.test.d.ts.map +1 -0
  42. package/dist/generated/storage-kit/health.d.ts +20 -0
  43. package/dist/generated/storage-kit/health.d.ts.map +1 -0
  44. package/dist/generated/storage-kit/index.d.ts +8 -0
  45. package/dist/generated/storage-kit/index.d.ts.map +1 -0
  46. package/dist/generated/storage-kit/migrations.d.ts +48 -0
  47. package/dist/generated/storage-kit/migrations.d.ts.map +1 -0
  48. package/dist/generated/storage-kit/mode.d.ts +48 -0
  49. package/dist/generated/storage-kit/mode.d.ts.map +1 -0
  50. package/dist/generated/storage-kit/pool.d.ts +34 -0
  51. package/dist/generated/storage-kit/pool.d.ts.map +1 -0
  52. package/dist/generated/storage-kit/query.d.ts +36 -0
  53. package/dist/generated/storage-kit/query.d.ts.map +1 -0
  54. package/dist/generated/storage-kit/tls.d.ts +26 -0
  55. package/dist/generated/storage-kit/tls.d.ts.map +1 -0
  56. package/dist/index.d.ts +37 -0
  57. package/dist/index.d.ts.map +1 -0
  58. package/dist/index.js +3749 -0
  59. package/dist/lib/apply-batch.test.d.ts +2 -0
  60. package/dist/lib/apply-batch.test.d.ts.map +1 -0
  61. package/dist/lib/apply.d.ts +16 -0
  62. package/dist/lib/apply.d.ts.map +1 -0
  63. package/dist/lib/apply.test.d.ts +2 -0
  64. package/dist/lib/apply.test.d.ts.map +1 -0
  65. package/dist/lib/compact-output.d.ts +78 -0
  66. package/dist/lib/compact-output.d.ts.map +1 -0
  67. package/dist/lib/compact-output.test.d.ts +2 -0
  68. package/dist/lib/compact-output.test.d.ts.map +1 -0
  69. package/dist/lib/export-import.test.d.ts +2 -0
  70. package/dist/lib/export-import.test.d.ts.map +1 -0
  71. package/dist/lib/export.d.ts +12 -0
  72. package/dist/lib/export.d.ts.map +1 -0
  73. package/dist/lib/import.d.ts +14 -0
  74. package/dist/lib/import.d.ts.map +1 -0
  75. package/dist/lib/machine.d.ts +21 -0
  76. package/dist/lib/machine.d.ts.map +1 -0
  77. package/dist/lib/machine.test.d.ts +2 -0
  78. package/dist/lib/machine.test.d.ts.map +1 -0
  79. package/dist/lib/package-version.d.ts +2 -0
  80. package/dist/lib/package-version.d.ts.map +1 -0
  81. package/dist/lib/platform-profiles.d.ts +5 -0
  82. package/dist/lib/platform-profiles.d.ts.map +1 -0
  83. package/dist/lib/project-dashboard-standard.d.ts +7 -0
  84. package/dist/lib/project-dashboard-standard.d.ts.map +1 -0
  85. package/dist/lib/project-dashboard-standard.test.d.ts +2 -0
  86. package/dist/lib/project-dashboard-standard.test.d.ts.map +1 -0
  87. package/dist/lib/redact.d.ts +29 -0
  88. package/dist/lib/redact.d.ts.map +1 -0
  89. package/dist/lib/redact.test.d.ts +2 -0
  90. package/dist/lib/redact.test.d.ts.map +1 -0
  91. package/dist/lib/session-apply.d.ts +48 -0
  92. package/dist/lib/session-apply.d.ts.map +1 -0
  93. package/dist/lib/session-apply.test.d.ts +2 -0
  94. package/dist/lib/session-apply.test.d.ts.map +1 -0
  95. package/dist/lib/session-render.d.ts +176 -0
  96. package/dist/lib/session-render.d.ts.map +1 -0
  97. package/dist/lib/session-render.test.d.ts +2 -0
  98. package/dist/lib/session-render.test.d.ts.map +1 -0
  99. package/dist/lib/sync-dir.d.ts +13 -0
  100. package/dist/lib/sync-dir.d.ts.map +1 -0
  101. package/dist/lib/sync-dir.test.d.ts +2 -0
  102. package/dist/lib/sync-dir.test.d.ts.map +1 -0
  103. package/dist/lib/sync-known.test.d.ts +2 -0
  104. package/dist/lib/sync-known.test.d.ts.map +1 -0
  105. package/dist/lib/sync.d.ts +54 -0
  106. package/dist/lib/sync.d.ts.map +1 -0
  107. package/dist/lib/sync.test.d.ts +2 -0
  108. package/dist/lib/sync.test.d.ts.map +1 -0
  109. package/dist/lib/template.d.ts +10 -0
  110. package/dist/lib/template.d.ts.map +1 -0
  111. package/dist/lib/template.test.d.ts +2 -0
  112. package/dist/lib/template.test.d.ts.map +1 -0
  113. package/dist/lib/transforms.d.ts +11 -0
  114. package/dist/lib/transforms.d.ts.map +1 -0
  115. package/dist/lib/transforms.test.d.ts +2 -0
  116. package/dist/lib/transforms.test.d.ts.map +1 -0
  117. package/dist/mcp/http.d.ts +28 -0
  118. package/dist/mcp/http.d.ts.map +1 -0
  119. package/dist/mcp/http.test.d.ts +2 -0
  120. package/dist/mcp/http.test.d.ts.map +1 -0
  121. package/dist/mcp/index.d.ts +3 -0
  122. package/dist/mcp/index.d.ts.map +1 -0
  123. package/dist/mcp/index.js +2591 -0
  124. package/dist/mcp/mcp.test.d.ts +2 -0
  125. package/dist/mcp/mcp.test.d.ts.map +1 -0
  126. package/dist/mcp/server.d.ts +4 -0
  127. package/dist/mcp/server.d.ts.map +1 -0
  128. package/dist/server/cloud.d.ts +39 -0
  129. package/dist/server/cloud.d.ts.map +1 -0
  130. package/dist/server/index.d.ts +8 -0
  131. package/dist/server/index.d.ts.map +1 -0
  132. package/dist/server/index.js +19062 -0
  133. package/dist/server/openapi.d.ts +578 -0
  134. package/dist/server/openapi.d.ts.map +1 -0
  135. package/dist/server/server.test.d.ts +2 -0
  136. package/dist/server/server.test.d.ts.map +1 -0
  137. package/dist/server/v1.d.ts +9 -0
  138. package/dist/server/v1.d.ts.map +1 -0
  139. package/dist/status.d.ts +56 -0
  140. package/dist/status.d.ts.map +1 -0
  141. package/dist/status.test.d.ts +2 -0
  142. package/dist/status.test.d.ts.map +1 -0
  143. package/dist/storage/cloud-store.d.ts +17 -0
  144. package/dist/storage/cloud-store.d.ts.map +1 -0
  145. package/dist/storage/schema.d.ts +12 -0
  146. package/dist/storage/schema.d.ts.map +1 -0
  147. package/dist/storage.d.ts +5 -0
  148. package/dist/storage.d.ts.map +1 -0
  149. package/dist/storage.js +537 -0
  150. package/dist/types/index.d.ts +189 -0
  151. package/dist/types/index.d.ts.map +1 -0
  152. package/package.json +96 -0
@@ -0,0 +1,578 @@
1
+ export declare function buildV1OpenApiDocument(version?: string): {
2
+ openapi: string;
3
+ info: {
4
+ title: string;
5
+ version: string;
6
+ description: string;
7
+ };
8
+ servers: {
9
+ url: string;
10
+ }[];
11
+ components: {
12
+ securitySchemes: {
13
+ apiKey: {
14
+ type: string;
15
+ in: string;
16
+ name: string;
17
+ };
18
+ };
19
+ schemas: {
20
+ Config: {
21
+ readonly type: "object";
22
+ readonly properties: {
23
+ readonly id: {
24
+ readonly type: "string";
25
+ };
26
+ readonly name: {
27
+ readonly type: "string";
28
+ };
29
+ readonly slug: {
30
+ readonly type: "string";
31
+ };
32
+ readonly kind: {
33
+ readonly type: "string";
34
+ };
35
+ readonly category: {
36
+ readonly type: "string";
37
+ };
38
+ readonly agent: {
39
+ readonly type: "string";
40
+ };
41
+ readonly target_path: {
42
+ readonly type: "string";
43
+ readonly nullable: true;
44
+ };
45
+ readonly outputs: {
46
+ readonly type: "array";
47
+ readonly items: {
48
+ readonly type: "object";
49
+ };
50
+ };
51
+ readonly format: {
52
+ readonly type: "string";
53
+ };
54
+ readonly content: {
55
+ readonly type: "string";
56
+ };
57
+ readonly description: {
58
+ readonly type: "string";
59
+ readonly nullable: true;
60
+ };
61
+ readonly tags: {
62
+ readonly type: "array";
63
+ readonly items: {
64
+ readonly type: "string";
65
+ };
66
+ };
67
+ readonly is_template: {
68
+ readonly type: "boolean";
69
+ };
70
+ readonly version: {
71
+ readonly type: "number";
72
+ };
73
+ readonly created_at: {
74
+ readonly type: "string";
75
+ };
76
+ readonly updated_at: {
77
+ readonly type: "string";
78
+ };
79
+ readonly synced_at: {
80
+ readonly type: "string";
81
+ readonly nullable: true;
82
+ };
83
+ };
84
+ };
85
+ Profile: {
86
+ readonly type: "object";
87
+ readonly properties: {
88
+ readonly id: {
89
+ readonly type: "string";
90
+ };
91
+ readonly name: {
92
+ readonly type: "string";
93
+ };
94
+ readonly slug: {
95
+ readonly type: "string";
96
+ };
97
+ readonly description: {
98
+ readonly type: "string";
99
+ readonly nullable: true;
100
+ };
101
+ readonly selectors: {
102
+ readonly type: "object";
103
+ };
104
+ readonly variables: {
105
+ readonly type: "object";
106
+ };
107
+ readonly created_at: {
108
+ readonly type: "string";
109
+ };
110
+ readonly updated_at: {
111
+ readonly type: "string";
112
+ };
113
+ };
114
+ };
115
+ CreateConfigInput: {
116
+ type: string;
117
+ required: string[];
118
+ properties: {
119
+ name: {
120
+ type: string;
121
+ };
122
+ category: {
123
+ type: string;
124
+ };
125
+ content: {
126
+ type: string;
127
+ };
128
+ kind: {
129
+ type: string;
130
+ };
131
+ agent: {
132
+ type: string;
133
+ };
134
+ target_path: {
135
+ type: string;
136
+ };
137
+ format: {
138
+ type: string;
139
+ };
140
+ description: {
141
+ type: string;
142
+ };
143
+ tags: {
144
+ type: string;
145
+ items: {
146
+ type: string;
147
+ };
148
+ };
149
+ is_template: {
150
+ type: string;
151
+ };
152
+ };
153
+ };
154
+ UpdateConfigInput: {
155
+ type: string;
156
+ properties: {
157
+ name: {
158
+ type: string;
159
+ };
160
+ category: {
161
+ type: string;
162
+ };
163
+ agent: {
164
+ type: string;
165
+ };
166
+ content: {
167
+ type: string;
168
+ };
169
+ description: {
170
+ type: string;
171
+ };
172
+ tags: {
173
+ type: string;
174
+ items: {
175
+ type: string;
176
+ };
177
+ };
178
+ is_template: {
179
+ type: string;
180
+ };
181
+ };
182
+ };
183
+ CreateProfileInput: {
184
+ type: string;
185
+ required: string[];
186
+ properties: {
187
+ name: {
188
+ type: string;
189
+ };
190
+ description: {
191
+ type: string;
192
+ };
193
+ selectors: {
194
+ type: string;
195
+ };
196
+ variables: {
197
+ type: string;
198
+ };
199
+ };
200
+ };
201
+ };
202
+ };
203
+ security: {
204
+ apiKey: never[];
205
+ }[];
206
+ paths: {
207
+ "/v1/configs": {
208
+ get: {
209
+ operationId: string;
210
+ summary: string;
211
+ parameters: {
212
+ name: string;
213
+ in: string;
214
+ schema: {
215
+ type: string;
216
+ };
217
+ }[];
218
+ responses: {
219
+ "200": {
220
+ content: {
221
+ "application/json": {
222
+ schema: {
223
+ type: string;
224
+ properties: {
225
+ configs: {
226
+ type: string;
227
+ items: {
228
+ $ref: string;
229
+ };
230
+ };
231
+ count: {
232
+ type: string;
233
+ };
234
+ };
235
+ };
236
+ };
237
+ };
238
+ };
239
+ };
240
+ };
241
+ post: {
242
+ operationId: string;
243
+ summary: string;
244
+ requestBody: {
245
+ required: boolean;
246
+ content: {
247
+ "application/json": {
248
+ schema: {
249
+ $ref: string;
250
+ };
251
+ };
252
+ };
253
+ };
254
+ responses: {
255
+ "201": {
256
+ content: {
257
+ "application/json": {
258
+ schema: {
259
+ type: string;
260
+ properties: {
261
+ config: {
262
+ $ref: string;
263
+ };
264
+ };
265
+ };
266
+ };
267
+ };
268
+ };
269
+ };
270
+ };
271
+ };
272
+ "/v1/configs/{id}": {
273
+ get: {
274
+ operationId: string;
275
+ summary: string;
276
+ parameters: {
277
+ name: string;
278
+ in: string;
279
+ required: boolean;
280
+ schema: {
281
+ type: string;
282
+ };
283
+ }[];
284
+ responses: {
285
+ "200": {
286
+ content: {
287
+ "application/json": {
288
+ schema: {
289
+ type: string;
290
+ properties: {
291
+ config: {
292
+ $ref: string;
293
+ };
294
+ };
295
+ };
296
+ };
297
+ };
298
+ };
299
+ };
300
+ };
301
+ patch: {
302
+ operationId: string;
303
+ summary: string;
304
+ parameters: {
305
+ name: string;
306
+ in: string;
307
+ required: boolean;
308
+ schema: {
309
+ type: string;
310
+ };
311
+ }[];
312
+ requestBody: {
313
+ required: boolean;
314
+ content: {
315
+ "application/json": {
316
+ schema: {
317
+ $ref: string;
318
+ };
319
+ };
320
+ };
321
+ };
322
+ responses: {
323
+ "200": {
324
+ content: {
325
+ "application/json": {
326
+ schema: {
327
+ type: string;
328
+ properties: {
329
+ config: {
330
+ $ref: string;
331
+ };
332
+ };
333
+ };
334
+ };
335
+ };
336
+ };
337
+ };
338
+ };
339
+ delete: {
340
+ operationId: string;
341
+ summary: string;
342
+ parameters: {
343
+ name: string;
344
+ in: string;
345
+ required: boolean;
346
+ schema: {
347
+ type: string;
348
+ };
349
+ }[];
350
+ responses: {
351
+ "200": {
352
+ content: {
353
+ "application/json": {
354
+ schema: {
355
+ type: string;
356
+ properties: {
357
+ deleted: {
358
+ type: string;
359
+ };
360
+ id: {
361
+ type: string;
362
+ };
363
+ };
364
+ };
365
+ };
366
+ };
367
+ };
368
+ };
369
+ };
370
+ };
371
+ "/v1/configs/{id}/snapshots": {
372
+ get: {
373
+ operationId: string;
374
+ summary: string;
375
+ parameters: {
376
+ name: string;
377
+ in: string;
378
+ required: boolean;
379
+ schema: {
380
+ type: string;
381
+ };
382
+ }[];
383
+ responses: {
384
+ "200": {
385
+ content: {
386
+ "application/json": {
387
+ schema: {
388
+ type: string;
389
+ properties: {
390
+ snapshots: {
391
+ type: string;
392
+ items: {
393
+ type: string;
394
+ };
395
+ };
396
+ count: {
397
+ type: string;
398
+ };
399
+ };
400
+ };
401
+ };
402
+ };
403
+ };
404
+ };
405
+ };
406
+ post: {
407
+ operationId: string;
408
+ summary: string;
409
+ parameters: {
410
+ name: string;
411
+ in: string;
412
+ required: boolean;
413
+ schema: {
414
+ type: string;
415
+ };
416
+ }[];
417
+ responses: {
418
+ "201": {
419
+ content: {
420
+ "application/json": {
421
+ schema: {
422
+ type: string;
423
+ properties: {
424
+ snapshot: {
425
+ type: string;
426
+ };
427
+ };
428
+ };
429
+ };
430
+ };
431
+ };
432
+ };
433
+ };
434
+ };
435
+ "/v1/profiles": {
436
+ get: {
437
+ operationId: string;
438
+ summary: string;
439
+ responses: {
440
+ "200": {
441
+ content: {
442
+ "application/json": {
443
+ schema: {
444
+ type: string;
445
+ properties: {
446
+ profiles: {
447
+ type: string;
448
+ items: {
449
+ $ref: string;
450
+ };
451
+ };
452
+ count: {
453
+ type: string;
454
+ };
455
+ };
456
+ };
457
+ };
458
+ };
459
+ };
460
+ };
461
+ };
462
+ post: {
463
+ operationId: string;
464
+ summary: string;
465
+ requestBody: {
466
+ required: boolean;
467
+ content: {
468
+ "application/json": {
469
+ schema: {
470
+ $ref: string;
471
+ };
472
+ };
473
+ };
474
+ };
475
+ responses: {
476
+ "201": {
477
+ content: {
478
+ "application/json": {
479
+ schema: {
480
+ type: string;
481
+ properties: {
482
+ profile: {
483
+ $ref: string;
484
+ };
485
+ };
486
+ };
487
+ };
488
+ };
489
+ };
490
+ };
491
+ };
492
+ };
493
+ "/v1/profiles/{id}": {
494
+ get: {
495
+ operationId: string;
496
+ summary: string;
497
+ parameters: {
498
+ name: string;
499
+ in: string;
500
+ required: boolean;
501
+ schema: {
502
+ type: string;
503
+ };
504
+ }[];
505
+ responses: {
506
+ "200": {
507
+ content: {
508
+ "application/json": {
509
+ schema: {
510
+ type: string;
511
+ properties: {
512
+ profile: {
513
+ $ref: string;
514
+ };
515
+ };
516
+ };
517
+ };
518
+ };
519
+ };
520
+ };
521
+ };
522
+ delete: {
523
+ operationId: string;
524
+ summary: string;
525
+ parameters: {
526
+ name: string;
527
+ in: string;
528
+ required: boolean;
529
+ schema: {
530
+ type: string;
531
+ };
532
+ }[];
533
+ responses: {
534
+ "200": {
535
+ content: {
536
+ "application/json": {
537
+ schema: {
538
+ type: string;
539
+ properties: {
540
+ deleted: {
541
+ type: string;
542
+ };
543
+ id: {
544
+ type: string;
545
+ };
546
+ };
547
+ };
548
+ };
549
+ };
550
+ };
551
+ };
552
+ };
553
+ };
554
+ "/v1/stats": {
555
+ get: {
556
+ operationId: string;
557
+ summary: string;
558
+ responses: {
559
+ "200": {
560
+ content: {
561
+ "application/json": {
562
+ schema: {
563
+ type: string;
564
+ properties: {
565
+ total: {
566
+ type: string;
567
+ };
568
+ };
569
+ };
570
+ };
571
+ };
572
+ };
573
+ };
574
+ };
575
+ };
576
+ };
577
+ };
578
+ //# sourceMappingURL=openapi.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"openapi.d.ts","sourceRoot":"","sources":["../../src/server/openapi.ts"],"names":[],"mappings":"AA4CA,wBAAgB,sBAAsB,CAAC,OAAO,SAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA0NnE"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=server.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"server.test.d.ts","sourceRoot":"","sources":["../../src/server/server.test.ts"],"names":[],"mappings":""}
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Handle a `/v1/*` request. Authentication + read/write scope enforcement is
3
+ * performed UPSTREAM by the contracts `honoApiKey` middleware (see
4
+ * server/index.ts); by the time this runs the caller is an authorized principal.
5
+ * Returns `null` when the path is not a `/v1` route so the caller can fall
6
+ * through to other handlers.
7
+ */
8
+ export declare function handleV1Request(req: Request, url: URL): Promise<Response | null>;
9
+ //# sourceMappingURL=v1.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"v1.d.ts","sourceRoot":"","sources":["../../src/server/v1.ts"],"names":[],"mappings":"AAkCA;;;;;;GAMG;AACH,wBAAsB,eAAe,CAAC,GAAG,EAAE,OAAO,EAAE,GAAG,EAAE,GAAG,GAAG,OAAO,CAAC,QAAQ,GAAG,IAAI,CAAC,CA4HtF"}
@@ -0,0 +1,56 @@
1
+ import type { Database } from "bun:sqlite";
2
+ type ActiveDbEnv = "HASNA_CONFIGS_DB_PATH" | "CONFIGS_DB_PATH" | null;
3
+ type DatabaseKind = "memory" | "file";
4
+ type ContractStatus = "ok" | "warn";
5
+ export interface ConfigsStatusContract {
6
+ service: "configs";
7
+ schemaVersion: "1.0";
8
+ package: {
9
+ name: string;
10
+ version: string;
11
+ };
12
+ env: {
13
+ database: {
14
+ primary: "HASNA_CONFIGS_DB_PATH";
15
+ fallback: "CONFIGS_DB_PATH";
16
+ active: ActiveDbEnv;
17
+ kind: DatabaseKind;
18
+ };
19
+ };
20
+ counts: {
21
+ configs: {
22
+ total: number;
23
+ file: number;
24
+ reference: number;
25
+ templates: number;
26
+ };
27
+ byCategory: Record<string, number>;
28
+ byAgent: Record<string, number>;
29
+ byFormat: Record<string, number>;
30
+ profiles: number;
31
+ profileLinks: number;
32
+ machines: number;
33
+ snapshots: number;
34
+ knownTargets: number;
35
+ };
36
+ health: {
37
+ status: ContractStatus;
38
+ databaseReachable: boolean;
39
+ driftedTargets: number;
40
+ missingTargets: number;
41
+ unredactedSecretFindings: number;
42
+ hasDrift: boolean;
43
+ hasMissingTargets: boolean;
44
+ hasUnredactedSecrets: boolean;
45
+ };
46
+ safety: {
47
+ includesConfigValues: false;
48
+ includesPrivatePaths: false;
49
+ includesHostnames: false;
50
+ includesSecretValues: false;
51
+ statusOutputIsMetadataOnly: true;
52
+ };
53
+ }
54
+ export declare function getConfigsStatus(db?: Database): ConfigsStatusContract;
55
+ export {};
56
+ //# sourceMappingURL=status.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"status.d.ts","sourceRoot":"","sources":["../src/status.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAW3C,KAAK,WAAW,GAAG,uBAAuB,GAAG,iBAAiB,GAAG,IAAI,CAAC;AACtE,KAAK,YAAY,GAAG,QAAQ,GAAG,MAAM,CAAC;AACtC,KAAK,cAAc,GAAG,IAAI,GAAG,MAAM,CAAC;AAEpC,MAAM,WAAW,qBAAqB;IACpC,OAAO,EAAE,SAAS,CAAC;IACnB,aAAa,EAAE,KAAK,CAAC;IACrB,OAAO,EAAE;QACP,IAAI,EAAE,MAAM,CAAC;QACb,OAAO,EAAE,MAAM,CAAC;KACjB,CAAC;IACF,GAAG,EAAE;QACH,QAAQ,EAAE;YACR,OAAO,EAAE,uBAAuB,CAAC;YACjC,QAAQ,EAAE,iBAAiB,CAAC;YAC5B,MAAM,EAAE,WAAW,CAAC;YACpB,IAAI,EAAE,YAAY,CAAC;SACpB,CAAC;KACH,CAAC;IACF,MAAM,EAAE;QACN,OAAO,EAAE;YACP,KAAK,EAAE,MAAM,CAAC;YACd,IAAI,EAAE,MAAM,CAAC;YACb,SAAS,EAAE,MAAM,CAAC;YAClB,SAAS,EAAE,MAAM,CAAC;SACnB,CAAC;QACF,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;QACnC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;QAChC,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;QACjC,QAAQ,EAAE,MAAM,CAAC;QACjB,YAAY,EAAE,MAAM,CAAC;QACrB,QAAQ,EAAE,MAAM,CAAC;QACjB,SAAS,EAAE,MAAM,CAAC;QAClB,YAAY,EAAE,MAAM,CAAC;KACtB,CAAC;IACF,MAAM,EAAE;QACN,MAAM,EAAE,cAAc,CAAC;QACvB,iBAAiB,EAAE,OAAO,CAAC;QAC3B,cAAc,EAAE,MAAM,CAAC;QACvB,cAAc,EAAE,MAAM,CAAC;QACvB,wBAAwB,EAAE,MAAM,CAAC;QACjC,QAAQ,EAAE,OAAO,CAAC;QAClB,iBAAiB,EAAE,OAAO,CAAC;QAC3B,oBAAoB,EAAE,OAAO,CAAC;KAC/B,CAAC;IACF,MAAM,EAAE;QACN,oBAAoB,EAAE,KAAK,CAAC;QAC5B,oBAAoB,EAAE,KAAK,CAAC;QAC5B,iBAAiB,EAAE,KAAK,CAAC;QACzB,oBAAoB,EAAE,KAAK,CAAC;QAC5B,0BAA0B,EAAE,IAAI,CAAC;KAClC,CAAC;CACH;AAgCD,wBAAgB,gBAAgB,CAAC,EAAE,GAAE,QAAwB,GAAG,qBAAqB,CAmGpF"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=status.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"status.test.d.ts","sourceRoot":"","sources":["../src/status.test.ts"],"names":[],"mappings":""}
@@ -0,0 +1,17 @@
1
+ import type { TypedQueryClient } from "../generated/storage-kit/index.js";
2
+ import { type Config, type ConfigFilter, type ConfigSnapshot, type CreateConfigInput, type CreateProfileInput, type Profile, type UpdateConfigInput, type UpdateProfileInput } from "../types/index.js";
3
+ export declare function listConfigs(client: TypedQueryClient, filter?: ConfigFilter): Promise<Config[]>;
4
+ export declare function getConfig(client: TypedQueryClient, idOrSlug: string): Promise<Config>;
5
+ export declare function createConfig(client: TypedQueryClient, input: CreateConfigInput): Promise<Config>;
6
+ export declare function updateConfig(client: TypedQueryClient, idOrSlug: string, input: UpdateConfigInput): Promise<Config>;
7
+ export declare function deleteConfig(client: TypedQueryClient, idOrSlug: string): Promise<void>;
8
+ export declare function getConfigStats(client: TypedQueryClient): Promise<Record<string, number>>;
9
+ export declare function createSnapshot(client: TypedQueryClient, idOrSlug: string): Promise<ConfigSnapshot>;
10
+ export declare function listSnapshots(client: TypedQueryClient, idOrSlug: string): Promise<ConfigSnapshot[]>;
11
+ export declare function listProfiles(client: TypedQueryClient): Promise<Profile[]>;
12
+ export declare function getProfile(client: TypedQueryClient, idOrSlug: string): Promise<Profile>;
13
+ export declare function getProfileConfigs(client: TypedQueryClient, idOrSlug: string): Promise<Config[]>;
14
+ export declare function createProfile(client: TypedQueryClient, input: CreateProfileInput): Promise<Profile>;
15
+ export declare function updateProfile(client: TypedQueryClient, idOrSlug: string, input: UpdateProfileInput): Promise<Profile>;
16
+ export declare function deleteProfile(client: TypedQueryClient, idOrSlug: string): Promise<void>;
17
+ //# sourceMappingURL=cloud-store.d.ts.map