@tothemax/tasking 0.6.19 → 0.7.1
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/README.md +16 -8
- package/README.zh-CN.md +14 -6
- package/assets/workflows/WORKFLOW.code-mr.en.md.example +29 -8
- package/assets/workflows/WORKFLOW.code-mr.md.example +25 -8
- package/assets/workflows/WORKFLOW.feishu-direct.en.md.example +29 -8
- package/assets/workflows/WORKFLOW.feishu-direct.md.example +25 -8
- package/assets/workflows/WORKFLOW.grill-openspec.en.md.example +29 -8
- package/assets/workflows/WORKFLOW.grill-openspec.md.example +25 -8
- package/assets/workflows/WORKFLOW.minimal.en.md.example +29 -8
- package/assets/workflows/WORKFLOW.minimal.md.example +25 -8
- package/dist/bridge/comment-bridge.d.ts +4 -0
- package/dist/bridge/comment-bridge.d.ts.map +1 -1
- package/dist/bridge/comment-bridge.js +25 -0
- package/dist/bridge/comment-bridge.js.map +1 -1
- package/dist/cli/daemon.d.ts.map +1 -1
- package/dist/cli/daemon.js +5 -1
- package/dist/cli/daemon.js.map +1 -1
- package/dist/cli/doctor.d.ts +6 -0
- package/dist/cli/doctor.d.ts.map +1 -1
- package/dist/cli/doctor.js +100 -15
- package/dist/cli/doctor.js.map +1 -1
- package/dist/cli/help.d.ts.map +1 -1
- package/dist/cli/help.js +5 -1
- package/dist/cli/help.js.map +1 -1
- package/dist/cli/index.d.ts.map +1 -1
- package/dist/cli/index.js +218 -3
- package/dist/cli/index.js.map +1 -1
- package/dist/cli/init.d.ts +4 -1
- package/dist/cli/init.d.ts.map +1 -1
- package/dist/cli/init.js +31 -8
- package/dist/cli/init.js.map +1 -1
- package/dist/cli/model-picker.d.ts +6 -0
- package/dist/cli/model-picker.d.ts.map +1 -0
- package/dist/cli/model-picker.js +108 -0
- package/dist/cli/model-picker.js.map +1 -0
- package/dist/cli/tui-helpers.d.ts.map +1 -1
- package/dist/cli/tui-helpers.js +10 -0
- package/dist/cli/tui-helpers.js.map +1 -1
- package/dist/config/config-types.d.ts +9 -1
- package/dist/config/config-types.d.ts.map +1 -1
- package/dist/config/config-types.js +5 -1
- package/dist/config/config-types.js.map +1 -1
- package/dist/config/resolver.d.ts.map +1 -1
- package/dist/config/resolver.js +5 -0
- package/dist/config/resolver.js.map +1 -1
- package/dist/direct/card.d.ts +18 -0
- package/dist/direct/card.d.ts.map +1 -1
- package/dist/direct/card.js +81 -5
- package/dist/direct/card.js.map +1 -1
- package/dist/direct/driver.d.ts +36 -0
- package/dist/direct/driver.d.ts.map +1 -0
- package/dist/direct/driver.js +77 -0
- package/dist/direct/driver.js.map +1 -0
- package/dist/direct/manager.d.ts +25 -5
- package/dist/direct/manager.d.ts.map +1 -1
- package/dist/direct/manager.js +401 -54
- package/dist/direct/manager.js.map +1 -1
- package/dist/driver/api-client.d.ts +33 -0
- package/dist/driver/api-client.d.ts.map +1 -0
- package/dist/driver/api-client.js +69 -0
- package/dist/driver/api-client.js.map +1 -0
- package/dist/driver/approval.d.ts +32 -0
- package/dist/driver/approval.d.ts.map +1 -0
- package/dist/driver/approval.js +106 -0
- package/dist/driver/approval.js.map +1 -0
- package/dist/driver/opencode-models.d.ts +22 -0
- package/dist/driver/opencode-models.d.ts.map +1 -0
- package/dist/driver/opencode-models.js +77 -0
- package/dist/driver/opencode-models.js.map +1 -0
- package/dist/driver/session-ops.d.ts +76 -0
- package/dist/driver/session-ops.d.ts.map +1 -0
- package/dist/driver/session-ops.js +177 -0
- package/dist/driver/session-ops.js.map +1 -0
- package/dist/driver/sweep.d.ts +16 -0
- package/dist/driver/sweep.d.ts.map +1 -0
- package/dist/driver/sweep.js +84 -0
- package/dist/driver/sweep.js.map +1 -0
- package/dist/driver/turn-driver.d.ts +85 -0
- package/dist/driver/turn-driver.d.ts.map +1 -0
- package/dist/driver/turn-driver.js +489 -0
- package/dist/driver/turn-driver.js.map +1 -0
- package/dist/mcp/inject.d.ts +1 -0
- package/dist/mcp/inject.d.ts.map +1 -1
- package/dist/mcp/inject.js +23 -11
- package/dist/mcp/inject.js.map +1 -1
- package/dist/observability/http-dashboard.d.ts +4 -1
- package/dist/observability/http-dashboard.d.ts.map +1 -1
- package/dist/observability/http-dashboard.js +125 -98
- package/dist/observability/http-dashboard.js.map +1 -1
- package/dist/observability/snapshot.d.ts +3 -1
- package/dist/observability/snapshot.d.ts.map +1 -1
- package/dist/observability/snapshot.js +10 -0
- package/dist/observability/snapshot.js.map +1 -1
- package/dist/observability/terminal-dashboard.d.ts +11 -1
- package/dist/observability/terminal-dashboard.d.ts.map +1 -1
- package/dist/observability/terminal-dashboard.js +121 -6
- package/dist/observability/terminal-dashboard.js.map +1 -1
- package/dist/scheduler/scheduler.d.ts +18 -1
- package/dist/scheduler/scheduler.d.ts.map +1 -1
- package/dist/scheduler/scheduler.js +108 -7
- package/dist/scheduler/scheduler.js.map +1 -1
- package/dist/shared/errors.d.ts +1 -1
- package/dist/shared/errors.d.ts.map +1 -1
- package/dist/shared/errors.js.map +1 -1
- package/dist/shared/opencode-version.d.ts +25 -0
- package/dist/shared/opencode-version.d.ts.map +1 -0
- package/dist/shared/opencode-version.js +88 -0
- package/dist/shared/opencode-version.js.map +1 -0
- package/dist/shared/redact.d.ts +2 -0
- package/dist/shared/redact.d.ts.map +1 -0
- package/dist/shared/redact.js +8 -0
- package/dist/shared/redact.js.map +1 -0
- package/dist/shared/types.d.ts +13 -0
- package/dist/shared/types.d.ts.map +1 -1
- package/dist/shared/types.js.map +1 -1
- package/dist/translate/dict.d.ts.map +1 -1
- package/dist/translate/dict.js +139 -5
- package/dist/translate/dict.js.map +1 -1
- package/dist/worker/prompt.d.ts +2 -0
- package/dist/worker/prompt.d.ts.map +1 -1
- package/dist/worker/prompt.js +10 -0
- package/dist/worker/prompt.js.map +1 -1
- package/dist/worker/runner.d.ts +8 -40
- package/dist/worker/runner.d.ts.map +1 -1
- package/dist/worker/runner.js +126 -283
- package/dist/worker/runner.js.map +1 -1
- package/dist/workspace/manager.d.ts +8 -3
- package/dist/workspace/manager.d.ts.map +1 -1
- package/dist/workspace/manager.js +28 -14
- package/dist/workspace/manager.js.map +1 -1
- package/package.json +9 -3
- package/dist/direct/command.d.ts +0 -12
- package/dist/direct/command.d.ts.map +0 -1
- package/dist/direct/command.js +0 -23
- package/dist/direct/command.js.map +0 -1
package/README.md
CHANGED
|
@@ -9,7 +9,7 @@ A TypeScript CLI daemon that orchestrates [opencode](https://opencode.ai) coding
|
|
|
9
9
|
- **Structured (Jira):** deterministic poll/dispatch/reconcile/retry scheduler — no LLM in the hot loop.
|
|
10
10
|
- **Feishu:** direct opencode sessions (`/chat` in a group) plus a bidirectional comment bridge to Jira. The LLM `route agent` (inbox triage) is **not implemented**.
|
|
11
11
|
|
|
12
|
-
Both converge on a shared normalized `Task` model, a shared workspace manager, and a shared `opencode
|
|
12
|
+
Both converge on a shared normalized `Task` model, a shared workspace manager, and a shared opencode v2 worker (driven through `opencode api`; tasking 0.7 requires `opencode >=2.0 <3`).
|
|
13
13
|
|
|
14
14
|
In terms of scheduling, the `tasking` module extends the coordination model adopted from [Symphony](https://github.com/openai/symphony).
|
|
15
15
|
|
|
@@ -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
|
|
@@ -63,7 +63,7 @@ Key config blocks:
|
|
|
63
63
|
- `workspace.root` — per-task workspace root (default `<tmp>/tasking_workspaces`)
|
|
64
64
|
- `hooks.*` — `after_create` / `before_run` / `after_run` / `before_remove` shell hooks
|
|
65
65
|
- `agent.*` — `max_concurrent_agents`, `max_turns`, `max_retry_backoff_ms`, per-state caps
|
|
66
|
-
- `opencode.*` —
|
|
66
|
+
- `opencode.*` — opencode command (default `opencode`), agent profile, model/variant, turn/stall/permission timeouts, poll interval
|
|
67
67
|
- `router.*` — **not implemented**: parsed by the resolver but no runtime code consumes it (reserved for a future route-agent triage path)
|
|
68
68
|
- `feishu.*` — Feishu source app credentials and `enabled` flag; `feishu.direct` enables `/chat` direct opencode sessions in fixed directories (bypasses Jira; see `docs/configuration.md`)
|
|
69
69
|
- `server.port` — optional HTTP dashboard port
|
|
@@ -74,13 +74,13 @@ The prompt body is a strict Liquid-compatible template with `task` (or `issue`)
|
|
|
74
74
|
|
|
75
75
|
```
|
|
76
76
|
Jira (structured) ──► deterministic scheduler ──┐
|
|
77
|
-
├──► workspace ──► opencode
|
|
77
|
+
├──► workspace ──► opencode v2 (api)
|
|
78
78
|
Feishu (direct sessions) ──► direct worker ─────┘
|
|
79
79
|
```
|
|
80
80
|
|
|
81
81
|
- **Structured path:** Symphony-style poll tick → state machine → reconcile → retry with exponential backoff. No LLM in the hot loop.
|
|
82
82
|
- **Feishu path:** direct opencode sessions (`/chat` in a group runs opencode in a configured directory; one topic per session), plus a comment bridge mirroring issue threads ↔ Jira comments. A planned LLM route-agent inbox triage is **not implemented**.
|
|
83
|
-
- **Worker:**
|
|
83
|
+
- **Worker:** drives an opencode v2 session per task through `opencode api` (`session.create` → `session.prompt` → poll → `session.interrupt`).
|
|
84
84
|
- **State:** orchestrator scheduling state is in-memory (restart = re-poll tracker); direct-session bindings are durable SQLite.
|
|
85
85
|
|
|
86
86
|
See [`openspec/changes/archive/2026-06-23-bootstrap-tasking-runtime/design.md`](./openspec/changes/archive/2026-06-23-bootstrap-tasking-runtime/design.md) for the full design decisions.
|
|
@@ -97,7 +97,7 @@ See [`openspec/changes/archive/2026-06-23-bootstrap-tasking-runtime/design.md`](
|
|
|
97
97
|
|
|
98
98
|
`tasking` is designed for **trusted environments** with a high-trust configuration:
|
|
99
99
|
|
|
100
|
-
- The
|
|
100
|
+
- The opencode worker runs with the daemon's OS privileges. Use opencode's approval/sandbox settings to tighten execution where needed; `ask` permissions surface as Feishu approval cards.
|
|
101
101
|
- **Hook scripts are fully trusted** — `WORKFLOW.md` hooks (`after_create`, `before_run`, etc.) run arbitrary shell in the workspace directory with `bash -lc`. Only version hooks from sources you control.
|
|
102
102
|
- Workspace hooks are bounded by `hooks.timeout_ms` (default 60s) to avoid hanging the daemon.
|
|
103
103
|
- The orchestrator performs **no tracker writes** — ticket mutations (state transitions, comments) happen inside the coding agent via its tools, not in orchestrator business logic.
|
|
@@ -105,7 +105,7 @@ See [`openspec/changes/archive/2026-06-23-bootstrap-tasking-runtime/design.md`](
|
|
|
105
105
|
|
|
106
106
|
### Approval & sandbox policy
|
|
107
107
|
|
|
108
|
-
Approval
|
|
108
|
+
Approval and sandbox behavior is delegated to opencode's own permission policy, configured via the `opencode.*` block and each workspace's `.opencode` config. `ask` permissions pend for a Feishu approval card (default 30-minute budget, then auto-reject).
|
|
109
109
|
|
|
110
110
|
## Development
|
|
111
111
|
|
|
@@ -123,3 +123,11 @@ npm run dev -- start # run via tsx
|
|
|
123
123
|
MIT — see [LICENSE](./LICENSE).
|
|
124
124
|
|
|
125
125
|
tasking's scheduling model and shipped agent skills draw on [openai/symphony](https://github.com/openai/symphony) (Apache-2.0). Its license notice applies to those portions.
|
|
126
|
+
|
|
127
|
+
|
|
128
|
+
## Breaking changes in 0.7.0
|
|
129
|
+
|
|
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
|
+
- **`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). 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
|
+
- **Progress is polled** (default every 2s) rather than streamed; token totals are `input + output + reasoning` (v2 has no `total` field).
|
package/README.zh-CN.md
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
- **结构化(Jira):** 确定性的轮询/派发/对账/重试调度器——热循环中无 LLM。
|
|
10
10
|
- **飞书:** 群内 `/chat` 直接跑 opencode 的直连会话,加上与 Jira 的评论双向镜像桥。LLM `route agent`(inbox 分诊)**未实现**。
|
|
11
11
|
|
|
12
|
-
两者汇聚到共享的 `Task` 模型、共享的工作区管理器与共享的 `opencode
|
|
12
|
+
两者汇聚到共享的 `Task` 模型、共享的工作区管理器与共享的 opencode v2 worker(经 `opencode api` 驱动;tasking 0.7 要求 `opencode >=2.0 <3`)。
|
|
13
13
|
|
|
14
14
|
`tasking` 在调度层面参考了 [Symphony](https://github.com/openai/symphony)的协调模型,在此基础进行扩展。
|
|
15
15
|
|
|
@@ -63,7 +63,7 @@ tasking logs # 查看近期结构化日志
|
|
|
63
63
|
- `workspace.root` — 每任务工作区根(默认 `<tmp>/tasking_workspaces`)
|
|
64
64
|
- `hooks.*` — `after_create` / `before_run` / `after_run` / `before_remove` shell hooks
|
|
65
65
|
- `agent.*` — `max_concurrent_agents`、`max_turns`、`max_retry_backoff_ms`、按状态上限
|
|
66
|
-
- `opencode.*` —
|
|
66
|
+
- `opencode.*` — opencode 命令(默认 `opencode`)、agent profile、model/variant、turn/stall/审批超时、轮询间隔
|
|
67
67
|
- `router.*` — **未实现**:resolver 会解析但无运行时代码消费(预留供将来 route agent 分诊)
|
|
68
68
|
- `feishu.*` — 飞书源应用凭据与 `enabled` 标志;`feishu.direct` 启用 `/chat` 固定目录 opencode 直连会话(绕过 Jira;见 `docs/configuration.md`)
|
|
69
69
|
- `server.port` — 可选 HTTP dashboard 端口
|
|
@@ -74,13 +74,13 @@ prompt 正文是严格 Liquid 兼容模板,带 `task`(或 `issue`)与 `att
|
|
|
74
74
|
|
|
75
75
|
```
|
|
76
76
|
Jira (structured) ──► deterministic scheduler ──┐
|
|
77
|
-
├──► shared Task model ──► workspace ──► opencode
|
|
77
|
+
├──► shared Task model ──► workspace ──► opencode v2 (api)
|
|
78
78
|
Feishu (direct sessions) ──► direct worker ──┘
|
|
79
79
|
```
|
|
80
80
|
|
|
81
81
|
- **结构化路径:** Symphony 式轮询 tick → 状态机 → 对账 → 指数退避重试。热循环中无 LLM。
|
|
82
82
|
- **飞书路径:** 群内 `/chat` 直连会话(在配置目录跑 opencode,一个话题一个会话),加上 issue 话题 ↔ Jira 评论的双向镜像桥。规划的 route agent inbox 分诊**未实现**。
|
|
83
|
-
- **Worker:** `opencode
|
|
83
|
+
- **Worker:** 按任务经 `opencode api` 驱动 opencode v2 会话(`session.create` → `session.prompt` → 轮询 → `session.interrupt`)。
|
|
84
84
|
- **状态:** 编排器调度状态在内存中(重启 = 重新轮询 tracker);直连会话绑定是持久 SQLite。
|
|
85
85
|
|
|
86
86
|
完整设计决策见 [`openspec/changes/archive/2026-06-23-bootstrap-tasking-runtime/design.md`](./openspec/changes/archive/2026-06-23-bootstrap-tasking-runtime/design.md)。
|
|
@@ -97,7 +97,7 @@ Feishu (direct sessions) ──► direct worker ──┘
|
|
|
97
97
|
|
|
98
98
|
`tasking` 面向**可信环境**、高信任配置:
|
|
99
99
|
|
|
100
|
-
-
|
|
100
|
+
- opencode worker 以 daemon 的 OS 权限运行。按需用 opencode 的 approval/sandbox 设置收紧执行;`ask` 权限会以飞书审批卡呈现。
|
|
101
101
|
- **Hook 脚本完全可信** — `WORKFLOW.md` hooks(`after_create`、`before_run` 等)以 `bash -lc` 在工作区目录运行任意 shell。只运行你可控来源的 hook。
|
|
102
102
|
- 工作区 hooks 受 `hooks.timeout_ms`(默认 60s)约束,避免 daemon 挂起。
|
|
103
103
|
- 编排器**不做 tracker 写入** — 工单变更(状态流转、评论)发生在 coding agent 内部经其工具完成,而非编排器业务逻辑。
|
|
@@ -105,7 +105,7 @@ Feishu (direct sessions) ──► direct worker ──┘
|
|
|
105
105
|
|
|
106
106
|
### Approval 与 sandbox 策略
|
|
107
107
|
|
|
108
|
-
Approval
|
|
108
|
+
Approval 与 sandbox 行为委托给 opencode 自身的权限策略,经 `opencode.*` 块与各工作区的 `.opencode` 配置设定。`ask` 权限会挂起等待飞书审批卡(默认 30 分钟预算,到点自动拒绝)。
|
|
109
109
|
|
|
110
110
|
## 开发
|
|
111
111
|
|
|
@@ -123,3 +123,11 @@ npm run dev -- start # 经 tsx 运行
|
|
|
123
123
|
MIT——见 [LICENSE](./LICENSE)。
|
|
124
124
|
|
|
125
125
|
tasking 的调度模型与内置 agent 技能借鉴自 [openai/symphony](https://github.com/openai/symphony)(Apache-2.0),其许可声明适用于这些部分。
|
|
126
|
+
|
|
127
|
+
|
|
128
|
+
## 0.7.0 破坏性变更
|
|
129
|
+
|
|
130
|
+
- **要求 opencode v2**:tasking 0.7 要求 `opencode >=2.0 <3`,v1 或 v3+ 拒绝启动(用 `opencode upgrade --major` 升级)。opencode v1 支持冻结在 `support/v1` 分支(0.6.x)。
|
|
131
|
+
- **`opencode.command` 默认值** 从 `opencode run` 改为 `opencode`;已有 `WORKFLOW.md` 需相应修改。
|
|
132
|
+
- **`auto_approve: false` 语义变更**:`ask` 权限改为挂起等待飞书审批卡(v1 是自动拒绝);`--auto`/`--dir`/`--variant` 标志已移除。
|
|
133
|
+
- **进度改为轮询**(默认每 2 秒);token 合计 = `input + output + reasoning`(v2 无 `total` 字段)。
|
|
@@ -99,7 +99,7 @@ hooks:
|
|
|
99
99
|
# agent: concurrency & retry policy
|
|
100
100
|
# ============================================================================
|
|
101
101
|
agent:
|
|
102
|
-
# Global concurrency cap. At most this many opencode
|
|
102
|
+
# Global concurrency cap. At most this many opencode sessions run simultaneously.
|
|
103
103
|
max_concurrent_agents: 10
|
|
104
104
|
|
|
105
105
|
# Turn limit within a single worker. When reached, the worker exits and the scheduler schedules a continuation retry.
|
|
@@ -113,11 +113,11 @@ agent:
|
|
|
113
113
|
max_concurrent_agents_by_state: {}
|
|
114
114
|
|
|
115
115
|
# ============================================================================
|
|
116
|
-
# opencode:
|
|
116
|
+
# opencode: driver configuration
|
|
117
117
|
# ============================================================================
|
|
118
118
|
opencode:
|
|
119
|
-
# opencode launch command. Default "opencode
|
|
120
|
-
command: opencode
|
|
119
|
+
# opencode launch command. Default "opencode" (driven through opencode api).
|
|
120
|
+
command: opencode
|
|
121
121
|
|
|
122
122
|
# opencode agent profile name.
|
|
123
123
|
agent: build
|
|
@@ -126,12 +126,28 @@ opencode:
|
|
|
126
126
|
# Empty array (default) = no validation, any `agent:<name>` passes through; non-empty = advisory validation, unknown names warn and fall back to the default. Not a hard allowlist.
|
|
127
127
|
agents: []
|
|
128
128
|
|
|
129
|
-
# Optional. opencode model (provider/model format), maps to
|
|
129
|
+
# Optional. opencode model (provider/model format), maps to `Model.Ref.id`. Default null (unset; uses opencode's default model).
|
|
130
130
|
model: null
|
|
131
131
|
|
|
132
|
-
# Optional. Model variant (provider-specific reasoning effort such as high/max/minimal), maps to
|
|
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
|
|
@@ -217,16 +233,21 @@ feishu:
|
|
|
217
233
|
# Directory-prefix allow-list for ad-hoc path mode (`/chat /abs/path <msg>`); empty = unrestricted.
|
|
218
234
|
path_roots: []
|
|
219
235
|
|
|
220
|
-
# true =
|
|
236
|
+
# true = session-level allow-all permissions ruleset (overrides workspace ask; workspace deny still applies).
|
|
221
237
|
# Default false: the permission stance comes from the target directory's own .opencode config.
|
|
222
238
|
auto_approve: false
|
|
223
239
|
|
|
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);
|
|
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
|
|
|
@@ -97,7 +97,7 @@ hooks:
|
|
|
97
97
|
# agent: 并发与重试策略
|
|
98
98
|
# ============================================================================
|
|
99
99
|
agent:
|
|
100
|
-
# 全局并发上限。同时运行的 opencode
|
|
100
|
+
# 全局并发上限。同时运行的 opencode 会话数不超过此值。
|
|
101
101
|
max_concurrent_agents: 10
|
|
102
102
|
|
|
103
103
|
# 同一 worker 内的 turn 上限。达到后 worker 退出,调度续轮 retry。
|
|
@@ -111,11 +111,11 @@ agent:
|
|
|
111
111
|
max_concurrent_agents_by_state: {}
|
|
112
112
|
|
|
113
113
|
# ============================================================================
|
|
114
|
-
# opencode:
|
|
114
|
+
# opencode: 驱动器配置
|
|
115
115
|
# ============================================================================
|
|
116
116
|
opencode:
|
|
117
|
-
# opencode 启动命令。默认 "opencode
|
|
118
|
-
command: opencode
|
|
117
|
+
# opencode 启动命令。默认 "opencode"(经 opencode api 驱动)。
|
|
118
|
+
command: opencode
|
|
119
119
|
|
|
120
120
|
# opencode agent profile 名称。
|
|
121
121
|
agent: build
|
|
@@ -124,12 +124,25 @@ opencode:
|
|
|
124
124
|
# 空目录(默认)=不校验,任何 `agent:<name>` 直通;非空=咨询性校验,未知名警告并回退默认。不作硬白名单。
|
|
125
125
|
agents: []
|
|
126
126
|
|
|
127
|
-
# 可选。opencode 模型 (provider/model 格式),映射
|
|
127
|
+
# 可选。opencode 模型 (provider/model 格式),映射 `Model.Ref.id`。默认 null(不配置,走 opencode 默认模型)。
|
|
128
128
|
model: null
|
|
129
129
|
|
|
130
|
-
# 可选。模型变体 (provider 特定推理档位,如 high/max/minimal),映射
|
|
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
|
|
@@ -213,16 +226,20 @@ feishu:
|
|
|
213
226
|
# ad-hoc path 模式(`/chat /绝对路径 <消息>`)的目录前缀白名单;空 = 不限制。
|
|
214
227
|
path_roots: []
|
|
215
228
|
|
|
216
|
-
# true =
|
|
229
|
+
# true = 会话级全放 permissions ruleset(覆盖工作区 ask;工作区自身的 deny 仍生效)。
|
|
217
230
|
# 默认 false:权限姿态由目标目录自己的 .opencode 权限配置决定。
|
|
218
231
|
auto_approve: false
|
|
219
232
|
|
|
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
|
|
|
@@ -93,7 +93,7 @@ hooks:
|
|
|
93
93
|
# agent: concurrency & retry policy
|
|
94
94
|
# ============================================================================
|
|
95
95
|
agent:
|
|
96
|
-
# Global concurrency cap. At most this many opencode
|
|
96
|
+
# Global concurrency cap. At most this many opencode sessions run simultaneously.
|
|
97
97
|
max_concurrent_agents: 10
|
|
98
98
|
|
|
99
99
|
# Turn limit within a single worker. When reached, the worker exits and the scheduler schedules a continuation retry.
|
|
@@ -107,11 +107,11 @@ agent:
|
|
|
107
107
|
max_concurrent_agents_by_state: {}
|
|
108
108
|
|
|
109
109
|
# ============================================================================
|
|
110
|
-
# opencode:
|
|
110
|
+
# opencode: driver configuration
|
|
111
111
|
# ============================================================================
|
|
112
112
|
opencode:
|
|
113
|
-
# opencode launch command. Default "opencode
|
|
114
|
-
command: opencode
|
|
113
|
+
# opencode launch command. Default "opencode" (driven through opencode api).
|
|
114
|
+
command: opencode
|
|
115
115
|
|
|
116
116
|
# opencode agent profile name.
|
|
117
117
|
agent: build
|
|
@@ -120,12 +120,28 @@ opencode:
|
|
|
120
120
|
# Empty array (default) = no validation, any `agent:<name>` passes through; non-empty = advisory validation, unknown names warn and fall back to the default. Not a hard allowlist.
|
|
121
121
|
agents: []
|
|
122
122
|
|
|
123
|
-
# Optional. opencode model (provider/model format), maps to
|
|
123
|
+
# Optional. opencode model (provider/model format), maps to `Model.Ref.id`. Default null (unset; uses opencode's default model).
|
|
124
124
|
model: null
|
|
125
125
|
|
|
126
|
-
# Optional. Model variant (provider-specific reasoning effort such as high/max/minimal), maps to
|
|
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
|
|
@@ -211,16 +227,21 @@ feishu:
|
|
|
211
227
|
# Directory-prefix allow-list for ad-hoc path mode (`/chat /abs/path <msg>`); empty = unrestricted.
|
|
212
228
|
path_roots: []
|
|
213
229
|
|
|
214
|
-
# true =
|
|
230
|
+
# true = session-level allow-all permissions ruleset (overrides workspace ask; workspace deny still applies).
|
|
215
231
|
# Default false: the permission stance comes from the target directory's own .opencode config.
|
|
216
232
|
auto_approve: false
|
|
217
233
|
|
|
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);
|
|
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
|
|
|
@@ -89,7 +89,7 @@ hooks:
|
|
|
89
89
|
# agent: 并发与重试策略
|
|
90
90
|
# ============================================================================
|
|
91
91
|
agent:
|
|
92
|
-
# 全局并发上限。同时运行的 opencode
|
|
92
|
+
# 全局并发上限。同时运行的 opencode 会话数不超过此值。
|
|
93
93
|
max_concurrent_agents: 10
|
|
94
94
|
|
|
95
95
|
# 同一 worker 内的 turn 上限。达到后 worker 退出,调度续轮 retry。
|
|
@@ -103,11 +103,11 @@ agent:
|
|
|
103
103
|
max_concurrent_agents_by_state: {}
|
|
104
104
|
|
|
105
105
|
# ============================================================================
|
|
106
|
-
# opencode:
|
|
106
|
+
# opencode: 驱动器配置
|
|
107
107
|
# ============================================================================
|
|
108
108
|
opencode:
|
|
109
|
-
# opencode 启动命令。默认 "opencode
|
|
110
|
-
command: opencode
|
|
109
|
+
# opencode 启动命令。默认 "opencode"(经 opencode api 驱动)。
|
|
110
|
+
command: opencode
|
|
111
111
|
|
|
112
112
|
# opencode agent profile 名称。
|
|
113
113
|
agent: build
|
|
@@ -116,12 +116,25 @@ opencode:
|
|
|
116
116
|
# 空目录(默认)=不校验,任何 `agent:<name>` 直通;非空=咨询性校验,未知名警告并回退默认。不作硬白名单。
|
|
117
117
|
agents: []
|
|
118
118
|
|
|
119
|
-
# 可选。opencode 模型 (provider/model 格式),映射
|
|
119
|
+
# 可选。opencode 模型 (provider/model 格式),映射 `Model.Ref.id`。默认 null(不配置,走 opencode 默认模型)。
|
|
120
120
|
model: null
|
|
121
121
|
|
|
122
|
-
# 可选。模型变体 (provider 特定推理档位,如 high/max/minimal),映射
|
|
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
|
|
@@ -203,16 +216,20 @@ feishu:
|
|
|
203
216
|
# ad-hoc path 模式(`/chat /绝对路径 <消息>`)的目录前缀白名单;空 = 不限制。
|
|
204
217
|
path_roots: []
|
|
205
218
|
|
|
206
|
-
# true =
|
|
219
|
+
# true = 会话级全放 permissions ruleset(覆盖工作区 ask;工作区自身的 deny 仍生效)。
|
|
207
220
|
# 默认 false:权限姿态由目标目录自己的 .opencode 权限配置决定。
|
|
208
221
|
auto_approve: false
|
|
209
222
|
|
|
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
|
|
|
@@ -99,7 +99,7 @@ hooks:
|
|
|
99
99
|
# agent: concurrency & retry policy
|
|
100
100
|
# ============================================================================
|
|
101
101
|
agent:
|
|
102
|
-
# Global concurrency cap. At most this many opencode
|
|
102
|
+
# Global concurrency cap. At most this many opencode sessions run simultaneously.
|
|
103
103
|
max_concurrent_agents: 10
|
|
104
104
|
|
|
105
105
|
# Turn limit within a single worker. When reached, the worker exits and the scheduler schedules a continuation retry.
|
|
@@ -113,11 +113,11 @@ agent:
|
|
|
113
113
|
max_concurrent_agents_by_state: {}
|
|
114
114
|
|
|
115
115
|
# ============================================================================
|
|
116
|
-
# opencode:
|
|
116
|
+
# opencode: driver configuration
|
|
117
117
|
# ============================================================================
|
|
118
118
|
opencode:
|
|
119
|
-
# opencode launch command. Default "opencode
|
|
120
|
-
command: opencode
|
|
119
|
+
# opencode launch command. Default "opencode" (driven through opencode api).
|
|
120
|
+
command: opencode
|
|
121
121
|
|
|
122
122
|
# opencode agent profile name.
|
|
123
123
|
agent: build
|
|
@@ -126,12 +126,28 @@ opencode:
|
|
|
126
126
|
# Empty array (default) = no validation, any `agent:<name>` passes through; non-empty = advisory validation, unknown names warn and fall back to the default. Not a hard allowlist.
|
|
127
127
|
agents: []
|
|
128
128
|
|
|
129
|
-
# Optional. opencode model (provider/model format), maps to
|
|
129
|
+
# Optional. opencode model (provider/model format), maps to `Model.Ref.id`. Default null (unset; uses opencode's default model).
|
|
130
130
|
model: null
|
|
131
131
|
|
|
132
|
-
# Optional. Model variant (provider-specific reasoning effort such as high/max/minimal), maps to
|
|
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
|
|
@@ -217,16 +233,21 @@ feishu:
|
|
|
217
233
|
# Directory-prefix allow-list for ad-hoc path mode (`/chat /abs/path <msg>`); empty = unrestricted.
|
|
218
234
|
path_roots: []
|
|
219
235
|
|
|
220
|
-
# true =
|
|
236
|
+
# true = session-level allow-all permissions ruleset (overrides workspace ask; workspace deny still applies).
|
|
221
237
|
# Default false: the permission stance comes from the target directory's own .opencode config.
|
|
222
238
|
auto_approve: false
|
|
223
239
|
|
|
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);
|
|
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
|
|
|
@@ -97,7 +97,7 @@ hooks:
|
|
|
97
97
|
# agent: 并发与重试策略
|
|
98
98
|
# ============================================================================
|
|
99
99
|
agent:
|
|
100
|
-
# 全局并发上限。同时运行的 opencode
|
|
100
|
+
# 全局并发上限。同时运行的 opencode 会话数不超过此值。
|
|
101
101
|
max_concurrent_agents: 10
|
|
102
102
|
|
|
103
103
|
# 同一 worker 内的 turn 上限。达到后 worker 退出,调度续轮 retry。
|
|
@@ -111,11 +111,11 @@ agent:
|
|
|
111
111
|
max_concurrent_agents_by_state: {}
|
|
112
112
|
|
|
113
113
|
# ============================================================================
|
|
114
|
-
# opencode:
|
|
114
|
+
# opencode: 驱动器配置
|
|
115
115
|
# ============================================================================
|
|
116
116
|
opencode:
|
|
117
|
-
# opencode 启动命令。默认 "opencode
|
|
118
|
-
command: opencode
|
|
117
|
+
# opencode 启动命令。默认 "opencode"(经 opencode api 驱动)。
|
|
118
|
+
command: opencode
|
|
119
119
|
|
|
120
120
|
# opencode agent profile 名称。
|
|
121
121
|
agent: build
|
|
@@ -124,12 +124,25 @@ opencode:
|
|
|
124
124
|
# 空目录(默认)=不校验,任何 `agent:<name>` 直通;非空=咨询性校验,未知名警告并回退默认。不作硬白名单。
|
|
125
125
|
agents: []
|
|
126
126
|
|
|
127
|
-
# 可选。opencode 模型 (provider/model 格式),映射
|
|
127
|
+
# 可选。opencode 模型 (provider/model 格式),映射 `Model.Ref.id`。默认 null(不配置,走 opencode 默认模型)。
|
|
128
128
|
model: null
|
|
129
129
|
|
|
130
|
-
# 可选。模型变体 (provider 特定推理档位,如 high/max/minimal),映射
|
|
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
|
|
@@ -213,16 +226,20 @@ feishu:
|
|
|
213
226
|
# ad-hoc path 模式(`/chat /绝对路径 <消息>`)的目录前缀白名单;空 = 不限制。
|
|
214
227
|
path_roots: []
|
|
215
228
|
|
|
216
|
-
# true =
|
|
229
|
+
# true = 会话级全放 permissions ruleset(覆盖工作区 ask;工作区自身的 deny 仍生效)。
|
|
217
230
|
# 默认 false:权限姿态由目标目录自己的 .opencode 权限配置决定。
|
|
218
231
|
auto_approve: false
|
|
219
232
|
|
|
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
|
|