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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (212) hide show
  1. package/CHANGELOG.md +35 -0
  2. package/README.en.md +395 -0
  3. package/README.md +466 -35
  4. package/dist/bin/dingtalk-agent.js +1058 -10
  5. package/dist/bin/dingtalk-agent.js.map +1 -1
  6. package/dist/src/actions.js +98 -14
  7. package/dist/src/actions.js.map +1 -1
  8. package/dist/src/agent-audit.js +460 -0
  9. package/dist/src/agent-audit.js.map +1 -0
  10. package/dist/src/agent-bindings.js +132 -0
  11. package/dist/src/agent-bindings.js.map +1 -0
  12. package/dist/src/agent-definition.js +182 -0
  13. package/dist/src/agent-definition.js.map +1 -0
  14. package/dist/src/agent-enhance.js +678 -0
  15. package/dist/src/agent-enhance.js.map +1 -0
  16. package/dist/src/bootstrap.js +125 -17
  17. package/dist/src/bootstrap.js.map +1 -1
  18. package/dist/src/development-workspace.js +729 -0
  19. package/dist/src/development-workspace.js.map +1 -0
  20. package/dist/src/dws.js +145 -0
  21. package/dist/src/dws.js.map +1 -1
  22. package/dist/src/eval-evidence.js +193 -0
  23. package/dist/src/eval-evidence.js.map +1 -0
  24. package/dist/src/invocation.js +36 -0
  25. package/dist/src/invocation.js.map +1 -0
  26. package/dist/src/lab.js +679 -0
  27. package/dist/src/lab.js.map +1 -0
  28. package/dist/src/lease.js +100 -0
  29. package/dist/src/lease.js.map +1 -0
  30. package/dist/src/memory/candidates.js +451 -0
  31. package/dist/src/memory/candidates.js.map +1 -0
  32. package/dist/src/memory/completion-evidence.js +536 -0
  33. package/dist/src/memory/completion-evidence.js.map +1 -0
  34. package/dist/src/memory/operational.js +263 -0
  35. package/dist/src/memory/operational.js.map +1 -0
  36. package/dist/src/memory/remote-state.js +478 -0
  37. package/dist/src/memory/remote-state.js.map +1 -0
  38. package/dist/src/memory/task-checkpoints.js +204 -0
  39. package/dist/src/memory/task-checkpoints.js.map +1 -0
  40. package/dist/src/multica-deploy.js +1480 -0
  41. package/dist/src/multica-deploy.js.map +1 -0
  42. package/dist/src/multica-provider.js +685 -0
  43. package/dist/src/multica-provider.js.map +1 -0
  44. package/dist/src/opencode-evals.js +1062 -0
  45. package/dist/src/opencode-evals.js.map +1 -0
  46. package/dist/src/opencode-provider.js +531 -0
  47. package/dist/src/opencode-provider.js.map +1 -0
  48. package/dist/src/opencode-workspace.js +197 -0
  49. package/dist/src/opencode-workspace.js.map +1 -0
  50. package/dist/src/perception.js +225 -0
  51. package/dist/src/perception.js.map +1 -0
  52. package/dist/src/personal-event-evals.js +595 -0
  53. package/dist/src/personal-event-evals.js.map +1 -0
  54. package/dist/src/promotion.js +786 -0
  55. package/dist/src/promotion.js.map +1 -0
  56. package/dist/src/remote-semantic-state-live-evals.js +888 -0
  57. package/dist/src/remote-semantic-state-live-evals.js.map +1 -0
  58. package/dist/src/remote-semantic-state-worker.js +38 -0
  59. package/dist/src/remote-semantic-state-worker.js.map +1 -0
  60. package/dist/src/remote-state-evals.js +501 -0
  61. package/dist/src/remote-state-evals.js.map +1 -0
  62. package/dist/src/response-gate.js +51 -0
  63. package/dist/src/response-gate.js.map +1 -0
  64. package/dist/src/robot-evals.js +770 -0
  65. package/dist/src/robot-evals.js.map +1 -0
  66. package/dist/src/sessions.js +66 -105
  67. package/dist/src/sessions.js.map +1 -1
  68. package/dist/src/skill-manager.js +25 -16
  69. package/dist/src/skill-manager.js.map +1 -1
  70. package/dist/src/skills.js.map +1 -1
  71. package/dist/src/storage-evals.js +26 -0
  72. package/dist/src/storage-evals.js.map +1 -0
  73. package/dist/src/types.js.map +1 -1
  74. package/dist/src/waits.js +5 -1
  75. package/dist/src/waits.js.map +1 -1
  76. package/dist/src/workspace.js +28 -3
  77. package/dist/src/workspace.js.map +1 -1
  78. package/docs/INSTALLATION.md +47 -0
  79. package/docs/SECOND-AGENT-ACCEPTANCE.md +62 -0
  80. package/docs/architecture/agent-memory-topology.png +0 -0
  81. package/docs/architecture/agent-memory-topology.svg +132 -0
  82. package/docs/architecture/general-agent-kernel-topology.png +0 -0
  83. package/docs/architecture/general-agent-kernel-topology.svg +149 -0
  84. package/docs/architecture/provider-bound-development-workspace.png +0 -0
  85. package/docs/architecture/provider-bound-development-workspace.svg +141 -0
  86. package/docs/architecture/task-completion-gate.png +0 -0
  87. package/docs/architecture/task-completion-gate.svg +191 -0
  88. package/docs/schemas/agent-audit-load-evidence.schema.json +14 -0
  89. package/docs/schemas/agent-audit.schema.json +92 -0
  90. package/docs/schemas/agent-bindings.schema.json +54 -0
  91. package/docs/schemas/agent-definition.schema.json +78 -0
  92. package/docs/schemas/agent-enhancement-plan.schema.json +88 -0
  93. package/docs/schemas/agent-enhancement-receipt.schema.json +37 -0
  94. package/docs/schemas/enriched-invocation.schema.json +46 -0
  95. package/docs/schemas/eval-candidate-plan.schema.json +28 -0
  96. package/docs/schemas/eval-candidate-result.schema.json +20 -0
  97. package/docs/schemas/eval-candidate.schema.json +30 -0
  98. package/docs/schemas/invocation.schema.json +19 -0
  99. package/docs/schemas/memory-candidate-proposal.schema.json +18 -0
  100. package/docs/schemas/memory-candidate.schema.json +76 -0
  101. package/docs/schemas/memory-publish-target.schema.json +25 -0
  102. package/docs/schemas/multica-deployment-list.schema.json +29 -0
  103. package/docs/schemas/multica-deployment-operation.schema.json +51 -0
  104. package/docs/schemas/multica-deployment-plan.schema.json +70 -0
  105. package/docs/schemas/multica-deployment-receipt.schema.json +87 -0
  106. package/docs/schemas/multica-deployment-status.schema.json +23 -0
  107. package/docs/schemas/multica-workspace-inspection.schema.json +77 -0
  108. package/docs/schemas/multica-workspace-plan.schema.json +68 -0
  109. package/docs/schemas/multica-workspace-resource-list.schema.json +27 -0
  110. package/docs/schemas/multica-workspace-status.schema.json +34 -0
  111. package/docs/schemas/observation.schema.json +21 -0
  112. package/docs/schemas/operational-memory-provider.schema.json +36 -0
  113. package/docs/schemas/operational-memory-record.schema.json +24 -0
  114. package/docs/schemas/perception-input.schema.json +56 -0
  115. package/docs/schemas/project.schema.json +112 -0
  116. package/docs/schemas/promotion-list.schema.json +36 -0
  117. package/docs/schemas/promotion-plan.schema.json +60 -0
  118. package/docs/schemas/promotion-policy.schema.json +29 -0
  119. package/docs/schemas/promotion-receipt.schema.json +43 -0
  120. package/docs/schemas/promotion-status.schema.json +23 -0
  121. package/docs/schemas/release-readiness.schema.json +65 -0
  122. package/docs/schemas/remote-semantic-state-live-eval.schema.json +60 -0
  123. package/docs/schemas/remote-semantic-state-manifest.schema.json +79 -0
  124. package/docs/schemas/remote-semantic-state-provider.schema.json +98 -0
  125. package/docs/schemas/response-gate.schema.json +20 -0
  126. package/docs/schemas/task-checkpoint.schema.json +71 -0
  127. package/docs/schemas/task-completion-evidence.schema.json +154 -0
  128. package/docs/schemas/workspace-doctor.schema.json +56 -0
  129. package/docs/schemas/workspace-state.schema.json +39 -0
  130. package/evals/baselines/2026-07-16/opencode-basic-010-completion-summary.json +123 -0
  131. package/evals/baselines/2026-07-16/opencode-basic-skill-required-summary.json +69 -0
  132. package/evals/baselines/2026-07-16/opencode-multi-surface-summary.json +63 -0
  133. package/evals/baselines/2026-07-16/remote-state-live-summary.json +70 -0
  134. package/evals/baselines/2026-07-17/agent-enhance-opencode-dogfood-summary.json +98 -0
  135. package/evals/baselines/2026-07-17/personal-event-live-readiness-summary.json +68 -0
  136. package/examples/agents/fde-coach/AGENTS.md +26 -0
  137. package/examples/agents/fde-coach/MEMORY.md +3 -0
  138. package/examples/agents/fde-coach/fields/default/field.json +24 -0
  139. package/examples/agents/fde-coach/knowledge/INDEX.md +4 -0
  140. package/examples/agents/fde-coach/skills/fde-coach/SKILL.md +13 -0
  141. package/examples/agents/release-manager/AGENTS.md +26 -0
  142. package/examples/agents/release-manager/MEMORY.md +3 -0
  143. package/examples/agents/release-manager/fields/default/field.json +24 -0
  144. package/examples/agents/release-manager/knowledge/INDEX.md +4 -0
  145. package/examples/agents/release-manager/skills/release-manager/SKILL.md +13 -0
  146. package/lab/README.md +109 -0
  147. package/lab/agent-eval/catalog.json +91 -0
  148. package/lab/agent-eval/classic-failures.json +177 -0
  149. package/lab/agent-eval/completion-gate-regression.json +99 -0
  150. package/lab/agent-eval/personal-event-live.example.json +94 -0
  151. package/lab/agent-eval/remote-semantic-state-live.example.json +70 -0
  152. package/lab/agent-eval/remote-semantic-state-provider.fixture.json +47 -0
  153. package/lab/agent-eval/remote-state-workspace/AGENTS.md +8 -0
  154. package/lab/agent-eval/remote-state-workspace/opencode.json +7 -0
  155. package/lab/agent-eval/remote-state-workspace/skills/remote-state-operator/SKILL.md +13 -0
  156. package/lab/agent-eval/remote-state.example.json +31 -0
  157. package/lab/agent-eval/workspace/AGENTS.md +7 -0
  158. package/lab/agent-eval/workspace/MEMORY.md +4 -0
  159. package/lab/agent-eval/workspace/artifacts/pending-review.md +3 -0
  160. package/lab/agent-eval/workspace/knowledge/INDEX.md +4 -0
  161. package/lab/agent-eval/workspace/opencode.json +20 -0
  162. package/lab/manifest.example.json +27 -0
  163. package/lab/manifest.personal-event.example.json +27 -0
  164. package/lab/project-workspace/README.md +11 -0
  165. package/lab/project-workspace/fake-multica-provider.mjs +266 -0
  166. package/lab/project-workspace/multica-deploy.fixture.json +29 -0
  167. package/lab/project-workspace/multica-readonly.fixture.json +69 -0
  168. package/lab/project-workspace/observation.fixture.json +14 -0
  169. package/lab/project-workspace/opencode-provider-suite.json +65 -0
  170. package/lab/project-workspace/project.fixture.json +44 -0
  171. package/lab/project-workspace/promotion-policy.fixture.json +15 -0
  172. package/lab/robot-eval/pool.example.json +30 -0
  173. package/lab/robot-eval/suite.json +123 -0
  174. package/lab/robot-eval/workspace/AGENTS.md +21 -0
  175. package/lab/robot-eval/workspace/MEMORY.md +3 -0
  176. package/lab/robot-eval/workspace/knowledge/INDEX.md +5 -0
  177. package/lab/robot-eval/workspace/opencode.json +22 -0
  178. package/lab/schemas/agent-eval-catalog.schema.json +47 -0
  179. package/lab/schemas/lab-manifest.schema.json +70 -0
  180. package/lab/schemas/personal-event-eval.schema.json +91 -0
  181. package/lab/schemas/remote-state-eval.schema.json +66 -0
  182. package/lab/schemas/robot-eval-suite.schema.json +184 -0
  183. package/lab/schemas/robot-pool.schema.json +56 -0
  184. package/package.json +21 -3
  185. package/skills/dingtalk-agent-boot-multica/SKILL.md +40 -0
  186. package/skills/dingtalk-agent-compose/SKILL.md +110 -0
  187. package/skills/dingtalk-agent-compose/assets/AGENTS.template.md +26 -0
  188. package/skills/dingtalk-agent-compose/assets/agent.bindings.dingtalk-doc.template.json +13 -0
  189. package/skills/dingtalk-agent-compose/assets/agent.bindings.local.template.json +13 -0
  190. package/skills/dingtalk-agent-compose/assets/opencode.template.json +12 -0
  191. package/skills/dingtalk-agent-compose/assets/role-skill.template.md +24 -0
  192. package/skills/dingtalk-agent-compose/evals/evals.json +94 -0
  193. package/skills/dingtalk-agent-compose/references/agent-definition-contract.md +55 -0
  194. package/skills/dingtalk-agent-compose/references/opencode-host-contract.md +65 -0
  195. package/skills/dingtalk-agent-compose/references/storage-routing.md +20 -0
  196. package/skills/dingtalk-agent-deploy/SKILL.md +60 -0
  197. package/skills/dingtalk-agent-deploy/references/multica-deployment-contract.md +49 -0
  198. package/skills/dingtalk-agent-deploy/references/promotion-observation-contract.md +49 -0
  199. package/skills/dingtalk-agent-eval/SKILL.md +116 -0
  200. package/skills/dingtalk-agent-eval/assets/eval-catalog.template.json +18 -0
  201. package/skills/dingtalk-agent-eval/evals/evals.json +61 -0
  202. package/skills/dingtalk-agent-eval/references/eval-topology.md +34 -0
  203. package/skills/dingtalk-agent-eval/references/evidence-contract.md +31 -0
  204. package/skills/dingtalk-agent-eval/references/scenario-taxonomy.md +25 -0
  205. package/skills/dingtalk-agent-eval/references/storage-modes.md +75 -0
  206. package/skills/dingtalk-basic-behavior/SKILL.md +63 -3
  207. package/skills/dingtalk-basic-behavior/assets/memory-candidate-proposal.json +10 -0
  208. package/skills/dingtalk-basic-behavior/assets/{task-checkpoint.md → task-checkpoint.json} +2 -21
  209. package/skills/dingtalk-basic-behavior/references/action-contract.md +2 -0
  210. package/skills/dingtalk-basic-behavior/references/memory-and-evolution.md +15 -1
  211. package/skills/dingtalk-basic-behavior/references/perception-and-gates.md +28 -0
  212. package/skills/dingtalk-basic-behavior/references/task-lifecycle.md +32 -7
