@xdxer/dingtalk-agent 0.1.4-beta.14 → 0.1.4-beta.15

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 CHANGED
@@ -2,6 +2,21 @@
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.15 - 2026-07-19
6
+
7
+ ### Added
8
+
9
+ - Multica endpoint resolution and display: `agent-platform show|use` now print the resolved endpoint and its source unconditionally — even when multica is not installed or logged in — so you always know where you'd connect and how to switch. `resolveEndpoint()` uses a single source of truth aligned with the executor (`multica_ext.py` reads `MULTICA_SERVER_URL`/`--profile`): `MULTICA_SERVER_URL` env > project config (`dingtalk-agent.json#multicaEndpoint` or `.dingtalk-agent/agent-platform.json.endpoint`) > exactly one logged-in profile's server_url (multiple = ambiguous, never auto-picked) > the platform's suggested endpoint (pre, flagged unconfirmed, never a silent direct-connect). The login readiness hint emits a full copyable `multica login --server-url <resolved> --token ...` with the source annotated.
10
+ - The project manifest gains an optional `multicaEndpoint` field (schema + validation) for a persistent per-project endpoint override.
11
+
12
+ ### Changed
13
+
14
+ - Scattered pre-fde endpoint literals in `PLATFORM.md` and the compose skill now point to `dta agent-platform show` as the single source instead of hardcoding the URL, so docs cannot drift from the resolver.
15
+
16
+ ### Release boundary
17
+
18
+ - Distribution is limited to the public npm `beta` dist-tag, a Git tag, and a GitHub pre-release. The suggested endpoint is an explicitly-unconfirmed hint only; the executor stays fail-closed and deploy-time confirmation is unchanged. Live waivers from beta.9 remain unchanged.
19
+
5
20
  ## 0.1.4-beta.14 - 2026-07-19
6
21
 
7
22
  ### Added
@@ -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;