@rubytech/create-maxy-code 0.1.109 → 0.1.111

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.
Files changed (32) hide show
  1. package/dist/index.js +50 -150
  2. package/dist/snap-chromium.js +1 -2
  3. package/dist/uninstall.js +10 -9
  4. package/package.json +1 -1
  5. package/payload/platform/neo4j/schema.cypher +6 -3
  6. package/payload/platform/plugins/admin/PLUGIN.md +1 -0
  7. package/payload/platform/plugins/admin/mcp/dist/index.js +1 -1
  8. package/payload/platform/plugins/admin/mcp/dist/index.js.map +1 -1
  9. package/payload/platform/plugins/admin/skills/upgrade/SKILL.md +34 -0
  10. package/payload/platform/plugins/cloudflare/.claude-plugin/plugin.json +1 -1
  11. package/payload/platform/plugins/cloudflare/PLUGIN.md +9 -16
  12. package/payload/platform/plugins/cloudflare/mcp/dist/index.js +7 -12
  13. package/payload/platform/plugins/cloudflare/mcp/dist/index.js.map +1 -1
  14. package/payload/platform/plugins/cloudflare/references/dashboard-guide.md +3 -3
  15. package/payload/platform/plugins/cloudflare/references/manual-setup.md +19 -54
  16. package/payload/platform/plugins/cloudflare/references/reset-guide.md +29 -28
  17. package/payload/platform/plugins/cloudflare/skills/setup-tunnel/SKILL.md +29 -149
  18. package/payload/platform/plugins/docs/references/admin-session.md +1 -1
  19. package/payload/platform/plugins/docs/references/admin-ui.md +1 -1
  20. package/payload/platform/plugins/docs/references/cloudflare.md +20 -29
  21. package/payload/platform/plugins/docs/references/platform.md +1 -1
  22. package/payload/platform/plugins/docs/references/plugins-guide.md +1 -1
  23. package/payload/platform/plugins/docs/references/troubleshooting.md +1 -1
  24. package/payload/platform/scripts/check-no-task-id-leaks.mjs +1 -1
  25. package/payload/platform/templates/agents/admin/IDENTITY.md +1 -1
  26. package/payload/platform/templates/specialists/agents/personal-assistant.md +1 -1
  27. package/payload/platform/plugins/cloudflare/scripts/__tests__/tunnel-ingress.test.ts +0 -241
  28. package/payload/platform/plugins/cloudflare/scripts/list-cf-domains.sh +0 -98
  29. package/payload/platform/plugins/cloudflare/scripts/list-cf-domains.ts +0 -715
  30. package/payload/platform/plugins/cloudflare/scripts/reset-tunnel.sh +0 -107
  31. package/payload/platform/plugins/cloudflare/scripts/setup-tunnel.sh +0 -852
  32. package/payload/platform/plugins/cloudflare/scripts/tunnel-ingress.ts +0 -291
