You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 09f5a7a
Browse filesBrowse the repository at this point in the historyBrowse files
Copy file name to clipboardExpand all lines: docs/developers/connection-modes.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -41,9 +41,9 @@ The Gateway limits helper exposes Discord’s current `remaining`, `reset_after`
41
41
42
42
The implementation should select the lightest transport that satisfies the operation. A command must not open Gateway solely because it performs a normal REST mutation.
43
43
44
-
Use `discript daemon start` once, then pass `--broker` on Gateway-backed commands or scripts to reuse that connection. `--broker` is intentionally explicit so an agent can tell whether it is starting a new session or using the shared one. Broker requests have a bounded timeout and return structured `BROKER_TIMEOUT` or `BROKER_UNAVAILABLE` errors.
44
+
Use `discript daemon start` once, then pass `--broker` on Gateway-backed commands or scripts to reuse that connection. Set `DISCRIPT_SOCKET_PATH` for an explicit, permission-protected socket; this lets local clients connect without the Discord token and supports multiple daemon profiles. Give each bot a distinct socket and MCP port profile; Linux deployments can use `deploy/systemd/discript@.service`. Leave it unset to retain the legacy token-derived endpoint. `--broker` is intentionally explicit so an agent can tell whether it is starting a new session or using the shared one. Broker requests have a bounded timeout and return structured `BROKER_TIMEOUT` or `BROKER_UNAVAILABLE` errors.
45
45
46
-
Starting a second daemon for the same token is rejected with `BROKER_ALREADY_RUNNING`; the existing broker endpoint is never removed during startup. A stale endpoint is cleaned up only after no active broker can connect, and bind-time races are reported as the same duplicate-start error.
46
+
Starting a second daemon for the same explicit socket path is rejected with `BROKER_ALREADY_RUNNING`; use a distinct socket and MCP port profile for each bot. The existing broker endpoint is never removed during startup. A stale endpoint is cleaned up only after no active broker can connect, and bind-time races are reported as the same duplicate-start error.
47
47
48
48
Broker and MCP execution responses use the same request envelope. Successful executions contain `ok: true`, `requestId`, `exitCode: 0`, `value`, `warnings`, and `diagnostics`; failures retain the request ID and include a sanitized `code`, `error`, and exit code. This lets agents correlate local and remote execution without transport-specific parsing.
Copy file name to clipboardExpand all lines: docs/operations/configuration-reference.md
+3-1Lines changed: 3 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,7 +6,9 @@ Precedence is: explicitly exported process environment, project `.env`, user `~/
6
6
7
7
## MCP server profile
8
8
9
-
Set `DISCRIPT_CONNECTION_MODE=daemon` and `DISCRIPT_DAEMON_MODE=socket`, `mcp`, or `hybrid` to start the daemon. The daemon owns one Discord Gateway connection and its local socket broker. `mcp` and `hybrid` also start the configured MCP listener; `hybrid` is the explicit profile for local CLI-over-socket plus remote MCP clients. Use `DISCRIPT_MCP_TRANSPORT=http` or `https`, `DISCRIPT_MCP_PORT` for the primary listener, and `DISCRIPT_MCP_HTTP_PORT`/`DISCRIPT_MCP_HTTPS_PORT` for separate listeners and redirects. HTTPS requires `DISCRIPT_MCP_TLS_KEY_FILE` and `DISCRIPT_MCP_TLS_CERT_FILE`.
9
+
Set `DISCRIPT_CONNECTION_MODE=daemon` and `DISCRIPT_DAEMON_MODE=socket`, `mcp`, or `hybrid` to start the daemon. Set `DISCRIPT_SOCKET_PATH` to an explicit Unix socket or Windows named-pipe endpoint for multi-daemon profiles; clients using that path do not need the Discord token. If unset, the legacy token-derived endpoint is used. The daemon owns one Discord Gateway connection and its local socket broker. `mcp` and `hybrid` also start the configured MCP listener; `hybrid` is the explicit profile for local CLI-over-socket plus remote MCP clients. Use `DISCRIPT_MCP_TRANSPORT=http` or `https`, `DISCRIPT_MCP_PORT` for the primary listener, and `DISCRIPT_MCP_HTTP_PORT`/`DISCRIPT_MCP_HTTPS_PORT` for separate listeners and redirects. HTTPS requires `DISCRIPT_MCP_TLS_KEY_FILE` and `DISCRIPT_MCP_TLS_CERT_FILE`.
10
+
11
+
For multiple Linux daemons, keep one profile per bot under `/etc/discript/<name>.env`, give each profile a distinct `DISCRIPT_SOCKET_PATH`, MCP ports, and credentials, and run the packaged `deploy/systemd/discript@.service` as `discript@<name>.service`. Use `/run/discript-<name>/` for sockets when using the template's `RuntimeDirectory`.
10
12
11
13
Select `DISCRIPT_MCP_AUTH_MODE=none`, `static`, `bearer-passthrough`, or `oauth2`. OAuth2 additionally requires issuer, resource, and introspection endpoint settings. `DISCRIPT_MCP_ALLOWED_ORIGINS` is a comma-separated CORS allowlist.
0 commit comments