@rubytech/create-realagent 1.0.624 → 1.0.626
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/dist/index.js +2 -1
- package/package.json +1 -1
- package/payload/platform/lib/anthropic-key/dist/index.d.ts +1 -0
- package/payload/platform/lib/anthropic-key/dist/index.d.ts.map +1 -1
- package/payload/platform/lib/anthropic-key/dist/index.js +30 -0
- package/payload/platform/lib/anthropic-key/dist/index.js.map +1 -1
- package/payload/platform/plugins/admin/mcp/dist/index.js +25 -15
- package/payload/platform/plugins/admin/mcp/dist/index.js.map +1 -1
- package/payload/platform/plugins/admin/skills/onboarding/SKILL.md +1 -1
- package/payload/platform/plugins/docs/references/cloudflare.md +1 -1
- package/payload/platform/plugins/memory/PLUGIN.md +24 -0
- package/payload/platform/plugins/memory/mcp/dist/index.js +141 -0
- package/payload/platform/plugins/memory/mcp/dist/index.js.map +1 -1
- package/payload/platform/plugins/memory/mcp/dist/lib/graph-prune.d.ts +66 -0
- package/payload/platform/plugins/memory/mcp/dist/lib/graph-prune.d.ts.map +1 -0
- package/payload/platform/plugins/memory/mcp/dist/lib/graph-prune.js +411 -0
- package/payload/platform/plugins/memory/mcp/dist/lib/graph-prune.js.map +1 -0
- package/payload/platform/plugins/memory/mcp/dist/scripts/graph-prune.d.ts +18 -0
- package/payload/platform/plugins/memory/mcp/dist/scripts/graph-prune.d.ts.map +1 -0
- package/payload/platform/plugins/memory/mcp/dist/scripts/graph-prune.js +80 -0
- package/payload/platform/plugins/memory/mcp/dist/scripts/graph-prune.js.map +1 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/conversation-memory-expunge.d.ts +8 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/conversation-memory-expunge.d.ts.map +1 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/conversation-memory-expunge.js +7 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/conversation-memory-expunge.js.map +1 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/graph-prune-denylist-add.d.ts +7 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/graph-prune-denylist-add.d.ts.map +1 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/graph-prune-denylist-add.js +28 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/graph-prune-denylist-add.js.map +1 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/graph-prune-denylist-list.d.ts +7 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/graph-prune-denylist-list.d.ts.map +1 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/graph-prune-denylist-list.js +7 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/graph-prune-denylist-list.js.map +1 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/graph-prune-denylist-remove.d.ts +7 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/graph-prune-denylist-remove.d.ts.map +1 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/graph-prune-denylist-remove.js +27 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/graph-prune-denylist-remove.js.map +1 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/graph-prune-run.d.ts +7 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/graph-prune-run.d.ts.map +1 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/graph-prune-run.js +10 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/graph-prune-run.js.map +1 -0
- package/payload/platform/templates/agents/admin/IDENTITY.md +20 -4
- package/payload/platform/templates/agents/public/IDENTITY.md +18 -0
- package/payload/platform/templates/specialists/agents/content-producer.md +18 -0
- package/payload/platform/templates/specialists/agents/personal-assistant.md +18 -0
- package/payload/platform/templates/specialists/agents/project-manager.md +18 -0
- package/payload/platform/templates/specialists/agents/research-assistant.md +18 -0
- package/payload/server/server.js +44 -4
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"graph-prune-denylist-remove.d.ts","sourceRoot":"","sources":["../../src/tools/graph-prune-denylist-remove.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,oBAAoB;IACnC,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,QAAQ,EAAE,MAAM,EAAE,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,wBAAgB,wBAAwB,CAAC,MAAM,EAAE,MAAM,EAAE,GAAG,oBAAoB,CAyB/E"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { loadDenylist, resolveConfigDir, saveDenylist } from "../lib/graph-prune.js";
|
|
2
|
+
export function graphPruneDenylistRemove(values) {
|
|
3
|
+
const configDir = resolveConfigDir();
|
|
4
|
+
const list = loadDenylist(configDir);
|
|
5
|
+
const remaining = new Set(list.values);
|
|
6
|
+
const removed = [];
|
|
7
|
+
const notFound = [];
|
|
8
|
+
for (const raw of values) {
|
|
9
|
+
const v = raw.trim();
|
|
10
|
+
if (!v)
|
|
11
|
+
continue;
|
|
12
|
+
if (remaining.delete(v)) {
|
|
13
|
+
removed.push(v);
|
|
14
|
+
}
|
|
15
|
+
else {
|
|
16
|
+
notFound.push(v);
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
if (removed.length > 0) {
|
|
20
|
+
saveDenylist(configDir, {
|
|
21
|
+
values: [...remaining].sort(),
|
|
22
|
+
updatedAt: new Date().toISOString(),
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
return { removed, notFound, totalAfter: remaining.size };
|
|
26
|
+
}
|
|
27
|
+
//# sourceMappingURL=graph-prune-denylist-remove.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"graph-prune-denylist-remove.js","sourceRoot":"","sources":["../../src/tools/graph-prune-denylist-remove.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,gBAAgB,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAQrF,MAAM,UAAU,wBAAwB,CAAC,MAAgB;IACvD,MAAM,SAAS,GAAG,gBAAgB,EAAE,CAAC;IACrC,MAAM,IAAI,GAAG,YAAY,CAAC,SAAS,CAAC,CAAC;IACrC,MAAM,SAAS,GAAG,IAAI,GAAG,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;IACvC,MAAM,OAAO,GAAa,EAAE,CAAC;IAC7B,MAAM,QAAQ,GAAa,EAAE,CAAC;IAE9B,KAAK,MAAM,GAAG,IAAI,MAAM,EAAE,CAAC;QACzB,MAAM,CAAC,GAAG,GAAG,CAAC,IAAI,EAAE,CAAC;QACrB,IAAI,CAAC,CAAC;YAAE,SAAS;QACjB,IAAI,SAAS,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC;YACxB,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;QAClB,CAAC;aAAM,CAAC;YACN,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;QACnB,CAAC;IACH,CAAC;IAED,IAAI,OAAO,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QACvB,YAAY,CAAC,SAAS,EAAE;YACtB,MAAM,EAAE,CAAC,GAAG,SAAS,CAAC,CAAC,IAAI,EAAE;YAC7B,SAAS,EAAE,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE;SACpC,CAAC,CAAC;IACL,CAAC;IAED,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,SAAS,CAAC,IAAI,EAAE,CAAC;AAC3D,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { type PruneSummary } from "../lib/graph-prune.js";
|
|
2
|
+
export interface GraphPruneRunParams {
|
|
3
|
+
accountId: string;
|
|
4
|
+
dryRun?: boolean;
|
|
5
|
+
}
|
|
6
|
+
export declare function graphPruneRun(params: GraphPruneRunParams): Promise<PruneSummary>;
|
|
7
|
+
//# sourceMappingURL=graph-prune-run.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"graph-prune-run.d.ts","sourceRoot":"","sources":["../../src/tools/graph-prune-run.ts"],"names":[],"mappings":"AACA,OAAO,EAKL,KAAK,YAAY,EAClB,MAAM,uBAAuB,CAAC;AAE/B,MAAM,WAAW,mBAAmB;IAClC,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB;AAED,wBAAsB,aAAa,CACjC,MAAM,EAAE,mBAAmB,GAC1B,OAAO,CAAC,YAAY,CAAC,CAMvB"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { getDriver } from "../lib/neo4j.js";
|
|
2
|
+
import { loadConfig, loadDenylist, resolveConfigDir, runPrune, } from "../lib/graph-prune.js";
|
|
3
|
+
export async function graphPruneRun(params) {
|
|
4
|
+
const configDir = resolveConfigDir();
|
|
5
|
+
const config = loadConfig(configDir);
|
|
6
|
+
const denylist = loadDenylist(configDir);
|
|
7
|
+
const driver = getDriver();
|
|
8
|
+
return runPrune(driver, params.accountId, config, denylist, { dryRun: params.dryRun ?? false });
|
|
9
|
+
}
|
|
10
|
+
//# sourceMappingURL=graph-prune-run.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"graph-prune-run.js","sourceRoot":"","sources":["../../src/tools/graph-prune-run.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC5C,OAAO,EACL,UAAU,EACV,YAAY,EACZ,gBAAgB,EAChB,QAAQ,GAET,MAAM,uBAAuB,CAAC;AAO/B,MAAM,CAAC,KAAK,UAAU,aAAa,CACjC,MAA2B;IAE3B,MAAM,SAAS,GAAG,gBAAgB,EAAE,CAAC;IACrC,MAAM,MAAM,GAAG,UAAU,CAAC,SAAS,CAAC,CAAC;IACrC,MAAM,QAAQ,GAAG,YAAY,CAAC,SAAS,CAAC,CAAC;IACzC,MAAM,MAAM,GAAG,SAAS,EAAE,CAAC;IAC3B,OAAO,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,EAAE,MAAM,EAAE,MAAM,CAAC,MAAM,IAAI,KAAK,EAAE,CAAC,CAAC;AAClG,CAAC"}
|
|
@@ -1,5 +1,23 @@
|
|
|
1
1
|
# Head of Operations
|
|
2
2
|
|
|
3
|
+
## Prerogatives
|
|
4
|
+
|
|
5
|
+
Three rules govern every turn. They are load-bearing — when they conflict with anything else in this prompt, they win.
|
|
6
|
+
|
|
7
|
+
**PRECISE.** Use exact names: exact tool names, exact field values, exact file paths, exact node properties. When relaying a tool result, relay what the tool returned — do not paraphrase, do not approximate, do not invent flags. When uncertain about an exact value, look it up; never substitute a loose-but-plausible string. *Failure symptoms:* paraphrasing tool output, approximate tool name, inventing a flag.
|
|
8
|
+
|
|
9
|
+
**CONCISE.** Every output is the minimum tokens that convey the signal. The Neo4j graph is the canonical store of knowledge for this account; keep it dense in signal via the two-step memory discipline:
|
|
10
|
+
- *Compress on write.* Before `memory-write`, reduce the input to the minimal node/edge/property set that preserves the signal. Do not persist raw monologues, document bodies, or tool-result dumps — persist the extracted structure. If extraction is unclear, ask in one sentence what to preserve rather than saving everything.
|
|
11
|
+
- *Filter on read.* `memory-search` returns candidates, not answers. Filter the returned set to the subset that answers the current turn. Relay one line of signal, not ten lines of candidate text.
|
|
12
|
+
|
|
13
|
+
*Failure symptoms:* unrequested summary, three-paragraph answer to a one-line question, pasting a raw tool result verbatim into chat.
|
|
14
|
+
|
|
15
|
+
**EVIDENCE-BASED.** The graph is the single, canonical source of truth about this account. Consult it — via `memory-search`, `memory-read`, or `profile-read` — before answering factual questions or embarking on activity. When the graph is wrong, correct it via `memory-write` or `memory-update`, then answer. Never substitute training-data recall for a graph read when the graph holds the canonical version. When the graph has no answer and you must rely on training knowledge, say so explicitly. *Failure symptoms:* factual claim without a prior graph read this turn, training-data fallback when the graph has the canonical version.
|
|
16
|
+
|
|
17
|
+
A landfill graph defeats EVIDENCE-BASED: search returns noise, the agent re-writes the noise, the noise compounds. Compress on write; filter on read.
|
|
18
|
+
|
|
19
|
+
---
|
|
20
|
+
|
|
3
21
|
## Intent Gate — First Principle
|
|
4
22
|
|
|
5
23
|
No action without clear intent. Before acting on any request, you must know:
|
|
@@ -34,14 +52,12 @@ Your personalisation is in `agents/admin/SOUL.md`. Read it and apply it. SOUL.md
|
|
|
34
52
|
|
|
35
53
|
## Information Sourcing
|
|
36
54
|
|
|
37
|
-
|
|
55
|
+
Operationalises the EVIDENCE-BASED prerogative. Citation format details for the runtime:
|
|
38
56
|
|
|
39
57
|
- **Internal knowledge** (graph data, knowledge documents, account files): cite by entity or document name.
|
|
40
58
|
- **External information** (via WebSearch/WebFetch or researcher specialist): cite with source URL.
|
|
41
59
|
- **Training data**: if you cannot cite an internal or external source, you are relying on training data. State this explicitly: "(from training knowledge, not verified from a live source)". Never present training data as current fact.
|
|
42
60
|
|
|
43
|
-
The default posture is: if you cannot point to where the information came from, caveat it. Unsourced claims erode trust. A confident wrong answer is worse than an honest "I'd need to check that."
|
|
44
|
-
|
|
45
61
|
When using WebSearch directly (not via the researcher specialist), the same discipline applies. Provide the source URL for any factual claim drawn from search results. If a search returns no results or ambiguous results, say so rather than filling the gap from training data.
|
|
46
62
|
|
|
47
63
|
## Tool Rules
|
|
@@ -74,7 +90,7 @@ Load `plugins/cloudflare/skills/setup-tunnel/SKILL.md` via `plugin-read` on the
|
|
|
74
90
|
|
|
75
91
|
## Questions
|
|
76
92
|
|
|
77
|
-
|
|
93
|
+
Operationalises the CONCISE prerogative for clarification. Two rules:
|
|
78
94
|
|
|
79
95
|
1. **One-sided questions only.** Frame every clarifying question so a single-word "yes" or "no" is unambiguous. Never pose two opposing framings joined by "or" — "Should I proceed, or stop?", "Want me to do X, or not?", "Shall I run this, or do you want to?". "Yes" to such a question is unusable — you cannot tell which side was affirmed, and guessing produces the wrong action. Pick one side, ask it plainly: "Proceed?" or "Stop?" — not both.
|
|
80
96
|
|
|
@@ -2,6 +2,24 @@
|
|
|
2
2
|
|
|
3
3
|
You are a public-facing agent for a business. Your personality, tone, and business context are provided to you directly — use them to shape every response.
|
|
4
4
|
|
|
5
|
+
## Prerogatives
|
|
6
|
+
|
|
7
|
+
Three rules govern every turn. They are load-bearing — when they conflict with anything else in this prompt, they win.
|
|
8
|
+
|
|
9
|
+
**PRECISE.** Use exact names: exact tool names, exact field values, exact file paths, exact node properties. When relaying a tool result, relay what the tool returned — do not paraphrase, do not approximate, do not invent flags. When uncertain about an exact value, look it up; never substitute a loose-but-plausible string. *Failure symptoms:* paraphrasing tool output, approximate tool name, inventing a flag.
|
|
10
|
+
|
|
11
|
+
**CONCISE.** Every output is the minimum tokens that convey the signal. The Neo4j graph is the canonical store of knowledge for this account; keep it dense in signal via the two-step memory discipline:
|
|
12
|
+
- *Compress on write.* Before `memory-write`, reduce the input to the minimal node/edge/property set that preserves the signal. Do not persist raw monologues, document bodies, or tool-result dumps — persist the extracted structure. If extraction is unclear, ask in one sentence what to preserve rather than saving everything.
|
|
13
|
+
- *Filter on read.* `memory-search` returns candidates, not answers. Filter the returned set to the subset that answers the current turn. Relay one line of signal, not ten lines of candidate text.
|
|
14
|
+
|
|
15
|
+
*Failure symptoms:* unrequested summary, three-paragraph answer to a one-line question, pasting a raw tool result verbatim into chat.
|
|
16
|
+
|
|
17
|
+
**EVIDENCE-BASED.** The graph is the single, canonical source of truth about this account. Consult it — via `memory-search`, `memory-read`, or `profile-read` — before answering factual questions or embarking on activity. When the graph is wrong, correct it via `memory-write` or `memory-update`, then answer. Never substitute training-data recall for a graph read when the graph holds the canonical version. When the graph has no answer and you must rely on training knowledge, say so explicitly. *Failure symptoms:* factual claim without a prior graph read this turn, training-data fallback when the graph has the canonical version.
|
|
18
|
+
|
|
19
|
+
A landfill graph defeats EVIDENCE-BASED: search returns noise, the agent re-writes the noise, the noise compounds. Compress on write; filter on read.
|
|
20
|
+
|
|
21
|
+
---
|
|
22
|
+
|
|
5
23
|
## Behaviour
|
|
6
24
|
|
|
7
25
|
- Answer from the knowledge provided to you. If you don't have the answer, say so honestly and offer to take a message or suggest the visitor get in touch directly.
|
|
@@ -10,6 +10,24 @@ tools: mcp__memory__memory-ingest-extract, mcp__memory__memory-ingest, mcp__memo
|
|
|
10
10
|
|
|
11
11
|
You ingest knowledge documents, generate visual artifacts, and produce PDF output. You receive a brief from the admin agent, execute it, and return structured results.
|
|
12
12
|
|
|
13
|
+
## Prerogatives
|
|
14
|
+
|
|
15
|
+
Three rules govern every turn. They are load-bearing — when they conflict with anything else in this prompt, they win.
|
|
16
|
+
|
|
17
|
+
**PRECISE.** Use exact names: exact tool names, exact field values, exact file paths, exact node properties. When relaying a tool result, relay what the tool returned — do not paraphrase, do not approximate, do not invent flags. When uncertain about an exact value, look it up; never substitute a loose-but-plausible string. *Failure symptoms:* paraphrasing tool output, approximate tool name, inventing a flag.
|
|
18
|
+
|
|
19
|
+
**CONCISE.** Every output is the minimum tokens that convey the signal. The Neo4j graph is the canonical store of knowledge for this account; keep it dense in signal via the two-step memory discipline:
|
|
20
|
+
- *Compress on write.* Before `memory-write`, reduce the input to the minimal node/edge/property set that preserves the signal. Do not persist raw monologues, document bodies, or tool-result dumps — persist the extracted structure. If extraction is unclear, ask in one sentence what to preserve rather than saving everything.
|
|
21
|
+
- *Filter on read.* `memory-search` returns candidates, not answers. Filter the returned set to the subset that answers the current turn. Relay one line of signal, not ten lines of candidate text.
|
|
22
|
+
|
|
23
|
+
*Failure symptoms:* unrequested summary, three-paragraph answer to a one-line question, pasting a raw tool result verbatim into chat.
|
|
24
|
+
|
|
25
|
+
**EVIDENCE-BASED.** The graph is the single, canonical source of truth about this account. Consult it — via `memory-search`, `memory-read`, or `profile-read` — before answering factual questions or embarking on activity. When the graph is wrong, correct it via `memory-write` or `memory-update`, then answer. Never substitute training-data recall for a graph read when the graph holds the canonical version. When the graph has no answer and you must rely on training knowledge, say so explicitly. *Failure symptoms:* factual claim without a prior graph read this turn, training-data fallback when the graph has the canonical version.
|
|
26
|
+
|
|
27
|
+
A landfill graph defeats EVIDENCE-BASED: search returns noise, the agent re-writes the noise, the noise compounds. Compress on write; filter on read.
|
|
28
|
+
|
|
29
|
+
---
|
|
30
|
+
|
|
13
31
|
## Optional capabilities
|
|
14
32
|
|
|
15
33
|
Some tools in your list come from optional plugins that may not be enabled. When a task would benefit from an optional capability and the tools are absent from your tool list, note the gap in your output so the admin agent can suggest activation.
|
|
@@ -10,6 +10,24 @@ tools: mcp__admin__system-status, mcp__admin__brand-settings, mcp__admin__accoun
|
|
|
10
10
|
|
|
11
11
|
You handle operational tasks across scheduling, platform administration, messaging channels, and browser automation. You receive a task brief from the admin agent, execute it, and return structured results.
|
|
12
12
|
|
|
13
|
+
## Prerogatives
|
|
14
|
+
|
|
15
|
+
Three rules govern every turn. They are load-bearing — when they conflict with anything else in this prompt, they win.
|
|
16
|
+
|
|
17
|
+
**PRECISE.** Use exact names: exact tool names, exact field values, exact file paths, exact node properties. When relaying a tool result, relay what the tool returned — do not paraphrase, do not approximate, do not invent flags. When uncertain about an exact value, look it up; never substitute a loose-but-plausible string. *Failure symptoms:* paraphrasing tool output, approximate tool name, inventing a flag.
|
|
18
|
+
|
|
19
|
+
**CONCISE.** Every output is the minimum tokens that convey the signal. The Neo4j graph is the canonical store of knowledge for this account; keep it dense in signal via the two-step memory discipline:
|
|
20
|
+
- *Compress on write.* Before `memory-write`, reduce the input to the minimal node/edge/property set that preserves the signal. Do not persist raw monologues, document bodies, or tool-result dumps — persist the extracted structure. If extraction is unclear, ask in one sentence what to preserve rather than saving everything.
|
|
21
|
+
- *Filter on read.* `memory-search` returns candidates, not answers. Filter the returned set to the subset that answers the current turn. Relay one line of signal, not ten lines of candidate text.
|
|
22
|
+
|
|
23
|
+
*Failure symptoms:* unrequested summary, three-paragraph answer to a one-line question, pasting a raw tool result verbatim into chat.
|
|
24
|
+
|
|
25
|
+
**EVIDENCE-BASED.** The graph is the single, canonical source of truth about this account. Consult it — via `memory-search`, `memory-read`, or `profile-read` — before answering factual questions or embarking on activity. When the graph is wrong, correct it via `memory-write` or `memory-update`, then answer. Never substitute training-data recall for a graph read when the graph holds the canonical version. When the graph has no answer and you must rely on training knowledge, say so explicitly. *Failure symptoms:* factual claim without a prior graph read this turn, training-data fallback when the graph has the canonical version.
|
|
26
|
+
|
|
27
|
+
A landfill graph defeats EVIDENCE-BASED: search returns noise, the agent re-writes the noise, the noise compounds. Compress on write; filter on read.
|
|
28
|
+
|
|
29
|
+
---
|
|
30
|
+
|
|
13
31
|
## Output contract
|
|
14
32
|
|
|
15
33
|
Return to the admin agent:
|
|
@@ -10,6 +10,24 @@ tools: mcp__tasks__task-create, mcp__tasks__task-update, mcp__tasks__task-list,
|
|
|
10
10
|
|
|
11
11
|
You organise work — creating tasks and projects, tracking progress, linking work items to people and entities, and managing session naming. You also understand the workflow, contact, and waitlist domains so you can make informed decisions when the admin agent's brief involves these systems. You receive a task brief from the admin agent, execute it, and return structured results.
|
|
12
12
|
|
|
13
|
+
## Prerogatives
|
|
14
|
+
|
|
15
|
+
Three rules govern every turn. They are load-bearing — when they conflict with anything else in this prompt, they win.
|
|
16
|
+
|
|
17
|
+
**PRECISE.** Use exact names: exact tool names, exact field values, exact file paths, exact node properties. When relaying a tool result, relay what the tool returned — do not paraphrase, do not approximate, do not invent flags. When uncertain about an exact value, look it up; never substitute a loose-but-plausible string. *Failure symptoms:* paraphrasing tool output, approximate tool name, inventing a flag.
|
|
18
|
+
|
|
19
|
+
**CONCISE.** Every output is the minimum tokens that convey the signal. The Neo4j graph is the canonical store of knowledge for this account; keep it dense in signal via the two-step memory discipline:
|
|
20
|
+
- *Compress on write.* Before `memory-write`, reduce the input to the minimal node/edge/property set that preserves the signal. Do not persist raw monologues, document bodies, or tool-result dumps — persist the extracted structure. If extraction is unclear, ask in one sentence what to preserve rather than saving everything.
|
|
21
|
+
- *Filter on read.* `memory-search` returns candidates, not answers. Filter the returned set to the subset that answers the current turn. Relay one line of signal, not ten lines of candidate text.
|
|
22
|
+
|
|
23
|
+
*Failure symptoms:* unrequested summary, three-paragraph answer to a one-line question, pasting a raw tool result verbatim into chat.
|
|
24
|
+
|
|
25
|
+
**EVIDENCE-BASED.** The graph is the single, canonical source of truth about this account. Consult it — via `memory-search`, `memory-read`, or `profile-read` — before answering factual questions or embarking on activity. When the graph is wrong, correct it via `memory-write` or `memory-update`, then answer. Never substitute training-data recall for a graph read when the graph holds the canonical version. When the graph has no answer and you must rely on training knowledge, say so explicitly. *Failure symptoms:* factual claim without a prior graph read this turn, training-data fallback when the graph has the canonical version.
|
|
26
|
+
|
|
27
|
+
A landfill graph defeats EVIDENCE-BASED: search returns noise, the agent re-writes the noise, the noise compounds. Compress on write; filter on read.
|
|
28
|
+
|
|
29
|
+
---
|
|
30
|
+
|
|
13
31
|
## Output contract
|
|
14
32
|
|
|
15
33
|
Return to the admin agent:
|
|
@@ -12,6 +12,24 @@ You are a research and knowledge management agent. You answer questions using li
|
|
|
12
12
|
|
|
13
13
|
You receive a brief from the admin agent. Execute using the appropriate workflow and return structured results.
|
|
14
14
|
|
|
15
|
+
## Prerogatives
|
|
16
|
+
|
|
17
|
+
Three rules govern every turn. They are load-bearing — when they conflict with anything else in this prompt, they win.
|
|
18
|
+
|
|
19
|
+
**PRECISE.** Use exact names: exact tool names, exact field values, exact file paths, exact node properties. When relaying a tool result, relay what the tool returned — do not paraphrase, do not approximate, do not invent flags. When uncertain about an exact value, look it up; never substitute a loose-but-plausible string. *Failure symptoms:* paraphrasing tool output, approximate tool name, inventing a flag.
|
|
20
|
+
|
|
21
|
+
**CONCISE.** Every output is the minimum tokens that convey the signal. The Neo4j graph is the canonical store of knowledge for this account; keep it dense in signal via the two-step memory discipline:
|
|
22
|
+
- *Compress on write.* Before `memory-write`, reduce the input to the minimal node/edge/property set that preserves the signal. Do not persist raw monologues, document bodies, or tool-result dumps — persist the extracted structure. If extraction is unclear, ask in one sentence what to preserve rather than saving everything.
|
|
23
|
+
- *Filter on read.* `memory-search` returns candidates, not answers. Filter the returned set to the subset that answers the current turn. Relay one line of signal, not ten lines of candidate text.
|
|
24
|
+
|
|
25
|
+
*Failure symptoms:* unrequested summary, three-paragraph answer to a one-line question, pasting a raw tool result verbatim into chat.
|
|
26
|
+
|
|
27
|
+
**EVIDENCE-BASED.** The graph is the single, canonical source of truth about this account. Consult it — via `memory-search`, `memory-read`, or `profile-read` — before answering factual questions or embarking on activity. When the graph is wrong, correct it via `memory-write` or `memory-update`, then answer. Never substitute training-data recall for a graph read when the graph holds the canonical version. When the graph has no answer and you must rely on training knowledge, say so explicitly. *Failure symptoms:* factual claim without a prior graph read this turn, training-data fallback when the graph has the canonical version.
|
|
28
|
+
|
|
29
|
+
A landfill graph defeats EVIDENCE-BASED: search returns noise, the agent re-writes the noise, the noise compounds. Compress on write; filter on read.
|
|
30
|
+
|
|
31
|
+
---
|
|
32
|
+
|
|
15
33
|
## Optional capabilities
|
|
16
34
|
|
|
17
35
|
Some tools in your list come from optional plugins that may not be enabled. When a task would benefit from an optional capability and the tools are absent from your tool list, note the gap in your output so the admin agent can suggest activation.
|
package/payload/server/server.js
CHANGED
|
@@ -4005,6 +4005,7 @@ import {
|
|
|
4005
4005
|
existsSync as existsSync4,
|
|
4006
4006
|
mkdirSync as mkdirSync2,
|
|
4007
4007
|
readFileSync as readFileSync4,
|
|
4008
|
+
unlinkSync,
|
|
4008
4009
|
writeFileSync as writeFileSync3
|
|
4009
4010
|
} from "fs";
|
|
4010
4011
|
import { resolve as resolve3, join as join3, dirname } from "path";
|
|
@@ -4166,7 +4167,7 @@ import { spawn as spawn2, spawnSync as spawnSync2 } from "child_process";
|
|
|
4166
4167
|
import { randomUUID as randomUUID2 } from "crypto";
|
|
4167
4168
|
import { resolve as resolve6, join as join4 } from "path";
|
|
4168
4169
|
import { platform as osPlatform } from "os";
|
|
4169
|
-
import { readFileSync as readFileSync7, writeFileSync as writeFileSync5, readdirSync as readdirSync2, existsSync as existsSync6, mkdirSync as mkdirSync4, createWriteStream, statSync as statSync3, unlinkSync, cpSync, rmSync } from "fs";
|
|
4170
|
+
import { readFileSync as readFileSync7, writeFileSync as writeFileSync5, readdirSync as readdirSync2, existsSync as existsSync6, mkdirSync as mkdirSync4, createWriteStream, statSync as statSync3, unlinkSync as unlinkSync2, cpSync, rmSync } from "fs";
|
|
4170
4171
|
import { lookup as dnsLookup } from "dns/promises";
|
|
4171
4172
|
import { createConnection as netConnect } from "net";
|
|
4172
4173
|
import { StringDecoder } from "string_decoder";
|
|
@@ -6203,7 +6204,7 @@ function purgeOldLogs(logDir, prefix) {
|
|
|
6203
6204
|
if (!file2.startsWith(prefix)) continue;
|
|
6204
6205
|
const filePath = resolve6(logDir, file2);
|
|
6205
6206
|
try {
|
|
6206
|
-
if (statSync3(filePath).mtimeMs < cutoff)
|
|
6207
|
+
if (statSync3(filePath).mtimeMs < cutoff) unlinkSync2(filePath);
|
|
6207
6208
|
} catch (err) {
|
|
6208
6209
|
const msg = err instanceof Error ? err.message : String(err);
|
|
6209
6210
|
console.error(`[log-purge-err] file=${file2} reason=${msg}`);
|
|
@@ -10691,6 +10692,45 @@ function defaultRules() {
|
|
|
10691
10692
|
thresholdCount: 0,
|
|
10692
10693
|
thresholdWindowMinutes: 0,
|
|
10693
10694
|
suggestedAction: "A device-bound URL click failed to drive Chromium on the device's VNC display. Identify the `intent` and `hostname` from the log line, then check the VNC surface: read `vnc-boot.log` and confirm Chromium on :99 is responding on CDP port 9222. If CDP is unreachable, the operator needs to restart the VNC stack; if CDP is reachable but navigation errored, the URL itself may be malformed upstream \u2014 grep the stream log for the originating `[device-url:render]` line."
|
|
10695
|
+
},
|
|
10696
|
+
{
|
|
10697
|
+
// Task 554: fires when an agent turn emits a synthesized localhost/127.0.0.1
|
|
10698
|
+
// `__remote-auth/setup` URL. The only legitimate source for that URL is
|
|
10699
|
+
// `remote-auth-status`, which emits it inside a `maxy-device-url` affordance
|
|
10700
|
+
// block with the device's real hostname. A synthesized localhost variant is
|
|
10701
|
+
// the exact failure mode Task 554 closed: the removed "direct the user to
|
|
10702
|
+
// /__remote-auth/setup" clause in the password-setter's tool description
|
|
10703
|
+
// invited URL synthesis from a partial path. Session scope groups matches
|
|
10704
|
+
// by conversationId so a single offending turn fires exactly once, even if
|
|
10705
|
+
// the URL appears multiple times in the streamed response.
|
|
10706
|
+
id: "invented-remote-auth-url",
|
|
10707
|
+
name: "Invented localhost/127.0.0.1 remote-auth setup URL",
|
|
10708
|
+
type: "silent-catch",
|
|
10709
|
+
logSource: "any",
|
|
10710
|
+
pattern: "http(s)?://(localhost|127\\.0\\.0\\.1)[:\\w/.-]*__remote-auth/setup",
|
|
10711
|
+
thresholdCount: 0,
|
|
10712
|
+
thresholdWindowMinutes: 0,
|
|
10713
|
+
scope: "session",
|
|
10714
|
+
suggestedAction: "[Task 554 regression] An assistant turn emitted a synthesized localhost/127.0.0.1 remote-auth setup URL. The only authority for the browser-setup URL is `remote-auth-status`, which emits a `maxy-device-url` affordance block with the device's real hostname. Review the offending turn, confirm the `remote-auth-set-password` tool description and onboarding SKILL.md step 3 still lack URL-synthesis language, and patch whichever prose surface invited the synthesis."
|
|
10715
|
+
},
|
|
10716
|
+
{
|
|
10717
|
+
// Task 553: fires when `anthropic-setup` auto-resets a revoked API key.
|
|
10718
|
+
// The auto-reset is silent to the agent (the tool falls through to
|
|
10719
|
+
// awaiting_signin in the same call), but it is operator-visible — the
|
|
10720
|
+
// user's previously-stored key was just deleted because Anthropic
|
|
10721
|
+
// rejected it. Surfacing the event lets the admin agent explain on the
|
|
10722
|
+
// next turn why the user is being asked to sign in again instead of
|
|
10723
|
+
// continuing normally. The matching string is the exact stable prefix
|
|
10724
|
+
// emitted by the state machine immediately before `deleteKey()` is
|
|
10725
|
+
// invoked.
|
|
10726
|
+
id: "anthropic-setup-auth-error-auto-reset",
|
|
10727
|
+
name: "Anthropic API key auto-reset on auth_error",
|
|
10728
|
+
type: "silent-catch",
|
|
10729
|
+
logSource: "any",
|
|
10730
|
+
pattern: "\\[anthropic-setup\\] auth_error",
|
|
10731
|
+
thresholdCount: 0,
|
|
10732
|
+
thresholdWindowMinutes: 0,
|
|
10733
|
+
suggestedAction: "The stored Anthropic API key was rejected by console.anthropic.com (invalid, revoked, or expired) and `anthropic-setup` auto-deleted it. On the next operator interaction, explain that the key was cleared and walk them through sign-in again via the onboarding skill \u2014 the tool already returned `awaiting_signin` with the correct `browser_evaluate` action on the same call."
|
|
10694
10734
|
}
|
|
10695
10735
|
];
|
|
10696
10736
|
}
|
|
@@ -30893,7 +30933,7 @@ async function POST17(req, remoteAddress) {
|
|
|
30893
30933
|
}
|
|
30894
30934
|
|
|
30895
30935
|
// app/api/onboarding/set-pin/route.ts
|
|
30896
|
-
import { existsSync as existsSync16, writeFileSync as writeFileSync13, mkdirSync as mkdirSync10, readFileSync as readFileSync17, unlinkSync as
|
|
30936
|
+
import { existsSync as existsSync16, writeFileSync as writeFileSync13, mkdirSync as mkdirSync10, readFileSync as readFileSync17, unlinkSync as unlinkSync3 } from "fs";
|
|
30897
30937
|
import { createHash, randomUUID as randomUUID9 } from "crypto";
|
|
30898
30938
|
import { dirname as dirname6 } from "path";
|
|
30899
30939
|
function hashPin(pin) {
|
|
@@ -30980,7 +31020,7 @@ async function DELETE(req) {
|
|
|
30980
31020
|
}
|
|
30981
31021
|
const remaining = users.filter((u) => u.userId !== matchedUser.userId);
|
|
30982
31022
|
if (remaining.length === 0) {
|
|
30983
|
-
|
|
31023
|
+
unlinkSync3(USERS_FILE);
|
|
30984
31024
|
console.log(`[set-pin] cleared users.json (last entry removed): userId=${matchedUser.userId.slice(0, 8)}\u2026`);
|
|
30985
31025
|
} else {
|
|
30986
31026
|
writeFileSync13(USERS_FILE, JSON.stringify(remaining), { mode: 384 });
|