@perrylink/dsh-github 0.6.0 → 0.6.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.hi.md CHANGED
@@ -1,137 +1,98 @@
1
- <h1 align="center">dsh-github</h1>
2
-
3
- <p align="center">
4
- <b>GitHub को DeepSeek Harness में लाएँ।</b><br/>
5
- Pull request बनाएँ · inline या summary comments के साथ PR की समीक्षा करें · issues प्रबंधित करें · खोजें — हर write मानवीय approval से नियंत्रित, token कभी logged नहीं होता।
6
- </p>
7
-
8
- <p align="center">
9
- <a href="README.md">English</a> ·
10
- <a href="README.zh-CN.md">中文</a> ·
11
- <a href="README.es.md">Español</a> ·
12
- <a href="README.pt.md">Português</a> ·
13
- हिन्दी
14
- </p>
15
-
16
- <p align="center">
17
- <img src="https://img.shields.io/badge/license-Apache%202.0-blue.svg" alt="License: Apache 2.0">
18
- <img src="https://img.shields.io/badge/dsh-0.1.0--rc.6-4D6BFE" alt="dsh: 0.1.0-rc.6">
19
- <img src="https://img.shields.io/badge/dsh-dsh--plugin-4D6BFE" alt="dsh-plugin">
20
- <img src="https://img.shields.io/badge/node-%5E22.19%20%7C%7C%20%3E%3D24-brightgreen" alt="Node: ^22.19 || >=24">
21
- <img src="https://github.com/PerryLink/dsh-github/actions/workflows/ci.yml/badge.svg" alt="CI">
22
- <img src="https://img.shields.io/badge/documents-EN%2FZH%2FES%2FPT%2FHI-8257D0" alt="Documents: EN/ZH/ES/PT/HI">
23
- </p>
1
+ <div align="center">
24
2
 
