@rubytech/create-realagent 1.0.814 → 1.0.815
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/skills/onboarding/SKILL.md +2 -0
- package/payload/platform/plugins/docs/references/cloudflare.md +2 -0
- package/payload/server/chunk-42BMMSRN.js +10066 -0
- package/payload/server/chunk-52LIWKMM.js +1032 -0
- package/payload/server/client-pool-AIYWSJBR.js +31 -0
- package/payload/server/maxy-edge.js +2 -2
- package/payload/server/public/assets/{admin-DfuHw_TQ.js → admin-CTb65MiO.js} +60 -60
- package/payload/server/public/index.html +1 -1
- package/payload/server/server.js +60 -3
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
6
6
|
<title>Real Agent</title>
|
|
7
7
|
<link rel="icon" href="/favicon.ico">
|
|
8
|
-
<script type="module" crossorigin src="/assets/admin-
|
|
8
|
+
<script type="module" crossorigin src="/assets/admin-CTb65MiO.js"></script>
|
|
9
9
|
<link rel="modulepreload" crossorigin href="/assets/chunk-DD-I1_y5.js">
|
|
10
10
|
<link rel="modulepreload" crossorigin href="/assets/jsx-runtime-BZMOvG0f.js">
|
|
11
11
|
<link rel="modulepreload" crossorigin href="/assets/preload-helper-qlgyTAkD.js">
|
package/payload/server/server.js
CHANGED
|
@@ -53,7 +53,7 @@ import {
|
|
|
53
53
|
vncLog,
|
|
54
54
|
waitForExit,
|
|
55
55
|
writeChromiumWrapper
|
|
56
|
-
} from "./chunk-
|
|
56
|
+
} from "./chunk-42BMMSRN.js";
|
|
57
57
|
import {
|
|
58
58
|
agentLogStream,
|
|
59
59
|
clearSessionHistory,
|
|
@@ -81,7 +81,7 @@ import {
|
|
|
81
81
|
sigtermFlushStreamLogs,
|
|
82
82
|
unregisterSession,
|
|
83
83
|
validateSession
|
|
84
|
-
} from "./chunk-
|
|
84
|
+
} from "./chunk-52LIWKMM.js";
|
|
85
85
|
import {
|
|
86
86
|
ACCOUNTS_DIR,
|
|
87
87
|
GREETING_DIRECTIVE,
|
|
@@ -829,6 +829,30 @@ function defaultRules() {
|
|
|
829
829
|
thresholdWindowMinutes: 0,
|
|
830
830
|
suggestedAction: "[Task 867] cloudflare-setup completed but the post-action relay never reached the chat history. Check `[action-relay-queue] phase=enqueued` (queue write), `[action-completion-relay] phase=consumed` (boot-drain ran), and `[persist] role=user \u2026 Cloudflare setup completed` (graph write). One of those is missing; the matching grep recipe is in the Task 867 brief Observability section."
|
|
831
831
|
},
|
|
832
|
+
{
|
|
833
|
+
// Task 879 §C — onboarding turn-completion contract: any assistant
|
|
834
|
+
// turn that narrates a step transition with a non-question-terminated
|
|
835
|
+
// phrase ("Moving to step 9 — operator persona...", "Step 8 done.")
|
|
836
|
+
// must be followed within 30s by either a `render-component` call
|
|
837
|
+
// (the next step's UI surfaces) or `onboarding-complete-step`
|
|
838
|
+
// (deterministic step advance). The trigger pattern matches the
|
|
839
|
+
// `[onboarding-step-narration]` line written by stream-parser at the
|
|
840
|
+
// assistant text block emit site (only for non-question phrases).
|
|
841
|
+
// Operator's symptom in Task 879's evidence: "Moving to step 9..."
|
|
842
|
+
// followed by 4 minutes of silence until the operator nudged with
|
|
843
|
+
// "yeah, so?" — exact failure shape this rule catches.
|
|
844
|
+
id: "assistant-step-advance-deadend",
|
|
845
|
+
name: "Onboarding step-advance narration without follow-up tool call",
|
|
846
|
+
type: "absent-followup",
|
|
847
|
+
logSource: "session",
|
|
848
|
+
pattern: "\\[onboarding-step-narration\\]",
|
|
849
|
+
followupPattern: "\\[render-component\\]|\\[tool-use\\][^\\n]*name=mcp__admin__onboarding-complete-step",
|
|
850
|
+
followupWindowMs: 3e4,
|
|
851
|
+
thresholdCount: 0,
|
|
852
|
+
thresholdWindowMinutes: 0,
|
|
853
|
+
scope: "session",
|
|
854
|
+
suggestedAction: '[Task 879 \xA7C] An onboarding turn narrated a step transition (e.g. "Moving to step N", "Step N done.") but did not render a component or call `onboarding-complete-step` within 30s. The operator is left with a dead-end paragraph and no actionable surface. Check the `platform/plugins/admin/skills/onboarding/SKILL.md` Turn-completion contract section \u2014 the agent must end any step-advance turn with `render-component` or a `?`-terminated question, never bare prose.'
|
|
855
|
+
},
|
|
832
856
|
{
|
|
833
857
|
// Task 538: fires when a [spawn] line appears in a conversation's stream
|
|
834
858
|
// log but no subprocess-lifecycle marker follows within 10s. The three
|
|
@@ -8414,6 +8438,39 @@ app10.post("/", async (c) => {
|
|
|
8414
8438
|
const payload = await createAdminSession(selected.accountId, selected.config.thinkingView, userId, userName, selected.role, avatar);
|
|
8415
8439
|
return c.json(payload);
|
|
8416
8440
|
});
|
|
8441
|
+
app10.post("/rebind", async (c) => {
|
|
8442
|
+
let body;
|
|
8443
|
+
try {
|
|
8444
|
+
body = await c.req.json();
|
|
8445
|
+
} catch {
|
|
8446
|
+
return c.json({ ok: false, error: "invalid_json" }, 400);
|
|
8447
|
+
}
|
|
8448
|
+
const sessionKey = typeof body.session_key === "string" ? body.session_key : "";
|
|
8449
|
+
const conversationId = typeof body.lastKnownConversationId === "string" ? body.lastKnownConversationId : "";
|
|
8450
|
+
if (!sessionKey || !conversationId) {
|
|
8451
|
+
return c.json({ ok: false, error: "session_key and lastKnownConversationId required" }, 400);
|
|
8452
|
+
}
|
|
8453
|
+
const sk8 = sessionKey.slice(0, 8);
|
|
8454
|
+
const cid8 = conversationId.slice(0, 8);
|
|
8455
|
+
const bridge = await tryCookieBridgeForConversation(c, sessionKey, conversationId);
|
|
8456
|
+
if (!bridge.ok) {
|
|
8457
|
+
console.log(`[admin/session/rebind] sessionKey=${sk8}\u2026 result=bridge-rejected reason=${bridge.reason} conversationId=${cid8}\u2026`);
|
|
8458
|
+
const status = bridge.reason === "conversation-not-found" ? 404 : bridge.reason === "account-mismatch" ? 403 : 401;
|
|
8459
|
+
return c.json({ ok: false, error: bridge.reason }, status);
|
|
8460
|
+
}
|
|
8461
|
+
const existing = getConversationIdForSession(sessionKey);
|
|
8462
|
+
if (existing && existing !== conversationId) {
|
|
8463
|
+
console.log(`[admin/session/rebind] sessionKey=${sk8}\u2026 result=conflict conversationId=${existing.slice(0, 8)}\u2026 requested=${cid8}\u2026`);
|
|
8464
|
+
return c.json({ ok: false, error: "conflict", conversationId: existing }, 409);
|
|
8465
|
+
}
|
|
8466
|
+
const bound = setConversationIdForSession(sessionKey, conversationId);
|
|
8467
|
+
if (!bound) {
|
|
8468
|
+
console.error(`[admin/session/rebind] sessionKey=${sk8}\u2026 result=bind-failed conversationId=${cid8}\u2026 (post-bridge session-store missing \u2014 programmer error)`);
|
|
8469
|
+
return c.json({ ok: false, error: "bind_failed" }, 500);
|
|
8470
|
+
}
|
|
8471
|
+
console.log(`[admin/session/rebind] sessionKey=${sk8}\u2026 result=ok conversationId=${cid8}\u2026`);
|
|
8472
|
+
return c.json({ ok: true, conversationId });
|
|
8473
|
+
});
|
|
8417
8474
|
var session_default2 = app10;
|
|
8418
8475
|
|
|
8419
8476
|
// server/routes/admin/chat.ts
|
|
@@ -8708,7 +8765,7 @@ var app11 = new Hono();
|
|
|
8708
8765
|
app11.post("/cancel", requireAdminSession, async (c) => {
|
|
8709
8766
|
const session_key = c.var.sessionKey;
|
|
8710
8767
|
try {
|
|
8711
|
-
const { interruptClient: interruptClient2 } = await import("./client-pool-
|
|
8768
|
+
const { interruptClient: interruptClient2 } = await import("./client-pool-AIYWSJBR.js");
|
|
8712
8769
|
await interruptClient2(session_key);
|
|
8713
8770
|
return c.json({ ok: true });
|
|
8714
8771
|
} catch (err) {
|