Commit d76d316
Resizable prompt node + public OpenAPI spec for v1 routes
prompt-node:
- Add @xyflow/react NodeResizer (visible when selected) so users can
drag the node within 220–600 wide / 120–600 tall.
- Track the typed `/` position in domToText coordinates via a new
caretDomTextOffset helper. The previous saveCaretPos counted ZWS
chars and pill labels, which diverged from domToText whenever the
text contained pills or BR-driven newlines, breaking the slash menu
when the prompt also held other `/` characters (e.g. JSON paths).
- insertReference, the menuFilter computation, and the Backspace
handler all use the new offset, so the typed slash is unambiguous.
server: split the API surface so the public spec can never include
internal routes by accident. A new publicApp (OpenAPIHono) holds the
two v1 endpoints (list workflows, execute workflow) as createRoute +
publicApp.openapi(...) registrations with full Zod request/response
schemas. publicApp is mounted at root via app.route("/", publicApp)
and its routes carry their /api/v1/... path explicitly, so paths in
the spec match real URLs without a `servers` indirection (some agent
renderers strip `servers`). The doc is served at /api/v1/openapi.json
and mirrored at /openapi.json from the main app via
publicApp.getOpenAPIDocument(...) so dashboards using the conventional
root path also find it. The old internal app.doc(...) is removed —
internal routes have nowhere to leak into a public spec.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent 663ebe1 commit d76d316
2 files changed
Lines changed: 163 additions & 21 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
| 2 | + | |
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | | - | |
| 10 | + | |
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| |||
72 | 72 | | |
73 | 73 | | |
74 | 74 | | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
75 | 130 | | |
76 | 131 | | |
77 | 132 | | |
| |||
115 | 170 | | |
116 | 171 | | |
117 | 172 | | |
118 | | - | |
| 173 | + | |
119 | 174 | | |
120 | 175 | | |
121 | 176 | | |
| |||
222 | 277 | | |
223 | 278 | | |
224 | 279 | | |
225 | | - | |
226 | | - | |
227 | | - | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
228 | 284 | | |
229 | 285 | | |
230 | | - | |
| 286 | + | |
231 | 287 | | |
232 | 288 | | |
233 | 289 | | |
| |||
253 | 309 | | |
254 | 310 | | |
255 | 311 | | |
256 | | - | |
257 | | - | |
| 312 | + | |
| 313 | + | |
258 | 314 | | |
259 | 315 | | |
260 | 316 | | |
| |||
270 | 326 | | |
271 | 327 | | |
272 | 328 | | |
273 | | - | |
| 329 | + | |
274 | 330 | | |
275 | 331 | | |
276 | 332 | | |
| |||
295 | 351 | | |
296 | 352 | | |
297 | 353 | | |
298 | | - | |
| 354 | + | |
299 | 355 | | |
300 | 356 | | |
301 | 357 | | |
| |||
306 | 362 | | |
307 | 363 | | |
308 | 364 | | |
309 | | - | |
| 365 | + | |
| 366 | + | |
| 367 | + | |
| 368 | + | |
| 369 | + | |
| 370 | + | |
| 371 | + | |
| 372 | + | |
| 373 | + | |
| 374 | + | |
310 | 375 | | |
311 | 376 | | |
312 | 377 | | |
313 | 378 | | |
314 | 379 | | |
315 | 380 | | |
316 | 381 | | |
317 | | - | |
| 382 | + | |
318 | 383 | | |
319 | 384 | | |
320 | 385 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
8 | 12 | | |
9 | 13 | | |
10 | 14 | | |
| |||
452 | 456 | | |
453 | 457 | | |
454 | 458 | | |
455 | | - | |
| 459 | + | |
456 | 460 | | |
457 | | - | |
| 461 | + | |
| 462 | + | |
| 463 | + | |
| 464 | + | |
| 465 | + | |
| 466 | + | |
| 467 | + | |
| 468 | + | |
| 469 | + | |
| 470 | + | |
| 471 | + | |
| 472 | + | |
| 473 | + | |
| 474 | + | |
| 475 | + | |
| 476 | + | |
| 477 | + | |
| 478 | + | |
| 479 | + | |
| 480 | + | |
| 481 | + | |
| 482 | + | |
| 483 | + | |
| 484 | + | |
| 485 | + | |
| 486 | + | |
| 487 | + | |
| 488 | + | |
| 489 | + | |
| 490 | + | |
| 491 | + | |
| 492 | + | |
| 493 | + | |
| 494 | + | |
| 495 | + | |
| 496 | + | |
458 | 497 | | |
459 | 498 | | |
460 | 499 | | |
| |||
474 | 513 | | |
475 | 514 | | |
476 | 515 | | |
477 | | - | |
| 516 | + | |
| 517 | + | |
| 518 | + | |
| 519 | + | |
| 520 | + | |
| 521 | + | |
| 522 | + | |
| 523 | + | |
| 524 | + | |
| 525 | + | |
| 526 | + | |
| 527 | + | |
| 528 | + | |
| 529 | + | |
| 530 | + | |
| 531 | + | |
| 532 | + | |
| 533 | + | |
| 534 | + | |
| 535 | + | |
| 536 | + | |
| 537 | + | |
| 538 | + | |
| 539 | + | |
| 540 | + | |
478 | 541 | | |
479 | | - | |
480 | | - | |
| 542 | + | |
| 543 | + | |
481 | 544 | | |
482 | 545 | | |
483 | 546 | | |
| |||
486 | 549 | | |
487 | 550 | | |
488 | 551 | | |
489 | | - | |
| 552 | + | |
490 | 553 | | |
491 | 554 | | |
492 | 555 | | |
| |||
666 | 729 | | |
667 | 730 | | |
668 | 731 | | |
669 | | - | |
| 732 | + | |
| 733 | + | |
| 734 | + | |
| 735 | + | |
| 736 | + | |
| 737 | + | |
| 738 | + | |
| 739 | + | |
| 740 | + | |
| 741 | + | |
| 742 | + | |
| 743 | + | |
| 744 | + | |
670 | 745 | | |
671 | | - | |
| 746 | + | |
| 747 | + | |
| 748 | + | |
672 | 749 | | |
673 | 750 | | |
0 commit comments