@tothemax/tasking 0.7.0 → 0.8.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 (113) hide show
  1. package/README.md +3 -3
  2. package/assets/workflows/WORKFLOW.code-mr.en.md.example +32 -3
  3. package/assets/workflows/WORKFLOW.code-mr.md.example +28 -3
  4. package/assets/workflows/WORKFLOW.feishu-direct.en.md.example +32 -3
  5. package/assets/workflows/WORKFLOW.feishu-direct.md.example +28 -3
  6. package/assets/workflows/WORKFLOW.grill-openspec.en.md.example +32 -3
  7. package/assets/workflows/WORKFLOW.grill-openspec.md.example +28 -3
  8. package/assets/workflows/WORKFLOW.minimal.en.md.example +32 -3
  9. package/assets/workflows/WORKFLOW.minimal.md.example +28 -3
  10. package/dist/adapters/feishu/source.d.ts.map +1 -1
  11. package/dist/adapters/feishu/source.js +4 -4
  12. package/dist/adapters/feishu/source.js.map +1 -1
  13. package/dist/bridge/binding-store.d.ts +2 -0
  14. package/dist/bridge/binding-store.d.ts.map +1 -1
  15. package/dist/bridge/binding-store.js +8 -0
  16. package/dist/bridge/binding-store.js.map +1 -1
  17. package/dist/bridge/commands.d.ts +19 -0
  18. package/dist/bridge/commands.d.ts.map +1 -1
  19. package/dist/bridge/commands.js +40 -1
  20. package/dist/bridge/commands.js.map +1 -1
  21. package/dist/bridge/comment-bridge.d.ts.map +1 -1
  22. package/dist/bridge/comment-bridge.js +9 -1
  23. package/dist/bridge/comment-bridge.js.map +1 -1
  24. package/dist/cli/doctor.d.ts +2 -0
  25. package/dist/cli/doctor.d.ts.map +1 -1
  26. package/dist/cli/doctor.js +52 -1
  27. package/dist/cli/doctor.js.map +1 -1
  28. package/dist/cli/help.d.ts.map +1 -1
  29. package/dist/cli/help.js +5 -1
  30. package/dist/cli/help.js.map +1 -1
  31. package/dist/cli/index.d.ts.map +1 -1
  32. package/dist/cli/index.js +5 -0
  33. package/dist/cli/index.js.map +1 -1
  34. package/dist/cli/init.d.ts +4 -1
  35. package/dist/cli/init.d.ts.map +1 -1
  36. package/dist/cli/init.js +31 -8
  37. package/dist/cli/init.js.map +1 -1
  38. package/dist/cli/model-picker.d.ts +6 -0
  39. package/dist/cli/model-picker.d.ts.map +1 -0
  40. package/dist/cli/model-picker.js +108 -0
  41. package/dist/cli/model-picker.js.map +1 -0
  42. package/dist/cli/tui-helpers.d.ts.map +1 -1
  43. package/dist/cli/tui-helpers.js +10 -0
  44. package/dist/cli/tui-helpers.js.map +1 -1
  45. package/dist/config/config-types.d.ts +16 -0
  46. package/dist/config/config-types.d.ts.map +1 -1
  47. package/dist/config/config-types.js +9 -0
  48. package/dist/config/config-types.js.map +1 -1
  49. package/dist/config/manager.d.ts +1 -0
  50. package/dist/config/manager.d.ts.map +1 -1
  51. package/dist/config/manager.js +14 -12
  52. package/dist/config/manager.js.map +1 -1
  53. package/dist/config/resolver.d.ts.map +1 -1
  54. package/dist/config/resolver.js +46 -2
  55. package/dist/config/resolver.js.map +1 -1
  56. package/dist/direct/auto-continue.d.ts +64 -0
  57. package/dist/direct/auto-continue.d.ts.map +1 -0
  58. package/dist/direct/auto-continue.js +142 -0
  59. package/dist/direct/auto-continue.js.map +1 -0
  60. package/dist/direct/card.d.ts +29 -3
  61. package/dist/direct/card.d.ts.map +1 -1
  62. package/dist/direct/card.js +150 -52
  63. package/dist/direct/card.js.map +1 -1
  64. package/dist/direct/driver.d.ts +1 -0
  65. package/dist/direct/driver.d.ts.map +1 -1
  66. package/dist/direct/driver.js +1 -0
  67. package/dist/direct/driver.js.map +1 -1
  68. package/dist/direct/manager.d.ts +20 -3
  69. package/dist/direct/manager.d.ts.map +1 -1
  70. package/dist/direct/manager.js +735 -62
  71. package/dist/direct/manager.js.map +1 -1
  72. package/dist/driver/opencode-models.d.ts +22 -0
  73. package/dist/driver/opencode-models.d.ts.map +1 -0
  74. package/dist/driver/opencode-models.js +77 -0
  75. package/dist/driver/opencode-models.js.map +1 -0
  76. package/dist/driver/session-ops.d.ts +9 -0
  77. package/dist/driver/session-ops.d.ts.map +1 -1
  78. package/dist/driver/session-ops.js +23 -0
  79. package/dist/driver/session-ops.js.map +1 -1
  80. package/dist/driver/turn-driver.d.ts +9 -1
  81. package/dist/driver/turn-driver.d.ts.map +1 -1
  82. package/dist/driver/turn-driver.js +160 -22
  83. package/dist/driver/turn-driver.js.map +1 -1
  84. package/dist/observability/http-dashboard.d.ts +2 -1
  85. package/dist/observability/http-dashboard.d.ts.map +1 -1
  86. package/dist/observability/http-dashboard.js +4 -3
  87. package/dist/observability/http-dashboard.js.map +1 -1
  88. package/dist/observability/snapshot.d.ts +2 -1
  89. package/dist/observability/snapshot.d.ts.map +1 -1
  90. package/dist/observability/snapshot.js +2 -0
  91. package/dist/observability/snapshot.js.map +1 -1
  92. package/dist/observability/terminal-dashboard.d.ts +2 -1
  93. package/dist/observability/terminal-dashboard.d.ts.map +1 -1
  94. package/dist/observability/terminal-dashboard.js +2 -0
  95. package/dist/observability/terminal-dashboard.js.map +1 -1
  96. package/dist/shared/card-payload.d.ts +3 -0
  97. package/dist/shared/card-payload.d.ts.map +1 -0
  98. package/dist/shared/card-payload.js +8 -0
  99. package/dist/shared/card-payload.js.map +1 -0
  100. package/dist/shared/types.d.ts +7 -0
  101. package/dist/shared/types.d.ts.map +1 -1
  102. package/dist/shared/types.js.map +1 -1
  103. package/dist/translate/dict.d.ts.map +1 -1
  104. package/dist/translate/dict.js +164 -6
  105. package/dist/translate/dict.js.map +1 -1
  106. package/dist/worker/runner.d.ts.map +1 -1
  107. package/dist/worker/runner.js +32 -2
  108. package/dist/worker/runner.js.map +1 -1
  109. package/dist/workspace/manager.d.ts +2 -1
  110. package/dist/workspace/manager.d.ts.map +1 -1
  111. package/dist/workspace/manager.js +14 -1
  112. package/dist/workspace/manager.js.map +1 -1
  113. package/package.json +2 -2
