ystyle/dsh-tool-terminal-search
A terminal search tool plugin for DeepSeek Harness (dsh): locate lines in large retained terminal scrollback by literal substring or regular expression, without paging backward blindly through tens of thousands of log lines.
이것은 DeepSeek Harness(DSH) 플러그인입니다. 이 사이트는 GitHub README, 설치 정보, 유지보수 상태, 공개 보안 시그널을 모아 보여줍니다.
업스트림에서 중국어 README를 제공하지 않아 저장소 원본 내용을 표시합니다.
dsh-tool-terminal-search
A terminal_search tool plugin for DeepSeek Harness (dsh): locate lines in large retained terminal scrollback by literal substring or regular expression, without paging backward blindly through tens of thousands of log lines.
The tool is composed only over the public ctx.terminals.read seam — no upstream package changes, so it runs on published dsh releases today.
Why
terminal_read pages retained scrollback by newest-relative offset/count. With backend log output running to tens of thousands of lines, a model cannot tell where the interesting lines are: it has to page backward from the newest output one page at a time, and totalLines alone does not locate a needle in the retained buffer. terminal_search closes that gap by finding lines by content.
Install
In your dsh profile directory (e.g. ~/.dsh/profiles/web), add the dependency and the patch entry:
npm install dsh-tool-terminal-search
# ~/.dsh/profiles/web/cordis.patch.yml
- insert:
- id: terminal
name: '@deepseek-ai/dsh-terminal'
- id: terminal-bash
name: '@deepseek-ai/dsh-terminal-bash'
- id: tool-terminal
name: '@deepseek-ai/dsh-tool-terminal'
- id: tool-terminal-search
name: 'dsh-tool-terminal-search'
Restart your dsh profile. The model gains terminal_search next to the official terminal_open / terminal_send / terminal_read tools.
Behavior
terminal_search(sessionId, pattern, regex?, offset?, limit?):
- Pages the whole retained scrollback (newest → oldest) through
terminal_readand matches each line. patternis a literal substring by default (grep-Fstyle) — no regex metacharacters to escape; passregex: trueto treat it as a JavaScript regular expression. Compiled regexes go through a process-wide bounded FIFO cache (oldest entries evicted first), so repeated patterns never recompile.- Returns matching lines newest first, each with a newest-relative
offsetthat is directly usable as aterminal_readoffset (jump to a match's context in one follow-up call). - Returns the exact
matchCount, the retainedtotalLines, andtruncated;offset/limitpage over matches. - Renders
[offset N] lineper match plus[search: X of Y matches, Z retained lines]; results are capped bymaxResultBytes(default262144).
Known limitations
- One search pages the bounded scrollback in memory (
scrollbackLines10 000 /scrollbackMaxBytes4 MiB by default), so it only sees retained lines — same contract asterminal_read. - A page whose bytes exceed the backend
maxReadBytesis reread with a smaller page size so line offsets stay exact; a single line larger thanmaxReadBytesdegrades to a truncated line and setstruncated. - No surrounding-context lines are returned; read around a match's offset for context.
- Requires dsh
0.1.0-rc.6(or a release whosedsh-terminal/dsh-toolskeep thereadcontract).
Development
npm install
npm run typecheck # tsc --noEmit
npm test # vitest
npm run build # esbuild bundle + tsc declarations into lib/
Relationship to upstream
An equivalent native implementation (same tool name, schema, and coordinate space) is tracked upstream in deepseek-harness discussion #1025. This plugin lets deployments use the capability today; switching to the native backend later is transparent.
보안 및 설치 증거
이 점수는 공개 저장소 메타데이터와 이 사이트에 등록된 설치 증거에만 기반하며, 코드 보안 감사와 다릅니다.
공개 플러그인 카탈로그에서 왔으며, 공개 GitHub 저장소로 연결됩니다.
저장소가 MIT 라이선스를 선언했습니다.
최근 180일 내 코드 업데이트가 있습니다.
재현 가능한 정확한 설치 메타데이터가 아직 등록되지 않았습니다. 저장소 설명에 따라 직접 확인하세요.
검사한 패키지 메타데이터에 설치 라이프사이클 스크립트가 선언되지 않았습니다.