@xdxer/dingtalk-agent 0.1.5-beta.1 → 0.1.5-beta.10

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.
Files changed (175) hide show
  1. package/CHANGELOG.md +201 -0
  2. package/README.en.md +99 -66
  3. package/README.md +99 -66
  4. package/dist/bin/dingtalk-agent.js +735 -149
  5. package/dist/bin/dingtalk-agent.js.map +1 -1
  6. package/dist/src/actions.js +3 -2
  7. package/dist/src/actions.js.map +1 -1
  8. package/dist/src/agent-audit.js +202 -85
  9. package/dist/src/agent-audit.js.map +1 -1
  10. package/dist/src/agent-definition.js +7 -3
  11. package/dist/src/agent-definition.js.map +1 -1
  12. package/dist/src/agent-enhance.js +51 -32
  13. package/dist/src/agent-enhance.js.map +1 -1
  14. package/dist/src/agent-platform.js +3 -3
  15. package/dist/src/agent-platform.js.map +1 -1
  16. package/dist/src/bootstrap.js +6 -2
  17. package/dist/src/bootstrap.js.map +1 -1
  18. package/dist/src/development-workspace.js +210 -34
  19. package/dist/src/development-workspace.js.map +1 -1
  20. package/dist/src/doctor.js +65 -9
  21. package/dist/src/doctor.js.map +1 -1
  22. package/dist/src/dws.js +67 -3
  23. package/dist/src/dws.js.map +1 -1
  24. package/dist/src/init.js +2 -1
  25. package/dist/src/init.js.map +1 -1
  26. package/dist/src/memory/noop-receipt.js +306 -0
  27. package/dist/src/memory/noop-receipt.js.map +1 -0
  28. package/dist/src/memory/operational.js +27 -3
  29. package/dist/src/memory/operational.js.map +1 -1
  30. package/dist/src/memory/remote-state.js +2 -1
  31. package/dist/src/memory/remote-state.js.map +1 -1
  32. package/dist/src/multica-deploy.js +692 -125
  33. package/dist/src/multica-deploy.js.map +1 -1
  34. package/dist/src/multica-provider.js +303 -25
  35. package/dist/src/multica-provider.js.map +1 -1
  36. package/dist/src/multica-runtime-vocabulary.js +110 -0
  37. package/dist/src/multica-runtime-vocabulary.js.map +1 -0
  38. package/dist/src/opencode-evals.js +6 -6
  39. package/dist/src/opencode-evals.js.map +1 -1
  40. package/dist/src/opencode-provider.js +21 -7
  41. package/dist/src/opencode-provider.js.map +1 -1
  42. package/dist/src/opencode-workspace.js +3 -3
  43. package/dist/src/opencode-workspace.js.map +1 -1
  44. package/dist/src/personal-event-evals.js +4 -2
  45. package/dist/src/personal-event-evals.js.map +1 -1
  46. package/dist/src/promotion.js +2 -1
  47. package/dist/src/promotion.js.map +1 -1
  48. package/dist/src/remote-semantic-state-live-evals.js +14 -8
  49. package/dist/src/remote-semantic-state-live-evals.js.map +1 -1
  50. package/dist/src/remote-state-evals.js +2 -2
  51. package/dist/src/remote-state-evals.js.map +1 -1
  52. package/dist/src/robot-evals.js +3 -3
  53. package/dist/src/robot-evals.js.map +1 -1
  54. package/dist/src/schedule-plan.js +380 -0
  55. package/dist/src/schedule-plan.js.map +1 -0
  56. package/dist/src/sessions.js +1 -1
  57. package/dist/src/sessions.js.map +1 -1
  58. package/dist/src/skill-manager.js +145 -13
  59. package/dist/src/skill-manager.js.map +1 -1
  60. package/dist/src/skills.js +2 -0
  61. package/dist/src/skills.js.map +1 -1
  62. package/dist/src/tui.js +369 -0
  63. package/dist/src/tui.js.map +1 -0
  64. package/dist/src/upgrade.js +113 -33
  65. package/dist/src/upgrade.js.map +1 -1
  66. package/dist/src/waits.js +2 -1
  67. package/dist/src/waits.js.map +1 -1
  68. package/dist/src/workspace.js +12 -7
  69. package/dist/src/workspace.js.map +1 -1
  70. package/docs/AGENT-IN-PRODUCTION.md +255 -0
  71. package/docs/ARCHITECTURE.md +165 -31
  72. package/docs/INSTALLATION.md +7 -7
  73. package/docs/PLATFORM-GUARDRAILS.md +188 -0
  74. package/docs/PRIOR-ART.md +4 -0
  75. package/docs/SELF-TEST.md +4 -4
  76. package/docs/architecture/agent-platform-connection-layer.svg +120 -0
  77. package/docs/architecture/digital-employee-composition.svg +92 -0
  78. package/docs/architecture/dingtalk-agent-architecture.svg +125 -0
  79. package/docs/assets/digital-employee-at-work.svg +77 -0
  80. package/docs/schemas/multica-deployment-plan.schema.json +3 -1
  81. package/docs/schemas/multica-deployment-receipt.schema.json +17 -3
  82. package/docs/schemas/multica-deployment-status.schema.json +6 -2
  83. package/docs/schemas/multica-workspace-inspection.schema.json +16 -0
  84. package/docs/schemas/multica-workspace-run-plan.schema.json +31 -0
  85. package/docs/schemas/multica-workspace-run.schema.json +161 -0
  86. package/docs/schemas/multica-workspace-status.schema.json +2 -0
  87. package/docs/schemas/project.schema.json +54 -3
  88. package/docs/schemas/workspace-scaffold.schema.json +38 -0
  89. package/examples/agents/README.md +10 -8
  90. package/examples/agents/fde-coach/AGENTS.md +2 -34
  91. package/examples/agents/fde-coach/agent/AGENTS.md +35 -0
  92. package/examples/agents/fde-coach/agent.bindings.json +10 -0
  93. package/examples/agents/release-manager/AGENTS.md +2 -34
  94. package/examples/agents/release-manager/agent/AGENTS.md +35 -0
  95. package/examples/agents/release-manager/agent.bindings.json +10 -0
  96. package/lab/agent-eval/catalog.json +5 -5
  97. package/lab/agent-eval/classic-failures.json +4 -4
  98. package/lab/agent-eval/completion-gate-regression.json +9 -9
  99. package/lab/agent-eval/personal-event-live.example.json +3 -3
  100. package/lab/agent-eval/remote-semantic-state-live.example.json +1 -1
  101. package/lab/agent-eval/workspace/opencode.json +2 -2
  102. package/lab/project-workspace/fake-multica-provider.mjs +171 -17
  103. package/lab/project-workspace/multica-deploy.fixture.json +2 -2
  104. package/lab/project-workspace/multica-readonly.fixture.json +4 -16
  105. package/lab/project-workspace/opencode-provider-suite.json +3 -3
  106. package/lab/project-workspace/project.fixture.json +2 -6
  107. package/lab/robot-eval/suite.json +1 -1
  108. package/lab/robot-eval/workspace/AGENTS.md +1 -1
  109. package/lab/robot-eval/workspace/opencode.json +2 -2
  110. package/lab/schemas/personal-event-eval.schema.json +1 -1
  111. package/package.json +12 -9
  112. package/skills/README.md +10 -8
  113. package/skills/core/{dingtalk-agent-compose → dta-agent-compose}/SKILL.md +48 -23
  114. package/skills/core/{dingtalk-agent-compose → dta-agent-compose}/assets/AGENTS.template.md +1 -1
  115. package/skills/core/dta-agent-compose/assets/REPOSITORY.template.md +10 -0
  116. package/skills/core/{dingtalk-agent-compose → dta-agent-compose}/assets/agent.bindings.dingtalk-doc.template.json +2 -2
  117. package/skills/core/{dingtalk-agent-compose → dta-agent-compose}/assets/agent.bindings.local.template.json +2 -2
  118. package/skills/core/{dingtalk-agent-compose → dta-agent-compose}/assets/hosts/opencode/opencode.template.json +3 -2
  119. package/skills/core/{dingtalk-agent-compose → dta-agent-compose}/evals/evals.json +4 -4
  120. package/skills/core/{dingtalk-agent-compose → dta-agent-compose}/references/agent-definition-contract.md +7 -7
  121. package/skills/core/dta-agent-compose/references/drive-and-schedules.md +166 -0
  122. package/skills/core/{dingtalk-agent-compose → dta-agent-compose}/references/host-loading-contract.md +11 -13
  123. package/skills/core/{dingtalk-agent-compose → dta-agent-compose}/references/hosts/claude-code.md +13 -12
  124. package/skills/core/{dingtalk-agent-compose → dta-agent-compose}/references/hosts/opencode.md +14 -13
  125. package/skills/core/{dingtalk-agent-eval → dta-agent-eval}/SKILL.md +2 -2
  126. package/skills/core/{dingtalk-agent-eval → dta-agent-eval}/assets/eval-catalog.template.json +1 -1
  127. package/skills/core/{dingtalk-agent-eval → dta-agent-eval}/evals/evals.json +1 -1
  128. package/skills/core/{dingtalk-agent-eval → dta-agent-eval}/references/eval-topology.md +3 -3
  129. package/skills/core/{dingtalk-agent-eval → dta-agent-eval}/references/interactive-debug-channels.md +10 -4
  130. package/skills/core/{dingtalk-basic-behavior → dta-basic-behavior}/SKILL.md +21 -5
  131. package/skills/core/dta-basic-behavior/references/event-to-behavior.md +38 -0
  132. package/skills/core/{dingtalk-basic-behavior → dta-basic-behavior}/references/memory-and-evolution.md +3 -1
  133. package/skills/core/dta-basic-behavior/references/perception-and-gates.md +87 -0
  134. package/skills/core/{dingtalk-basic-behavior → dta-basic-behavior}/references/risk-authority-and-privacy.md +12 -0
  135. package/skills/core/{dingtalk-basic-behavior → dta-basic-behavior}/references/truth-and-recovery.md +4 -2
  136. package/skills/core/dta-people-group-memory/COMPLETENESS.md +36 -0
  137. package/skills/core/dta-people-group-memory/SKILL.md +69 -0
  138. package/skills/core/dta-people-group-memory/references/adapters.md +273 -0
  139. package/skills/core/dta-people-group-memory/references/assembly-guidance.md +40 -0
  140. package/skills/core/dta-people-group-memory/references/binding.md +110 -0
  141. package/skills/core/dta-people-group-memory/references/cold-start.md +70 -0
  142. package/skills/core/dta-people-group-memory/references/config-binding.md +89 -0
  143. package/skills/core/dta-people-group-memory/references/consent-and-visibility.md +83 -0
  144. package/skills/core/dta-people-group-memory/references/consolidation.md +162 -0
  145. package/skills/core/dta-people-group-memory/references/event-ingest.md +103 -0
  146. package/skills/core/dta-people-group-memory/references/guided-setup.md +70 -0
  147. package/skills/core/dta-people-group-memory/references/model.md +148 -0
  148. package/skills/core/dta-people-group-memory/references/storage-port.md +107 -0
  149. package/skills/platforms/deap/PLATFORM.md +30 -1
  150. package/skills/platforms/multica-dingtalk/PLATFORM.md +34 -8
  151. package/skills/platforms/multica-dingtalk/{dingtalk-agent-deploy-multica → dta-deploy-multica}/SKILL.md +10 -8
  152. package/skills/platforms/multica-dingtalk/dta-deploy-multica/references/multica-deployment-contract.md +67 -0
  153. package/skills/platforms/multica-dingtalk/{multica-external → dta-ops-multica}/SKILL.md +81 -11
  154. package/skills/platforms/multica-dingtalk/{multica-external → dta-ops-multica}/scripts/bootstrap.sh +2 -2
  155. package/skills/platforms/multica-dingtalk/{multica-external → dta-ops-multica}/scripts/multica_ext.py +264 -16
  156. package/docs/assets/agent-delivery-lifecycle.svg +0 -103
  157. package/skills/core/dingtalk-basic-behavior/references/event-to-behavior.md +0 -24
  158. package/skills/core/dingtalk-basic-behavior/references/perception-and-gates.md +0 -28
  159. package/skills/platforms/multica-dingtalk/dingtalk-agent-boot-multica/SKILL.md +0 -40
  160. package/skills/platforms/multica-dingtalk/dingtalk-agent-deploy-multica/references/multica-deployment-contract.md +0 -49
  161. /package/examples/agents/fde-coach/{skills → agent/skills}/fde-coach/SKILL.md +0 -0
  162. /package/examples/agents/release-manager/{skills → agent/skills}/release-manager/SKILL.md +0 -0
  163. /package/skills/core/{dingtalk-agent-compose → dta-agent-compose}/assets/role-skill.template.md +0 -0
  164. /package/skills/core/{dingtalk-agent-compose → dta-agent-compose}/references/storage-routing.md +0 -0
  165. /package/skills/core/{dingtalk-agent-eval → dta-agent-eval}/references/evidence-contract.md +0 -0
  166. /package/skills/core/{dingtalk-agent-eval → dta-agent-eval}/references/failure-to-case.md +0 -0
  167. /package/skills/core/{dingtalk-agent-eval → dta-agent-eval}/references/local-connector-smoke.md +0 -0
  168. /package/skills/core/{dingtalk-agent-eval → dta-agent-eval}/references/scenario-taxonomy.md +0 -0
  169. /package/skills/core/{dingtalk-agent-eval → dta-agent-eval}/references/storage-modes.md +0 -0
  170. /package/skills/core/{dingtalk-basic-behavior → dta-basic-behavior}/assets/memory-candidate-proposal.json +0 -0
  171. /package/skills/core/{dingtalk-basic-behavior → dta-basic-behavior}/assets/task-checkpoint.json +0 -0
  172. /package/skills/core/{dingtalk-basic-behavior → dta-basic-behavior}/references/action-contract.md +0 -0
  173. /package/skills/core/{dingtalk-basic-behavior → dta-basic-behavior}/references/runtime-modes.md +0 -0
  174. /package/skills/core/{dingtalk-basic-behavior → dta-basic-behavior}/references/task-lifecycle.md +0 -0
  175. /package/skills/platforms/multica-dingtalk/{dingtalk-agent-deploy-multica → dta-deploy-multica}/references/promotion-observation-contract.md +0 -0
