@rubytech/create-realagent 1.0.706 → 1.0.709
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/lib/oauth-llm/dist/index.d.ts +101 -0
- package/payload/platform/lib/oauth-llm/dist/index.d.ts.map +1 -0
- package/payload/platform/lib/oauth-llm/dist/index.js +353 -0
- package/payload/platform/lib/oauth-llm/dist/index.js.map +1 -0
- package/payload/platform/lib/oauth-llm/src/index.ts +526 -0
- package/payload/platform/lib/oauth-llm/tsconfig.json +8 -0
- package/payload/platform/neo4j/schema.cypher +60 -11
- package/payload/platform/package.json +2 -2
- package/payload/platform/plugins/admin/mcp/dist/index.js +9 -9
- package/payload/platform/plugins/admin/mcp/dist/index.js.map +1 -1
- package/payload/platform/plugins/admin/skills/business-profile/SKILL.md +1 -1
- package/payload/platform/plugins/admin/skills/onboarding/SKILL.md +6 -11
- package/payload/platform/plugins/docs/references/adherence.md +1 -1
- package/payload/platform/plugins/email/mcp/dist/lib/screening.d.ts +3 -3
- package/payload/platform/plugins/email/mcp/dist/lib/screening.d.ts.map +1 -1
- package/payload/platform/plugins/email/mcp/dist/lib/screening.js +12 -12
- package/payload/platform/plugins/email/mcp/dist/lib/screening.js.map +1 -1
- package/payload/platform/plugins/email/mcp/dist/scripts/email-auto-respond.js +14 -28
- package/payload/platform/plugins/email/mcp/dist/scripts/email-auto-respond.js.map +1 -1
- package/payload/platform/plugins/email/mcp/dist/scripts/email-fetch.js +9 -19
- package/payload/platform/plugins/email/mcp/dist/scripts/email-fetch.js.map +1 -1
- package/payload/platform/plugins/memory/PLUGIN.md +22 -15
- package/payload/platform/plugins/memory/mcp/dist/index.js +130 -44
- package/payload/platform/plugins/memory/mcp/dist/index.js.map +1 -1
- package/payload/platform/plugins/memory/mcp/dist/lib/document-hierarchy.d.ts +1 -7
- package/payload/platform/plugins/memory/mcp/dist/lib/document-hierarchy.d.ts.map +1 -1
- package/payload/platform/plugins/memory/mcp/dist/lib/document-hierarchy.js +32 -15
- package/payload/platform/plugins/memory/mcp/dist/lib/document-hierarchy.js.map +1 -1
- package/payload/platform/plugins/memory/mcp/dist/lib/graph-write-gate.js +4 -4
- package/payload/platform/plugins/memory/mcp/dist/lib/graph-write-gate.js.map +1 -1
- package/payload/platform/plugins/memory/mcp/dist/lib/llm-classifier.d.ts +200 -0
- package/payload/platform/plugins/memory/mcp/dist/lib/llm-classifier.d.ts.map +1 -0
- package/payload/platform/plugins/memory/mcp/dist/lib/llm-classifier.js +343 -0
- package/payload/platform/plugins/memory/mcp/dist/lib/llm-classifier.js.map +1 -0
- package/payload/platform/plugins/memory/mcp/dist/lib/llm-ranker.d.ts.map +1 -1
- package/payload/platform/plugins/memory/mcp/dist/lib/llm-ranker.js +12 -46
- package/payload/platform/plugins/memory/mcp/dist/lib/llm-ranker.js.map +1 -1
- package/payload/platform/plugins/memory/mcp/dist/tools/memory-classify.d.ts +34 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/memory-classify.d.ts.map +1 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/memory-classify.js +58 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/memory-classify.js.map +1 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/memory-edit-attachment.d.ts +1 -2
- package/payload/platform/plugins/memory/mcp/dist/tools/memory-edit-attachment.d.ts.map +1 -1
- package/payload/platform/plugins/memory/mcp/dist/tools/memory-edit-attachment.js +8 -9
- package/payload/platform/plugins/memory/mcp/dist/tools/memory-edit-attachment.js.map +1 -1
- package/payload/platform/plugins/memory/mcp/dist/tools/memory-ingest-extract.d.ts +5 -17
- package/payload/platform/plugins/memory/mcp/dist/tools/memory-ingest-extract.d.ts.map +1 -1
- package/payload/platform/plugins/memory/mcp/dist/tools/memory-ingest-extract.js +26 -49
- package/payload/platform/plugins/memory/mcp/dist/tools/memory-ingest-extract.js.map +1 -1
- package/payload/platform/plugins/memory/mcp/dist/tools/memory-ingest-web.d.ts.map +1 -1
- package/payload/platform/plugins/memory/mcp/dist/tools/memory-ingest-web.js +4 -25
- package/payload/platform/plugins/memory/mcp/dist/tools/memory-ingest-web.js.map +1 -1
- package/payload/platform/plugins/memory/mcp/dist/tools/memory-ingest.d.ts +41 -16
- package/payload/platform/plugins/memory/mcp/dist/tools/memory-ingest.d.ts.map +1 -1
- package/payload/platform/plugins/memory/mcp/dist/tools/memory-ingest.js +457 -173
- package/payload/platform/plugins/memory/mcp/dist/tools/memory-ingest.js.map +1 -1
- package/payload/platform/plugins/memory/references/schema-base.md +82 -1
- package/payload/platform/plugins/memory/skills/document-ingest/SKILL.md +145 -0
- package/payload/platform/templates/agents/admin/IDENTITY.md +1 -2
- package/payload/platform/templates/specialists/agents/content-producer.md +10 -77
- package/payload/platform/templates/specialists/agents/database-operator.md +39 -13
- package/payload/server/chunk-Y57ACANQ.js +12292 -0
- package/payload/server/maxy-edge.js +1 -1
- package/payload/server/public/assets/{graph-D-Rqh0Md.js → graph-BRD96pKD.js} +8 -8
- package/payload/server/public/graph.html +1 -1
- package/payload/server/server.js +30 -53
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
6
6
|
<title>Graph — Maxy</title>
|
|
7
7
|
<link rel="icon" href="/favicon.ico">
|
|
8
|
-
<script type="module" crossorigin src="/assets/graph-
|
|
8
|
+
<script type="module" crossorigin src="/assets/graph-BRD96pKD.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-BUs3sHtV.js">
|
|
11
11
|
<link rel="modulepreload" crossorigin href="/assets/Checkbox-CjbS9JcG.js">
|
package/payload/server/server.js
CHANGED
|
@@ -13,6 +13,7 @@ import {
|
|
|
13
13
|
backfillNullUserIdConversations,
|
|
14
14
|
bindVisitorToGroup,
|
|
15
15
|
buildX11Env,
|
|
16
|
+
callOauthLlm,
|
|
16
17
|
canAccessAdmin,
|
|
17
18
|
checkGroupMembership,
|
|
18
19
|
checkRateLimit,
|
|
@@ -61,7 +62,6 @@ import {
|
|
|
61
62
|
loadOnboardingStep,
|
|
62
63
|
logPath,
|
|
63
64
|
preConversationLogStream,
|
|
64
|
-
readKey,
|
|
65
65
|
recordFailedAttempt,
|
|
66
66
|
registerGrantSession,
|
|
67
67
|
registerResumedSession,
|
|
@@ -98,7 +98,7 @@ import {
|
|
|
98
98
|
vncLog,
|
|
99
99
|
waitForExit,
|
|
100
100
|
writeChromiumWrapper
|
|
101
|
-
} from "./chunk-
|
|
101
|
+
} from "./chunk-Y57ACANQ.js";
|
|
102
102
|
|
|
103
103
|
// ../lib/graph-trash/dist/index.js
|
|
104
104
|
var require_dist = __commonJS({
|
|
@@ -5130,9 +5130,6 @@ async function transcribeVoiceNote(file, source) {
|
|
|
5130
5130
|
}
|
|
5131
5131
|
}
|
|
5132
5132
|
|
|
5133
|
-
// app/lib/inbound-gateway.ts
|
|
5134
|
-
import Anthropic from "@anthropic-ai/sdk";
|
|
5135
|
-
|
|
5136
5133
|
// ../lib/screening-patterns/src/index.ts
|
|
5137
5134
|
var PROMPT_INJECTION_PATTERNS = [
|
|
5138
5135
|
"ignore your instructions",
|
|
@@ -5291,42 +5288,30 @@ async function processInbound(rawText, channel) {
|
|
|
5291
5288
|
}
|
|
5292
5289
|
return result;
|
|
5293
5290
|
}
|
|
5294
|
-
const
|
|
5295
|
-
|
|
5296
|
-
|
|
5291
|
+
const llmResult = await callOauthLlm({
|
|
5292
|
+
model: HAIKU_MODEL,
|
|
5293
|
+
system: buildSystemPrompt(channel),
|
|
5294
|
+
userMessage: rawText,
|
|
5295
|
+
maxTokens: 1024,
|
|
5296
|
+
timeoutMs: GATEWAY_TIMEOUT_MS,
|
|
5297
|
+
tools: [GATEWAY_TOOL],
|
|
5298
|
+
toolChoiceName: "classify_message"
|
|
5299
|
+
});
|
|
5300
|
+
const latencyMs = Date.now() - startMs;
|
|
5301
|
+
if (llmResult.kind === "fallback") {
|
|
5297
5302
|
console.warn(
|
|
5298
|
-
`${TAG13} fallthrough channel=${channel} reason
|
|
5303
|
+
`${TAG13} fallthrough channel=${channel} reason=${llmResult.cause} detail=${llmResult.reason} latency_ms=${latencyMs}`
|
|
5299
5304
|
);
|
|
5300
|
-
return
|
|
5305
|
+
return defaultResult(rawText.trim(), latencyMs);
|
|
5301
5306
|
}
|
|
5302
|
-
|
|
5303
|
-
|
|
5304
|
-
|
|
5305
|
-
const client = new Anthropic({ apiKey });
|
|
5306
|
-
const response = await client.messages.create(
|
|
5307
|
-
{
|
|
5308
|
-
model: HAIKU_MODEL,
|
|
5309
|
-
max_tokens: 1024,
|
|
5310
|
-
system: buildSystemPrompt(channel),
|
|
5311
|
-
messages: [{ role: "user", content: rawText }],
|
|
5312
|
-
tools: [GATEWAY_TOOL],
|
|
5313
|
-
tool_choice: { type: "tool", name: "classify_message" }
|
|
5314
|
-
},
|
|
5315
|
-
{ signal: controller.signal }
|
|
5316
|
-
);
|
|
5317
|
-
const latencyMs = Date.now() - startMs;
|
|
5318
|
-
const inputTokens = response.usage?.input_tokens ?? 0;
|
|
5319
|
-
const outputTokens = response.usage?.output_tokens ?? 0;
|
|
5320
|
-
const toolBlock = response.content.find(
|
|
5321
|
-
(b) => b.type === "tool_use"
|
|
5307
|
+
if (llmResult.kind !== "ok-tool") {
|
|
5308
|
+
console.warn(
|
|
5309
|
+
`${TAG13} fallthrough channel=${channel} reason=no-tool-response latency_ms=${latencyMs}`
|
|
5322
5310
|
);
|
|
5323
|
-
|
|
5324
|
-
|
|
5325
|
-
|
|
5326
|
-
|
|
5327
|
-
return defaultResult(rawText.trim(), latencyMs);
|
|
5328
|
-
}
|
|
5329
|
-
const input = toolBlock.input;
|
|
5311
|
+
return defaultResult(rawText.trim(), latencyMs);
|
|
5312
|
+
}
|
|
5313
|
+
try {
|
|
5314
|
+
const input = llmResult.input;
|
|
5330
5315
|
const processedText = typeof input.processedText === "string" ? input.processedText : null;
|
|
5331
5316
|
const verdict = input.verdict;
|
|
5332
5317
|
if (!processedText || !verdict || !["clean", "suspicious", "discard"].includes(verdict)) {
|
|
@@ -5359,7 +5344,7 @@ async function processInbound(rawText, channel) {
|
|
|
5359
5344
|
fallthrough: false
|
|
5360
5345
|
};
|
|
5361
5346
|
console.log(
|
|
5362
|
-
`${TAG13} channel=${channel} verdict=${verdict} promptInjection=${promptInjectionRisk} intent=${intent} language=${language} complexity=${complexity} requiresHistory=${requiresHistory} rewrite=${!isAdmin && processedText !== rawText.trim()} searchQuery=${searchQuery ? "yes" : "null"} latency_ms=${latencyMs}
|
|
5347
|
+
`${TAG13} channel=${channel} verdict=${verdict} promptInjection=${promptInjectionRisk} intent=${intent} language=${language} complexity=${complexity} requiresHistory=${requiresHistory} rewrite=${!isAdmin && processedText !== rawText.trim()} searchQuery=${searchQuery ? "yes" : "null"} latency_ms=${latencyMs}`
|
|
5363
5348
|
);
|
|
5364
5349
|
if (verdict !== "clean") {
|
|
5365
5350
|
console.warn(
|
|
@@ -5368,15 +5353,11 @@ async function processInbound(rawText, channel) {
|
|
|
5368
5353
|
}
|
|
5369
5354
|
return result;
|
|
5370
5355
|
} catch (err) {
|
|
5371
|
-
const latencyMs = Date.now() - startMs;
|
|
5372
5356
|
const reason = err instanceof Error ? err.message : String(err);
|
|
5373
|
-
const errorType = err instanceof Error && err.name === "AbortError" ? "timeout" : "api-error";
|
|
5374
5357
|
console.warn(
|
|
5375
|
-
`${TAG13} fallthrough channel=${channel} reason
|
|
5358
|
+
`${TAG13} fallthrough channel=${channel} reason=parse-error: ${reason} latency_ms=${latencyMs}`
|
|
5376
5359
|
);
|
|
5377
5360
|
return defaultResult(rawText.trim(), latencyMs);
|
|
5378
|
-
} finally {
|
|
5379
|
-
clearTimeout(timer2);
|
|
5380
5361
|
}
|
|
5381
5362
|
}
|
|
5382
5363
|
|
|
@@ -10599,16 +10580,12 @@ var AGENT_ACTION_LABELS = Object.freeze(
|
|
|
10599
10580
|
"WorkflowRun"
|
|
10600
10581
|
])
|
|
10601
10582
|
);
|
|
10602
|
-
var
|
|
10583
|
+
var EXCLUDED_EDGE_TYPES = Object.freeze(
|
|
10603
10584
|
/* @__PURE__ */ new Set([
|
|
10604
|
-
"
|
|
10605
|
-
"
|
|
10606
|
-
"
|
|
10607
|
-
"
|
|
10608
|
-
"ToolCall",
|
|
10609
|
-
"WorkflowStep",
|
|
10610
|
-
"StepResult",
|
|
10611
|
-
"ReviewAlert"
|
|
10585
|
+
"HAS_TOOL_CALL",
|
|
10586
|
+
"RUN_OF",
|
|
10587
|
+
"HAS_STEP",
|
|
10588
|
+
"HAS_RESULT"
|
|
10612
10589
|
])
|
|
10613
10590
|
);
|
|
10614
10591
|
function isKnownLabel(label) {
|
|
@@ -11281,7 +11258,7 @@ app30.post("/", async (c) => {
|
|
|
11281
11258
|
}
|
|
11282
11259
|
const attachment = await storeGeneratedFile(accountId, filePath);
|
|
11283
11260
|
console.error(
|
|
11284
|
-
`[admin:file-attach] stored path=${filePath} id=${attachment.attachmentId} size=${attachment.sizeBytes} mime=${attachment.mimeType}`
|
|
11261
|
+
`[admin:file-attach] stored path=${filePath} id=${attachment.attachmentId} filename=${JSON.stringify(attachment.filename)} size=${attachment.sizeBytes} mime=${attachment.mimeType}`
|
|
11285
11262
|
);
|
|
11286
11263
|
return c.json({
|
|
11287
11264
|
attachmentId: attachment.attachmentId,
|