package/README.md CHANGED
@@ -45,11 +45,11 @@ For guided quickstarts, see the [Chinese guide](./docs/zh/getting-started.md) or
45
45
 
46
46
  | Command | Description |
47
47
  |---------|-------------|
48
- | `tasking init [workflow-path]` | Scaffold a starter `WORKFLOW.md` |
48
+ | `tasking init [workflow-path]` | Scaffold a starter `WORKFLOW.md` (interactive prompts cover credentials, Feishu setup, and the opencode model; `--model <provider/model>` pre-answers the model question) |
49
49
  | `tasking start [path] [--port N]` | Start the daemon (loads `./WORKFLOW.md` by default) |
50
50
  | `tasking status` | Print a runtime snapshot (running, retrying, totals) |
51
51
  | `tasking logs` | Print recent structured logs |
52
- | `tasking doctor [workflow-path]` | Read-only whole-chain health check (WORKFLOW.md, Feishu, Jira, opencode) |
52
+ | `tasking doctor [workflow-path]` | Read-only whole-chain health check (WORKFLOW.md, Feishu, Jira, opencode, model resolution) |
53
53
  | `tasking --version` | Print the installed version (top-level flag, also `-v`) |
54
54
 
55
55
  ## `WORKFLOW.md` contract
@@ -129,5 +129,5 @@ tasking's scheduling model and shipped agent skills draw on [openai/symphony](ht
129
129
 
130
130
  - **opencode v2 required**: tasking 0.7 requires `opencode >=2.0 <3` and refuses to start on v1 or v3+ (upgrade with `opencode upgrade --major`). opencode v1 support is frozen on the `support/v1` branch (0.6.x).
131
131
  - **`opencode.command` default changed** from `opencode run` to `opencode`; edit existing `WORKFLOW.md` files accordingly.
132
- - **`auto_approve: false` semantics changed**: `ask` permissions now pend for a Feishu approval card instead of being auto-rejected (and the `--auto`/`--dir`/`--variant` flags are gone).
132
+ - **`auto_approve: false` semantics changed**: `ask` permissions now pend for a Feishu approval card instead of being auto-rejected (and the `--auto`/`--dir`/`--variant` flags are gone). Defaults are unchanged — the Jira path stays `true` (unattended; cards only appear with `auto_approve: false`), direct sessions stay `false` (posture follows the target directory).
133
133
  - **Progress is polled** (default every 2s) rather than streamed; token totals are `input + output + reasoning` (v2 has no `total` field).
@@ -132,6 +132,22 @@ opencode:
132
132
  # Optional. Model variant (provider-specific reasoning effort such as high/max/minimal), maps to `Model.Ref.variant`. Default null (unset). Independent of model.
133
133
  variant: null
134
134
 
135
+ # Session-level permission posture. true (default) = the session is created with an
136
+ # allow-all ruleset that overrides workspace/global ask rules, so no approval cards
137
+ # are produced (the Jira path is unattended by default); set false explicitly to get
138
+ # Feishu approval cards.
139
+ # auto_approve: true
140
+
141
+ # Approval wait budget (ms); auto-rejects and stamps the card on expiry. Only
142
+ # effective with auto_approve: false. Default 1800000 = 30 minutes.
143
+ # permission_timeout_ms: 1800000
144
+
145
+ # Polling interval (ms) for progress/approvals/completion — see docs/adr/0037. Default 2000.
146
+ # poll_interval_ms: 2000
147
+
148
+ # Explicit opencode server URL (e.g. http://127.0.0.1:49374); null = default shared service.
149
+ # server_url: null
150
+
135
151
  # Per-turn timeout (ms). Default 3600000 = 1 hour. Must be > 0.
