|
|
|
|
@@ -73,39 +73,79 @@ For sandboxing executors, each call resolves mode as one-shot escalation, then s
|
|
|
|
|
|
|
|
|
|
### System prompt
|
|
|
|
|
|
|
|
|
|
**What the model sees**: Every request in this plugin's registration scope contains the bash guidance below. A sandboxing executor adds no mode statement or switch notice. Scoped tool restrictions can hide the schemas without removing this independently registered section.
|
|
|
|
|
#### What the model sees
|
|
|
|
|
|
|
|
|
|
**Token effect**: Small fixed input cost per request while the plugin is active, unchanged by sandbox mode or mode switches.
|
|
|
|
|
Every request in this plugin's registration scope contains the bash guidance below. A sandboxing executor adds no mode statement or switch notice. Scoped tool restrictions can hide the schemas without removing this independently registered section.
|
|
|
|
|
|
|
|
|
|
#### Bash guidance
|
|
|
|
|
##### Bash guidance
|
|
|
|
|
|
|
|
|
|
```markdown
|
|
|
|
|
Check the [exit code: N] marker on every bash result; investigate failures before moving on.
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
#### Token effect
|
|
|
|
|
|
|
|
|
|
Small fixed input cost per request while the plugin is active, unchanged by sandbox mode or mode switches.
|
|
|
|
|
|
|
|
|
|
#### KV Cache effect
|
|
|
|
|
|
|
|
|
|
Prefix-stable while the registration scope and prompt text are unchanged. Plugin activation or disposal may invalidate reuse from this prompt section; sandbox mode switches do not.
|
|
|
|
|
|
|
|
|
|
### Tool schemas
|
|
|
|
|
|
|
|
|
|
**What the model sees**: The model sees the generated [`bash` schema](../../../docs/tool-catalog.md#deepseek-aidsh-tool-bash). `run_in_background` appears only when this producer enables it; `sandbox_permissions` and `justification` appear only when the mounted executor advertises sandboxing. Agent-scoped tool restrictions can remove the definition for that agent.
|
|
|
|
|
#### What the model sees
|
|
|
|
|
|
|
|
|
|
**Token effect**: Fixed schema cost on every request where the tools are visible; sandbox support adds the escalation fields and its conditional description paragraph.
|
|
|
|
|
The model sees the generated [`bash` schema](../../../docs/tool-catalog.md#deepseek-aidsh-tool-bash). `run_in_background` appears only when this producer enables it; `sandbox_permissions` and `justification` appear only when the mounted executor advertises sandboxing. Agent-scoped tool restrictions can remove the definition for that agent.
|
|
|
|
|
|
|
|
|
|
#### Token effect
|
|
|
|
|
|
|
|
|
|
Fixed schema cost on every request where the tools are visible; sandbox support adds the escalation fields and its conditional description paragraph.
|
|
|
|
|
|
|
|
|
|
#### KV Cache effect
|
|
|
|
|
|
|
|
|
|
Prefix-stable while visibility, background support, and executor sandbox capabilities are unchanged. A restriction, config change, or executor change may invalidate reuse from the first changed tool definition.
|
|
|
|
|
|
|
|
|
|
### Foreground result
|
|
|
|
|
|
|
|
|
|
**What the model sees**: The renderer emits the data-dependent stdout tail, then optional `[stderr]` and the stderr tail. With no output it emits exactly `(no output)`. Conditional lines are exactly `[output truncated; full output: <path-or-(unavailable)>]`, `[sandbox: file access denied under <mode> mode]`, `[timed out after <timeoutMs>ms]`, `[killed by signal: <signal>]`, and `[exit code: <exitCode>]`; the sandbox escalation and runner-failure lines are quoted in [`dsh-bash-sandbox`](../bash-sandbox/README.md).
|
|
|
|
|
#### What the model sees
|
|
|
|
|
|
|
|
|
|
**Token effect**: Zero result tokens before a call. Output is bounded per stream, while each emitted line remains in history until compaction.
|
|
|
|
|
The renderer emits the data-dependent stdout tail, then optional `[stderr]` and the stderr tail. With no output it emits exactly `(no output)`. Conditional lines are exactly `[output truncated; full output: <path-or-(unavailable)>]`, `[sandbox: file access denied under <mode> mode]`, `[timed out after <timeoutMs>ms]`, `[killed by signal: <signal>]`, and `[exit code: <exitCode>]`; the sandbox escalation and runner-failure lines are quoted in [`dsh-bash-sandbox`](../bash-sandbox/README.md).
|
|
|
|
|
|
|
|
|
|
#### Token effect
|
|
|
|
|
|
|
|
|
|
Zero result tokens before a call. Output is bounded per stream, while each emitted line remains in history until compaction.
|
|
|
|
|
|
|
|
|
|
#### KV Cache effect
|
|
|
|
|
|
|
|
|
|
Append-only; newly visible content follows the reusable request prefix and does not invalidate existing KV-cache entries.
|
|
|
|
|
|
|
|
|
|
### Background task context and results
|
|
|
|
|
|
|
|
|
|
**What the model sees**: Start returns exactly `started background task <taskId>`. This producer supplies incremental process output, optional `[some output was dropped from memory; full output: <paths-or-(unavailable)>]`, sandbox facts, and terminal detail such as `exit code: <exitCode>` or `signal: <signal>` to the generic task runtime. [`dsh-tool-tasks`](../../tasks/tool-tasks/README.md) owns the visible status line, completion notice, listing, and cancellation response.
|
|
|
|
|
#### What the model sees
|
|
|
|
|
|
|
|
|
|
**Token effect**: The start acknowledgement is small and retained; collected output is data-dependent and bounded by the executor's stream buffers. Consuming reads do not repeat prior output.
|
|
|
|
|
Start returns exactly `started background task <taskId>`. This producer supplies incremental process output, optional `[some output was dropped from memory; full output: <paths-or-(unavailable)>]`, sandbox facts, and terminal detail such as `exit code: <exitCode>` or `signal: <signal>` to the generic task runtime. [`dsh-tool-tasks`](../../tasks/tool-tasks/README.md) owns the visible status line, completion notice, listing, and cancellation response.
|
|
|
|
|
|
|
|
|
|
#### Token effect
|
|
|
|
|
|
|
|
|
|
The start acknowledgement is small and retained; collected output is data-dependent and bounded by the executor's stream buffers. Consuming reads do not repeat prior output.
|
|
|
|
|
|
|
|
|
|
#### KV Cache effect
|
|
|
|
|
|
|
|
|
|
Append-only; newly visible content follows the reusable request prefix and does not invalidate existing KV-cache entries.
|
|
|
|
|
|
|
|
|
|
### Tool errors
|
|
|
|
|
|
|
|
|
|
**What the model sees**: Validation and policy failures are normalized as `Error: <message>`. This package's stable messages are `invalid command: expected a non-empty string`, `invalid description: expected a non-empty string`, `invalid timeoutMs: expected a positive number, got <value>`, `invalid escalation: sandbox_permissions requires a justification`, `invalid escalation: justification is only valid together with sandbox_permissions`, `invalid justification: expected a non-empty sentence`, `background execution is disabled for this bash tool`, `background tasks unavailable: load @deepseek-ai/dsh-tasks and @deepseek-ai/dsh-tool-tasks`, `sandbox_permissions is not available in this composition (no sandboxing executor to escalate)`, `sandbox escalation to "<mode>" is not strictly wider than this call's current "<mode>" mode`, the approval-availability/rejection/cancellation variants, and `command aborted`.
|
|
|
|
|
#### What the model sees
|
|
|
|
|
|
|
|
|
|
**Token effect**: Only the failing call adds these retained tokens; a rejected escalation does not add command output because the command does not run.
|
|
|
|
|
Validation and policy failures are normalized as `Error: <message>`. This package's stable messages are `invalid command: expected a non-empty string`, `invalid description: expected a non-empty string`, `invalid timeoutMs: expected a positive number, got <value>`, `invalid escalation: sandbox_permissions requires a justification`, `invalid escalation: justification is only valid together with sandbox_permissions`, `invalid justification: expected a non-empty sentence`, `background execution is disabled for this bash tool`, `background tasks unavailable: load @deepseek-ai/dsh-tasks and @deepseek-ai/dsh-tool-tasks`, `sandbox_permissions is not available in this composition (no sandboxing executor to escalate)`, `sandbox escalation to "<mode>" is not strictly wider than this call's current "<mode>" mode`, the approval-availability/rejection/cancellation variants, and `command aborted`.
|
|
|
|
|
|
|
|
|
|
#### Token effect
|
|
|
|
|
|
|
|
|
|
Only the failing call adds these retained tokens; a rejected escalation does not add command output because the command does not run.
|
|
|
|
|
|
|
|
|
|
#### KV Cache effect
|
|
|
|
|
|
|
|
|
|
Append-only; newly visible content follows the reusable request prefix and does not invalidate existing KV-cache entries.
|
|
|
|
|
|
|
|
|
|
## Known Limitations and Deferred Work
|
|
|
|
|
|
|
|
|
|
|