@agent-native/core 0.109.1 → 0.109.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 (51) hide show
  1. package/corpus/README.md +1 -1
  2. package/corpus/core/CHANGELOG.md +7 -0
  3. package/corpus/core/docs/content/integrations.mdx +87 -253
  4. package/corpus/core/package.json +1 -1
  5. package/corpus/core/src/client/blocks/library/diagram.config.ts +10 -1
  6. package/corpus/core/src/client/blocks/library/diagram.tsx +9 -4
  7. package/corpus/core/src/deploy/build.ts +63 -3
  8. package/corpus/templates/clips/.agents/skills/dictate/SKILL.md +28 -5
  9. package/corpus/templates/clips/.agents/skills/meetings/SKILL.md +7 -0
  10. package/corpus/templates/clips/.agents/skills/recording/SKILL.md +23 -0
  11. package/corpus/templates/clips/AGENTS.md +10 -0
  12. package/corpus/templates/clips/actions/create-dictation.ts +29 -4
  13. package/corpus/templates/clips/actions/finalize-recording.ts +2 -4
  14. package/corpus/templates/clips/actions/get-recording-player-data.ts +16 -6
  15. package/corpus/templates/clips/actions/set-mobile-capture-state.ts +37 -0
  16. package/corpus/templates/clips/actions/update-dictation.ts +9 -1
  17. package/corpus/templates/clips/app/routes/r.$recordingId.tsx +13 -2
  18. package/corpus/templates/clips/app/routes/share.$shareId.tsx +13 -2
  19. package/corpus/templates/clips/changelog/2026-07-17-capture-dictation-background-meeting-audio-and-camera-videos.md +6 -0
  20. package/corpus/templates/clips/changelog/2026-07-17-delayed-upload-verification-keeps-local-backups-retryable.md +6 -0
  21. package/corpus/templates/clips/desktop/src/app.tsx +17 -0
  22. package/corpus/templates/clips/desktop/src/lib/processing-backup-recovery.ts +19 -0
  23. package/corpus/templates/clips/desktop/src/lib/recorder.ts +60 -35
  24. package/corpus/templates/clips/desktop/src/lib/upload-verification.ts +12 -0
  25. package/corpus/templates/clips/desktop/src-tauri/src/lib.rs +1 -0
  26. package/corpus/templates/clips/desktop/src-tauri/src/native_screen.rs +14 -0
  27. package/corpus/templates/clips/server/db/schema.ts +9 -1
  28. package/corpus/templates/clips/server/lib/builder-media-compression.ts +59 -7
  29. package/corpus/templates/clips/server/lib/media-verification-state.ts +17 -0
  30. package/corpus/templates/clips/server/routes/api/public-recording.get.ts +7 -0
  31. package/corpus/templates/clips/server/routes/api/uploads/[recordingId]/reset-chunks.post.ts +22 -1
  32. package/corpus/templates/plan/changelog/2026-07-17-diagrams-can-opt-into-a-polished-clean-rendering-mode-withou.md +6 -0
  33. package/corpus/templates/plan/shared/plan-content.ts +3 -0
  34. package/dist/client/blocks/library/diagram.config.d.ts +2 -0
  35. package/dist/client/blocks/library/diagram.config.d.ts.map +1 -1
  36. package/dist/client/blocks/library/diagram.config.js +8 -1
  37. package/dist/client/blocks/library/diagram.config.js.map +1 -1
  38. package/dist/client/blocks/library/diagram.d.ts.map +1 -1
  39. package/dist/client/blocks/library/diagram.js +9 -4
  40. package/dist/client/blocks/library/diagram.js.map +1 -1
  41. package/dist/collab/struct-routes.d.ts +1 -1
  42. package/dist/deploy/build.d.ts +3 -0
  43. package/dist/deploy/build.d.ts.map +1 -1
  44. package/dist/deploy/build.js +45 -1
  45. package/dist/deploy/build.js.map +1 -1
  46. package/dist/observability/routes.d.ts +5 -5
  47. package/dist/progress/routes.d.ts +1 -1
  48. package/dist/resources/handlers.d.ts +2 -2
  49. package/dist/secrets/routes.d.ts +9 -9
  50. package/docs/content/integrations.mdx +87 -253
  51. package/package.json +1 -1
