← Plugins

TAPD Workbench

在 Paseo 中查看与处理 TAPD 需求、任务与缺陷:过滤视图、派给 Agent、评论与状态回写 / View and work on TAPD stories, tasks, and bugs in Paseo: filter views, agent dispatch, comment and status write-back

$ paseo plugin add casonmo/tapd-workbench
Report a bug
casonmoUtils9installsc4a7033c08faSource
TAPD Workbench screenshot 1

TAPD workbench brings TAPD (stories, tasks, and bugs) into Paseo.

The main screen has an aggregate tab that shows stories, tasks, and bugs side by side, plus one tab per type.In the aggregate tab each column groups its items by status, and groups collapse and expand; a toolbar toggle turns grouping off. A type tab shows a board whose columns are the workflow statuses of that type, with colored status labels. All statuses of the selected type appear as columns, including empty ones; you can pick which columns to display. Filters cover keyword, owner, creator, status scope, iteration, updated-within window, priorities, bug severities, and labels, plus any field reported by the workspace's TAPD field definitions (synced automatically). A filter combination can be saved as a reusable view, switched from the toolbar, updated in place, or set as the default. The built-in "Related to me" view matches items where you are the owner, creator, developer, participator, watcher, or commenter, and stories whose linked tasks involve you. Cards can be starred to pin them to the top.

Board loading uses a stale-while-revalidate cache on the daemon (90 seconds per filter combination, per-request TAPD responses cached 20 seconds, metadata up to 30 minutes). Within the TTL the board renders instantly; when expired, the last snapshot is shown immediately with a note ("showing data from N minutes ago, refreshing in the background") while the daemon refetches in the background, and the workbench polls every 3 seconds until fresh data arrives. The Refresh button bypasses the cache for a forced reload, and changing plugin settings clears all caches. A configurable auto-refresh (Settings → 看板, seconds; off by default, minimum 30, maximum 3600) makes the workbench send a forced board request on that cadence. Push and pull stay manual buttons; in addition, once a Git sync URL is configured, any settings change is auto-pushed as a sanitized backup about 10 seconds (trailing debounce) after the last change — silent when sync is unconfigured, on push failure, and a pull never re-triggers anything new (the pushed payload after a pull is identical, fine-grained no-op). Cross-project list queries fan out in parallel per project.

Opening an item shows status, owner, creator, iteration, description, and recent comments in a detail window, with actions to open it in TAPD or copy its link. Story details additionally list the tasks and bugs attached to the story (each capped at 200 rows, paginated 10 per page, with a "first 200 / N total" hint when the real count exceeds the cap), and task/bug details provide a jump back to the parent story. Board cards for tasks and bugs show #id on its own line under the title plus a parent-story chip; in the story detail window, hovering a child-list row title expands the full text inline (desktop); on touch devices, tapping a row simply opens the item.

Workflow features: dispatch an item to a coding agent by picking a repository and provider/model; the plugin creates a worktree workspace and starts an agent whose prompt contains the item snapshot. Dispatched workspaces and agents are tracked from the item and the card. The plugin can write a comment back to TAPD (plain text converted to HTML), change the item's workflow status, and create new stories, tasks, or bugs from the board. The story detail window additionally offers one-click creation of a task or bug under that story (TAPD story_id is written for the parent link, and the story's workspace is used so items never land in the wrong project). The mounted create form asks the TAPD fields-info endpoint per entity type for remaining writable fields (enum/user fields render as option chips or a nickname input; date-like fields — including custom fields whose label mentions 时间/日期 — open a self-drawn month calendar with yesterday/today/tomorrow shortcuts), defaults the owner to the current token user (resolved once per open via the TAPD users/info endpoint), and lets the user reorder or hide fields in a layout that is stored per entity type in plugin settings, so it is carried along by settings sync automatically.

An item can also be linked to an existing agent from the item detail window. The prompt dialog comes prefilled with a default notice — editable before sending; clearing it binds without sending — and the link is tracked on the card and in the detail window. The workbench surfaces the linked agent's live status: the "Linked" chip on a card carries a colored dot, and the detail window's link rows show the status label, a timestamp, and the latest turn result (short summary, or the error message for failed turns); updates arrive through the daemon's agent event stream with a short throttle. A settings toggle (Settings → Agent, off by default) makes the daemon record each agent turn result and, when the toggle is on and the agent is linked to an item, automatically post the result summary as a TAPD comment through the same comment channel.

