@seele00/seele 0.1.92 → 1.0.1

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 (100) hide show
  1. package/README.md +28 -72
  2. package/bin/seele +15 -0
  3. package/host-release-manifest.json +58 -0
  4. package/initial-work.json +8 -0
  5. package/libexec/seele-host +0 -0
  6. package/package.json +3 -8
  7. package/bin/seele-codex +0 -58
  8. package/libexec/seele-server +0 -0
  9. package/libexec/seele-worker +0 -0
  10. package/scripts/deploy/bootstrap.sh +0 -334
  11. package/scripts/deploy/prepare-proxy.sh +0 -273
  12. package/scripts/deploy/seele.env.example +0 -83
  13. package/scripts/deploy/start.sh +0 -101
  14. package/web/dist/assets/abnfDiagram-VRR7QNED-iVbCDf-k.js +0 -1
  15. package/web/dist/assets/arc-JMiJ4rr3.js +0 -1
  16. package/web/dist/assets/architectureDiagram-ZJ3FMSHR-DCm1qEn2.js +0 -36
  17. package/web/dist/assets/bash-BELqPA7S.js +0 -1
  18. package/web/dist/assets/blockDiagram-677ZJIJ3-DREKknbS.js +0 -132
  19. package/web/dist/assets/c4Diagram-LMCZKHZV-CRBVnPzq.js +0 -10
  20. package/web/dist/assets/channel-CGt1ZavO.js +0 -1
  21. package/web/dist/assets/chunk-2Q5K7J3B-CkxEyqvZ.js +0 -1
  22. package/web/dist/assets/chunk-32BRIVSS-CB0yAoU8.js +0 -1
  23. package/web/dist/assets/chunk-5VM5RSS4-mKXpYDxH.js +0 -15
  24. package/web/dist/assets/chunk-EX3LRPZG-By-Z97DF.js +0 -231
  25. package/web/dist/assets/chunk-JWPE2WC7-BwLo02Dp.js +0 -1
  26. package/web/dist/assets/chunk-MOJQB5TN-EbU6MBl6.js +0 -88
  27. package/web/dist/assets/chunk-RYQCIY6F-DD9Y8Wum.js +0 -1
  28. package/web/dist/assets/chunk-V7JOEXUC-DcD81gi4.js +0 -206
  29. package/web/dist/assets/chunk-VR4S4FIN-DWUywtQy.js +0 -1
  30. package/web/dist/assets/chunk-XXDRQBXY-CfbHSkHp.js +0 -1
  31. package/web/dist/assets/classDiagram-OUVF2IWQ-RHNeYK2H.js +0 -1
  32. package/web/dist/assets/classDiagram-v2-EOCWNBFH-RHNeYK2H.js +0 -1
  33. package/web/dist/assets/core-DnwHDF9S.js +0 -12
  34. package/web/dist/assets/cose-bilkent-JH36ORCC-DTMjsSNZ.js +0 -1
  35. package/web/dist/assets/css-CLj8gQPS.js +0 -1
  36. package/web/dist/assets/cynefin-VYW2F7L2-BQScOjLb.js +0 -178
  37. package/web/dist/assets/cynefinDiagram-TSTJHNR4-DsQ_Jv1S.js +0 -62
  38. package/web/dist/assets/cytoscape.esm-DTSO7Bv0.js +0 -331
  39. package/web/dist/assets/dagre-VKFMJZFB-CoBazNSr.js +0 -4
  40. package/web/dist/assets/defaultLocale-DX6XiGOO.js +0 -1
  41. package/web/dist/assets/diagram-FQU43EPY-C2pGJlRE.js +0 -3
  42. package/web/dist/assets/diagram-G47NLZAW-DngV_5ZL.js +0 -24
  43. package/web/dist/assets/diagram-NH7WQ7WH-CbT7cYnb.js +0 -24
  44. package/web/dist/assets/diagram-OA4YK3LP-CQgFDj1M.js +0 -30
  45. package/web/dist/assets/diagram-WEI45ONY-BSceWhV1.js +0 -41
  46. package/web/dist/assets/diff-D97Zzqfu.js +0 -1
  47. package/web/dist/assets/dockerfile-BcOcwvcX.js +0 -1
  48. package/web/dist/assets/ebnfDiagram-CCIWWBDH-DgYBGMFL.js +0 -1
  49. package/web/dist/assets/engine-javascript-DBd1bXLz.js +0 -141
  50. package/web/dist/assets/erDiagram-Q63AITRT-BN2Cy22X.js +0 -85
  51. package/web/dist/assets/flowDiagram-23GEKE2U-fDP66qf3.js +0 -156
  52. package/web/dist/assets/ganttDiagram-NO4QXBWP-C96QkOk8.js +0 -292
  53. package/web/dist/assets/gitGraphDiagram-IHSO6WYX-DutclwE1.js +0 -106
  54. package/web/dist/assets/github-light-DAi9KRSo.js +0 -1
  55. package/web/dist/assets/graph-C9eacEi8.js +0 -1
  56. package/web/dist/assets/html-pp8916En.js +0 -1
  57. package/web/dist/assets/index-B-eg8eRh.css +0 -1
  58. package/web/dist/assets/index-H6j_Btq9.js +0 -131
  59. package/web/dist/assets/infoDiagram-FWYZ7A6U-Cxc3YVQb.js +0 -2
  60. package/web/dist/assets/init-Gi6I4Gst.js +0 -1
  61. package/web/dist/assets/ishikawaDiagram-FXEZZL3T-BEnCjmqJ.js +0 -70
  62. package/web/dist/assets/java-CylS5w8V.js +0 -1
  63. package/web/dist/assets/javascript-wDzz0qaB.js +0 -1
  64. package/web/dist/assets/journeyDiagram-5HDEW3XC-BScd67RO.js +0 -139
  65. package/web/dist/assets/json-Cp-IABpG.js +0 -1
  66. package/web/dist/assets/jsonc-Des-eS-w.js +0 -1
  67. package/web/dist/assets/jsx-g9-lgVsj.js +0 -1
  68. package/web/dist/assets/kanban-definition-HUTT4EX6-BiWAReQL.js +0 -89
  69. package/web/dist/assets/katex-C5jXJg4s.js +0 -257
  70. package/web/dist/assets/layout-DEXfKzaS.js +0 -1
  71. package/web/dist/assets/linear-DgLbqYdz.js +0 -1
  72. package/web/dist/assets/map-Czzmt4hB.js +0 -1
  73. package/web/dist/assets/markdown-Cvjx9yec.js +0 -1
  74. package/web/dist/assets/mermaid.core-ejnGpyjP.js +0 -314
  75. package/web/dist/assets/mindmap-definition-LN4V7U3C-CIktRh3k.js +0 -96
  76. package/web/dist/assets/ordinal-Cboi1Yqb.js +0 -1
  77. package/web/dist/assets/pegDiagram-2B236MQR-C0VgWt36.js +0 -1
  78. package/web/dist/assets/pieDiagram-ENE6RG2P-VGApXGBB.js +0 -39
  79. package/web/dist/assets/python-B6aJPvgy.js +0 -1
  80. package/web/dist/assets/quadrantDiagram-ABIIQ3AL-BZw4Vnp1.js +0 -7
  81. package/web/dist/assets/railroadDiagram-RFXS5EU6-Bh5mwR_2.js +0 -1
  82. package/web/dist/assets/requirementDiagram-TGXJPOKE-CwvsMflb.js +0 -84
  83. package/web/dist/assets/sankeyDiagram-HTMAVEWB-Dg2sPge6.js +0 -40
  84. package/web/dist/assets/sequenceDiagram-DBY2YBRQ-C3mtBN6f.js +0 -162
  85. package/web/dist/assets/sizeCapture-X5ZJPWSS-BOAO9X3V.js +0 -1
  86. package/web/dist/assets/sql-CRqJ_cUM.js +0 -1
  87. package/web/dist/assets/stateDiagram-2N3HPSRC-BMWGawYB.js +0 -1
  88. package/web/dist/assets/stateDiagram-v2-6OUMAXLB-C_CHxKgw.js +0 -1
  89. package/web/dist/assets/swimlanes-5IMT3BWC-eeI5pSHG.js +0 -2
  90. package/web/dist/assets/swimlanesDiagram-G3AALYLV-CNbvemzA.js +0 -8
  91. package/web/dist/assets/timeline-definition-FHXFAJF6-C8wMFR-H.js +0 -120
  92. package/web/dist/assets/toml-vGWfd6FD.js +0 -1
  93. package/web/dist/assets/tsx-COt5Ahok.js +0 -1
  94. package/web/dist/assets/typescript-BPQ3VLAy.js +0 -1
  95. package/web/dist/assets/vennDiagram-L72KCM5P-CCG5V8jY.js +0 -34
  96. package/web/dist/assets/wardleyDiagram-EHGQE667-JUthxPJ1.js +0 -78
  97. package/web/dist/assets/xml-sdJ4AIDG.js +0 -1
  98. package/web/dist/assets/xychartDiagram-FW5EYKEG-DQjrRSzI.js +0 -7
  99. package/web/dist/assets/yaml-Buea-lGh.js +0 -1
  100. package/web/dist/index.html +0 -13
