@rubytech/create-maxy 1.0.731 → 1.0.732
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/package.json +1 -1
- package/payload/server/server.js +15 -0
package/package.json
CHANGED
package/payload/server/server.js
CHANGED
|
@@ -7822,6 +7822,7 @@ var session_default2 = app10;
|
|
|
7822
7822
|
|
|
7823
7823
|
// server/routes/admin/chat.ts
|
|
7824
7824
|
import { resolve as resolve12 } from "path";
|
|
7825
|
+
import { appendFileSync as appendFileSync4 } from "fs";
|
|
7825
7826
|
|
|
7826
7827
|
// app/lib/script-stream-tailer.ts
|
|
7827
7828
|
import * as childProcess from "child_process";
|
|
@@ -8268,9 +8269,23 @@ app11.post("/", requireAdminSession, async (c) => {
|
|
|
8268
8269
|
// surfaces on the next yielded event (which never comes if the model
|
|
8269
8270
|
// is mid-response when Cancel is pressed). cancel() is the load-bearing
|
|
8270
8271
|
// hook for operator abort.
|
|
8272
|
+
//
|
|
8273
|
+
// Synchronous trace writes go to BOTH the per-conv stream log (where
|
|
8274
|
+
// operators read) AND console.error (server.log backstop). This lets
|
|
8275
|
+
// us prove definitively whether this callback is even being invoked
|
|
8276
|
+
// by @hono/node-server on disconnect.
|
|
8271
8277
|
cancel(reason) {
|
|
8272
8278
|
const ts = (/* @__PURE__ */ new Date()).toISOString().slice(11, 23);
|
|
8273
8279
|
const reasonStr = typeof reason === "string" ? reason : reason instanceof Error ? reason.message : "consumer-cancelled";
|
|
8280
|
+
const cancelLine = `[${(/* @__PURE__ */ new Date()).toISOString()}] [stream-cancel-callback] sessionKey=${session_key.slice(0, 12)}\u2026 reason=${JSON.stringify(reasonStr)}
|
|
8281
|
+
`;
|
|
8282
|
+
try {
|
|
8283
|
+
const cancelLogKey = sseConvId ?? preflushStreamLogKey(session_key);
|
|
8284
|
+
const path2 = resolve12(account.accountDir, "logs", `claude-agent-stream-${cancelLogKey}.log`);
|
|
8285
|
+
appendFileSync4(path2, cancelLine);
|
|
8286
|
+
} catch {
|
|
8287
|
+
}
|
|
8288
|
+
console.error(cancelLine.trimEnd());
|
|
8274
8289
|
sseLog.write(`[${ts}] [${sk}] admin: CANCEL [stream-cancel] reason=${reasonStr}
|
|
8275
8290
|
`);
|
|
8276
8291
|
interruptClient(session_key).catch((err) => {
|