Commit 39b50b5
authored
feat: graduate remote control, storage and the subagent model pool, and finish the tunnel stack (#306)
## Related Issue
No tracked issue — this is an internal reconciliation pass.
## Problem
Three experimental features were ready to graduate but still hid behind
flags, the `${now}` system prompt variable was documented but no longer
had a purpose, and the Remote Control tunnel stack was split between the
CLI and the gateway with no way to toggle it while the server ran.
Global search stayed broken after a corrupt write instead of recovering,
and a background task that outlived its agent emitted stray events.
## What changed
**Breaking**
- Remote Control, session indexing and global search no longer need
experimental flags. Session indexing and search move to a new
`[database]` config section; both kill-switch environment variables lose
their `_EXPERIMENTAL` prefix.
- The subagent model pool is always on; `[secondary_model]` takes effect
with no opt-in.
- `${now}` is gone from custom system prompt templates. It renders
verbatim as an unknown placeholder now, and the agent still receives the
current date through the environment disclosure.
**Features**
- `GET` and `POST /api/v1/remote-control` start and stop Remote Control
while the server runs, backed by an xstate manager with
`off`/`starting`/`on`/`stopping` states.
- New `packages/remote-control` workspace holds the tunnel client and
its machine-wide single-instance lock, shared by the gateway and the
CLI. Both `flake.nix` lists were updated; the `pnpmDeps` hash is
unchanged.
**Fixes**
- The Remote Control banner's Local UI link carries the server token, so
it opens without a second sign-in.
- The tunnel gzips text, JSON, JavaScript, XML and SVG responses; it
skips `206` and already-encoded bodies, drops the ETag when it
compresses, and always sets `Vary: Accept-Encoding`.
- Global search rebuilds its index instead of staying broken when stored
data is corrupt or a write keeps failing.
- A background task settling after its agent is torn down no longer
emits task events.
- The desktop updater falls back to the default macOS manifest when the
channel argument is empty.
Notable adaptations: `REMOTE_CONTROL_ALREADY_RUNNING` uses code `40939`
because `40928` is already `FS_CONFLICT` here, and the late-settlement
fix is placed after `tryAcquireQuiescence` rather than before the loop
drain, because this codebase reworked `close()` into phase-based error
collection.
## Checklist
- [x] I have read the
[CONTRIBUTING](https://github.com/PyModel/pythinker-code/blob/main/CONTRIBUTING.md)
document.
- [ ] I have linked a related issue (external PRs: the issue must have a
maintainer's `/approve`).
- [x] I have added tests that prove my feature works.
- [x] Ran `gen-changesets` skill, or this PR needs no changeset.
- [x] Ran `gen-docs` skill, or this PR needs no doc update.
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
* **New Features**
* Remote Control is generally available through CLI, web commands, and
`/remote-control`.
* Added runtime start/stop controls through the server API.
* Secondary-model routing is available without experimental opt-in.
* Added database configuration for session indexing and global search.
* Tunnel responses now support gzip compression.
* **Bug Fixes**
* Local UI links now open with the server token.
* Search indexes recover from corruption and repeated failures.
* Completed background tasks no longer emit stray events.
* Improved macOS artifact finalization with the default manifest.
* **Breaking Changes**
* Removed the `${now}` variable from custom system prompt templates.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->1 parent 6a1181a commit 39b50b5
114 files changed
Lines changed: 3286 additions & 1845 deletions
File tree
- .changeset
- apps
- desktop
- scripts
- tests
- pythinker-code
- dist-web
- src
- cli/sub/web
- native
- tui/commands
- test
- cli
- web
- tui/commands
- docs
- configuration
- customization
- guides
- reference
- packages
- agent-core-v2
- docs
- src
- agent
- task
- tools/agent
- app
- agentProfileCatalog
- config
- event
- remoteControl
- sessionIndex
- features
- dynamic_workflow/tools/agent-dynamic_workflow
- skill/catalog/builtin
- human
- persistence
- backends/minidb
- interface
- session
- agentLifecycle
- subagent
- test
- agent/task
- app
- agentProfileCatalog
- config
- sessionIndex
- features
- dynamic_workflow
- tower/tools
- harness
- persistence
- backends/minidb
- interface
- session
- agentLifecycle
- subagent
- tool
- agent-gateway
- src
- protocol
- routes
- search
- worker
- test
- __snapshots__
- search
- minidb
- src
- cluster
- test
- cluster
- node-sdk/test
- remote-control
- src
- test
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
67 | 67 | | |
68 | 68 | | |
69 | 69 | | |
| 70 | + | |
70 | 71 | | |
71 | 72 | | |
72 | 73 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
153 | 153 | | |
154 | 154 | | |
155 | 155 | | |
156 | | - | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
157 | 163 | | |
158 | 164 | | |
159 | 165 | | |
| |||
0 commit comments