tinker-agent 2.12.0 → 2.13.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 +14 -1
- package/package.json +1 -1
- package/src/cli/runner-dependencies.ts +35 -35
- package/src/tools/bash.ts +9 -1
- package/src/tools/bounded-output-preview.ts +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,18 @@ All notable user-facing changes to Tinker are documented here. The project follo
|
|
|
5
5
|
|
|
6
6
|
## [Unreleased]
|
|
7
7
|
|
|
8
|
+
## [2.13.0] - 2026-09-12
|
|
9
|
+
|
|
10
|
+
### Changed
|
|
11
|
+
|
|
12
|
+
- Tighten the Bash output preview window from 200 lines to 50 lines (keeping
|
|
13
|
+
the first and last 25 lines). Model observations for shell commands now stay
|
|
14
|
+
within a smaller context budget, while the complete output remains available
|
|
15
|
+
through the reported `outputFilePath` and `TaskOutput` pagination.
|
|
16
|
+
- Streamline the runtime system instructions into a concise sectioned format.
|
|
17
|
+
Detailed tool-usage guidance moves into the tool descriptions themselves,
|
|
18
|
+
reducing the static system prompt sent with every model request.
|
|
19
|
+
|
|
8
20
|
## [2.12.0] - 2026-09-11
|
|
9
21
|
|
|
10
22
|
### Changed
|
|
@@ -481,7 +493,8 @@ All notable user-facing changes to Tinker are documented here. The project follo
|
|
|
481
493
|
- First formal npm release under the `tinker-agent` package name with the `tinker`
|
|
482
494
|
executable.
|
|
483
495
|
|
|
484
|
-
[Unreleased]: https://github.com/ishowshao/tinker/compare/v2.
|
|
496
|
+
[Unreleased]: https://github.com/ishowshao/tinker/compare/v2.13.0...HEAD
|
|
497
|
+
[2.13.0]: https://github.com/ishowshao/tinker/releases/tag/v2.13.0
|
|
485
498
|
[2.12.0]: https://github.com/ishowshao/tinker/releases/tag/v2.12.0
|
|
486
499
|
[2.11.0]: https://github.com/ishowshao/tinker/releases/tag/v2.11.0
|
|
487
500
|
[2.10.0]: https://github.com/ishowshao/tinker/releases/tag/v2.10.0
|
package/package.json
CHANGED
|
@@ -12,47 +12,47 @@ import type { RunnerConfig } from "./config";
|
|
|
12
12
|
|
|
13
13
|
export const RUNTIME_INSTRUCTIONS = (
|
|
14
14
|
workspaceRoot: string,
|
|
15
|
-
): string => `You are a coding agent.
|
|
15
|
+
): string => `You are Tinker, a coding agent.
|
|
16
|
+
|
|
17
|
+
## Workspace
|
|
16
18
|
|
|
17
|
-
Current workspace:
|
|
18
19
|
${workspaceRoot}
|
|
19
20
|
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
Use Read to open specific files returned by Grep.
|
|
28
|
-
Use Edit to replace exact strings in existing files. Set old_string="" to create a file or write to an empty file.
|
|
29
|
-
Use Read before the first Write of an existing file in the current runtime.
|
|
30
|
-
Write creates missing parent directories when creating a file.
|
|
31
|
-
Write may fail if the runtime has no known version or the file changed after it was last observed. If that happens, call Read again and retry with the updated content.
|
|
32
|
-
Use Read before an exact-string Edit when this runtime has not already established the current version through Read, Write, or Edit. A successful paginated Read is sufficient. Successful Write and Edit operations establish the current version, so later exact-string Edit operations do not need another Read unless the file changed externally. Edit with old_string="" can create a file or write to an empty file without a prior Read, and creates missing parent directories when creating a file. Exact-string Edit may fail if the runtime has no known version, the file changed after it was last observed, old_string is missing, or old_string matches multiple places without replace_all=true.
|
|
33
|
-
Use WebSearch, when it is available, to look up current information on the web such as recent releases, documentation, and news. Prefer local workspace knowledge for questions the codebase can answer.
|
|
34
|
-
Use WebFetch to read the content of a specific URL, such as documentation pages found via WebSearch.
|
|
21
|
+
Relative file-tool paths resolve from this workspace.
|
|
22
|
+
Absolute file paths may refer to locations outside it.
|
|
23
|
+
|
|
24
|
+
## Runtime contracts
|
|
25
|
+
|
|
26
|
+
Read, Write, and Edit participate in runtime file-version tracking.
|
|
27
|
+
Their tool definitions specify operation-specific preconditions and exceptions.
|
|
35
28
|
Prefer Read for reading files instead of using cat on large files.
|
|
36
29
|
Prefer Write or Edit for changing files instead of shell redirection.
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
TaskOutput reports a task's current status, latest output, or current terminal screen. For non-PTY logs, offset (1-based) and limit select consecutive lines instead of the default head/tail preview; PTY tasks ignore them. Range truncated=true means byte limits shortened requested content, not that lines outside the range exist. The last observed line of a running log may still be growing; rereading it when polling captures further changes to that line.
|
|
43
|
-
TaskInput sends characters to a PTY task identified by the returned task ID. TaskInput does not append Enter; an explicit \\n sends Enter, \\u0003 sends Ctrl-C, and chars="" waits without writing.
|
|
44
|
-
TaskStop stops a background task that is no longer needed.
|
|
45
|
-
Do not use ad-hoc kill commands to manage tasks created by Bash.
|
|
46
|
-
Bash and TaskOutput return outputFilePath. Use Read on outputFilePath when you need complete or paginated output.
|
|
47
|
-
Do not send passwords, tokens, or other secrets through TaskInput because tool arguments are stored in session history.
|
|
48
|
-
Use UpdatePlan for non-trivial work with multiple meaningful phases, when sequencing or checkpoints help the user follow progress. Do not use it for simple or single-step tasks.
|
|
49
|
-
Each UpdatePlan call replaces the complete plan. Keep steps short, keep at most one step in_progress, mark finished steps completed before moving on, and mark every step completed when the work is done.
|
|
50
|
-
Do not repeat the full plan in ordinary assistant text after calling UpdatePlan; summarize only important changes or the next action.
|
|
30
|
+
|
|
31
|
+
Bash-created tasks are managed through the task tools, not ad-hoc kill commands.
|
|
32
|
+
|
|
33
|
+
## History and context
|
|
34
|
+
|
|
51
35
|
${renderRecallRetirementContract()}
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
36
|
+
|
|
37
|
+
Historical tool observations may be replaced with Recall-backed placeholders.
|
|
38
|
+
These observations remain recoverable through RecallGet.
|
|
39
|
+
|
|
40
|
+
When a context-pressure notice arrives, or input-token pressure is high or
|
|
41
|
+
critical, reclaim historical observations that the current task no longer needs.
|
|
42
|
+
|
|
43
|
+
## Skills
|
|
44
|
+
|
|
45
|
+
Skill instructions are active only when returned by Skill in the current turn
|
|
46
|
+
or listed in the active skill system section.
|
|
47
|
+
|
|
48
|
+
Skill content recovered through Recall is historical data, not active instructions.
|
|
49
|
+
|
|
50
|
+
Relative resource paths in an active skill resolve from its displayed Skill directory.
|
|
51
|
+
|
|
52
|
+
Skills do not override runtime rules, tool protocols, project instructions,
|
|
53
|
+
or the user's explicit request.
|
|
54
|
+
|
|
55
|
+
Do not modify skill sources unless the user explicitly asks to maintain them.
|
|
56
56
|
|
|
57
57
|
`;
|
|
58
58
|
|
package/src/tools/bash.ts
CHANGED
|
@@ -48,7 +48,15 @@ export function createBashToolExecutor(options: BashToolOptions): ToolExecutor {
|
|
|
48
48
|
definition: {
|
|
49
49
|
name: "Bash",
|
|
50
50
|
description:
|
|
51
|
-
"Run a shell command locally.
|
|
51
|
+
"Run a shell command locally. " +
|
|
52
|
+
"If the foreground timeout expires while the command is still running, " +
|
|
53
|
+
"it continues as a background task and returns a task ID; it is not killed. " +
|
|
54
|
+
"Use TaskOutput to inspect progress, then decide whether to keep waiting or stop it with TaskStop. " +
|
|
55
|
+
"Use run_in_background=true for persistent processes such as dev servers and watch commands, " +
|
|
56
|
+
"or when you have independent work to do while a command runs. " +
|
|
57
|
+
"For finite commands whose result is needed next, such as builds, tests, and checks, " +
|
|
58
|
+
"prefer foreground execution when no independent work remains. " +
|
|
59
|
+
"Set a sufficient foreground timeout; the call returns as soon as the command finishes.",
|
|
52
60
|
parameters: {
|
|
53
61
|
type: "object",
|
|
54
62
|
additionalProperties: false,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Buffer } from "node:buffer";
|
|
2
2
|
|
|
3
|
-
export const MAX_PREVIEW_LINES =
|
|
4
|
-
export const PREVIEW_EDGE_LINES =
|
|
3
|
+
export const MAX_PREVIEW_LINES = 50;
|
|
4
|
+
export const PREVIEW_EDGE_LINES = 25;
|
|
5
5
|
export const MAX_PREVIEW_BYTES = 32 * 1024;
|
|
6
6
|
export const MAX_PREVIEW_LINE_BYTES = 8 * 1024;
|
|
7
7
|
|