@clawos-dev/clawd 0.2.144-beta.307.dc2fec6 → 0.2.145-beta.308.705ddfc
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/cli.cjs +27 -13
- package/package.json +1 -1
package/dist/cli.cjs
CHANGED
|
@@ -35679,7 +35679,16 @@ var DEFAULT_PERSONAS = [
|
|
|
35679
35679
|
public: false
|
|
35680
35680
|
}
|
|
35681
35681
|
];
|
|
35682
|
-
function
|
|
35682
|
+
function bundleSiblingFromArgv(argv1, sibling) {
|
|
35683
|
+
if (!argv1) return null;
|
|
35684
|
+
let real = argv1;
|
|
35685
|
+
try {
|
|
35686
|
+
real = fs9.realpathSync(argv1);
|
|
35687
|
+
} catch {
|
|
35688
|
+
}
|
|
35689
|
+
return path11.resolve(path11.dirname(real), sibling);
|
|
35690
|
+
}
|
|
35691
|
+
function findDefaultsRoot(logger) {
|
|
35683
35692
|
const candidates = [];
|
|
35684
35693
|
try {
|
|
35685
35694
|
const here = path11.dirname((0, import_node_url.fileURLToPath)(import_meta.url));
|
|
@@ -35687,16 +35696,18 @@ function findDefaultsRoot() {
|
|
|
35687
35696
|
candidates.push(path11.resolve(here, "persona-defaults"));
|
|
35688
35697
|
} catch {
|
|
35689
35698
|
}
|
|
35690
|
-
|
|
35691
|
-
|
|
35692
|
-
candidates.push(path11.resolve(argvDir, "persona-defaults"));
|
|
35693
|
-
}
|
|
35699
|
+
const fromArgv = bundleSiblingFromArgv(process.argv[1], "persona-defaults");
|
|
35700
|
+
if (fromArgv) candidates.push(fromArgv);
|
|
35694
35701
|
for (const c of candidates) {
|
|
35695
35702
|
try {
|
|
35696
|
-
if (fs9.statSync(c).isDirectory())
|
|
35703
|
+
if (fs9.statSync(c).isDirectory()) {
|
|
35704
|
+
logger?.info("persona.defaults-root.resolved", { root: c });
|
|
35705
|
+
return c;
|
|
35706
|
+
}
|
|
35697
35707
|
} catch {
|
|
35698
35708
|
}
|
|
35699
35709
|
}
|
|
35710
|
+
logger?.warn("persona.defaults-root.not-found", { argv1: process.argv[1], candidates });
|
|
35700
35711
|
return null;
|
|
35701
35712
|
}
|
|
35702
35713
|
function seedDefaultPersonas(args) {
|
|
@@ -35834,22 +35845,25 @@ function migrateCodexSandbox(args) {
|
|
|
35834
35845
|
}
|
|
35835
35846
|
if (n > 0) args.logger.info("persona.codex-sandbox.done", { migrated: n });
|
|
35836
35847
|
}
|
|
35837
|
-
function findDeployKitRoot() {
|
|
35848
|
+
function findDeployKitRoot(logger) {
|
|
35838
35849
|
const candidates = [];
|
|
35839
35850
|
try {
|
|
35840
35851
|
const here = path11.dirname((0, import_node_url.fileURLToPath)(import_meta.url));
|
|
35841
35852
|
candidates.push(path11.resolve(here, "..", "deploy-kit"));
|
|
35842
35853
|
} catch {
|
|
35843
35854
|
}
|
|
35844
|
-
|
|
35845
|
-
|
|
35846
|
-
}
|
|
35855
|
+
const fromArgv = bundleSiblingFromArgv(process.argv[1], "deploy-kit");
|
|
35856
|
+
if (fromArgv) candidates.push(fromArgv);
|
|
35847
35857
|
for (const c of candidates) {
|
|
35848
35858
|
try {
|
|
35849
|
-
if (fs9.statSync(c).isDirectory())
|
|
35859
|
+
if (fs9.statSync(c).isDirectory()) {
|
|
35860
|
+
logger?.info("persona.deploy-kit-root.resolved", { root: c });
|
|
35861
|
+
return c;
|
|
35862
|
+
}
|
|
35850
35863
|
} catch {
|
|
35851
35864
|
}
|
|
35852
35865
|
}
|
|
35866
|
+
logger?.warn("persona.deploy-kit-root.not-found", { argv1: process.argv[1], candidates });
|
|
35853
35867
|
return null;
|
|
35854
35868
|
}
|
|
35855
35869
|
function seedDeployKit(args) {
|
|
@@ -46170,14 +46184,14 @@ async function startDaemon(config) {
|
|
|
46170
46184
|
let transport = null;
|
|
46171
46185
|
const personaStore = new PersonaStore(import_node_path46.default.join(config.dataDir, "personas"));
|
|
46172
46186
|
const usersRoot = import_node_path46.default.join(config.dataDir, "users");
|
|
46173
|
-
const defaultsRoot = findDefaultsRoot();
|
|
46187
|
+
const defaultsRoot = findDefaultsRoot(logger);
|
|
46174
46188
|
if (defaultsRoot) {
|
|
46175
46189
|
seedDefaultPersonas({ store: personaStore, defaultsRoot, logger });
|
|
46176
46190
|
refreshDaemonManagedDirs({ store: personaStore, defaultsRoot, logger });
|
|
46177
46191
|
} else {
|
|
46178
46192
|
logger.warn("persona.seed.skip", { reason: "defaults-root-not-found" });
|
|
46179
46193
|
}
|
|
46180
|
-
const deployKitBundleRoot = findDeployKitRoot();
|
|
46194
|
+
const deployKitBundleRoot = findDeployKitRoot(logger);
|
|
46181
46195
|
if (deployKitBundleRoot) {
|
|
46182
46196
|
seedDeployKit({ deployKitBundleRoot, dataDir: config.dataDir, logger });
|
|
46183
46197
|
refreshDeployKit({ deployKitBundleRoot, dataDir: config.dataDir, logger });
|
package/package.json
CHANGED