@xdxer/dingtalk-agent 0.1.4-beta.7 → 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 (265) hide show
  1. package/CHANGELOG.md +35 -0
  2. package/README.en.md +395 -0
  3. package/README.md +466 -36
  4. package/dist/bin/dingtalk-agent.js +1071 -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/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/init.js +1 -1
  25. package/dist/src/init.js.map +1 -1
  26. package/dist/src/invocation.js +36 -0
  27. package/dist/src/invocation.js.map +1 -0
  28. package/dist/src/lab.js +679 -0
  29. package/dist/src/lab.js.map +1 -0
  30. package/dist/src/lease.js +100 -0
  31. package/dist/src/lease.js.map +1 -0
  32. package/dist/src/memory/candidates.js +451 -0
  33. package/dist/src/memory/candidates.js.map +1 -0
  34. package/dist/src/memory/completion-evidence.js +536 -0
  35. package/dist/src/memory/completion-evidence.js.map +1 -0
  36. package/dist/src/memory/operational.js +263 -0
  37. package/dist/src/memory/operational.js.map +1 -0
  38. package/dist/src/memory/remote-state.js +478 -0
  39. package/dist/src/memory/remote-state.js.map +1 -0
  40. package/dist/src/memory/task-checkpoints.js +204 -0
  41. package/dist/src/memory/task-checkpoints.js.map +1 -0
  42. package/dist/src/multica-deploy.js +1480 -0
  43. package/dist/src/multica-deploy.js.map +1 -0
  44. package/dist/src/multica-provider.js +685 -0
  45. package/dist/src/multica-provider.js.map +1 -0
  46. package/dist/src/opencode-evals.js +1062 -0
  47. package/dist/src/opencode-evals.js.map +1 -0
  48. package/dist/src/opencode-provider.js +531 -0
  49. package/dist/src/opencode-provider.js.map +1 -0
  50. package/dist/src/opencode-workspace.js +197 -0
  51. package/dist/src/opencode-workspace.js.map +1 -0
  52. package/dist/src/perception.js +225 -0
  53. package/dist/src/perception.js.map +1 -0
  54. package/dist/src/personal-event-evals.js +595 -0
  55. package/dist/src/personal-event-evals.js.map +1 -0
  56. package/dist/src/promotion.js +786 -0
  57. package/dist/src/promotion.js.map +1 -0
  58. package/dist/src/remote-semantic-state-live-evals.js +888 -0
  59. package/dist/src/remote-semantic-state-live-evals.js.map +1 -0
  60. package/dist/src/remote-semantic-state-worker.js +38 -0
  61. package/dist/src/remote-semantic-state-worker.js.map +1 -0
  62. package/dist/src/remote-state-evals.js +501 -0
  63. package/dist/src/remote-state-evals.js.map +1 -0
  64. package/dist/src/response-gate.js +51 -0
  65. package/dist/src/response-gate.js.map +1 -0
  66. package/dist/src/robot-evals.js +770 -0
  67. package/dist/src/robot-evals.js.map +1 -0
  68. package/dist/src/sessions.js +66 -105
  69. package/dist/src/sessions.js.map +1 -1
  70. package/dist/src/skill-manager.js +25 -16
  71. package/dist/src/skill-manager.js.map +1 -1
  72. package/dist/src/skills.js.map +1 -1
  73. package/dist/src/storage-evals.js +26 -0
  74. package/dist/src/storage-evals.js.map +1 -0
  75. package/dist/src/types.js.map +1 -1
  76. package/dist/src/waits.js +5 -1
  77. package/dist/src/waits.js.map +1 -1
  78. package/dist/src/workspace.js +28 -3
  79. package/dist/src/workspace.js.map +1 -1
  80. package/docs/INSTALLATION.md +47 -0
  81. package/docs/SECOND-AGENT-ACCEPTANCE.md +62 -0
  82. package/docs/architecture/agent-memory-topology.png +0 -0
  83. package/docs/architecture/agent-memory-topology.svg +132 -0
  84. package/docs/architecture/general-agent-kernel-topology.png +0 -0
  85. package/docs/architecture/general-agent-kernel-topology.svg +149 -0
  86. package/docs/architecture/provider-bound-development-workspace.png +0 -0
  87. package/docs/architecture/provider-bound-development-workspace.svg +141 -0
  88. package/docs/architecture/task-completion-gate.png +0 -0
  89. package/docs/architecture/task-completion-gate.svg +191 -0
  90. package/docs/schemas/agent-audit-load-evidence.schema.json +14 -0
  91. package/docs/schemas/agent-audit.schema.json +92 -0
  92. package/docs/schemas/agent-bindings.schema.json +54 -0
  93. package/docs/schemas/agent-definition.schema.json +78 -0
  94. package/docs/schemas/agent-enhancement-plan.schema.json +88 -0
  95. package/docs/schemas/agent-enhancement-receipt.schema.json +37 -0
  96. package/docs/schemas/enriched-invocation.schema.json +46 -0
  97. package/docs/schemas/eval-candidate-plan.schema.json +28 -0
  98. package/docs/schemas/eval-candidate-result.schema.json +20 -0
  99. package/docs/schemas/eval-candidate.schema.json +30 -0
  100. package/docs/schemas/invocation.schema.json +19 -0
  101. package/docs/schemas/memory-candidate-proposal.schema.json +18 -0
  102. package/docs/schemas/memory-candidate.schema.json +76 -0
  103. package/docs/schemas/memory-publish-target.schema.json +25 -0
  104. package/docs/schemas/multica-deployment-list.schema.json +29 -0
  105. package/docs/schemas/multica-deployment-operation.schema.json +51 -0
  106. package/docs/schemas/multica-deployment-plan.schema.json +70 -0
  107. package/docs/schemas/multica-deployment-receipt.schema.json +87 -0
  108. package/docs/schemas/multica-deployment-status.schema.json +23 -0
  109. package/docs/schemas/multica-workspace-inspection.schema.json +77 -0
  110. package/docs/schemas/multica-workspace-plan.schema.json +68 -0
  111. package/docs/schemas/multica-workspace-resource-list.schema.json +27 -0
  112. package/docs/schemas/multica-workspace-status.schema.json +34 -0
  113. package/docs/schemas/observation.schema.json +21 -0
  114. package/docs/schemas/operational-memory-provider.schema.json +36 -0
  115. package/docs/schemas/operational-memory-record.schema.json +24 -0
  116. package/docs/schemas/perception-input.schema.json +56 -0
  117. package/docs/schemas/project.schema.json +112 -0
  118. package/docs/schemas/promotion-list.schema.json +36 -0
  119. package/docs/schemas/promotion-plan.schema.json +60 -0
  120. package/docs/schemas/promotion-policy.schema.json +29 -0
  121. package/docs/schemas/promotion-receipt.schema.json +43 -0
  122. package/docs/schemas/promotion-status.schema.json +23 -0
  123. package/docs/schemas/release-readiness.schema.json +65 -0
  124. package/docs/schemas/remote-semantic-state-live-eval.schema.json +60 -0
  125. package/docs/schemas/remote-semantic-state-manifest.schema.json +79 -0
  126. package/docs/schemas/remote-semantic-state-provider.schema.json +98 -0
  127. package/docs/schemas/response-gate.schema.json +20 -0
  128. package/docs/schemas/task-checkpoint.schema.json +71 -0
  129. package/docs/schemas/task-completion-evidence.schema.json +154 -0
  130. package/docs/schemas/workspace-doctor.schema.json +56 -0
  131. package/docs/schemas/workspace-state.schema.json +39 -0
  132. package/evals/baselines/2026-07-16/opencode-basic-010-completion-summary.json +123 -0
  133. package/evals/baselines/2026-07-16/opencode-basic-skill-required-summary.json +69 -0
  134. package/evals/baselines/2026-07-16/opencode-multi-surface-summary.json +63 -0
  135. package/evals/baselines/2026-07-16/remote-state-live-summary.json +70 -0
  136. package/evals/baselines/2026-07-17/agent-enhance-opencode-dogfood-summary.json +98 -0
  137. package/evals/baselines/2026-07-17/personal-event-live-readiness-summary.json +68 -0
  138. package/examples/agents/fde-coach/AGENTS.md +26 -0
  139. package/examples/agents/fde-coach/MEMORY.md +3 -0
  140. package/examples/agents/fde-coach/fields/default/field.json +24 -0
  141. package/examples/agents/fde-coach/knowledge/INDEX.md +4 -0
  142. package/examples/agents/fde-coach/skills/fde-coach/SKILL.md +13 -0
  143. package/examples/agents/release-manager/AGENTS.md +26 -0
  144. package/examples/agents/release-manager/MEMORY.md +3 -0
  145. package/examples/agents/release-manager/fields/default/field.json +24 -0
  146. package/examples/agents/release-manager/knowledge/INDEX.md +4 -0
  147. package/examples/agents/release-manager/skills/release-manager/SKILL.md +13 -0
  148. package/lab/README.md +109 -0
  149. package/lab/agent-eval/catalog.json +91 -0
  150. package/lab/agent-eval/classic-failures.json +177 -0
  151. package/lab/agent-eval/completion-gate-regression.json +99 -0
  152. package/lab/agent-eval/personal-event-live.example.json +94 -0
  153. package/lab/agent-eval/remote-semantic-state-live.example.json +70 -0
  154. package/lab/agent-eval/remote-semantic-state-provider.fixture.json +47 -0
  155. package/lab/agent-eval/remote-state-workspace/AGENTS.md +8 -0
  156. package/lab/agent-eval/remote-state-workspace/opencode.json +7 -0
  157. package/lab/agent-eval/remote-state-workspace/skills/remote-state-operator/SKILL.md +13 -0
  158. package/lab/agent-eval/remote-state.example.json +31 -0
  159. package/lab/agent-eval/workspace/AGENTS.md +7 -0
  160. package/lab/agent-eval/workspace/MEMORY.md +4 -0
  161. package/lab/agent-eval/workspace/artifacts/pending-review.md +3 -0
  162. package/lab/agent-eval/workspace/knowledge/INDEX.md +4 -0
  163. package/lab/agent-eval/workspace/opencode.json +20 -0
  164. package/lab/manifest.example.json +27 -0
  165. package/lab/manifest.personal-event.example.json +27 -0
  166. package/lab/project-workspace/README.md +11 -0
  167. package/lab/project-workspace/fake-multica-provider.mjs +266 -0
  168. package/lab/project-workspace/multica-deploy.fixture.json +29 -0
  169. package/lab/project-workspace/multica-readonly.fixture.json +69 -0
  170. package/lab/project-workspace/observation.fixture.json +14 -0
  171. package/lab/project-workspace/opencode-provider-suite.json +65 -0
  172. package/lab/project-workspace/project.fixture.json +44 -0
  173. package/lab/project-workspace/promotion-policy.fixture.json +15 -0
  174. package/lab/robot-eval/pool.example.json +30 -0
  175. package/lab/robot-eval/suite.json +123 -0
  176. package/lab/robot-eval/workspace/AGENTS.md +21 -0
  177. package/lab/robot-eval/workspace/MEMORY.md +3 -0
  178. package/lab/robot-eval/workspace/knowledge/INDEX.md +5 -0
  179. package/lab/robot-eval/workspace/opencode.json +22 -0
  180. package/lab/schemas/agent-eval-catalog.schema.json +47 -0
  181. package/lab/schemas/lab-manifest.schema.json +70 -0
  182. package/lab/schemas/personal-event-eval.schema.json +91 -0
  183. package/lab/schemas/remote-state-eval.schema.json +66 -0
  184. package/lab/schemas/robot-eval-suite.schema.json +184 -0
  185. package/lab/schemas/robot-pool.schema.json +56 -0
  186. package/package.json +30 -14
  187. package/skills/dingtalk-agent-boot-multica/SKILL.md +40 -0
  188. package/skills/dingtalk-agent-compose/SKILL.md +110 -0
  189. package/skills/dingtalk-agent-compose/assets/AGENTS.template.md +26 -0
  190. package/skills/dingtalk-agent-compose/assets/agent.bindings.dingtalk-doc.template.json +13 -0
  191. package/skills/dingtalk-agent-compose/assets/agent.bindings.local.template.json +13 -0
  192. package/skills/dingtalk-agent-compose/assets/opencode.template.json +12 -0
  193. package/skills/dingtalk-agent-compose/assets/role-skill.template.md +24 -0
  194. package/skills/dingtalk-agent-compose/evals/evals.json +94 -0
  195. package/skills/dingtalk-agent-compose/references/agent-definition-contract.md +55 -0
  196. package/skills/dingtalk-agent-compose/references/opencode-host-contract.md +65 -0
  197. package/skills/dingtalk-agent-compose/references/storage-routing.md +20 -0
  198. package/skills/dingtalk-agent-deploy/SKILL.md +60 -0
  199. package/skills/dingtalk-agent-deploy/references/multica-deployment-contract.md +49 -0
  200. package/skills/dingtalk-agent-deploy/references/promotion-observation-contract.md +49 -0
  201. package/skills/dingtalk-agent-eval/SKILL.md +116 -0
  202. package/skills/dingtalk-agent-eval/assets/eval-catalog.template.json +18 -0
  203. package/skills/dingtalk-agent-eval/evals/evals.json +61 -0
  204. package/skills/dingtalk-agent-eval/references/eval-topology.md +34 -0
  205. package/skills/dingtalk-agent-eval/references/evidence-contract.md +31 -0
  206. package/skills/dingtalk-agent-eval/references/scenario-taxonomy.md +25 -0
  207. package/skills/dingtalk-agent-eval/references/storage-modes.md +75 -0
  208. package/skills/dingtalk-basic-behavior/SKILL.md +63 -3
  209. package/skills/dingtalk-basic-behavior/assets/memory-candidate-proposal.json +10 -0
  210. package/skills/dingtalk-basic-behavior/assets/{task-checkpoint.md → task-checkpoint.json} +2 -21
  211. package/skills/dingtalk-basic-behavior/references/action-contract.md +2 -0
  212. package/skills/dingtalk-basic-behavior/references/memory-and-evolution.md +15 -1
  213. package/skills/dingtalk-basic-behavior/references/perception-and-gates.md +28 -0
  214. package/skills/dingtalk-basic-behavior/references/task-lifecycle.md +32 -7
  215. package/dist/src/boot.js +0 -70
  216. package/dist/src/boot.js.map +0 -1
  217. package/dist/src/duty.js +0 -74
  218. package/dist/src/duty.js.map +0 -1
  219. package/dist/src/kb.js +0 -240
  220. package/dist/src/kb.js.map +0 -1
  221. package/dist/src/runs.js +0 -79
  222. package/dist/src/runs.js.map +0 -1
  223. package/docs/ARCHITECTURE.md +0 -219
  224. package/docs/MINIMAL-WORKSPACE-V1.md +0 -172
  225. package/docs/OPEN-SOURCE-REFERENCES.md +0 -107
  226. package/docs/SELF-TEST.md +0 -252
  227. package/docs//345/206/205/347/275/221/345/256/236/347/233/270.md +0 -77
  228. package/evals/baselines/2026-07-14/behavior-summary.json +0 -28
  229. package/evals/baselines/2026-07-14/contract-summary.json +0 -18
  230. package/evals/baselines/2026-07-14/live-canary-summary.json +0 -25
  231. package/evals/baselines/2026-07-15/dingtalk-basic-behavior-0.3.0/SKILL.md +0 -72
  232. package/evals/baselines/2026-07-15/dingtalk-basic-behavior-0.3.0/references/action-contract.md +0 -31
  233. package/evals/baselines/2026-07-15/dingtalk-basic-behavior-0.3.0/references/event-to-behavior.md +0 -22
  234. package/evals/baselines/2026-07-15/dingtalk-basic-behavior-0.3.0/references/memory-and-evolution.md +0 -25
  235. package/evals/baselines/2026-07-15/dingtalk-basic-behavior-0.3.0/references/runtime-modes.md +0 -34
  236. package/evals/baselines/2026-07-15/task-lifecycle-summary.json +0 -50
  237. package/evals/evals.json +0 -339
  238. package/evals/fixtures/dm-ambiguous-send.json +0 -4
  239. package/evals/fixtures/dm-blocked.json +0 -4
  240. package/evals/fixtures/dm-clear.json +0 -4
  241. package/evals/fixtures/dm-discussion.json +0 -4
  242. package/evals/fixtures/dm-doc-write-no-tool.json +0 -4
  243. package/evals/fixtures/dm-long-task-ack.json +0 -4
  244. package/evals/fixtures/dm-nonblocking-gap.json +0 -4
  245. package/evals/fixtures/dm-structured-task.json +0 -4
  246. package/evals/fixtures/group.json +0 -10
  247. package/evals/fixtures/mentioned.json +0 -3
  248. package/evals/run-contract-evals.mjs +0 -1169
  249. package/evals/run-shadow-evals.mjs +0 -267
  250. package/evals/runners/README.md +0 -66
  251. package/evals/runners/claude-shadow.mjs +0 -533
  252. package/evals/schemas/action-request.schema.json +0 -77
  253. package/evals/shadow-evals.json +0 -133
  254. package/skills/AGENTS.md +0 -104
  255. package/skills//344/273/273/345/212/241.md +0 -48
  256. package/skills//345/237/272/347/241/200/350/241/214/344/270/272.md +0 -44
  257. package/skills//345/277/203/350/267/263.md +0 -79
  258. package/skills//346/266/210/346/201/257.md +0 -50
  259. package/skills//347/237/245/350/257/206.md +0 -55
  260. package/skills//350/257/204/346/265/213.md +0 -62
  261. package/skills//351/222/211/351/222/211.md +0 -64
  262. package/templates/ontology/index.md +0 -24
  263. package/templates/ontology/self/access.md +0 -38
  264. package/templates/ontology/self/role-spec.md +0 -34
  265. package/templates/ontology/self/workspace.md +0 -41
