@xdxer/dingtalk-agent 0.1.1 → 0.1.2

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 (99) hide show
  1. package/README.md +81 -80
  2. package/dist/bin/dingtalk-agent.js +685 -0
  3. package/dist/bin/dingtalk-agent.js.map +1 -0
  4. package/dist/src/actions.js +562 -0
  5. package/dist/src/actions.js.map +1 -0
  6. package/dist/src/boot.js +70 -0
  7. package/dist/src/boot.js.map +1 -0
  8. package/dist/src/bootstrap.js +144 -0
  9. package/dist/src/bootstrap.js.map +1 -0
  10. package/dist/src/config.js +86 -0
  11. package/dist/src/config.js.map +1 -0
  12. package/dist/src/driver.js +45 -0
  13. package/dist/src/driver.js.map +1 -0
  14. package/{src → dist/src}/duty.js +42 -44
  15. package/dist/src/duty.js.map +1 -0
  16. package/dist/src/dws.js +270 -0
  17. package/dist/src/dws.js.map +1 -0
  18. package/dist/src/events.js +233 -0
  19. package/dist/src/events.js.map +1 -0
  20. package/dist/src/fields.js +132 -0
  21. package/dist/src/fields.js.map +1 -0
  22. package/dist/src/init.js +41 -0
  23. package/dist/src/init.js.map +1 -0
  24. package/dist/src/kb.js +240 -0
  25. package/dist/src/kb.js.map +1 -0
  26. package/dist/src/package-root.js +17 -0
  27. package/dist/src/package-root.js.map +1 -0
  28. package/dist/src/runs.js +79 -0
  29. package/dist/src/runs.js.map +1 -0
  30. package/dist/src/sessions.js +668 -0
  31. package/dist/src/sessions.js.map +1 -0
  32. package/dist/src/skill-manager.js +273 -0
  33. package/dist/src/skill-manager.js.map +1 -0
  34. package/dist/src/skills.js +200 -0
  35. package/dist/src/skills.js.map +1 -0
  36. package/dist/src/types.js +2 -0
  37. package/dist/src/types.js.map +1 -0
  38. package/dist/src/waits.js +945 -0
  39. package/dist/src/waits.js.map +1 -0
  40. package/dist/src/workspace.js +173 -0
  41. package/dist/src/workspace.js.map +1 -0
  42. package/docs/ARCHITECTURE.md +207 -0
  43. package/docs/MINIMAL-WORKSPACE-V1.md +172 -0
  44. package/docs/OPEN-SOURCE-REFERENCES.md +107 -0
  45. package/docs/SELF-TEST.md +252 -0
  46. package/docs/architecture/dingtalk-agent-blueprint.png +0 -0
  47. package/docs/architecture/dingtalk-agent-blueprint.svg +144 -0
  48. package/docs/architecture/durable-async-agent-runtime.png +0 -0
  49. package/docs/architecture/durable-async-agent-runtime.svg +234 -0
  50. package/docs//345/206/205/347/275/221/345/256/236/347/233/270.md +77 -0
  51. package/evals/baselines/2026-07-14/behavior-summary.json +28 -0
  52. package/evals/baselines/2026-07-14/contract-summary.json +18 -0
  53. package/evals/baselines/2026-07-14/live-canary-summary.json +25 -0
  54. package/evals/baselines/2026-07-15/dingtalk-basic-behavior-0.3.0/SKILL.md +72 -0
  55. package/evals/baselines/2026-07-15/dingtalk-basic-behavior-0.3.0/references/action-contract.md +31 -0
  56. package/evals/baselines/2026-07-15/dingtalk-basic-behavior-0.3.0/references/event-to-behavior.md +22 -0
  57. package/evals/baselines/2026-07-15/dingtalk-basic-behavior-0.3.0/references/memory-and-evolution.md +25 -0
  58. package/evals/baselines/2026-07-15/dingtalk-basic-behavior-0.3.0/references/runtime-modes.md +34 -0
  59. package/evals/baselines/2026-07-15/task-lifecycle-summary.json +50 -0
  60. package/evals/evals.json +293 -0
  61. package/evals/fixtures/dm-ambiguous-send.json +4 -0
  62. package/evals/fixtures/dm-blocked.json +4 -0
  63. package/evals/fixtures/dm-clear.json +4 -0
  64. package/evals/fixtures/dm-discussion.json +4 -0
  65. package/evals/fixtures/dm-doc-write-no-tool.json +4 -0
  66. package/evals/fixtures/dm-long-task-ack.json +4 -0
  67. package/evals/fixtures/dm-nonblocking-gap.json +4 -0
  68. package/evals/fixtures/dm-structured-task.json +4 -0
  69. package/evals/fixtures/group.json +10 -0
  70. package/evals/fixtures/mentioned.json +3 -0
  71. package/evals/run-contract-evals.mjs +1031 -0
  72. package/evals/run-shadow-evals.mjs +267 -0
  73. package/evals/runners/README.md +66 -0
  74. package/evals/runners/claude-shadow.mjs +533 -0
  75. package/evals/schemas/action-request.schema.json +77 -0
  76. package/evals/shadow-evals.json +133 -0
  77. package/package.json +28 -6
  78. package/skills/AGENTS.md +21 -3
  79. package/skills/dingtalk-basic-behavior/SKILL.md +86 -0
  80. package/skills/dingtalk-basic-behavior/assets/task-checkpoint.md +37 -0
  81. package/skills/dingtalk-basic-behavior/references/action-contract.md +31 -0
  82. package/skills/dingtalk-basic-behavior/references/event-to-behavior.md +24 -0
  83. package/skills/dingtalk-basic-behavior/references/memory-and-evolution.md +27 -0
  84. package/skills/dingtalk-basic-behavior/references/runtime-modes.md +34 -0
  85. package/skills/dingtalk-basic-behavior/references/task-lifecycle.md +108 -0
  86. package/skills//345/237/272/347/241/200/350/241/214/344/270/272.md +44 -0
  87. package/skills//345/277/203/350/267/263.md +11 -0
  88. package/skills//346/266/210/346/201/257.md +14 -14
  89. package/skills//350/257/204/346/265/213.md +14 -1
  90. package/skills//351/222/211/351/222/211.md +3 -2
  91. package/templates/behaviors/basic.json +68 -0
  92. package/templates/fields/default/field.json +25 -0
  93. package/bin/dingtalk-agent.js +0 -289
  94. package/src/boot.js +0 -65
  95. package/src/config.js +0 -42
  96. package/src/dws.js +0 -192
  97. package/src/init.js +0 -84
  98. package/src/kb.js +0 -221
  99. package/src/runs.js +0 -77
