deepseek-harness
deepseek-ai
DeepSeek Harness: Everything is a Plugin.
PROJECT TOPICS
INSTALL REFERENCE
dsh plugin --profile web add github:chenmzh/dsh-codex-reasoning-router
该命令指向仓库当前默认分支;尚无绑定当前 commit 的完整验证结果。
PROJECT README
简体中文 | English | AI / LLM context
DeepSeek Harness (
dsh) preset and plugin: GPT-5.6 Luna executes with the full Standard toolset; tool-less GPT-5.6 Sol supplies compact reasoning advice.
Luna owns action. Sol owns advice.
This DeepSeek Harness plugin keeps openai-codex / gpt-5.6-luna as the root execution agent and uses openai-codex / gpt-5.6-sol only for short, independent reasoning-advisor calls.
Sol is not a second coding agent. Sol never touches the workspace, never receives tools, never creates subagents, and never answers the user directly. Luna owns every tool, file change, test, skill, MCP call, subagent, permission decision, and final response.
Requirements:
dsh-codex >= 0.2.3, installed and authenticated;openai-codex/gpt-5.6-luna and openai-codex/gpt-5.6-sol;Install and authenticate the current dsh-codex first. Add this package to the profile as a dependency only; do not add it to dsh.profile.bundles. Then copy the shipped preset directory into DSH home:
pnpm dsh plugin --profile web add dsh-codex
pnpm --dir /path/to/.dsh/profiles/web add link:/absolute/path/to/dsh-codex-reasoning-router
cp -R /absolute/path/to/dsh-codex-reasoning-router/preset/luna-sol-reasoning-router /path/to/.dsh/.agent-presets/
Install directly from GitHub instead of a local checkout:
pnpm --dir /path/to/.dsh/profiles/web add github:chenmzh/dsh-codex-reasoning-router
cp -R /path/to/.dsh/profiles/web/node_modules/dsh-codex-reasoning-router/preset/luna-sol-reasoning-router /path/to/.dsh/.agent-presets/
For a published package, replace the link dependency with dsh-codex-reasoning-router and copy the same directory from its installed package. Restart DSH, then explicitly select Luna + Sol Reasoning Router for a new session. The existing default preset is not changed.
The preset is a complete copy of the official Standard composition, preserving its normal tools, Skills, MCP, compaction, and subagent surface. It adds only the Router row. The plugin also checks the effective durable session preset via the public resolveSessionPreset API; accidental global loading does not attach it to other presets.
DSH presets do not own the host model route. Select openai-codex / gpt-5.6-luna before using this preset. If a saved route differs, the plugin stops that session with a diagnostic and never silently switches the main model.
- id: reasoning-router
name: dsh-codex-reasoning-router
inject: [openAICodex]
config:
requiredPresetId: luna-sol-reasoning-router
lunaProvider: openai-codex
lunaModel: gpt-5.6-luna
solProvider: openai-codex
solModel: gpt-5.6-sol
initialSolReasoning: medium
escalatedSolReasoning: high
solAdviceMaxTokens: 2000
solTimeoutMs: 30000
initialConsultEnabled: true
failOpen: true
Both effort fields accept only medium or high and default to medium -> high. The narrow domain type and runtime guard reject xhigh and max. Startup checks the provider catalog and exact model metadata; a missing configured model is an error, not a fallback.
Confirm current IDs with the DSH model picker (/model) or the public LLM registry used by a diagnostic plugin:
await ctx.llm.listModels('openai-codex')
await ctx.llm.resolveModelInfo('openai-codex', 'gpt-5.6-luna')
await ctx.llm.resolveModelInfo('openai-codex', 'gpt-5.6-sol')
At implementation time, the installed pi-ai catalog contains gpt-5.6-luna and gpt-5.6-sol.
WAIT_FIRST_USER
-> SOL_INITIAL_MEDIUM
-> LUNA_EXECUTING
-> new blocker: SOL_MEDIUM -> LUNA_EXECUTING
-> same blocker, medium evaluated: SOL_HIGH -> LUNA_EXECUTING
-> same blocker again: ESCALATION_EXHAUSTED (no model call)
agent/pre-step is an awaited public waterfall. On a root session's first direct user message, the listener awaits Sol medium, creates a plugin-sourced user context containing only the Advisory Packet, and then returns kind: enter. Only after that does the agent loop log the step, assemble the prompt/tools, and make Luna's first request. Failure appends a warning event and returns the original messages when failOpen is enabled.
The later sol_consult tool has a fixed schema and is registered once in the root agent scope. Its second call for the same fingerprint requires medium_advice_evaluation; this prevents transport failure or an untried suggestion from being treated as grounds for high escalation.
Every Sol call is a hand-built ctx.llm.stream request with:
tools property;The response is consumed directly with BlockAssembler. It never enters the DSH agent loop or tool dispatcher. A returned tool-call block is a SolProtocolError; it is never executed. Only visible text becomes an Advisory Packet for Luna.
Internal calls run under an AsyncLocalStorage marker whose purpose is sol-advisory. The llm/stream hook checks this marker and delegates immediately. It does not infer internal calls from the model name. DSH rc.6 exposes only compaction | session-title in GenerateOptions.purpose, so a custom purpose is not forged into that public field.
Consultation results are append-only session events:
reasoning-router/initial-consultreasoning-router/consult-mediumreasoning-router/consult-highreasoning-router/consult-failedreasoning-router/escalation-exhaustedThe issue-state fold reads successful medium/high events from the durable log. A process-local map is not the source of truth. Failed network/provider calls log consult-failed but do not set mediumUsed or highUsed. Resume reconstructs the state; compaction may replace model-visible surface nodes but does not erase these log-only events. Only compact Advisory Packets—not private reasoning—are retained.
Fingerprints hash normalized goal, problem, and stable file/error/test anchors. Attempts, the question wording, timestamps, and random values are excluded.
The plugin uses the existing openai-codex adapter and credential lifecycle. It does not read OAuth files or tokens and does not call private ChatGPT endpoints. Sol one-shots intentionally omit sessionId; normal Luna turns remain owned by dsh-codex and retain their standard WebSocket context reuse and native/basic compaction behavior.
The Router is mounted only by the opt-in preset and adds one scoped system section and one scoped tool. It does not replace system prompt sections, contexts, the normal tool catalog, skills, MCP, subagent orchestration, compaction, permissions, or the agent loop. Subagents do not receive sol_consult from this plugin.
The event names above are visible in the session log, and concise secret-free info/warning messages report consultations. To exercise escalation:
initial-consult precedes the first Luna assistant chunk.sol_consult for a concrete blocker; confirm consult-medium.medium_advice_evaluation; confirm consult-high.escalation-exhausted and no provider request.Development checks:
pnpm install --offline
pnpm run typecheck
pnpm run test
pnpm run build
ctx.llm.listModels, resolveModelInfo, and streamagent/pre-step and agent/request waterfallsagent/created and agent/disposedctx.agents.roots() and agent-scoped agent.ctxresolveSessionPreset from @deepseek-ai/dsh-agent-presetsagent.ctx.systemPrompt.sectionagent.ctx.tools.register with defineToolSession.append, Session.events, and the extensible KNOWN_SESSION_EVENT_TYPEScreateUserMessage, BlockAssembler, and ReasoningEffortIdNo DSH private source, private runtime object, credential file, or undocumented backend endpoint is used.
CLASSIFICATION EVIDENCE
系统优先读取 GitHub Topics,再与站内分类词典和词根规则比对。当前命中: 无有效分类标签。