@xdxer/dingtalk-agent 0.1.4-beta.1 → 0.1.4-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 (273) hide show
  1. package/CHANGELOG.md +50 -0
  2. package/README.en.md +397 -0
  3. package/README.md +497 -46
  4. package/dist/bin/dingtalk-agent.js +1162 -340
  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/config.js +1 -7
  19. package/dist/src/config.js.map +1 -1
  20. package/dist/src/development-workspace.js +729 -0
  21. package/dist/src/development-workspace.js.map +1 -0
  22. package/dist/src/doctor.js +18 -7
  23. package/dist/src/doctor.js.map +1 -1
  24. package/dist/src/dws.js +145 -0
  25. package/dist/src/dws.js.map +1 -1
  26. package/dist/src/eval-evidence.js +193 -0
  27. package/dist/src/eval-evidence.js.map +1 -0
  28. package/dist/src/init.js +1 -1
  29. package/dist/src/init.js.map +1 -1
  30. package/dist/src/invocation.js +36 -0
  31. package/dist/src/invocation.js.map +1 -0
  32. package/dist/src/lab.js +679 -0
  33. package/dist/src/lab.js.map +1 -0
  34. package/dist/src/lease.js +100 -0
  35. package/dist/src/lease.js.map +1 -0
  36. package/dist/src/memory/candidates.js +451 -0
  37. package/dist/src/memory/candidates.js.map +1 -0
  38. package/dist/src/memory/completion-evidence.js +536 -0
  39. package/dist/src/memory/completion-evidence.js.map +1 -0
  40. package/dist/src/memory/operational.js +263 -0
  41. package/dist/src/memory/operational.js.map +1 -0
  42. package/dist/src/memory/remote-state.js +478 -0
  43. package/dist/src/memory/remote-state.js.map +1 -0
  44. package/dist/src/memory/task-checkpoints.js +204 -0
  45. package/dist/src/memory/task-checkpoints.js.map +1 -0
  46. package/dist/src/multica-deploy.js +1480 -0
  47. package/dist/src/multica-deploy.js.map +1 -0
  48. package/dist/src/multica-provider.js +685 -0
  49. package/dist/src/multica-provider.js.map +1 -0
  50. package/dist/src/opencode-evals.js +1062 -0
  51. package/dist/src/opencode-evals.js.map +1 -0
  52. package/dist/src/opencode-provider.js +531 -0
  53. package/dist/src/opencode-provider.js.map +1 -0
  54. package/dist/src/opencode-workspace.js +197 -0
  55. package/dist/src/opencode-workspace.js.map +1 -0
  56. package/dist/src/perception.js +225 -0
  57. package/dist/src/perception.js.map +1 -0
  58. package/dist/src/personal-event-evals.js +595 -0
  59. package/dist/src/personal-event-evals.js.map +1 -0
  60. package/dist/src/promotion.js +786 -0
  61. package/dist/src/promotion.js.map +1 -0
  62. package/dist/src/remote-semantic-state-live-evals.js +888 -0
  63. package/dist/src/remote-semantic-state-live-evals.js.map +1 -0
  64. package/dist/src/remote-semantic-state-worker.js +38 -0
  65. package/dist/src/remote-semantic-state-worker.js.map +1 -0
  66. package/dist/src/remote-state-evals.js +501 -0
  67. package/dist/src/remote-state-evals.js.map +1 -0
  68. package/dist/src/response-gate.js +51 -0
  69. package/dist/src/response-gate.js.map +1 -0
  70. package/dist/src/robot-evals.js +770 -0
  71. package/dist/src/robot-evals.js.map +1 -0
  72. package/dist/src/sessions.js +66 -105
  73. package/dist/src/sessions.js.map +1 -1
  74. package/dist/src/setup.js +10 -9
  75. package/dist/src/setup.js.map +1 -1
  76. package/dist/src/skill-manager.js +102 -203
  77. package/dist/src/skill-manager.js.map +1 -1
  78. package/dist/src/skills.js.map +1 -1
  79. package/dist/src/storage-evals.js +26 -0
  80. package/dist/src/storage-evals.js.map +1 -0
  81. package/dist/src/types.js.map +1 -1
  82. package/dist/src/upgrade.js +137 -0
  83. package/dist/src/upgrade.js.map +1 -0
  84. package/dist/src/waits.js +5 -1
  85. package/dist/src/waits.js.map +1 -1
  86. package/dist/src/workspace.js +28 -3
  87. package/dist/src/workspace.js.map +1 -1
  88. package/docs/INSTALLATION.md +118 -13
  89. package/docs/SECOND-AGENT-ACCEPTANCE.md +62 -0
  90. package/docs/architecture/agent-memory-topology.png +0 -0
  91. package/docs/architecture/agent-memory-topology.svg +132 -0
  92. package/docs/architecture/general-agent-kernel-topology.png +0 -0
  93. package/docs/architecture/general-agent-kernel-topology.svg +149 -0
  94. package/docs/architecture/provider-bound-development-workspace.png +0 -0
  95. package/docs/architecture/provider-bound-development-workspace.svg +141 -0
  96. package/docs/architecture/task-completion-gate.png +0 -0
  97. package/docs/architecture/task-completion-gate.svg +191 -0
  98. package/docs/schemas/agent-audit-load-evidence.schema.json +14 -0
  99. package/docs/schemas/agent-audit.schema.json +92 -0
  100. package/docs/schemas/agent-bindings.schema.json +54 -0
  101. package/docs/schemas/agent-definition.schema.json +78 -0
  102. package/docs/schemas/agent-enhancement-plan.schema.json +88 -0
  103. package/docs/schemas/agent-enhancement-receipt.schema.json +37 -0
  104. package/docs/schemas/enriched-invocation.schema.json +46 -0
  105. package/docs/schemas/eval-candidate-plan.schema.json +28 -0
  106. package/docs/schemas/eval-candidate-result.schema.json +20 -0
  107. package/docs/schemas/eval-candidate.schema.json +30 -0
  108. package/docs/schemas/invocation.schema.json +19 -0
  109. package/docs/schemas/memory-candidate-proposal.schema.json +18 -0
  110. package/docs/schemas/memory-candidate.schema.json +76 -0
  111. package/docs/schemas/memory-publish-target.schema.json +25 -0
  112. package/docs/schemas/multica-deployment-list.schema.json +29 -0
  113. package/docs/schemas/multica-deployment-operation.schema.json +51 -0
  114. package/docs/schemas/multica-deployment-plan.schema.json +70 -0
  115. package/docs/schemas/multica-deployment-receipt.schema.json +87 -0
  116. package/docs/schemas/multica-deployment-status.schema.json +23 -0
  117. package/docs/schemas/multica-workspace-inspection.schema.json +77 -0
  118. package/docs/schemas/multica-workspace-plan.schema.json +68 -0
  119. package/docs/schemas/multica-workspace-resource-list.schema.json +27 -0
  120. package/docs/schemas/multica-workspace-status.schema.json +34 -0
  121. package/docs/schemas/observation.schema.json +21 -0
  122. package/docs/schemas/operational-memory-provider.schema.json +36 -0
  123. package/docs/schemas/operational-memory-record.schema.json +24 -0
  124. package/docs/schemas/perception-input.schema.json +56 -0
  125. package/docs/schemas/project.schema.json +112 -0
  126. package/docs/schemas/promotion-list.schema.json +36 -0
  127. package/docs/schemas/promotion-plan.schema.json +60 -0
  128. package/docs/schemas/promotion-policy.schema.json +29 -0
  129. package/docs/schemas/promotion-receipt.schema.json +43 -0
  130. package/docs/schemas/promotion-status.schema.json +23 -0
  131. package/docs/schemas/release-readiness.schema.json +65 -0
  132. package/docs/schemas/remote-semantic-state-live-eval.schema.json +60 -0
  133. package/docs/schemas/remote-semantic-state-manifest.schema.json +79 -0
  134. package/docs/schemas/remote-semantic-state-provider.schema.json +98 -0
  135. package/docs/schemas/response-gate.schema.json +20 -0
  136. package/docs/schemas/task-checkpoint.schema.json +71 -0
  137. package/docs/schemas/task-completion-evidence.schema.json +154 -0
  138. package/docs/schemas/workspace-doctor.schema.json +56 -0
  139. package/docs/schemas/workspace-state.schema.json +39 -0
  140. package/evals/baselines/2026-07-16/opencode-basic-010-completion-summary.json +123 -0
  141. package/evals/baselines/2026-07-16/opencode-basic-skill-required-summary.json +69 -0
  142. package/evals/baselines/2026-07-16/opencode-multi-surface-summary.json +63 -0
  143. package/evals/baselines/2026-07-16/remote-state-live-summary.json +70 -0
  144. package/evals/baselines/2026-07-17/agent-enhance-opencode-dogfood-summary.json +98 -0
  145. package/evals/baselines/2026-07-17/personal-event-live-readiness-summary.json +68 -0
  146. package/examples/agents/fde-coach/AGENTS.md +26 -0
  147. package/examples/agents/fde-coach/MEMORY.md +3 -0
  148. package/examples/agents/fde-coach/fields/default/field.json +24 -0
  149. package/examples/agents/fde-coach/knowledge/INDEX.md +4 -0
  150. package/examples/agents/fde-coach/skills/fde-coach/SKILL.md +13 -0
  151. package/examples/agents/release-manager/AGENTS.md +26 -0
  152. package/examples/agents/release-manager/MEMORY.md +3 -0
  153. package/examples/agents/release-manager/fields/default/field.json +24 -0
  154. package/examples/agents/release-manager/knowledge/INDEX.md +4 -0
  155. package/examples/agents/release-manager/skills/release-manager/SKILL.md +13 -0
  156. package/lab/README.md +109 -0
  157. package/lab/agent-eval/catalog.json +91 -0
  158. package/lab/agent-eval/classic-failures.json +177 -0
  159. package/lab/agent-eval/completion-gate-regression.json +99 -0
  160. package/lab/agent-eval/personal-event-live.example.json +94 -0
  161. package/lab/agent-eval/remote-semantic-state-live.example.json +70 -0
  162. package/lab/agent-eval/remote-semantic-state-provider.fixture.json +47 -0
  163. package/lab/agent-eval/remote-state-workspace/AGENTS.md +8 -0
  164. package/lab/agent-eval/remote-state-workspace/opencode.json +7 -0
  165. package/lab/agent-eval/remote-state-workspace/skills/remote-state-operator/SKILL.md +13 -0
  166. package/lab/agent-eval/remote-state.example.json +31 -0
  167. package/lab/agent-eval/workspace/AGENTS.md +7 -0
  168. package/lab/agent-eval/workspace/MEMORY.md +4 -0
  169. package/lab/agent-eval/workspace/artifacts/pending-review.md +3 -0
  170. package/lab/agent-eval/workspace/knowledge/INDEX.md +4 -0
  171. package/lab/agent-eval/workspace/opencode.json +20 -0
  172. package/lab/manifest.example.json +27 -0
  173. package/lab/manifest.personal-event.example.json +27 -0
  174. package/lab/project-workspace/README.md +11 -0
  175. package/lab/project-workspace/fake-multica-provider.mjs +266 -0
  176. package/lab/project-workspace/multica-deploy.fixture.json +29 -0
  177. package/lab/project-workspace/multica-readonly.fixture.json +69 -0
  178. package/lab/project-workspace/observation.fixture.json +14 -0
  179. package/lab/project-workspace/opencode-provider-suite.json +65 -0
  180. package/lab/project-workspace/project.fixture.json +44 -0
  181. package/lab/project-workspace/promotion-policy.fixture.json +15 -0
  182. package/lab/robot-eval/pool.example.json +30 -0
  183. package/lab/robot-eval/suite.json +123 -0
  184. package/lab/robot-eval/workspace/AGENTS.md +21 -0
  185. package/lab/robot-eval/workspace/MEMORY.md +3 -0
  186. package/lab/robot-eval/workspace/knowledge/INDEX.md +5 -0
  187. package/lab/robot-eval/workspace/opencode.json +22 -0
  188. package/lab/schemas/agent-eval-catalog.schema.json +47 -0
  189. package/lab/schemas/lab-manifest.schema.json +70 -0
  190. package/lab/schemas/personal-event-eval.schema.json +91 -0
  191. package/lab/schemas/remote-state-eval.schema.json +66 -0
  192. package/lab/schemas/robot-eval-suite.schema.json +184 -0
  193. package/lab/schemas/robot-pool.schema.json +56 -0
  194. package/package.json +26 -14
  195. package/skills/dingtalk-agent-boot-multica/SKILL.md +40 -0
  196. package/skills/dingtalk-agent-compose/SKILL.md +110 -0
  197. package/skills/dingtalk-agent-compose/assets/AGENTS.template.md +26 -0
  198. package/skills/dingtalk-agent-compose/assets/agent.bindings.dingtalk-doc.template.json +13 -0
  199. package/skills/dingtalk-agent-compose/assets/agent.bindings.local.template.json +13 -0
  200. package/skills/dingtalk-agent-compose/assets/opencode.template.json +12 -0
  201. package/skills/dingtalk-agent-compose/assets/role-skill.template.md +24 -0
  202. package/skills/dingtalk-agent-compose/evals/evals.json +94 -0
  203. package/skills/dingtalk-agent-compose/references/agent-definition-contract.md +55 -0
  204. package/skills/dingtalk-agent-compose/references/opencode-host-contract.md +65 -0
  205. package/skills/dingtalk-agent-compose/references/storage-routing.md +20 -0
  206. package/skills/dingtalk-agent-deploy/SKILL.md +60 -0
  207. package/skills/dingtalk-agent-deploy/references/multica-deployment-contract.md +49 -0
  208. package/skills/dingtalk-agent-deploy/references/promotion-observation-contract.md +49 -0
  209. package/skills/dingtalk-agent-eval/SKILL.md +116 -0
  210. package/skills/dingtalk-agent-eval/assets/eval-catalog.template.json +18 -0
  211. package/skills/dingtalk-agent-eval/evals/evals.json +61 -0
  212. package/skills/dingtalk-agent-eval/references/eval-topology.md +34 -0
  213. package/skills/dingtalk-agent-eval/references/evidence-contract.md +31 -0
  214. package/skills/dingtalk-agent-eval/references/scenario-taxonomy.md +25 -0
  215. package/skills/dingtalk-agent-eval/references/storage-modes.md +75 -0
  216. package/skills/dingtalk-basic-behavior/SKILL.md +63 -3
  217. package/skills/dingtalk-basic-behavior/assets/memory-candidate-proposal.json +10 -0
  218. package/skills/dingtalk-basic-behavior/assets/{task-checkpoint.md → task-checkpoint.json} +2 -21
  219. package/skills/dingtalk-basic-behavior/references/action-contract.md +2 -0
  220. package/skills/dingtalk-basic-behavior/references/memory-and-evolution.md +15 -1
  221. package/skills/dingtalk-basic-behavior/references/perception-and-gates.md +28 -0
  222. package/skills/dingtalk-basic-behavior/references/task-lifecycle.md +32 -7
  223. package/dist/src/boot.js +0 -70
  224. package/dist/src/boot.js.map +0 -1
  225. package/dist/src/duty.js +0 -74
  226. package/dist/src/duty.js.map +0 -1
  227. package/dist/src/kb.js +0 -240
  228. package/dist/src/kb.js.map +0 -1
  229. package/dist/src/runs.js +0 -79
  230. package/dist/src/runs.js.map +0 -1
  231. package/docs/ARCHITECTURE.md +0 -217
  232. package/docs/MINIMAL-WORKSPACE-V1.md +0 -172
  233. package/docs/OPEN-SOURCE-REFERENCES.md +0 -107
  234. package/docs/SELF-TEST.md +0 -252
  235. package/docs//345/206/205/347/275/221/345/256/236/347/233/270.md +0 -77
  236. package/evals/baselines/2026-07-14/behavior-summary.json +0 -28
  237. package/evals/baselines/2026-07-14/contract-summary.json +0 -18
  238. package/evals/baselines/2026-07-14/live-canary-summary.json +0 -25
  239. package/evals/baselines/2026-07-15/dingtalk-basic-behavior-0.3.0/SKILL.md +0 -72
  240. package/evals/baselines/2026-07-15/dingtalk-basic-behavior-0.3.0/references/action-contract.md +0 -31
  241. package/evals/baselines/2026-07-15/dingtalk-basic-behavior-0.3.0/references/event-to-behavior.md +0 -22
  242. package/evals/baselines/2026-07-15/dingtalk-basic-behavior-0.3.0/references/memory-and-evolution.md +0 -25
  243. package/evals/baselines/2026-07-15/dingtalk-basic-behavior-0.3.0/references/runtime-modes.md +0 -34
  244. package/evals/baselines/2026-07-15/task-lifecycle-summary.json +0 -50
  245. package/evals/evals.json +0 -316
  246. package/evals/fixtures/dm-ambiguous-send.json +0 -4
  247. package/evals/fixtures/dm-blocked.json +0 -4
  248. package/evals/fixtures/dm-clear.json +0 -4
  249. package/evals/fixtures/dm-discussion.json +0 -4
  250. package/evals/fixtures/dm-doc-write-no-tool.json +0 -4
  251. package/evals/fixtures/dm-long-task-ack.json +0 -4
  252. package/evals/fixtures/dm-nonblocking-gap.json +0 -4
  253. package/evals/fixtures/dm-structured-task.json +0 -4
  254. package/evals/fixtures/group.json +0 -10
  255. package/evals/fixtures/mentioned.json +0 -3
  256. package/evals/run-contract-evals.mjs +0 -1106
  257. package/evals/run-shadow-evals.mjs +0 -267
  258. package/evals/runners/README.md +0 -66
  259. package/evals/runners/claude-shadow.mjs +0 -533
  260. package/evals/schemas/action-request.schema.json +0 -77
  261. package/evals/shadow-evals.json +0 -133
  262. package/skills/AGENTS.md +0 -104
  263. package/skills//344/273/273/345/212/241.md +0 -48
  264. package/skills//345/237/272/347/241/200/350/241/214/344/270/272.md +0 -44
  265. package/skills//345/277/203/350/267/263.md +0 -79
  266. package/skills//346/266/210/346/201/257.md +0 -50
  267. package/skills//347/237/245/350/257/206.md +0 -55
  268. package/skills//350/257/204/346/265/213.md +0 -62
  269. package/skills//351/222/211/351/222/211.md +0 -64
  270. package/templates/ontology/index.md +0 -24
  271. package/templates/ontology/self/access.md +0 -38
  272. package/templates/ontology/self/role-spec.md +0 -34
  273. package/templates/ontology/self/workspace.md +0 -41
