@rubytech/create-maxy 1.0.500 → 1.0.501
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 +6 -3
package/package.json
CHANGED
package/payload/server/server.js
CHANGED
|
@@ -5315,6 +5315,9 @@ function getUserIdForSession(sessionKey) {
|
|
|
5315
5315
|
function getUserNameForSession(sessionKey) {
|
|
5316
5316
|
return sessionStore.get(sessionKey)?.userName;
|
|
5317
5317
|
}
|
|
5318
|
+
function getConversationIdForSession(sessionKey) {
|
|
5319
|
+
return sessionStore.get(sessionKey)?.conversationId;
|
|
5320
|
+
}
|
|
5318
5321
|
function registerGrantSession(sessionKey, accountId, agentName, opts) {
|
|
5319
5322
|
sessionStore.set(sessionKey, {
|
|
5320
5323
|
createdAt: Date.now(),
|
|
@@ -8108,7 +8111,7 @@ async function POST2(req) {
|
|
|
8108
8111
|
);
|
|
8109
8112
|
}
|
|
8110
8113
|
const sseLog = agentLogStream("sse-events", account.accountDir);
|
|
8111
|
-
const sk = session_key.slice(0, 8);
|
|
8114
|
+
const sk = getConversationIdForSession(session_key)?.slice(0, 8) ?? session_key.slice(0, 8);
|
|
8112
8115
|
const agentName = getAgentNameForSession(session_key);
|
|
8113
8116
|
if (!agentName) {
|
|
8114
8117
|
console.log(`[chat] no agent for session=${sk} \u2014 session expired or server restarted`);
|
|
@@ -26443,7 +26446,7 @@ async function createAdminSession(accountId, thinkingView, userId, userName) {
|
|
|
26443
26446
|
console.log(`[managed-resume] ${(/* @__PURE__ */ new Date()).toISOString()} conversationId=${conversationId.slice(0, 8)}\u2026 loaded=${loadedMessages} messages (${estimatedTokens} estimated tokens)`);
|
|
26444
26447
|
}
|
|
26445
26448
|
}
|
|
26446
|
-
console.log(`[session] ${(/* @__PURE__ */ new Date()).toISOString()} admin session created: userId=${userId ?? "\u2013"} userName=${userName ?? "\u2013"} accountId=${accountId} conversationId=${conversationId?.slice(0, 8) ?? "\u2013"}`);
|
|
26449
|
+
console.log(`[session] ${(/* @__PURE__ */ new Date()).toISOString()} admin session created: userId=${userId ?? "\u2013"} userName=${userName ?? "\u2013"} accountId=${accountId} conversationId=${conversationId?.slice(0, 8) ?? "\u2013"} sessionKey=${sessionKey.slice(0, 8)}`);
|
|
26447
26450
|
return Response.json({
|
|
26448
26451
|
session_key: sessionKey,
|
|
26449
26452
|
agent_id: "admin",
|
|
@@ -26633,7 +26636,7 @@ async function POST20(req) {
|
|
|
26633
26636
|
}
|
|
26634
26637
|
const encoder = new TextEncoder();
|
|
26635
26638
|
const sseLog = agentLogStream("sse-events", account.accountDir);
|
|
26636
|
-
const sk = session_key.slice(0, 8);
|
|
26639
|
+
const sk = getConversationIdForSession(session_key)?.slice(0, 8) ?? session_key.slice(0, 8);
|
|
26637
26640
|
const readable = new ReadableStream({
|
|
26638
26641
|
async start(controller) {
|
|
26639
26642
|
try {
|