@clawos-dev/clawd 0.2.735 → 0.2.737
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/app-builder-plugin/mcp-server.cjs +0 -6
- package/dist/cli.cjs +40 -67
- package/dist/cloud-persona-conversations.html +2 -2
- package/dist/cloud-persona-metrics.html +1 -1
- package/dist/cloud-persona-schedules.html +1 -1
- package/dist/dispatch/mcp-server.cjs +0 -6
- package/dist/owner-ui/assets/owner-BzMwW_nF.js +955 -0
- package/dist/owner-ui/assets/{owner-Dq_Gvi-x.css → owner-z9zJkPHQ.css} +1 -1
- package/dist/owner-ui/owner.html +2 -2
- package/dist/persona-defaults/persona-app-builder/mcp/clawd-app-builder/mcp-server.cjs +0 -6
- package/dist/persona-defaults/persona-dataclaw-builder/mcp/clawd-app-builder/mcp-server.cjs +0 -6
- package/dist/share-md-viewer-error.html +1 -1
- package/dist/share-md-viewer.html +1 -1
- package/dist/share-ui/assets/{guest-ndYQiP8d.js → guest-BqfrA0ii.js} +147 -147
- package/dist/share-ui/assets/{guest-BVSbAs1-.css → guest-DAdPVo1T.css} +1 -1
- package/dist/share-ui/guest.html +2 -2
- package/package.json +1 -1
- package/dist/owner-ui/assets/owner-cVBwPD6W.js +0 -955
|
@@ -33107,8 +33107,6 @@ var SessionFileSchema = external_exports.object({
|
|
|
33107
33107
|
cloudExpectedImage: ImageDigestSchema.optional(),
|
|
33108
33108
|
testReleaseId: external_exports.string().optional(),
|
|
33109
33109
|
sessionId: external_exports.string().min(1),
|
|
33110
|
-
/** New gateway execution identity after session:new; defaults to sessionId for the first execution. */
|
|
33111
|
-
cloudExecutionId: external_exports.string().min(1).optional(),
|
|
33112
33110
|
/** First turn ID of the per-query SSE conversation. */
|
|
33113
33111
|
cloudConversationId: external_exports.string().min(1).optional(),
|
|
33114
33112
|
cloudWorkspace: WorkspaceBindingSchema.optional(),
|
|
@@ -33116,10 +33114,6 @@ var SessionFileSchema = external_exports.object({
|
|
|
33116
33114
|
cloudPendingTurns: external_exports.array(external_exports.object({ id: external_exports.string().min(1), text: external_exports.string(), prepared: external_exports.boolean().optional() })).optional(),
|
|
33117
33115
|
/** 用户在前端选的、尚未由 agent 执行的分支;下一条 query 发出时作为上下文注入,被网关接受后清除。 */
|
|
33118
33116
|
cloudBranchIntent: WorkspaceBranchSchema.optional(),
|
|
33119
|
-
/** Owner gateway session observed in ready; proves the remote Pod was opened. */
|
|
33120
|
-
cloudGatewaySessionId: external_exports.string().min(1).optional(),
|
|
33121
|
-
/** Persisted before sending so daemon restart can retry the same gateway command ID. */
|
|
33122
|
-
cloudPendingCommand: external_exports.object({ id: external_exports.string().min(1), text: external_exports.string(), prepared: external_exports.boolean().optional() }).optional(),
|
|
33123
33117
|
cwd: external_exports.string().min(1),
|
|
33124
33118
|
tool: external_exports.literal("claude").or(external_exports.string().min(1)).default("claude"),
|
|
33125
33119
|
toolSessionId: external_exports.string().optional(),
|
package/dist/cli.cjs
CHANGED
|
@@ -8334,8 +8334,6 @@ var init_schemas = __esm({
|
|
|
8334
8334
|
cloudExpectedImage: ImageDigestSchema.optional(),
|
|
8335
8335
|
testReleaseId: external_exports.string().optional(),
|
|
8336
8336
|
sessionId: external_exports.string().min(1),
|
|
8337
|
-
/** New gateway execution identity after session:new; defaults to sessionId for the first execution. */
|
|
8338
|
-
cloudExecutionId: external_exports.string().min(1).optional(),
|
|
8339
8337
|
/** First turn ID of the per-query SSE conversation. */
|
|
8340
8338
|
cloudConversationId: external_exports.string().min(1).optional(),
|
|
8341
8339
|
cloudWorkspace: WorkspaceBindingSchema.optional(),
|
|
@@ -8343,10 +8341,6 @@ var init_schemas = __esm({
|
|
|
8343
8341
|
cloudPendingTurns: external_exports.array(external_exports.object({ id: external_exports.string().min(1), text: external_exports.string(), prepared: external_exports.boolean().optional() })).optional(),
|
|
8344
8342
|
/** 用户在前端选的、尚未由 agent 执行的分支;下一条 query 发出时作为上下文注入,被网关接受后清除。 */
|
|
8345
8343
|
cloudBranchIntent: WorkspaceBranchSchema.optional(),
|
|
8346
|
-
/** Owner gateway session observed in ready; proves the remote Pod was opened. */
|
|
8347
|
-
cloudGatewaySessionId: external_exports.string().min(1).optional(),
|
|
8348
|
-
/** Persisted before sending so daemon restart can retry the same gateway command ID. */
|
|
8349
|
-
cloudPendingCommand: external_exports.object({ id: external_exports.string().min(1), text: external_exports.string(), prepared: external_exports.boolean().optional() }).optional(),
|
|
8350
8344
|
cwd: external_exports.string().min(1),
|
|
8351
8345
|
tool: external_exports.literal("claude").or(external_exports.string().min(1)).default("claude"),
|
|
8352
8346
|
toolSessionId: external_exports.string().optional(),
|
|
@@ -48094,7 +48088,7 @@ function clearQueuedSends(next, effects) {
|
|
|
48094
48088
|
function ensureDeliverable(next, deps) {
|
|
48095
48089
|
const effects = [];
|
|
48096
48090
|
const sessionId = next.file.sessionId;
|
|
48097
|
-
if (next.status === "running-idle" || next.status === "error" && next.procAlive && isCloudTool(next.file.tool)
|
|
48091
|
+
if (next.status === "running-idle" || next.status === "error" && next.procAlive && isCloudTool(next.file.tool)) {
|
|
48098
48092
|
effects.push({ kind: "cancel-idle-kill", sessionId });
|
|
48099
48093
|
next.status = next.procAlive ? "running" : "idle";
|
|
48100
48094
|
if (next.procAlive) {
|
|
@@ -48201,14 +48195,11 @@ function buildSpawnContext(state, deps) {
|
|
|
48201
48195
|
const mcpConfigs = deps.getMcpConfigs?.() ?? [];
|
|
48202
48196
|
const ctx = {
|
|
48203
48197
|
cwd: file.cwd,
|
|
48204
|
-
cloudExecutionId: file.cloudExecutionId,
|
|
48205
48198
|
...file.cloudWorkspace ? { cloudWorkspace: file.cloudWorkspace } : {},
|
|
48206
48199
|
...file.cloudEnvironment ? { cloudEnvironment: file.cloudEnvironment } : {},
|
|
48207
48200
|
...file.cloudExpectedImage ? { cloudExpectedImage: file.cloudExpectedImage } : {},
|
|
48208
48201
|
...file.testReleaseId ? { testReleaseId: file.testReleaseId } : {},
|
|
48209
48202
|
...file.cloudConversationId ? { cloudConversationId: file.cloudConversationId } : {},
|
|
48210
|
-
...file.cloudPendingCommand && !file.cloudPendingTurns ? { cloudLegacyPendingCommand: true } : {},
|
|
48211
|
-
cloudGatewaySessionId: file.cloudGatewaySessionId,
|
|
48212
48203
|
toolSessionId: file.toolSessionId,
|
|
48213
48204
|
model: file.model,
|
|
48214
48205
|
permissionMode: file.permissionMode,
|
|
@@ -48459,17 +48450,16 @@ function pushEventToBufferInPlace(next, event, deps) {
|
|
|
48459
48450
|
}
|
|
48460
48451
|
if (isUserText || isTurnEnd) {
|
|
48461
48452
|
const cloudTurnId = isUserText ? withSeq.uuid ?? `${next.file.sessionId}-${seq}` : void 0;
|
|
48462
|
-
const cloudPerTurn = isCloudTool(next.file.tool)
|
|
48453
|
+
const cloudPerTurn = isCloudTool(next.file.tool);
|
|
48463
48454
|
next.file = {
|
|
48464
48455
|
...next.file,
|
|
48465
48456
|
updatedAt: nowIso(deps),
|
|
48466
48457
|
// Only a local send carries `sender`. A user_text echoed by the engine stream (skill hint, interrupt marker) has no
|
|
48467
48458
|
// turn stream of its own, so recording it would leave a pending turn that startup recovery replays to the Pod.
|
|
48468
48459
|
...cloudPerTurn && isUserText && withSeq.sender && next.status !== "error" ? {
|
|
48469
|
-
cloudConversationId: next.file.cloudConversationId ??
|
|
48460
|
+
cloudConversationId: next.file.cloudConversationId ?? cloudTurnId,
|
|
48470
48461
|
cloudPendingTurns: [...next.file.cloudPendingTurns ?? [], { id: cloudTurnId, text: withSeq.text }]
|
|
48471
|
-
} : {}
|
|
48472
|
-
...!cloudPerTurn && isCloudTool(next.file.tool) && next.status !== "error" && !(withSeq.kind === "turn_end" && withSeq.reason === "interrupted") ? { cloudPendingCommand: withSeq.kind === "user_text" ? { id: withSeq.uuid ?? `${next.file.sessionId}-${seq}`, text: withSeq.text } : void 0 } : {}
|
|
48462
|
+
} : {}
|
|
48473
48463
|
};
|
|
48474
48464
|
effects.push({ kind: "persist-file", file: next.file });
|
|
48475
48465
|
effects.push(sessionInfoFrame(next.file));
|
|
@@ -48534,7 +48524,7 @@ function applyCommand(state, command, deps) {
|
|
|
48534
48524
|
const sessionId = next.file.sessionId;
|
|
48535
48525
|
switch (command.kind) {
|
|
48536
48526
|
case "send": {
|
|
48537
|
-
if (command.queueWhileRunning && !
|
|
48527
|
+
if (command.queueWhileRunning && !isCloudTool(next.file.tool) && (next.status === "running" || next.status === "spawning")) {
|
|
48538
48528
|
next.queuedSends = [
|
|
48539
48529
|
...next.queuedSends,
|
|
48540
48530
|
{
|
|
@@ -48585,8 +48575,8 @@ function applyCommand(state, command, deps) {
|
|
|
48585
48575
|
return { state: next, effects };
|
|
48586
48576
|
}
|
|
48587
48577
|
case "stop": {
|
|
48588
|
-
if (isCloudTool(next.file.tool) &&
|
|
48589
|
-
next.file = { ...next.file,
|
|
48578
|
+
if (isCloudTool(next.file.tool) && next.file.cloudPendingTurns?.length) {
|
|
48579
|
+
next.file = { ...next.file, cloudPendingTurns: void 0 };
|
|
48590
48580
|
effects.push({ kind: "persist-file", file: next.file }, sessionInfoFrame(next.file));
|
|
48591
48581
|
}
|
|
48592
48582
|
for (const toolUseId of Object.keys(state.pendingQuestions ?? {})) {
|
|
@@ -48722,11 +48712,10 @@ function applyCommand(state, command, deps) {
|
|
|
48722
48712
|
case "new": {
|
|
48723
48713
|
const {
|
|
48724
48714
|
toolSessionId: _drop,
|
|
48725
|
-
cloudPendingCommand: _cloudPendingCommand,
|
|
48726
|
-
cloudGatewaySessionId: _cloudGatewaySessionId,
|
|
48727
48715
|
cloudConversationId: _cloudConversationId,
|
|
48728
48716
|
cloudPendingTurns: _cloudPendingTurns,
|
|
48729
|
-
|
|
48717
|
+
cloudWorkspace: _cloudWorkspace,
|
|
48718
|
+
cloudBranchIntent: _cloudBranchIntent,
|
|
48730
48719
|
contextUsage: _ctx,
|
|
48731
48720
|
contextWindowSize: _win,
|
|
48732
48721
|
gitBranch: _branch,
|
|
@@ -48737,11 +48726,10 @@ function applyCommand(state, command, deps) {
|
|
|
48737
48726
|
...rest
|
|
48738
48727
|
} = next.file;
|
|
48739
48728
|
void _drop;
|
|
48740
|
-
void _cloudPendingCommand;
|
|
48741
|
-
void _cloudGatewaySessionId;
|
|
48742
48729
|
void _cloudConversationId;
|
|
48743
48730
|
void _cloudPendingTurns;
|
|
48744
|
-
void
|
|
48731
|
+
void _cloudWorkspace;
|
|
48732
|
+
void _cloudBranchIntent;
|
|
48745
48733
|
void _ctx;
|
|
48746
48734
|
void _win;
|
|
48747
48735
|
void _branch;
|
|
@@ -48751,6 +48739,7 @@ function applyCommand(state, command, deps) {
|
|
|
48751
48739
|
const nextFile = {
|
|
48752
48740
|
...rest,
|
|
48753
48741
|
...command.nextToolSessionId ? { toolSessionId: command.nextToolSessionId } : {},
|
|
48742
|
+
...command.nextCloudConversationId ? { cloudConversationId: command.nextCloudConversationId } : {},
|
|
48754
48743
|
updatedAt: nowIso(deps)
|
|
48755
48744
|
};
|
|
48756
48745
|
next.file = nextFile;
|
|
@@ -48821,12 +48810,6 @@ function reduceSessionInner(state, input, deps) {
|
|
|
48821
48810
|
case "proc-exit": {
|
|
48822
48811
|
const next = cloneState(state);
|
|
48823
48812
|
next.procAlive = false;
|
|
48824
|
-
if (isCloudTool(next.file.tool) && next.file.cloudPendingCommand && !next.file.cloudPendingTurns) {
|
|
48825
|
-
next.file = { ...next.file, cloudPendingCommand: void 0 };
|
|
48826
|
-
}
|
|
48827
|
-
if (isCloudTool(next.file.tool) && !next.file.cloudPendingCommand && next.file.cloudGatewaySessionId) {
|
|
48828
|
-
next.file = { ...next.file, cloudGatewaySessionId: void 0 };
|
|
48829
|
-
}
|
|
48830
48813
|
const cloudFileChanged = next.file !== state.file;
|
|
48831
48814
|
next.status = "stopped";
|
|
48832
48815
|
next.stdinClosed = false;
|
|
@@ -49382,8 +49365,6 @@ var SessionRunner = class {
|
|
|
49382
49365
|
this.recoveringCloud = true;
|
|
49383
49366
|
try {
|
|
49384
49367
|
this.input({ kind: "command", command: { kind: "spawn-if-needed" } });
|
|
49385
|
-
const pending = this.state.file.cloudPendingCommand;
|
|
49386
|
-
if (pending) this.session?.startTurn(pending.text, pending.id, pending.prepared === true);
|
|
49387
49368
|
for (const turn of this.state.file.cloudPendingTurns ?? []) {
|
|
49388
49369
|
const payload = turn.prepared ? null : this.hooks.store.readCloudPayload(this.state.file.sessionId, turn.id);
|
|
49389
49370
|
this.session?.startTurn(payload ?? turn.text, turn.id, payload !== null || turn.prepared === true);
|
|
@@ -49614,7 +49595,7 @@ var SessionRunner = class {
|
|
|
49614
49595
|
}
|
|
49615
49596
|
case "write-stdin":
|
|
49616
49597
|
if (this.session) {
|
|
49617
|
-
this.session.startTurn(effect.payload, this.state.file.cloudPendingTurns?.at(-1)?.id
|
|
49598
|
+
this.session.startTurn(effect.payload, this.state.file.cloudPendingTurns?.at(-1)?.id);
|
|
49618
49599
|
break;
|
|
49619
49600
|
}
|
|
49620
49601
|
this.hooks.logger?.debug("[RG] write-stdin", {
|
|
@@ -49773,11 +49754,9 @@ var SessionRunner = class {
|
|
|
49773
49754
|
},
|
|
49774
49755
|
onCommandPrepared: (commandId, text, prepared) => {
|
|
49775
49756
|
if (!isCurrent()) return false;
|
|
49776
|
-
const pending = this.state.file.cloudPendingTurns?.find((turn) => turn.id === commandId)
|
|
49757
|
+
const pending = this.state.file.cloudPendingTurns?.find((turn) => turn.id === commandId);
|
|
49777
49758
|
if (!pending || pending.id !== commandId) return false;
|
|
49778
|
-
if (!prepared
|
|
49779
|
-
this.hooks.store.writeCloudPayload(this.state.file.sessionId, commandId, text);
|
|
49780
|
-
}
|
|
49759
|
+
if (!prepared) this.hooks.store.writeCloudPayload(this.state.file.sessionId, commandId, text);
|
|
49781
49760
|
return true;
|
|
49782
49761
|
},
|
|
49783
49762
|
onCloudTurnTerminal: (turnId) => {
|
|
@@ -49984,7 +49963,7 @@ var SessionManager = class {
|
|
|
49984
49963
|
* call, and a failed cancel must not block the local action (offline / logged out / gateway errors).
|
|
49985
49964
|
*/
|
|
49986
49965
|
async cancelCloudTurns(file, runner) {
|
|
49987
|
-
const inFlight =
|
|
49966
|
+
const inFlight = file.cloudConversationId && file.cloudPendingTurns?.length;
|
|
49988
49967
|
if (!inFlight) {
|
|
49989
49968
|
runner?.confirmCloudCancelled();
|
|
49990
49969
|
return;
|
|
@@ -50991,7 +50970,7 @@ var SessionManager = class {
|
|
|
50991
50970
|
const runner = this.runners.get(args.sessionId);
|
|
50992
50971
|
if (file && isCloudTool(file.tool)) await this.cancelCloudTurns(file, runner ?? null);
|
|
50993
50972
|
if (!runner) {
|
|
50994
|
-
if (file && isCloudTool(file.tool) &&
|
|
50973
|
+
if (file && isCloudTool(file.tool) && file.cloudPendingTurns?.length) this.writeOwned({ ...file, cloudPendingTurns: void 0 });
|
|
50995
50974
|
return { response: { ok: true }, broadcast: [] };
|
|
50996
50975
|
}
|
|
50997
50976
|
this.clearPendingTurnEnd(args.sessionId);
|
|
@@ -51132,11 +51111,7 @@ var SessionManager = class {
|
|
|
51132
51111
|
}
|
|
51133
51112
|
newSession(args) {
|
|
51134
51113
|
const existingFile = this.getFile(args.sessionId);
|
|
51135
|
-
|
|
51136
|
-
throw new ClawdError(
|
|
51137
|
-
ERROR_CODES.VALIDATION_ERROR,
|
|
51138
|
-
"\u6B64\u4F1A\u8BDD\u5DF2\u7ED1\u5B9A\u5DE5\u4F5C\u533A\uFF0C\u8BF7\u65B0\u5EFA\u4F1A\u8BDD\u4EE5\u5F00\u59CB\u72EC\u7ACB\u73B0\u573A"
|
|
51139
|
-
);
|
|
51114
|
+
const nextCloudConversationId = isCloudTool(existingFile.tool) ? (0, import_node_crypto6.randomUUID)() : void 0;
|
|
51140
51115
|
this.titleGenPending.get(args.sessionId)?.abort();
|
|
51141
51116
|
this.titleGenPending.delete(args.sessionId);
|
|
51142
51117
|
const nextToolSessionId = this.deps.mode === "tui" && (existingFile.tool ?? "claude") === "claude" ? (0, import_node_crypto6.randomUUID)() : void 0;
|
|
@@ -51146,7 +51121,11 @@ var SessionManager = class {
|
|
|
51146
51121
|
const { value, broadcast } = this.withCollector(() => {
|
|
51147
51122
|
runner.input({
|
|
51148
51123
|
kind: "command",
|
|
51149
|
-
command: {
|
|
51124
|
+
command: {
|
|
51125
|
+
kind: "new",
|
|
51126
|
+
...nextToolSessionId ? { nextToolSessionId } : {},
|
|
51127
|
+
...nextCloudConversationId ? { nextCloudConversationId } : {}
|
|
51128
|
+
}
|
|
51150
51129
|
});
|
|
51151
51130
|
return runner.getState().file;
|
|
51152
51131
|
});
|
|
@@ -51155,11 +51134,10 @@ var SessionManager = class {
|
|
|
51155
51134
|
const existing = this.findOwnedSession(args.sessionId);
|
|
51156
51135
|
const {
|
|
51157
51136
|
toolSessionId: _drop,
|
|
51158
|
-
cloudPendingCommand: _cloudPendingCommand,
|
|
51159
|
-
cloudGatewaySessionId: _cloudGatewaySessionId,
|
|
51160
51137
|
cloudConversationId: _cloudConversationId,
|
|
51161
51138
|
cloudPendingTurns: _cloudPendingTurns,
|
|
51162
|
-
|
|
51139
|
+
cloudWorkspace: _cloudWorkspace,
|
|
51140
|
+
cloudBranchIntent: _cloudBranchIntent,
|
|
51163
51141
|
contextUsage: _ctx,
|
|
51164
51142
|
contextWindowSize: _win,
|
|
51165
51143
|
gitBranch: _branch,
|
|
@@ -51169,11 +51147,10 @@ var SessionManager = class {
|
|
|
51169
51147
|
...rest
|
|
51170
51148
|
} = existing;
|
|
51171
51149
|
void _drop;
|
|
51172
|
-
void _cloudPendingCommand;
|
|
51173
|
-
void _cloudGatewaySessionId;
|
|
51174
51150
|
void _cloudConversationId;
|
|
51175
51151
|
void _cloudPendingTurns;
|
|
51176
|
-
void
|
|
51152
|
+
void _cloudWorkspace;
|
|
51153
|
+
void _cloudBranchIntent;
|
|
51177
51154
|
void _ctx;
|
|
51178
51155
|
void _win;
|
|
51179
51156
|
void _branch;
|
|
@@ -51183,17 +51160,13 @@ var SessionManager = class {
|
|
|
51183
51160
|
const updated = {
|
|
51184
51161
|
...rest,
|
|
51185
51162
|
...nextToolSessionId ? { toolSessionId: nextToolSessionId } : {},
|
|
51163
|
+
...nextCloudConversationId ? { cloudConversationId: nextCloudConversationId } : {},
|
|
51186
51164
|
updatedAt: nowIso2(this.deps)
|
|
51187
51165
|
};
|
|
51188
51166
|
return { response: this.writeOwned(updated), broadcast: [] };
|
|
51189
51167
|
}
|
|
51190
51168
|
async newSessionWithCloudCancel(args) {
|
|
51191
51169
|
const file = this.getFile(args.sessionId);
|
|
51192
|
-
if (file.cloudWorkspace)
|
|
51193
|
-
throw new ClawdError(
|
|
51194
|
-
ERROR_CODES.VALIDATION_ERROR,
|
|
51195
|
-
"\u6B64\u4F1A\u8BDD\u5DF2\u7ED1\u5B9A\u5DE5\u4F5C\u533A\uFF0C\u8BF7\u65B0\u5EFA\u4F1A\u8BDD\u4EE5\u5F00\u59CB\u72EC\u7ACB\u73B0\u573A"
|
|
51196
|
-
);
|
|
51197
51170
|
if (isCloudTool(file.tool)) {
|
|
51198
51171
|
await this.cancelCloudTurns(file, this.runners.get(args.sessionId) ?? null);
|
|
51199
51172
|
return this.newSession(args);
|
|
@@ -51272,7 +51245,7 @@ var SessionManager = class {
|
|
|
51272
51245
|
/** Reattach only to executions whose last turn lacks a durable end marker. */
|
|
51273
51246
|
recoverCloudSessions() {
|
|
51274
51247
|
for (const file of this.listAllOwned()) {
|
|
51275
|
-
if (!isCloudTool(file.tool) || !file.
|
|
51248
|
+
if (!isCloudTool(file.tool) || !file.cloudPendingTurns?.length) continue;
|
|
51276
51249
|
const runner = this.ensureSession(file);
|
|
51277
51250
|
runner.recoverCloud();
|
|
51278
51251
|
}
|
|
@@ -67532,7 +67505,7 @@ function withBranchIntent(text, branch) {
|
|
|
67532
67505
|
}
|
|
67533
67506
|
function createCloudTurnSession(args) {
|
|
67534
67507
|
const { ctx, sink, client, personaId: personaId2, engine, instructions, engineSessionId, prepare } = args;
|
|
67535
|
-
let conversationId = ctx.cloudConversationId
|
|
67508
|
+
let conversationId = ctx.cloudConversationId;
|
|
67536
67509
|
let closed = false;
|
|
67537
67510
|
let detached = false;
|
|
67538
67511
|
let exited = false;
|
|
@@ -67678,9 +67651,9 @@ function cloudImageInput(deps) {
|
|
|
67678
67651
|
}
|
|
67679
67652
|
function createCloudCodexSession(ctx, sink, deps) {
|
|
67680
67653
|
const personaId2 = personaIdFromCloudCwd(ctx.cwd);
|
|
67681
|
-
if (!personaId2
|
|
67654
|
+
if (!personaId2) {
|
|
67682
67655
|
queueMicrotask(() => {
|
|
67683
|
-
sink.onError(
|
|
67656
|
+
sink.onError("cloud session is missing persona id");
|
|
67684
67657
|
sink.onExit(null);
|
|
67685
67658
|
});
|
|
67686
67659
|
return { startTurn() {
|
|
@@ -68421,9 +68394,9 @@ var PiAdapter = class {
|
|
|
68421
68394
|
// src/tools/pi-cloud-session.ts
|
|
68422
68395
|
function createCloudPiSession(ctx, sink, deps) {
|
|
68423
68396
|
const personaId2 = personaIdFromCloudCwd(ctx.cwd);
|
|
68424
|
-
if (!personaId2
|
|
68397
|
+
if (!personaId2) {
|
|
68425
68398
|
queueMicrotask(() => {
|
|
68426
|
-
sink.onError(
|
|
68399
|
+
sink.onError("cloud session is missing persona id");
|
|
68427
68400
|
sink.onExit(null);
|
|
68428
68401
|
});
|
|
68429
68402
|
return { startTurn() {
|
|
@@ -68514,9 +68487,9 @@ init_protocol();
|
|
|
68514
68487
|
// src/tools/claude-cloud-session.ts
|
|
68515
68488
|
function createCloudClaudeSession(ctx, sink, deps) {
|
|
68516
68489
|
const personaId2 = personaIdFromCloudCwd(ctx.cwd);
|
|
68517
|
-
if (!personaId2
|
|
68490
|
+
if (!personaId2) {
|
|
68518
68491
|
queueMicrotask(() => {
|
|
68519
|
-
sink.onError(
|
|
68492
|
+
sink.onError("cloud session is missing persona id");
|
|
68520
68493
|
sink.onExit(null);
|
|
68521
68494
|
});
|
|
68522
68495
|
return { startTurn() {
|
|
@@ -73733,7 +73706,7 @@ function buildSessionHandlers(deps) {
|
|
|
73733
73706
|
if (engine === "claude" ? !("messageUuid" in forkAt) : !("turnId" in forkAt)) {
|
|
73734
73707
|
throw new ClawdError(ERROR_CODES.VALIDATION_ERROR, `fork: ${source.tool} needs ${engine === "claude" ? "messageUuid" : "turnId"}`);
|
|
73735
73708
|
}
|
|
73736
|
-
const sourceConversationId = source.cloudConversationId
|
|
73709
|
+
const sourceConversationId = source.cloudConversationId;
|
|
73737
73710
|
if (!source.toolSessionId || !sourceConversationId) throw new ClawdError(ERROR_CODES.VALIDATION_ERROR, "fork: \u6E90\u4F1A\u8BDD\u8FD8\u6CA1\u6709\u4E91\u7AEF\u5386\u53F2");
|
|
73738
73711
|
if (source.cloudPendingTurns?.length) throw new ClawdError(ERROR_CODES.VALIDATION_ERROR, "fork: \u8BF7\u7B49\u5F85\u6E90\u4F1A\u8BDD\u5F53\u524D\u4EFB\u52A1\u5B8C\u6210");
|
|
73739
73712
|
const sessionId = newSessionId();
|
|
@@ -75901,7 +75874,7 @@ function buildCloudWorkspaceHandlers(deps) {
|
|
|
75901
75874
|
deps.status(file.sessionId)
|
|
75902
75875
|
) || file.cloudPendingTurns?.length))
|
|
75903
75876
|
throw new ClawdError(ERROR_CODES.VALIDATION_ERROR, "\u8BF7\u7B49\u5F85\u5F53\u524D\u4EFB\u52A1\u5B8C\u6210");
|
|
75904
|
-
const conversationId = file.cloudConversationId ?? file.
|
|
75877
|
+
const conversationId = file.cloudConversationId ?? file.sessionId;
|
|
75905
75878
|
const traceId = typeof frame.requestId === "string" && /^[A-Za-z0-9:_-]{1,128}$/.test(frame.requestId) ? frame.requestId : (0, import_node_crypto29.randomUUID)();
|
|
75906
75879
|
const started = performance.now();
|
|
75907
75880
|
const meta = { traceId, sessionId: args.sessionId, action: args.action };
|
|
@@ -75918,7 +75891,7 @@ function buildCloudWorkspaceHandlers(deps) {
|
|
|
75918
75891
|
await deps.command(file, {
|
|
75919
75892
|
...args,
|
|
75920
75893
|
traceId,
|
|
75921
|
-
workspaceId: file.cloudWorkspace?.workspaceId ??
|
|
75894
|
+
workspaceId: file.cloudWorkspace?.workspaceId ?? conversationId,
|
|
75922
75895
|
conversationId,
|
|
75923
75896
|
...file.toolSessionId ? { threadId: file.toolSessionId } : {}
|
|
75924
75897
|
})
|
|
@@ -76262,7 +76235,7 @@ function computeMethodAccess(args) {
|
|
|
76262
76235
|
}
|
|
76263
76236
|
|
|
76264
76237
|
// src/version.ts
|
|
76265
|
-
var version = "0.2.
|
|
76238
|
+
var version = "0.2.737".length > 0 ? "0.2.737" : "dev";
|
|
76266
76239
|
|
|
76267
76240
|
// src/cli-probe/probe.ts
|
|
76268
76241
|
var fs87 = __toESM(require("fs"), 1);
|