dsh-github-flow 0.3.0 β†’ 0.5.0

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.
Files changed (121) hide show
  1. package/README.en.md +287 -143
  2. package/README.md +270 -125
  3. package/docs/UPGRADE-NOTES.md +12 -9
  4. package/docs/architecture.md +126 -126
  5. package/lib/api/routes-actions.js +249 -0
  6. package/lib/api/routes-overview.js +94 -2
  7. package/lib/cache.d.ts +4 -0
  8. package/lib/cache.js +14 -0
  9. package/lib/client.d.ts +14 -1
  10. package/lib/client.js +4287 -2500
  11. package/lib/commands/gh.d.ts +6 -1
  12. package/lib/commands/gh.js +144 -71
  13. package/lib/executor/git-parser.d.ts +57 -0
  14. package/lib/executor/git-parser.js +255 -0
  15. package/lib/executor/platform-guide.d.ts +14 -0
  16. package/lib/executor/platform-guide.js +40 -0
  17. package/lib/executor/process-utils.d.ts +51 -0
  18. package/lib/executor/process-utils.js +162 -0
  19. package/lib/executor/version-utils.d.ts +12 -0
  20. package/lib/executor/version-utils.js +27 -0
  21. package/lib/executor.d.ts +70 -48
  22. package/lib/executor.js +371 -356
  23. package/lib/git-watcher.d.ts +36 -0
  24. package/lib/git-watcher.js +91 -0
  25. package/lib/main.js +37 -3
  26. package/lib/renderers/agent-task.d.ts +16 -0
  27. package/lib/renderers/agent-task.js +107 -0
  28. package/lib/renderers/cache.d.ts +8 -0
  29. package/lib/renderers/cache.js +66 -0
  30. package/lib/renderers/codespace.d.ts +16 -0
  31. package/lib/renderers/codespace.js +103 -0
  32. package/lib/renderers/common.d.ts +24 -0
  33. package/lib/renderers/common.js +88 -0
  34. package/lib/renderers/discussion.d.ts +16 -0
  35. package/lib/renderers/discussion.js +101 -0
  36. package/lib/renderers/gist.d.ts +15 -0
  37. package/lib/renderers/gist.js +99 -0
  38. package/lib/renderers/issue.d.ts +4 -0
  39. package/lib/renderers/issue.js +70 -0
  40. package/lib/renderers/label.d.ts +4 -0
  41. package/lib/renderers/label.js +48 -0
  42. package/lib/renderers/markdown.d.ts +19 -32
  43. package/lib/renderers/markdown.js +19 -624
  44. package/lib/renderers/pr.d.ts +4 -0
  45. package/lib/renderers/pr.js +107 -0
  46. package/lib/renderers/project.d.ts +20 -0
  47. package/lib/renderers/project.js +128 -0
  48. package/lib/renderers/release.d.ts +4 -0
  49. package/lib/renderers/release.js +74 -0
  50. package/lib/renderers/repo.d.ts +4 -0
  51. package/lib/renderers/repo.js +149 -0
  52. package/lib/renderers/ruleset.d.ts +4 -0
  53. package/lib/renderers/ruleset.js +74 -0
  54. package/lib/renderers/run.d.ts +4 -0
  55. package/lib/renderers/run.js +79 -0
  56. package/lib/renderers/skill.d.ts +34 -0
  57. package/lib/renderers/skill.js +241 -0
  58. package/lib/renderers/status.d.ts +28 -0
  59. package/lib/renderers/status.js +176 -0
  60. package/lib/telemetry.d.ts +70 -0
  61. package/lib/telemetry.js +161 -0
  62. package/lib/tools/agent-task.d.ts +54 -0
  63. package/lib/tools/agent-task.js +135 -0
  64. package/lib/tools/cache.d.ts +64 -0
  65. package/lib/tools/cache.js +186 -0
  66. package/lib/tools/codespace.d.ts +51 -0
  67. package/lib/tools/codespace.js +154 -0
  68. package/lib/tools/discussion.d.ts +70 -0
  69. package/lib/tools/discussion.js +195 -0
  70. package/lib/tools/gist.d.ts +155 -0
  71. package/lib/tools/gist.js +190 -0
  72. package/lib/tools/help.js +214 -13
  73. package/lib/tools/image-utils.d.ts +8 -0
  74. package/lib/tools/image-utils.js +34 -0
  75. package/lib/tools/issue.d.ts +8 -1
  76. package/lib/tools/issue.js +26 -4
  77. package/lib/tools/label.d.ts +80 -0
  78. package/lib/tools/label.js +237 -0
  79. package/lib/tools/pr.d.ts +8 -0
  80. package/lib/tools/pr.js +48 -3
  81. package/lib/tools/project.d.ts +80 -0
  82. package/lib/tools/project.js +241 -0
  83. package/lib/tools/repo.js +13 -1
  84. package/lib/tools/ruleset.d.ts +80 -0
  85. package/lib/tools/ruleset.js +177 -0
  86. package/lib/tools/skill.d.ts +24 -1
  87. package/lib/tools/skill.js +115 -5
  88. package/lib/tools/status.d.ts +40 -0
  89. package/lib/tools/status.js +58 -0
  90. package/lib/types.d.ts +44 -0
  91. package/lib/ui/auth-guide-card.d.ts +4 -0
  92. package/lib/ui/auth-guide-card.js +161 -0
  93. package/lib/ui/branch-selector.d.ts +10 -0
  94. package/lib/ui/branch-selector.js +163 -0
  95. package/lib/ui/commit-modal.d.ts +8 -0
  96. package/lib/ui/commit-modal.js +219 -0
  97. package/lib/ui/help-modal.d.ts +15 -0
  98. package/lib/ui/help-modal.js +202 -0
  99. package/lib/ui/icons.d.ts +7 -0
  100. package/lib/ui/icons.js +53 -0
  101. package/lib/ui/network-banner.d.ts +10 -0
  102. package/lib/ui/network-banner.js +54 -0
  103. package/lib/ui/storage.d.ts +35 -0
  104. package/lib/ui/storage.js +158 -0
  105. package/lib/ui/styles.d.ts +6 -0
  106. package/lib/ui/styles.js +1544 -0
  107. package/lib/ui/sync-settings-modal.d.ts +11 -0
  108. package/lib/ui/sync-settings-modal.js +350 -0
  109. package/lib/ui/sync-status-badge.d.ts +8 -0
  110. package/lib/ui/sync-status-badge.js +64 -0
  111. package/lib/ui/upgrade-card.d.ts +7 -0
  112. package/lib/ui/upgrade-card.js +222 -0
  113. package/lib/ui/utils.d.ts +45 -0
  114. package/lib/ui/utils.js +226 -0
  115. package/lib/ui/workspace-panel.d.ts +4 -0
  116. package/lib/ui/workspace-panel.js +489 -0
  117. package/lib/upgrade-manager.d.ts +5 -1
  118. package/lib/upgrade-manager.js +24 -1
  119. package/lib/version.d.ts +1 -1
  120. package/lib/version.js +1 -1
  121. package/package.json +2 -2
package/README.en.md CHANGED
@@ -10,7 +10,7 @@
10
10
 
11
11
  <p align="center">
12
12
  <b>Give DeepSeek Harness Agents native hands and feet to operate GitHub, crafting an immersive collaboration cockpit for developers.</b><br>
