@skill-harness/adapters 0.14.0 → 0.16.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.
@@ -0,0 +1,930 @@
1
+ import { type HypothesisProposal, type Hypothesis, type AdoptionBinding, type AdoptionAuthority, type AdoptionFacts, type RollbackRequest, type ProductionObservation, type BlindQualityChoice } from '@skill-harness/core';
2
+ import { type WorkCaseReviewRequest } from './work-case-review.js';
3
+ import { type LearningCaseReference } from './learning-case.js';
4
+ import { type TrustLifecycleInput } from './trust-lifecycle.js';
5
+ /** Creates only explicitly selected private local directories; never follows a symlink. */
6
+ export declare function prepareLearningDirectory(directory: string): void;
7
+ export interface LearningWorkspaceInput {
8
+ archiveRoot: string;
9
+ scopeDigest: string;
10
+ population: string;
11
+ author: string;
12
+ }
13
+ export interface LearningCaseBinding {
14
+ name: string;
15
+ title: string;
16
+ version: 2 | 3;
17
+ batchId: string;
18
+ }
19
+ export interface LearningComparisonBinding {
20
+ name: string;
21
+ title: string;
22
+ scopeStatement: string;
23
+ comparisonManifestId: string;
24
+ caseReference: LearningCaseReference | null;
25
+ hypothesisManifestId: string | null;
26
+ priorFeedbackManifestIds: string[];
27
+ adoptionBinding: AdoptionBinding | null;
28
+ }
29
+ export interface LearningQualityReview {
30
+ scope: 'full-artifacts';
31
+ note: string;
32
+ reviewedArtifactDigests: string[];
33
+ }
34
+ export interface LearningDecisionRequest {
35
+ disposition: 'adopt' | 'reject' | 'defer';
36
+ note: string;
37
+ priorDecisionId: string | null;
38
+ }
39
+ export interface LearningRegistryReceipt {
40
+ version: 'learning-registry-receipt-v1';
41
+ operation: 'activate' | 'rollback';
42
+ requestId: string;
43
+ adoptionId: string;
44
+ scopeDigest: string;
45
+ candidateDigest: string;
46
+ revision: number;
47
+ /** Exact original registry inspect()/activate()/rollback() response retained by its owner. */
48
+ registryManifestId: string;
49
+ }
50
+ /** Composition over the existing archive and CAS journals. No worker callbacks, model calls,
51
+ * exposure, registry mutation, authentication or hostile-same-UID protection. */
52
+ export declare function createLearningWorkspace(directory: string, input: LearningWorkspaceInput): {
53
+ configuration: () => LearningWorkspaceInput;
54
+ dashboardBinding(): {
55
+ trustDirectory: string | null;
56
+ trustPolicyId: string | null;
57
+ };
58
+ preparedAdoption(name: string): Readonly<{
59
+ id: string;
60
+ version: "adoption-receipt-v1";
61
+ bindingId: string;
62
+ authorityId: string;
63
+ hypothesisDigest: string;
64
+ experimentDigest: string;
65
+ candidateDigest: string;
66
+ scopeDigest: string;
67
+ assessmentPolicyDigest: string;
68
+ rollbackCandidateDigest: string;
69
+ activationBoundary: "next-orders";
70
+ grantExpansion: false;
71
+ expiresAt: number;
72
+ }> | null;
73
+ adoptionStatus(name: string): {
74
+ binding: AdoptionBinding | null;
75
+ receipt: Readonly<{
76
+ id: string;
77
+ version: "adoption-receipt-v1";
78
+ bindingId: string;
79
+ authorityId: string;
80
+ hypothesisDigest: string;
81
+ experimentDigest: string;
82
+ candidateDigest: string;
83
+ scopeDigest: string;
84
+ assessmentPolicyDigest: string;
85
+ rollbackCandidateDigest: string;
86
+ activationBoundary: "next-orders";
87
+ grantExpansion: false;
88
+ expiresAt: number;
89
+ }> | null;
90
+ activationManifestId: string | null;
91
+ rollbackManifestId: string | null;
92
+ };
93
+ bindCases(raw: LearningCaseBinding): LearningCaseBinding;
94
+ bindComparison(raw: LearningComparisonBinding): {
95
+ name: string;
96
+ comparisonManifestId: string;
97
+ };
98
+ linkComparisonContext(name: string, context: Pick<LearningComparisonBinding, "caseReference" | "hypothesisManifestId" | "adoptionBinding">): {
99
+ name: string;
100
+ linked: boolean;
101
+ };
102
+ comparisonContext(name: string): {
103
+ caseReference: LearningCaseReference | null;
104
+ hypothesisManifestId: string | null;
105
+ adoptionBinding: AdoptionBinding | null;
106
+ };
107
+ bindTrust(trustDirectory: string): void;
108
+ configureTrust(raw: TrustLifecycleInput, authorizedPolicyDigests: readonly string[]): {
109
+ policyId: string;
110
+ component: import("@skill-harness/core").CalibrationComponent;
111
+ calibration: {
112
+ version: "factory-calibration-v1";
113
+ reports: import("@skill-harness/core").CalibrationReport[];
114
+ excludedTuning: number;
115
+ referenceBasis: "independently-supplied-host-context";
116
+ advisoryOnly: true;
117
+ };
118
+ sampledIncidentIds: string[];
119
+ unflagged: {
120
+ sampled: number;
121
+ resolved: number;
122
+ misses: number;
123
+ unresolved: number;
124
+ conflicted: number;
125
+ };
126
+ attentionUsed: number;
127
+ retired: boolean;
128
+ exposures: {
129
+ mode: "ask" | "silent" | "retire";
130
+ reason: string;
131
+ id: string;
132
+ }[];
133
+ tip: string;
134
+ grantExpansion: false;
135
+ };
136
+ trust(): {
137
+ inspect: (now: number) => {
138
+ policyId: string;
139
+ component: import("@skill-harness/core").CalibrationComponent;
140
+ calibration: {
141
+ version: "factory-calibration-v1";
142
+ reports: import("@skill-harness/core").CalibrationReport[];
143
+ excludedTuning: number;
144
+ referenceBasis: "independently-supplied-host-context";
145
+ advisoryOnly: true;
146
+ };
147
+ sampledIncidentIds: string[];
148
+ unflagged: {
149
+ sampled: number;
150
+ resolved: number;
151
+ misses: number;
152
+ unresolved: number;
153
+ conflicted: number;
154
+ };
155
+ attentionUsed: number;
156
+ retired: boolean;
157
+ exposures: {
158
+ mode: "ask" | "silent" | "retire";
159
+ reason: string;
160
+ id: string;
161
+ }[];
162
+ tip: string;
163
+ grantExpansion: false;
164
+ };
165
+ configuration: () => TrustLifecycleInput;
166
+ previewExposure: (now: number) => {
167
+ mode: "silent" | "ask" | "retire";
168
+ reason: string;
169
+ advisoryOnly: true;
170
+ } | {
171
+ mode: "retire";
172
+ reason: string;
173
+ } | {
174
+ mode: "silent";
175
+ reason: string;
176
+ };
177
+ history: () => import("./learning-journal.js").LearningEvent[];
178
+ previewCaseOutcome: (predictionId: string, reference: LearningCaseReference) => {
179
+ outcome: import("./trust-lifecycle.js").TrustReferenceOutcome;
180
+ caseReference: LearningCaseReference;
181
+ digest: string;
182
+ tip: string;
183
+ };
184
+ linkCaseOutcome(predictionId: string, reference: LearningCaseReference, authorizedDigests: readonly string[], referenceAuthor?: string): void;
185
+ predict(p: import("@skill-harness/core").CalibrationPrediction): void;
186
+ correct(prior: string, p: import("@skill-harness/core").CalibrationPrediction, reason: string): void;
187
+ outcome(value: import("./trust-lifecycle.js").TrustReferenceOutcome, authorizedReferenceDigests: readonly string[], referenceAuthor?: string): void;
188
+ expose(id: string, now: number): {
189
+ replayed: boolean;
190
+ mode: "ask" | "silent" | "retire";
191
+ reason: string;
192
+ } | {
193
+ replayed: boolean;
194
+ mode: "silent" | "ask" | "retire";
195
+ reason: string;
196
+ advisoryOnly: true;
197
+ };
198
+ };
199
+ addUnflagged(raw: {
200
+ name: string;
201
+ title: string;
202
+ manifestId: string;
203
+ split: "calibration" | "heldout" | "tuning";
204
+ }): {
205
+ name: string;
206
+ title: string;
207
+ manifestId: string;
208
+ split: "calibration" | "heldout" | "tuning";
209
+ };
210
+ unflagged(): {
211
+ incidentId: string;
212
+ name: string;
213
+ title: string;
214
+ manifestId: string;
215
+ split: "calibration" | "heldout" | "tuning";
216
+ }[];
217
+ cases(name: string, offset?: number): {
218
+ batchId: string;
219
+ version: 2 | 3;
220
+ observationId: string;
221
+ issues: string[];
222
+ total: number;
223
+ offset: number;
224
+ items: {
225
+ caseManifestId: string;
226
+ candidate: import("@skill-harness/core").WorkCaptureCaseV2 | import("@skill-harness/core").WorkCaptureCaseV3;
227
+ priorDecisionId: string | null;
228
+ disposition: string;
229
+ }[];
230
+ } | {
231
+ batchId: string;
232
+ version: 2 | 3;
233
+ total: number;
234
+ offset: number;
235
+ items: {
236
+ caseManifestId: string;
237
+ candidate: import("@skill-harness/core").WorkCaptureCaseV2;
238
+ priorDecisionId: string | null;
239
+ disposition: string;
240
+ }[];
241
+ };
242
+ caseEvidence(name: string, caseManifestId: string): ({
243
+ status: "missing";
244
+ reason: "manifest" | "content" | "not-retained";
245
+ manifestId: string;
246
+ role: string;
247
+ } | {
248
+ status: "error";
249
+ reason: string;
250
+ manifestId: string;
251
+ role: string;
252
+ } | {
253
+ status: "available";
254
+ reference: import("./evidence-archive.js").ArchiveSourceReference;
255
+ manifestId: string;
256
+ role: string;
257
+ })[];
258
+ readCaseEvidence(name: string, caseManifestId: string, manifestId: string): import("./evidence-archive.js").ArchiveRead;
259
+ decideCase(name: string, request: WorkCaseReviewRequest): {
260
+ current: import("@skill-harness/core").WorkCaseDecision;
261
+ replayed: boolean;
262
+ };
263
+ hypotheses(): {
264
+ hypothesis: Hypothesis;
265
+ name: string;
266
+ manifestId: string;
267
+ }[];
268
+ propose(name: string, proposal: HypothesisProposal, hypothesisName?: string): {
269
+ hypothesis: Hypothesis;
270
+ manifestId: string;
271
+ };
272
+ comparison(name: string): {
273
+ name: string;
274
+ title: string;
275
+ scopeStatement: string;
276
+ mode: "deliberate-review";
277
+ cards: {
278
+ displayLabel: string;
279
+ label: string;
280
+ artifactDigests: string[];
281
+ }[];
282
+ choice: BlindQualityChoice | null;
283
+ qualityScope: string | null;
284
+ priorFeedback: {
285
+ manifestId: string;
286
+ scope: "prior-feedback-only";
287
+ }[];
288
+ decision: {
289
+ disposition: "adopt" | "reject" | "defer";
290
+ note: string;
291
+ priorDecisionId: string | null;
292
+ id: string;
293
+ } | null;
294
+ activation: string;
295
+ rollback: string;
296
+ outcomes: {
297
+ manifestId: unknown;
298
+ classification: Readonly<{
299
+ state: "unknown" | "success" | "out-of-scope" | "changed-requirements" | "changed-artifact" | "caught-defect" | "escape";
300
+ adoptionId: string;
301
+ hypothesisDigest: string;
302
+ experimentDigest: string;
303
+ observationId: string;
304
+ acceptanceDigest: string | null;
305
+ acceptedArtifactDigest: string | null;
306
+ observedArtifactDigest: string;
307
+ automaticRollback: false;
308
+ }>;
309
+ }[];
310
+ adoptionReadiness: {
311
+ state: string;
312
+ reason: string;
313
+ };
314
+ laterOutcomeReadiness: string;
315
+ revealReady: boolean;
316
+ adoptionConfigured: boolean;
317
+ limitations: string[];
318
+ };
319
+ artifact(name: string, label: string, digest: string): Buffer<ArrayBuffer>;
320
+ choose(name: string, raw: BlindQualityChoice, rawReview: LearningQualityReview): Record<string, unknown>;
321
+ reveal(name: string): {
322
+ manifestId: string;
323
+ choice: BlindQualityChoice;
324
+ arms: {
325
+ label: string;
326
+ armId: string;
327
+ configuration: Record<import("@skill-harness/core").InterventionAxis, string>;
328
+ cost: number | null;
329
+ costUnit: string;
330
+ }[];
331
+ routingDefault: null;
332
+ };
333
+ decisionStatus(name: string): {
334
+ name: string;
335
+ title: string;
336
+ scopeStatement: string;
337
+ current: {
338
+ disposition: "adopt" | "reject" | "defer";
339
+ note: string;
340
+ priorDecisionId: string | null;
341
+ id: string;
342
+ } | null;
343
+ };
344
+ decide(name: string, raw: LearningDecisionRequest): {
345
+ disposition: "adopt" | "reject" | "defer";
346
+ note: string;
347
+ priorDecisionId: string | null;
348
+ id: string;
349
+ };
350
+ prepareAdoption(name: string, authority: AdoptionAuthority | null, facts: AdoptionFacts, now: number): Readonly<{
351
+ id: string;
352
+ version: "adoption-receipt-v1";
353
+ bindingId: string;
354
+ authorityId: string;
355
+ hypothesisDigest: string;
356
+ experimentDigest: string;
357
+ candidateDigest: string;
358
+ scopeDigest: string;
359
+ assessmentPolicyDigest: string;
360
+ rollbackCandidateDigest: string;
361
+ activationBoundary: "next-orders";
362
+ grantExpansion: false;
363
+ expiresAt: number;
364
+ }>;
365
+ linkActivation(name: string, manifestId: string, authorizedManifestIds: readonly string[]): LearningRegistryReceipt;
366
+ previewRollback(name: string, reason: RollbackRequest["reason"], evidence: string[], expiresAt?: number): RollbackRequest;
367
+ prepareRollback(name: string, request: RollbackRequest, authority: AdoptionAuthority | null, now: number, current: {
368
+ adoptionId: string;
369
+ candidateDigest: string;
370
+ scopeDigest: string;
371
+ }): Readonly<{
372
+ requestId: string;
373
+ adoptionId: string;
374
+ restoreCandidateDigest: string;
375
+ scopeDigest: string;
376
+ grantExpansion: false;
377
+ application: "not-performed";
378
+ }>;
379
+ linkRollback(name: string, manifestId: string, authorizedManifestIds: readonly string[]): LearningRegistryReceipt;
380
+ previewObservation(name: string, raw: ProductionObservation): {
381
+ observation: ProductionObservation;
382
+ classification: Readonly<{
383
+ state: "unknown" | "success" | "out-of-scope" | "changed-requirements" | "changed-artifact" | "caught-defect" | "escape";
384
+ adoptionId: string;
385
+ hypothesisDigest: string;
386
+ experimentDigest: string;
387
+ observationId: string;
388
+ acceptanceDigest: string | null;
389
+ acceptedArtifactDigest: string | null;
390
+ observedArtifactDigest: string;
391
+ automaticRollback: false;
392
+ }>;
393
+ digest: string;
394
+ };
395
+ observe(name: string, raw: ProductionObservation, authorizedDigests: readonly string[], referenceAuthor?: string): Record<string, unknown>;
396
+ lifecycle(name: string): {
397
+ state: string;
398
+ manifestId: null;
399
+ } | {
400
+ state: string;
401
+ manifestId: string;
402
+ };
403
+ inspect(now: number): {
404
+ version: "learning-workspace-view-v1";
405
+ configuration: LearningWorkspaceInput;
406
+ mode: "deliberate-review";
407
+ cases: ({
408
+ name: string;
409
+ title: string;
410
+ state: string;
411
+ total: number;
412
+ reason: string;
413
+ } | {
414
+ name: string;
415
+ title: string;
416
+ state: string;
417
+ total: null;
418
+ reason: string;
419
+ })[];
420
+ comparisons: ({
421
+ name: string;
422
+ title: string;
423
+ scopeStatement: string;
424
+ mode: "deliberate-review";
425
+ cards: {
426
+ displayLabel: string;
427
+ label: string;
428
+ artifactDigests: string[];
429
+ }[];
430
+ choice: BlindQualityChoice | null;
431
+ qualityScope: string | null;
432
+ priorFeedback: {
433
+ manifestId: string;
434
+ scope: "prior-feedback-only";
435
+ }[];
436
+ decision: {
437
+ disposition: "adopt" | "reject" | "defer";
438
+ note: string;
439
+ priorDecisionId: string | null;
440
+ id: string;
441
+ } | null;
442
+ activation: string;
443
+ rollback: string;
444
+ outcomes: {
445
+ manifestId: unknown;
446
+ classification: Readonly<{
447
+ state: "unknown" | "success" | "out-of-scope" | "changed-requirements" | "changed-artifact" | "caught-defect" | "escape";
448
+ adoptionId: string;
449
+ hypothesisDigest: string;
450
+ experimentDigest: string;
451
+ observationId: string;
452
+ acceptanceDigest: string | null;
453
+ acceptedArtifactDigest: string | null;
454
+ observedArtifactDigest: string;
455
+ automaticRollback: false;
456
+ }>;
457
+ }[];
458
+ adoptionReadiness: {
459
+ state: string;
460
+ reason: string;
461
+ };
462
+ laterOutcomeReadiness: string;
463
+ revealReady: boolean;
464
+ adoptionConfigured: boolean;
465
+ limitations: string[];
466
+ state: string;
467
+ reason: string;
468
+ } | {
469
+ name: string;
470
+ title: string;
471
+ state: string;
472
+ reason: string;
473
+ decision: {
474
+ disposition: "adopt" | "reject" | "defer";
475
+ note: string;
476
+ priorDecisionId: string | null;
477
+ id: string;
478
+ } | null;
479
+ })[];
480
+ trust: Record<string, unknown>;
481
+ automaticExposureReserved: boolean;
482
+ delegationStarted: boolean;
483
+ acceptance: "not-assessed";
484
+ };
485
+ };
486
+ export declare function openLearningWorkspace(directory: string): {
487
+ configuration: () => LearningWorkspaceInput;
488
+ dashboardBinding(): {
489
+ trustDirectory: string | null;
490
+ trustPolicyId: string | null;
491
+ };
492
+ preparedAdoption(name: string): Readonly<{
493
+ id: string;
494
+ version: "adoption-receipt-v1";
495
+ bindingId: string;
496
+ authorityId: string;
497
+ hypothesisDigest: string;
498
+ experimentDigest: string;
499
+ candidateDigest: string;
500
+ scopeDigest: string;
501
+ assessmentPolicyDigest: string;
502
+ rollbackCandidateDigest: string;
503
+ activationBoundary: "next-orders";
504
+ grantExpansion: false;
505
+ expiresAt: number;
506
+ }> | null;
507
+ adoptionStatus(name: string): {
508
+ binding: AdoptionBinding | null;
509
+ receipt: Readonly<{
510
+ id: string;
511
+ version: "adoption-receipt-v1";
512
+ bindingId: string;
513
+ authorityId: string;
514
+ hypothesisDigest: string;
515
+ experimentDigest: string;
516
+ candidateDigest: string;
517
+ scopeDigest: string;
518
+ assessmentPolicyDigest: string;
519
+ rollbackCandidateDigest: string;
520
+ activationBoundary: "next-orders";
521
+ grantExpansion: false;
522
+ expiresAt: number;
523
+ }> | null;
524
+ activationManifestId: string | null;
525
+ rollbackManifestId: string | null;
526
+ };
527
+ bindCases(raw: LearningCaseBinding): LearningCaseBinding;
528
+ bindComparison(raw: LearningComparisonBinding): {
529
+ name: string;
530
+ comparisonManifestId: string;
531
+ };
532
+ linkComparisonContext(name: string, context: Pick<LearningComparisonBinding, "caseReference" | "hypothesisManifestId" | "adoptionBinding">): {
533
+ name: string;
534
+ linked: boolean;
535
+ };
536
+ comparisonContext(name: string): {
537
+ caseReference: LearningCaseReference | null;
538
+ hypothesisManifestId: string | null;
539
+ adoptionBinding: AdoptionBinding | null;
540
+ };
541
+ bindTrust(trustDirectory: string): void;
542
+ configureTrust(raw: TrustLifecycleInput, authorizedPolicyDigests: readonly string[]): {
543
+ policyId: string;
544
+ component: import("@skill-harness/core").CalibrationComponent;
545
+ calibration: {
546
+ version: "factory-calibration-v1";
547
+ reports: import("@skill-harness/core").CalibrationReport[];
548
+ excludedTuning: number;
549
+ referenceBasis: "independently-supplied-host-context";
550
+ advisoryOnly: true;
551
+ };
552
+ sampledIncidentIds: string[];
553
+ unflagged: {
554
+ sampled: number;
555
+ resolved: number;
556
+ misses: number;
557
+ unresolved: number;
558
+ conflicted: number;
559
+ };
560
+ attentionUsed: number;
561
+ retired: boolean;
562
+ exposures: {
563
+ mode: "ask" | "silent" | "retire";
564
+ reason: string;
565
+ id: string;
566
+ }[];
567
+ tip: string;
568
+ grantExpansion: false;
569
+ };
570
+ trust(): {
571
+ inspect: (now: number) => {
572
+ policyId: string;
573
+ component: import("@skill-harness/core").CalibrationComponent;
574
+ calibration: {
575
+ version: "factory-calibration-v1";
576
+ reports: import("@skill-harness/core").CalibrationReport[];
577
+ excludedTuning: number;
578
+ referenceBasis: "independently-supplied-host-context";
579
+ advisoryOnly: true;
580
+ };
581
+ sampledIncidentIds: string[];
582
+ unflagged: {
583
+ sampled: number;
584
+ resolved: number;
585
+ misses: number;
586
+ unresolved: number;
587
+ conflicted: number;
588
+ };
589
+ attentionUsed: number;
590
+ retired: boolean;
591
+ exposures: {
592
+ mode: "ask" | "silent" | "retire";
593
+ reason: string;
594
+ id: string;
595
+ }[];
596
+ tip: string;
597
+ grantExpansion: false;
598
+ };
599
+ configuration: () => TrustLifecycleInput;
600
+ previewExposure: (now: number) => {
601
+ mode: "silent" | "ask" | "retire";
602
+ reason: string;
603
+ advisoryOnly: true;
604
+ } | {
605
+ mode: "retire";
606
+ reason: string;
607
+ } | {
608
+ mode: "silent";
609
+ reason: string;
610
+ };
611
+ history: () => import("./learning-journal.js").LearningEvent[];
612
+ previewCaseOutcome: (predictionId: string, reference: LearningCaseReference) => {
613
+ outcome: import("./trust-lifecycle.js").TrustReferenceOutcome;
614
+ caseReference: LearningCaseReference;
615
+ digest: string;
616
+ tip: string;
617
+ };
618
+ linkCaseOutcome(predictionId: string, reference: LearningCaseReference, authorizedDigests: readonly string[], referenceAuthor?: string): void;
619
+ predict(p: import("@skill-harness/core").CalibrationPrediction): void;
620
+ correct(prior: string, p: import("@skill-harness/core").CalibrationPrediction, reason: string): void;
621
+ outcome(value: import("./trust-lifecycle.js").TrustReferenceOutcome, authorizedReferenceDigests: readonly string[], referenceAuthor?: string): void;
622
+ expose(id: string, now: number): {
623
+ replayed: boolean;
624
+ mode: "ask" | "silent" | "retire";
625
+ reason: string;
626
+ } | {
627
+ replayed: boolean;
628
+ mode: "silent" | "ask" | "retire";
629
+ reason: string;
630
+ advisoryOnly: true;
631
+ };
632
+ };
633
+ addUnflagged(raw: {
634
+ name: string;
635
+ title: string;
636
+ manifestId: string;
637
+ split: "calibration" | "heldout" | "tuning";
638
+ }): {
639
+ name: string;
640
+ title: string;
641
+ manifestId: string;
642
+ split: "calibration" | "heldout" | "tuning";
643
+ };
644
+ unflagged(): {
645
+ incidentId: string;
646
+ name: string;
647
+ title: string;
648
+ manifestId: string;
649
+ split: "calibration" | "heldout" | "tuning";
650
+ }[];
651
+ cases(name: string, offset?: number): {
652
+ batchId: string;
653
+ version: 2 | 3;
654
+ observationId: string;
655
+ issues: string[];
656
+ total: number;
657
+ offset: number;
658
+ items: {
659
+ caseManifestId: string;
660
+ candidate: import("@skill-harness/core").WorkCaptureCaseV2 | import("@skill-harness/core").WorkCaptureCaseV3;
661
+ priorDecisionId: string | null;
662
+ disposition: string;
663
+ }[];
664
+ } | {
665
+ batchId: string;
666
+ version: 2 | 3;
667
+ total: number;
668
+ offset: number;
669
+ items: {
670
+ caseManifestId: string;
671
+ candidate: import("@skill-harness/core").WorkCaptureCaseV2;
672
+ priorDecisionId: string | null;
673
+ disposition: string;
674
+ }[];
675
+ };
676
+ caseEvidence(name: string, caseManifestId: string): ({
677
+ status: "missing";
678
+ reason: "manifest" | "content" | "not-retained";
679
+ manifestId: string;
680
+ role: string;
681
+ } | {
682
+ status: "error";
683
+ reason: string;
684
+ manifestId: string;
685
+ role: string;
686
+ } | {
687
+ status: "available";
688
+ reference: import("./evidence-archive.js").ArchiveSourceReference;
689
+ manifestId: string;
690
+ role: string;
691
+ })[];
692
+ readCaseEvidence(name: string, caseManifestId: string, manifestId: string): import("./evidence-archive.js").ArchiveRead;
693
+ decideCase(name: string, request: WorkCaseReviewRequest): {
694
+ current: import("@skill-harness/core").WorkCaseDecision;
695
+ replayed: boolean;
696
+ };
697
+ hypotheses(): {
698
+ hypothesis: Hypothesis;
699
+ name: string;
700
+ manifestId: string;
701
+ }[];
702
+ propose(name: string, proposal: HypothesisProposal, hypothesisName?: string): {
703
+ hypothesis: Hypothesis;
704
+ manifestId: string;
705
+ };
706
+ comparison(name: string): {
707
+ name: string;
708
+ title: string;
709
+ scopeStatement: string;
710
+ mode: "deliberate-review";
711
+ cards: {
712
+ displayLabel: string;
713
+ label: string;
714
+ artifactDigests: string[];
715
+ }[];
716
+ choice: BlindQualityChoice | null;
717
+ qualityScope: string | null;
718
+ priorFeedback: {
719
+ manifestId: string;
720
+ scope: "prior-feedback-only";
721
+ }[];
722
+ decision: {
723
+ disposition: "adopt" | "reject" | "defer";
724
+ note: string;
725
+ priorDecisionId: string | null;
726
+ id: string;
727
+ } | null;
728
+ activation: string;
729
+ rollback: string;
730
+ outcomes: {
731
+ manifestId: unknown;
732
+ classification: Readonly<{
733
+ state: "unknown" | "success" | "out-of-scope" | "changed-requirements" | "changed-artifact" | "caught-defect" | "escape";
734
+ adoptionId: string;
735
+ hypothesisDigest: string;
736
+ experimentDigest: string;
737
+ observationId: string;
738
+ acceptanceDigest: string | null;
739
+ acceptedArtifactDigest: string | null;
740
+ observedArtifactDigest: string;
741
+ automaticRollback: false;
742
+ }>;
743
+ }[];
744
+ adoptionReadiness: {
745
+ state: string;
746
+ reason: string;
747
+ };
748
+ laterOutcomeReadiness: string;
749
+ revealReady: boolean;
750
+ adoptionConfigured: boolean;
751
+ limitations: string[];
752
+ };
753
+ artifact(name: string, label: string, digest: string): Buffer<ArrayBuffer>;
754
+ choose(name: string, raw: BlindQualityChoice, rawReview: LearningQualityReview): Record<string, unknown>;
755
+ reveal(name: string): {
756
+ manifestId: string;
757
+ choice: BlindQualityChoice;
758
+ arms: {
759
+ label: string;
760
+ armId: string;
761
+ configuration: Record<import("@skill-harness/core").InterventionAxis, string>;
762
+ cost: number | null;
763
+ costUnit: string;
764
+ }[];
765
+ routingDefault: null;
766
+ };
767
+ decisionStatus(name: string): {
768
+ name: string;
769
+ title: string;
770
+ scopeStatement: string;
771
+ current: {
772
+ disposition: "adopt" | "reject" | "defer";
773
+ note: string;
774
+ priorDecisionId: string | null;
775
+ id: string;
776
+ } | null;
777
+ };
778
+ decide(name: string, raw: LearningDecisionRequest): {
779
+ disposition: "adopt" | "reject" | "defer";
780
+ note: string;
781
+ priorDecisionId: string | null;
782
+ id: string;
783
+ };
784
+ prepareAdoption(name: string, authority: AdoptionAuthority | null, facts: AdoptionFacts, now: number): Readonly<{
785
+ id: string;
786
+ version: "adoption-receipt-v1";
787
+ bindingId: string;
788
+ authorityId: string;
789
+ hypothesisDigest: string;
790
+ experimentDigest: string;
791
+ candidateDigest: string;
792
+ scopeDigest: string;
793
+ assessmentPolicyDigest: string;
794
+ rollbackCandidateDigest: string;
795
+ activationBoundary: "next-orders";
796
+ grantExpansion: false;
797
+ expiresAt: number;
798
+ }>;
799
+ linkActivation(name: string, manifestId: string, authorizedManifestIds: readonly string[]): LearningRegistryReceipt;
800
+ previewRollback(name: string, reason: RollbackRequest["reason"], evidence: string[], expiresAt?: number): RollbackRequest;
801
+ prepareRollback(name: string, request: RollbackRequest, authority: AdoptionAuthority | null, now: number, current: {
802
+ adoptionId: string;
803
+ candidateDigest: string;
804
+ scopeDigest: string;
805
+ }): Readonly<{
806
+ requestId: string;
807
+ adoptionId: string;
808
+ restoreCandidateDigest: string;
809
+ scopeDigest: string;
810
+ grantExpansion: false;
811
+ application: "not-performed";
812
+ }>;
813
+ linkRollback(name: string, manifestId: string, authorizedManifestIds: readonly string[]): LearningRegistryReceipt;
814
+ previewObservation(name: string, raw: ProductionObservation): {
815
+ observation: ProductionObservation;
816
+ classification: Readonly<{
817
+ state: "unknown" | "success" | "out-of-scope" | "changed-requirements" | "changed-artifact" | "caught-defect" | "escape";
818
+ adoptionId: string;
819
+ hypothesisDigest: string;
820
+ experimentDigest: string;
821
+ observationId: string;
822
+ acceptanceDigest: string | null;
823
+ acceptedArtifactDigest: string | null;
824
+ observedArtifactDigest: string;
825
+ automaticRollback: false;
826
+ }>;
827
+ digest: string;
828
+ };
829
+ observe(name: string, raw: ProductionObservation, authorizedDigests: readonly string[], referenceAuthor?: string): Record<string, unknown>;
830
+ lifecycle(name: string): {
831
+ state: string;
832
+ manifestId: null;
833
+ } | {
834
+ state: string;
835
+ manifestId: string;
836
+ };
837
+ inspect(now: number): {
838
+ version: "learning-workspace-view-v1";
839
+ configuration: LearningWorkspaceInput;
840
+ mode: "deliberate-review";
841
+ cases: ({
842
+ name: string;
843
+ title: string;
844
+ state: string;
845
+ total: number;
846
+ reason: string;
847
+ } | {
848
+ name: string;
849
+ title: string;
850
+ state: string;
851
+ total: null;
852
+ reason: string;
853
+ })[];
854
+ comparisons: ({
855
+ name: string;
856
+ title: string;
857
+ scopeStatement: string;
858
+ mode: "deliberate-review";
859
+ cards: {
860
+ displayLabel: string;
861
+ label: string;
862
+ artifactDigests: string[];
863
+ }[];
864
+ choice: BlindQualityChoice | null;
865
+ qualityScope: string | null;
866
+ priorFeedback: {
867
+ manifestId: string;
868
+ scope: "prior-feedback-only";
869
+ }[];
870
+ decision: {
871
+ disposition: "adopt" | "reject" | "defer";
872
+ note: string;
873
+ priorDecisionId: string | null;
874
+ id: string;
875
+ } | null;
876
+ activation: string;
877
+ rollback: string;
878
+ outcomes: {
879
+ manifestId: unknown;
880
+ classification: Readonly<{
881
+ state: "unknown" | "success" | "out-of-scope" | "changed-requirements" | "changed-artifact" | "caught-defect" | "escape";
882
+ adoptionId: string;
883
+ hypothesisDigest: string;
884
+ experimentDigest: string;
885
+ observationId: string;
886
+ acceptanceDigest: string | null;
887
+ acceptedArtifactDigest: string | null;
888
+ observedArtifactDigest: string;
889
+ automaticRollback: false;
890
+ }>;
891
+ }[];
892
+ adoptionReadiness: {
893
+ state: string;
894
+ reason: string;
895
+ };
896
+ laterOutcomeReadiness: string;
897
+ revealReady: boolean;
898
+ adoptionConfigured: boolean;
899
+ limitations: string[];
900
+ state: string;
901
+ reason: string;
902
+ } | {
903
+ name: string;
904
+ title: string;
905
+ state: string;
906
+ reason: string;
907
+ decision: {
908
+ disposition: "adopt" | "reject" | "defer";
909
+ note: string;
910
+ priorDecisionId: string | null;
911
+ id: string;
912
+ } | null;
913
+ })[];
914
+ trust: Record<string, unknown>;
915
+ automaticExposureReserved: boolean;
916
+ delegationStarted: boolean;
917
+ acceptance: "not-assessed";
918
+ };
919
+ };
920
+ /** Explicit operator-selected archive inventory, not discovery of private sessions. Names/indices
921
+ * are presentation only; callers bind the full immutable manifest before any decision. */
922
+ export interface LearningCatalogItem {
923
+ kind: 'cases' | 'comparison';
924
+ manifestId: string;
925
+ version: 1 | 2 | 3;
926
+ description: string;
927
+ scopeDigest?: string;
928
+ population?: string;
929
+ }
930
+ export declare function catalogLearningArchive(root: string, author: string): LearningCatalogItem[];