package/corpus/README.md CHANGED
@@ -28,4 +28,4 @@ rg -n "defineAction|useActionQuery" node_modules/@agent-native/core/corpus
28
28
  ## Generated Counts
29
29
 
30
30
  - core files: 2309
31
- - template files: 6143
31
+ - template files: 6148
@@ -1,5 +1,12 @@
1
1
  # @agent-native/core
2
2
 
3
+ ## 0.109.2
4
+
5
+ ### Patch Changes
6
+
7
+ - 915c940: Allow HTML diagrams to opt into clean design rendering without the rough.js overlay.
8
+ - 915c940: Preserve stubbed optional package imports and package subpaths when bundling Cloudflare Pages workers.
9
+
3
10
  ## 0.109.1
4
11
 
5
12
  ### Patch Changes
@@ -35,263 +35,213 @@ or administrator policy can prevent a generic one-click connection.
35
35
 
36
36
  ## The integration wall {#integration-wall}
37
37
 
38
- These compact, self-hosted wordmarks keep the directory fast and deployable
39
- without a third-party logo CDN. The labels and status pills come from the same
40
- shipped MCP preset categories documented below.
38
+ These self-hosted provider marks keep the directory fast and deployable
39
+ without a third-party logo CDN. Connection details and status categories remain
40
+ in the directory table below.
41
41
 
42
- <Diagram id="doc-block-integrations-wall" title="Remote MCP integrations" summary="A self-hosted logo wall of the 25 remote MCP presets currently shipped in the Agent-Native framework." frame="hide">
42
+ <Diagram id="doc-block-integrations-wall" title="Remote MCP integrations" summary="A self-hosted logo wall of the 25 remote MCP presets currently shipped in the Agent-Native framework." frame="hide" renderMode="design">
43
43
 
