staff-mcp 2.0.0 → 2.0.2

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 (39) hide show
  1. package/CHANGELOG.md +13 -0
  2. package/README.md +32 -32
  3. package/README_zh.md +32 -32
  4. package/dist/src/data/HttpDataSession.d.ts +0 -1
  5. package/dist/src/data/HttpDataSession.js +6 -5
  6. package/dist/src/data/HttpDataSession.js.map +1 -1
  7. package/dist/src/data/types.d.ts +2 -0
  8. package/dist/src/extensions/config.d.ts +1 -15
  9. package/dist/src/extensions/config.js +2 -36
  10. package/dist/src/extensions/config.js.map +1 -1
  11. package/dist/src/extensions/runtime.js +0 -5
  12. package/dist/src/extensions/runtime.js.map +1 -1
  13. package/dist/src/file-manager/transfers.d.ts +0 -2
  14. package/dist/src/file-manager/transfers.js +0 -14
  15. package/dist/src/file-manager/transfers.js.map +1 -1
  16. package/dist/src/index.js +17 -57
  17. package/dist/src/index.js.map +1 -1
  18. package/dist/src/reverse/SseTransport.d.ts +8 -0
  19. package/dist/src/reverse/SseTransport.js +84 -26
  20. package/dist/src/reverse/SseTransport.js.map +1 -1
  21. package/dist/src/server.js +8 -6
  22. package/dist/src/server.js.map +1 -1
  23. package/dist/src/terminal/pty.d.ts +1 -1
  24. package/dist/src/terminal/pty.js +7 -9
  25. package/dist/src/terminal/pty.js.map +1 -1
  26. package/dist/src/terminal/session.d.ts +0 -2
  27. package/dist/src/terminal/session.js +0 -18
  28. package/dist/src/terminal/session.js.map +1 -1
  29. package/dist/src/transports/http.d.ts +1 -10
  30. package/dist/src/transports/http.js +3 -48
  31. package/dist/src/transports/http.js.map +1 -1
  32. package/dist/src/transports/reverse.js +11 -0
  33. package/dist/src/transports/reverse.js.map +1 -1
  34. package/docs/file-manager.md +9 -8
  35. package/docs/terminal.md +5 -6
  36. package/package.json +1 -1
  37. package/dist/src/utils/server-activity.d.ts +0 -6
  38. package/dist/src/utils/server-activity.js +0 -46
  39. package/dist/src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AAE,MAAM,EAAE,EAAE;gBACzD,QAAQ,CAAC,KAAK,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC;YACnE,CAAC,CAAC,CAAC;YACH,OAAO,GAAG,CAAC,KAAK,IAAI,EAAE;gBAClB,MAAM,OAAO,GAAG,MAAM,OAAO,CAAC,UAAU,CACpC,CAAC,GAAG,QAAQ,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,OAAO,CAAC,EAAE,EAAE,CAChC,YAAY,CAAC,EAAE,EAAE,OAAO,CAAC,CAC5B,CACJ,CAAC;gBACF,QAAQ,CAAC,mBAAmB,EAAE,CAAC;gBAC/B,MAAM,cAAc,CAAC;gBACrB,MAAM,MAAM,GAAG,OAAO,CAAC,MAAM,CACzB,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,MAAM,KAAK,UAAU,CAC3C,CAAC;gBACF,IAAI,MAAM,CAAC,MAAM;oBACb,MAAM,IAAI,cAAc,CACpB,MAAM,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,MAAM,CAAC,EACrC,6BAA6B,CAChC,CAAC;YACV,CAAC,CAAC,EAAE,CAAC;YACL,OAAO,OAAO,CAAC;QACnB,CAAC;KACJ,CAAC;AACN,CAAC"}
