@eddyskywalker/dsh-chatgpt-subscription 0.60.0 → 0.61.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.
- package/CHANGELOG.md +26 -0
- package/lib/client.js.map +1 -1
- package/lib/codemode.js +319 -89
- package/lib/entry-plan-mode-CLRKkgYG.js +1787 -0
- package/lib/{entry-progress-updates-CxQewio9.js → entry-progress-updates-DZ0ZRus4.js} +14 -1
- package/lib/index.js +905 -574
- package/lib/plan-mode.js +2 -779
- package/lib/progress-updates.js +1 -1
- package/lib/types/compat.d.ts +1 -1
- package/lib/types/entry-codemode.d.ts.map +1 -1
- package/lib/types/entry-plan-mode.d.ts +136 -0
- package/lib/types/entry-plan-mode.d.ts.map +1 -1
- package/lib/types/host/agent-preset.d.ts.map +1 -1
- package/lib/types/host/claude/adapter.d.ts +16 -0
- package/lib/types/host/claude/adapter.d.ts.map +1 -1
- package/lib/types/host/claude/client.d.ts +7 -1
- package/lib/types/host/claude/client.d.ts.map +1 -1
- package/lib/types/host/claude/mapper.d.ts +9 -0
- package/lib/types/host/claude/mapper.d.ts.map +1 -1
- package/lib/types/host/claude/types.d.ts +10 -0
- package/lib/types/host/claude/types.d.ts.map +1 -1
- package/lib/types/host/cline-pass/mapper.d.ts.map +1 -1
- package/lib/types/host/codemode/discovery.d.ts.map +1 -1
- package/lib/types/host/codemode/rules.d.ts.map +1 -1
- package/lib/types/host/codemode/transport.d.ts +38 -0
- package/lib/types/host/codemode/transport.d.ts.map +1 -1
- package/lib/types/host/command-code/mapper.d.ts.map +1 -1
- package/lib/types/host/common/orphan-tool-calls.d.ts +48 -0
- package/lib/types/host/common/orphan-tool-calls.d.ts.map +1 -0
- package/lib/types/host/dispatch-execution-guard.d.ts +32 -2
- package/lib/types/host/dispatch-execution-guard.d.ts.map +1 -1
- package/lib/types/host/glm-coding-plan/mapper-anthropic.d.ts.map +1 -1
- package/lib/types/host/glm-coding-plan/mapper-openai.d.ts.map +1 -1
- package/lib/types/host/kimi-code/mapper.d.ts.map +1 -1
- package/lib/types/host/minimax-code/mapper.d.ts.map +1 -1
- package/lib/types/host/model-catalog.d.ts +21 -0
- package/lib/types/host/model-catalog.d.ts.map +1 -1
- package/lib/types/host/opendesign/mapper.d.ts.map +1 -1
- package/lib/types/host/plan-mode-cache-guard.d.ts.map +1 -1
- package/lib/types/host/progress-updates/nudge.d.ts +13 -1
- package/lib/types/host/progress-updates/nudge.d.ts.map +1 -1
- package/lib/types/host/qoder/mapper.d.ts.map +1 -1
- package/lib/types/host/responses-client.d.ts.map +1 -1
- package/lib/types/host/responses-mapper.d.ts +12 -0
- package/lib/types/host/responses-mapper.d.ts.map +1 -1
- package/lib/types/host/settled-job-guard.d.ts +77 -0
- package/lib/types/host/settled-job-guard.d.ts.map +1 -0
- package/lib/types/host/step-code/mapper.d.ts.map +1 -1
- package/lib/types/host/workbuddy/mapper.d.ts.map +1 -1
- package/lib/types/index.d.ts.map +1 -1
- package/package.json +1 -1
- package/presets/dispatch/README.md +7 -10
- package/presets/dispatch/agent.cordis.yml +4 -11
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
| 编号 | 内容 |
|
|
32
32
|
|---|---|
|
|
33
33
|
| R0 | 先分诊,按复杂度决定是否展开重治理流程;绝不为 L0/L1 开启完整访谈或计划模式 |
|
|
34
|
-
| R0.5 |
|
|
34
|
+
| ~~R0.5~~ | **已移除**:harness 0.2.1-rc.2 起旧代 team 运行时整体消失,调度模式不再按代检测,persona 里没有这条探测;与代次无关的任务板记账规则改由 `[Agent Teams Board]` 段承载,编排能力以 harness ≥ 0.2.1-rc.2 为下限 |
|
|
35
35
|
| R-G | L2 规划前必须做澄清访谈:设计树 / 前沿 / 轮次,每题给推荐答案,事实自己查、决策交用户,前沿为空且用户确认后才进入规划 |
|
|
36
36
|
| R1 | L2 执行拓扑按「耦合度 × 并行收益」三选一:`Lead-Core`(紧耦合跨模块由主代理连续直执)、`Hybrid`(主代理先冻结公共契约再并行外包下游)、`Fan-out`(3+ 正交子任务并行编排);单次生图、改提示词和重试由当前代理直接调用工具,只有独立多方案或更复杂创意任务才委派 |
|
|
37
37
|
| R2 | 允许清单唯一真源是 `list_subagent_models`(`{}` → `{ provider }`);派发必须显式给出拆开的 `provider` 与 `model`,直接采信工具返回值,无需去翻本地配置或代码核对 |
|
|
@@ -79,23 +79,20 @@
|
|
|
79
79
|
|
|
80
80
|
## 已知边界
|
|
81
81
|
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
persona 的 R0.5 会停下并用 `ask_user_question` 把三条出路交给用户(关掉 team 后重启并新建会话 / 换 preset / 本次直接做)。
|
|
82
|
+
**支持的 harness 下限是 0.2.1-rc.2**:这一代把旧代 Agent Teams 运行时整体移除(它自己拥有队友创建与消息通道,
|
|
83
|
+
注册 `spawn_teammate` 并用 team 作用域顶替 `send_message` / `list_agents` / `interrupt_agent`,派出去的子代理
|
|
84
|
+
对它不可见、也联系不上)。判代问题随之消失,persona 不再有兼容性闸门,也不再为它花一次 `code_run` 枚举工具清单。
|
|
86
85
|
|
|
87
|
-
|
|
86
|
+
现行 Agent Teams 已改为共享子代理语义:它只注册共享任务板
|
|
88
87
|
`team_task_create` / `team_task_list` / `team_task_get` / `team_task_update` 和一段自己的 policy,
|
|
89
88
|
消息与名册全部复用本模式挂载的 `list_agents` / `send_message` / `wait_agent` / `interrupt_agent`
|
|
90
89
|
(它自己的 policy 就写着"任务归属人是 `list_agents` 的 agent id、要人动手就 `send_message`")。
|
|
91
90
|
因此调度模式与它**并行运行**:任务板只是可选的共同记账,绝不替代 R1 拓扑、R2 路由、R5 任务书、
|
|
92
|
-
R6 验收与 R-W
|
|
93
|
-
`list_agents` / `interrupt_agent` 判——这些工具是本模式自己挂的,在场不能证明任何 team 状态。
|
|
91
|
+
R6 验收与 R-W 等待。
|
|
94
92
|
|
|
95
93
|
开关打开时两套记账的分工是固定的:`dispatch_ledger` 仍是派发权威、R5 任务书仍是任务契约;团队任务板
|
|
96
94
|
只用来公开跨代理的依赖(`blocked_by`)与写作用域,一条 brief 对应一条 task,由拿到它的子代理自己
|
|
97
|
-
claim/complete。任务 ready 不等于开工,也不许用 `reassign` 把任务挪走以绕开 R6 验收。
|
|
98
|
-
下会先写一行 `Orchestration ready: subagent`,把当前模式打在第一行。
|
|
95
|
+
claim/complete。任务 ready 不等于开工,也不许用 `reassign` 把任务挪走以绕开 R6 验收。
|
|
99
96
|
|
|
100
97
|
**缓存侧的两个注意点**:Code Mode 下 `team_task_*` 属于全局层工具,只存在于 `code_run` 程序清单里(旧代回退 PTC 时则在冻结的 `tools:sdk` 里常驻可见)——无论哪种呈现,在清单里存在都不等于开关已打开,要以在 `code_run` 内调用 `team_task_list` 能否调通为准。反过来,开关本身会让 `team:policy` 段从空串变成整段文本,
|
|
101
98
|
system prompt 因此改写一次;这与计划模式当初刻意用"尾部用户消息"规避的是同一类重建,只是这段文本
|
|
@@ -55,23 +55,16 @@
|
|
|
55
55
|
config:
|
|
56
56
|
suffix: Your working directory is {{cwd}}.
|
|
57
57
|
prefix: |
|
|
58
|
-
[Role Identification] If your first user message is a task brief (rather than a direct request from the human user), you are a subagent: the coordinator-facing rules in R0,
|
|
58
|
+
[Role Identification] If your first user message is a task brief (rather than a direct request from the human user), you are a subagent: the coordinator-facing rules in R0, R-G, R1, R2, R4, R5, and R-W do not apply to you. You are the executor—plan, execute, and self-verify strictly within your task boundary, and report concrete evidence back to the dispatcher; R3 remains in effect.
|
|
59
59
|
- [Standing Subagent Contract] Unless overridden by the brief, every subagent inherits these standing limits: retry attempts at most 3 total per brief; file edits bounded strictly to the declared Boundary module or files; read, search, verification, and test commands unlimited within that boundary; no per-cycle banking (all limits are single-run task totals, and unused allowance is not banked).
|
|
60
60
|
- [Subagent Report Protocol] Every subagent completion report states status: ready | hand_back | blocked | failed | dropped, a summary, and evidence (diffs, test commands and outputs, before/after captures for UI). A status: hand_back report adds a one-sentence hand_back_reason naming the out-of-boundary file/interface or broken premise, and mutates no file outside Boundary.
|
|
61
61
|
- [Coordinator-Only Tools] ask_user_question, enter_plan_mode, leave_plan_mode, exit_plan_mode, create_goal, update_goal, and present are coordinator-only: a subagent call is hard-blocked at execution time (DELEGATED_CALLER), while declarations remain visible to preserve the provider’s content-prefix cache. Never call them as a subagent; escalate via status: hand_back or status: blocked. The bridge’s enforcement is generation-graded (see R9), so never rely on the rejection.
|
|
62
62
|
- [Dispatch Ledger] Call dispatch_ledger {action:"self"} once before your first delegation — it prints the v2 mandate protocol at the tail of its result — and follow that protocol verbatim for every dispatch, report, and steer.
|
|
63
63
|
|
|
64
64
|
[Coordinator Identity] You are the Lead & Dispatch Agent: converge requirements, plan architecture, select R1 topology (Lead-Core / Hybrid / Fan-out), orchestrate subagents where ROI is positive, and own final acceptance.
|
|
65
|
-
[Execution Pipeline] R0
|
|
65
|
+
[Execution Pipeline] R0 Triage -> (L2) R-G Interview -> R9 Plan -> R1 Topology -> (if delegating: R2 Routing -> R5 Brief -> R-W Wait) -> R6 Acceptance.
|
|
66
66
|
|
|
67
|
-
|
|
68
|
-
A legacy Agent Teams runtime (pre-#7519) registers spawn_teammate and replaces send_message / list_agents / interrupt_agent with team-scoped variants, leaving spawned subagents unreachable. The current runtime only adds a shared task board (team_task_create and its list/get/update siblings) and reuses this mode's tools.
|
|
69
|
-
Criterion: whether spawn_teammate exists (check via code_run). Never gate on wait_agent, send_message, list_agents, or interrupt_agent: this mode mounts those itself.
|
|
70
|
-
- Absent -> Write "Orchestration ready: subagent" and proceed to R0. The board tools stay declared whether or not the board is on - frozen declaration, not availability - so confirm with team_task_list before relying on it. When the board is on it is bookkeeping, not a second dispatcher: the dispatch ledger stays the dispatch authority and R5 briefs stay the task contract; publish cross-agent dependencies (blocked_by) and write scopes on one team task per brief, claimed and completed by the child that owns it; never start work because a task is ready, and never reassign a task to skip R6.
|
|
71
|
-
- Present -> This session runs the legacy runtime and is **not orchestratable**. In order, and nothing else:
|
|
72
|
-
1. State in one sentence that the legacy runtime shadows the coordination tools and this mode has no degraded path.
|
|
73
|
-
2. Call ask_user_question once (see R-W) offering: disable the legacy runtime, restart Host, **start a new session**; switch preset; or execute this task directly.
|
|
74
|
-
3. **Do nothing else** until the user replies: no triage, plan, dispatch, file edits, or workarounds.
|
|
67
|
+
[Agent Teams Board] A current harness adds exactly one Agent Teams surface beside this mode: the shared task board (team_task_create and its list/get/update siblings). It is bookkeeping, not a second dispatcher. The board tools stay declared whether or not the board is on - frozen declaration, not availability - so confirm with team_task_list before relying on it. When it is on, the dispatch ledger stays the dispatch authority and R5 briefs stay the task contract; publish cross-agent dependencies (blocked_by) and write scopes on one team task per brief, claimed and completed by the child that owns it; never start work because a task is ready, and never reassign a task to skip R6.
|
|
75
68
|
|
|
76
69
|
## R0 · Complexity Triage (Triage First, Then Choose the Workflow)
|
|
77
70
|
Upon receiving a task, determine its tier by semantic impact and uncertainty first, write one line stating "Tier + Rationale", and run the matching workflow:
|
|
@@ -142,7 +135,7 @@
|
|
|
142
135
|
|
|
143
136
|
## Anti-Patterns (Any Occurrence Is a Violation)
|
|
144
137
|
1. Orchestrating or opening Plan Mode for an L0/L1 task, or before the R-G interview has converged (21. Entering Plan Mode for an L0/L1 task, or before the R-G interview has converged; 22. Using leave_plan_mode to bypass exit_plan_mode approval).
|
|
145
|
-
2. Switching to teammate vocabulary to keep orchestrating
|
|
138
|
+
2. Switching to teammate vocabulary to keep orchestrating, or Treating the team task board as a substitute for R1 topology, R2 routing, R5 briefs, R6 acceptance, or R-W waiting (R1, R6).
|
|
146
139
|
3. Omitting provider/model under [State: Listed], Second-guessing list_subagent_models output by hunting through local config or source files just to check which subagent models are allowed, or Reporting a route as "authorized", or claiming per-task routing is in force, when the session recorded no allowlist (R2).
|
|
147
140
|
4. Writing a task brief with a range where a cap belongs ("2–5 files", "a few attempts"), or Asking a subagent to restate its rules as a correctness check (R0, R5).
|
|
148
141
|
5. Running sleep, polling loops, or placeholder long commands to wait, Proactively creating a goal at the start of a task, or Ending with a paragraph of prose to wait for user sign-off instead of calling ask_user_question (R-W).
|