@xdxer/dingtalk-agent 0.1.5-beta.1 → 0.1.5-beta.3
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 +47 -0
- package/README.en.md +10 -5
- package/README.md +10 -5
- package/dist/bin/dingtalk-agent.js +16 -5
- package/dist/bin/dingtalk-agent.js.map +1 -1
- package/dist/src/agent-audit.js +69 -55
- package/dist/src/agent-audit.js.map +1 -1
- package/dist/src/agent-enhance.js +49 -30
- package/dist/src/agent-enhance.js.map +1 -1
- package/dist/src/agent-platform.js +0 -1
- package/dist/src/agent-platform.js.map +1 -1
- package/dist/src/bootstrap.js +6 -2
- package/dist/src/bootstrap.js.map +1 -1
- package/dist/src/development-workspace.js +67 -23
- package/dist/src/development-workspace.js.map +1 -1
- package/dist/src/doctor.js +6 -1
- package/dist/src/doctor.js.map +1 -1
- package/dist/src/multica-deploy.js +287 -54
- package/dist/src/multica-deploy.js.map +1 -1
- package/dist/src/multica-provider.js +1 -2
- package/dist/src/multica-provider.js.map +1 -1
- package/dist/src/opencode-provider.js +20 -6
- package/dist/src/opencode-provider.js.map +1 -1
- package/dist/src/skill-manager.js +2 -3
- package/dist/src/skill-manager.js.map +1 -1
- package/dist/src/skills.js +2 -0
- package/dist/src/skills.js.map +1 -1
- package/dist/src/workspace.js +11 -6
- package/dist/src/workspace.js.map +1 -1
- package/docs/ARCHITECTURE.md +22 -7
- package/docs/INSTALLATION.md +1 -1
- package/docs/schemas/multica-deployment-receipt.schema.json +2 -2
- package/docs/schemas/multica-workspace-run-plan.schema.json +31 -0
- package/docs/schemas/multica-workspace-run.schema.json +44 -0
- package/docs/schemas/project.schema.json +15 -2
- package/examples/agents/README.md +8 -6
- package/examples/agents/fde-coach/AGENTS.md +2 -34
- package/examples/agents/fde-coach/agent/AGENTS.md +35 -0
- package/examples/agents/fde-coach/agent.bindings.json +10 -0
- package/examples/agents/release-manager/AGENTS.md +2 -34
- package/examples/agents/release-manager/agent/AGENTS.md +35 -0
- package/examples/agents/release-manager/agent.bindings.json +10 -0
- package/lab/project-workspace/fake-multica-provider.mjs +62 -14
- package/lab/project-workspace/multica-readonly.fixture.json +0 -12
- package/lab/project-workspace/project.fixture.json +0 -4
- package/lab/robot-eval/suite.json +1 -1
- package/package.json +1 -2
- package/skills/README.md +0 -1
- package/skills/core/dingtalk-agent-compose/SKILL.md +23 -17
- package/skills/core/dingtalk-agent-compose/assets/AGENTS.template.md +1 -1
- package/skills/core/dingtalk-agent-compose/assets/REPOSITORY.template.md +10 -0
- package/skills/core/dingtalk-agent-compose/assets/agent.bindings.dingtalk-doc.template.json +2 -2
- package/skills/core/dingtalk-agent-compose/assets/agent.bindings.local.template.json +2 -2
- package/skills/core/dingtalk-agent-compose/assets/hosts/opencode/opencode.template.json +2 -1
- package/skills/core/dingtalk-agent-compose/evals/evals.json +1 -1
- package/skills/core/dingtalk-agent-compose/references/agent-definition-contract.md +7 -7
- package/skills/core/dingtalk-agent-compose/references/host-loading-contract.md +10 -12
- package/skills/core/dingtalk-agent-compose/references/hosts/claude-code.md +13 -12
- package/skills/core/dingtalk-agent-compose/references/hosts/opencode.md +13 -12
- package/skills/core/dingtalk-agent-eval/SKILL.md +1 -1
- package/skills/core/dingtalk-agent-eval/references/interactive-debug-channels.md +9 -3
- package/skills/core/dingtalk-basic-behavior/SKILL.md +18 -3
- package/skills/core/dingtalk-basic-behavior/references/perception-and-gates.md +56 -0
- package/skills/core/dingtalk-basic-behavior/references/truth-and-recovery.md +4 -2
- package/skills/platforms/multica-dingtalk/PLATFORM.md +6 -5
- package/skills/platforms/multica-dingtalk/dingtalk-agent-deploy-multica/SKILL.md +4 -4
- package/skills/platforms/multica-dingtalk/dingtalk-agent-deploy-multica/references/multica-deployment-contract.md +14 -6
- package/skills/platforms/multica-dingtalk/dingtalk-agent-boot-multica/SKILL.md +0 -40
- /package/examples/agents/fde-coach/{skills → agent/skills}/fde-coach/SKILL.md +0 -0
- /package/examples/agents/release-manager/{skills → agent/skills}/release-manager/SKILL.md +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,53 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to `@xdxer/dingtalk-agent` are documented here. The project follows semantic versioning; prerelease entries describe release candidates and do not imply that Live canaries or registry publication have completed.
|
|
4
4
|
|
|
5
|
+
## 0.1.5-beta.3 - 2026-07-22
|
|
6
|
+
|
|
7
|
+
Agent delivery-package single-source layout and Multica Issue-Adapter receipt compatibility (PR #11). Ships on the `beta` dist-tag; `latest` stays at 0.1.4.
|
|
8
|
+
|
|
9
|
+
### Changed
|
|
10
|
+
|
|
11
|
+
- Agent delivery packages now have a single source of truth: new projects generate `agent/AGENTS.md` and `agent/skills/`, and Host exposure is materialized only into temporary isolated workspaces instead of being committed alongside the source. The project manifest gains `skillsRoot`; explicit paths and the legacy root layout keep working.
|
|
12
|
+
- Basic Behavior 0.11.11 makes IM history file-identifier recovery mandatory: rich-message recovery follows a fixed readback-before-gap-judgment order, and a fileId present in a history file card must go through `drive info`/read-only download instead of the Agent claiming it cannot read the file. A deterministic history-file-card fixture locks the behavior.
|
|
13
|
+
- Golden Path and load-evidence fixtures moved to the `agent/AGENTS.md` + `agent/skills` single-source layout; load evidence now verifies resolved instructions against the trusted `definitionInstruction` exactly, while the legacy implicit root-`AGENTS.md` rule remains accepted.
|
|
14
|
+
|
|
15
|
+
### Fixed
|
|
16
|
+
|
|
17
|
+
- The Multica deployment load-smoke gate no longer misjudges the platform's constrained Issue-Adapter receipts as arbitrary Shell. It accepts the combined here-doc write/comment/cleanup control-plane command only when content, filename and target Issue all match exactly, extracts the response evidence from that command, adds `result.md` to the approved result filenames (alongside `reply.md`/`result.json`), and allows `rm`/`rm -f` cleanup only for those three whitelisted files. DWS, network and any other Shell use still fail closed.
|
|
18
|
+
- Contract scenario 54's injected-timeout legs used a 1-second per-call provider budget, which a loaded machine could exhaust on an innocent preflight read (each fake-provider call spawns a Node process) before ever reaching the write the timeout was injected on — the pre-release `--full` run failed exactly this way while the isolated rerun passed. The runtime behaved correctly (read timeout → fail closed before any remote write); the eval budgets were raised to 4 seconds with the simulated hang raised to 8, and scenario 54's expectation texts in `evals.json` were reordered to match the runner's check order, which had drifted and mislabeled the failing assertion.
|
|
19
|
+
|
|
20
|
+
## 0.1.5-beta.2 - 2026-07-21
|
|
21
|
+
|
|
22
|
+
Multica native-Skill refactor and DingTalk IM context recovery (PR #9, #10). Ships on the `beta` dist-tag; `latest` stays at 0.1.4.
|
|
23
|
+
|
|
24
|
+
### Changed
|
|
25
|
+
|
|
26
|
+
- Basic Behavior 0.11.10 makes DWS original-message recovery an executable priority gate: when the Host gives current actor/title/text/time but omits a rich-message href or quote, the Agent must run the bounded `chat search` → `message list` verification path before any local `find`/`glob`/`ls`; an empty workspace can no longer stand in for DingTalk IM evidence.
|
|
27
|
+
- Basic Behavior 0.11.9 closes DingTalk IM context recovery without coupling to a managed platform: when the Host projection is incomplete, DWS may recover the current conversation's raw Markdown href, file IDs and `quotedMessage`, but a title-based group candidate becomes trusted only after the current actor/text/time trigger is independently matched; ambiguous candidates fail closed.
|
|
28
|
+
- Basic Behavior 0.11.8 treats a stable DingTalk node URL/file ID in the current trusted message as the object to read: ordinary files are classified with `drive info`, downloaded read-only, and never replaced by Issue, workspace or old-task filename searches.
|
|
29
|
+
- Basic Behavior 0.11.7 makes previous-file recovery mandatory when a trusted conversation is readable: it resolves the recent IM fileId/dentryId/URL and reads that object directly instead of treating workspace, memory, knowledge or an old task's read list as conversation history.
|
|
30
|
+
- Basic Behavior 0.11.6 adds focused Chat-history enrichment: when the Host exposes a trusted ChatSession/conversation mapping, the Agent may use a bounded read-only DWS history window to resolve the current message's omitted referent or prior attachment, while the triggering message remains the only source of this Run's goal and authorization.
|
|
31
|
+
- Basic Behavior 0.11.5 turns a real Multica IM regression into a hard evidence-scope rule: a Run that lacks the previous quote/file projection may report only that Run-level gap, never claim the conversation did not receive the message; conversation-level absence requires an independent history readback.
|
|
32
|
+
- Basic Behavior 0.11.4 closes the IM file-read loop: a trusted URL/file ID is used directly, online docs use doc read, ordinary files use read-only drive download into the current task, and the Agent no longer asks for confirmation merely to perform that read.
|
|
33
|
+
- Basic Behavior now freezes the current Run's trusted time and rich-message projection before reasoning. Relative dates can no longer reuse a stale Session/UTC clock, and visible filenames, file IDs, URLs or quoted fields cannot be negated by an empty workspace scan or a missing content reader.
|
|
34
|
+
- Multica native Project Workspaces no longer require fake local memory/knowledge/artifacts routes; OpenCode Workspaces retain the complete semantic-storage gate.
|
|
35
|
+
- Multica Agent instructions are exactly the human-authored `AGENTS.md`. Definition/deployment hashes and the required Skill manifest remain in the deployment plan, operation and Receipt instead of being prepended to the System Prompt.
|
|
36
|
+
- Removed `dingtalk-agent-boot-multica`. Multica assigns only Basic and Role Skills, and the deployment Issue smoke directly asks the Host-native Skill tool to load that frozen set.
|
|
37
|
+
- Workspace inspection, platform registration, package contents and deterministic W4/W5 contracts enforce native Skill assignment and reject the obsolete Boot layer.
|
|
38
|
+
- Multica deploy 0.3.2 recovers exactly once when a persisted load-smoke Issue has no task after assignment. It posts one stable-ID Agent mention on that Issue only for the empty-run state and never duplicates an already queued, running, or terminal smoke task.
|
|
39
|
+
- Multica deploy load-smoke accepts the platform's two constrained result-file conventions, `reply.md` and `result.json`. Both remain fail-closed: the path must use an approved response filename without traversal, the payload must exactly match the marker and required Skill set, and any unapproved tool call still fails the gate.
|
|
40
|
+
- Eval 0.7.3 adds the managed Multica `workspace run` path, current DWS `list-direct` readback, capability-aware event-subscription fallback, and a required IM matrix for continuation, quote, file, document and correction cases.
|
|
41
|
+
- Compose 0.13.1 strengthens the readable Basic inheritance anchor: every task must load Basic through the Host-native Skill tool before analysis, reply, or Role Skill use. This introduces no Boot Skill or machine metadata in the System Prompt.
|
|
42
|
+
- `doctor.ready` now treats Claude Code/Codex/OpenCode discovery conflicts as client-specific observations rather than runtime blockers; canonical Skill absence, DWS/auth, CLI and Node failures remain fail-closed.
|
|
43
|
+
|
|
44
|
+
### Fixed
|
|
45
|
+
|
|
46
|
+
- Synced the robot-eval suite's `exact-basic-version` expectation to the canonical Basic Behavior version (0.11.8 → 0.11.10). Contract 43 asserts the load-probe version tracks `metadata.version`; the earlier Basic bumps left this fixture behind, so a full run failed until it was re-synced.
|
|
47
|
+
|
|
48
|
+
### Release boundary
|
|
49
|
+
|
|
50
|
+
- These changes require a new Multica deployment so existing Agents drop the old Boot assignment and receive the readable Definition. The first `dta deploy` after upgrade rewrites each managed Agent's System Prompt to the raw `AGENTS.md`, so it is a content update rather than a no-op.
|
|
51
|
+
|
|
5
52
|
## 0.1.5-beta.1 - 2026-07-20
|
|
6
53
|
|
|
7
54
|
Documentation and evaluation-tooling release. **No runtime code changes** — `bin/` and `src/` behavior is identical to 0.1.4; the only `bin/` edit is a header comment. Ships on the `beta` dist-tag; `latest` stays at 0.1.4.
|
package/README.en.md
CHANGED
|
@@ -53,7 +53,9 @@ A model that talks is not a digital employee that works reliably. `dta` turns th
|
|
|
53
53
|
|
|
54
54
|
## What an Agent is made of
|
|
55
55
|
|
|
56
|
-
Four things: the **Definition** (`AGENTS.md` — who I am, where my duties stop), **shared behavior** (
|
|
56
|
+
Four things: the **Definition** (`agent/AGENTS.md` — who I am, where my duties stop), **shared behavior** (`agent/skills/dingtalk-basic-behavior`), **role capability** (`agent/skills/<role>/SKILL.md`), and **storage routing** (`agent.bindings.json` — optional; the same configuration can come from host context, environment variables, or a Workspace manifest). The repository-root `AGENTS.md` only governs coding agents and is never the remote System Prompt.
|
|
57
|
+
|
|
58
|
+
For a new project, `agent/` is the only managed-platform delivery boundary; do not commit duplicate Skills under root `skills/` or `.agents/skills/`. Existing code repositories can retain custom layouts by explicitly declaring `agent.definition` and `agent.skillsRoot` in `dingtalk-agent.json`.
|
|
57
59
|
|
|
58
60
|
Full composition, dependencies, and boundaries: [Architecture](docs/ARCHITECTURE.md#2-一个-agent-由什么构成模型-a).
|
|
59
61
|
|
|
@@ -84,12 +86,13 @@ dta agent enhance --project-name release-agent --role-skill release-manager \
|
|
|
84
86
|
|
|
85
87
|
# 2. Audit, run, and evaluate
|
|
86
88
|
dta agent audit --bindings agent.bindings.json --require-skill release-manager --json
|
|
87
|
-
dta workspace run local-dev --json
|
|
88
|
-
dta workspace eval local-dev --json
|
|
89
|
+
dta workspace run local-dev --prompt-file prompt.md --execute --yes --json
|
|
90
|
+
dta workspace eval local-dev --suite evals/suite.json --execute --yes --json
|
|
89
91
|
|
|
90
92
|
# 3. Cloud preflight, promotion, and observation
|
|
91
93
|
dta workspace inspect multica-dev --execute --yes --json
|
|
92
94
|
dta workspace remote-list multica-dev --execute --yes --json
|
|
95
|
+
dta workspace run multica-dev --prompt-file readonly-question.md --execute --yes --json
|
|
93
96
|
dta promote --source local-dev --target multica-dev --dry-run --json
|
|
94
97
|
dta observe --promotion-id <promotion-id> --input <observation.json> --dry-run --json
|
|
95
98
|
```
|
|
@@ -103,7 +106,7 @@ The placeholders above are not yours to invent — each has a definite source:
|
|
|
103
106
|
| `<plan-id>` | Top-level `.planId` in the preceding `--dry-run --json` output. Any source or config change invalidates it, so re-run the dry run |
|
|
104
107
|
| `local-dev` / `multica-dev` | Workspace names **you** declare in `dingtalk-agent.json#workspaces` — not built-in values. Sample: [`lab/project-workspace/project.fixture.json`](lab/project-workspace/project.fixture.json) |
|
|
105
108
|
| `<promotion-id>` | `.promotionId` on the `promotion-receipt@1` produced by `dta promote --yes` |
|
|
106
|
-
| `<role-skill-name>` | The `name` in your `skills/<role>/SKILL.md` frontmatter |
|
|
109
|
+
| `<role-skill-name>` | The `name` in your `agent/skills/<role>/SKILL.md` frontmatter |
|
|
107
110
|
|
|
108
111
|
### Minimal runnable path (local only, three commands)
|
|
109
112
|
|
|
@@ -115,7 +118,9 @@ dta bootstrap --json # Was the body recognized? Check definition.status and
|
|
|
115
118
|
dta agent audit --json # Expect partial — the role semantics are still template text, which is correct
|
|
116
119
|
```
|
|
117
120
|
|
|
118
|
-
None of this needs a DingTalk account or a managed platform, and none of it has side effects. Fill in the real role semantics in `AGENTS.md`, run `agent audit` again, and the only remaining gap is `host.load-probe` — which needs an Agent Host, see the [Compose Skill](skills/core/dingtalk-agent-compose/SKILL.md). The third command group above only applies once you have a Multica binding and declared Workspaces.
|
|
121
|
+
None of this needs a DingTalk account or a managed platform, and none of it has side effects. Fill in the real role semantics in `agent/AGENTS.md`, run `agent audit` again, and the only remaining gap is `host.load-probe` — which needs an Agent Host, see the [Compose Skill](skills/core/dingtalk-agent-compose/SKILL.md). The third command group above only applies once you have a Multica binding and declared Workspaces.
|
|
122
|
+
|
|
123
|
+
When deploying to Multica, the remote System Prompt must equal the manifest-selected `agent/AGENTS.md` source. Deployment hashes, the Skill manifest, and assignment evidence stay in the plan/operation/Receipt control plane. Basic and Role Skills use the platform's native assignment instead of an extra startup prompt or startup Skill.
|
|
119
124
|
|
|
120
125
|
## Support
|
|
121
126
|
|
package/README.md
CHANGED
|
@@ -52,7 +52,9 @@ npm install --global --prefix "$HOME/.local" \
|
|
|
52
52
|
|
|
53
53
|
## 一个 Agent 由什么构成
|
|
54
54
|
|
|
55
|
-
四件东西:**本体**(`AGENTS.md`,我是谁、职责边界)、**公共行为**(`dingtalk-basic-behavior
|
|
55
|
+
四件东西:**本体**(`agent/AGENTS.md`,我是谁、职责边界)、**公共行为**(`agent/skills/dingtalk-basic-behavior`,何时响应/追问/沉默/收口)、**岗位能力**(`agent/skills/<role>/SKILL.md`)、**存储路由**(`agent.bindings.json`,可选——等价配置也可来自宿主 context、环境变量或 Workspace manifest)。仓库根 `AGENTS.md` 只约束 Coding Agent 开发,不属于远端本体。Agent Host、DWS、托管平台和事件源也不属于 Agent 交付包。
|
|
56
|
+
|
|
57
|
+
从零创建时,`agent/` 是 managed agent platform 的唯一同步边界,Skill 不能再复制到根 `skills/` 或 `.agents/skills/`。已有代码仓库不强制迁目录:在 `dingtalk-agent.json#agent` 显式声明 `definition` 与 `skillsRoot` 即可继续按原布局同步。
|
|
56
58
|
|
|
57
59
|
完整的构成、依赖与边界见 [Architecture](docs/ARCHITECTURE.md#2-一个-agent-由什么构成模型-a)。
|
|
58
60
|
|
|
@@ -83,12 +85,13 @@ dta agent enhance --project-name release-agent --role-skill release-manager \
|
|
|
83
85
|
|
|
84
86
|
# 2. 审计、运行与评测
|
|
85
87
|
dta agent audit --bindings agent.bindings.json --require-skill release-manager --json
|
|
86
|
-
dta workspace run local-dev --json
|
|
87
|
-
dta workspace eval local-dev --json
|
|
88
|
+
dta workspace run local-dev --prompt-file prompt.md --execute --yes --json
|
|
89
|
+
dta workspace eval local-dev --suite evals/suite.json --execute --yes --json
|
|
88
90
|
|
|
89
91
|
# 3. 云端预检、发布与观测
|
|
90
92
|
dta workspace inspect multica-dev --execute --yes --json
|
|
91
93
|
dta workspace remote-list multica-dev --execute --yes --json
|
|
94
|
+
dta workspace run multica-dev --prompt-file readonly-question.md --execute --yes --json
|
|
92
95
|
dta promote --source local-dev --target multica-dev --dry-run --json
|
|
93
96
|
dta observe --promotion-id <promotion-id> --input <observation.json> --dry-run --json
|
|
94
97
|
```
|
|
@@ -102,7 +105,7 @@ dta observe --promotion-id <promotion-id> --input <observation.json> --dry-run -
|
|
|
102
105
|
| `<plan-id>` | 上一条 `--dry-run --json` 输出的顶层 `.planId`。源码或配置一变它就失效,必须重新 dry-run |
|
|
103
106
|
| `local-dev` / `multica-dev` | **你自己**在 `dingtalk-agent.json#workspaces` 里声明的 Workspace 名,不是内置值。样例见 [`lab/project-workspace/project.fixture.json`](lab/project-workspace/project.fixture.json) |
|
|
104
107
|
| `<promotion-id>` | `dta promote --yes` 产出的 `promotion-receipt@1` 的 `.promotionId` |
|
|
105
|
-
| `<role-skill-name>` | 你 `skills/<role>/SKILL.md` 里 frontmatter 的 `name` |
|
|
108
|
+
| `<role-skill-name>` | 你 `agent/skills/<role>/SKILL.md` 里 frontmatter 的 `name` |
|
|
106
109
|
|
|
107
110
|
### 最小可运行路径(纯本地,三条命令)
|
|
108
111
|
|
|
@@ -114,7 +117,9 @@ dta bootstrap --json # 本体被识别了吗:看 definition.status 与 st
|
|
|
114
117
|
dta agent audit --json # 预期 partial —— 岗位语义还是模板,这是正确结果
|
|
115
118
|
```
|
|
116
119
|
|
|
117
|
-
到这一步不需要钉钉账号、不需要托管平台、不产生任何副作用。把 `AGENTS.md` 里的岗位语义填成真的,再跑一次 `agent audit`,缺口就只剩 `host.load-probe`——那需要一个 Agent Host,见 [Compose Skill](skills/core/dingtalk-agent-compose/SKILL.md)。上面第 3 组云端命令要等你有了 Multica 归属和已声明的 Workspace 才用得上。
|
|
120
|
+
到这一步不需要钉钉账号、不需要托管平台、不产生任何副作用。把 `agent/AGENTS.md` 里的岗位语义填成真的,再跑一次 `agent audit`,缺口就只剩 `host.load-probe`——那需要一个 Agent Host,见 [Compose Skill](skills/core/dingtalk-agent-compose/SKILL.md)。上面第 3 组云端命令要等你有了 Multica 归属和已声明的 Workspace 才用得上。
|
|
121
|
+
|
|
122
|
+
发布到 Multica 时,远端 System Prompt 必须与 manifest 指定的 `agent/AGENTS.md` 原文一致;部署哈希、Skill 清单和 assignment 证据只存在于 plan/operation/Receipt 控制面。Basic 与 Role Skills 通过平台原生 assignment 挂载,不再用额外启动 Prompt 或启动 Skill 承载机器协议。
|
|
118
123
|
|
|
119
124
|
## 支持范围
|
|
120
125
|
|
|
@@ -35,7 +35,7 @@ import { doctor } from '../src/doctor.js';
|
|
|
35
35
|
import { doctorDevelopmentWorkspace, inspectAgentProject, showDevelopmentWorkspace, } from '../src/development-workspace.js';
|
|
36
36
|
import { applyOpenCodeWorkspace, evalOpenCodeWorkspace, planOpenCodeWorkspace, runOpenCodeWorkspace, useOpenCodeWorkspace, } from '../src/opencode-provider.js';
|
|
37
37
|
import { inspectMulticaWorkspace, listMulticaWorkspaceResources, planMulticaWorkspace, statusMulticaWorkspace, } from '../src/multica-provider.js';
|
|
38
|
-
import { applyMulticaDeployment, listMulticaDeployments, planMulticaDeployment, statusMulticaDeployment, } from '../src/multica-deploy.js';
|
|
38
|
+
import { applyMulticaDeployment, listMulticaDeployments, planMulticaDeployment, runMulticaWorkspaceIssue, statusMulticaDeployment, } from '../src/multica-deploy.js';
|
|
39
39
|
import { applyObservation, applyPromotion, listPromotions, planObservation, planPromotion, statusPromotion, } from '../src/promotion.js';
|
|
40
40
|
import { setup } from '../src/setup.js';
|
|
41
41
|
import { upgradeAgent } from '../src/upgrade.js';
|
|
@@ -578,18 +578,29 @@ async function main() {
|
|
|
578
578
|
}
|
|
579
579
|
const timeoutMs = o.timeout === undefined ? undefined : Number(o.timeout);
|
|
580
580
|
const prompt = readProjectText(PROJECT_START, o['prompt-file'], 'workspace run prompt');
|
|
581
|
-
const
|
|
582
|
-
|
|
583
|
-
|
|
581
|
+
const workspace = showDevelopmentWorkspace(PROJECT_START, positionals[0], PACKAGE_JSON.version);
|
|
582
|
+
const out = workspace.provider.kind === 'multica'
|
|
583
|
+
? runMulticaWorkspaceIssue(PROJECT_START, positionals[0], prompt, {
|
|
584
|
+
execute: o.execute, yes: o.yes, timeoutMs, out: o.out,
|
|
585
|
+
cliVersion: PACKAGE_JSON.version,
|
|
586
|
+
})
|
|
587
|
+
: runOpenCodeWorkspace(PROJECT_START, positionals[0], prompt, {
|
|
588
|
+
execute: o.execute, yes: o.yes, timeoutMs, out: o.out,
|
|
589
|
+
});
|
|
584
590
|
if (o.json)
|
|
585
591
|
console.log(JSON.stringify(out, null, 2));
|
|
586
592
|
else if (out.$schema === 'dingtalk-agent/opencode-workspace-run-plan@1') {
|
|
587
593
|
console.log(`DRY-RUN workspace=${out.workspace} model=${out.model} prompt=${out.promptHash}`);
|
|
588
594
|
}
|
|
595
|
+
else if (out.$schema === 'dingtalk-agent/multica-workspace-run-plan@1') {
|
|
596
|
+
console.log(`DRY-RUN workspace=${out.workspace} agent=${out.agentId || '-'} prompt=${out.promptHash}`);
|
|
597
|
+
}
|
|
589
598
|
else {
|
|
590
599
|
console.log(`${out.passed ? '✅' : '❌'} workspace run ${out.runId}`);
|
|
591
|
-
if (out.execution?.answer)
|
|
600
|
+
if ('execution' in out && out.execution?.answer)
|
|
592
601
|
console.log(out.execution.answer);
|
|
602
|
+
if ('answer' in out && out.answer)
|
|
603
|
+
console.log(out.answer);
|
|
593
604
|
if (out.evidencePath)
|
|
594
605
|
console.log(`evidence=${out.evidencePath}`);
|
|
595
606
|
}
|