@@ -60,6 +60,13 @@ export async function startReverseServer(serverFactory, value, token, name, opti
60
60
  accept,
61
61
  supportsPurpose,
62
62
  fetch: http.fetch,
63
+ resolveEndpoint: (endpoint) => {
64
+ // Match before URL parsing can normalize an unsafe spelling.
65
+ if (endpoint !== expected.pathname &&
66
+ endpoint !== expected.href)
67
+ throw new Error('Reverse data endpoint rejected');
68
+ return new URL(endpoint, url);
69
+ },
63
70
  validateEndpoint: (endpoint) => {
64
71
  if (endpoint.origin !== expected.origin ||
65
72
  endpoint.pathname !==
@@ -84,6 +91,7 @@ export async function startReverseServer(serverFactory, value, token, name, opti
84
91
  // start() completes once the SSE endpoint is admitted; only then start the initialization deadline.
85
92
  if (initializedAt === undefined) {
86
93
  initializationTimer = setTimeout(() => {
94
+ log.warn('Control connection closed: initialization-timeout.');
87
95
  void transport.close();
88
96
  }, options.initializationTimeout ?? 15000);
89
97
  initializationTimer.unref();
@@ -95,6 +103,9 @@ export async function startReverseServer(serverFactory, value, token, name, opti
95
103
  log.warn('Connection attempt ended before readiness or control connection closed.');
96
104
  }
97
105
  finally {
106
+ if (transport.failure) {
107
+ log.warn(`Control connection closed: ${JSON.stringify(transport.failure)}`);
108
+ }
98
109
  clearTimeout(initializationTimer);
99
110
  await transport.close().catch(() => { });
100
111
  attempt.abort();
@@ -1 +1 @@
1
- {"version":3,"file":"reverse.js","sourceRoot":"","sources":["../../../src/transports/reverse.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAC9C,OAAO,EAAE,UAAU,IAAI,KAAK,EAAE,MAAM,sBAAsB,CAAC;AAC3D,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAClE,OAAO,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAC7D,OAAO,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AACjE,OAAO,EACH,iBAAiB,EACjB,eAAe,EACf,kBAAkB,GACrB,MAAM,oBAAoB,CAAC;AAE5B,OAAO,EAAE,eAAe,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AAwBzE,mGAAmG;AACnG,MAAM,CAAC,KAAK,UAAU,kBAAkB,CACpC,aAA8B,EAC9B,KAAa,EACb,KAAa,EACb,IAAY,EACZ,UAAgC,EAAE;IAElC,MAAM,GAAG,GAAG,kBAAkB,CAAC,KAAK,CAAC,CAAC;IACtC,MAAM,KAAK,GAAG,eAAe,CAAC,GAAG,EAAE,OAAO,CAAC,KAAK,CAAC,CAAC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AC,MAAM,EAAE,CAAC,CAAC;YAC9D,CAAC;YAAC,MAAM,CAAC;gBACL,MAAM;YACV,CAAC;YACD,OAAO,GAAG,IAAI,CAAC,GAAG,CACd,OAAO,CAAC,SAAS,EAAE,QAAQ,IAAI,KAAK,EACpC,OAAO,GAAG,CAAC,CACd,CAAC;QACN,CAAC;IACL,CAAC,CAAC;IACF,MAAM,MAAM,GAAG,GAAG,EAAE,CAAC;IACrB,OAAO;QACH,MAAM;QACN,IAAI,EAAE,KAAK,IAAI,EAAE;YACb,KAAK,CAAC,KAAK,EAAE,CAAC;YACd,MAAM,MAAM,EAAE,KAAK,EAAE,CAAC,KAAK,CAAC,GAAG,EAAE,GAAE,CAAC,CAAC,CAAC;YACtC,MAAM,MAAM,CAAC;QACjB,CAAC;KACJ,CAAC;AACN,CAAC"}
@@ -1,6 +1,6 @@
1
1
  # Independent file manager extension
2
2
 
3
- This document describes the staff-mcp 2.0.0 file extension. Reverse and extensions require chat-ai commit `66461d16090456d6f1fee21ce19088dceefd6658` or a later compatible version, with matching host/descriptors/UI assets. The authoritative protocol is `chat-ai/docs/protocol/README.md` at that compatible host version; both endpoints implement it themselves, with no required extension SDK. Standard stdio/Streamable HTTP tools/resources/prompts remain supported. No Chat8/schema9/format7/share protocol2 data migration is required. See [compatibility and upgrade](../README.md#200-compatibility-and-upgrade).
3
+ This document describes the current file extension, including unreleased runtime simplifications after 2.0.1; published release notes remain unchanged. Reverse and extensions require a matching chat-ai host implementing reverse v1 and session-relative data paths, with matching host/descriptors/UI assets. The authoritative protocol is `chat-ai/docs/protocol/README.md` at that compatible host version; both endpoints implement it themselves, with no required extension SDK. Standard stdio/Streamable HTTP tools/resources/prompts remain supported. No Chat8/schema9/format7/share protocol2 data migration is required. See [compatibility and upgrade](../README.md#compatibility-and-coordinated-upgrades).
4
4
 
5
5
  Extensions are off by default. Unsupported versions, unavailable optional features or failed data setup leave an otherwise healthy standard MCP connection usable, without enabling the affected App. This does not make the old reverse handshake compatible: reverse requires a paired upgrade even when extensions are disabled, with no old-protocol fallback or automatic transfer resumption.
6
6
 
@@ -73,9 +73,11 @@ If any open tab for that file has unsaved changes, adding is blocked with an exp
73
73
 
74
74
  ## Roots, paths, and concurrent edits
75
75
 
76
- Files is enabled by `--extensions files` (or `--extensions files,terminal`). Its default root is `main=<working-dir>`. Repeatable `--file-root id=path` options replace the entire default root list; include `main` explicitly if it should remain. Root IDs must be unique lowercase letters/digits/hyphens, and relative directories resolve from the launching process cwd. The programmatic `ExtensionOptions.fileRoots` equivalent is `{rootId,directory}[]`; see [CLI/API examples](../README.md). These roots apply to the file app, files v1 and its standard file Resources, not standard tools' `--allowed-dir` permissions or terminal's default workspace cwd. With files disabled, file-root configuration does not alter standard Resources.
76
+ Files is enabled by `--extensions files` (or `--extensions files,terminal`). File roots reuse standard tool authorization: `main` is the workspace, followed by resolved, deduplicated `--allowed-dir` directories in order as `extra1`, `extra2`, etc. Explicit `-d` authorization is visible in the UI; relative directories resolve from the launching process cwd. The `rootId` RPC interface is unchanged; IDs are derived from the current ordered configuration, not user-selected or portable permissions. The programmatic `ExtensionOptions` now contains only `enabled`; there is no independent `fileRoots` option.
77
77
 
78
- Explicit `--file-root system=/` selects the filesystem visible to staff, subject to actual OS access. In Docker, explicit host roots are bind-mounted at `/opt/staff-file-roots/<id>`: `system=/` deliberately exposes the host root there. It does not grant new OS privileges or imply support for every Docker/platform topology. File roots and protected-path checks are not a machine-wide security boundary against an arbitrary shell running as the same account.
78
+ No system root is authorized automatically. Explicit `-d /` authorizes the filesystem visible to staff for both tools and files, subject to OS permissions. Docker reuses only the existing workspace and allowed-directory mounts, not separate file-root mounts; explicit host-root authorization is deliberately broad and remains subject to Docker topology and permissions. Terminal still starts at the workspace. File/path guards are not a machine-wide boundary against an arbitrary same-user shell. Removed CLI options fail as unknown options; see [CLI changes](../README.md).
79
+
80
+ Docker uses the same allowed-directory mounts for tools and files. Host filesystem roots map to `/opt/staff-allowed/root-N`, never container `/`; inner allowed directories and protected staging aliases follow that mapping.
79
81
 
80
82
  Public paths are root-relative literal names, not host absolute paths or URL-encoded paths. Traversal, symlink traversal, protected roots, and private staging access are checked by the file core. Percent signs in RPC paths are literal filename characters; only the resource URI boundary decodes each component once. Root IDs are session/configuration context, not portable filesystem permissions.
81
83
 
@@ -83,7 +85,7 @@ Text reads and edits are capped at **2 MiB**. `saveText` requires the version re
83
85
 
84
86
  `stat` returns metadata without reading/hashing file content by default. Call `stat` with `includeVersion: true` only when a mutation needs a content version; `readText` returns the version along with text. File selection/opening must not hash a large binary merely to display its name. Atomic replacements preserve the target permission bits, including executable bits. Upload copy and download snapshot/hash happen outside the shared write mutex; bounded final source/destination checks remain coordinated. External writers are detected through the documented version/identity checks, not locked out by this service.
85
87
 
86
- Private staging is under the workspace's `.staff/file-manager/`; supported file tools and extension browsing exclude/protect that area. The Docker wrapper also derives its aliases from the bind mounts it creates, including overlapping file roots: aliases cannot be read, written, listed, moved or deleted through file APIs, and their ancestors cannot be moved or deleted. A root mounted from within staging is protected in its entirety. This is a path guard for wrapper-owned mounts, not a general bind-mount or OS isolation mechanism; arbitrary extra `-D` mounts and same-user shell access are outside that guarantee. Do not treat staging files or transfer handles as user attachments or ordinary Resources.
88
+ Private staging is under the workspace's `.staff/file-manager/`; supported file tools and extension browsing exclude/protect that area. The Docker wrapper also derives its aliases from the bind mounts it creates, including overlapping allowed directories: aliases cannot be read, written, listed, moved or deleted through file APIs, and their ancestors cannot be moved or deleted. A root mounted from within staging is protected in its entirety. This is a path guard for wrapper-owned mounts, not a general bind-mount or OS isolation mechanism; arbitrary extra `-D` mounts and same-user shell access are outside that guarantee. Do not treat staging files or transfer handles as user attachments or ordinary Resources.
87
89
 
88
90
  ## Standard file Resources and attachments
89
91
 
@@ -124,7 +126,7 @@ All transports return the same prepared resource metadata, not a file-specific H
124
126
 
125
127
  With files enabled and data v1 negotiated/configured, direct HTTP uses `/mcp/data/<binding>` on the existing MCP listener, mounted before JSON parsing. For direct HTTP only, configure may include the host's configured HTTP(S) origin (no path/credentials/query/fragment) for HTTPS proxy advertisement; it does not authorize outbound fetch or trust Forwarded headers. Without it the initial request authority is used; stdio/reverse reject origin. Local stdio lazily starts a same-process 127.0.0.1 random-port listener at configure; stdout remains standard MCP JSON-RPC. The local Docker wrapper automatically publishes a private container port to a random 127.0.0.1 host port and passes baseUrl in read-only 0600 metadata, inspecting only its own cidfile container. This Docker application-data publication exists only when at least one extension is enabled; its listener remains lazy until configure. With all extensions off, dataAuto is false and no application-data publication, metadata mount, bootstrap or dataSession is created; ordinary workspace/package mounts remain. Non-Docker stdio has no application listener before configure. HTTP/reverse add no extra publication, and HTTP retains its standard MCP listener even with extensions off. The full-extension stdio Docker path requires Linux, reachable shared host loopback and a local daemon. Non-Linux Docker launchers and unsupported stdio data topologies warn and omit optional extensions, preserving standard tools when the base connection is usable; macOS is untested. Bootstrap/configure failure leaves standard MCP alive and data-dependent Apps unavailable. See the README for actual mount/daemon prerequisites; this does not add a remote tunnel or a legacy data fallback. Metadata/container uid and mount uid/gid permissions and native ABI/libc must match; no automatic chown or permission relaxation. See [README topology limits](../README.md).
126
128
 
127
- Reverse control uses SSE + POST on the existing Next Web port. The host includes its data link in open; remote validates that exact configured Web origin/session path and actively GETs/PUTs, without an inbound listener. Direct HTTP/stdio return the staff endpoint link for host access instead. Both use raw binary `get` GET / `put` PUT, cumulative ACK (`ack` POST for GET consumption, `ack` GET stream for PUT consumption), and `close` DELETE. Bearer token and X-Data-Binding scope access; no browser Origin, arbitrary URL, redirects or replay. Tickets never reach the iframe. Proxy/CA-aware HTTP clients are injected by the connection; actual proxy streaming still needs validation.
129
+ Reverse control uses SSE + POST on the existing Next Web port. The host includes its data link in open with the exact root-relative `/api/mcp/reverse/data/<session>` endpoint; remote resolves it against the existing `--ru` origin, validates the current session path, and actively GETs/PUTs without an inbound listener. No public URL setting is required on chat-ai. Direct HTTP/stdio return the staff endpoint link for host access instead. Both use raw binary `get` GET / `put` PUT, cumulative ACK (`ack` POST for GET consumption, `ack` GET stream for PUT consumption), and `close` DELETE. Bearer token and X-Data-Binding scope access; no browser Origin, arbitrary URL, redirects or replay. Tickets never reach the iframe. Proxy/CA-aware HTTP clients are injected by the connection; actual proxy streaming still needs validation.
128
130
 
129
131
  Deliveries are at most 64 KiB, with a **256 KiB sliding consumption window**, allowing multiple blocks in flight rather than per-block stop-and-wait. `write` resolves after bounded copy/queue admission; a full window waits for cumulative receiver ACK. ACK follows awaited serial receiver.data/end, not socket/fetch completion, and end/closed success requires the final consumption ACK. ACK emission coalesces cumulative offsets into one in-flight send plus one latest pending value; normal receiver.data does not await ACK RTT, and EOF flushes the final ACK. Concurrent write calls are rejected rather than queued without bound. File EOF/credit is not commit. All transports use the same TransferManager and commit checks; no FTE/Base64 fallback. `transfer_file` retains its model name/parameters and file URI validation; source and destination each consume an owner transfer slot and relay bounded bytes, never a whole-file host buffer or a locally opened remote path.
130
132
 
@@ -165,10 +167,9 @@ The independent files-v1 contract adds `stat {rootId,path}->{version}` for opaqu
165
167
 
166
168
  The HTTP data kernel accepts structurally valid purposes only through an explicit outer capability gate. The staff built-in runtime registers only enabled/negotiated files and terminal resources. The host admits negotiated files plus the purposes in current parsed streams-capable Apps, read lazily after discovery. Accepting new purpose syntax does not grant unknown business access.
167
169
 
168
- ### HTTP idle policy
169
-
170
- HTTP listener idle expiry reads existing resource activity: preparation, a valid transfer lease, queued byte I/O, cleanup and an admitted commit keep the session alive. Expired resources with no pending I/O and finished operation receipts do not. A control cancellation/HTTP disconnect is not proof that a write or commit has stopped. The policy never renews a file lease or changes published/unknown outcomes. A browser draft alone is not a server lease; reconnect and reopen the App before new operations after HTTP session expiry. See the README for listener capacity, defaults and configuration.
170
+ ### HTTP session lifetime
171
171
 
172
+ The HTTP listener has a fixed 64-session capacity and no MCP idle-expiry timer. Explicit session close, failed initialization and shutdown still wait for owned staging, in-flight I/O and admitted commits; cancellation/disconnect is not proof that a write stopped. File leases and final-record retention remain independent, without changing published/unknown outcomes. Clients should close unused MCP sessions; see the README for capacity and cleanup.
172
173
 
173
174
  ### Capability composition and streams
174
175
 
package/docs/terminal.md CHANGED
@@ -1,14 +1,14 @@
1
1
  # Terminal app UI
2
2
 
3
- This document describes the staff-mcp 2.0.0 terminal extension. Reverse and extensions require chat-ai commit `66461d16090456d6f1fee21ce19088dceefd6658` or a later compatible version, with matching host/descriptors/UI assets. The authoritative generic stream contract is `chat-ai/docs/protocol/streams.md` at that compatible host version; `chat-ai/docs/protocol/terminal.md` defines only the PTY business adapter, safety boundaries and UI differences. No Chat8/schema9/format7/share protocol2 data migration is required. See [compatibility and upgrade](../README.md#200-compatibility-and-upgrade).
3
+ This document describes the current terminal extension, including unreleased runtime simplifications after 2.0.1; published release notes remain unchanged. Reverse and extensions require a matching chat-ai host implementing reverse v1 and session-relative data paths, with matching host/descriptors/UI assets. The authoritative generic stream contract is `chat-ai/docs/protocol/streams.md` at that compatible host version; `chat-ai/docs/protocol/terminal.md` defines only the PTY business adapter, safety boundaries and UI differences. No Chat8/schema9/format7/share protocol2 data migration is required. See [compatibility and upgrade](../README.md#compatibility-and-coordinated-upgrades).
4
4
 
5
5
  Requires Node.js 22.22.2 or newer on the host and in Docker. Linux and Linux-host local Docker Engine are the primary full-extension environments. Windows native standard MCP (stdio and HTTP) and Windows Docker standard MCP have been validated, not full extensions. Non-Linux Docker launchers disable optional extensions; macOS is untested. Unavailable or incompatible optional capabilities must not break an otherwise healthy standard MCP connection. The old reverse handshake itself is incompatible even with extensions disabled: upgrade both endpoints rather than relying on extension degradation. There is no old-protocol fallback or automatic terminal input replay.
6
6
 
7
- `terminal` is an independent, human-operated app enabled with `--extensions terminal` or `--extensions files,terminal`. It requires Linux, a loadable optional `node-pty`, an executable shell, and streams/data v1 with a usable duplex dataSession. All extensions are disabled by default; apps/data dependencies and terminal's streams v1 manifest are derived automatically. When Linux/native PTY/shell prerequisites are unavailable, staff warns on stderr and disables terminal/streams without failing standard MCP or an available files extension; the default disabled state does not load native PTY code. Non-Linux Docker launchers disable optional extensions before starting the container; standard MCP tools/resources/prompts remain available when the base connection is usable. Local stdio/Docker, direct HTTP and reverse share that public raw HTTP data protocol; standard MCP control transports remain unchanged. The host uses the existing current-chat MCP grant and same-origin browser requests, without a separate terminal permission switch or high-risk confirmation. HTTP/HTTPS follows the site-wide deployment policy, with no terminal-only TLS gate or origin allowlist. HTTPS is recommended for the whole site; HTTP does not encrypt login sessions, tool calls or terminal traffic. Topology and CLI details are in the [README](../README.md). The self-contained HTML Resource is built to `dist/src/terminal/ui/index.html`; terminal bytes do not add model tools, chat messages or chat history.
7
+ `terminal` is an independent, human-operated app enabled with `--extensions terminal` or `--extensions files,terminal`. It requires Linux, a loadable optional `node-pty`, an executable shell, and streams/data v1 with a usable duplex dataSession. All extensions are disabled by default; apps/data dependencies and terminal's streams v1 manifest are derived automatically. When Linux/native PTY/shell prerequisites are unavailable, staff warns on stderr and disables terminal/streams without failing standard MCP or an available files extension; the default disabled state does not load native PTY code. Non-Linux Docker launchers disable optional extensions before starting the container; standard MCP tools/resources/prompts remain available when the base connection is usable. Local stdio/Docker, direct HTTP and reverse share that public raw HTTP data protocol; standard MCP control transports remain unchanged. The host uses the existing current-chat MCP grant and same-origin browser requests, without a separate terminal permission switch or high-risk confirmation. HTTP/HTTPS follows the site-wide deployment policy, with no terminal-only TLS gate or origin allowlist. HTTPS is recommended for the whole site; HTTP does not encrypt login sessions, tool calls or terminal traffic. Reverse resolves the host-provided current-session data path against the existing `--ru` origin; chat-ai does not need a public URL setting. Upgrade both endpoints together; HTTP/stdio addresses and extension versions remain unchanged. Topology and CLI details are in the [README](../README.md). The self-contained HTML Resource is built to `dist/src/terminal/ui/index.html`; terminal bytes do not add model tools, chat messages or chat history.
8
8
 
9
9
  ## Opening and stopping
10
10
 
11
- `--shell` takes an absolute executable file path. Without it, a valid absolute executable `$SHELL` is used; otherwise selection falls back to `/bin/bash`. The shell starts with `-i`, honors normal user startup files and preserves PATH, virtual environments and other staff environment variables. [`src/terminal/pty.ts`](../src/terminal/pty.ts) filters only these exact internal control keys: `STAFF_GLOBAL_DIR`, `STAFF_MCP_IS_DOCKER`, `STAFF_MCP_DATA_BOOTSTRAP`, `STAFF_MCP_DATA_HOST`, `STAFF_MCP_DATA_PORT`, `MCP_REVERSE_URL`, `MCP_REVERSE_TOKEN`, `MCP_REVERSE_NAME`, `MCP_HTTP_TOKEN`, `STAFF_MCP_HTTP_TOKEN`, `STAFF_MCP_REVERSE_TOKEN`. Missing `TERM` becomes `xterm-256color`, and `SHELL` is set to the selected executable. This is not a general secret scrubber or environment sandbox; the same OS identity may still access credentials and other files.
11
+ A valid absolute executable `$SHELL` is selected automatically, otherwise `/bin/bash`. If that executable or node-pty is unavailable, terminal is disabled with a warning; there is no further shell fallback or shell-selection parameter. `--shell` is removed and fails as an unknown option. The shell starts with `-i`, honors normal user startup files and preserves normal HOME, PATH, virtual environments and other staff environment variables. [`src/terminal/pty.ts`](../src/terminal/pty.ts) filters only these exact internal control keys: `STAFF_GLOBAL_DIR`, `STAFF_MCP_IS_DOCKER`, `STAFF_MCP_DATA_BOOTSTRAP`, `STAFF_MCP_DATA_HOST`, `STAFF_MCP_DATA_PORT`, `MCP_REVERSE_URL`, `MCP_REVERSE_TOKEN`, `MCP_REVERSE_NAME`, `MCP_HTTP_TOKEN`, `STAFF_MCP_HTTP_TOKEN`, `STAFF_MCP_REVERSE_TOKEN`. Missing `TERM` becomes `xterm-256color`, and `SHELL` is set to the selected executable. This is not a general secret scrubber or environment sandbox; the same OS identity may still access credentials and other files.
12
12
 
13
13
  Selecting the Shell App automatically starts one PTY after the host bridge becomes usable and the visible xterm viewport has been measured with its fonts ready; there is no additional open button or high-risk confirmation. The initial PTY uses those fitted columns and rows rather than starting at 80×24 and resizing after the first prompt. Hidden, zero-sized or not-yet-measurable views wait for a usable layout. The toolbar reserves its control height before connecting, so showing the buttons does not invalidate the initial row measurement; subsequent viewport changes continue through the normal resize path. The toolbar shows the returned shell and starting path. The PTY defaults to staff's workspace `main`, independently of file-app roots, and inherits staff's environment and OS identity, not a separate browser-user identity; its cwd is not an operating-system sandbox. Shell startup configuration and history are not suppressed, so the remote shell or programs may record content even though chat-ai does not add terminal bytes to chat history.
14
14
 
@@ -52,10 +52,9 @@ For a terminal-only UI check without compiling the server, use `node scripts/bui
52
52
 
53
53
  The terminal descriptor uses `bridgeVersion:1`, generic `scope:"chat"` and streams capability; nonterminal leased-byte Apps reuse the same host modules. All iframe handshake/message envelopes retain version 1; the 2.0.0 extension contract requires matching host assets and offers no legacy compatibility path. PTY state, actual lease and process cleanup remain server-owned. The host generic stream module follows each returned positive leaseMs rather than requiring a 30-second maximum; staff retains its own 30-second default. Host browser presence and render-buffer budgets remain independent and do not extend the server's resource without a real renew request. The bridge boundary does not change the 2.0.0 reverse/raw data framing; it does not provide compatibility with pre-2.0.0 reverse handshakes.
54
54
 
55
- ### HTTP idle policy
56
-
57
- A live owned PTY, pending creation, output/ACK draining and TERM-to-KILL/exit waiting protect its HTTP session even when there is no new output. The existing terminal lease and data-consumption deadlines still govern abandonment; HTTP idle sweeping does not renew them. Finished records alone do not pin a session. A terminal iframe without a PTY is not activity. The listener policy does not apply to stdio or reverse sessions; see the README for defaults and configuration.
55
+ ### HTTP session lifetime
58
56
 
57
+ HTTP MCP sessions have a fixed 64-session capacity and no idle-expiry timer. Existing terminal leases, browser presence, data-consumption deadlines and PTY output/exit cleanup remain unchanged; they do not renew or expire the MCP session itself. Explicit session close and listener shutdown still wait for owned PTY cleanup. Clients should explicitly close unused MCP sessions; see the README for capacity and cleanup.
59
58
 
60
59
  ### Business adapter and SDK boundary
61
60
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "staff-mcp",
3
- "version": "2.0.0",
3
+ "version": "2.0.2",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "https://github.com/ChineseAStar/staff-mcp.git"
@@ -1,6 +0,0 @@
1
- import type { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
2
- /** Install before business handlers. SDK-owned initialize/ping handlers stay untouched. */
3
- export declare function installRequestActivity(server: McpServer): void;
4
- /** Predicates read their owner's existing state; they must not renew or sweep resources. */
5
- export declare function registerServerActivity(server: McpServer, predicate: () => boolean): void;
6
- export declare function hasServerActivity(server: McpServer): boolean;
@@ -1,46 +0,0 @@
1
- const activities = new WeakMap();
2
- function activityFor(server) {
3
- let activity = activities.get(server);
4
- if (!activity) {
5
- activity = { requests: 0, installed: false, predicates: new Set() };
6
- activities.set(server, activity);
7
- }
8
- return activity;
9
- }
10
- /** Install before business handlers. SDK-owned initialize/ping handlers stay untouched. */
11
- export function installRequestActivity(server) {
12
- const activity = activityFor(server);
13
- if (activity.installed)
14
- return;
15
- const setRequestHandler = server.server.setRequestHandler.bind(server.server);
16
- server.server.setRequestHandler = (schema, handler) => {
17
- setRequestHandler(schema, async (request, extra) => {
18
- activity.requests++;
19
- try {
20
- // Cancellation/transport closure does not settle the actual handler.
21
- return await handler(request, extra);
22
- }
23
- finally {
24
- activity.requests--;
25
- }
26
- });
27
- };
28
- activity.installed = true;
29
- }
30
- /** Predicates read their owner's existing state; they must not renew or sweep resources. */
31
- export function registerServerActivity(server, predicate) {
32
- activityFor(server).predicates.add(predicate);
33
- }
34
- export function hasServerActivity(server) {
35
- const activity = activities.get(server);
36
- if (!activity)
37
- return false;
38
- if (activity.requests > 0)
39
- return true;
40
- for (const predicate of activity.predicates) {
41
- if (predicate())
42
- return true;
43
- }
44
- return false;
45
- }
46
- //# sourceMappingURL=server-activity.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"server-activity.js","sourceRoot":"","sources":["../../../src/utils/server-activity.ts"],"names":[],"mappings":"AAOA,MAAM,UAAU,GAAG,IAAI,OAAO,EAAuB,CAAC;AAEtD,SAAS,WAAW,CAAC,MAAiB;IAClC,IAAI,QAAQ,GAAG,UAAU,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;IACtC,IAAI,CAAC,QAAQ,EAAE,CAAC;QACZ,QAAQ,GAAG,EAAE,QA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