@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,112 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://github.com/D1-2004/dingtalk-agent/docs/schemas/project.schema.json",
4
+ "title": "dingtalk-agent Agent Project",
5
+ "type": "object",
6
+ "additionalProperties": false,
7
+ "required": ["$schema", "name", "dtaVersion", "agent", "workspaces"],
8
+ "properties": {
9
+ "$schema": { "const": "dingtalk-agent/project@1" },
10
+ "name": { "$ref": "#/$defs/name" },
11
+ "dtaVersion": { "type": "string", "minLength": 1 },
12
+ "agent": {
13
+ "type": "object",
14
+ "additionalProperties": false,
15
+ "required": ["definition", "skills"],
16
+ "properties": {
17
+ "definition": { "type": "string", "minLength": 1 },
18
+ "skills": {
19
+ "type": "array",
20
+ "minItems": 1,
21
+ "uniqueItems": true,
22
+ "contains": { "const": "dingtalk-basic-behavior" },
23
+ "items": { "$ref": "#/$defs/name" }
24
+ }
25
+ }
26
+ },
27
+ "workspaces": {
28
+ "type": "object",
29
+ "propertyNames": {
30
+ "allOf": [
31
+ { "$ref": "#/$defs/name" },
32
+ { "not": { "const": "legacy-prepared" } }
33
+ ]
34
+ },
35
+ "additionalProperties": { "$ref": "#/$defs/workspace" }
36
+ }
37
+ },
38
+ "$defs": {
39
+ "name": {
40
+ "type": "string",
41
+ "pattern": "^[a-z0-9](?:[a-z0-9._-]{0,62}[a-z0-9])?$"
42
+ },
43
+ "envRef": {
44
+ "type": "string",
45
+ "pattern": "^env:[A-Z_][A-Z0-9_]*$"
46
+ },
47
+ "storage": {
48
+ "type": "object",
49
+ "additionalProperties": false,
50
+ "required": ["memory", "knowledge"],
51
+ "properties": {
52
+ "memory": { "type": "string", "pattern": "^(local-md|dingtalk-doc):.+$" },
53
+ "knowledge": { "type": "string", "pattern": "^(local-md|dingtalk-doc):.+$" },
54
+ "artifacts": { "type": "string", "pattern": "^local-dir:.+$" }
55
+ }
56
+ },
57
+ "authority": {
58
+ "type": "object",
59
+ "additionalProperties": false,
60
+ "required": ["dwsProfileFrom", "expectedUserIdFrom"],
61
+ "properties": {
62
+ "dwsProfileFrom": { "$ref": "#/$defs/envRef" },
63
+ "expectedUserIdFrom": { "$ref": "#/$defs/envRef" }
64
+ }
65
+ },
66
+ "opencodeProvider": {
67
+ "type": "object",
68
+ "additionalProperties": false,
69
+ "required": ["kind", "model"],
70
+ "properties": {
71
+ "kind": { "const": "opencode" },
72
+ "model": { "type": "string", "minLength": 1 }
73
+ }
74
+ },
75
+ "multicaProvider": {
76
+ "type": "object",
77
+ "additionalProperties": false,
78
+ "required": ["kind", "profile", "workspaceIdFrom", "runtimeIdFrom"],
79
+ "properties": {
80
+ "kind": { "const": "multica" },
81
+ "profile": { "type": "string", "minLength": 1 },
82
+ "workspaceIdFrom": { "$ref": "#/$defs/envRef" },
83
+ "runtimeIdFrom": { "$ref": "#/$defs/envRef" },
84
+ "agentIdFrom": { "$ref": "#/$defs/envRef" }
85
+ }
86
+ },
87
+ "workspace": {
88
+ "type": "object",
89
+ "additionalProperties": false,
90
+ "required": ["stage", "provider", "storage"],
91
+ "properties": {
92
+ "stage": { "enum": ["dev", "test", "staging", "prod"] },
93
+ "provider": {
94
+ "oneOf": [
95
+ { "$ref": "#/$defs/opencodeProvider" },
96
+ { "$ref": "#/$defs/multicaProvider" }
97
+ ]
98
+ },
99
+ "storage": { "$ref": "#/$defs/storage" },
100
+ "authority": { "$ref": "#/$defs/authority" }
101
+ },
102
+ "allOf": [
103
+ {
104
+ "if": {
105
+ "properties": { "provider": { "properties": { "kind": { "const": "multica" } } } }
106
+ },
107
+ "then": { "required": ["authority"] }
108
+ }
109
+ ]
110
+ }
111
+ }
112
+ }
@@ -0,0 +1,36 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://github.com/D1-2004/dingtalk-agent/docs/schemas/promotion-list.schema.json",
4
+ "title": "dingtalk-agent Promotion List",
5
+ "type": "object",
6
+ "additionalProperties": false,
7
+ "required": ["$schema", "promotions", "remoteRead", "remoteWrite", "localWrite", "triggerWrite", "sideEffect", "dingtalkSideEffect"],
8
+ "properties": {
9
+ "$schema": { "const": "dingtalk-agent/promotion-list@1" },
10
+ "promotions": {
11
+ "type": "array",
12
+ "items": {
13
+ "type": "object",
14
+ "additionalProperties": false,
15
+ "required": ["promotionId", "receiptId", "routeId", "status", "passed", "sourceHash", "evalEvidenceHash", "deploymentHash", "observedHash"],
16
+ "properties": {
17
+ "promotionId": { "$ref": "promotion-plan.schema.json#/$defs/id" },
18
+ "receiptId": { "$ref": "promotion-plan.schema.json#/$defs/id" },
19
+ "routeId": { "$ref": "promotion-plan.schema.json#/$defs/name" },
20
+ "status": { "enum": ["promoted", "verifying", "failed"] },
21
+ "passed": { "type": "boolean" },
22
+ "sourceHash": { "$ref": "promotion-plan.schema.json#/$defs/hash" },
23
+ "evalEvidenceHash": { "$ref": "promotion-plan.schema.json#/$defs/hash" },
24
+ "deploymentHash": { "$ref": "promotion-plan.schema.json#/$defs/hash" },
25
+ "observedHash": { "$ref": "promotion-plan.schema.json#/$defs/hash" }
26
+ }
27
+ }
28
+ },
29
+ "remoteRead": { "const": false },
30
+ "remoteWrite": { "const": false },
31
+ "localWrite": { "const": false },
32
+ "triggerWrite": { "const": false },
33
+ "sideEffect": { "const": false },
34
+ "dingtalkSideEffect": { "const": false }
35
+ }
36
+ }
@@ -0,0 +1,60 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://github.com/D1-2004/dingtalk-agent/docs/schemas/promotion-plan.schema.json",
4
+ "title": "dingtalk-agent Promotion Plan",
5
+ "type": "object",
6
+ "additionalProperties": false,
7
+ "required": ["$schema", "planId", "routeId", "policyPath", "policyHash", "source", "eval", "target", "deployment", "blocking", "requiresPlanId", "requiresExplicitYes", "remoteRead", "remoteWrite", "localWrite", "triggerWrite", "sideEffect", "dingtalkSideEffect"],
8
+ "properties": {
9
+ "$schema": { "const": "dingtalk-agent/promotion-plan@1" },
10
+ "planId": { "$ref": "#/$defs/id" }, "routeId": { "$ref": "#/$defs/name" },
11
+ "policyPath": { "type": "string", "minLength": 1 }, "policyHash": { "$ref": "#/$defs/hash" },
12
+ "source": { "$ref": "#/$defs/source" }, "eval": { "$ref": "#/$defs/eval" },
13
+ "target": { "$ref": "#/$defs/target" },
14
+ "deployment": { "$ref": "multica-deployment-plan.schema.json" },
15
+ "blocking": { "type": "array", "uniqueItems": true, "items": { "type": "string", "minLength": 1 } },
16
+ "requiresPlanId": { "const": true }, "requiresExplicitYes": { "const": true },
17
+ "remoteRead": { "const": false }, "remoteWrite": { "const": false }, "localWrite": { "const": false },
18
+ "triggerWrite": { "const": false }, "sideEffect": { "const": false }, "dingtalkSideEffect": { "const": false }
19
+ },
20
+ "$defs": {
21
+ "id": { "type": "string", "pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]{1,127}$" },
22
+ "name": { "type": "string", "pattern": "^[a-z0-9](?:[a-z0-9._-]{0,62}[a-z0-9])?$" },
23
+ "hash": { "type": "string", "pattern": "^[a-f0-9]{64}$" },
24
+ "source": {
25
+ "type": "object", "additionalProperties": false,
26
+ "required": ["workspace", "stage", "sourceHash", "desiredHash", "observedHash", "definitionHash", "skills"],
27
+ "properties": {
28
+ "workspace": { "$ref": "#/$defs/name" }, "stage": { "enum": ["dev", "test", "staging", "prod"] },
29
+ "sourceHash": { "$ref": "#/$defs/hash" }, "desiredHash": { "$ref": "#/$defs/hash" },
30
+ "observedHash": { "$ref": "#/$defs/hash" }, "definitionHash": { "$ref": "#/$defs/hash" },
31
+ "skills": { "type": "array", "minItems": 2, "items": { "type": "object", "additionalProperties": false, "required": ["name", "hash"], "properties": { "name": { "$ref": "#/$defs/name" }, "hash": { "$ref": "#/$defs/hash" } } } }
32
+ }
33
+ },
34
+ "eval": {
35
+ "type": "object", "additionalProperties": false,
36
+ "required": ["runId", "evidencePath", "evidenceHash", "planHash", "suiteHash", "reportHash", "suiteId", "model", "runs", "configurations", "caseIds", "requiredSurfaces", "loadGate", "hardGate", "falseCompletionGate", "behaviorGate"],
37
+ "properties": {
38
+ "runId": { "type": "string" }, "evidencePath": { "type": "string" },
39
+ "evidenceHash": { "$ref": "#/$defs/hash" }, "planHash": { "$ref": "#/$defs/hash" },
40
+ "suiteHash": { "$ref": "#/$defs/hash" }, "reportHash": { "$ref": "#/$defs/hash" },
41
+ "suiteId": { "type": "string" }, "model": { "type": "string" },
42
+ "runs": { "type": "integer", "minimum": 0, "maximum": 10 },
43
+ "configurations": { "type": "array", "uniqueItems": true, "items": { "type": "string" } },
44
+ "caseIds": { "type": "array", "uniqueItems": true, "items": { "$ref": "#/$defs/name" } },
45
+ "requiredSurfaces": { "type": "array", "uniqueItems": true, "items": { "enum": ["response", "filesystem", "workspace", "artifact"] } },
46
+ "loadGate": { "type": "boolean" }, "hardGate": { "type": "boolean" },
47
+ "falseCompletionGate": { "type": "boolean" }, "behaviorGate": { "type": "boolean" }
48
+ }
49
+ },
50
+ "target": {
51
+ "type": "object", "additionalProperties": false,
52
+ "required": ["workspace", "stage", "desiredHash", "deploymentHash", "deploymentPlanId"],
53
+ "properties": {
54
+ "workspace": { "$ref": "#/$defs/name" }, "stage": { "enum": ["dev", "test", "staging", "prod"] },
55
+ "desiredHash": { "$ref": "#/$defs/hash" }, "deploymentHash": { "$ref": "#/$defs/hash" },
56
+ "deploymentPlanId": { "$ref": "#/$defs/id" }
57
+ }
58
+ }
59
+ }
60
+ }
@@ -0,0 +1,29 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://github.com/D1-2004/dingtalk-agent/docs/schemas/promotion-policy.schema.json",
4
+ "title": "dingtalk-agent Promotion Policy",
5
+ "type": "object",
6
+ "additionalProperties": false,
7
+ "required": ["$schema", "routes"],
8
+ "properties": {
9
+ "$schema": { "const": "dingtalk-agent/promotion-policy@1" },
10
+ "routes": {
11
+ "type": "array", "minItems": 1, "maxItems": 32,
12
+ "items": {
13
+ "type": "object", "additionalProperties": false,
14
+ "required": ["id", "fromWorkspace", "toWorkspace", "suite", "minimumRuns", "requiredCases", "requiredSurfaces", "requireBehaviorGate"],
15
+ "properties": {
16
+ "id": { "$ref": "#/$defs/name" },
17
+ "fromWorkspace": { "$ref": "#/$defs/name" },
18
+ "toWorkspace": { "$ref": "#/$defs/name" },
19
+ "suite": { "type": "string", "minLength": 1 },
20
+ "minimumRuns": { "type": "integer", "minimum": 1, "maximum": 10 },
21
+ "requiredCases": { "type": "array", "minItems": 1, "maxItems": 30, "uniqueItems": true, "items": { "$ref": "#/$defs/name" } },
22
+ "requiredSurfaces": { "type": "array", "minItems": 1, "uniqueItems": true, "items": { "enum": ["response", "filesystem", "workspace", "artifact"] } },
23
+ "requireBehaviorGate": { "type": "boolean" }
24
+ }
25
+ }
26
+ }
27
+ },
28
+ "$defs": { "name": { "type": "string", "pattern": "^[a-z0-9](?:[a-z0-9._-]{0,62}[a-z0-9])?$" } }
29
+ }
@@ -0,0 +1,43 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://github.com/D1-2004/dingtalk-agent/docs/schemas/promotion-receipt.schema.json",
4
+ "title": "dingtalk-agent Promotion Receipt",
5
+ "type": "object",
6
+ "additionalProperties": false,
7
+ "required": ["$schema", "promotionId", "receiptId", "planId", "routeId", "policyHash", "status", "passed", "idempotent", "source", "eval", "target", "linkHash", "failures", "evidencePath", "remoteRead", "remoteWrite", "localWrite", "triggerWrite", "sideEffect", "dingtalkSideEffect"],
8
+ "properties": {
9
+ "$schema": { "const": "dingtalk-agent/promotion-receipt@1" },
10
+ "promotionId": { "$ref": "promotion-plan.schema.json#/$defs/id" },
11
+ "receiptId": { "$ref": "promotion-plan.schema.json#/$defs/id" },
12
+ "planId": { "$ref": "promotion-plan.schema.json#/$defs/id" },
13
+ "routeId": { "$ref": "promotion-plan.schema.json#/$defs/name" },
14
+ "policyHash": { "$ref": "promotion-plan.schema.json#/$defs/hash" },
15
+ "status": { "enum": ["promoted", "verifying", "failed"] }, "passed": { "type": "boolean" },
16
+ "idempotent": { "type": "boolean" },
17
+ "source": { "$ref": "promotion-plan.schema.json#/$defs/source" },
18
+ "eval": { "$ref": "promotion-plan.schema.json#/$defs/eval" },
19
+ "target": {
20
+ "type": "object",
21
+ "additionalProperties": false,
22
+ "required": ["workspace", "stage", "desiredHash", "deploymentHash", "deploymentPlanId", "deploymentReceiptId", "deploymentOperationId", "deploymentReceiptPath", "deploymentReceiptHash", "observedHash"],
23
+ "properties": {
24
+ "workspace": { "$ref": "promotion-plan.schema.json#/$defs/name" },
25
+ "stage": { "enum": ["dev", "test", "staging", "prod"] },
26
+ "desiredHash": { "$ref": "promotion-plan.schema.json#/$defs/hash" },
27
+ "deploymentHash": { "$ref": "promotion-plan.schema.json#/$defs/hash" },
28
+ "deploymentPlanId": { "$ref": "promotion-plan.schema.json#/$defs/id" },
29
+ "deploymentReceiptId": { "$ref": "promotion-plan.schema.json#/$defs/id" },
30
+ "deploymentOperationId": { "$ref": "promotion-plan.schema.json#/$defs/id" },
31
+ "deploymentReceiptPath": { "type": "string", "minLength": 1 },
32
+ "deploymentReceiptHash": { "$ref": "promotion-plan.schema.json#/$defs/hash" },
33
+ "observedHash": { "$ref": "promotion-plan.schema.json#/$defs/hash" }
34
+ }
35
+ },
36
+ "linkHash": { "$ref": "promotion-plan.schema.json#/$defs/hash" },
37
+ "failures": { "type": "array", "items": { "type": "string" } },
38
+ "evidencePath": { "type": "string", "minLength": 1 },
39
+ "remoteRead": { "type": "boolean" }, "remoteWrite": { "type": "boolean" }, "localWrite": { "const": true },
40
+ "triggerWrite": { "const": false }, "sideEffect": { "enum": ["multica-read-write", "multica-read", "none"] },
41
+ "dingtalkSideEffect": { "const": false }
42
+ }
43
+ }
@@ -0,0 +1,23 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://github.com/D1-2004/dingtalk-agent/docs/schemas/promotion-status.schema.json",
4
+ "title": "dingtalk-agent Promotion Status",
5
+ "type": "object",
6
+ "additionalProperties": false,
7
+ "required": ["$schema", "available", "promotionId", "status", "passed", "integrity", "receipt", "remoteRead", "remoteWrite", "localWrite", "triggerWrite", "sideEffect", "dingtalkSideEffect"],
8
+ "properties": {
9
+ "$schema": { "const": "dingtalk-agent/promotion-status@1" },
10
+ "available": { "type": "boolean" },
11
+ "promotionId": { "type": "string" },
12
+ "status": { "enum": ["promoted", "verifying", "failed", "missing"] },
13
+ "passed": { "type": "boolean" },
14
+ "integrity": { "type": "boolean" },
15
+ "receipt": { "oneOf": [{ "$ref": "promotion-receipt.schema.json" }, { "type": "null" }] },
16
+ "remoteRead": { "const": false },
17
+ "remoteWrite": { "const": false },
18
+ "localWrite": { "const": false },
19
+ "triggerWrite": { "const": false },
20
+ "sideEffect": { "const": false },
21
+ "dingtalkSideEffect": { "const": false }
22
+ }
23
+ }
@@ -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
+ }