@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.
- package/CHANGELOG.md +35 -0
- package/README.en.md +395 -0
- package/README.md +466 -36
- package/dist/bin/dingtalk-agent.js +1071 -340
- package/dist/bin/dingtalk-agent.js.map +1 -1
- package/dist/src/actions.js +98 -14
- package/dist/src/actions.js.map +1 -1
- package/dist/src/agent-audit.js +460 -0
- package/dist/src/agent-audit.js.map +1 -0
- package/dist/src/agent-bindings.js +132 -0
- package/dist/src/agent-bindings.js.map +1 -0
- package/dist/src/agent-definition.js +182 -0
- package/dist/src/agent-definition.js.map +1 -0
- package/dist/src/agent-enhance.js +678 -0
- package/dist/src/agent-enhance.js.map +1 -0
- package/dist/src/bootstrap.js +125 -17
- package/dist/src/bootstrap.js.map +1 -1
- package/dist/src/development-workspace.js +729 -0
- package/dist/src/development-workspace.js.map +1 -0
- package/dist/src/dws.js +145 -0
- package/dist/src/dws.js.map +1 -1
- package/dist/src/eval-evidence.js +193 -0
- package/dist/src/eval-evidence.js.map +1 -0
- package/dist/src/init.js +1 -1
- package/dist/src/init.js.map +1 -1
- package/dist/src/invocation.js +36 -0
- package/dist/src/invocation.js.map +1 -0
- package/dist/src/lab.js +679 -0
- package/dist/src/lab.js.map +1 -0
- package/dist/src/lease.js +100 -0
- package/dist/src/lease.js.map +1 -0
- package/dist/src/memory/candidates.js +451 -0
- package/dist/src/memory/candidates.js.map +1 -0
- package/dist/src/memory/completion-evidence.js +536 -0
- package/dist/src/memory/completion-evidence.js.map +1 -0
- package/dist/src/memory/operational.js +263 -0
- package/dist/src/memory/operational.js.map +1 -0
- package/dist/src/memory/remote-state.js +478 -0
- package/dist/src/memory/remote-state.js.map +1 -0
- package/dist/src/memory/task-checkpoints.js +204 -0
- package/dist/src/memory/task-checkpoints.js.map +1 -0
- package/dist/src/multica-deploy.js +1480 -0
- package/dist/src/multica-deploy.js.map +1 -0
- package/dist/src/multica-provider.js +685 -0
- package/dist/src/multica-provider.js.map +1 -0
- package/dist/src/opencode-evals.js +1062 -0
- package/dist/src/opencode-evals.js.map +1 -0
- package/dist/src/opencode-provider.js +531 -0
- package/dist/src/opencode-provider.js.map +1 -0
- package/dist/src/opencode-workspace.js +197 -0
- package/dist/src/opencode-workspace.js.map +1 -0
- package/dist/src/perception.js +225 -0
- package/dist/src/perception.js.map +1 -0
- package/dist/src/personal-event-evals.js +595 -0
- package/dist/src/personal-event-evals.js.map +1 -0
- package/dist/src/promotion.js +786 -0
- package/dist/src/promotion.js.map +1 -0
- package/dist/src/remote-semantic-state-live-evals.js +888 -0
- package/dist/src/remote-semantic-state-live-evals.js.map +1 -0
- package/dist/src/remote-semantic-state-worker.js +38 -0
- package/dist/src/remote-semantic-state-worker.js.map +1 -0
- package/dist/src/remote-state-evals.js +501 -0
- package/dist/src/remote-state-evals.js.map +1 -0
- package/dist/src/response-gate.js +51 -0
- package/dist/src/response-gate.js.map +1 -0
- package/dist/src/robot-evals.js +770 -0
- package/dist/src/robot-evals.js.map +1 -0
- package/dist/src/sessions.js +66 -105
- package/dist/src/sessions.js.map +1 -1
- package/dist/src/skill-manager.js +25 -16
- package/dist/src/skill-manager.js.map +1 -1
- package/dist/src/skills.js.map +1 -1
- package/dist/src/storage-evals.js +26 -0
- package/dist/src/storage-evals.js.map +1 -0
- package/dist/src/types.js.map +1 -1
- package/dist/src/waits.js +5 -1
- package/dist/src/waits.js.map +1 -1
- package/dist/src/workspace.js +28 -3
- package/dist/src/workspace.js.map +1 -1
- package/docs/INSTALLATION.md +47 -0
- package/docs/SECOND-AGENT-ACCEPTANCE.md +62 -0
- package/docs/architecture/agent-memory-topology.png +0 -0
- package/docs/architecture/agent-memory-topology.svg +132 -0
- package/docs/architecture/general-agent-kernel-topology.png +0 -0
- package/docs/architecture/general-agent-kernel-topology.svg +149 -0
- package/docs/architecture/provider-bound-development-workspace.png +0 -0
- package/docs/architecture/provider-bound-development-workspace.svg +141 -0
- package/docs/architecture/task-completion-gate.png +0 -0
- package/docs/architecture/task-completion-gate.svg +191 -0
- package/docs/schemas/agent-audit-load-evidence.schema.json +14 -0
- package/docs/schemas/agent-audit.schema.json +92 -0
- package/docs/schemas/agent-bindings.schema.json +54 -0
- package/docs/schemas/agent-definition.schema.json +78 -0
- package/docs/schemas/agent-enhancement-plan.schema.json +88 -0
- package/docs/schemas/agent-enhancement-receipt.schema.json +37 -0
- package/docs/schemas/enriched-invocation.schema.json +46 -0
- package/docs/schemas/eval-candidate-plan.schema.json +28 -0
- package/docs/schemas/eval-candidate-result.schema.json +20 -0
- package/docs/schemas/eval-candidate.schema.json +30 -0
- package/docs/schemas/invocation.schema.json +19 -0
- package/docs/schemas/memory-candidate-proposal.schema.json +18 -0
- package/docs/schemas/memory-candidate.schema.json +76 -0
- package/docs/schemas/memory-publish-target.schema.json +25 -0
- package/docs/schemas/multica-deployment-list.schema.json +29 -0
- package/docs/schemas/multica-deployment-operation.schema.json +51 -0
- package/docs/schemas/multica-deployment-plan.schema.json +70 -0
- package/docs/schemas/multica-deployment-receipt.schema.json +87 -0
- package/docs/schemas/multica-deployment-status.schema.json +23 -0
- package/docs/schemas/multica-workspace-inspection.schema.json +77 -0
- package/docs/schemas/multica-workspace-plan.schema.json +68 -0
- package/docs/schemas/multica-workspace-resource-list.schema.json +27 -0
- package/docs/schemas/multica-workspace-status.schema.json +34 -0
- package/docs/schemas/observation.schema.json +21 -0
- package/docs/schemas/operational-memory-provider.schema.json +36 -0
- package/docs/schemas/operational-memory-record.schema.json +24 -0
- package/docs/schemas/perception-input.schema.json +56 -0
- package/docs/schemas/project.schema.json +112 -0
- package/docs/schemas/promotion-list.schema.json +36 -0
- package/docs/schemas/promotion-plan.schema.json +60 -0
- package/docs/schemas/promotion-policy.schema.json +29 -0
- package/docs/schemas/promotion-receipt.schema.json +43 -0
- package/docs/schemas/promotion-status.schema.json +23 -0
- package/docs/schemas/release-readiness.schema.json +65 -0
- package/docs/schemas/remote-semantic-state-live-eval.schema.json +60 -0
- package/docs/schemas/remote-semantic-state-manifest.schema.json +79 -0
- package/docs/schemas/remote-semantic-state-provider.schema.json +98 -0
- package/docs/schemas/response-gate.schema.json +20 -0
- package/docs/schemas/task-checkpoint.schema.json +71 -0
- package/docs/schemas/task-completion-evidence.schema.json +154 -0
- package/docs/schemas/workspace-doctor.schema.json +56 -0
- package/docs/schemas/workspace-state.schema.json +39 -0
- package/evals/baselines/2026-07-16/opencode-basic-010-completion-summary.json +123 -0
- package/evals/baselines/2026-07-16/opencode-basic-skill-required-summary.json +69 -0
- package/evals/baselines/2026-07-16/opencode-multi-surface-summary.json +63 -0
- package/evals/baselines/2026-07-16/remote-state-live-summary.json +70 -0
- package/evals/baselines/2026-07-17/agent-enhance-opencode-dogfood-summary.json +98 -0
- package/evals/baselines/2026-07-17/personal-event-live-readiness-summary.json +68 -0
- package/examples/agents/fde-coach/AGENTS.md +26 -0
- package/examples/agents/fde-coach/MEMORY.md +3 -0
- package/examples/agents/fde-coach/fields/default/field.json +24 -0
- package/examples/agents/fde-coach/knowledge/INDEX.md +4 -0
- package/examples/agents/fde-coach/skills/fde-coach/SKILL.md +13 -0
- package/examples/agents/release-manager/AGENTS.md +26 -0
- package/examples/agents/release-manager/MEMORY.md +3 -0
- package/examples/agents/release-manager/fields/default/field.json +24 -0
- package/examples/agents/release-manager/knowledge/INDEX.md +4 -0
- package/examples/agents/release-manager/skills/release-manager/SKILL.md +13 -0
- package/lab/README.md +109 -0
- package/lab/agent-eval/catalog.json +91 -0
- package/lab/agent-eval/classic-failures.json +177 -0
- package/lab/agent-eval/completion-gate-regression.json +99 -0
- package/lab/agent-eval/personal-event-live.example.json +94 -0
- package/lab/agent-eval/remote-semantic-state-live.example.json +70 -0
- package/lab/agent-eval/remote-semantic-state-provider.fixture.json +47 -0
- package/lab/agent-eval/remote-state-workspace/AGENTS.md +8 -0
- package/lab/agent-eval/remote-state-workspace/opencode.json +7 -0
- package/lab/agent-eval/remote-state-workspace/skills/remote-state-operator/SKILL.md +13 -0
- package/lab/agent-eval/remote-state.example.json +31 -0
- package/lab/agent-eval/workspace/AGENTS.md +7 -0
- package/lab/agent-eval/workspace/MEMORY.md +4 -0
- package/lab/agent-eval/workspace/artifacts/pending-review.md +3 -0
- package/lab/agent-eval/workspace/knowledge/INDEX.md +4 -0
- package/lab/agent-eval/workspace/opencode.json +20 -0
- package/lab/manifest.example.json +27 -0
- package/lab/manifest.personal-event.example.json +27 -0
- package/lab/project-workspace/README.md +11 -0
- package/lab/project-workspace/fake-multica-provider.mjs +266 -0
- package/lab/project-workspace/multica-deploy.fixture.json +29 -0
- package/lab/project-workspace/multica-readonly.fixture.json +69 -0
- package/lab/project-workspace/observation.fixture.json +14 -0
- package/lab/project-workspace/opencode-provider-suite.json +65 -0
- package/lab/project-workspace/project.fixture.json +44 -0
- package/lab/project-workspace/promotion-policy.fixture.json +15 -0
- package/lab/robot-eval/pool.example.json +30 -0
- package/lab/robot-eval/suite.json +123 -0
- package/lab/robot-eval/workspace/AGENTS.md +21 -0
- package/lab/robot-eval/workspace/MEMORY.md +3 -0
- package/lab/robot-eval/workspace/knowledge/INDEX.md +5 -0
- package/lab/robot-eval/workspace/opencode.json +22 -0
- package/lab/schemas/agent-eval-catalog.schema.json +47 -0
- package/lab/schemas/lab-manifest.schema.json +70 -0
- package/lab/schemas/personal-event-eval.schema.json +91 -0
- package/lab/schemas/remote-state-eval.schema.json +66 -0
- package/lab/schemas/robot-eval-suite.schema.json +184 -0
- package/lab/schemas/robot-pool.schema.json +56 -0
- package/package.json +30 -14
- package/skills/dingtalk-agent-boot-multica/SKILL.md +40 -0
- package/skills/dingtalk-agent-compose/SKILL.md +110 -0
- package/skills/dingtalk-agent-compose/assets/AGENTS.template.md +26 -0
- package/skills/dingtalk-agent-compose/assets/agent.bindings.dingtalk-doc.template.json +13 -0
- package/skills/dingtalk-agent-compose/assets/agent.bindings.local.template.json +13 -0
- package/skills/dingtalk-agent-compose/assets/opencode.template.json +12 -0
- package/skills/dingtalk-agent-compose/assets/role-skill.template.md +24 -0
- package/skills/dingtalk-agent-compose/evals/evals.json +94 -0
- package/skills/dingtalk-agent-compose/references/agent-definition-contract.md +55 -0
- package/skills/dingtalk-agent-compose/references/opencode-host-contract.md +65 -0
- package/skills/dingtalk-agent-compose/references/storage-routing.md +20 -0
- package/skills/dingtalk-agent-deploy/SKILL.md +60 -0
- package/skills/dingtalk-agent-deploy/references/multica-deployment-contract.md +49 -0
- package/skills/dingtalk-agent-deploy/references/promotion-observation-contract.md +49 -0
- package/skills/dingtalk-agent-eval/SKILL.md +116 -0
- package/skills/dingtalk-agent-eval/assets/eval-catalog.template.json +18 -0
- package/skills/dingtalk-agent-eval/evals/evals.json +61 -0
- package/skills/dingtalk-agent-eval/references/eval-topology.md +34 -0
- package/skills/dingtalk-agent-eval/references/evidence-contract.md +31 -0
- package/skills/dingtalk-agent-eval/references/scenario-taxonomy.md +25 -0
- package/skills/dingtalk-agent-eval/references/storage-modes.md +75 -0
- package/skills/dingtalk-basic-behavior/SKILL.md +63 -3
- package/skills/dingtalk-basic-behavior/assets/memory-candidate-proposal.json +10 -0
- package/skills/dingtalk-basic-behavior/assets/{task-checkpoint.md → task-checkpoint.json} +2 -21
- package/skills/dingtalk-basic-behavior/references/action-contract.md +2 -0
- package/skills/dingtalk-basic-behavior/references/memory-and-evolution.md +15 -1
- package/skills/dingtalk-basic-behavior/references/perception-and-gates.md +28 -0
- package/skills/dingtalk-basic-behavior/references/task-lifecycle.md +32 -7
- package/dist/src/boot.js +0 -70
- package/dist/src/boot.js.map +0 -1
- package/dist/src/duty.js +0 -74
- package/dist/src/duty.js.map +0 -1
- package/dist/src/kb.js +0 -240
- package/dist/src/kb.js.map +0 -1
- package/dist/src/runs.js +0 -79
- package/dist/src/runs.js.map +0 -1
- package/docs/ARCHITECTURE.md +0 -219
- package/docs/MINIMAL-WORKSPACE-V1.md +0 -172
- package/docs/OPEN-SOURCE-REFERENCES.md +0 -107
- package/docs/SELF-TEST.md +0 -252
- package/docs//345/206/205/347/275/221/345/256/236/347/233/270.md +0 -77
- package/evals/baselines/2026-07-14/behavior-summary.json +0 -28
- package/evals/baselines/2026-07-14/contract-summary.json +0 -18
- package/evals/baselines/2026-07-14/live-canary-summary.json +0 -25
- package/evals/baselines/2026-07-15/dingtalk-basic-behavior-0.3.0/SKILL.md +0 -72
- package/evals/baselines/2026-07-15/dingtalk-basic-behavior-0.3.0/references/action-contract.md +0 -31
- package/evals/baselines/2026-07-15/dingtalk-basic-behavior-0.3.0/references/event-to-behavior.md +0 -22
- package/evals/baselines/2026-07-15/dingtalk-basic-behavior-0.3.0/references/memory-and-evolution.md +0 -25
- package/evals/baselines/2026-07-15/dingtalk-basic-behavior-0.3.0/references/runtime-modes.md +0 -34
- package/evals/baselines/2026-07-15/task-lifecycle-summary.json +0 -50
- package/evals/evals.json +0 -339
- package/evals/fixtures/dm-ambiguous-send.json +0 -4
- package/evals/fixtures/dm-blocked.json +0 -4
- package/evals/fixtures/dm-clear.json +0 -4
- package/evals/fixtures/dm-discussion.json +0 -4
- package/evals/fixtures/dm-doc-write-no-tool.json +0 -4
- package/evals/fixtures/dm-long-task-ack.json +0 -4
- package/evals/fixtures/dm-nonblocking-gap.json +0 -4
- package/evals/fixtures/dm-structured-task.json +0 -4
- package/evals/fixtures/group.json +0 -10
- package/evals/fixtures/mentioned.json +0 -3
- package/evals/run-contract-evals.mjs +0 -1169
- package/evals/run-shadow-evals.mjs +0 -267
- package/evals/runners/README.md +0 -66
- package/evals/runners/claude-shadow.mjs +0 -533
- package/evals/schemas/action-request.schema.json +0 -77
- package/evals/shadow-evals.json +0 -133
- package/skills/AGENTS.md +0 -104
- package/skills//344/273/273/345/212/241.md +0 -48
- package/skills//345/237/272/347/241/200/350/241/214/344/270/272.md +0 -44
- package/skills//345/277/203/350/267/263.md +0 -79
- package/skills//346/266/210/346/201/257.md +0 -50
- package/skills//347/237/245/350/257/206.md +0 -55
- package/skills//350/257/204/346/265/213.md +0 -62
- package/skills//351/222/211/351/222/211.md +0 -64
- package/templates/ontology/index.md +0 -24
- package/templates/ontology/self/access.md +0 -38
- package/templates/ontology/self/role-spec.md +0 -34
- package/templates/ontology/self/workspace.md +0 -41
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to `@xdxer/dingtalk-agent` are documented here. The project follows semantic versioning; prerelease entries describe release candidates and do not imply that Live canaries or registry publication have completed.
|
|
4
|
+
|
|
5
|
+
## 0.1.4-beta.9 - 2026-07-19
|
|
6
|
+
|
|
7
|
+
### Added
|
|
8
|
+
|
|
9
|
+
- A general Agent kernel with frozen Agent Definitions, invocation context, employee response gates, durable Session/Run/Wait state, and host-verified completion evidence.
|
|
10
|
+
- Three-layer semantic memory with local and DingTalk document/table routing, candidate review/publish flow, and cold-start recovery contracts.
|
|
11
|
+
- Reusable Compose, Eval, Boot, and Deploy Skills plus two independently auditable example Agents.
|
|
12
|
+
- A Provider-bound Agent Project model with isolated OpenCode and Multica Development Workspaces.
|
|
13
|
+
- OpenCode managed create/run/eval with random Basic Skill load probes and Response/Filesystem/Workspace/Artifact evidence.
|
|
14
|
+
- Multica read-only inspection, plan-bound Agent/Skill deployment, independent readback, load smoke, recovery, rollback, and retire contracts.
|
|
15
|
+
- Policy-bound Promotion Receipts linking local Eval evidence to Multica deployment evidence, plus redacted review-only feedback candidates.
|
|
16
|
+
- Deterministic release-readiness checks that install the generated tarball into an isolated HOME and exercise setup, doctor, bootstrap, eval planning, upgrade, and rollback planning without real DingTalk or Multica access.
|
|
17
|
+
- Default-safe Phase 9 personal-event and Phase 11B remote-state Live runners with explicit resource authorization, fake-DWS contracts, independent readback, and gitignored raw evidence.
|
|
18
|
+
- Plan-bound `dta agent enhance` for existing repositories, with operation-scoped backups, semantic config merging, hash readback, source-drift protection, and zero DingTalk/Trigger side effects.
|
|
19
|
+
- A sanitized local dogfood record proving that an enhanced release-manager Agent reaches `ready` only after a real OpenCode/DeepSeek random Basic load probe.
|
|
20
|
+
|
|
21
|
+
### Changed
|
|
22
|
+
|
|
23
|
+
- Basic Behavior advanced to 0.10.0 with evidence-gated task completion. The recorded controlled-regression sample passed its safety and artifact gates, but does not prove a stable behavior-quality gain over 0.9.4.
|
|
24
|
+
- Completion grading now detects contradictory positive claims while preserving negated, conditional, and corrected statements; effectiveness requires a predeclared multi-run policy instead of any single positive delta.
|
|
25
|
+
- Agent audit now keeps generated body and Role Skill templates partial until identity, responsibilities, SOPs, and acceptance placeholders are replaced with real semantics.
|
|
26
|
+
- The deterministic contract suite now covers 60 independent scenarios.
|
|
27
|
+
|
|
28
|
+
### Live waivers and release boundary
|
|
29
|
+
|
|
30
|
+
- The user explicitly waived real Multica apply/promotion, personal-event canary, and remote semantic-state Live as release gates for this beta. The release does not relabel local or fake-Provider evidence as real platform proof.
|
|
31
|
+
- Distribution is limited to the public npm `beta` dist-tag, Git tag, and GitHub pre-release. It does not create a robot, webhook, schedule, Trigger, or DingTalk/Multica side effect.
|
|
32
|
+
|
|
33
|
+
## 0.1.4-beta.8 - 2026-07-16
|
|
34
|
+
|
|
35
|
+
- Published beta baseline preceding the general Agent kernel and Provider-bound Workspace series.
|
package/README.en.md
ADDED
|
@@ -0,0 +1,395 @@
|
|
|
1
|
+
<div align="center">
|
|
2
|
+
|
|
3
|
+
# dingtalk-agent
|
|
4
|
+
|
|
5
|
+
**A shared behavior kernel for DingTalk digital employees.**
|
|
6
|
+
|
|
7
|
+
[](https://www.npmjs.com/package/@xdxer/dingtalk-agent)
|
|
8
|
+
[](https://github.com/D1-2004/dingtalk-agent/actions/workflows/ci.yml)
|
|
9
|
+
[](https://nodejs.org/)
|
|
10
|
+
[](LICENSE)
|
|
11
|
+
|
|
12
|
+
English · [简体中文](README.md)
|
|
13
|
+
|
|
14
|
+
</div>
|
|
15
|
+
|
|
16
|
+
## What it is
|
|
17
|
+
|
|
18
|
+
**DWS gives an Agent DingTalk system calls. dingtalk-agent (`dta`) gives every Agent an inheritable, frozen, and verifiable employee behavior kernel.** It does not own event delivery and does not duplicate DingTalk APIs. Starting from a normalized invocation, it organizes the Agent definition, perception enrichment, response eligibility, Session/Run state, action gates, and effect evidence into a Skill-first container.
|
|
19
|
+
|
|
20
|
+
```text
|
|
21
|
+
Agent Host + dta Kernel + Agent Definition + Basic Behavior + Role Skills + DWS
|
|
22
|
+
= a DingTalk digital employee that can keep working
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
| Layer | Owns | Does not own |
|
|
26
|
+
|---|---|---|
|
|
27
|
+
| Agent Definition | Identity, responsibilities, service scope, Skills, resources, authority | Current Run state or IDs guessed from message text |
|
|
28
|
+
| Basic + Role Skills | When to reply, ask, stay silent, and how to perform role work | Bypassing identity, target, or effect gates |
|
|
29
|
+
| dta Kernel | Invocation, enrichment, Session/Run/Wait, Action Gate, Receipt | Models, universal event listeners, or a second DWS |
|
|
30
|
+
| DWS | DingTalk messages, docs, tasks, calendars, tables, and other product operations | Deciding whether an employee should act and on whose behalf |
|
|
31
|
+
|
|
32
|
+
Claude Code, Codex, OpenCode, and other Agent Hosts can use the same kernel. Trigger adapters, models, sandboxes, Role Skills, and storage providers remain replaceable.
|
|
33
|
+
|
|
34
|
+
## Why it exists
|
|
35
|
+
|
|
36
|
+
DWS is enough for occasional manual API operations. A digital employee that works over time also needs a maintained **body, state, and constrained action boundary**. Calling an API is not the same as behaving like a colleague. A reliable Agent must:
|
|
37
|
+
|
|
38
|
+
- stay quiet in unmentioned group conversations and respond to direct messages or explicit mentions;
|
|
39
|
+
- complete well-specified work directly and ask only one truly blocking question;
|
|
40
|
+
- never guess recipients, identities, document IDs, or permissions from natural-language text;
|
|
41
|
+
- acknowledge long work, wait for dependencies, and resume from a later event;
|
|
42
|
+
- distinguish a command attempt, platform visibility, delivery, and human acceptance;
|
|
43
|
+
- store task state, business memory, long-term knowledge, locks, and receipts in the right media.
|
|
44
|
+
|
|
45
|
+
The boundary is: **Skills advise, the CLI enforces, and DWS executes.** Semantic judgment remains in Skills; invariants belong in code; DingTalk product operations stay in DWS.
|
|
46
|
+
|
|
47
|
+
> The beta.9 line includes the Basic 0.10.0/0.9.4 model regression, host-issued Completion Evidence, remote semantic-state cold-start and Live-ready runners, the developer Golden Path, safe enhancement of existing Agent repositories, Provider-bound Workspace W1–W5, Completion-grader hardening, a Phase 9 personal-event Live-ready runner, and isolated installation acceptance, with 60 deterministic contracts. Phase 8's recorded sample passed the safety and artifact gates that existed at the time, but did not prove a stable model-quality gain for 0.10.0. Phase 15 adds fail-closed contradictory-claim detection and a predeclared effectiveness policy without rewriting historical scores. Real personal-event, remote-state, and Multica Live are explicitly waived as release gates for this beta; local and fake-Provider evidence is not relabeled as real platform proof. Distribution is limited to the npm `beta` tag, a Git tag, and a GitHub pre-release, with no Trigger or DingTalk/Multica side effect.
|
|
48
|
+
|
|
49
|
+
## Quick start
|
|
50
|
+
|
|
51
|
+
Requires Node.js 18.3 or later.
|
|
52
|
+
|
|
53
|
+
```bash
|
|
54
|
+
npm install --global --prefix "$HOME/.local" \
|
|
55
|
+
--registry=https://registry.npmjs.org @xdxer/dingtalk-agent@beta
|
|
56
|
+
"$HOME/.local/bin/dta" setup --skip-cli-install
|
|
57
|
+
|
|
58
|
+
dta --version
|
|
59
|
+
dta doctor
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
`setup` checks Node.js, DWS version and authentication, installs and verifies the Basic Behavior Skill, and reports whether Claude Code, Codex, and OpenCode can discover it. `listen` is an optional development adapter, not the mandatory Agent entry point.
|
|
63
|
+
|
|
64
|
+
For a source release candidate, run the deterministic tarball acceptance:
|
|
65
|
+
|
|
66
|
+
```bash
|
|
67
|
+
npm run release:check
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
It creates a real npm tarball, installs it offline into a fresh HOME/prefix, and exercises setup, doctor, direct bootstrap, a plan-only lab eval, forced upgrade from the same tarball, and explicit rollback dry-run. It uses fake DWS and skills-installer binaries only; it sends no DingTalk message, accesses no Multica resource, creates no Trigger, and performs no npm publish, Tag, or GitHub Release.
|
|
71
|
+
|
|
72
|
+
## Three runtime modes
|
|
73
|
+
|
|
74
|
+
### Direct Session
|
|
75
|
+
|
|
76
|
+
No initialized Workspace is required. The Agent behaves as a normal colleague but does not invent identity, memory, targets, or DingTalk authority.
|
|
77
|
+
|
|
78
|
+
```bash
|
|
79
|
+
dta bootstrap --json
|
|
80
|
+
dta bootstrap --agent local-dir:/path/to/agent --json
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
### Mounted Session
|
|
84
|
+
|
|
85
|
+
The Agent hydrates a local folder or a DingTalk document without requiring `init` on every session.
|
|
86
|
+
|
|
87
|
+
```bash
|
|
88
|
+
dta bootstrap \
|
|
89
|
+
--agent local-dir:/path/to/agent \
|
|
90
|
+
--skills local-dir:/path/to/agent/skills \
|
|
91
|
+
--memory local-md:MEMORY.md \
|
|
92
|
+
--knowledge 'dingtalk-doc:<node-or-url>' --json
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
### Prepared Run
|
|
96
|
+
|
|
97
|
+
A trusted host freezes the Invocation, Definition, Skills, target, budgets, and allowed actions. Message effects can only pass through the typed Broker or `dta act`.
|
|
98
|
+
|
|
99
|
+
## From one Agent to many
|
|
100
|
+
|
|
101
|
+
Different employees should vary only in their Definition, Role Skills, field bindings, storage, and authority. They share Basic Behavior, Session/Run/Wait, the two-part gate, Receipt semantics, and the same Lab contract.
|
|
102
|
+
|
|
103
|
+
A minimal Agent kit is:
|
|
104
|
+
|
|
105
|
+
```text
|
|
106
|
+
my-agent/
|
|
107
|
+
├── AGENTS.md identity, responsibilities, deliverables, boundaries
|
|
108
|
+
├── agent.bindings.json Definition and semantic-storage routes
|
|
109
|
+
├── opencode.json Host loading contract
|
|
110
|
+
├── .agents/skills/ Host-visible Skill exposure
|
|
111
|
+
├── skills/<role>/SKILL.md role-specific methods
|
|
112
|
+
├── MEMORY.md reviewed semantic memory
|
|
113
|
+
├── knowledge/INDEX.md knowledge entry point
|
|
114
|
+
└── .dingtalk-agent/artifacts/ independently verifiable deliverables
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
Use the bundled [`dingtalk-agent-compose`](skills/dingtalk-agent-compose/SKILL.md) Skill to audit and assemble a Git checkout or local folder as an Agent, optionally binding semantic state to DingTalk documents. Basic Behavior must be forced into every Host session; directory discovery alone is not proof that the Skill body was loaded.
|
|
118
|
+
|
|
119
|
+
The recommended definition stays local and versioned: `AGENTS.md + Role Skills`. `agent.bindings@1` routes memory and knowledge either to local Markdown or dedicated DingTalk documents, while artifacts and private control state stay local. The shortest acceptance path is:
|
|
120
|
+
|
|
121
|
+
```bash
|
|
122
|
+
# Plan only: no local write, DWS access, or Trigger creation.
|
|
123
|
+
dta agent enhance --project-name release-agent \
|
|
124
|
+
--role-skill release-manager --dry-run --json
|
|
125
|
+
|
|
126
|
+
# Review operations/blockers/semanticReview, then use the current plan ID.
|
|
127
|
+
dta agent enhance --project-name release-agent \
|
|
128
|
+
--role-skill release-manager \
|
|
129
|
+
--plan-id <current-plan-id> --yes --json
|
|
130
|
+
|
|
131
|
+
dta bootstrap --bindings agent.bindings.json --json
|
|
132
|
+
|
|
133
|
+
# Static only: no model and no DWS. Gaps return partial and exit code 2.
|
|
134
|
+
dta agent audit --bindings agent.bindings.json \
|
|
135
|
+
--require-skill <role-skill-name> --json
|
|
136
|
+
|
|
137
|
+
# Isolated OpenCode load probe; still no DingTalk access.
|
|
138
|
+
dta agent audit --bindings agent.bindings.json \
|
|
139
|
+
--require-skill <role-skill-name> --verify-load --yes --json
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
This chain has been dogfooded once with `examples/agents/release-manager`. On OpenCode 1.17.14 and `deepseek/deepseek-chat`, the with-skill random probe loaded exactly 1/1, the without-skill control did not guess it 1/1, and the final audit moved from `partial` with only `host.load-probe` missing to `ready`. This proves that the assembly and load path works for that fixture; it does not prove domain-task quality or a stable behavior gain. See the [sanitized dogfood summary](evals/baselines/2026-07-17/agent-enhance-opencode-dogfood-summary.json).
|
|
143
|
+
|
|
144
|
+
`agent enhance` merges rather than blindly overwriting an existing repository. Before updating an old file it creates an operation-scoped backup under `.dingtalk-agent/backups/agent-enhance/<operationId>/`, and a custom `stateDir` is added to `.gitignore`; a stale plan, source drift, invalid Role path, unknown OpenCode instruction entry, path escape, or symlink fails before replacement. Apply has local-file side effects only. Generated body and Role Skill templates intentionally remain `partial` until real identity, responsibilities, deliverables, refusal boundaries, domain SOPs, and acceptance criteria replace every placeholder. Thus a ready [`agent-enhancement-plan@1`](docs/schemas/agent-enhancement-plan.schema.json) means “safe to apply,” not “the Agent is ready”; [`agent-enhancement-receipt@1`](docs/schemas/agent-enhancement-receipt.schema.json) carries the follow-up audit gaps.
|
|
145
|
+
|
|
146
|
+
`agent-audit@1` separates Definition, Storage, Host exposure, and actual loading. A remote memory/knowledge binding remains `partial` until an authorized storage evaluation proves identity, document type, hashes, independent readback, and model use and its report is supplied with `--remote-report`. Local cache presence is never remote proof; Wait, generation, idempotency, Receipts, and credentials remain in the host atomic store.
|
|
147
|
+
|
|
148
|
+
### One Project, multiple development Workspaces
|
|
149
|
+
|
|
150
|
+
`agent.bindings.json` describes the Agent body and storage routes. A root-level [`dingtalk-agent.json`](docs/schemas/project.schema.json) declares where the same Agent is developed. Each Development Workspace binds exactly one Host Provider, while memory, knowledge, and artifacts remain independent Storage bindings.
|
|
151
|
+
|
|
152
|
+
```text
|
|
153
|
+
Agent Project
|
|
154
|
+
├── local-dev ── Host: OpenCode ── Storage: local-md/local-dir
|
|
155
|
+
├── multica-dev ── Host: Multica ── Storage: dingtalk-doc/local-dir
|
|
156
|
+
└── legacy-prepared ── read-only view of the existing workspace@1
|
|
157
|
+
```
|
|
158
|
+
|
|
159
|
+
W1 exposes a read-only control plane:
|
|
160
|
+
|
|
161
|
+
```bash
|
|
162
|
+
dta info --json
|
|
163
|
+
dta workspace list --json
|
|
164
|
+
dta workspace show local-dev --json
|
|
165
|
+
dta workspace doctor local-dev --json
|
|
166
|
+
```
|
|
167
|
+
|
|
168
|
+
The CLI discovers the Project from any child directory and reports Provider configuration sources, `desiredHash/observedHash`, and [`workspace-state@1`](docs/schemas/workspace-state.schema.json). Doctor inspects only the named Workspace: a missing Multica installation cannot make `local-dev` fail, while Provider, source, managed bytes, or desired-state drift fails closed.
|
|
169
|
+
|
|
170
|
+
OpenCode W2 adds a managed development environment. `create` is plan-only by default; `--yes` atomically materializes a gitignored copy and independently hashes it. `run/eval` use external temporary sandboxes. Provider state becomes `ready` only after the random Basic load probe, exported Session directory, and hard evidence gates pass.
|
|
171
|
+
|
|
172
|
+
```bash
|
|
173
|
+
dta workspace create local-dev --dry-run --json
|
|
174
|
+
dta workspace create local-dev --yes --json
|
|
175
|
+
dta workspace use local-dev --json
|
|
176
|
+
dta workspace run local-dev --prompt-file prompt.md --execute --yes --json
|
|
177
|
+
dta workspace eval local-dev --suite evals/core.json --runs 3 --execute --yes --json
|
|
178
|
+
```
|
|
179
|
+
|
|
180
|
+
`workspace run` is zero-tool. File and Artifact tools are available only through case-scoped eval permissions. W2 writes local managed Workspace, selection, state, and evidence, but never calls DWS. CI, evaluations, and future deploy flows must select the Workspace explicitly rather than rely on `current-workspace`.
|
|
181
|
+
|
|
182
|
+
Multica W3 first exposes controlled remote reads. `plan` never starts Multica. After explicit confirmation, `inspect/remote-list` use the declared profile, Workspace ID, Runtime ID, and optional Agent ID to read auth, Workspace, Runtime, Agent, Skill catalog, and assignments. An existing Agent must be bound by `agentIdFrom` or trusted prior state and is never adopted by display name.
|
|
183
|
+
|
|
184
|
+
```bash
|
|
185
|
+
dta workspace plan multica-dev --json
|
|
186
|
+
dta workspace inspect multica-dev --execute --yes --json
|
|
187
|
+
dta workspace remote-list multica-dev --execute --yes --json
|
|
188
|
+
dta workspace status multica-dev --json
|
|
189
|
+
```
|
|
190
|
+
|
|
191
|
+
Evidence retains only minimum resource facts and raw-output hashes; it excludes tokens, email, cleartext Server URLs, Agent instructions/runtime config, and Skill content. Identity, default Workspace, scope, stable IDs, Skill uniqueness, and evidence hashes all fail closed. A successful inspection leaves state at `verifying`: `readyForApply=true` only means W4 planning may start.
|
|
192
|
+
|
|
193
|
+
W4 turns that trusted inspection into a plan-bound apply through `dta deploy`. Dry-run freezes the profile, Workspace, Runtime, Agent, Definition, complete Skill-tree hashes, and maximum forward/rollback write budgets; apply re-reads the same ID chain. Only the current `--plan-id` plus explicit `--yes` may create or update remote resources. The CLI synchronizes managed Boot, Basic, and Role Skill trees and the exact assignment, then uses a dedicated Issue to independently read the Skill tool trace and an exact JSON response. Both must pass before state can move from `verifying` to `ready`.
|
|
194
|
+
|
|
195
|
+
```bash
|
|
196
|
+
dta deploy --workspace multica-dev --dry-run --json
|
|
197
|
+
dta deploy --workspace multica-dev --plan-id <plan-id> --yes --json
|
|
198
|
+
dta deploy --workspace multica-dev --status --json
|
|
199
|
+
dta deploy --workspace multica-dev --status --execute --yes --json
|
|
200
|
+
dta deploy --workspace multica-dev --list --json
|
|
201
|
+
dta deploy --workspace multica-dev --retire --dry-run --json
|
|
202
|
+
dta deploy --workspace multica-dev --retire --plan-id <plan-id> --yes --json
|
|
203
|
+
```
|
|
204
|
+
|
|
205
|
+
A timed-out write persists its operation/Receipt and enters `reconciling`; status performs independent reads rather than retrying or rolling back an ambiguous action. If Agent create returned no ID, recovery reads candidates by stable ID and binds only one exact instructions/runtime fingerprint match, never a display name alone. Confirmed failures roll back only changes managed by the current operation. Retire archives the exact Agent without deleting Skills, Issues, semantic storage, or evidence history. Deploy never creates a robot, webhook, schedule, or other Trigger. The `dingtalk-agent-deploy` Skill only guides these stable CLI calls; it does not write through Multica directly or retain credentials.
|
|
206
|
+
|
|
207
|
+
W5 links designated W2 Eval evidence to a W4 Receipt as an explicit Promotion chain. A policy freezes source/target Workspaces, suite, minimum runs, required cases, and evidence surfaces. Dry-run recomputes the Definition/Skill, managed Workspace, plan/suite/report, and deployment hashes without Provider calls. Only the current planId plus explicit confirmation may delegate to W4 deploy. The resulting Promotion Receipt binds source, Eval, the historical deployment Receipt, and the final observed hash.
|
|
208
|
+
|
|
209
|
+
```bash
|
|
210
|
+
dta promote --policy promotion-policy.json --route local-dev-to-multica-dev --dry-run --json
|
|
211
|
+
dta promote --policy promotion-policy.json --route local-dev-to-multica-dev \
|
|
212
|
+
--plan-id <plan-id> --yes --json
|
|
213
|
+
dta promote --status --promotion-id <promotion-id> --json
|
|
214
|
+
dta promote --list --json
|
|
215
|
+
```
|
|
216
|
+
|
|
217
|
+
`observe` accepts only redacted feedback whose `observedHash` exactly matches a promoted Receipt. It writes one gitignored Eval candidate fixed as `proposed`, review-required, suite-ineligible, and unpublished. It never changes AGENTS.md, prompts, Basic/Role Skills, or Triggers.
|
|
218
|
+
|
|
219
|
+
```bash
|
|
220
|
+
dta observe --promotion-id <promotion-id> --input observation.json --dry-run --json
|
|
221
|
+
dta observe --promotion-id <promotion-id> --input observation.json --yes --json
|
|
222
|
+
```
|
|
223
|
+
|
|
224
|
+
See the reusable two-Provider fixture at [`lab/project-workspace/project.fixture.json`](lab/project-workspace/project.fixture.json), the redacted read-only fixture at [`multica-readonly.fixture.json`](lab/project-workspace/multica-readonly.fixture.json), the W4 stateful fake data at [`multica-deploy.fixture.json`](lab/project-workspace/multica-deploy.fixture.json), and the W5 [`promotion-policy.fixture.json`](lab/project-workspace/promotion-policy.fixture.json). Manifests and state reject credential-like fields; `*From` fields preserve only `env:VAR` sources, never resolved values. The current contract proves local orchestration and fail-closed behavior; it does not claim that a real Multica Live apply or promotion has passed.
|
|
225
|
+
|
|
226
|
+
## Employee task protocol
|
|
227
|
+
|
|
228
|
+

|
|
229
|
+
|
|
230
|
+
```text
|
|
231
|
+
UNDERSTAND → CLARIFY → PLAN → EXECUTE → WAIT → VERIFY → COMPLETE
|
|
232
|
+
```
|
|
233
|
+
|
|
234
|
+
`CLARIFY` is a conditional branch, not a mandatory opening question. The Agent first forms an internal task contract—goal, deliverable, scope, observable done conditions, authority, and timing—then asks one question only when a gap blocks safe progress.
|
|
235
|
+
|
|
236
|
+
`COMPLETE` is evidence-gated rather than self-declared. A cross-Run task must move from `working` to `verifying`; every `doneWhen` condition must map to a file check, Workspace/Artifact assertion, Action Receipt, independent platform readback, or human confirmation. A reply that says “created” is not evidence. The CLI rejects `working → completed` and any completed checkpoint without verification evidence.
|
|
237
|
+
|
|
238
|
+
## Identity and delegation
|
|
239
|
+
|
|
240
|
+
The role identity and the sandbox execution identity are separate:
|
|
241
|
+
|
|
242
|
+
- the role identity says who the employee is, what it owns, whom it serves, and who delegated the work;
|
|
243
|
+
- the execution identity is the trusted DWS profile used for platform effects;
|
|
244
|
+
- if they represent the same subject, it is the Agent's own identity;
|
|
245
|
+
- if they differ, the Definition must make the delegation explicit and the Action Gate must keep the delegated scope narrow.
|
|
246
|
+
|
|
247
|
+
Neither identity can be replaced by a display name, message body, or model memory.
|
|
248
|
+
|
|
249
|
+
## The two-part gate
|
|
250
|
+
|
|
251
|
+
The safety half prevents wrong actions: response eligibility, trusted identity and target, one egress owner, action budgets, idempotency, and readback.
|
|
252
|
+
|
|
253
|
+
The empathy half supplies context a colleague naturally has: quoted messages, recent conversation burst, attachments, readable identity, status, and interruption context. Enrichment improves decisions but never expands authority.
|
|
254
|
+
|
|
255
|
+
## Three semantic memory layers
|
|
256
|
+
|
|
257
|
+
| Layer | Typical medium | Content |
|
|
258
|
+
|---|---|---|
|
|
259
|
+
| L1 task memory | Session checkpoint | Current goal, progress, next step, wait condition, evidence |
|
|
260
|
+
| L2 operational memory | AI table, task, calendar, business system | Structured and aggregatable working facts |
|
|
261
|
+
| L3 long-term knowledge | DingTalk docs, knowledge base, wiki | Reviewed methods, stable facts, SOPs, lessons |
|
|
262
|
+
|
|
263
|
+
Control state is separate: event dedupe, leases, generation, idempotency keys, budgets, Wait, and Receipts require an atomic host store. Markdown, DingTalk documents, and Git are not transaction or lock services.
|
|
264
|
+
|
|
265
|
+
## Real-world Lab
|
|
266
|
+
|
|
267
|
+
Evaluation progresses through five levels:
|
|
268
|
+
|
|
269
|
+
| Level | Environment | Evidence |
|
|
270
|
+
|---|---|---|
|
|
271
|
+
| L0 | fixtures + real CLI | Contracts, state machines, target integrity, idempotency |
|
|
272
|
+
| L1 | model shadow | Skill loading and behavioral gain, without DingTalk effects |
|
|
273
|
+
| L2 | fake DWS + real Action Gate | Intent/Attempt/Receipt, readback, recovery |
|
|
274
|
+
| L3 | dedicated robot connector | Real connection, Workspace, expression, delivery, teardown |
|
|
275
|
+
| L4 | test colleague/group + personal event + dta Broker | Full envelope, identity, target, Wait/Resume, single egress |
|
|
276
|
+
|
|
277
|
+
Live runs require dedicated resources, allowlists, unique markers, fixed budgets, independent platform readback, and exact teardown. A robot response does not prove the personal-event envelope or dta-owned egress.
|
|
278
|
+
|
|
279
|
+
The [`personal-event-eval@1`](lab/schemas/personal-event-eval.schema.json) suite binds Basic + Role Skills, response eligibility, Wait/Resume, duplicate delivery, Perception, Receipts, and teardown into one evidence chain. Event capture remains external; dta does not create a subscription or trigger. The default command is plan-only. Execution requires both `liveAuthorized=yes` in the local suite and all CLI confirmations:
|
|
280
|
+
|
|
281
|
+
```bash
|
|
282
|
+
dta lab eval --engine personal-event \
|
|
283
|
+
--workspace <agent-workspace> \
|
|
284
|
+
--suite .dingtalk-agent/personal-event-live.local.json --json
|
|
285
|
+
|
|
286
|
+
dta lab eval --engine personal-event \
|
|
287
|
+
--workspace <agent-workspace> \
|
|
288
|
+
--suite .dingtalk-agent/personal-event-live.local.json \
|
|
289
|
+
--execute --live --yes --json
|
|
290
|
+
```
|
|
291
|
+
|
|
292
|
+
See the placeholder [`personal-event-live.example.json`](lab/agent-eval/personal-event-live.example.json) and the sanitized local [`personal-event-live-readiness-summary.json`](evals/baselines/2026-07-17/personal-event-live-readiness-summary.json). Each reply must independently read back the exact body under the same message ID; a duplicate must reuse the original Run, Action, and Attempt with no new egress. The fake-DWS contract passes 8/8 scenarios, seven physical Runs, and five new outward effects, while rejecting a readback with the correct ID but rewritten body. That proves runner readiness, not a real personal-event delivery.
|
|
293
|
+
|
|
294
|
+
```bash
|
|
295
|
+
# OpenCode plan only
|
|
296
|
+
dta lab eval --engine opencode \
|
|
297
|
+
--workspace lab/robot-eval/workspace \
|
|
298
|
+
--suite lab/robot-eval/suite.json --lanes stateless --runs 3 --json
|
|
299
|
+
|
|
300
|
+
# Fixed model, isolated Workspace, no DingTalk side effects
|
|
301
|
+
dta lab eval --engine opencode \
|
|
302
|
+
--workspace lab/robot-eval/workspace \
|
|
303
|
+
--suite lab/robot-eval/suite.json --lanes stateless --runs 3 \
|
|
304
|
+
--execute --yes --json
|
|
305
|
+
```
|
|
306
|
+
|
|
307
|
+
## Evaluation as a reusable Skill
|
|
308
|
+
|
|
309
|
+
The bundled [`dingtalk-agent-eval`](skills/dingtalk-agent-eval/SKILL.md) Skill defines the complete workflow: identify the Definition, prove Basic Skill loading, select a stable scenario, isolate execution, collect multiple evidence surfaces, apply hard gates, and only then score quality.
|
|
310
|
+
|
|
311
|
+
Scenarios are grouped by the condition they can break, not by date or role:
|
|
312
|
+
|
|
313
|
+
1. `host-loading`
|
|
314
|
+
2. `conversation-contract`
|
|
315
|
+
3. `authority-and-egress`
|
|
316
|
+
4. `task-lifecycle`
|
|
317
|
+
5. `memory-and-storage`
|
|
318
|
+
6. `workspace-and-artifacts`
|
|
319
|
+
7. `platform-reliability`
|
|
320
|
+
|
|
321
|
+
The repository catalog is [`lab/agent-eval/catalog.json`](lab/agent-eval/catalog.json). A reply is only one evidence surface. Cases can also require filesystem paths and contents, a valid Agent Workspace, artifact manifests and hashes, Receipts, or independent DWS readback. A failed load, safety, or integrity gate cannot be averaged away by a high quality score.
|
|
322
|
+
|
|
323
|
+
Run the classic incident suite or select individual cases:
|
|
324
|
+
|
|
325
|
+
```bash
|
|
326
|
+
dta lab eval --engine opencode \
|
|
327
|
+
--workspace lab/agent-eval/workspace \
|
|
328
|
+
--suite lab/agent-eval/classic-failures.json \
|
|
329
|
+
--cases requester-only-authorization,workspace-artifact \
|
|
330
|
+
--runs 1 --execute --yes --json
|
|
331
|
+
```
|
|
332
|
+
|
|
333
|
+
The 2026-07-16 OpenCode 1.17.14 + DeepSeek development regression covers nine classic cases. Basic 0.9.4 passed its load gate. Eight cases passed in the full run; the only correct refusal missed a phrase-only grader and passed a targeted rerun after the grader changed to a bounded regex plus independent reason and exclusion checks. The artifact case allowed only `read/write/edit` and actually used only `write`; it passed all seven Workspace/Artifact/Filesystem postconditions and copied two hashed outputs into the evidence bundle. Writable sandboxes live under a system temporary root outside the repository; the runner canonicalizes and audits every tool path so OpenCode cannot resolve a relative write against a parent Git checkout. This is combined 9/9 passing evidence, not a claim of one statistically significant run. See the [sanitized multi-surface summary](evals/baselines/2026-07-16/opencode-multi-surface-summary.json).
|
|
334
|
+
|
|
335
|
+
The same local `AGENTS.md + Skills` can be evaluated with local semantic state or with `memory` and `knowledge` hydrated from `dingtalk-doc:`:
|
|
336
|
+
|
|
337
|
+
```bash
|
|
338
|
+
cp lab/agent-eval/remote-state.example.json \
|
|
339
|
+
.dingtalk-agent/remote-state.local.json
|
|
340
|
+
|
|
341
|
+
# Plan only: no DWS read and no model call
|
|
342
|
+
dta lab eval --engine storage \
|
|
343
|
+
--workspace lab/agent-eval/remote-state-workspace \
|
|
344
|
+
--suite .dingtalk-agent/remote-state.local.json --json
|
|
345
|
+
|
|
346
|
+
# Read two dedicated documents and evaluate OpenCode; --live adds one unique write probe
|
|
347
|
+
dta lab eval --engine storage \
|
|
348
|
+
--workspace lab/agent-eval/remote-state-workspace \
|
|
349
|
+
--suite .dingtalk-agent/remote-state.local.json \
|
|
350
|
+
--execute --live --yes --json
|
|
351
|
+
```
|
|
352
|
+
|
|
353
|
+
The 2026-07-16 live DWS canary used two dedicated `adoc` documents. The local Definition was ready, Basic 0.9.4 was forced through OpenCode instructions, both remote/mount/cache/manifest hashes matched, and DeepSeek returned two remote-only probe values with zero tools. One append marker was verified exactly once through a full-document readback. Deterministic contracts also reject a wrong DWS identity, a non-adoc node, and post-bootstrap drift. The first byte-level marker check produced a false negative because DingTalk escaped Markdown punctuation; the runner now counts the normalized text stream and never treats a command response as proof. See the [sanitized remote-state summary](evals/baselines/2026-07-16/remote-state-live-summary.json).
|
|
354
|
+
|
|
355
|
+
Remote Markdown remains semantic state; private control state stays in the host's atomic store. The evaluator does not infer permission to delete its dedicated test documents.
|
|
356
|
+
|
|
357
|
+
## Development and verification
|
|
358
|
+
|
|
359
|
+
```bash
|
|
360
|
+
npm ci
|
|
361
|
+
npm run typecheck
|
|
362
|
+
npm run eval:contract
|
|
363
|
+
npm pack --dry-run
|
|
364
|
+
```
|
|
365
|
+
|
|
366
|
+
The 60-case deterministic suite also covers `agent-bindings@1`, plan-bound enhancement with backups and semantic-placeholder gates, precise partial-to-ready repairs, OpenCode load evidence bound to the current Definition and Host exposure, two-process L1/L2/L3 remote semantic-state recovery, a default-safe Phase 11B Live runner, the Phase 9 personal-event evidence chain, fail-closed identity/type/drift/slot/cache checks, replication of a second isolated Role Agent without kernel changes, multi-Provider Project/Workspace isolation, Workspace-bound OpenCode materialization/run/eval, Multica W3–W5 orchestration, isolated npm-tarball readiness, negation-aware completion claims, and predeclared comparison policies. A passing comparison policy is a deterministic release gate, not statistical significance or proof of a stable model gain.
|
|
367
|
+
|
|
368
|
+
See [Self-test and evolution](docs/SELF-TEST.md), [Architecture](docs/ARCHITECTURE.md), and the [implementation plan](docs/plans/2026-07-16/eval-test-skill-and-remote-state.md).
|
|
369
|
+
|
|
370
|
+
## Project layout
|
|
371
|
+
|
|
372
|
+
```text
|
|
373
|
+
bin/ CLI composition root
|
|
374
|
+
src/ TypeScript runtime
|
|
375
|
+
skills/dingtalk-basic-behavior/ shared employee behavior
|
|
376
|
+
skills/dingtalk-agent-compose/ Agent assembly and optimization
|
|
377
|
+
skills/dingtalk-agent-eval/ scenario, evidence, and promotion method
|
|
378
|
+
examples/agents/ reusable role kits
|
|
379
|
+
lab/ catalogs, manifests, schemas, and runbooks
|
|
380
|
+
evals/ deterministic and model evaluations
|
|
381
|
+
docs/ architecture and decisions
|
|
382
|
+
```
|
|
383
|
+
|
|
384
|
+
## Current boundaries
|
|
385
|
+
|
|
386
|
+
- Event listeners and schedulers are outside the kernel.
|
|
387
|
+
- Workspace initialization is optional and never automatic per session.
|
|
388
|
+
- dta does not duplicate the DWS command surface.
|
|
389
|
+
- DingTalk documents do not store locks, idempotency, generation, or effect receipts.
|
|
390
|
+
- Online Runs cannot hot-expand identity, authority, or enabled Skills.
|
|
391
|
+
- `bootstrap` hydrates `dingtalk-doc` as a read-only snapshot; remote publication requires explicit authorization and readback.
|
|
392
|
+
|
|
393
|
+
## License
|
|
394
|
+
|
|
395
|
+
[MIT](LICENSE)
|