@ouro.bot/cli 0.1.0-alpha.136 → 0.1.0-alpha.137
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/changelog.json +8 -0
- package/dist/heart/daemon/daemon-cli.js +42 -15
- package/package.json +1 -1
package/changelog.json
CHANGED
|
@@ -1,6 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"_note": "This changelog is maintained as part of the PR/version-bump workflow. Agent-curated, not auto-generated. Agents read this file directly via read_file to understand what changed between versions.",
|
|
3
3
|
"versions": [
|
|
4
|
+
{
|
|
5
|
+
"version": "0.1.0-alpha.137",
|
|
6
|
+
"changes": [
|
|
7
|
+
"ouro dev auto-discovers existing repo at ~/Projects/ouroboros or prompts for clone path.",
|
|
8
|
+
"ouro dev never clones without user consent — prompts in interactive mode, errors in non-interactive.",
|
|
9
|
+
"ouro dev --repo-path errors clearly when the specified path has no repo."
|
|
10
|
+
]
|
|
11
|
+
},
|
|
4
12
|
{
|
|
5
13
|
"version": "0.1.0-alpha.136",
|
|
6
14
|
"changes": [
|
|
@@ -2002,22 +2002,49 @@ async function runOuroCli(args, deps = createDefaultOuroCliDeps()) {
|
|
|
2002
2002
|
/* v8 ignore next -- defensive: existsSync always injected in tests @preserve */
|
|
2003
2003
|
const checkExists = deps.existsSync ?? fs.existsSync;
|
|
2004
2004
|
/* v8 ignore next -- repo resolution dispatched to v8-ignored helper @preserve */
|
|
2005
|
-
|
|
2006
|
-
|
|
2005
|
+
let repoCwd = resolveDevRepoCwd(command, checkExists, deps);
|
|
2006
|
+
let entryPath = path.join(repoCwd, "dist", "heart", "daemon", "daemon-entry.js");
|
|
2007
2007
|
if (!checkExists(entryPath) || !checkExists(path.join(repoCwd, ".git"))) {
|
|
2008
|
-
|
|
2009
|
-
|
|
2010
|
-
|
|
2011
|
-
|
|
2012
|
-
|
|
2013
|
-
|
|
2014
|
-
|
|
2015
|
-
|
|
2016
|
-
|
|
2017
|
-
|
|
2018
|
-
|
|
2019
|
-
|
|
2020
|
-
|
|
2008
|
+
if (command.repoPath) {
|
|
2009
|
+
// Explicit --repo-path didn't have a valid repo — error
|
|
2010
|
+
const message = `no harness repo found at ${repoCwd}. run npm run build first.`;
|
|
2011
|
+
deps.writeStdout(message);
|
|
2012
|
+
return message;
|
|
2013
|
+
}
|
|
2014
|
+
/* v8 ignore start -- auto-clone: interactive prompt + existing repo discovery + real git/npm @preserve */
|
|
2015
|
+
const defaultClonePath = path.join(os.homedir(), "Projects", "ouroboros");
|
|
2016
|
+
if (checkExists(path.join(defaultClonePath, ".git"))) {
|
|
2017
|
+
deps.writeStdout(`found existing repo at ${defaultClonePath}`);
|
|
2018
|
+
try {
|
|
2019
|
+
repoCwd = resolveClonePath({ clonePath: defaultClonePath }, checkExists, deps);
|
|
2020
|
+
entryPath = path.join(repoCwd, "dist", "heart", "daemon", "daemon-entry.js");
|
|
2021
|
+
}
|
|
2022
|
+
catch (err) {
|
|
2023
|
+
const message = err instanceof Error ? err.message : String(err);
|
|
2024
|
+
deps.writeStdout(message);
|
|
2025
|
+
return message;
|
|
2026
|
+
}
|
|
2027
|
+
}
|
|
2028
|
+
else if (deps.promptInput) {
|
|
2029
|
+
deps.writeStdout("no harness repo found.");
|
|
2030
|
+
const answer = await deps.promptInput(`already have a checkout? enter its path, or press enter to clone to ${defaultClonePath}: `);
|
|
2031
|
+
const cloneTarget = answer.trim() || defaultClonePath;
|
|
2032
|
+
try {
|
|
2033
|
+
repoCwd = resolveClonePath({ clonePath: cloneTarget }, checkExists, deps);
|
|
2034
|
+
entryPath = path.join(repoCwd, "dist", "heart", "daemon", "daemon-entry.js");
|
|
2035
|
+
}
|
|
2036
|
+
catch (err) {
|
|
2037
|
+
const message = err instanceof Error ? err.message : String(err);
|
|
2038
|
+
deps.writeStdout(message);
|
|
2039
|
+
return message;
|
|
2040
|
+
}
|
|
2041
|
+
}
|
|
2042
|
+
else {
|
|
2043
|
+
const message = `no harness repo found. run: ouro dev --repo-path /path/to/ouroboros`;
|
|
2044
|
+
deps.writeStdout(message);
|
|
2045
|
+
return message;
|
|
2046
|
+
}
|
|
2047
|
+
/* v8 ignore stop */
|
|
2021
2048
|
}
|
|
2022
2049
|
/* v8 ignore start -- defensive: ensureDaemonBootPersistence always injected in tests @preserve */
|
|
2023
2050
|
if (deps.ensureDaemonBootPersistence) {
|