136
152
  # Hard wall-clock timeout: kills the turn when time is up regardless of activity.
137
153
  turn_timeout_ms: 3600000
@@ -145,9 +161,9 @@ opencode:
145
161
  # Set above turn_timeout_ms so normal turns are not mis-killed.
146
162
  stall_timeout_ms: 7200000
147
163
 
148
- # Inactivity timeout (ms). SIGTERM after stdout/stderr produces no data for this long.
164
+ # Inactivity timeout (ms). Interrupt the turn after this long with no new messages while polling.
149
165
  # Default 600000 = 10 minutes. Set 0 to disable the inactivity timeout.
150
- # Subprocess level: checks raw bytes and resets the timer whenever data arrives.
166
+ # The clock starts at prompt submission and pauses while waiting for approval.
151
167
  inactivity_timeout_ms: 600000
152
168
 
153
169
  # ============================================================================
@@ -224,12 +240,25 @@ feishu:
224
240
  # How much is mirrored to Feishu: quiet (final reply only) | summary (reply + stats line) | detailed (default; one process card per turn; collapsible panels need Feishu/Lark client >= V7.9).
225
241
  verbosity: detailed
226
242
 
227
- # Daemon-wide cap on concurrent direct turns (independent of Jira's max_concurrent_agents); per directory/session is always serial.
243
+ # Daemon-wide cap on concurrent direct turns (independent of Jira's max_concurrent_agents); turns within one session are always serial.
228
244
  max_concurrent: 5
229
245
 
246
+ # Maximum turns allowed to occupy one directory at once. 1 = serialized (default, safe);
247
+ # 2+ explicitly opts into same-directory parallelism and the user assumes the shared-worktree race risk.
248
+ # Also bounded by max_concurrent above (the stricter limit wins).
249
+ max_concurrent_turns_per_dir: 1
250
+
230
251
  # Idle time before a session is marked expired (ms; it does not delete the opencode session on disk). Default 2592000000 = 30 days.
231
252
  idle_ttl_ms: 2592000000
232
253
 
254
+ # Auto-continue: off by default; enable explicitly with /loop in the thread.
255
+ auto_continue:
256
+ # Auto-continue turns per /loop arming (1–20); auto turns only
257
+ budget: 5
258
+ # Consecutive low-output/repeated turns before pausing
259
+ no_progress_streak: 2
260
+ prompt: "Continue the unfinished work. Do not repeat what is already done, and do not summarize."
261
+
233
262
  # ============================================================================
234
263
  # server: HTTP dashboard (optional)
235
264
  # ============================================================================
@@ -130,6 +130,19 @@ opencode:
130
130
  # 可选。模型变体 (provider 特定推理档位,如 high/max/minimal),映射 `Model.Ref.variant`。默认 null(不配置)。与 model 彼此独立。
131
131
  variant: null
132
132
 
133
+ # 会话级权限姿态。true(默认)= 建会话时下发全放 ruleset,工作区/全局的 ask 规则被覆盖,
134
+ # 不产生审批卡(Jira 路径默认无人值守);需要审批卡时必须显式设 false。
135
+ # auto_approve: true
136
+
137
+ # 审批等待预算(毫秒),到点自动拒绝并盖章;仅 auto_approve: false 时生效。默认 1800000 = 30 分钟。
138
+ # permission_timeout_ms: 1800000
139
+
140
+ # 进度/审批/终态的轮询间隔(毫秒),见 docs/adr/0037。默认 2000。
141
+ # poll_interval_ms: 2000
142
+
143
+ # 指定 opencode 服务端地址(如 http://127.0.0.1:49374);null = 使用默认共享服务。
144
+ # server_url: null
145
+
133
146
  # 单 turn 超时 (毫秒)。默认 3600000 = 1 小时。必须 > 0。
134
147
  # 硬墙钟超时:无论活动状态如何,到点必杀。
135
148
  turn_timeout_ms: 3600000
@@ -142,9 +155,9 @@ opencode:
142
155
  # 建议设为大于 turn_timeout_ms 以避免正常 turn 被误杀。
143
156
  stall_timeout_ms: 7200000
144
157
 
145
- # 不活跃超时 (毫秒)。stdout/stderr 无数据超过此值则 SIGTERM 终止。
158
+ # 不活跃超时 (毫秒)。轮询期间持续无新消息超过此值则中断本轮。
146
159
  # 默认 600000 = 10 分钟。设为 0 禁用不活跃超时。
147
- # subprocess 层:检查原始字节,收到数据时重置计时器。
160
+ # 计时自 prompt 提交起算;等待审批期间暂停。
148
161
  inactivity_timeout_ms: 600000
149
162
 
150
163
  # ============================================================================
@@ -220,12 +233,24 @@ feishu:
220
233
  # 镜像到飞书的事件量级:quiet(仅最终正文)| summary(正文 + 统计行)| detailed(默认,每 turn 一张过程卡片;折叠面板需飞书/Lark 客户端 >= V7.9)。
