@xdxer/dingtalk-agent 0.1.5-beta.3 → 0.1.5-beta.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.
Files changed (42) hide show
  1. package/CHANGELOG.md +21 -0
  2. package/README.en.md +92 -65
  3. package/README.md +92 -65
  4. package/dist/bin/dingtalk-agent.js +142 -15
  5. package/dist/bin/dingtalk-agent.js.map +1 -1
  6. package/dist/src/agent-platform.js +1 -0
  7. package/dist/src/agent-platform.js.map +1 -1
  8. package/dist/src/development-workspace.js +66 -3
  9. package/dist/src/development-workspace.js.map +1 -1
  10. package/dist/src/multica-deploy.js +101 -9
  11. package/dist/src/multica-deploy.js.map +1 -1
  12. package/dist/src/multica-provider.js +157 -2
  13. package/dist/src/multica-provider.js.map +1 -1
  14. package/dist/src/schedule-plan.js +105 -0
  15. package/dist/src/schedule-plan.js.map +1 -0
  16. package/docs/ARCHITECTURE.md +133 -18
  17. package/docs/PRIOR-ART.md +4 -0
  18. package/docs/SELF-TEST.md +1 -1
  19. package/docs/architecture/agent-platform-connection-layer.svg +120 -0
  20. package/docs/architecture/digital-employee-composition.svg +92 -0
  21. package/docs/architecture/dingtalk-agent-architecture.svg +125 -0
  22. package/docs/assets/digital-employee-at-work.svg +77 -0
  23. package/docs/schemas/multica-workspace-run.schema.json +150 -33
  24. package/docs/schemas/project.schema.json +22 -0
  25. package/docs/schemas/workspace-scaffold.schema.json +37 -0
  26. package/examples/agents/README.md +1 -1
  27. package/lab/project-workspace/fake-multica-provider.mjs +18 -2
  28. package/lab/project-workspace/opencode-provider-suite.json +1 -1
  29. package/lab/robot-eval/suite.json +1 -1
  30. package/package.json +2 -2
  31. package/skills/core/dingtalk-agent-compose/SKILL.md +4 -3
  32. package/skills/core/dingtalk-agent-compose/assets/AGENTS.template.md +1 -1
  33. package/skills/core/dingtalk-agent-compose/references/drive-and-schedules.md +124 -0
  34. package/skills/core/dingtalk-basic-behavior/SKILL.md +5 -4
  35. package/skills/core/dingtalk-basic-behavior/references/event-to-behavior.md +15 -1
  36. package/skills/core/dingtalk-basic-behavior/references/perception-and-gates.md +3 -0
  37. package/skills/core/dingtalk-basic-behavior/references/risk-authority-and-privacy.md +12 -0
  38. package/skills/platforms/deap/PLATFORM.md +30 -1
  39. package/skills/platforms/multica-dingtalk/PLATFORM.md +25 -0
  40. package/skills/platforms/multica-dingtalk/dingtalk-agent-deploy-multica/SKILL.md +3 -2
  41. package/skills/platforms/multica-dingtalk/multica-external/SKILL.md +15 -0
  42. package/docs/assets/agent-delivery-lifecycle.svg +0 -103
package/CHANGELOG.md CHANGED
@@ -2,12 +2,33 @@
2
2
 
3
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
4
 
