liu3734 / jira-tasks-dsh-plugin

Listed

在 DSH 会话输入框下方展示当前 JIRA 项目指派给当前用户的「开启 / 重新开启」任务列表。JIRA 地址与令牌从凭据读取;项目 Key 与 JQL 按工作区配置并持久化。

mainOther View source

Installation

npx -y @deepseek-ai/dsh plugin --profile web add github:liu3734/jira-tasks-dsh-plugin

This installation command is an unverified starting point generated from the GitHub repository address.

README

Maintainer-authored documentation snapshot.

View on GitHub ↗
Commit e99a577Synced Aug 18, 2026

JIRA 开启任务面板(DeepSeek Harness 插件)

License: MIT

中文 · English

在 DSH 会话输入框下方展示当前 JIRA 项目指派给当前用户的「开启 / 重新开启」任务列表。JIRA 地址与令牌从凭据读取;项目 Key 与 JQL 按工作区配置并持久化。

功能

  • 📋 新会话与活跃会话的输入框下方均展示任务面板(新会话时与输入框等宽)
image image
  • 👤 默认仅显示当前用户(assignee = currentUser())的「开启 / 重新开启」任务
  • ⚙️ 项目 Key 与 JQL 按工作区保存;未配置的工作区显示"未配置"
  • 🔄 打开新会话自动查询,面板内支持一键刷新(⟳)
  • 🔗 任务可点击,在新标签页打开 JIRA 详情
  • 🎨 颜色使用 DSH 主题令牌,浅色 / 深色主题自适应

安装

包已发布到 npm:

dsh plugin --profile desktop add dsh-jira-tasks

重启 DSH 后生效。

手动安装(不使用 npm)
  1. 将仓库 profile-package/ 复制为 ~/.dsh/profiles/desktop/packages/dsh-jira-tasks/
  2. 编辑 ~/.dsh/profiles/desktop/package.json
    • dependencies 增加:"dsh-jira-tasks": "file:./packages/dsh-jira-tasks"
    • dsh.profile.bundles 追加:"dsh-jira-tasks"
  3. 在 profile 目录执行 pnpm install
  4. 重启 DSH

注:pnpm install 会把包复制node_modules/(非符号链接),改动源码后需同步 node_modules/dsh-jira-tasks 或重跑 install。

动态插件方式(临时,重启后消失)

在 DSH 会话中用 Cordis 工具执行:cordis_definekind: newidPrefix: "jira",源码见仓库 plugin/host.js / plugin/client.js)→ cordis_run 激活。动态插件只存在于进程内存,重启后消失,仅适合临时试用。

配置

1. JIRA 地址与令牌

写入 $DSH_HOME/.credentials.yaml(推荐,热加载无需重启),或启动 DSH 前导出环境变量:

JIRA_BASE_URL: "http://jira.example.com/"
JIRA_API_TOKEN: "<PAT 或 user:token>"
  • 地址别名:JIRA_BASE_URL / JIRA_URL
  • 令牌别名:JIRA_API_TOKEN / JIRA_TOKEN
  • 认证自动识别:令牌含 : 用 Basic,否则用 Bearer(JIRA PAT)

2. 项目 Key 与 JQL(按工作区)

  • 点击面板标题右侧 打开设置(表单顶部提示当前配置归属的工作区)
  • 项目 Key:如 HCPFYH1,保存后立即查询,该工作区后续新会话自动加载
  • JQL:留空使用默认查询;也可填写自定义 JQL,{projectKey}(或 {key})会被替换为项目 Key

默认查询:

project = "{projectKey}" AND status in ("开启", "重新开启") AND assignee = currentUser() ORDER BY updated DESC

状态名按中文工作流("开启"/"重新开启")配置;若 JIRA 用英文状态(Open/Reopened),在 ⚙ 中填写自定义 JQL 即可。

卸载

dsh plugin --profile desktop remove dsh-jira-tasks

常见问题

面板显示「查询失败」
提示处理
未配置环境变量 JIRA_BASE_URL凭据未写入,见上文「配置 1」
401 …令牌无效或认证方式不对;先 curl -H "Authorization: Bearer <token>" <base>/rest/api/2/myself 验证
无法解析 JIRA 响应网络 / 代理问题,curl 无输出
面板不显示
  • 确认已安装并重启 DSH;新会话面板位于输入框下方
  • 检查 DSH 启动日志中 profile 插件是否加载成功

架构与实现细节

点击展开
┌─────────── 浏览器(Client) ───────────┐      ┌──────────── Host ──────────────┐
│ conversation.composer.dock(活跃会话)      │      │ webServer 路由 /jira/api/search │
│ conversation.input.dock(新会话, order:99)│      │   ↓                            │
│   ↓ 挂载时/刷新时 fetch POST               │      │ credentials.resolve(JIRA_*)     │
│ 渲染:任务列表 / 错误 / 未配置               │      │ subprocess.spawn(curl …)        │
│ localStorage 按工作区存取配置                │      │   ↓ stdout JSON                 │
└────────────────────────────────────────────┘      │ 解析 issues → 返回 {ok,issues}  │
                                                    └────────────────────────────────┘
  • Host:注册 webServer 路由 POST /jira/api/search;凭据经 credentials 服务解析(环境变量 / $DSH_HOME/.credentials.yaml,热加载);查询用 subprocess 直接 spawn curl,认证头经 stdin(--config -)传入,令牌不进入命令行参数。
  • Clientwindow.__ModuleLoader__.load({ id, factory }) 标准 web bundle;注册 conversation.composer.dock(活跃会话)与 conversation.input.dock(新会话,flex order: 99 置于输入框下方、与输入框等宽)。
  • 为什么不用 shell 服务shell 会套 sandbox-exec,部分 macOS 上不可用(sandbox_apply: Operation not permitted);subprocess 是原始进程缝,无此问题。
  • 新会话显示:DSH 壳在 hero(空白会话)阶段不渲染 composer.dock,故额外注册 input.dock,并用「会话是否已有消息」去重,避免双份面板。

与动态插件版的差异

维度动态插件正式安装(本包)
持久性重启丢失重启保留
Client→Host 通信host.call / harness.handlewebServer 路由 + fetch
客户端 bundle会话内注入/plugins/dsh-jira-tasks/client.js
配置 / 凭据同一 localStorage 键、同一 .credentials.yaml完全相同

License

MIT

Project files and signals

Shown items are public repository signals detected in the directory snapshot.

Plugin manifestDetected

Repository information

Language
JavaScript
License
MIT
Last updated
Aug 17, 2026, 10:46 AM

Install deliberately

Review source code, permissions, lifecycle hooks, dependencies and network access. Test untrusted plugins in an isolated environment.