221
234
  verbosity: detailed
222
235
 
223
- # 直连 turn 的全局并发上限(独立于 Jira 的 max_concurrent_agents);同目录/同会话始终串行。
236
+ # 直连 turn 的全局并发上限(独立于 Jira 的 max_concurrent_agents);同会话始终串行。
224
237
  max_concurrent: 5
225
238
 
239
+ # 同一目录可同时执行的 turn 数。1 = 串行(默认,安全);2+ = 显式放开同目录并行,
240
+ # 需自行承担共享工作树的文件/git 竞态风险。仍受上面的 max_concurrent 限制(取更严者)。
241
+ max_concurrent_turns_per_dir: 1
242
+
226
243
  # 空闲多久后把会话标记为 expired(毫秒,不删除 opencode 磁盘 session)。默认 2592000000 = 30 天。
227
244
  idle_ttl_ms: 2592000000
228
245
 
246
+ # 自动续跑(Auto-continue):默认关闭,需在话题内用 /loop 显式开启。
247
+ auto_continue:
248
+ # 一次 /loop 的自动轮预算(1–20);只计自动轮
249
+ budget: 5
250
+ # 连续低产出/重复多少轮后暂停
251
+ no_progress_streak: 2
252
+ prompt: "继续未完成的部分。不要重复已完成的内容,也不要总结。"
253
+
229
254
  # ============================================================================
230
255
  # server: HTTP 仪表板 (可选)
231
256
  # ============================================================================
@@ -126,6 +126,22 @@ opencode:
126
126
  # Optional. Model variant (provider-specific reasoning effort such as high/max/minimal), maps to `Model.Ref.variant`. Default null (unset). Independent of model.
127
127
  variant: null
128
128
 
129
+ # Session-level permission posture. true (default) = the session is created with an
130
+ # allow-all ruleset that overrides workspace/global ask rules, so no approval cards
131
+ # are produced (the Jira path is unattended by default); set false explicitly to get
132
+ # Feishu approval cards.
133
+ # auto_approve: true
134
+
135
+ # Approval wait budget (ms); auto-rejects and stamps the card on expiry. Only
136
+ # effective with auto_approve: false. Default 1800000 = 30 minutes.
137
+ # permission_timeout_ms: 1800000
138
+
139
+ # Polling interval (ms) for progress/approvals/completion — see docs/adr/0037. Default 2000.
140
+ # poll_interval_ms: 2000
141
+
142
+ # Explicit opencode server URL (e.g. http://127.0.0.1:49374); null = default shared service.
143
+ # server_url: null
144
+
129
145
  # Per-turn timeout (ms). Default 3600000 = 1 hour. Must be > 0.
130
146
  # Hard wall-clock timeout: kills the turn when time is up regardless of activity.
131
147
  turn_timeout_ms: 3600000
@@ -139,9 +155,9 @@ opencode:
139
155
  # Set above turn_timeout_ms so normal turns are not mis-killed.
140
156
  stall_timeout_ms: 7200000
141
157
 
142
- # Inactivity timeout (ms). SIGTERM after stdout/stderr produces no data for this long.
158
+ # Inactivity timeout (ms). Interrupt the turn after this long with no new messages while polling.
143
159
  # Default 600000 = 10 minutes. Set 0 to disable the inactivity timeout.
144
- # Subprocess level: checks raw bytes and resets the timer whenever data arrives.
160
+ # The clock starts at prompt submission and pauses while waiting for approval.
145
161
  inactivity_timeout_ms: 600000
146
162
 
147
163
  # ============================================================================
@@ -218,12 +234,25 @@ feishu:
218
234
  # How much is mirrored to Feishu: quiet (final reply only) | summary (reply + stats line) | detailed (default; one process card per turn; collapsible panels need Feishu/Lark client >= V7.9).
219
235
  verbosity: detailed
220
236
 
221
- # Daemon-wide cap on concurrent direct turns (independent of Jira's max_concurrent_agents); per directory/session is always serial.
237
+ # Daemon-wide cap on concurrent direct turns (independent of Jira's max_concurrent_agents); turns within one session are always serial.
222
238
  max_concurrent: 5
223
239
 
240
+ # Maximum turns allowed to occupy one directory at once. 1 = serialized (default, safe);
241
+ # 2+ explicitly opts into same-directory parallelism and the user assumes the shared-worktree race risk.
242
+ # Also bounded by max_concurrent above (the stricter limit wins).
243
+ max_concurrent_turns_per_dir: 1
244
+
224
245
  # Idle time before a session is marked expired (ms; it does not delete the opencode session on disk). Default 2592000000 = 30 days.
225
246
  idle_ttl_ms: 2592000000
226
247
 
248
+ # Auto-continue: off by default; enable explicitly with /loop in the thread.
249
+ auto_continue:
250
+ # Auto-continue turns per /loop arming (1–20); auto turns only
251
+ budget: 5
252
+ # Consecutive low-output/repeated turns before pausing
253
+ no_progress_streak: 2
254
+ prompt: "Continue the unfinished work. Do not repeat what is already done, and do not summarize."
255
+
227
256
  # ============================================================================
228
257
  # server: HTTP dashboard (optional)
229
258
  # ============================================================================
