Remove the model-facing working_directory tool and the cwd parameter of the
subagent tools, so only Host operations move a Session's directory. Every
change the service records carries `workspace: true`, and the workspace root
is the directory of the last marked change, or the original project. The
anchor field, the anchor list, relocate, inherit, and anchorsOf are gone;
get, ensure, set, and rootOf remain.
A change without the marker, recorded while the model could move the
directory, moves only the current directory, so stored Sessions keep the
root they had.
- worktree: create enters the checkout through set; exit returns the Session
to the source checkout of the recorded worktree that contains its directory,
and exit_worktree exposes it to the model.
- subagent: a child starts in the parent's workspace root or a Host-chosen
directory through set.
- SDK: the working-directory methods return { cwd } again and
getWorkspaceRoot / get_workspace_root are removed.
- Recorded sessions: the worktree scenario leaves through exit_worktree and
covers recovery from a removed worktree; the two scenarios that only drove
the removed tool are deleted; three compaction scenarios lower their tuned
context window by the removed tool-schema tokens.
216 lines
7.3 KiB
JSON
216 lines
7.3 KiB
JSON
[
|
|
{
|
|
"system": "You are a helpful software engineer assistant.",
|
|
"tools": [
|
|
{
|
|
"name": "bash",
|
|
"description": "Run commands in a bash shell\n* When invoking this tool, the contents of the \"command\" parameter does NOT need to be XML-escaped.\n* Network access depends on the task environment. Prefer configured mirrors/proxies when they are available.\n* State is persistent across command calls and discussions with the user.\n* To inspect a particular line range of a file, e.g. lines 10-25, try 'sed -n 10,25p /path/to/the/file'.\n* Please avoid commands that may produce a very large amount of output.\n* Please run long lived commands in the background, e.g. 'sleep 10 &' or start a server in the background.",
|
|
"input_schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"command": {
|
|
"type": "string",
|
|
"description": "The bash command to run. Relative path is preferred in the command."
|
|
}
|
|
},
|
|
"required": [
|
|
"command"
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"name": "read_image",
|
|
"description": "Read a PNG/JPEG/WebP/GIF file and return the image itself. Large images are downscaled automatically; do not install image libraries or create thumbnails to inspect an image.",
|
|
"input_schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"file_path": {
|
|
"type": "string",
|
|
"description": "Path to the image file, resolved by the filesystem backend."
|
|
}
|
|
},
|
|
"required": [
|
|
"file_path"
|
|
]
|
|
}
|
|
}
|
|
],
|
|
"messages": [
|
|
{
|
|
"role": "user",
|
|
"content": [
|
|
{
|
|
"type": "text",
|
|
"text": "Exercise the packaged minimal agent's persistent shell."
|
|
},
|
|
{
|
|
"type": "text",
|
|
"text": "<system-reminder>\nThe following information describes your current session:\n\nCurrent working directory: \"{{cwd}}\".\n</system-reminder>"
|
|
}
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"system": "You are a helpful software engineer assistant.",
|
|
"tools": [
|
|
{
|
|
"name": "bash",
|
|
"description": "Run commands in a bash shell\n* When invoking this tool, the contents of the \"command\" parameter does NOT need to be XML-escaped.\n* Network access depends on the task environment. Prefer configured mirrors/proxies when they are available.\n* State is persistent across command calls and discussions with the user.\n* To inspect a particular line range of a file, e.g. lines 10-25, try 'sed -n 10,25p /path/to/the/file'.\n* Please avoid commands that may produce a very large amount of output.\n* Please run long lived commands in the background, e.g. 'sleep 10 &' or start a server in the background.",
|
|
"input_schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"command": {
|
|
"type": "string",
|
|
"description": "The bash command to run. Relative path is preferred in the command."
|
|
}
|
|
},
|
|
"required": [
|
|
"command"
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"name": "read_image",
|
|
"description": "Read a PNG/JPEG/WebP/GIF file and return the image itself. Large images are downscaled automatically; do not install image libraries or create thumbnails to inspect an image.",
|
|
"input_schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"file_path": {
|
|
"type": "string",
|
|
"description": "Path to the image file, resolved by the filesystem backend."
|
|
}
|
|
},
|
|
"required": [
|
|
"file_path"
|
|
]
|
|
}
|
|
}
|
|
],
|
|
"messages": [
|
|
{
|
|
"role": "user",
|
|
"content": [
|
|
{
|
|
"type": "text",
|
|
"text": "Exercise the packaged minimal agent's persistent shell."
|
|
},
|
|
{
|
|
"type": "text",
|
|
"text": "<system-reminder>\nThe following information describes your current session:\n\nCurrent working directory: \"{{cwd}}\".\n</system-reminder>"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"role": "assistant",
|
|
"toolCalls": [
|
|
{
|
|
"id": "minimal-bash-1",
|
|
"name": "bash"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"role": "user",
|
|
"content": [
|
|
{
|
|
"type": "tool_result",
|
|
"tool_use_id": "minimal-bash-1",
|
|
"content": "{{tool-result}}"
|
|
}
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"system": "You are a helpful software engineer assistant.",
|
|
"tools": [
|
|
{
|
|
"name": "bash",
|
|
"description": "Run commands in a bash shell\n* When invoking this tool, the contents of the \"command\" parameter does NOT need to be XML-escaped.\n* Network access depends on the task environment. Prefer configured mirrors/proxies when they are available.\n* State is persistent across command calls and discussions with the user.\n* To inspect a particular line range of a file, e.g. lines 10-25, try 'sed -n 10,25p /path/to/the/file'.\n* Please avoid commands that may produce a very large amount of output.\n* Please run long lived commands in the background, e.g. 'sleep 10 &' or start a server in the background.",
|
|
"input_schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"command": {
|
|
"type": "string",
|
|
"description": "The bash command to run. Relative path is preferred in the command."
|
|
}
|
|
},
|
|
"required": [
|
|
"command"
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"name": "read_image",
|
|
"description": "Read a PNG/JPEG/WebP/GIF file and return the image itself. Large images are downscaled automatically; do not install image libraries or create thumbnails to inspect an image.",
|
|
"input_schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"file_path": {
|
|
"type": "string",
|
|
"description": "Path to the image file, resolved by the filesystem backend."
|
|
}
|
|
},
|
|
"required": [
|
|
"file_path"
|
|
]
|
|
}
|
|
}
|
|
],
|
|
"messages": [
|
|
{
|
|
"role": "user",
|
|
"content": [
|
|
{
|
|
"type": "text",
|
|
"text": "Exercise the packaged minimal agent's persistent shell."
|
|
},
|
|
{
|
|
"type": "text",
|
|
"text": "<system-reminder>\nThe following information describes your current session:\n\nCurrent working directory: \"{{cwd}}\".\n</system-reminder>"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"role": "assistant",
|
|
"toolCalls": [
|
|
{
|
|
"id": "minimal-bash-1",
|
|
"name": "bash"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"role": "user",
|
|
"content": [
|
|
{
|
|
"type": "tool_result",
|
|
"tool_use_id": "minimal-bash-1",
|
|
"content": "{{tool-result}}"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"role": "assistant",
|
|
"toolCalls": [
|
|
{
|
|
"id": "minimal-bash-2",
|
|
"name": "bash"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"role": "user",
|
|
"content": [
|
|
{
|
|
"type": "tool_result",
|
|
"tool_use_id": "minimal-bash-2",
|
|
"content": "{{tool-result}}"
|
|
}
|
|
]
|
|
}
|
|
]
|
|
}
|
|
]
|