tinker-agent 2.13.0 → 3.0.0
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.
- package/CHANGELOG.md +53 -1
- package/README.md +25 -4
- package/package.json +2 -1
- package/src/agent/runtime-hosted-session.ts +505 -81
- package/src/agent/runtime-session-contracts.ts +9 -0
- package/src/agent/runtime-session.ts +29 -7
- package/src/cli/command-line.ts +159 -11
- package/src/cli/connect-runner.tsx +63 -0
- package/src/cli/connect-workspace.ts +33 -0
- package/src/cli/default-service-config.ts +163 -0
- package/src/cli/default-tui-runner.ts +23 -0
- package/src/cli/interactive-runtime.ts +87 -0
- package/src/cli/local-service-start.ts +131 -0
- package/src/cli/local-tui-client.ts +234 -0
- package/src/cli/main.ts +46 -3
- package/src/cli/public-cli-contract.ts +65 -2
- package/src/cli/public-config-contract.ts +1 -1
- package/src/cli/serve-runner.ts +155 -21
- package/src/cli/serve-runtime.ts +47 -46
- package/src/cli/service-control.ts +27 -0
- package/src/cli/service-supervisor.ts +170 -0
- package/src/cli/service-upgrade.ts +106 -0
- package/src/cli/tui-runner.tsx +9 -261
- package/src/cli/update-runner.ts +4 -0
- package/src/client/local-workspace-client.ts +238 -0
- package/src/client/model-catalog.ts +15 -0
- package/src/client/remote-images.ts +80 -0
- package/src/client/remote-prompt-history.ts +22 -0
- package/src/client/remote-tasks.ts +231 -0
- package/src/client/remote-tui-view.ts +69 -0
- package/src/client/remote-workspace-client.ts +528 -0
- package/src/client/session-client.ts +109 -0
- package/src/image/image-asset-store.ts +17 -0
- package/src/remote/client.ts +27 -5
- package/src/remote/config.ts +19 -4
- package/src/remote/failures.ts +68 -0
- package/src/remote/http-server.ts +120 -3
- package/src/remote/local-service-discovery.ts +361 -0
- package/src/remote/prompt-history.ts +36 -0
- package/src/remote/protocol.ts +93 -2
- package/src/remote/resident-policy.ts +96 -0
- package/src/remote/service-store.ts +28 -6
- package/src/remote/service.ts +479 -60
- package/src/remote/session-operations.ts +66 -0
- package/src/remote/session-reads.ts +126 -0
- package/src/remote/sync-hub.ts +2 -0
- package/src/remote/tui-protocol.ts +32 -0
- package/src/remote/workspace-resolution.ts +82 -0
- package/src/session/resume-projection.ts +19 -2
- package/src/session/session-lock.ts +32 -0
- package/src/session/session-store-contracts.ts +2 -0
- package/src/session/session-store.ts +7 -4
- package/src/tui/app.tsx +67 -26
- package/src/tui/components/model-picker.tsx +5 -5
- package/src/tui/components/prompt-input.tsx +16 -1
- package/src/tui/components/resume-session-picker.tsx +6 -2
- package/src/tui/tui-projection-store.ts +25 -0
- package/src/tui/tui-session-controller.ts +12 -282
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,57 @@ All notable user-facing changes to Tinker are documented here. The project follo
|
|
|
5
5
|
|
|
6
6
|
## [Unreleased]
|
|
7
7
|
|
|
8
|
+
## [3.0.0] - 2026-09-23
|
|
9
|
+
|
|
10
|
+
### Changed
|
|
11
|
+
|
|
12
|
+
- Make the default `tinker` TUI a client of a shared local service. Tasks belong
|
|
13
|
+
to the service and continue after the terminal exits or disconnects; use
|
|
14
|
+
`/resume` to reconnect to a running or completed session. The existing TUI
|
|
15
|
+
layout, editing, shortcuts, and interaction controls are preserved.
|
|
16
|
+
- Automatically register local workspaces with the service. Multiple terminals
|
|
17
|
+
can use independent sessions or connect to the same session. Existing local
|
|
18
|
+
sessions are adopted only after their original process releases ownership.
|
|
19
|
+
- Keep independent in-process execution available with `tinker --local` (also
|
|
20
|
+
required on Windows, where default local service startup is not supported).
|
|
21
|
+
One-shot `tinker run` remains independent. Default service/client configuration
|
|
22
|
+
is bootstrapped in the user's Tinker home; existing explicit configurations
|
|
23
|
+
remain supported. See `docs/remote-access.md` for configuration and migration.
|
|
24
|
+
- Require services using the current installation to be stopped before
|
|
25
|
+
`tinker update` replaces package files. Use `tinker serve --stop`, update, then
|
|
26
|
+
`tinker serve --background`; system-managed services resume supervision.
|
|
27
|
+
Older services without the stop endpoint must be stopped explicitly before
|
|
28
|
+
switching to 3.0.0. Updates do not automatically interrupt active work.
|
|
29
|
+
|
|
30
|
+
### Added
|
|
31
|
+
|
|
32
|
+
- Connect the full TUI to service-side history, streaming output, tool state,
|
|
33
|
+
stop and follow-up input, user questions, command confirmations, provider
|
|
34
|
+
retries, images, context maintenance, undo, cloning, model selection, and
|
|
35
|
+
reasoning configuration. File completion and project commands use the server
|
|
36
|
+
workspace, and connection/task status appears in the existing bottom bar.
|
|
37
|
+
- Support terminal and iOS handoff, reconnection, and durable request receipts
|
|
38
|
+
that prevent duplicate execution when a response is lost. Service restarts
|
|
39
|
+
mark unfinished work interrupted instead of replaying uncertain operations.
|
|
40
|
+
- Add opt-in macOS LaunchAgent supervision through `tinker serve --install`,
|
|
41
|
+
with status, stop, restart, and uninstall commands. Supervision runs in the
|
|
42
|
+
user login session; it does not keep a sleeping Mac awake.
|
|
43
|
+
- Load session runtimes on demand and reclaim disconnected idle runtimes while
|
|
44
|
+
preserving history, session settings, and ownership. Configurable resident
|
|
45
|
+
limits default to 16 loaded runtimes, 4 concurrent turns, 32 running or queued
|
|
46
|
+
turns, and a five-minute idle timeout. Active tasks and interactions are kept.
|
|
47
|
+
- Drain work before stopping or restarting the service. The default 30-second
|
|
48
|
+
grace period cancels shutdown if work is still active; explicit `--force`
|
|
49
|
+
interrupts remaining work after that period.
|
|
50
|
+
|
|
51
|
+
### Fixed
|
|
52
|
+
|
|
53
|
+
- Preserve canonical history and pending interaction identity across client
|
|
54
|
+
disconnects, reject competing stale interaction responses, and prevent local
|
|
55
|
+
processes from taking over service-owned sessions during idle reclamation.
|
|
56
|
+
- Synchronize background-process and attached-terminal tests with observable
|
|
57
|
+
readiness and cancellation rather than assuming immediate process/input setup.
|
|
58
|
+
|
|
8
59
|
## [2.13.0] - 2026-09-12
|
|
9
60
|
|
|
10
61
|
### Changed
|
|
@@ -493,7 +544,8 @@ All notable user-facing changes to Tinker are documented here. The project follo
|
|
|
493
544
|
- First formal npm release under the `tinker-agent` package name with the `tinker`
|
|
494
545
|
executable.
|
|
495
546
|
|
|
496
|
-
[Unreleased]: https://github.com/ishowshao/tinker/compare/
|
|
547
|
+
[Unreleased]: https://github.com/ishowshao/tinker/compare/v3.0.0...HEAD
|
|
548
|
+
[3.0.0]: https://github.com/ishowshao/tinker/releases/tag/v3.0.0
|
|
497
549
|
[2.13.0]: https://github.com/ishowshao/tinker/releases/tag/v2.13.0
|
|
498
550
|
[2.12.0]: https://github.com/ishowshao/tinker/releases/tag/v2.12.0
|
|
499
551
|
[2.11.0]: https://github.com/ishowshao/tinker/releases/tag/v2.11.0
|
package/README.md
CHANGED
|
@@ -44,8 +44,8 @@ adds no conversation message and applies only to the current running process.
|
|
|
44
44
|
Retryable failures include HTTP 429/500/502/503/504, structured `server_error`
|
|
45
45
|
and `rate_limit_exceeded` errors inside provider streams or failed Responses,
|
|
46
46
|
and transient connection failures, including socket resets during streaming.
|
|
47
|
-
Tool failures and non-retryable errors keep their existing behavior. One-shot
|
|
48
|
-
|
|
47
|
+
Tool failures and non-retryable errors keep their existing behavior. One-shot runs do not wait for this TUI selection; service sessions expose it to
|
|
48
|
+
connected clients.
|
|
49
49
|
|
|
50
50
|
### PTY screen size
|
|
51
51
|
|
|
@@ -157,6 +157,17 @@ tinker --version
|
|
|
157
157
|
The npm package includes its own Bun runtime. To run Tinker from a source checkout,
|
|
158
158
|
install Bun 1.3.14 or later, then use `bun install` followed by `bun run tinker`.
|
|
159
159
|
|
|
160
|
+
On macOS/Linux, the default TUI starts or reuses a shared local service. First
|
|
161
|
+
launch uses OpenSSL to prepare private local credentials under
|
|
162
|
+
`<home>/.tinker/service/` (`TINKER_HOME` or the OS home), and automatically registers
|
|
163
|
+
the current workspace. Exiting the TUI leaves accepted tasks running; use
|
|
164
|
+
`/resume` to reconnect. `tinker --local` explicitly runs the independent TUI;
|
|
165
|
+
`run` remains independent. Existing `.data` service configurations remain available
|
|
166
|
+
through explicit `connect`. See [local startup and configuration](docs/remote-access.md#default-local-service-entry)
|
|
167
|
+
for configuration, environment changes and lifecycle limits. Optional macOS login
|
|
168
|
+
startup and crash restart are available through `tinker serve --install`;
|
|
169
|
+
`serve --stop`, `--restart` and `--uninstall` manage the resident service.
|
|
170
|
+
|
|
160
171
|
`run` accepts exactly one Prompt source: one shell-quoted argument, explicit stdin,
|
|
161
172
|
or a UTF-8 text file. Use stdin for multiline code, private patches, or Prompt text
|
|
162
173
|
containing secrets so it does not become a command-line argument:
|
|
@@ -179,14 +190,24 @@ The installed package exposes this public CLI:
|
|
|
179
190
|
<!-- BEGIN GENERATED: PUBLIC CLI COMMANDS -->
|
|
180
191
|
| Command | Description |
|
|
181
192
|
| --- | --- |
|
|
182
|
-
| `tinker` | Start the
|
|
193
|
+
| `tinker` | Start the full TUI through the shared local service; exiting detaches only. |
|
|
194
|
+
| `tinker serve --install` | Install and start a macOS per-user LaunchAgent with crash restart. |
|
|
195
|
+
| `tinker serve --uninstall` | Drain, stop and remove the LaunchAgent; retain history and configuration. |
|
|
196
|
+
| `tinker serve --stop` | Drain and stop the service; disable supervisor restart until the next start. |
|
|
197
|
+
| `tinker serve --restart` | Drain and restart with the current executable and configuration. |
|
|
198
|
+
| `tinker serve --restart --force` | Allow interruption after the configured shutdown grace period. |
|
|
199
|
+
| `tinker --local` | Run the TUI independently without a service (explicit fallback). |
|
|
183
200
|
| `tinker --profile <profile-name>` | Start the TUI with a selected model profile. |
|
|
184
201
|
| `tinker run [--profile <profile-name>] [--yolo] <prompt>` | Submit one shell-quoted prompt argument. |
|
|
185
202
|
| `tinker run [--profile <profile-name>] [--yolo] --stdin` | Read the prompt from standard input until EOF. |
|
|
186
203
|
| `tinker run [--profile <profile-name>] [--yolo] --file <path>` | Read the prompt from a UTF-8 text file. |
|
|
187
204
|
| `tinker update` | Update the global npm installation from the official npm registry. |
|
|
188
|
-
| `tinker serve --config <path
|
|
205
|
+
| `tinker serve [--config <path>]` | Run the local daemon for paired remote clients. |
|
|
206
|
+
| `tinker serve [--config <path>] --background` | Discover or start one detached service for this state directory, and print its address as JSON. |
|
|
207
|
+
| `tinker serve [--config <path>] --status` | Probe the local service without starting it; print JSON and exit 1 when offline. |
|
|
189
208
|
| `tinker connect --config <path>` | Attach a terminal client to a service; exiting detaches only. |
|
|
209
|
+
| `tinker connect --config <path> --tui [--workspace <id>] [--session <id>]` | Use the full TUI for service sessions and task execution. |
|
|
210
|
+
| `tinker connect --config <path> --tui --service-config <path> [--session <id>]` | With --tui, discover/start this local service and register the current directory if needed. |
|
|
190
211
|
| `tinker --help` | Show top-level CLI help. |
|
|
191
212
|
| `tinker help run` | Show one-shot command help. |
|
|
192
213
|
| `tinker help update` | Show update command help. |
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "tinker-agent",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "3.0.0",
|
|
4
4
|
"description": "A personal coding agent with an interactive TUI and one-shot CLI.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"type": "module",
|
|
@@ -14,6 +14,7 @@
|
|
|
14
14
|
"CHANGELOG.md",
|
|
15
15
|
"src/agent",
|
|
16
16
|
"src/cli",
|
|
17
|
+
"src/client",
|
|
17
18
|
"src/context",
|
|
18
19
|
"src/events",
|
|
19
20
|
"src/ids",
|