@rubytech/create-maxy-code 0.1.459 → 0.1.461
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/__tests__/cron-heartbeat-registration.test.js +57 -28
- package/dist/__tests__/launchd-plist.test.js +26 -0
- package/dist/cron-registration.js +30 -8
- package/dist/index.js +50 -9
- package/dist/launchd-plist.js +1 -1
- package/dist/uninstall.js +9 -3
- package/package.json +1 -1
- package/payload/platform/lib/storage-broker/dist/__tests__/cf-exec.test.js +116 -6
- package/payload/platform/lib/storage-broker/dist/__tests__/cf-exec.test.js.map +1 -1
- package/payload/platform/lib/storage-broker/dist/__tests__/object-limits.test.js +20 -0
- package/payload/platform/lib/storage-broker/dist/__tests__/object-limits.test.js.map +1 -1
- package/payload/platform/lib/storage-broker/dist/__tests__/resource-limits.test.d.ts +2 -0
- package/payload/platform/lib/storage-broker/dist/__tests__/resource-limits.test.d.ts.map +1 -0
- package/payload/platform/lib/storage-broker/dist/__tests__/resource-limits.test.js +41 -0
- package/payload/platform/lib/storage-broker/dist/__tests__/resource-limits.test.js.map +1 -0
- package/payload/platform/lib/storage-broker/dist/cf-exec.d.ts +1 -0
- package/payload/platform/lib/storage-broker/dist/cf-exec.d.ts.map +1 -1
- package/payload/platform/lib/storage-broker/dist/cf-exec.js +116 -48
- package/payload/platform/lib/storage-broker/dist/cf-exec.js.map +1 -1
- package/payload/platform/lib/storage-broker/dist/index.d.ts +1 -0
- package/payload/platform/lib/storage-broker/dist/index.d.ts.map +1 -1
- package/payload/platform/lib/storage-broker/dist/index.js +1 -0
- package/payload/platform/lib/storage-broker/dist/index.js.map +1 -1
- package/payload/platform/lib/storage-broker/dist/object-limits.d.ts +27 -0
- package/payload/platform/lib/storage-broker/dist/object-limits.d.ts.map +1 -1
- package/payload/platform/lib/storage-broker/dist/object-limits.js +27 -7
- package/payload/platform/lib/storage-broker/dist/object-limits.js.map +1 -1
- package/payload/platform/lib/storage-broker/dist/resource-limits.d.ts +102 -0
- package/payload/platform/lib/storage-broker/dist/resource-limits.d.ts.map +1 -0
- package/payload/platform/lib/storage-broker/dist/resource-limits.js +105 -0
- package/payload/platform/lib/storage-broker/dist/resource-limits.js.map +1 -0
- package/payload/platform/lib/storage-broker/src/__tests__/cf-exec.test.ts +130 -7
- package/payload/platform/lib/storage-broker/src/__tests__/object-limits.test.ts +30 -0
- package/payload/platform/lib/storage-broker/src/__tests__/resource-limits.test.ts +49 -0
- package/payload/platform/lib/storage-broker/src/cf-exec.ts +129 -56
- package/payload/platform/lib/storage-broker/src/index.ts +1 -0
- package/payload/platform/lib/storage-broker/src/object-limits.ts +26 -6
- package/payload/platform/lib/storage-broker/src/resource-limits.ts +105 -0
- package/payload/platform/plugins/admin/skills/platform-architecture/SKILL.md +5 -4
- package/payload/platform/plugins/cloudflare/PLUGIN.md +3 -1
- package/payload/platform/plugins/cloudflare/bin/portal-enrol.mjs +96 -0
- package/payload/platform/plugins/cloudflare/mcp/__tests__/auth-route.test.ts +220 -0
- package/payload/platform/plugins/cloudflare/mcp/__tests__/authorize.test.ts +201 -0
- package/payload/platform/plugins/cloudflare/mcp/__tests__/file-routes.test.ts +178 -0
- package/payload/platform/plugins/cloudflare/mcp/__tests__/harness.test.ts +32 -0
- package/payload/platform/plugins/cloudflare/mcp/__tests__/passcode.test.ts +204 -0
- package/payload/platform/plugins/cloudflare/mcp/__tests__/portal-enrol.test.ts +207 -0
- package/payload/platform/plugins/cloudflare/mcp/__tests__/ratelimit.test.ts +77 -0
- package/payload/platform/plugins/cloudflare/mcp/__tests__/skill-contract.test.ts +46 -0
- package/payload/platform/plugins/cloudflare/mcp/__tests__/template-config.test.ts +55 -0
- package/payload/platform/plugins/cloudflare/mcp/__tests__/upload-route.test.ts +255 -0
- package/payload/platform/plugins/cloudflare/mcp/package.json +5 -2
- package/payload/platform/plugins/cloudflare/references/r2-object-storage.md +46 -0
- package/payload/platform/plugins/cloudflare/skills/data-portal/SKILL.md +125 -0
- package/payload/platform/plugins/cloudflare/skills/data-portal/template/functions/api/_lib/authorize.ts +32 -0
- package/payload/platform/plugins/cloudflare/skills/data-portal/template/functions/api/_lib/log.ts +12 -0
- package/payload/platform/plugins/cloudflare/skills/data-portal/template/functions/api/_lib/passcode.mjs +193 -0
- package/payload/platform/plugins/cloudflare/skills/data-portal/template/functions/api/_lib/ratelimit.ts +55 -0
- package/payload/platform/plugins/cloudflare/skills/data-portal/template/functions/api/_lib/session.ts +85 -0
- package/payload/platform/plugins/cloudflare/skills/data-portal/template/functions/api/_lib/types.ts +44 -0
- package/payload/platform/plugins/cloudflare/skills/data-portal/template/functions/api/auth.ts +119 -0
- package/payload/platform/plugins/cloudflare/skills/data-portal/template/functions/api/delete.ts +89 -0
- package/payload/platform/plugins/cloudflare/skills/data-portal/template/functions/api/download.ts +70 -0
- package/payload/platform/plugins/cloudflare/skills/data-portal/template/functions/api/files.ts +41 -0
- package/payload/platform/plugins/cloudflare/skills/data-portal/template/functions/api/upload.ts +151 -0
- package/payload/platform/plugins/cloudflare/skills/data-portal/template/public/index.html +42 -0
- package/payload/platform/plugins/cloudflare/skills/data-portal/template/public/portal.css +113 -0
- package/payload/platform/plugins/cloudflare/skills/data-portal/template/public/portal.js +155 -0
- package/payload/platform/plugins/cloudflare/skills/data-portal/template/schema.sql +73 -0
- package/payload/platform/plugins/cloudflare/skills/data-portal/template/wrangler.toml +21 -0
- package/payload/platform/plugins/cloudflare/skills/site-deploy/SKILL.md +8 -0
- package/payload/platform/plugins/docs/references/outlook-guide.md +3 -3
- package/payload/platform/plugins/docs/references/voice-mirror-guide.md +1 -0
- package/payload/platform/plugins/filesystem/PLUGIN.md +0 -1
- package/payload/platform/plugins/filesystem/mcp/dist/lib/scope.d.ts +14 -10
- package/payload/platform/plugins/filesystem/mcp/dist/lib/scope.d.ts.map +1 -1
- package/payload/platform/plugins/filesystem/mcp/dist/lib/scope.js +14 -10
- package/payload/platform/plugins/filesystem/mcp/dist/lib/scope.js.map +1 -1
- package/payload/platform/plugins/outlook/.claude-plugin/plugin.json +1 -1
- package/payload/platform/plugins/outlook/PLUGIN.md +3 -5
- package/payload/platform/plugins/outlook/mcp/dist/__tests__/detach.test.d.ts +2 -0
- package/payload/platform/plugins/outlook/mcp/dist/__tests__/detach.test.d.ts.map +1 -0
- package/payload/platform/plugins/outlook/mcp/dist/__tests__/detach.test.js +75 -0
- package/payload/platform/plugins/outlook/mcp/dist/__tests__/detach.test.js.map +1 -0
- package/payload/platform/plugins/outlook/mcp/dist/__tests__/draft-edit-removal.test.d.ts +2 -0
- package/payload/platform/plugins/outlook/mcp/dist/__tests__/draft-edit-removal.test.d.ts.map +1 -0
- package/payload/platform/plugins/outlook/mcp/dist/__tests__/draft-edit-removal.test.js +187 -0
- package/payload/platform/plugins/outlook/mcp/dist/__tests__/draft-edit-removal.test.js.map +1 -0
- package/payload/platform/plugins/outlook/mcp/dist/__tests__/draft-edit.test.js +1 -1
- package/payload/platform/plugins/outlook/mcp/dist/__tests__/draft-edit.test.js.map +1 -1
- package/payload/platform/plugins/outlook/mcp/dist/index.js +3 -2
- package/payload/platform/plugins/outlook/mcp/dist/index.js.map +1 -1
- package/payload/platform/plugins/outlook/mcp/dist/lib/attachment-list.d.ts +43 -0
- package/payload/platform/plugins/outlook/mcp/dist/lib/attachment-list.d.ts.map +1 -0
- package/payload/platform/plugins/outlook/mcp/dist/lib/attachment-list.js +65 -0
- package/payload/platform/plugins/outlook/mcp/dist/lib/attachment-list.js.map +1 -0
- package/payload/platform/plugins/outlook/mcp/dist/lib/detach.d.ts +65 -0
- package/payload/platform/plugins/outlook/mcp/dist/lib/detach.d.ts.map +1 -0
- package/payload/platform/plugins/outlook/mcp/dist/lib/detach.js +99 -0
- package/payload/platform/plugins/outlook/mcp/dist/lib/detach.js.map +1 -0
- package/payload/platform/plugins/outlook/mcp/dist/lib/outbound-attachments.d.ts +6 -1
- package/payload/platform/plugins/outlook/mcp/dist/lib/outbound-attachments.d.ts.map +1 -1
- package/payload/platform/plugins/outlook/mcp/dist/lib/outbound-attachments.js.map +1 -1
- package/payload/platform/plugins/outlook/mcp/dist/tools/draft-edit.d.ts +42 -22
- package/payload/platform/plugins/outlook/mcp/dist/tools/draft-edit.d.ts.map +1 -1
- package/payload/platform/plugins/outlook/mcp/dist/tools/draft-edit.js +59 -23
- package/payload/platform/plugins/outlook/mcp/dist/tools/draft-edit.js.map +1 -1
- package/payload/platform/plugins/outlook/mcp/dist/tools/mail-attachment.d.ts +15 -16
- package/payload/platform/plugins/outlook/mcp/dist/tools/mail-attachment.d.ts.map +1 -1
- package/payload/platform/plugins/outlook/mcp/dist/tools/mail-attachment.js +8 -41
- package/payload/platform/plugins/outlook/mcp/dist/tools/mail-attachment.js.map +1 -1
- package/payload/platform/plugins/outlook/references/auth.md +1 -1
- package/payload/platform/plugins/outlook/references/graph-surfaces.md +7 -3
- package/payload/platform/plugins/outlook/skills/outlook/SKILL.md +1 -1
- package/payload/platform/plugins/storage-broker/PLUGIN.md +1 -1
- package/payload/platform/plugins/voice-mirror/PLUGIN.md +19 -7
- package/payload/platform/plugins/voice-mirror/mcp/dist/index.d.ts.map +1 -1
- package/payload/platform/plugins/voice-mirror/mcp/dist/index.js +35 -16
- package/payload/platform/plugins/voice-mirror/mcp/dist/index.js.map +1 -1
- package/payload/platform/plugins/voice-mirror/mcp/dist/lib/admin-user.d.ts +31 -0
- package/payload/platform/plugins/voice-mirror/mcp/dist/lib/admin-user.d.ts.map +1 -0
- package/payload/platform/plugins/voice-mirror/mcp/dist/lib/admin-user.js +87 -0
- package/payload/platform/plugins/voice-mirror/mcp/dist/lib/admin-user.js.map +1 -0
- package/payload/platform/plugins/voice-mirror/mcp/dist/tools/voice-distil-profile.d.ts.map +1 -1
- package/payload/platform/plugins/voice-mirror/mcp/dist/tools/voice-distil-profile.js +111 -12
- package/payload/platform/plugins/voice-mirror/mcp/dist/tools/voice-distil-profile.js.map +1 -1
- package/payload/platform/plugins/voice-mirror/mcp/dist/tools/voice-ingest-session-text.d.ts.map +1 -1
- package/payload/platform/plugins/voice-mirror/mcp/dist/tools/voice-ingest-session-text.js +2 -1
- package/payload/platform/plugins/voice-mirror/mcp/dist/tools/voice-ingest-session-text.js.map +1 -1
- package/payload/platform/plugins/voice-mirror/mcp/dist/tools/voice-record-feedback.d.ts.map +1 -1
- package/payload/platform/plugins/voice-mirror/mcp/dist/tools/voice-record-feedback.js +2 -1
- package/payload/platform/plugins/voice-mirror/mcp/dist/tools/voice-record-feedback.js.map +1 -1
- package/payload/platform/plugins/voice-mirror/mcp/dist/tools/voice-retrieve-conditioning.d.ts.map +1 -1
- package/payload/platform/plugins/voice-mirror/mcp/dist/tools/voice-retrieve-conditioning.js +54 -21
- package/payload/platform/plugins/voice-mirror/mcp/dist/tools/voice-retrieve-conditioning.js.map +1 -1
- package/payload/platform/plugins/voice-mirror/mcp/dist/tools/voice-tag-content.d.ts +2 -2
- package/payload/platform/plugins/voice-mirror/mcp/dist/tools/voice-tag-content.d.ts.map +1 -1
- package/payload/platform/plugins/voice-mirror/mcp/dist/tools/voice-tag-content.js +12 -3
- package/payload/platform/plugins/voice-mirror/mcp/dist/tools/voice-tag-content.js.map +1 -1
- package/payload/platform/plugins/voice-mirror/mcp/scripts/smoke.mjs +444 -0
- package/payload/platform/plugins/voice-mirror/skills/voice-mirror/SKILL.md +18 -2
- package/payload/platform/scripts/__tests__/logs-rotate.test.sh +256 -0
- package/payload/platform/scripts/__tests__/resume-tunnel.test.sh +79 -0
- package/payload/platform/scripts/logs-rotate.sh +204 -0
- package/payload/platform/scripts/resume-tunnel.sh +27 -0
- package/payload/platform/scripts/voice-author-key-audit.sh +155 -0
- package/payload/platform/services/claude-session-manager/dist/http-server.d.ts.map +1 -1
- package/payload/platform/services/claude-session-manager/dist/http-server.js +41 -5
- package/payload/platform/services/claude-session-manager/dist/http-server.js.map +1 -1
- package/payload/platform/services/claude-session-manager/dist/index.d.ts +1 -0
- package/payload/platform/services/claude-session-manager/dist/index.d.ts.map +1 -1
- package/payload/platform/services/claude-session-manager/dist/index.js +22 -0
- package/payload/platform/services/claude-session-manager/dist/index.js.map +1 -1
- package/payload/platform/services/claude-session-manager/dist/install-start-counter.d.ts +2 -0
- package/payload/platform/services/claude-session-manager/dist/install-start-counter.d.ts.map +1 -0
- package/payload/platform/services/claude-session-manager/dist/install-start-counter.js +12 -0
- package/payload/platform/services/claude-session-manager/dist/install-start-counter.js.map +1 -0
- package/payload/platform/services/claude-session-manager/dist/mcp-descriptor-resolve.d.ts +17 -0
- package/payload/platform/services/claude-session-manager/dist/mcp-descriptor-resolve.d.ts.map +1 -0
- package/payload/platform/services/claude-session-manager/dist/mcp-descriptor-resolve.js +88 -0
- package/payload/platform/services/claude-session-manager/dist/mcp-descriptor-resolve.js.map +1 -0
- package/payload/platform/services/claude-session-manager/dist/pty-census.d.ts +122 -9
- package/payload/platform/services/claude-session-manager/dist/pty-census.d.ts.map +1 -1
- package/payload/platform/services/claude-session-manager/dist/pty-census.js +214 -29
- package/payload/platform/services/claude-session-manager/dist/pty-census.js.map +1 -1
- package/payload/platform/services/claude-session-manager/dist/pty-spawner.d.ts +0 -1
- package/payload/platform/services/claude-session-manager/dist/pty-spawner.d.ts.map +1 -1
- package/payload/platform/services/claude-session-manager/dist/pty-spawner.js +36 -24
- package/payload/platform/services/claude-session-manager/dist/pty-spawner.js.map +1 -1
- package/payload/platform/services/claude-session-manager/dist/rc-daemon.d.ts.map +1 -1
- package/payload/platform/services/claude-session-manager/dist/rc-daemon.js +13 -1
- package/payload/platform/services/claude-session-manager/dist/rc-daemon.js.map +1 -1
- package/payload/platform/services/claude-session-manager/dist/session-memory-cap.d.ts.map +1 -1
- package/payload/platform/services/claude-session-manager/dist/session-memory-cap.js +4 -2
- package/payload/platform/services/claude-session-manager/dist/session-memory-cap.js.map +1 -1
- package/payload/platform/services/claude-session-manager/dist/slice-memory-policy.d.ts +150 -0
- package/payload/platform/services/claude-session-manager/dist/slice-memory-policy.d.ts.map +1 -0
- package/payload/platform/services/claude-session-manager/dist/slice-memory-policy.js +333 -0
- package/payload/platform/services/claude-session-manager/dist/slice-memory-policy.js.map +1 -0
- package/payload/platform/services/claude-session-manager/dist/start-counter.d.ts +10 -0
- package/payload/platform/services/claude-session-manager/dist/start-counter.d.ts.map +1 -0
- package/payload/platform/services/claude-session-manager/dist/start-counter.js +55 -0
- package/payload/platform/services/claude-session-manager/dist/start-counter.js.map +1 -0
- package/payload/server/{chunk-Q6W4U6HL.js → chunk-JXWFVE5X.js} +83 -39
- package/payload/server/server.js +268 -73
- package/payload/server/{src-3I2RYZFB.js → src-4F37OHLK.js} +11 -1
- package/payload/platform/plugins/outlook/mcp/dist/__tests__/pkce-flow.test.d.ts +0 -2
- package/payload/platform/plugins/outlook/mcp/dist/__tests__/pkce-flow.test.js +0 -215
- package/payload/platform/plugins/outlook/mcp/dist/__tests__/pkce-flow.test.js.map +0 -1
|
@@ -0,0 +1,155 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# ============================================================
|
|
3
|
+
# voice-author-key-audit.sh
|
|
4
|
+
#
|
|
5
|
+
# Purpose
|
|
6
|
+
# -------
|
|
7
|
+
# Task 1701 — find voice-mirror keys that name no :AdminUser on their own
|
|
8
|
+
# account. Two distinct findings, do not conflate them:
|
|
9
|
+
#
|
|
10
|
+
# 1. :VoiceProfile nodes whose userId matches no :AdminUser on the profile's
|
|
11
|
+
# accountId. Such a profile is unreachable by any seat that resolves
|
|
12
|
+
# identity properly: it is silent dead data that looks, in the graph, like
|
|
13
|
+
# a real operator profile.
|
|
14
|
+
# 2. Content nodes carrying a voiceAuthor that matches no :AdminUser on the
|
|
15
|
+
# node's accountId. The corpus is attributed to an identity that does not
|
|
16
|
+
# exist, and personal distillation can never read it back.
|
|
17
|
+
#
|
|
18
|
+
# Finding (2) is the expected shape of the known Ecolec 'rob-mead' case: the
|
|
19
|
+
# tag path was the one write path with no identity check before Task 1701.
|
|
20
|
+
# Finding (1) should be empty on any install — both :VoiceProfile write paths
|
|
21
|
+
# have anchored on (:AdminUser {accountId, userId}) since Task 676. A hit there
|
|
22
|
+
# means something created an :AdminUser for an invented key, which is a
|
|
23
|
+
# different defect from the one Task 1701 closes; report it, do not assume it.
|
|
24
|
+
#
|
|
25
|
+
# '__org__' is the reserved org key (Task 676). It legitimately names no
|
|
26
|
+
# :AdminUser and anchors on :LocalBusiness, so it is excluded from both checks.
|
|
27
|
+
#
|
|
28
|
+
# READ-ONLY. This script never deletes and never re-keys. Findings sit on live
|
|
29
|
+
# client accounts, so disposition is an operator decision, not an agent one.
|
|
30
|
+
#
|
|
31
|
+
# Usage
|
|
32
|
+
# -----
|
|
33
|
+
# bash voice-author-key-audit.sh [--brand=NAME]
|
|
34
|
+
#
|
|
35
|
+
# --brand=NAME Brand name (e.g. "maxy-code", "sitedesk-code"). Auto-detected
|
|
36
|
+
# when exactly one ~/.<brand>/.neo4j-password exists.
|
|
37
|
+
#
|
|
38
|
+
# Reads:
|
|
39
|
+
# ~/.<brand>/.neo4j-password Neo4j password
|
|
40
|
+
# ~/.<brand>/.env NEO4J_URI (override with the env var)
|
|
41
|
+
#
|
|
42
|
+
# Exit codes
|
|
43
|
+
# ----------
|
|
44
|
+
# 0 no unmatched keys
|
|
45
|
+
# 1 unmatched keys found (details on stdout)
|
|
46
|
+
# 2 usage, credential, or connection error
|
|
47
|
+
# ============================================================
|
|
48
|
+
set -euo pipefail
|
|
49
|
+
|
|
50
|
+
BRAND=""
|
|
51
|
+
for arg in "$@"; do
|
|
52
|
+
case "$arg" in
|
|
53
|
+
--brand=*) BRAND="${arg#*=}" ;;
|
|
54
|
+
-h|--help) sed -n '2,45p' "$0"; exit 0 ;;
|
|
55
|
+
*)
|
|
56
|
+
echo "[voice-author-key-audit] ERROR unknown argument: $arg" >&2
|
|
57
|
+
exit 2
|
|
58
|
+
;;
|
|
59
|
+
esac
|
|
60
|
+
done
|
|
61
|
+
|
|
62
|
+
# Brand auto-detection mirrors dedupe-userprofile-ghosts.sh: exactly one
|
|
63
|
+
# ~/.<brand>/.neo4j-password means the brand is unambiguous. Zero or several
|
|
64
|
+
# means the operator must say which install to audit.
|
|
65
|
+
if [ -z "$BRAND" ]; then
|
|
66
|
+
candidates=()
|
|
67
|
+
for pw in "$HOME"/.*/.neo4j-password; do
|
|
68
|
+
[ -f "$pw" ] && candidates+=("$pw")
|
|
69
|
+
done
|
|
70
|
+
if [ "${#candidates[@]}" -ne 1 ]; then
|
|
71
|
+
echo "[voice-author-key-audit] ERROR cannot auto-detect brand (${#candidates[@]} candidates); pass --brand=NAME" >&2
|
|
72
|
+
exit 2
|
|
73
|
+
fi
|
|
74
|
+
BRAND="$(basename "$(dirname "${candidates[0]}")")"
|
|
75
|
+
BRAND="${BRAND#.}"
|
|
76
|
+
fi
|
|
77
|
+
|
|
78
|
+
BRAND_DIR="$HOME/.$BRAND"
|
|
79
|
+
PASSWORD_FILE="$BRAND_DIR/.neo4j-password"
|
|
80
|
+
if [ ! -f "$PASSWORD_FILE" ]; then
|
|
81
|
+
echo "[voice-author-key-audit] ERROR no password file at $PASSWORD_FILE" >&2
|
|
82
|
+
exit 2
|
|
83
|
+
fi
|
|
84
|
+
NEO4J_PASSWORD="$(tr -d '\n' < "$PASSWORD_FILE")"
|
|
85
|
+
|
|
86
|
+
if [ -z "${NEO4J_URI:-}" ] && [ -f "$BRAND_DIR/.env" ]; then
|
|
87
|
+
NEO4J_URI="$(grep -E '^NEO4J_URI=' "$BRAND_DIR/.env" | head -1 | cut -d= -f2- | tr -d '"' || true)"
|
|
88
|
+
fi
|
|
89
|
+
if [ -z "${NEO4J_URI:-}" ]; then
|
|
90
|
+
echo "[voice-author-key-audit] ERROR NEO4J_URI unset and not found in $BRAND_DIR/.env" >&2
|
|
91
|
+
exit 2
|
|
92
|
+
fi
|
|
93
|
+
|
|
94
|
+
if ! command -v cypher-shell >/dev/null 2>&1; then
|
|
95
|
+
echo "[voice-author-key-audit] ERROR cypher-shell not on PATH" >&2
|
|
96
|
+
exit 2
|
|
97
|
+
fi
|
|
98
|
+
|
|
99
|
+
run_cypher() {
|
|
100
|
+
if ! cypher-shell -a "$NEO4J_URI" -u "${NEO4J_USER:-neo4j}" -p "$NEO4J_PASSWORD" \
|
|
101
|
+
--format plain "$1"; then
|
|
102
|
+
echo "[voice-author-key-audit] ERROR cypher query failed against $NEO4J_URI" >&2
|
|
103
|
+
exit 2
|
|
104
|
+
fi
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
echo "[voice-author-key-audit] brand=$BRAND uri=$NEO4J_URI"
|
|
108
|
+
|
|
109
|
+
# 1. :VoiceProfile keys naming no :AdminUser on the profile's own account.
|
|
110
|
+
PROFILES="$(run_cypher "
|
|
111
|
+
MATCH (p:VoiceProfile)
|
|
112
|
+
WHERE p.userId <> '__org__'
|
|
113
|
+
AND NOT EXISTS {
|
|
114
|
+
MATCH (au:AdminUser {accountId: p.accountId, userId: p.userId})
|
|
115
|
+
}
|
|
116
|
+
RETURN p.accountId AS accountId, p.userId AS userId, p.format AS format,
|
|
117
|
+
coalesce(p.scope, 'personal') AS scope
|
|
118
|
+
ORDER BY accountId, userId, format;
|
|
119
|
+
")"
|
|
120
|
+
|
|
121
|
+
# 2. voiceAuthor stamps naming no :AdminUser on the node's own account,
|
|
122
|
+
# grouped by (account, key) with the node count so the blast radius of each
|
|
123
|
+
# invented key is visible.
|
|
124
|
+
STAMPS="$(run_cypher "
|
|
125
|
+
MATCH (n)
|
|
126
|
+
WHERE n.voiceAuthor IS NOT NULL
|
|
127
|
+
AND n.voiceAuthor <> '__org__'
|
|
128
|
+
AND NOT EXISTS {
|
|
129
|
+
MATCH (au:AdminUser {accountId: n.accountId, userId: n.voiceAuthor})
|
|
130
|
+
}
|
|
131
|
+
RETURN n.accountId AS accountId, n.voiceAuthor AS voiceAuthor, count(n) AS nodes
|
|
132
|
+
ORDER BY accountId, voiceAuthor;
|
|
133
|
+
")"
|
|
134
|
+
|
|
135
|
+
# cypher-shell --format plain emits a header row; data rows are everything after.
|
|
136
|
+
count_rows() {
|
|
137
|
+
printf '%s\n' "$1" | tail -n +2 | grep -c . || true
|
|
138
|
+
}
|
|
139
|
+
profile_rows="$(count_rows "$PROFILES")"
|
|
140
|
+
stamp_rows="$(count_rows "$STAMPS")"
|
|
141
|
+
|
|
142
|
+
echo "[voice-author-key-audit] --- :VoiceProfile keys naming no :AdminUser ---"
|
|
143
|
+
if [ "$profile_rows" -eq 0 ]; then echo "(none)"; else printf '%s\n' "$PROFILES"; fi
|
|
144
|
+
|
|
145
|
+
echo "[voice-author-key-audit] --- voiceAuthor stamps naming no :AdminUser ---"
|
|
146
|
+
if [ "$stamp_rows" -eq 0 ]; then echo "(none)"; else printf '%s\n' "$STAMPS"; fi
|
|
147
|
+
|
|
148
|
+
echo "[voice-author-key-audit] brand=$BRAND unmatched_profiles=$profile_rows unmatched_stamp_keys=$stamp_rows"
|
|
149
|
+
|
|
150
|
+
if [ "$profile_rows" -gt 0 ] || [ "$stamp_rows" -gt 0 ]; then
|
|
151
|
+
echo "[voice-author-key-audit] FAIL unmatched keys found — disposition (delete or re-key) is an operator decision; this script changes nothing" >&2
|
|
152
|
+
exit 1
|
|
153
|
+
fi
|
|
154
|
+
|
|
155
|
+
echo "[voice-author-key-audit] OK no unmatched keys"
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"http-server.d.ts","sourceRoot":"","sources":["../src/http-server.ts"],"names":[],"mappings":"AAqBA,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAA;AAgB3B,OAAO,EAkBL,KAAK,SAAS,EAEf,MAAM,kBAAkB,CAAA;AAkCzB,OAAO,KAAK,EAAE,SAAS,EAAyB,MAAM,iBAAiB,CAAA;AAEvE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAA;AAC1D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAA;AAE3D,OAAO,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAA;AAC9D,OAAO,EAAE,cAAc,EAA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ading development channels … ❯ 1. I am using this for local
|
|
3308
3308
|
// development … Enter to confirm") that a programmatic spawn cannot answer,
|
|
3309
|
-
// hanging the boot until
|
|
3309
|
+
// hanging the boot until the bind wait elapses (a blocked child writes no
|
|
3310
|
+
// pid file, so Task 1716 classifies it `outcome=failed`, and `blocker=` on
|
|
3311
|
+
// op=bind-signal-absent names the screen). Detect it once and send Enter to
|
|
3310
3312
|
// select option 1. The prompt is laid out with cursor-position escapes and
|
|
3311
3313
|
// no literal spaces, so match on the ANSI/space-stripped letter stream.
|
|
3312
3314
|
// Bounded startup keystroke only — inbound message submission stays a
|
|
@@ -3359,7 +3361,12 @@ export function buildHttpApp(deps) {
|
|
|
3359
3361
|
// by `registerRcSpawnPty`) handles the tracker side — fd release +
|
|
3360
3362
|
// tracker delete + the `kill … reason=process-exited` log.
|
|
3361
3363
|
let pidFileSeen = false;
|
|
3364
|
+
// Task 1716 — the second half of the bind verdict's discriminator. Set
|
|
3365
|
+
// first, so a child that has already gone can never be read as still
|
|
3366
|
+
// running by the decision below.
|
|
3367
|
+
let ptyExited = false;
|
|
3362
3368
|
pty.onExit((e) => {
|
|
3369
|
+
ptyExited = true;
|
|
3363
3370
|
const ranMs = Date.now() - start;
|
|
3364
3371
|
if (!pidFileSeen) {
|
|
3365
3372
|
deps.logger(`[rc-spawn] op=early-exit unitToken=${unitToken} pid=${pty.pid} ranMs=${ranMs} exitCode=${e.exitCode} signal=${e.signal ?? 'none'}`);
|
|
@@ -3490,8 +3497,33 @@ export function buildHttpApp(deps) {
|
|
|
3490
3497
|
// through the proxy unchanged so the client decides modal-vs-navigate
|
|
3491
3498
|
// from one server-supplied value.
|
|
3492
3499
|
const waitedMs = Date.now() - start;
|
|
3493
|
-
|
|
3494
|
-
|
|
3500
|
+
// Task 1716 — the bind signal certifies that a remote-control BRIDGE
|
|
3501
|
+
// exists, not that the session is usable. Device evidence 2026-07-17: a
|
|
3502
|
+
// child can attach its channel, drain and serve a full turn while
|
|
3503
|
+
// registering no bridge at all — no stdout banner, and a pid file carrying
|
|
3504
|
+
// every field except `bridgeSessionId`. Both signals then correctly report
|
|
3505
|
+
// "no bridge", so slug-absence alone cannot mean the spawn failed.
|
|
3506
|
+
//
|
|
3507
|
+
// The verdict is therefore derived from the child's real state at decision
|
|
3508
|
+
// time, which is why a "failed" verdict cannot coexist with a healthy
|
|
3509
|
+
// session by construction:
|
|
3510
|
+
// bound — a slug arrived on either signal.
|
|
3511
|
+
// unbound — no slug, but the child wrote its pid file and is still
|
|
3512
|
+
// running: usable, simply not navigable from claude.ai/code.
|
|
3513
|
+
// failed — no slug and the child never became a running registered
|
|
3514
|
+
// session (it died, or is stuck on a blocking screen; the
|
|
3515
|
+
// `blocker=` field on op=bind-signal-absent names which).
|
|
3516
|
+
const outcome = bridgeSessionId
|
|
3517
|
+
? 'bound'
|
|
3518
|
+
: pidFileSeen && !ptyExited
|
|
3519
|
+
? 'unbound'
|
|
3520
|
+
: 'failed';
|
|
3521
|
+
// `reason` is the string the client renders in its error modal
|
|
3522
|
+
// (Sidebar.tsx::resolveRcSpawnOutcome). Neither value names a pid bind:
|
|
3523
|
+
// the wait has been on the stdout banner since Task 662, and the old
|
|
3524
|
+
// `pid-bind-timeout` sent every reader to the wrong mechanism. Nor does
|
|
3525
|
+
// `spawn-not-ready` claim an exit — a blocked-but-alive child never exits.
|
|
3526
|
+
const reason = outcome === 'bound' ? null : outcome === 'unbound' ? 'bridge-unregistered' : 'spawn-not-ready';
|
|
3495
3527
|
// Task 1406 — derive the child's first-turn auth verdict. A bound child
|
|
3496
3528
|
// authenticated; an unbound child that printed `Not logged in` is the
|
|
3497
3529
|
// file-healthy-but-child-unauthenticated signature this task closes. Emitted
|
|
@@ -3507,8 +3539,12 @@ export function buildHttpApp(deps) {
|
|
|
3507
3539
|
// file produced a slug within the bound. This distinct marker names the
|
|
3508
3540
|
// artifact the manager waited for and the CLI version that produced
|
|
3509
3541
|
// neither, so a future CLI drift is read from one log line instead of
|
|
3510
|
-
// re-derived by reproduction.
|
|
3511
|
-
//
|
|
3542
|
+
// re-derived by reproduction.
|
|
3543
|
+
//
|
|
3544
|
+
// Task 1716 — this line fires for BOTH non-bound outcomes, which are not
|
|
3545
|
+
// the same event: `stdoutBytes` + `pidFileSeen` are what separate a dead
|
|
3546
|
+
// child (near-silent, no pid file) from a healthy unbound one (chatty,
|
|
3547
|
+
// pid file present, serving turns). Read them before concluding drift.
|
|
3512
3548
|
//
|
|
3513
3549
|
// Task 664 — scan the captured child stdout for the known blocking-screen
|
|
3514
3550
|
// markers and name the matched one (`blocker=`). `bindBuf` holds the 8 KB
|