@xdxer/dingtalk-agent 0.1.4-beta.9 → 0.1.4
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 +198 -0
- package/README.en.md +98 -326
- package/README.md +95 -673
- package/dist/bin/dingtalk-agent.js +200 -18
- 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/map.js +157 -0
- package/dist/src/map.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/INSTALLATION.md +3 -3
- 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/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 +1 -1
- 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 +13 -12
- 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 +31 -7
- 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/deap/README.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/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,166 @@
|
|
|
2
2
|
|
|
3
3
|
# dingtalk-agent
|
|
4
4
|
|
|
5
|
-
**A
|
|
5
|
+
**A verifiable behavior foundation for DingTalk digital employees.**
|
|
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
|
+
[Quick start](#quick-start) · [How it works](#how-it-works) · [Support](#support) · [Docs](#docs)
|
|
13
|
+
|
|
12
14
|
English · [简体中文](README.md)
|
|
13
15
|
|
|
14
16
|
</div>
|
|
15
17
|
|
|
16
|
-
|
|
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:
|
|
18
|
+
`dingtalk-agent` (`dta`) is a **Skill-first behavior kernel and delivery toolchain** for DingTalk digital employees. It assembles role definition, shared behavior, role capabilities, and execution gates into an Agent Project that can be created, tested, promoted, and audited.
|
|
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 executes DingTalk capabilities.
|
|
44
21
|
|
|
45
|
-
The
|
|
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.
|
|
22
|
+

|
|
48
23
|
|
|
49
24
|
## Quick start
|
|
50
25
|
|
|
51
|
-
Requires Node.js 18.3
|
|
26
|
+
Requires Node.js 18.3+.
|
|
52
27
|
|
|
53
28
|
```bash
|
|
54
29
|
npm install --global --prefix "$HOME/.local" \
|
|
55
30
|
--registry=https://registry.npmjs.org @xdxer/dingtalk-agent@beta
|
|
56
|
-
"$HOME/.local/bin/dta" setup --skip-cli-install
|
|
57
31
|
|
|
58
|
-
dta --
|
|
32
|
+
"$HOME/.local/bin/dta" setup --skip-cli-install
|
|
59
33
|
dta doctor
|
|
60
34
|
```
|
|
61
35
|
|
|
62
|
-
`setup`
|
|
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).
|
|
36
|
+
`setup` installs the Basic Behavior and Compose Skills, then checks DWS authentication and common Agent Hosts. Normal sessions do not require Workspace initialization.
|
|
143
37
|
|
|
144
|
-
|
|
38
|
+
## Why it exists
|
|
145
39
|
|
|
146
|
-
|
|
40
|
+
A model that can talk is not yet a reliable digital employee. `dta` turns the parts most likely to drift into inherited, verifiable contracts:
|
|
147
41
|
|
|
148
|
-
|
|
42
|
+
- **Response judgment:** decide whether to respond before deciding what to say; stay silent in an unmentioned group chat by default.
|
|
43
|
+
- **Authority boundaries:** never infer identity, target, permission, authorization, or reply channel from message text or model memory.
|
|
44
|
+
- **Evidence-backed completion:** command success, platform visibility, delivery, and human acceptance are different states.
|
|
45
|
+
- **Reuse:** new Agents inherit shared behavior and add only role-specific differences instead of copying a giant prompt.
|
|
149
46
|
|
|
150
|
-
|
|
47
|
+
## How it works
|
|
151
48
|
|
|
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
|
-
```
|
|
49
|
+
An Agent is assembled from four contract layers:
|
|
158
50
|
|
|
159
|
-
|
|
51
|
+
| Layer | Responsibility |
|
|
52
|
+
|---|---|
|
|
53
|
+
| **`AGENTS.md`** | Role, role-specific boundaries, operating pattern, common mistakes, and the Basic startup anchor |
|
|
54
|
+
| **Basic Behavior** | Shared response eligibility, scope, authorization, privacy, completion, and memory behavior |
|
|
55
|
+
| **Role Skills** | Domain judgment, procedure, prohibited actions, and acceptance criteria |
|
|
56
|
+
| **Gate + Receipt** | Hard constraints for identity, target, budget, idempotency, state transitions, and platform readback |
|
|
160
57
|
|
|
161
|
-
|
|
162
|
-
dta info --json
|
|
163
|
-
dta workspace list --json
|
|
164
|
-
dta workspace show local-dev --json
|
|
165
|
-
dta workspace doctor local-dev --json
|
|
166
|
-
```
|
|
58
|
+
The Prompt keeps only what must remain resident and precisely defined. The full behavior tree belongs in Skills. Constraints that cannot rely on model discretion belong in the Gate.
|
|
167
59
|
|
|
168
|
-
|
|
60
|
+
### Create → test → promote
|
|
169
61
|
|
|
170
|
-
|
|
62
|
+
| Stage | Main artifact | Gate |
|
|
63
|
+
|---|---|---|
|
|
64
|
+
| **Create** | `AGENTS.md`, Basic, Role Skills, bindings | Unresolved placeholders keep the project `partial` |
|
|
65
|
+
| **Test** | Isolated Workspace, load probe, behavior eval, four evidence surfaces | A project cannot become ready without proven Definition/Skill loading |
|
|
66
|
+
| **Promote** | Platform preflight, deployment Receipt, remote readback | Missing designated Eval evidence or identity chain blocks promotion |
|
|
67
|
+
| **Operate** | Digital-employee account or robot entry point, task trace | No claim of write, delivery, or completion without matching evidence |
|
|
171
68
|
|
|
172
69
|
```bash
|
|
173
|
-
|
|
174
|
-
dta
|
|
175
|
-
dta
|
|
176
|
-
|
|
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`.
|
|
70
|
+
# 1. Generate a zero-write plan, then apply it explicitly
|
|
71
|
+
dta agent enhance --project-name release-agent --role-skill release-manager --dry-run --json
|
|
72
|
+
dta agent enhance --project-name release-agent --role-skill release-manager \
|
|
73
|
+
--plan-id <plan-id> --yes --json
|
|
181
74
|
|
|
182
|
-
|
|
75
|
+
# 2. Audit, run, and evaluate
|
|
76
|
+
dta agent audit --bindings agent.bindings.json --require-skill release-manager --json
|
|
77
|
+
dta workspace run local-dev --json
|
|
78
|
+
dta workspace eval local-dev --json
|
|
183
79
|
|
|
184
|
-
|
|
185
|
-
dta workspace plan multica-dev --json
|
|
80
|
+
# 3. Inspect, promote, and observe
|
|
186
81
|
dta workspace inspect multica-dev --execute --yes --json
|
|
187
82
|
dta workspace remote-list multica-dev --execute --yes --json
|
|
188
|
-
dta
|
|
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
|
|
83
|
+
dta promote --source local-dev --target multica-dev --dry-run --json
|
|
84
|
+
dta observe --promotion-id <promotion-id> --input <observation.json> --dry-run --json
|
|
215
85
|
```
|
|
216
86
|
|
|
217
|
-
|
|
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.
|
|
87
|
+
Plans are zero-write by default. Remote writes require an explicit target, the current `planId`, and confirmation.
|
|
246
88
|
|
|
247
|
-
|
|
89
|
+
## Support
|
|
248
90
|
|
|
249
|
-
|
|
91
|
+
### Platforms, Harnesses, and runtimes
|
|
250
92
|
|
|
251
|
-
|
|
93
|
+
These are separate concepts:
|
|
252
94
|
|
|
253
|
-
|
|
95
|
+
- A **Managed Agent Platform** owns Workspace, Runtime, Agent, Skill, identity binding, and observation.
|
|
96
|
+
- An **Agent Harness** loads Definition/Skills, isolates execution, and captures evidence.
|
|
97
|
+
- The **dta Kernel** depends on a shared contract, not a specific Harness prompt or private directory layout.
|
|
254
98
|
|
|
255
|
-
|
|
99
|
+
| Dimension | Current support |
|
|
100
|
+
|---|---|
|
|
101
|
+
| **Managed Platform** | Multica (DingTalk) supported; DEAP coming soon; additional platforms through registry + adapters |
|
|
102
|
+
| **Local runtime** | Direct/Mounted sessions in Claude Code, Codex, OpenCode, and similar Hosts; OpenCode is the current complete local managed-Harness reference |
|
|
103
|
+
| **Cloud runtime** | Multica Workspace / Runtime / Agent with the same Definition, Skills, Gate, and evidence contract |
|
|
104
|
+
| **Delivery identity** | Digital-employee/account identity or robot-app identity; neither expands the Agent role or authority |
|
|
256
105
|
|
|
257
|
-
|
|
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.
|
|
106
|
+
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.
|
|
264
107
|
|
|
265
|
-
|
|
108
|
+
“Multi-platform” means the architecture, registry, and adapter contract are extensible. It does not claim that unopened platforms have been deployed or Live-verified.
|
|
266
109
|
|
|
267
|
-
|
|
110
|
+
### Runtime modes
|
|
268
111
|
|
|
269
|
-
|
|
|
112
|
+
| Mode | Use | Boundary |
|
|
270
113
|
|---|---|---|
|
|
271
|
-
|
|
|
272
|
-
|
|
|
273
|
-
|
|
|
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:
|
|
114
|
+
| **Direct Session** | Normal interactive work | Never guess an outbound target without a trusted event |
|
|
115
|
+
| **Mounted Session** | Mount local or DingTalk semantic content | Locks, idempotency, and Receipts do not live in Markdown |
|
|
116
|
+
| **Prepared Run** | Reliable event-driven side effects | Actions go only through the typed Broker or `dta act` |
|
|
312
117
|
|
|
313
|
-
|
|
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`
|
|
118
|
+
Prepared Runs expose four message atoms: `ack`, `reply`, `ask`, and `silence`. An acknowledgement is not task acceptance, and a reply is not human acceptance.
|
|
320
119
|
|
|
321
|
-
|
|
120
|
+
## What a generated Agent inherits
|
|
322
121
|
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
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
|
|
122
|
+
```text
|
|
123
|
+
my-agent/
|
|
124
|
+
├── AGENTS.md Role constitution + Basic inheritance anchor
|
|
125
|
+
├── agent.bindings.json Definition and storage routing
|
|
126
|
+
├── dingtalk-agent.json Agent Project desired state
|
|
127
|
+
├── .agents/skills/
|
|
128
|
+
│ ├── dingtalk-basic-behavior/ Complete shared behavior tree
|
|
129
|
+
│ └── <role>/ Host-discoverable Role Skill
|
|
130
|
+
├── skills/<role>/SKILL.md Versioned role capability source
|
|
131
|
+
└── .dingtalk-agent/ Private state, evidence, and Receipts
|
|
351
132
|
```
|
|
352
133
|
|
|
353
|
-
The
|
|
134
|
+
The generated `AGENTS.md` keeps four atomic contracts: **definition, non-negotiable boundaries, operating pattern, and common mistakes**. It also says to apply `dingtalk-basic-behavior` before loading task-relevant Role Skills.
|
|
354
135
|
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
## Development and verification
|
|
136
|
+
File presence is not inheritance evidence. `agent audit --verify-load` binds real load results to Definition/Skill hashes, Host/model versions, isolated probes, and raw run/export evidence:
|
|
358
137
|
|
|
359
138
|
```bash
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
139
|
+
dta agent audit \
|
|
140
|
+
--bindings agent.bindings.json \
|
|
141
|
+
--require-skill <role-skill-name> \
|
|
142
|
+
--verify-load --yes --json
|
|
364
143
|
```
|
|
365
144
|
|
|
366
|
-
|
|
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).
|
|
145
|
+
## Non-negotiable boundaries
|
|
369
146
|
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
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
|
-
```
|
|
147
|
+
- Normal sessions never auto-run `dingtalk-agent init`.
|
|
148
|
+
- Target, actor, conversation, DWS profile, and permissions come only from a trusted Host or event.
|
|
149
|
+
- Prepared Run messaging goes only through a typed Broker or `dta act`; it cannot bypass the Gate.
|
|
150
|
+
- An online Run may propose memory or Skill candidates, but cannot hot-modify current identity, permission, or policy.
|
|
151
|
+
- Model claims, process exit 0, platform-visible writes, delivery, and human acceptance require separate evidence.
|
|
383
152
|
|
|
384
|
-
##
|
|
153
|
+
## Docs
|
|
385
154
|
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
155
|
+
| Goal | Start here |
|
|
156
|
+
|---|---|
|
|
157
|
+
| Understand architecture and state | [Architecture](docs/ARCHITECTURE.md) |
|
|
158
|
+
| Install, upgrade, or troubleshoot | [Installation](docs/INSTALLATION.md) |
|
|
159
|
+
| Understand evaluation and evidence levels | [Self-test](docs/SELF-TEST.md) |
|
|
160
|
+
| Create or audit an Agent | [Compose Skill](skills/core/dingtalk-agent-compose/SKILL.md) |
|
|
161
|
+
| Test or debug a delivered Agent | [Eval Skill](skills/core/dingtalk-agent-eval/SKILL.md) |
|
|
162
|
+
| Read the shared behavior protocol | [Basic Behavior Skill](skills/core/dingtalk-basic-behavior/SKILL.md) |
|
|
163
|
+
| Copy a complete example | [Example Agents](examples/agents) |
|
|
392
164
|
|
|
393
|
-
|
|
165
|
+
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
166
|
|
|
395
|
-
|
|
167
|
+
MIT License
|