@@ -0,0 +1,120 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1440 840" width="1440" height="840" role="img" aria-labelledby="title desc">
2
+ <title id="title">dingtalk-agent 作为连接层在运行平台与钉钉之间的位置</title>
3
+ <desc id="desc">运行位置层列出 Agent 可以执行的 Managed Agent Platform,Multica 已支持,DEAP 敬请期待,更多平台需先在注册表登记并提供平台 Skill 包;中间是 dingtalk-agent,提供接入与装配、行为壳子、受控交付、评测与观测四类能力,并拥有 Agent 本体、公共行为、状态与效果证据;下方左侧是钉钉数字员工平台,签发身份、划定场域并送来可信事件,当前尚未接入所以画成虚线;下方右侧是 DWS,所有真实钉钉操作最终由它执行并回读 Receipt;最底部是钉钉组织。</desc>
4
+ <style>
5
+ text { font-family:'Helvetica Neue',Helvetica,Arial,'PingFang SC','Microsoft YaHei',sans-serif; }
6
+ .title { fill:#111827;font-size:28px;font-weight:700; }
7
+ .subtitle { fill:#6b7280;font-size:14px; }
8
+ .lane { fill:#475569;font-size:12px;font-weight:700;letter-spacing:.08em; }
9
+ .node-title { fill:#111827;font-size:16px;font-weight:700; }
10
+ .node-sub { fill:#4b5563;font-size:12px; }
11
+ .small { fill:#64748b;font-size:11px; }
12
+ .label { fill:#475569;font-size:11px;font-weight:600; }
13
+ .footer { fill:#ffffff;font-size:11px;font-weight:600; }
14
+ </style>
15
+ <defs>
16
+ <marker id="arrow-blue" markerWidth="10" markerHeight="7" refX="9" refY="3.5" orient="auto"><polygon points="0 0,10 3.5,0 7" fill="#2563eb"/></marker>
17
+ <marker id="arrow-purple" markerWidth="10" markerHeight="7" refX="9" refY="3.5" orient="auto"><polygon points="0 0,10 3.5,0 7" fill="#7c3aed"/></marker>
18
+ <marker id="arrow-teal" markerWidth="10" markerHeight="7" refX="9" refY="3.5" orient="auto"><polygon points="0 0,10 3.5,0 7" fill="#0d9488"/></marker>
19
+ <filter id="shadow" x="-20%" y="-20%" width="140%" height="140%"><feDropShadow dx="0" dy="2" stdDeviation="3" flood-color="#0f172a" flood-opacity=".10"/></filter>
20
+ </defs>
21
+
22
+ <rect width="1440" height="840" fill="#ffffff"/>
23
+
24
+ <text x="40" y="48" class="title">把 Agent 接进钉钉,并连接更广阔的运行平台</text>
25
+ <text x="40" y="75" class="subtitle">本仓库是连接层:不发身份、不建 Runtime、不复制 DWS 命令面——只把 Agent 装配成合格的钉钉数字员工。</text>
26
+
27
+ <!-- ── 泳道 1:运行位置 ───────────────────────────────── -->
28
+ <rect x="30" y="100" width="1380" height="152" rx="12" fill="#f8fafc" stroke="#cbd5e1" stroke-width="1.2" stroke-dasharray="7 5"/>
29
+ <text x="48" y="124" class="lane">RUNTIME LOCATION · 运行位置:Agent 在哪里执行——可替换,且是本仓库的连接面</text>
30
+
31
+ <rect x="55" y="144" width="300" height="80" rx="9" fill="#f0fdf4" stroke="#86efac" stroke-width="1.6"/>
32
+ <text x="205" y="176" text-anchor="middle" class="node-title">Multica</text>
33
+ <text x="205" y="199" text-anchor="middle" class="node-sub">已支持</text>
34
+
35
+ <rect x="385" y="144" width="300" height="80" rx="9" fill="#f9fafb" stroke="#d1d5db" stroke-width="1.6" stroke-dasharray="6 4"/>
36
+ <text x="535" y="176" text-anchor="middle" class="node-title">DEAP</text>
37
+ <text x="535" y="199" text-anchor="middle" class="node-sub">敬请期待 · 是否内建运行平台待确认</text>
38
+
39
+ <rect x="715" y="144" width="300" height="80" rx="9" fill="#f9fafb" stroke="#d1d5db" stroke-width="1.6" stroke-dasharray="6 4"/>
40
+ <text x="865" y="176" text-anchor="middle" class="node-title">更多平台</text>
41
+ <text x="865" y="199" text-anchor="middle" class="node-sub">注册表 + 平台 Skill 包</text>
42
+
43
+ <text x="1045" y="176" class="node-sub">接入一个平台 =</text>
44
+ <text x="1045" y="199" class="node-sub">一个平台 Skill 包 + 注册表一条记录</text>
45
+
46
+ <!-- 装配箭头 -->
47
+ <path d="M720 252 L720 296" fill="none" stroke="#2563eb" stroke-width="2" marker-end="url(#arrow-blue)"/>
48
+ <rect x="734" y="262" width="204" height="21" rx="5" fill="#ffffff" opacity=".96"/>
49
+ <text x="836" y="277" text-anchor="middle" class="label">装配 · 加载 Definition 与 Skills</text>
50
+
51
+ <!-- ── 泳道 2:dingtalk-agent(高亮)───────────────────── -->
52
+ <rect x="30" y="306" width="1380" height="242" rx="14" fill="#f8fafc" stroke="#0f766e" stroke-width="2"/>
53
+ <text x="48" y="332" fill="#0f766e" font-size="13" font-weight="700" letter-spacing=".08em">DINGTALK-AGENT · 本仓库:行为内核与连接层</text>
54
+ <text x="48" y="354" class="small">五个部件里唯一由本仓库拥有的一项——Agent 本体、公共行为、状态与效果证据</text>
55
+
56
+ <rect x="55" y="370" width="315" height="152" rx="10" fill="#eff6ff" stroke="#60a5fa" stroke-width="2" filter="url(#shadow)"/>
57
+ <text x="75" y="400" class="node-title">接入与装配</text>
58
+ <text x="75" y="424" class="node-sub">把 Agent 变成可 hash、</text>
59
+ <text x="75" y="444" class="node-sub">可继承、可审计的本体</text>
60
+ <rect x="75" y="466" width="275" height="28" rx="7" fill="#ffffff" stroke="#93c5fd"/>
61
+ <text x="212" y="485" text-anchor="middle" class="small" fill="#1d4ed8">agent enhance · agent audit</text>
62
+
63
+ <rect x="390" y="370" width="315" height="152" rx="10" fill="#eff6ff" stroke="#60a5fa" stroke-width="2" filter="url(#shadow)"/>
64
+ <text x="410" y="400" class="node-title">行为壳子</text>
65
+ <text x="410" y="424" class="node-sub">何时响应 · 何时追问</text>
66
+ <text x="410" y="444" class="node-sub">何时沉默 · 如何收口</text>
67
+ <rect x="410" y="466" width="275" height="28" rx="7" fill="#ffffff" stroke="#93c5fd"/>
68
+ <text x="547" y="485" text-anchor="middle" class="small" fill="#1d4ed8">Basic Behavior + 标准模板</text>
69
+
70
+ <rect x="725" y="370" width="315" height="152" rx="10" fill="#eff6ff" stroke="#60a5fa" stroke-width="2" filter="url(#shadow)"/>
71
+ <text x="745" y="400" class="node-title">受控交付</text>
72
+ <text x="745" y="424" class="node-sub">零写入计划 · 显式确认</text>
73
+ <text x="745" y="444" class="node-sub">每步独立回读</text>
74
+ <rect x="745" y="466" width="275" height="28" rx="7" fill="#ffffff" stroke="#93c5fd"/>
75
+ <text x="882" y="485" text-anchor="middle" class="small" fill="#1d4ed8">deploy · promote · Receipt</text>
76
+
77
+ <rect x="1060" y="370" width="315" height="152" rx="10" fill="#eff6ff" stroke="#60a5fa" stroke-width="2" filter="url(#shadow)"/>
78
+ <text x="1080" y="400" class="node-title">评测与观测</text>
79
+ <text x="1080" y="424" class="node-sub">上线前证明它真会做事</text>
80
+ <text x="1080" y="444" class="node-sub">失败沉淀成可复跑场景</text>
81
+ <rect x="1080" y="466" width="275" height="28" rx="7" fill="#ffffff" stroke="#93c5fd"/>
82
+ <text x="1217" y="485" text-anchor="middle" class="small" fill="#1d4ed8">lab · workspace eval · observe</text>
83
+
84
+ <!-- 身份与事件向上(虚线=尚未接入);动作经 DWS 向下(实线=已在用) -->
85
+ <path d="M365 600 L365 556" fill="none" stroke="#7c3aed" stroke-width="1.8" stroke-dasharray="6 4" marker-end="url(#arrow-purple)"/>
86
+ <rect x="373" y="566" width="186" height="21" rx="5" fill="#ffffff" opacity=".96"/>
87
+ <text x="466" y="581" text-anchor="middle" class="label">签发的身份 · 可信事件(待接入)</text>
88
+
89
+ <path d="M1075 556 L1075 600" fill="none" stroke="#0d9488" stroke-width="2" marker-end="url(#arrow-teal)"/>
90
+ <rect x="1084" y="566" width="166" height="21" rx="5" fill="#ffffff" opacity=".96"/>
91
+ <text x="1167" y="581" text-anchor="middle" class="label">动作 · 执行 · Receipt 回读</text>
92
+
93
+ <!-- ── 下层左:钉钉数字员工平台(虚线=尚未接入)─────── -->
94
+ <rect x="30" y="600" width="670" height="160" rx="12" fill="#faf5ff" stroke="#c084fc" stroke-width="1.8" stroke-dasharray="7 5"/>
95
+ <text x="48" y="626" fill="#7c3aed" font-size="12" font-weight="700" letter-spacing=".08em">IDENTITY &amp; PERCEPTION · 钉钉数字员工平台</text>
96
+
97
+ <rect x="55" y="644" width="300" height="76" rx="9" fill="#ffffff" stroke="#d8b4fe" stroke-width="1.6"/>
98
+ <text x="205" y="674" text-anchor="middle" class="node-title">身份权限管控</text>
99
+ <text x="205" y="697" text-anchor="middle" class="node-sub">创建 · UID · 场域边界 · 生命周期</text>
100
+
101
+ <rect x="375" y="644" width="300" height="76" rx="9" fill="#ffffff" stroke="#d8b4fe" stroke-width="1.6"/>
102
+ <text x="525" y="674" text-anchor="middle" class="node-title">感知与人机交互</text>
103
+ <text x="525" y="697" text-anchor="middle" class="node-sub">事件送达 · 统一展示</text>
104
+
105
+ <text x="55" y="744" class="small">DEAP 敬请期待,平台命令一律 fail-closed;当前身份不经过 DEAP。事件信封的权威是钉钉事件中心与 DWS。</text>
106
+
107
+ <!-- ── 下层右:DWS(实线=已在用)────────────────────── -->
108
+ <rect x="740" y="600" width="670" height="160" rx="12" fill="#f0fdfa" stroke="#0f766e" stroke-width="1.8"/>
109
+ <text x="758" y="626" fill="#0f766e" font-size="12" font-weight="700" letter-spacing=".08em">PLATFORM EXECUTION · DWS</text>
110
+
111
+ <rect x="765" y="644" width="620" height="76" rx="9" fill="#ffffff" stroke="#5eead4" stroke-width="1.6"/>
112
+ <text x="1075" y="674" text-anchor="middle" class="node-title">消息 · 文档 · 表格 · 日程 · 审批 · 通讯录</text>
113
+ <text x="1075" y="697" text-anchor="middle" class="node-sub">所有真实钉钉操作最终都由 DWS 执行</text>
114
+
115
+ <text x="765" y="744" class="small">src/dws.ts 是全仓库唯一 spawn dws 的地方;本仓库不复制它的命令面。</text>
116
+
117
+ <!-- 钉钉组织 -->
118
+ <rect x="30" y="790" width="1380" height="26" rx="6" fill="#0f172a"/>
119
+ <text x="720" y="807" text-anchor="middle" class="footer">钉钉组织 · 真实的人、群、日程、审批与文档 —— 身份与事件由钉钉签发,本仓库只冻结、审计和引用,不发证、不改写、不扩权</text>
120
+ </svg>
@@ -0,0 +1,92 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1440 550" width="1440" height="550" role="img" aria-labelledby="title desc">
2
+ <title id="title">dingtalk-agent 数字员工的五个部件与各自的权威</title>
3
+ <desc id="desc">一个数字员工由五个部件构成:Agent 本体由本仓库拥有;组织身份与场域授权由钉钉数字员工平台签发;感知通道由钉钉事件中心与 DWS 提供;平台执行能力由 DWS 提供;运行位置由 Managed Agent Platform 或 Agent Host 提供。本仓库只拥有第一项,其余四项不实现也不替代,但必须逐一显式建模。</desc>
4
+ <style>
5
+ text { font-family:'Helvetica Neue',Helvetica,Arial,'PingFang SC','Microsoft YaHei',sans-serif; }
6
+ .title { fill:#111827;font-size:28px;font-weight:700; }
7
+ .subtitle { fill:#6b7280;font-size:14px; }
8
+ .lane { fill:#475569;font-size:12px;font-weight:700;letter-spacing:.08em; }
9
+ .node-title { fill:#111827;font-size:16px;font-weight:700; }
10
+ .node-sub { fill:#4b5563;font-size:12px; }
11
+ .small { fill:#64748b;font-size:11px; }
12
+ .own { fill:#1d4ed8;font-size:13px;font-weight:700; }
13
+ .ext { fill:#475569;font-size:13px;font-weight:600; }
14
+ .formula { fill:#334155;font-size:15px; }
15
+ </style>
16
+ <defs>
17
+ <filter id="shadow" x="-20%" y="-20%" width="140%" height="140%"><feDropShadow dx="0" dy="2" stdDeviation="3" flood-color="#0f172a" flood-opacity=".10"/></filter>
18
+ </defs>
19
+
20
+ <rect width="1440" height="550" fill="#ffffff"/>
21
+
22
+ <text x="40" y="48" class="title">数字员工不等于 Agent</text>
23
+ <text x="40" y="75" class="subtitle">它是一个 Agent 装配上组织语境之后的结果——五个部件,五个权威,本仓库只拥有第一项。</text>
24
+
25
+ <rect x="30" y="100" width="1380" height="250" rx="12" fill="#f8fafc" stroke="#cbd5e1" stroke-width="1.2" stroke-dasharray="7 5"/>
26
+ <text x="48" y="124" class="lane">DIGITAL EMPLOYEE · 一个数字员工由五个部件构成</text>
27
+
28
+ <!-- 1. Agent 本体 —— 本仓库唯一拥有 -->
29
+ <rect x="55" y="145" width="234" height="180" rx="10" fill="#eff6ff" stroke="#60a5fa" stroke-width="2" filter="url(#shadow)"/>
30
+ <text x="75" y="175" class="node-title">Agent 本体</text>
31
+ <text x="75" y="198" class="node-sub">Definition · Skills</text>
32
+ <text x="75" y="218" class="node-sub">行为 · 状态 · 效果证据</text>
33
+ <text x="75" y="252" class="small">谁说了算</text>
34
+ <rect x="75" y="262" width="194" height="30" rx="7" fill="#ffffff" stroke="#93c5fd"/>
35
+ <text x="172" y="282" text-anchor="middle" class="node-sub" fill="#1d4ed8">本仓库 + Git</text>
36
+
37
+ <text x="309" y="245" text-anchor="middle" fill="#94a3b8" font-size="24">+</text>
38
+
39
+ <!-- 2. 组织身份与场域授权 -->
40
+ <rect x="329" y="145" width="234" height="180" rx="9" fill="#faf5ff" stroke="#c084fc" stroke-width="1.6"/>
41
+ <text x="349" y="175" class="node-title">组织身份与场域</text>
42
+ <text x="349" y="198" class="node-sub">发证 · 权限 · 边界</text>
43
+ <text x="349" y="218" class="node-sub">入转调离 · 生命周期</text>
44
+ <text x="349" y="252" class="small">谁说了算</text>
45
+ <rect x="349" y="262" width="194" height="30" rx="7" fill="#ffffff" stroke="#d8b4fe"/>
46
+ <text x="446" y="282" text-anchor="middle" class="node-sub" fill="#7c3aed">钉钉数字员工平台</text>
47
+
48
+ <text x="583" y="245" text-anchor="middle" fill="#94a3b8" font-size="24">+</text>
49
+
50
+ <!-- 3. 感知通道 -->
51
+ <rect x="603" y="145" width="234" height="180" rx="9" fill="#fff7ed" stroke="#fdba74" stroke-width="1.6"/>
52
+ <text x="623" y="175" class="node-title">感知通道</text>
53
+ <text x="623" y="198" class="node-sub">可信事件信封</text>
54
+ <text x="623" y="218" class="node-sub">谁 · 在哪 · 说了什么</text>
55
+ <text x="623" y="252" class="small">谁说了算</text>
56
+ <rect x="623" y="262" width="194" height="30" rx="7" fill="#ffffff" stroke="#fdba74"/>
57
+ <text x="720" y="282" text-anchor="middle" class="node-sub" fill="#c2410c">钉钉事件中心 / DWS</text>
58
+
59
+ <text x="857" y="245" text-anchor="middle" fill="#94a3b8" font-size="24">+</text>
60
+
61
+ <!-- 4. 平台执行能力 -->
62
+ <rect x="877" y="145" width="234" height="180" rx="9" fill="#f0fdfa" stroke="#5eead4" stroke-width="1.6"/>
63
+ <text x="897" y="175" class="node-title">平台执行能力</text>
64
+ <text x="897" y="198" class="node-sub">消息 · 文档 · 表格</text>
65
+ <text x="897" y="218" class="node-sub">日程 · 审批 · 通讯录</text>
66
+ <text x="897" y="252" class="small">谁说了算</text>
67
+ <rect x="897" y="262" width="194" height="30" rx="7" fill="#ffffff" stroke="#5eead4"/>
68
+ <text x="994" y="282" text-anchor="middle" class="node-sub" fill="#0f766e">DWS</text>
69
+
70
+ <text x="1131" y="245" text-anchor="middle" fill="#94a3b8" font-size="24">+</text>
71
+
72
+ <!-- 5. 运行位置 -->
73
+ <rect x="1151" y="145" width="234" height="180" rx="9" fill="#f9fafb" stroke="#d1d5db" stroke-width="1.6"/>
74
+ <text x="1171" y="175" class="node-title">运行位置</text>
75
+ <text x="1171" y="198" class="node-sub">模型 · 工具循环</text>
76
+ <text x="1171" y="218" class="node-sub">沙箱 · Session 生命周期</text>
77
+ <text x="1171" y="252" class="small">谁说了算</text>
78
+ <rect x="1171" y="262" width="194" height="30" rx="7" fill="#ffffff" stroke="#d1d5db"/>
79
+ <text x="1268" y="282" text-anchor="middle" class="node-sub">Managed Platform / Host</text>
80
+
81
+ <!-- 归属带 -->
82
+ <rect x="55" y="368" width="234" height="4" rx="2" fill="#2563eb"/>
83
+ <rect x="329" y="368" width="1056" height="4" rx="2" fill="#cbd5e1"/>
84
+ <text x="55" y="394" class="own">本仓库拥有</text>
85
+ <text x="329" y="394" class="ext">由外部签发或提供——本仓库不实现、不替代,但逐一显式建模,否则边界会悄悄溜走</text>
86
+
87
+ <!-- 公式条 -->
88
+ <rect x="30" y="418" width="1380" height="94" rx="10" fill="#f8fafc" stroke="#cbd5e1" stroke-width="1"/>
89
+ <text x="50" y="444" fill="#111827" font-size="13" font-weight="700">可叠加公式</text>
90
+ <text x="50" y="472" class="formula">Agent 本体 + 组织身份与场域授权 + 感知通道 + 平台执行能力 + 运行位置 = 一个可工作的钉钉数字员工</text>
91
+ <text x="50" y="496" class="small">外部签发的身份、场域与事件信封只能被冻结、审计和引用,永远不能从正文、显示名或模型记忆推断。</text>
92
+ </svg>
@@ -0,0 +1,125 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 880" width="1200" height="880" role="img" aria-labelledby="title desc">
2
+ <title id="title">dingtalk-agent 架构:五个部件,五个权威</title>
3
+ <desc id="desc">一个数字员工由五个部件构成,编号一到五:部件一 Agent 本体由本仓库拥有,内含可信事件、响应闸门、Session Run Wait、动作闸门与 Receipt 回读的处理链,以及本体装配、状态记忆、评测证据三块支撑;部件二组织身份与场域授权、部件三感知通道由钉钉数字员工平台提供,当前尚未接入;部件四平台执行能力由 DWS 提供,执行全部真实钉钉操作并回读 Receipt;部件五运行位置由 Managed Agent Platform 或本地 Agent Host 提供,Multica 已支持、DEAP 敬请期待、更多平台需先在注册表登记并提供平台 Skill 包。最底层是钉钉组织。</desc>
4
+ <style>
5
+ text { font-family: 'Helvetica Neue', Helvetica, Arial, 'PingFang SC', 'Microsoft YaHei', 'Microsoft JhengHei', 'SimHei', sans-serif; }
6
+ .title { fill:#111827;font-size:22px;font-weight:700; }
7
+ .subtitle { fill:#6b7280;font-size:13px; }
8
+ .lane { fill:#475569;font-size:12px;font-weight:700;letter-spacing:.08em; }
9
+ .node-title { fill:#111827;font-size:15px;font-weight:700; }
10
+ .node-sub { fill:#4b5563;font-size:12px; }
11
+ .small { fill:#64748b;font-size:11px; }
12
+ .label { fill:#475569;font-size:11px;font-weight:600; }
13
+ .footer { fill:#ffffff;font-size:11px;font-weight:600; }
14
+ .badge-on { fill:#ffffff;font-size:12px;font-weight:700; }
15
+ </style>
16
+ <defs>
17
+ <marker id="arrow-blue" markerWidth="10" markerHeight="7" refX="9" refY="3.5" orient="auto"><polygon points="0 0, 10 3.5, 0 7" fill="#2563eb"/></marker>
18
+ <marker id="arrow-gray" markerWidth="10" markerHeight="7" refX="9" refY="3.5" orient="auto"><polygon points="0 0, 10 3.5, 0 7" fill="#64748b"/></marker>
19
+ <marker id="arrow-purple" markerWidth="10" markerHeight="7" refX="9" refY="3.5" orient="auto"><polygon points="0 0, 10 3.5, 0 7" fill="#7c3aed"/></marker>
20
+ <marker id="arrow-teal" markerWidth="10" markerHeight="7" refX="9" refY="3.5" orient="auto"><polygon points="0 0, 10 3.5, 0 7" fill="#0d9488"/></marker>
21
+ </defs>
22
+ <rect width="1200" height="880" fill="#ffffff"/>
23
+ <text x="40" y="46" class="title">dingtalk-agent 架构:五个部件,五个权威,本仓库只拥有一个</text>
24
+ <text x="40" y="70" class="subtitle">把 Agent 装配成合格的钉钉数字员工,并连接更广阔的 Agent 运行平台。实心编号 = 本仓库拥有;空心编号 = 外部提供。</text>
25
+ <rect x="40" y="92" width="1120" height="122" rx="8" fill="#f9fafb" stroke="#d1d5db" stroke-width="1.5" stroke-dasharray="7 5"/>
26
+ <circle cx="62" cy="110" r="11" fill="#ffffff" stroke="#64748b" stroke-width="1.6"/>
27
+ <text x="62" y="114" text-anchor="middle" fill="#64748b" font-size="12" font-weight="700">5</text>
28
+ <text x="82" y="115" class="lane">RUNTIME LOCATION · 运行位置(可替换)—— Agent 在哪里执行,本仓库不自建 Runtime</text>
29
+ <rect x="64" y="128" width="247" height="70" rx="8" fill="#f0fdf4" stroke="#86efac" stroke-width="1.5"/>
30
+ <text x="187" y="156" text-anchor="middle" class="node-title">Multica</text>
31
+ <text x="187" y="178" text-anchor="middle" class="node-sub">已支持</text>
32
+ <rect x="339" y="128" width="247" height="70" rx="8" fill="#faf5ff" stroke="#c084fc" stroke-width="1.5" stroke-dasharray="6 4"/>
33
+ <text x="462" y="156" text-anchor="middle" class="node-title">DEAP</text>
34
+ <text x="462" y="178" text-anchor="middle" class="node-sub">敬请期待 · 是否内建运行平台待确认</text>
35
+ <rect x="614" y="128" width="247" height="70" rx="8" fill="#f9fafb" stroke="#d1d5db" stroke-width="1.5" stroke-dasharray="6 4"/>
36
+ <text x="737" y="156" text-anchor="middle" class="node-title">更多平台</text>
37
+ <text x="737" y="178" text-anchor="middle" class="node-sub">注册表 + 平台 Skill 包</text>
38
+ <rect x="889" y="128" width="247" height="70" rx="8" fill="#ffffff" stroke="#d1d5db" stroke-width="1.5"/>
39
+ <text x="1012" y="156" text-anchor="middle" class="node-title">本地 Agent Host</text>
40
+ <text x="1012" y="178" text-anchor="middle" class="node-sub">Claude Code · Codex · OpenCode</text>
41
+ <path d="M 600,268 L 600,220" fill="none" stroke="#64748b" stroke-width="1.5" stroke-dasharray="5 4" marker-end="url(#arrow-gray)"/>
42
+ <rect x="610" y="232" width="190" height="19" rx="4" fill="#ffffff" opacity="0.95"/>
43
+ <text x="704" y="246" text-anchor="middle" class="label">部署 · Definition 与 Skill 树</text>
44
+ <rect x="40" y="268" width="1120" height="292" rx="8" fill="#f8fafc" stroke="#0f766e" stroke-width="2"/>
45
+ <circle cx="62" cy="288" r="11" fill="#0f766e"/>
46
+ <text x="62" y="292" text-anchor="middle" class="badge-on">1</text>
47
+ <text x="82" y="292" fill="#0f766e" font-size="12" font-weight="700" letter-spacing=".08em">DINGTALK-AGENT · 本仓库唯一拥有的一项:Agent 本体 · 公共行为 · 状态 · 效果证据</text>
48
+ <text x="82" y="312" class="small">Skill 劝(该不该做)· CLI 拦(身份 / 目标 / 预算 / 幂等 / 回读)· DWS 做(执行)</text>
49
+ <rect x="64" y="326" width="187" height="92" rx="8" fill="#eff6ff" stroke="#60a5fa" stroke-width="1.8"/>
50
+ <text x="157" y="356" text-anchor="middle" class="node-title">可信事件</text>
51
+ <text x="157" y="378" text-anchor="middle" class="node-sub">Invocation</text>
52
+ <text x="157" y="397" text-anchor="middle" class="small">谁 · 在哪 · 说了什么</text>
53
+ <rect x="285" y="326" width="187" height="92" rx="8" fill="#eff6ff" stroke="#60a5fa" stroke-width="1.8"/>
54
+ <text x="378" y="356" text-anchor="middle" class="node-title">Response Gate</text>
55
+ <text x="378" y="378" text-anchor="middle" class="node-sub">mention/DM 才处理</text>
56
+ <text x="378" y="397" text-anchor="middle" class="small">群聊未 @ 默认沉默</text>
57
+ <rect x="506" y="326" width="187" height="92" rx="8" fill="#eff6ff" stroke="#60a5fa" stroke-width="1.8"/>
58
+ <text x="599" y="356" text-anchor="middle" class="node-title">Session·Run·Wait</text>
59
+ <text x="599" y="378" text-anchor="middle" class="node-sub">一件事 · 一次唤醒</text>
60
+ <text x="599" y="397" text-anchor="middle" class="small">沙箱可丢弃,事情接着做</text>
61
+ <rect x="727" y="326" width="187" height="92" rx="8" fill="#eff6ff" stroke="#60a5fa" stroke-width="1.8"/>
62
+ <text x="820" y="356" text-anchor="middle" class="node-title">Action Gate</text>
63
+ <text x="820" y="378" text-anchor="middle" class="node-sub">冻结身份 · 目标 · 预算</text>
64
+ <text x="820" y="397" text-anchor="middle" class="small">幂等,不盲重试</text>
65
+ <rect x="948" y="326" width="187" height="92" rx="8" fill="#eff6ff" stroke="#60a5fa" stroke-width="1.8"/>
66
+ <text x="1041" y="356" text-anchor="middle" class="node-title">Receipt</text>
67
+ <text x="1041" y="378" text-anchor="middle" class="node-sub">独立回读</text>
68
+ <text x="1041" y="397" text-anchor="middle" class="small">无证据不声称完成</text>
69
+ <path d="M 251,372 L 285,372" fill="none" stroke="#2563eb" stroke-width="2" marker-end="url(#arrow-blue)"/>
70
+ <path d="M 472,372 L 506,372" fill="none" stroke="#2563eb" stroke-width="2" marker-end="url(#arrow-blue)"/>
71
+ <path d="M 693,372 L 727,372" fill="none" stroke="#2563eb" stroke-width="2" marker-end="url(#arrow-blue)"/>
72
+ <path d="M 914,372 L 948,372" fill="none" stroke="#2563eb" stroke-width="2" marker-end="url(#arrow-blue)"/>
73
+ <rect x="64" y="440" width="337" height="92" rx="8" fill="#ffffff" stroke="#93c5fd" stroke-width="1.5"/>
74
+ <text x="232" y="468" text-anchor="middle" class="node-title">本体与装配</text>
75
+ <text x="232" y="490" text-anchor="middle" class="node-sub">Definition + Basic Behavior + Role Skills</text>
76
+ <text x="232" y="509" text-anchor="middle" class="small">agent enhance · agent audit --verify-load</text>
77
+ <rect x="431" y="440" width="337" height="92" rx="8" fill="#ffffff" stroke="#93c5fd" stroke-width="1.5"/>
78
+ <text x="599" y="468" text-anchor="middle" class="node-title">状态与记忆</text>
79
+ <text x="599" y="490" text-anchor="middle" class="node-sub">语义内容与控制状态分开</text>
80
+ <text x="599" y="509" text-anchor="middle" class="small">锁 · 幂等 · Receipt 不进 Markdown</text>
81
+ <rect x="798" y="440" width="337" height="92" rx="8" fill="#ffffff" stroke="#93c5fd" stroke-width="1.5"/>
82
+ <text x="966" y="468" text-anchor="middle" class="node-title">评测与证据</text>
83
+ <text x="966" y="490" text-anchor="middle" class="node-sub">上线前用最低成本证明它真会做事</text>
84
+ <text x="966" y="509" text-anchor="middle" class="small">lab · workspace eval · observe</text>
85
+ <path d="M 158,606 L 158,564" fill="none" stroke="#7c3aed" stroke-width="1.8" stroke-dasharray="6 4" marker-end="url(#arrow-purple)"/>
86
+ <rect x="169" y="572" width="136" height="19" rx="4" fill="#ffffff" opacity="0.95"/>
87
+ <text x="237" y="586" text-anchor="middle" class="label">签发的身份 · 可信事件</text>
88
+ <path d="M 821,564 L 821,606" fill="none" stroke="#0d9488" stroke-width="2" marker-end="url(#arrow-teal)"/>
89
+ <rect x="837" y="572" width="56" height="19" rx="4" fill="#ffffff" opacity="0.95"/>
90
+ <text x="865" y="586" text-anchor="middle" class="label">执行动作</text>
91
+ <path d="M 1042,606 L 1042,564" fill="none" stroke="#0d9488" stroke-width="2" marker-end="url(#arrow-teal)"/>
92
+ <rect x="1058" y="572" width="82" height="19" rx="4" fill="#ffffff" opacity="0.95"/>
93
+ <text x="1099" y="586" text-anchor="middle" class="label">Receipt 回读</text>
94
+ <rect x="40" y="606" width="540" height="140" rx="8" fill="#faf5ff" stroke="#c084fc" stroke-width="1.8" stroke-dasharray="7 5"/>
95
+ <text x="58" y="630" fill="#7c3aed" font-size="12" font-weight="700" letter-spacing=".08em">IDENTITY &amp; PERCEPTION · 钉钉数字员工平台</text>
96
+ <rect x="60" y="646" width="245" height="64" rx="8" fill="#ffffff" stroke="#d8b4fe" stroke-width="1.5"/>
97
+ <circle cx="80" cy="666" r="11" fill="#ffffff" stroke="#7c3aed" stroke-width="1.6"/>
98
+ <text x="80" y="670" text-anchor="middle" fill="#7c3aed" font-size="12" font-weight="700">2</text>
99
+ <text x="183" y="673" text-anchor="middle" class="node-title">身份权限管控</text>
100
+ <text x="183" y="694" text-anchor="middle" class="node-sub">创建 · UID · 场域边界 · 生命周期</text>
101
+ <rect x="320" y="646" width="245" height="64" rx="8" fill="#ffffff" stroke="#d8b4fe" stroke-width="1.5"/>
102
+ <circle cx="340" cy="666" r="11" fill="#ffffff" stroke="#7c3aed" stroke-width="1.6"/>
103
+ <text x="340" y="670" text-anchor="middle" fill="#7c3aed" font-size="12" font-weight="700">3</text>
104
+ <text x="443" y="673" text-anchor="middle" class="node-title">感知与人机交互</text>
105
+ <text x="443" y="694" text-anchor="middle" class="node-sub">事件送达 · 统一展示</text>
106
+ <text x="60" y="730" class="small">DEAP 敬请期待,平台命令一律 fail-closed;事件信封的权威是钉钉事件中心与 DWS。</text>
107
+ <rect x="620" y="606" width="540" height="140" rx="8" fill="#f0fdfa" stroke="#0f766e" stroke-width="1.8"/>
108
+ <text x="638" y="630" fill="#0f766e" font-size="12" font-weight="700" letter-spacing=".08em">PLATFORM EXECUTION · DWS</text>
109
+ <rect x="640" y="646" width="500" height="64" rx="8" fill="#ffffff" stroke="#5eead4" stroke-width="1.5"/>
110
+ <circle cx="660" cy="666" r="11" fill="#ffffff" stroke="#0d9488" stroke-width="1.6"/>
111
+ <text x="660" y="670" text-anchor="middle" fill="#0d9488" font-size="12" font-weight="700">4</text>
112
+ <text x="890" y="673" text-anchor="middle" class="node-title">钉钉全部产品能力</text>
113
+ <text x="890" y="694" text-anchor="middle" class="node-sub">消息 · 文档 · 表格 · 日程 · 审批 · 通讯录</text>
114
+ <text x="640" y="730" class="small">所有真实钉钉操作最终都由 DWS 执行;src/dws.ts 是全仓库唯一 spawn dws 的地方。</text>
115
+ <rect x="40" y="764" width="1120" height="28" rx="6" fill="#0f172a"/>
116
+ <text x="600" y="783" text-anchor="middle" class="footer">钉钉组织 · 真实的人、群、日程、审批与文档 —— 身份与事件由钉钉签发,本仓库只冻结、审计和引用,不发证、不改写、不扩权</text>
117
+ <line x1="40" y1="828" x2="74" y2="828" stroke="#2563eb" stroke-width="1.8" marker-end="url(#arrow-blue)"/>
118
+ <text x="82" y="832" class="small">主处理流:事件 → 资格 → 动作</text>
119
+ <line x1="300" y1="828" x2="334" y2="828" stroke="#64748b" stroke-width="1.8" stroke-dasharray="5 4" marker-end="url(#arrow-gray)"/>
120
+ <text x="342" y="832" class="small">装配与部署(本仓库 → 运行平台)</text>
121
+ <line x1="560" y1="828" x2="594" y2="828" stroke="#7c3aed" stroke-width="1.8" stroke-dasharray="6 4" marker-end="url(#arrow-purple)"/>
122
+ <text x="602" y="832" class="small">钉钉签发的身份与可信事件(DEAP 待接入)</text>
123
+ <line x1="860" y1="828" x2="894" y2="828" stroke="#0d9488" stroke-width="1.8" marker-end="url(#arrow-teal)"/>
124
+ <text x="902" y="832" class="small">DWS 执行与 Receipt 回读</text>
125
+ </svg>
@@ -0,0 +1,77 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 430" width="1200" height="430" role="img" aria-labelledby="title desc">
2
+ <title id="title">一个钉钉数字员工的一次协作</title>
3
+ <desc id="desc">群里有同事 @ 数字员工提出请求;它先确认自己是谁、被授权对谁做事;然后经 DWS 执行真实的钉钉操作;最后拿出可独立回读的回执与产物,才声称完成。全过程留在原来的群里,和真人同事走同一套协作界面。</desc>
4
+ <defs>
5
+ <linearGradient id="bg" x1="0" y1="0" x2="1" y2="1"><stop offset="0" stop-color="#0a1020"/><stop offset="1" stop-color="#111a31"/></linearGradient>
6
+ <linearGradient id="accent" x1="0" y1="0" x2="1" y2="0"><stop offset="0" stop-color="#39c6f4"/><stop offset="1" stop-color="#7777ff"/></linearGradient>
7
+ <filter id="shadow" x="-20%" y="-30%" width="140%" height="160%"><feDropShadow dx="0" dy="8" stdDeviation="12" flood-color="#020617" flood-opacity=".34"/></filter>
8
+ <style>
9
+ text { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif; }
10
+ .eyebrow { font-size:13px;font-weight:600;letter-spacing:1.6px;fill:#7dd3fc; }
11
+ .title { font-size:22px;font-weight:700;fill:#f8fafc; }
12
+ .step { font-size:17px;font-weight:700;fill:#f8fafc; }
13
+ .body { font-size:14px;font-weight:500;fill:#cbd5e1; }
14
+ .small { font-size:12px;font-weight:500;fill:#94a3b8; }
15
+ .bubble { font-size:14px;font-weight:600;fill:#dbeafe; }
16
+ .num { font-size:13px;font-weight:700;fill:#08111f; }
17
+ </style>
18
+ </defs>
19
+ <rect width="1200" height="430" rx="28" fill="url(#bg)"/>
20
+ <path d="M52 96H1148" stroke="#23304a"/>
21
+ <text x="52" y="56" class="eyebrow">A DIGITAL EMPLOYEE AT WORK</text>
22
+ <text x="52" y="86" class="title">群里 @ 它一句话,它像同事一样把事办完——而且每一步都留得下痕迹</text>
23
+ <g filter="url(#shadow)">
24
+ <rect x="52" y="116" width="250" height="188" rx="22" fill="#111c33" stroke="#2b3b59"/>
25
+ <circle cx="84" cy="150" r="15" fill="#67e8f9"/>
26
+ <text x="84" y="155" text-anchor="middle" class="num">1</text>
27
+ <text x="110" y="156" class="step">有人在群里 @ 它</text>
28
+ <rect x="74" y="184" width="206" height="46" rx="10" fill="#172643"/>
29
+ <text x="90" y="204" class="body">真人同事,在原来的群里</text>
30
+ <text x="90" y="222" class="small">不用换工具、不用开新系统</text>
31
+ </g>
32
+ <g filter="url(#shadow)">
33
+ <rect x="340" y="116" width="250" height="188" rx="22" fill="#111c33" stroke="#2b3b59"/>
34
+ <circle cx="372" cy="150" r="15" fill="#67e8f9"/>
35
+ <text x="372" y="155" text-anchor="middle" class="num">2</text>
36
+ <text x="398" y="156" class="step">它先确认自己是谁</text>
37
+ <rect x="362" y="184" width="206" height="46" rx="10" fill="#172643"/>
38
+ <text x="378" y="204" class="body">工号 · 岗位 · 能对谁做事</text>
39
+ <text x="378" y="222" class="small">身份由钉钉签发,不看正文说什么</text>
40
+ </g>
41
+ <g filter="url(#shadow)">
42
+ <rect x="628" y="116" width="250" height="188" rx="22" fill="#111c33" stroke="#2b3b59"/>
43
+ <circle cx="660" cy="150" r="15" fill="#67e8f9"/>
44
+ <text x="660" y="155" text-anchor="middle" class="num">3</text>
45
+ <text x="686" y="156" class="step">它去把事情办了</text>
46
+ <rect x="650" y="184" width="206" height="46" rx="10" fill="#172643"/>
47
+ <text x="666" y="204" class="body">查状态 · 发通知 · 写文档</text>
48
+ <text x="666" y="222" class="small">每个动作都过一道闸门</text>
49
+ </g>
50
+ <g filter="url(#shadow)">
51
+ <rect x="916" y="116" width="232" height="188" rx="22" fill="#111c33" stroke="#2b3b59"/>
52
+ <circle cx="948" cy="150" r="15" fill="#67e8f9"/>
53
+ <text x="948" y="155" text-anchor="middle" class="num">4</text>
54
+ <text x="974" y="156" class="step">它拿得出做完的证据</text>
55
+ <rect x="938" y="184" width="188" height="46" rx="10" fill="#172643"/>
56
+ <text x="954" y="204" class="body">回执 · 产物 · 可独立回读</text>
57
+ <text x="954" y="222" class="small">没有证据,就不说「做完了」</text>
58
+ </g>
59
+ <rect x="74" y="248" width="206" height="40" rx="12" fill="#17314b" stroke="#275779"/>
60
+ <text x="90" y="273" class="bubble">「@发布助手 3.2 能发了吗」</text>
61
+ <rect x="362" y="248" width="206" height="40" rx="12" fill="#1c2a4d" stroke="#3a4f7a"/>
62
+ <text x="378" y="273" class="small" fill="#cbd5e1">授权范围外的人和群,不响应</text>
63
+ <rect x="650" y="248" width="206" height="40" rx="12" fill="#1c2a4d" stroke="#3a4f7a"/>
64
+ <text x="666" y="273" class="small" fill="#cbd5e1">回复目标只能来自这条消息</text>
65
+ <rect x="938" y="248" width="188" height="40" rx="12" fill="#14322a" stroke="#2f6b52"/>
66
+ <circle cx="958" cy="268" r="6" fill="#4ade80"/>
67
+ <text x="972" y="273" class="small" fill="#cbd5e1">回读通过才算完成</text>
68
+ <path d="M302 210H330" stroke="url(#accent)" stroke-width="3" stroke-linecap="round"/>
69
+ <path d="m320 202 10 8-10 8" fill="none" stroke="#7777ff" stroke-width="3" stroke-linecap="round" stroke-linejoin="round"/>
70
+ <path d="M590 210H618" stroke="url(#accent)" stroke-width="3" stroke-linecap="round"/>
71
+ <path d="m608 202 10 8-10 8" fill="none" stroke="#7777ff" stroke-width="3" stroke-linecap="round" stroke-linejoin="round"/>
72
+ <path d="M878 210H906" stroke="url(#accent)" stroke-width="3" stroke-linecap="round"/>
73
+ <path d="m896 202 10 8-10 8" fill="none" stroke="#7777ff" stroke-width="3" stroke-linecap="round" stroke-linejoin="round"/>
74
+ <rect x="52" y="336" width="1096" height="1" fill="#23304a"/>
75
+ <text x="52" y="370" class="body">和真人同事走同一套协作界面——区别是,它的身份、边界和每一次副作用都可以被审计。</text>
76
+ <text x="52" y="398" class="small">未 @ 的群消息默认沉默 · 命令行不提供「发给谁」这个参数 · 说「完成」必须有宿主签发的证据——这三条由合同评测锁定。</text>
77
+ </svg>
@@ -40,9 +40,11 @@
40
40
  }
41
41
  },
42
42
  "definitionHash": { "$ref": "#/$defs/hash" },
43
- "instructionsHash": { "$ref": "#/$defs/hash" }
43
+ "instructionsHash": { "$ref": "#/$defs/hash" },
44
+ "previousRuntimeId": { "type": "string" }
44
45
  }
45
46
  },
47
+ "rebindRuntime": { "type": "boolean" },
46
48
  "operations": { "type": "array", "items": { "type": "string", "minLength": 1 } },
47
49
  "writeBudget": {
48
50
  "type": "object",
@@ -49,17 +49,23 @@
49
49
  "calls": { "$ref": "multica-deployment-operation.schema.json#/$defs/calls" },
50
50
  "smoke": {
51
51
  "type": "object", "additionalProperties": false,
52
- "required": ["status", "marker", "markerHash", "issueId", "taskId", "taskStatus", "requiredSkills", "loadedSkills", "toolTracePassed", "responsePassed", "responseHash", "failures"],
52
+ "required": ["status", "marker", "markerHash", "issueId", "taskId", "taskStatus", "taskDiagnostic", "requiredSkills", "loadedSkills", "toolTracePassed", "responsePassed", "responseHash", "failures"],
53
53
  "properties": {
54
54
  "status": { "enum": ["not-run", "pending", "passed", "failed"] },
55
55
  "marker": { "type": "string" }, "markerHash": { "type": "string" },
56
56
  "issueId": { "type": "string" }, "taskId": { "type": "string" },
57
- "taskStatus": { "type": "string" },
57
+ "taskStatus": { "type": "string" }, "taskDiagnostic": { "type": "string" },
58
58
  "requiredSkills": { "type": "array", "uniqueItems": true, "items": { "$ref": "#/$defs/name" } },
59
59
  "loadedSkills": { "type": "array", "uniqueItems": true, "items": { "$ref": "#/$defs/name" } },
60
60
  "toolTracePassed": { "type": "boolean" }, "responsePassed": { "type": "boolean" },
61
61
  "responseHash": { "type": "string" },
62
- "failures": { "type": "array", "items": { "type": "string" } }
62
+ "failures": { "type": "array", "items": { "type": "string" } },
63
+ "runtimeProvider": { "type": "string" },
64
+ "vocabularyIds": { "type": "array", "items": { "type": "string" } },
65
+ "toolNames": { "type": "array", "items": { "type": "string" } },
66
+ "unrecognizedTools": { "type": "array", "items": { "type": "string" } },
67
+ "classification": { "enum": ["", "skills-not-visible"] },
68
+ "failureDetails": { "$ref": "multica-workspace-inspection.schema.json#/$defs/failureDetails" }
63
69
  }
64
70
  },
65
71
  "rollback": {
@@ -72,6 +78,14 @@
72
78
  }
73
79
  },
74
80
  "failures": { "type": "array", "items": { "type": "string" } },
81
+ "failureDetails": { "$ref": "multica-workspace-inspection.schema.json#/$defs/failureDetails" },
82
+ "rebind": {
83
+ "type": "object", "additionalProperties": false,
84
+ "required": ["fromRuntimeId", "toRuntimeId"],
85
+ "properties": {
86
+ "fromRuntimeId": { "type": "string" }, "toRuntimeId": { "type": "string" }
87
+ }
88
+ },
75
89
  "evidencePath": { "type": "string", "minLength": 1 },
76
90
  "remoteRead": { "const": true }, "remoteWrite": { "type": "boolean" },
77
91
  "triggerWrite": { "const": false },
@@ -14,10 +14,14 @@
14
14
  "passed": { "type": "boolean" }, "providerReady": { "type": "boolean" },
15
15
  "operationIntegrity": { "type": "boolean" }, "receiptIntegrity": { "type": "boolean" },
16
16
  "reconciled": { "type": "boolean" },
17
+ "receiptFrozen": { "type": "boolean" },
18
+ "smokeStale": { "type": "boolean" },
19
+ "nextAction": { "type": "string" },
17
20
  "failures": { "type": "array", "items": { "type": "string" } },
18
21
  "receipt": { "oneOf": [{ "type": "null" }, { "$ref": "multica-deployment-receipt.schema.json" }] },
19
- "remoteRead": { "type": "boolean" }, "remoteWrite": { "const": false },
20
- "triggerWrite": { "const": false }, "sideEffect": { "enum": [false, "multica-read"] },
22
+ "remoteRead": { "type": "boolean" }, "remoteWrite": { "type": "boolean" },
23
+ "triggerWrite": { "const": false },
24
+ "sideEffect": { "enum": [false, "multica-read", "multica-read-write"] },
21
25
  "dingtalkSideEffect": { "const": false }
22
26
  }
23
27
  }
@@ -36,6 +36,8 @@
36
36
  "resources": { "$ref": "#/$defs/resources" },
37
37
  "diff": { "type": "array", "items": { "type": "string" } },
38
38
  "failures": { "type": "array", "items": { "type": "string" } },
39
+ "failureDetails": { "$ref": "#/$defs/failureDetails" },
40
+ "envSanitized": { "type": "array", "items": { "type": "string" } },
39
41
  "calls": {
40
42
  "type": "array",
41
43
  "items": {
@@ -60,6 +62,20 @@
60
62
  },
61
63
  "$defs": {
62
64
  "hash": { "type": "string", "pattern": "^[a-f0-9]{64}$" },
65
+ "failureDetails": {
66
+ "type": "array",
67
+ "items": {
68
+ "type": "object",
69
+ "additionalProperties": false,
70
+ "required": ["code"],
71
+ "properties": {
72
+ "code": { "type": "string", "minLength": 1 },
73
+ "expected": { "oneOf": [{ "type": "string" }, { "type": "array", "items": { "type": "string" } }] },
74
+ "actual": { "oneOf": [{ "type": "string" }, { "type": "array", "items": { "type": "string" } }] },
75
+ "hint": { "type": "string" }
76
+ }
77
+ }
78
+ },
63
79
  "resources": {
64
80
  "type": "object",
65
81
  "additionalProperties": false,
@@ -0,0 +1,31 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://github.com/D1-2004/dingtalk-agent/docs/schemas/multica-workspace-run-plan.schema.json",
4
+ "title": "dingtalk-agent Multica Workspace Run Plan",
5
+ "type": "object",
6
+ "additionalProperties": false,
7
+ "required": ["$schema", "workspace", "provider", "profile", "workspaceId", "runtimeId", "agentId", "promptHash", "operations", "blocking", "requiresExecute", "requiresExplicitYes", "remoteRead", "remoteWrite", "triggerWrite", "sideEffect", "dingtalkSideEffect"],
8
+ "properties": {
9
+ "$schema": { "const": "dingtalk-agent/multica-workspace-run-plan@1" },
10
+ "workspace": { "$ref": "#/$defs/name" },
11
+ "provider": { "const": "multica" },
12
+ "profile": { "type": "string", "minLength": 1 },
13
+ "workspaceId": { "type": "string", "minLength": 1 },
14
+ "runtimeId": { "type": "string", "minLength": 1 },
15
+ "agentId": { "type": "string", "minLength": 1 },
16
+ "promptHash": { "$ref": "#/$defs/hash" },
17
+ "operations": { "type": "array", "minItems": 1, "items": { "type": "string", "minLength": 1 } },
18
+ "blocking": { "type": "array", "uniqueItems": true, "items": { "type": "string", "minLength": 1 } },
19
+ "requiresExecute": { "const": true },
20
+ "requiresExplicitYes": { "const": true },
21
+ "remoteRead": { "const": false },
22
+ "remoteWrite": { "const": false },
23
+ "triggerWrite": { "const": false },
24
+ "sideEffect": { "const": false },
25
+ "dingtalkSideEffect": { "const": false }
26
+ },
27
+ "$defs": {
28
+ "name": { "type": "string", "pattern": "^[a-z0-9](?:[a-z0-9._-]{0,62}[a-z0-9])?$" },
29
+ "hash": { "type": "string", "pattern": "^[a-f0-9]{64}$" }
30
+ }
31
+ }