@rubytech/create-realagent 1.0.794 → 1.0.797
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/neo4j/migrations/003-person-name-eradicate.cypher +24 -0
- package/payload/platform/plugins/admin/PLUGIN.md +4 -0
- package/payload/platform/plugins/admin/hooks/__tests__/archive-ingest-gate.test.sh +166 -0
- package/payload/platform/plugins/admin/hooks/archive-ingest-gate.sh +147 -0
- package/payload/platform/plugins/admin/hooks/pre-tool-use.sh +9 -5
- package/payload/platform/plugins/admin/mcp/dist/index.js +54 -18
- package/payload/platform/plugins/admin/mcp/dist/index.js.map +1 -1
- package/payload/platform/plugins/docs/references/internals.md +4 -0
- package/payload/platform/plugins/docs/references/settings.md +6 -0
- package/payload/platform/plugins/linkedin-import/skills/linkedin-import/SKILL.md +2 -0
- package/payload/platform/plugins/memory/PLUGIN.md +4 -2
- package/payload/platform/plugins/memory/mcp/dist/index.js +2 -2
- 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 +11 -0
- package/payload/platform/plugins/memory/mcp/dist/lib/__tests__/schema-loader.test.js.map +1 -1
- package/payload/platform/plugins/memory/mcp/dist/lib/__tests__/schema-validator.test.js +124 -1
- package/payload/platform/plugins/memory/mcp/dist/lib/__tests__/schema-validator.test.js.map +1 -1
- package/payload/platform/plugins/memory/mcp/dist/lib/schema-loader.d.ts +12 -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 +41 -2
- package/payload/platform/plugins/memory/mcp/dist/lib/schema-loader.js.map +1 -1
- package/payload/platform/plugins/memory/mcp/dist/lib/schema-validator.d.ts +9 -0
- package/payload/platform/plugins/memory/mcp/dist/lib/schema-validator.d.ts.map +1 -1
- package/payload/platform/plugins/memory/mcp/dist/lib/schema-validator.js +44 -0
- package/payload/platform/plugins/memory/mcp/dist/lib/schema-validator.js.map +1 -1
- package/payload/platform/plugins/memory/mcp/dist/tools/__tests__/memory-archive-write.test.js +20 -2
- package/payload/platform/plugins/memory/mcp/dist/tools/__tests__/memory-archive-write.test.js.map +1 -1
- package/payload/platform/plugins/memory/mcp/dist/tools/memory-archive-write.d.ts +1 -1
- package/payload/platform/plugins/memory/mcp/dist/tools/memory-archive-write.d.ts.map +1 -1
- package/payload/platform/plugins/memory/mcp/dist/tools/memory-archive-write.js +0 -1
- package/payload/platform/plugins/memory/mcp/dist/tools/memory-archive-write.js.map +1 -1
- package/payload/platform/plugins/memory/mcp/dist/tools/whatsapp-export-parse.d.ts +2 -1
- package/payload/platform/plugins/memory/mcp/dist/tools/whatsapp-export-parse.d.ts.map +1 -1
- package/payload/platform/plugins/memory/mcp/dist/tools/whatsapp-export-parse.js.map +1 -1
- package/payload/platform/plugins/memory/references/schema-base.md +11 -1
- package/payload/platform/plugins/whatsapp-import/PLUGIN.md +4 -0
- package/payload/platform/plugins/whatsapp-import/lib/dist/parse-export.d.ts +8 -2
- package/payload/platform/plugins/whatsapp-import/lib/dist/parse-export.d.ts.map +1 -1
- package/payload/platform/plugins/whatsapp-import/lib/dist/parse-export.js +66 -15
- package/payload/platform/plugins/whatsapp-import/lib/dist/parse-export.js.map +1 -1
- package/payload/platform/plugins/whatsapp-import/lib/src/__tests__/parse-export.test.ts +175 -0
- package/payload/platform/plugins/whatsapp-import/lib/src/parse-export.ts +78 -17
- package/payload/platform/plugins/whatsapp-import/skills/whatsapp-import/SKILL.md +2 -0
- package/payload/platform/plugins/whatsapp-import/skills/whatsapp-import/references/export-parse.md +8 -6
- package/payload/platform/scripts/logs-read.sh +17 -12
- package/payload/platform/scripts/seed-neo4j.sh +43 -20
- package/payload/platform/templates/agents/admin/IDENTITY.md +6 -0
- package/payload/platform/templates/specialists/agents/database-operator.md +2 -0
- package/payload/server/chunk-BURNRCKP.js +3405 -0
- package/payload/server/chunk-JSBRDJBE.js +30 -0
- package/payload/server/chunk-KM23Y7SY.js +9896 -0
- package/payload/server/client-pool-PV45NUTN.js +29 -0
- package/payload/server/maxy-edge.js +3 -2
- package/payload/server/neo4j-migrations-IUSBODOP.js +51 -0
- package/payload/server/public/assets/{admin-jGbRjAxV.js → admin-Cz8hUAqx.js} +60 -60
- package/payload/server/public/assets/data-BvV94XHO.js +1 -0
- package/payload/server/public/assets/graph-CBu0rtrP.js +1 -0
- package/payload/server/public/assets/page-BNM63zsb.js +50 -0
- package/payload/server/public/assets/page-DM19J3ur.js +1 -0
- package/payload/server/public/assets/useAdminFetch-iYCQ9lT0.js +1 -0
- package/payload/server/public/data.html +3 -3
- package/payload/server/public/graph.html +3 -3
- package/payload/server/public/index.html +4 -4
- package/payload/server/server.js +116 -137
- package/payload/server/public/assets/data-BhrQjgR5.js +0 -1
- package/payload/server/public/assets/graph-Jj7seS-w.js +0 -1
- package/payload/server/public/assets/page-DIG7s5Jp.js +0 -1
- package/payload/server/public/assets/page-sZb3wcOM.js +0 -50
- package/payload/server/public/assets/share-2-BndjMKeG.js +0 -1
|
@@ -16,8 +16,10 @@
|
|
|
16
16
|
# logs-read.sh --tail [type] [lines] Tail most recent file of type
|
|
17
17
|
# logs-read.sh --grep <sessionKey> [type] Legacy grep across log files
|
|
18
18
|
#
|
|
19
|
-
# Types:
|
|
20
|
-
#
|
|
19
|
+
# Types: agent-stream (canonical, per-conversation tool-use/tool-result archive;
|
|
20
|
+
# `system` is kept as a backwards-compatible alias), session, error,
|
|
21
|
+
# heartbeat, public, server, mcp, vnc, review
|
|
22
|
+
# For per-conversation types (agent-stream/system/session/error/public): conversationId is
|
|
21
23
|
# required in the first mode. For platform-scoped types (server/vnc/review/
|
|
22
24
|
# heartbeat): conversationId is ignored.
|
|
23
25
|
#
|
|
@@ -93,9 +95,12 @@ account_suffix() {
|
|
|
93
95
|
|
|
94
96
|
# --- Prefix map (mirrors MCP tool exactly) ---
|
|
95
97
|
# Per-conversation types: stream log + its siblings (stderr, sse, public).
|
|
98
|
+
# Task 850 — `agent-stream` is the canonical name for the per-conversation
|
|
99
|
+
# tool-use/tool-result archive; `system` is kept as a backwards-compatible
|
|
100
|
+
# alias.
|
|
96
101
|
prefix_for_type() {
|
|
97
102
|
case "$1" in
|
|
98
|
-
system)
|
|
103
|
+
agent-stream|system) echo "claude-agent-stream-" ;;
|
|
99
104
|
error) echo "claude-agent-stderr-" ;;
|
|
100
105
|
session) echo "sse-events-" ;;
|
|
101
106
|
public) echo "public-agent-stream-" ;;
|
|
@@ -107,13 +112,13 @@ prefix_for_type() {
|
|
|
107
112
|
# Which types are per-conversation (the first mode's convId argument applies)
|
|
108
113
|
is_per_conversation_type() {
|
|
109
114
|
case "$1" in
|
|
110
|
-
system|error|session|public) return 0 ;;
|
|
115
|
+
agent-stream|system|error|session|public) return 0 ;;
|
|
111
116
|
*) return 1 ;;
|
|
112
117
|
esac
|
|
113
118
|
}
|
|
114
119
|
|
|
115
|
-
SEARCH_TYPES="
|
|
116
|
-
VALID_TYPES="system, session, error, heartbeat, public, server, mcp, vnc, review"
|
|
120
|
+
SEARCH_TYPES="agent-stream error session public server mcp vnc review"
|
|
121
|
+
VALID_TYPES="agent-stream, system, session, error, heartbeat, public, server, mcp, vnc, review"
|
|
117
122
|
|
|
118
123
|
usage() {
|
|
119
124
|
cat >&2 <<EOF
|
|
@@ -123,9 +128,9 @@ Usage:
|
|
|
123
128
|
logs-read.sh --grep <sessionKey> [type] Legacy grep across log files
|
|
124
129
|
|
|
125
130
|
Types: $VALID_TYPES
|
|
126
|
-
Default type:
|
|
131
|
+
Default type: agent-stream | Default lines: 50
|
|
127
132
|
|
|
128
|
-
Per-conversation types (system, session, error, public) require conversationId
|
|
133
|
+
Per-conversation types (agent-stream, system, session, error, public) require conversationId
|
|
129
134
|
in the first mode — the log file is named {prefix}-{conversationId}.log.
|
|
130
135
|
Platform-scoped types (server, vnc, review, heartbeat) ignore conversationId.
|
|
131
136
|
EOF
|
|
@@ -135,7 +140,7 @@ EOF
|
|
|
135
140
|
validate_type() {
|
|
136
141
|
local t="$1"
|
|
137
142
|
case "$t" in
|
|
138
|
-
system|session|error|heartbeat|public|server|mcp|vnc|review) return 0 ;;
|
|
143
|
+
agent-stream|system|session|error|heartbeat|public|server|mcp|vnc|review) return 0 ;;
|
|
139
144
|
*) echo "Error: invalid type '$t'. Valid types: $VALID_TYPES" >&2; exit 2 ;;
|
|
140
145
|
esac
|
|
141
146
|
}
|
|
@@ -161,7 +166,7 @@ validate_type() {
|
|
|
161
166
|
# - platform/plugins/admin/mcp/src/index.ts (conversationId branch)
|
|
162
167
|
per_conversation_mode() {
|
|
163
168
|
local conv_id="$1"
|
|
164
|
-
local filter_type="${2:-
|
|
169
|
+
local filter_type="${2:-agent-stream}"
|
|
165
170
|
|
|
166
171
|
if [[ -z "$conv_id" ]]; then
|
|
167
172
|
echo "Error: conversationId cannot be empty" >&2
|
|
@@ -362,7 +367,7 @@ grep_mode() {
|
|
|
362
367
|
}
|
|
363
368
|
|
|
364
369
|
tail_mode() {
|
|
365
|
-
local log_type="${1:-
|
|
370
|
+
local log_type="${1:-agent-stream}"
|
|
366
371
|
local lines="${2:-50}"
|
|
367
372
|
|
|
368
373
|
validate_type "$log_type"
|
|
@@ -462,7 +467,7 @@ fi
|
|
|
462
467
|
case "$1" in
|
|
463
468
|
--tail)
|
|
464
469
|
shift
|
|
465
|
-
tail_mode "${1:-
|
|
470
|
+
tail_mode "${1:-agent-stream}" "${2:-50}"
|
|
466
471
|
;;
|
|
467
472
|
--grep)
|
|
468
473
|
shift
|
|
@@ -98,6 +98,15 @@ fi
|
|
|
98
98
|
# webfetch-preflight.mjs: detects JS-SPA shells before WebFetch's
|
|
99
99
|
# 60s extraction timeout (Task 536). Fail-open on any error;
|
|
100
100
|
# on positive SPA detection exits 2 with WEBFETCH_CANNOT_READ_JS_SPA.
|
|
101
|
+
# archive-ingest-gate.sh (Task 846): blocks plugin-source edits, JS
|
|
102
|
+
# test runners, and any tool call after a *-export-parse /
|
|
103
|
+
# *-import-parse tool returns isError=true (cleared on next user
|
|
104
|
+
# prompt). Wired at three points: explicit Edit/Write/NotebookEdit/
|
|
105
|
+
# Bash matchers (path + test-runner enforcement), a no-matcher
|
|
106
|
+
# PreToolUse entry (post-parse-error gate fires on every tool),
|
|
107
|
+
# and a PostToolUse regex matcher for parse tools.
|
|
108
|
+
# UserPromptSubmit — archive-ingest-gate.sh clears the parse-error
|
|
109
|
+
# flag when the operator's next prompt arrives.
|
|
101
110
|
HOOKS_PATH="\$PLATFORM_ROOT/plugins/admin/hooks"
|
|
102
111
|
cat > "$ACCOUNT_SETTINGS" << SETTINGS_EOF
|
|
103
112
|
{
|
|
@@ -109,46 +118,60 @@ cat > "$ACCOUNT_SETTINGS" << SETTINGS_EOF
|
|
|
109
118
|
{
|
|
110
119
|
"matcher": "Write",
|
|
111
120
|
"hooks": [
|
|
112
|
-
{
|
|
113
|
-
|
|
114
|
-
"command": "bash $HOOKS_PATH/pre-tool-use.sh admin"
|
|
115
|
-
}
|
|
121
|
+
{ "type": "command", "command": "bash $HOOKS_PATH/pre-tool-use.sh admin" },
|
|
122
|
+
{ "type": "command", "command": "bash $HOOKS_PATH/archive-ingest-gate.sh" }
|
|
116
123
|
]
|
|
117
124
|
},
|
|
118
125
|
{
|
|
119
126
|
"matcher": "Edit",
|
|
120
127
|
"hooks": [
|
|
121
|
-
{
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
128
|
+
{ "type": "command", "command": "bash $HOOKS_PATH/pre-tool-use.sh admin" },
|
|
129
|
+
{ "type": "command", "command": "bash $HOOKS_PATH/archive-ingest-gate.sh" }
|
|
130
|
+
]
|
|
131
|
+
},
|
|
132
|
+
{
|
|
133
|
+
"matcher": "NotebookEdit",
|
|
134
|
+
"hooks": [
|
|
135
|
+
{ "type": "command", "command": "bash $HOOKS_PATH/archive-ingest-gate.sh" }
|
|
125
136
|
]
|
|
126
137
|
},
|
|
127
138
|
{
|
|
128
139
|
"matcher": "Bash",
|
|
129
140
|
"hooks": [
|
|
130
|
-
{
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
141
|
+
{ "type": "command", "command": "bash $HOOKS_PATH/pre-tool-use.sh admin" },
|
|
142
|
+
{ "type": "command", "command": "bash $HOOKS_PATH/archive-ingest-gate.sh" }
|
|
143
|
+
]
|
|
144
|
+
},
|
|
145
|
+
{
|
|
146
|
+
"hooks": [
|
|
147
|
+
{ "type": "command", "command": "bash $HOOKS_PATH/archive-ingest-gate.sh" }
|
|
134
148
|
]
|
|
135
149
|
},
|
|
136
150
|
{
|
|
137
151
|
"matcher": "mcp__plugin_playwright_playwright__browser_navigate",
|
|
138
152
|
"hooks": [
|
|
139
|
-
{
|
|
140
|
-
"type": "command",
|
|
141
|
-
"command": "bash $HOOKS_PATH/playwright-file-guard.sh"
|
|
142
|
-
}
|
|
153
|
+
{ "type": "command", "command": "bash $HOOKS_PATH/playwright-file-guard.sh" }
|
|
143
154
|
]
|
|
144
155
|
},
|
|
145
156
|
{
|
|
146
157
|
"matcher": "WebFetch",
|
|
147
158
|
"hooks": [
|
|
148
|
-
{
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
159
|
+
{ "type": "command", "command": "node $HOOKS_PATH/webfetch-preflight.mjs" }
|
|
160
|
+
]
|
|
161
|
+
}
|
|
162
|
+
],
|
|
163
|
+
"PostToolUse": [
|
|
164
|
+
{
|
|
165
|
+
"matcher": "mcp__.*__.*-(export|import)-parse$",
|
|
166
|
+
"hooks": [
|
|
167
|
+
{ "type": "command", "command": "bash $HOOKS_PATH/archive-ingest-gate.sh" }
|
|
168
|
+
]
|
|
169
|
+
}
|
|
170
|
+
],
|
|
171
|
+
"UserPromptSubmit": [
|
|
172
|
+
{
|
|
173
|
+
"hooks": [
|
|
174
|
+
{ "type": "command", "command": "bash $HOOKS_PATH/archive-ingest-gate.sh" }
|
|
152
175
|
]
|
|
153
176
|
}
|
|
154
177
|
]
|
|
@@ -202,6 +202,12 @@ The owner can manage who has admin access to this account through conversation.
|
|
|
202
202
|
|
|
203
203
|
Only the owner (or any current admin) can manage admins. Role is a label only — "owner" marks the original creator, "admin" marks subsequent additions. No capability differences are enforced.
|
|
204
204
|
|
|
205
|
+
**Three-store admin auth invariant.** Admin identity lives in three places that must stay in lockstep: `account.json` `admins[]` (account-level role), `users.json` (device-level PIN auth — the source of truth at login time), Neo4j `:AdminUser` + `:Person` + `OWNS` + `ADMIN_OF` (display + graph identity). `admin-add` writes all three; `admin-update-pin` writes `users.json` only (the other stores carry no PIN). Any leg failing makes the tool return `is_error: true` with a `[admin-auth-store] action=… userId=… result=fail store=…` line in `server.log` naming exactly which leg failed and what was already written. When you see such a line, treat the admin record as half-written and tell the owner — manual reconciliation may be needed.
|
|
206
|
+
|
|
207
|
+
**Never `Edit` or `Write` `account.json` directly.** All account-level mutations — `tier`, `outputStyle`, `thinkingView`, `effort`, `enabledPlugins`, `admins[]`, agent settings — go through the dedicated MCP tools: `account-update`, `plugin-toggle-enabled`, `admin-add`, `admin-remove`. The pre-tool-use hook denies direct `Edit`/`Write` on `account.json` server-side; this rule is the LLM-visible explanation. `tier` and `purchasedPlugins` specifically derive from a Rubytech-signed entitlement payload — the disk value of `account.json.tier` is ignored on commercial installs, so a hand-edit is silently void.
|
|
208
|
+
|
|
209
|
+
**`admin-add` retries — re-pass any user-stated PIN.** If `admin-add` returns an error (tier cap reached, PIN collision) and the owner resolves the blocker (upgrade tier, remove an existing admin), the retried `admin-add` MUST re-pass the PIN the owner originally stated as the `pin` parameter. Omitting `pin` on the retry auto-generates a different 4-digit PIN — silently substituting what the owner asked for. The resulting `admin-update-pin` correction loop is exactly the failure mode that hid the Adam Mackay incident from the recovery agent.
|
|
210
|
+
|
|
205
211
|
## Plugin and Account Management
|
|
206
212
|
|
|
207
213
|
Plugin installation, removal, and account settings changes are managed via conversation. Load the relevant skill via `plugin-read` (find its path in the manifest under `admin`).
|
|
@@ -30,6 +30,8 @@ A landfill graph defeats EVIDENCE-BASED: search returns noise, the agent re-writ
|
|
|
30
30
|
|
|
31
31
|
The pre-publish gate (`platform/scripts/verify-skill-tool-surface.sh`) statically asserts every shipped skill's prescribed `mcp__*` tokens resolve against your frontmatter `tools:` list, so a missing tool is a build error, not a production discovery. LOUD-FAIL is the runtime backstop when that gate is bypassed (e.g. operator-edited skill).
|
|
32
32
|
|
|
33
|
+
**Archive-ingest gate (Task 846).** During archive imports the LOUD-FAIL contract is structurally enforced by `platform/plugins/admin/hooks/archive-ingest-gate.sh`. When any `mcp__*__*-export-parse` / `mcp__*__*-import-parse` tool returns `isError: true`, the hook records a parse-error flag — every subsequent tool call in this turn is blocked at the harness, and you must yield back to the admin agent with a user-facing message naming the parse-error. The flag clears on the operator's next prompt. The same hook denies `Edit`/`Write`/`NotebookEdit` against `platform/plugins/*/lib/*` and Bash invocations of `vitest`/`bun test`/`npm test`/`npx jest` regardless of state — the operator does not own plugin source. *Failure symptoms (now harness-blocked):* appending vitest cases to a parser test file after `whatsapp-export-parse` returned isError, running `npx vitest` to "diagnose" a parser, editing `parse-export.ts` to "fix" a malformed input. Treat these blocks as confirmation that the gate is doing its job — surface the parse-error and yield, do not retry around the block.
|
|
34
|
+
|
|
33
35
|
---
|
|
34
36
|
|
|
35
37
|
## Output contract
|