@clawos-dev/clawd 0.2.155-beta.325.7f9bb25 → 0.2.155
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 +15 -3
- package/package.json +1 -1
package/dist/cli.cjs
CHANGED
|
@@ -31782,10 +31782,14 @@ function scopeSubPath(scope) {
|
|
|
31782
31782
|
if (scope.mode === "guest") return [scope.personaId, "guests", scope.capId];
|
|
31783
31783
|
return [scope.personaId, scope.mode];
|
|
31784
31784
|
}
|
|
31785
|
-
function metaFromScope(scope, personaRoot, usersRoot) {
|
|
31785
|
+
function metaFromScope(scope, personaRoot, usersRoot, ownerPrincipalId) {
|
|
31786
31786
|
if (scope.kind === "default") return void 0;
|
|
31787
31787
|
if (scope.mode === "owner") {
|
|
31788
|
-
|
|
31788
|
+
if (!ownerPrincipalId || !usersRoot) {
|
|
31789
|
+
return { idleKillEnabled: false, personaMode: "owner" };
|
|
31790
|
+
}
|
|
31791
|
+
const userWorkDir2 = deriveUserWorkDir(ownerPrincipalId, usersRoot);
|
|
31792
|
+
return { idleKillEnabled: false, personaMode: "owner", userWorkDir: userWorkDir2, addDirs: [userWorkDir2] };
|
|
31789
31793
|
}
|
|
31790
31794
|
const userWorkDir = deriveUserWorkDir(scope.capId, usersRoot);
|
|
31791
31795
|
return {
|
|
@@ -33698,7 +33702,15 @@ var SessionManager = class {
|
|
|
33698
33702
|
newRunner(file, scope) {
|
|
33699
33703
|
const adapter = this.deps.getAdapter(file.tool ?? "claude");
|
|
33700
33704
|
const store = this.storeFor(scope);
|
|
33701
|
-
const subSessionMeta = metaFromScope(
|
|
33705
|
+
const subSessionMeta = metaFromScope(
|
|
33706
|
+
scope,
|
|
33707
|
+
this.deps.personaRoot ?? "",
|
|
33708
|
+
this.deps.usersRoot ?? "",
|
|
33709
|
+
this.deps.ownerPrincipalId
|
|
33710
|
+
);
|
|
33711
|
+
if (subSessionMeta?.userWorkDir) {
|
|
33712
|
+
import_node_fs6.default.mkdirSync(subSessionMeta.userWorkDir, { recursive: true });
|
|
33713
|
+
}
|
|
33702
33714
|
if (scope.kind === "persona" && scope.mode === "guest") {
|
|
33703
33715
|
if (!this.deps.personaRoot || !subSessionMeta?.userWorkDir) {
|
|
33704
33716
|
throw new Error(
|
package/package.json
CHANGED