@xdxer/dingtalk-agent 0.1.4-beta.9 → 0.1.5-beta.1
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 +229 -0
- package/README.en.md +89 -324
- package/README.md +88 -674
- package/dist/bin/dingtalk-agent.js +207 -21
- package/dist/bin/dingtalk-agent.js.map +1 -1
- package/dist/src/agent-audit.js +1014 -89
- package/dist/src/agent-audit.js.map +1 -1
- package/dist/src/agent-enhance.js +41 -8
- package/dist/src/agent-enhance.js.map +1 -1
- package/dist/src/agent-platform.js +299 -0
- package/dist/src/agent-platform.js.map +1 -0
- package/dist/src/config.js +1 -7
- package/dist/src/config.js.map +1 -1
- package/dist/src/development-workspace.js +31 -5
- package/dist/src/development-workspace.js.map +1 -1
- package/dist/src/doctor.js +74 -15
- package/dist/src/doctor.js.map +1 -1
- package/dist/src/host-detect.js +146 -0
- package/dist/src/host-detect.js.map +1 -0
- package/dist/src/instruction-path.js +270 -0
- package/dist/src/instruction-path.js.map +1 -0
- package/dist/src/multica-deploy.js +78 -20
- package/dist/src/multica-deploy.js.map +1 -1
- package/dist/src/multica-provider.js +1 -1
- package/dist/src/multica-provider.js.map +1 -1
- package/dist/src/opencode-evals.js +710 -225
- package/dist/src/opencode-evals.js.map +1 -1
- package/dist/src/opencode-isolation.js +124 -0
- package/dist/src/opencode-isolation.js.map +1 -0
- package/dist/src/opencode-provider.js +1 -0
- package/dist/src/opencode-provider.js.map +1 -1
- package/dist/src/opencode-workspace.js +21 -10
- package/dist/src/opencode-workspace.js.map +1 -1
- package/dist/src/remote-state-evals.js +2 -1
- package/dist/src/remote-state-evals.js.map +1 -1
- package/dist/src/robot-evals.js +2 -1
- package/dist/src/robot-evals.js.map +1 -1
- package/dist/src/setup.js +6 -5
- package/dist/src/setup.js.map +1 -1
- package/dist/src/skill-manager.js +141 -12
- package/dist/src/skill-manager.js.map +1 -1
- package/dist/src/skills.js +2 -1
- package/dist/src/skills.js.map +1 -1
- package/dist/src/types.js.map +1 -1
- package/dist/src/upgrade.js +23 -27
- package/dist/src/upgrade.js.map +1 -1
- package/dist/src/version.js +73 -0
- package/dist/src/version.js.map +1 -0
- package/docs/ARCHITECTURE.md +232 -0
- package/docs/INSTALLATION.md +3 -3
- package/docs/PRIOR-ART.md +122 -0
- package/docs/SELF-TEST.md +182 -0
- package/docs/assets/agent-delivery-lifecycle.svg +103 -0
- package/docs/schemas/agent-platform.schema.json +13 -0
- package/docs/schemas/project.schema.json +3 -0
- package/docs/schemas/release-readiness.schema.json +2 -1
- package/evals/README.md +17 -0
- package/examples/agents/README.md +43 -0
- package/examples/agents/fde-coach/AGENTS.md +26 -17
- package/examples/agents/release-manager/AGENTS.md +26 -17
- package/lab/README.md +3 -3
- package/lab/agent-eval/catalog.json +5 -5
- package/lab/agent-eval/classic-failures.json +9 -9
- package/lab/agent-eval/completion-gate-regression.json +6 -6
- package/lab/agent-eval/remote-state-workspace/opencode.json +1 -1
- package/lab/agent-eval/workspace/AGENTS.md +1 -1
- package/lab/project-workspace/fake-multica-provider.mjs +17 -6
- package/lab/project-workspace/opencode-provider-suite.json +2 -2
- package/lab/robot-eval/suite.json +1 -1
- package/lab/robot-eval/workspace/AGENTS.md +1 -1
- package/lab/schemas/agent-eval-catalog.schema.json +1 -1
- package/package.json +18 -13
- package/skills/README.md +23 -0
- package/skills/core/dingtalk-agent-compose/SKILL.md +151 -0
- package/skills/core/dingtalk-agent-compose/assets/AGENTS.template.md +35 -0
- package/skills/core/dingtalk-agent-compose/assets/role-skill.template.md +32 -0
- package/skills/core/dingtalk-agent-compose/evals/evals.json +129 -0
- package/skills/{dingtalk-agent-compose → core/dingtalk-agent-compose}/references/agent-definition-contract.md +3 -3
- package/skills/core/dingtalk-agent-compose/references/host-loading-contract.md +58 -0
- package/skills/core/dingtalk-agent-compose/references/hosts/claude-code.md +48 -0
- package/skills/core/dingtalk-agent-compose/references/hosts/opencode.md +77 -0
- package/skills/{dingtalk-agent-eval → core/dingtalk-agent-eval}/SKILL.md +57 -8
- package/skills/{dingtalk-agent-eval → core/dingtalk-agent-eval}/assets/eval-catalog.template.json +1 -1
- package/skills/{dingtalk-agent-eval → core/dingtalk-agent-eval}/evals/evals.json +22 -0
- package/skills/{dingtalk-agent-eval → core/dingtalk-agent-eval}/references/eval-topology.md +14 -0
- package/skills/{dingtalk-agent-eval → core/dingtalk-agent-eval}/references/evidence-contract.md +21 -0
- package/skills/core/dingtalk-agent-eval/references/failure-to-case.md +35 -0
- package/skills/core/dingtalk-agent-eval/references/interactive-debug-channels.md +93 -0
- package/skills/core/dingtalk-agent-eval/references/local-connector-smoke.md +75 -0
- package/skills/core/dingtalk-basic-behavior/SKILL.md +87 -0
- package/skills/{dingtalk-basic-behavior → core/dingtalk-basic-behavior}/references/memory-and-evolution.md +12 -0
- package/skills/core/dingtalk-basic-behavior/references/risk-authority-and-privacy.md +62 -0
- package/skills/{dingtalk-basic-behavior → core/dingtalk-basic-behavior}/references/task-lifecycle.md +15 -3
- package/skills/core/dingtalk-basic-behavior/references/truth-and-recovery.md +65 -0
- package/skills/platforms/deap/PLATFORM.md +3 -0
- package/skills/platforms/multica-dingtalk/PLATFORM.md +40 -0
- package/skills/{dingtalk-agent-boot-multica → platforms/multica-dingtalk/dingtalk-agent-boot-multica}/SKILL.md +4 -4
- package/skills/{dingtalk-agent-deploy → platforms/multica-dingtalk/dingtalk-agent-deploy-multica}/SKILL.md +1 -1
- package/skills/platforms/multica-dingtalk/multica-external/SKILL.md +282 -0
- package/skills/platforms/multica-dingtalk/multica-external/scripts/bootstrap.sh +78 -0
- package/skills/platforms/multica-dingtalk/multica-external/scripts/multica_ext.py +1180 -0
- package/docs/SECOND-AGENT-ACCEPTANCE.md +0 -62
- package/docs/architecture/agent-memory-topology.png +0 -0
- package/docs/architecture/agent-memory-topology.svg +0 -132
- package/docs/architecture/dingtalk-agent-blueprint.png +0 -0
- package/docs/architecture/durable-async-agent-runtime.png +0 -0
- package/docs/architecture/general-agent-kernel-topology.png +0 -0
- package/docs/architecture/provider-bound-development-workspace.png +0 -0
- package/docs/architecture/task-completion-gate.png +0 -0
- package/skills/dingtalk-agent-compose/SKILL.md +0 -110
- package/skills/dingtalk-agent-compose/assets/AGENTS.template.md +0 -26
- package/skills/dingtalk-agent-compose/assets/role-skill.template.md +0 -24
- package/skills/dingtalk-agent-compose/evals/evals.json +0 -94
- package/skills/dingtalk-agent-compose/references/opencode-host-contract.md +0 -65
- package/skills/dingtalk-basic-behavior/SKILL.md +0 -146
- /package/skills/{dingtalk-agent-compose → core/dingtalk-agent-compose}/assets/agent.bindings.dingtalk-doc.template.json +0 -0
- /package/skills/{dingtalk-agent-compose → core/dingtalk-agent-compose}/assets/agent.bindings.local.template.json +0 -0
- /package/skills/{dingtalk-agent-compose/assets → core/dingtalk-agent-compose/assets/hosts/opencode}/opencode.template.json +0 -0
- /package/skills/{dingtalk-agent-compose → core/dingtalk-agent-compose}/references/storage-routing.md +0 -0
- /package/skills/{dingtalk-agent-eval → core/dingtalk-agent-eval}/references/scenario-taxonomy.md +0 -0
- /package/skills/{dingtalk-agent-eval → core/dingtalk-agent-eval}/references/storage-modes.md +0 -0
- /package/skills/{dingtalk-basic-behavior → core/dingtalk-basic-behavior}/assets/memory-candidate-proposal.json +0 -0
- /package/skills/{dingtalk-basic-behavior → core/dingtalk-basic-behavior}/assets/task-checkpoint.json +0 -0
- /package/skills/{dingtalk-basic-behavior → core/dingtalk-basic-behavior}/references/action-contract.md +0 -0
- /package/skills/{dingtalk-basic-behavior → core/dingtalk-basic-behavior}/references/event-to-behavior.md +0 -0
- /package/skills/{dingtalk-basic-behavior → core/dingtalk-basic-behavior}/references/perception-and-gates.md +0 -0
- /package/skills/{dingtalk-basic-behavior → core/dingtalk-basic-behavior}/references/runtime-modes.md +0 -0
- /package/skills/{dingtalk-agent-deploy → platforms/multica-dingtalk/dingtalk-agent-deploy-multica}/references/multica-deployment-contract.md +0 -0
- /package/skills/{dingtalk-agent-deploy → platforms/multica-dingtalk/dingtalk-agent-deploy-multica}/references/promotion-observation-contract.md +0 -0
package/README.en.md
CHANGED
|
@@ -2,394 +2,159 @@
|
|
|
2
2
|
|
|
3
3
|
# dingtalk-agent
|
|
4
4
|
|
|
5
|
-
**
|
|
5
|
+
**Give every digital employee the same verifiable behavior foundation.**
|
|
6
6
|
|
|
7
7
|
[](https://www.npmjs.com/package/@xdxer/dingtalk-agent)
|
|
8
8
|
[](https://github.com/D1-2004/dingtalk-agent/actions/workflows/ci.yml)
|
|
9
9
|
[](https://nodejs.org/)
|
|
10
10
|
[](LICENSE)
|
|
11
11
|
|
|
12
|
-
|
|
12
|
+
[Quick start](#quick-start) · [What an Agent is made of](#what-an-agent-is-made-of) · [How this repo is divided](#how-this-repo-is-divided) · [Docs](#docs)
|
|
13
13
|
|
|
14
|
-
|
|
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 |
|
|
14
|
+
[简体中文](README.md) · English
|
|
31
15
|
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
## Why it exists
|
|
16
|
+
</div>
|
|
35
17
|
|
|
36
|
-
|
|
18
|
+
`dingtalk-agent` (`dta`) is the **Skill-first behavior kernel and delivery toolchain** for DingTalk digital employees. It assembles role definition, shared behavior, role capability, and execution gates into an Agent Project you can create, test, promote, and audit.
|
|
37
19
|
|
|
38
|
-
|
|
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.
|
|
20
|
+
> **Skills advise. The CLI gates. DWS acts.** Skills decide when and why to act; the CLI pins identity, target, budget, idempotency, and readback; DWS performs DingTalk capabilities.
|
|
44
21
|
|
|
45
|
-
|
|
22
|
+
**DWS is DingTalk's own command-line tool** — separate from this project, installed and authenticated on its own (`dws auth login`) — covering roughly 20 product areas: messaging, docs, AI tables, calendar, approvals, and more. `dta` does not clone its command surface; it wraps it only where identity, target, idempotency, or readback must be frozen. **Every real DingTalk operation is ultimately executed by DWS.**
|
|
46
23
|
|
|
47
|
-
|
|
24
|
+

|
|
48
25
|
|
|
49
26
|
## Quick start
|
|
50
27
|
|
|
51
|
-
Requires Node.js 18.3
|
|
28
|
+
Requires Node.js 18.3+.
|
|
52
29
|
|
|
53
30
|
```bash
|
|
54
31
|
npm install --global --prefix "$HOME/.local" \
|
|
55
32
|
--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
33
|
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
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
|
|
34
|
+
# setup writes a PATH block into ~/.zshrc or ~/.bashrc, but a child process
|
|
35
|
+
# cannot change the current shell — so keep using the absolute path this round.
|
|
36
|
+
# A new terminal can call `dta` directly.
|
|
37
|
+
"$HOME/.local/bin/dta" setup --skip-cli-install
|
|
38
|
+
"$HOME/.local/bin/dta" doctor
|
|
81
39
|
```
|
|
82
40
|
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
The Agent hydrates a local folder or a DingTalk document without requiring `init` on every session.
|
|
41
|
+
`setup` installs the Basic Behavior, Compose, and Eval Skills, then checks DWS authentication and common Agent Hosts. Normal sessions do not require Workspace initialization.
|
|
86
42
|
|
|
87
|
-
|
|
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
|
-
```
|
|
43
|
+
**How far you get with nothing external**: composing, auditing, `workspace run/eval`, and the full contract suite need no DingTalk account and no managed platform — `doctor` marks what is missing as `partial` rather than failing. Only real outbound messaging, remote semantic state, and `deploy`/`promote` require DWS authentication and Multica.
|
|
94
44
|
|
|
95
|
-
|
|
45
|
+
## Why it exists
|
|
96
46
|
|
|
97
|
-
A
|
|
47
|
+
A model that talks is not a digital employee that works reliably. `dta` turns the four most drift-prone concerns into inheritable, verifiable contracts:
|
|
98
48
|
|
|
99
|
-
|
|
49
|
+
- **It judges first.** Decide whether to reply before deciding what to say; stay quiet in group chats without an `@`.
|
|
50
|
+
- **It stays in scope.** Identity, target, permission, authorization, and reply channel are never guessed from message text or model memory.
|
|
51
|
+
- **It does not overclaim.** Command success, platform visibility, message delivery, and human acceptance are four distinct completion levels, each evidenced separately.
|
|
52
|
+
- **It is reusable.** A new Agent inherits shared behavior and only adds role differences — no copied mega-prompt.
|
|
100
53
|
|
|
101
|
-
|
|
54
|
+
## What an Agent is made of
|
|
102
55
|
|
|
103
|
-
|
|
56
|
+
Four things: the **Definition** (`AGENTS.md` — who I am, where my duties stop), **shared behavior** (the `dingtalk-basic-behavior` Skill — when to respond, ask, stay silent, close out), **role capability** (`skills/<role>/SKILL.md`), and **storage routing** (`agent.bindings.json` — optional; the same configuration can come from host context, environment variables, or a Workspace manifest). The Agent Host, DWS, managed platform, and event source it depends on are all outside this project.
|
|
104
57
|
|
|
105
|
-
|
|
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
|
-
```
|
|
58
|
+
Full composition, dependencies, and boundaries: [Architecture](docs/ARCHITECTURE.md#2-一个-agent-由什么构成模型-a).
|
|
116
59
|
|
|
117
|
-
|
|
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:
|
|
60
|
+
**File presence is not inheritance evidence** — `agent audit --verify-load` binds real load results to Definition/Skill hashes, Host and model versions, isolated probes, and raw run/export evidence:
|
|
120
61
|
|
|
121
62
|
```bash
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
--
|
|
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
|
|
63
|
+
dta agent audit \
|
|
64
|
+
--bindings agent.bindings.json \
|
|
65
|
+
--require-skill <role-skill-name> \
|
|
66
|
+
--verify-load --yes --json
|
|
140
67
|
```
|
|
141
68
|
|
|
142
|
-
|
|
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.
|
|
69
|
+
## How this repo is divided
|
|
145
70
|
|
|
146
|
-
|
|
71
|
+
**Behavior kernel** (event → may I respond, to whom, what am I allowed to do), **compose & audit** (turn a repo/folder/doc into a hashable Agent and prove the Skills really loaded), **delivery chain** (reach a managed platform under control, with readback at every step), **eval & evidence** (prove it works at the cheapest sufficient level before going live), **state & memory** (stay resumable after a crash), and **machine & distribution** (one command sets up a new machine).
|
|
147
72
|
|
|
148
|
-
|
|
73
|
+
Delivery and evaluation are roughly a quarter of the codebase each — the hard part was never "make the model talk", but proving the thing really installed, really behaved, and really shipped. What each part solves, and its modules and CLI: [Architecture](docs/ARCHITECTURE.md#7-dingtalk-agent-分成哪几部分模型-c).
|
|
149
74
|
|
|
150
|
-
|
|
75
|
+
## Create → test → promote
|
|
151
76
|
|
|
152
|
-
|
|
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:
|
|
77
|
+
Each of the four stages has a gate: unfilled placeholders keep it `partial`; Skills that did not truly load cannot be ready; a missing named Eval blocks promote; nothing claims delivery or completion without evidence. Details: [Architecture](docs/ARCHITECTURE.md#8-从定义到上线).
|
|
160
78
|
|
|
161
79
|
```bash
|
|
162
|
-
|
|
163
|
-
dta
|
|
164
|
-
dta
|
|
165
|
-
|
|
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`.
|
|
80
|
+
# 1. Generate a zero-write plan, then commit it explicitly
|
|
81
|
+
dta agent enhance --project-name release-agent --role-skill release-manager --dry-run --json
|
|
82
|
+
dta agent enhance --project-name release-agent --role-skill release-manager \
|
|
83
|
+
--plan-id <plan-id> --yes --json
|
|
181
84
|
|
|
182
|
-
|
|
85
|
+
# 2. Audit, run, and evaluate
|
|
86
|
+
dta agent audit --bindings agent.bindings.json --require-skill release-manager --json
|
|
87
|
+
dta workspace run local-dev --json
|
|
88
|
+
dta workspace eval local-dev --json
|
|
183
89
|
|
|
184
|
-
|
|
185
|
-
dta workspace plan multica-dev --json
|
|
90
|
+
# 3. Cloud preflight, promotion, and observation
|
|
186
91
|
dta workspace inspect multica-dev --execute --yes --json
|
|
187
92
|
dta workspace remote-list multica-dev --execute --yes --json
|
|
188
|
-
dta
|
|
93
|
+
dta promote --source local-dev --target multica-dev --dry-run --json
|
|
94
|
+
dta observe --promotion-id <promotion-id> --input <observation.json> --dry-run --json
|
|
189
95
|
```
|
|
190
96
|
|
|
191
|
-
|
|
97
|
+
Plans are zero-write by default. Remote writes require an explicit target, the current `planId`, and confirmation.
|
|
192
98
|
|
|
193
|
-
|
|
99
|
+
The placeholders above are not yours to invent — each has a definite source:
|
|
194
100
|
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
dta deploy --workspace multica-dev --retire --dry-run --json
|
|
202
|
-
dta deploy --workspace multica-dev --retire --plan-id <plan-id> --yes --json
|
|
203
|
-
```
|
|
101
|
+
| Placeholder | Where it comes from |
|
|
102
|
+
|---|---|
|
|
103
|
+
| `<plan-id>` | Top-level `.planId` in the preceding `--dry-run --json` output. Any source or config change invalidates it, so re-run the dry run |
|
|
104
|
+
| `local-dev` / `multica-dev` | Workspace names **you** declare in `dingtalk-agent.json#workspaces` — not built-in values. Sample: [`lab/project-workspace/project.fixture.json`](lab/project-workspace/project.fixture.json) |
|
|
105
|
+
| `<promotion-id>` | `.promotionId` on the `promotion-receipt@1` produced by `dta promote --yes` |
|
|
106
|
+
| `<role-skill-name>` | The `name` in your `skills/<role>/SKILL.md` frontmatter |
|
|
204
107
|
|
|
205
|
-
|
|
108
|
+
### Minimal runnable path (local only, three commands)
|
|
206
109
|
|
|
207
|
-
|
|
110
|
+
To see something move first, don't start with the chain above — that is the full delivery pipeline. Start here:
|
|
208
111
|
|
|
209
112
|
```bash
|
|
210
|
-
|
|
211
|
-
dta
|
|
212
|
-
|
|
213
|
-
dta promote --status --promotion-id <promotion-id> --json
|
|
214
|
-
dta promote --list --json
|
|
113
|
+
cp -R examples/agents/release-manager my-agent && cd my-agent
|
|
114
|
+
dta bootstrap --json # Was the body recognized? Check definition.status and storage routes
|
|
115
|
+
dta agent audit --json # Expect partial — the role semantics are still template text, which is correct
|
|
215
116
|
```
|
|
216
117
|
|
|
217
|
-
|
|
118
|
+
None of this needs a DingTalk account or a managed platform, and none of it has side effects. Fill in the real role semantics in `AGENTS.md`, run `agent audit` again, and the only remaining gap is `host.load-probe` — which needs an Agent Host, see the [Compose Skill](skills/core/dingtalk-agent-compose/SKILL.md). The third command group above only applies once you have a Multica binding and declared Workspaces.
|
|
218
119
|
|
|
219
|
-
|
|
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.
|
|
120
|
+
## Support
|
|
235
121
|
|
|
236
|
-
|
|
122
|
+
A **Managed Agent Platform** (owning Workspace, Runtime, identity binding, and observation), an **Agent Host** (a.k.a. Harness — loads Definition/Skills and isolates execution), and the **dta Kernel** are three separate concepts:
|
|
237
123
|
|
|
238
|
-
|
|
124
|
+
| Dimension | Current support |
|
|
125
|
+
|---|---|
|
|
126
|
+
| **Managed Platform** | Multica (DingTalk) supported; DEAP coming soon; additional platforms through registry + adapters |
|
|
127
|
+
| **Local runtime** | Direct/Mounted sessions in Claude Code, Codex, OpenCode, and similar Hosts; OpenCode is the most complete local managed-Harness reference |
|
|
128
|
+
| **Cloud runtime** | Multica Workspace / Runtime / Agent with the same Definition, Skills, Gate, and evidence contract |
|
|
129
|
+
| **Delivery identity** | Digital-employee/account identity or robot-app identity; neither expands the Agent role or authority |
|
|
239
130
|
|
|
240
|
-
|
|
131
|
+
OpenCode is not a runtime dependency, and Multica is not a privileged bypass. Any promotable Harness must prove the same outcomes: loaded Definition and Skills, pinned identity and isolation, retrievable execution trace, and independent readback. "Multi-platform" means the architecture, registry, and adapter contract are extensible; it does not claim that unopened platforms have been deployed or Live-verified.
|
|
241
132
|
|
|
242
|
-
|
|
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.
|
|
133
|
+
### Runtime modes
|
|
246
134
|
|
|
247
|
-
|
|
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 |
|
|
135
|
+
| Mode | Use | Boundary |
|
|
258
136
|
|---|---|---|
|
|
259
|
-
|
|
|
260
|
-
|
|
|
261
|
-
|
|
|
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.
|
|
137
|
+
| **Direct Session** | Normal interactive work | Never guess an outbound target without a trusted event |
|
|
138
|
+
| **Mounted Session** | Mount local or DingTalk semantic content | Locks, idempotency, and Receipts do not live in Markdown |
|
|
139
|
+
| **Prepared Run** | Reliable event-driven side effects | Actions go only through the typed Broker or `dta act` |
|
|
264
140
|
|
|
265
|
-
|
|
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
|
-
```
|
|
141
|
+
Prepared Runs expose four message atoms: `ack`, `reply`, `ask`, and `silence`. An acknowledgement is not task acceptance, and a reply is not human acceptance.
|
|
306
142
|
|
|
307
|
-
|
|
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
|
-
```
|
|
143
|
+
**Triggers are out of scope for this project**: `listen` is a replaceable local integration Adapter, and `dta deploy` never creates robots, webhooks, or timers.
|
|
383
144
|
|
|
384
|
-
##
|
|
145
|
+
## Docs
|
|
385
146
|
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
147
|
+
| Goal | Start here |
|
|
148
|
+
|---|---|
|
|
149
|
+
| Understand the Agent architecture and how the repo is divided | [Architecture](docs/ARCHITECTURE.md) |
|
|
150
|
+
| Install, upgrade, or troubleshoot | [Installation](docs/INSTALLATION.md) |
|
|
151
|
+
| Understand evaluation and evidence levels | [Self-test](docs/SELF-TEST.md) |
|
|
152
|
+
| Create or audit an Agent | [Compose Skill](skills/core/dingtalk-agent-compose/SKILL.md) |
|
|
153
|
+
| Test or debug a delivered Agent | [Eval Skill](skills/core/dingtalk-agent-eval/SKILL.md) |
|
|
154
|
+
| Read the shared behavior protocol (a contract written for models, not a tutorial) | [Basic Behavior Skill](skills/core/dingtalk-basic-behavior/SKILL.md) |
|
|
155
|
+
| Copy a complete example and edit from there | [Example Agents](examples/agents) |
|
|
156
|
+
| See which open-source projects informed this one | [Prior Art](docs/PRIOR-ART.md) |
|
|
392
157
|
|
|
393
|
-
|
|
158
|
+
Behavior assets come from observable contracts, counterexample-driven revision, and deployable verification. This project does not claim access to any product's hidden system prompt.
|
|
394
159
|
|
|
395
|
-
|
|
160
|
+
MIT License
|