@@ -122,6 +122,19 @@ opencode:
122
122
  # 可选。模型变体 (provider 特定推理档位,如 high/max/minimal),映射 `Model.Ref.variant`。默认 null(不配置)。与 model 彼此独立。
123
123
  variant: null
124
124
 
125
+ # 会话级权限姿态。true(默认)= 建会话时下发全放 ruleset,工作区/全局的 ask 规则被覆盖,
126
+ # 不产生审批卡(Jira 路径默认无人值守);需要审批卡时必须显式设 false。
127
+ # auto_approve: true
128
+
129
+ # 审批等待预算(毫秒),到点自动拒绝并盖章;仅 auto_approve: false 时生效。默认 1800000 = 30 分钟。
130
+ # permission_timeout_ms: 1800000
131
+
132
+ # 进度/审批/终态的轮询间隔(毫秒),见 docs/adr/0037。默认 2000。
133
+ # poll_interval_ms: 2000
134
+
135
+ # 指定 opencode 服务端地址(如 http://127.0.0.1:49374);null = 使用默认共享服务。
136
+ # server_url: null
137
+
125
138
  # 单 turn 超时 (毫秒)。默认 3600000 = 1 小时。必须 > 0。
126
139
  # 硬墙钟超时:无论活动状态如何,到点必杀。
127
140
  turn_timeout_ms: 3600000
@@ -134,9 +147,9 @@ opencode:
134
147
  # 建议设为大于 turn_timeout_ms 以避免正常 turn 被误杀。
135
148
  stall_timeout_ms: 7200000
136
149
 
137
- # 不活跃超时 (毫秒)。stdout/stderr 无数据超过此值则 SIGTERM 终止。
150
+ # 不活跃超时 (毫秒)。轮询期间持续无新消息超过此值则中断本轮。
138
151
  # 默认 600000 = 10 分钟。设为 0 禁用不活跃超时。
139
- # subprocess 层:检查原始字节,收到数据时重置计时器。
152
+ # 计时自 prompt 提交起算;等待审批期间暂停。
140
153
  inactivity_timeout_ms: 600000
141
154
 
142
155
  # ============================================================================
@@ -210,12 +223,24 @@ feishu:
210
223
  # 镜像到飞书的事件量级:quiet(仅最终正文)| summary(正文 + 统计行)| detailed(默认,每 turn 一张过程卡片;折叠面板需飞书/Lark 客户端 >= V7.9)。
211
224
  verbosity: detailed
212
225
 
213
- # 直连 turn 的全局并发上限(独立于 Jira 的 max_concurrent_agents);同目录/同会话始终串行。
226
+ # 直连 turn 的全局并发上限(独立于 Jira 的 max_concurrent_agents);同会话始终串行。
214
227
  max_concurrent: 5
215
228
 
229
+ # 同一目录可同时执行的 turn 数。1 = 串行(默认,安全);2+ = 显式放开同目录并行,
230
+ # 需自行承担共享工作树的文件/git 竞态风险。仍受上面的 max_concurrent 限制(取更严者)。
231
+ max_concurrent_turns_per_dir: 1
232
+
216
233
  # 空闲多久后把会话标记为 expired(毫秒,不删除 opencode 磁盘 session)。默认 2592000000 = 30 天。
217
234
  idle_ttl_ms: 2592000000
218
235
 
236
+ # 自动续跑(Auto-continue):默认关闭,需在话题内用 /loop 显式开启。
237
+ auto_continue:
238
+ # 一次 /loop 的自动轮预算(1–20);只计自动轮
239
+ budget: 5
240
+ # 连续低产出/重复多少轮后暂停
241
+ no_progress_streak: 2
242
+ prompt: "继续未完成的部分。不要重复已完成的内容,也不要总结。"
243
+
219
244
  # ============================================================================
220
245
  # server: HTTP 仪表板 (可选)
221
246
  # ============================================================================
@@ -132,6 +132,22 @@ opencode:
132
132
  # Optional. Model variant (provider-specific reasoning effort such as high/max/minimal), maps to `Model.Ref.variant`. Default null (unset). Independent of model.
133
133
  variant: null
134
134
 
135
+ # Session-level permission posture. true (default) = the session is created with an
136
+ # allow-all ruleset that overrides workspace/global ask rules, so no approval cards
137
+ # are produced (the Jira path is unattended by default); set false explicitly to get
138
+ # Feishu approval cards.
139
+ # auto_approve: true
140
+
141
+ # Approval wait budget (ms); auto-rejects and stamps the card on expiry. Only
142
+ # effective with auto_approve: false. Default 1800000 = 30 minutes.
143
+ # permission_timeout_ms: 1800000
144
+
145
+ # Polling interval (ms) for progress/approvals/completion — see docs/adr/0037. Default 2000.
146
+ # poll_interval_ms: 2000
147
+
148
+ # Explicit opencode server URL (e.g. http://127.0.0.1:49374); null = default shared service.
149
+ # server_url: null
150
+
135
151
  # Per-turn timeout (ms). Default 3600000 = 1 hour. Must be > 0.
136
152
  # Hard wall-clock timeout: kills the turn when time is up regardless of activity.
137
153
  turn_timeout_ms: 3600000
@@ -145,9 +161,9 @@ opencode:
145
161
  # Set above turn_timeout_ms so normal turns are not mis-killed.
