@xdxer/dingtalk-agent 0.1.4-beta.8 → 0.1.4-beta.9

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 (212) hide show
  1. package/CHANGELOG.md +35 -0
  2. package/README.en.md +395 -0
  3. package/README.md +466 -35
  4. package/dist/bin/dingtalk-agent.js +1058 -10
  5. package/dist/bin/dingtalk-agent.js.map +1 -1
  6. package/dist/src/actions.js +98 -14
  7. package/dist/src/actions.js.map +1 -1
  8. package/dist/src/agent-audit.js +460 -0
  9. package/dist/src/agent-audit.js.map +1 -0
  10. package/dist/src/agent-bindings.js +132 -0
  11. package/dist/src/agent-bindings.js.map +1 -0
  12. package/dist/src/agent-definition.js +182 -0
  13. package/dist/src/agent-definition.js.map +1 -0
  14. package/dist/src/agent-enhance.js +678 -0
  15. package/dist/src/agent-enhance.js.map +1 -0
  16. package/dist/src/bootstrap.js +125 -17
  17. package/dist/src/bootstrap.js.map +1 -1
  18. package/dist/src/development-workspace.js +729 -0
  19. package/dist/src/development-workspace.js.map +1 -0
  20. package/dist/src/dws.js +145 -0
  21. package/dist/src/dws.js.map +1 -1
  22. package/dist/src/eval-evidence.js +193 -0
  23. package/dist/src/eval-evidence.js.map +1 -0
  24. package/dist/src/invocation.js +36 -0
  25. package/dist/src/invocation.js.map +1 -0
  26. package/dist/src/lab.js +679 -0
  27. package/dist/src/lab.js.map +1 -0
  28. package/dist/src/lease.js +100 -0
  29. package/dist/src/lease.js.map +1 -0
  30. package/dist/src/memory/candidates.js +451 -0
  31. package/dist/src/memory/candidates.js.map +1 -0
  32. package/dist/src/memory/completion-evidence.js +536 -0
  33. package/dist/src/memory/completion-evidence.js.map +1 -0
  34. package/dist/src/memory/operational.js +263 -0
  35. package/dist/src/memory/operational.js.map +1 -0
  36. package/dist/src/memory/remote-state.js +478 -0
  37. package/dist/src/memory/remote-state.js.map +1 -0
  38. package/dist/src/memory/task-checkpoints.js +204 -0
  39. package/dist/src/memory/task-checkpoints.js.map +1 -0
  40. package/dist/src/multica-deploy.js +1480 -0
  41. package/dist/src/multica-deploy.js.map +1 -0
  42. package/dist/src/multica-provider.js +685 -0
  43. package/dist/src/multica-provider.js.map +1 -0
  44. package/dist/src/opencode-evals.js +1062 -0
  45. package/dist/src/opencode-evals.js.map +1 -0
  46. package/dist/src/opencode-provider.js +531 -0
  47. package/dist/src/opencode-provider.js.map +1 -0
  48. package/dist/src/opencode-workspace.js +197 -0
  49. package/dist/src/opencode-workspace.js.map +1 -0
  50. package/dist/src/perception.js +225 -0
  51. package/dist/src/perception.js.map +1 -0
  52. package/dist/src/personal-event-evals.js +595 -0
  53. package/dist/src/personal-event-evals.js.map +1 -0
  54. package/dist/src/promotion.js +786 -0
  55. package/dist/src/promotion.js.map +1 -0
  56. package/dist/src/remote-semantic-state-live-evals.js +888 -0
  57. package/dist/src/remote-semantic-state-live-evals.js.map +1 -0
  58. package/dist/src/remote-semantic-state-worker.js +38 -0
  59. package/dist/src/remote-semantic-state-worker.js.map +1 -0
  60. package/dist/src/remote-state-evals.js +501 -0
  61. package/dist/src/remote-state-evals.js.map +1 -0
  62. package/dist/src/response-gate.js +51 -0
  63. package/dist/src/response-gate.js.map +1 -0
  64. package/dist/src/robot-evals.js +770 -0
  65. package/dist/src/robot-evals.js.map +1 -0
  66. package/dist/src/sessions.js +66 -105
  67. package/dist/src/sessions.js.map +1 -1
  68. package/dist/src/skill-manager.js +25 -16
  69. package/dist/src/skill-manager.js.map +1 -1
  70. package/dist/src/skills.js.map +1 -1
  71. package/dist/src/storage-evals.js +26 -0
  72. package/dist/src/storage-evals.js.map +1 -0
  73. package/dist/src/types.js.map +1 -1
  74. package/dist/src/waits.js +5 -1
  75. package/dist/src/waits.js.map +1 -1
  76. package/dist/src/workspace.js +28 -3
  77. package/dist/src/workspace.js.map +1 -1
  78. package/docs/INSTALLATION.md +47 -0
  79. package/docs/SECOND-AGENT-ACCEPTANCE.md +62 -0
  80. package/docs/architecture/agent-memory-topology.png +0 -0
  81. package/docs/architecture/agent-memory-topology.svg +132 -0
  82. package/docs/architecture/general-agent-kernel-topology.png +0 -0
  83. package/docs/architecture/general-agent-kernel-topology.svg +149 -0
  84. package/docs/architecture/provider-bound-development-workspace.png +0 -0
  85. package/docs/architecture/provider-bound-development-workspace.svg +141 -0
  86. package/docs/architecture/task-completion-gate.png +0 -0
  87. package/docs/architecture/task-completion-gate.svg +191 -0
  88. package/docs/schemas/agent-audit-load-evidence.schema.json +14 -0
  89. package/docs/schemas/agent-audit.schema.json +92 -0
  90. package/docs/schemas/agent-bindings.schema.json +54 -0
  91. package/docs/schemas/agent-definition.schema.json +78 -0
  92. package/docs/schemas/agent-enhancement-plan.schema.json +88 -0
  93. package/docs/schemas/agent-enhancement-receipt.schema.json +37 -0
  94. package/docs/schemas/enriched-invocation.schema.json +46 -0
  95. package/docs/schemas/eval-candidate-plan.schema.json +28 -0
  96. package/docs/schemas/eval-candidate-result.schema.json +20 -0
  97. package/docs/schemas/eval-candidate.schema.json +30 -0
  98. package/docs/schemas/invocation.schema.json +19 -0
  99. package/docs/schemas/memory-candidate-proposal.schema.json +18 -0
  100. package/docs/schemas/memory-candidate.schema.json +76 -0
  101. package/docs/schemas/memory-publish-target.schema.json +25 -0
  102. package/docs/schemas/multica-deployment-list.schema.json +29 -0
  103. package/docs/schemas/multica-deployment-operation.schema.json +51 -0
  104. package/docs/schemas/multica-deployment-plan.schema.json +70 -0
  105. package/docs/schemas/multica-deployment-receipt.schema.json +87 -0
  106. package/docs/schemas/multica-deployment-status.schema.json +23 -0
  107. package/docs/schemas/multica-workspace-inspection.schema.json +77 -0
  108. package/docs/schemas/multica-workspace-plan.schema.json +68 -0
  109. package/docs/schemas/multica-workspace-resource-list.schema.json +27 -0
  110. package/docs/schemas/multica-workspace-status.schema.json +34 -0
  111. package/docs/schemas/observation.schema.json +21 -0
  112. package/docs/schemas/operational-memory-provider.schema.json +36 -0
  113. package/docs/schemas/operational-memory-record.schema.json +24 -0
  114. package/docs/schemas/perception-input.schema.json +56 -0
  115. package/docs/schemas/project.schema.json +112 -0
  116. package/docs/schemas/promotion-list.schema.json +36 -0
  117. package/docs/schemas/promotion-plan.schema.json +60 -0
  118. package/docs/schemas/promotion-policy.schema.json +29 -0
  119. package/docs/schemas/promotion-receipt.schema.json +43 -0
  120. package/docs/schemas/promotion-status.schema.json +23 -0
  121. package/docs/schemas/release-readiness.schema.json +65 -0
  122. package/docs/schemas/remote-semantic-state-live-eval.schema.json +60 -0
  123. package/docs/schemas/remote-semantic-state-manifest.schema.json +79 -0
  124. package/docs/schemas/remote-semantic-state-provider.schema.json +98 -0
  125. package/docs/schemas/response-gate.schema.json +20 -0
  126. package/docs/schemas/task-checkpoint.schema.json +71 -0
  127. package/docs/schemas/task-completion-evidence.schema.json +154 -0
  128. package/docs/schemas/workspace-doctor.schema.json +56 -0
  129. package/docs/schemas/workspace-state.schema.json +39 -0
  130. package/evals/baselines/2026-07-16/opencode-basic-010-completion-summary.json +123 -0
  131. package/evals/baselines/2026-07-16/opencode-basic-skill-required-summary.json +69 -0
  132. package/evals/baselines/2026-07-16/opencode-multi-surface-summary.json +63 -0
  133. package/evals/baselines/2026-07-16/remote-state-live-summary.json +70 -0
  134. package/evals/baselines/2026-07-17/agent-enhance-opencode-dogfood-summary.json +98 -0
  135. package/evals/baselines/2026-07-17/personal-event-live-readiness-summary.json +68 -0
  136. package/examples/agents/fde-coach/AGENTS.md +26 -0
  137. package/examples/agents/fde-coach/MEMORY.md +3 -0
  138. package/examples/agents/fde-coach/fields/default/field.json +24 -0
  139. package/examples/agents/fde-coach/knowledge/INDEX.md +4 -0
  140. package/examples/agents/fde-coach/skills/fde-coach/SKILL.md +13 -0
  141. package/examples/agents/release-manager/AGENTS.md +26 -0
  142. package/examples/agents/release-manager/MEMORY.md +3 -0
  143. package/examples/agents/release-manager/fields/default/field.json +24 -0
  144. package/examples/agents/release-manager/knowledge/INDEX.md +4 -0
  145. package/examples/agents/release-manager/skills/release-manager/SKILL.md +13 -0
  146. package/lab/README.md +109 -0
  147. package/lab/agent-eval/catalog.json +91 -0
  148. package/lab/agent-eval/classic-failures.json +177 -0
  149. package/lab/agent-eval/completion-gate-regression.json +99 -0
  150. package/lab/agent-eval/personal-event-live.example.json +94 -0
  151. package/lab/agent-eval/remote-semantic-state-live.example.json +70 -0
  152. package/lab/agent-eval/remote-semantic-state-provider.fixture.json +47 -0
  153. package/lab/agent-eval/remote-state-workspace/AGENTS.md +8 -0
  154. package/lab/agent-eval/remote-state-workspace/opencode.json +7 -0
  155. package/lab/agent-eval/remote-state-workspace/skills/remote-state-operator/SKILL.md +13 -0
  156. package/lab/agent-eval/remote-state.example.json +31 -0
  157. package/lab/agent-eval/workspace/AGENTS.md +7 -0
  158. package/lab/agent-eval/workspace/MEMORY.md +4 -0
  159. package/lab/agent-eval/workspace/artifacts/pending-review.md +3 -0
  160. package/lab/agent-eval/workspace/knowledge/INDEX.md +4 -0
  161. package/lab/agent-eval/workspace/opencode.json +20 -0
  162. package/lab/manifest.example.json +27 -0
  163. package/lab/manifest.personal-event.example.json +27 -0
  164. package/lab/project-workspace/README.md +11 -0
  165. package/lab/project-workspace/fake-multica-provider.mjs +266 -0
  166. package/lab/project-workspace/multica-deploy.fixture.json +29 -0
  167. package/lab/project-workspace/multica-readonly.fixture.json +69 -0
  168. package/lab/project-workspace/observation.fixture.json +14 -0
  169. package/lab/project-workspace/opencode-provider-suite.json +65 -0
  170. package/lab/project-workspace/project.fixture.json +44 -0
  171. package/lab/project-workspace/promotion-policy.fixture.json +15 -0
  172. package/lab/robot-eval/pool.example.json +30 -0
  173. package/lab/robot-eval/suite.json +123 -0
  174. package/lab/robot-eval/workspace/AGENTS.md +21 -0
  175. package/lab/robot-eval/workspace/MEMORY.md +3 -0
  176. package/lab/robot-eval/workspace/knowledge/INDEX.md +5 -0
  177. package/lab/robot-eval/workspace/opencode.json +22 -0
  178. package/lab/schemas/agent-eval-catalog.schema.json +47 -0
  179. package/lab/schemas/lab-manifest.schema.json +70 -0
  180. package/lab/schemas/personal-event-eval.schema.json +91 -0
  181. package/lab/schemas/remote-state-eval.schema.json +66 -0
  182. package/lab/schemas/robot-eval-suite.schema.json +184 -0
  183. package/lab/schemas/robot-pool.schema.json +56 -0
  184. package/package.json +21 -3
  185. package/skills/dingtalk-agent-boot-multica/SKILL.md +40 -0
  186. package/skills/dingtalk-agent-compose/SKILL.md +110 -0
  187. package/skills/dingtalk-agent-compose/assets/AGENTS.template.md +26 -0
  188. package/skills/dingtalk-agent-compose/assets/agent.bindings.dingtalk-doc.template.json +13 -0
  189. package/skills/dingtalk-agent-compose/assets/agent.bindings.local.template.json +13 -0
  190. package/skills/dingtalk-agent-compose/assets/opencode.template.json +12 -0
  191. package/skills/dingtalk-agent-compose/assets/role-skill.template.md +24 -0
  192. package/skills/dingtalk-agent-compose/evals/evals.json +94 -0
  193. package/skills/dingtalk-agent-compose/references/agent-definition-contract.md +55 -0
  194. package/skills/dingtalk-agent-compose/references/opencode-host-contract.md +65 -0
  195. package/skills/dingtalk-agent-compose/references/storage-routing.md +20 -0
  196. package/skills/dingtalk-agent-deploy/SKILL.md +60 -0
  197. package/skills/dingtalk-agent-deploy/references/multica-deployment-contract.md +49 -0
  198. package/skills/dingtalk-agent-deploy/references/promotion-observation-contract.md +49 -0
  199. package/skills/dingtalk-agent-eval/SKILL.md +116 -0
  200. package/skills/dingtalk-agent-eval/assets/eval-catalog.template.json +18 -0
  201. package/skills/dingtalk-agent-eval/evals/evals.json +61 -0
  202. package/skills/dingtalk-agent-eval/references/eval-topology.md +34 -0
  203. package/skills/dingtalk-agent-eval/references/evidence-contract.md +31 -0
  204. package/skills/dingtalk-agent-eval/references/scenario-taxonomy.md +25 -0
  205. package/skills/dingtalk-agent-eval/references/storage-modes.md +75 -0
  206. package/skills/dingtalk-basic-behavior/SKILL.md +63 -3
  207. package/skills/dingtalk-basic-behavior/assets/memory-candidate-proposal.json +10 -0
  208. package/skills/dingtalk-basic-behavior/assets/{task-checkpoint.md → task-checkpoint.json} +2 -21
  209. package/skills/dingtalk-basic-behavior/references/action-contract.md +2 -0
  210. package/skills/dingtalk-basic-behavior/references/memory-and-evolution.md +15 -1
  211. package/skills/dingtalk-basic-behavior/references/perception-and-gates.md +28 -0
  212. package/skills/dingtalk-basic-behavior/references/task-lifecycle.md +32 -7