5
+ ## 0.1.5-beta.4 - 2026-07-23
6
+
7
+ Driving layer: the recurring drives that wake a digital employee become a version-controlled, provider-mapped declaration instead of imperative platform state, plus a smoke-whitelist bare-filename fix that had blocked live deployment (PR #16). Ships on the `beta` dist-tag; `latest` stays at 0.1.4.
8
+
9
+ ### Added
10
+
11
+ - Agent Projects declare their internalized cron in `dingtalk-agent.json#schedules`: a provider-neutral list (`name`, `cron`, `timezone`, `mode` of `ephemeral`/`work-item`, plus governance metadata `wake`/`completion`/`unit`/`evidence`/`supervision`). The manifest validator rejects non-5-field crons, `@macro` forms, unknown modes and duplicate names; `dta info` reads them back. The project source hash covers only definition + skills, so declaring or editing schedules never perturbs the deployment hash.
12
+ - `dta schedule show` lists the declared drives with each rhythm's data-derived completion predicate and statically checks that no two share a cron minute field (the precondition for collision-safe outward delivery). `dta schedule plan --workspace <name>` maps the declaration to a provider-specific reconcile plan — Multica to `autopilot` create commands (`ephemeral`→`run_only`, `work-item`→`create_issue`); an unsupported provider fails closed and records the declared rhythms as a gap rather than silently downgrading. Both are pure and network-free.
13
+ - `docs/schemas/project.schema.json` gains the `schedules` definition; the compose Skill's `drive-and-schedules.md` is the authoring method: an internalized cron is a level-triggered reconciler (state decides the work and the done), not an edge-triggered dispatcher, and every rhythm must answer five questions with a data-derived completion predicate at its heart.
14
+
15
+ ### Changed
16
+
17
+ - Architecture §3.1 makes driving an explicitly modeled layer: dingtalk-agent implements no trigger, but owns the driving contract — declare which rhythms an employee needs, verify per-provider capability at deploy time, and hold the behavior contract a tick must satisfy. Compose, Basic Behavior and the platform packages carry the three platform-independent constraints (timers are unreliable so completion is "did it happen", outward ticks have no lock so they must not share a minute, and the Agent never self-installs or hot-edits its own alarm).
18
+ - The multica-external ops Skill reconciles autopilots from `dta schedule plan` rather than hand-authoring them: list live first, create only what is missing, and never blind-create — `autopilot-create` is not idempotent and duplicates cause duplicate outward sends.
19
+
20
+ ### Fixed
21
+
22
+ - The Multica load-smoke whitelist accepted `./result.md` and absolute workdir paths but rejected the same file referenced by a bare name (`result.md`) — which is exactly how the platform Agent writes it — so a smoke that loaded all Skills and produced the correct structured response still reported `providerReady=false` and blocked deployment. Only exact basenames are now accepted (`foo/result.md` and `../result.md` still fail closed); a contract fixture reproduces the bare-name trace and the assertion was verified to go red when the fix is reverted.
23
+
5
24
  ## 0.1.5-beta.3 - 2026-07-22
6
25
 
7
26
  Agent delivery-package single-source layout and Multica Issue-Adapter receipt compatibility (PR #11). Ships on the `beta` dist-tag; `latest` stays at 0.1.4.
8
27
 
9
28
  ### Changed
10
29
 
30
+ - Compose 0.13.2 keeps deployed `agent/AGENTS.md` role-only: shared behavior cases propagate through the versioned Basic directory tree instead of being copied into each Agent definition.
31
+ - Basic Behavior 0.12.0 adds a general batch-side-effect boundary distilled from a supervised DingTalk forwarding incident and the Aily behavior audit: when correctness depends on pagination, stable person-content binding, reconciliation or crash recovery, the Agent must upgrade from a model-driven tool loop to a frozen effect list plus deterministic runner and durable receipts. Without that runtime it may preview or run an explicitly supervised bounded batch, but cannot claim unattended execution. Repository guidance now also defines how future cases progress from evidence to one owner, a lean Skill entry, decision-family references, deterministic fixtures and versioned deployment without copying shared rules into each Agent.
11
32
  - Agent delivery packages now have a single source of truth: new projects generate `agent/AGENTS.md` and `agent/skills/`, and Host exposure is materialized only into temporary isolated workspaces instead of being committed alongside the source. The project manifest gains `skillsRoot`; explicit paths and the legacy root layout keep working.
12
33
  - Basic Behavior 0.11.11 makes IM history file-identifier recovery mandatory: rich-message recovery follows a fixed readback-before-gap-judgment order, and a fileId present in a history file card must go through `drive info`/read-only download instead of the Agent claiming it cannot read the file. A deterministic history-file-card fixture locks the behavior.
13
34
  - Golden Path and load-evidence fixtures moved to the `agent/AGENTS.md` + `agent/skills` single-source layout; load evidence now verifies resolved instructions against the trusted `definitionInstruction` exactly, while the legacy implicit root-`AGENTS.md` rule remains accepted.
package/README.en.md CHANGED
@@ -2,26 +2,30 @@
2
2
 
3
3
  # dingtalk-agent
4
4
 
5
- **Give every digital employee the same verifiable behavior foundation.**
5
+ **Let your coding agent turn an existing Agent into a DingTalk digital employee.**
6
6
 
7
7
  [![npm](https://img.shields.io/npm/v/%40xdxer%2Fdingtalk-agent?logo=npm&color=cb3837)](https://www.npmjs.com/package/@xdxer/dingtalk-agent)
8
8
  [![CI](https://github.com/D1-2004/dingtalk-agent/actions/workflows/ci.yml/badge.svg)](https://github.com/D1-2004/dingtalk-agent/actions/workflows/ci.yml)
9
9
  [![Node.js](https://img.shields.io/node/v/%40xdxer%2Fdingtalk-agent)](https://nodejs.org/)
10
10
  [![License](https://img.shields.io/badge/license-MIT-2ea44f)](LICENSE)
11
11
 
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)
12
+ Evaluating? → [What it is](#what-it-is) · [What it does](#what-it-does) · [When to use it](#when-to-use-it)  |  Ready to build? → [Quick start](#quick-start)
13
13
 
14
14
  [简体中文](README.md) · English
15
15
 
16
16
  </div>
17
17
 
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.
18
+ ![Someone @-mentions it in a group chat; it finishes the job like a colleague, leaving a trace at every step](docs/assets/digital-employee-at-work.svg)
19
19
 
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.
20
+ ## What it is
21
+
22
+ dta doesn't build the runtime substrate, but it owns the whole path of turning an Agent into a DingTalk digital employee.
23
+
24
+ What separates a digital employee from a chatbot is a DingTalk-issued organizational identity: it has a name in the directory, can be @-mentioned, works only in the groups and conversations it was authorized for, and everything it does is recorded under its name.
21
25
 
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.**
26
+ A working Agent still has to add a whole layer of engineering that has nothing to do with your business logic: identity and permissions, telling which message in a group is meant for it, not sending to the wrong person, and producing delivery evidence when it reports "done". Every new digital employee redoes all of that. dta turns it into a set of inheritable rules and one CLI that your coding agent installs and uses, so you don't have to study DingTalk's identity model, event model, and outbound limits yourself.
23
27
 
24
- ![The complete path from Agent definition to delivery through two identity types](docs/assets/agent-delivery-lifecycle.svg)
28
+ Works with: Claude Code · Codex · OpenCode · any coding agent | Managed platforms: Multica (supported) · DEAP (coming soon)
25
29
 
26
30
  ## Quick start
27
31
 
@@ -38,45 +42,24 @@ npm install --global --prefix "$HOME/.local" \
38
42
  "$HOME/.local/bin/dta" doctor
39
43
  ```
40
44
 
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.
42
-
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.
44
-
45
- ## Why it exists
46
-
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:
48
-
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.
53
-
54
- ## What an Agent is made of
55
-
56
- Four things: the **Definition** (`agent/AGENTS.md` — who I am, where my duties stop), **shared behavior** (`agent/skills/dingtalk-basic-behavior`), **role capability** (`agent/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 repository-root `AGENTS.md` only governs coding agents and is never the remote System Prompt.
57
-
58
- For a new project, `agent/` is the only managed-platform delivery boundary; do not commit duplicate Skills under root `skills/` or `.agents/skills/`. Existing code repositories can retain custom layouts by explicitly declaring `agent.definition` and `agent.skillsRoot` in `dingtalk-agent.json`.
45
+ `setup` installs the shared-behavior, compose, and eval Skills, then checks DWS authentication and common Agent Hosts. Normal sessions do not require Workspace initialization.
59
46
 
60
- Full composition, dependencies, and boundaries: [Architecture](docs/ARCHITECTURE.md#2-一个-agent-由什么构成模型-a).
47
+ ### Minimal runnable path
61
48
 
62
- **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:
49
+ Start with these threeno DingTalk account, no managed platform, and no side effects:
63
50
 
64
51
  ```bash
65
- dta agent audit \
66
- --bindings agent.bindings.json \
67
- --require-skill <role-skill-name> \
68
- --verify-load --yes --json
52
+ cp -R examples/agents/release-manager my-agent && cd my-agent
53
+ dta bootstrap --json # Was the body recognized? Check definition.status and storage routes
54
+ dta agent audit --json # Expect partial — the role semantics are still template text, which is correct
69
55
  ```
70
56
 
71
- ## How this repo is divided
72
-
73
- **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).
74
-
75
- 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).
57
+ `release-manager` is a complete sample of a release-manager digital employee: it picks up "can we ship this version?" in a group, checks the gates, summarizes the verdict, and requires human confirmation before moving on. Replace the role duties in `agent/AGENTS.md` with your own, run `agent audit` again, and the only gap left is the load probe — which needs an Agent Host, see the [Compose Skill](skills/core/dingtalk-agent-compose/SKILL.md).
76
58
 
77
- ## Create test → promote
59
+ ### Full delivery chain
78
60
 
79
- 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-从定义到上线).
61
+ <details>
62
+ <summary>The complete create → test → ship commands (worth reading once you have a managed platform binding)</summary>
80
63
 
81
64
  ```bash
82
65
  # 1. Generate a zero-write plan, then commit it explicitly
@@ -92,60 +75,104 @@ dta workspace eval local-dev --suite evals/suite.json --execute --yes --json
92
75
  # 3. Cloud preflight, promotion, and observation
93
76
  dta workspace inspect multica-dev --execute --yes --json
94
77
  dta workspace remote-list multica-dev --execute --yes --json
95
- dta workspace run multica-dev --prompt-file readonly-question.md --execute --yes --json
96
78
  dta promote --source local-dev --target multica-dev --dry-run --json
97
79
  dta observe --promotion-id <promotion-id> --input <observation.json> --dry-run --json
98
80
  ```
99
81
 
100
- Plans are zero-write by default. Remote writes require an explicit target, the current `planId`, and confirmation.
82
+ Plans are zero-write by default; every remote write requires an explicit target, the current `planId`, and confirmation. `<plan-id>` comes from the preceding dry run's `.planId`; `local-dev` / `multica-dev` are Workspace names you declare in `dingtalk-agent.json#workspaces`. 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-开发生命周期从定义到观测).
83
+
84
+ </details>
85
+
86
+ ## What it does
87
+
88
+ Turning an Agent into a DingTalk digital employee takes six stages, and dta covers every one:
89
+
90
+ | Lifecycle stage | What dta does | With what |
91
+ |---|---|---|
92
+ | **① Body and employee skills** | An inheritable, verifiable shared behavior contract: when to speak, whether a message is even a task, who must approve an outbound action, how risk is graded, what counts as done, what to remember and forget. You write only the few dozen lines that differ by role | `dingtalk-basic-behavior` · `agent enhance` · `examples/agents/` |
93
+ | **② Identity acquisition and event perception** | Normalize differently shaped raw events into a stable structure; freeze the reply target and execution identity into a snapshot message text cannot alter, making wrong-recipient structurally impossible; bind permissions and outbound ownership per field; one event yields exactly one Run, losing and duplicating nothing across crashes | `prepare` · `run` · Field config |
94
+ | **③ Managed-platform deployment** | See the plan before anything lands: frozen hashes for the body and the whole Skill tree plus a write budget; independent readback and a load smoke test after writing; re-running the same version writes nothing; failures roll back and shipped agents can be retired (today this lands on Multica) | `deploy` · `promote` · `--retire` |
95
+ | **④ Driving it to work inside DingTalk** | Outbound has only four atoms; before an action the gate blocks overreach and target drift, after it a platform readback is mandatory; no blind retries when the outcome is uncertain; a "done" report must carry re-verifiable evidence | `act` · Action Gate · `task checkpoint` |
96
+ | **⑤ Evaluation design** | Not a scoring tool but a method: how to pick the cheapest sufficient level, which evidence surfaces one verdict must collect, which failures may never be averaged away, how a real incident becomes a replayable case, and what blocks a release | `lab` · `workspace eval` · `dingtalk-agent-eval` |
97
+ | **⑥ Observation and feedback** | Bind a production finding to the exact version that ran, desensitize it, and feed it back into evaluation material, without ever changing the Agent's behavior on its own | `observe` |
98
+
99
+ ## When to use it
100
+
101
+ Use it when:
102
+
103
+ - you already have a working Agent and want it in DingTalk groups under an organizational identity, getting @-mentioned and assigned work;
104
+ - you run DingTalk automation and have been bitten by sending to the wrong person, or by exit code 0 being treated as success;
105
+ - you are building not one digital employee but a batch, and don't want shared behavior copied into several drifting prompts;
106
+ - your work spans days, waits for human confirmation, and can be called off midway — not one-shot Q&A;
107
+ - you need to prove to someone that what runs in production is the exact version you verified.
108
+
109
+ Skip it when:
101
110
 
102
- The placeholders above are not yours to invent each has a definite source:
111
+ - you just want a Q&A bot: one DingTalk robot webhook is enough, and this is overhead;
112
+ - you just want to call DingTalk APIs: use DWS directly — it already works, and dta is not a prerequisite;
113
+ - you are not on DingTalk: the only execution path is DWS and identity is issued by DingTalk, neither of which is swappable.
103
114
 
104
- | Placeholder | Where it comes from |
115
+ Not possible today: importing an Agent already deployed on another platform (data flows one way, local definition to managed platform, with no import command); triggers (webhooks, timers) are also out of scope.
116
+
117
+ ## Where it stands today
118
+
119
+ | Area | Where it is |
105
120
  |---|---|
106
- | `<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 |
107
- | `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) |
108
- | `<promotion-id>` | `.promotionId` on the `promotion-receipt@1` produced by `dta promote --yes` |
109
- | `<role-skill-name>` | The `name` in your `agent/skills/<role>/SKILL.md` frontmatter |
121
+ | First five of the six stages | In shape |
122
+ | Stage six (observation & metering) | The thinnest. Usage meteringinteraction counts, tokens, cost, per-person/per-group breakdown — isn't built yet |
123
+ | Managed platform | Multica supported; DEAP coming soon; the platform SPI isn't merged into main yet |
124
+ | Agent Host | OpenCode complete; the Claude Code adapter isn't implemented |
125
+ | Completion evidence | The verify side is implemented and contract-locked; the issue side isn't wired to a public command |
126
+ | Importing an Agent from an external platform | No such command; data flows one way, local to platform |
127
+ | Regression net | 62 deterministic contracts, run in 18 seconds |
110
128
 
111
- ### Minimal runnable path (local only, three commands)
129
+ ## How it works
112
130
 
113
- To see something move first, don't start with the chain above that is the full delivery pipeline. Start here:
131
+ > **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.
114
132
 
115
- ```bash
116
- cp -R examples/agents/release-manager my-agent && cd my-agent
117
- dta bootstrap --json # Was the body recognized? Check definition.status and storage routes
118
- dta agent audit --json # Expect partial — the role semantics are still template text, which is correct
119
- ```
133
+ These boundaries are structurally impossible to cross, not politely discouraged in a prompt: without an `@` in a group it stays silent; the CLI has no "send to" parameter, so the reply target can only come from the message that triggered it; a completion report must carry host-issued evidence that can be read back independently. All three are watched by deterministic contract evals — break them and the suite goes red.
134
+
135
+ **DWS is DingTalk's own command-line tool** (separate from this project, with 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; every real DingTalk operation is ultimately executed by DWS.
136
+
137
+ ## FAQ
120
138
 
121
- 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 `agent/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.
139
+ **Is this yet another Agent framework?**
140
+ No. It provides no model, no tool loop, and no agent runtime. It gives your coding agent a set of Skills and one CLI to compose an existing Agent into a DingTalk digital employee.
122
141
 
123
- When deploying to Multica, the remote System Prompt must equal the manifest-selected `agent/AGENTS.md` source. Deployment hashes, the Skill manifest, and assignment evidence stay in the plan/operation/Receipt control plane. Basic and Role Skills use the platform's native assignment instead of an extra startup prompt or startup Skill.
142
+ **Does it conflict with Claude Code or Codex?**
143
+ No — it is built for them. `dta setup` installs the Skills into these coding agents; after that you instruct them in natural language. The CLI also works standalone.
144
+
145
+ **My Agent already runs on another platform — can I bring it in?**
146
+ The body (role definition and Skills) is portable: compose locally, then ship to a managed platform. But there is no command today that imports from an external platform, and Multica is the only managed platform supported.
147
+
148
+ **What do I need to try it once?**
149
+ No DingTalk account and no managed platform. Composing, auditing, `workspace run/eval`, and the full contract suite all run locally; `doctor` marks what's missing as `partial` instead of failing. Only real outbound messaging and shipping need DWS authentication.
150
+
151
+ **How much effort does it take?**
152
+ The main work of the first role is writing the role duties clearly, not writing code: the body is Markdown, and you edit from the examples. Adding a second role changes three files and zero kernel code.
124
153
 
125
154
  ## Support
126
155
 
127
- 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:
156
+ A managed platform, an Agent Host, and the dta kernel are three separate things: the managed platform owns Workspace, Runtime, and observation, and binds a DingTalk-issued identity to the Agent (issuance stays with DingTalk); the Agent Host (a.k.a. Harness) loads definitions and Skills and isolates execution; the dta kernel is this project.
128
157
 
129
158
  | Dimension | Current support |
130
159
  |---|---|
131
- | **Managed Platform** | Multica (DingTalk) supported; DEAP coming soon; additional platforms through registry + adapters |
132
- | **Local runtime** | Direct/Mounted sessions in Claude Code, Codex, OpenCode, and similar Hosts; OpenCode is the most complete local managed-Harness reference |
133
- | **Cloud runtime** | Multica Workspace / Runtime / Agent with the same Definition, Skills, Gate, and evidence contract |
134
- | **Delivery identity** | Digital-employee/account identity or robot-app identity; neither expands the Agent role or authority |
160
+ | **Managed platform** | Multica (DingTalk) supported; DEAP coming soon; onboarding a new platform takes the same path: author a platform Skill pack and register one entry |
161
+ | **Local runtime** | Direct/Mounted sessions in Claude Code, Codex, OpenCode, and similar Hosts; OpenCode is the most complete local reference |
162
+ | **Cloud runtime** | Multica Workspace / Runtime / Agent with the same definitions, Skills, gates, and evidence contract |
163
+ | **Delivery identity** | Digital-employee/account identity or robot-app identity, both issued by DingTalk; neither changes the role's duties or expands its authority |
135
164
 
136
- 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.
165
+ DEAP may play two roles at once: its most important value to this project today is DingTalk-side identity/authorization and perception/human-interaction; whether it also embeds a runtime platform of its own is not yet settled. See the [DEAP platform note](skills/platforms/deap/PLATFORM.md). "Multi-platform" means the registry and onboarding contract are extensible; it does not claim that unopened platforms are deployed or Live-verified.
137
166
 
138
167
  ### Runtime modes
139
168
 
140
169
  | Mode | Use | Boundary |
141
170
  |---|---|---|
142
171
  | **Direct Session** | Normal interactive work | Never guess an outbound target without a trusted event |
143
- | **Mounted Session** | Mount local or DingTalk semantic content | Locks, idempotency, and Receipts do not live in Markdown |
172
+ | **Mounted Session** | Mount local or DingTalk semantic content | Locks, idempotency, and receipts do not live in Markdown |
144
173
  | **Prepared Run** | Reliable event-driven side effects | Actions go only through the typed Broker or `dta act` |
145
174
 
146
- Prepared Runs expose four message atoms: `ack`, `reply`, `ask`, and `silence`. An acknowledgement is not task acceptance, and a reply is not human acceptance.
147
-
148
- **Triggers are out of scope for this project**: `listen` is a replaceable local integration Adapter, and `dta deploy` never creates robots, webhooks, or timers.
175
+ Prepared Runs expose four message atoms: `ack`, `reply`, `ask`, and `silence`. An acknowledgement is not task acceptance, and a reply is not human acceptance. Triggers are out of scope: `listen` is a replaceable local integration Adapter, and `dta deploy` never creates robots, webhooks, or timers.
149
176
 
150
177
  ## Docs
151
178
 
@@ -158,7 +185,7 @@ Prepared Runs expose four message atoms: `ack`, `reply`, `ask`, and `silence`. A
158
185
  | Test or debug a delivered Agent | [Eval Skill](skills/core/dingtalk-agent-eval/SKILL.md) |
159
186
  | Read the shared behavior protocol (a contract written for models, not a tutorial) | [Basic Behavior Skill](skills/core/dingtalk-basic-behavior/SKILL.md) |
160
187
  | Copy a complete example and edit from there | [Example Agents](examples/agents) |
161
- | See which open-source projects informed this one | [Prior Art](docs/PRIOR-ART.md) |
188
+ | Which platforms and open-source projects we keep absorbing practices from | [Prior Art](docs/PRIOR-ART.md) |
162
189
 
163
190
  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.
164
191
 
package/README.md CHANGED
@@ -2,26 +2,30 @@
2
2
 
3
3
  # dingtalk-agent
4
4
 
5
- **让数字员工继承同一套可验证的行为底座。**
5
+ **让你的 Coding Agent 把现成的 Agent 装成钉钉数字员工。**
6
6
 
7
7
  [![npm](https://img.shields.io/npm/v/%40xdxer%2Fdingtalk-agent?logo=npm&color=cb3837)](https://www.npmjs.com/package/@xdxer/dingtalk-agent)
8
8
  [![CI](https://github.com/D1-2004/dingtalk-agent/actions/workflows/ci.yml/badge.svg)](https://github.com/D1-2004/dingtalk-agent/actions/workflows/ci.yml)
9
9
  [![Node.js](https://img.shields.io/node/v/%40xdxer%2Fdingtalk-agent)](https://nodejs.org/)
10
10
  [![License](https://img.shields.io/badge/license-MIT-2ea44f)](LICENSE)
11
11
 
12
- [快速开始](#快速开始) · [一个 Agent 由什么构成](#一个-agent-由什么构成) · [仓库分成哪几部分](#这个仓库分成哪几部分) · [文档](#文档)
12
+ 评估中?→ [它是什么](#它是什么) · [能做什么](#它能做什么) · [什么时候该用它](#什么时候该用它)  |  要动手?→ [快速开始](#快速开始)
13
13
 
14
14
  简体中文 · [English](README.en.md)
15
15
 
16
16
  </div>
17
17
 
18
- `dingtalk-agent`(`dta`)是钉钉数字员工的 **Skill-first 行为内核与交付工具链**。它把角色定义、公共行为、岗位能力和执行门禁装配成一个可创建、测试、发布和审计的 Agent Project。
18
+ ![在群里 @ 它,它会像同事一样把事做完,中间每一步都有记录](docs/assets/digital-employee-at-work.svg)
19
19
 
20
- > **Skill 劝,CLI 拦,DWS 做。** Skill 判断何时、为何行动;CLI 固定身份、目标、预算、幂等与回读;DWS 执行钉钉能力。
20
+ ## 它是什么
21
21
 
22
- 其中 **DWS 是钉钉侧的命令行工具**(独立于本项目,需单独安装并 `dws auth login`),涵盖消息、文档、AI 表格、日程、审批等约 20 类产品能力。`dta` 不复制它的命令面,只在需要冻结身份、目标、幂等或回读时包一层——**所有真实的钉钉操作最终都由 DWS 执行**。
22
+ dta 管的是把一个 Agent 做成钉钉数字员工这一路的开发工作,运行时的底座它不做。
23
23
 
24
- ![从 Agent 定义到两类身份交付的完整路径](docs/assets/agent-delivery-lifecycle.svg)
24
+ 数字员工和聊天机器人的区别,是它有一个钉钉签发的组织身份,通讯录里查得到。它能被 @,但只在授权的群和会话里干活,干过什么都挂在它名下。
25
+
26
+ 一个能跑的 Agent 要做到这些,还要补一堆跟业务无关的工程:处理身份和权限,分辨群里哪句话是对它说的,别把消息发错人,报完成时要有送达凭证。每加一个数字员工都得重做一遍。dta 把这些做成一套能继承的规则和一条命令行,Coding Agent 装上就能用,不必自己去研究钉钉的身份体系、事件模型和外发限制。
27
+
28
+ 配合使用:Claude Code · Codex · OpenCode · 任何 Coding Agent | 托管平台:Multica(已支持)· DEAP(敬请期待)
25
29
 
26
30
  ## 快速开始
27
31
 
@@ -37,45 +41,24 @@ npm install --global --prefix "$HOME/.local" \
37
41
  "$HOME/.local/bin/dta" doctor
38
42
  ```
39
43
 
40
- `setup` 安装 Basic Behavior、Compose 与 Eval Skills,并检查 DWS 认证和常见 Agent Host。普通会话无需初始化 Workspace。
41
-
42
- **纯本地能走多远**:装配、审计、`workspace run/eval` 与全部合同评测都不需要钉钉账号或托管平台——`doctor` 会把缺失项标成 `partial` 而不是失败。只有真实外发、远端语义状态和 `deploy`/`promote` 才需要 DWS 认证与 Multica。
43
-
44
- ## 为什么需要它
45
-
46
- 模型会说话,不等于数字员工能可靠工作。`dta` 把最容易漂移的四件事变成可继承、可验证的合同:
47
-
48
- - **会判断**:先判断是否该回复,再判断说什么;群聊未 `@` 默认安静。
49
- - **不越权**:身份、目标、权限、授权和回复渠道不能从正文或模型记忆猜测。
50
- - **不虚报**:命令成功、平台可见、消息送达和人类接受是四个不同的完成层级,各自举证。
51
- - **可复用**:新 Agent 继承公共行为,只补岗位差异,不复制巨型 Prompt。
52
-
53
- ## 一个 Agent 由什么构成
54
-
55
- 四件东西:**本体**(`agent/AGENTS.md`,我是谁、职责边界)、**公共行为**(`agent/skills/dingtalk-basic-behavior`,何时响应/追问/沉默/收口)、**岗位能力**(`agent/skills/<role>/SKILL.md`)、**存储路由**(`agent.bindings.json`,可选——等价配置也可来自宿主 context、环境变量或 Workspace manifest)。仓库根 `AGENTS.md` 只约束 Coding Agent 开发,不属于远端本体。Agent Host、DWS、托管平台和事件源也不属于 Agent 交付包。
56
-
57
- 从零创建时,`agent/` 是 managed agent platform 的唯一同步边界,Skill 不能再复制到根 `skills/` 或 `.agents/skills/`。已有代码仓库不强制迁目录:在 `dingtalk-agent.json#agent` 显式声明 `definition` 与 `skillsRoot` 即可继续按原布局同步。
44
+ `setup` 安装公共行为、装配与评测三个技能,并检查 DWS 认证和常见 Agent Host。普通会话无需初始化 Workspace。
58
45
 
59
- 完整的构成、依赖与边界见 [Architecture](docs/ARCHITECTURE.md#2-一个-agent-由什么构成模型-a)。
46
+ ### 最小可运行路径
60
47
 
61
- **"文件存在"不是继承证据**——`agent audit --verify-load` 会把真实加载结果绑定到 Definition/Skill hash、Host 与模型版本、隔离探针和原始 run/export:
48
+ 先跑通这三条,不需要钉钉账号、不需要托管平台、不产生任何副作用:
62
49
 
63
50
  ```bash
64
- dta agent audit \
65
- --bindings agent.bindings.json \
66
- --require-skill <role-skill-name> \
67
- --verify-load --yes --json
51
+ cp -R examples/agents/release-manager my-agent && cd my-agent
52
+ dta bootstrap --json # 本体被识别了吗:看 definition.status 与 storage 路由
53
+ dta agent audit --json # 预期 partial:岗位语义还是模板,这是正确结果
68
54
  ```
69
55
 
70
- ## 这个仓库分成哪几部分
71
-
72
- **行为内核**(事件 → 能否回应、回应给谁、允许做什么)、**装配与审计**(把仓库/目录/文档变成可 hash 的 Agent 并证明真加载)、**交付链**(受控上托管平台,每步可回读)、**评测与证据**(上线前用最低成本证明它真会做事)、**状态与记忆**(崩了之后接着做)、**机器与分发**(一条命令装好一台新机器)。
73
-
74
- 交付链与评测各占约四分之一代码量——这个项目的难点从来不是"让模型说话",而是证明它真的装好了、做对了、上线了。每部分解决什么问题、对应哪些模块与 CLI,见 [Architecture](docs/ARCHITECTURE.md#7-dingtalk-agent-分成哪几部分模型-c)。
56
+ `release-manager` 是一个发布管理员数字员工的完整样例:它在群里接"这个版本能发吗",检查门禁、汇总结论、需要人确认才推进。把 `agent/AGENTS.md` 里的岗位职责换成你自己的,再跑一次 `agent audit`,缺口就只剩加载探针,那需要一个 Agent Host,见 [Compose Skill](skills/core/dingtalk-agent-compose/SKILL.md)。
75
57
 
76
- ## 创建 → 测试 → 发布
58
+ ### 完整交付链
77
59
 
78
- 四个阶段各有门禁:占位符没填完保持 `partial`;Skill 没真加载不能 ready;指定 Eval 没过不能 promote;没有证据不声称送达或完成。逐条见 [Architecture](docs/ARCHITECTURE.md#8-从定义到上线)。
60
+ <details>
61
+ <summary>创建 → 测试 → 发布的完整命令(有了托管平台归属再看)</summary>
79
62
 
80
63
  ```bash
81
64
  # 1. 创建零写入计划,再显式落盘
@@ -91,60 +74,104 @@ dta workspace eval local-dev --suite evals/suite.json --execute --yes --json
91
74
  # 3. 云端预检、发布与观测
92
75
  dta workspace inspect multica-dev --execute --yes --json
93
76
  dta workspace remote-list multica-dev --execute --yes --json
94
- dta workspace run multica-dev --prompt-file readonly-question.md --execute --yes --json
95
77
  dta promote --source local-dev --target multica-dev --dry-run --json
96
78
  dta observe --promotion-id <promotion-id> --input <observation.json> --dry-run --json
97
79
  ```
98
80
 
99
- 所有计划默认零写入;所有远端写入都需要明确目标、当前 `planId` 和显式确认。
81
+ 所有计划默认零写入;所有远端写入都需要明确目标、当前 `planId` 和显式确认。`<plan-id>` 来自上一条 dry-run 输出的 `.planId`,`local-dev` / `multica-dev` 是你自己在 `dingtalk-agent.json#workspaces` 里声明的名字。四个阶段各有门禁:占位符没填完保持 `partial`;技能没真加载不能 ready;指定评测没过不能 promote;没有证据不声称送达或完成。逐条见 [Architecture](docs/ARCHITECTURE.md#8-开发生命周期从定义到观测)。
82
+
83
+ </details>
84
+
85
+ ## 它能做什么
86
+
87
+ 把一个 Agent 变成钉钉数字员工要走六段,dta 每一段都管:
88
+
89
+ | 开发生命周期 | dta 做的 | 用什么 |
90
+ |---|---|---|
91
+ | **① 本体与员工技能** | 一套可继承、可验证的共享行为合同:什么时候该开口、消息算不算任务、外部动作要谁批准、风险怎么分级、什么算完成、哪些要记哪些能忘。你只写岗位不一样的那几十行 | `dingtalk-basic-behavior` · `agent enhance` · `examples/agents/` |
92
+ | **② 身份获取与事件感知** | 把格式各异的原始事件归一成稳定结构。回复对象和执行身份会冻结成正文改不动的快照,发错人在结构上就做不到;权限和出口按场域绑定;同一个事件只产生一个 Run,崩了也不会丢、不会重复 | `prepare` · `run` · Field 配置 |
93
+ | **③ 托管平台部署** | 先看计划再落盘:冻结本体和整棵 Skill 树的 hash 和写预算,写完独立回读、发加载烟测,重复跑同一版不再写入。出问题能回滚,上了线也能退役(当前落地于 Multica) | `deploy` · `promote` · `--retire` |
94
+ | **④ 驱动它在钉钉里干活** | 外发就四个原语。动作做之前挡掉越权和发错目标,做完之后强制回读平台确认;结果不确定时不许乱重发,报完成得留下能再核验的证据 | `act` · Action Gate · `task checkpoint` |
95
+ | **⑤ 评测设计** | 一套评测方法:帮你选够用的最低层级,决定一次结论要看哪几类证据,避免个别失败被平均分掩盖,把真实事故变成能复跑的用例,也给出什么时候不能上线 | `lab` · `workspace eval` · `dingtalk-agent-eval` |
96
+ | **⑥ 观测与反馈** | 把线上发现的问题绑定到具体哪一版,脱敏后回流评测素材,不会自动改动 Agent 的行为 | `observe` |
97
+
98
+ ## 什么时候该用它
99
+
100
+ 适合用它的情况:
101
+
102
+ - 你已经有一个能跑的 Agent,想让它以组织身份进钉钉群,被 @、被派活;
103
+ - 你有钉钉自动化在跑,出过发错人、或者命令返回 0 就当成功这类事故;
104
+ - 你要做好几个数字员工,不想把公共行为在每份提示词里各复制一遍、越改越不一样;
105
+ - 你的活儿跨天、要等人确认、中途可能被叫停,不是一问一答;
106
+ - 你要向别人证明线上跑的就是你调好的那一版。
107
+
108
+ 用不上它的情况:
100
109
 
101
- 上面的占位符不是让你自己编的,各有确定来源:
110
+ - 你只要一个问答机器人:一个钉钉机器人 webhook 就够了,这一套对你是多余的;
111
+ - 你只是要调钉钉 API:直接用 DWS,它本来就能用,dta 不是前置;
112
+ - 你不在钉钉生态:唯一的执行出口是 DWS、身份由钉钉签发,换不掉。
102
113
 
103
- | 占位符 | 从哪来 |
114
+ 今天还做不到:把已经部署在别的平台上的 Agent 导入进来(数据只能从本地流向托管平台,没有 import 命令);事件触发器(Webhook、定时器)也不归本项目。
115
+
116
+ ## 今天的真实状态
117
+
118
+ | 环节 | 现在到哪一步 |
104
119
  |---|---|
105
- | `<plan-id>` | 上一条 `--dry-run --json` 输出的顶层 `.planId`。源码或配置一变它就失效,必须重新 dry-run |
106
- | `local-dev` / `multica-dev` | **你自己**在 `dingtalk-agent.json#workspaces` 里声明的 Workspace 名,不是内置值。样例见 [`lab/project-workspace/project.fixture.json`](lab/project-workspace/project.fixture.json) |
107
- | `<promotion-id>` | `dta promote --yes` 产出的 `promotion-receipt@1` 的 `.promotionId` |
108
- | `<role-skill-name>` | `agent/skills/<role>/SKILL.md` frontmatter `name` |
120
+ | 六段里的前五段 | 已经成型 |
121
+ | 第六段(观测与计量) | 最薄的一段。用量计量(交互量、token、成本、按人按群的分布)还没做 |
122
+ | 托管平台 | Multica 已支持;DEAP 敬请期待;平台 SPI 还没合并进主干 |
123
+ | Agent Host | OpenCode 完整;Claude Codeadapter 还没实现 |
124
+ | 完成证据 | 核验这一侧已经实现、被合同锁住;签发这一侧还没接进公开命令 |
125
+ | 反向导入外部平台的 Agent | 没有这个命令,数据只能从本地流向平台 |
126
+ | 回归防线 | 62 个确定性合同,18 秒跑完 |
109
127
 
110
- ### 最小可运行路径(纯本地,三条命令)
128
+ ## 工作原理
111
129
 
112
- 想先看见东西动起来,不要从上面那串开始——那是完整交付链。从这里开始:
130
+ > **Skill 劝,CLI 拦,DWS 做。** Skill 负责判断什么时候、为什么该动手;命令行把身份、目标、预算固定住,管幂等和回读;真正的钉钉操作交给 DWS。
113
131
 
114
- ```bash
115
- cp -R examples/agents/release-manager my-agent && cd my-agent
116
- dta bootstrap --json # 本体被识别了吗:看 definition.status storage 路由
117
- dta agent audit --json # 预期 partial —— 岗位语义还是模板,这是正确结果
118
- ```
132
+ 这几条边界是结构上过不去的,不靠提示词请求模型别做:群聊里没 @ 它就不说话;命令行里根本没有发送目标这个参数,回复对象只能来自触发它的那条消息;报告完成必须附上宿主签发、能独立回读的证据。这三条都有确定性合同评测守着,改坏了会红。
133
+
134
+ **DWS 是钉钉侧的命令行工具**(独立于本项目,需单独 `dws auth login`),覆盖消息、文档、AI 表格、日程、审批等约 20 类产品能力。dta 不复制它的命令面,所有真实的钉钉操作最终都由 DWS 执行。
135
+
136
+ ## 常见疑问
119
137
 
120
- 到这一步不需要钉钉账号、不需要托管平台、不产生任何副作用。把 `agent/AGENTS.md` 里的岗位语义填成真的,再跑一次 `agent audit`,缺口就只剩 `host.load-probe`——那需要一个 Agent Host,见 [Compose Skill](skills/core/dingtalk-agent-compose/SKILL.md)。上面第 3 组云端命令要等你有了 Multica 归属和已声明的 Workspace 才用得上。
138
+ **这是又一个 Agent 框架吗?**
139
+ 不是。它不带模型,也没有工具循环或 Agent 运行时。它给你的 Coding Agent 一套技能和一条命令行,让它把已有的 Agent 装配成钉钉数字员工。
121
140
 
122
- 发布到 Multica 时,远端 System Prompt 必须与 manifest 指定的 `agent/AGENTS.md` 原文一致;部署哈希、Skill 清单和 assignment 证据只存在于 plan/operation/Receipt 控制面。Basic 与 Role Skills 通过平台原生 assignment 挂载,不再用额外启动 Prompt 或启动 Skill 承载机器协议。
141
+ **和 Claude Code、Codex 冲突吗?**
142
+ 不冲突,它就是给它们用的。`dta setup` 把技能装进这些 Coding Agent,之后用自然语言指挥它们就行;命令行也能单独用。
143
+
144
+ **我的 Agent 已经跑在别的平台上,能接进来吗?**
145
+ 本体(角色定义和技能)可以移植,在本地装配好再发布到托管平台。但现在没有从外部平台反向导入的命令,已支持的托管平台也只有 Multica。
146
+
147
+ **试一次要准备什么?**
148
+ 不需要钉钉账号,也不需要托管平台。装配、审计、`workspace run/eval` 和全部合同评测都能在本地跑完,`doctor` 会把缺的东西标成 `partial` 而不是报错。只有真发消息和真发布才需要 DWS 认证。
149
+
150
+ **要投多少人力?**
151
+ 第一个岗位主要花时间在写清楚职责上,代码基本不用碰:本体就是 Markdown,照示例改。加第二个岗位只改三个文件,不用动一行内核代码。
123
152
 
124
153
  ## 支持范围
125
154
 
126
- **Managed Agent Platform**(管 Workspace、Runtime、身份绑定与观测)、**Agent Host**(也叫 Harness,加载 Definition/Skills 并隔离执行)和 **dta Kernel** 三者彼此独立:
155
+ 托管平台、Agent Host 和 dta 内核是三件互相独立的东西:托管平台管 Workspace、Runtime 和观测,并把钉钉签发的身份绑到 Agent 上(签发权还在钉钉);Agent Host(也叫 Harness)加载定义和技能、隔离执行;dta 内核是本项目。
127
156
 
128
157
  | 维度 | 当前支持 |
129
158
  |---|---|
130
- | **Managed Platform** | Multica(DingTalk)已支持;DEAP Coming soon;更多平台通过 registry + adapter 接入 |
131
- | **本地运行** | Claude Code、Codex、OpenCode 等 Direct/Mounted Session;OpenCode 是当前最完整的本地 managed Harness 参考实现 |
132
- | **云上运行** | Multica Workspace / Runtime / Agent;沿用相同的 Definition、Skills、Gate 与证据合同 |
133
- | **交付身份** | 数字员工/账号身份;机器人应用身份;两者都不能改变角色职责或扩大权限 |
159
+ | **托管平台** | Multica(DingTalk)已支持;DEAP 敬请期待;接一个新平台走同一条路径:写一个平台技能包、在注册表登记一条记录 |
160
+ | **本地运行** | Claude Code、Codex、OpenCode 等 Direct/Mounted Session;OpenCode 是当前最完整的本地参考实现 |
161
+ | **云上运行** | Multica Workspace / Runtime / Agent;沿用相同的定义、技能、闸门与证据合同 |
162
+ | **交付身份** | 数字员工/账号身份、机器人应用身份,都由钉钉侧签发;两者都不能改变角色职责或扩大权限 |
134
163
 
135
- OpenCode 不是运行前提,Multica 也不是特殊旁路。任何 Harness 要进入可晋级路径,都必须证明同一件事:Definition 与 Skills 已加载、身份和隔离已固定、运行轨迹可取、结果可回读。"支持多平台"指架构、注册表和 adapter 合同可扩展,不把尚未开放的平台宣称为已部署或已 Live 验证。
164
+ DEAP 可能同时扮演两个角色:它现在对本项目最要紧的价值是钉钉侧的身份权限管控和感知/人机交互,是否再内建一层自己的运行平台还没定。见 [DEAP 平台说明](skills/platforms/deap/PLATFORM.md)。「支持多平台」指的是注册表和接入合同可以扩展,不把还没开放的平台说成已经部署或已 Live 验证。
136
165
 
137
166
  ### 三种运行模式
138
167
 
139
168
  | 模式 | 用于 | 关键边界 |
140
169
  |---|---|---|
141
170
  | **Direct Session** | 普通交互会话 | 无可信事件就不猜外发目标 |
142
- | **Mounted Session** | 挂载本地或钉钉语义内容 | 锁、幂等和 Receipt 不放进 Markdown |
171
+ | **Mounted Session** | 挂载本地或钉钉语义内容 | 锁、幂等和回执不放进 Markdown |
143
172
  | **Prepared Run** | 事件驱动的可靠副作用 | 动作只走 typed Broker 或 `dta act` |
144
173
 
145
- Prepared Run 只开放 `ack`、`reply`、`ask`、`silence` 四个消息原子动作。`ack` 不等于接单,`reply` 不等于对方接受。
146
-
147
- **触发器不属于本项目**:`listen` 只是本地联调的可替换 Adapter,`dta deploy` 不创建机器人、Webhook 或定时器。
174
+ Prepared Run 只开放 `ack`、`reply`、`ask`、`silence` 四个消息原子动作。`ack` 不等于接单,`reply` 不等于对方接受。触发器不归本项目:`listen` 只是本地联调用的可替换 Adapter,`dta deploy` 不创建机器人、Webhook 或定时器。
148
175
 
149
176
  ## 文档
150
177
 
@@ -157,7 +184,7 @@ Prepared Run 只开放 `ack`、`reply`、`ask`、`silence` 四个消息原子动
157
184
  | 测试或调试已交付的 Agent | [Eval Skill](skills/core/dingtalk-agent-eval/SKILL.md) |
158
185
  | 查看公共行为协议(写给模型读的合同,不是教程) | [Basic Behavior Skill](skills/core/dingtalk-basic-behavior/SKILL.md) |
159
186
  | 复制一个完整示例开始改 | [Example Agents](examples/agents) |
160
- | 借鉴了哪些开源项目 | [Prior Art](docs/PRIOR-ART.md) |
187
+ | 从哪些平台与开源项目持续吸收最佳实践 | [Prior Art](docs/PRIOR-ART.md) |
161
188
 
162
189
  行为资产来自可观察合同、反例修正和可部署验证;本项目不声称获得任何产品的隐藏系统提示词原文。
163
190