@@ -0,0 +1,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
+ }
@@ -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/multica-deployment-list.schema.json",
4
+ "title": "dingtalk-agent Multica Deployment List",
5
+ "type": "object",
6
+ "additionalProperties": false,
7
+ "required": ["$schema", "workspace", "provider", "deployments", "remoteRead", "remoteWrite", "triggerWrite", "sideEffect", "dingtalkSideEffect"],
8
+ "properties": {
9
+ "$schema": { "const": "dingtalk-agent/multica-deployment-list@1" },
10
+ "workspace": { "type": "string", "minLength": 1 }, "provider": { "const": "multica" },
11
+ "deployments": {
12
+ "type": "array",
13
+ "items": {
14
+ "type": "object", "additionalProperties": false,
15
+ "required": ["receiptId", "operationId", "action", "status", "passed", "providerReady", "planId", "deploymentHash"],
16
+ "properties": {
17
+ "receiptId": { "type": "string" }, "operationId": { "type": "string" },
18
+ "action": { "enum": ["apply", "retire"] },
19
+ "status": { "enum": ["applying", "reconciling", "verifying", "ready", "failed", "retired"] },
20
+ "passed": { "type": "boolean" }, "providerReady": { "type": "boolean" },
21
+ "planId": { "type": "string" }, "deploymentHash": { "type": "string", "pattern": "^[a-f0-9]{64}$" }
22
+ }
23
+ }
24
+ },
25
+ "remoteRead": { "const": false }, "remoteWrite": { "const": false },
26
+ "triggerWrite": { "const": false }, "sideEffect": { "const": false },
27
+ "dingtalkSideEffect": { "const": false }
28
+ }
29
+ }
@@ -0,0 +1,51 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://github.com/D1-2004/dingtalk-agent/docs/schemas/multica-deployment-operation.schema.json",
4
+ "title": "dingtalk-agent Multica Deployment Operation",
5
+ "type": "object",
6
+ "additionalProperties": false,
7
+ "required": ["$schema", "operationId", "planId", "workspace", "action", "status", "profile", "workspaceId", "runtimeId", "agentId", "deploymentHash", "ambiguousAction", "receiptId", "receiptPath", "calls", "failures", "updatedAt"],
8
+ "properties": {
9
+ "$schema": { "const": "dingtalk-agent/multica-deployment-operation@1" },
10
+ "operationId": { "$ref": "#/$defs/id" },
11
+ "planId": { "$ref": "#/$defs/id" },
12
+ "workspace": { "$ref": "#/$defs/name" },
13
+ "action": { "enum": ["apply", "retire"] },
14
+ "status": { "$ref": "#/$defs/status" },
15
+ "profile": { "type": "string", "minLength": 1 },
16
+ "workspaceId": { "type": "string", "minLength": 1 },
17
+ "runtimeId": { "type": "string", "minLength": 1 },
18
+ "agentId": { "type": "string" },
19
+ "deploymentHash": { "$ref": "#/$defs/hash" },
20
+ "ambiguousAction": { "type": "string" },
21
+ "receiptId": { "type": "string" },
22
+ "receiptPath": { "type": "string" },
23
+ "calls": { "$ref": "#/$defs/calls" },
24
+ "failures": { "type": "array", "items": { "type": "string" } },
25
+ "updatedAt": { "type": "string", "format": "date-time" }
26
+ },
27
+ "$defs": {
28
+ "id": { "type": "string", "pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]{1,127}$" },
29
+ "name": { "type": "string", "pattern": "^[a-z0-9](?:[a-z0-9._-]{0,62}[a-z0-9])?$" },
30
+ "hash": { "type": "string", "pattern": "^[a-f0-9]{64}$" },
31
+ "status": { "enum": ["applying", "reconciling", "verifying", "ready", "failed", "retired"] },
32
+ "calls": {
33
+ "type": "array",
34
+ "items": {
35
+ "type": "object",
36
+ "additionalProperties": false,
37
+ "required": ["id", "kind", "argv", "exitCode", "stdoutHash", "stderrHash", "passed", "ambiguous"],
38
+ "properties": {
39
+ "id": { "type": "string", "minLength": 1 },
40
+ "kind": { "enum": ["read", "write", "rollback"] },
41
+ "argv": { "type": "array", "items": { "type": "string" } },
42
+ "exitCode": { "type": "integer" },
43
+ "stdoutHash": { "$ref": "#/$defs/hash" },
44
+ "stderrHash": { "$ref": "#/$defs/hash" },
45
+ "passed": { "type": "boolean" },
46
+ "ambiguous": { "type": "boolean" }
47
+ }
48
+ }
49
+ }
50
+ }
51
+ }
@@ -0,0 +1,70 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://github.com/D1-2004/dingtalk-agent/docs/schemas/multica-deployment-plan.schema.json",
4
+ "title": "dingtalk-agent Multica Deployment Plan",
5
+ "type": "object",
6
+ "additionalProperties": false,
7
+ "required": ["$schema", "planId", "action", "workspace", "provider", "profile", "inspectionId", "desiredHash", "deploymentHash", "expected", "operations", "writeBudget", "blocking", "requiresPlanId", "requiresExplicitYes", "remoteRead", "remoteWrite", "triggerWrite", "sideEffect", "dingtalkSideEffect"],
8
+ "properties": {
9
+ "$schema": { "const": "dingtalk-agent/multica-deployment-plan@1" },
10
+ "planId": { "$ref": "#/$defs/id" },
11
+ "action": { "enum": ["apply", "retire"] },
12
+ "workspace": { "$ref": "#/$defs/name" },
13
+ "provider": { "const": "multica" },
14
+ "profile": { "type": "string", "minLength": 1 },
15
+ "inspectionId": { "type": "string" },
16
+ "desiredHash": { "$ref": "#/$defs/hash" },
17
+ "deploymentHash": { "$ref": "#/$defs/hash" },
18
+ "expected": {
19
+ "type": "object",
20
+ "additionalProperties": false,
21
+ "required": ["workspaceId", "runtimeId", "agentId", "agentName", "skills", "definitionHash", "instructionsHash"],
22
+ "properties": {
23
+ "workspaceId": { "type": "string", "minLength": 1 },
24
+ "runtimeId": { "type": "string", "minLength": 1 },
25
+ "agentId": { "type": "string" },
26
+ "agentName": { "type": "string", "minLength": 1 },
27
+ "skills": {
28
+ "type": "array",
29
+ "minItems": 2,
30
+ "uniqueItems": true,
31
+ "items": {
32
+ "type": "object",
33
+ "additionalProperties": false,
34
+ "required": ["name", "hash", "files"],
35
+ "properties": {
36
+ "name": { "$ref": "#/$defs/name" },
37
+ "hash": { "$ref": "#/$defs/hash" },
38
+ "files": { "type": "integer", "minimum": 1 }
39
+ }
40
+ }
41
+ },
42
+ "definitionHash": { "$ref": "#/$defs/hash" },
43
+ "instructionsHash": { "$ref": "#/$defs/hash" }
44
+ }
45
+ },
46
+ "operations": { "type": "array", "items": { "type": "string", "minLength": 1 } },
47
+ "writeBudget": {
48
+ "type": "object",
49
+ "additionalProperties": false,
50
+ "required": ["forward", "rollback"],
51
+ "properties": {
52
+ "forward": { "type": "integer", "minimum": 0 },
53
+ "rollback": { "type": "integer", "minimum": 0 }
54
+ }
55
+ },
56
+ "blocking": { "type": "array", "uniqueItems": true, "items": { "type": "string", "minLength": 1 } },
57
+ "requiresPlanId": { "const": true },
58
+ "requiresExplicitYes": { "const": true },
59
+ "remoteRead": { "const": false },
60
+ "remoteWrite": { "const": false },
61
+ "triggerWrite": { "const": false },
62
+ "sideEffect": { "const": false },
63
+ "dingtalkSideEffect": { "const": false }
64
+ },
65
+ "$defs": {
66
+ "id": { "type": "string", "pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]{1,127}$" },
67
+ "name": { "type": "string", "pattern": "^[a-z0-9](?:[a-z0-9._-]{0,62}[a-z0-9])?$" },
68
+ "hash": { "type": "string", "pattern": "^[a-f0-9]{64}$" }
69
+ }
70
+ }
@@ -0,0 +1,87 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://github.com/D1-2004/dingtalk-agent/docs/schemas/multica-deployment-receipt.schema.json",
4
+ "title": "dingtalk-agent Multica Deployment Receipt",
5
+ "type": "object",
6
+ "additionalProperties": false,
7
+ "required": ["$schema", "receiptId", "operationId", "planId", "action", "workspace", "provider", "profile", "status", "passed", "providerReady", "idempotent", "inspectionId", "inspectionObservedHash", "inspectionEvidencePath", "desiredHash", "deploymentHash", "observedHash", "agent", "skills", "assignmentHash", "calls", "smoke", "rollback", "failures", "evidencePath", "remoteRead", "remoteWrite", "triggerWrite", "sideEffect", "dingtalkSideEffect"],
8
+ "properties": {
9
+ "$schema": { "const": "dingtalk-agent/multica-deployment-receipt@1" },
10
+ "receiptId": { "$ref": "#/$defs/id" },
11
+ "operationId": { "$ref": "#/$defs/id" },
12
+ "planId": { "$ref": "#/$defs/id" },
13
+ "action": { "enum": ["apply", "retire"] },
14
+ "workspace": { "$ref": "#/$defs/name" },
15
+ "provider": { "const": "multica" },
16
+ "profile": { "type": "string", "minLength": 1 },
17
+ "status": { "$ref": "#/$defs/status" },
18
+ "passed": { "type": "boolean" },
19
+ "providerReady": { "type": "boolean" },
20
+ "idempotent": { "type": "boolean" },
21
+ "inspectionId": { "type": "string" },
22
+ "inspectionObservedHash": { "type": "string" },
23
+ "inspectionEvidencePath": { "type": "string" },
24
+ "desiredHash": { "$ref": "#/$defs/hash" },
25
+ "deploymentHash": { "$ref": "#/$defs/hash" },
26
+ "observedHash": { "type": "string" },
27
+ "agent": {
28
+ "type": "object", "additionalProperties": false,
29
+ "required": ["id", "runtimeId", "instructionsHash", "archived", "action"],
30
+ "properties": {
31
+ "id": { "type": "string" }, "runtimeId": { "type": "string" },
32
+ "instructionsHash": { "type": "string" }, "archived": { "type": "boolean" },
33
+ "action": { "enum": ["create", "update", "restore", "archive", "noop", "unknown"] }
34
+ }
35
+ },
36
+ "skills": {
37
+ "type": "array",
38
+ "items": {
39
+ "type": "object", "additionalProperties": false,
40
+ "required": ["id", "name", "sourceHash", "remoteHash", "action"],
41
+ "properties": {
42
+ "id": { "type": "string" }, "name": { "$ref": "#/$defs/name" },
43
+ "sourceHash": { "$ref": "#/$defs/hash" }, "remoteHash": { "type": "string" },
44
+ "action": { "enum": ["create", "update", "noop", "unknown"] }
45
+ }
46
+ }
47
+ },
48
+ "assignmentHash": { "type": "string" },
49
+ "calls": { "$ref": "multica-deployment-operation.schema.json#/$defs/calls" },
50
+ "smoke": {
51
+ "type": "object", "additionalProperties": false,
52
+ "required": ["status", "marker", "markerHash", "issueId", "taskId", "taskStatus", "requiredSkills", "loadedSkills", "toolTracePassed", "responsePassed", "responseHash", "failures"],
53
+ "properties": {
54
+ "status": { "enum": ["not-run", "pending", "passed", "failed"] },
55
+ "marker": { "type": "string" }, "markerHash": { "type": "string" },
56
+ "issueId": { "type": "string" }, "taskId": { "type": "string" },
57
+ "taskStatus": { "type": "string" },
58
+ "requiredSkills": { "type": "array", "uniqueItems": true, "items": { "$ref": "#/$defs/name" } },
59
+ "loadedSkills": { "type": "array", "uniqueItems": true, "items": { "$ref": "#/$defs/name" } },
60
+ "toolTracePassed": { "type": "boolean" }, "responsePassed": { "type": "boolean" },
61
+ "responseHash": { "type": "string" },
62
+ "failures": { "type": "array", "items": { "type": "string" } }
63
+ }
64
+ },
65
+ "rollback": {
66
+ "type": "object", "additionalProperties": false,
67
+ "required": ["attempted", "passed", "actions", "failures"],
68
+ "properties": {
69
+ "attempted": { "type": "boolean" }, "passed": { "type": "boolean" },
70
+ "actions": { "type": "array", "items": { "type": "string" } },
71
+ "failures": { "type": "array", "items": { "type": "string" } }
72
+ }
73
+ },
74
+ "failures": { "type": "array", "items": { "type": "string" } },
75
+ "evidencePath": { "type": "string", "minLength": 1 },
76
+ "remoteRead": { "const": true }, "remoteWrite": { "type": "boolean" },
77
+ "triggerWrite": { "const": false },
78
+ "sideEffect": { "enum": ["multica-read-write", "multica-read", "none"] },
79
+ "dingtalkSideEffect": { "const": false }
80
+ },
81
+ "$defs": {
82
+ "id": { "type": "string", "pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]{1,127}$" },
83
+ "name": { "type": "string", "pattern": "^[a-z0-9](?:[a-z0-9._-]{0,62}[a-z0-9])?$" },
84
+ "hash": { "type": "string", "pattern": "^[a-f0-9]{64}$" },
85
+ "status": { "enum": ["applying", "reconciling", "verifying", "ready", "failed", "retired"] }
86
+ }
87
+ }
@@ -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/multica-deployment-status.schema.json",
4
+ "title": "dingtalk-agent Multica Deployment Status",
5
+ "type": "object",
6
+ "additionalProperties": false,
7
+ "required": ["$schema", "workspace", "provider", "available", "operationId", "receiptId", "status", "passed", "providerReady", "operationIntegrity", "receiptIntegrity", "reconciled", "failures", "receipt", "remoteRead", "remoteWrite", "triggerWrite", "sideEffect", "dingtalkSideEffect"],
8
+ "properties": {
9
+ "$schema": { "const": "dingtalk-agent/multica-deployment-status@1" },
10
+ "workspace": { "type": "string", "minLength": 1 }, "provider": { "const": "multica" },
11
+ "available": { "type": "boolean" }, "operationId": { "type": "string" },
12
+ "receiptId": { "type": "string" },
13
+ "status": { "enum": ["missing", "applying", "reconciling", "verifying", "ready", "failed", "retired"] },
14
+ "passed": { "type": "boolean" }, "providerReady": { "type": "boolean" },
15
+ "operationIntegrity": { "type": "boolean" }, "receiptIntegrity": { "type": "boolean" },
16
+ "reconciled": { "type": "boolean" },
17
+ "failures": { "type": "array", "items": { "type": "string" } },
18
+ "receipt": { "oneOf": [{ "type": "null" }, { "$ref": "multica-deployment-receipt.schema.json" }] },
19
+ "remoteRead": { "type": "boolean" }, "remoteWrite": { "const": false },
20
+ "triggerWrite": { "const": false }, "sideEffect": { "enum": [false, "multica-read"] },
21
+ "dingtalkSideEffect": { "const": false }
22
+ }
23
+ }
@@ -0,0 +1,77 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://github.com/D1-2004/dingtalk-agent/docs/schemas/multica-workspace-inspection.schema.json",
4
+ "title": "dingtalk-agent Multica Workspace Redacted Inspection",
5
+ "type": "object",
6
+ "additionalProperties": false,
7
+ "required": [
8
+ "$schema", "passed", "readyForApply", "providerReady", "inspectionId",
9
+ "workspace", "provider", "profile", "cliVersion", "desiredHash", "observedHash",
10
+ "expected", "auth", "resources", "diff", "failures", "calls", "evidencePath",
11
+ "remoteRead", "remoteWrite", "sideEffect", "dingtalkSideEffect"
12
+ ],
13
+ "properties": {
14
+ "$schema": { "const": "dingtalk-agent/multica-workspace-inspection@1" },
15
+ "passed": { "type": "boolean" },
16
+ "readyForApply": { "type": "boolean" },
17
+ "providerReady": { "const": false },
18
+ "inspectionId": { "type": "string", "pattern": "^multica_inspect_[a-f0-9]{24}$" },
19
+ "workspace": { "type": "string", "minLength": 1 },
20
+ "provider": { "const": "multica" },
21
+ "profile": { "type": "string", "minLength": 1 },
22
+ "cliVersion": { "type": "string" },
23
+ "desiredHash": { "$ref": "#/$defs/hash" },
24
+ "observedHash": { "$ref": "#/$defs/hash" },
25
+ "expected": { "type": "object" },
26
+ "auth": {
27
+ "type": "object",
28
+ "additionalProperties": false,
29
+ "required": ["authenticated", "principalHash", "serverHash"],
30
+ "properties": {
31
+ "authenticated": { "type": "boolean" },
32
+ "principalHash": { "type": "string" },
33
+ "serverHash": { "type": "string" }
34
+ }
35
+ },
36
+ "resources": { "$ref": "#/$defs/resources" },
37
+ "diff": { "type": "array", "items": { "type": "string" } },
38
+ "failures": { "type": "array", "items": { "type": "string" } },
39
+ "calls": {
40
+ "type": "array",
41
+ "items": {
42
+ "type": "object",
43
+ "additionalProperties": false,
44
+ "required": ["id", "argv", "exitCode", "stdoutHash", "stderrHash", "passed"],
45
+ "properties": {
46
+ "id": { "type": "string" },
47
+ "argv": { "type": "array", "items": { "type": "string" } },
48
+ "exitCode": { "type": "integer" },
49
+ "stdoutHash": { "$ref": "#/$defs/hash" },
50
+ "stderrHash": { "$ref": "#/$defs/hash" },
51
+ "passed": { "type": "boolean" }
52
+ }
53
+ }
54
+ },
55
+ "evidencePath": { "type": "string", "minLength": 1 },
56
+ "remoteRead": { "const": true },
57
+ "remoteWrite": { "const": false },
58
+ "sideEffect": { "const": "remote-read" },
59
+ "dingtalkSideEffect": { "const": false }
60
+ },
61
+ "$defs": {
62
+ "hash": { "type": "string", "pattern": "^[a-f0-9]{64}$" },
63
+ "resources": {
64
+ "type": "object",
65
+ "additionalProperties": false,
66
+ "required": ["workspace", "runtime", "agent", "agentCandidates", "catalogSkills", "assignedSkills"],
67
+ "properties": {
68
+ "workspace": { "type": ["object", "null"] },
69
+ "runtime": { "type": ["object", "null"] },
70
+ "agent": { "type": ["object", "null"] },
71
+ "agentCandidates": { "type": "array", "items": { "type": "object" } },
72
+ "catalogSkills": { "type": "array", "items": { "type": "object" } },
73
+ "assignedSkills": { "type": "array", "items": { "type": "object" } }
74
+ }
75
+ }
76
+ }
77
+ }