@@ -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
+ }
@@ -0,0 +1,28 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://github.com/D1-2004/dingtalk-agent/docs/schemas/eval-candidate-plan.schema.json",
4
+ "title": "dingtalk-agent Eval Candidate Plan",
5
+ "type": "object",
6
+ "additionalProperties": false,
7
+ "required": ["$schema", "candidateId", "promotionId", "observedHash", "observationHash", "candidatePath", "writeBudget", "reviewRequired", "eligibleForSuite", "remoteRead", "remoteWrite", "localWrite", "triggerWrite", "sideEffect", "dingtalkSideEffect"],
8
+ "properties": {
9
+ "$schema": { "const": "dingtalk-agent/eval-candidate-plan@1" },
10
+ "candidateId": { "$ref": "promotion-plan.schema.json#/$defs/id" },
11
+ "promotionId": { "$ref": "promotion-plan.schema.json#/$defs/id" },
12
+ "observedHash": { "$ref": "promotion-plan.schema.json#/$defs/hash" },
13
+ "observationHash": { "$ref": "promotion-plan.schema.json#/$defs/hash" },
14
+ "candidatePath": { "type": "string", "minLength": 1 },
15
+ "writeBudget": {
16
+ "type": "object", "additionalProperties": false, "required": ["local"],
17
+ "properties": { "local": { "const": 1 } }
18
+ },
19
+ "reviewRequired": { "const": true },
20
+ "eligibleForSuite": { "const": false },
21
+ "remoteRead": { "const": false },
22
+ "remoteWrite": { "const": false },
23
+ "localWrite": { "const": false },
24
+ "triggerWrite": { "const": false },
25
+ "sideEffect": { "const": false },
26
+ "dingtalkSideEffect": { "const": false }
27
+ }
28
+ }
@@ -0,0 +1,20 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://github.com/D1-2004/dingtalk-agent/docs/schemas/eval-candidate-result.schema.json",
4
+ "title": "dingtalk-agent Eval Candidate Result",
5
+ "type": "object",
6
+ "additionalProperties": false,
7
+ "required": ["$schema", "applied", "idempotent", "candidate", "remoteRead", "remoteWrite", "localWrite", "triggerWrite", "sideEffect", "dingtalkSideEffect"],
8
+ "properties": {
9
+ "$schema": { "const": "dingtalk-agent/eval-candidate-result@1" },
10
+ "applied": { "type": "boolean" },
11
+ "idempotent": { "type": "boolean" },
12
+ "candidate": { "$ref": "eval-candidate.schema.json" },
13
+ "remoteRead": { "const": false },
14
+ "remoteWrite": { "const": false },
15
+ "localWrite": { "type": "boolean" },
16
+ "triggerWrite": { "const": false },
17
+ "sideEffect": { "enum": [false, "local-eval-candidate"] },
18
+ "dingtalkSideEffect": { "const": false }
19
+ }
20
+ }
@@ -0,0 +1,30 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://github.com/D1-2004/dingtalk-agent/docs/schemas/eval-candidate.schema.json",
4
+ "title": "dingtalk-agent Review-only Eval Candidate",
5
+ "type": "object", "additionalProperties": false,
6
+ "required": ["$schema", "candidateId", "status", "eligibleForSuite", "reviewRequired", "published", "promotion", "source", "eval", "target", "observation", "observationHash", "candidateHash", "evidencePath", "remoteRead", "remoteWrite", "localWrite", "triggerWrite", "sideEffect", "dingtalkSideEffect"],
7
+ "properties": {
8
+ "$schema": { "const": "dingtalk-agent/eval-candidate@1" },
9
+ "candidateId": { "$ref": "promotion-plan.schema.json#/$defs/id" },
10
+ "status": { "const": "proposed" }, "eligibleForSuite": { "const": false },
11
+ "reviewRequired": { "const": true }, "published": { "const": false },
12
+ "promotion": { "type": "object", "additionalProperties": false, "required": ["promotionId", "receiptId", "receiptHash", "linkHash"], "properties": {
13
+ "promotionId": { "$ref": "promotion-plan.schema.json#/$defs/id" }, "receiptId": { "$ref": "promotion-plan.schema.json#/$defs/id" },
14
+ "receiptHash": { "$ref": "promotion-plan.schema.json#/$defs/hash" }, "linkHash": { "$ref": "promotion-plan.schema.json#/$defs/hash" }
15
+ } },
16
+ "source": { "$ref": "promotion-plan.schema.json#/$defs/source" },
17
+ "eval": { "type": "object", "additionalProperties": false, "required": ["runId", "evidenceHash", "suiteId"], "properties": {
18
+ "runId": { "type": "string" }, "evidenceHash": { "$ref": "promotion-plan.schema.json#/$defs/hash" }, "suiteId": { "type": "string" }
19
+ } },
20
+ "target": { "type": "object", "additionalProperties": false, "required": ["workspace", "deploymentReceiptId", "deploymentHash", "observedHash"], "properties": {
21
+ "workspace": { "$ref": "promotion-plan.schema.json#/$defs/name" }, "deploymentReceiptId": { "$ref": "promotion-plan.schema.json#/$defs/id" },
22
+ "deploymentHash": { "$ref": "promotion-plan.schema.json#/$defs/hash" }, "observedHash": { "$ref": "promotion-plan.schema.json#/$defs/hash" }
23
+ } },
24
+ "observation": { "$ref": "observation.schema.json" },
25
+ "observationHash": { "$ref": "promotion-plan.schema.json#/$defs/hash" }, "candidateHash": { "$ref": "promotion-plan.schema.json#/$defs/hash" },
26
+ "evidencePath": { "type": "string", "minLength": 1 },
27
+ "remoteRead": { "const": false }, "remoteWrite": { "const": false }, "localWrite": { "const": true },
28
+ "triggerWrite": { "const": false }, "sideEffect": { "const": "local-eval-candidate" }, "dingtalkSideEffect": { "const": false }
29
+ }
30
+ }
@@ -0,0 +1,19 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://dingtalk-agent.dev/schemas/invocation.schema.json",
4
+ "title": "dingtalk-agent InvocationContext",
5
+ "type": "object",
6
+ "additionalProperties": false,
7
+ "required": ["$schema", "mode", "authority", "eventId", "sessionKey", "occurredAt", "actor", "target", "conversation"],
8
+ "properties": {
9
+ "$schema": { "const": "dingtalk-agent/invocation@1" },
10
+ "mode": { "enum": ["direct", "dm", "mention", "ambient", "heartbeat", "continuation"] },
11
+ "authority": { "enum": ["default", "host", "event"] },
12
+ "eventId": { "type": "string" },
13
+ "sessionKey": { "type": "string" },
14
+ "occurredAt": { "type": ["string", "null"] },
15
+ "actor": { "type": ["object", "null"] },
16
+ "target": { "type": ["object", "null"] },
17
+ "conversation": { "type": ["object", "null"] }
18
+ }
19
+ }
@@ -0,0 +1,18 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://dingtalk-agent.dev/schemas/memory-candidate-proposal.schema.json",
4
+ "title": "dingtalk-agent Memory Candidate Proposal",
5
+ "type": "object",
6
+ "additionalProperties": false,
7
+ "required": ["$schema", "kind", "scopeId", "title", "content", "sourceRefs", "confidence", "supersedes"],
8
+ "properties": {
9
+ "$schema": { "const": "dingtalk-agent/memory-candidate-proposal@1" },
10
+ "kind": { "enum": ["semantic", "procedural"] },
11
+ "scopeId": { "type": "string", "minLength": 1 },
12
+ "title": { "type": "string", "minLength": 1 },
13
+ "content": { "type": "string", "minLength": 1, "maxLength": 32768 },
14
+ "sourceRefs": { "type": "array", "minItems": 1, "items": { "type": "string", "minLength": 1 } },
15
+ "confidence": { "type": "number", "minimum": 0, "maximum": 1 },
16
+ "supersedes": { "type": "array", "items": { "type": "string", "minLength": 1 } }
17
+ }
18
+ }
@@ -0,0 +1,76 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://dingtalk-agent.dev/schemas/memory-candidate.schema.json",
4
+ "title": "dingtalk-agent Memory Candidate Lifecycle",
5
+ "type": "object",
6
+ "additionalProperties": false,
7
+ "required": [
8
+ "$schema", "id", "revision", "kind", "scopeId", "title", "content", "sourceRefs",
9
+ "confidence", "supersedes", "status", "proposedAt", "proposer", "review", "publication", "hash"
10
+ ],
11
+ "properties": {
12
+ "$schema": { "const": "dingtalk-agent/memory-candidate@1" },
13
+ "id": { "type": "string", "pattern": "^memcand_[a-f0-9]{24}$" },
14
+ "revision": { "type": "integer", "minimum": 1 },
15
+ "kind": { "enum": ["semantic", "procedural"] },
16
+ "scopeId": { "type": "string", "minLength": 1 },
17
+ "title": { "type": "string", "minLength": 1 },
18
+ "content": { "type": "string", "minLength": 1 },
19
+ "sourceRefs": { "type": "array", "minItems": 1, "items": { "type": "string" } },
20
+ "confidence": { "type": "number", "minimum": 0, "maximum": 1 },
21
+ "supersedes": { "type": "array", "items": { "type": "string" } },
22
+ "status": { "enum": ["proposed", "approved", "rejected", "published"] },
23
+ "proposedAt": { "type": "string", "format": "date-time" },
24
+ "proposer": {
25
+ "type": "object",
26
+ "additionalProperties": false,
27
+ "required": ["mode", "runId", "eventId", "definitionHash"],
28
+ "properties": {
29
+ "mode": { "enum": ["prepared", "direct"] },
30
+ "runId": { "type": "string" },
31
+ "eventId": { "type": "string" },
32
+ "definitionHash": { "type": "string" }
33
+ }
34
+ },
35
+ "review": {
36
+ "oneOf": [
37
+ { "type": "null" },
38
+ {
39
+ "type": "object",
40
+ "additionalProperties": false,
41
+ "required": ["decision", "reviewer", "reason", "reviewedAt"],
42
+ "properties": {
43
+ "decision": { "enum": ["approve", "reject"] },
44
+ "reviewer": { "type": "string", "minLength": 1 },
45
+ "reason": { "type": "string", "minLength": 1 },
46
+ "reviewedAt": { "type": "string", "format": "date-time" }
47
+ }
48
+ }
49
+ ]
50
+ },
51
+ "publication": {
52
+ "oneOf": [
53
+ { "type": "null" },
54
+ {
55
+ "type": "object",
56
+ "additionalProperties": false,
57
+ "required": [
58
+ "provider", "uri", "targetHashBefore", "targetHashAfter", "verification",
59
+ "concurrency", "publishedAt", "gitHead"
60
+ ],
61
+ "properties": {
62
+ "provider": { "enum": ["local-md", "dingtalk-doc"] },
63
+ "uri": { "type": "string" },
64
+ "targetHashBefore": { "type": "string" },
65
+ "targetHashAfter": { "type": "string" },
66
+ "verification": { "type": "string" },
67
+ "concurrency": { "enum": ["atomic-local-cas", "best-effort-read-check-append"] },
68
+ "publishedAt": { "type": "string", "format": "date-time" },
69
+ "gitHead": { "type": "string" }
70
+ }
71
+ }
72
+ ]
73
+ },
74
+ "hash": { "type": "string", "minLength": 1 }
75
+ }
76
+ }
@@ -0,0 +1,25 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://dingtalk-agent.dev/schemas/memory-publish-target.schema.json",
4
+ "title": "dingtalk-agent Memory Publish Target",
5
+ "type": "object",
6
+ "additionalProperties": false,
7
+ "required": ["$schema", "provider", "uri"],
8
+ "properties": {
9
+ "$schema": { "const": "dingtalk-agent/memory-publish-target@1" },
10
+ "provider": { "enum": ["local-md", "dingtalk-doc"] },
11
+ "uri": { "type": "string", "minLength": 1 },
12
+ "profile": { "type": "string" },
13
+ "expectedUserId": { "type": "string" }
14
+ },
15
+ "allOf": [
16
+ {
17
+ "if": { "properties": { "provider": { "const": "local-md" } } },
18
+ "then": { "properties": { "uri": { "pattern": "^local-md:.+" } } }
19
+ },
20
+ {
21
+ "if": { "properties": { "provider": { "const": "dingtalk-doc" } } },
22
+ "then": { "properties": { "uri": { "pattern": "^dingtalk-doc:.+" } } }
23
+ }
24
+ ]
25
+ }