Files
deepseek-harness/scripts/snapshots/python-sdk-single-exe/dynamic-tools/tool-history.json
T
LegGasai ed30d274f1 refactor(working-directory): move the workspace only through Host operations
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.
2026-11-11 20:10:17 +08:00

267 lines
5.8 KiB
JSON

{
"finalResponse": "DYNAMIC_TOOLS_OK",
"declarations": [
null,
{
"name": "snapshot_ping",
"description": "Return pong once.",
"input_schema": {
"type": "object",
"properties": {},
"additionalProperties": false
},
"defer_loading": true
},
null
],
"requestToolChanges": [
[],
[
{
"type": "tool_addition",
"tool": {
"type": "tool_reference",
"name": "snapshot_ping"
}
}
],
[]
],
"events": [
{
"type": "request/header",
"seq": 12,
"time": 0,
"data": {
"header": {
"config": {
"provider": "deepseek-official",
"model": "smoke-model",
"maxTokens": 256000,
"reasoningEffort": "high"
},
"adapterDefaults": {
"reasoningEffort": true,
"maxTokens": true
},
"tools": [
"apply_patch",
"ask_user_question",
"create_goal",
"edit",
"get_goal",
"glob",
"grep",
"job_kill",
"job_list",
"job_output",
"list_agents",
"plugin_manager",
"present",
"read",
"read_image",
"schedule_create",
"schedule_edit",
"schedule_list",
"schedule_view",
"send_message",
"skill",
"subagent",
"subagent_fork",
"todo_write",
"update_goal",
"wait_agent",
"web_fetch",
"web_search",
"workflow",
"write"
]
},
"reason": "initial"
}
},
{
"type": "request/context",
"seq": 13,
"time": 0,
"data": {
"provider": "deepseek-official",
"model": "smoke-model",
"contextWindow": 1000000
}
},
{
"type": "request/header",
"seq": 20,
"time": 0,
"data": {
"header": {
"config": {
"provider": "deepseek-official",
"model": "smoke-model",
"maxTokens": 256000,
"reasoningEffort": "high"
},
"adapterDefaults": {
"reasoningEffort": true,
"maxTokens": true
},
"tools": [
"apply_patch",
"ask_user_question",
"create_goal",
"edit",
"get_goal",
"glob",
"grep",
"job_kill",
"job_list",
"job_output",
"list_agents",
"plugin_manager",
"present",
"read",
"read_image",
"schedule_create",
"schedule_edit",
"schedule_list",
"schedule_view",
"send_message",
"skill",
"snapshot_ping",
"subagent",
"subagent_fork",
"todo_write",
"update_goal",
"wait_agent",
"web_fetch",
"web_search",
"workflow",
"write"
]
},
"reason": "change"
}
},
{
"type": "developer/message",
"seq": 21,
"time": 0,
"data": {
"turn": 1,
"step": 2,
"message": {
"source": {
"kind": "tool-registry"
},
"content": [
{
"type": "tool-addition",
"toolName": "snapshot_ping"
}
],
"role": "developer",
"id": "{{messageId}}"
},
"headerSeq": "{{header:2}}"
},
"surfaceOp": "append"
},
{
"type": "request/header",
"seq": 27,
"time": 0,
"data": {
"header": {
"config": {
"provider": "deepseek-official",
"model": "smoke-model",
"maxTokens": 256000,
"reasoningEffort": "high"
},
"adapterDefaults": {
"reasoningEffort": true,
"maxTokens": true
},
"tools": [
"apply_patch",
"ask_user_question",
"create_goal",
"edit",
"get_goal",
"glob",
"grep",
"job_kill",
"job_list",
"job_output",
"list_agents",
"plugin_manager",
"present",
"read",
"read_image",
"schedule_create",
"schedule_edit",
"schedule_list",
"schedule_view",
"send_message",
"skill",
"subagent",
"subagent_fork",
"todo_write",
"update_goal",
"wait_agent",
"web_fetch",
"web_search",
"workflow",
"write"
]
},
"reason": "change"
}
},
{
"type": "developer/message",
"seq": 28,
"time": 0,
"data": {
"turn": 1,
"step": 3,
"message": {
"source": {
"kind": "tool-registry"
},
"content": [
{
"type": "tool-removal",
"toolName": "snapshot_ping"
}
],
"role": "developer",
"id": "{{messageId}}"
}
},
"surfaceOp": "append"
}
],
"toolCalls": [
"read",
"snapshot_ping"
],
"pingResult": {
"role": "tool",
"source": {
"kind": "tool",
"callId": "python-dynamic-ping"
},
"toolCallId": "python-dynamic-ping",
"content": [
{
"type": "text",
"text": "pong"
}
],
"isError": false,
"id": "{{messageId}}"
}
}