@clawos-dev/clawd 0.2.133-beta.275.ba80f7e → 0.2.133-beta.276.da37eee
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 +12 -6
- package/package.json +1 -1
package/dist/cli.cjs
CHANGED
|
@@ -35241,8 +35241,9 @@ var CodexAppServerClient = class {
|
|
|
35241
35241
|
notify(method, params) {
|
|
35242
35242
|
this.write({ jsonrpc: "2.0", method, params });
|
|
35243
35243
|
}
|
|
35244
|
+
// server-request 的响应也必须带 jsonrpc:'2.0',否则 codex app-server 忽略它 → 审批/问答永远卡住。
|
|
35244
35245
|
respond(id, result) {
|
|
35245
|
-
this.write({ id, result });
|
|
35246
|
+
this.write({ jsonrpc: "2.0", id, result });
|
|
35246
35247
|
}
|
|
35247
35248
|
onLine(line) {
|
|
35248
35249
|
const t = line.trim();
|
|
@@ -35459,9 +35460,12 @@ function createCodexSession(ctx, sink, deps = {}) {
|
|
|
35459
35460
|
if (method === "tool/requestUserInput") {
|
|
35460
35461
|
const reqId = String(id);
|
|
35461
35462
|
approvalIds.set(reqId, id);
|
|
35462
|
-
const
|
|
35463
|
-
|
|
35464
|
-
|
|
35463
|
+
const qs = Array.isArray(p2.questions) ? p2.questions.map((q) => ({
|
|
35464
|
+
id: String(q.id ?? ""),
|
|
35465
|
+
question: String(q.question ?? "")
|
|
35466
|
+
})) : [];
|
|
35467
|
+
pendingQuestions.set(reqId, qs);
|
|
35468
|
+
const questions = qs.map(({ question }) => ({
|
|
35465
35469
|
question,
|
|
35466
35470
|
multiSelect: false,
|
|
35467
35471
|
options: []
|
|
@@ -35511,7 +35515,7 @@ ${text}` : text;
|
|
|
35511
35515
|
const id = approvalIds.get(requestId);
|
|
35512
35516
|
if (id === void 0) return;
|
|
35513
35517
|
approvalIds.delete(requestId);
|
|
35514
|
-
client.respond(id, allow ? "accept" : "
|
|
35518
|
+
client.respond(id, { decision: allow ? "accept" : "decline" });
|
|
35515
35519
|
},
|
|
35516
35520
|
answerQuestion(requestId, answers) {
|
|
35517
35521
|
const id = approvalIds.get(requestId);
|
|
@@ -35519,7 +35523,9 @@ ${text}` : text;
|
|
|
35519
35523
|
approvalIds.delete(requestId);
|
|
35520
35524
|
const qs = pendingQuestions.get(requestId) ?? [];
|
|
35521
35525
|
pendingQuestions.delete(requestId);
|
|
35522
|
-
|
|
35526
|
+
const answerMap = {};
|
|
35527
|
+
for (const q of qs) answerMap[q.id] = { answers: [answers[q.question] ?? ""] };
|
|
35528
|
+
client.respond(id, { answers: answerMap });
|
|
35523
35529
|
},
|
|
35524
35530
|
interrupt() {
|
|
35525
35531
|
if (threadId && turnId) void client.request("turn/interrupt", { threadId, turnId }).catch(() => {
|
package/package.json
CHANGED