25
- ---
3
+ # dsh-github
4
+
5
+ **DeepSeek Harness के लिए GitHub के PR, समीक्षाएँ, issues और CI — हर write मानवीय approval से नियंत्रित, token कभी logged नहीं होता।**
6
+
7
+ *एजेंट से GitHub पर बनाएँ, समीक्षा करें, merge करें और खोजें — CI composite action, polling review bot और status-check gate के साथ।*
8
+
9
+ [![License](https://img.shields.io/badge/license-Apache%202.0-blue.svg)](LICENSE)
10
+ [![DSH plugin](https://img.shields.io/badge/dsh-plugin-✅-green)](https://github.com/topics/dsh-plugin)
11
+ [![Node](https://img.shields.io/badge/node-%5E22.19%20%7C%7C%20%3E%3D24-brightgreen.svg)](#)
12
+ [![CI](https://img.shields.io/github/actions/workflow/status/PerryLink/dsh-github/ci.yml?branch=main&label=CI)](https://github.com/PerryLink/dsh-github/actions)
13
+ [![Version](https://img.shields.io/github/v/tag/PerryLink/dsh-github?label=version)](https://github.com/PerryLink/dsh-github/releases)
14
+ [![npm version](https://img.shields.io/npm/v/%40perrylink%2Fdsh-github)](https://www.npmjs.com/package/@perrylink/dsh-github)
15
+ [![npm downloads](https://img.shields.io/npm/dm/%40perrylink%2Fdsh-github)](https://www.npmjs.com/package/@perrylink/dsh-github)
26
16
 
27
- **dsh-github** [DeepSeek Harness](https://github.com/deepseek-ai/deepseek-harness) (`dsh`) के लिए एक bundle plugin है — जो "everything is a plugin" एजेंट harness है। यह dsh और [Claude Code](https://github.com/anthropics/claude-code) (`gh claude` / [claude-code-action](https://github.com/anthropics/claude-code-action)) तथा [Codex](https://github.com/openai/codex) (`@codex review` / Autofix CI) जैसे टूल्स के बीच की GitHub कमी को पूरा करता है: आपका एजेंट **PR पढ़ सकता है, PR की समीक्षा (review) कर सकता है, PR खोल सकता है, PRs को merge और update कर सकता है, repo metadata और files पढ़ सकता है, issues पर comment कर सकता है और उन्हें close कर सकता है, और खोज सकता है** — जबकि हर write को एक मानव अनुमोदित (approve) करता है और token गुप्त रहता है।
17
+ [English](README.md) · [简体中文](README.zh.md) · [Español](README.es.md) · [Português](README.pt.md) · [हिन्दी](README.hi.md)
28
18
 
29
- - 🛠 **12 टूल्स** — `pr_create` · `pr_merge` · `pr_update` · `gh_review` · `review_post` · `gh_issue` · `issue_open` · `issue_comment` · `issue_close` · `gh_search` · `gh_repo` · `gh_file`, सभी `defineTool` के ज़रिए canonical-JSON
30
- - ⌨️ **3 कमांड परिवार** — `/pr create` · `/review` (start/stop/post) · `/issue open`
31
- - 🔀 **पूरा PR lifecycle** — बनाएँ → समीक्षा करें → update करें (title/body/state/base branch) → merge करें (merge/squash/rebase, वैकल्पिक head-branch deletion)
32
- - 📝 **Inline reviews** — `review_post` एक summary comment या PR head commit के विरुद्ध line-anchored review comments प्रकाशित करता है
33
- - 🔒 **Approval-नियंत्रित writes** — हर GitHub write `ctx.approval` से होकर गुजरता है (डिफ़ॉल्ट `ask`, fail-closed); approval reasons titles, body sizes, और comment overrides की पूर्व-झलक देते हैं
34
- - 🗝 **Token गोपनीयता** — credentials seam → environment → `gh` CLI, प्रति operation resolved, कभी logs, events, renders, या errors में नहीं
35
- - ⏱ **Background review jobs** — `/review` `ctx.jobs` पर host के अपने `job_list` / `job_output` / `job_kill` surface के साथ चलता है, और findings के साथ CI status और comment counts भी रिपोर्ट करता है
36
- - 🤖 **Model review option** — `reviewMode: "model"` capped diff को host के `subagents` seam के ज़रिए एक one-shot subagent को सौंपता है; डिफ़ॉल्ट `static` mode deterministic और token-free रहता है
37
- - 🚦 **429 backoff + quota surfacing** — model हर result पर (failures सहित) शेष rate limit देखता है; per-section fetch errors छिपाए जाने के बजाय दिखाए जाते हैं
38
- - 🌐 **5-भाषा docs** — English · 中文 · Español · Português · हिन्दी
19
+ </div>
39
20
 
40
21
  ---
41
22
 
42
23
  ## 📚 विषय-सूची
43
24
 
44
- - [त्वरित शुरुआत](#🚀-त्वरित-शुरुआत)
45
- - [विशेषताएँ](#✨-विशेषताएँ)
46
- - [स्थापना](#📦-स्थापना)
47
- - [कॉन्फ़िगरेशन](#⚙️-कॉन्फ़िगरेशन)
48
- - [टूल्स](#🛠-टूल्स)
49
- - [कमांड](#⌨️-कमांड)
50
- - [आर्किटेक्चर](#🏗-आर्किटेक्चर)
51
- - [सुरक्षा सीमाएँ](#🔒-सुरक्षा-सीमाएँ)
52
- - [ज्ञात सीमाएँ](#⚠️-ज्ञात-सीमाएँ)
53
- - [विकास](#🧪-विकास)
54
- - [रिपॉज़िटरी संरचना](#🗂-रिपॉज़िटरी-संरचना)
55
- - [विषय](#🏷-विषय)
25
+ - [अनुकूलता](#अनुकूलता)
26
+ - [आपको क्या मिलता है](#आपको-क्या-मिलता-है)
27
+ - [त्वरित शुरुआत](#त्वरित-शुरुआत)
28
+ - [स्थापना और अनइंस्टॉल](#स्थापना-और-अनइंस्टॉल)
29
+ - [कॉन्फ़िगरेशन](#कॉन्फ़िगरेशन)
30
+ - [टूल्स और सतहें](#टूल्स-और-सतहें)
31
+ - [आर्किटेक्चर](#आर्किटेक्चर)
32
+ - [अनुमतियाँ और डेटा](#अनुमतियाँ-और-डेटा)
33
+ - [सुरक्षा सीमाएँ](#सुरक्षा-सीमाएँ)
34
+ - [ज्ञात सीमाएँ](#ज्ञात-सीमाएँ)
35
+ - [विकास](#विकास)
36
+ - [रिपॉज़िटरी संरचना](#रिपॉज़िटरी-संरचना)
37
+ - [विषय](#विषय)
38
+ - [योगदानकर्ता](#योगदानकर्ता)
39
+ - [PerryLink DSH प्लगइन परिवार](#perrylink-dsh-प्लगइन-परिवार)
56
40
  - [लाइसेंस](#लाइसेंस)
57
41
 
58
- ## 🚀 त्वरित शुरुआत
42
+ ## अनुकूलता
59
43
 
60
- ```sh
61
- # 1. install (npm registry — सबसे सरल; या नीचे दिया गया tarball channel इस्तेमाल करें)
62
- dsh plugin --profile <name> add @perrylink/dsh-github
63
- # tarball channel (registry की ज़रूरत नहीं):
64
- # pnpm pack → dsh-github-<version>.tgz
65
- # dsh plugin --profile <name> add ./dsh-github-<version>.tgz
66
-
67
- # 2. configure a GitHub token (recommended: the credentials seam)
68
- # $DSH_HOME/.credentials.yaml
69
- # GITHUB_TOKEN: <your token>
70
-
71
- # 3. use it — in the dsh web UI or headless
72
- # /pr create "add dark mode" → agent drafts & opens the PR (approval required)
73
- # /review 42 → background review job, read it with job_output
74
- # /review post github-review-1 → publish the review comment (approval required)
75
- # /issue open "crash on startup" → agent opens the issue (approval required)
76
- ```
44
+ | सतह | स्थिति |
45
+ |---|---|
46
+ | Harness | DeepSeek Harness `0.1.0-rc.6` (`0.1.0-rc.5`–`0.1.0-rc.6` के लिए compat घोषित) |
47
+ | Node | `^22.19.0 \|\| >=24.0.0` |
48
+ | Platforms | सभी (host plugin; GitHub की ओर outbound network) |
49
+ | Model | कोई भी (static review deterministic है; `reviewMode: "model"` वैकल्पिक है) |
77
50
 
78
- सत्यापन: `dsh --profile <name> --dump-config` में `# == dsh-github` सेक्शन **बिना किसी FAILED लाइन के** दिखना चाहिए।
51
+ ## आपको क्या मिलता है
79
52
 
80
- ## ✨ विशेषताएँ
53
+ `dsh-github` `dsh` और Claude Code व Codex जैसे टूल्स के बीच की GitHub कमी को पूरा करता है: आपका एजेंट pull requests पढ़, समीक्षा (review), खोल, update और merge कर सकता है, repository metadata और files पढ़ सकता है, issues पर comment और close कर सकता है, और खोज सकता है — जबकि हर write को एक मानव अनुमोदित (approve) करता है और token गुप्त रहता है।
81
54
 
82
- | क्षेत्र | आपको क्या मिलता है |
83
- |---|---|
84
- | **PR बनाएँ** | `/pr create [title]` git स्थिति (branch, changed files, commits ahead) पढ़ता है और एजेंट को एक draft देता है; `pr_create` PR खोलता है और उसका URL लौटाता है |
85
- | **PR update करें** | `pr_update` title, body, state, या base branch को संपादित करता है — हर दूसरे write की तरह approval-नियंत्रित |
86
- | **PR merge करें** | `pr_merge` `merge`/`squash`/`rebase` से merge करता है, वैकल्पिक commit title/message और merge के बाद head-branch deletion |
87
- | **PR की समीक्षा करें** | `gh_review` metadata, capped diff (canonical value में पूरा text, render में bounded excerpt), comments, CI status, और static findings का सारांश देता है — per-section fetch failures `diff.error` / `comments.error` / `ci.error` के रूप में रिपोर्ट होते हैं |
88
- | **समीक्षाएँ पोस्ट करें** | `review_post` एक aggregated issue-level comment (`mode: "summary"`, डिफ़ॉल्ट) या PR head commit पर line-anchored review comments (`mode: "inline"`) प्रकाशित करता है; एक `body` override model को पहले comment को निखारने देता है — मानवीय approval के बाद |
89
- | **Background reviews** | `/review <pr>` एक `ctx.jobs` job में metadata, capped diff, CI checks, और existing comments fetch करता है; completion output findings summary, CI status, और comment count लेकर आता है; `reviewMode: "model"` static analyzer के बजाय diff को एक one-shot subagent को सौंपता है |
90
- | **Repos पढ़ें** | `gh_repo` repository metadata पढ़ता है: description, default branch, visibility, stars, forks, open issues, language, license, topics |
91
- | **Files पढ़ें** | `gh_file` किसी branch/tag/commit पर एक file पढ़ता है, base64 decoding और configurable cap के साथ; directories एक structured error लौटाती हैं |
92
- | **Issues पढ़ें** | `gh_issue` lists / gets / comments करता है; listings में pull requests `kind: "pr"` के रूप में marked होते हैं |
93
- | **Issues प्रबंधित करें** | `issue_open` बनाता है, `issue_comment` comment करता है (PRs पर भी काम करता है), `issue_close` एक optional state reason के साथ close करता है — सभी approval-नियंत्रित |
94
- | **खोजें** | `gh_search` GitHub search syntax से issues और pull requests को query करता है, अलग search quota दिखाता है |
95
- | **Approval** | `tools/pre-execute` हर write के लिए `ctx.approval` पूछता है; `allowedActions` whitelist prompting से पहले ही अस्वीकार कर देता है |
96
- | **गोपनीयता सुरक्षा** | Token प्रति operation पढ़ा जाता है और केवल Authorization header में भेजा जाता है; एक समर्पित test पुष्टि करता है कि यह किसी भी दृश्य output में कभी नहीं आता |
97
- | **लचीलापन** | `Retry-After`/`x-ratelimit-reset` backoff के साथ 429 retry; read tools concurrency-safe हैं; सभी calls cancellation का सम्मान करते हैं |
98
- | **अवलोकन-क्षमता** | Model-visible ⇔ logged: model जो कुछ देखता है वह सब host के अपने session events (`tool/result`, `user/message`, `command/run`, `approval/asked`…) से होकर गुजरता है |
99
-
100
- ## 📦 स्थापना
101
-
102
- चार दस्तावेज़ित channels — कोई एक चुनें।
103
-
104
- | चैनल | कमांड | नोट्स |
105
- |---|---|---|
106
- | **npm registry** | `dsh plugin --profile <name> add @perrylink/dsh-github` | npm पर प्रकाशित — सबसे सरल channel |
107
- | **npm tarball** | `dsh plugin --profile <name> add ./dsh-github-<version>.tgz` | built `lib/` के साथ आता है — कोई build permission आवश्यक नहीं |
108
- | **git source** | `dsh plugin --profile <name> add "github:PerryLink/dsh-github#<sha>"` | `prepare` + `allowBuilds` चाहिए (नीचे देखें); commit को pin करें |
109
- | **local link** | `pnpm link --dir .` then `dsh plugin add @perrylink/dsh-github` | विकास |
55
+ - **12 टूल्स** — `pr_create`, `pr_merge`, `pr_update`, `gh_review`, `review_post`, `gh_issue`, `issue_open`, `issue_comment`, `issue_close`, `gh_search`, `gh_repo`, `gh_file`, सभी `defineTool` के ज़रिए canonical JSON।
56
+ - **3 कमांड परिवार** — `/pr create`, `/review` (start/stop/post), `/issue open`।
57
+ - **पूरा PR lifecycle** — बनाएँ → समीक्षा करें → update करें (title/body/state/base) → merge करें (merge/squash/rebase, वैकल्पिक head-branch deletion)।
58
+ - **Inline reviews** — `review_post` PR head commit के विरुद्ध एक summary comment या line-anchored review comments प्रकाशित करता है।
59
+ - **Approval-नियंत्रित writes** — हर GitHub write `ctx.approval` से होकर गुजरता है (डिफ़ॉल्ट `ask`, fail-closed); approval reasons titles, body sizes और comment overrides की पूर्व-झलक देते हैं।
60
+ - **Token गोपनीयता** — credentials seam → environment → `gh` CLI, प्रति operation resolved, कभी logs, events, renders या errors में नहीं।
61
+ - **Background review jobs** — `/review` `ctx.jobs` पर host के अपने `job_list` / `job_output` / `job_kill` surface के साथ चलता है।
62
+ - **लचीलापन** — `Retry-After`/`x-ratelimit-reset` backoff के साथ 429 retry; read tools concurrency-safe हैं; सभी calls cancellation का सम्मान करते हैं।
63
+ - **CI surface** — one-shot `ci_run` tool, एक polling review bot और एक status-check gate (composite action `action.yml`)।
110
64
 
111
- > npm package `@perrylink` scope के अंतर्गत प्रकाशित है क्योंकि unscoped `dsh-github` नाम registry पर किसी असंबंधित project के पास है। Plugin का module नाम `dsh-github` ही रहता है।
65
+ ## त्वरित शुरुआत
66
+
67
+ ```sh
68
+ # 1. bundle को अपने profile में इंस्टॉल करें
69
+ dsh plugin --profile web add "github:PerryLink/dsh-github#main"
112
70
 
113
- Git इंस्टॉल: pnpm ≥10 किसी git dependency के `prepare` को तब तक अस्वीकार करता है जब तक allowlisted न हो — `dsh` सटीक key प्रिंट करता है; उसे profile के `pnpm-workspace.yaml` में कॉपी करें:
71
+ # या npm से (प्रकाशित रिलीज़)
72
+ dsh plugin --profile web add @perrylink/dsh-github
114
73
 
115
- ```yaml
116
- allowBuilds:
117
- '@perrylink/dsh-github': true
74
+ # 2. पुनः आरंभ करें और row को सत्यापित करें
75
+ dsh --profile web --dump-config | grep -A3 'id: dsh-github'
118
76
  ```
119
77
 
120
- `prepare` script (`scripts/prepare.mjs`) स्व-निहित (self-contained) है: जब कोई compiler उपलब्ध हो तो यह TypeScript से build करता है, अन्यथा **committed `lib/` artifacts** पर fallback करता है, और दोनों के अभाव में loud रूप से fail होता है।
78
+ ## स्थापना और अनइंस्टॉल
121
79
 
122
- **अनइंस्टॉल:** `dsh plugin --profile <name> remove @perrylink/dsh-github`।
80
+ - **git channel** (नवीनतम `main`): `dsh plugin --profile web add "github:PerryLink/dsh-github#main"` — `prepare` script केवल production dependencies के साथ build करता है।
81
+ - **npm channel** (प्रकाशित रिलीज़): `dsh plugin --profile web add @perrylink/dsh-github`।
82
+ - **tarball channel**: इस repo में `pnpm pack` चलाएँ, फिर `dsh plugin --profile web add ./dsh-github-<version>.tgz`।
83
+ - **अनइंस्टॉल**: `dsh plugin --profile web remove dsh-github` (या profile patch से row हटाएँ)।
123
84
 
124
- ## ⚙️ कॉन्फ़िगरेशन
85
+ ## कॉन्फ़िगरेशन
125
86
 
126
- Load time पर Schemastery-सत्यापित (fail loud)। Profile के `cordis.patch.yml` में कोई भी key override करें (पूरी row config बदल दी जाती है, कभी deep-merged नहीं होती)।
87
+ सभी tunables Schemastery `Config` fields हैं (cordis.yml से बदले जा सकते हैं)। एक id-लक्षित override पूरी row को बदल देता है — जो key आपको चाहिए उसे दोबारा लिखें। `cordis.patch.yml` हर key को inline दस्तावेज़ित करता है।
127
88
 
128
89
  | कुंजी | डिफ़ॉल्ट | अर्थ |
129
90
  |---|---|---|
130
91
  | `tokenSource` | `auto` | `auto` (credentials → env → gh) या `credentials` / `env` / `gh` में से कोई एक |
131
92
  | `tokenRef` | `GITHUB_TOKEN` | Credential-seam reference / environment-variable नाम |
132
- | `defaultOwnerRepo` | — | जब कोई call `owner/repo` नाम न दे और git के पास कोई origin न हो तो Fallback `owner/repo` |
93
+ | `defaultOwnerRepo` | — | जब कोई call कोई नाम न दे और git के पास कोई origin न हो तो Fallback `owner/repo` |
133
94
  | `autoCommit` | `false` | क्या `/pr create` model को पहले commit+push करने का निर्देश दे सकता है |
134
- | `maxDiffChars` | `8000` | reviews में पढ़े जाने वाले PR diffs की character सीमा (cap) |
95
+ | `maxDiffChars` | `8000` | reviews में पढ़े जाने वाले PR diffs की character सीमा |
135
96
  | `renderExcerptChars` | `2000` | tool output में render किए जाने वाले diff excerpt की character सीमा |
136
97
  | `maxComments` | `20` | `gh_review` द्वारा सूचीबद्ध PR comments की सीमा |
137
98
  | `reviewJobTimeoutMs` | `600000` | एक background review job की समय-सीमा (`timeout` के साथ fail होता है) |
@@ -148,99 +109,73 @@ Load time पर Schemastery-सत्यापित (fail loud)। Profile क
148
109
  | `apiBaseUrl` | `https://api.github.com` | GitHub REST base URL (GitHub Enterprise) |
149
110
  | `allowedActions` | `['pr.create','pr.merge','pr.update','review.post','issue.create','issue.comment','issue.close','ci.run']` | Write-action whitelist; बाकी सब approval से पहले अस्वीकार |
150
111
  | `workspaceDir` | process cwd | read-only git inspection के लिए working directory |
151
- | `ci` | `{ enabled: false, … }` | CI integration section: polling review bot, status-check gate, और one-shot `ci_run` tool (सभी `ci.*` keys इसी में हैं) |
152
-
153
- ## 🛠 टूल्स
154
-
155
- | टूल | प्रकार | पैरामीटर | लौटाता है |
156
- |---|---|---|---|
157
- | `pr_create` | write | `title*`, `body?`, `base?`, `head?`, `draft?`, `ownerRepo?` | `{status:'created', url, number, title, state, draft, base, head, rateLimit}` या structured error |
158
- | `pr_merge` | write | `pr*` (number / `#n` / `o/r#n` / URL), `mergeMethod?`, `commitTitle?`, `commitMessage?`, `deleteBranch?` | `{status:'merged', merged, sha?, message, url, branchDeleted, branchDeleteNote?, rateLimit}` या structured error |
159
- | `pr_update` | write | `pr*` (number / `#n` / `o/r#n` / URL), `title?`, `body?`, `state?` (`open`/`closed`), `base?` | `{status:'updated', url, number, title, state, base, rateLimit}` या structured error |
160
- | `gh_review` | read | `pr*` (number / `#n` / `o/r#n` / URL), `fields?`, `maxDiffChars?` | metadata, capped diff (पूरा `diff.text` + bounded `diff.excerpt` + per-file stats), comments, CI, static findings, per-section `error` fields, rate limit |
161
- | `gh_repo` | read | `ownerRepo?` | `{repo, description, defaultBranch, visibility, stars, forks, openIssues, language, license, topics, url, updatedAt, rateLimit}` या structured error |
162
- | `gh_file` | read | `ownerRepo?`, `path*`, `ref?`, `maxChars?` | `{repo, path, ref, size, truncated, content, sha, url, rateLimit}` या structured error |
163
- | `gh_issue` | read | `action*` (`list`/`get`/`comments`), `ownerRepo?`, `issueNumber?`, `state?`, `limit?` | normalized items (हर एक `kind: issue/pr/comment` marked) + rate limit |
164
- | `review_post` | write | `jobId*`, `mode?` (`summary`/`inline`), `body?` | `{status:'posted', mode, url, commentId?, reviewId?, findings, rateLimit}` या structured error |
165
- | `issue_open` | write | `title*`, `body?`, `labels?`, `ownerRepo?` | `{status:'created', url, number, title, rateLimit}` या structured error |
166
- | `issue_comment` | write | `issueNumber*`, `body*`, `ownerRepo?` | `{status:'commented', url, commentId, issueNumber, rateLimit}` या structured error |
167
- | `issue_close` | write | `issueNumber*`, `ownerRepo?`, `stateReason?` (`completed`/`not_planned`) | `{status:'closed', url, number, title, rateLimit}` या structured error |
168
- | `gh_search` | read | `q*`, `sort?`, `order?`, `perPage?` | `{query, total, items[{number,title,state,kind,author,url,repo,comments,createdAt}], rateLimit}` या structured error |
169
-
170
- `execute` केवल `output.schema` द्वारा घोषित canonical JSON लौटाता है। Missing-token और GitHub-API failures structured error variants हैं जो rate-limit facts रखते हैं; infrastructure failures throw करते हैं (→ `isError`)। `exec.signal` का हर जगह सम्मान किया जाता है।
171
-
172
- ## ⌨️ कमांड
173
-
174
- | कमांड | प्रभाव |
175
- |---|---|
176
- | `/pr create [title]` | git स्थिति पढ़ता है और model के लिए एक `pr_create` instruction queue करता है (draft body, defaults, `autoCommit` न हो तो कोई commit/push नहीं)। PR बनाने पर approval माँगा जाता है। |
177
- | `/review <pr>` | एक background review job शुरू करता है; job id प्रिंट करता है। पूर्णता की घोषणा host करता है; उसे `job_output` से पढ़ें। |
178
- | `/review <pr> --max-diff <n> --no-ci --no-comments` | Per-job overrides: diff cap और job कौन-से supplementary sections fetch करता है। |
179
- | `/review stop <jobId>` | job रद्द करता है (local control, कोई GitHub write नहीं)। |
180
- | `/review post <jobId>` | model के लिए एक `review_post` instruction queue करता है (summary या inline); पोस्ट करने पर approval माँगा जाता है। |
181
- | `/issue open <title>` | model के लिए एक `issue_open` instruction queue करता है; बनाने पर approval माँगा जाता है। |
112
+ | `ci` | `{ enabled: false, … }` | CI integration section: polling review bot, status-check gate और one-shot `ci_run` tool (सभी `ci.*` keys इसी में हैं) |
182
113
 
183
- ## 🏗 आर्किटेक्चर
114
+ ## टूल्स और सतहें
184
115
 
185
- ```
186
- ┌───────────────────────────────────────────────┐
187
- │ dsh-github │
188
- │ │
189
- मानव ─── /pr ────┼──► git reader (read-only) ──► agent.followup │
190
- /review ───┼──► ctx.jobs.start("github-review") ──► job │
191
- /issue ────┼──► agent.followup │
192
- │ │
193
- मॉडल ─── pr_create / pr_merge / pr_update / gh_review / │
194
- review_post / gh_issue / issue_open / issue_comment / │
195
- issue_close / gh_search / gh_repo / gh_file │
196
- (defineTool, canonical JSON only) │
197
- │ │
198
- └───────┬───────────────┬───────────────┬───────┘
199
- │ │ │
200
- tools/pre-execute credential GitHub REST
201
- approval gate resolution client (fetch,
202
- (ask | deny) (seam → env → 429 retry,
203
- gh CLI, per-op) rate-limit)
204
- ```
205
-
206
- - **Credential seam.** `tokenSource: auto` प्रति operation क्रम में resolve करता है: credentials seam (`GITHUB_TOKEN` reference) → environment variable → `gh` CLI token। यह मान एक local variable है जो REST client को दिया जाता है; यह कभी canonical values, renders, cards, command outputs, injected notices, job output, approval reasons, या error messages में नहीं जाता।
207
- - **Approval.** सभी writes model tools से होकर गुजरते हैं। एक `tools/pre-execute` waterfall listener सात write tools के लिए `ask` लौटाता है, इसलिए registry `ctx.approval` के ज़रिए मानव से पूछता है (host `approval/asked` + `approval/decided` audit pair log करता है) और बिना answerer के fail closed हो जाता है। Approval reasons यह पूर्व-झलक देते हैं कि क्या प्रकाशित होगा (titles, body sizes, merge methods, और overridden review body की पहली line)। Commands कभी सीधे write नहीं करते: command handlers बिना किसी open turn के चलते हैं, इसलिए approval seam उनके लिए संरचनात्मक रूप से बंद है — एक write command read-only context इकट्ठा करता है, फिर एजेंट को जगाता है (idle होने पर `followup`, busy होने पर `inject`) ताकि model gated tool को एक turn के भीतर चलाए।
208
- - **Background review.** `/review <pr>` `ctx.jobs` पर एक `github-review` job शुरू करता है (label, owner, timeout, cancelable)। Job प्रति operation token resolve करता है, PR metadata fetch करता है (inline posting के लिए head-commit SHA कैप्चर करते हुए), capped diff, और — जब तक disabled न हो — CI check runs और existing review comments, फिर एक deterministic multi-file analyzer चलाता है (`src/review.ts`: hardcoded secrets, Google API keys, credential assignments, debug artifacts, eval, TODO markers, long lines, oversized changes) — शून्य tokens खर्च, पूर्णतः testable। `reviewMode: "model"` होने पर, job इसके बजाय capped diff को host के `subagents` seam के ज़रिए एक one-shot subagent को सौंपता है (owning agent parent होता है) और child के Markdown output को postable report के रूप में store करता है; seam या provider अनुपस्थित होने पर fail loud होता है। Supplementary fetch failures output में नोट किए जाते हैं बिना job को fail किए। Completion notices शुरू करने वाले session तक host के `dsh-tool-jobs` consumer के ज़रिए पहुँचते हैं; model रिपोर्ट को मौजूदा `job_output` tool से पढ़ता है और उसे `review_post` से प्रकाशित करता है — approval आवश्यक।
209
- - **Model-visible ⇔ logged.** Plugin **कोई custom session event types नहीं** जोड़ता। Out-of-repo event types host के `KNOWN_SESSION_EVENT_TYPES` में नहीं हैं, इसलिए एक unknown required event plugin हटाने के बाद session log को अपठनीय बना देता (host जानबूझकर external plugins के लिए registration surface को defer करता है)। इसलिए सारा model-visible content host-logged surfaces से होकर बहता है: `tool/result` canonical values, `agent.inject`/`agent.followup` के ज़रिए `user/message` notices, `command/run` + `command/done` lifecycle pair, और `approval/asked` + `approval/decided` audit pair।
210
- - **Pure presenters.** `presentCall`/`presentResult` `args` (+ persisted `result.meta`) के pure functions हैं, जो live streaming और log replay पर समान रहते हैं। PR creation PR URL के साथ एक generic card दिखाता है।
211
-
212
- ## 🔒 सुरक्षा सीमाएँ
213
-
214
- - Token प्रति operation configured source (credentials seam, environment, या `gh` CLI) से पढ़ा जाता है और केवल REST client के Authorization header में भेजा जाता है। यह कभी logged, कभी rendered, कभी injected, कभी session log में appended, और कभी error messages में नहीं आता।
215
- - हर GitHub write के लिए `ctx.approval` से `allowed-once` आवश्यक है (default policy `ask`); `rejected`, `cancelled`, और `unavailable` सभी fail closed होते हैं।
216
- - `/pr create` कभी खुद commit या push नहीं करता; `autoCommit: true` के साथ model वे writes bash tool के अपने approval gate से करता है। dsh-github git identity (dsh-git-identity का काम) या worktrees (dsh-worktree का काम) का प्रबंधन **नहीं** करता।
217
- - Review job कोई write नहीं करता: यह एक diff पढ़ता है और रिपोर्ट को process memory में रखता है; केवल `review_post` approval के बाद प्रकाशित करता है।
218
- - Posted comments diff से लिए गए file names को interpolate करते हैं, जो untrusted repository content हैं: `formatPostBody` file names को backtick-escape और HTML-escape करता है ताकि कोई hostile PR review comment में Markdown inject न कर सके।
219
- - `gh_file` द्वारा पढ़े गए file contents और GitHub से पढ़े गए issue/PR bodies, comments, और search results external untrusted content हैं जो model context में प्रवेश करते हैं — web fetching जैसा ही inherent tradeoff; plugin उन्हें अपने renders में external content के रूप में mark करता है।
220
- - Rate limits: 429s को backoff के साथ retry किया जाता है और शेष quota हर result पर (failures सहित) model को दिखाया जाता है।
221
-
222
- ## ⚠️ ज्ञात सीमाएँ
116
+ | सतह | प्रकार | नोट्स |
117
+ |---|---|---|
118
+ | `pr_create` | tool | एक pull request बनाता है (write; approval-नियंत्रित) |
119
+ | `pr_merge` | tool | एक PR merge करता है (merge/squash/rebase, वैकल्पिक head-branch deletion) |
120
+ | `pr_update` | tool | एक PR update करता है (title/body/state/base) |
121
+ | `gh_review` | tool | एक PR पढ़ता है: metadata, capped diff, comments, CI, static findings |
122
+ | `review_post` | tool | एक review comment प्रकाशित करता है (summary या line-anchored inline) |
123
+ | `gh_issue` | tool | issues को list / get / comment करता है (PRs `kind: "pr"` marked) |
124
+ | `issue_open` | tool | एक issue बनाता है |
125
+ | `issue_comment` | tool | किसी issue या PR पर comment करता है |
126
+ | `issue_close` | tool | एक issue close करता है (वैकल्पिक state reason) |
127
+ | `gh_search` | tool | issues और PRs खोजता है (अलग search quota) |
128
+ | `gh_repo` | tool | repository metadata पढ़ता है |
129
+ | `gh_file` | tool | किसी branch/tag/commit पर एक file पढ़ता है |
130
+ | `/pr create` | command | git स्थिति पढ़ता है और एक `pr_create` instruction queue करता है |
131
+ | `/review` | command | एक background review job start / stop / post करता है |
132
+ | `/issue open` | command | एक `issue_open` instruction queue करता है |
133
+ | `ci_run` | tool | composite action / CI driver द्वारा चलाई गई one-shot CI review |
134
+ | review bot | surface | idempotent inline comments वाला polling review bot (`ci.*`) |
135
+ | status-check gate | surface | PR head commit के हिसाब से `success` / `needs-changes` verdict प्रकाशित करता है (`action.yml`) |
136
+
137
+ ## आर्किटेक्चर
138
+
139
+ - **Credential seam.** `tokenSource: auto` प्रति operation क्रम में resolve करता है: credentials seam (`GITHUB_TOKEN` reference) → environment variable → `gh` CLI token। यह मान एक local variable है जो REST client को दिया जाता है; यह कभी canonical values, renders, cards, command outputs, injected notices, job output, approval reasons या error messages में नहीं जाता।
140
+ - **Approval gate.** सभी writes model tools से होकर गुजरते हैं। एक `tools/pre-execute` waterfall listener write tools के लिए `ask` लौटाता है, इसलिए registry `ctx.approval` के ज़रिए मानव से पूछता है (host `approval/asked` + `approval/decided` audit pair log करता है) और बिना answerer के fail closed हो जाता है। Commands कभी सीधे write नहीं करते: एक write command read-only context इकट्ठा करता है, फिर एजेंट को जगाता है ताकि model gated tool को एक turn के भीतर चलाए।
141
+ - **Background review job.** `/review <pr>` `ctx.jobs` पर एक `github-review` job शुरू करता है; job metadata fetch करता है (inline posting के लिए head-commit SHA कैप्चर करते हुए), capped diff, CI checks और existing comments, फिर deterministic multi-file analyzer चलाता है (`src/review.ts`)। `reviewMode: "model"` होने पर, job capped diff को host के `subagents` seam के ज़रिए एक one-shot subagent को सौंपता है। Completion host के `dsh-tool-jobs` consumer के ज़रिए session तक पहुँचती है; model उसे `job_output` से पढ़ता है और `review_post` से प्रकाशित करता है।
142
+ - **CI composite action / review bot / status-check gate.** Repo में एक composite action (`action.yml`) शामिल है जो PRs की समीक्षा करती है, CI ठीक करती है और report लिखती है; एक polling review bot idempotent inline comments प्रकाशित करता है; और एक status-check gate PR head commit के हिसाब से verdict प्रकाशित करता है। One-shot `ci_run` tool headless run चलाता है। हर write approval-gated रहता है।
143
+
144
+ ## अनुमतियाँ और डेटा
145
+
146
+ - **अनुमतियाँ**: writes official approval seam पर चलते हैं; कुछ भी re-implement या bypass नहीं किया जाता। Plugin अपने workshop manifest में `network:outbound` और `filesystem:write` घोषित करता है।
147
+ - **डेटा**: review report process memory में job id के आधार पर रहता है; disk पर कुछ भी durable नहीं लिखा जाता।
148
+ - **Session log**: plugin कोई custom session event types नहीं जोड़ता; सारा model-visible content host-logged surfaces से होकर बहता है (`tool/result`, `user/message`, `command/run`, `approval/asked`…)।
149
+
150
+ ## सुरक्षा सीमाएँ
151
+
152
+ - **Approval, enforcement नहीं।** Writes official seam पर केवल `ask`/deny decisions उत्पन्न करते हैं; sandbox और approval systems ही enforcement authorities रहते हैं।
153
+ - **Fail closed।** Approval answerer अनुपस्थित होने पर सबसे सख्त decision पर degrade होता है — कभी silent pass-through नहीं।
154
+ - **Token कभी process से बाहर नहीं जाता।** यह प्रति operation पढ़ा जाता है और केवल Authorization header में भेजा जाता है; कभी logged, rendered, injected या errors में नहीं आता।
155
+ - **Approval से बाहर कोई write नहीं।** `/pr create` कभी खुद commit या push नहीं करता; `autoCommit: true` के साथ model वे writes bash tool के अपने approval gate से करता है। Review job कोई write नहीं करता; केवल `review_post` approval के बाद प्रकाशित करता है।
156
+ - **Untrusted content escaped और marked होता है।** `formatPostBody` diff से लिए गए file names को backtick- और HTML-escape करता है, और external GitHub content (files, bodies, comments, search results) renders में external के रूप में marked होता है।
157
+ - **Bounded work और rate limits।** 429s को backoff के साथ retry किया जाता है; शेष quota हर result पर (failures सहित) दिखाया जाता है।
158
+
159
+ ## ज्ञात सीमाएँ
223
160
 
224
161
  - **कोई custom session events नहीं** — जानबूझकर (Architecture देखें); audit trails host के अपने event vocabulary पर निर्भर करते हैं।
225
- - **Static analyzer by default** — deterministic rules (`src/review.ts`), शून्य tokens, reproducible। `reviewMode: "model"` LLM review के लिए capped diff को host के `subagents` seam के ज़रिए एक one-shot subagent को सौंपता है (tokens खर्च होते हैं; seam और एक registered provider की आवश्यकता होती है)।
226
- - **Jobs और records process-local हैं** — review report plugin memory में job id के आधार पर रहता है, जो host job registry के lifetime से मेल खाता है; record map `maxReviewRecords` से capped है (सबसे पुराने settled records पहले evict होते हैं)।
227
- - **npm `latest` dist-tags पुराने हैं** — plugin `^0.1.0-rc.5` peer ranges घोषित करता है ताकि यह `dsh-base` द्वारा दिए गए profile closure के विरुद्ध resolve हो, और विकास के लिए `0.1.0-rc.6` pin करता है। कभी भी bare `npm i @deepseek-ai/dsh-tools` से install न करें।
228
- - **CI / GitHub Action** — इसी repository में शामिल है (v0.6.0): एक composite action (`action.yml`) जो PRs की समीक्षा करती है, CI ठीक करती है, और report लिखती है; idempotent inline comments वाला polling review bot; और एक status-check gate। हर write approval-gated रहता है।
162
+ - **Static analyzer by default** — deterministic rules (`src/review.ts`), शून्य tokens, reproducible। `reviewMode: "model"` tokens खर्च करता है और इसके लिए `subagents` seam व एक registered provider चाहिए।
163
+ - **Jobs और records process-local हैं** — review report plugin memory में job id के आधार पर रहता है; record map `maxReviewRecords` से capped है (सबसे पुराने settled records पहले evict होते हैं)।
164
+ - **npm `latest` dist-tags पुराने हैं** — `dsh-base` द्वारा दिए गए profile closure से install करें; कभी भी bare `npm i @deepseek-ai/dsh-tools` से न करें।
229
165
 
230
- ## 🧪 विकास
166
+ ## विकास
231
167
 
232
168
  ```sh
233
- pnpm install
234
- pnpm test # vitest: config, credentials, 429/retry, tools, commands, jobs, approval gate, token non-leakage
235
- pnpm typecheck
236
- pnpm build # tsc → lib/ (noEmitOnError)
237
- pnpm pack # installable tarball
238
- pnpm run check:readmes # cross-checks TOC anchors, tools, and config keys in all 5 READMEs
169
+ pnpm install # node ^22.19 || >=24
170
+ pnpm run build # tsc --noEmitOnError → lib/
171
+ pnpm run prepare # self-contained git-install build (scripts/prepare.mjs)
172
+ pnpm run prepublishOnly # प्रकाशन से पहले build + test
173
+ pnpm test # vitest run
174
+ pnpm run typecheck # tsc --noEmit
175
+ pnpm run check:readmes # सभी 5 READMEs में TOC anchors, tools और config keys की जाँच करता है
239
176
  ```
240
177
 
241
- Tests injected runners के ज़रिए GitHub API, `gh` CLI, और git को mock करते हैं — कोई network नहीं, कोई real credentials नहीं। `test/security.test.ts` पुष्टि करता है कि token string किसी भी model- या human-visible output में कभी नहीं आता। `test/e2e.test.ts` में opt-in real-API smoke tests हैं जो `DSH_GITHUB_E2E_TOKEN` सेट न होने पर खुद को skip कर लेते हैं (केवल read-only endpoints)।
242
-
243
- ## 🗂 रिपॉज़िटरी संरचना
178
+ ## रिपॉज़िटरी संरचना
244
179
 
245
180
  ```
246
181
  src/index.ts plugin entry (name/inject/apply, applyWithDeps for tests)
@@ -260,12 +195,36 @@ cordis.patch.yml bundle patch (one insert row)
260
195
  scripts/prepare.mjs self-contained git-install build
261
196
  ```
262
197
 
263
- ## 🏷 विषय
264
-
265
- अनुशंसित GitHub repository topics (उन्हें repo settings में सेट करें — वे [`dsh-plugin` topic page](https://github.com/topics/dsh-plugin) और DSH plugin marketplaces को शक्ति देते हैं):
198
+ ## विषय
266
199
 
267
200
  `dsh` · `dsh-plugin` · `deepseek-harness` · `github` · `pull-request` · `code-review` · `issue-tracker`
268
201
 
202
+ ## योगदानकर्ता
203
+
204
+ - [@PerryLink](https://github.com/PerryLink) — निर्माता और maintainer: GitHub tool surface, approval gate, background review jobs, CI composite action, review bot, status-check gate और पाँच-भाषा docs।
205
+
206
+ ## PerryLink DSH प्लगइन परिवार
207
+
208
+ यह प्रोजेक्ट [PerryLink](https://github.com/PerryLink) द्वारा अनुरक्षित [15 DeepSeek Harness plugins](https://github.com/PerryLink) में से एक है। यदि यह आपकी मदद करता है, तो बाकी भी संभवतः करेंगे:
209
+
210
+ | Plugin | विवरण |
211
+ |---|---|
212
+ | [dsh-mcp-panel](https://github.com/PerryLink/dsh-mcp-panel) | Read-only MCP runtime panel: /mcp command + status, tools और errors वाला Settings tab |
213
+ | [dsh-doublecheck](https://github.com/PerryLink/dsh-doublecheck) | Engineering-discipline guard: requirements grill, test gates, adversary review |
214
+ | [dsh-background-agents](https://github.com/PerryLink/dsh-background-agents) | Web UI sidebar, messaging और interrupt के साथ durable background child agents |
215
+ | [dsh-lsp-actions](https://github.com/PerryLink/dsh-lsp-actions) | Language servers पर LSP diagnostics, formatting, completion, code actions और rename |
216
+ | [dsh-output-styles](https://github.com/PerryLink/dsh-output-styles) | Claude Code outputStyles-समतुल्य runtime style switching |
217
+ | [dsh-checkpoint-rewind](https://github.com/PerryLink/dsh-checkpoint-rewind) | Claude Code /rewind-समतुल्य: snapshots, session forks, one-shot restore |
218
+ | [dsh-permission-rules](https://github.com/PerryLink/dsh-permission-rules) | Audit के साथ Claude Code-शैली declarative allow/deny/ask permission rules |
219
+ | [dsh-auto-review](https://github.com/PerryLink/dsh-auto-review) | Approval chain पर second-model auto-review, डिफ़ॉल्ट रूप से fail-closed |
220
+ | [dsh-memento](https://github.com/PerryLink/dsh-memento) | Approval-gated cross-session memory: ctx.memory seam + SQLite + memory tool |
221
+ | [dsh-skill-pack-security](https://github.com/PerryLink/dsh-skill-pack-security) | Security-audit skill pack: secret scan, dependency और supply-chain review |
222
+ | [dsh-session-pin](https://github.com/PerryLink/dsh-session-pin) | Durable ordering के साथ Web sidebar में sessions pin करें |
223
+ | [dsh-composer-history](https://github.com/PerryLink/dsh-composer-history) | Web composer के लिए terminal-शैली input history: arrows, Ctrl+R search |
224
+ | **[dsh-github](https://github.com/PerryLink/dsh-github)** | DSH के लिए GitHub PR/issues integration, हर write approval से नियंत्रित |
225
+ | [dsh-plugin-guide](https://github.com/PerryLink/dsh-plugin-guide) | On-demand agent skill के रूप में plugin-development knowledge base |
226
+ | [dsh-claude-move](https://github.com/PerryLink/dsh-claude-move) | Claude Code sessions, memory, skills और CLAUDE.md को DSH में migrate करें |
227
+
269
228
  ## लाइसेंस
270
229
 
271
- [Apache License 2.0](LICENSE)
230
+ [Apache License 2.0](LICENSE) © 2026 dsh-github contributors