mirror of
https://github.com/deepseek-ai/deepseek-harness
synced 2026-08-15 21:04:50 +00:00
Minimal Electron shell over the DSH JSON-RPC runtime — a first-look at what a ChatGPT.app-style host on top of the DeepSeek Harness looks like, with the harness's normally-invisible internals (trace timeline, context surface, subagent tree, compaction, plugin registry, rubrics) brought forward as first-class UI surfaces so plugin authors and researchers can see what the agent is actually doing. Runs against three keyless-to-live profiles (stdio-echo works on master out of the box; daemon-echo / daemon-vibe-echo activate once the daemon-demo lands; stdio-deepseek and daemon-vibe hit the real DeepSeek API when you supply a key). HARNESS_DEV auto-resolves to the in-repo runtime when this shell ships under examples/desktop/, so a fresh clone launches without config; env DSH_DEV_ROOT overrides for custom layouts, and a sibling deepseek-harness-dev/ checkout is the original dev workflow. Cold-clone gate (P0 fixes for first-time-clone usability): - HARNESS_DEV: 3-candidate resolver (env → walk-up in-repo marker → sibling), unit-tested via mock fs so ordering is locked without needing either real layout on disk. - config yml leaves rewritten at assemble time so the sibling-clone paths (../../deepseek-harness-dev/examples/echo-agent/…) become the in-repo paths (../../echo-agent/…) in the released tree — source yml stays usable for local dev, released tree ships a working shape. - pnpm-workspace.yaml allowBuilds.electron = true (was placeholder). - missing-key card in stdio-deepseek offers a one-click switch to stdio-echo (the keyless profile that works on master) rather than daemon-echo (blocked on the not-yet-shipped daemon-demo). - assemble-oss-release.sh rewrites the source-side breadcrumb name 'dsh-desktop-demo' → 'dsh-desktop' for the released package.json. FOUC guard on the onboarding gate (41fc5df carried) keeps the first-launch splash from flashing before the runtime probe finishes. Test suite (1634 tests in source, 3990 in the runtime repo) covers resolver ordering, renderer classifiers, trace timeline shape, compaction diff rendering, rubric parity, and the missing-key onboarding paths.
357 lines
7.9 KiB
JSON
357 lines
7.9 KiB
JSON
[
|
|
{
|
|
"type": "user/message",
|
|
"time": 1721300000050,
|
|
"data": {
|
|
"content": [
|
|
{
|
|
"type": "text",
|
|
"text": "Read the top-of-file comment in src/lib/main.ts and summarise it."
|
|
}
|
|
]
|
|
},
|
|
"seq": 401
|
|
},
|
|
{
|
|
"type": "step/start",
|
|
"time": 1721300000100,
|
|
"data": {
|
|
"turn": 3,
|
|
"step": 0
|
|
},
|
|
"seq": 402
|
|
},
|
|
{
|
|
"type": "request/header",
|
|
"time": 1721300000150,
|
|
"data": {
|
|
"header": {
|
|
"model": "deepseek-chat",
|
|
"system": "You are DeepSeek Harness, a research-oriented coding agent built on the microkernel + plugin runtime described in the Harness team docs. Follow the tool schemas verbatim; never invent tools. When code blocks appear, wrap them in fenced blocks with a language tag. Refuse to answer questions unrelated to the current repository unless the user explicitly waives that constraint via /off-topic. Cite line numbers for any file-based claim, and prefer to read before writing.",
|
|
"tools": [
|
|
{
|
|
"name": "read",
|
|
"description": "Read a file from the workspace. Returns raw bytes as UTF-8 text unless the extension marks it binary; truncated to 65536 bytes with a `[…truncated]` marker.",
|
|
"parameters": {
|
|
"type": "object",
|
|
"properties": {
|
|
"path": {
|
|
"type": "string",
|
|
"description": "Workspace-relative or absolute path"
|
|
}
|
|
},
|
|
"required": [
|
|
"path"
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"name": "edit",
|
|
"description": "Edit a file in place by exact string replacement. Fails if `old` occurs zero or more than one times; caller must widen the context.",
|
|
"parameters": {
|
|
"type": "object",
|
|
"properties": {
|
|
"path": {
|
|
"type": "string"
|
|
},
|
|
"old": {
|
|
"type": "string"
|
|
},
|
|
"new": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": [
|
|
"path",
|
|
"old",
|
|
"new"
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"name": "bash",
|
|
"description": "Run a shell command in the workspace root; stdout+stderr returned interleaved.",
|
|
"parameters": {
|
|
"type": "object",
|
|
"properties": {
|
|
"cmd": {
|
|
"type": "string"
|
|
},
|
|
"timeoutMs": {
|
|
"type": "number"
|
|
}
|
|
},
|
|
"required": [
|
|
"cmd"
|
|
]
|
|
}
|
|
}
|
|
],
|
|
"config": {
|
|
"temperature": 0.4,
|
|
"topP": 0.9,
|
|
"topK": 40,
|
|
"maxTokens": 4096,
|
|
"presencePenalty": 0.0,
|
|
"frequencyPenalty": 0.0,
|
|
"stopSequences": [
|
|
"</end>"
|
|
],
|
|
"seed": null
|
|
},
|
|
"messagePrefix": [
|
|
{
|
|
"role": "user",
|
|
"content": "Read the top-of-file comment in src/lib/main.ts and summarise it."
|
|
}
|
|
]
|
|
},
|
|
"reason": "step-start"
|
|
},
|
|
"seq": 403
|
|
},
|
|
{
|
|
"type": "hook/before-tool-call",
|
|
"time": 1721300000200,
|
|
"data": {
|
|
"hookName": "guard-tool-call",
|
|
"allowed": true
|
|
},
|
|
"seq": 404
|
|
},
|
|
{
|
|
"type": "assistant/chunk",
|
|
"time": 1721300000205,
|
|
"data": {
|
|
"chunk": {
|
|
"type": "text-delta",
|
|
"text": "I'll"
|
|
}
|
|
},
|
|
"seq": 405
|
|
},
|
|
{
|
|
"type": "assistant/chunk",
|
|
"time": 1721300000210,
|
|
"data": {
|
|
"chunk": {
|
|
"type": "text-delta",
|
|
"text": " read"
|
|
}
|
|
},
|
|
"seq": 406
|
|
},
|
|
{
|
|
"type": "assistant/chunk",
|
|
"time": 1721300000215,
|
|
"data": {
|
|
"chunk": {
|
|
"type": "text-delta",
|
|
"text": " the"
|
|
}
|
|
},
|
|
"seq": 407
|
|
},
|
|
{
|
|
"type": "assistant/chunk",
|
|
"time": 1721300000220,
|
|
"data": {
|
|
"chunk": {
|
|
"type": "text-delta",
|
|
"text": " file"
|
|
}
|
|
},
|
|
"seq": 408
|
|
},
|
|
{
|
|
"type": "assistant/chunk",
|
|
"time": 1721300000225,
|
|
"data": {
|
|
"chunk": {
|
|
"type": "text-delta",
|
|
"text": " and then"
|
|
}
|
|
},
|
|
"seq": 409
|
|
},
|
|
{
|
|
"type": "assistant/chunk",
|
|
"time": 1721300000230,
|
|
"data": {
|
|
"chunk": {
|
|
"type": "text-delta",
|
|
"text": " summarise"
|
|
}
|
|
},
|
|
"seq": 410
|
|
},
|
|
{
|
|
"type": "assistant/chunk",
|
|
"time": 1721300000235,
|
|
"data": {
|
|
"chunk": {
|
|
"type": "text-delta",
|
|
"text": " the top"
|
|
}
|
|
},
|
|
"seq": 411
|
|
},
|
|
{
|
|
"type": "assistant/chunk",
|
|
"time": 1721300000240,
|
|
"data": {
|
|
"chunk": {
|
|
"type": "text-delta",
|
|
"text": " comment"
|
|
}
|
|
},
|
|
"seq": 412
|
|
},
|
|
{
|
|
"type": "assistant/chunk",
|
|
"time": 1721300000245,
|
|
"data": {
|
|
"chunk": {
|
|
"type": "text-delta",
|
|
"text": "."
|
|
}
|
|
},
|
|
"seq": 413
|
|
},
|
|
{
|
|
"type": "tool/call",
|
|
"time": 1721300000295,
|
|
"data": {
|
|
"callId": "call_read_main_1",
|
|
"name": "read",
|
|
"arguments": "{\"path\": \"src/lib/main.ts\"}"
|
|
},
|
|
"seq": 414
|
|
},
|
|
{
|
|
"type": "tool/result",
|
|
"time": 1721300000345,
|
|
"data": {
|
|
"callId": "call_read_main_1",
|
|
"content": [
|
|
{
|
|
"type": "text",
|
|
"text": "// main.ts — cordis root, wires transports+session+agent-loop+plugins.\n// Entry point for the DeepSeek Harness runtime (…truncated 42 lines).\n"
|
|
}
|
|
],
|
|
"isError": false,
|
|
"meta": {
|
|
"card": "generic",
|
|
"durationMs": 88
|
|
}
|
|
},
|
|
"seq": 415
|
|
},
|
|
{
|
|
"type": "assistant/message",
|
|
"time": 1721300000395,
|
|
"data": {
|
|
"content": [
|
|
{
|
|
"type": "text",
|
|
"text": "The top comment says main.ts is the cordis root — it wires transports, session, agent-loop, and plugins together, and is the entry point for the DeepSeek Harness runtime."
|
|
}
|
|
],
|
|
"usage": {
|
|
"inputTokens": 842,
|
|
"outputTokens": 126,
|
|
"cacheReadTokens": 3120,
|
|
"cacheWriteTokens": 48,
|
|
"reasoningTokens": 0
|
|
}
|
|
},
|
|
"seq": 416
|
|
},
|
|
{
|
|
"type": "step/end",
|
|
"time": 1721300000445,
|
|
"data": {
|
|
"turn": 3,
|
|
"step": 0
|
|
},
|
|
"seq": 417
|
|
},
|
|
{
|
|
"type": "step/start",
|
|
"time": 1721300000495,
|
|
"data": {
|
|
"turn": 3,
|
|
"step": 1
|
|
},
|
|
"seq": 418
|
|
},
|
|
{
|
|
"type": "request/header-delta",
|
|
"time": 1721300000545,
|
|
"data": {
|
|
"delta": {
|
|
"messagePrefix": {
|
|
"append": [
|
|
{
|
|
"role": "assistant",
|
|
"content": "The top comment says main.ts is the cordis root — it wires transports, session, agent-loop, and plugins together, and is the entry point for the DeepSeek Harness runtime."
|
|
}
|
|
]
|
|
},
|
|
"config": {
|
|
"temperature": 0.2
|
|
}
|
|
},
|
|
"reason": "post-tool"
|
|
},
|
|
"seq": 419
|
|
},
|
|
{
|
|
"type": "assistant/chunk",
|
|
"time": 1721300000550,
|
|
"data": {
|
|
"chunk": {
|
|
"type": "text-delta",
|
|
"text": "Note: it is also the plugin"
|
|
}
|
|
},
|
|
"seq": 420
|
|
},
|
|
{
|
|
"type": "assistant/chunk",
|
|
"time": 1721300000555,
|
|
"data": {
|
|
"chunk": {
|
|
"type": "text-delta",
|
|
"text": " ecosystem's injection point."
|
|
}
|
|
},
|
|
"seq": 421
|
|
},
|
|
{
|
|
"type": "assistant/message",
|
|
"time": 1721300000605,
|
|
"data": {
|
|
"content": [
|
|
{
|
|
"type": "text",
|
|
"text": "Note: it is also the plugin ecosystem's injection point."
|
|
}
|
|
],
|
|
"usage": {
|
|
"inputTokens": 112,
|
|
"outputTokens": 22
|
|
}
|
|
},
|
|
"seq": 422
|
|
},
|
|
{
|
|
"type": "step/end",
|
|
"time": 1721300000655,
|
|
"data": {
|
|
"turn": 3,
|
|
"step": 1
|
|
},
|
|
"seq": 423
|
|
}
|
|
] |