New:Socket for Asana Is Now Available.Learn more
Get Started

dsh-tool-github

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

dsh-tool-github

Model-facing github_* tools over the dsh-github seam — search, issue/PR reads with tool-owned diff budgets, and approval-gated writes. This package owns schemas, validation, prompt guidance, and presentation, never providers or transport

latest
Source
npmnpm
Version
0.1.0
Version published
Weekly downloads
45
-37.5%
Maintainers
1
Weekly downloads
 
Created
Source

dsh-tool-github

English | 中文

The model-facing github_* tool suite over dsh-github (ctx.github). This package owns schemas, validation, prompt guidance, tool-layer budgets, and presentation — never providers, transport, or credentials.

ToolWhat it does
github_searchSearch issues / pull-requests / repositories / code (CLOSED kind union). Lean hits: owner/repo#N [state] title + URL.
github_issue_readTitle, state, labels, body, plus capped aggregated comments.
github_pr_readSplit into on-demand parts: metadata (default) / diff / comments / checks — one call never pays for data the model did not ask for.
github_issue_createWrite, approval-gated.
github_issue_commentWrite, approval-gated.
github_pr_createWrite, approval-gated, idempotent (an already-open PR for the same head/base is a normal answer, not an error).

Configuration

FieldDefaultSemantics
writetrueRegister the three write tools. Off = they are absent from the tool catalog entirely.
searchMaxResults8Cap on hits per search (search API rate budget is scarce: 30 req/min).
maxComments30Cap on returned conversation comments per read.
diffMaxFiles / diffMaxPatchChars50 / 60000Tool-owned diff budgets (ADR-0005): held here, passed to the seam, enforced there.
timeoutMs30000Cooperative timeout attached to every tool (dsh-timeout-policy enforces).

Approval flow (writes)

Every write returns ask from tools/pre-execute with a human-readable reason naming the target repo, title, and a body preview — exactly what the host's ApprovalPanel renders. The registry resolves the ask through the optional approval seam: allowed-once proceeds; rejection, cancellation, and an absent approval channel each materialize a distinct model-visible refusal result (never an exception), so the model can explain and continue. Read tools pass the gate untouched.

Presentation

presentCall / presentResult are pure and replay-safe: reads render as read/search cards, writes as edit cards; github_pr_create presents created: false as "PR #N already open". Result meta is narrowed defensively — malformed replay meta falls back to the generic card instead of throwing.

Errors the model can act on

Seam failures are translated at the tool boundary: rate limits become a wait-and-retry hint carrying retryAfterMs (and a nudge toward direct reads over search), auth failures name the fix (connect GitHub / set GITHUB_TOKEN), not-found points at the handle. Diff truncation is surfaced with a "narrow the scope" hint.

Model Experience

The model sees six tools with strict, small schemas; portable owner/repo + number handles that flow between search hits and reads; lean text renderings tuned for token spend; honest truncation markers with recovery hints; and write refusals phrased as answers. The system prompt section teaches the part-split PR read and the approval semantics up front.

FAQs

Package last updated on 14 Aug 2026

Related posts