146
162
  stall_timeout_ms: 7200000
147
163
 
148
- # Inactivity timeout (ms). SIGTERM after stdout/stderr produces no data for this long.
164
+ # Inactivity timeout (ms). Interrupt the turn after this long with no new messages while polling.
149
165
  # Default 600000 = 10 minutes. Set 0 to disable the inactivity timeout.
150
- # Subprocess level: checks raw bytes and resets the timer whenever data arrives.
166
+ # The clock starts at prompt submission and pauses while waiting for approval.
151
167
  inactivity_timeout_ms: 600000
152
168
 
153
169
  # ============================================================================
@@ -224,12 +240,25 @@ feishu:
224
240
  # How much is mirrored to Feishu: quiet (final reply only) | summary (reply + stats line) | detailed (default; one process card per turn; collapsible panels need Feishu/Lark client >= V7.9).
225
241
  verbosity: detailed
226
242
 
227
- # Daemon-wide cap on concurrent direct turns (independent of Jira's max_concurrent_agents); per directory/session is always serial.
243
+ # Daemon-wide cap on concurrent direct turns (independent of Jira's max_concurrent_agents); turns within one session are always serial.
228
244
  max_concurrent: 5
229
245
 
246
+ # Maximum turns allowed to occupy one directory at once. 1 = serialized (default, safe);
247
+ # 2+ explicitly opts into same-directory parallelism and the user assumes the shared-worktree race risk.
248
+ # Also bounded by max_concurrent above (the stricter limit wins).
249
+ max_concurrent_turns_per_dir: 1
250
+
230
251
  # Idle time before a session is marked expired (ms; it does not delete the opencode session on disk). Default 2592000000 = 30 days.
231
252
  idle_ttl_ms: 2592000000
232
253
 
254
+ # Auto-continue: off by default; enable explicitly with /loop in the thread.
255
+ auto_continue:
256
+ # Auto-continue turns per /loop arming (1–20); auto turns only
257
+ budget: 5
258
+ # Consecutive low-output/repeated turns before pausing
259
+ no_progress_streak: 2
260
+ prompt: "Continue the unfinished work. Do not repeat what is already done, and do not summarize."
261
+
233
262
  # ============================================================================
234
263
  # server: HTTP dashboard (optional)
235
264
  # ============================================================================
@@ -130,6 +130,19 @@ opencode:
130
130
  # 可选。模型变体 (provider 特定推理档位,如 high/max/minimal),映射 `Model.Ref.variant`。默认 null(不配置)。与 model 彼此独立。
131
131
  variant: null
132
132
 
133
+ # 会话级权限姿态。true(默认)= 建会话时下发全放 ruleset,工作区/全局的 ask 规则被覆盖,
134
+ # 不产生审批卡(Jira 路径默认无人值守);需要审批卡时必须显式设 false。
135
+ # auto_approve: true
136
+
137
+ # 审批等待预算(毫秒),到点自动拒绝并盖章;仅 auto_approve: false 时生效。默认 1800000 = 30 分钟。
138
+ # permission_timeout_ms: 1800000
139
+
140
+ # 进度/审批/终态的轮询间隔(毫秒),见 docs/adr/0037。默认 2000。
141
+ # poll_interval_ms: 2000
142
+
143
+ # 指定 opencode 服务端地址(如 http://127.0.0.1:49374);null = 使用默认共享服务。
144
+ # server_url: null
145
+
133
146
  # 单 turn 超时 (毫秒)。默认 3600000 = 1 小时。必须 > 0。
134
147
  # 硬墙钟超时:无论活动状态如何,到点必杀。
135
148
  turn_timeout_ms: 3600000
@@ -142,9 +155,9 @@ opencode:
142
155
  # 建议设为大于 turn_timeout_ms 以避免正常 turn 被误杀。
143
156
  stall_timeout_ms: 7200000
144
157
 
145
- # 不活跃超时 (毫秒)。stdout/stderr 无数据超过此值则 SIGTERM 终止。
158
+ # 不活跃超时 (毫秒)。轮询期间持续无新消息超过此值则中断本轮。
146
159
  # 默认 600000 = 10 分钟。设为 0 禁用不活跃超时。
147
- # subprocess 层:检查原始字节,收到数据时重置计时器。
160
+ # 计时自 prompt 提交起算;等待审批期间暂停。
148
161
  inactivity_timeout_ms: 600000
149
162
 
150
163
  # ============================================================================
@@ -220,12 +233,24 @@ feishu:
220
233
  # 镜像到飞书的事件量级:quiet(仅最终正文)| summary(正文 + 统计行)| detailed(默认,每 turn 一张过程卡片;折叠面板需飞书/Lark 客户端 >= V7.9)。
221
234
  verbosity: detailed
222
235
 
223
- # 直连 turn 的全局并发上限(独立于 Jira 的 max_concurrent_agents);同目录/同会话始终串行。
236
+ # 直连 turn 的全局并发上限(独立于 Jira 的 max_concurrent_agents);同会话始终串行。
224
237
  max_concurrent: 5
225
238
 
239
+ # 同一目录可同时执行的 turn 数。1 = 串行(默认,安全);2+ = 显式放开同目录并行,
240
+ # 需自行承担共享工作树的文件/git 竞态风险。仍受上面的 max_concurrent 限制(取更严者)。
241
+ max_concurrent_turns_per_dir: 1
242
+
226
243
  # 空闲多久后把会话标记为 expired(毫秒,不删除 opencode 磁盘 session)。默认 2592000000 = 30 天。