44
44
  ```html
45
45
  <div class="integration-wall">
46
46
  <div class="integration-card">
47
47
  <div class="integration-head">
48
- <span class="integration-mark c7">C7</span>
48
+ <span class="integration-mark"
49
+ ><img src="/integration-logos/context7.svg" alt=""
50
+ /></span>
49
51
  <div><strong>Context7</strong><small>Docs &amp; reference</small></div>
50
52
  </div>
51
- <div class="integration-tags">
52
- <span class="integration-tag direct">No auth</span
53
- ><span class="integration-tag ready">Verified</span>
54
- </div>
55
53
  </div>
56
54
  <div class="integration-card">
57
55
  <div class="integration-head">
58
- <span class="integration-mark sentry">S</span>
56
+ <span class="integration-mark"
57
+ ><img src="/integration-logos/sentry.svg" alt=""
58
+ /></span>
59
59
  <div><strong>Sentry</strong><small>Errors &amp; debugging</small></div>
60
60
  </div>
61
- <div class="integration-tags">
62
- <span class="integration-tag token">Header / token</span
63
- ><span class="integration-tag ready">Ready</span>
64
- </div>
65
61
  </div>
66
62
  <div class="integration-card">
67
63
  <div class="integration-head">
68
- <span class="integration-mark notion">N</span>
64
+ <span class="integration-mark"
65
+ ><img src="/integration-logos/notion.svg" alt=""
66
+ /></span>
69
67
  <div><strong>Notion</strong><small>Knowledge &amp; docs</small></div>
70
68
  </div>
71
- <div class="integration-tags">
72
- <span class="integration-tag oauth">OAuth</span
73
- ><span class="integration-tag ready">Ready</span>
74
- </div>
75
69
  </div>
76
70
  <div class="integration-card">
77
71
  <div class="integration-head">
78
- <span class="integration-mark semgrep">SG</span>
72
+ <span class="integration-mark"
73
+ ><img src="/integration-logos/semgrep.svg" alt=""
74
+ /></span>
79
75
  <div><strong>Semgrep</strong><small>Security scanning</small></div>
80
76
  </div>
81
- <div class="integration-tags">
82
- <span class="integration-tag direct">No auth</span
83
- ><span class="integration-tag ready">Ready</span>
84
- </div>
85
77
  </div>
86
78
  <div class="integration-card">
87
79
  <div class="integration-head">
88
- <span class="integration-mark linear">L</span>
80
+ <span class="integration-mark"
81
+ ><img src="/integration-logos/linear.svg" alt=""
82
+ /></span>
89
83
  <div><strong>Linear</strong><small>Issues &amp; planning</small></div>
90
84
  </div>
91
- <div class="integration-tags">
92
- <span class="integration-tag oauth">OAuth</span
93
- ><span class="integration-tag ready">Ready</span>
94
- </div>
95
85
  </div>
96
86
  <div class="integration-card">
97
87
  <div class="integration-head">
98
- <span class="integration-mark atlassian">A</span>
88
+ <span class="integration-mark"
89
+ ><img src="/integration-logos/atlassian.svg" alt=""
90
+ /></span>
99
91
  <div><strong>Atlassian</strong><small>Jira &amp; Confluence</small></div>
100
92
  </div>
101
- <div class="integration-tags">
102
- <span class="integration-tag oauth">OAuth</span
103
- ><span class="integration-tag restricted">Restricted</span>
104
- </div>
105
93
  </div>
106
94
  <div class="integration-card">
107
95
  <div class="integration-head">
108
- <span class="integration-mark supabase">SB</span>
96
+ <span class="integration-mark"
97
+ ><img src="/integration-logos/supabase.svg" alt=""
98
+ /></span>
109
99
  <div><strong>Supabase</strong><small>Database &amp; auth</small></div>
110
100
  </div>
111
- <div class="integration-tags">
112
- <span class="integration-tag oauth">OAuth</span
113
- ><span class="integration-tag ready">Ready</span>
114
- </div>
115
101
  </div>
116
102
  <div class="integration-card">
117
103
  <div class="integration-head">
118
- <span class="integration-mark neon">N</span>
104
+ <span class="integration-mark"
105
+ ><img src="/integration-logos/neon.svg" alt=""
106
+ /></span>
119
107
  <div><strong>Neon</strong><small>Serverless Postgres</small></div>
120
108
  </div>
121
- <div class="integration-tags">
122
- <span class="integration-tag oauth">OAuth</span
123
- ><span class="integration-tag ready">Ready</span>
124
- </div>
125
109
  </div>
126
110
  <div class="integration-card">
127
111
  <div class="integration-head">
128
- <span class="integration-mark stripe">S</span>
112
+ <span class="integration-mark"
113
+ ><img src="/integration-logos/stripe.svg" alt=""
114
+ /></span>
129
115
  <div><strong>Stripe</strong><small>Payments &amp; billing</small></div>
130
116
  </div>
131
- <div class="integration-tags">
132
- <span class="integration-tag oauth">OAuth</span
133
- ><span class="integration-tag ready">Ready</span>
134
- </div>
135
117
  </div>
136
118
  <div class="integration-card">
137
119
  <div class="integration-head">
138
- <span class="integration-mark cloudflare">CF</span>
120
+ <span class="integration-mark"
121
+ ><img src="/integration-logos/cloudflare.svg" alt=""
122
+ /></span>
139
123
  <div><strong>Cloudflare</strong><small>Cloud &amp; security</small></div>
140
124
  </div>
141
- <div class="integration-tags">
142
- <span class="integration-tag oauth">OAuth</span
143
- ><span class="integration-tag ready">Ready</span>
144
- </div>
145
125
  </div>
146
126
  <div class="integration-card">
147
127
  <div class="integration-head">
148
- <span class="integration-mark gitlab">GL</span>
128
+ <span class="integration-mark"
129
+ ><img src="/integration-logos/gitlab.svg" alt=""
130
+ /></span>
149
131
  <div><strong>GitLab</strong><small>Repos &amp; CI/CD</small></div>
150
132
  </div>
151
- <div class="integration-tags">
152
- <span class="integration-tag oauth">OAuth</span
153
- ><span class="integration-tag restricted">Beta / restricted</span>
154
- </div>
155
133
  </div>
156
134
  <div class="integration-card">
157
135
  <div class="integration-head">
158
- <span class="integration-mark figma">F</span>
136
+ <span class="integration-mark"
137
+ ><img src="/integration-logos/figma.svg" alt=""
138
+ /></span>
159
139
  <div><strong>Figma</strong><small>Design context</small></div>
160
140
  </div>
161
- <div class="integration-tags">
162
- <span class="integration-tag manual">Manual setup</span
163
- ><span class="integration-tag restricted">Approved clients</span>
164
- </div>
165
141
  </div>
166
142
  <div class="integration-card">
167
143
  <div class="integration-head">
168
- <span class="integration-mark canva">C</span>
144
+ <span class="integration-mark"
145
+ ><img src="/integration-logos/canva.svg" alt=""
146
+ /></span>
169
147
  <div><strong>Canva</strong><small>Designs &amp; assets</small></div>
170
148
  </div>
171
- <div class="integration-tags">
172
- <span class="integration-tag manual">Manual setup</span
173
- ><span class="integration-tag restricted">Approved domains</span>
174
- </div>
175
149
  </div>
176
150
  <div class="integration-card">
177
151
  <div class="integration-head">
178
- <span class="integration-mark vercel">V</span>
152
+ <span class="integration-mark"
153
+ ><img src="/integration-logos/vercel.svg" alt=""
154
+ /></span>
179
155
  <div><strong>Vercel</strong><small>Deployments &amp; logs</small></div>
180
156
  </div>
181
- <div class="integration-tags">
182
- <span class="integration-tag manual">Manual setup</span
183
- ><span class="integration-tag restricted">Approved clients</span>
184
- </div>
185
157
  </div>
186
158
  <div class="integration-card">
187
159
  <div class="integration-head">
188
- <span class="integration-mark github">GH</span>
160
+ <span class="integration-mark"
161
+ ><img src="/integration-logos/github.svg" alt=""
162
+ /></span>
189
163
  <div><strong>GitHub</strong><small>Code &amp; pull requests</small></div>
190
164
  </div>
191
- <div class="integration-tags">
192
- <span class="integration-tag manual">Manual setup</span
193
- ><span class="integration-tag restricted">Provider setup</span>
194
- </div>
195
165
  </div>
196
166
  <div class="integration-card">
197
167
  <div class="integration-head">
198
- <span class="integration-mark slack">#</span>
168
+ <span class="integration-mark"
169
+ ><img src="/integration-logos/slack.svg" alt=""
170
+ /></span>
199
171
  <div><strong>Slack</strong><small>Messages &amp; channels</small></div>
200
172
  </div>
201
- <div class="integration-tags">
202
- <span class="integration-tag manual">Manual setup</span
203
- ><span class="integration-tag restricted">Approved clients</span>
204
- </div>
205
173
  </div>
206
174
  <div class="integration-card">
207
175
  <div class="integration-head">
208
- <span class="integration-mark asana">AS</span>
176
+ <span class="integration-mark"
177
+ ><img src="/integration-logos/asana.svg" alt=""
178
+ /></span>
209
179
  <div><strong>Asana</strong><small>Tasks &amp; projects</small></div>
210
180
  </div>
211
- <div class="integration-tags">
212
- <span class="integration-tag manual">Manual setup</span
213
- ><span class="integration-tag restricted">Provider setup</span>
214
- </div>
215
181
  </div>
216
182
  <div class="integration-card">
217
183
  <div class="integration-head">
218
- <span class="integration-mark hubspot">HS</span>
184
+ <span class="integration-mark"
185
+ ><img src="/integration-logos/hubspot.svg" alt=""
186
+ /></span>
219
187
  <div><strong>HubSpot</strong><small>CRM &amp; customer data</small></div>
220
188
  </div>
221
- <div class="integration-tags">
222
- <span class="integration-tag manual">Manual setup</span
223
- ><span class="integration-tag restricted">Provider setup</span>
224
- </div>
225
189
  </div>
226
190
  <div class="integration-card">
227
191
  <div class="integration-head">
228
- <span class="integration-mark intercom">I</span>
192
+ <span class="integration-mark"
193
+ ><img src="/integration-logos/intercom.svg" alt=""
194
+ /></span>
229
195
  <div><strong>Intercom</strong><small>Support conversations</small></div>
230
196
  </div>
231
- <div class="integration-tags">
232
- <span class="integration-tag oauth">OAuth</span
233
- ><span class="integration-tag ready">Ready</span>
234
- </div>
235
197
  </div>
236
198
  <div class="integration-card">
237
199
  <div class="integration-head">
238
- <span class="integration-mark monday">M</span>
200
+ <span class="integration-mark"
201
+ ><img src="/integration-logos/monday.svg" alt=""
202
+ /></span>
239
203
  <div><strong>monday.com</strong><small>Work management</small></div>
240
204
  </div>
241
- <div class="integration-tags">
242
- <span class="integration-tag oauth">OAuth</span
243
- ><span class="integration-tag ready">Ready</span>
244
- </div>
245
205
  </div>
246
206
  <div class="integration-card">
247
207
  <div class="integration-head">
248
- <span class="integration-mark webflow">W</span>
208
+ <span class="integration-mark"
209
+ ><img src="/integration-logos/webflow.svg" alt=""
210
+ /></span>
249
211
  <div><strong>Webflow</strong><small>Websites &amp; CMS</small></div>
250
212
  </div>
251
- <div class="integration-tags">
252
- <span class="integration-tag oauth">OAuth</span
253
- ><span class="integration-tag ready">Ready</span>
254
- </div>
255
213
  </div>
256
214
  <div class="integration-card">
257
215
  <div class="integration-head">
258
- <span class="integration-mark paypal">PP</span>
216
+ <span class="integration-mark"
217
+ ><img src="/integration-logos/paypal.svg" alt=""
218
+ /></span>
259
219
  <div><strong>PayPal</strong><small>Commerce &amp; invoices</small></div>
260
220
  </div>
261
- <div class="integration-tags">
262
- <span class="integration-tag oauth">OAuth</span
263
- ><span class="integration-tag ready">Ready</span>
264
- </div>
265
221
  </div>
266
222
  <div class="integration-card">
267
223
  <div class="integration-head">
268
- <span class="integration-mark box">B</span>
224
+ <span class="integration-mark"
225
+ ><img src="/integration-logos/box.svg" alt=""
226
+ /></span>
269
227
  <div><strong>Box</strong><small>Files &amp; folders</small></div>
270
228
  </div>
271
- <div class="integration-tags">
272
- <span class="integration-tag manual">Manual setup</span
273
- ><span class="integration-tag restricted">Beta / restricted</span>
274
- </div>
275
229
  </div>
276
230
  <div class="integration-card">
277
231
  <div class="integration-head">
278
- <span class="integration-mark netlify">N</span>
232
+ <span class="integration-mark"
233
+ ><img src="/integration-logos/netlify.svg" alt=""
234
+ /></span>
279
235
  <div><strong>Netlify</strong><small>Sites &amp; builds</small></div>
280
236
  </div>
281
- <div class="integration-tags">
282
- <span class="integration-tag oauth">OAuth</span
283
- ><span class="integration-tag ready">Ready</span>
284
- </div>
285
237
  </div>
286
238
  <div class="integration-card">
287
239
  <div class="integration-head">
288
- <span class="integration-mark zapier">Z</span>
240
+ <span class="integration-mark"
241
+ ><img src="/integration-logos/zapier.svg" alt=""
242
+ /></span>
289
243
  <div><strong>Zapier</strong><small>Automation actions</small></div>
290
244
  </div>
291
- <div class="integration-tags">
292
- <span class="integration-tag token">Header / token</span
293
- ><span class="integration-tag restricted">User server</span>
294
- </div>
295
245
  </div>
296
246
  </div>
297
247
  ```