@@ -0,0 +1,144 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1440 900" width="1440" height="900" role="img" aria-labelledby="title desc">
2
+ <title id="title">dingtalk-agent Skill-first 架构</title>
3
+ <desc id="desc">外部 Agent 会话和全局 Basic Behavior 是主入口;本地或钉钉文档 Storage 按需水合;可信事件才进入 Prepared Run,listen 只是可选 Driver。</desc>
4
+ <style>
5
+ text { font-family:'Helvetica Neue',Helvetica,Arial,'PingFang SC','Microsoft YaHei',sans-serif; }
6
+ .title { fill:#111827;font-size:27px;font-weight:700; }
7
+ .subtitle { fill:#6b7280;font-size:14px; }
8
+ .lane-title { fill:#475569;font-size:12px;font-weight:700;letter-spacing:.08em; }
9
+ .node-title { fill:#111827;font-size:16px;font-weight:700; }
10
+ .node-sub { fill:#4b5563;font-size:12px; }
11
+ .tiny { fill:#64748b;font-size:11px; }
12
+ .label { fill:#475569;font-size:11px;font-weight:600; }
13
+ </style>
14
+ <defs>
15
+ <marker id="arrow-blue" markerWidth="10" markerHeight="7" refX="9" refY="3.5" orient="auto"><polygon points="0 0,10 3.5,0 7" fill="#2563eb"/></marker>
16
+ <marker id="arrow-green" markerWidth="10" markerHeight="7" refX="9" refY="3.5" orient="auto"><polygon points="0 0,10 3.5,0 7" fill="#059669"/></marker>
17
+ <marker id="arrow-gray" markerWidth="10" markerHeight="7" refX="9" refY="3.5" orient="auto"><polygon points="0 0,10 3.5,0 7" fill="#64748b"/></marker>
18
+ <marker id="arrow-purple" markerWidth="10" markerHeight="7" refX="9" refY="3.5" orient="auto"><polygon points="0 0,10 3.5,0 7" fill="#7c3aed"/></marker>
19
+ <filter id="shadow" x="-20%" y="-20%" width="140%" height="140%"><feDropShadow dx="0" dy="2" stdDeviation="3" flood-color="#0f172a" flood-opacity=".10"/></filter>
20
+ </defs>
21
+ <rect width="1440" height="900" fill="#ffffff"/>
22
+ <text x="40" y="46" class="title">dingtalk-agent · Skill-first 数字员工架构</text>
23
+ <text x="40" y="72" class="subtitle">全局 Skill 是主入口 · Storage 按需水合 · 可信事件才进入强运行时 · listen 只是可替换 Driver</text>
24
+
25
+ <rect x="30" y="100" width="1380" height="185" rx="12" fill="#f8fafc" stroke="#cbd5e1" stroke-width="1.2" stroke-dasharray="7 5"/>
26
+ <text x="48" y="124" class="lane-title">PRIMARY ENTRY · 每个 Agent 会话</text>
27
+
28
+ <rect x="60" y="150" width="190" height="88" rx="10" fill="#fff7ed" stroke="#fdba74" stroke-width="1.6" filter="url(#shadow)"/>
29
+ <text x="155" y="180" text-anchor="middle" class="node-title">钉钉事项 / 用户请求</text>
30
+ <text x="155" y="205" text-anchor="middle" class="node-sub">消息 · @ · 任务 · 确认</text>
31
+
32
+ <rect x="330" y="138" width="250" height="112" rx="12" fill="#eff6ff" stroke="#60a5fa" stroke-width="2.2" filter="url(#shadow)"/>
33
+ <rect x="334" y="142" width="242" height="104" rx="9" fill="none" stroke="#60a5fa" stroke-width=".8" opacity=".5"/>
34
+ <text x="455" y="174" text-anchor="middle" class="node-title">Claude Code / Codex</text>
35
+ <text x="455" y="198" text-anchor="middle" class="node-sub">外部 Agent Host</text>
36
+ <text x="455" y="220" text-anchor="middle" class="node-sub">模型 · 工具 · 当前 Session</text>
37
+
38
+ <rect x="660" y="125" width="270" height="70" rx="10" fill="#faf5ff" stroke="#c084fc" stroke-width="1.8" filter="url(#shadow)"/>
39
+ <text x="795" y="155" text-anchor="middle" class="node-title">全局 Basic Behavior</text>
40
+ <text x="795" y="178" text-anchor="middle" class="node-sub">何时说 / 问 / 静默 / 记忆</text>
41
+
42
+ <rect x="660" y="210" width="270" height="52" rx="9" fill="#f0fdf4" stroke="#4ade80" stroke-width="1.6"/>
43
+ <text x="795" y="240" text-anchor="middle" class="node-title">岗位 / Workflow Skill</text>
44
+
45
+ <rect x="1030" y="138" width="300" height="112" rx="10" fill="#f0fdfa" stroke="#2dd4bf" stroke-width="1.7" filter="url(#shadow)"/>
46
+ <text x="1180" y="170" text-anchor="middle" class="node-title">dingtalk-agent CLI</text>
47
+ <text x="1180" y="195" text-anchor="middle" class="node-sub">安装 · 水合 · 强行为边界</text>
48
+ <text x="1180" y="219" text-anchor="middle" class="node-sub">不内置模型 · 不复制 DWS</text>
49
+
50
+ <path d="M250 194 L330 194" fill="none" stroke="#2563eb" stroke-width="2.2" marker-end="url(#arrow-blue)"/>
51
+ <path d="M660 160 L610 160 L610 176 L580 176" fill="none" stroke="#7c3aed" stroke-width="2" marker-end="url(#arrow-purple)"/>
52
+ <path d="M660 236 L610 236 L610 218 L580 218" fill="none" stroke="#7c3aed" stroke-width="2" marker-end="url(#arrow-purple)"/>
53
+ <path d="M580 194 L620 194 L620 272 L990 272 L990 194 L1030 194" fill="none" stroke="#2563eb" stroke-width="2.2" marker-end="url(#arrow-blue)"/>
54
+ <rect x="762" y="259" width="88" height="21" rx="5" fill="#ffffff" opacity=".96"/>
55
+ <text x="806" y="274" text-anchor="middle" class="label">确定性能力</text>
56
+ <path d="M455 250 L455 305 L160 305 L160 390" fill="none" stroke="#2563eb" stroke-width="2" marker-end="url(#arrow-blue)"/>
57
+ <path d="M1180 250 L1180 305 L910 305 L910 375" fill="none" stroke="#2563eb" stroke-width="2" marker-end="url(#arrow-blue)"/>
58
+
59
+ <rect x="30" y="325" width="670" height="260" rx="12" fill="#f8fafc" stroke="#94a3b8" stroke-width="1.2" stroke-dasharray="7 5"/>
60
+ <text x="48" y="350" class="lane-title">CONTEXT · 无需 init 的按需水合</text>
61
+
62
+ <rect x="65" y="390" width="190" height="84" rx="10" fill="#eff6ff" stroke="#93c5fd" stroke-width="1.6" filter="url(#shadow)"/>
63
+ <text x="160" y="422" text-anchor="middle" class="node-title">bootstrap</text>
64
+ <text x="160" y="447" text-anchor="middle" class="node-sub">发现 · probe · pull</text>
65
+
66
+ <rect x="330" y="375" width="280" height="78" rx="10" fill="#f0fdf4" stroke="#86efac" stroke-width="1.6" filter="url(#shadow)"/>
67
+ <text x="470" y="406" text-anchor="middle" class="node-title">Local Workspace</text>
68
+ <text x="470" y="431" text-anchor="middle" class="node-sub">local-dir · 直接挂载,不复制</text>
69
+
70
+ <rect x="330" y="475" width="280" height="78" rx="10" fill="#f0fdfa" stroke="#5eead4" stroke-width="1.6" filter="url(#shadow)"/>
71
+ <text x="470" y="506" text-anchor="middle" class="node-title">钉钉在线文档</text>
72
+ <text x="470" y="531" text-anchor="middle" class="node-sub">DWS probe → 只读 Markdown 快照</text>
73
+
74
+ <path d="M255 420 L330 414" fill="none" stroke="#059669" stroke-width="2" marker-end="url(#arrow-green)"/>
75
+ <path d="M255 444 L292 444 L292 514 L330 514" fill="none" stroke="#059669" stroke-width="2" marker-end="url(#arrow-green)"/>
76
+ <rect x="266" y="400" width="56" height="21" rx="5" fill="#ffffff" opacity=".96"/>
77
+ <text x="294" y="415" text-anchor="middle" class="label">read</text>
78
+ <rect x="266" y="489" width="56" height="21" rx="5" fill="#ffffff" opacity=".96"/>
79
+ <text x="294" y="504" text-anchor="middle" class="label">pull</text>
80
+ <text x="65" y="565" class="tiny">身份 / 记忆 / 知识可以换 Provider;Wait、锁、EventIndex、Receipt 不进入 Markdown。</text>
81
+
82
+ <rect x="740" y="325" width="670" height="260" rx="12" fill="#f8fafc" stroke="#94a3b8" stroke-width="1.2" stroke-dasharray="7 5"/>
83
+ <text x="758" y="350" class="lane-title">MODE SELECTION · 是否有可信事件目标</text>
84
+
85
+ <polygon points="910,375 1020,430 910,485 800,430" fill="#fff7ed" stroke="#fb923c" stroke-width="1.8" filter="url(#shadow)"/>
86
+ <text x="910" y="424" text-anchor="middle" class="node-title">可信 Event?</text>
87
+ <text x="910" y="445" text-anchor="middle" class="node-sub">目标 / 身份 / scope</text>
88
+
89
+ <rect x="1090" y="375" width="245" height="78" rx="10" fill="#eff6ff" stroke="#60a5fa" stroke-width="1.6" filter="url(#shadow)"/>
90
+ <text x="1212" y="406" text-anchor="middle" class="node-title">Direct / Mounted</text>
91
+ <text x="1212" y="431" text-anchor="middle" class="node-sub">按需 DWS;不自造目标</text>
92
+
93
+ <rect x="1090" y="475" width="245" height="78" rx="10" fill="#faf5ff" stroke="#c084fc" stroke-width="1.6" filter="url(#shadow)"/>
94
+ <text x="1212" y="506" text-anchor="middle" class="node-title">Prepared Run</text>
95
+ <text x="1212" y="531" text-anchor="middle" class="node-sub">进入强运行时</text>
96
+
97
+ <path d="M1020 410 L1090 410" fill="none" stroke="#2563eb" stroke-width="2" marker-end="url(#arrow-blue)"/>
98
+ <rect x="1038" y="385" width="36" height="21" rx="5" fill="#ffffff" opacity=".96"/><text x="1056" y="400" text-anchor="middle" class="label">否</text>
99
+ <path d="M1020 450 L1054 450 L1054 514 L1090 514" fill="none" stroke="#2563eb" stroke-width="2" marker-end="url(#arrow-blue)"/>
100
+ <rect x="1038" y="477" width="36" height="21" rx="5" fill="#ffffff" opacity=".96"/><text x="1056" y="492" text-anchor="middle" class="label">是</text>
101
+ <text x="780" y="565" class="tiny">消息正文只是 data;没有可信 envelope 时,act reply / ask 必须 fail closed。</text>
102
+
103
+ <rect x="30" y="625" width="1380" height="205" rx="12" fill="#f8fafc" stroke="#cbd5e1" stroke-width="1.2" stroke-dasharray="7 5"/>
104
+ <text x="48" y="650" class="lane-title">OPTIONAL RELIABLE RUNTIME · 只有自动处理可信事件时启用</text>
105
+
106
+ <rect x="55" y="685" width="180" height="86" rx="10" fill="#f8fafc" stroke="#94a3b8" stroke-width="1.6" stroke-dasharray="6 4"/>
107
+ <text x="145" y="716" text-anchor="middle" class="node-title">可选 Driver</text>
108
+ <text x="145" y="741" text-anchor="middle" class="node-sub">云端 / listen / fixture</text>
109
+
110
+ <rect x="285" y="685" width="180" height="86" rx="10" fill="#eff6ff" stroke="#60a5fa" stroke-width="1.6"/>
111
+ <text x="375" y="716" text-anchor="middle" class="node-title">Session</text>
112
+ <text x="375" y="741" text-anchor="middle" class="node-sub">同一件事 · Skill 冻结</text>
113
+
114
+ <rect x="515" y="685" width="180" height="86" rx="10" fill="#faf5ff" stroke="#c084fc" stroke-width="1.6"/>
115
+ <text x="605" y="716" text-anchor="middle" class="node-title">Run</text>
116
+ <text x="605" y="741" text-anchor="middle" class="node-sub">一次信号 · 一次沙箱</text>
117
+
118
+ <rect x="745" y="685" width="220" height="86" rx="10" fill="#fff7ed" stroke="#fb923c" stroke-width="1.6"/>
119
+ <text x="855" y="716" text-anchor="middle" class="node-title">Action</text>
120
+ <text x="855" y="741" text-anchor="middle" class="node-sub">ack · reply · ask · silence</text>
121
+
122
+ <rect x="1015" y="685" width="160" height="86" rx="10" fill="#fef2f2" stroke="#f87171" stroke-width="1.6"/>
123
+ <text x="1095" y="716" text-anchor="middle" class="node-title">Action Gate</text>
124
+ <text x="1095" y="741" text-anchor="middle" class="node-sub">目标 · 预算 · 幂等</text>
125
+
126
+ <rect x="1225" y="685" width="140" height="86" rx="10" fill="#f0fdfa" stroke="#2dd4bf" stroke-width="1.6"/>
127
+ <text x="1295" y="716" text-anchor="middle" class="node-title">DWS</text>
128
+ <text x="1295" y="741" text-anchor="middle" class="node-sub">执行 + 回读</text>
129
+
130
+ <path d="M235 728 L285 728" fill="none" stroke="#64748b" stroke-width="2" stroke-dasharray="5 4" marker-end="url(#arrow-gray)"/>
131
+ <path d="M465 728 L515 728" fill="none" stroke="#2563eb" stroke-width="2" marker-end="url(#arrow-blue)"/>
132
+ <path d="M695 728 L745 728" fill="none" stroke="#2563eb" stroke-width="2" marker-end="url(#arrow-blue)"/>
133
+ <path d="M965 728 L1015 728" fill="none" stroke="#2563eb" stroke-width="2" marker-end="url(#arrow-blue)"/>
134
+ <path d="M1175 728 L1225 728" fill="none" stroke="#2563eb" stroke-width="2" marker-end="url(#arrow-blue)"/>
135
+ <path d="M855 771 C855 810 375 810 375 771" fill="none" stroke="#7c3aed" stroke-width="1.8" stroke-dasharray="5 4" marker-end="url(#arrow-purple)"/>
136
+ <rect x="565" y="790" width="122" height="21" rx="5" fill="#ffffff" opacity=".96"/>
137
+ <text x="626" y="805" text-anchor="middle" class="label">ask 后事件恢复</text>
138
+
139
+ <text x="40" y="864" fill="#111827" font-size="13" font-weight="700">默认路径:global Skill → Agent Session → bootstrap(按需)|强运行时:可信 Event → Session → Run → Action</text>
140
+ <line x1="40" y1="884" x2="74" y2="884" stroke="#2563eb" stroke-width="2" marker-end="url(#arrow-blue)"/><text x="82" y="888" class="tiny">主处理流</text>
141
+ <line x1="190" y1="884" x2="224" y2="884" stroke="#059669" stroke-width="2" marker-end="url(#arrow-green)"/><text x="232" y="888" class="tiny">上下文读取</text>
142
+ <line x1="350" y1="884" x2="384" y2="884" stroke="#64748b" stroke-width="2" stroke-dasharray="5 4" marker-end="url(#arrow-gray)"/><text x="392" y="888" class="tiny">可选事件驱动</text>
143
+ <line x1="535" y1="884" x2="569" y2="884" stroke="#7c3aed" stroke-width="2" stroke-dasharray="5 4" marker-end="url(#arrow-purple)"/><text x="577" y="888" class="tiny">恢复 / Skill 注入</text>
144
+ </svg>
@@ -0,0 +1,234 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1600 1080" width="1600" height="1080">
2
+ <style>
3
+ text { font-family: 'Helvetica Neue', Helvetica, Arial, 'PingFang SC', 'Microsoft YaHei', sans-serif; fill: #111827; }
4
+ .title { font-size: 28px; font-weight: 750; }
5
+ .subtitle { font-size: 14px; fill: #64748b; }
6
+ .lane { font-size: 12px; font-weight: 750; letter-spacing: .08em; }
7
+ .node-title { font-size: 14px; font-weight: 700; }
8
+ .node-sub { font-size: 11px; fill: #64748b; }
9
+ .small { font-size: 10px; fill: #64748b; }
10
+ .label { font-size: 11px; font-weight: 650; fill: #334155; }
11
+ .invariant { font-size: 12px; font-weight: 650; }
12
+ .footer { font-size: 11px; font-weight: 650; fill: #ffffff; }
13
+ </style>
14
+ <defs>
15
+ <marker id="arrow-blue" markerWidth="10" markerHeight="7" refX="9" refY="3.5" orient="auto"><polygon points="0 0,10 3.5,0 7" fill="#2563eb"/></marker>
16
+ <marker id="arrow-green" markerWidth="10" markerHeight="7" refX="9" refY="3.5" orient="auto"><polygon points="0 0,10 3.5,0 7" fill="#059669"/></marker>
17
+ <marker id="arrow-orange" markerWidth="10" markerHeight="7" refX="9" refY="3.5" orient="auto"><polygon points="0 0,10 3.5,0 7" fill="#ea580c"/></marker>
18
+ <marker id="arrow-purple" markerWidth="10" markerHeight="7" refX="9" refY="3.5" orient="auto"><polygon points="0 0,10 3.5,0 7" fill="#7c3aed"/></marker>
19
+ <marker id="arrow-red" markerWidth="10" markerHeight="7" refX="9" refY="3.5" orient="auto"><polygon points="0 0,10 3.5,0 7" fill="#dc2626"/></marker>
20
+ <filter id="shadow" x="-12%" y="-12%" width="124%" height="136%"><feDropShadow dx="0" dy="2" stdDeviation="3" flood-color="#0f172a" flood-opacity="0.10"/></filter>
21
+ </defs>
22
+
23
+ <rect width="1600" height="1080" fill="#ffffff"/>
24
+ <text x="42" y="42" class="title">钉钉数字员工 · Durable Async Workflow 运行模型</text>
25
+ <text x="42" y="68" class="subtitle">消息只是信号:它可能恢复已有 await、启动新 workflow、触发强中断,或仅被观察。Session 跨多个一次性 Sandbox Run 持久存在。</text>
26
+
27
+ <!-- Event intake -->
28
+ <rect x="30" y="92" width="1540" height="215" rx="14" fill="#eff6ff" fill-opacity="0.48" stroke="#93c5fd" stroke-width="1.2" stroke-dasharray="7,4"/>
29
+ <text x="50" y="117" class="lane" fill="#1d4ed8">事件入口 · DURABLE INBOX BEFORE ACK</text>
30
+
31
+ <g filter="url(#shadow)">
32
+ <rect x="52" y="142" width="160" height="112" rx="10" fill="#ffffff" stroke="#bfdbfe" stroke-width="1.5"/>
33
+ <circle cx="83" cy="173" r="13" fill="#dbeafe" stroke="#2563eb"/>
34
+ <path d="M69 211 Q69 190 83 190 Q97 190 97 211" fill="#dbeafe" stroke="#2563eb"/>
35
+ <text x="140" y="172" text-anchor="middle" class="node-title">钉钉消息</text>
36
+ <text x="132" y="196" text-anchor="middle" class="node-sub">DM / @ / 群 / 回复</text>
37
+ <text x="132" y="217" text-anchor="middle" class="node-sub">actor · conv · reply_to</text>
38
+ <text x="132" y="238" text-anchor="middle" class="node-sub">event_id · message_id</text>
39
+
40
+ <rect x="52" y="266" width="160" height="26" rx="7" fill="#ffffff" stroke="#bfdbfe"/>
41
+ <text x="132" y="284" text-anchor="middle" class="small">表格 · 待办 · 审批 · Timer</text>
42
+
43
+ <rect x="260" y="142" width="205" height="112" rx="10" fill="#f0fdfa" stroke="#5eead4" stroke-width="1.6"/>
44
+ <text x="362" y="171" text-anchor="middle" class="node-title">Durable Event Ledger</text>
45
+ <text x="362" y="195" text-anchor="middle" class="node-sub">先持久化,再向上游确认</text>
46
+ <text x="362" y="216" text-anchor="middle" class="node-sub">event 去重 · 原始信封 · 来源证据</text>
47
+ <text x="362" y="237" text-anchor="middle" class="node-sub">at-least-once,不假设 exactly-once</text>
48
+
49
+ <rect x="520" y="136" width="260" height="124" rx="12" fill="#ffffff" stroke="#2563eb" stroke-width="2.2"/>
50
+ <text x="650" y="165" text-anchor="middle" class="node-title">Continuation Router</text>
51
+ <text x="650" y="188" text-anchor="middle" class="node-sub">按 await_id + event matcher 原子 claim</text>
52
+ <text x="650" y="209" text-anchor="middle" class="node-sub">校验 actor / subject / audience / ACL</text>
53
+ <text x="650" y="230" text-anchor="middle" class="node-sub">同一源码 await_point 可被执行多次</text>
54
+ <text x="650" y="247" text-anchor="middle" class="small">因此不能只用 (lambda_id, await_point)</text>
55
+ </g>
56
+
57
+ <path d="M212 198 H250" stroke="#2563eb" stroke-width="2.2" fill="none" marker-end="url(#arrow-blue)"/>
58
+ <path d="M465 198 H510" stroke="#2563eb" stroke-width="2.2" fill="none" marker-end="url(#arrow-blue)"/>
59
+
60
+ <!-- Router outcomes -->
61
+ <g>
62
+ <rect x="830" y="136" width="165" height="54" rx="8" fill="#ecfdf5" stroke="#6ee7b7"/>
63
+ <text x="912" y="158" text-anchor="middle" class="node-title">命中 Await</text>
64
+ <text x="912" y="178" text-anchor="middle" class="node-sub">恢复同一 Workflow</text>
65
+ <rect x="830" y="202" width="165" height="54" rx="8" fill="#fff7ed" stroke="#fdba74"/>
66
+ <text x="912" y="224" text-anchor="middle" class="node-title">无 Await + 可响应</text>
67
+ <text x="912" y="244" text-anchor="middle" class="node-sub">启动新 Workflow</text>
68
+ <rect x="1035" y="136" width="165" height="54" rx="8" fill="#fef2f2" stroke="#fca5a5"/>
69
+ <text x="1117" y="158" text-anchor="middle" class="node-title">Stop / Correction</text>
70
+ <text x="1117" y="178" text-anchor="middle" class="node-sub">撤销 lease + fencing</text>
71
+ <rect x="1035" y="202" width="165" height="54" rx="8" fill="#f8fafc" stroke="#cbd5e1"/>
72
+ <text x="1117" y="224" text-anchor="middle" class="node-title">不具响应资格</text>
73
+ <text x="1117" y="244" text-anchor="middle" class="node-sub">观察 / 记账 / silence</text>
74
+
75
+ <rect x="1248" y="136" width="280" height="120" rx="10" fill="#faf5ff" stroke="#c4b5fd" stroke-width="1.4"/>
76
+ <text x="1388" y="163" text-anchor="middle" class="node-title">Event Match 不是“猜上下文”</text>
77
+ <text x="1388" y="187" text-anchor="middle" class="node-sub">await_id · expected_actor · reply_to</text>
78
+ <text x="1388" y="208" text-anchor="middle" class="node-sub">resource_ref · deadline · cardinality</text>
79
+ <text x="1388" y="229" text-anchor="middle" class="node-sub">scope_version · continuation capability</text>
80
+ <text x="1388" y="247" text-anchor="middle" class="small">多重命中必须 fail closed / 仲裁</text>
81
+ </g>
82
+ <path d="M780 177 H820" stroke="#059669" stroke-width="2" fill="none" marker-end="url(#arrow-green)"/>
83
+ <path d="M780 218 H820" stroke="#ea580c" stroke-width="2" fill="none" marker-end="url(#arrow-orange)"/>
84
+ <path d="M780 159 H1025" stroke="#dc2626" stroke-width="1.7" fill="none" marker-end="url(#arrow-red)"/>
85
+ <path d="M780 239 H1025" stroke="#64748b" stroke-width="1.5" stroke-dasharray="5,3" fill="none"/>
86
+
87
+ <!-- Runtime lane -->
88
+ <rect x="30" y="330" width="1540" height="470" rx="14" fill="#f8fafc" stroke="#cbd5e1" stroke-width="1.2" stroke-dasharray="7,4"/>
89
+ <text x="50" y="356" class="lane" fill="#475569">DURABLE WORKFLOW KERNEL · 持久化的是显式状态,不是 JS/PYTHON/LLM 隐藏栈</text>
90
+
91
+ <!-- Context store -->
92
+ <g filter="url(#shadow)">
93
+ <rect x="52" y="382" width="410" height="335" rx="12" fill="#ffffff" stroke="#0d9488" stroke-width="1.8"/>
94
+ <text x="74" y="410" class="node-title">Context Store(WCB / PCB + 状态对象)</text>
95
+ <text x="74" y="430" class="node-sub">WorkflowInstance 是一个 durable coroutine;Session 可作为其产品名</text>
96
+
97
+ <rect x="72" y="452" width="176" height="92" rx="8" fill="#ecfdf5" stroke="#6ee7b7"/>
98
+ <text x="160" y="476" text-anchor="middle" class="node-title">Workflow Control Block</text>
99
+ <text x="160" y="497" text-anchor="middle" class="node-sub">state · lease · principal · budget</text>
100
+ <text x="160" y="517" text-anchor="middle" class="node-sub">definition/skill/policy snapshot</text>
101
+ <text x="160" y="536" text-anchor="middle" class="small">parent/child · retry · fencing token</text>
102
+
103
+ <rect x="266" y="452" width="176" height="92" rx="8" fill="#eff6ff" stroke="#93c5fd"/>
104
+ <text x="354" y="476" text-anchor="middle" class="node-title">Frames / Checkpoints</text>
105
+ <text x="354" y="497" text-anchor="middle" class="node-sub">program node · explicit locals</text>
106
+ <text x="354" y="517" text-anchor="middle" class="node-sub">draft refs · evidence refs</text>
107
+ <text x="354" y="536" text-anchor="middle" class="small">expected_version · compensation</text>
108
+
109
+ <rect x="72" y="562" width="176" height="92" rx="8" fill="#faf5ff" stroke="#c4b5fd"/>
110
+ <text x="160" y="586" text-anchor="middle" class="node-title">Continuation Graph</text>
111
+ <text x="160" y="607" text-anchor="middle" class="node-sub">AwaitSubscription / child links</text>
112
+ <text x="160" y="627" text-anchor="middle" class="node-sub">await_any · await_all · timeout</text>
113
+ <text x="160" y="646" text-anchor="middle" class="small">async DAG,不只是一条 Call Stack</text>
114
+
115
+ <rect x="266" y="562" width="176" height="92" rx="8" fill="#fff7ed" stroke="#fdba74"/>
116
+ <text x="354" y="586" text-anchor="middle" class="node-title">Effect Journal</text>
117
+ <text x="354" y="607" text-anchor="middle" class="node-sub">Intent · Attempt · Receipt</text>
118
+ <text x="354" y="627" text-anchor="middle" class="node-sub">idempotency key · readback</text>
119
+ <text x="354" y="646" text-anchor="middle" class="small">外部 I/O 不随 replay 重复</text>
120
+
121
+ <rect x="72" y="670" width="370" height="28" rx="7" fill="#f0fdfa" stroke="#99f6e4"/>
122
+ <text x="257" y="689" text-anchor="middle" class="label">Field Handles → People / Ontology / KB / Resource Registry / ACL</text>
123
+ </g>
124
+
125
+ <!-- Scheduler + sandbox -->
126
+ <g filter="url(#shadow)">
127
+ <rect x="520" y="407" width="190" height="104" rx="10" fill="#ecfdf5" stroke="#34d399" stroke-width="1.6"/>
128
+ <text x="615" y="435" text-anchor="middle" class="node-title">Workflow Scheduler</text>
129
+ <text x="615" y="458" text-anchor="middle" class="node-sub">claim · lease · priority · budget</text>
130
+ <text x="615" y="479" text-anchor="middle" class="node-sub">start / resume / cancel / retry</text>
131
+ <text x="615" y="499" text-anchor="middle" class="small">一次只调度一个执行 quantum</text>
132
+
133
+ <rect x="758" y="390" width="245" height="140" rx="12" fill="#ffffff" stroke="#7c3aed" stroke-width="2.5"/>
134
+ <rect x="764" y="396" width="233" height="128" rx="9" fill="none" stroke="#ddd6fe"/>
135
+ <text x="880" y="421" text-anchor="middle" class="node-title">Run / Ephemeral Sandbox</text>
136
+ <text x="880" y="446" text-anchor="middle" class="node-sub">恢复显式 frame,执行一个时间片</text>
137
+ <text x="880" y="468" text-anchor="middle" class="node-sub">模型只负责理解 / 规划 / 表达</text>
138
+ <text x="880" y="490" text-anchor="middle" class="node-sub">到 await / checkpoint / terminal 即退出</text>
139
+ <text x="880" y="513" text-anchor="middle" class="small">沙箱销毁;WorkflowInstance 仍存在</text>
140
+
141
+ <rect x="1048" y="407" width="210" height="104" rx="10" fill="#fff7ed" stroke="#fb923c" stroke-width="1.7"/>
142
+ <text x="1153" y="435" text-anchor="middle" class="node-title">Policy Gate / Broker</text>
143
+ <text x="1153" y="458" text-anchor="middle" class="node-sub">principal · target · capability</text>
144
+ <text x="1153" y="479" text-anchor="middle" class="node-sub">Intent-before-I/O · identity verify</text>
145
+ <text x="1153" y="499" text-anchor="middle" class="small">内核边界 / 系统调用网关</text>
146
+
147
+ <rect x="1306" y="407" width="215" height="104" rx="10" fill="#eff6ff" stroke="#60a5fa" stroke-width="1.7"/>
148
+ <text x="1413" y="435" text-anchor="middle" class="node-title">DWS / 钉钉标准品</text>
149
+ <text x="1413" y="458" text-anchor="middle" class="node-sub">IM · 表格 · 文档 · 待办</text>
150
+ <text x="1413" y="479" text-anchor="middle" class="node-sub">日历 · 审批 · DING · 通讯录</text>
151
+ <text x="1413" y="499" text-anchor="middle" class="small">typed operation + external receipt</text>
152
+ </g>
153
+
154
+ <path d="M995 163 V321 H615 V397" stroke="#059669" stroke-width="2" fill="none" marker-end="url(#arrow-green)"/>
155
+ <text x="785" y="319" class="label">resume / spawn</text>
156
+ <path d="M1117 190 V370 H684 V397" stroke="#dc2626" stroke-width="1.8" fill="none" marker-end="url(#arrow-red)"/>
157
+ <text x="905" y="366" class="label" fill="#b91c1c">interrupt / fence</text>
158
+ <path d="M462 459 H510" stroke="#059669" stroke-width="2" fill="none" marker-end="url(#arrow-green)"/>
159
+ <path d="M710 459 H748" stroke="#2563eb" stroke-width="2.2" fill="none" marker-end="url(#arrow-blue)"/>
160
+ <path d="M1003 459 H1038" stroke="#ea580c" stroke-width="2.2" fill="none" marker-end="url(#arrow-orange)"/>
161
+ <path d="M1258 459 H1296" stroke="#ea580c" stroke-width="2.2" fill="none" marker-end="url(#arrow-orange)"/>
162
+ <path d="M1413 511 V550 H1153 V521" stroke="#7c3aed" stroke-width="1.8" fill="none" marker-end="url(#arrow-purple)"/>
163
+ <text x="1283" y="545" text-anchor="middle" class="label">Receipt / readback</text>
164
+ <path d="M1048 497 H1022 V695 H472" stroke="#7c3aed" stroke-width="1.8" fill="none" marker-end="url(#arrow-purple)"/>
165
+ <text x="757" y="690" text-anchor="middle" class="label">effect receipt + checkpoint</text>
166
+ <path d="M758 507 H730 V650 H472" stroke="#059669" stroke-width="1.8" stroke-dasharray="5,3" fill="none" marker-end="url(#arrow-green)"/>
167
+ <text x="614" y="644" text-anchor="middle" class="label">await / complete</text>
168
+
169
+ <!-- Primitive families -->
170
+ <rect x="520" y="580" width="1000" height="137" rx="10" fill="#ffffff" stroke="#d1d5db"/>
171
+ <text x="540" y="605" class="lane" fill="#475569">通用办公基础能力 · 四原语只是 SOCIAL API,不是全部“系统调用”</text>
172
+ <g>
173
+ <rect x="540" y="624" width="170" height="70" rx="8" fill="#eff6ff" stroke="#bfdbfe"/>
174
+ <text x="625" y="648" text-anchor="middle" class="node-title">Social</text>
175
+ <text x="625" y="669" text-anchor="middle" class="node-sub">ack · reply · ask · silence</text>
176
+ <text x="625" y="686" text-anchor="middle" class="small">+ progress(扩展)</text>
177
+ <rect x="730" y="624" width="180" height="70" rx="8" fill="#ecfdf5" stroke="#a7f3d0"/>
178
+ <text x="820" y="648" text-anchor="middle" class="node-title">Process</text>
179
+ <text x="820" y="669" text-anchor="middle" class="node-sub">spawn · await · join · cancel</text>
180
+ <text x="820" y="686" text-anchor="middle" class="small">checkpoint · timeout · compensate</text>
181
+ <rect x="930" y="624" width="180" height="70" rx="8" fill="#fff7ed" stroke="#fed7aa"/>
182
+ <text x="1020" y="648" text-anchor="middle" class="node-title">Workspace Effects</text>
183
+ <text x="1020" y="669" text-anchor="middle" class="node-sub">read/query · write/upsert</text>
184
+ <text x="1020" y="686" text-anchor="middle" class="small">task · calendar · approval · IM</text>
185
+ <rect x="1130" y="624" width="180" height="70" rx="8" fill="#faf5ff" stroke="#ddd6fe"/>
186
+ <text x="1220" y="648" text-anchor="middle" class="node-title">Context</text>
187
+ <text x="1220" y="669" text-anchor="middle" class="node-sub">heap handle · provenance · TTL</text>
188
+ <text x="1220" y="686" text-anchor="middle" class="small">subject memory · resource registry</text>
189
+ <rect x="1330" y="624" width="170" height="70" rx="8" fill="#fef2f2" stroke="#fecaca"/>
190
+ <text x="1415" y="648" text-anchor="middle" class="node-title">Trust &amp; Learning</text>
191
+ <text x="1415" y="669" text-anchor="middle" class="node-sub">authority · receipt · audit</text>
192
+ <text x="1415" y="686" text-anchor="middle" class="small">feedback → candidate → gate</text>
193
+ </g>
194
+
195
+ <!-- FDE instance / incident mapping -->
196
+ <rect x="30" y="825" width="1540" height="207" rx="14" fill="#faf5ff" fill-opacity="0.48" stroke="#c4b5fd" stroke-width="1.2"/>
197
+ <text x="50" y="851" class="lane" fill="#6d28d9">FDE 教练实例 · 同一个点评事项跨 4 个 RUN 恢复</text>
198
+
199
+ <g>
200
+ <rect x="52" y="875" width="235" height="79" rx="9" fill="#ffffff" stroke="#c4b5fd"/>
201
+ <text x="169" y="899" text-anchor="middle" class="node-title">Run #1 · 日报事件</text>
202
+ <text x="169" y="920" text-anchor="middle" class="node-sub">验证学生/Field → durable ack</text>
203
+ <text x="169" y="940" text-anchor="middle" class="node-sub">创建 workflow_instance + draft task</text>
204
+ <rect x="330" y="875" width="235" height="79" rx="9" fill="#ffffff" stroke="#c4b5fd"/>
205
+ <text x="447" y="899" text-anchor="middle" class="node-title">Run #2 · 形成草稿</text>
206
+ <text x="447" y="920" text-anchor="middle" class="node-sub">读日报/主管点评 → ask 预览</text>
207
+ <text x="447" y="940" text-anchor="middle" class="node-sub">原子登记 await(student, reply_to)</text>
208
+ <rect x="608" y="875" width="235" height="79" rx="9" fill="#ffffff" stroke="#c4b5fd"/>
209
+ <text x="725" y="899" text-anchor="middle" class="node-title">Run #3 · 学生纠正</text>
210
+ <text x="725" y="920" text-anchor="middle" class="node-sub">命中原 await → draft_v2</text>
211
+ <text x="725" y="940" text-anchor="middle" class="node-sub">保留 v1 + 纠正来源 → 再确认</text>
212
+ <rect x="886" y="875" width="235" height="79" rx="9" fill="#ffffff" stroke="#c4b5fd"/>
213
+ <text x="1003" y="899" text-anchor="middle" class="node-title">Run #4 · 确认发布</text>
214
+ <text x="1003" y="920" text-anchor="middle" class="node-sub">重新校验身份/目标/版本</text>
215
+ <text x="1003" y="940" text-anchor="middle" class="node-sub">幂等 publish → Receipt → complete</text>
216
+ </g>
217
+ <path d="M287 914 H320" stroke="#7c3aed" stroke-width="1.8" fill="none" marker-end="url(#arrow-purple)"/>
218
+ <path d="M565 914 H598" stroke="#7c3aed" stroke-width="1.8" fill="none" marker-end="url(#arrow-purple)"/>
219
+ <path d="M843 914 H876" stroke="#7c3aed" stroke-width="1.8" fill="none" marker-end="url(#arrow-purple)"/>
220
+ <text x="447" y="972" text-anchor="middle" class="small">沙箱休眠 ≠ 进程挂起:每个 Run 都可来自全新的 sandbox</text>
221
+
222
+ <g>
223
+ <rect x="1165" y="871" width="365" height="113" rx="9" fill="#fff7ed" stroke="#fdba74"/>
224
+ <text x="1185" y="896" class="node-title">历史事故 → 内核兜底</text>
225
+ <text x="1185" y="918" class="node-sub">13 个事件丢失 → Inbox 落盘后才 ACK</text>
226
+ <text x="1185" y="938" class="node-sub">纠正后继续 → host cancel + fencing token</text>
227
+ <text x="1185" y="958" class="node-sub">重复群推送 → Effect Journal + stable idempotency</text>
228
+ <text x="1185" y="978" class="node-sub">300s/超时重启 → checkpoint 后换新 Run 续做</text>
229
+ </g>
230
+
231
+ <!-- Invariants footer -->
232
+ <rect x="30" y="1047" width="1540" height="22" rx="6" fill="#0f172a"/>
233
+ <text x="800" y="1063" text-anchor="middle" class="footer">不保存模型隐性推理 · 不热替换运行中 Skill · 不以模型自述作为完成证据 · 所有跨系统副作用必须 Receipt/readback</text>
234
+ </svg>
@@ -0,0 +1,77 @@
1
+ <!-- ⚠️ 内网文档 —— 不进 npm 包(package.json 的 files 不含 docs/)。
2
+ 里面是 dws 的命令面和钉钉 API 的内部缺陷清单。**不要外发。** -->
3
+
4
+ # 钉钉:怎么操作它
5
+
6
+ ## 行动界面(`dws` 的 20 个服务)
7
+
8
+ | | |
9
+ |---|---|
10
+ | **doc** 文档 · **sheet** 表格 · **aitable** AI表格 · **drive** 钉盘 · **wiki** 知识库 | 东西放哪 |
11
+ | **chat** 群聊消息机器人 · **ding** DING · **mail** 邮箱 | 怎么说话 |
12
+ | **todo** 待办 · **calendar** 日历 · **agoal** 目标 · **oa** 审批 | 怎么协作 |
13
+ | **contact** 通讯录 · **attendance** 考勤 | 组织与人 |
14
+ | **minutes** AI听记 · **aisearch** AI搜问 · **report** 日志 · **live** 直播 | 其它 |
15
+
16
+ **用前先 `dws <服务> --help`。命令和 flag 以 `--help` 和真实返回为准,不要凭记忆敲。**
17
+
18
+ ## ★ 读写实相(每一条都是血换的,违反必【静默】出错)
19
+
20
+ ### 三个层级,各藏各的
21
+
22
+ ```
23
+ aitable record query → 记录在 data 里 {"data":{"records":[…]}}
24
+ doc read → markdown 在 顶层 {"markdown":"…"}
25
+ todo task list → 东西在 result 里 {"result":{"todoCards":[…],"hasMore":true}}
26
+ ```
27
+
28
+ **读错层级 → 拿到 `undefined` → 当成"是空的" → 一整天的数据可以这么无声丢掉。**
29
+ **拿不到必须响亮地死,绝不当成"表是空的"。**
30
+
31
+ > 这个坑连写这份文档的人都栽过。所以:**所有对钉钉的调用走 CLI,不要自己 spawn dws。**
32
+
33
+ ### 分页会静默截断
34
+
35
+ - `aitable record query --all` **必须**配 `--page-limit 0`(默认 50 页 ≈ 5000 条静默截断)。
36
+ - **`hasMore` 只在 `todo task list --size ≤ 20` 时存在。** size 一超过 20,
37
+ `hasMore`/`page`/`size` **三个键整个消失** → 你拿到 `undefined` → 当成 `false` → **静默截断**。
38
+ 实测 `--size 100` 拿回 100 条,真实总数 **109** —— **吃掉 9 条**。
39
+ **`undefined` 不是「没有下一页」,是「没有信号」。**
40
+ → 用 `dingtalk-agent todo`(帮你翻页了)。
41
+
42
+ ### 创建类:报错但其实建成功了
43
+
44
+ `doc create` / `doc upload` 实测:**返回 error 信封,文档却真的建出来了。**
45
+ - **绝不看返回信封** —— 按名回查 + 内容回读定成败。
46
+ - **创建类永不盲重试**(会造重复件)。失败先按幂等键回查。
47
+
48
+ ### 写操作报错 ≠ 失败
49
+
50
+ **回读实态才定成败。** `success:true` 也不算验收。
51
+
52
+ ### AI 表格的字段
53
+
54
+ | | 写 | 读回 |
55
+ |---|---|---|
56
+ | 单选 | 字符串 `"日"` | **`{id,name}` 对象** |
57
+ | 数字 | `int/float` | **字符串** `"0.812"` |
58
+ | 日期 | `"YYYY-MM-DD"`(写 epoch 毫秒会存成 1788 年垃圾) | ISO 全串 |
59
+
60
+ - **过滤日期用 epoch 毫秒 + `not_before`/`not_after`。`eq` 对 date 字段永远 0 行。**
61
+ - 载荷键是 **`cells`**,不是 `fields`。
62
+ - `table create` 单次最多落 **15 个字段**,多的**静默丢弃** → 建完必回读补齐。
63
+ - 中文选项名**可以**做 eq 过滤。
64
+
65
+ ### markdown 会被重排版
66
+
67
+ 钉钉会重写:表格分隔线补齐 · 加粗与行内代码嵌套重写 · 段落合并 · 双重转义 `&amp;#95;`。
68
+
69
+ - **重排版不是漂移。** 比对必须**剥掉 markdown 符号只看文字流**。
70
+ - **标题里的行内代码会被整个吞掉**(`### 用 \`x\`` → `### 用 `)。行内代码一律挪出标题。
71
+ - 表格单元格里的裸 `|` 会截断内容(用 `·`)。
72
+
73
+ ### 其它
74
+
75
+ - **文档空间 ≠ 钉盘空间**,两套不互通。AI 表格是在线实体,不是文件。
76
+ - `dws` 命令的**续行反斜杠中间不能插注释**(bash 会吃掉后半条)。
77
+ - **`dws` 带代理正常。** 别一刀切 `unset proxy`(会打断别的需要代理的 CLI)。
@@ -0,0 +1,28 @@
1
+ {
2
+ "schemaVersion": 1,
3
+ "kind": "claude-shadow-baseline",
4
+ "date": "2026-07-14",
5
+ "suite": [101, 102, 103],
6
+ "runsPerConfiguration": 1,
7
+ "modelSelection": {
8
+ "pinned": false,
9
+ "observed": ["claude-opus-4-8"]
10
+ },
11
+ "withSkill": {
12
+ "passRateMean": 1,
13
+ "timeSecondsMean": 20.8613,
14
+ "tokensMean": 9528.6667
15
+ },
16
+ "withoutSkill": {
17
+ "passRateMean": 1,
18
+ "timeSecondsMean": 20.693,
19
+ "tokensMean": 7591.3333
20
+ },
21
+ "delta": {
22
+ "passRate": 0,
23
+ "timeSeconds": 0.1683,
24
+ "tokens": 1937.3333
25
+ },
26
+ "interpretation": "三个简单场景只验证了 runner 与动作合同,两种配置均通过;不能据此证明 Skill 有增益。样本仅一次,不能用于显著性判断。",
27
+ "rawEvidenceLocalPath": "evals/results/behavior-iteration-001/benchmark.json"
28
+ }
@@ -0,0 +1,18 @@
1
+ {
2
+ "schemaVersion": 1,
3
+ "kind": "deterministic-contract-baseline",
4
+ "date": "2026-07-14",
5
+ "evals": 10,
6
+ "passRate": 1,
7
+ "externalWrites": 0,
8
+ "coverage": [
9
+ "mentioned 与 ambient group 行为",
10
+ "durable inbox/outbox 与 dispatch ack",
11
+ "事件重复投递",
12
+ "reply-target 与 Skill 快照防篡改",
13
+ "DWS 字符串 data 解析",
14
+ "tenant/causal Session 隔离",
15
+ "单一 egress owner",
16
+ "稳定 heartbeat duty 与唯一 occurrence"
17
+ ]
18
+ }
@@ -0,0 +1,25 @@
1
+ {
2
+ "schemaVersion": 1,
3
+ "kind": "robot-connect-live-canary",
4
+ "date": "2026-07-14",
5
+ "botName": "DTA蓝本实验员",
6
+ "marker": "DTA-EVAL-NEWBOT-01",
7
+ "syntheticInput": "7 + 5 等于多少?请直接回答。",
8
+ "actualReply": "7 + 5 等于 12。",
9
+ "latencySeconds": 4,
10
+ "platformReadbackMatched": true,
11
+ "connectorStopped": true,
12
+ "finalConnectorState": "not_running",
13
+ "proves": [
14
+ "专用机器人到隔离 workspace 的连接成立",
15
+ "Claude Code 能处理消息并由 connector 回发",
16
+ "DWS 可以从平台独立回读请求与回复"
17
+ ],
18
+ "doesNotProve": [
19
+ "结构化事件信封与 Session 路由",
20
+ "reply-target 防篡改",
21
+ "typed Action 与 Receipt",
22
+ "messageId 级幂等",
23
+ "personal-event 完整链路"
24
+ ]
25
+ }