227
244
  idle_ttl_ms: 2592000000
228
245
 
246
+ # 自动续跑(Auto-continue):默认关闭,需在话题内用 /loop 显式开启。
247
+ auto_continue:
248
+ # 一次 /loop 的自动轮预算(1–20);只计自动轮
249
+ budget: 5
250
+ # 连续低产出/重复多少轮后暂停
251
+ no_progress_streak: 2
252
+ prompt: "继续未完成的部分。不要重复已完成的内容,也不要总结。"
253
+
229
254
  # ============================================================================
230
255
  # server: HTTP 仪表板 (可选)
231
256
  # ============================================================================
@@ -127,6 +127,22 @@ opencode:
127
127
  # Optional. Model variant (provider-specific reasoning effort such as high/max/minimal), maps to `Model.Ref.variant`. Default null (unset). Independent of model.
128
128
  variant: null
129
129
 
130
+ # Session-level permission posture. true (default) = the session is created with an
131
+ # allow-all ruleset that overrides workspace/global ask rules, so no approval cards
132
+ # are produced (the Jira path is unattended by default); set false explicitly to get
133
+ # Feishu approval cards.
134
+ # auto_approve: true
135
+
136
+ # Approval wait budget (ms); auto-rejects and stamps the card on expiry. Only
137
+ # effective with auto_approve: false. Default 1800000 = 30 minutes.
138
+ # permission_timeout_ms: 1800000
139
+
140
+ # Polling interval (ms) for progress/approvals/completion — see docs/adr/0037. Default 2000.
141
+ # poll_interval_ms: 2000
142
+
143
+ # Explicit opencode server URL (e.g. http://127.0.0.1:49374); null = default shared service.
144
+ # server_url: null
145
+
130
146
  # Per-turn timeout (ms). Default 3600000 = 1 hour. Must be > 0.
131
147
  # Hard wall-clock timeout: kills the turn when time is up regardless of activity.
132
148
  turn_timeout_ms: 3600000
@@ -140,9 +156,9 @@ opencode:
140
156
  # Set above turn_timeout_ms so normal turns are not mis-killed.
141
157
  stall_timeout_ms: 7200000
142
158
 
143
- # Inactivity timeout (ms). SIGTERM after stdout/stderr produces no data for this long.
159
+ # Inactivity timeout (ms). Interrupt the turn after this long with no new messages while polling.
144
160
  # Default 600000 = 10 minutes. Set 0 to disable the inactivity timeout.
145
- # Subprocess level: checks raw bytes and resets the timer whenever data arrives.
161
+ # The clock starts at prompt submission and pauses while waiting for approval.
146
162
  inactivity_timeout_ms: 600000
147
163
 
148
164
  # ============================================================================
@@ -219,12 +235,25 @@ feishu:
219
235
  # How much is mirrored to Feishu: quiet (final reply only) | summary (reply + stats line) | detailed (default; one process card per turn; collapsible panels need Feishu/Lark client >= V7.9).
220
236
  verbosity: detailed
221
237
 
222
- # Daemon-wide cap on concurrent direct turns (independent of Jira's max_concurrent_agents); per directory/session is always serial.
238
+ # Daemon-wide cap on concurrent direct turns (independent of Jira's max_concurrent_agents); turns within one session are always serial.
223
239
  max_concurrent: 5
224
240
 
241
+ # Maximum turns allowed to occupy one directory at once. 1 = serialized (default, safe);
242
+ # 2+ explicitly opts into same-directory parallelism and the user assumes the shared-worktree race risk.
243
+ # Also bounded by max_concurrent above (the stricter limit wins).
244
+ max_concurrent_turns_per_dir: 1
245
+
225
246
  # Idle time before a session is marked expired (ms; it does not delete the opencode session on disk). Default 2592000000 = 30 days.
226
247
  idle_ttl_ms: 2592000000
227
248
 
249
+ # Auto-continue: off by default; enable explicitly with /loop in the thread.
250
+ auto_continue:
251
+ # Auto-continue turns per /loop arming (1–20); auto turns only
252
+ budget: 5
253
+ # Consecutive low-output/repeated turns before pausing
254
+ no_progress_streak: 2
255
+ prompt: "Continue the unfinished work. Do not repeat what is already done, and do not summarize."
256
+
228
257
  # ============================================================================
229
258
  # server: HTTP dashboard (optional)
230
259
  # ============================================================================
@@ -126,6 +126,19 @@ opencode:
126
126
  # 可选。模型变体 (provider 特定推理档位,如 high/max/minimal),映射 `Model.Ref.variant`。默认 null(不配置)。与 model 彼此独立。
127
127
  variant: null
128
128
 
