@clawos-dev/clawd 0.2.187-beta.372.beee855 → 0.2.187-beta.374.81ea8db
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
CHANGED
|
@@ -41372,7 +41372,10 @@ function buildConnectionPrompt(args) {
|
|
|
41372
41372
|
}
|
|
41373
41373
|
if (args.workDir) {
|
|
41374
41374
|
result += `
|
|
41375
|
-
\u4F60\u7684\u6587\u4EF6\u5DE5\u4F5C\u76EE\u5F55\u662F ${args.workDir}\uFF0C\u8FD9\u4E2A\u76EE\u5F55\u5BF9\u4F60\u53EF\u8BFB\u53EF\u5199\uFF0C\u6587\u4EF6\u7684\u8BFB\u53D6/\u521B\u5EFA/\u4FEE\u6539\u90FD\u5728\u8FD9\u91CC\u8FDB\u884C\
|
|
41375
|
+
\u4F60\u7684\u6587\u4EF6\u5DE5\u4F5C\u76EE\u5F55\u662F ${args.workDir}\uFF0C\u8FD9\u4E2A\u76EE\u5F55\u5BF9\u4F60\u53EF\u8BFB\u53EF\u5199\uFF0C\u6587\u4EF6\u7684\u8BFB\u53D6/\u521B\u5EFA/\u4FEE\u6539\u90FD\u5728\u8FD9\u91CC\u8FDB\u884C\u3002`;
|
|
41376
|
+
if (args.mode === "guest") {
|
|
41377
|
+
result += "persona \u76EE\u5F55\u5BF9\u4F60\u53EA\u8BFB\uFF0C\u4E0D\u8981\u5F80\u91CC\u5199\u3002";
|
|
41378
|
+
}
|
|
41376
41379
|
}
|
|
41377
41380
|
return result;
|
|
41378
41381
|
}
|
|
@@ -48858,24 +48861,8 @@ var SessionObserver = class {
|
|
|
48858
48861
|
return import_node_path21.default.join(this.home, ".claude", "projects", cwdToHashDir(cwd), `${toolSessionId}.jsonl`);
|
|
48859
48862
|
}
|
|
48860
48863
|
start(args) {
|
|
48864
|
+
this.stop(args.sessionId);
|
|
48861
48865
|
const filePath = this.resolveJsonlPath(args.cwd, args.toolSessionId, args.jsonlPath);
|
|
48862
|
-
const existing = this.watches.get(args.sessionId);
|
|
48863
|
-
if (existing && existing.filePath === filePath) {
|
|
48864
|
-
this.opts.logger?.info("observer.start no-op", {
|
|
48865
|
-
sessionId: args.sessionId,
|
|
48866
|
-
filePath,
|
|
48867
|
-
reason: "already-watching-same-file"
|
|
48868
|
-
});
|
|
48869
|
-
return { filePath };
|
|
48870
|
-
}
|
|
48871
|
-
if (existing) {
|
|
48872
|
-
this.stop(args.sessionId, "file-changed");
|
|
48873
|
-
}
|
|
48874
|
-
this.opts.logger?.info("observer.start", {
|
|
48875
|
-
sessionId: args.sessionId,
|
|
48876
|
-
filePath,
|
|
48877
|
-
reason: existing ? "file-changed" : "first-attach"
|
|
48878
|
-
});
|
|
48879
48866
|
let size = 0;
|
|
48880
48867
|
try {
|
|
48881
48868
|
size = import_node_fs23.default.statSync(filePath).size;
|
|
@@ -49022,7 +49009,7 @@ var SessionObserver = class {
|
|
|
49022
49009
|
isObserving(sessionId) {
|
|
49023
49010
|
return this.watches.has(sessionId);
|
|
49024
49011
|
}
|
|
49025
|
-
stop(sessionId
|
|
49012
|
+
stop(sessionId) {
|
|
49026
49013
|
const w2 = this.watches.get(sessionId);
|
|
49027
49014
|
if (!w2) return false;
|
|
49028
49015
|
try {
|
|
@@ -49033,11 +49020,6 @@ var SessionObserver = class {
|
|
|
49033
49020
|
this.watches.delete(sessionId);
|
|
49034
49021
|
this.metaObserver?.stop(sessionId);
|
|
49035
49022
|
this.opts.onStatus?.(sessionId, "stopped");
|
|
49036
|
-
this.opts.logger?.info("observer.stop", {
|
|
49037
|
-
sessionId,
|
|
49038
|
-
filePath: w2.filePath,
|
|
49039
|
-
reason
|
|
49040
|
-
});
|
|
49041
49023
|
return true;
|
|
49042
49024
|
}
|
|
49043
49025
|
stopAll() {
|
|
@@ -53030,7 +53012,7 @@ function buildSessionHandlers(deps) {
|
|
|
53030
53012
|
const newSession = async (frame, _client, ctx) => {
|
|
53031
53013
|
const args = SessionIdArgs.parse(frame);
|
|
53032
53014
|
ensureSessionAccess(ctx, args.sessionId, "send");
|
|
53033
|
-
observer.stop(args.sessionId
|
|
53015
|
+
observer.stop(args.sessionId);
|
|
53034
53016
|
const { response, broadcast } = manager.newSession(args);
|
|
53035
53017
|
return { response: { type: "session:info", ...response }, broadcast };
|
|
53036
53018
|
};
|
|
@@ -57482,9 +57464,7 @@ async function startDaemon(config) {
|
|
|
57482
57464
|
// daemon 内部转译,UI 看到的始终是 events 流里的 synth uuid(详见 manager 注释)
|
|
57483
57465
|
onUserMessageObserved: (sessionId, realUuid, text) => {
|
|
57484
57466
|
manager.recordRealUserUuid({ sessionId, realUuid, text });
|
|
57485
|
-
}
|
|
57486
|
-
// 永久取证 log:observer.start / start no-op / stop(spec 2026-06-26-observer-restart-fix §3.3)
|
|
57487
|
-
logger
|
|
57467
|
+
}
|
|
57488
57468
|
});
|
|
57489
57469
|
manager.attachObserver(observer);
|
|
57490
57470
|
const claudeAdapter = config.mode === "tui" ? new ClaudeTuiAdapter({
|