@@ -1,107 +0,0 @@
1
- #!/usr/bin/env bash
2
- # Reset a brand's Cloudflare tunnel state.
3
- # Inverse of setup-tunnel.sh; same scope boundary (tunnel state only).
4
- #
5
- # Deletes every tunnel on the brand's Cloudflare account (using the brand's
6
- # cert.pem) and wipes the brand-scoped cloudflared state directory. Leaves
7
- # the platform service alone — the operator decides whether to stop/restart
8
- # ${BRAND}.service.
9
- #
10
- # Usage:
11
- # reset-tunnel.sh <brand>
12
- #
13
- # Example:
14
- # reset-tunnel.sh maxy
15
- #
16
- # Does NOT delete stray misrouted CNAMEs in DNS (e.g. admin.maxy.bot.maxy.chat
17
- # from an earlier wrong-zone OAuth). Those are zone-specific DNS records the
18
- # CLI cannot enumerate from here; remove them manually in the CF dashboard.
19
-
20
- set -euo pipefail
21
-
22
- # --------------------------------------------------------------------------
23
- # Shared stream-log helpers (require STREAM_LOG_PATH, phase_line, tee_subprocess).
24
- # any cloudflared subprocess this script spawns is teed line-by-line
25
- # into the per-conversation stream log so the chat UI tailer renders live
26
- # progress — same contract as setup-tunnel.sh.
27
- # --------------------------------------------------------------------------
28
-
29
- # shellcheck source=_stream-log.sh
30
- # Resolve symlinks before dirname — ~/reset-tunnel.sh is installed as a symlink
31
- # (see packages/create-maxy-code/src/index.ts:installTunnelScripts), so the raw
32
- # BASH_SOURCE[0] points at $HOME, not the scripts directory where _stream-log.sh lives.
33
- source "$(dirname "$(readlink -f "${BASH_SOURCE[0]}")")/_stream-log.sh"
34
- require_stream_log_path reset-tunnel
35
-
36
- if [ "$#" -lt 1 ]; then
37
- echo "Usage: $0 <brand>" >&2
38
- exit 2
39
- fi
40
-
41
- BRAND="$1"
42
- CFG_DIR="${HOME}/.${BRAND}/cloudflared"
43
- CERT="${CFG_DIR}/cert.pem"
44
-
45
- phase_line reset-tunnel step=start brand="${BRAND}" cfg_dir="${CFG_DIR}"
46
-
47
- if [ ! -f "${CERT}" ]; then
48
- phase_line reset-tunnel step=no-cert cfg_dir="${CFG_DIR}"
49
- echo "No cert.pem at ${CERT} — nothing to delete via CLI."
50
- echo "Removing ${CFG_DIR} if present."
51
- rm -rf "${CFG_DIR}"
52
- phase_line reset-tunnel step=done result=wiped-no-cert
53
- exit 0
54
- fi
55
-
56
- # Delete every tunnel on the account (the cert is per-account for tunnel CRUD).
57
- # cloudflared's list/delete output is teed into STREAM_LOG_PATH; the `list`
58
- # call uses tee_subprocess_capture so NAMES_TMP receives the JSON for jq to
59
- # parse. Using the non-capture variant here would strand the JSON in stderr
60
- # and leave NAMES_TMP empty — every tunnel would silently survive reset.
61
- phase_line reset-tunnel step=list-tunnels
62
- NAMES_TMP="$(mktemp -t maxy-reset-tunnel-list.XXXXXX)"
63
- # shellcheck disable=SC2064
64
- trap "rm -f '${NAMES_TMP}'" EXIT
65
- if ! tee_subprocess_capture reset-tunnel:cloudflared -- \
66
- cloudflared --origincert "${CERT}" tunnel list --output json \
67
- > "${NAMES_TMP}"; then
68
- phase_line reset-tunnel step=list-tunnels result=error reason=cloudflared-list-failed
69
- echo "ERROR: cloudflared tunnel list failed. See stream log for detail." >&2
70
- exit 1
71
- fi
72
- NAMES="$(jq -r '.[]?.name' "${NAMES_TMP}" 2>/dev/null | sort -u || true)"
73
- if [ -z "${NAMES}" ]; then
74
- phase_line reset-tunnel step=list-tunnels result=empty
75
- echo "No tunnels to delete on this brand's account."
76
- else
77
- while IFS= read -r NAME; do
78
- [ -z "${NAME}" ] && continue
79
- phase_line reset-tunnel step=delete-tunnel name="${NAME}"
80
- echo "Deleting tunnel: ${NAME}"
81
- if ! tee_subprocess reset-tunnel:cloudflared -- \
82
- cloudflared --origincert "${CERT}" tunnel delete "${NAME}"; then
83
- phase_line reset-tunnel step=delete-tunnel result=error name="${NAME}"
84
- echo "ERROR: cloudflared tunnel delete failed for ${NAME}. See stream log." >&2
85
- exit 1
86
- fi
87
- done <<< "${NAMES}"
88
- fi
89
-
90
- # Wipe the brand-scoped cloudflared state directory.
91
- rm -rf "${CFG_DIR}"
92
- phase_line reset-tunnel step=wipe-cfg-dir path="${CFG_DIR}"
93
- echo "Removed ${CFG_DIR}"
94
-
95
- echo ""
96
- echo "Reset complete for brand=${BRAND}."
97
- echo ""
98
- echo "If earlier runs produced stray misrouted CNAMEs (e.g. admin.maxy.bot.maxy.chat"
99
- echo "when the cert was scoped to the wrong zone), delete those records manually in"
100
- echo "the Cloudflare dashboard — the CLI cannot enumerate them from here."
101
- echo ""
102
- echo "The platform service (${BRAND}.service) was not touched. To release any"
103
- echo "running cloudflared connector started by ${BRAND}.service's ExecStartPre,"
104
- echo "either restart the service (which will no-op on resume since tunnel.state"
105
- echo "is gone) or leave it running until you re-run setup-tunnel.sh."
106
-
107
- phase_line reset-tunnel step=done result=ok brand="${BRAND}"