@xdxer/dingtalk-agent 0.1.4-beta.14 → 0.1.4-beta.16
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 +35 -0
- package/README.en.md +97 -328
- package/README.md +94 -676
- package/dist/bin/dingtalk-agent.js +26 -5
- package/dist/bin/dingtalk-agent.js.map +1 -1
- package/dist/src/agent-audit.js +1005 -88
- package/dist/src/agent-audit.js.map +1 -1
- package/dist/src/agent-enhance.js +38 -6
- package/dist/src/agent-enhance.js.map +1 -1
- package/dist/src/agent-platform.js +49 -2
- package/dist/src/agent-platform.js.map +1 -1
- package/dist/src/development-workspace.js +4 -1
- package/dist/src/development-workspace.js.map +1 -1
- package/dist/src/instruction-path.js +270 -0
- package/dist/src/instruction-path.js.map +1 -0
- package/dist/src/opencode-evals.js +708 -224
- package/dist/src/opencode-evals.js.map +1 -1
- package/dist/src/opencode-isolation.js +124 -0
- package/dist/src/opencode-isolation.js.map +1 -0
- package/dist/src/opencode-provider.js +1 -0
- package/dist/src/opencode-provider.js.map +1 -1
- package/dist/src/opencode-workspace.js +21 -10
- package/dist/src/opencode-workspace.js.map +1 -1
- package/docs/assets/agent-delivery-lifecycle.svg +103 -0
- package/docs/schemas/project.schema.json +1 -0
- package/evals/README.md +17 -0
- package/lab/README.md +3 -3
- package/lab/agent-eval/classic-failures.json +7 -7
- package/lab/agent-eval/remote-state-workspace/opencode.json +1 -1
- package/lab/agent-eval/workspace/AGENTS.md +1 -1
- package/lab/robot-eval/suite.json +1 -1
- package/lab/robot-eval/workspace/AGENTS.md +1 -1
- package/package.json +2 -2
- package/skills/core/dingtalk-agent-compose/SKILL.md +21 -10
- package/skills/core/dingtalk-agent-compose/assets/AGENTS.template.md +24 -15
- package/skills/core/dingtalk-agent-compose/assets/role-skill.template.md +14 -6
- package/skills/core/dingtalk-agent-compose/evals/evals.json +17 -5
- package/skills/core/dingtalk-agent-compose/references/agent-definition-contract.md +3 -3
- package/skills/core/dingtalk-agent-compose/references/opencode-host-contract.md +17 -9
- package/skills/core/dingtalk-basic-behavior/SKILL.md +52 -111
- package/skills/core/dingtalk-basic-behavior/references/memory-and-evolution.md +12 -0
- package/skills/core/dingtalk-basic-behavior/references/risk-authority-and-privacy.md +62 -0
- package/skills/core/dingtalk-basic-behavior/references/task-lifecycle.md +15 -3
- package/skills/core/dingtalk-basic-behavior/references/truth-and-recovery.md +65 -0
- package/skills/platforms/multica-dingtalk/PLATFORM.md +1 -1
- package/dist/src/map.js +0 -157
- package/dist/src/map.js.map +0 -1
|
@@ -39,7 +39,7 @@ import { checkpointTask, showTaskCheckpoint } from '../src/memory/task-checkpoin
|
|
|
39
39
|
import { upsertOperationalMemory } from '../src/memory/operational.js';
|
|
40
40
|
import { proposeMemoryCandidate, publishMemoryCandidate, reviewMemoryCandidate, showMemoryCandidate, } from '../src/memory/candidates.js';
|
|
41
41
|
import { installBundledSkills, installGlobalSkill, skillStatus, skillSuiteStatus, uninstallBundledSkills, uninstallGlobalSkill, upgradeBundledSkills, upgradeGlobalSkill, } from '../src/skill-manager.js';
|
|
42
|
-
import { agentPlatformReadiness, MANAGED_AGENT_PLATFORMS, multicaTargets, platformDocPath, platformSkillForRole, requireSupportedAgentPlatform, resolveAgentPlatform, statusLabel as platformStatusLabel, useAgentPlatform, } from '../src/agent-platform.js';
|
|
42
|
+
import { agentPlatformReadiness, MANAGED_AGENT_PLATFORMS, multicaTargets, platformDocPath, platformSkillForRole, requireSupportedAgentPlatform, resolveAgentPlatform, resolveEndpoint, statusLabel as platformStatusLabel, useAgentPlatform, } from '../src/agent-platform.js';
|
|
43
43
|
const PACKAGE_ROOT = resolvePackageRoot(import.meta.url);
|
|
44
44
|
const PACKAGE_JSON = JSON.parse(readFileSync(join(PACKAGE_ROOT, 'package.json'), 'utf8'));
|
|
45
45
|
// ROOT = **你的工作区**(当前目录),不是包所在的目录。
|
|
@@ -742,13 +742,15 @@ async function main() {
|
|
|
742
742
|
if (positionals.length)
|
|
743
743
|
fail('agent-platform show 不接受位置参数');
|
|
744
744
|
const out = resolveAgentPlatform(PROJECT_START);
|
|
745
|
-
const readiness = out.definition ? agentPlatformReadiness(out.definition.name) : [];
|
|
745
|
+
const readiness = out.definition ? agentPlatformReadiness(out.definition.name, process.env, undefined, PROJECT_START) : [];
|
|
746
746
|
const targets = out.definition?.name === 'multica-dingtalk' ? multicaTargets() : [];
|
|
747
|
+
const endpoint = out.definition ? resolveEndpoint(out.definition.name, PROJECT_START) : null;
|
|
747
748
|
const doc = out.definition ? platformDocPath(PACKAGE_ROOT, out.definition.name) : null;
|
|
748
749
|
if (o.json)
|
|
749
|
-
console.log(JSON.stringify({ ...out, readiness, targets, doc }, null, 2));
|
|
750
|
+
console.log(JSON.stringify({ ...out, endpoint, readiness, targets, doc }, null, 2));
|
|
750
751
|
else {
|
|
751
752
|
printAgentPlatformResolution(out);
|
|
753
|
+
printEndpoint(endpoint);
|
|
752
754
|
printAgentPlatformReadiness(readiness);
|
|
753
755
|
printMulticaTargets(targets);
|
|
754
756
|
printPlatformDoc(out.definition?.name);
|
|
@@ -761,11 +763,12 @@ async function main() {
|
|
|
761
763
|
const out = useAgentPlatform(PROJECT_START, positionals[0], {
|
|
762
764
|
packageRoot: PACKAGE_ROOT, installSkills: !o['no-install'],
|
|
763
765
|
});
|
|
764
|
-
const readiness = out.definition ? agentPlatformReadiness(out.definition.name) : [];
|
|
766
|
+
const readiness = out.definition ? agentPlatformReadiness(out.definition.name, process.env, undefined, PROJECT_START) : [];
|
|
765
767
|
const targets = out.definition?.name === 'multica-dingtalk' ? multicaTargets() : [];
|
|
768
|
+
const endpoint = out.definition ? resolveEndpoint(out.definition.name, PROJECT_START) : null;
|
|
766
769
|
const doc = out.definition ? platformDocPath(PACKAGE_ROOT, out.definition.name) : null;
|
|
767
770
|
if (o.json)
|
|
768
|
-
console.log(JSON.stringify({ ...out, readiness, targets, doc }, null, 2));
|
|
771
|
+
console.log(JSON.stringify({ ...out, endpoint, readiness, targets, doc }, null, 2));
|
|
769
772
|
else {
|
|
770
773
|
console.log(`✅ 工作区已归属 ${out.definition?.label}(写入 ${out.written})`);
|
|
771
774
|
for (const install of out.skillInstalls)
|
|
@@ -775,6 +778,7 @@ async function main() {
|
|
|
775
778
|
? ` 已跳过平台技能包安装(--no-install):${out.definition.skills.map((item) => item.name).join(', ')}`
|
|
776
779
|
: ' 该平台无需额外技能包。');
|
|
777
780
|
}
|
|
781
|
+
printEndpoint(endpoint);
|
|
778
782
|
printAgentPlatformReadiness(readiness);
|
|
779
783
|
printMulticaTargets(targets);
|
|
780
784
|
printPlatformDoc(out.definition?.name);
|
|
@@ -1485,6 +1489,23 @@ function disclosePlatformSkill(resolution, role) {
|
|
|
1485
1489
|
if (skillName)
|
|
1486
1490
|
console.error(`提示: 平台 ${resolution.definition.name} 的该命令方法学由 Skill ${skillName} 承载`);
|
|
1487
1491
|
}
|
|
1492
|
+
function printEndpoint(endpoint) {
|
|
1493
|
+
if (!endpoint)
|
|
1494
|
+
return;
|
|
1495
|
+
if (endpoint.source === 'ambiguous') {
|
|
1496
|
+
console.log(` Endpoint: 多个已登录目标未选定(${endpoint.candidates.join(' / ')})——` +
|
|
1497
|
+
`用 ${endpoint.envVar} 或指定 profile 明确选择`);
|
|
1498
|
+
return;
|
|
1499
|
+
}
|
|
1500
|
+
if (!endpoint.endpoint) {
|
|
1501
|
+
console.log(` Endpoint: 未解析——设 ${endpoint.envVar} 或登录 multica 后生效`);
|
|
1502
|
+
return;
|
|
1503
|
+
}
|
|
1504
|
+
const mark = endpoint.confirmed ? '✅' : '⚠️';
|
|
1505
|
+
const note = endpoint.confirmed ? '' : '(建议/未确认,deploy 前需显式确认是预发还是生产)';
|
|
1506
|
+
console.log(` ${mark} Endpoint: ${endpoint.endpoint} · 来源: ${endpoint.source}${note}`);
|
|
1507
|
+
console.log(` (切换:设 ${endpoint.envVar}=<url>、写 dingtalk-agent.json#multicaEndpoint、或登录对应 profile;无需改代码)`);
|
|
1508
|
+
}
|
|
1488
1509
|
function printPlatformDoc(platformName) {
|
|
1489
1510
|
if (!platformName)
|
|
1490
1511
|
return;
|