`)."
+ },
+ "meta": {
+ "type": "object",
+ "description": "The workflow identity block (plain JSON — never code).",
+ "additionalProperties": true,
+ "properties": {
+ "name": {
+ "type": "string",
+ "description": "Short kebab-case workflow name."
+ },
+ "description": {
+ "type": "string",
+ "description": "One-line description of what the workflow does."
+ },
+ "whenToUse": {
+ "type": "string",
+ "description": "Optional guidance on when this workflow applies."
+ },
+ "phases": {
+ "type": "array",
+ "description": "Optional phase declarations matched by phase() calls.",
+ "items": {
+ "type": "object",
+ "additionalProperties": true,
+ "properties": {
+ "title": {
+ "type": "string",
+ "description": "The phase title phase() calls match by exact string."
+ },
+ "detail": {
+ "type": "string",
+ "description": "Optional one-line description of the phase."
+ },
+ "provider": {
+ "type": "string",
+ "description": "Optional provider override this phase is expected to use."
+ },
+ "model": {
+ "type": "string",
+ "description": "Optional model override this phase is expected to use."
+ }
+ },
+ "required": [
+ "title"
+ ]
+ }
+ }
+ },
+ "required": [
+ "name",
+ "description"
+ ]
+ },
+ "args": {
+ "type": "object",
+ "description": "Optional JSON input exposed to the script as the `args` global (wrap a bare list as a field, e.g. {\"files\": [...]}).",
+ "additionalProperties": true
+ }
+ },
+ "required": [
+ "script",
+ "meta"
+ ]
+ }
+ },
+ {
+ "name": "write",
+ "description": "Create or fully replace a UTF-8 text file.",
+ "parameters": {
+ "type": "object",
+ "properties": {
+ "file_path": {
+ "type": "string",
+ "description": "Path to write, resolved by the filesystem backend."
+ },
+ "content": {
+ "type": "string",
+ "description": "Full UTF-8 text content to write."
+ },
+ "sandbox_permissions": {
+ "type": "string",
+ "description": "The wider sandbox mode this file operation needs. Only valid as a one-shot retry of an operation the sandbox just denied; requires justification and user approval.",
+ "enum": [
+ "workspace-write",
+ "danger-full-access"
+ ]
+ },
+ "justification": {
+ "type": "string",
+ "description": "Required with sandbox_permissions: one sentence for the user explaining why this exact file operation needs the wider access."
+ }
+ },
+ "required": [
+ "file_path",
+ "content"
+ ]
+ }
+ }
+ ],
+ "changes": []
+}
diff --git a/examples/acp-agent/tests/snapshots/skill-load/system-prompt.expected.md b/examples/acp-agent/tests/snapshots/skill-load/system-prompt.expected.md
index 68bdd841c7..17e6773a03 100644
--- a/examples/acp-agent/tests/snapshots/skill-load/system-prompt.expected.md
+++ b/examples/acp-agent/tests/snapshots/skill-load/system-prompt.expected.md
@@ -15,8 +15,6 @@ Check the [exit code: N] marker on every bash result; investigate failures befor
Track every background task id you start. You are notified in-session when a task finishes — do not busy-poll or sleep on one; keep working on independent steps and do not duplicate a running task's work. Before giving a final answer, collect every still-relevant task with task_output (set wait: true only when you are genuinely blocked on it), and task_kill tasks that stopped mattering.
-Use session_search to find relevant work from prior sessions, or session_event_search to search earlier events in one session. Search results are cursor-free and workspace-scoped. Follow a useful hit with session_trace, session_event_trace, or session_event_read when you need lineage, relationships, or exact data.
-
Use goal tools for one long-running completion objective in the current session. create_goal may infer goal intent from a direct human request in any language; do not create a goal for routine single-turn work. Call get_goal before update_goal and copy its exact goal_id and revision. After session resume or fork, an active goal is disarmed: when a human asks to continue or resume in any wording or language, use update_goal action resume to rearm it. Mark complete only when the objective is actually achieved. Mark blocked only after the same blocking condition persists for at least 3 consecutive goal rounds, and report that concrete condition in blocked_reason; difficulty, uncertainty, or useful remaining work is not blocked.
Approval prompts are disabled in this session: actions that require approval are rejected automatically — do not request sandbox escalation (do not set `sandbox_permissions`).
diff --git a/examples/acp-agent/tests/snapshots/skill-load/tool-schemas.expected.json b/examples/acp-agent/tests/snapshots/skill-load/tool-schemas.expected.json
index dde0ba0d7a..d4973bfea4 100644
--- a/examples/acp-agent/tests/snapshots/skill-load/tool-schemas.expected.json
+++ b/examples/acp-agent/tests/snapshots/skill-load/tool-schemas.expected.json
@@ -159,210 +159,6 @@
]
}
},
- {
- "name": "session_event_read",
- "description": "Read one full unabridged event and optional neighboring raw-event summaries from an authorized session.",
- "parameters": {
- "type": "object",
- "properties": {
- "session_id": {
- "type": "string",
- "description": "Target session id. Omit for the current session."
- },
- "seq": {
- "type": "integer",
- "description": "Target event sequence number."
- },
- "before": {
- "type": "integer",
- "description": "Number of preceding raw events to summarize. Omit for none."
- },
- "after": {
- "type": "integer",
- "description": "Number of following raw events to summarize. Omit for none."
- }
- },
- "required": [
- "seq"
- ]
- }
- },
- {
- "name": "session_event_search",
- "description": "Search prior events in one authorized session; the current session excludes the step performing this call.",
- "parameters": {
- "type": "object",
- "properties": {
- "session_id": {
- "type": "string",
- "description": "Target session id. Omit for the current session."
- },
- "query": {
- "type": "string",
- "description": "Literal full-text query over the target session."
- },
- "seq_from": {
- "type": "integer",
- "description": "Inclusive event sequence lower bound."
- },
- "seq_to": {
- "type": "integer",
- "description": "Inclusive event sequence upper bound."
- },
- "time_from": {
- "type": "string",
- "description": "Inclusive timezone-qualified ISO 8601 event-time lower bound."
- },
- "time_to": {
- "type": "string",
- "description": "Inclusive timezone-qualified ISO 8601 event-time upper bound."
- },
- "event_types": {
- "type": "array",
- "description": "Event types to include.",
- "items": {
- "type": "string"
- }
- },
- "surfaces": {
- "type": "array",
- "description": "Event surfaces to include.",
- "items": {
- "type": "string",
- "enum": [
- "current",
- "shadowed",
- "log-only"
- ]
- }
- }
- },
- "required": [
- "query"
- ]
- }
- },
- {
- "name": "session_event_trace",
- "description": "Read every direct replacement and provenance relationship for one event in an authorized session.",
- "parameters": {
- "type": "object",
- "properties": {
- "session_id": {
- "type": "string",
- "description": "Target session id. Omit for the current session."
- },
- "seq": {
- "type": "integer",
- "description": "Target event sequence number."
- }
- },
- "required": [
- "seq"
- ]
- }
- },
- {
- "name": "session_search",
- "description": "Search prior sessions in the caller workspace and return the strongest matching event from each session.",
- "parameters": {
- "type": "object",
- "properties": {
- "query": {
- "type": "string",
- "description": "Literal full-text query over prior session history."
- },
- "session_ids": {
- "type": "array",
- "description": "Optional session ids to include.",
- "items": {
- "type": "string"
- }
- },
- "created_at_from": {
- "type": "string",
- "description": "Inclusive timezone-qualified ISO 8601 creation-time lower bound."
- },
- "created_at_to": {
- "type": "string",
- "description": "Inclusive timezone-qualified ISO 8601 creation-time upper bound."
- },
- "parent_session_ids": {
- "type": "array",
- "description": "Optional direct parent session ids.",
- "items": {
- "type": "string"
- }
- },
- "include_root_sessions": {
- "type": "boolean",
- "description": "Include sessions with no parent in the parent filter."
- },
- "availability": {
- "type": "array",
- "description": "Require at least one selected source availability.",
- "items": {
- "type": "string",
- "enum": [
- "live",
- "persisted"
- ]
- }
- },
- "event_seq_from": {
- "type": "integer",
- "description": "Inclusive event sequence lower bound."
- },
- "event_seq_to": {
- "type": "integer",
- "description": "Inclusive event sequence upper bound."
- },
- "event_time_from": {
- "type": "string",
- "description": "Inclusive timezone-qualified ISO 8601 event-time lower bound."
- },
- "event_time_to": {
- "type": "string",
- "description": "Inclusive timezone-qualified ISO 8601 event-time upper bound."
- },
- "event_types": {
- "type": "array",
- "description": "Event types to include.",
- "items": {
- "type": "string"
- }
- },
- "event_surfaces": {
- "type": "array",
- "description": "Event surfaces to include.",
- "items": {
- "type": "string",
- "enum": [
- "current",
- "shadowed",
- "log-only"
- ]
- }
- }
- },
- "required": [
- "query"
- ]
- }
- },
- {
- "name": "session_trace",
- "description": "Read the authorized session lineage around one session, including complete visible ancestor and descendant relationships.",
- "parameters": {
- "type": "object",
- "properties": {
- "session_id": {
- "type": "string",
- "description": "Target session id. Omit for the current session."
- }
- }
- }
- },
{
"name": "skill",
"description": "Load the full instructions for an available skill. Call this with the exact skill name from the session skill catalog before acting on a task that names or clearly matches that skill.",
diff --git a/examples/acp-agent/tests/snapshots/text-turn/system-prompt.expected.md b/examples/acp-agent/tests/snapshots/text-turn/system-prompt.expected.md
index 68bdd841c7..17e6773a03 100644
--- a/examples/acp-agent/tests/snapshots/text-turn/system-prompt.expected.md
+++ b/examples/acp-agent/tests/snapshots/text-turn/system-prompt.expected.md
@@ -15,8 +15,6 @@ Check the [exit code: N] marker on every bash result; investigate failures befor
Track every background task id you start. You are notified in-session when a task finishes — do not busy-poll or sleep on one; keep working on independent steps and do not duplicate a running task's work. Before giving a final answer, collect every still-relevant task with task_output (set wait: true only when you are genuinely blocked on it), and task_kill tasks that stopped mattering.
-Use session_search to find relevant work from prior sessions, or session_event_search to search earlier events in one session. Search results are cursor-free and workspace-scoped. Follow a useful hit with session_trace, session_event_trace, or session_event_read when you need lineage, relationships, or exact data.
-
Use goal tools for one long-running completion objective in the current session. create_goal may infer goal intent from a direct human request in any language; do not create a goal for routine single-turn work. Call get_goal before update_goal and copy its exact goal_id and revision. After session resume or fork, an active goal is disarmed: when a human asks to continue or resume in any wording or language, use update_goal action resume to rearm it. Mark complete only when the objective is actually achieved. Mark blocked only after the same blocking condition persists for at least 3 consecutive goal rounds, and report that concrete condition in blocked_reason; difficulty, uncertainty, or useful remaining work is not blocked.
Approval prompts are disabled in this session: actions that require approval are rejected automatically — do not request sandbox escalation (do not set `sandbox_permissions`).
diff --git a/examples/acp-agent/tests/snapshots/text-turn/tool-schemas.expected.json b/examples/acp-agent/tests/snapshots/text-turn/tool-schemas.expected.json
index dde0ba0d7a..d4973bfea4 100644
--- a/examples/acp-agent/tests/snapshots/text-turn/tool-schemas.expected.json
+++ b/examples/acp-agent/tests/snapshots/text-turn/tool-schemas.expected.json
@@ -159,210 +159,6 @@
]
}
},
- {
- "name": "session_event_read",
- "description": "Read one full unabridged event and optional neighboring raw-event summaries from an authorized session.",
- "parameters": {
- "type": "object",
- "properties": {
- "session_id": {
- "type": "string",
- "description": "Target session id. Omit for the current session."
- },
- "seq": {
- "type": "integer",
- "description": "Target event sequence number."
- },
- "before": {
- "type": "integer",
- "description": "Number of preceding raw events to summarize. Omit for none."
- },
- "after": {
- "type": "integer",
- "description": "Number of following raw events to summarize. Omit for none."
- }
- },
- "required": [
- "seq"
- ]
- }
- },
- {
- "name": "session_event_search",
- "description": "Search prior events in one authorized session; the current session excludes the step performing this call.",
- "parameters": {
- "type": "object",
- "properties": {
- "session_id": {
- "type": "string",
- "description": "Target session id. Omit for the current session."
- },
- "query": {
- "type": "string",
- "description": "Literal full-text query over the target session."
- },
- "seq_from": {
- "type": "integer",
- "description": "Inclusive event sequence lower bound."
- },
- "seq_to": {
- "type": "integer",
- "description": "Inclusive event sequence upper bound."
- },
- "time_from": {
- "type": "string",
- "description": "Inclusive timezone-qualified ISO 8601 event-time lower bound."
- },
- "time_to": {
- "type": "string",
- "description": "Inclusive timezone-qualified ISO 8601 event-time upper bound."
- },
- "event_types": {
- "type": "array",
- "description": "Event types to include.",
- "items": {
- "type": "string"
- }
- },
- "surfaces": {
- "type": "array",
- "description": "Event surfaces to include.",
- "items": {
- "type": "string",
- "enum": [
- "current",
- "shadowed",
- "log-only"
- ]
- }
- }
- },
- "required": [
- "query"
- ]
- }
- },
- {
- "name": "session_event_trace",
- "description": "Read every direct replacement and provenance relationship for one event in an authorized session.",
- "parameters": {
- "type": "object",
- "properties": {
- "session_id": {
- "type": "string",
- "description": "Target session id. Omit for the current session."
- },
- "seq": {
- "type": "integer",
- "description": "Target event sequence number."
- }
- },
- "required": [
- "seq"
- ]
- }
- },
- {
- "name": "session_search",
- "description": "Search prior sessions in the caller workspace and return the strongest matching event from each session.",
- "parameters": {
- "type": "object",
- "properties": {
- "query": {
- "type": "string",
- "description": "Literal full-text query over prior session history."
- },
- "session_ids": {
- "type": "array",
- "description": "Optional session ids to include.",
- "items": {
- "type": "string"
- }
- },
- "created_at_from": {
- "type": "string",
- "description": "Inclusive timezone-qualified ISO 8601 creation-time lower bound."
- },
- "created_at_to": {
- "type": "string",
- "description": "Inclusive timezone-qualified ISO 8601 creation-time upper bound."
- },
- "parent_session_ids": {
- "type": "array",
- "description": "Optional direct parent session ids.",
- "items": {
- "type": "string"
- }
- },
- "include_root_sessions": {
- "type": "boolean",
- "description": "Include sessions with no parent in the parent filter."
- },
- "availability": {
- "type": "array",
- "description": "Require at least one selected source availability.",
- "items": {
- "type": "string",
- "enum": [
- "live",
- "persisted"
- ]
- }
- },
- "event_seq_from": {
- "type": "integer",
- "description": "Inclusive event sequence lower bound."
- },
- "event_seq_to": {
- "type": "integer",
- "description": "Inclusive event sequence upper bound."
- },
- "event_time_from": {
- "type": "string",
- "description": "Inclusive timezone-qualified ISO 8601 event-time lower bound."
- },
- "event_time_to": {
- "type": "string",
- "description": "Inclusive timezone-qualified ISO 8601 event-time upper bound."
- },
- "event_types": {
- "type": "array",
- "description": "Event types to include.",
- "items": {
- "type": "string"
- }
- },
- "event_surfaces": {
- "type": "array",
- "description": "Event surfaces to include.",
- "items": {
- "type": "string",
- "enum": [
- "current",
- "shadowed",
- "log-only"
- ]
- }
- }
- },
- "required": [
- "query"
- ]
- }
- },
- {
- "name": "session_trace",
- "description": "Read the authorized session lineage around one session, including complete visible ancestor and descendant relationships.",
- "parameters": {
- "type": "object",
- "properties": {
- "session_id": {
- "type": "string",
- "description": "Target session id. Omit for the current session."
- }
- }
- }
- },
{
"name": "skill",
"description": "Load the full instructions for an available skill. Call this with the exact skill name from the session skill catalog before acting on a task that names or clearly matches that skill.",
diff --git a/examples/acp-agent/tests/snapshots/workspace-context/system-prompt.expected.md b/examples/acp-agent/tests/snapshots/workspace-context/system-prompt.expected.md
index 45c9e0970c..6cd8d5725f 100644
--- a/examples/acp-agent/tests/snapshots/workspace-context/system-prompt.expected.md
+++ b/examples/acp-agent/tests/snapshots/workspace-context/system-prompt.expected.md
@@ -15,8 +15,6 @@ Check the [exit code: N] marker on every bash result; investigate failures befor
Track every background task id you start. You are notified in-session when a task finishes — do not busy-poll or sleep on one; keep working on independent steps and do not duplicate a running task's work. Before giving a final answer, collect every still-relevant task with task_output (set wait: true only when you are genuinely blocked on it), and task_kill tasks that stopped mattering.
-Use session_search to find relevant work from prior sessions, or session_event_search to search earlier events in one session. Search results are cursor-free and workspace-scoped. Follow a useful hit with session_trace, session_event_trace, or session_event_read when you need lineage, relationships, or exact data.
-
Use goal tools for one long-running completion objective in the current session. create_goal may infer goal intent from a direct human request in any language; do not create a goal for routine single-turn work. Call get_goal before update_goal and copy its exact goal_id and revision. After session resume or fork, an active goal is disarmed: when a human asks to continue or resume in any wording or language, use update_goal action resume to rearm it. Mark complete only when the objective is actually achieved. Mark blocked only after the same blocking condition persists for at least 3 consecutive goal rounds, and report that concrete condition in blocked_reason; difficulty, uncertainty, or useful remaining work is not blocked.
Approval prompts are disabled in this session: actions that require approval are rejected automatically — do not request sandbox escalation (do not set `sandbox_permissions`).
diff --git a/examples/acp-agent/tests/snapshots/workspace-context/tool-schemas.expected.json b/examples/acp-agent/tests/snapshots/workspace-context/tool-schemas.expected.json
index dde0ba0d7a..d4973bfea4 100644
--- a/examples/acp-agent/tests/snapshots/workspace-context/tool-schemas.expected.json
+++ b/examples/acp-agent/tests/snapshots/workspace-context/tool-schemas.expected.json
@@ -159,210 +159,6 @@
]
}
},
- {
- "name": "session_event_read",
- "description": "Read one full unabridged event and optional neighboring raw-event summaries from an authorized session.",
- "parameters": {
- "type": "object",
- "properties": {
- "session_id": {
- "type": "string",
- "description": "Target session id. Omit for the current session."
- },
- "seq": {
- "type": "integer",
- "description": "Target event sequence number."
- },
- "before": {
- "type": "integer",
- "description": "Number of preceding raw events to summarize. Omit for none."
- },
- "after": {
- "type": "integer",
- "description": "Number of following raw events to summarize. Omit for none."
- }
- },
- "required": [
- "seq"
- ]
- }
- },
- {
- "name": "session_event_search",
- "description": "Search prior events in one authorized session; the current session excludes the step performing this call.",
- "parameters": {
- "type": "object",
- "properties": {
- "session_id": {
- "type": "string",
- "description": "Target session id. Omit for the current session."
- },
- "query": {
- "type": "string",
- "description": "Literal full-text query over the target session."
- },
- "seq_from": {
- "type": "integer",
- "description": "Inclusive event sequence lower bound."
- },
- "seq_to": {
- "type": "integer",
- "description": "Inclusive event sequence upper bound."
- },
- "time_from": {
- "type": "string",
- "description": "Inclusive timezone-qualified ISO 8601 event-time lower bound."
- },
- "time_to": {
- "type": "string",
- "description": "Inclusive timezone-qualified ISO 8601 event-time upper bound."
- },
- "event_types": {
- "type": "array",
- "description": "Event types to include.",
- "items": {
- "type": "string"
- }
- },
- "surfaces": {
- "type": "array",
- "description": "Event surfaces to include.",
- "items": {
- "type": "string",
- "enum": [
- "current",
- "shadowed",
- "log-only"
- ]
- }
- }
- },
- "required": [
- "query"
- ]
- }
- },
- {
- "name": "session_event_trace",
- "description": "Read every direct replacement and provenance relationship for one event in an authorized session.",
- "parameters": {
- "type": "object",
- "properties": {
- "session_id": {
- "type": "string",
- "description": "Target session id. Omit for the current session."
- },
- "seq": {
- "type": "integer",
- "description": "Target event sequence number."
- }
- },
- "required": [
- "seq"
- ]
- }
- },
- {
- "name": "session_search",
- "description": "Search prior sessions in the caller workspace and return the strongest matching event from each session.",
- "parameters": {
- "type": "object",
- "properties": {
- "query": {
- "type": "string",
- "description": "Literal full-text query over prior session history."
- },
- "session_ids": {
- "type": "array",
- "description": "Optional session ids to include.",
- "items": {
- "type": "string"
- }
- },
- "created_at_from": {
- "type": "string",
- "description": "Inclusive timezone-qualified ISO 8601 creation-time lower bound."
- },
- "created_at_to": {
- "type": "string",
- "description": "Inclusive timezone-qualified ISO 8601 creation-time upper bound."
- },
- "parent_session_ids": {
- "type": "array",
- "description": "Optional direct parent session ids.",
- "items": {
- "type": "string"
- }
- },
- "include_root_sessions": {
- "type": "boolean",
- "description": "Include sessions with no parent in the parent filter."
- },
- "availability": {
- "type": "array",
- "description": "Require at least one selected source availability.",
- "items": {
- "type": "string",
- "enum": [
- "live",
- "persisted"
- ]
- }
- },
- "event_seq_from": {
- "type": "integer",
- "description": "Inclusive event sequence lower bound."
- },
- "event_seq_to": {
- "type": "integer",
- "description": "Inclusive event sequence upper bound."
- },
- "event_time_from": {
- "type": "string",
- "description": "Inclusive timezone-qualified ISO 8601 event-time lower bound."
- },
- "event_time_to": {
- "type": "string",
- "description": "Inclusive timezone-qualified ISO 8601 event-time upper bound."
- },
- "event_types": {
- "type": "array",
- "description": "Event types to include.",
- "items": {
- "type": "string"
- }
- },
- "event_surfaces": {
- "type": "array",
- "description": "Event surfaces to include.",
- "items": {
- "type": "string",
- "enum": [
- "current",
- "shadowed",
- "log-only"
- ]
- }
- }
- },
- "required": [
- "query"
- ]
- }
- },
- {
- "name": "session_trace",
- "description": "Read the authorized session lineage around one session, including complete visible ancestor and descendant relationships.",
- "parameters": {
- "type": "object",
- "properties": {
- "session_id": {
- "type": "string",
- "description": "Target session id. Omit for the current session."
- }
- }
- }
- },
{
"name": "skill",
"description": "Load the full instructions for an available skill. Call this with the exact skill name from the session skill catalog before acting on a task that names or clearly matches that skill.",
diff --git a/examples/tui-agent/composition.md b/examples/tui-agent/composition.md
index 557923b733..fd6d163952 100644
--- a/examples/tui-agent/composition.md
+++ b/examples/tui-agent/composition.md
@@ -23,8 +23,6 @@ flowchart LR
bundle_agent_core --> spine_sessions["ctx.sessions"]
bundle_agent_core --> spine_tools["ctx.tools + tool-bash"]
bundle_agent_core --> spine_loop["ctx.agents + ctx.agentLoop"]
- plugin_tui_tool_session_query["tool-session-query
@deepseek-ai/dsh-tool-session-query"]
- cfg --> plugin_tui_tool_session_query
plugin_tui_session_title_llm["session-title-llm
@deepseek-ai/dsh-session-title-first-message-llm"]
cfg --> plugin_tui_session_title_llm
plugin_tui_token_meter["token-meter
@deepseek-ai/dsh-token-meter"]
@@ -73,7 +71,6 @@ flowchart LR
| `llm-deepseek` | `@deepseek-ai/dsh-llm-deepseek` |
| `bash` | `@deepseek-ai/dsh-bash-local` |
| `tui-agent` | `@deepseek-ai/dsh-tui-demo` |
-| `tool-session-query` | `@deepseek-ai/dsh-tool-session-query` |
| `session-title-llm` | `@deepseek-ai/dsh-session-title-first-message-llm` |
| `token-meter` | `@deepseek-ai/dsh-token-meter` |
| `tool-result-prune` | `@deepseek-ai/dsh-compact-tool-result-prune` |
diff --git a/examples/tui-agent/cordis.yml b/examples/tui-agent/cordis.yml
index 4fccfff1c7..3070fcdc01 100644
--- a/examples/tui-agent/cordis.yml
+++ b/examples/tui-agent/cordis.yml
@@ -52,11 +52,6 @@
Verify your work by running the code or tests. Keep answers brief and
factual.
-# The app above owns ctx.sessionQuery; expose its workspace-authorized
-# prior-session search and exact trace/read operations to the model.
-- id: tool-session-query
- name: '@deepseek-ai/dsh-tool-session-query'
-
# Model-made session titles on the first-message cadence: replaces the spine's
# deterministic fallback title with a short model summary. The TUI renders the
# logged `session/title` as the banner subtitle and the terminal window title.
diff --git a/packages/examples/acp-demo/README.md b/packages/examples/acp-demo/README.md
index e215a80939..9666e4444f 100644
--- a/packages/examples/acp-demo/README.md
+++ b/packages/examples/acp-demo/README.md
@@ -36,7 +36,7 @@ The app does not install commands, user interaction, session navigation, configu
| `goals` | owner defaults | Persisted same-session goal domain and model tools, or `false`. |
| `llmRetry` | owner defaults | Bounded transient model-request retry policy. |
-The shipped [`examples/acp-agent/cordis.yml`](../../../examples/acp-agent/cordis.yml) adds the DeepSeek adapter, sandboxed bash and filesystem providers, one-shot approval policy, compaction, subagents, workflows, hooks, a derived session-query index, generic timeout and spill policies, and model-facing tools. Snapshot overlays replace only nondeterministic providers or policy values.
+The shipped [`examples/acp-agent/cordis.yml`](../../../examples/acp-agent/cordis.yml) adds the DeepSeek adapter, sandboxed bash and filesystem providers, one-shot approval policy, compaction, subagents, workflows, hooks, and model-facing tools. The app supplies the derived session-query index, while the model-facing query consumer remains an explicit leaf opt-in. Snapshot overlays replace only nondeterministic providers or policy values.
## Bin
diff --git a/packages/examples/acp-demo/tests/load-path.e2e.ts b/packages/examples/acp-demo/tests/load-path.e2e.ts
index 9f61e28314..2c507a0bad 100644
--- a/packages/examples/acp-demo/tests/load-path.e2e.ts
+++ b/packages/examples/acp-demo/tests/load-path.e2e.ts
@@ -28,9 +28,8 @@ const tsxLoader = fileURLToPath(import.meta.resolve('tsx'))
// Repo root is four levels up from packages/examples/acp-demo/tests.
const repoTsconfig = fileURLToPath(new URL('../../../../tsconfig.json', import.meta.url))
-// A minimal leaf that loads this app + the two backends and the shipped
-// session-query consumer/policies — the same shape as examples/acp-agent/cordis.yml,
-// inlined so the package test owns its fixture.
+// A minimal opt-in leaf that loads this app + the two backends and the optional
+// session-query consumer/policies, inlined so the package test owns its fixture.
const CORDIS_YML = `
- id: llm-deepseek
name: '@deepseek-ai/dsh-llm-deepseek'
diff --git a/packages/examples/tui-demo/README.md b/packages/examples/tui-demo/README.md
index 9e2a50f1b5..e3321bd97f 100644
--- a/packages/examples/tui-demo/README.md
+++ b/packages/examples/tui-demo/README.md
@@ -13,7 +13,7 @@ Use [`@deepseek-ai/dsh-cli-demo`](../cli-demo/README.md) for pipes, scripts, and
| `@deepseek-ai/dsh-command-goal` | Direct `/goal` status and mutation over the spine's persisted-goal stack |
| `@deepseek-ai/dsh-session-persistence-jsonl` | Durable session log under `persistenceRoot` |
| `@deepseek-ai/dsh-session-checkpoint-policy` | Semantic durability barriers before model requests and top-level tool effects, plus completed-step checkpoints |
-| `@deepseek-ai/dsh-session-query-sqlite` + `@deepseek-ai/dsh-session-reference` | Combined exact/FTS session queries and bounded `@session` snapshots consumed by the TUI; the default leaf adds the model-facing query tools |
+| `@deepseek-ai/dsh-session-query-sqlite` + `@deepseek-ai/dsh-session-reference` | Combined exact/FTS session queries and bounded `@session` snapshots consumed by the TUI; model-facing query tools remain a leaf opt-in |
| `@deepseek-ai/dsh-user-interaction` | Provider-neutral human question service |
| `@deepseek-ai/dsh-tui` | Full-screen transcript, editor, tool cards, plan, and question overlays |
| `@deepseek-ai/dsh-tool-ask-user` | Model-facing `ask_user_question` tool |
diff --git a/packages/host/runtime/README.md b/packages/host/runtime/README.md
index 221f0f46c0..14ce60e1c2 100644
--- a/packages/host/runtime/README.md
+++ b/packages/host/runtime/README.md
@@ -1,6 +1,6 @@
# @deepseek-ai/dsh-host-runtime
-Host runtime assembly for `dsh`: `bootHost` composes the core plugin spine (LLM service + DeepSeek adapter, sessions with JSONL persistence, a derived SQLite FTS session-query index, immediate fallback titles, optional first-message model summaries, system prompt, tool and agent registries, agent loop, five workspace-authorized model-facing session-query tools, workspace instructions, local bash, the generic tool-timeout and 50,000-byte spill policies, and the provider-neutral user-interaction service), and `startHost` is the one-step shell seam returning `{ api, handler, defaults, ctx, dispose }` (its `api` comes from [`dsh-host-apiproxy`](../apiproxy/README.md)'s `createApiProxy` over that composition).
+Host runtime assembly for `dsh`: `bootHost` composes the core plugin spine (LLM service + DeepSeek adapter, sessions with JSONL persistence, a derived SQLite FTS session-query index, immediate fallback titles, optional first-message model summaries, system prompt, tool and agent registries, agent loop, workspace instructions, local bash, the generic tool-timeout and 50,000-byte spill policies, and the provider-neutral user-interaction service), and `startHost` is the one-step shell seam returning `{ api, handler, defaults, ctx, dispose }` (its `api` comes from [`dsh-host-apiproxy`](../apiproxy/README.md)'s `createApiProxy` over that composition).
Which plugins mount and with what defaults is decided only here — shells must not `ctx.plugin` to alter the assembly. `RunningHost.ctx` is a formal seam with exactly two sanctioned uses: mounting protocol front-door plugins (e.g. a future `dsh acp`) and headless session-event subscription; consuming clients must not bypass `api` through it.
@@ -22,53 +22,19 @@ Unary methods take the narrow `RpcRequest` and echo `request.rpcId`; a prompt
## Model Experience
-### Prior-history system prompt
+### Optional session-query consumer
#### What the model sees
-Every main host agent receives the fixed prior-history guidance below because `bootHost` always mounts the session-query tool plugin.
-
-##### Prior-history guidance
-
-```markdown
-Use session_search to find relevant work from prior sessions, or session_event_search to search earlier events in one session. Search results are cursor-free and workspace-scoped. Follow a useful hit with session_trace, session_event_trace, or session_event_read when you need lineage, relationships, or exact data.
-```
+The derived `ctx.sessionQuery` index is not model-facing. `bootHost` intentionally leaves the optional [`dsh-tool-session-query`](../../session-query/tool-session-query/README.md) consumer unmounted, so main host agents receive neither its prior-history prompt section nor its five schemas by default.
#### Token effect
-One fixed concise section is present on every request; `workspaceContext: false` does not remove it.
+The index adds no prompt or schema tokens. A custom composition that mounts the consumer owns its added prompt, schemas, calls, and results.
#### KV Cache effect
-The repeated prefix is stable while the fixed host assembly and guidance text are unchanged. Provider cache availability and eviction remain outside the host contract.
-
-### Session-query tool schemas
-
-#### What the model sees
-
-The fixed assembly mounts the generated [`session_search`, `session_event_search`, `session_trace`, `session_event_trace`, and `session_event_read` schemas](../../../docs/tool-catalog.md#deepseek-aidsh-tool-session-query). The schemas expose no workspace path, provider cursor, output page, model-controlled result limit, or timeout argument.
-
-#### Token effect
-
-Five fixed read-only schemas are present on every main-agent request; their cost changes only if the host assembly or an agent-scoped visibility policy changes.
-
-#### KV Cache effect
-
-The schema prefix is stable while visibility, definitions, and order are unchanged. The host makes no claim that a provider will cache or retain that prefix.
-
-### Session-query execution and results
-
-#### What the model sees
-
-Cross-session results require exact equality with the calling session's workspace, while a caller without a workspace can target only itself. `session_search` excludes the calling session, and `session_event_search` on the current session excludes the step performing the call. Both searches are cursor-free, collect at most 100 authorized results, and carry a cooperative 30-second deadline; the three trace/read tools carry caller cancellation but declare no host deadline. Results are plain text. When a final result exceeds 50,000 UTF-8 bytes, the generic spill policy attempts to retain the complete formatted text in a private session-scoped file and replace it with a bounded preview, locator, and retrieval hint; a spill failure leaves the original result visible.
-
-#### Token effect
-
-Call arguments and data-dependent results remain in history until compaction. Search result count is bounded; after a successful spill, only the bounded preview and retrieval notice are resent, while the complete text remains outside model context.
-
-#### KV Cache effect
-
-Calls and results append after the reusable request prefix. Compaction may replace earlier history; timeout or spill outcomes change only the appended result text.
+The index alone does not change the reusable model-request prefix; mounting the optional consumer would add its stable prompt and schema prefix.
### Workspace instructions
diff --git a/packages/host/runtime/package.json b/packages/host/runtime/package.json
index cb31e87fe9..b43cb9c468 100644
--- a/packages/host/runtime/package.json
+++ b/packages/host/runtime/package.json
@@ -58,7 +58,6 @@
"@deepseek-ai/dsh-tool-fs": "workspace:^",
"@deepseek-ai/dsh-tool-fs-search": "workspace:^",
"@deepseek-ai/dsh-tool-skill": "workspace:^",
- "@deepseek-ai/dsh-tool-session-query": "workspace:^",
"@deepseek-ai/dsh-tool-subagent": "workspace:^",
"@deepseek-ai/dsh-tool-tasks": "workspace:^",
"@deepseek-ai/dsh-tool-todo": "workspace:^",
diff --git a/packages/host/runtime/src/boot.ts b/packages/host/runtime/src/boot.ts
index 353f74d0b6..4e2976ccc4 100644
--- a/packages/host/runtime/src/boot.ts
+++ b/packages/host/runtime/src/boot.ts
@@ -20,7 +20,6 @@ import AgentLoop from '@deepseek-ai/dsh-agent-loop'
import * as LlmDeepSeek from '@deepseek-ai/dsh-llm-deepseek'
import SessionPersistenceJsonl from '@deepseek-ai/dsh-session-persistence-jsonl'
import SessionQuerySqlite from '@deepseek-ai/dsh-session-query-sqlite'
-import * as toolSessionQuery from '@deepseek-ai/dsh-tool-session-query'
import LocalBashExecutor from '@deepseek-ai/dsh-bash-local'
import * as toolBash from '@deepseek-ai/dsh-tool-bash'
import * as toolTodo from '@deepseek-ai/dsh-tool-todo'
@@ -135,7 +134,6 @@ export async function bootHost(options: BootHostOptions): Promise {
await ctx.plugin(LlmDeepSeek, {})
await ctx.plugin(SessionPersistenceJsonl, { root: options.persistenceRoot })
await ctx.plugin(SessionQuerySqlite, { path: join(options.persistenceRoot, 'session-query.db') })
- await ctx.plugin(toolSessionQuery, {})
await ctx.plugin(LocalBashExecutor, {})
// Tool suite mirroring the demo:repl composition (repl-agent/cordis.yml +
// the agent-spine bundle) so web sessions get the same coding-agent tool
diff --git a/packages/host/runtime/tests/host-runtime.spec.ts b/packages/host/runtime/tests/host-runtime.spec.ts
index 9912ec0785..22f64fb198 100644
--- a/packages/host/runtime/tests/host-runtime.spec.ts
+++ b/packages/host/runtime/tests/host-runtime.spec.ts
@@ -141,21 +141,20 @@ describe('bootHost / startHost', () => {
await handle.dispose()
})
- it('assembles workspace-authorized session query tools over the derived SQLite index', async () => {
+ it('assembles the derived SQLite query index without model-facing query tools', async () => {
const persistenceRoot = mkdtempSync(join(tmpdir(), 'dsh-boot-session-query-'))
const handle = await bootHost({
persistenceRoot,
workspaceContext: false,
})
expect(handle.ctx.get('sessionQuery')).toBeDefined()
- expect(handle.ctx.tools.schemas().map(schema => schema.name)).toEqual(expect.arrayContaining([
+ expect(handle.ctx.tools.schemas().map(schema => schema.name)).toEqual(expect.not.arrayContaining([
'session_search',
'session_event_search',
'session_trace',
'session_event_trace',
'session_event_read',
]))
- expect(handle.ctx.tools.get('session_search')?.timeoutMs).toBe(30_000)
await handle.dispose()
})
diff --git a/packages/host/runtime/tsconfig.json b/packages/host/runtime/tsconfig.json
index b0cef9eb16..55f517f778 100644
--- a/packages/host/runtime/tsconfig.json
+++ b/packages/host/runtime/tsconfig.json
@@ -50,9 +50,6 @@
{
"path": "../../session-query/session-query-sqlite"
},
- {
- "path": "../../session-query/tool-session-query"
- },
{
"path": "../../bash/bash-local"
},
diff --git a/packages/session-query/tool-session-query/README.md b/packages/session-query/tool-session-query/README.md
index 504405d698..ef957765c4 100644
--- a/packages/session-query/tool-session-query/README.md
+++ b/packages/session-query/tool-session-query/README.md
@@ -1,6 +1,6 @@
# @deepseek-ai/dsh-tool-session-query
-Workspace-authorized model tools over `ctx.sessionQuery`. The package depends only on the unified interface and registers `session_search`, `session_event_search`, `session_trace`, `session_event_trace`, and `session_event_read`.
+Workspace-authorized model tools over `ctx.sessionQuery`. The opt-in package depends only on the unified interface and registers `session_search`, `session_event_search`, `session_trace`, `session_event_trace`, and `session_event_read`; shipped host compositions do not mount it by default.
## Configuration
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index 400ae6df7e..de8e114782 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -2346,9 +2346,6 @@ importers:
'@deepseek-ai/dsh-tool-fs-search':
specifier: workspace:^
version: link:../../fs/tool-fs-search
- '@deepseek-ai/dsh-tool-session-query':
- specifier: workspace:^
- version: link:../../session-query/tool-session-query
'@deepseek-ai/dsh-tool-skill':
specifier: workspace:^
version: link:../../skill/tool-skill
diff --git a/scripts/gen-tool-catalog.ts b/scripts/gen-tool-catalog.ts
index 6c81aee2c6..3bbfd5b1ea 100644
--- a/scripts/gen-tool-catalog.ts
+++ b/scripts/gen-tool-catalog.ts
@@ -331,7 +331,7 @@ const TOOL_PACKAGES: ToolPackage[] = [
await ctx.plugin(ToolSessionQuery)
},
note:
- 'The five read-only tools hide provider cursors and authorize every result from the immutable calling agent session. Default ACP, TUI, and Web compositions enforce the declared search timeout and apply the generic tool-result spill policy.',
+ 'The five read-only tools hide provider cursors and authorize every result from the immutable calling agent session. The package is opt-in; compositions that need enforced deadlines or bounded inline output also mount the generic timeout or spill policies.',
},
{
pkg: '@deepseek-ai/dsh-tool-subagent',