@@ -0,0 +1,65 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://github.com/D1-2004/dingtalk-agent/docs/schemas/release-readiness.schema.json",
4
+ "title": "dingtalk-agent Release Readiness",
5
+ "type": "object",
6
+ "additionalProperties": false,
7
+ "required": ["$schema", "passed", "version", "tarball", "install", "smoke", "sideEffects", "limitations"],
8
+ "properties": {
9
+ "$schema": { "const": "dingtalk-agent/release-readiness@1" },
10
+ "passed": { "const": true },
11
+ "version": { "type": "string", "pattern": "^\\d+\\.\\d+\\.\\d+-beta\\.\\d+$" },
12
+ "tarball": {
13
+ "type": "object", "additionalProperties": false,
14
+ "required": ["filename", "sha256", "files", "packageSize", "unpackedSize", "requiredFiles", "forbiddenFiles"],
15
+ "properties": {
16
+ "filename": { "type": "string", "pattern": "^[A-Za-z0-9._-]+\\.tgz$" },
17
+ "sha256": { "type": "string", "pattern": "^[a-f0-9]{64}$" },
18
+ "files": { "type": "integer", "minimum": 1 },
19
+ "packageSize": { "type": "integer", "minimum": 1 },
20
+ "unpackedSize": { "type": "integer", "minimum": 1 },
21
+ "requiredFiles": { "type": "integer", "minimum": 1 },
22
+ "forbiddenFiles": { "const": 0 }
23
+ }
24
+ },
25
+ "install": {
26
+ "type": "object", "additionalProperties": false,
27
+ "required": ["offlineTarball", "cliEntries", "versionMatched", "canonicalSkillCopies", "clientsReady"],
28
+ "properties": {
29
+ "offlineTarball": { "const": true },
30
+ "cliEntries": { "const": 2 },
31
+ "versionMatched": { "const": true },
32
+ "canonicalSkillCopies": { "const": 1 },
33
+ "clientsReady": { "const": 3 }
34
+ }
35
+ },
36
+ "smoke": {
37
+ "type": "object", "additionalProperties": false,
38
+ "required": ["setup", "doctor", "bootstrapDirect", "labEvalPlanOnly", "upgradeFromTarball", "rollbackDryRun"],
39
+ "properties": {
40
+ "setup": { "const": true },
41
+ "doctor": { "const": true },
42
+ "bootstrapDirect": { "const": true },
43
+ "labEvalPlanOnly": { "const": true },
44
+ "upgradeFromTarball": { "const": true },
45
+ "rollbackDryRun": { "const": true }
46
+ }
47
+ },
48
+ "sideEffects": {
49
+ "type": "object", "additionalProperties": false,
50
+ "required": ["registryPublish", "gitTag", "githubRelease", "dingtalk", "multica", "trigger"],
51
+ "properties": {
52
+ "registryPublish": { "const": false },
53
+ "gitTag": { "const": false },
54
+ "githubRelease": { "const": false },
55
+ "dingtalk": { "const": false },
56
+ "multica": { "const": false },
57
+ "trigger": { "const": false }
58
+ }
59
+ },
60
+ "limitations": {
61
+ "type": "array", "minItems": 1,
62
+ "items": { "type": "string", "minLength": 1 }
63
+ }
64
+ }
65
+ }
@@ -0,0 +1,60 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://dingtalk-agent.dev/schemas/remote-semantic-state-live-eval.schema.json",
4
+ "title": "dingtalk-agent Remote Semantic State Live Eval",
5
+ "type": "object",
6
+ "additionalProperties": false,
7
+ "required": [
8
+ "$schema", "id", "scenario", "liveAuthorized", "provider", "requiredSkills",
9
+ "evidenceRoot", "write"
10
+ ],
11
+ "properties": {
12
+ "$schema": { "const": "dingtalk-agent/remote-semantic-state-live-eval@1" },
13
+ "id": { "type": "string", "pattern": "^[a-z0-9][a-z0-9._-]*$" },
14
+ "scenario": { "const": "memory-and-storage" },
15
+ "liveAuthorized": { "enum": ["yes", "no"] },
16
+ "provider": { "$ref": "remote-semantic-state-provider.schema.json" },
17
+ "requiredSkills": {
18
+ "type": "array",
19
+ "minItems": 2,
20
+ "uniqueItems": true,
21
+ "items": { "type": "string", "minLength": 1 }
22
+ },
23
+ "evidenceRoot": { "type": "string", "pattern": "^\\.dingtalk-agent/.+" },
24
+ "write": {
25
+ "type": "object",
26
+ "additionalProperties": false,
27
+ "required": [
28
+ "allowlist", "budget", "documentSlots", "aitableFields", "driftProbe",
29
+ "retainMarkers"
30
+ ],
31
+ "properties": {
32
+ "allowlist": {
33
+ "type": "array",
34
+ "minItems": 3,
35
+ "maxItems": 3,
36
+ "uniqueItems": true,
37
+ "items": { "type": "string", "minLength": 1 }
38
+ },
39
+ "budget": { "type": "integer", "minimum": 1, "maximum": 10 },
40
+ "documentSlots": {
41
+ "type": "array",
42
+ "minItems": 2,
43
+ "maxItems": 2,
44
+ "uniqueItems": true,
45
+ "items": { "enum": ["l1", "l3"] }
46
+ },
47
+ "aitableFields": {
48
+ "type": "array",
49
+ "minItems": 1,
50
+ "maxItems": 2,
51
+ "uniqueItems": true,
52
+ "items": { "enum": ["summary", "nextAction"] }
53
+ },
54
+ "driftProbe": { "const": true },
55
+ "retainMarkers": { "const": true }
56
+ }
57
+ },
58
+ "nonAdocNegativeTestUri": { "type": "string", "minLength": 1 }
59
+ }
60
+ }
@@ -0,0 +1,79 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://dingtalk-agent.dev/schemas/remote-semantic-state-manifest.schema.json",
4
+ "title": "dingtalk-agent Remote Semantic State Manifest",
5
+ "type": "object",
6
+ "additionalProperties": false,
7
+ "required": [
8
+ "$schema", "providerId", "providerHash", "scopeId", "definitionHash", "authority",
9
+ "layers", "nextAction", "stateHash", "controlState", "pulledAt", "hash"
10
+ ],
11
+ "properties": {
12
+ "$schema": { "const": "dingtalk-agent/remote-semantic-state-manifest@1" },
13
+ "providerId": { "type": "string", "minLength": 1 },
14
+ "providerHash": { "$ref": "#/$defs/hash" },
15
+ "scopeId": { "type": "string", "minLength": 1 },
16
+ "definitionHash": { "$ref": "#/$defs/hash" },
17
+ "authority": {
18
+ "type": "object",
19
+ "additionalProperties": false,
20
+ "required": ["profile", "expectedUserId", "actualUserId"],
21
+ "properties": {
22
+ "profile": { "type": "string", "minLength": 1 },
23
+ "expectedUserId": { "type": "string", "minLength": 1 },
24
+ "actualUserId": { "type": "string", "minLength": 1 }
25
+ }
26
+ },
27
+ "layers": {
28
+ "type": "object",
29
+ "additionalProperties": false,
30
+ "required": ["l1", "l2", "l3"],
31
+ "properties": {
32
+ "l1": { "$ref": "#/$defs/layer" },
33
+ "l2": { "$ref": "#/$defs/layer" },
34
+ "l3": { "$ref": "#/$defs/layer" }
35
+ }
36
+ },
37
+ "nextAction": { "type": "string", "minLength": 1 },
38
+ "stateHash": { "$ref": "#/$defs/hash" },
39
+ "controlState": {
40
+ "type": "object",
41
+ "additionalProperties": false,
42
+ "required": ["provider", "remoteProjection", "excludedFromRemoteMarkdown"],
43
+ "properties": {
44
+ "provider": { "const": "host-atomic-store" },
45
+ "remoteProjection": { "const": false },
46
+ "excludedFromRemoteMarkdown": {
47
+ "type": "array",
48
+ "minItems": 6,
49
+ "uniqueItems": true,
50
+ "items": { "type": "string", "minLength": 1 }
51
+ }
52
+ }
53
+ },
54
+ "pulledAt": { "type": "string", "format": "date-time" },
55
+ "hash": { "$ref": "#/$defs/hash" }
56
+ },
57
+ "$defs": {
58
+ "hash": { "type": "string", "pattern": "^[a-f0-9]{64}$" },
59
+ "layer": {
60
+ "type": "object",
61
+ "additionalProperties": false,
62
+ "required": [
63
+ "slot", "semanticRole", "provider", "mode", "source", "mediaType",
64
+ "cachePath", "remoteHash", "cacheHash"
65
+ ],
66
+ "properties": {
67
+ "slot": { "enum": ["l1", "l2", "l3"] },
68
+ "semanticRole": { "type": "string", "minLength": 1 },
69
+ "provider": { "enum": ["dingtalk-doc", "dingtalk-aitable"] },
70
+ "mode": { "type": "string", "minLength": 1 },
71
+ "source": { "type": "string", "minLength": 1 },
72
+ "mediaType": { "enum": ["ALIDOC/adoc", "application/json"] },
73
+ "cachePath": { "type": "string", "minLength": 1 },
74
+ "remoteHash": { "$ref": "#/$defs/hash" },
75
+ "cacheHash": { "$ref": "#/$defs/hash" }
76
+ }
77
+ }
78
+ }
79
+ }
@@ -0,0 +1,98 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://dingtalk-agent.dev/schemas/remote-semantic-state-provider.schema.json",
4
+ "title": "dingtalk-agent Remote Semantic State Provider",
5
+ "type": "object",
6
+ "additionalProperties": false,
7
+ "required": ["$schema", "id", "scopeId", "authority", "layers", "controlState"],
8
+ "properties": {
9
+ "$schema": { "const": "dingtalk-agent/remote-semantic-state-provider@1" },
10
+ "id": { "type": "string", "pattern": "^[a-z0-9][a-z0-9._-]*$" },
11
+ "scopeId": { "type": "string", "minLength": 1 },
12
+ "authority": {
13
+ "type": "object",
14
+ "additionalProperties": false,
15
+ "required": ["profile", "expectedUserId"],
16
+ "properties": {
17
+ "profile": { "type": "string", "minLength": 1, "pattern": "^[^,]+$" },
18
+ "expectedUserId": { "type": "string", "minLength": 1 }
19
+ }
20
+ },
21
+ "layers": {
22
+ "type": "object",
23
+ "additionalProperties": false,
24
+ "required": ["l1", "l2", "l3"],
25
+ "properties": {
26
+ "l1": {
27
+ "type": "object",
28
+ "additionalProperties": false,
29
+ "required": ["provider", "semanticRole", "mode", "uri"],
30
+ "properties": {
31
+ "provider": { "const": "dingtalk-doc" },
32
+ "semanticRole": { "const": "session-working-memory" },
33
+ "mode": { "const": "semantic-read-only-mirror" },
34
+ "uri": { "type": "string", "pattern": "^dingtalk-doc:.+" }
35
+ }
36
+ },
37
+ "l2": {
38
+ "type": "object",
39
+ "additionalProperties": false,
40
+ "required": [
41
+ "provider", "semanticRole", "mode", "baseId", "tableId", "recordId",
42
+ "expected", "fields"
43
+ ],
44
+ "properties": {
45
+ "provider": { "const": "dingtalk-aitable" },
46
+ "semanticRole": { "const": "structured-hot-state" },
47
+ "mode": { "const": "business-fact-source" },
48
+ "baseId": { "type": "string", "minLength": 1 },
49
+ "tableId": { "type": "string", "minLength": 1 },
50
+ "recordId": { "type": "string", "minLength": 1 },
51
+ "expected": {
52
+ "type": "object",
53
+ "additionalProperties": false,
54
+ "required": ["key", "scopeId"],
55
+ "properties": {
56
+ "key": { "type": "string", "minLength": 1 },
57
+ "scopeId": { "type": "string", "minLength": 1 }
58
+ }
59
+ },
60
+ "fields": {
61
+ "type": "object",
62
+ "additionalProperties": false,
63
+ "required": ["key", "scopeId", "status", "nextAction", "summary", "sourceRefs"],
64
+ "properties": {
65
+ "key": { "type": "string", "minLength": 1 },
66
+ "scopeId": { "type": "string", "minLength": 1 },
67
+ "status": { "type": "string", "minLength": 1 },
68
+ "nextAction": { "type": "string", "minLength": 1 },
69
+ "summary": { "type": "string", "minLength": 1 },
70
+ "sourceRefs": { "type": "string", "minLength": 1 }
71
+ }
72
+ }
73
+ }
74
+ },
75
+ "l3": {
76
+ "type": "object",
77
+ "additionalProperties": false,
78
+ "required": ["provider", "semanticRole", "mode", "uri"],
79
+ "properties": {
80
+ "provider": { "const": "dingtalk-doc" },
81
+ "semanticRole": { "const": "long-term-knowledge" },
82
+ "mode": { "const": "reviewed-knowledge-source" },
83
+ "uri": { "type": "string", "pattern": "^dingtalk-doc:.+" }
84
+ }
85
+ }
86
+ }
87
+ },
88
+ "controlState": {
89
+ "type": "object",
90
+ "additionalProperties": false,
91
+ "required": ["provider", "remoteProjection"],
92
+ "properties": {
93
+ "provider": { "const": "host-atomic-store" },
94
+ "remoteProjection": { "const": false }
95
+ }
96
+ }
97
+ }
98
+ }
@@ -0,0 +1,20 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://dingtalk-agent.dev/schemas/response-gate.schema.json",
4
+ "title": "Response Gate Snapshot",
5
+ "type": "object",
6
+ "additionalProperties": false,
7
+ "required": ["$schema", "decision", "reason", "hardAllowedActions", "softChecks", "perceptionHash", "hash"],
8
+ "properties": {
9
+ "$schema": { "const": "dingtalk-agent/response-gate@1" },
10
+ "decision": { "enum": ["engage", "silent", "inspect"] },
11
+ "reason": { "type": "string" },
12
+ "hardAllowedActions": {
13
+ "type": "array",
14
+ "items": { "enum": ["ack", "reply", "ask", "silence"] }
15
+ },
16
+ "softChecks": { "type": "array", "items": { "type": "string" } },
17
+ "perceptionHash": { "type": "string" },
18
+ "hash": { "type": "string" }
19
+ }
20
+ }
@@ -0,0 +1,71 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://dingtalk-agent.dev/schemas/task-checkpoint.schema.json",
4
+ "title": "dingtalk-agent Task Checkpoint",
5
+ "type": "object",
6
+ "additionalProperties": false,
7
+ "required": [
8
+ "$schema", "taskId", "scopeId", "status", "revision", "goal", "deliverable",
9
+ "doneWhen", "checkpoint", "nextAction", "waitingFor", "assumptions", "sourceRefs",
10
+ "evidence", "updatedAt", "updatedByRunId"
11
+ ],
12
+ "properties": {
13
+ "$schema": { "const": "dingtalk-agent/task-checkpoint@1" },
14
+ "taskId": { "type": "string", "minLength": 1 },
15
+ "scopeId": { "type": "string", "minLength": 1 },
16
+ "status": { "enum": ["working", "waiting", "verifying", "blocked", "completed", "cancelled"] },
17
+ "revision": { "type": "integer", "minimum": 1 },
18
+ "goal": { "type": "string", "minLength": 1 },
19
+ "deliverable": { "type": "string" },
20
+ "doneWhen": { "type": "string" },
21
+ "checkpoint": { "type": "string" },
22
+ "nextAction": { "type": "string" },
23
+ "waitingFor": {
24
+ "oneOf": [
25
+ { "type": "null" },
26
+ {
27
+ "type": "object",
28
+ "additionalProperties": false,
29
+ "required": ["kind", "condition"],
30
+ "properties": {
31
+ "kind": { "type": "string", "minLength": 1 },
32
+ "subject": { "type": "string" },
33
+ "condition": { "type": "string", "minLength": 1 }
34
+ }
35
+ }
36
+ ]
37
+ },
38
+ "assumptions": { "type": "array", "items": { "type": "string", "minLength": 1 } },
39
+ "sourceRefs": { "type": "array", "items": { "type": "string", "minLength": 1 } },
40
+ "evidence": {
41
+ "description": "Opaque evidenceId references issued into trusted host state; never model-authored verification text.",
42
+ "type": "array",
43
+ "uniqueItems": true,
44
+ "items": { "type": "string", "pattern": "^evd_[a-f0-9]{32}$" }
45
+ },
46
+ "updatedAt": { "type": "string" },
47
+ "updatedByRunId": { "type": "string" }
48
+ },
49
+ "allOf": [
50
+ {
51
+ "if": { "properties": { "status": { "enum": ["verifying", "completed"] } } },
52
+ "then": {
53
+ "properties": {
54
+ "deliverable": { "minLength": 1 },
55
+ "doneWhen": { "minLength": 1 }
56
+ }
57
+ }
58
+ },
59
+ {
60
+ "if": { "properties": { "status": { "const": "completed" } } },
61
+ "then": {
62
+ "properties": {
63
+ "checkpoint": { "minLength": 1 },
64
+ "nextAction": { "const": "" },
65
+ "waitingFor": { "type": "null" },
66
+ "evidence": { "minItems": 1 }
67
+ }
68
+ }
69
+ }
70
+ ]
71
+ }
@@ -0,0 +1,154 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://dingtalk-agent.dev/schemas/task-completion-evidence.schema.json",
4
+ "title": "dingtalk-agent Host-issued Task Completion Evidence",
5
+ "type": "object",
6
+ "additionalProperties": false,
7
+ "required": [
8
+ "$schema", "evidenceId", "kind", "taskId", "scopeId", "sessionId",
9
+ "issuer", "condition", "reference", "observed", "issuedAt"
10
+ ],
11
+ "properties": {
12
+ "$schema": { "const": "dingtalk-agent/task-completion-evidence@1" },
13
+ "evidenceId": { "type": "string", "pattern": "^evd_[a-f0-9]{32}$" },
14
+ "kind": { "enum": ["artifact", "action-receipt", "confirmation"] },
15
+ "taskId": { "type": "string", "minLength": 1 },
16
+ "scopeId": { "type": "string", "minLength": 1 },
17
+ "sessionId": { "type": "string", "minLength": 1 },
18
+ "issuer": {
19
+ "type": "object",
20
+ "additionalProperties": false,
21
+ "required": ["type", "id"],
22
+ "properties": {
23
+ "type": { "enum": ["run", "host"] },
24
+ "id": { "type": "string", "minLength": 1 }
25
+ }
26
+ },
27
+ "condition": {
28
+ "type": "object",
29
+ "additionalProperties": false,
30
+ "required": ["ref", "hash"],
31
+ "properties": {
32
+ "ref": { "const": "doneWhen" },
33
+ "hash": { "$ref": "#/$defs/sha256" }
34
+ }
35
+ },
36
+ "reference": {
37
+ "oneOf": [
38
+ { "$ref": "#/$defs/artifactReference" },
39
+ { "$ref": "#/$defs/actionReceiptReference" },
40
+ { "$ref": "#/$defs/trustedEventConfirmation" },
41
+ { "$ref": "#/$defs/hostConfirmation" }
42
+ ]
43
+ },
44
+ "observed": {
45
+ "type": "object",
46
+ "additionalProperties": false,
47
+ "required": ["status", "hash"],
48
+ "properties": {
49
+ "status": { "enum": ["verified", "confirmed"] },
50
+ "hash": { "$ref": "#/$defs/sha256" }
51
+ }
52
+ },
53
+ "issuedAt": { "type": "string", "format": "date-time" }
54
+ },
55
+ "allOf": [
56
+ {
57
+ "if": { "properties": { "kind": { "const": "artifact" } } },
58
+ "then": {
59
+ "properties": {
60
+ "reference": { "$ref": "#/$defs/artifactReference" },
61
+ "observed": {
62
+ "properties": { "status": { "const": "verified" } }
63
+ }
64
+ }
65
+ }
66
+ },
67
+ {
68
+ "if": { "properties": { "kind": { "const": "action-receipt" } } },
69
+ "then": {
70
+ "properties": {
71
+ "reference": { "$ref": "#/$defs/actionReceiptReference" },
72
+ "observed": {
73
+ "properties": { "status": { "const": "verified" } }
74
+ }
75
+ }
76
+ }
77
+ },
78
+ {
79
+ "if": { "properties": { "kind": { "const": "confirmation" } } },
80
+ "then": {
81
+ "properties": {
82
+ "reference": {
83
+ "oneOf": [
84
+ { "$ref": "#/$defs/trustedEventConfirmation" },
85
+ { "$ref": "#/$defs/hostConfirmation" }
86
+ ]
87
+ },
88
+ "observed": {
89
+ "properties": { "status": { "const": "confirmed" } }
90
+ }
91
+ }
92
+ }
93
+ }
94
+ ],
95
+ "$defs": {
96
+ "sha256": { "type": "string", "pattern": "^[a-f0-9]{64}$" },
97
+ "artifactReference": {
98
+ "type": "object",
99
+ "additionalProperties": false,
100
+ "required": ["type", "locator", "sha256", "bytes"],
101
+ "properties": {
102
+ "type": { "const": "artifact" },
103
+ "locator": {
104
+ "type": "string",
105
+ "minLength": 1,
106
+ "not": { "pattern": "(^/)|(^|[\\\\/])\\.\\.([\\\\/]|$)" }
107
+ },
108
+ "sha256": { "$ref": "#/$defs/sha256" },
109
+ "bytes": { "type": "integer", "minimum": 0 }
110
+ }
111
+ },
112
+ "actionReceiptReference": {
113
+ "type": "object",
114
+ "additionalProperties": false,
115
+ "required": [
116
+ "type", "runId", "actionId", "action", "receiptHash",
117
+ "completedAt", "validUntil"
118
+ ],
119
+ "properties": {
120
+ "type": { "const": "action-receipt" },
121
+ "runId": { "type": "string", "pattern": "^run_[a-f0-9]{20}$" },
122
+ "actionId": { "type": "string", "pattern": "^act_[a-f0-9]{20}$" },
123
+ "action": { "const": "reply" },
124
+ "receiptHash": { "$ref": "#/$defs/sha256" },
125
+ "completedAt": { "type": "string", "format": "date-time" },
126
+ "validUntil": { "type": "string", "format": "date-time" }
127
+ }
128
+ },
129
+ "trustedEventConfirmation": {
130
+ "type": "object",
131
+ "additionalProperties": false,
132
+ "required": ["type", "source", "confirmationId", "eventId", "recordHash"],
133
+ "properties": {
134
+ "type": { "const": "confirmation" },
135
+ "source": { "const": "trusted-event" },
136
+ "confirmationId": { "type": "string", "minLength": 1 },
137
+ "eventId": { "type": "string", "minLength": 1 },
138
+ "recordHash": { "$ref": "#/$defs/sha256" }
139
+ }
140
+ },
141
+ "hostConfirmation": {
142
+ "type": "object",
143
+ "additionalProperties": false,
144
+ "required": ["type", "source", "confirmationId", "hostIdentity", "recordHash"],
145
+ "properties": {
146
+ "type": { "const": "confirmation" },
147
+ "source": { "const": "host-record" },
148
+ "confirmationId": { "type": "string", "minLength": 1 },
149
+ "hostIdentity": { "type": "string", "minLength": 1 },
150
+ "recordHash": { "$ref": "#/$defs/sha256" }
151
+ }
152
+ }
153
+ }
154
+ }
@@ -0,0 +1,56 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://github.com/D1-2004/dingtalk-agent/docs/schemas/workspace-doctor.schema.json",
4
+ "title": "dingtalk-agent Development Workspace Doctor",
5
+ "type": "object",
6
+ "additionalProperties": false,
7
+ "required": [
8
+ "$schema", "ready", "workspace", "provider", "desiredHash", "observedHash",
9
+ "status", "checks", "missing", "configSources", "sideEffect", "dingtalkSideEffect"
10
+ ],
11
+ "properties": {
12
+ "$schema": { "const": "dingtalk-agent/workspace-doctor@1" },
13
+ "ready": { "type": "boolean" },
14
+ "workspace": { "type": "string", "minLength": 1 },
15
+ "provider": { "enum": ["opencode", "multica", "local-prepared"] },
16
+ "desiredHash": { "type": "string", "pattern": "^[a-f0-9]{64}$" },
17
+ "observedHash": { "type": "string" },
18
+ "status": {
19
+ "enum": [
20
+ "declared", "resolving", "planned", "applying", "verifying",
21
+ "ready", "drifted", "failed", "retired"
22
+ ]
23
+ },
24
+ "checks": {
25
+ "type": "array",
26
+ "items": {
27
+ "type": "object",
28
+ "additionalProperties": false,
29
+ "required": ["id", "surface", "level", "blocking", "summary", "evidence"],
30
+ "properties": {
31
+ "id": { "type": "string", "minLength": 1 },
32
+ "surface": {
33
+ "enum": ["project", "provider", "definition", "skills", "storage", "authority", "state"]
34
+ },
35
+ "level": { "enum": ["pass", "warn", "fail"] },
36
+ "blocking": { "type": "boolean" },
37
+ "summary": { "type": "string", "minLength": 1 },
38
+ "evidence": { "type": "object" },
39
+ "fix": { "type": "string", "minLength": 1 }
40
+ }
41
+ }
42
+ },
43
+ "missing": {
44
+ "type": "array",
45
+ "uniqueItems": true,
46
+ "items": { "type": "string", "minLength": 1 }
47
+ },
48
+ "configSources": {
49
+ "type": "array",
50
+ "uniqueItems": true,
51
+ "items": { "type": "string", "minLength": 1 }
52
+ },
53
+ "sideEffect": { "const": false },
54
+ "dingtalkSideEffect": { "const": false }
55
+ }
56
+ }
@@ -0,0 +1,39 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://github.com/D1-2004/dingtalk-agent/docs/schemas/workspace-state.schema.json",
4
+ "title": "dingtalk-agent Development Workspace State",
5
+ "type": "object",
6
+ "additionalProperties": false,
7
+ "required": [
8
+ "$schema", "workspace", "provider", "status", "binding", "desiredHash",
9
+ "observedHash", "lastPlanId", "lastReceiptId", "lastEvalId"
10
+ ],
11
+ "properties": {
12
+ "$schema": { "const": "dingtalk-agent/workspace-state@1" },
13
+ "workspace": {
14
+ "type": "string",
15
+ "pattern": "^[a-z0-9](?:[a-z0-9._-]{0,62}[a-z0-9])?$"
16
+ },
17
+ "provider": { "enum": ["opencode", "multica"] },
18
+ "status": {
19
+ "enum": [
20
+ "declared", "resolving", "planned", "applying", "verifying",
21
+ "ready", "drifted", "failed", "retired"
22
+ ]
23
+ },
24
+ "binding": {
25
+ "type": "object",
26
+ "propertyNames": {
27
+ "not": {
28
+ "pattern": "([sS][eE][cC][rR][eE][tT]|[tT][oO][kK][eE][nN]|[cC][oO][oO][kK][iI][eE]|[pP][aA][sS][sS][wW][oO][rR][dD]|[cC][rR][eE][dD][eE][nN][tT][iI][aA][lL][sS]?)$"
29
+ }
30
+ },
31
+ "additionalProperties": { "type": "string" }
32
+ },
33
+ "desiredHash": { "type": "string", "pattern": "^[a-f0-9]{64}$" },
34
+ "observedHash": { "type": "string" },
35
+ "lastPlanId": { "type": "string" },
36
+ "lastReceiptId": { "type": "string" },
37
+ "lastEvalId": { "type": "string" }
38
+ }
39
+ }