@rubytech/create-maxy 1.0.708 → 1.0.710
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/mcp-spawn-tee/dist/index.d.ts +53 -0
- package/payload/platform/lib/mcp-spawn-tee/dist/index.d.ts.map +1 -0
- package/payload/platform/lib/mcp-spawn-tee/dist/index.js +132 -0
- package/payload/platform/lib/mcp-spawn-tee/dist/index.js.map +1 -0
- package/payload/platform/lib/mcp-spawn-tee/src/index.ts +134 -0
- package/payload/platform/lib/mcp-spawn-tee/tsconfig.json +8 -0
- 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 +37 -11
- package/payload/platform/package.json +2 -2
- package/payload/platform/plugins/docs/references/plugins-guide.md +12 -4
- 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/mcp/dist/index.js +46 -18
- package/payload/platform/plugins/memory/mcp/dist/index.js.map +1 -1
- package/payload/platform/plugins/memory/mcp/dist/lib/__tests__/schema-loader.test.js +34 -1
- package/payload/platform/plugins/memory/mcp/dist/lib/__tests__/schema-loader.test.js.map +1 -1
- 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 +22 -18
- package/payload/platform/plugins/memory/mcp/dist/lib/document-hierarchy.js.map +1 -1
- package/payload/platform/plugins/memory/mcp/dist/lib/llm-classifier.d.ts +98 -24
- package/payload/platform/plugins/memory/mcp/dist/lib/llm-classifier.d.ts.map +1 -1
- package/payload/platform/plugins/memory/mcp/dist/lib/llm-classifier.js +176 -86
- package/payload/platform/plugins/memory/mcp/dist/lib/llm-classifier.js.map +1 -1
- 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/lib/schema-loader.d.ts +10 -0
- package/payload/platform/plugins/memory/mcp/dist/lib/schema-loader.d.ts.map +1 -1
- package/payload/platform/plugins/memory/mcp/dist/lib/schema-loader.js +22 -3
- package/payload/platform/plugins/memory/mcp/dist/lib/schema-loader.js.map +1 -1
- package/payload/platform/plugins/memory/mcp/dist/tools/memory-classify.d.ts.map +1 -1
- package/payload/platform/plugins/memory/mcp/dist/tools/memory-classify.js +24 -12
- package/payload/platform/plugins/memory/mcp/dist/tools/memory-classify.js.map +1 -1
- package/payload/platform/plugins/memory/mcp/dist/tools/memory-ingest.d.ts +27 -11
- 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 +276 -238
- package/payload/platform/plugins/memory/mcp/dist/tools/memory-ingest.js.map +1 -1
- package/payload/platform/plugins/memory/mcp/package.json +3 -1
- package/payload/platform/plugins/memory/mcp/scripts/boot-smoke.sh +69 -0
- package/payload/platform/plugins/memory/references/graph-primitives.md +22 -0
- package/payload/platform/plugins/memory/references/schema-base.md +66 -14
- package/payload/platform/plugins/memory/skills/document-ingest/SKILL.md +53 -20
- package/payload/platform/templates/specialists/agents/database-operator.md +18 -0
- package/payload/server/chunk-A5K3CFMI.js +12297 -0
- package/payload/server/chunk-Y57ACANQ.js +12292 -0
- package/payload/server/maxy-edge.js +1 -1
- package/payload/server/server.js +25 -44
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-A5K3CFMI.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
|
|
|
@@ -11277,7 +11258,7 @@ app30.post("/", async (c) => {
|
|
|
11277
11258
|
}
|
|
11278
11259
|
const attachment = await storeGeneratedFile(accountId, filePath);
|
|
11279
11260
|
console.error(
|
|
11280
|
-
`[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}`
|
|
11281
11262
|
);
|
|
11282
11263
|
return c.json({
|
|
11283
11264
|
attachmentId: attachment.attachmentId,
|