docs: move unidesk skills into repo

This commit is contained in:
Codex
2026-06-09 07:14:06 +00:00
parent ad59a96be2
commit e17f15bdce
7 changed files with 1289 additions and 1 deletions
+168
View File
@@ -0,0 +1,168 @@
---
name: unidesk-code-queue
description: UniDesk legacy Code Queue archive CLI — `codex` 子命令只保留历史任务只读查看、未读积压、trace/output 分页、read、interrupt/cancel 残留任务和本地 prompt-lint;新任务提交、steer、resume、queue mutation 和 move 已冻结,必须使用 `agentrun v01 queue|sessions`。用户提到 codex、Code Queue、submit、steer、resume、tasks、unread、code-queue 时使用。
---
# UniDesk Legacy Code Queue CLI
旧 Code Queue 已冻结新任务和写入口。`bun scripts/cli.ts codex ...` 现在只作为历史归档、只读排障、残留任务停止和 prompt-lint 入口;新的指挥官派单、trace/output、read/cancel、steer/reuse 必须走 AgentRun Queue/Sessions。
**固定入口前缀**: `cd /root/unidesk && bun scripts/cli.ts codex ...`
---
## 新任务入口
```bash
# 查看 AgentRun 指挥官队列
bun scripts/cli.ts agentrun v01 queue commander --reader-id <id>
# 提交 AgentRun Queue payload
bun scripts/cli.ts agentrun v01 queue submit --json-file /tmp/task.json
# 查看/控制 AgentRun session
bun scripts/cli.ts agentrun v01 sessions trace <sessionId>
bun scripts/cli.ts agentrun v01 sessions output <sessionId>
bun scripts/cli.ts agentrun v01 sessions read <sessionId>
bun scripts/cli.ts agentrun v01 sessions steer <sessionId> --prompt-stdin
bun scripts/cli.ts agentrun v01 sessions cancel <sessionId>
```
UniDesk bridge 会把本地 `--json-file``--prompt-file``--runner-json-file``--prompt-stdin` materialize 到 G14 `/root/agentrun-v01` 临时文件,然后调用官方 `./scripts/agentrun --manager-url auto`。它不是旧 Code Queue adapter,不双写,也不迁移旧历史。
---
## 冻结的旧写入口
以下命令必须返回 `ok=false``frozen=true``degradedReason=legacy-code-queue-frozen`,并提示 AgentRun 替代命令:
```bash
bun scripts/cli.ts codex submit ...
bun scripts/cli.ts codex enqueue ...
bun scripts/cli.ts codex steer <taskId> ...
bun scripts/cli.ts codex resume <taskId> ...
bun scripts/cli.ts codex queue create <queueId>
bun scripts/cli.ts codex queue merge <sourceQueueId> --into <targetQueueId>
bun scripts/cli.ts codex move <taskId> --queue <queueId>
```
不要用兼容开关、legacy mode、adapter、双写或 fallback 绕开冻结边界。
---
## 历史任务视图
### Commander(低噪声轮询)
```bash
bun scripts/cli.ts codex tasks --view commander [--limit N]
```
返回旧 Code Queue 历史/残留任务的有界 action mapactive runners 计数、少量 active item、queued/retry_wait 计数、terminal-unread 总数、关键风险计数、分类计数和 drill-down 命令。新任务队列状态用 `agentrun v01 queue commander`
### Supervisor(分区视图)
```bash
bun scripts/cli.ts codex tasks --view supervisor \
[--status succeeded|running|queued|failed|canceled|judging|retry_wait] \
[--unread] [--limit N] [--before-id id]
```
返回 `activeRunning``running``completedUnread``recentCompleted``queued` 分区。状态 alias`completed|successful → succeeded``cancelled → canceled``pending → queued`
### 单任务
```bash
bun scripts/cli.ts codex task <taskId> [--detail|--full] [--trace]
```
---
## 未读积压
```bash
# 摘要
bun scripts/cli.ts codex unread [--queue id] [--repo owner/name] [--issue N]
# 详细列表
bun scripts/cli.ts codex unread list [--view full] [--limit N]
# 标记已读
bun scripts/cli.ts codex unread mark-read --confirm [--queue id]
```
`mark-read` 必须 `--confirm`,单任务审阅优先用 `codex read <taskId>`
---
## Trace / Output 分页
```bash
# 逻辑 trace(分页)
bun scripts/cli.ts codex task <taskId> --trace \
[--tail|--from-start|--after-seq N|--before-seq N] [--limit N] [--full]
# 原始 output(分页补取)
bun scripts/cli.ts codex output <taskId> \
[--tail|--from-start|--after-seq N|--before-seq N] [--limit N] [--full-text]
```
---
## 标记已读
```bash
bun scripts/cli.ts codex read <taskId>
```
标记单个终态任务已读,同时返回任务身份、终态 attempt 摘要和最终 response。
---
## Judge(复现评判)
```bash
bun scripts/cli.ts codex judge <taskId> --attempt N [--dry-run] [--include-prompt]
```
按指定 attempt 单步复现 judge,诊断入口。
---
## 中断/取消
```bash
bun scripts/cli.ts codex interrupt <taskId>
bun scripts/cli.ts codex cancel <taskId>
```
仅用于停止旧 Code Queue 残留任务;新 AgentRun session 使用 `bun scripts/cli.ts agentrun v01 sessions cancel <sessionId>`
---
## 旧队列归档
```bash
bun scripts/cli.ts codex queues [--full|--all] [--limit N] [--page N]
```
只读查看旧队列摘要。旧 queue create/merge 和 move 已冻结。
---
## Dev Ready / PR Preflight
```bash
bun scripts/cli.ts codex dev-ready
bun scripts/cli.ts codex pr-preflight [--remote] [--push-dry-run ...] [--pr-create-dry-run ...] [--issue N] [--full|--raw]
```
---
## Prompt Lint
```bash
bun scripts/cli.ts codex prompt-lint [prompt|--prompt-file path|--prompt-stdin]
```
AgentRun 派单或 steer 前的本地 dry-run lint,返回分级(`read-only|live-read|live-mutating`)和缺失项。它只用于 AgentRun payload 入队前的 prompt 审查,不提交旧 Code Queue 任务。