yam-flow 2.3.2 → 2.5.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 +6 -4
- package/CHANGELOG.md +50 -0
- package/COMMANDS.md +16 -1
- package/README.md +65 -4
- package/ROADMAP.md +3 -2
- package/dist/bin/yam.js +691 -57
- package/dist/lib/external-updates.d.ts +103 -0
- package/dist/lib/external-updates.js +989 -0
- package/dist/lib/skill-installation.d.ts +18 -1
- package/dist/lib/skill-installation.js +433 -38
- package/package.json +5 -3
- package/src/bin/yam.ts +713 -55
- package/src/lib/external-updates.ts +1150 -0
- package/src/lib/skill-installation.ts +559 -38
- package/yam.manifest.json +2 -2
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
export declare const EXTERNAL_UPDATE_COMPONENTS: readonly ["yam", "scrapling", "insane-search"];
|
|
2
|
+
export type ExternalUpdateComponent = typeof EXTERNAL_UPDATE_COMPONENTS[number];
|
|
3
|
+
type JsonRecord = Record<string, any>;
|
|
4
|
+
export interface ExternalCommandResult {
|
|
5
|
+
ok: boolean;
|
|
6
|
+
status: number | null;
|
|
7
|
+
stdout: string;
|
|
8
|
+
stderr: string;
|
|
9
|
+
}
|
|
10
|
+
export interface ExternalCommandOptions {
|
|
11
|
+
cwd?: string;
|
|
12
|
+
env?: NodeJS.ProcessEnv;
|
|
13
|
+
timeout?: number;
|
|
14
|
+
}
|
|
15
|
+
export interface ExternalUpdatePaths {
|
|
16
|
+
stateDir: string;
|
|
17
|
+
receiptDir: string;
|
|
18
|
+
lockFile: string;
|
|
19
|
+
scraplingRoot: string;
|
|
20
|
+
scraplingBin: string;
|
|
21
|
+
}
|
|
22
|
+
export interface ExternalUpdateDependencies {
|
|
23
|
+
run?: (command: string, args: string[], options?: ExternalCommandOptions) => Promise<ExternalCommandResult> | ExternalCommandResult;
|
|
24
|
+
fetchJson?: (url: string) => Promise<any>;
|
|
25
|
+
now?: () => Date;
|
|
26
|
+
homeDir?: string;
|
|
27
|
+
env?: NodeJS.ProcessEnv;
|
|
28
|
+
paths?: Partial<ExternalUpdatePaths>;
|
|
29
|
+
removeCandidate?: (candidate: string, root: string) => Promise<void>;
|
|
30
|
+
}
|
|
31
|
+
export interface ExternalComponentCheck {
|
|
32
|
+
component: ExternalUpdateComponent;
|
|
33
|
+
installed_version: string;
|
|
34
|
+
latest_version: string;
|
|
35
|
+
update_available: boolean;
|
|
36
|
+
status: 'up_to_date' | 'update_available' | 'not_installed' | 'check_failed';
|
|
37
|
+
source: string;
|
|
38
|
+
source_revision?: {
|
|
39
|
+
local: string;
|
|
40
|
+
remote: string;
|
|
41
|
+
drift: boolean;
|
|
42
|
+
note: string;
|
|
43
|
+
};
|
|
44
|
+
executable?: string;
|
|
45
|
+
error?: string;
|
|
46
|
+
}
|
|
47
|
+
export interface ExternalComponentReceipt {
|
|
48
|
+
schema: 'yam.external-update-receipt.v1';
|
|
49
|
+
generated_at: string;
|
|
50
|
+
component: ExternalUpdateComponent;
|
|
51
|
+
outcome: 'up_to_date' | 'updated' | 'failed' | 'manual_plugin_update_required';
|
|
52
|
+
previous_version: string;
|
|
53
|
+
requested_version: string;
|
|
54
|
+
installed_version: string;
|
|
55
|
+
source: string;
|
|
56
|
+
source_revision: JsonRecord | null;
|
|
57
|
+
checks: Array<{
|
|
58
|
+
id: string;
|
|
59
|
+
status: 'passed' | 'failed' | 'skipped';
|
|
60
|
+
note: string;
|
|
61
|
+
}>;
|
|
62
|
+
rollback_hint: {
|
|
63
|
+
automatic: boolean;
|
|
64
|
+
previous_target: string;
|
|
65
|
+
guidance: string;
|
|
66
|
+
};
|
|
67
|
+
side_effects: string[];
|
|
68
|
+
error: string;
|
|
69
|
+
truth_status: 'verified' | 'partial' | 'blocked';
|
|
70
|
+
persistence?: 'written' | 'failed';
|
|
71
|
+
receipt_path?: string;
|
|
72
|
+
receipt_error?: string;
|
|
73
|
+
}
|
|
74
|
+
export declare function checkExternalUpdates(currentYamVersion: string, dependencies?: ExternalUpdateDependencies): Promise<{
|
|
75
|
+
schema: string;
|
|
76
|
+
generated_at: string;
|
|
77
|
+
mutation_authorized: boolean;
|
|
78
|
+
components: [ExternalComponentCheck, ExternalComponentCheck, ExternalComponentCheck];
|
|
79
|
+
update_available: boolean;
|
|
80
|
+
success: boolean;
|
|
81
|
+
truth_status: string;
|
|
82
|
+
next_action: string;
|
|
83
|
+
}>;
|
|
84
|
+
export declare function applyExternalUpdates(currentYamVersion: string, selection: {
|
|
85
|
+
component?: ExternalUpdateComponent;
|
|
86
|
+
all?: boolean;
|
|
87
|
+
}, dependencies?: ExternalUpdateDependencies): Promise<{
|
|
88
|
+
schema: string;
|
|
89
|
+
generated_at: string;
|
|
90
|
+
mutation_authorized: boolean;
|
|
91
|
+
requested_components: ("yam" | "scrapling" | "insane-search")[];
|
|
92
|
+
applied_components: ("yam" | "scrapling" | "insane-search")[];
|
|
93
|
+
receipts: ExternalComponentReceipt[];
|
|
94
|
+
stopped_early: boolean;
|
|
95
|
+
lock: {
|
|
96
|
+
path: string;
|
|
97
|
+
released: boolean;
|
|
98
|
+
};
|
|
99
|
+
success: boolean;
|
|
100
|
+
truth_status: string;
|
|
101
|
+
next_action: string;
|
|
102
|
+
}>;
|
|
103
|
+
export {};
|