@@ -0,0 +1,191 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 840" role="img" aria-labelledby="title desc">
2
+ <title id="title">数字员工任务闭环与完成闸门</title>
3
+ <desc id="desc">展示任务从可信上下文、理解、条件澄清、计划、执行、验证到完成闸门的流程,以及运行时状态约束和四类证据。</desc>
4
+ <defs>
5
+ <style>
6
+ text { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif; fill: #0f172a; }
7
+ .title { font-size: 28px; font-weight: 750; }
8
+ .subtitle { font-size: 14px; fill: #475569; }
9
+ .section { font-size: 13px; font-weight: 700; letter-spacing: .8px; fill: #475569; }
10
+ .node-title { font-size: 15px; font-weight: 750; }
11
+ .node-sub { font-size: 12px; fill: #475569; }
12
+ .small { font-size: 11px; fill: #64748b; }
13
+ .label { font-size: 12px; font-weight: 650; }
14
+ </style>
15
+ <filter id="shadow" x="-20%" y="-20%" width="140%" height="140%">
16
+ <feDropShadow dx="0" dy="3" stdDeviation="5" flood-color="#0f172a" flood-opacity="0.10"/>
17
+ </filter>
18
+ <marker id="arrow-blue" markerWidth="10" markerHeight="8" refX="9" refY="4" orient="auto">
19
+ <path d="M0,0 L10,4 L0,8 Z" fill="#2563eb"/>
20
+ </marker>
21
+ <marker id="arrow-orange" markerWidth="10" markerHeight="8" refX="9" refY="4" orient="auto">
22
+ <path d="M0,0 L10,4 L0,8 Z" fill="#ea580c"/>
23
+ </marker>
24
+ <marker id="arrow-green" markerWidth="10" markerHeight="8" refX="9" refY="4" orient="auto">
25
+ <path d="M0,0 L10,4 L0,8 Z" fill="#059669"/>
26
+ </marker>
27
+ <marker id="arrow-stop" markerWidth="10" markerHeight="8" refX="9" refY="4" orient="auto">
28
+ <path d="M0,0 L10,4 L0,8 Z" fill="#dc2626"/>
29
+ </marker>
30
+ </defs>
31
+
32
+ <rect width="1200" height="840" fill="#f8fafc"/>
33
+ <text x="54" y="48" class="title">数字员工任务闭环与完成闸门</text>
34
+ <text x="54" y="76" class="subtitle">澄清是条件分支;完成是证据结论。Skill 引导语义判断,CLI 固定状态边界,DWS / 文件系统提供可回读事实。</text>
35
+
36
+ <rect x="50" y="104" width="1100" height="106" rx="18" fill="#ffffff" stroke="#cbd5e1" stroke-width="1.5" stroke-dasharray="7 5"/>
37
+ <text x="72" y="130" class="section">可信现场 · TRUSTED CONTEXT</text>
38
+
39
+ <rect x="72" y="146" width="304" height="46" rx="12" fill="#eff6ff" stroke="#93c5fd"/>
40
+ <circle cx="98" cy="169" r="10" fill="#2563eb"/>
41
+ <path d="M93 169 l4 4 l7 -8" fill="none" stroke="#ffffff" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
42
+ <text x="118" y="166" class="node-title">Origin + Continuation</text>
43
+ <text x="118" y="182" class="small">当前消息、线程与明确续接</text>
44
+
45
+ <rect x="448" y="146" width="304" height="46" rx="12" fill="#fff7ed" stroke="#fdba74"/>
46
+ <path d="M470 160 h18 v18 h-18 z M474 156 h10 v5 h-10 z" fill="none" stroke="#ea580c" stroke-width="1.8"/>
47
+ <text x="502" y="166" class="node-title">Definition + Authority</text>
48
+ <text x="502" y="182" class="small">身份、职责、作用域与权限</text>
49
+
50
+ <rect x="824" y="146" width="304" height="46" rx="12" fill="#f0fdf4" stroke="#86efac"/>
51
+ <path d="M848 158 h17 l6 6 v14 h-23 z M865 158 v7 h7" fill="none" stroke="#059669" stroke-width="1.8" stroke-linejoin="round"/>
52
+ <text x="884" y="166" class="node-title">Workspace + Role Skills</text>
53
+ <text x="884" y="182" class="small">附件、知识、已有 checkpoint</text>
54
+
55
+ <path d="M600 210 V236" fill="none" stroke="#ea580c" stroke-width="2" marker-end="url(#arrow-orange)"/>
56
+
57
+ <text x="50" y="251" class="section">员工任务主流程 · EMPLOYEE LOOP</text>
58
+
59
+ <rect x="50" y="272" width="146" height="78" rx="16" fill="#ffffff" stroke="#60a5fa" stroke-width="2" filter="url(#shadow)"/>
60
+ <circle cx="78" cy="298" r="13" fill="#dbeafe"/>
61
+ <path d="M72 298 h12 M78 292 v12" stroke="#2563eb" stroke-width="2" stroke-linecap="round"/>
62
+ <text x="101" y="299" class="node-title">UNDERSTAND</text>
63
+ <text x="73" y="326" class="node-sub">形成内部任务合同</text>
64
+ <text x="73" y="342" class="small">goal · deliverable · doneWhen</text>
65
+
66
+ <path d="M196 311 H228" fill="none" stroke="#2563eb" stroke-width="2.2" marker-end="url(#arrow-blue)"/>
67
+
68
+ <path d="M300 268 L370 311 L300 354 L230 311 Z" fill="#fff7ed" stroke="#fb923c" stroke-width="2" filter="url(#shadow)"/>
69
+ <text x="300" y="306" text-anchor="middle" class="node-title">存在阻塞缺口?</text>
70
+ <text x="300" y="326" text-anchor="middle" class="small">会改变结果 / 权限 / 副作用</text>
71
+
72
+ <path d="M370 311 H406" fill="none" stroke="#2563eb" stroke-width="2.2" marker-end="url(#arrow-blue)"/>
73
+ <rect x="374" y="288" width="28" height="18" rx="5" fill="#f8fafc" opacity="0.96"/>
74
+ <text x="388" y="301" text-anchor="middle" class="label" fill="#2563eb">否</text>
75
+
76
+ <rect x="406" y="272" width="132" height="78" rx="16" fill="#ffffff" stroke="#60a5fa" stroke-width="2"/>
77
+ <text x="472" y="301" text-anchor="middle" class="node-title">PLAN</text>
78
+ <text x="472" y="324" text-anchor="middle" class="node-sub">2–5 个检查点</text>
79
+ <text x="472" y="341" text-anchor="middle" class="small">单步任务可省略</text>
80
+
81
+ <path d="M538 311 H570" fill="none" stroke="#2563eb" stroke-width="2.2" marker-end="url(#arrow-blue)"/>
82
+
83
+ <rect x="570" y="272" width="132" height="78" rx="16" fill="#ffffff" stroke="#60a5fa" stroke-width="2"/>
84
+ <text x="636" y="301" text-anchor="middle" class="node-title">EXECUTE</text>
85
+ <text x="636" y="324" text-anchor="middle" class="node-sub">最小充分动作</text>
86
+ <text x="636" y="341" text-anchor="middle" class="small">副作用前重核对象</text>
87
+
88
+ <path d="M702 311 H734" fill="none" stroke="#2563eb" stroke-width="2.2" marker-end="url(#arrow-blue)"/>
89
+
90
+ <rect x="734" y="272" width="132" height="78" rx="16" fill="#ffffff" stroke="#34d399" stroke-width="2"/>
91
+ <text x="800" y="301" text-anchor="middle" class="node-title">VERIFY</text>
92
+ <text x="800" y="324" text-anchor="middle" class="node-sub">检查真实状态</text>
93
+ <text x="800" y="341" text-anchor="middle" class="small">生成 ≠ 保存 ≠ 送达</text>
94
+
95
+ <path d="M866 311 H898" fill="none" stroke="#2563eb" stroke-width="2.2" marker-end="url(#arrow-blue)"/>
96
+
97
+ <rect x="898" y="252" width="252" height="118" rx="18" fill="#fffbeb" stroke="#f59e0b" stroke-width="2.5" filter="url(#shadow)"/>
98
+ <rect x="918" y="270" width="52" height="24" rx="12" fill="#f59e0b"/>
99
+ <text x="944" y="287" text-anchor="middle" font-size="11" font-weight="750" fill="#ffffff">CLI GATE</text>
100
+ <text x="1024" y="289" class="node-title">COMPLETION GATE</text>
101
+ <text x="920" y="316" class="small">① status = verifying</text>
102
+ <text x="1038" y="316" class="small">② doneWhen 有证据</text>
103
+ <text x="920" y="337" class="small">③ waitingFor = null</text>
104
+ <text x="1038" y="337" class="small">④ nextAction 为空</text>
105
+ <text x="920" y="356" class="small">回复正文不能证明自己的完成声明</text>
106
+
107
+ <path d="M1024 370 V412" fill="none" stroke="#2563eb" stroke-width="2.4" marker-end="url(#arrow-blue)"/>
108
+ <rect x="1032" y="383" width="58" height="20" rx="6" fill="#f8fafc" opacity="0.96"/>
109
+ <text x="1061" y="398" text-anchor="middle" class="label" fill="#2563eb">全部通过</text>
110
+
111
+ <rect x="940" y="414" width="168" height="70" rx="18" fill="#ecfdf5" stroke="#10b981" stroke-width="2.5" filter="url(#shadow)"/>
112
+ <circle cx="972" cy="443" r="14" fill="#10b981"/>
113
+ <path d="M965 443 l5 5 l9 -11" fill="none" stroke="#ffffff" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"/>
114
+ <text x="1041" y="442" text-anchor="middle" class="node-title">COMPLETE</text>
115
+ <text x="1024" y="466" text-anchor="middle" class="node-sub">结果 · 证据 · 遗留 · owner</text>
116
+
117
+ <path d="M300 354 V396 H196" fill="none" stroke="#ea580c" stroke-width="2" marker-end="url(#arrow-orange)"/>
118
+ <rect x="306" y="366" width="28" height="18" rx="5" fill="#f8fafc" opacity="0.96"/>
119
+ <text x="320" y="379" text-anchor="middle" class="label" fill="#ea580c">是</text>
120
+
121
+ <rect x="50" y="396" width="146" height="72" rx="16" fill="#fff7ed" stroke="#fb923c" stroke-width="2"/>
122
+ <text x="123" y="425" text-anchor="middle" class="node-title">CLARIFY</text>
123
+ <text x="123" y="447" text-anchor="middle" class="node-sub">只问一个阻塞问题</text>
124
+ <text x="123" y="462" text-anchor="middle" class="small">信息足够时不出现</text>
125
+
126
+ <path d="M196 432 H230" fill="none" stroke="#ea580c" stroke-width="2" marker-end="url(#arrow-orange)"/>
127
+ <rect x="230" y="396" width="146" height="72" rx="16" fill="#fff7ed" stroke="#fb923c" stroke-width="2"/>
128
+ <text x="303" y="425" text-anchor="middle" class="node-title">WAIT</text>
129
+ <text x="303" y="447" text-anchor="middle" class="node-sub">记录恢复条件</text>
130
+ <text x="303" y="462" text-anchor="middle" class="small">释放沙箱,不轮询</text>
131
+
132
+ <path d="M303 468 V516 H78 V350" fill="none" stroke="#7c3aed" stroke-width="1.8" marker-end="url(#arrow-blue)"/>
133
+ <rect x="154" y="505" width="98" height="20" rx="6" fill="#f8fafc" opacity="0.96"/>
134
+ <text x="203" y="519" text-anchor="middle" class="small" fill="#7c3aed">新事件恢复原 Session</text>
135
+
136
+ <path d="M898 338 H884 V448 H836" fill="none" stroke="#dc2626" stroke-width="2" marker-end="url(#arrow-stop)"/>
137
+ <rect x="846" y="424" width="26" height="18" rx="5" fill="#f8fafc" opacity="0.96"/>
138
+ <text x="859" y="437" text-anchor="middle" class="label" fill="#dc2626">失败</text>
139
+ <rect x="646" y="414" width="190" height="70" rx="16" fill="#fef2f2" stroke="#f87171" stroke-width="2"/>
140
+ <text x="741" y="441" text-anchor="middle" class="node-title">返工 / 等待 / 阻塞</text>
141
+ <text x="741" y="463" text-anchor="middle" class="node-sub">准确报告,不说“已完成”</text>
142
+ <path d="M646 449 H620 V350" fill="none" stroke="#dc2626" stroke-width="1.8" marker-end="url(#arrow-stop)"/>
143
+
144
+ <rect x="50" y="550" width="1100" height="222" rx="20" fill="#ffffff" stroke="#bbf7d0" stroke-width="1.5" stroke-dasharray="7 5"/>
145
+ <text x="72" y="579" class="section">证据平面 · EVIDENCE PLANE</text>
146
+ <text x="72" y="600" class="small">每条 doneWhen 绑定至少一种可定位事实;质量分不能覆盖缺失证据。</text>
147
+
148
+ <rect x="72" y="624" width="230" height="104" rx="16" fill="#f0fdf4" stroke="#86efac"/>
149
+ <path d="M94 643 h24 l7 7 v24 h-31 z M118 643 v8 h8" fill="none" stroke="#059669" stroke-width="2" stroke-linejoin="round"/>
150
+ <text x="140" y="654" class="node-title">文件系统</text>
151
+ <text x="94" y="684" class="node-sub">路径存在 · 内容匹配</text>
152
+ <text x="94" y="705" class="node-sub">大小 / sha256 可核验</text>
153
+
154
+ <rect x="328" y="624" width="230" height="104" rx="16" fill="#f0fdf4" stroke="#86efac"/>
155
+ <rect x="350" y="643" width="32" height="25" rx="3" fill="none" stroke="#059669" stroke-width="2"/>
156
+ <path d="M350 651 h32 M357 647 h2 M363 647 h2" stroke="#059669" stroke-width="1.5" stroke-linecap="round"/>
157
+ <text x="396" y="654" class="node-title">Workspace / Artifact</text>
158
+ <text x="350" y="684" class="node-sub">Definition / manifest 有效</text>
159
+ <text x="350" y="705" class="node-sub">声明产物逐项存在</text>
160
+
161
+ <rect x="584" y="624" width="230" height="104" rx="16" fill="#f0fdf4" stroke="#86efac"/>
162
+ <circle cx="610" cy="656" r="14" fill="none" stroke="#059669" stroke-width="2"/>
163
+ <path d="M603 656 l5 5 l10 -12" fill="none" stroke="#059669" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
164
+ <text x="636" y="654" class="node-title">Receipt + Readback</text>
165
+ <text x="606" y="684" class="node-sub">Intent / Attempt / Verification</text>
166
+ <text x="606" y="705" class="node-sub">平台独立回读可见</text>
167
+
168
+ <rect x="840" y="624" width="230" height="104" rx="16" fill="#f0fdf4" stroke="#86efac"/>
169
+ <circle cx="866" cy="652" r="9" fill="none" stroke="#059669" stroke-width="2"/>
170
+ <path d="M850 672 c2 -11 30 -11 32 0" fill="none" stroke="#059669" stroke-width="2" stroke-linecap="round"/>
171
+ <text x="896" y="654" class="node-title">人工确认 / 审批</text>
172
+ <text x="862" y="684" class="node-sub">明确接受或业务状态变更</text>
173
+ <text x="862" y="705" class="node-sub">未确认时保持 verifying</text>
174
+
175
+ <path d="M187 624 V606 H1168 V325 H1150" fill="none" stroke="#059669" stroke-width="1.8" marker-end="url(#arrow-green)"/>
176
+ <path d="M443 624 V606" fill="none" stroke="#059669" stroke-width="1.8"/>
177
+ <path d="M699 624 V606" fill="none" stroke="#059669" stroke-width="1.8"/>
178
+ <path d="M955 624 V606" fill="none" stroke="#059669" stroke-width="1.8"/>
179
+ <rect x="1006" y="590" width="82" height="20" rx="6" fill="#ffffff" opacity="0.96"/>
180
+ <text x="1047" y="604" text-anchor="middle" class="small" fill="#059669">证据汇入 Gate</text>
181
+
182
+ <line x1="72" y1="805" x2="106" y2="805" stroke="#2563eb" stroke-width="2.2" marker-end="url(#arrow-blue)"/>
183
+ <text x="116" y="809" class="small">主流程</text>
184
+ <line x1="198" y1="805" x2="232" y2="805" stroke="#ea580c" stroke-width="2" marker-end="url(#arrow-orange)"/>
185
+ <text x="242" y="809" class="small">条件 / 控制</text>
186
+ <line x1="354" y1="805" x2="388" y2="805" stroke="#059669" stroke-width="2" marker-end="url(#arrow-green)"/>
187
+ <text x="398" y="809" class="small">独立证据</text>
188
+ <line x1="500" y1="805" x2="534" y2="805" stroke="#dc2626" stroke-width="2" marker-end="url(#arrow-stop)"/>
189
+ <text x="544" y="809" class="small">闸门失败 / 返回</text>
190
+ <text x="1128" y="809" text-anchor="end" class="small">Skill 劝 · CLI 拦 · DWS 做</text>
191
+ </svg>
@@ -0,0 +1,14 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://github.com/D1-2004/dingtalk-agent/docs/schemas/agent-audit-load-evidence.schema.json",
4
+ "title": "dingtalk-agent Agent Audit Load Evidence",
5
+ "type": "object",
6
+ "additionalProperties": false,
7
+ "required": ["$schema", "targetHash", "reportPath", "reportHash"],
8
+ "properties": {
9
+ "$schema": { "const": "dingtalk-agent/agent-audit-load-evidence@1" },
10
+ "targetHash": { "type": "string", "pattern": "^[a-f0-9]{64}$" },
11
+ "reportPath": { "type": "string", "minLength": 1 },
12
+ "reportHash": { "type": "string", "pattern": "^[a-f0-9]{64}$" }
13
+ }
14
+ }
@@ -0,0 +1,92 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://github.com/D1-2004/dingtalk-agent/docs/schemas/agent-audit.schema.json",
4
+ "title": "dingtalk-agent Agent Audit Report",
5
+ "type": "object",
6
+ "additionalProperties": false,
7
+ "required": [
8
+ "$schema", "status", "ready", "sideEffect", "dingtalkSideEffect", "root",
9
+ "bindings", "definition", "storageMode", "requiredSkills", "checks", "missing",
10
+ "repairs", "verification"
11
+ ],
12
+ "properties": {
13
+ "$schema": { "const": "dingtalk-agent/agent-audit@1" },
14
+ "status": { "enum": ["ready", "partial"] },
15
+ "ready": { "type": "boolean" },
16
+ "sideEffect": { "enum": [false, "local-opencode-eval"] },
17
+ "dingtalkSideEffect": { "const": false },
18
+ "root": { "type": "string", "minLength": 1 },
19
+ "bindings": {
20
+ "oneOf": [
21
+ { "type": "null" },
22
+ {
23
+ "type": "object",
24
+ "additionalProperties": false,
25
+ "required": ["path", "hash"],
26
+ "properties": {
27
+ "path": { "type": "string" },
28
+ "hash": { "type": "string", "pattern": "^[a-f0-9]{64}$" }
29
+ }
30
+ }
31
+ ]
32
+ },
33
+ "definition": { "type": "object" },
34
+ "storageMode": { "enum": ["local", "remote", "mixed"] },
35
+ "requiredSkills": {
36
+ "type": "array",
37
+ "uniqueItems": true,
38
+ "items": { "type": "string", "minLength": 1 }
39
+ },
40
+ "checks": {
41
+ "type": "array",
42
+ "items": {
43
+ "type": "object",
44
+ "additionalProperties": false,
45
+ "required": ["id", "surface", "level", "blocking", "summary", "evidence"],
46
+ "properties": {
47
+ "id": { "type": "string", "minLength": 1 },
48
+ "surface": { "enum": ["definition", "skills", "storage", "authority", "host", "load"] },
49
+ "level": { "enum": ["pass", "warn", "fail"] },
50
+ "blocking": { "type": "boolean" },
51
+ "summary": { "type": "string", "minLength": 1 },
52
+ "evidence": { "type": "object" }
53
+ }
54
+ }
55
+ },
56
+ "missing": {
57
+ "type": "array",
58
+ "uniqueItems": true,
59
+ "items": { "type": "string", "minLength": 1 }
60
+ },
61
+ "repairs": {
62
+ "type": "array",
63
+ "items": {
64
+ "type": "object",
65
+ "additionalProperties": false,
66
+ "required": ["id", "why", "actions"],
67
+ "properties": {
68
+ "id": { "type": "string", "minLength": 1 },
69
+ "why": { "type": "string", "minLength": 1 },
70
+ "actions": {
71
+ "type": "array",
72
+ "minItems": 1,
73
+ "items": { "type": "string", "minLength": 1 }
74
+ }
75
+ }
76
+ }
77
+ },
78
+ "verification": {
79
+ "type": "object",
80
+ "additionalProperties": false,
81
+ "required": ["loadReport", "remoteReport", "commands"],
82
+ "properties": {
83
+ "loadReport": { "type": "string" },
84
+ "remoteReport": { "type": "string" },
85
+ "commands": {
86
+ "type": "array",
87
+ "items": { "type": "string", "minLength": 1 }
88
+ }
89
+ }
90
+ }
91
+ }
92
+ }
@@ -0,0 +1,54 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://github.com/D1-2004/dingtalk-agent/docs/schemas/agent-bindings.schema.json",
4
+ "title": "dingtalk-agent Agent Bindings",
5
+ "type": "object",
6
+ "additionalProperties": false,
7
+ "required": [
8
+ "$schema",
9
+ "agent",
10
+ "skills",
11
+ "memory",
12
+ "knowledge",
13
+ "artifacts",
14
+ "stateDir",
15
+ "authority"
16
+ ],
17
+ "properties": {
18
+ "$schema": { "const": "dingtalk-agent/agent-bindings@1" },
19
+ "agent": {
20
+ "type": "string",
21
+ "pattern": "^local-dir:.+$"
22
+ },
23
+ "skills": {
24
+ "type": "string",
25
+ "pattern": "^(local-dir|local-md):.+$"
26
+ },
27
+ "memory": {
28
+ "type": "string",
29
+ "pattern": "^(local-md|dingtalk-doc):.+$"
30
+ },
31
+ "knowledge": {
32
+ "type": "string",
33
+ "pattern": "^(local-md|dingtalk-doc):.+$"
34
+ },
35
+ "artifacts": {
36
+ "type": "string",
37
+ "pattern": "^local-dir:.+$"
38
+ },
39
+ "stateDir": {
40
+ "type": "string",
41
+ "minLength": 1,
42
+ "not": { "pattern": "^[A-Za-z][A-Za-z0-9-]*:" }
43
+ },
44
+ "authority": {
45
+ "type": "object",
46
+ "additionalProperties": false,
47
+ "required": ["profile", "expectedUserId"],
48
+ "properties": {
49
+ "profile": { "type": "string" },
50
+ "expectedUserId": { "type": "string" }
51
+ }
52
+ }
53
+ }
54
+ }
@@ -0,0 +1,78 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://dingtalk-agent.dev/schemas/agent-definition.schema.json",
4
+ "title": "dingtalk-agent AgentDefinition",
5
+ "type": "object",
6
+ "additionalProperties": false,
7
+ "required": ["$schema", "id", "source", "body", "skills", "storage", "authority", "configuration", "status", "missing", "hash"],
8
+ "properties": {
9
+ "$schema": { "const": "dingtalk-agent/agent-definition@1" },
10
+ "id": { "type": "string", "minLength": 1 },
11
+ "source": {
12
+ "type": "object",
13
+ "additionalProperties": false,
14
+ "required": ["kind", "uri", "revision"],
15
+ "properties": {
16
+ "kind": { "enum": ["local-folder", "git-checkout", "dingtalk-doc", "workspace"] },
17
+ "uri": { "type": "string", "minLength": 1 },
18
+ "revision": { "type": "string" }
19
+ }
20
+ },
21
+ "body": {
22
+ "oneOf": [
23
+ { "type": "null" },
24
+ {
25
+ "type": "object",
26
+ "additionalProperties": false,
27
+ "required": ["path", "hash"],
28
+ "properties": {
29
+ "path": { "type": "string", "minLength": 1 },
30
+ "hash": { "type": "string", "minLength": 1 }
31
+ }
32
+ }
33
+ ]
34
+ },
35
+ "skills": {
36
+ "type": "array",
37
+ "items": {
38
+ "type": "object",
39
+ "additionalProperties": false,
40
+ "required": ["name", "version", "source", "path", "hash"],
41
+ "properties": {
42
+ "name": { "type": "string", "minLength": 1 },
43
+ "version": { "type": "string" },
44
+ "source": { "type": "string" },
45
+ "path": { "type": "string" },
46
+ "hash": { "type": "string" }
47
+ }
48
+ }
49
+ },
50
+ "storage": {
51
+ "type": "object",
52
+ "additionalProperties": false,
53
+ "required": ["memory", "knowledge", "artifacts", "state"],
54
+ "properties": {
55
+ "memory": { "type": "string" },
56
+ "knowledge": { "type": "string" },
57
+ "artifacts": { "type": "string" },
58
+ "state": { "type": "string" }
59
+ }
60
+ },
61
+ "authority": {
62
+ "type": "object",
63
+ "additionalProperties": false,
64
+ "required": ["dwsProfile", "expectedUserId"],
65
+ "properties": {
66
+ "dwsProfile": { "type": "string" },
67
+ "expectedUserId": { "type": "string" }
68
+ }
69
+ },
70
+ "configuration": {
71
+ "type": "object",
72
+ "additionalProperties": { "enum": ["explicit", "context", "environment", "workspace", "convention"] }
73
+ },
74
+ "status": { "enum": ["ready", "partial"] },
75
+ "missing": { "type": "array", "items": { "type": "string" } },
76
+ "hash": { "type": "string", "minLength": 1 }
77
+ }
78
+ }
@@ -0,0 +1,88 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://github.com/D1-2004/dingtalk-agent/docs/schemas/agent-enhancement-plan.schema.json",
4
+ "title": "dingtalk-agent Agent Enhancement Plan",
5
+ "type": "object",
6
+ "additionalProperties": false,
7
+ "required": [
8
+ "$schema", "planId", "ready", "status", "sideEffect", "dingtalkSideEffect",
9
+ "triggerSideEffect", "root", "source", "projectName", "roleSkills", "bindings",
10
+ "baselineHash", "desiredHash", "operations", "blockers", "warnings",
11
+ "semanticReview", "apply", "verification"
12
+ ],
13
+ "properties": {
14
+ "$schema": { "const": "dingtalk-agent/agent-enhancement-plan@1" },
15
+ "planId": { "type": "string", "pattern": "^aep_[a-f0-9]{32}$" },
16
+ "ready": { "type": "boolean" },
17
+ "status": { "enum": ["ready", "blocked"] },
18
+ "sideEffect": { "const": false },
19
+ "dingtalkSideEffect": { "const": false },
20
+ "triggerSideEffect": { "const": false },
21
+ "root": { "type": "string", "minLength": 1 },
22
+ "source": {
23
+ "type": "object",
24
+ "additionalProperties": false,
25
+ "required": ["kind", "revision"],
26
+ "properties": {
27
+ "kind": { "enum": ["git-checkout", "local-folder"] },
28
+ "revision": { "type": "string" }
29
+ }
30
+ },
31
+ "projectName": { "type": "string" },
32
+ "roleSkills": {
33
+ "type": "array", "uniqueItems": true,
34
+ "items": { "type": "string", "minLength": 1 }
35
+ },
36
+ "bindings": { "type": "string", "minLength": 1 },
37
+ "baselineHash": { "$ref": "#/$defs/hash" },
38
+ "desiredHash": { "$ref": "#/$defs/hash" },
39
+ "operations": {
40
+ "type": "array",
41
+ "items": { "$ref": "#/$defs/operation" }
42
+ },
43
+ "blockers": { "type": "array", "uniqueItems": true, "items": { "type": "string", "minLength": 1 } },
44
+ "warnings": { "type": "array", "uniqueItems": true, "items": { "type": "string", "minLength": 1 } },
45
+ "semanticReview": {
46
+ "type": "object", "additionalProperties": false,
47
+ "required": ["required", "files", "why"],
48
+ "properties": {
49
+ "required": { "type": "boolean" },
50
+ "files": { "type": "array", "uniqueItems": true, "items": { "type": "string", "minLength": 1 } },
51
+ "why": { "type": "string", "minLength": 1 }
52
+ }
53
+ },
54
+ "apply": {
55
+ "type": "object", "additionalProperties": false,
56
+ "required": ["command", "requiresCurrentPlanId"],
57
+ "properties": {
58
+ "command": { "type": "string", "minLength": 1 },
59
+ "requiresCurrentPlanId": { "const": true }
60
+ }
61
+ },
62
+ "verification": {
63
+ "type": "object", "additionalProperties": false,
64
+ "required": ["commands"],
65
+ "properties": {
66
+ "commands": { "type": "array", "minItems": 1, "items": { "type": "string", "minLength": 1 } }
67
+ }
68
+ }
69
+ },
70
+ "$defs": {
71
+ "name": { "type": "string", "pattern": "^[a-z0-9](?:[a-z0-9._-]{0,62}[a-z0-9])?$" },
72
+ "hash": { "type": "string", "pattern": "^[a-f0-9]{64}$" },
73
+ "hashOrEmpty": { "type": "string", "pattern": "^(?:[a-f0-9]{64})?$" },
74
+ "operation": {
75
+ "type": "object", "additionalProperties": false,
76
+ "required": ["id", "kind", "path", "beforeHash", "afterHash", "backupRequired", "reason"],
77
+ "properties": {
78
+ "id": { "type": "string", "minLength": 1 },
79
+ "kind": { "enum": ["create-file", "update-file", "create-directory", "replace-directory", "preserve"] },
80
+ "path": { "type": "string", "minLength": 1 },
81
+ "beforeHash": { "$ref": "#/$defs/hashOrEmpty" },
82
+ "afterHash": { "$ref": "#/$defs/hash" },
83
+ "backupRequired": { "type": "boolean" },
84
+ "reason": { "type": "string", "minLength": 1 }
85
+ }
86
+ }
87
+ }
88
+ }
@@ -0,0 +1,37 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://github.com/D1-2004/dingtalk-agent/docs/schemas/agent-enhancement-receipt.schema.json",
4
+ "title": "dingtalk-agent Agent Enhancement Receipt",
5
+ "type": "object",
6
+ "additionalProperties": false,
7
+ "required": [
8
+ "$schema", "status", "operationId", "planId", "sideEffect", "dingtalkSideEffect",
9
+ "triggerSideEffect", "root", "backupRoot", "idempotent", "changes", "audit"
10
+ ],
11
+ "properties": {
12
+ "$schema": { "const": "dingtalk-agent/agent-enhancement-receipt@1" },
13
+ "status": { "const": "applied" },
14
+ "operationId": { "type": "string", "pattern": "^agent_enhance_[0-9]+_[a-f0-9]{8}$" },
15
+ "planId": { "type": "string", "pattern": "^aep_[a-f0-9]{32}$" },
16
+ "sideEffect": { "const": "local-files-only" },
17
+ "dingtalkSideEffect": { "const": false },
18
+ "triggerSideEffect": { "const": false },
19
+ "root": { "type": "string", "minLength": 1 },
20
+ "backupRoot": { "type": "string" },
21
+ "idempotent": { "type": "boolean" },
22
+ "changes": {
23
+ "type": "array",
24
+ "items": { "$ref": "agent-enhancement-plan.schema.json#/$defs/operation" }
25
+ },
26
+ "audit": {
27
+ "type": "object", "additionalProperties": false,
28
+ "required": ["status", "ready", "missing", "commands"],
29
+ "properties": {
30
+ "status": { "enum": ["ready", "partial"] },
31
+ "ready": { "type": "boolean" },
32
+ "missing": { "type": "array", "uniqueItems": true, "items": { "type": "string", "minLength": 1 } },
33
+ "commands": { "type": "array", "items": { "type": "string", "minLength": 1 } }
34
+ }
35
+ }
36
+ }
37
+ }
@@ -0,0 +1,46 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://dingtalk-agent.dev/schemas/enriched-invocation.schema.json",
4
+ "title": "EnrichedInvocation",
5
+ "type": "object",
6
+ "additionalProperties": false,
7
+ "required": ["$schema", "invocation", "message", "enrichments", "missing", "hash"],
8
+ "properties": {
9
+ "$schema": { "const": "dingtalk-agent/enriched-invocation@1" },
10
+ "invocation": { "type": "object" },
11
+ "message": {
12
+ "type": "object",
13
+ "required": ["originalText", "effectiveText"],
14
+ "properties": {
15
+ "originalText": { "type": "string" },
16
+ "effectiveText": { "type": "string" }
17
+ }
18
+ },
19
+ "enrichments": {
20
+ "type": "object",
21
+ "required": ["quote", "burst", "identity"],
22
+ "properties": {
23
+ "quote": { "$ref": "#/$defs/item" },
24
+ "burst": { "$ref": "#/$defs/item" },
25
+ "identity": { "$ref": "#/$defs/item" }
26
+ }
27
+ },
28
+ "missing": { "type": "array", "items": { "type": "string" } },
29
+ "hash": { "type": "string" }
30
+ },
31
+ "$defs": {
32
+ "item": {
33
+ "type": "object",
34
+ "required": ["status", "source", "fetchedAt", "confidence", "truncated", "reason", "data"],
35
+ "properties": {
36
+ "status": { "enum": ["available", "missing", "rejected"] },
37
+ "source": { "type": "string" },
38
+ "fetchedAt": { "type": ["string", "null"] },
39
+ "confidence": { "type": "number", "minimum": 0, "maximum": 1 },
40
+ "truncated": { "type": "boolean" },
41
+ "reason": { "type": "string" },
42
+ "data": { "type": ["object", "null"] }
43
+ }
44
+ }
45
+ }
46
+ }