Agent sessions receive the TAPD connection variables (TAPD_TOKEN, TAPD_API_ENDPOINT, TAPD_SITE_URL, TAPD_WORKSPACE_IDS) when they are not already defined, so a linked agent can call the TAPD OpenAPI directly.

An attachment source lets you search TAPD items by keyword or ID while composing a prompt and attach a text snapshot (title, status, owner, link).

Settings → Config sync (Git) backs up the non-secret settings (views, favorites, board columns, item↔agent links, default dispatch repo/model, the auto-report toggle, and so on) to the user's own Git repository or restores them from it: enter a repository URL (HTTPS or SSH), an access token, and a branch, then use the Push / Pull buttons. The synced artifact is tapd-workbench-settings.json at the repository root; privacy-sensitive fields stay on the machine and are never written into it: the TAPD token, the Git token, the project IDs, and the local dispatch repo path; pulling does not overwrite the sync configuration itself. Pushing creates one commit from the current settings (skipped when nothing changed) and supports first push to an empty repository and falling back to the default branch when the requested branch is missing. Pulling takes the repository's latest file and overwrites the non-secret fields wholesale. Typical flow: configure the plugin normally and push once; after reinstalling or moving machines, fill in the connection and sync settings and pull to recover links and other data.

Connection and data: the plugin runs on the daemon side and calls the TAPD OpenAPI only, using the token solely as the TAPD Authorization header. Credentials and project IDs come from the plugin settings screen, falling back to the daemon environment variables TAPD_TOKEN and TAPD_WORKSPACE_IDS. A token saved in the plugin settings is stored as plain JSON on the daemon host and is readable by the connected settings interface; prefer the environment variable when that is a concern. The TAPD API base URL (default https://api.tapd.cn) and the web link base (default https://www.tapd.cn) can be overridden per daemon with the TAPD_API_ENDPOINT and TAPD_SITE_URL environment variables. Reads cover every configured project; write operations (comments, status changes, item creation) run only on explicit user action and target the item's actual project when known, falling back to the first configured TAPD project; the one exception is the explicit "auto-report comments" toggle, which posts one result comment per agent turn to the item the agent is linked to. Agent dispatch goes through the Paseo SDK after confirmation in the dispatch dialog, and the item snapshot used as the agent prompt is sent to the selected agent provider. The plugin performs no filesystem writes of its own; the one exception is config sync, where the daemon makes a shallow clone of the user-configured Git repository in the system temp directory, writes tapd-workbench-settings.json and pushes (or reads that file back), deleting the clone afterwards. In HTTPS mode the Git token travels to the configured Git host during clone/push, and the authenticated clone URL (token included) is stored in the temporary clone's .git/config until the clone is deleted; SSH mode performs no authentication. Error text never echoes the token, and pulling never replaces the locally configured sync destination (URL/branch) or any secret field. When the workbench opens, the plugin checks for updates by fetching the public registry record and the manifest at the pinned commit from GitHub (api.github.com, falling back to raw.githubusercontent.com); no credentials or user data are sent and the result is cached for an hour. Config sync adds exactly one more network destination: the Git repository the user configured in settings; in HTTPS mode the Git token is sent to that host during clone/push and briefly lives in the temporary clone's .git/config (deleted with the clone). Push and pull run only from the settings buttons, the payload is the sanitized settings JSON with tokens never echoed in errors, a pull cannot change the local sync destination or import secret fields, and a push aborts outright if the sanitized payload would still contain the TAPD or Git token text (credentials can never reach the repository through an accidental managed field). If the registry pins a newer version, the workbench shows a dismissible banner inviting the user to run the update command. Requires Paseo 0.11.2 or later. Known limits: commenter matching uses the 200 most recent comments; each board column shows at most 300 items; agent status and the last turn record live in daemon memory, so a daemon restart clears the last turn record (live status is re-read).

中文

TAPD 工作台把 TAPD(需求、任务、缺陷)带进 Paseo。

主界面有一个聚合页签,需求、任务、缺陷三栏并排展示,另有每种类型一个独立页签。聚合页签里每栏按状态分组,分组可折叠展开,工具栏开关可关闭分组。类型页签展示看板,列即该类型的工作流状态,状态标签带颜色。所选类型的所有状态都会作为列出现(包括空列),你可以自选要显示哪些列。过滤支持关键词、负责人、创建人、状态范围、迭代、最近更新时间窗口、优先级、缺陷严重程度、标签,以及工作区 TAPD 字段定义上报的任意字段(自动同步)。一组过滤条件可保存为可复用视图,从工具栏切换、就地更新或设为默认。内置的「我相关的」视图匹配你是负责人、创建人、开发、参与、关注或评论过的单据,以及关联任务涉及你的需求。卡片可加星置顶。

看板加载走 daemon 侧的 stale-while-revalidate 缓存(每个过滤条件独立缓存 90 秒,单条 TAPD 请求缓存 20 秒,元数据最长 30 分钟)。90 秒内再进工作台直接渲染;过期后立刻显示上一次快照并在顶部提示「正在显示 N 分钟前的数据,后台刷新中…」,同时 daemon 后台重拉,工作台每 3 秒轮询直到新数据到达。「刷新」按钮绕过缓存强制重拉,修改插件设置会清空全部缓存;还可在 设置 → 看板 配置自动刷新间隔(秒),默认关闭、最小 30 秒、上限 3600,开启后工作台按该间隔定时发送强制刷新请求。推送/拉取保持手动按钮:此外一旦配置了 Git 同步地址,设置发生变更会在最后一次变更约 10 秒后(尾随去抖)自动推送一次脱敏备份——未配置或失败时静默;拉取合并导致的设置保存触发的自动推送内容与仓库一致,等价空操作。跨项目的列表请求已按项目并行发出。

打开单据会在详情浮窗中显示状态、负责人、创建人、迭代、描述与最近评论,并提供「在 TAPD 中打开」与「复制链接」操作。需求详情会额外读取该需求下挂的任务与缺陷(TAPD 的 task.story_id / bug.story_id,各限 200 条),在列表中展示标题、状态与处理人,列表每 10 条一页可翻页;真实总数超过上限时显示「前 200 / 共 N 条」截断提示。点击列表项可在浮窗内切换到对应单据详情(未提供宿主导航时退化为在浏览器打开)。任务与缺陷详情会解析所属需求(story_id)并提供跳回入口。需求详情的子单据读取失败不会阻塞需求详情本身。任务/缺陷看板卡片把 #id 独立展示在标题下一行,并显示「需求:所属需求」标识;需求详情下挂的子单据列表行标题悬停时在行内展开全文(桌面端),触屏设备直接点按打开单据。

详情浮窗的「关联任务」区按 Agent 名称显示每条关联(缺失时回退工作区标题,再回退 ID),并展示该 Agent 的实时状态与最近一次工作结果(见上文)。

工作流能力:选择仓库与 provider/model,可把单据派给一个编码 Agent;插件创建 worktree 工作区并启动一个提示词中包含单据快照的 Agent,派发的工作区与 Agent 可从单据和卡片追踪。插件可以把评论回写 TAPD(纯文本转 HTML)、变更单据工作流状态,并在看板上新建需求、任务或缺陷;需求详情浮窗另可一键创建挂在该需求下的任务/缺陷(自动写入 TAPD 的 story_id 关联,并沿用需求所在项目,避免多项目时挂错)。挂载表单按类型向 TAPD fields_info 接口取其余可写字段动态渲染(枚举/人员字段给选项 chip 或昵称输入,日期及「时间/日期」类自定义字段打开自绘月历并带昨天/今天/明天快捷项);处理人默认当前 Token 用户(打开创建时经 TAPD users/info 解析一次);字段顺序与隐藏布局按类型存于插件设置,随设置同步自动备份。

单据也可在详情浮窗中关联到一个已有 Agent。提示词默认填入标准跟进通知,可编辑后发送,也可清空只绑定;卡片与详情浮窗都会记录这个关联。工作台会展示该 Agent 的实时状态:卡片「已关联」标签内带状态圆点,详情浮窗的关联行显示状态文字、最近状态时间与最近一次工作结果(简短摘要,失败时显示错误信息);更新经 daemon 的 agent 事件流推送(带短暂节流)。设置 → Agent 提供「完成工作后自动回写 TAPD 评论」开关(默认关闭):打开后 daemon 记录每次 turn 结果,并在该 Agent 关联了单据时,通过与手动评论相同的 TAPD 评论通道自动把结果摘要写回单据。

Agent 会话在相关变量尚未定义时会收到 TAPD 连接变量(TAPD_TOKEN、TAPD_API_ENDPOINT、TAPD_SITE_URL、TAPD_WORKSPACE_IDS),从而可直接调用 TAPD OpenAPI。

附件源支持在撰写提示词时按关键词或 ID 搜索 TAPD 单据,并附上文本快照(标题、状态、负责人、链接)。

设置 → 配置同步(Git)可把非密配置(视图、收藏、看板列、单据关联记录、派活默认仓库与模型、自动回评开关等)备份到用户自己的 Git 仓库或从中恢复:填入仓库地址(HTTPS 或 SSH)、访问令牌与分支,按「推送 / 拉取」按钮执行。同步内容为仓库根目录的 tapd-workbench-settings.json;隐私字段不出本机、不写入该文件:TAPD Token、Git 令牌、项目 ID、派活仓库路径,且拉取也不会覆盖同步配置本身。推送用当前设置生成一次提交(无变更则跳过),支持空仓库首次推送与换分支(指定分支不存在时回退默认分支);拉取取仓库最新文件并整体覆盖上述非密字段。常规流程:正常配置好插件并推送一次 → 重装/换机后填写连接信息与同步配置 → 点拉取找回关联等数据。

连接与数据:插件运行在 daemon 侧,只调用 TAPD OpenAPI,token 仅作为 TAPD Authorization 头使用。凭据与项目 ID 来自插件设置页,回退到 daemon 环境变量 TAPD_TOKEN 与 TAPD_WORKSPACE_IDS。保存在插件设置中的 token 以明文 JSON 存于 daemon 主机,可被已连接的设置界面读取;介意时请改用环境变量。TAPD API 基地址(默认 https://api.tapd.cn)与网页链接基地址(默认 https://www.tapd.cn)可分别用环境变量 TAPD_API_ENDPOINT、TAPD_SITE_URL 按 daemon 覆盖。读取覆盖所有已配置项目;写操作(评论、状态变更、建单)只在用户明确操作时执行,优先作用于单据实际所在项目(详情弹窗内的回写会携带该字段,无法确定时回退第一个配置的 TAPD 项目);唯一例外是「自动回写评论」开关明确开启时,Agent turn 结束会自动以该通道回写一条结果评论(仍只发往该 Agent 关联的单据)。派给 Agent 需在派发对话框中确认,经 Paseo SDK 执行,作为 Agent 提示词的单据快照会发送给所选的 agent provider。插件自身不做任何文件系统写入;读取结果只缓存在 daemon 内存(见上文),不落盘、不外传,修改设置即清空。唯一例外是配置同步:daemon 为用户配置的 Git 仓库在系统临时目录做浅克隆,写入 tapd-workbench-settings.json 后提交推送(或读取该文件返回),目录用完即删;HTTPS 模式下 Git 令牌会在克隆/推送时发送到该仓库服务器,并暂存于临时克隆目录的 .git/config(目录删除即清除),SSH 模式不涉及令牌;报错文本会抹去令牌,且拉取永远不会替换本机的同步目的地(地址/分支)或任何密钥字段。工作台打开时,插件会从 GitHub 拉取公开的 registry 记录与固定提交处的清单来做更新检查(api.github.com,失败时回退 raw.githubusercontent.com);不附带凭据、不发送用户数据,结果缓存一小时。配置同步只再新增一个网络目的地:用户在设置中填写的 Git 仓库(HTTPS 模式下一次克隆/推送会把 Git 令牌发送到该仓库所在主机),推送/拉取仅由设置页按钮触发,内容为脱敏的设置 JSON,报错不回显令牌,拉取不会改变本机同步目的地、也不会导入密钥字段;且推送有硬性红线:若脱敏后的负载仍含 TAPD 或 Git 令牌字面值(如误抄进视图名/收藏),推送直接中止,令牌不可能经意外字段进入仓库。若 registry 固定了更新的版本,工作台会显示一个可关闭的横幅,提示运行更新命令。需要 Paseo 0.11.2 或更高版本。已知限制:评论人匹配只取最近 200 条评论;每个看板列最多显示 300 个单据;Agent 状态与结果台账保存在 daemon 内存,daemon 重启后最近一次结果会清空(实时状态会重新读取)。