129
+ # 会话级权限姿态。true(默认)= 建会话时下发全放 ruleset,工作区/全局的 ask 规则被覆盖,
130
+ # 不产生审批卡(Jira 路径默认无人值守);需要审批卡时必须显式设 false。
131
+ # auto_approve: true
132
+
133
+ # 审批等待预算(毫秒),到点自动拒绝并盖章;仅 auto_approve: false 时生效。默认 1800000 = 30 分钟。
134
+ # permission_timeout_ms: 1800000
135
+
136
+ # 进度/审批/终态的轮询间隔(毫秒),见 docs/adr/0037。默认 2000。
137
+ # poll_interval_ms: 2000
138
+
139
+ # 指定 opencode 服务端地址(如 http://127.0.0.1:49374);null = 使用默认共享服务。
140
+ # server_url: null
141
+
129
142
  # 单 turn 超时 (毫秒)。默认 3600000 = 1 小时。必须 > 0。
130
143
  # 硬墙钟超时:无论活动状态如何,到点必杀。
131
144
  turn_timeout_ms: 3600000
@@ -138,9 +151,9 @@ opencode:
138
151
  # 建议设为大于 turn_timeout_ms 以避免正常 turn 被误杀。
139
152
  stall_timeout_ms: 7200000
140
153
 
141
- # 不活跃超时 (毫秒)。stdout/stderr 无数据超过此值则 SIGTERM 终止。
154
+ # 不活跃超时 (毫秒)。轮询期间持续无新消息超过此值则中断本轮。
142
155
  # 默认 600000 = 10 分钟。设为 0 禁用不活跃超时。
143
- # subprocess 层:检查原始字节,收到数据时重置计时器。
156
+ # 计时自 prompt 提交起算;等待审批期间暂停。
144
157
  inactivity_timeout_ms: 600000
145
158
 
146
159
  # ============================================================================
@@ -214,12 +227,24 @@ feishu:
214
227
  # 镜像到飞书的事件量级:quiet(仅最终正文)| summary(正文 + 统计行)| detailed(默认,每 turn 一张过程卡片;折叠面板需飞书/Lark 客户端 >= V7.9)。
215
228
  verbosity: detailed
216
229
 
217
- # 直连 turn 的全局并发上限(独立于 Jira 的 max_concurrent_agents);同目录/同会话始终串行。
230
+ # 直连 turn 的全局并发上限(独立于 Jira 的 max_concurrent_agents);同会话始终串行。
218
231
  max_concurrent: 5
219
232
 
233
+ # 同一目录可同时执行的 turn 数。1 = 串行(默认,安全);2+ = 显式放开同目录并行,
234
+ # 需自行承担共享工作树的文件/git 竞态风险。仍受上面的 max_concurrent 限制(取更严者)。
235
+ max_concurrent_turns_per_dir: 1
236
+
220
237
  # 空闲多久后把会话标记为 expired(毫秒,不删除 opencode 磁盘 session)。默认 2592000000 = 30 天。
221
238
  idle_ttl_ms: 2592000000
222
239
 
240
+ # 自动续跑(Auto-continue):默认关闭,需在话题内用 /loop 显式开启。
241
+ auto_continue:
242
+ # 一次 /loop 的自动轮预算(1–20);只计自动轮
243
+ budget: 5
244
+ # 连续低产出/重复多少轮后暂停
245
+ no_progress_streak: 2
246
+ prompt: "继续未完成的部分。不要重复已完成的内容,也不要总结。"
247
+
223
248
  # ============================================================================
224
249
  # server: HTTP 仪表板 (可选)
225
250
  # ============================================================================
@@ -1 +1 @@
1
- {"version":3,"file":"source.d.ts","sourceRoot":"","sources":["../../../src/adapters/feishu/source.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAC;AAChF,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,+BAA+B,CAAC;AAC5D,OAAO,EAAE,YAAY,EAAkB,MAAM,wBAAwB,CAAC;AAStE,MAAM,WAAW,oBAAoB;IACnC,SAAS,CAAC,EAAE,MAAM,C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AAC,CA+B1D"}
@@ -1,5 +1,5 @@
1
+ import { cardContentJson, cardMessageBody } from "../../shared/card-payload.js";
1
2
  import { TaskingError, toTaskingError } from "../../shared/errors.js";
2
- import { translateCard } from "../../translate/card.js";
3
3
  import { translate } from "../../translate/locale.js";
4
4
  import { diagnoseFeishuError, feishuBodyCode } from "./probe.js";
5
5
  import { crossRegionHint, feishuApiBase } from "./probe.js";
@@ -153,10 +153,10 @@ export class FeishuSource {
153
153
  await this.replyToMessage(rootId, text, false);
154
154
  }
155
155
  async replyCardInThread(rootId, card) {
156
- return this.replyPayload(rootId, "interactive", JSON.stringify(translateCard(card)), true);
156
+ return this.replyPayload(rootId, "interactive", cardContentJson(card), true);
157
157
  }
158
158
  async replyCardFlat(rootId, card) {
159
- return this.replyPayload(rootId, "interactive", JSON.stringify(translateCard(card)), false);
159
+ return this.replyPayload(rootId, "interactive", cardContentJson(card), false);
160
160
  }
161
161
  async updateCard(messageId, card) {
162
162
  this.assertNotCooling();
@@ -169,7 +169,7 @@ export class FeishuSource {
169
169
  Authorization: `Bearer ${token}`,
170
170
  "Content-Type": "application/json",
171
171
  },
172
- body: JSON.stringify({ content: JSON.stringify(translateCard(card)) }),
172
+ body: cardMessageBody(card),
173
173
  }, this.defaultTimeoutMs);
174
174
  if (!res.ok) {
175
175
  if (res.status === 429)