@@ -1,273 +0,0 @@
1
- #!/usr/bin/env bash
2
- set -euo pipefail
3
-
4
- # prepare-proxy.sh
5
- #
6
- # Prepare a clean LOCAL no-auth proxy entrypoint for Codex.
7
- #
8
- # Why this exists:
9
- # Some Codex HTTP clients (models refresh, MCP / ps/mcp) issue a bare
10
- # HTTP CONNECT to the configured proxy WITHOUT forwarding proxy credentials.
11
- # If the upstream proxy requires authentication it answers 407 and resets
12
- # the stream, surfacing as `stream disconnected before completion` /
13
- # `Transport channel closed`. The main response path uses SOCKS5 with creds
14
- # and works, which is why only those two auxiliary features break.
15
- #
16
- # Fix (no Codex change, purely at the proxy layer):
17
- # Run a LOCAL no-auth proxy listener. Codex sends its bare CONNECT to this
18
- # local listener (no auth required -> accepted). The local listener then
19
- # forwards upstream WITH the credentials taken from SEELE_UPSTREAM_PROXY.
20
- #
21
- # codex --bare CONNECT (no creds)--> 127.0.0.1:<port> (no auth)
22
- # --with creds--> SEELE_UPSTREAM_PROXY (socks5 exit) --> OpenAI
23
- #
24
- # IMPORTANT config model:
25
- # The Seele server injects SEELE_PROXY into the Codex environment
26
- # (ALL_PROXY/HTTP_PROXY/...). So Codex uses SEELE_PROXY directly. Therefore:
27
- # SEELE_PROXY = the LOCAL no-auth entrypoint (http://127.0.0.1:<port>)
28
- # SEELE_UPSTREAM_PROXY = the real credentialed upstream (socks5 exit)
29
- # Codex talks to the local no-auth entrypoint; only this script holds the
30
- # upstream credentials and forwards to the real exit.
31
- #
32
- # After running this, the Codex runtime (via SEELE_PROXY) and any other script
33
- # can simply use:
34
- # http://127.0.0.1:<port>
35
- # as their proxy, without ever handling credentials themselves.
36
- #
37
- # This replaces all the network-layer workarounds explored earlier
38
- # (WireGuard tunnel, MTU tweaks, custom routes): none of them are needed,
39
- # the upstream SOCKS5 exit is directly reachable.
40
-
41
- ROOT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/../.." && pwd)"
42
- cd "$ROOT_DIR"
43
-
44
- ENV_FILE=""
45
- ACTION="start"
46
-
47
- usage() {
48
- cat <<'EOF'
49
- Usage: ./scripts/deploy/prepare-proxy.sh [--env PATH] [--status|--stop]
50
-
51
- Prepares a local no-auth proxy entrypoint that forwards to the credentialed
52
- upstream (SEELE_UPSTREAM_PROXY), so Codex (via SEELE_PROXY) and other scripts
53
- can use http://127.0.0.1:<port> without handling credentials.
54
-
55
- Options:
56
- --env PATH Load configuration from an env file (e.g. ./seele.env).
57
- --status Show whether the local proxy is running and exit.
58
- --stop Stop the local proxy and exit.
59
- -h, --help Show this help.
60
-
61
- Relevant variables (from --env file or environment):
62
- SEELE_UPSTREAM_PROXY Real upstream proxy WITH credentials (required).
63
- Format: scheme://user:pass@host:port
64
- e.g. socks5h://user:pass@47.77.237.69:28888
65
- SEELE_LOCAL_PROXY_PORT Local listen port for the no-auth entrypoint.
66
- Default: 55860
67
- SEELE_LOCAL_PROXY_ADDR Local proxy URL other components should use.
68
- Default: http://127.0.0.1:<SEELE_LOCAL_PROXY_PORT>
69
- Set SEELE_PROXY to this value so Codex uses it.
70
- SEELE_GOST_BIN Path to the gost binary. Default: looked up on
71
- PATH, then $SEELE_ROOT/gost, then ./gost.
72
- SEELE_PROXY_PID_FILE PID file. Default: $SEELE_ROOT/.runtime/prepare-proxy.pid
73
- (falls back to /tmp/seele-prepare-proxy.pid).
74
- SEELE_PROXY_LOG_FILE Log file. Default: $SEELE_ROOT/.runtime/prepare-proxy.log
75
- (falls back to /tmp/seele-prepare-proxy.log).
76
- EOF
77
- }
78
-
79
- while [ "$#" -gt 0 ]; do
80
- case "$1" in
81
- --env)
82
- ENV_FILE="${2:-}"
83
- shift 2
84
- ;;
85
- --status)
86
- ACTION="status"
87
- shift
88
- ;;
89
- --stop)
90
- ACTION="stop"
91
- shift
92
- ;;
93
- -h|--help)
94
- usage
95
- exit 0
96
- ;;
97
- *)
98
- echo "Unknown option: $1" >&2
99
- usage >&2
100
- exit 1
101
- ;;
102
- esac
103
- done
104
-
105
- if [ -n "$ENV_FILE" ]; then
106
- if [ ! -f "$ENV_FILE" ]; then
107
- echo "Environment file not found: $ENV_FILE" >&2
108
- exit 1
109
- fi
110
- set -a
111
- # shellcheck disable=SC1090
112
- . "$ENV_FILE"
113
- set +a
114
- fi
115
-
116
- LOCAL_PORT="${SEELE_LOCAL_PROXY_PORT:-55860}"
117
- LOCAL_ADDR="${SEELE_LOCAL_PROXY_ADDR:-http://127.0.0.1:${LOCAL_PORT}}"
118
-
119
- # Choose a writable runtime location for pid/log.
120
- RUNTIME_BASE=""
121
- if [ -n "${SEELE_ROOT:-}" ] && [ -d "${SEELE_ROOT}/.runtime" ]; then
122
- RUNTIME_BASE="${SEELE_ROOT}/.runtime"
123
- elif [ -n "${SEELE_RUNTIME_DIR:-}" ] && [ -d "${SEELE_RUNTIME_DIR}" ]; then
124
- RUNTIME_BASE="${SEELE_RUNTIME_DIR}"
125
- fi
126
- if [ -n "$RUNTIME_BASE" ]; then
127
- PID_FILE="${SEELE_PROXY_PID_FILE:-${RUNTIME_BASE}/prepare-proxy.pid}"
128
- LOG_FILE="${SEELE_PROXY_LOG_FILE:-${RUNTIME_BASE}/prepare-proxy.log}"
129
- else
130
- PID_FILE="${SEELE_PROXY_PID_FILE:-/tmp/seele-prepare-proxy.pid}"
131
- LOG_FILE="${SEELE_PROXY_LOG_FILE:-/tmp/seele-prepare-proxy.log}"
132
- fi
133
-
134
- is_running() {
135
- # Returns 0 if a local proxy we manage is still alive.
136
- if [ -f "$PID_FILE" ]; then
137
- local pid
138
- pid="$(cat "$PID_FILE" 2>/dev/null || true)"
139
- if [ -n "$pid" ] && kill -0 "$pid" 2>/dev/null; then
140
- return 0
141
- fi
142
- fi
143
- return 1
144
- }
145
-
146
- port_listening() {
147
- if command -v ss >/dev/null 2>&1; then
148
- ss -tlnH "( sport = :${LOCAL_PORT} )" 2>/dev/null | grep -q ":${LOCAL_PORT}"
149
- else
150
- return 1
151
- fi
152
- }
153
-
154
- stop_proxy() {
155
- if is_running; then
156
- local pid
157
- pid="$(cat "$PID_FILE")"
158
- kill "$pid" 2>/dev/null || true
159
- sleep 1
160
- kill -9 "$pid" 2>/dev/null || true
161
- fi
162
- rm -f "$PID_FILE"
163
- }
164
-
165
- case "$ACTION" in
166
- status)
167
- if is_running; then
168
- echo "local proxy: RUNNING (pid $(cat "$PID_FILE"), $LOCAL_ADDR)"
169
- exit 0
170
- fi
171
- if port_listening; then
172
- echo "local proxy: port ${LOCAL_PORT} is listening but not managed by this script"
173
- exit 0
174
- fi
175
- echo "local proxy: NOT running"
176
- exit 1
177
- ;;
178
- stop)
179
- stop_proxy
180
- echo "local proxy: stopped"
181
- exit 0
182
- ;;
183
- esac
184
-
185
- # --- start ---
186
-
187
- if [ -z "${SEELE_UPSTREAM_PROXY:-}" ]; then
188
- echo "SEELE_UPSTREAM_PROXY is required (real upstream proxy WITH credentials)." >&2
189
- echo "Set it in seele.env, e.g.:" >&2
190
- echo " SEELE_UPSTREAM_PROXY=socks5h://user:password@47.77.237.69:28888" >&2
191
- echo "And set SEELE_PROXY to the local entrypoint so Codex uses it:" >&2
192
- echo " SEELE_PROXY=${LOCAL_ADDR}" >&2
193
- exit 1
194
- fi
195
-
196
- # Guard against a misconfiguration where the upstream points back at the
197
- # local entrypoint (would create a forwarding loop).
198
- case "$SEELE_UPSTREAM_PROXY" in
199
- *127.0.0.1:${LOCAL_PORT}*|*localhost:${LOCAL_PORT}*)
200
- echo "SEELE_UPSTREAM_PROXY must point at the real upstream exit, not the" >&2
201
- echo "local entrypoint (${LOCAL_ADDR}). Fix seele.env." >&2
202
- exit 1
203
- ;;
204
- esac
205
-
206
- # Normalize the upstream URL into a gost -F forward URL.
207
- # gost forwarder does not understand the "h" suffix (socks5h); it always
208
- # resolves the destination at the proxy side, so socks5h -> socks5.
209
- UPSTREAM="$SEELE_UPSTREAM_PROXY"
210
- case "$UPSTREAM" in
211
- socks5h://*) UPSTREAM="socks5://${UPSTREAM#socks5h://}" ;;
212
- esac
213
-
214
- # Locate gost binary.
215
- GOST_BIN="${SEELE_GOST_BIN:-}"
216
- if [ -z "$GOST_BIN" ]; then
217
- if command -v gost >/dev/null 2>&1; then
218
- GOST_BIN="$(command -v gost)"
219
- elif [ -n "${SEELE_ROOT:-}" ] && [ -x "${SEELE_ROOT}/gost" ]; then
220
- GOST_BIN="${SEELE_ROOT}/gost"
221
- elif [ -x "${ROOT_DIR}/gost" ]; then
222
- GOST_BIN="${ROOT_DIR}/gost"
223
- fi
224
- fi
225
- if [ -z "$GOST_BIN" ] || [ ! -x "$GOST_BIN" ]; then
226
- echo "gost binary not found." >&2
227
- echo "Install gost and either put it on PATH, set SEELE_GOST_BIN," >&2
228
- echo "or place it at \$SEELE_ROOT/gost." >&2
229
- exit 1
230
- fi
231
-
232
- # Idempotent: if already running, restart cleanly to pick up config changes.
233
- if is_running; then
234
- echo "local proxy already running (pid $(cat "$PID_FILE")), restarting..."
235
- stop_proxy
236
- fi
237
-
238
- if port_listening; then
239
- echo "Port ${LOCAL_PORT} is already in use by another process." >&2
240
- echo "Set SEELE_LOCAL_PROXY_PORT to a free port, or stop the other process." >&2
241
- exit 1
242
- fi
243
-
244
- # Start the local no-auth HTTP+SOCKS entrypoint (-L=http://:PORT has no creds)
245
- # forwarding to the credentialed upstream (-F).
246
- nohup "$GOST_BIN" -L="http://:${LOCAL_PORT}" -F="$UPSTREAM" \
247
- > "$LOG_FILE" 2>&1 &
248
- echo $! > "$PID_FILE"
249
-
250
- # Wait for the listener to come up.
251
- ok=0
252
- for _ in 1 2 3 4 5 6 7 8 9 10; do
253
- if port_listening; then ok=1; break; fi
254
- sleep 0.3
255
- done
256
-
257
- if [ "$ok" != "1" ]; then
258
- echo "local proxy failed to start; see $LOG_FILE" >&2
259
- tail -n 20 "$LOG_FILE" >&2 || true
260
- exit 1
261
- fi
262
-
263
- echo "local proxy ready."
264
- echo " listen : ${LOCAL_ADDR} (no auth)"
265
- echo " upstream: ${UPSTREAM%%@*}@*** (creds from SEELE_UPSTREAM_PROXY)"
266
- echo " pid : $(cat "$PID_FILE")"
267
- echo " log : ${LOG_FILE}"
268
- echo
269
- echo "Make sure seele.env has SEELE_PROXY pointing at this entrypoint:"
270
- echo " SEELE_PROXY=${LOCAL_ADDR}"
271
- echo
272
- echo "Other scripts can use this proxy directly:"
273
- echo " export HTTP_PROXY=${LOCAL_ADDR} HTTPS_PROXY=${LOCAL_ADDR} ALL_PROXY=${LOCAL_ADDR}"
@@ -1,83 +0,0 @@
1
- # Copy this file to seele.env and edit it on the target Linux host or pod.
2
- # Do not commit seele.env. It can contain proxy credentials and Codex auth data.
3
-
4
- # Confirm these with the package owner or target-environment owner before
5
- # running bootstrap.sh. Do not invent them.
6
- #
7
- # Public listen address and port for the single Seele Codex service.
8
- # Use 0.0.0.0 only when the service must be reachable from outside the pod.
9
- SEELE_CODEX_HOST=0.0.0.0
10
- SEELE_CODEX_PORT=3000
11
-
12
- # Used only by the cloud Seele to bootstrap its first administrator. Member
13
- # deployments authenticate against the cloud and ignore these values.
14
- # Store the password in the cloud secret store or uncommitted seele.env file.
15
- SEELE_AUTH_USERNAME=admin
16
- SEELE_AUTH_PASSWORD=
17
- # SEELE_AUTH_SESSION_TTL_SECONDS=2592000
18
-
19
- # Public base path used by the reverse proxy. Use "/" only when exposed at
20
- # domain root. If exposed under a subpath, use the actual externally visible
21
- # prefix confirmed by the deployment owner.
22
- SEELE_PUBLIC_BASE_PATH=/
23
-
24
- # Required trust root for deployment authorization. Use the cloud Seele's
25
- # externally or internally reachable base URL, including its public base path.
26
- # The cloud Seele must point this to its own reachable URL.
27
- SEELE_CLOUD_URL=
28
-
29
- # Required: confirm this with the package owner or target-environment owner.
30
- # SEELE_ROOT is the single root directory for this Seele deployment:
31
- # Codex runtime state: $SEELE_ROOT/.runtime
32
- # Seele workspace data: $SEELE_ROOT/workspaces
33
- SEELE_ROOT=
34
-
35
- # Advanced overrides. Leave these unset unless the package owner confirms a
36
- # different layout.
37
- # SEELE_RUNTIME_DIR=$SEELE_ROOT/.runtime
38
- # SEELE_CODEX_WORKSPACE_ROOT=$SEELE_ROOT/workspaces
39
-
40
- # SEELE_PROXY is injected into the Codex subprocess (ALL_PROXY/HTTP_PROXY/...).
41
- # Some Codex HTTP clients (models refresh / MCP) issue a bare HTTP CONNECT
42
- # WITHOUT proxy credentials; an upstream proxy that requires auth replies 407
43
- # and resets the stream (models/MCP fail while the main answer still works).
44
- #
45
- # Solution: point SEELE_PROXY at a LOCAL no-auth entrypoint, and let
46
- # scripts/deploy/prepare-proxy.sh run a local gost that forwards to the real
47
- # authenticated upstream. Run prepare-proxy.sh before start.sh.
48
- #
49
- # SEELE_PROXY -> local no-auth entrypoint Codex talks to
50
- # SEELE_UPSTREAM_PROXY -> real upstream with credentials (only the script holds it)
51
- #
52
- # Default local entrypoint port is 55860 (override via SEELE_LOCAL_PROXY_PORT).
53
- SEELE_PROXY=http://127.0.0.1:55860
54
-
55
- # Real upstream proxy with credentials. Used ONLY by prepare-proxy.sh as the
56
- # gost forward target (-F). Ask the package owner for the exact value.
57
- # Format: scheme://username:password@host:port (socks5h:// or http:// etc.)
58
- # Example:
59
- # SEELE_UPSTREAM_PROXY=socks5h://user:password@proxy.example.com:28888
60
- SEELE_UPSTREAM_PROXY=
61
- NO_PROXY=127.0.0.1,localhost,.svc,.cluster.local
62
-
63
- # Authentication mode for bootstrap.sh. Members must use none because their
64
- # Codex credentials are installed from the cloud after authorization. The
65
- # other modes are only for seeding the cloud deployment:
66
- # device Run `codex login --device-auth` if CODEX_HOME/auth.json is missing.
67
- # auth-json Copy CODEX_AUTH_JSON into CODEX_HOME/auth.json.
68
- # token Pipe CODEX_ACCESS_TOKEN to `codex login --with-access-token`.
69
- # none Skip local Codex authentication (default).
70
- SEELE_DEPLOY_AUTH_MODE=none
71
-
72
- # Required only for SEELE_DEPLOY_AUTH_MODE=auth-json.
73
- # CODEX_AUTH_JSON=/path/to/auth.json
74
-
75
- # Required only for SEELE_DEPLOY_AUTH_MODE=token.
76
- # CODEX_ACCESS_TOKEN=
77
-
78
- # Optional Codex home. The managed CLI path is always
79
- # $SEELE_RUNTIME_DIR/bin/codex so bootstrap and Seele's updater use the same file.
80
- # CODEX_HOME=$SEELE_ROOT/.runtime/codex-home
81
-
82
- # Optional corporate CA bundle for Codex login and HTTPS calls.
83
- # CODEX_CA_CERTIFICATE=/path/to/company-ca.pem
@@ -1,101 +0,0 @@
1
- #!/usr/bin/env bash
2
- set -euo pipefail
3
-
4
- ROOT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/../.." && pwd)"
5
- cd "$ROOT_DIR"
6
-
7
- ENV_FILE=""
8
-
9
- while [ "$#" -gt 0 ]; do
10
- case "$1" in
11
- --env)
12
- ENV_FILE="${2:-}"
13
- shift 2
14
- ;;
15
- -h|--help)
16
- echo "Usage: ./scripts/deploy/start.sh [--env PATH]"
17
- exit 0
18
- ;;
19
- *)
20
- echo "Unknown option: $1" >&2
21
- exit 1
22
- ;;
23
- esac
24
- done
25
-
26
- if [ -n "$ENV_FILE" ]; then
27
- if [ ! -f "$ENV_FILE" ]; then
28
- echo "Environment file not found: $ENV_FILE" >&2
29
- exit 1
30
- fi
31
- set -a
32
- # shellcheck disable=SC1090
33
- . "$ENV_FILE"
34
- set +a
35
- fi
36
-
37
- if [ -z "${SEELE_ROOT:-}" ]; then
38
- echo "SEELE_ROOT is required." >&2
39
- echo "Set it in seele.env to the confirmed Seele root directory." >&2
40
- exit 1
41
- fi
42
- if [ -z "${SEELE_CLOUD_URL:-}" ]; then
43
- echo "SEELE_CLOUD_URL is required." >&2
44
- echo "Set it to the reachable base URL of the cloud Seele." >&2
45
- exit 1
46
- fi
47
- export SEELE_ROOT
48
- RUNTIME_DIR="${SEELE_RUNTIME_DIR:-$SEELE_ROOT/.runtime}"
49
- export SEELE_RUNTIME_DIR="$RUNTIME_DIR"
50
- export SEELE_CODEX_HOST="${SEELE_CODEX_HOST:-0.0.0.0}"
51
- export SEELE_CODEX_PORT="${SEELE_CODEX_PORT:-3000}"
52
- export SEELE_CODEX_WORKSPACE_ROOT="${SEELE_CODEX_WORKSPACE_ROOT:-$SEELE_ROOT/workspaces}"
53
- export SEELE_CODEX_WEB_DIST="${SEELE_CODEX_WEB_DIST:-$ROOT_DIR/web/dist}"
54
-
55
- export NO_PROXY="${NO_PROXY:-127.0.0.1,localhost,.svc,.cluster.local}"
56
- export no_proxy="$NO_PROXY"
57
-
58
- SERVER_BIN="${SEELE_SERVER_BIN:-$ROOT_DIR/libexec/seele-server}"
59
- WORKER_BIN="${SEELE_WORKER_BIN:-$ROOT_DIR/libexec/seele-worker}"
60
- if [ ! -x "$SERVER_BIN" ] && [ -x "$ROOT_DIR/target/release/seele-server" ]; then
61
- SERVER_BIN="$ROOT_DIR/target/release/seele-server"
62
- fi
63
- if [ ! -x "$WORKER_BIN" ] && [ -x "$ROOT_DIR/target/release/seele-worker" ]; then
64
- WORKER_BIN="$ROOT_DIR/target/release/seele-worker"
65
- fi
66
- if [ ! -x "$SERVER_BIN" ] || [ ! -x "$WORKER_BIN" ] || [ ! -f "$SEELE_CODEX_WEB_DIST/index.html" ]; then
67
- echo "Build output is missing. Run ./scripts/deploy/bootstrap.sh first." >&2
68
- exit 1
69
- fi
70
- export SEELE_WORKER_BIN="$WORKER_BIN"
71
-
72
- # Prepare the local no-auth proxy entrypoint when an upstream proxy with
73
- # credentials is configured. Codex's models-refresh / MCP HTTP clients send a
74
- # bare HTTP CONNECT without proxy credentials; an authenticated upstream then
75
- # replies 407 and resets the stream. prepare-proxy.sh runs a local no-auth
76
- # listener (SEELE_PROXY) that forwards to the credentialed upstream
77
- # (SEELE_UPSTREAM_PROXY). It is idempotent, so a restart re-syncs it.
78
- # Skipped when SEELE_UPSTREAM_PROXY is unset (legacy single-proxy mode).
79
- if [ -n "${SEELE_UPSTREAM_PROXY:-}" ]; then
80
- echo "Preparing local no-auth proxy entrypoint (SEELE_UPSTREAM_PROXY is set)..."
81
- PREPARE_PROXY="$ROOT_DIR/scripts/deploy/prepare-proxy.sh"
82
- if [ ! -x "$PREPARE_PROXY" ]; then
83
- echo "prepare-proxy.sh not found or not executable at $PREPARE_PROXY" >&2
84
- exit 1
85
- fi
86
- if [ -n "$ENV_FILE" ]; then
87
- "$PREPARE_PROXY" --env "$ENV_FILE"
88
- else
89
- "$PREPARE_PROXY"
90
- fi
91
- fi
92
-
93
- mkdir -p "$SEELE_CODEX_WORKSPACE_ROOT"
94
-
95
- echo "Starting Seele on http://$SEELE_CODEX_HOST:$SEELE_CODEX_PORT"
96
- echo "Cloud authorization: $SEELE_CLOUD_URL"
97
- echo "Workspace root: $SEELE_CODEX_WORKSPACE_ROOT"
98
- echo "Server runtime: $SERVER_BIN"
99
- echo "Worker runtime: $SEELE_WORKER_BIN"
100
-
101
- exec "$SERVER_BIN"
@@ -1 +0,0 @@
1
- import{g as p,r as u,d as a}from"./chunk-MOJQB5TN-EbU6MBl6.js";import{p as f}from"./chunk-JWPE2WC7-BwLo02Dp.js";import{_ as n,l as o}from"./mermaid.core-ejnGpyjP.js";import{M as c,b as d}from"./cynefin-VYW2F7L2-BQScOjLb.js";import"./index-H6j_Btq9.js";var v=d().RailroadAbnf.parser.LangiumParser,i=n(e=>{const r=e.alternatives.map(g);return r.length===1?r[0]:{type:"choice",alternatives:r}},"transformAlternation"),g=n(e=>{const r=e.elements.map(y);return r.length===1?r[0]:{type:"sequence",elements:r}},"transformConcatenation"),b=n(e=>{if(e.includes("*")){const[t,s]=e.split("*"),l=t?parseInt(t,10):0,m=s?parseInt(s,10):1/0;return{min:l,max:m}}const r=parseInt(e,10);return{min:r,max:r}},"parseRepeat"),y=n(e=>{const r=A(e.primary);if(!e.repeat)return r;const{min:t,max:s}=b(e.repeat);return t===0&&s===1?{type:"optional",element:r}:{type:"repetition",element:r,min:t,max:s}},"transformElement"),A=n(e=>{switch(e.$type){case"AbnfStringLiteral":return{type:"terminal",value:e.value};case"AbnfNumVal":return{type:"terminal",value:e.value};case"AbnfRuleName":return{type:"nonterminal",name:e.name};case"AbnfGroup":return i(e.element);case"AbnfOptionalGroup":return{type:"optional",element:i(e.element)};default:throw new Error(`Unsupported ABNF primary node: ${e.$type}`)}},"transformPrimary"),P=n(e=>({name:e.name,definition:i(e.definition)}),"transformRule"),h=n(e=>{f(e,a),e.title&&a.setTitle(e.title),e.rules.map(r=>a.addRule(P(r)))},"populateDb"),R={parse:n(e=>{a.clear(),o.debug("[ABNF Parser] Starting Langium parse");const r=v.parse(e);if(r.lexerErrors.length>0||r.parserErrors.length>0)throw new c(r);const t=r.value;o.debug("[ABNF Parser] Parsed rules:",t.rules.length),h(t),o.debug("[ABNF Parser] Parse complete")},"parse"),parser:{yy:a}},B={parser:R,db:a,renderer:u,styles:p};export{B as diagram};
@@ -1 +0,0 @@
1
- import{G as ln,H as un,I as N,J as I,K as J,L as an,M as y,N as tn,O as j,P as _,Q as rn,R as o,S as on,T as sn,V as fn}from"./mermaid.core-ejnGpyjP.js";function cn(l){return l.innerRadius}function yn(l){return l.outerRadius}function gn(l){return l.startAngle}function dn(l){return l.endAngle}function mn(l){return l&&l.padAngle}function pn(l,h,q,O,v,R,K,u){var D=q-l,i=O-h,n=K-v,d=u-R,a=d*D-n*i;if(!(a*a<y))return a=(n*(h-R)-d*(l-v))/a,[l+a*D,h+a*i]}function W(l,h,q,O,v,R,K){var u=l-q,D=h-O,i=(K?R:-R)/j(u*u+D*D),n=i*D,d=-i*u,a=l+n,s=h+d,f=q+n,c=O+d,L=(a+f)/2,t=(s+c)/2,m=f-a,g=c-s,A=m*m+g*g,T=v-R,P=a*c-f*s,E=(g<0?-1:1)*j(on(0,T*T*A-P*P)),G=(P*g-m*E)/A,H=(-P*m-g*E)/A,w=(P*g+m*E)/A,p=(-P*m+g*E)/A,x=G-L,e=H-t,r=w-L,M=p-t;return x*x+e*e>r*r+M*M&&(G=w,H=p),{cx:G,cy:H,x01:-n,y01:-d,x11:G*(v/T-1),y11:H*(v/T-1)}}function hn(){var l=cn,h=yn,q=J(0),O=null,v=gn,R=dn,K=mn,u=null,D=ln(i);function i(){var n,d,a=+l.apply(this,arguments),s=+h.apply(this,arguments),f=v.apply(this,arguments)-an,c=R.apply(this,arguments)-an,L=rn(c-f),t=c>f;if(u||(u=n=D()),s<a&&(d=s,s=a,a=d),!(s>y))u.moveTo(0,0);else if(L>tn-y)u.moveTo(s*N(f),s*I(f)),u.arc(0,0,s,f,c,!t),a>y&&(u.moveTo(a*N(c),a*I(c)),u.arc(0,0,a,c,f,t));else{var m=f,g=c,A=f,T=c,P=L,E=L,G=K.apply(this,arguments)/2,H=G>y&&(O?+O.apply(this,arguments):j(a*a+s*s)),w=_(rn(s-a)/2,+q.apply(this,arguments)),p=w,x=w,e,r;if(H>y){var M=sn(H/a*I(G)),z=sn(H/s*I(G));(P-=M*2)>y?(M*=t?1:-1,A+=M,T-=M):(P=0,A=T=(f+c)/2),(E-=z*2)>y?(z*=t?1:-1,m+=z,g-=z):(E=0,m=g=(f+c)/2)}var Q=s*N(m),V=s*I(m),B=a*N(T),C=a*I(T);if(w>y){var F=s*N(g),U=s*I(g),X=a*N(A),Y=a*I(A),S;if(L<un)if(S=pn(Q,V,X,Y,F,U,B,C)){var Z=Q-S[0],$=V-S[1],k=F-S[0],b=U-S[1],nn=1/I(fn((Z*k+$*b)/(j(Z*Z+$*$)*j(k*k+b*b)))/2),en=j(S[0]*S[0]+S[1]*S[1]);p=_(w,(a-en)/(nn-1)),x=_(w,(s-en)/(nn+1))}else p=x=0}E>y?x>y?(e=W(X,Y,Q,V,s,x,t),r=W(F,U,B,C,s,x,t),u.moveTo(e.cx+e.x01,e.cy+e.y01),x<w?u.arc(e.cx,e.cy,x,o(e.y01,e.x01),o(r.y01,r.x01),!t):(u.arc(e.cx,e.cy,x,o(e.y01,e.x01),o(e.y11,e.x11),!t),u.arc(0,0,s,o(e.cy+e.y11,e.cx+e.x11),o(r.cy+r.y11,r.cx+r.x11),!t),u.arc(r.cx,r.cy,x,o(r.y11,r.x11),o(r.y01,r.x01),!t))):(u.moveTo(Q,V),u.arc(0,0,s,m,g,!t)):u.moveTo(Q,V),!(a>y)||!(P>y)?u.lineTo(B,C):p>y?(e=W(B,C,F,U,a,-p,t),r=W(Q,V,X,Y,a,-p,t),u.lineTo(e.cx+e.x01,e.cy+e.y01),p<w?u.arc(e.cx,e.cy,p,o(e.y01,e.x01),o(r.y01,r.x01),!t):(u.arc(e.cx,e.cy,p,o(e.y01,e.x01),o(e.y11,e.x11),!t),u.arc(0,0,a,o(e.cy+e.y11,e.cx+e.x11),o(r.cy+r.y11,r.cx+r.x11),t),u.arc(r.cx,r.cy,p,o(r.y11,r.x11),o(r.y01,r.x01),!t))):u.arc(0,0,a,T,A,t)}if(u.closePath(),n)return u=null,n+""||null}return i.centroid=function(){var n=(+l.apply(this,arguments)+ +h.apply(this,arguments))/2,d=(+v.apply(this,arguments)+ +R.apply(this,arguments))/2-un/2;return[N(d)*n,I(d)*n]},i.innerRadius=function(n){return arguments.length?(l=typeof n=="function"?n:J(+n),i):l},i.outerRadius=function(n){return arguments.length?(h=typeof n=="function"?n:J(+n),i):h},i.cornerRadius=function(n){return arguments.length?(q=typeof n=="function"?n:J(+n),i):q},i.padRadius=function(n){return arguments.length?(O=n==null?null:typeof n=="function"?n:J(+n),i):O},i.startAngle=function(n){return arguments.length?(v=typeof n=="function"?n:J(+n),i):v},i.endAngle=function(n){return arguments.length?(R=typeof n=="function"?n:J(+n),i):R},i.padAngle=function(n){return arguments.length?(K=typeof n=="function"?n:J(+n),i):K},i.context=function(n){return arguments.length?(u=n??null,i):u},i}export{hn as d};