@@ -304,9 +254,8 @@ shipped MCP preset categories documented below.
304
254
  }
305
255
  .integration-card {
306
256
  display: flex;
307
- flex-direction: column;
308
- gap: 12px;
309
- min-height: 118px;
257
+ align-items: center;
258
+ min-height: 70px;
310
259
  padding: 14px;
311
260
  border: 1px solid var(--wf-line);
312
261
  border-radius: 12px;
@@ -343,128 +292,13 @@ shipped MCP preset categories documented below.
343
292
  height: 38px;
344
293
  flex: none;
345
294
  border-radius: 10px;
346
- color: #fff;
347
- font-size: 11px;
348
- font-weight: 800;
349
- letter-spacing: -0.04em;
350
- }
351
- .c7 {
352
- background: #1f6feb;
353
- }
354
- .sentry {
355
- background: #5b35d5;
356
- }
357
- .notion {
358
- background: #111;
359
- }
360
- .semgrep {
361
- background: #0d8b76;
362
- }
363
- .linear {
364
- background: #5e5ce6;
365
- }
366
- .atlassian {
367
- background: #1868db;
368
- }
369
- .supabase {
370
- background: #3ecf8e;
371
- color: #062b1a;
372
- }
373
- .neon {
374
- background: #00e5a0;
375
- color: #062b1a;
376
- }
377
- .stripe {
378
- background: #635bff;
379
- }
380
- .cloudflare {
381
- background: #f38020;
382
- }
383
- .gitlab {
384
- background: #fc6d26;
385
- }
386
- .figma {
387
- background: #f24e1e;
388
- }
389
- .canva {
390
- background: #00c4cc;
391
- color: #053b40;
392
- }
393
- .vercel {
394
- background: #111;
395
- }
396
- .github {
397
- background: #24292f;
398
- }
399
- .slack {
400
- background: #36c5f0;
401
- color: #082c3b;
402
- }
403
- .asana {
404
- background: #f06a6a;
405
- }
406
- .hubspot {
407
- background: #ff7a59;
408
- }
409
- .intercom {
410
- background: #286efa;
411
- }
412
- .monday {
413
- background: #6161ff;
414
- }
415
- .webflow {
416
- background: #146ef5;
417
- }
418
- .paypal {
419
- background: #003087;
420
- }
421
- .box {
422
- background: #0061d5;
423
- }
424
- .netlify {
425
- background: #05bdbb;
426
- color: #062b2b;
427
- }
428
- .zapier {
429
- background: #ff4f00;
430
- }
431
- .integration-tags {
432
- display: flex;
433
- flex-wrap: wrap;
434
- gap: 5px;
435
- margin-top: auto;
436
- }
437
- .integration-tag {
438
- padding: 4px 7px;
439
- border-radius: 999px;
440
- background: var(--wf-line);
441
- color: var(--wf-muted);
442
- font-size: 10px;
443
- line-height: 1;
444
- }
445
- .integration-tag.oauth {
446
- background: #e8e7ff;
447
- color: #4438a8;
448
- }
449
- .integration-tag.manual {
450
- background: #fff0d6;
451
- color: #8a5200;
452
- }
453
- .integration-tag.token {
454
- background: #e5f3ff;
455
- color: #075985;
456
- }
457
- .integration-tag.direct {
458
- background: #e1f7ee;
459
- color: #146c4b;
460
- }
461
- .integration-tag.ready {
462
- background: #e1f7ee;
463
- color: #146c4b;
295
+ background: #fff;
296
+ box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.08);
464
297
  }
