@rubytech/create-realagent 1.0.869 → 1.0.871
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/platform/plugins/admin/mcp/dist/__tests__/public-hostname.test.js +83 -91
- package/payload/platform/plugins/admin/mcp/dist/__tests__/public-hostname.test.js.map +1 -1
- package/payload/platform/plugins/admin/mcp/dist/index.js +7 -10
- package/payload/platform/plugins/admin/mcp/dist/index.js.map +1 -1
- package/payload/platform/plugins/admin/mcp/dist/lib/public-hostname.d.ts +5 -11
- package/payload/platform/plugins/admin/mcp/dist/lib/public-hostname.d.ts.map +1 -1
- package/payload/platform/plugins/admin/mcp/dist/lib/public-hostname.js +66 -47
- package/payload/platform/plugins/admin/mcp/dist/lib/public-hostname.js.map +1 -1
- package/payload/platform/plugins/admin/skills/publish-site/SKILL.md +2 -2
- package/payload/platform/plugins/docs/references/internals.md +1 -1
- package/payload/platform/scripts/__tests__/admin-persist-audit.test.ts +182 -0
- package/payload/platform/scripts/admin-persist-audit.ts +43 -17
- package/payload/server/chunk-5U36PKG4.js +11326 -0
- package/payload/server/chunk-NDEQBCVI.js +1160 -0
- package/payload/server/client-pool-XAEDMS5D.js +34 -0
- package/payload/server/maxy-edge.js +2 -2
- package/payload/server/public/assets/{Checkbox-B9hff9s8.js → Checkbox-CDffo5el.js} +1 -1
- package/payload/server/public/assets/{admin-Cpi6L_g7.js → admin-BSdV45P5.js} +2 -2
- package/payload/server/public/assets/data-vFVtOwuC.js +1 -0
- package/payload/server/public/assets/{graph-labels-ChinGFwI.js → graph-labels-C-KsUF_B.js} +1 -1
- package/payload/server/public/assets/graph-q802cxLY.js +1 -0
- package/payload/server/public/assets/{jsx-runtime-CVA1ZrPS.css → jsx-runtime-C1hGBzVx.css} +1 -1
- package/payload/server/public/assets/{page-OVrxtgOZ.js → page-B5b7tyz-.js} +1 -1
- package/payload/server/public/assets/{page-DqPf65sS.js → page-DsW7P98i.js} +1 -1
- package/payload/server/public/assets/{public-CJN5KAiK.js → public-BkNXx-3G.js} +1 -1
- package/payload/server/public/assets/{useVoiceRecorder-DyVx7e7a.js → useVoiceRecorder-DCVSlfUk.js} +1 -1
- package/payload/server/public/data.html +5 -5
- package/payload/server/public/graph.html +6 -6
- package/payload/server/public/index.html +8 -8
- package/payload/server/public/public.html +5 -5
- package/payload/server/server.js +38 -18
- package/payload/server/public/assets/data-Da6iYRW1.js +0 -1
- package/payload/server/public/assets/graph-BHq-JYwV.js +0 -1
- /package/payload/server/public/assets/{jsx-runtime-nxP_2eNo.js → jsx-runtime-DFrHsKhm.js} +0 -0
package/payload/server/server.js
CHANGED
|
@@ -83,7 +83,7 @@ import {
|
|
|
83
83
|
vncLog,
|
|
84
84
|
waitForExit,
|
|
85
85
|
writeChromiumWrapper
|
|
86
|
-
} from "./chunk-
|
|
86
|
+
} from "./chunk-5U36PKG4.js";
|
|
87
87
|
import {
|
|
88
88
|
agentLogStream,
|
|
89
89
|
clearSessionHistory,
|
|
@@ -110,7 +110,7 @@ import {
|
|
|
110
110
|
sigtermFlushStreamLogs,
|
|
111
111
|
unregisterSession,
|
|
112
112
|
validateSession
|
|
113
|
-
} from "./chunk-
|
|
113
|
+
} from "./chunk-NDEQBCVI.js";
|
|
114
114
|
import {
|
|
115
115
|
CLOUDFLARE_TASK_DIAGNOSTICS,
|
|
116
116
|
appendCloudflareSteps,
|
|
@@ -5205,8 +5205,8 @@ app5.post("/login", async (c) => {
|
|
|
5205
5205
|
console.error(`[access-gate] login ip=${clientIp} agent=${agentSlug} contact=${maskContact(contact)} result=expired_at`);
|
|
5206
5206
|
return c.json({ error: "Access expired", expiresAt: grant.expiresAt }, 403);
|
|
5207
5207
|
}
|
|
5208
|
-
const
|
|
5209
|
-
if (!
|
|
5208
|
+
const verifyResult = await verifyPassword(password, passwordHash);
|
|
5209
|
+
if (!verifyResult.ok) {
|
|
5210
5210
|
recordAccessFailedAttempt(clientIp, agentSlug);
|
|
5211
5211
|
console.error(`[access-gate] login ip=${clientIp} agent=${agentSlug} contact=${maskContact(contact)} result=wrong_password`);
|
|
5212
5212
|
return c.json({ error: "Invalid credentials" }, 401);
|
|
@@ -7439,7 +7439,7 @@ var app11 = new Hono();
|
|
|
7439
7439
|
app11.post("/cancel", requireAdminSession, async (c) => {
|
|
7440
7440
|
const session_key = c.var.sessionKey;
|
|
7441
7441
|
try {
|
|
7442
|
-
const { interruptClient: interruptClient2 } = await import("./client-pool-
|
|
7442
|
+
const { interruptClient: interruptClient2 } = await import("./client-pool-XAEDMS5D.js");
|
|
7443
7443
|
await interruptClient2(session_key);
|
|
7444
7444
|
return c.json({ ok: true });
|
|
7445
7445
|
} catch (err) {
|
|
@@ -8311,9 +8311,22 @@ ${block.text}` : block.text;
|
|
|
8311
8311
|
flushAssistant();
|
|
8312
8312
|
return { messages, jsonlMissing: false, malformedLines };
|
|
8313
8313
|
}
|
|
8314
|
+
function diffJsonlVsNeo4j(jsonl, neo4j4) {
|
|
8315
|
+
const index = /* @__PURE__ */ new Map();
|
|
8316
|
+
for (const n of neo4j4) index.set(`${n.role}${n.content}`, n);
|
|
8317
|
+
const present = /* @__PURE__ */ new Map();
|
|
8318
|
+
const missing = [];
|
|
8319
|
+
for (let i = 0; i < jsonl.length; i++) {
|
|
8320
|
+
const m = index.get(`${jsonl[i].role}${jsonl[i].content}`);
|
|
8321
|
+
if (m) present.set(i, m);
|
|
8322
|
+
else missing.push(i);
|
|
8323
|
+
}
|
|
8324
|
+
return { present, missing };
|
|
8325
|
+
}
|
|
8314
8326
|
function resolveJsonlPath(homeDir, accountDir, agentSessionId) {
|
|
8315
8327
|
const projectKey = "-" + accountDir.split("/").filter(Boolean).join("-");
|
|
8316
|
-
|
|
8328
|
+
const base = process.env.CLAUDE_CONFIG_DIR || `${homeDir}/.claude`;
|
|
8329
|
+
return `${base}/projects/${projectKey}/${agentSessionId}.jsonl`;
|
|
8317
8330
|
}
|
|
8318
8331
|
|
|
8319
8332
|
// server/routes/admin/sessions.ts
|
|
@@ -8597,19 +8610,19 @@ app17.post("/:id/resume", async (c) => {
|
|
|
8597
8610
|
jsonlMissing = replay.jsonlMissing;
|
|
8598
8611
|
jsonlMalformedLines = replay.malformedLines;
|
|
8599
8612
|
jsonlReplayMessages = replay.messages;
|
|
8613
|
+
if (replay.jsonlMissing) {
|
|
8614
|
+
console.error(`[jsonl-resume-miss] sessionKey=${sessionKey.slice(0, 8)}\u2026 conversationId=${conversationId.slice(0, 8)}\u2026 agentSessionId=${persistedAgentSessionId.slice(0, 8)}\u2026 expectedPath=${jsonlPath} configDir=${process.env.CLAUDE_CONFIG_DIR ?? "<unset>"}`);
|
|
8615
|
+
}
|
|
8600
8616
|
} else {
|
|
8601
8617
|
jsonlMissing = true;
|
|
8602
8618
|
}
|
|
8603
8619
|
if (jsonlMissing || jsonlReplayMessages.length === 0) {
|
|
8604
8620
|
messages = neo4jMessages;
|
|
8605
8621
|
} else {
|
|
8606
|
-
const
|
|
8607
|
-
for (const n of neo4jMessages) {
|
|
8608
|
-
neo4jByKey.set(`${n.role}${n.content}`, n);
|
|
8609
|
-
}
|
|
8622
|
+
const diff = diffJsonlVsNeo4j(jsonlReplayMessages, neo4jMessages);
|
|
8610
8623
|
const healQueue = [];
|
|
8611
|
-
messages = jsonlReplayMessages.map((j) => {
|
|
8612
|
-
const match =
|
|
8624
|
+
messages = jsonlReplayMessages.map((j, idx) => {
|
|
8625
|
+
const match = diff.present.get(idx);
|
|
8613
8626
|
if (match) {
|
|
8614
8627
|
const mergedComponents = j.components.map((c2, i) => {
|
|
8615
8628
|
const neoComp = match.components?.[i];
|
|
@@ -12821,12 +12834,13 @@ app38.post("/__remote-auth/login", async (c) => {
|
|
|
12821
12834
|
const rawRedirect = params.get("redirect")?.trim() || "/";
|
|
12822
12835
|
const redirect = rawRedirect.startsWith("/") && !rawRedirect.startsWith("//") ? rawRedirect : "/";
|
|
12823
12836
|
if (!password) {
|
|
12837
|
+
console.error(`[remote-auth] login failed ip=${clientIp} why=empty-input hashBytes=0`);
|
|
12824
12838
|
return c.html(renderLoginPage({ ...resolveRemoteAuthOpts(), error: "Password is required", redirect }), 200);
|
|
12825
12839
|
}
|
|
12826
|
-
const
|
|
12827
|
-
if (!
|
|
12840
|
+
const outcome = await verifyRemotePassword(password);
|
|
12841
|
+
if (!outcome.ok) {
|
|
12828
12842
|
recordFailedAttempt(client);
|
|
12829
|
-
console.error(`[remote-auth] login failed ip=${clientIp}`);
|
|
12843
|
+
console.error(`[remote-auth] login failed ip=${clientIp} why=${outcome.why} hashBytes=${outcome.hashBytes}`);
|
|
12830
12844
|
return c.html(renderLoginPage({ ...resolveRemoteAuthOpts(), error: "Invalid credentials", redirect }), 200);
|
|
12831
12845
|
}
|
|
12832
12846
|
clearRateLimit(client);
|
|
@@ -12843,6 +12857,9 @@ app38.post("/__remote-auth/login", async (c) => {
|
|
|
12843
12857
|
});
|
|
12844
12858
|
});
|
|
12845
12859
|
app38.get("/__remote-auth/logout", (c) => {
|
|
12860
|
+
const client = clientFrom(c);
|
|
12861
|
+
const clientIp = client.ip || "unknown";
|
|
12862
|
+
console.error(`[remote-auth] logout ip=${clientIp}`);
|
|
12846
12863
|
return new Response(null, {
|
|
12847
12864
|
status: 302,
|
|
12848
12865
|
headers: {
|
|
@@ -12871,12 +12888,13 @@ app38.post("/__remote-auth/change-password", async (c) => {
|
|
|
12871
12888
|
const rawRedirect = params.get("redirect")?.trim() || "/";
|
|
12872
12889
|
const redirect = rawRedirect.startsWith("/") && !rawRedirect.startsWith("//") ? rawRedirect : "/";
|
|
12873
12890
|
if (!currentPassword || !newPassword || !confirmPassword) {
|
|
12891
|
+
console.error(`[remote-auth] change-password failed ip=${clientIp} why=empty-input hashBytes=0`);
|
|
12874
12892
|
return c.html(renderLoginPage({ ...resolveRemoteAuthOpts(), mode: "change", changeError: "All fields are required", redirect }), 200);
|
|
12875
12893
|
}
|
|
12876
|
-
const
|
|
12877
|
-
if (!
|
|
12894
|
+
const outcome = await verifyRemotePassword(currentPassword);
|
|
12895
|
+
if (!outcome.ok) {
|
|
12878
12896
|
recordFailedAttempt(client);
|
|
12879
|
-
console.error(`[remote-auth] change-password failed
|
|
12897
|
+
console.error(`[remote-auth] change-password failed ip=${clientIp} why=${outcome.why} hashBytes=${outcome.hashBytes}`);
|
|
12880
12898
|
return c.html(renderLoginPage({ ...resolveRemoteAuthOpts(), mode: "change", changeError: "Current password is incorrect", redirect }), 200);
|
|
12881
12899
|
}
|
|
12882
12900
|
if (newPassword !== confirmPassword) {
|
|
@@ -12920,6 +12938,8 @@ app38.post("/__remote-auth/set-initial-password", async (c) => {
|
|
|
12920
12938
|
const password = params.get("password") ?? "";
|
|
12921
12939
|
const confirmPassword = params.get("confirm_password") ?? "";
|
|
12922
12940
|
if (!password || !confirmPassword) {
|
|
12941
|
+
const clientIp = c.var.clientIp || "unknown";
|
|
12942
|
+
console.error(`[remote-auth] set-initial-password failed ip=${clientIp} why=empty-input hashBytes=0`);
|
|
12923
12943
|
return c.html(renderLoginPage({ ...resolveRemoteAuthOpts(), mode: "setup", setupError: "Both fields are required" }), 200);
|
|
12924
12944
|
}
|
|
12925
12945
|
if (password !== confirmPassword) {
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{i as e,t}from"./jsx-runtime-nxP_2eNo.js";import{t as n}from"./page-OVrxtgOZ.js";import"./graph-labels-ChinGFwI.js";var r=e(),i=t();(0,r.createRoot)(document.getElementById(`root`)).render((0,i.jsx)(n,{}));
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{i as e,t}from"./jsx-runtime-nxP_2eNo.js";import{n}from"./page-DqPf65sS.js";import"./graph-labels-ChinGFwI.js";import"./Checkbox-B9hff9s8.js";var r=e(),i=t();(0,r.createRoot)(document.getElementById(`root`)).render((0,i.jsx)(n,{}));
|
|
File without changes
|