返回 DeepSeek-Reasonix
provider_request.json
根目录 / internal / boot / testdata / golden / windows-powershell / provider_request.json
1 {
2 "Messages": [
3 {
4 "role": "system",
5 "content": "BASE SYSTEM PROMPT\n\nUser-owned choices: when a consequential decision has no safe, obvious default, call the ask tool so the user can choose. Otherwise proceed with a sensible reversible default. Do not ask in prose when ask is available. In non-interactive runs, state the assumption and take the safest reversible path.\n\nWork practices: when the request or a linked discussion names a specific approach or expected behavior, implement exactly that; if you believe a different approach is better, state the trade-off explicitly instead of silently substituting it. Keep scratch work (repro scripts, probes, generated output) out of the repository — use a temp directory or clean up before finishing — and review the final diff before declaring done: only the intended changes, no leftovers, and no known regressions. Scale verification to the change: reproduce the problem and run the most relevant focused tests.\n\nReply in the same language the user is using in their most recent message: if they write in Chinese answer in Chinese, in English answer in English, and switch whenever they switch. Let this also guide the language you think in. Always keep code, identifiers, file paths, shell commands, and technical terms in their original form — never translate them.\n\n# Session context\n\nReasonix may place a host-generated `\u003csession-context\u003e` message immediately before a user turn. Use the latest such snapshot as current runtime background; it supersedes earlier snapshots but never overrides this system prompt, standing instructions, or the user's current request.\n\n# Memory\n\nThe latest host-generated `\u003csession-context\u003e` may contain pinned preferences, feedback, and a background memory index. Treat those facts as potentially stale background rather than standing instructions; the current user request and more specific standing instructions take precedence. Read a relevant linked fact with the `memory` tool, verify file/function/flag claims before acting, save durable facts with `remember`, and archive facts that prove wrong with `forget`.\n\n# Skills — playbooks you can invoke\n\nThe latest host-generated `\u003csession-context\u003e` contains the skills catalog. Use a skill when the user names it or its guidance materially helps the task; keyword overlap alone is insufficient. Load only relevant references. Call `run_skill` with the bare name and concrete task in `arguments`, or use the dedicated tool when available. Inline skills return instructions; `[🧬 subagent]` skills execute in isolation and return a final answer. Skill instructions do not expand the user's authorization. The user can also invoke `/\u003cname\u003e`. Discover omitted skills with `use_capability` action=search."
6 },
7 {
8 "role": "user",
9 "content": "USER PROMPT"
10 },
11 {
12 "role": "assistant",
13 "content": "ASSISTANT REPLY",
14 "reasoning_content": "THINKING",
15 "reasoning_signature": "sig",
16 "tool_calls": [
17 {
18 "id": "call_1",
19 "name": "read",
20 "arguments": "{\"path\":\"a.txt\"}"
21 }
22 ]
23 },
24 {
25 "role": "tool",
26 "content": "TOOL RESULT",
27 "tool_call_id": "call_1",
28 "name": "read"
29 }
30 ],
31 "Tools": [
32 {
33 "name": "ask",
34 "description": "Ask the user one or more multiple-choice questions when you hit a decision that is genuinely theirs to make — one you can't resolve from the request, the code, or sensible defaults. The frontend shows the options for the user to pick; their choices are returned to you. Prefer this over asking in prose for any real fork (which approach, which library, scope). Don't use it for decisions with an obvious default — pick the sensible option and proceed. Permission presets do not answer these questions for the user. Each question has a short `header` (a tab label), the `question` text, 2-4 `options` (each a `label` and optional `description`; put any recommended option first), and `multiSelect` when more than one may apply.",
35 "parameters": {
36 "properties": {
37 "decision_id": {
38 "description": "Required when reopening a previously accepted decision; cite the original decision_id.",
39 "type": "string"
40 },
41 "new_evidence": {
42 "description": "Required with decision_id when asking again after the user already accepted a consequence.",
43 "type": "string"
44 },
45 "questions": {
46 "description": "1-3 related questions to ask together. Same ambiguity is asked only once.",
47 "items": {
48 "properties": {
49 "header": {
50 "description": "Very short label for the question (a tab title), e.g. \"Library\".",
51 "type": "string"
52 },
53 "multiSelect": {
54 "description": "Allow selecting more than one option.",
55 "type": "boolean"
56 },
57 "options": {
58 "description": "The choices. Put any recommended option first.",
59 "items": {
60 "properties": {
61 "description": {
62 "description": "Optional one-line explanation of the choice.",
63 "type": "string"
64 },
65 "label": {
66 "description": "The choice text (concise).",
67 "type": "string"
68 }
69 },
70 "required": [
71 "label"
72 ],
73 "type": "object"
74 },
75 "maxItems": 4,
76 "minItems": 2,
77 "type": "array"
78 },
79 "question": {
80 "description": "The full question to ask.",
81 "type": "string"
82 }
83 },
84 "required": [
85 "header",
86 "options",
87 "question"
88 ],
89 "type": "object"
90 },
91 "maxItems": 3,
92 "minItems": 1,
93 "type": "array"
94 }
95 },
96 "required": [
97 "questions"
98 ],
99 "type": "object"
100 }
101 },
102 {
103 "name": "compress",
104 "description": "Compress a selected part of the current model-visible conversation without deleting visible history. Use only when the user explicitly asks for context compression. Choose `before` to summarize everything before the uniquely matched user turn while keeping that turn and later context, or `after` to summarize from that turn through the last completed turn while keeping the active turn. The anchor must be an exact, unique excerpt from a real user message; use a longer excerpt if the tool reports multiple matches.",
105 "parameters": {
106 "additionalProperties": false,
107 "properties": {
108 "anchor": {
109 "description": "An exact, unique excerpt from one real user message in the current model-visible conversation.",
110 "maxLength": 512,
111 "minLength": 1,
112 "type": "string"
113 },
114 "direction": {
115 "description": "Which side of the anchor user turn to compress.",
116 "enum": [
117 "before",
118 "after"
119 ],
120 "type": "string"
121 },
122 "focus": {
123 "description": "Optional guidance about facts or decisions the summary must preserve.",
124 "maxLength": 2000,
125 "type": "string"
126 }
127 },
128 "required": [
129 "anchor",
130 "direction"
131 ],
132 "type": "object"
133 }
134 },
135 {
136 "name": "create_goal",
137 "description": "Create one persisted same-session goal when the current direct human request is a long-running objective that should continue across autonomous rounds. You may infer that intent without requiring the user to name goal mode. Do not use this for routine single-turn work.",
138 "parameters": {
139 "additionalProperties": false,
140 "properties": {
141 "max_goal_rounds": {
142 "anyOf": [
143 {
144 "minimum": 1,
145 "type": "integer"
146 },
147 {
148 "type": "null"
149 }
150 ],
151 "description": "Optional positive automatic-round limit; omit or null for unlimited."
152 },
153 "objective": {
154 "minLength": 1,
155 "type": "string"
156 }
157 },
158 "required": [
159 "objective"
160 ],
161 "type": "object"
162 }
163 },
164 {
165 "name": "edit_file",
166 "description": "Replace an exact string in a file with another. old_string must occur exactly once; add surrounding context to disambiguate. Use for targeted edits instead of rewriting the whole file.",
167 "parameters": {
168 "properties": {
169 "new_string": {
170 "description": "Replacement text (may be empty to delete)",
171 "type": "string"
172 },
173 "old_string": {
174 "description": "Exact text to replace (must be unique in the file)",
175 "type": "string"
176 },
177 "path": {
178 "description": "File path",
179 "type": "string"
180 }
181 },
182 "required": [
183 "new_string",
184 "old_string",
185 "path"
186 ],
187 "type": "object"
188 }
189 },
190 {
191 "name": "get_goal",
192 "description": "Read the current same-session goal, including its exact id/revision, objective, phase, admitted rounds, optional round limit, blocker reason, and live activation. Call this before update_goal.",
193 "parameters": {
194 "additionalProperties": false,
195 "properties": {},
196 "type": "object"
197 }
198 },
199 {
200 "name": "job_kill",
201 "description": "Request cancellation of a running background job by job id. Returns immediately; the process tree settles as killed once shutdown completes.",
202 "parameters": {
203 "properties": {
204 "job_id": {
205 "description": "Job id returned by the tool that started the background work.",
206 "type": "string"
207 },
208 "reason": {
209 "description": "Optional short reason for stopping the job.",
210 "type": "string"
211 }
212 },
213 "required": [
214 "job_id"
215 ],
216 "type": "object"
217 }
218 },
219 {
220 "name": "job_output",
221 "description": "Read output from a background job. Reads are non-blocking unless wait=true; every response includes the current status. Do not busy-poll a running job.",
222 "parameters": {
223 "properties": {
224 "filter": {
225 "description": "Optional regular expression; only matching lines of new output are returned.",
226 "type": "string"
227 },
228 "job_id": {
229 "description": "Job id returned by the tool that started the background work.",
230 "type": "string"
231 },
232 "timeout_ms": {
233 "description": "Maximum wait in milliseconds. Defaults to 30000 and is capped at 600000.",
234 "maximum": 600000,
235 "minimum": 1,
236 "type": "integer"
237 },
238 "wait": {
239 "description": "Wait until the job finishes or timeout_ms elapses. A timeout leaves the job running.",
240 "type": "boolean"
241 }
242 },
243 "required": [
244 "job_id"
245 ],
246 "type": "object"
247 }
248 },
249 {
250 "name": "pwsh",
251 "description": "Execute one PowerShell command in an isolated process and return combined stdout/stderr. The host prefers PowerShell 7 and can fall back to Windows PowerShell 5.1, so use syntax accepted by both:\n - chaining: ';' runs both commands; use 'if ($?) { ... }' for conditional execution.\n - redirect/vars: $null not /dev/null; $env:VAR not $VAR; '2\u003e$null' drops stderr.\n - file ops: Get-ChildItem (ls), Get-Content (cat), Remove-Item -Recurse -Force (rm -rf), Copy-Item (cp), Select-String (grep).\n - no head/tail/which/touch: use Select-Object -First/-Last N, (Get-Command x).Source, New-Item.\n - services/watchers: set run_in_background=true and manage the returned job id with job_output/job_kill.\n - multi-line text to a native exe (e.g. git commit -m): use a single-quoted here-string @'...'@ (closing '@ at column 0). Use for builds, tests, git, package managers, etc. To search/read/list/edit/move files, prefer the dedicated tools (grep, read_file, ls, glob, edit_file, move_file) over shell grep/cat/ls/find/sed/mv/Move-Item — they behave identically on every OS. For symbol search or architecture questions, prefer LSP/read tools and targeted grep before shell commands.",
252 "parameters": {
253 "properties": {
254 "additional_write_dirs": {
255 "description": "Directories this command must write outside the workspace. Directories only, no globs. Accepts absolute paths, workspace-relative paths, ~, and ${HOME}. Request the smallest set needed; the host will not infer paths from the command text.",
256 "items": {
257 "type": "string"
258 },
259 "type": "array"
260 },
261 "command": {
262 "description": "PowerShell command to execute",
263 "type": "string"
264 },
265 "denial_id": {
266 "description": "Host-issued denial identifier required when retrying with danger-full-access.",
267 "type": "string"
268 },
269 "description": {
270 "description": "Clear 5-10 word active-voice description shown in the UI",
271 "type": "string"
272 },
273 "justification": {
274 "description": "Required when additional_write_dirs or sandbox_permissions is set. Explain why the access is needed.",
275 "type": "string"
276 },
277 "run_in_background": {
278 "description": "Run without a foreground timeout and return a pwsh job id immediately. Read it with job_output or stop it with job_kill.",
279 "type": "boolean"
280 },
281 "sandbox_permissions": {
282 "description": "Optional per-call permission escalation. Use workspace-write for an authorized write while the session is read-only. danger-full-access is accepted only after a host-recorded denial and explicit authorization.",
283 "enum": [
284 "workspace-write",
285 "danger-full-access"
286 ],
287 "type": "string"
288 },
289 "timeout_ms": {
290 "description": "Optional foreground timeout in milliseconds, capped by the configured shell timeout",
291 "minimum": 1,
292 "type": "integer"
293 }
294 },
295 "required": [
296 "command",
297 "description"
298 ],
299 "type": "object"
300 }
301 },
302 {
303 "name": "read_file",
304 "description": "Read one bounded text window with optional line offset/limit. Output prefixes each line with its 1-based number. Any successful window observes the current file version for later structured edits. Use the next-window hint to page only when more content is useful. Legacy intent and cursor fields are accepted as navigation hints and never create a whole-file completion requirement.",
305 "parameters": {
306 "properties": {
307 "cursor": {
308 "description": "Optional continuation cursor from a prior result. Invalid legacy cursors should be replaced with an explicit offset and limit.",
309 "type": "string"
310 },
311 "intent": {
312 "description": "Compatibility hint. Every value reads only this bounded window and creates no whole-file obligation.",
313 "enum": [
314 "inspect",
315 "range",
316 "full"
317 ],
318 "type": "string"
319 },
320 "limit": {
321 "description": "Maximum lines to return (default 2000)",
322 "minimum": 1,
323 "type": "integer"
324 },
325 "offset": {
326 "description": "0-based line offset to start reading from (default 0)",
327 "minimum": 0,
328 "type": "integer"
329 },
330 "path": {
331 "description": "File path",
332 "type": "string"
333 }
334 },
335 "required": [
336 "path"
337 ],
338 "type": "object"
339 }
340 },
341 {
342 "name": "todo_write",
343 "description": "Replace the current turn's complete task list. Send the full flat list on every call; an empty list clears it. Items may be reordered, removed, replanned, or have any number in progress. Each item contains only content and status (pending|in_progress|completed).",
344 "parameters": {
345 "additionalProperties": false,
346 "properties": {
347 "todos": {
348 "description": "The complete flat task list for this turn. Replaces the previous list; [] clears it.",
349 "items": {
350 "additionalProperties": false,
351 "properties": {
352 "content": {
353 "description": "Task text. Leading and trailing whitespace is removed.",
354 "minLength": 1,
355 "type": "string"
356 },
357 "status": {
358 "enum": [
359 "pending",
360 "in_progress",
361 "completed"
362 ],
363 "type": "string"
364 }
365 },
366 "required": [
367 "content",
368 "status"
369 ],
370 "type": "object"
371 },
372 "type": "array"
373 }
374 },
375 "required": [
376 "todos"
377 ],
378 "type": "object"
379 }
380 },
381 {
382 "name": "update_goal",
383 "description": "Update the exact current goal revision. edit, pause, and resume require current direct-human authority; complete and blocked are also allowed during the exact autonomous goal round. There is no continue action: leaving an active goal unchanged continues it automatically.",
384 "parameters": {
385 "additionalProperties": false,
386 "properties": {
387 "action": {
388 "enum": [
389 "edit",
390 "pause",
391 "resume",
392 "complete",
393 "blocked"
394 ],
395 "type": "string"
396 },
397 "blocked_reason": {
398 "description": "Concrete blocker; required only for blocked.",
399 "minLength": 1,
400 "type": "string"
401 },
402 "goal_id": {
403 "minLength": 1,
404 "type": "string"
405 },
406 "max_goal_rounds": {
407 "anyOf": [
408 {
409 "minimum": 1,
410 "type": "integer"
411 },
412 {
413 "type": "null"
414 }
415 ],
416 "description": "Replacement limit for edit; null removes the limit."
417 },
418 "objective": {
419 "description": "Replacement objective; valid only for edit.",
420 "minLength": 1,
421 "type": "string"
422 },
423 "revision": {
424 "minimum": 1,
425 "type": "integer"
426 }
427 },
428 "required": [
429 "action",
430 "goal_id",
431 "revision"
432 ],
433 "type": "object"
434 }
435 },
436 {
437 "name": "use_capability",
438 "description": "Fixed-schema capability proxy. Prefer search(query, limit\u003c=8), then inspect one exact capability, then call it. list is a compact diagnostic inventory only. Supports stable ids such as tool:grep, skill:review, mcp-tool:server/tool, task:subagent, workflow:name, and web:/lsp:/session:/memory: namespaces. memory:remember saves facts (description+body required; activation=\"relevant\" on create; omit activation on update; \"pinned\" only if user asks); memory:forget(name); tool:memory(operation=search|read|list). decline records a reason for a prefer capability. Independent list/search/inspect calls are read-only and may be issued together. Calls keep the provider-visible schema fixed; real writers still pass permission, plan mode, sandbox, write-path, and workspace-lease checks.",
439 "parameters": {
440 "additionalProperties": false,
441 "properties": {
442 "action": {
443 "description": "Use search for discovery, inspect one exact result, then call. list is diagnostic only.",
444 "enum": [
445 "list",
446 "search",
447 "inspect",
448 "call",
449 "decline"
450 ],
451 "type": "string"
452 },
453 "arguments": {
454 "description": "Raw MCP tool arguments for action=call",
455 "type": "object"
456 },
457 "capability_id": {
458 "description": "Capability id such as skill:review, mcp-server:github, or mcp-tool:github/search_issues. Not required for action=list.",
459 "type": "string"
460 },
461 "cursor": {
462 "description": "Opaque cursor returned by action=list. It is valid only for the same catalog version.",
463 "type": "string"
464 },
465 "limit": {
466 "description": "Maximum results. Search defaults to 5 and allows at most 8; list defaults to 50 and allows at most 100.",
467 "maximum": 100,
468 "minimum": 1,
469 "type": "integer"
470 },
471 "query": {
472 "description": "Local catalog query required for action=search. No process or network is started.",
473 "type": "string"
474 },
475 "reason": {
476 "description": "Required non-empty reason when action=decline",
477 "type": "string"
478 }
479 },
480 "required": [
481 "action"
482 ],
483 "type": "object"
484 }
485 },
486 {
487 "name": "view_image",
488 "description": "Read a local PNG, JPEG, GIF, or WebP image by path and return visual content through native vision or the configured image-understanding model. Use this for image paths instead of read_file. Maximum file size: 3 MiB; maximum dimensions: 40 million pixels.",
489 "parameters": {
490 "properties": {
491 "path": {
492 "description": "Image file path",
493 "type": "string"
494 }
495 },
496 "required": [
497 "path"
498 ],
499 "type": "object"
500 }
501 },
502 {
503 "name": "write_file",
504 "description": "Write content to a file at the given path (overwriting existing content). Creates parent directories as needed.",
505 "parameters": {
506 "properties": {
507 "content": {
508 "description": "Full content to write",
509 "type": "string"
510 },
511 "path": {
512 "description": "File path",
513 "type": "string"
514 }
515 },
516 "required": [
517 "content",
518 "path"
519 ],
520 "type": "object"
521 }
522 }
523 ],
524 "Temperature": 0.7,
525 "MaxTokens": 1024
526 }
527
527 lines JSON