@rubytech/create-maxy 1.0.731 → 1.0.733

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rubytech/create-maxy",
3
- "version": "1.0.731",
3
+ "version": "1.0.733",
4
4
  "description": "Install Maxy — AI for Productive People",
5
5
  "bin": {
6
6
  "create-maxy": "./dist/index.js"
@@ -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";
@@ -8256,8 +8257,29 @@ app11.post("/", requireAdminSession, async (c) => {
8256
8257
  }
8257
8258
  const encoder = new TextEncoder();
8258
8259
  const sseConvId = getConversationIdForSession(session_key);
8259
- const sseLog = sseConvId ? agentLogStream("sse-events", account.accountDir, sseConvId) : preConversationLogStream("sse-events", account.accountDir);
8260
+ const sseLogStream = sseConvId ? agentLogStream("sse-events", account.accountDir, sseConvId) : preConversationLogStream("sse-events", account.accountDir);
8260
8261
  const sk = sseConvId?.slice(0, 8) ?? session_key.slice(0, 8);
8262
+ const teeStreamLogKey = sseConvId ?? preflushStreamLogKey(session_key);
8263
+ const teeStreamLogPath = resolve12(account.accountDir, "logs", `claude-agent-stream-${teeStreamLogKey}.log`);
8264
+ const sseLog = {
8265
+ write(line) {
8266
+ try {
8267
+ sseLogStream.write(line);
8268
+ } catch {
8269
+ }
8270
+ try {
8271
+ appendFileSync4(teeStreamLogPath, line);
8272
+ } catch {
8273
+ }
8274
+ return true;
8275
+ },
8276
+ end() {
8277
+ try {
8278
+ sseLogStream.end();
8279
+ } catch {
8280
+ }
8281
+ }
8282
+ };
8261
8283
  let tailer = null;
8262
8284
  const readable = new ReadableStream({
8263
8285
  // Task 606 — fires when the consumer (Hono's response writer / Node
@@ -8268,11 +8290,17 @@ app11.post("/", requireAdminSession, async (c) => {
8268
8290
  // surfaces on the next yielded event (which never comes if the model
8269
8291
  // is mid-response when Cancel is pressed). cancel() is the load-bearing
8270
8292
  // hook for operator abort.
8293
+ //
8294
+ // Synchronous trace writes go to BOTH the per-conv stream log (where
8295
+ // operators read) AND console.error (server.log backstop). This lets
8296
+ // us prove definitively whether this callback is even being invoked
8297
+ // by @hono/node-server on disconnect.
8271
8298
  cancel(reason) {
8272
8299
  const ts = (/* @__PURE__ */ new Date()).toISOString().slice(11, 23);
8273
8300
  const reasonStr = typeof reason === "string" ? reason : reason instanceof Error ? reason.message : "consumer-cancelled";
8274
8301
  sseLog.write(`[${ts}] [${sk}] admin: CANCEL [stream-cancel] reason=${reasonStr}
8275
8302
  `);
8303
+ console.error(`[${(/* @__PURE__ */ new Date()).toISOString()}] [stream-cancel-callback] sessionKey=${session_key.slice(0, 12)}\u2026 reason=${JSON.stringify(reasonStr)}`);
8276
8304
  interruptClient(session_key).catch((err) => {
8277
8305
  sseLog.write(`[${ts}] [${sk}] admin: ABORT [interrupt-failed] ${err instanceof Error ? err.message : String(err)}
8278
8306
  `);