yam-flow 2.6.0 → 2.8.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.
- package/AGENTS.md +1 -0
- package/CHANGELOG.md +51 -0
- package/COMMANDS.md +72 -5
- package/README.md +49 -9
- package/ROADMAP.md +20 -7
- package/dist/bin/yam.js +616 -68
- package/dist/lib/external-updates.d.ts +9 -0
- package/dist/lib/external-updates.js +232 -4
- package/dist/lib/media-provider-receipt.d.ts +79 -0
- package/dist/lib/media-provider-receipt.js +498 -0
- package/dist/lib/next-step.d.ts +61 -0
- package/dist/lib/next-step.js +340 -0
- package/dist/lib/release-auth-readiness.d.ts +81 -0
- package/dist/lib/release-auth-readiness.js +106 -0
- package/dist/lib/release-registry-status.d.ts +18 -0
- package/dist/lib/release-registry-status.js +37 -0
- package/dist/lib/scout-receipt.d.ts +89 -0
- package/dist/lib/scout-receipt.js +542 -0
- package/dist/lib/skill-installation.d.ts +30 -0
- package/dist/lib/skill-installation.js +738 -110
- package/dist/lib/trust-kernel.d.ts +2 -0
- package/dist/lib/trust-kernel.js +21 -2
- package/dist/lib/verification-closure.d.ts +97 -0
- package/dist/lib/verification-closure.js +728 -0
- package/package.json +23 -3
- package/references/final-report.md +15 -1
- package/references/next-step.md +67 -0
- package/references/scout-wide-scan.md +16 -0
- package/references/study-note.md +4 -2
- package/references/tool-trust-layer.md +2 -0
- package/skills/deep/SKILL.md +2 -0
- package/skills/mission/SKILL.md +2 -0
- package/skills/quick/SKILL.md +1 -0
- package/skills/scout/SKILL.md +19 -9
- package/skills/ueye/SKILL.md +1 -0
- package/src/bin/yam.ts +615 -64
- package/src/lib/external-updates.ts +262 -4
- package/src/lib/media-provider-receipt.ts +548 -0
- package/src/lib/next-step.ts +397 -0
- package/src/lib/release-auth-readiness.ts +148 -0
- package/src/lib/release-registry-status.ts +55 -0
- package/src/lib/scout-receipt.ts +593 -0
- package/src/lib/skill-installation.ts +930 -108
- package/src/lib/trust-kernel.ts +25 -2
- package/src/lib/verification-closure.ts +738 -0
- package/yam.manifest.json +4 -3
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { NextStepReceipt } from './next-step.js';
|
|
1
2
|
export declare const TRUTH_STATUSES: readonly ["verified", "proven", "partial", "fixture_only", "fixture_instrumented_real", "integration_optional", "real_required_missing", "skipped", "blocked", "assumed"];
|
|
2
3
|
export type TruthStatus = (typeof TRUTH_STATUSES)[number];
|
|
3
4
|
export type SafetyLevel = 'danger' | 'warning';
|
|
@@ -240,6 +241,7 @@ export interface LoopReport {
|
|
|
240
241
|
side_effects: string[];
|
|
241
242
|
avoidance_note: string;
|
|
242
243
|
study_note: StudyNote;
|
|
244
|
+
next_step: NextStepReceipt | null;
|
|
243
245
|
}
|
|
244
246
|
export interface UeyeRunReport {
|
|
245
247
|
schema: 'yam.ueye-run-report.v1';
|
package/dist/lib/trust-kernel.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { verifyStrictGateResult } from './gate-result.js';
|
|
2
|
+
import { buildNextStep } from './next-step.js';
|
|
2
3
|
export const TRUTH_STATUSES = Object.freeze([
|
|
3
4
|
'verified',
|
|
4
5
|
'proven',
|
|
@@ -384,13 +385,30 @@ export function buildLoopReport(input = {}) {
|
|
|
384
385
|
const uncoveredRequirements = asList(input.uncovered_requirements || input.uncovered_requirement);
|
|
385
386
|
const blockers = asList(input.blockers || input.blocked);
|
|
386
387
|
const blockedBy = asList(input.blocked_by);
|
|
387
|
-
const
|
|
388
|
+
const requestedBlockedKind = shortText(input.blocked_kind);
|
|
388
389
|
const failureCause = shortText(input.failure_cause);
|
|
389
390
|
const recoveryHint = shortText(input.recovery_hint);
|
|
390
391
|
const avoidanceNote = shortText(input.avoidance_note);
|
|
391
392
|
const evidenceStamp = shortText(input.evidence_stamp || input.source_digest, 320);
|
|
392
393
|
const sourceDigest = shortText(input.source_digest || input.evidence_stamp, 320);
|
|
393
394
|
const hasBlockedStage = stages.some((stage) => stage.status === 'blocked' || stage.status === 'failed');
|
|
395
|
+
const nextStepSupplied = input.next_step !== undefined && input.next_step !== null;
|
|
396
|
+
const nextStep = nextStepSupplied ? buildNextStep(input.next_step) : null;
|
|
397
|
+
const nextStepRequired = touchedFiles.length > 0;
|
|
398
|
+
const nextStepBlocked = (nextStepRequired && !nextStep)
|
|
399
|
+
|| Boolean(nextStep && (!nextStep.contract_valid || nextStep.truth_status === 'blocked'));
|
|
400
|
+
if (nextStepBlocked) {
|
|
401
|
+
blockers.push(!nextStep
|
|
402
|
+
? 'next_step_missing_for_changed_artifacts'
|
|
403
|
+
: `next_step_contract_blocked: ${nextStep.contract_errors[0] || nextStep.truth_status}`);
|
|
404
|
+
}
|
|
405
|
+
const blockedKind = shortText(requestedBlockedKind || (readinessState === 'blocked'
|
|
406
|
+
? 'readiness_blocked'
|
|
407
|
+
: uncoveredRequirements.length
|
|
408
|
+
? 'requirement_uncovered'
|
|
409
|
+
: blockers.length || blockedBy.length
|
|
410
|
+
? 'evidence_missing'
|
|
411
|
+
: ''));
|
|
394
412
|
const hasBlockerSignal = Boolean(blockers.length || blockedBy.length || blockedKind || uncoveredRequirements.length || readinessState === 'blocked');
|
|
395
413
|
const requestedTruth = isTruthStatus(input.truth_status) ? input.truth_status : '';
|
|
396
414
|
const derivedTruth = hasBlockerSignal || hasBlockedStage ? 'blocked'
|
|
@@ -444,7 +462,8 @@ export function buildLoopReport(input = {}) {
|
|
|
444
462
|
scope_owner: normalizeOwnerRoute(input.scope_owner || input.owner),
|
|
445
463
|
side_effects: asList(input.side_effects || input.side_effect),
|
|
446
464
|
avoidance_note: avoidanceNote,
|
|
447
|
-
study_note: studyNote
|
|
465
|
+
study_note: studyNote,
|
|
466
|
+
next_step: nextStep
|
|
448
467
|
};
|
|
449
468
|
}
|
|
450
469
|
export function buildUeyeRunReport(input = {}) {
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
export type VerificationScope = 'affected' | 'release';
|
|
2
|
+
export interface SelectedVerificationCommand {
|
|
3
|
+
id: string;
|
|
4
|
+
command: string;
|
|
5
|
+
scope: VerificationScope;
|
|
6
|
+
required: boolean;
|
|
7
|
+
}
|
|
8
|
+
export interface ExecutedVerificationCommand {
|
|
9
|
+
id: string;
|
|
10
|
+
command: string;
|
|
11
|
+
exit_code: number;
|
|
12
|
+
evidence: string;
|
|
13
|
+
}
|
|
14
|
+
export interface VerificationCommandException {
|
|
15
|
+
check_id: string;
|
|
16
|
+
reason: string;
|
|
17
|
+
}
|
|
18
|
+
export interface VerificationClosureReceipt {
|
|
19
|
+
schema: 'yam.verification-closure.v1';
|
|
20
|
+
created_at: string;
|
|
21
|
+
planned_scope: VerificationScope;
|
|
22
|
+
final_scope: VerificationScope;
|
|
23
|
+
scope_derivation: {
|
|
24
|
+
source: 'git_status_porcelain_v1';
|
|
25
|
+
availability: 'observed' | 'unavailable';
|
|
26
|
+
promoted: boolean;
|
|
27
|
+
release_sensitive_files: string[];
|
|
28
|
+
reason: string;
|
|
29
|
+
};
|
|
30
|
+
declared_changed_files: string[];
|
|
31
|
+
scope_observation: {
|
|
32
|
+
command: 'git status --porcelain=v1 -z --untracked-files=all';
|
|
33
|
+
availability: 'observed' | 'unavailable';
|
|
34
|
+
changed_files: string[];
|
|
35
|
+
unplanned_files: string[];
|
|
36
|
+
declared_not_observed: string[];
|
|
37
|
+
reason: string;
|
|
38
|
+
};
|
|
39
|
+
changed_files: string[];
|
|
40
|
+
selected_commands: SelectedVerificationCommand[];
|
|
41
|
+
executed_commands: ExecutedVerificationCommand[];
|
|
42
|
+
skipped: VerificationCommandException[];
|
|
43
|
+
truncated: VerificationCommandException[];
|
|
44
|
+
execution_boundary: {
|
|
45
|
+
command_execution_by_yam: false;
|
|
46
|
+
execution_evidence: 'operator_declared';
|
|
47
|
+
};
|
|
48
|
+
status: 'passed' | 'failed';
|
|
49
|
+
blockers: string[];
|
|
50
|
+
truth_status: 'partial' | 'blocked';
|
|
51
|
+
digest: string;
|
|
52
|
+
}
|
|
53
|
+
export declare function createVerificationClosureReceipt(input: {
|
|
54
|
+
root: string;
|
|
55
|
+
receipt_path: string;
|
|
56
|
+
planned_scope: VerificationScope;
|
|
57
|
+
changed_files: string[];
|
|
58
|
+
selected_commands: SelectedVerificationCommand[];
|
|
59
|
+
executed_commands: ExecutedVerificationCommand[];
|
|
60
|
+
skipped: VerificationCommandException[];
|
|
61
|
+
truncated: VerificationCommandException[];
|
|
62
|
+
}): Promise<{
|
|
63
|
+
schema: "yam.verification-closure-write.v1";
|
|
64
|
+
receipt_path: string;
|
|
65
|
+
receipt: VerificationClosureReceipt;
|
|
66
|
+
truth_status: "blocked" | "partial";
|
|
67
|
+
next_action: string;
|
|
68
|
+
}>;
|
|
69
|
+
export declare function verifyVerificationClosureReceipt(value: unknown): {
|
|
70
|
+
schema: "yam.verification-closure-verification.v1";
|
|
71
|
+
valid: boolean;
|
|
72
|
+
errors: string[];
|
|
73
|
+
receipt_truth_status: unknown;
|
|
74
|
+
truth_status: "verified" | "blocked";
|
|
75
|
+
next_action: string;
|
|
76
|
+
};
|
|
77
|
+
export declare function verifyVerificationClosureReceiptFile(input: {
|
|
78
|
+
root: string;
|
|
79
|
+
receipt_path: string;
|
|
80
|
+
}): Promise<{
|
|
81
|
+
receipt_path: string;
|
|
82
|
+
current_scope: {
|
|
83
|
+
command: "git status --porcelain=v1 -z --untracked-files=all";
|
|
84
|
+
availability: "observed" | "unavailable";
|
|
85
|
+
changed_files: string[];
|
|
86
|
+
unplanned_files: string[];
|
|
87
|
+
declared_not_observed: string[];
|
|
88
|
+
reason: string;
|
|
89
|
+
};
|
|
90
|
+
valid: boolean;
|
|
91
|
+
errors: string[];
|
|
92
|
+
truth_status: "verified" | "blocked";
|
|
93
|
+
next_action: string;
|
|
94
|
+
schema: "yam.verification-closure-verification.v1";
|
|
95
|
+
receipt_truth_status: unknown;
|
|
96
|
+
}>;
|
|
97
|
+
export declare function isReleaseSensitivePath(file: string): boolean;
|