@osovv/vv-opencode 0.14.0 → 0.17.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/README.md +110 -10
- package/dist/cli.js +5 -3
- package/dist/cli.js.map +1 -1
- package/dist/commands/agent.js +37 -72
- package/dist/commands/agent.js.map +1 -1
- package/dist/commands/completion.js +32 -16
- package/dist/commands/completion.js.map +1 -1
- package/dist/commands/preset.d.ts +45 -0
- package/dist/commands/preset.js +214 -0
- package/dist/commands/preset.js.map +1 -0
- package/dist/commands/upgrade.d.ts +21 -1
- package/dist/commands/upgrade.js +205 -51
- package/dist/commands/upgrade.js.map +1 -1
- package/dist/lib/agent-models.d.ts +21 -0
- package/dist/lib/agent-models.js +106 -0
- package/dist/lib/agent-models.js.map +1 -0
- package/dist/lib/opencode.d.ts +6 -0
- package/dist/lib/opencode.js +73 -23
- package/dist/lib/opencode.js.map +1 -1
- package/dist/lib/vvoc-config.d.ts +169 -124
- package/dist/lib/vvoc-config.js +303 -101
- package/dist/lib/vvoc-config.js.map +1 -1
- package/package.json +1 -1
- package/schemas/vvoc/v1.json +1 -1
- package/schemas/vvoc/v2.json +124 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"completion.js","sourceRoot":"","sources":["../../src/commands/completion.ts"],"names":[],"mappings":"AAAA,mCAAmC;AACnC,iBAAiB;AACjB,wBAAwB;AACxB,0EAA0E;AAC1E,
|
|
1
|
+
{"version":3,"file":"completion.js","sourceRoot":"","sources":["../../src/commands/completion.ts"],"names":[],"mappings":"AAAA,mCAAmC;AACnC,iBAAiB;AACjB,wBAAwB;AACxB,0EAA0E;AAC1E,8MAA8M;AAC9M,2DAA2D;AAC3D,8CAA8C;AAC9C,kBAAkB;AAClB,sBAAsB;AACtB,sBAAsB;AACtB,EAAE;AACF,mBAAmB;AACnB,8DAA8D;AAC9D,kEAAkE;AAClE,sDAAsD;AACtD,oDAAoD;AACpD,sDAAsD;AACtD,iB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AAG,CAAC,EAChD,KAAK,EACL,EAAE,EACF,6BAA6B,EAC7B,SAAS,GAAG,CAAC,GAAG,oBAAoB,EAAE,GAAG,iBAAiB,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,EACrE,KAAK,EACL,EAAE,EACF,8BAA8B,EAC9B,SAAS,GAAG,iBAAiB,CAAC,IAAI,CAAC,GAAG,CAAC,EACvC,KAAK,EACL,EAAE,EACF,4BAA4B,EAC5B,SAAS,GAAG,mBAAmB,CAAC,IAAI,CAAC,GAAG,CAAC,EACzC,KAAK,EACL,EAAE,EACF,mCAAmC,EACnC,SAAS,GAAG,kBAAkB,CAAC,IAAI,CAAC,GAAG,CAAC,EACxC,KAAK,EACL,EAAE,EACF,6BAA6B,EAC7B,SAAS,GAAG,oBAAoB,CAAC,IAAI,CAAC,GAAG,CAAC,EAC1C,KAAK,EACL,EAAE,EACF,4CAA4C,EAC5C,yIAAyI,EACzI,uIAAuI,EACvI,uFAAuF,EACvF,qGAAqG,EACrG,iJAAiJ,EACjJ,8HAA8H,EAC9H,uFAAuF,CACxF,CAAC;IAEF,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC;AACjC,CAAC"}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { type SupportedModelTargetName } from "../lib/agent-models.js";
|
|
2
|
+
import { type Scope, type WriteResult } from "../lib/opencode.js";
|
|
3
|
+
import { type VvocPreset, type VvocPresets } from "../lib/vvoc-config.js";
|
|
4
|
+
type ListedPreset = {
|
|
5
|
+
name: string;
|
|
6
|
+
preset: VvocPreset;
|
|
7
|
+
};
|
|
8
|
+
type AppliedPresetChange = {
|
|
9
|
+
targetName: SupportedModelTargetName;
|
|
10
|
+
model: string;
|
|
11
|
+
result: WriteResult;
|
|
12
|
+
};
|
|
13
|
+
declare const _default: import("citty").CommandDef<{
|
|
14
|
+
readonly preset: {
|
|
15
|
+
type: "positional";
|
|
16
|
+
required: boolean;
|
|
17
|
+
description: string;
|
|
18
|
+
};
|
|
19
|
+
readonly scope: {
|
|
20
|
+
type: "enum";
|
|
21
|
+
options: string[];
|
|
22
|
+
default: string;
|
|
23
|
+
description: string;
|
|
24
|
+
};
|
|
25
|
+
readonly "config-dir": {
|
|
26
|
+
type: "string";
|
|
27
|
+
description: string;
|
|
28
|
+
};
|
|
29
|
+
}>;
|
|
30
|
+
export default _default;
|
|
31
|
+
export declare function listConfiguredPresets(presets: VvocPresets): ListedPreset[];
|
|
32
|
+
export declare function resolvePreset(name: string, presets: VvocPresets): {
|
|
33
|
+
name: string;
|
|
34
|
+
preset: VvocPreset;
|
|
35
|
+
};
|
|
36
|
+
export declare function formatPreset(_name: string, preset: VvocPreset): string;
|
|
37
|
+
export declare function applyPreset(presetName: string, options?: {
|
|
38
|
+
cwd?: string;
|
|
39
|
+
configDir?: string;
|
|
40
|
+
scope?: Scope;
|
|
41
|
+
}): Promise<{
|
|
42
|
+
name: string;
|
|
43
|
+
preset: VvocPreset;
|
|
44
|
+
changes: AppliedPresetChange[];
|
|
45
|
+
}>;
|
|
@@ -0,0 +1,214 @@
|
|
|
1
|
+
// FILE: src/commands/preset.ts
|
|
2
|
+
// VERSION: 0.2.0
|
|
3
|
+
// START_MODULE_CONTRACT
|
|
4
|
+
// PURPOSE: List, show, and apply declarative named model-target presets from canonical vvoc.json.
|
|
5
|
+
// SCOPE: Canonical preset lookup, preset rendering, scope-aware preset application, and per-target summary output through existing vvoc and OpenCode write paths.
|
|
6
|
+
// DEPENDS: [citty, src/lib/agent-models.ts, src/lib/managed-agents.ts, src/lib/opencode.ts, src/lib/vvoc-config.ts]
|
|
7
|
+
// LINKS: [M-CLI-PRESET, M-CLI-CONFIG, M-CLI-COMMANDS]
|
|
8
|
+
// ROLE: RUNTIME
|
|
9
|
+
// MAP_MODE: EXPORTS
|
|
10
|
+
// END_MODULE_CONTRACT
|
|
11
|
+
//
|
|
12
|
+
// START_MODULE_MAP
|
|
13
|
+
// default - Preset command group for vvoc.
|
|
14
|
+
// listConfiguredPresets - Returns configured presets in deterministic name order.
|
|
15
|
+
// resolvePreset - Validates a preset name and returns the matching preset.
|
|
16
|
+
// formatPreset - Renders a preset object as JSON for CLI output.
|
|
17
|
+
// applyPreset - Applies a preset through the existing vvoc/OpenCode write helpers.
|
|
18
|
+
// END_MODULE_MAP
|
|
19
|
+
//
|
|
20
|
+
// START_CHANGE_SUMMARY
|
|
21
|
+
// LAST_CHANGE: [v0.2.0 - Added OpenCode default and small-model target support to declarative presets.]
|
|
22
|
+
// END_CHANGE_SUMMARY
|
|
23
|
+
import { defineCommand } from "citty";
|
|
24
|
+
import { formatAgentModel, isConfigurableOpenCodeSubagentName, isOpenCodeDefaultModelTargetName, isSpecialAgentName, normalizeModelTargetOverride, parseGuardianStyleModelArg, } from "../lib/agent-models.js";
|
|
25
|
+
import { isManagedOpenCodeAgentName } from "../lib/managed-agents.js";
|
|
26
|
+
import { describeWriteResult, installManagedAgentPrompts, readVvocConfig, resolvePaths, writeGuardianConfig, writeOpenCodeDefaultModel, writeManagedAgentModel, writeMemoryConfig, writeOpenCodeAgentModel, } from "../lib/opencode.js";
|
|
27
|
+
const presetArg = {
|
|
28
|
+
type: "positional",
|
|
29
|
+
required: true,
|
|
30
|
+
description: "Preset name.",
|
|
31
|
+
};
|
|
32
|
+
const scopeArg = {
|
|
33
|
+
type: "enum",
|
|
34
|
+
options: ["global", "project"],
|
|
35
|
+
default: "global",
|
|
36
|
+
description: "Write global or project OpenCode config.",
|
|
37
|
+
};
|
|
38
|
+
const configDirArg = {
|
|
39
|
+
type: "string",
|
|
40
|
+
description: "Override the global config home.",
|
|
41
|
+
};
|
|
42
|
+
const presetList = defineCommand({
|
|
43
|
+
meta: {
|
|
44
|
+
name: "list",
|
|
45
|
+
description: "List configured presets.",
|
|
46
|
+
},
|
|
47
|
+
args: {
|
|
48
|
+
"config-dir": configDirArg,
|
|
49
|
+
},
|
|
50
|
+
async run({ args }) {
|
|
51
|
+
const presets = await listPresets({
|
|
52
|
+
cwd: process.cwd(),
|
|
53
|
+
configDir: typeof args["config-dir"] === "string" ? args["config-dir"] : undefined,
|
|
54
|
+
});
|
|
55
|
+
if (presets.length === 0) {
|
|
56
|
+
console.log("No presets configured.");
|
|
57
|
+
return;
|
|
58
|
+
}
|
|
59
|
+
console.log("Available presets:");
|
|
60
|
+
for (const { name, preset } of presets) {
|
|
61
|
+
const description = preset.description ? ` - ${preset.description}` : "";
|
|
62
|
+
const targetCount = Object.keys(preset.agents).length;
|
|
63
|
+
console.log(` ${name}${description} (${targetCount} target${targetCount === 1 ? "" : "s"})`);
|
|
64
|
+
}
|
|
65
|
+
},
|
|
66
|
+
});
|
|
67
|
+
const presetShow = defineCommand({
|
|
68
|
+
meta: {
|
|
69
|
+
name: "show",
|
|
70
|
+
description: "Show a configured preset.",
|
|
71
|
+
},
|
|
72
|
+
args: {
|
|
73
|
+
preset: presetArg,
|
|
74
|
+
"config-dir": configDirArg,
|
|
75
|
+
},
|
|
76
|
+
async run({ args }) {
|
|
77
|
+
const configDir = typeof args["config-dir"] === "string" ? args["config-dir"] : undefined;
|
|
78
|
+
const presets = await readConfiguredPresets({ cwd: process.cwd(), configDir });
|
|
79
|
+
const resolved = resolvePreset(typeof args.preset === "string" ? args.preset : "", presets);
|
|
80
|
+
process.stdout.write(formatPreset(resolved.name, resolved.preset));
|
|
81
|
+
},
|
|
82
|
+
});
|
|
83
|
+
export default defineCommand({
|
|
84
|
+
meta: {
|
|
85
|
+
name: "preset",
|
|
86
|
+
description: "List, show, or apply named agent presets from vvoc.json.",
|
|
87
|
+
},
|
|
88
|
+
args: {
|
|
89
|
+
preset: presetArg,
|
|
90
|
+
scope: scopeArg,
|
|
91
|
+
"config-dir": configDirArg,
|
|
92
|
+
},
|
|
93
|
+
subCommands: {
|
|
94
|
+
list: presetList,
|
|
95
|
+
show: presetShow,
|
|
96
|
+
},
|
|
97
|
+
async run({ args }) {
|
|
98
|
+
const configDir = typeof args["config-dir"] === "string" ? args["config-dir"] : undefined;
|
|
99
|
+
const scope = resolveScope(args.scope);
|
|
100
|
+
const applied = await applyPreset(typeof args.preset === "string" ? args.preset : "", {
|
|
101
|
+
cwd: process.cwd(),
|
|
102
|
+
configDir,
|
|
103
|
+
scope,
|
|
104
|
+
});
|
|
105
|
+
console.log(`Applied preset ${applied.name} (${scope}):`);
|
|
106
|
+
for (const change of applied.changes) {
|
|
107
|
+
console.log(` ${change.targetName}: ${describeWriteResult(change.result)} (${change.model})`);
|
|
108
|
+
}
|
|
109
|
+
},
|
|
110
|
+
});
|
|
111
|
+
export function listConfiguredPresets(presets) {
|
|
112
|
+
return Object.entries(presets)
|
|
113
|
+
.sort(([left], [right]) => left.localeCompare(right))
|
|
114
|
+
.map(([name, preset]) => ({ name, preset }));
|
|
115
|
+
}
|
|
116
|
+
export function resolvePreset(name, presets) {
|
|
117
|
+
const presetName = name.trim();
|
|
118
|
+
if (!presetName) {
|
|
119
|
+
throw new Error("preset name required");
|
|
120
|
+
}
|
|
121
|
+
const preset = presets[presetName];
|
|
122
|
+
if (preset) {
|
|
123
|
+
return { name: presetName, preset };
|
|
124
|
+
}
|
|
125
|
+
const available = listConfiguredPresets(presets)
|
|
126
|
+
.map((entry) => entry.name)
|
|
127
|
+
.join(", ");
|
|
128
|
+
throw new Error(`unknown preset: ${presetName}. Available presets: ${available || "<none>"}`);
|
|
129
|
+
}
|
|
130
|
+
export function formatPreset(_name, preset) {
|
|
131
|
+
return `${JSON.stringify(preset, null, 2)}\n`;
|
|
132
|
+
}
|
|
133
|
+
export async function applyPreset(presetName, options = {}) {
|
|
134
|
+
const paths = await resolvePaths({
|
|
135
|
+
scope: options.scope ?? "global",
|
|
136
|
+
cwd: options.cwd ?? process.cwd(),
|
|
137
|
+
configDir: options.configDir,
|
|
138
|
+
});
|
|
139
|
+
const presets = await readConfiguredPresets({
|
|
140
|
+
cwd: options.cwd ?? process.cwd(),
|
|
141
|
+
configDir: options.configDir,
|
|
142
|
+
});
|
|
143
|
+
const resolved = resolvePreset(presetName, presets);
|
|
144
|
+
const entries = Object.entries(resolved.preset.agents);
|
|
145
|
+
if (entries.some(([targetName]) => isManagedOpenCodeAgentName(targetName))) {
|
|
146
|
+
await installManagedAgentPrompts(paths, { force: false });
|
|
147
|
+
}
|
|
148
|
+
const changes = [];
|
|
149
|
+
for (const [targetName, configuredValue] of entries) {
|
|
150
|
+
const normalizedValue = normalizeModelTargetOverride(targetName, configuredValue, `preset ${resolved.name} ${targetName}`);
|
|
151
|
+
if (targetName === "guardian") {
|
|
152
|
+
const { model, variant } = parseGuardianStyleModelArg(normalizedValue, `preset ${resolved.name}`);
|
|
153
|
+
const result = await writeGuardianConfig(paths, { model, variant }, { merge: true });
|
|
154
|
+
changes.push({ targetName, model: formatAgentModel(model, variant), result });
|
|
155
|
+
continue;
|
|
156
|
+
}
|
|
157
|
+
if (targetName === "memory-reviewer") {
|
|
158
|
+
const { model, variant } = parseGuardianStyleModelArg(normalizedValue, `preset ${resolved.name}`);
|
|
159
|
+
const result = await writeMemoryConfig(paths, { reviewerModel: model, reviewerVariant: variant }, { merge: true });
|
|
160
|
+
changes.push({ targetName, model: formatAgentModel(model, variant), result });
|
|
161
|
+
continue;
|
|
162
|
+
}
|
|
163
|
+
if (isOpenCodeDefaultModelTargetName(targetName)) {
|
|
164
|
+
const result = await writeOpenCodeDefaultModel(paths, resolveDefaultModelKey(targetName), {
|
|
165
|
+
model: normalizedValue,
|
|
166
|
+
ensureEntry: true,
|
|
167
|
+
});
|
|
168
|
+
changes.push({ targetName, model: normalizedValue, result });
|
|
169
|
+
continue;
|
|
170
|
+
}
|
|
171
|
+
if (isConfigurableOpenCodeSubagentName(targetName)) {
|
|
172
|
+
const result = await writeOpenCodeAgentModel(paths, targetName, {
|
|
173
|
+
model: normalizedValue,
|
|
174
|
+
ensureEntry: true,
|
|
175
|
+
});
|
|
176
|
+
changes.push({ targetName, model: normalizedValue, result });
|
|
177
|
+
continue;
|
|
178
|
+
}
|
|
179
|
+
if (isManagedOpenCodeAgentName(targetName)) {
|
|
180
|
+
const result = await writeManagedAgentModel(paths, targetName, {
|
|
181
|
+
model: normalizedValue,
|
|
182
|
+
ensureEntry: true,
|
|
183
|
+
});
|
|
184
|
+
changes.push({ targetName, model: normalizedValue, result });
|
|
185
|
+
continue;
|
|
186
|
+
}
|
|
187
|
+
if (isSpecialAgentName(targetName)) {
|
|
188
|
+
throw new Error(`unsupported preset target: ${targetName}`);
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
return { name: resolved.name, preset: resolved.preset, changes };
|
|
192
|
+
}
|
|
193
|
+
async function listPresets(options = {}) {
|
|
194
|
+
return listConfiguredPresets(await readConfiguredPresets(options));
|
|
195
|
+
}
|
|
196
|
+
async function readConfiguredPresets(options = {}) {
|
|
197
|
+
const paths = await resolvePaths({
|
|
198
|
+
scope: "global",
|
|
199
|
+
cwd: options.cwd ?? process.cwd(),
|
|
200
|
+
configDir: options.configDir,
|
|
201
|
+
});
|
|
202
|
+
const config = await readVvocConfig(paths);
|
|
203
|
+
if (!config) {
|
|
204
|
+
throw new Error(`vvoc config is missing at ${paths.vvocConfigPath}. Run \`vvoc install\` or \`vvoc sync\`.`);
|
|
205
|
+
}
|
|
206
|
+
return config.presets;
|
|
207
|
+
}
|
|
208
|
+
function resolveScope(value) {
|
|
209
|
+
return value === "project" ? "project" : "global";
|
|
210
|
+
}
|
|
211
|
+
function resolveDefaultModelKey(targetName) {
|
|
212
|
+
return targetName === "default" ? "model" : "small_model";
|
|
213
|
+
}
|
|
214
|
+
//# sourceMappingURL=preset.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"preset.js","sourceRoot":"","sources":["../../src/commands/preset.ts"],"names":[],"mappings":"AAAA,+BAA+B;AAC/B,iBAAiB;AACjB,wBAAwB;AACxB,oGAAoG;AACpG,oKAAoK;AACpK,sHAAsH;AACtH,wDAAwD;AACxD,kBAAkB;AAClB,sBAAsB;AACtB,sBAAsB;AACtB,EAAE;AACF,mBAAmB;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I,KAAK,CACb,6BAA6B,KAAK,CAAC,cAAc,0CAA0C,CAC5F,CAAC;IACJ,CAAC;IAED,OAAO,MAAM,CAAC,OAAO,CAAC;AACxB,CAAC;AAED,SAAS,YAAY,CAAC,KAAc;IAClC,OAAO,KAAK,KAAK,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,QAAQ,CAAC;AACpD,CAAC;AAED,SAAS,sBAAsB,CAC7B,UAA0C;IAE1C,OAAO,UAAU,KAAK,SAAS,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,aAAa,CAAC;AAC5D,CAAC"}
|
|
@@ -1,5 +1,25 @@
|
|
|
1
|
+
type UpgradeCommand = readonly [string, ...string[]];
|
|
2
|
+
export type UpgradeFlowResult = {
|
|
3
|
+
exitCode: number;
|
|
4
|
+
status: "already-latest" | "registry-failed" | "install-failed" | "sync-warning" | "upgraded";
|
|
5
|
+
};
|
|
6
|
+
export type UpgradeSubprocessResult = {
|
|
7
|
+
exitCode: number;
|
|
8
|
+
stdout: string;
|
|
9
|
+
stderr: string;
|
|
10
|
+
};
|
|
11
|
+
type UpgradeLogger = Pick<Console, "error" | "log" | "warn">;
|
|
12
|
+
type UpgradeDependencies = {
|
|
13
|
+
fetchChangelog: (fromVersion: string, toVersion: string) => Promise<string | null>;
|
|
14
|
+
fetchLatestVersion: () => Promise<string | null>;
|
|
15
|
+
getCurrentVersion: () => Promise<string>;
|
|
16
|
+
logger: UpgradeLogger;
|
|
17
|
+
runSubprocess: (command: UpgradeCommand) => Promise<UpgradeSubprocessResult>;
|
|
18
|
+
};
|
|
1
19
|
declare const _default: import("citty").CommandDef<import("citty").ArgsDef>;
|
|
2
20
|
export default _default;
|
|
21
|
+
export declare function runUpgradeFlow(overrides?: Partial<UpgradeDependencies>): Promise<UpgradeFlowResult>;
|
|
22
|
+
export declare function buildInstallCommand(latestVersion: string): UpgradeCommand;
|
|
23
|
+
export declare function buildPostInstallSyncCommand(): UpgradeCommand;
|
|
3
24
|
export declare function fetchLatestVersion(): Promise<string | null>;
|
|
4
25
|
export declare function fetchChangelog(_fromVersion: string, _toVersion: string): Promise<string | null>;
|
|
5
|
-
export declare function printUpgradeStatus(currentVersion: string, latestVersion: string): void;
|
package/dist/commands/upgrade.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
// FILE: src/commands/upgrade.ts
|
|
2
|
-
// VERSION: 0.
|
|
2
|
+
// VERSION: 0.5.0
|
|
3
3
|
// START_MODULE_CONTRACT
|
|
4
|
-
// PURPOSE:
|
|
5
|
-
// SCOPE: npm registry query, version comparison, changelog fetching, and
|
|
6
|
-
// DEPENDS: [citty]
|
|
4
|
+
// PURPOSE: Upgrade the global vvoc package by checking npm, installing the latest release with Bun, and triggering a fresh sync subprocess.
|
|
5
|
+
// SCOPE: npm registry query, version comparison, best-effort changelog fetching, global Bun install, and post-install sync execution.
|
|
6
|
+
// DEPENDS: [citty, src/lib/package.ts, Bun]
|
|
7
7
|
// LINKS: [M-CLI-UPGRADE]
|
|
8
8
|
// ROLE: RUNTIME
|
|
9
9
|
// MAP_MODE: EXPORTS
|
|
@@ -11,64 +11,117 @@
|
|
|
11
11
|
//
|
|
12
12
|
// START_MODULE_MAP
|
|
13
13
|
// default - Upgrade command definition for vvoc.
|
|
14
|
+
// runUpgradeFlow - Execute the full global upgrade and post-install sync flow.
|
|
15
|
+
// buildInstallCommand - Build the Bun global install command for a specific version.
|
|
16
|
+
// buildPostInstallSyncCommand - Build the fresh subprocess command for the default global sync flow.
|
|
14
17
|
// fetchLatestVersion - Query npm registry for latest version.
|
|
15
18
|
// fetchChangelog - Fetch changelog from npm registry.
|
|
16
|
-
// printUpgradeStatus - Print up-to-date or upgrade available message.
|
|
17
19
|
// END_MODULE_MAP
|
|
18
20
|
//
|
|
19
21
|
// START_CHANGE_SUMMARY
|
|
20
|
-
// LAST_CHANGE: [v0.
|
|
22
|
+
// LAST_CHANGE: [v0.5.0 - Redesigned upgrade into a global-only Bun install flow that runs post-install sync in a fresh subprocess.]
|
|
21
23
|
// END_CHANGE_SUMMARY
|
|
22
24
|
import { defineCommand } from "citty";
|
|
23
|
-
import { getPackageVersion } from "../lib/package.js";
|
|
24
|
-
const PACKAGE_NAME = "@osovv/vv-opencode";
|
|
25
|
+
import { getPackageVersion, PACKAGE_NAME } from "../lib/package.js";
|
|
25
26
|
const NPM_REGISTRY = "https://registry.npmjs.org";
|
|
26
27
|
export default defineCommand({
|
|
27
28
|
meta: {
|
|
28
29
|
name: "upgrade",
|
|
29
|
-
description: "
|
|
30
|
+
description: "Upgrade the global vvoc package and sync config.",
|
|
30
31
|
},
|
|
31
32
|
async run() {
|
|
32
33
|
// START_BLOCK_RUN_UPGRADE
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
if (!latestVersion) {
|
|
37
|
-
console.error("NETWORK_ERROR: Could not reach npm registry");
|
|
38
|
-
process.exitCode = 1;
|
|
39
|
-
return;
|
|
40
|
-
}
|
|
41
|
-
if (latestVersion === currentVersion) {
|
|
42
|
-
console.log(`Already at latest version: ${currentVersion}`);
|
|
43
|
-
return;
|
|
44
|
-
}
|
|
45
|
-
console.log(`Current version: ${currentVersion}`);
|
|
46
|
-
console.log(`Latest version: ${latestVersion}`);
|
|
47
|
-
console.log("Upgrade available!");
|
|
48
|
-
const changelog = await fetchChangelog(currentVersion, latestVersion);
|
|
49
|
-
if (changelog) {
|
|
50
|
-
console.log("\n--- Changelog ---");
|
|
51
|
-
console.log(changelog);
|
|
52
|
-
}
|
|
53
|
-
console.log("\nTo upgrade, run:");
|
|
54
|
-
console.log(` npm install -g ${PACKAGE_NAME}@${latestVersion}`);
|
|
55
|
-
}
|
|
56
|
-
catch (err) {
|
|
57
|
-
if (err instanceof Error && err.message === "NETWORK_ERROR") {
|
|
58
|
-
console.error("NETWORK_ERROR: Could not reach npm registry");
|
|
59
|
-
process.exitCode = 1;
|
|
60
|
-
}
|
|
61
|
-
else if (err instanceof Error && err.message === "ALREADY_LATEST") {
|
|
62
|
-
console.log("Already at latest version");
|
|
63
|
-
}
|
|
64
|
-
else {
|
|
65
|
-
console.error("Upgrade check failed:", err instanceof Error ? err.message : String(err));
|
|
66
|
-
process.exitCode = 1;
|
|
67
|
-
}
|
|
34
|
+
const result = await runUpgradeFlow();
|
|
35
|
+
if (result.exitCode !== 0) {
|
|
36
|
+
process.exitCode = result.exitCode;
|
|
68
37
|
}
|
|
69
38
|
// END_BLOCK_RUN_UPGRADE
|
|
70
39
|
},
|
|
71
40
|
});
|
|
41
|
+
export async function runUpgradeFlow(overrides = {}) {
|
|
42
|
+
const logger = overrides.logger ?? console;
|
|
43
|
+
const fetchLatest = overrides.fetchLatestVersion ?? fetchLatestVersion;
|
|
44
|
+
const fetchReleaseNotes = overrides.fetchChangelog ?? fetchChangelog;
|
|
45
|
+
const getCurrentVersion = overrides.getCurrentVersion ?? getPackageVersion;
|
|
46
|
+
const runSubprocess = overrides.runSubprocess ?? runSubprocessCommand;
|
|
47
|
+
try {
|
|
48
|
+
const [currentVersion, latestVersion] = await Promise.all([getCurrentVersion(), fetchLatest()]);
|
|
49
|
+
if (!latestVersion) {
|
|
50
|
+
logger.error("NETWORK_ERROR: Could not reach npm registry");
|
|
51
|
+
return { exitCode: 1, status: "registry-failed" };
|
|
52
|
+
}
|
|
53
|
+
if (compareVersions(currentVersion, latestVersion) >= 0) {
|
|
54
|
+
logger.log(`Already at latest version: ${currentVersion}`);
|
|
55
|
+
return { exitCode: 0, status: "already-latest" };
|
|
56
|
+
}
|
|
57
|
+
logger.log(`Current version: ${currentVersion}`);
|
|
58
|
+
logger.log(`Latest version: ${latestVersion}`);
|
|
59
|
+
logger.log("Upgrade available!");
|
|
60
|
+
const changelog = await getBestEffortChangelog({
|
|
61
|
+
currentVersion,
|
|
62
|
+
latestVersion,
|
|
63
|
+
fetchChangelog: fetchReleaseNotes,
|
|
64
|
+
});
|
|
65
|
+
if (changelog) {
|
|
66
|
+
logger.log("\n--- Changelog ---");
|
|
67
|
+
logger.log(changelog);
|
|
68
|
+
}
|
|
69
|
+
const installCommand = buildInstallCommand(latestVersion);
|
|
70
|
+
logger.log("\nInstalling global package:");
|
|
71
|
+
logger.log(` ${formatCommand(installCommand)}`);
|
|
72
|
+
let installResult;
|
|
73
|
+
try {
|
|
74
|
+
installResult = await runSubprocess(installCommand);
|
|
75
|
+
}
|
|
76
|
+
catch (error) {
|
|
77
|
+
logger.error(`Upgrade install failed: ${formatError(error)}`);
|
|
78
|
+
return { exitCode: 1, status: "install-failed" };
|
|
79
|
+
}
|
|
80
|
+
if (installResult.exitCode !== 0) {
|
|
81
|
+
logProcessOutput(logger.error, installResult.stdout);
|
|
82
|
+
logProcessOutput(logger.error, installResult.stderr);
|
|
83
|
+
logger.error("Upgrade install failed.");
|
|
84
|
+
return {
|
|
85
|
+
exitCode: installResult.exitCode || 1,
|
|
86
|
+
status: "install-failed",
|
|
87
|
+
};
|
|
88
|
+
}
|
|
89
|
+
logProcessOutput(logger.log, installResult.stdout);
|
|
90
|
+
logProcessOutput(logger.warn, installResult.stderr);
|
|
91
|
+
logger.log("Global upgrade installed successfully.");
|
|
92
|
+
const syncCommand = buildPostInstallSyncCommand();
|
|
93
|
+
logger.log("\nRunning post-upgrade sync:");
|
|
94
|
+
logger.log(` ${formatCommand(syncCommand)}`);
|
|
95
|
+
let syncResult;
|
|
96
|
+
try {
|
|
97
|
+
syncResult = await runSubprocess(syncCommand);
|
|
98
|
+
}
|
|
99
|
+
catch (error) {
|
|
100
|
+
warnManualSync(logger, `Could not launch sync: ${formatError(error)}`);
|
|
101
|
+
return { exitCode: 0, status: "sync-warning" };
|
|
102
|
+
}
|
|
103
|
+
if (syncResult.exitCode !== 0) {
|
|
104
|
+
logProcessOutput(logger.warn, syncResult.stdout);
|
|
105
|
+
logProcessOutput(logger.warn, syncResult.stderr);
|
|
106
|
+
warnManualSync(logger, "Post-upgrade sync failed.");
|
|
107
|
+
return { exitCode: 0, status: "sync-warning" };
|
|
108
|
+
}
|
|
109
|
+
logProcessOutput(logger.log, syncResult.stdout);
|
|
110
|
+
logProcessOutput(logger.warn, syncResult.stderr);
|
|
111
|
+
logger.log("Upgrade complete.");
|
|
112
|
+
return { exitCode: 0, status: "upgraded" };
|
|
113
|
+
}
|
|
114
|
+
catch (error) {
|
|
115
|
+
logger.error(`Upgrade check failed: ${formatError(error)}`);
|
|
116
|
+
return { exitCode: 1, status: "registry-failed" };
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
export function buildInstallCommand(latestVersion) {
|
|
120
|
+
return ["bun", "add", "-g", `${PACKAGE_NAME}@${latestVersion}`];
|
|
121
|
+
}
|
|
122
|
+
export function buildPostInstallSyncCommand() {
|
|
123
|
+
return ["vvoc", "sync"];
|
|
124
|
+
}
|
|
72
125
|
export async function fetchLatestVersion() {
|
|
73
126
|
try {
|
|
74
127
|
const url = `${NPM_REGISTRY}/${encodeURIComponent(PACKAGE_NAME)}/latest`;
|
|
@@ -108,15 +161,116 @@ export async function fetchChangelog(_fromVersion, _toVersion) {
|
|
|
108
161
|
return null;
|
|
109
162
|
}
|
|
110
163
|
}
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
164
|
+
// START_BLOCK_RUN_UPGRADE_SUBPROCESS
|
|
165
|
+
async function runSubprocessCommand(command) {
|
|
166
|
+
const proc = Bun.spawn({
|
|
167
|
+
cmd: [...command],
|
|
168
|
+
cwd: process.cwd(),
|
|
169
|
+
env: process.env,
|
|
170
|
+
stdout: "pipe",
|
|
171
|
+
stderr: "pipe",
|
|
172
|
+
});
|
|
173
|
+
const [stdout, stderr, exitCode] = await Promise.all([
|
|
174
|
+
readProcessStream(proc.stdout),
|
|
175
|
+
readProcessStream(proc.stderr),
|
|
176
|
+
proc.exited,
|
|
177
|
+
]);
|
|
178
|
+
return { exitCode, stderr, stdout };
|
|
179
|
+
}
|
|
180
|
+
// END_BLOCK_RUN_UPGRADE_SUBPROCESS
|
|
181
|
+
async function getBestEffortChangelog({ currentVersion, fetchChangelog, latestVersion, }) {
|
|
182
|
+
try {
|
|
183
|
+
const changelog = await fetchChangelog(currentVersion, latestVersion);
|
|
184
|
+
return changelog?.trim() ? changelog : null;
|
|
185
|
+
}
|
|
186
|
+
catch {
|
|
187
|
+
return null;
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
async function readProcessStream(stream) {
|
|
191
|
+
if (!stream) {
|
|
192
|
+
return "";
|
|
193
|
+
}
|
|
194
|
+
return new Response(stream).text();
|
|
195
|
+
}
|
|
196
|
+
function compareVersions(left, right) {
|
|
197
|
+
const leftVersion = parseVersion(left);
|
|
198
|
+
const rightVersion = parseVersion(right);
|
|
199
|
+
if (!leftVersion || !rightVersion) {
|
|
200
|
+
return left.localeCompare(right, undefined, {
|
|
201
|
+
numeric: true,
|
|
202
|
+
sensitivity: "base",
|
|
203
|
+
});
|
|
204
|
+
}
|
|
205
|
+
for (let index = 0; index < 3; index += 1) {
|
|
206
|
+
const difference = leftVersion.release[index] - rightVersion.release[index];
|
|
207
|
+
if (difference !== 0) {
|
|
208
|
+
return difference;
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
if (leftVersion.prerelease.length === 0 && rightVersion.prerelease.length === 0) {
|
|
212
|
+
return 0;
|
|
213
|
+
}
|
|
214
|
+
if (leftVersion.prerelease.length === 0) {
|
|
215
|
+
return 1;
|
|
216
|
+
}
|
|
217
|
+
if (rightVersion.prerelease.length === 0) {
|
|
218
|
+
return -1;
|
|
114
219
|
}
|
|
115
|
-
|
|
116
|
-
|
|
220
|
+
const prereleaseLength = Math.max(leftVersion.prerelease.length, rightVersion.prerelease.length);
|
|
221
|
+
for (let index = 0; index < prereleaseLength; index += 1) {
|
|
222
|
+
const leftIdentifier = leftVersion.prerelease[index];
|
|
223
|
+
const rightIdentifier = rightVersion.prerelease[index];
|
|
224
|
+
if (leftIdentifier === undefined) {
|
|
225
|
+
return -1;
|
|
226
|
+
}
|
|
227
|
+
if (rightIdentifier === undefined) {
|
|
228
|
+
return 1;
|
|
229
|
+
}
|
|
230
|
+
const leftNumeric = /^\d+$/.test(leftIdentifier);
|
|
231
|
+
const rightNumeric = /^\d+$/.test(rightIdentifier);
|
|
232
|
+
if (leftNumeric && rightNumeric) {
|
|
233
|
+
const difference = Number(leftIdentifier) - Number(rightIdentifier);
|
|
234
|
+
if (difference !== 0) {
|
|
235
|
+
return difference;
|
|
236
|
+
}
|
|
237
|
+
continue;
|
|
238
|
+
}
|
|
239
|
+
if (leftNumeric !== rightNumeric) {
|
|
240
|
+
return leftNumeric ? -1 : 1;
|
|
241
|
+
}
|
|
242
|
+
const difference = leftIdentifier.localeCompare(rightIdentifier);
|
|
243
|
+
if (difference !== 0) {
|
|
244
|
+
return difference;
|
|
245
|
+
}
|
|
246
|
+
}
|
|
247
|
+
return 0;
|
|
248
|
+
}
|
|
249
|
+
function parseVersion(value) {
|
|
250
|
+
const match = /^v?(\d+)(?:\.(\d+))?(?:\.(\d+))?(?:-([0-9A-Za-z.-]+))?(?:\+[0-9A-Za-z.-]+)?$/.exec(value.trim());
|
|
251
|
+
if (!match) {
|
|
252
|
+
return null;
|
|
253
|
+
}
|
|
254
|
+
return {
|
|
255
|
+
prerelease: match[4] ? match[4].split(".") : [],
|
|
256
|
+
release: [Number(match[1] ?? 0), Number(match[2] ?? 0), Number(match[3] ?? 0)],
|
|
257
|
+
};
|
|
258
|
+
}
|
|
259
|
+
function formatCommand(command) {
|
|
260
|
+
return command.join(" ");
|
|
261
|
+
}
|
|
262
|
+
function formatError(error) {
|
|
263
|
+
return error instanceof Error ? error.message : String(error);
|
|
264
|
+
}
|
|
265
|
+
function logProcessOutput(write, output) {
|
|
266
|
+
const trimmed = output.trim();
|
|
267
|
+
if (trimmed) {
|
|
268
|
+
write(trimmed);
|
|
117
269
|
}
|
|
118
270
|
}
|
|
119
|
-
|
|
120
|
-
|
|
271
|
+
function warnManualSync(logger, reason) {
|
|
272
|
+
logger.warn(reason);
|
|
273
|
+
logger.warn("Upgrade installed successfully, but post-install sync did not complete.");
|
|
274
|
+
logger.warn("Run `vvoc sync` manually to finish refreshing the global config.");
|
|
121
275
|
}
|
|
122
276
|
//# sourceMappingURL=upgrade.js.map
|