13
- Natively reuses host <code>gh</code> CLI login credentials to eliminate Personal Access Token (PAT) leaks; deeply bridges local Git workspaces with remote GitHub collaboration, equipped with <b>9 core domain Agent tools</b>, <b>human slash commands</b>, <b>Web UI visual cockpits</b>, and <b>cross-platform one-click seamless upgrades</b>.
13
+ Natively reuses host <code>gh</code> CLI login credentials to eliminate Personal Access Token (PAT) leaks; deeply bridges local Git workspaces with remote GitHub collaboration, equipped with <b>18 core domain Agent tools (104 actions covering PR review/Issue tracking/Actions workflow & cache governance/clone-free file reads/branch ruleset policy diagnosis/Gist snippets/labels & global status dashboards/secrets & variables/agent tasks/discussions/projects v2/codespaces/runtime telemetry)</b>, <b>human slash commands</b>, <b>Web UI visual cockpits</b>, and <b>cross-platform one-click seamless upgrades</b>.
14
14
  </p>
15
15
 
16
16
  <p align="center">
@@ -29,7 +29,8 @@ When using AI Agents for collaborative coding, developers frequently hit these f
29
29
  | **CI / Actions Failure Debugging** | Sifting through pages of Actions logs in a browser, copying stack traces to chat for debugging. | **Pinpoint Error Extraction**: Tell the Agent *"Why did CI fail?"*; Agent calls `github_run(log_failed)` to grab failed step logs and patch code instantly. |
30
30
  | **Security & Token Management** | Pasting plain-text Personal Access Tokens (PATs) in plugin configs, risking token leaks and permission sprawl. | **Zero Token Exposure**: Directly reuses local `gh auth login` credentials via native OS Keychains/Keyrings securely. |
31
31
  | **Context Switching Overhead** | Jumping back and forth between VS Code, browser GitHub tabs, and DSH chat windows. | **Immersive Dual Cockpit**: Live PR status, Actions pipelines, and 3D issue matrices right inside DSH. |
32
- | **First-Screen Latency & Loading** | Staring at full-screen spinners for 8~15s while waiting for heavy background `gh` processes. | **SWR 0ms Instant Render**: Instantly displays local persistent snapshots; dedicated settings modal to switch between SWR auto-sync and manual mode. |
32
+ | **Branch Switching & Real-Time Sync** | Switching branches requires hopping into a terminal, while the sidebar remains stale regarding local stage/commit changes. | **Safe In-UI Branch Switching + Live Git Watch**: Instant keyword filter with uncommitted dirty change guard; 800ms debounced `.git` watcher aligns right sidebar in milliseconds. |
33
+ | **First-Screen Latency & Loading** | Staring at full-screen spinners for 8~15s while waiting for heavy background `gh` processes. | **SWR 0ms Instant Render + Scheduled Sync**: Instantly displays local persistent snapshots; features a 3-way mutually exclusive sync model (SWR, Cloud Auto-Sync with visibility pause, Manual) and standalone local Git watch. |
33
34
  | **Plugin Upgrades & Maintenance** | Manually checking npm registry versions, complicated commands, fear of breaking configs. | **Idle Silent Detection + One-Click Upgrade**: Dual-registry acceleration, auto macOS/Windows adaptation, upgrade with one click. |
34
35
 
35
36
  ---
@@ -72,7 +73,7 @@ dsh plugin --profile web add dsh-github-flow
72
73
 
73
74
  ## πŸ€– Core Agent Tools: Equipping Agents with Native GitHub Powers
74
75
 
75
- Consolidates scattered GitHub endpoints into **9 core domain tools (76+ actions covering PR/Issue/Actions workflow governance/clone-free file reads/secrets & variables)**, featuring **Token Budget Protection (default 24KB intelligent truncation)**, **High-density Native Markdown Rendering (70%+ list output token reduction)** and **Zero-argument CWD auto-binding**.
76
+ Consolidates scattered GitHub endpoints into **18 core domain tools (104 actions)** with an official command coverage of **87% (104/120)**, featuring **Token Budget Protection (default 24KB intelligent truncation)**, **High-density Native Markdown Rendering (70%+ list output token reduction)**, **OAuth Scope self-healing guidance**, and **Zero-argument CWD auto-binding**.
76
77
 
77
78
  ### 1. `github_pr`: Pull Request Lifecycle & Automated Code Review
78
79
  > **Example Agent Prompts**:
@@ -86,7 +87,9 @@ Consolidates scattered GitHub endpoints into **9 core domain tools (76+ actions
86
87
  * `view`: Inspect PR description, metadata, and mergeability;
87
88
  * `diff`: Retrieve complete code diffs (`stat_only` for file-change overview, safely truncated against token limits);
88
89
  * `checks`: Audit CI gate status (pass/fail/skip category badges, owning workflow, and detail links);
89
- * `create`: Auto-create PRs (supports draft mode & `--dry-run`);
90
+ * `create`: Auto-create PRs (supports draft mode & `--dry-run`, supports `attach_images` local uploads);
91
+ * `edit`: πŸ†• Edit PR title, body description, and metadata with image attachment support;
92
+ * `comment`: πŸ†• Post comments and reviews to pull requests with image attachment support;
90
93
  * `checkout`: πŸ†• Check out PR code to a local branch for sandboxed testing;
91
94
  * `status`: πŸ†• Inspect merge conflict status (`CLEAN` / `CONFLICT`) for the current branch's PR;
92
95
  * `review`: Submit code reviews (`APPROVE`, `REQUEST_CHANGES`, `COMMENT`);
@@ -94,151 +97,284 @@ Consolidates scattered GitHub endpoints into **9 core domain tools (76+ actions
94
97
  * `ready`: πŸ†• Toggle Draft ↔ Ready (`undo: true` converts back to Draft β€” fully reversible);
95
98
  * `revert`: πŸ†• Create a revert commit (generates a new revert PR on the remote; requires `confirm: true`);
96
99
  * `update_branch`: πŸ†• Sync the latest base-branch commits into the PR branch β€” the self-healing action for "branch is out-of-date" CI gate failures;
97
- * `view_images`: πŸ†• Download PR discussion screenshots (body + comments; `image_urls` targeting with budget-overflow resume list).
100
+ * `view_images`: πŸ†• Download PR discussion screenshots (body + comments; `image_urls` targeting with budget-overflow resume list);
101
+ * `attach_images` (param): πŸ†• Upload local images/attachments to PRs (up to 50 files/batch, symmetric with view_images, requires gh β‰₯ 2.99).
98
102
 
99
103
  ---
100
104
 
101
- ### 2. `github_run`: Actions CI Pipeline & Failure Diagnostics (Agent Auto-Fix Core)
105
+ ### 2. `github_issue`: Issue Tracking & Branch Creation
102
106
  > **Example Agent Prompts**:
103
- > - *"Why did the latest Actions workflow fail? Extract failed step logs and fix the code."*
104
- > - *"Show me the status of the last 5 CI runs in this repository."*
105
- > - *"Rerun the failed workflow from earlier."*
107
+ > - *"List all open issues assigned to me."*
108
+ > - *"Branch off a local fix branch 'fix-login-error' from Issue #42 and start working."*
109
+ > - *"Add a comment to Issue #15 summarizing the edge cases we just discovered with screenshots."*
106
110
 
107
111
  * **Supported Actions**:
108
- * `log_failed` (πŸ”₯ **Killer Feature**): **Optimized for Agents**; automatically extracts isolated error logs from failed steps for instant root-cause analysis;
109
- * `list`: View recent workflow runs and conclusions (`branch` / `status: failure` filters to pin down broken builds);
110
- * `view`: Inspect jobs and steps for a specific run ID;
111
- * `trigger`: πŸ†• Manually dispatch `workflow_dispatch` workflows to verify fixes immediately;
112
- * `workflow_list`: πŸ†• List workflows (active only by default; `all: true` includes disabled β€” when diagnosing "why didn't my workflow run", the disabled state itself is the answer);
113
- * `workflow_view`: πŸ†• Workflow details (locate by name/ID/filename, with recent runs);
114
- * `workflow_enable` / `workflow_disable`: πŸ†• Toggle workflows (disable explicitly warns "the next trigger will fail silently");
115
- * `download`: πŸ†• Download build artifacts to a plugin-managed directory (isolated per repo and run, returns file manifest; older gh versions get a security upgrade note);
116
- * `rerun`: Re-trigger failed CI runs;
117
- * `cancel`: Cancel in-progress workflows.
112
+ * `list`: List issues with flexible filtering (`state` / `labels` / `assignees`);
113
+ * `view`: Inspect full issue threads, body descriptions, and assignees;
114
+ * `create`: Create new issue tickets (supports `attach_images` local uploads);
115
+ * `comment`: Add comments to issue threads (supports `attach_images` error screenshot uploads);
116
+ * `edit`: Update titles, `add_labels`, or `remove_labels`;
117
+ * `close` / `reopen`: Manage lifecycle status (`close` requires `confirm: true`);
118
+ * `develop`: πŸ†• Automatically branch off a local Git branch linked to the issue;
119
+ * `delete`: πŸ†• Irreversible physical deletion (requires `confirm: true`);
120
+ * `transfer`: πŸ†• Move issue to another repository with 301 redirects (requires `confirm: true`);
121
+ * `pin` / `unpin`: πŸ†• Manage pinned issues on the repository;
122
+ * `lock` / `unlock`: πŸ†• Lock discussions with standard reasons (`off_topic`, `resolved`, `spam`, `too_heated`);
123
+ * `status`: πŸ†• Retrieve a comprehensive dashboard of issues assigned to the active user;
124
+ * `view_images`: πŸ†• Download screenshot attachments from issue descriptions and comments into local image blocks;
125
+ * `attach_images` (param): πŸ†• Upload local file screenshots alongside issues (up to 50 local files/batch, requires gh β‰₯ 2.99).
118
126
 
119
127
  ---
120
128
 
121
- ### 3. `github_issue`: Issue Tracking & Closed-Loop Tasks
129
+ ### 3. `github_run`: Actions Monitoring & Intelligent Troubleshooting
122
130
  > **Example Agent Prompts**:
123
- > - *"File an issue for the memory leak we just reproduced, labeled 'bug' and 'backend'."*
124
- > - *"List all open issues assigned to me."*
125
- > - *"Comment on Issue #45: 'Fixed on master branch, awaiting verification'."*
126
- > - *"Close Issue #45."*
131
+ > - *"Did the latest CI run on main fail?"*
132
+ > - *"Extract the failed step logs from the recent failed run and debug the root cause."*
133
+ > - *"Re-run the latest failed CI pipeline."*
127
134
 
128
135
  * **Supported Actions**:
129
- * `list`: Query issues with flexible filters (`state` / `labels` / `assignees` / `limit`);
130
- * `view`: Read issue body and discussion history;
131
- * `create`: Create new issues (title, body, labels, assignees);
132
- * `edit`: πŸ†• Update title, body, and add/remove labels;
133
- * `develop`: πŸ†• Create a linked development branch from an issue and check it out locally;
134
- * `comment`: Append debugging updates or notes;
135
- * `close` (requires `confirm: true`) / `reopen`: Manage issue lifecycle states;
136
- * `delete`: πŸ†• **Permanently delete** an issue (requires `confirm: true`; the number is gone forever and comments are destroyed β€” fundamentally different from close, which can be reopened);
137
- * `transfer`: πŸ†• Transfer an issue to another repository (requires `confirm: true`; original URL 301-redirects, ownership cannot be silently reverted);
138
- * `pin` / `unpin`: πŸ†• Toggle issue pinning (reversible state flag);
139
- * `lock` / `unlock`: πŸ†• Lock/unlock conversation (`lock_reason` supports off_topic/resolved/spam/too_heated);
140
- * `status`: πŸ†• Account-level assigned-issues panel (Assigned / Mentioning sections);
141
- * `view_images`: πŸ†• Download issue attachment screenshots (body + comments; `image_urls` targeting with resume list).
136
+ * `list`: Query workflow runs by branch or status;
137
+ * `view`: Inspect step breakdown and conclusion states;
138
+ * `log_failed`: **πŸ”₯ Troubleshooting Swiss Army Knife**! Pinpoints exact failing jobs and steps, extracting only the critical failure lines;
139
+ * `rerun`: Re-trigger failed workflows with one click;
140
+ * `cancel`: Cancel in-progress or queued runs;
141
+ * `trigger`: Manually dispatch `workflow_dispatch` workflows with custom parameters;
142
+ * `workflow_list`: πŸ†• List all workflows in the repository (`all: true` includes disabled ones);
143
+ * `workflow_view`: πŸ†• Inspect workflow YAML definitions and total run metrics;
144
+ * `workflow_enable` / `workflow_disable`: πŸ†• Toggle workflow status dynamically;
145
+ * `download`: πŸ†• Download build artifacts (strictly adhering to GHSA path-traversal safeguards).
142
146
 
143
147
  ---
144
148
 
145
- ### 4. `github_repo`: Repository Exploration & Cross-Repo Code Search
149
+ ### 4. `github_repo`: Metadata, Fork Sync, Clone-Free File Reads & Global Search
146
150
  > **Example Agent Prompts**:
147
- > - *"Search for usages of 'createPrTool' across this repository."*
148
- > - *"Search GitHub for popular open-source repositories related to 'dsh-plugin'."*
149
- > - *"Show repository metadata and star count for cli/cli."*
151
+ > - *"Sync my fork with the upstream repository."*
152
+ > - *"Search where 'useAuthToken' is used across this repository."*
153
+ > - *"Read 'src/utils.ts' on the remote repository without cloning."*
154
+ > - *"Fetch the README, and download the architecture diagrams inside it."*
150
155
 
151
156
  * **Supported Actions**:
152
- * `view`: View repository metadata (default branch, stars, description, topics & license);
153
- * `readme`: πŸ†• Read repository README raw content (branch-selectable; relative-path screenshots auto-resolved and downloaded);
154
- * `sync`: πŸ†• One-click fork sync with upstream to fix stale-fork CI gate failures;
155
- * `search_code`: Search code symbols in current or specified repositories;
156
- * `search_repos`: Search open-source GitHub repositories globally;
157
- * `search_issues` / `search_prs` / `search_commits`: πŸ†• Global search over issues / PRs / commits (qualifiers go inline in the query, e.g. `repo:o/r state:open`; commits require search text);
158
- * `read_file`: πŸ†• **Clone-free single-file read at any path** (native on gh β‰₯2.95; older versions auto-degrade to the contents API with an explicit degraded-path note; binary files are rejected with `github_api` guidance);
159
- * `read_dir`: πŸ†• Clone-free directory listing (dirs first + file sizes, same degradation path).
157
+ * `view`: Inspect repository metadata, default branch, Star/Fork counts, licenses, and topics;
158
+ * `readme`: πŸ†• Read README text and extract all referenced image URLs, with optional `image_urls` batch downloads;
159
+ * `sync`: Sync fork branch with upstream (`--force` hard reset supported);
160
+ * `read_file`: πŸ†• Clone-free remote file reading (`gh β‰₯ 2.95` direct, older CLI versions auto-fallback to REST API);
161
+ * `read_dir`: πŸ†• Clone-free remote directory enumeration with file types and sizes;
162
+ * `search_code`: Search code across GitHub repositories;
163
+ * `search_repos`: Search repositories by keywords and topics;
164
+ * `search_issues` / `search_prs`: Global issue and pull request queries;
165
+ * `search_commits`: Global commit message search.
160
166
 
161
167
  ---
162
168
 
163
- ### 5. `github_api`: Low-Level Escape Hatch
169
+ ### 5. `github_release`: Release Governance & Build Artifact Delivery
164
170
  > **Example Agent Prompts**:
165
- > - *"Call GitHub API to fetch latest releases of current repository and parse tag names with jq."*
171
+ > - *"Check the latest release notes and assets for this repository."*
172
+ > - *"Draft a new v0.4.0 release using commits since the last tag."*
173
+ > - *"Upload the local build artifact 'dsh-github-flow-0.4.0.tgz' to the latest release."*
166
174
 
167
- * **Core Strength**: Call any GitHub REST or GraphQL API using local credentials with `--jq` filtering, `raw` text mode, and `paginate` auto-aggregation.
175
+ * **Supported Actions**:
176
+ * `list`: Query release history;
177
+ * `view`: Inspect notes and asset manifests for a given tag;
178
+ * `create`: Publish releases (supports `generate_notes`, drafts, prereleases, and asset attachments);
179
+ * `upload`: Attach build assets to an existing release (`clobber: true` requires `confirm: true`);
180
+ * `download`: Download release artifacts with glob pattern filters;
181
+ * `delete`: Delete releases (`cleanup_tag: true` deletes associated Git tag; requires `confirm: true`).
168
182
 
169
183
  ---
170
184
 
171
- ### 6. `github_release`: Version Releases & Build Asset Delivery πŸ†•
185
+ ### 6. `github_secret`: CI/CD Secrets & Variables Governance
172
186
  > **Example Agent Prompts**:
173
- > - *"Publish v0.2.0 for this repository with auto-generated release notes."*
174
- > - *"Upload dsh-github-flow-0.2.0.tgz to the v0.2.0 release."*
187
+ > - *"List the names of all configured Actions secrets."*
188
+ > - *"Set a repository secret named 'DEPLOY_KEY'."*
189
+ > - *"Read the value of plaintext variable 'NODE_ENV'."*
175
190
 
176
191
  * **Supported Actions**:
177
- * `list` / `view`: Browse release history and per-version details (assets, notes);
178
- * `create`: Create releases (`generate_notes` auto-notes, `draft` / `prerelease` flags, attach assets directly);
179
- * `upload` / `download`: Upload `.tgz` build artifacts or download assets by glob pattern;
180
- * `delete` (requires `confirm: true`): Delete a release, optionally cleaning up its tag.
192
+ * `list`: Enumerate secret or variable names (secret values are never echoed);
193
+ * `set`: Configure secrets (**Security Invariant: ciphertext safely passed via stdin, never in command arguments or process tables**) or variables;
194
+ * `get`: πŸ†• Read variable values (available only for `kind: 'variable'`; secrets are cryptographically shielded by GitHub);
195
+ * `delete`: Remove secrets or variables (secret deletion requires `confirm: true`).
181
196
 
182
197
  ---
183
198
 
184
- ### 7. `github_secret`: CI/CD Secrets & Variables Management πŸ†•
199
+ ### 7. `github_skill`: Agent Skills Ecosystem Discovery & Local Installation
185
200
  > **Example Agent Prompts**:
186
- > - *"Update the NPM_TOKEN secret for this repository."*
187
- > - *"Show which secrets are configured for this repo."*
188
- > - *"Set the DEPLOY_ENV variable to staging and read it back to confirm."*
201
+ > - *"Search GitHub for open-source Agent skills related to 'markdown'."*
202
+ > - *"Preview and install the code review skill from 'github/awesome-copilot' into this project."*
189
203
 
190
204
  * **Supported Actions**:
191
- * `list`: Show secret/variable names and update times (the GitHub API never exposes secret values);
192
- * `set`: Set/update secret values β€” **passed via subprocess stdin, never on the command line (ps-safe), never echoed in output**;
193
- * `delete` (requires `confirm: true`): Remove a secret.
194
- * Switch to **Actions plaintext variables** via `kind: 'variable'`: `set` passes the value directly as a flag and `get` can echo it back (that's the design difference from secrets β€” secrets are encrypted GitHub-side after write and physically unreadable); the two security semantics are physically isolated in the rendering layer.
195
- * Supports repository / organization (`org`) / environment (`env`) scopes across `actions` / `codespaces` / `dependabot` / `agents` apps.
205
+ * `search`: Discover compliant Agent skills across open-source GitHub repositories;
206
+ * `preview`: Preview `SKILL.md` rule instructions without installing;
207
+ * `install`: Install skills locally (`scope: 'project'` or `'user'`; requires `confirm: true`);
208
+ * `list`: Inspect installed skills in the current environment;
209
+ * `publish`: πŸ†• **Skill Compliance Validation & Publishing Loop**: Safe `--dry-run` inspection against agentskills.io specifications, `--fix` metadata stripping, and release publishing with required `tag` and `confirm: true`;
210
+ * `update`: πŸ†• **Batch Inspection & Sync Updates**: Safe `--dry-run` check comparing local and remote tree SHAs, with `--all` batch synchronization.
196
211
 
197
212
  ---
198
213
 
199
- ### 8. `github_skill`: Cross-Agent Open-Source Skills Discovery πŸ†•
214
+ ### 8. `github_help`: Comprehensive Mapping, Official Syntax & Self-Healing
200
215
  > **Example Agent Prompts**:
201
- > - *"Search GitHub for an Agent Skill about code review."*
202
- > - *"Preview that skill's content, then install it to this project if it looks good."*
216
+ > - *"I am not sure which tool manages Discussions; check the mapping table for me."*
217
+ > - *"What is the syntax for filtering GitHub search results by date?"*
218
+ > - *"How do I debug 'authentication failed' errors from gh?"*
203
219
 
204
220
  * **Supported Actions**:
205
- * `search`: Search open-source `SKILL.md` skills across GitHub (Code Search based, ranked by stars);
206
- * `preview`: Read-only preview of skill content before installing β€” nothing touches disk;
207
- * `install` (requires `confirm: true`): Install to local agent hosts (Claude Code / Cursor / Copilot and 50+ others), `project` or `user` scope;
208
- * `list`: List all skills installed on this machine.
209
- * Requires the official `gh skill` preview feature in GitHub CLI 2.9x+.
221
+ * `overview`: Complete toolbox navigation and summary table (18 core tools);
222
+ * `mapping`: **Official gh Command ↔ Tool Action Mapping Table**, detailing exact tool calls and REST/GraphQL fallback routes;
223
+ * `search_syntax`: Date ranges, qualifiers, and boolean query syntax;
224
+ * `troubleshooting`: Self-healing recipes for authentication loss, timeouts, SOCKS5 proxy configs, and permissions;
225
+ * Domain guides: In-depth usage guides for `pr`, `issue`, `run`, `repo`, `release`, `secret`, `skill`, `label`, `ruleset`, `cache`, `gist`, `status`, `agent_task`, `discussion`, `project`, and `codespace`;
226
+ * `gh_command`: Direct pass-through lookup of official gh manual entries (e.g. `gh_command: 'ruleset'`).
210
227
 
211
228
  ---
212
229
 
213
- ### 9. `github_help`: Meta Guide & Troubleshooting Hub πŸ†•
230
+ ### 9. `github_api`: Raw GitHub REST & GraphQL Escape Hatch
214
231
  > **Example Agent Prompts**:
215
- > - *"I'm not sure which GitHub tool to use for this task."*
216
- > - *"How do I write advanced GitHub search syntax?"*
232
+ > - *"Call GitHub API to fetch the current user's profile JSON."*
233
+ > - *"Run a GraphQL query to inspect repository Discussions."*
217
234
 
218
- * **Core Capabilities**:
219
- * Task-routing navigation across all 9 tools;
220
- * Official advanced search syntax cheat sheet (date ranges, status qualifiers, code search scopes);
221
- * Self-healing recipes for common errors (403 rate limits, 422 missing params, stale forks, outdated CLI);
222
- * Direct passthrough to the official `gh help <command>` offline manual.
235
+ * **Supported Features**: Direct invocation of arbitrary GitHub REST or GraphQL endpoints using host credentials, supporting `--jq` filtering, auto-pagination (`paginate: true`), and `raw: true` mode.
223
236
 
224
237
  ---
225
238
 
226
- ## πŸ›‘οΈ Safety Guardrails
239
+ ### 10. `github_label`: Label System Management & Cross-Repo Cloning
240
+ > **Example Agent Prompts**:
241
+ > - *"List all labels in this repository sorted by name."*
242
+ > - *"Create a label 'priority/p0' with color #d73a4a for critical bugs."*
243
+ > - *"Clone the label system from 'cli/cli' repository into our new repository."*
244
+ > - *"Delete the deprecated 'invalid' label."*
227
245
 
228
- * **Destructive-action double confirmation**: `merge`, `close`, `release delete`, clobber uploads, `secret delete`, and `skill install` require an explicit `confirm: true` parameter; without it, only an impact assessment is returned β€” nothing executes. This prevents accidental merges or deletions from model hallucinations.
229
- * **Secret stdin channel**: Secret values travel via subprocess stdin β€” never on the command line (ps / task-manager safe), never persisted, never echoed; gh encrypts locally with the repository public key before uploading.
230
- * **Command-injection immunity**: All gh invocations use `execFile` array-argument isolation with zero shell string concatenation.
246
+ * **Supported Actions**:
247
+ * `list`: List repository labels (supports `search` regex/keyword, `sort: 'created' | 'name'`, and `order: 'asc' | 'desc'`);
248
+ * `create`: Create a new label (hex color normalization, optional `force: true` to update existing);
249
+ * `edit`: Update label color, description, or rename via `new_name`;
250
+ * `delete`: Safe deletion (affects associated issues/PRs; requires `confirm: true` confirmation, injects `--yes`);
251
+ * `clone`: πŸ†• **One-click cross-repo label cloning**: Copy all labels from a source repository (`source_repo`) into the target repository (supports `force: true` to overwrite conflicts).
231
252
 
232
253
  ---
233
254
 
234
- ## πŸ–₯️ Native Web UI Workspace & Settings Center
255
+ ### 11. `github_ruleset`: Branch Protection Rules & Policy Diagnosis
256
+ > **Example Agent Prompts**:
257
+ > - *"Why can't I merge this PR? Check all applicable rules for this branch."*
258
+ > - *"Verify whether branch master requires CI status checks or 2 approvals."*
259
+ > - *"List all repository rulesets."*
260
+
261
+ * **Supported Actions**:
262
+ * `check`: **πŸ”₯ Core PR Merge Blocker Diagnosis**! View all protective rules governing a branch (e.g. required approvals, required status checks, linear history, force-push denial), complementing `github_pr(action: 'checks')` with authoritative policy perspective;
263
+ * `list`: List rulesets for repository or organization (`--org` and `--no-parents` support);
264
+ * `view`: Inspect ruleset configuration and target branches (requires `ruleset_id`).
235
265
 
236
- No more window switching! Seamlessly integrated into DSH with DSW design tokens and instant light/dark theme adaptation.
266
+ ---
267
+
268
+ ### 12. `github_cache`: Actions Build Cache Auditing & Safe Cleanup
269
+ > **Example Agent Prompts**:
270
+ > - *"How much cache space is consumed by GitHub Actions in this repository?"*
271
+ > - *"List build caches sorted by size in descending order."*
272
+ > - *"Purge all build caches in this repository."*
273
+
274
+ * **Supported Actions**:
275
+ * `list`: Audit Actions caches with human-readable size formatting (KB/MB/GB), key prefix and ref filtering, and size/access sorting;
276
+ * `delete`: Precise 3-way cleanup (by `cache_id`, by `key`, or purge everything via `all: true`; purge is destructive and requires `confirm: true`, injects `--succeed-on-no-caches` for idempotency).
277
+
278
+ ---
279
+
280
+ ### 13. `github_gist`: Code Snippets & Diagnostics Archiving
281
+ > **Example Agent Prompts**:
282
+ > - *"Publish this diagnostic error log as a Secret Gist and share the link."*
283
+ > - *"List all gists on my user account."*
284
+ > - *"Inspect the contents of Gist '5b0e0062eb8e9654adad7bb1d81cc75f'."*
285
+
286
+ * **Supported Actions**:
287
+ * `list`: List user gists (structured TSV parser, supports `public` / `secret` / `filter` options);
288
+ * `view`: View raw code contents of a gist (optional `filename` targeting, requires `gist_id`);
289
+ * `create`: Create gists from `content` string (streamed via safe stdin pipeline) or local `files`, defaults to Secret mode with **explicit unlisted security warnings**;
290
+ * `edit`: Update descriptions or files in a gist;
291
+ * `delete`: Permanently delete a gist (requires `confirm: true` and `--yes`).
292
+
293
+ ---
294
+
295
+ ### 14. `github_status`: Cross-Repository Todo & Runtime Health Dashboard
296
+ > **Example Agent Prompts**:
297
+ > - *"What tasks and pull requests need my attention on GitHub today?"*
298
+ > - *"Check recent @mentions and activity across all repositories I follow."*
299
+ > - *"Audit the runtime health score and degradation rate report of our GitHub tools."*
300
+
301
+ * **Supported Actions**:
302
+ * `view`: **Account-level global status cockpit** (default), aggregating Assigned Issues, Assigned PRs, Review Requests, Mentions, and Repository Activity across all subscribed repositories without needing repository context; supports `-o` org filtering and `-e` noise repository exclusion;
303
+ * `health`: πŸ†• **Toolchain Runtime Health & Degradation Audit Report**: Powered by Cordis `tools/result` event telemetry, audits total calls, success rates, comprehensive health score (0-100), API degradation rates, and actionable self-healing upgrade suggestions across all 18 tools.
304
+
305
+ ---
306
+
307
+ ### 15. `github_agent_task`: Cloud Coding Agent Session Governance
308
+ > **Example Agent Prompts**:
309
+ > - *"List all GitHub Copilot Coding Agent task sessions assigned under my account."*
310
+ > - *"View task 'e2fa49d2' details and fetch its execution logs."*
311
+ > - *"Dispatch a task to the cloud Agent: 'Refactor network layer with retry support', based on branch develop."*
237
312
 
238
- ### 1. Global Cockpit (Main Navigation Slot)
239
- Access via the GitHub icon in the main left navigation:
240
- * **⚑ 0ms Instant Render (SWR Persistent Cache)**: Powered by local snapshot persistence; say goodbye to full-screen 8~15s spinner freezes and enjoy instant dashboard loading;
241
- * **πŸ“¦ Live Freshness Status Pill**: Transparently communicates data freshness right next to the title (`[πŸ“¦ Local Snapshot (21m ago)]` βž” `[⏳ Syncing in background...]` βž” `[βœ… Up to date (15:30)]` βž” `[⚠️ Timeout, cached data preserved]`);
313
+ * **Supported Actions**:
314
+ * `list`: List agent tasks (supports `-L/--limit` and `-R/--repo`);
315
+ * `view`: View task session details and logs (supports `--log`, strictly requires `task_id` to prevent TTY hangs);
316
+ * `create`: Create and dispatch a cloud agent coding task (supports `-b/--base` and `-a/--custom-agent`).
317
+
318
+ ---
319
+
320
+ ### 16. `github_discussion`: Team Discussions & Open-Source RFC Loop
321
+ > **Example Agent Prompts**:
322
+ > - *"List open discussions in category 'Ideas' for this repository."*
323
+ > - *"View discussion #101 body and comment thread."*
324
+ > - *"Start a discussion under 'RFC': 'Proposal on telemetry observability'."*
325
+ > - *"Post a reply comment to discussion #101."*
326
+
327
+ * **Supported Actions**:
328
+ * `list`: Query discussions (supports `-c/--category`, `-s/--state`, `--labels`, and `-S/--search`);
329
+ * `view`: Read discussion body and replies (supports `--comments`, requires `discussion_number`);
330
+ * `create`: Start a discussion (requires `category`, `title`, and `body`);
331
+ * `edit`: Update discussion title or body;
332
+ * `comment`: Post a comment reply to an existing discussion.
333
+
334
+ ---
335
+
336
+ ### 17. `github_project`: Projects v2 Board & Item Planning
337
+ > **Example Agent Prompts**:
338
+ > - *"List all Projects v2 boards under my account."*
339
+ > - *"View items in project board #1 with filter query 'is:open'."*
340
+ > - *"Add Issue 'https://github.com/owner/repo/issues/10' to project board #1."*
341
+ > - *"Create a draft issue item in project #1 titled 'Review unit test coverage'."*
342
+
343
+ * **Supported Actions**:
344
+ * `list`: List user or organization projects (default `owner: '@me'`, natively handles `--format json`);
345
+ * `view`: Inspect project metadata, visibility, description, and README;
346
+ * `item-list`: Inspect board items (supports Projects query filter syntax `--query`, e.g., `is:open assignee:@me`);
347
+ * `item-add`: Associate existing Issue/PR URLs to a project board;
348
+ * `item-create`: Create draft issue items;
349
+ * `item-delete`: Remove items from board (guarded by required `confirm: true`);
350
+ * πŸ”‘ **Scope Self-Healing**: Automatically renders a single-line self-healing command card (`gh auth refresh -s read:project`) when permissions are missing.
351
+
352
+ ---
353
+
354
+ ### 18. `github_codespace`: Cloud Remote Development Environment (MVP)
355
+ > **Example Agent Prompts**:
356
+ > - *"Check which cloud Codespace environments are currently running."*
357
+ > - *"Inspect instance specs and idle timeout for 'fuzzy-spoon-69vj'."*
358
+ > - *"Stop 'fuzzy-spoon-69vj' to avoid billable core-hour consumption."*
359
+ > - *"Permanently delete an unused temporary Codespace."*
360
+
361
+ * **Supported Actions**:
362
+ * `list`: List Codespaces under current user or organization;
363
+ * `view`: Inspect environment specs, DevContainer path, and status (requires `codespace` name);
364
+ * `stop`: Stop running instances to halt billing immediately;
365
+ * `delete`: Safely delete instances (requires `confirm: true`, passes `-f` for non-interactive execution);
366
+ * πŸ”‘ **Scope Self-Healing**: Automatically renders a single-line self-healing command card (`gh auth refresh -h github.com -s codespace`) when missing required scopes.
367
+
368
+ ---
369
+
370
+ ## πŸ–₯️ Web UI Cockpit & Right Sidebar Workspace Panel
371
+
372
+ `dsh-github-flow` delivers native visual controls alongside its Agent toolset:
373
+
374
+ ### 1. Global Cockpit (Main Dashboard)
375
+ Click the **Octocat icon** in DSH's left navigation bar to open the full-screen cockpit:
376
+ * **⚑ 0ms Instant Render (SWR Persistent Cache)**: Powered by local snapshot persistence; enjoy instant dashboard loading;
377
+ * **πŸ“¦ Live Freshness Status Pill**: Transparently communicates data freshness right next to the title (`[πŸ“¦ Local Snapshot (21m ago)]` βž” `[⏳ Syncing in background...]` βž” `[βœ… Up to date (15:30)]` βž” `[⚠️ Network failed, offline snapshot displayed]`);
242
378
  * **Account-Wide Overview**: Live view of all cloud repositories, default branches, and star counts;
243
379
  * **Local Workspace Matrix**: Automatically detects open projects and bridges local directories with remote repos;
244
380
  * **3D Issue Governance Matrix**: Categorizes issues into *"πŸ“₯ User Reported"*, *"🎯 Assigned to Me"*, and *"✍️ Created by Me"* with responsive pill filters;
@@ -251,20 +387,24 @@ Access via the GitHub icon in the main left navigation:
251
387
  ### 2. Session Right Sidebar Panel (Workspace Drawer)
252
388
  Located in the right drawer of every chat workspace, seamlessly bridging your local Git workspace with remote GitHub repositories:
253
389
  * **Context Auto-Binding**: Automatically locks onto the active Git repository of the current session;
254
- * **Freshness Pill Alignment**: Compact indicator `[πŸ“¦ Local Snapshot (2m ago)]` with live `[πŸ”„ Refresh]` button, 100% aligned with global rules for an instant 0ms first render;
390
+ * **Branch Viewing & Safe In-UI Switching (Branch Selector)**:
391
+ * Visual branch dropdown directly inside the repository card;
392
+ * Built with official **Git diamond vector icons (`#1296db` SVG)**;
393
+ * Pre-fetched with the overview payload for an **instant 0ms dropdown opening**, featuring live keyword search across local and remote branches;
394
+ * **Dirty File Guard**: Strict pre-flight checks block switching if there are uncommitted changes, protecting work from destructive overwrites;
395
+ * **Freshness Pill Alignment**: Compact indicator `[πŸ“¦ Local Snapshot (2m ago)]` with live `[πŸ”„ Refresh]` button;
255
396
  * **Quick Action Grid**: Open repo in browser, jump to Issues/PRs, create PRs with one click;
256
- * **Five Mutually Exclusive Tabs**: Compact tabbed navigation directly below the quick action grid, reducing vertical scrolling:
397
+ * **Five Mutually Exclusive Tabs**: Compact tabbed navigation directly below the quick action grid:
257
398
  * **Git Records (`Git`)** (Default tab):
258
399
  * Branch & Remote Sync: Real-time branch indicator (e.g. `master`) with tracking sync status (`βœ“ Up to date` or `↑N to push` / `↓N to pull`);
259
400
  * Three-Section Commit View: Unpushed commits (ahead of remote), unpulled commits (behind remote), and recent commit history;
260
401
  * 15 commits displayed by default, with **infinite scroll loading** when scrolling to the bottom (with live `15 / 74` progress counter and click trigger);
261
- * Latest Release badge (`🏷️ v0.2.1`) anchored in the top right with hover details and direct release link;
262
- * **Commit Detail Modal**: Click any commit row to open a clean modal dialog centered within the right sidebar (scoped inside drawer boundaries without overflowing full-screen), featuring smooth vertical scrolling, full 40-char SHA, author email, date, multi-line commit message body, and file diff stat table (`--stat`); pure local 0ms instant display, closable via `Esc`, close button, or backdrop click;
402
+ * Latest Release badge (`🏷️ v0.4.0`) anchored in the top right with hover details and direct release link;
403
+ * **Commit Detail Modal**: Click any commit row to open a clean modal dialog centered within the right sidebar, featuring smooth vertical scrolling, full 40-char SHA, author email, date, multi-line commit message body, and file diff stat table (`--stat`), pure local 0ms instant display;
263
404
  * **Uncommitted Changes (`πŸ“ Uncommitted (N)`)**: Full-width list of uncommitted files with color-coded status codes (`??` untracked, `M` modified, `D` deleted, `R` renamed) and change counts;
264
405
  * **Pull Requests (`πŸ”€ PR (N)`)**: Open PR inspection with 3-state CI check rollup (`βœ… CI Passed` / `❌ CI Failed` / `⏳ CI Pending`), merge conflict detection, review decisions (`βœ” Approved` / `βœ‹ Changes Requested` / `πŸ‘€ Review Required`), Draft pills, and humanized relative timestamps;
265
406
  * **Workspace Issues (`πŸ“‹ Issues (N)`)**: Direct issue task review with assignees, labels, and category pills;
266
407
  * **Actions Pipeline (`⚑ Actions (N)`)**: Real-time CI workflow status tracking with trigger event badges (`push`/`schedule`/`manual`/`PR`), relative time, and self-healing diagnostic notes for failed runs (embedding `run_id` for Agent one-click log inspection);
267
- * **Official Git Vector Icon**: High-definition Git diamond vector icon (`#1296db` SVG) across all Git and branch labels;
268
408
  * **βš™οΈ Full Settings Access**: Dedicated settings button reusing the same settings modal as the cockpit (all four sections: Sync / Proxy / Update Source / About) β€” no need to switch back to the main page.
269
409
 
270
410
  <p align="center">
@@ -272,27 +412,27 @@ Located in the right drawer of every chat workspace, seamlessly bridging your lo
272
412
  </p>
273
413
 
274
414
  ### 3. Settings Center (Settings Modal)
275
- Click **`[βš™οΈ Settings]`** in the top right of the Cockpit (or the βš™οΈ button in the right sidebar) to open the sectioned settings modal (left-side navigation, independently scrolling content; collapses to horizontal tabs on narrow screens):
415
+ Click **`[βš™οΈ Settings]`** in the top right of the Cockpit (or the βš™οΈ button in the right sidebar) to open the sectioned settings modal:
276
416
 
277
- **πŸ”„ Data Sync Section** β€” tune data fetching rhythm:
278
- * **Two Sync Strategies**:
279
- * **⚑ Instant Render (SWR, Recommended)**: Instantly displays local cache (0ms), then silently syncs the latest state within 300ms β€” no matter how stale the cache is, opening the panel self-heals to fresh data;
417
+ **πŸ”„ Data Sync Section** β€” tune data fetching rhythm and perception sensitivity:
418
+ * **Three Mutually Exclusive Data Refresh Strategies**:
419
+ * **⚑ Instant Render (SWR, Default)**: Instantly displays local cache (0ms), then silently syncs the latest state in the background on initial load;
420
+ * **☁️ Cloud Scheduled Auto-Sync (SWR + Polling)**: Instantly renders local cache and syncs once on mount, then counts down cyclically (**5/10/30/60 minutes** selectable; features automatic window visibility pause to prevent API quota drain in background tabs);
280
421
  * **πŸ“‹ Manual Only (Energy Saver)**: Browse local cache only; zero background `gh` processes triggered; click `[πŸ”„ Refresh]` whenever you want updates.
422
+ * **Advanced Automation & Status Perception**:
423
+ * **πŸ“ Local Git Real-Time Watch (Right Sidebar Only, Enabled by Default)**: Monitors `.git/HEAD` and `.git/index` metadata directly; staging, commit, and branch changes synchronize to the sidebar within milliseconds with an 800ms debounce, consuming zero external network quota; omitted from the main cockpit to preserve lightweight performance.
281
424
  * **Visual Cache Management**: Real-time snapshot size and timestamp visibility with one-click `[πŸ—‘οΈ Clear Cache]`.
282
425
 
283
426
  **🌐 Network Proxy Section** β€” route all plugin traffic through your proxy:
284
- * **Global Scope**: Once configured, the cockpit, right-sidebar panel, all 9 Agent tool invocations, and one-click upgrades route through the proxy; when disabled, system environment proxies (`HTTPS_PROXY` etc.) or direct connections apply;
285
- * **Protocol Support**: `http://` / `https://` / `socks5://` / `socks5h://` (gh and npm chains natively support SOCKS5; `socks5h` delegates DNS resolution to the proxy for stronger pollution resistance; the npm version probe uses Node fetch which does not support SOCKS β€” it stays direct and the UI states this honestly);
427
+ * **Global Scope**: Once configured, the cockpit, right-sidebar panel, all 9 Agent tool invocations, and one-click upgrades route through the proxy;
428
+ * **Protocol Support**: `http://` / `https://` / `socks5://` / `socks5h://` (`socks5h` delegates DNS resolution to the proxy for stronger pollution resistance);
286
429
  * **`[πŸ§ͺ Test Connectivity]`**: One-click latency probe against the GitHub API through the current proxy;
287
430
  * **Instant Effect**: Persisted to `~/.dsh/data/dsh-github-flow/proxy.json` (auto-restored on DSH restart) β€” no restart, no plugin reload;
288
- * **Visibility**: A `🌐 Proxy` badge appears in the cockpit title bar while active; hover to inspect the current proxy URL;
289
- * **NO_PROXY Exclusions**: `localhost` and `127.0.0.1` are forcibly included β€” loopback Web API requests are never hijacked by the proxy.
431
+ * **NO_PROXY Exclusions**: `localhost` and `127.0.0.1` are forcibly included.
290
432
 
291
433
  **⬆️ Update Source Section** β€” choose which npm registry checks for new versions:
292
434
  * **Three options**: 🌍 npm official registry (default β€” new releases visible immediately) / πŸ‡¨πŸ‡³ npmmirror (fast in China; minutes-level sync delay) / β›” No update checks (only silences the upgrade banner; `/gh upgrade` and one-click upgrade remain available);
293
435
  * **Strict single-source**: the selected source is never silently swapped β€” probe failures are reported honestly;
294
- * **Detection & upgrade traffic follows the global proxy setting** (socks5 boundary stated honestly in the UI);
295
- * **One-click upgrade installs from the selected source** β€” consistent with version detection;
296
436
  * **Verify on save**: switching sources immediately probes the new registry and shows the latest version.
297
437
 
298
438
  **ℹ️ About Section** β€” plugin identity & project info:
@@ -312,15 +452,14 @@ Click **`[βš™οΈ Settings]`** in the top right of the Cockpit (or the βš™οΈ but
312
452
  Never miss an update! Built-in industrial-grade update management:
313
453
 
314
454
  1. **Parallel Detection, Zero gh-Dependency**:
315
- - Update checks fire **in parallel with the gh environment chain** (install/login/business data) on mount β€” never serialized behind gh overviews; gh failures never block upgrade banners;
455
+ - Update checks fire **in parallel with the gh environment chain** on mount β€” never serialized behind gh overviews; gh failures never block upgrade banners;
316
456
  - Server-side `inFlightPromise` merging + 24h cache keeps multi-panel mounting storm-free.
317
457
  2. **Selectable Update Source** (see the "⬆️ Update Source" settings section):
318
458
  - Defaults to the **npm official registry** (new releases visible immediately), or switch to **npmmirror** (minutes-level sync delay);
319
- - Auto checks can be disabled entirely (only silences prompts β€” `/gh upgrade` and one-click upgrade stay available).
459
+ - Auto checks can be disabled entirely.
320
460
  3. **Cross-Platform One-Click Upgrade**:
321
461
  - **Click to Upgrade**: Click **`[⚑ Upgrade]`** in the UI to update in the background;
322
462
  - **Auto OS Adaptation**: Differentiates macOS and Windows; auto-injects Homebrew PATH variables on macOS GUI launches;
323
- - **Registry Follows Setting**: One-click upgrades install from the source selected in Update Source settings;
324
463
  - **Source Protection**: Automatically aborts npm overwrites when running in local Git linked development mode (`link:`);
325
464
  - **Restart Guidance**: Clearly notifies users to restart DSH service to reload backend tools, with instant web refresh options.
326
465
 
@@ -330,10 +469,11 @@ Never miss an update! Built-in industrial-grade update management:
330
469
 
331
470
  Why did the Global Cockpit take several seconds to load in earlier releases? Because it concurrently executes a dozen `gh` processes scanning multiple repositories and workspaces. This plugin integrates the **Stale-While-Revalidate (SWR)** caching pattern, putting total control back in your hands:
332
471
 
333
- ```
472
+ ```text
334
473
  Initial Mount (0ms) ──────────> Instantly render local persistent snapshot
335
474
  β”‚
336
- β”œβ”€β”€ SWR Mode: Idle 300ms delay, silently revalidate in background
475
+ β”œβ”€β”€ SWR Mode: Idle 300ms delay, silently revalidate in background once
476
+ β”œβ”€β”€ Cloud Scheduled Sync: Starts countdown after initial sync (5/10/30/60m pause on hide)
337
477
  └── Manual Mode: Browse offline snapshot, only fetch on click [πŸ”„ Refresh]
338
478
  ```
339
479
 
@@ -341,50 +481,50 @@ Initial Mount (0ms) ──────────> Instantly render local persi
341
481
 
342
482
  | Sync Strategy | Mechanism | Recommended Use Case |
343
483
  | :--- | :--- | :--- |
344
- | **⚑ Instant Render (SWR, Default)** | **0ms instantaneous mount** from local cache, silently revalidating in background within 300ms β€” however stale the snapshot, opening the panel self-heals to fresh data. | **Recommended for all developers**. Eliminates spinner freezes, delivering seamless UX. |
484
+ | **⚑ Instant Render (SWR, Default)** | **0ms instantaneous mount** from local cache, silently revalidating in background once on mount β€” however stale the snapshot, opening the panel self-heals to fresh data. | **Recommended for all developers**. Eliminates spinner freezes, delivering seamless UX. |
485
+ | **☁️ Cloud Scheduled Auto-Sync (SWR + Polling)** | Instantly renders local cache and revalidates on mount, then starts a recurring timer (5/10/30/60m); features visibility-change pause to prevent background API quota drain. | **Active developers managing multiple repositories, PR workflows, and team issues**. |
345
486
  | **πŸ“‹ Manual Only (Energy Saver)** | Browse local cache only; zero automated background `gh` processes. | **Battery-powered laptops, low-spec hardware, or metered networks**. Zero background waste. |
346
487
 
347
- * **Offline Resilience (Fail-Safe)**: Even when disconnected or hitting network timeouts, **your dashboard preserves the complete snapshot for searching, navigation, and reviewβ€”zero blank screens or crash popups!**
488
+ * **Offline Resilience (Fail-Safe)**: Even when disconnected or hitting network timeouts, **your dashboard preserves the complete snapshot for searching, navigation, and review, paired with prominent offline warning banners and toastsβ€”zero blank screens or crash popups!**
348
489
 
349
490
  ---
350
491
 
351
492
  ## πŸ’¬ Human Slash Commands
352
493
 
353
- Type directly into the DSH chat box:
494
+ Enter in any DSH chat window:
354
495
 
355
- * `/gh status`: Diagnostics for GitHub account authentication, scopes, repository binding, and plugin version;
356
- * `/gh upgrade`: Check latest npm version with platform-adapted upgrade commands;
357
- * `/gh help`: View command usage and Agent prompt examples.
496
+ * `/gh status`: Diagnostics for GitHub CLI auth status, scopes, active workspace repository, plugin version, and **runtime toolchain telemetry (health score & degradation rates)**;
497
+ * `/gh upgrade`: Check the latest npm release and output platform-tailored upgrade instructions (macOS / Windows / Linux);
498
+ * `/gh help`: View help documentation and example Agent dialogue recipes.
358
499
 
359
500
  ---
360
501
 
361
- ## βš™οΈ Configuration (`cordis.patch.yml`)
502
+ ## βš™οΈ Plugin Configuration (`cordis.yml`)
362
503
 
363
- Works out of the box, with optional tweaks in `cordis.patch.yml` or your profile:
504
+ Fine-tune options via DSH config:
364
505
 
365
506
  ```yaml
366
- - insert:
367
- - id: github-flow
368
- name: dsh-github-flow
369
- config:
370
- ghPath: 'gh' # GitHub CLI executable path
371
- defaultTimeoutMs: 30000 # Command timeout in milliseconds (default 30s)
372
- maxOutputChars: 24000 # Safe output character ceiling (Token protection)
373
- maxOutputBytes: 96000 # Safe UTF-8 byte ceiling (default maxOutputChars * 4)
374
- defaultListLimit: 20 # Default list size for pr/issue/run/release/skill queries
375
- cacheTtlMs: 15000 # Repository overview cache TTL (default 15s)
376
- checkUpdate: true # Enable automatic update checks (default true)
377
- agentEnvInjection: true # Inject AI_AGENT=dsh identity into gh (auto agent-friendly output on gh β‰₯2.99; false restores native gh behavior)
378
- updateCheckIntervalMs: 86400000 # Check interval in ms (default 24h)
379
- registryUrl: '' # Custom private npm registry URL
380
- proxyUrl: '' # Preset proxy default (e.g. 'http://127.0.0.1:7890'; only applies before the cockpit setting is saved β€” UI setting takes precedence)
507
+ - id: github-flow
508
+ name: dsh-github-flow
509
+ config:
510
+ ghPath: 'gh' # GitHub CLI executable path (default 'gh')
511
+ defaultTimeoutMs: 30000 # Command execution timeout in ms (default 30s)
512
+ maxOutputChars: 24000 # Max character output threshold (Token overflow protection)
513
+ maxOutputBytes: 96000 # Hard UTF-8 byte output cap, defaults to maxOutputChars * 4
514
+ defaultListLimit: 20 # Default query limit for list operations across PR/Issue/Run/Release/Skill
515
+ cacheTtlMs: 15000 # Repository overview cache TTL in ms (default 15s)
516
+ checkUpdate: true # Enable automated version checks (default true)
517
+ agentEnvInjection: true # Inject AI_AGENT=dsh for gh CLI recognition (default true)
518
+ updateCheckIntervalMs: 86400000 # Update check interval in ms (default 24h)
519
+ registryUrl: '' # Custom npm registry (defaults to Update Source setting)
520
+ proxyUrl: '' # Default proxy URL (overridden by UI settings)
381
521
  ```
382
522
 
383
523
  ---
384
524
 
385
- ## πŸ”Œ Ecosystem Extensibility (Cordis Service)
525
+ ## πŸ”Œ Cordis Ecosystem Service (`ctx.github`)
386
526
 
387
- Provides standard Cordis service `ctx.github`. Other plugins can reuse it directly:
527
+ Exports a standard Cordis service `ctx.github` for other DSH plugins:
388
528
 
389
529
  ```typescript
390
530
  import type { Context } from '@deepseek-ai/cordis';
@@ -400,16 +540,20 @@ export function apply(ctx: Context) {
400
540
 
401
541
  ---
402
542
 
403
- ## πŸ“š Documentation
543
+ ## πŸ“š Documentation & Technical References
404
544
 
405
545
  - [npm Publishing & Automated CI Guide](./docs/npm-publish-guide.md)
406
546
  - [Architecture & Technical Specifications](./docs/architecture.md)
547
+ - [Release Checklist & Pitfall Guide](./docs/UPGRADE-NOTES.md)
407
548
 
408
549
  ---
409
550
 
410
- ## Friendship links
411
- - [LINUX DO - A new ideal community](https://linux.do/)
551
+ ## Community Links
552
+
553
+ - [LINUX DO - A New Community for Developers](https://linux.do/)
554
+
555
+ ---
412
556
 
413
557
  ## πŸ“„ License
414
558
 
415
- Open-sourced under the [MIT License](./LICENSE). Contributions, PRs, and Issues are welcome!
559
+ Open-sourced under the [MIT License](./LICENSE). Contributions and PRs welcome!