@xdxer/dingtalk-agent 0.1.4-beta.10 → 0.1.4-beta.12
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 +36 -0
- package/README.en.md +2 -2
- package/README.md +5 -3
- package/dist/bin/dingtalk-agent.js +118 -16
- package/dist/bin/dingtalk-agent.js.map +1 -1
- package/dist/src/agent-platform.js +202 -0
- package/dist/src/agent-platform.js.map +1 -0
- package/dist/src/development-workspace.js +8 -1
- package/dist/src/development-workspace.js.map +1 -1
- package/dist/src/doctor.js +31 -15
- package/dist/src/doctor.js.map +1 -1
- package/dist/src/map.js +157 -0
- package/dist/src/map.js.map +1 -0
- package/dist/src/setup.js +6 -5
- package/dist/src/setup.js.map +1 -1
- package/dist/src/skill-manager.js +29 -2
- package/dist/src/skill-manager.js.map +1 -1
- package/docs/INSTALLATION.md +1 -1
- package/docs/schemas/agent-platform.schema.json +13 -0
- package/docs/schemas/project.schema.json +1 -0
- package/docs/schemas/release-readiness.schema.json +2 -1
- package/package.json +2 -1
- package/skills/dingtalk-agent-compose/SKILL.md +19 -9
- package/skills/dingtalk-agent-compose/evals/evals.json +1 -1
- package/skills/multica-fde-external/SKILL.md +280 -0
- package/skills/multica-fde-external/scripts/bootstrap.sh +78 -0
- package/skills/multica-fde-external/scripts/multica_ext.py +1178 -0
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,42 @@
|
|
|
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.4-beta.12 - 2026-07-19
|
|
6
|
+
|
|
7
|
+
### Added
|
|
8
|
+
|
|
9
|
+
- The `multica-fde-external` skill is bundled verbatim from the pre-fde registry into the `multica-dingtalk` platform pack: a self-contained Python wrapper (stdlib only, Python ≥3.9) covering the full delivery chain — workspace/runtime/agent provisioning, skill push/pull, DingTalk robot and account binding, the `chat-send --wait` DingTalk-free test channel, `task-trace` observability, autopilot scheduling, and `agent-check` health checks. Selecting `multica-dingtalk` now installs three platform skills.
|
|
10
|
+
- `agent-platform show|use` emit advisory readiness checks for the selected platform: multica CLI presence (with the official install command), login state (with `multica login --server-url <endpoint>` guidance), and a proxy-environment warning with an `env -u` workaround.
|
|
11
|
+
|
|
12
|
+
### Changed
|
|
13
|
+
|
|
14
|
+
- Compose Skill 0.6.0: the workflow now requires offering the user a managed-agent-platform choice (multica-dingtalk / deap coming-soon / local-only) before assembly, guides through readiness gaps, and documents the two paths to a DingTalk robot — local `dta listen` streaming debugging versus publishing through Multica (`dingtalk-begin`/`dingtalk-bind` plus the `chat-send --wait` acceptance channel). Creating a bare DingTalk app via `dws dev app robot submit` without asking the user is explicitly forbidden.
|
|
15
|
+
- Contract case 61 now verifies the three-skill lazy install for `multica-dingtalk`.
|
|
16
|
+
|
|
17
|
+
### Release boundary
|
|
18
|
+
|
|
19
|
+
- Distribution is limited to the public npm `beta` dist-tag, a Git tag, and a GitHub pre-release. No robot, webhook, schedule, Trigger, or DingTalk/Multica side effect is created by the release itself. The end-to-end evidence recorded for this line was produced on the dedicated pre environment with explicit user authorization.
|
|
20
|
+
|
|
21
|
+
## 0.1.4-beta.11 - 2026-07-19
|
|
22
|
+
|
|
23
|
+
### Added
|
|
24
|
+
|
|
25
|
+
- A managed agent platform abstraction: `dta agent-platform list|show|use` with a fixed resolution order (`DTA_AGENT_PLATFORM` env > `dingtalk-agent.json#agentPlatform` > `.dingtalk-agent/agent-platform.json` > inference from declared Multica providers). `multica-dingtalk` is supported; `deap` is registered as coming-soon and fails closed everywhere.
|
|
26
|
+
- Platform skill packs load lazily: selecting `multica-dingtalk` installs `dingtalk-agent-deploy` and `dingtalk-agent-boot-multica`; they are no longer implied by the default install. Platform-specific methodology ships in these packs, not in the CLI.
|
|
27
|
+
- `deploy`, `promote`, and `observe` now pass a fail-closed platform-membership gate; missing, unknown, or coming-soon platforms are rejected with guidance.
|
|
28
|
+
- Contract case 61 covers the registry, the gate, the coming-soon rejection, membership writing, and lazy skill installation; `agent-platform@1` schema added and `project@1` gains the optional `agentPlatform` field.
|
|
29
|
+
|
|
30
|
+
### Changed
|
|
31
|
+
|
|
32
|
+
- `dta skill install|status|upgrade|uninstall` without a name now operate on all default bundled Skills (basic-behavior + compose) with a `skill-status-suite@1` JSON envelope; an explicit name keeps the single-skill contract. `setup` installs the full default suite and `doctor` aggregates per-client discovery across it.
|
|
33
|
+
- The compose Skill (0.5.1) names 创建/新建/装配 Agent triggers and drops its placeholder wording, so "帮我创建一个 Agent" reaches it on OpenCode and other hosts.
|
|
34
|
+
- Isolated-HOME eval and release environments strip host `CLAUDE_*` variables so the upstream skills CLI cannot escape the sandbox into the real Claude config directory.
|
|
35
|
+
- Unknown-command suggestions now include `lab`, `listen`, `deploy`, `promote`, `observe`, and `agent-platform`.
|
|
36
|
+
|
|
37
|
+
### Release boundary
|
|
38
|
+
|
|
39
|
+
- Distribution is limited to the public npm `beta` dist-tag, a Git tag, and a GitHub pre-release. No robot, webhook, schedule, Trigger, or DingTalk/Multica side effect is created. The Live waivers recorded for beta.9 remain unchanged.
|
|
40
|
+
|
|
5
41
|
## 0.1.4-beta.10 - 2026-07-19
|
|
6
42
|
|
|
7
43
|
### Removed
|
package/README.en.md
CHANGED
|
@@ -46,7 +46,7 @@ DWS is enough for occasional manual API operations. A digital employee that work
|
|
|
46
46
|
|
|
47
47
|
The boundary is: **Skills advise, the CLI enforces, and DWS executes.** Semantic judgment remains in Skills; invariants belong in code; DingTalk product operations stay in DWS.
|
|
48
48
|
|
|
49
|
-
> `0.1.4-beta.
|
|
49
|
+
> `0.1.4-beta.11` is being released (npm `beta` dist-tag, Git tag, GitHub pre-release). beta.10 removed legacy dead code and aligned the entry docs; beta.11 installs all bundled Skills by default, fixes the compose Skill trigger, and introduces the managed agent platform abstraction (multica-dingtalk supported, deap coming soon; deploy/promote/observe require platform membership, and platform skill packs install on selection). The earlier beta.9 line includes the Basic 0.10.0/0.9.4 model regression, host-issued Completion Evidence, remote semantic-state cold-start and Live-ready runners, the developer Golden Path, safe enhancement of existing Agent repositories, Provider-bound Workspace W1–W5, Completion-grader hardening, a Phase 9 personal-event Live-ready runner, and isolated installation acceptance, the contract suite now covers 61 deterministic scenarios. Phase 8's recorded sample passed the safety and artifact gates that existed at the time, but did not prove a stable model-quality gain for 0.10.0. Phase 15 adds fail-closed contradictory-claim detection and a predeclared effectiveness policy without rewriting historical scores. Real personal-event, remote-state, and Multica Live were explicitly waived as release gates for this beta; local and fake-Provider evidence is not relabeled as real platform proof, and no Trigger or DingTalk/Multica side effect was created.
|
|
50
50
|
|
|
51
51
|
## Quick start
|
|
52
52
|
|
|
@@ -61,7 +61,7 @@ dta --version
|
|
|
61
61
|
dta doctor
|
|
62
62
|
```
|
|
63
63
|
|
|
64
|
-
`setup` checks Node.js, DWS version and authentication, installs and verifies the Basic Behavior
|
|
64
|
+
`setup` checks Node.js, DWS version and authentication, installs and verifies the bundled Skills (Basic Behavior + Compose), and reports whether Claude Code, Codex, and OpenCode can discover it. `listen` is an optional development adapter, not the mandatory Agent entry point.
|
|
65
65
|
|
|
66
66
|
For a source release candidate, run the deterministic tarball acceptance:
|
|
67
67
|
|
package/README.md
CHANGED
|
@@ -48,7 +48,7 @@ Claude Code、Codex 或其他 Agent Host 都能使用这套内核;触发 Adapt
|
|
|
48
48
|
|
|
49
49
|
本项目把这些约束从巨型 Prompt 中拆出来:**Skill 劝,CLI 拦,DWS 做。** 必须成立的规则进入代码;需要语义判断的行为留在 Skill;具体钉钉产品能力继续由 DWS 执行。
|
|
50
50
|
|
|
51
|
-
> `0.1.4-beta.
|
|
51
|
+
> `0.1.4-beta.11` 已进入发布流程(npm `beta` dist-tag、Git Tag 与 GitHub Pre-release)。beta.10 移除上一代遗留死代码并对齐入口文档;beta.11 默认安装全部内置 Skill(基础行为 + 装配)、修复装配 Skill 的触发描述,并引入 managed agent platform 归属抽象(已支持 multica-dingtalk,deap 敬请期待;deploy/promote/observe 需先归属,平台技能包按选择安装)。此前 beta.9 完成 Basic 0.10.0/0.9.4 模型回归、宿主签发 Completion Evidence、远端语义状态冷启动与 Live-ready runner、开发者 Golden Path、已有仓库安全 enhance、Provider-bound Workspace W1–W5、Completion grader 加固、Phase 9 personal-event Live-ready runner 与隔离安装验收,合同评测现为 61 个确定性场景。Phase 8 的已记录样本通过当时的安全和产物硬门禁,但未证明 0.10.0 有稳定模型增益;Phase 15 又把矛盾完成声明和增益判定收紧为显式 fail-closed 策略,且不重写历史分数。本次 beta 明确豁免真实 personal-event、远端状态与 Multica Live 作为发布门禁,不把本地或 fake-Provider 证据冒充真实平台通过,也没有创建 Trigger 或钉钉/Multica 副作用。
|
|
52
52
|
|
|
53
53
|
## 两分钟开始
|
|
54
54
|
|
|
@@ -66,7 +66,7 @@ npm install --global --prefix "$HOME/.local" \
|
|
|
66
66
|
|
|
67
67
|
1. 将 CLI 安装到用户目录 `~/.local/bin`,必要时幂等补充 shell PATH;
|
|
68
68
|
2. 检查 Node.js、DWS 版本和 `dws auth status`;
|
|
69
|
-
3.
|
|
69
|
+
3. 安装并验证内置 Skill(Basic Behavior 基础行为 + Compose 装配);
|
|
70
70
|
4. 报告 Claude Code、Codex、OpenCode 是否能够发现 Skill。
|
|
71
71
|
|
|
72
72
|
当前终端尚未加载新 PATH 时,setup 会打印一条可直接执行的 `export PATH=...`。验证结果:
|
|
@@ -242,7 +242,7 @@ Session 创建时冻结 Definition 与 Skill snapshot;在线 Run 可以提出
|
|
|
242
242
|
|
|
243
243
|
无论消息来自机器人 connector、真实 personal-event,还是另一个标准化大脑/Agent Host,进入 dta 后都应归一成 Invocation。机器人渠道下也仍像同事一样回复;渠道只决定可获得的 envelope 和谁拥有外发权,不改变角色本体。
|
|
244
244
|
|
|
245
|
-
###
|
|
245
|
+
### 用仓库或文件夹定义钉钉数字员工 Agent
|
|
246
246
|
|
|
247
247
|
最小可工作装配只有两组输入:
|
|
248
248
|
|
|
@@ -341,6 +341,8 @@ dta workspace status multica-dev --json
|
|
|
341
341
|
|
|
342
342
|
回读证据只保存最小资源事实和原始输出 hash,不保存 Token、邮箱、Server URL 明文、Agent instructions/runtime config 或 Skill content。身份、默认 Workspace、scope、稳定 ID、Skill 唯一性或 evidence hash 任一不符都 fail closed;成功后 state 仍是 `verifying`,`readyForApply=true` 只表示可以进入 W4 规划。
|
|
343
343
|
|
|
344
|
+
部署、晋级等平台命令先经过 managed agent platform 归属门禁。工作区用 `dta agent-platform use multica-dingtalk` 声明归属(写入 `dingtalk-agent.json#agentPlatform` 或 `.dingtalk-agent/agent-platform.json`,也可用 `DTA_AGENT_PLATFORM` 环境变量覆盖),声明时才按需安装该平台的技能包(deploy、boot-multica 与 multica-fde-external 平台运维工具);`dta agent-platform list` 展示注册表——当前已支持 `multica-dingtalk`,`deap` 敬请期待。`agent-platform show/use` 同时输出平台工具链 readiness(multica CLI 未装、未登录或存在代理变量时给出可执行的安装/登录/绕代理提示);未归属、未知或 coming-soon 平台上的 `deploy`/`promote`/`observe` 一律 fail-closed;已声明 Multica Provider 的项目可被自动推断为 `multica-dingtalk`。后续所有平台相关的方法学都随对应平台的技能包分发,不进入 CLI 与基础行为。
|
|
345
|
+
|
|
344
346
|
W4 用 `dta deploy` 把这份可信 inspection 变成 plan-bound apply。dry-run 固定 profile/workspace/runtime/Agent/Definition/Skill tree hash 和 forward/rollback 最大写预算,apply 前重新回读同一条 ID 链;只有显式 `--plan-id` 与 `--yes` 才会创建或更新。CLI 会精确同步受管 Boot、Basic、Role Skill 完整树和唯一 assignment,再通过专用 Issue 回读 Skill tool trace 与精确 JSON response;两个证据都通过才从 `verifying` 进入 `ready`:
|
|
345
347
|
|
|
346
348
|
```bash
|
|
@@ -38,7 +38,8 @@ import { upgradeAgent } from '../src/upgrade.js';
|
|
|
38
38
|
import { checkpointTask, showTaskCheckpoint } from '../src/memory/task-checkpoints.js';
|
|
39
39
|
import { upsertOperationalMemory } from '../src/memory/operational.js';
|
|
40
40
|
import { proposeMemoryCandidate, publishMemoryCandidate, reviewMemoryCandidate, showMemoryCandidate, } from '../src/memory/candidates.js';
|
|
41
|
-
import { installGlobalSkill, skillStatus, uninstallGlobalSkill, upgradeGlobalSkill, } from '../src/skill-manager.js';
|
|
41
|
+
import { installBundledSkills, installGlobalSkill, skillStatus, skillSuiteStatus, uninstallBundledSkills, uninstallGlobalSkill, upgradeBundledSkills, upgradeGlobalSkill, } from '../src/skill-manager.js';
|
|
42
|
+
import { agentPlatformReadiness, MANAGED_AGENT_PLATFORMS, requireSupportedAgentPlatform, resolveAgentPlatform, statusLabel as platformStatusLabel, useAgentPlatform, } from '../src/agent-platform.js';
|
|
42
43
|
const PACKAGE_ROOT = resolvePackageRoot(import.meta.url);
|
|
43
44
|
const PACKAGE_JSON = JSON.parse(readFileSync(join(PACKAGE_ROOT, 'package.json'), 'utf8'));
|
|
44
45
|
// ROOT = **你的工作区**(当前目录),不是包所在的目录。
|
|
@@ -56,16 +57,16 @@ dta —— 给 Agent 安装钉钉员工的基础行为和工作环境
|
|
|
56
57
|
· 从本地目录或钉钉文档加载身份、记忆和知识
|
|
57
58
|
|
|
58
59
|
开始使用:
|
|
59
|
-
dta setup 首次配置 CLI、DWS
|
|
60
|
+
dta setup 首次配置 CLI、DWS 和内置 Skill(基础行为 + Agent 装配)
|
|
60
61
|
dta bootstrap --json 为当前 Agent 会话加载工作区
|
|
61
62
|
dta agent enhance / audit 安全增强已有仓库,再审计定义、存储与 Skill 真加载
|
|
62
63
|
dta info / dta workspace doctor <name> 查看 Project 并只读诊断 Workspace
|
|
63
|
-
dta deploy
|
|
64
|
+
dta agent-platform use <platform> → dta deploy / dta promote 声明平台归属并装平台技能包,再受控部署与晋级
|
|
64
65
|
|
|
65
66
|
维护环境:
|
|
66
67
|
dta doctor 检查哪里没装好,并给出修复提示
|
|
67
68
|
dta upgrade 自升级,再重新检查完整环境
|
|
68
|
-
dta skill status 查看 Claude Code、Codex、OpenCode
|
|
69
|
+
dta skill status 查看 Claude Code、Codex、OpenCode 能否发现内置 Skill(可加 name 只查一个)
|
|
69
70
|
|
|
70
71
|
接入钉钉事件和可靠外发:dta help runtime
|
|
71
72
|
`;
|
|
@@ -232,6 +233,7 @@ async function main() {
|
|
|
232
233
|
return;
|
|
233
234
|
}
|
|
234
235
|
if (cmd === 'deploy') {
|
|
236
|
+
requireSupportedAgentPlatform('deploy', PROJECT_START);
|
|
235
237
|
const { values: o, positionals } = parseArgs({
|
|
236
238
|
args: argv.slice(1), allowPositionals: true,
|
|
237
239
|
options: {
|
|
@@ -307,6 +309,7 @@ async function main() {
|
|
|
307
309
|
return;
|
|
308
310
|
}
|
|
309
311
|
if (cmd === 'promote') {
|
|
312
|
+
requireSupportedAgentPlatform('promote', PROJECT_START);
|
|
310
313
|
const { values: o, positionals } = parseArgs({
|
|
311
314
|
args: argv.slice(1), allowPositionals: true,
|
|
312
315
|
options: {
|
|
@@ -366,6 +369,7 @@ async function main() {
|
|
|
366
369
|
return;
|
|
367
370
|
}
|
|
368
371
|
if (cmd === 'observe') {
|
|
372
|
+
requireSupportedAgentPlatform('observe', PROJECT_START);
|
|
369
373
|
const { values: o, positionals } = parseArgs({
|
|
370
374
|
args: argv.slice(1), allowPositionals: true,
|
|
371
375
|
options: {
|
|
@@ -680,24 +684,94 @@ async function main() {
|
|
|
680
684
|
});
|
|
681
685
|
if (positionals.length > 1)
|
|
682
686
|
fail('skill 最多接受一个 Skill name');
|
|
683
|
-
const
|
|
687
|
+
const name = o.name || positionals[0];
|
|
688
|
+
const dryRun = Boolean(o['dry-run']);
|
|
684
689
|
let out;
|
|
685
|
-
if (sub === 'install')
|
|
686
|
-
out =
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
else
|
|
690
|
+
if (sub === 'install') {
|
|
691
|
+
out = name
|
|
692
|
+
? installGlobalSkill(PACKAGE_ROOT, { dryRun, name })
|
|
693
|
+
: installBundledSkills(PACKAGE_ROOT, { dryRun });
|
|
694
|
+
}
|
|
695
|
+
else if (sub === 'status') {
|
|
696
|
+
out = name ? skillStatus(PACKAGE_ROOT, { dryRun, name }) : skillSuiteStatus(PACKAGE_ROOT, { dryRun });
|
|
697
|
+
}
|
|
698
|
+
else if (sub === 'upgrade') {
|
|
699
|
+
out = name
|
|
700
|
+
? upgradeGlobalSkill(PACKAGE_ROOT, { dryRun, name })
|
|
701
|
+
: upgradeBundledSkills(PACKAGE_ROOT, { dryRun });
|
|
702
|
+
}
|
|
703
|
+
else if (sub === 'uninstall') {
|
|
704
|
+
out = name
|
|
705
|
+
? uninstallGlobalSkill(PACKAGE_ROOT, { dryRun, name })
|
|
706
|
+
: uninstallBundledSkills(PACKAGE_ROOT, { dryRun });
|
|
707
|
+
}
|
|
708
|
+
else {
|
|
694
709
|
fail(`不认识的 skill 子命令: ${sub || '(缺失)'}`, 1, `可用命令: dta skill install | status | upgrade | uninstall${suggest(sub || '', ['install', 'status', 'upgrade', 'uninstall'], 'dta skill')}`);
|
|
710
|
+
}
|
|
695
711
|
if (o.json)
|
|
696
712
|
console.log(JSON.stringify(out, null, 2));
|
|
713
|
+
else if ('skills' in out)
|
|
714
|
+
for (const item of out.skills)
|
|
715
|
+
printSkillStatus(item, sub, dryRun);
|
|
697
716
|
else
|
|
698
|
-
printSkillStatus(out, sub,
|
|
717
|
+
printSkillStatus(out, sub, dryRun);
|
|
699
718
|
return;
|
|
700
719
|
}
|
|
720
|
+
// ── agent-platform:工作区归属的 managed agent platform;平台工具包按选择惰性安装。──
|
|
721
|
+
if (cmd === 'agent-platform') {
|
|
722
|
+
const { values: o, positionals } = parseArgs({
|
|
723
|
+
args: argv.slice(2),
|
|
724
|
+
allowPositionals: true,
|
|
725
|
+
options: { json: { type: 'boolean' }, 'no-install': { type: 'boolean' } },
|
|
726
|
+
});
|
|
727
|
+
if (sub === 'list') {
|
|
728
|
+
if (positionals.length)
|
|
729
|
+
fail('agent-platform list 不接受位置参数');
|
|
730
|
+
const out = { $schema: 'dingtalk-agent/agent-platform-list@1', platforms: MANAGED_AGENT_PLATFORMS };
|
|
731
|
+
if (o.json)
|
|
732
|
+
console.log(JSON.stringify(out, null, 2));
|
|
733
|
+
else
|
|
734
|
+
for (const platform of MANAGED_AGENT_PLATFORMS)
|
|
735
|
+
printAgentPlatform(platform);
|
|
736
|
+
return;
|
|
737
|
+
}
|
|
738
|
+
if (sub === 'show') {
|
|
739
|
+
if (positionals.length)
|
|
740
|
+
fail('agent-platform show 不接受位置参数');
|
|
741
|
+
const out = resolveAgentPlatform(PROJECT_START);
|
|
742
|
+
const readiness = out.definition ? agentPlatformReadiness(out.definition.name) : [];
|
|
743
|
+
if (o.json)
|
|
744
|
+
console.log(JSON.stringify({ ...out, readiness }, null, 2));
|
|
745
|
+
else {
|
|
746
|
+
printAgentPlatformResolution(out);
|
|
747
|
+
printAgentPlatformReadiness(readiness);
|
|
748
|
+
}
|
|
749
|
+
return;
|
|
750
|
+
}
|
|
751
|
+
if (sub === 'use') {
|
|
752
|
+
if (positionals.length !== 1)
|
|
753
|
+
fail('agent-platform use 需要且只接受一个 platform name');
|
|
754
|
+
const out = useAgentPlatform(PROJECT_START, positionals[0], {
|
|
755
|
+
packageRoot: PACKAGE_ROOT, installSkills: !o['no-install'],
|
|
756
|
+
});
|
|
757
|
+
const readiness = out.definition ? agentPlatformReadiness(out.definition.name) : [];
|
|
758
|
+
if (o.json)
|
|
759
|
+
console.log(JSON.stringify({ ...out, readiness }, null, 2));
|
|
760
|
+
else {
|
|
761
|
+
console.log(`✅ 工作区已归属 ${out.definition?.label}(写入 ${out.written})`);
|
|
762
|
+
for (const install of out.skillInstalls)
|
|
763
|
+
printSkillStatus(install, 'install', false);
|
|
764
|
+
if (!out.skillInstalls.length) {
|
|
765
|
+
console.log(out.definition?.skills.length
|
|
766
|
+
? ` 已跳过平台技能包安装(--no-install):${out.definition.skills.join(', ')}`
|
|
767
|
+
: ' 该平台无需额外技能包。');
|
|
768
|
+
}
|
|
769
|
+
printAgentPlatformReadiness(readiness);
|
|
770
|
+
}
|
|
771
|
+
return;
|
|
772
|
+
}
|
|
773
|
+
fail(`不认识的 agent-platform 子命令: ${sub || '(缺失)'}`, 1, `可用命令: dta agent-platform list | show | use <platform>${suggest(sub || '', ['list', 'show', 'use'], 'dta agent-platform')}`);
|
|
774
|
+
}
|
|
701
775
|
// ── bootstrap:当前 Agent Session 按需发现/拉取语义上下文。──
|
|
702
776
|
if (cmd === 'bootstrap') {
|
|
703
777
|
const { values: o } = parseArgs({
|
|
@@ -1241,7 +1315,8 @@ async function main() {
|
|
|
1241
1315
|
return;
|
|
1242
1316
|
}
|
|
1243
1317
|
fail(`不认识的命令: ${cmd}`, 1, `运行 dta --help 查看全部命令${suggest(cmd, [
|
|
1244
|
-
'setup', 'upgrade', 'doctor', 'skill', 'bootstrap', 'init', 'prepare', 'run', 'dispatch', 'task', 'memory', 'act',
|
|
1318
|
+
'setup', 'upgrade', 'doctor', 'skill', 'agent-platform', 'bootstrap', 'init', 'prepare', 'run', 'dispatch', 'task', 'memory', 'act',
|
|
1319
|
+
'lab', 'listen', 'deploy', 'promote', 'observe',
|
|
1245
1320
|
'agent',
|
|
1246
1321
|
'info', 'workspace',
|
|
1247
1322
|
])}`);
|
|
@@ -1373,6 +1448,33 @@ function printAgentEnhance(out) {
|
|
|
1373
1448
|
console.log(` backup=${out.backupRoot}`);
|
|
1374
1449
|
console.log(` audit=${out.audit.status} missing=${out.audit.missing.join(', ') || '-'}`);
|
|
1375
1450
|
}
|
|
1451
|
+
function printAgentPlatform(platform) {
|
|
1452
|
+
console.log(`${platform.status === 'supported' ? '✅' : '⏳'} ${platform.name} · ${platform.label} · ${platformStatusLabel(platform.status)}`);
|
|
1453
|
+
console.log(` ${platform.description}`);
|
|
1454
|
+
if (platform.skills.length)
|
|
1455
|
+
console.log(` 技能包: ${platform.skills.join(', ')}`);
|
|
1456
|
+
if (platform.commands.length)
|
|
1457
|
+
console.log(` 平台命令: ${platform.commands.map((item) => `dta ${item}`).join(' · ')}`);
|
|
1458
|
+
}
|
|
1459
|
+
function printAgentPlatformResolution(out) {
|
|
1460
|
+
if (!out.platform) {
|
|
1461
|
+
console.log('⚠️ 当前工作区未声明 managed agent platform');
|
|
1462
|
+
console.log(' 运行 `dta agent-platform use multica-dingtalk`,或设置 DTA_AGENT_PLATFORM 环境变量。');
|
|
1463
|
+
return;
|
|
1464
|
+
}
|
|
1465
|
+
const known = out.definition;
|
|
1466
|
+
console.log(`${known ? '✅' : '❌'} 当前 platform: ${out.platform}${known ? ` · ${known.label} · ${platformStatusLabel(known.status)}` : '(未知)'}`);
|
|
1467
|
+
console.log(` 来源: ${out.source}${out.file ? ` · ${out.file}` : ''}`);
|
|
1468
|
+
if (known?.skills.length)
|
|
1469
|
+
console.log(` 技能包: ${known.skills.join(', ')}`);
|
|
1470
|
+
}
|
|
1471
|
+
function printAgentPlatformReadiness(checks) {
|
|
1472
|
+
for (const check of checks) {
|
|
1473
|
+
console.log(` ${check.ok ? '✅' : '⚠️'} ${check.summary}`);
|
|
1474
|
+
if (check.hint)
|
|
1475
|
+
console.log(` ${check.hint}`);
|
|
1476
|
+
}
|
|
1477
|
+
}
|
|
1376
1478
|
function printSkillStatus(out, action, dryRun) {
|
|
1377
1479
|
const prefix = dryRun ? 'DRY-RUN' : '✅';
|
|
1378
1480
|
const verb = action === 'status' ? '全局 Skill 状态' : `skill ${action}`;
|