@clawos-dev/clawd 0.2.736 → 0.2.738
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 +44 -69
- package/dist/cloud-persona-conversations.html +1 -1
- package/dist/dispatch/mcp-server.cjs +0 -6
- package/dist/owner-ui/assets/{owner-mzEAQzXi.js → owner-DqXBCm9I.js} +48 -48
- package/dist/owner-ui/owner.html +1 -1
- 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-ui/assets/{guest-ZZ40J2_L.js → guest-Cbaz1yVH.js} +33 -33
- package/dist/share-ui/guest.html +1 -1
- package/package.json +1 -1
|
@@ -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) {
|
|
@@ -48146,7 +48140,8 @@ function deliverUserText(next, args, deps) {
|
|
|
48146
48140
|
} else {
|
|
48147
48141
|
effects.push({
|
|
48148
48142
|
kind: "write-stdin",
|
|
48149
|
-
payload: deps.encodeStdin(args.text, { sessionId: next.file.sessionId })
|
|
48143
|
+
payload: deps.encodeStdin(args.text, { sessionId: next.file.sessionId }),
|
|
48144
|
+
...userEvent.uuid ? { userMessageId: userEvent.uuid } : {}
|
|
48150
48145
|
});
|
|
48151
48146
|
}
|
|
48152
48147
|
return effects;
|
|
@@ -48201,14 +48196,11 @@ function buildSpawnContext(state, deps) {
|
|
|
48201
48196
|
const mcpConfigs = deps.getMcpConfigs?.() ?? [];
|
|
48202
48197
|
const ctx = {
|
|
48203
48198
|
cwd: file.cwd,
|
|
48204
|
-
cloudExecutionId: file.cloudExecutionId,
|
|
48205
48199
|
...file.cloudWorkspace ? { cloudWorkspace: file.cloudWorkspace } : {},
|
|
48206
48200
|
...file.cloudEnvironment ? { cloudEnvironment: file.cloudEnvironment } : {},
|
|
48207
48201
|
...file.cloudExpectedImage ? { cloudExpectedImage: file.cloudExpectedImage } : {},
|
|
48208
48202
|
...file.testReleaseId ? { testReleaseId: file.testReleaseId } : {},
|
|
48209
48203
|
...file.cloudConversationId ? { cloudConversationId: file.cloudConversationId } : {},
|
|
48210
|
-
...file.cloudPendingCommand && !file.cloudPendingTurns ? { cloudLegacyPendingCommand: true } : {},
|
|
48211
|
-
cloudGatewaySessionId: file.cloudGatewaySessionId,
|
|
48212
48204
|
toolSessionId: file.toolSessionId,
|
|
48213
48205
|
model: file.model,
|
|
48214
48206
|
permissionMode: file.permissionMode,
|
|
@@ -48459,17 +48451,16 @@ function pushEventToBufferInPlace(next, event, deps) {
|
|
|
48459
48451
|
}
|
|
48460
48452
|
if (isUserText || isTurnEnd) {
|
|
48461
48453
|
const cloudTurnId = isUserText ? withSeq.uuid ?? `${next.file.sessionId}-${seq}` : void 0;
|
|
48462
|
-
const cloudPerTurn = isCloudTool(next.file.tool)
|
|
48454
|
+
const cloudPerTurn = isCloudTool(next.file.tool);
|
|
48463
48455
|
next.file = {
|
|
48464
48456
|
...next.file,
|
|
48465
48457
|
updatedAt: nowIso(deps),
|
|
48466
48458
|
// Only a local send carries `sender`. A user_text echoed by the engine stream (skill hint, interrupt marker) has no
|
|
48467
48459
|
// turn stream of its own, so recording it would leave a pending turn that startup recovery replays to the Pod.
|
|
48468
48460
|
...cloudPerTurn && isUserText && withSeq.sender && next.status !== "error" ? {
|
|
48469
|
-
cloudConversationId: next.file.cloudConversationId ??
|
|
48461
|
+
cloudConversationId: next.file.cloudConversationId ?? cloudTurnId,
|
|
48470
48462
|
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 } : {}
|
|
48463
|
+
} : {}
|
|
48473
48464
|
};
|
|
48474
48465
|
effects.push({ kind: "persist-file", file: next.file });
|
|
48475
48466
|
effects.push(sessionInfoFrame(next.file));
|
|
@@ -48534,7 +48525,7 @@ function applyCommand(state, command, deps) {
|
|
|
48534
48525
|
const sessionId = next.file.sessionId;
|
|
48535
48526
|
switch (command.kind) {
|
|
48536
48527
|
case "send": {
|
|
48537
|
-
if (command.queueWhileRunning && !
|
|
48528
|
+
if (command.queueWhileRunning && !isCloudTool(next.file.tool) && (next.status === "running" || next.status === "spawning")) {
|
|
48538
48529
|
next.queuedSends = [
|
|
48539
48530
|
...next.queuedSends,
|
|
48540
48531
|
{
|
|
@@ -48585,8 +48576,8 @@ function applyCommand(state, command, deps) {
|
|
|
48585
48576
|
return { state: next, effects };
|
|
48586
48577
|
}
|
|
48587
48578
|
case "stop": {
|
|
48588
|
-
if (isCloudTool(next.file.tool) &&
|
|
48589
|
-
next.file = { ...next.file,
|
|
48579
|
+
if (isCloudTool(next.file.tool) && next.file.cloudPendingTurns?.length) {
|
|
48580
|
+
next.file = { ...next.file, cloudPendingTurns: void 0 };
|
|
48590
48581
|
effects.push({ kind: "persist-file", file: next.file }, sessionInfoFrame(next.file));
|
|
48591
48582
|
}
|
|
48592
48583
|
for (const toolUseId of Object.keys(state.pendingQuestions ?? {})) {
|
|
@@ -48722,11 +48713,10 @@ function applyCommand(state, command, deps) {
|
|
|
48722
48713
|
case "new": {
|
|
48723
48714
|
const {
|
|
48724
48715
|
toolSessionId: _drop,
|
|
48725
|
-
cloudPendingCommand: _cloudPendingCommand,
|
|
48726
|
-
cloudGatewaySessionId: _cloudGatewaySessionId,
|
|
48727
48716
|
cloudConversationId: _cloudConversationId,
|
|
48728
48717
|
cloudPendingTurns: _cloudPendingTurns,
|
|
48729
|
-
|
|
48718
|
+
cloudWorkspace: _cloudWorkspace,
|
|
48719
|
+
cloudBranchIntent: _cloudBranchIntent,
|
|
48730
48720
|
contextUsage: _ctx,
|
|
48731
48721
|
contextWindowSize: _win,
|
|
48732
48722
|
gitBranch: _branch,
|
|
@@ -48737,11 +48727,10 @@ function applyCommand(state, command, deps) {
|
|
|
48737
48727
|
...rest
|
|
48738
48728
|
} = next.file;
|
|
48739
48729
|
void _drop;
|
|
48740
|
-
void _cloudPendingCommand;
|
|
48741
|
-
void _cloudGatewaySessionId;
|
|
48742
48730
|
void _cloudConversationId;
|
|
48743
48731
|
void _cloudPendingTurns;
|
|
48744
|
-
void
|
|
48732
|
+
void _cloudWorkspace;
|
|
48733
|
+
void _cloudBranchIntent;
|
|
48745
48734
|
void _ctx;
|
|
48746
48735
|
void _win;
|
|
48747
48736
|
void _branch;
|
|
@@ -48751,6 +48740,7 @@ function applyCommand(state, command, deps) {
|
|
|
48751
48740
|
const nextFile = {
|
|
48752
48741
|
...rest,
|
|
48753
48742
|
...command.nextToolSessionId ? { toolSessionId: command.nextToolSessionId } : {},
|
|
48743
|
+
...command.nextCloudConversationId ? { cloudConversationId: command.nextCloudConversationId } : {},
|
|
48754
48744
|
updatedAt: nowIso(deps)
|
|
48755
48745
|
};
|
|
48756
48746
|
next.file = nextFile;
|
|
@@ -48821,12 +48811,6 @@ function reduceSessionInner(state, input, deps) {
|
|
|
48821
48811
|
case "proc-exit": {
|
|
48822
48812
|
const next = cloneState(state);
|
|
48823
48813
|
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
48814
|
const cloudFileChanged = next.file !== state.file;
|
|
48831
48815
|
next.status = "stopped";
|
|
48832
48816
|
next.stdinClosed = false;
|
|
@@ -49382,8 +49366,6 @@ var SessionRunner = class {
|
|
|
49382
49366
|
this.recoveringCloud = true;
|
|
49383
49367
|
try {
|
|
49384
49368
|
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
49369
|
for (const turn of this.state.file.cloudPendingTurns ?? []) {
|
|
49388
49370
|
const payload = turn.prepared ? null : this.hooks.store.readCloudPayload(this.state.file.sessionId, turn.id);
|
|
49389
49371
|
this.session?.startTurn(payload ?? turn.text, turn.id, payload !== null || turn.prepared === true);
|
|
@@ -49614,7 +49596,7 @@ var SessionRunner = class {
|
|
|
49614
49596
|
}
|
|
49615
49597
|
case "write-stdin":
|
|
49616
49598
|
if (this.session) {
|
|
49617
|
-
this.session.startTurn(effect.payload, this.state.file.cloudPendingTurns?.at(-1)?.id
|
|
49599
|
+
this.session.startTurn(effect.payload, this.state.file.cloudPendingTurns?.at(-1)?.id, void 0, effect.userMessageId);
|
|
49618
49600
|
break;
|
|
49619
49601
|
}
|
|
49620
49602
|
this.hooks.logger?.debug("[RG] write-stdin", {
|
|
@@ -49773,11 +49755,9 @@ var SessionRunner = class {
|
|
|
49773
49755
|
},
|
|
49774
49756
|
onCommandPrepared: (commandId, text, prepared) => {
|
|
49775
49757
|
if (!isCurrent()) return false;
|
|
49776
|
-
const pending = this.state.file.cloudPendingTurns?.find((turn) => turn.id === commandId)
|
|
49758
|
+
const pending = this.state.file.cloudPendingTurns?.find((turn) => turn.id === commandId);
|
|
49777
49759
|
if (!pending || pending.id !== commandId) return false;
|
|
49778
|
-
if (!prepared
|
|
49779
|
-
this.hooks.store.writeCloudPayload(this.state.file.sessionId, commandId, text);
|
|
49780
|
-
}
|
|
49760
|
+
if (!prepared) this.hooks.store.writeCloudPayload(this.state.file.sessionId, commandId, text);
|
|
49781
49761
|
return true;
|
|
49782
49762
|
},
|
|
49783
49763
|
onCloudTurnTerminal: (turnId) => {
|
|
@@ -49984,7 +49964,7 @@ var SessionManager = class {
|
|
|
49984
49964
|
* call, and a failed cancel must not block the local action (offline / logged out / gateway errors).
|
|
49985
49965
|
*/
|
|
49986
49966
|
async cancelCloudTurns(file, runner) {
|
|
49987
|
-
const inFlight =
|
|
49967
|
+
const inFlight = file.cloudConversationId && file.cloudPendingTurns?.length;
|
|
49988
49968
|
if (!inFlight) {
|
|
49989
49969
|
runner?.confirmCloudCancelled();
|
|
49990
49970
|
return;
|
|
@@ -50991,7 +50971,7 @@ var SessionManager = class {
|
|
|
50991
50971
|
const runner = this.runners.get(args.sessionId);
|
|
50992
50972
|
if (file && isCloudTool(file.tool)) await this.cancelCloudTurns(file, runner ?? null);
|
|
50993
50973
|
if (!runner) {
|
|
50994
|
-
if (file && isCloudTool(file.tool) &&
|
|
50974
|
+
if (file && isCloudTool(file.tool) && file.cloudPendingTurns?.length) this.writeOwned({ ...file, cloudPendingTurns: void 0 });
|
|
50995
50975
|
return { response: { ok: true }, broadcast: [] };
|
|
50996
50976
|
}
|
|
50997
50977
|
this.clearPendingTurnEnd(args.sessionId);
|
|
@@ -51132,11 +51112,7 @@ var SessionManager = class {
|
|
|
51132
51112
|
}
|
|
51133
51113
|
newSession(args) {
|
|
51134
51114
|
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
|
-
);
|
|
51115
|
+
const nextCloudConversationId = isCloudTool(existingFile.tool) ? (0, import_node_crypto6.randomUUID)() : void 0;
|
|
51140
51116
|
this.titleGenPending.get(args.sessionId)?.abort();
|
|
51141
51117
|
this.titleGenPending.delete(args.sessionId);
|
|
51142
51118
|
const nextToolSessionId = this.deps.mode === "tui" && (existingFile.tool ?? "claude") === "claude" ? (0, import_node_crypto6.randomUUID)() : void 0;
|
|
@@ -51146,7 +51122,11 @@ var SessionManager = class {
|
|
|
51146
51122
|
const { value, broadcast } = this.withCollector(() => {
|
|
51147
51123
|
runner.input({
|
|
51148
51124
|
kind: "command",
|
|
51149
|
-
command: {
|
|
51125
|
+
command: {
|
|
51126
|
+
kind: "new",
|
|
51127
|
+
...nextToolSessionId ? { nextToolSessionId } : {},
|
|
51128
|
+
...nextCloudConversationId ? { nextCloudConversationId } : {}
|
|
51129
|
+
}
|
|
51150
51130
|
});
|
|
51151
51131
|
return runner.getState().file;
|
|
51152
51132
|
});
|
|
@@ -51155,11 +51135,10 @@ var SessionManager = class {
|
|
|
51155
51135
|
const existing = this.findOwnedSession(args.sessionId);
|
|
51156
51136
|
const {
|
|
51157
51137
|
toolSessionId: _drop,
|
|
51158
|
-
cloudPendingCommand: _cloudPendingCommand,
|
|
51159
|
-
cloudGatewaySessionId: _cloudGatewaySessionId,
|
|
51160
51138
|
cloudConversationId: _cloudConversationId,
|
|
51161
51139
|
cloudPendingTurns: _cloudPendingTurns,
|
|
51162
|
-
|
|
51140
|
+
cloudWorkspace: _cloudWorkspace,
|
|
51141
|
+
cloudBranchIntent: _cloudBranchIntent,
|
|
51163
51142
|
contextUsage: _ctx,
|
|
51164
51143
|
contextWindowSize: _win,
|
|
51165
51144
|
gitBranch: _branch,
|
|
@@ -51169,11 +51148,10 @@ var SessionManager = class {
|
|
|
51169
51148
|
...rest
|
|
51170
51149
|
} = existing;
|
|
51171
51150
|
void _drop;
|
|
51172
|
-
void _cloudPendingCommand;
|
|
51173
|
-
void _cloudGatewaySessionId;
|
|
51174
51151
|
void _cloudConversationId;
|
|
51175
51152
|
void _cloudPendingTurns;
|
|
51176
|
-
void
|
|
51153
|
+
void _cloudWorkspace;
|
|
51154
|
+
void _cloudBranchIntent;
|
|
51177
51155
|
void _ctx;
|
|
51178
51156
|
void _win;
|
|
51179
51157
|
void _branch;
|
|
@@ -51183,17 +51161,13 @@ var SessionManager = class {
|
|
|
51183
51161
|
const updated = {
|
|
51184
51162
|
...rest,
|
|
51185
51163
|
...nextToolSessionId ? { toolSessionId: nextToolSessionId } : {},
|
|
51164
|
+
...nextCloudConversationId ? { cloudConversationId: nextCloudConversationId } : {},
|
|
51186
51165
|
updatedAt: nowIso2(this.deps)
|
|
51187
51166
|
};
|
|
51188
51167
|
return { response: this.writeOwned(updated), broadcast: [] };
|
|
51189
51168
|
}
|
|
51190
51169
|
async newSessionWithCloudCancel(args) {
|
|
51191
51170
|
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
51171
|
if (isCloudTool(file.tool)) {
|
|
51198
51172
|
await this.cancelCloudTurns(file, this.runners.get(args.sessionId) ?? null);
|
|
51199
51173
|
return this.newSession(args);
|
|
@@ -51272,7 +51246,7 @@ var SessionManager = class {
|
|
|
51272
51246
|
/** Reattach only to executions whose last turn lacks a durable end marker. */
|
|
51273
51247
|
recoverCloudSessions() {
|
|
51274
51248
|
for (const file of this.listAllOwned()) {
|
|
51275
|
-
if (!isCloudTool(file.tool) || !file.
|
|
51249
|
+
if (!isCloudTool(file.tool) || !file.cloudPendingTurns?.length) continue;
|
|
51276
51250
|
const runner = this.ensureSession(file);
|
|
51277
51251
|
runner.recoverCloud();
|
|
51278
51252
|
}
|
|
@@ -54991,7 +54965,7 @@ function driveCodexThread(opts) {
|
|
|
54991
54965
|
}
|
|
54992
54966
|
})().catch((e) => sink.onError(`codex app-server init failed: ${e.message}`));
|
|
54993
54967
|
const session = {
|
|
54994
|
-
startTurn(text) {
|
|
54968
|
+
startTurn(text, _commandId, _prepared, userMessageId) {
|
|
54995
54969
|
const trace = opts.onTurnTrace?.();
|
|
54996
54970
|
trace?.("native.ready.waiting");
|
|
54997
54971
|
const model = opts.turnModel?.();
|
|
@@ -55009,6 +54983,7 @@ function driveCodexThread(opts) {
|
|
|
55009
54983
|
void client.request("turn/start", {
|
|
55010
54984
|
threadId,
|
|
55011
54985
|
input: turnStartInput(text, opts.imageInput),
|
|
54986
|
+
...userMessageId ? { clientUserMessageId: userMessageId } : {},
|
|
55012
54987
|
// Wire field is effort (v2 already used it before 0.138); unknown reasoningEffort is silently ignored.
|
|
55013
54988
|
...effort ? { effort } : {},
|
|
55014
54989
|
...model ? { model } : {}
|
|
@@ -67532,7 +67507,7 @@ function withBranchIntent(text, branch) {
|
|
|
67532
67507
|
}
|
|
67533
67508
|
function createCloudTurnSession(args) {
|
|
67534
67509
|
const { ctx, sink, client, personaId: personaId2, engine, instructions, engineSessionId, prepare } = args;
|
|
67535
|
-
let conversationId = ctx.cloudConversationId
|
|
67510
|
+
let conversationId = ctx.cloudConversationId;
|
|
67536
67511
|
let closed = false;
|
|
67537
67512
|
let detached = false;
|
|
67538
67513
|
let exited = false;
|
|
@@ -67678,9 +67653,9 @@ function cloudImageInput(deps) {
|
|
|
67678
67653
|
}
|
|
67679
67654
|
function createCloudCodexSession(ctx, sink, deps) {
|
|
67680
67655
|
const personaId2 = personaIdFromCloudCwd(ctx.cwd);
|
|
67681
|
-
if (!personaId2
|
|
67656
|
+
if (!personaId2) {
|
|
67682
67657
|
queueMicrotask(() => {
|
|
67683
|
-
sink.onError(
|
|
67658
|
+
sink.onError("cloud session is missing persona id");
|
|
67684
67659
|
sink.onExit(null);
|
|
67685
67660
|
});
|
|
67686
67661
|
return { startTurn() {
|
|
@@ -68421,9 +68396,9 @@ var PiAdapter = class {
|
|
|
68421
68396
|
// src/tools/pi-cloud-session.ts
|
|
68422
68397
|
function createCloudPiSession(ctx, sink, deps) {
|
|
68423
68398
|
const personaId2 = personaIdFromCloudCwd(ctx.cwd);
|
|
68424
|
-
if (!personaId2
|
|
68399
|
+
if (!personaId2) {
|
|
68425
68400
|
queueMicrotask(() => {
|
|
68426
|
-
sink.onError(
|
|
68401
|
+
sink.onError("cloud session is missing persona id");
|
|
68427
68402
|
sink.onExit(null);
|
|
68428
68403
|
});
|
|
68429
68404
|
return { startTurn() {
|
|
@@ -68514,9 +68489,9 @@ init_protocol();
|
|
|
68514
68489
|
// src/tools/claude-cloud-session.ts
|
|
68515
68490
|
function createCloudClaudeSession(ctx, sink, deps) {
|
|
68516
68491
|
const personaId2 = personaIdFromCloudCwd(ctx.cwd);
|
|
68517
|
-
if (!personaId2
|
|
68492
|
+
if (!personaId2) {
|
|
68518
68493
|
queueMicrotask(() => {
|
|
68519
|
-
sink.onError(
|
|
68494
|
+
sink.onError("cloud session is missing persona id");
|
|
68520
68495
|
sink.onExit(null);
|
|
68521
68496
|
});
|
|
68522
68497
|
return { startTurn() {
|
|
@@ -73733,7 +73708,7 @@ function buildSessionHandlers(deps) {
|
|
|
73733
73708
|
if (engine === "claude" ? !("messageUuid" in forkAt) : !("turnId" in forkAt)) {
|
|
73734
73709
|
throw new ClawdError(ERROR_CODES.VALIDATION_ERROR, `fork: ${source.tool} needs ${engine === "claude" ? "messageUuid" : "turnId"}`);
|
|
73735
73710
|
}
|
|
73736
|
-
const sourceConversationId = source.cloudConversationId
|
|
73711
|
+
const sourceConversationId = source.cloudConversationId;
|
|
73737
73712
|
if (!source.toolSessionId || !sourceConversationId) throw new ClawdError(ERROR_CODES.VALIDATION_ERROR, "fork: \u6E90\u4F1A\u8BDD\u8FD8\u6CA1\u6709\u4E91\u7AEF\u5386\u53F2");
|
|
73738
73713
|
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
73714
|
const sessionId = newSessionId();
|
|
@@ -75901,7 +75876,7 @@ function buildCloudWorkspaceHandlers(deps) {
|
|
|
75901
75876
|
deps.status(file.sessionId)
|
|
75902
75877
|
) || file.cloudPendingTurns?.length))
|
|
75903
75878
|
throw new ClawdError(ERROR_CODES.VALIDATION_ERROR, "\u8BF7\u7B49\u5F85\u5F53\u524D\u4EFB\u52A1\u5B8C\u6210");
|
|
75904
|
-
const conversationId = file.cloudConversationId ?? file.
|
|
75879
|
+
const conversationId = file.cloudConversationId ?? file.sessionId;
|
|
75905
75880
|
const traceId = typeof frame.requestId === "string" && /^[A-Za-z0-9:_-]{1,128}$/.test(frame.requestId) ? frame.requestId : (0, import_node_crypto29.randomUUID)();
|
|
75906
75881
|
const started = performance.now();
|
|
75907
75882
|
const meta = { traceId, sessionId: args.sessionId, action: args.action };
|
|
@@ -75918,7 +75893,7 @@ function buildCloudWorkspaceHandlers(deps) {
|
|
|
75918
75893
|
await deps.command(file, {
|
|
75919
75894
|
...args,
|
|
75920
75895
|
traceId,
|
|
75921
|
-
workspaceId: file.cloudWorkspace?.workspaceId ??
|
|
75896
|
+
workspaceId: file.cloudWorkspace?.workspaceId ?? conversationId,
|
|
75922
75897
|
conversationId,
|
|
75923
75898
|
...file.toolSessionId ? { threadId: file.toolSessionId } : {}
|
|
75924
75899
|
})
|
|
@@ -76262,7 +76237,7 @@ function computeMethodAccess(args) {
|
|
|
76262
76237
|
}
|
|
76263
76238
|
|
|
76264
76239
|
// src/version.ts
|
|
76265
|
-
var version = "0.2.
|
|
76240
|
+
var version = "0.2.738".length > 0 ? "0.2.738" : "dev";
|
|
76266
76241
|
|
|
76267
76242
|
// src/cli-probe/probe.ts
|
|
76268
76243
|
var fs87 = __toESM(require("fs"), 1);
|