@vercel/dream 0.2.8 → 0.2.9
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/dist/dream.js +12 -1
- package/package.json +1 -1
package/dist/dream.js
CHANGED
|
@@ -125,6 +125,7 @@ Without this signal, the system keeps launching new iterations.`;
|
|
|
125
125
|
var DEFAULT_TIMEOUT = 36e5;
|
|
126
126
|
var DEFAULT_MAX_ITERATIONS = 100;
|
|
127
127
|
var DEFAULT_MODEL = "vercel/anthropic/claude-opus-4.6";
|
|
128
|
+
var DREAM_VERSION = readDreamVersion();
|
|
128
129
|
var DEFAULT_BOOTSTRAP_SKILL_REPOS = [
|
|
129
130
|
{ repo: "vercel-labs/agent-browser", skills: ["agent-browser"] },
|
|
130
131
|
{ repo: "vercel-labs/agent-skills", skills: ["react-best-practices"] }
|
|
@@ -178,7 +179,7 @@ function printSessionDim(message) {
|
|
|
178
179
|
function printSessionError(message) {
|
|
179
180
|
printSession(`${red("\u2717")} ${message}`);
|
|
180
181
|
}
|
|
181
|
-
program.name("dream").description("Run OpenCode in a loop until specs are complete").version(
|
|
182
|
+
program.name("dream").description("Run OpenCode in a loop until specs are complete").version(DREAM_VERSION).option("-d, --dir <directory>", "Working directory", ".");
|
|
182
183
|
program.command("init").description("Initialize a new dream project").action(() => {
|
|
183
184
|
const workDir = path.resolve(program.opts().dir);
|
|
184
185
|
printTitle("init");
|
|
@@ -281,6 +282,7 @@ ${INDENT_MAIN}${red("\u2717")} specs/ not found in ${workDir}
|
|
|
281
282
|
|
|
282
283
|
${projectPrompt.content}` : SYSTEM_PROMPT;
|
|
283
284
|
printTitle(title);
|
|
285
|
+
printKV("version", DREAM_VERSION);
|
|
284
286
|
printKV("dir", workDir);
|
|
285
287
|
printKV("model", model || dim("default"));
|
|
286
288
|
printKV("timeout", formatTime(timeout));
|
|
@@ -611,6 +613,15 @@ function packageRootFromScript() {
|
|
|
611
613
|
const scriptPath = fileURLToPath(import.meta.url);
|
|
612
614
|
return path.resolve(path.dirname(scriptPath), "..");
|
|
613
615
|
}
|
|
616
|
+
function readDreamVersion() {
|
|
617
|
+
try {
|
|
618
|
+
const packageJsonPath = path.join(packageRootFromScript(), "package.json");
|
|
619
|
+
const parsed = JSON.parse(fs.readFileSync(packageJsonPath, "utf8"));
|
|
620
|
+
return parsed.version ?? "0.0.0";
|
|
621
|
+
} catch {
|
|
622
|
+
return "0.0.0";
|
|
623
|
+
}
|
|
624
|
+
}
|
|
614
625
|
function prependLocalBinsToPath(workDir) {
|
|
615
626
|
const packageRoot = packageRootFromScript();
|
|
616
627
|
const binPaths = [
|