465
- .integration-tag.restricted {
466
- background: #ffe4e6;
467
- color: #9f1239;
298
+ .integration-mark img {
299
+ width: 26px;
300
+ height: 26px;
301
+ object-fit: contain;
468
302
  }
469
303
  @media (max-width: 760px) {
470
304
  .integration-wall {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agent-native/core",
3
- "version": "0.109.1",
3
+ "version": "0.109.2",
4
4
  "description": "Framework for agent-native application development — where AI agents and UI share SQL state, actions, and context",
5
5
  "homepage": "https://github.com/BuilderIO/agent-native#readme",
6
6
  "bugs": {
@@ -44,6 +44,8 @@ export interface DiagramData {
44
44
  */
45
45
  html?: string;
46
46
  css?: string;
47
+ /** `design` forces clean HTML/CSS rendering without the sketch overlay. */
48
+ renderMode?: "wireframe" | "design";
47
49
  caption?: string;
48
50
  /** Outer surface frame. `auto` lets the host choose the right default. */
49
51
  frame?: BlockVisualFrame;
@@ -147,6 +149,7 @@ export const diagramSchema = z
147
149
  message: "Diagram css must not include document or script tags.",
148
150
  })
149
151
  .optional(),
152
+ renderMode: z.enum(["wireframe", "design"]).optional(),
150
153
  caption: z.string().trim().max(600).optional(),
151
154
  frame: visualFrameSchema.optional(),
152
155
  nodes: z.array(diagramNodeSchema).max(80).optional(),
@@ -173,7 +176,7 @@ function graphDataForAttr(data: DiagramData): DiagramData | undefined {
173
176
  if (data.notes?.length) graph.notes = data.notes;
174
177
  if (Object.keys(graph).length > 0) return graph;
175
178
  if (hasChildFenceData(data)) return undefined;
176
- const { frame: _frame, ...dataForAttr } = data;
179
+ const { frame: _frame, renderMode: _renderMode, ...dataForAttr } = data;
177
180
  return Object.keys(dataForAttr).length > 0 ? dataForAttr : undefined;
178
181
  }
179
182
 
@@ -193,6 +196,7 @@ export const diagramMdx: BlockMdxConfig<DiagramData> = {
193
196
  | undefined,
194
197
  caption: data.caption,
195
198
  frame: data.frame,
199
+ renderMode: data.renderMode,
196
200
  }),
197
201
  fromAttrs: (attrs) => ({
198
202
  ...(attrs.object<DiagramData>("data") ?? {}),
@@ -202,6 +206,11 @@ export const diagramMdx: BlockMdxConfig<DiagramData> = {
202
206
  ...(attrs.string("frame") !== undefined
203
207
  ? { frame: attrs.string("frame") as BlockVisualFrame }
204
208
  : {}),
209
+ ...(attrs.string("renderMode") !== undefined
210
+ ? {
211
+ renderMode: attrs.string("renderMode") as DiagramData["renderMode"],
212
+ }
213
+ : {}),
205
214
  }),
206
215
  serializeChildren: (data) =>
207
216
  serializeChildCodeFenceFields(data, { html: "html", css: "css" }),
@@ -88,7 +88,9 @@ function HtmlDiagram({
88
88
  }) {
89
89
  const ref = useRef<HTMLDivElement>(null);
90
90
  const isDark = useIsDark();
91
- const style = useWireframeStyle();
91
+ const preferredStyle = useWireframeStyle();
92
+ const designMode = data.renderMode === "design";
93
+ const style = designMode ? "clean" : preferredStyle;
92
94
  const showFrame = resolveVisualFrame(data.frame, ctx);
93
95
  const scopeId = useId().replace(/[^a-zA-Z0-9_-]/g, "");
94
96
  // Sanitize author HTML/CSS at the render point (defense-in-depth against
@@ -127,7 +129,7 @@ function HtmlDiagram({
127
129
  </div>
128
130
  <RoughOverlay
129
131
  scopeRef={ref}
130
- enabled={style === "sketchy"}
132
+ enabled={!designMode && style === "sketchy"}
131
133
  drawFrame={showFrame}
132
134
  selector={DIAGRAM_ROUGH_SELECTOR}
133
135
  />
@@ -650,7 +652,8 @@ function ExpandableDiagramBody({
650
652
  compact?: boolean;
651
653
  }) {
652
654
  const [expanded, setExpanded] = useState(false);
653
- const supportsStyleToggle = Boolean(data.html);
655
+ const designMode = data.renderMode === "design";
656
+ const supportsStyleToggle = Boolean(data.html) && !designMode;
654
657
  const style = useWireframeStyle();
655
658
  const copy = useBlockCopy();
656
659
  const sketchy = style === "sketchy";
@@ -794,7 +797,9 @@ export function DiagramEdit({
794
797
  onChange({
795
798
  html: html.trim() || undefined,
796
799
  css: css.trim() || undefined,
800
+ renderMode: data.renderMode,
797
801
  caption: caption.trim() || undefined,
802
+ frame: data.frame,
798
803
  nodes: data.nodes,
799
804
  edges: data.edges,
800
805
  notes: data.notes,
@@ -946,7 +951,7 @@ export const diagramBlock = defineBlock<DiagramData>({
946
951
  editSurface: "panel",
947
952
  label: "Diagram",
948
953
  description:
949
- "A flexible inline architecture/code diagram. Prefer html/css with SVG or semantic HTML for polished two-dimensional layouts; use .diagram-* primitives and --wf-* tokens for theme/sketch compatibility. Legacy nodes/edges are only for simple previews.",
954
+ "A flexible inline architecture/code diagram. Prefer html/css with SVG or semantic HTML for polished two-dimensional layouts; use renderMode design for clean presentation or .diagram-* primitives and --wf-* tokens for theme/sketch compatibility. Legacy nodes/edges are only for simple previews.",
950
955
  // Seed the legacy fallback shape so a fresh block validates while agents can
951
956
  // replace it with html/css when layout quality matters.
952
957
  empty: () => ({ nodes: [{ id: "n1", label: "Module" }], edges: [] }),