@flowdrop/flowdrop 2.9.0 → 2.10.1

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 (92) hide show
  1. package/CHANGELOG.md +200 -0
  2. package/dist/commands/executor.js +52 -8
  3. package/dist/commands/types.d.ts +3 -0
  4. package/dist/components/App.svelte +8 -0
  5. package/dist/components/App.svelte.d.ts +6 -0
  6. package/dist/components/CanvasContextMenu.stories.svelte +63 -0
  7. package/dist/components/CanvasContextMenu.stories.svelte.d.ts +19 -0
  8. package/dist/components/CanvasContextMenu.svelte +259 -0
  9. package/dist/components/CanvasContextMenu.svelte.d.ts +16 -0
  10. package/dist/components/CanvasController.svelte +24 -2
  11. package/dist/components/CanvasController.svelte.d.ts +16 -0
  12. package/dist/components/EdgeRefresher.svelte +1 -1
  13. package/dist/components/FlowDropZone.svelte +11 -7
  14. package/dist/components/FlowDropZone.svelte.d.ts +12 -0
  15. package/dist/components/PortCoordinateTracker.svelte +1 -1
  16. package/dist/components/UniversalNode.svelte +12 -13
  17. package/dist/components/WorkflowEditor.svelte +486 -149
  18. package/dist/components/WorkflowEditor.svelte.d.ts +7 -0
  19. package/dist/components/WorkflowInterfaceEditor.svelte +28 -3
  20. package/dist/components/WorkflowInterfaceEntryCard.svelte +112 -2
  21. package/dist/components/WorkflowInterfaceEntryCard.svelte.d.ts +3 -1
  22. package/dist/components/nodes/CaptionNode.stories.svelte +65 -0
  23. package/dist/components/nodes/CaptionNode.stories.svelte.d.ts +18 -0
  24. package/dist/components/nodes/CaptionNode.svelte +313 -0
  25. package/dist/components/nodes/CaptionNode.svelte.d.ts +16 -0
  26. package/dist/components/nodes/NotesNode.svelte +6 -0
  27. package/dist/components/playground/ChatBubble.svelte +2 -0
  28. package/dist/components/playground/ChatInput.svelte +18 -34
  29. package/dist/components/playground/ChatInput.svelte.d.ts +7 -0
  30. package/dist/components/playground/ControlPanel.svelte +27 -0
  31. package/dist/components/playground/ControlPanel.svelte.d.ts +12 -0
  32. package/dist/components/playground/ExecutionLogs.svelte +11 -8
  33. package/dist/components/playground/InterfaceInputForm.svelte +74 -0
  34. package/dist/components/playground/InterfaceInputForm.svelte.d.ts +14 -0
  35. package/dist/components/playground/LogRow.svelte +2 -0
  36. package/dist/components/playground/MessageCard.svelte +15 -3
  37. package/dist/components/playground/MessageNotice.svelte +2 -0
  38. package/dist/components/playground/MessageStream.svelte +87 -23
  39. package/dist/components/playground/OriginBadge.svelte +48 -0
  40. package/dist/components/playground/OriginBadge.svelte.d.ts +7 -0
  41. package/dist/components/playground/Playground.svelte +155 -38
  42. package/dist/components/playground/messageDisplay.d.ts +23 -1
  43. package/dist/components/playground/messageDisplay.js +49 -0
  44. package/dist/config/endpoints.d.ts +65 -0
  45. package/dist/config/endpoints.js +39 -0
  46. package/dist/core/index.d.ts +6 -3
  47. package/dist/core/index.js +2 -1
  48. package/dist/editor/contextMenu.d.ts +107 -0
  49. package/dist/editor/contextMenu.js +134 -0
  50. package/dist/editor/index.d.ts +2 -0
  51. package/dist/editor/index.js +1 -0
  52. package/dist/index.d.ts +1 -1
  53. package/dist/index.js +1 -1
  54. package/dist/messages/defaults.d.ts +63 -0
  55. package/dist/messages/defaults.js +59 -0
  56. package/dist/openapi/v1/openapi.yaml +356 -7
  57. package/dist/playground/commands/registry.js +4 -2
  58. package/dist/playground/index.d.ts +3 -2
  59. package/dist/playground/index.js +2 -1
  60. package/dist/registry/builtinNodeTypes.d.ts +1 -1
  61. package/dist/registry/builtinNodeTypes.js +1 -0
  62. package/dist/registry/builtinNodes.js +13 -0
  63. package/dist/registry/nodeComponentRegistry.d.ts +18 -0
  64. package/dist/registry/nodeComponentRegistry.js +14 -2
  65. package/dist/schemas/v1/workflow.schema.json +22 -1
  66. package/dist/services/historyService.d.ts +1 -1
  67. package/dist/services/historyService.js +2 -2
  68. package/dist/services/playgroundService.d.ts +35 -1
  69. package/dist/services/playgroundService.js +82 -36
  70. package/dist/stores/inlineEditStore.svelte.d.ts +35 -0
  71. package/dist/stores/inlineEditStore.svelte.js +63 -0
  72. package/dist/stores/instanceContainer.svelte.d.ts +6 -0
  73. package/dist/stores/instanceContainer.svelte.js +2 -0
  74. package/dist/stores/playgroundStore.svelte.d.ts +59 -2
  75. package/dist/stores/playgroundStore.svelte.js +128 -2
  76. package/dist/styles/base.css +8 -0
  77. package/dist/styles/tokens.css +8 -0
  78. package/dist/svelte-app.d.ts +15 -0
  79. package/dist/svelte-app.js +6 -4
  80. package/dist/types/index.d.ts +34 -1
  81. package/dist/types/index.js +11 -0
  82. package/dist/types/playground.d.ts +90 -9
  83. package/dist/types/playground.js +12 -4
  84. package/dist/utils/captionText.d.ts +43 -0
  85. package/dist/utils/captionText.js +49 -0
  86. package/dist/utils/focus.d.ts +16 -0
  87. package/dist/utils/focus.js +40 -0
  88. package/dist/utils/nodeTypes.js +1 -0
  89. package/dist/utils/nodeWrapper.js +2 -0
  90. package/dist/utils/workflowInterface.d.ts +83 -1
  91. package/dist/utils/workflowInterface.js +192 -1
  92. package/package.json +2 -2
@@ -57,6 +57,11 @@ tags:
57
57
  description: Pipeline execution and monitoring
58
58
  - name: Playground
59
59
  description: Interactive workflow testing and chat interface
60
+ - name: Sessions
61
+ description: |
62
+ One session's own surface: read, delete, page messages, take a turn,
63
+ stop, reset. Servers that predate it serve these under
64
+ `/playground/sessions/*`.
60
65
  - name: Interrupts
61
66
  description: |
62
67
  Human-in-the-Loop (HITL) interrupt endpoints for workflow interactions.
@@ -1552,6 +1557,11 @@ paths:
1552
1557
  Messages are processed in sequence order within a session to ensure proper
1553
1558
  conversation flow. If a previous message is not yet complete, the request
1554
1559
  will be rejected with a conflict error.
1560
+
1561
+ Servers with the session surface serve the same turn at
1562
+ `POST /sessions/{sessionId}/turn` (which answers with a turn result
1563
+ instead of the message row) and keep this path as an alias for one minor.
1564
+ `content` is optional there and here: see `PlaygroundMessageRequest`.
1555
1565
  tags:
1556
1566
  - Playground
1557
1567
  parameters:
@@ -1573,6 +1583,11 @@ paths:
1573
1583
  summary: Simple chat message
1574
1584
  value:
1575
1585
  content: Hello, can you help me analyze this data?
1586
+ formOnly:
1587
+ summary: Inputs only, for a workflow with no message port
1588
+ value:
1589
+ inputs:
1590
+ topic: cats
1576
1591
  withInputs:
1577
1592
  summary: Message with additional inputs
1578
1593
  value:
@@ -1736,6 +1751,221 @@ paths:
1736
1751
  $ref: '#/components/schemas/ErrorResponse'
1737
1752
  '500':
1738
1753
  $ref: '#/components/responses/InternalServerError'
1754
+ /sessions/{sessionId}:
1755
+ get:
1756
+ operationId: getSession
1757
+ summary: Get session details
1758
+ description: The session, its status and its executions.
1759
+ tags:
1760
+ - Sessions
1761
+ parameters:
1762
+ - name: sessionId
1763
+ in: path
1764
+ description: Session UUID
1765
+ required: true
1766
+ schema:
1767
+ type: string
1768
+ format: uuid
1769
+ responses:
1770
+ '200':
1771
+ description: Session details
1772
+ content:
1773
+ application/json:
1774
+ schema:
1775
+ $ref: '#/components/schemas/PlaygroundSessionResponse'
1776
+ '404':
1777
+ $ref: '#/components/responses/NotFound'
1778
+ delete:
1779
+ operationId: deleteSession
1780
+ summary: Delete a session
1781
+ description: Permanently delete a session and all its messages.
1782
+ tags:
1783
+ - Sessions
1784
+ parameters:
1785
+ - name: sessionId
1786
+ in: path
1787
+ description: Session UUID
1788
+ required: true
1789
+ schema:
1790
+ type: string
1791
+ format: uuid
1792
+ responses:
1793
+ '200':
1794
+ description: Session deleted
1795
+ content:
1796
+ application/json:
1797
+ schema:
1798
+ $ref: '#/components/schemas/ApiResponse'
1799
+ '404':
1800
+ $ref: '#/components/responses/NotFound'
1801
+ /sessions/{sessionId}/messages:
1802
+ get:
1803
+ operationId: listSessionMessages
1804
+ summary: Page a session's messages
1805
+ description: |
1806
+ Same query parameters and response as
1807
+ `GET /playground/sessions/{sessionId}/messages`: `since` (forward
1808
+ cursor, polling), `before` (backward cursor, scroll-up), `latest`
1809
+ (newest page) and `limit`.
1810
+ tags:
1811
+ - Sessions
1812
+ parameters:
1813
+ - name: sessionId
1814
+ in: path
1815
+ description: Session UUID
1816
+ required: true
1817
+ schema:
1818
+ type: string
1819
+ format: uuid
1820
+ - name: since
1821
+ in: query
1822
+ required: false
1823
+ schema:
1824
+ type: integer
1825
+ minimum: 0
1826
+ - name: before
1827
+ in: query
1828
+ required: false
1829
+ schema:
1830
+ type: integer
1831
+ minimum: 0
1832
+ - name: latest
1833
+ in: query
1834
+ required: false
1835
+ schema:
1836
+ type: boolean
1837
+ default: false
1838
+ - name: limit
1839
+ in: query
1840
+ required: false
1841
+ schema:
1842
+ type: integer
1843
+ minimum: 1
1844
+ maximum: 100
1845
+ default: 50
1846
+ responses:
1847
+ '200':
1848
+ description: A page of messages
1849
+ content:
1850
+ application/json:
1851
+ schema:
1852
+ $ref: '#/components/schemas/PlaygroundMessagesResponse'
1853
+ '404':
1854
+ $ref: '#/components/responses/NotFound'
1855
+ /sessions/{sessionId}/turn:
1856
+ post:
1857
+ operationId: takeSessionTurn
1858
+ summary: Take a turn
1859
+ description: |
1860
+ Post the person's message and/or named inputs and run the session's
1861
+ workflow on them. Answers 202 with a turn result, not the user's message
1862
+ row (which `POST /playground/sessions/{sessionId}/messages` returns); the
1863
+ row arrives through the messages endpoint.
1864
+ tags:
1865
+ - Sessions
1866
+ parameters:
1867
+ - name: sessionId
1868
+ in: path
1869
+ description: Session UUID
1870
+ required: true
1871
+ schema:
1872
+ type: string
1873
+ format: uuid
1874
+ requestBody:
1875
+ required: true
1876
+ content:
1877
+ application/json:
1878
+ schema:
1879
+ $ref: '#/components/schemas/PlaygroundMessageRequest'
1880
+ examples:
1881
+ chat:
1882
+ summary: A chat turn
1883
+ value:
1884
+ content: Hello, can you help me analyze this data?
1885
+ form:
1886
+ summary: A form-only workflow's turn
1887
+ value:
1888
+ inputs:
1889
+ topic: cats
1890
+ responses:
1891
+ '202':
1892
+ description: Turn accepted
1893
+ content:
1894
+ application/json:
1895
+ schema:
1896
+ $ref: '#/components/schemas/SessionTurnResponse'
1897
+ '400':
1898
+ description: |
1899
+ Malformed body, inputs the workflow does not declare, or `content`
1900
+ sent to a workflow with no `message` port (the message names the fix).
1901
+ content:
1902
+ application/json:
1903
+ schema:
1904
+ $ref: '#/components/schemas/ErrorResponse'
1905
+ '404':
1906
+ $ref: '#/components/responses/NotFound'
1907
+ '409':
1908
+ description: A turn is already running, or the session has no workflow
1909
+ content:
1910
+ application/json:
1911
+ schema:
1912
+ $ref: '#/components/schemas/ErrorResponse'
1913
+ /sessions/{sessionId}/stop:
1914
+ post:
1915
+ operationId: stopSessionTurn
1916
+ summary: Stop the running turn
1917
+ description: Cancels the session's running pipeline and sets the session idle.
1918
+ tags:
1919
+ - Sessions
1920
+ parameters:
1921
+ - name: sessionId
1922
+ in: path
1923
+ description: Session UUID
1924
+ required: true
1925
+ schema:
1926
+ type: string
1927
+ format: uuid
1928
+ responses:
1929
+ '200':
1930
+ description: Stopped
1931
+ content:
1932
+ application/json:
1933
+ schema:
1934
+ $ref: '#/components/schemas/ApiResponse'
1935
+ '404':
1936
+ $ref: '#/components/responses/NotFound'
1937
+ '409':
1938
+ description: No turn is running
1939
+ content:
1940
+ application/json:
1941
+ schema:
1942
+ $ref: '#/components/schemas/ErrorResponse'
1943
+ /sessions/{sessionId}/reset:
1944
+ post:
1945
+ operationId: resetSession
1946
+ summary: Reset a stuck session to idle
1947
+ description: |
1948
+ Cancels pending messages and clears interrupt state. Optional: a server
1949
+ without it omits the path, and clients leave `sessions.reset` unset.
1950
+ tags:
1951
+ - Sessions
1952
+ parameters:
1953
+ - name: sessionId
1954
+ in: path
1955
+ description: Session UUID
1956
+ required: true
1957
+ schema:
1958
+ type: string
1959
+ format: uuid
1960
+ responses:
1961
+ '200':
1962
+ description: Reset
1963
+ content:
1964
+ application/json:
1965
+ schema:
1966
+ $ref: '#/components/schemas/ApiResponse'
1967
+ '404':
1968
+ $ref: '#/components/responses/NotFound'
1739
1969
  /workflows/{id}/chat/messages:
1740
1970
  post:
1741
1971
  operationId: sendChatMessage
@@ -4071,6 +4301,15 @@ components:
4071
4301
 
4072
4302
  Keys under the `fd.` prefix are reserved for future library use — consumers
4073
4303
  must not write keys starting with `fd.`.
4304
+
4305
+ One exception, owned by `turn`: on a `history` entry, `limit` (a positive
4306
+ integer, default 10) is how many past user and assistant messages the
4307
+ session fills the port with. The interface editor writes that one key.
4308
+ turn:
4309
+ $ref: '#/components/schemas/WorkflowInterfaceTurn'
4310
+ description: |
4311
+ What this port is for in a chat turn. Absent means the port plays no part
4312
+ in a turn. Validated by the server against its vocabulary.
4074
4313
  required:
4075
4314
  - id
4076
4315
  - dataType
@@ -4547,6 +4786,11 @@ components:
4547
4786
  description: |
4548
4787
  Optional layout hint. When omitted, the client picks a default
4549
4788
  based on the message role.
4789
+ origin:
4790
+ $ref: '#/components/schemas/PlaygroundMessageOrigin'
4791
+ description: |
4792
+ Which component posted the message. Always present on current
4793
+ servers; absent from older ones.
4550
4794
  metadata:
4551
4795
  type: object
4552
4796
  properties:
@@ -4617,18 +4861,25 @@ components:
4617
4861
  - required
4618
4862
  PlaygroundMessageRequest:
4619
4863
  type: object
4620
- description: Request body for sending a message to the playground
4864
+ description: |
4865
+ Request body for a turn: the person's message, named inputs, or both.
4866
+
4867
+ `content` fills the input port whose interface entry has `turn: message`.
4868
+ A workflow that declares turn ports but no `message` port is form-only:
4869
+ it runs on `inputs` alone and the server refuses `content` with a 400
4870
+ whose message names the fix. A workflow that declares no turn port at all
4871
+ keeps the server's older behaviour (deprecated) and still needs `content`.
4621
4872
  properties:
4622
4873
  content:
4623
4874
  type: string
4624
- description: Message content (typically user input)
4875
+ description: The person's message
4625
4876
  maxLength: 10000
4626
4877
  inputs:
4627
4878
  type: object
4628
4879
  additionalProperties: true
4629
- description: Additional input values for workflow nodes
4630
- required:
4631
- - content
4880
+ description: |
4881
+ Named inputs, keyed by interface entry name. Ports with a `turn` are
4882
+ filled by the session and are not sent here.
4632
4883
  PlaygroundSessionResponse:
4633
4884
  allOf:
4634
4885
  - $ref: '#/components/schemas/ApiResponse'
@@ -6296,6 +6547,26 @@ components:
6296
6547
  name: country
6297
6548
  type: string
6298
6549
  label: Country
6550
+ WorkflowInterfaceTurn:
6551
+ type: string
6552
+ enum:
6553
+ - message
6554
+ - history
6555
+ - session_id
6556
+ - message_id
6557
+ - reply
6558
+ description: |
6559
+ The chat-turn vocabulary of an interface port.
6560
+
6561
+ Inputs — at most one entry per value:
6562
+ - `message` — the person's message (the turn's content), a string
6563
+ - `history` — past user and assistant messages, bounded by `meta.limit`
6564
+ (default 10)
6565
+ - `session_id` — the session's id
6566
+ - `message_id` — the id of the person's message
6567
+
6568
+ Outputs — any number:
6569
+ - `reply` — each value becomes one assistant message
6299
6570
  KanbanColumnDef:
6300
6571
  type: object
6301
6572
  properties:
@@ -6420,23 +6691,101 @@ components:
6420
6691
  PlaygroundMessageDisplay:
6421
6692
  type: string
6422
6693
  enum:
6694
+ - default
6423
6695
  - bubble
6424
6696
  - log
6425
6697
  - notice
6426
6698
  - card
6699
+ - hidden
6427
6700
  description: |
6428
- Layout hint chosen by the server. When omitted, the client defaults
6429
- from the role:
6701
+ Layout hint chosen by the server. When omitted (or `default`), the
6702
+ client defaults from the role:
6430
6703
  - `log` → `log`
6431
6704
  - `system` (with compactSystemMessages enabled) → `notice`
6432
6705
  - everything else → `bubble`
6433
6706
 
6434
6707
  Layouts:
6708
+ - `default` — no hint; same as omitting the field
6435
6709
  - `bubble` — chat bubble with avatar, header, body, optional footer
6436
6710
  containing hierarchy + tags
6437
6711
  - `log` — one-liner: icon · hierarchy · body · tags · timestamp
6438
6712
  - `notice` — compact centered notice
6439
6713
  - `card` — vertical: hierarchy (top), body (middle), tags (bottom)
6714
+ - `hidden` — not rendered by default. Hidden is not private: the row
6715
+ is still delivered with the rest of the session. It hides noise,
6716
+ never secrets.
6717
+ PlaygroundMessageOrigin:
6718
+ type: string
6719
+ enum:
6720
+ - user
6721
+ - workflow
6722
+ - engine
6723
+ - playground
6724
+ - interrupt
6725
+ description: |
6726
+ Which component posted the message — the axis beside `role` (who spoke,
6727
+ conversationally) and `display` (how to render it).
6728
+ - `user` — a person typed it
6729
+ - `workflow` — the workflow produced it (a reply)
6730
+ - `engine` — the run machinery wrote it (trigger rows, failures,
6731
+ recovery, reporting rows)
6732
+ - `playground` — a console observer wrote it for its own viewers
6733
+ - `interrupt` — the interrupt system posted a question into the session
6734
+
6735
+ Servers that predate the field omit it; clients treat that as unknown.
6736
+ SessionTurnResult:
6737
+ type: object
6738
+ description: |
6739
+ Snapshot of a turn at the moment the request returned. The user's row,
6740
+ the assistant rows and later status changes arrive through the messages
6741
+ endpoint like those of any other turn.
6742
+ properties:
6743
+ sessionId:
6744
+ type: string
6745
+ userMessageId:
6746
+ type: string
6747
+ description: Id of the user's message row; also the turn's id
6748
+ pipelineId:
6749
+ type: string
6750
+ nullable: true
6751
+ description: The pipeline running the turn; null until it exists (queued turns)
6752
+ status:
6753
+ type: string
6754
+ enum:
6755
+ - queued
6756
+ - running
6757
+ - completed
6758
+ - awaiting_input
6759
+ - paused
6760
+ - failed
6761
+ assistantMessageIds:
6762
+ type: array
6763
+ items:
6764
+ type: string
6765
+ description: Assistant rows written during the turn; filled only when the server waited
6766
+ finalAssistantMessageId:
6767
+ type: string
6768
+ nullable: true
6769
+ finalAssistantMessage:
6770
+ type: string
6771
+ nullable: true
6772
+ artifacts:
6773
+ type: array
6774
+ items:
6775
+ type: object
6776
+ additionalProperties: true
6777
+ required:
6778
+ - sessionId
6779
+ - userMessageId
6780
+ - pipelineId
6781
+ - status
6782
+ SessionTurnResponse:
6783
+ allOf:
6784
+ - $ref: '#/components/schemas/ApiResponse'
6785
+ - type: object
6786
+ properties:
6787
+ data:
6788
+ $ref: '#/components/schemas/SessionTurnResult'
6440
6789
  AgentSpecNodeBase:
6441
6790
  type: object
6442
6791
  description: Base properties shared by all Agent Spec nodes
@@ -8,6 +8,7 @@
8
8
  *
9
9
  * @module playground/commands/registry
10
10
  */
11
+ import { resolveSessionEndpoint } from '../../config/endpoints.js';
11
12
  /**
12
13
  * Canonical command list. Order is the order shown by `/help`.
13
14
  *
@@ -30,7 +31,8 @@ export const COMMAND_NAMES = [
30
31
  *
31
32
  * `playground.stopExecution`, `createSession` and `deleteSession` are required
32
33
  * keys in {@link EndpointConfig}, so their commands are available whenever a
33
- * config exists at all. `resetSession` is optional — the one place where the
34
+ * config exists at all. Reset is optional (`playground.resetSession`, or
35
+ * `sessions.reset` when that group is configured) — the one place where the
34
36
  * "absence of an endpoint is absence of a command" rule currently bites.
35
37
  */
36
38
  const hasPlayground = (config) => config?.endpoints?.playground != null;
@@ -70,7 +72,7 @@ export const COMMAND_DESCRIPTORS = [
70
72
  {
71
73
  name: 'reset',
72
74
  takesArgs: false,
73
- isAvailable: (config) => hasPlayground(config) && config?.endpoints.playground.resetSession != null
75
+ isAvailable: (config) => config != null && hasPlayground(config) && resolveSessionEndpoint(config, 'reset') != null
74
76
  },
75
77
  {
76
78
  name: 'delete',
@@ -141,7 +141,8 @@ export { WorkflowLaunchService, workflowLaunchService, type LaunchResult, type L
141
141
  */
142
142
  export { PipelineSignalService, pipelineSignalService, type SignalType, type SignalResult, type SignalRefusal, type SendSignalOptions } from '../services/pipelineSignalService.js';
143
143
  export { PlaygroundStore } from '../stores/playgroundStore.svelte.js';
144
- export type { PlaygroundSession, PlaygroundMessage, PlaygroundInputField, PlaygroundMessageRequest, PlaygroundMessagesResult, PlaygroundConfig, PlaygroundMode, PlaygroundSessionStatus, PlaygroundMessageRole, PlaygroundMessageLevel, PlaygroundMessageMetadata, PlaygroundApiResponse, PlaygroundSessionsResponse, PlaygroundSessionResponse, PlaygroundMessageResponse, PlaygroundMessagesApiResponse, PlaygroundExecution } from '../types/playground.js';
144
+ export type { PlaygroundSession, PlaygroundMessage, PlaygroundInputField, PlaygroundMessageRequest, PlaygroundTurnResult, PlaygroundTurnResponse, PlaygroundMessagesResult, PlaygroundConfig, PlaygroundMode, PlaygroundSessionStatus, PlaygroundMessageRole, PlaygroundMessageLevel, PlaygroundMessageMetadata, PlaygroundMessageDisplay, ResolvedMessageDisplay, PlaygroundMessageOrigin, PlaygroundApiResponse, PlaygroundSessionsResponse, PlaygroundSessionResponse, PlaygroundMessageResponse, PlaygroundMessagesApiResponse, PlaygroundExecution } from '../types/playground.js';
145
+ export { resolvePlaygroundInputMode, interfaceFormEntries, interfaceFormSchema, collectInterfaceInputs, type InterfaceInputsResult, type PlaygroundInputMode } from '../utils/workflowInterface.js';
145
146
  export { isChatInputNode, CHAT_INPUT_PATTERNS, defaultShouldStopPolling, defaultIsTerminalStatus, DEFAULT_STOP_POLLING_STATUSES, DEFAULT_TERMINAL_STATUSES } from '../types/playground.js';
146
147
  export type { InterruptType, InterruptStatus, Interrupt, InterruptChoice, InterruptConfig, ConfirmationConfig, ChoiceConfig, TextConfig, FormConfig, ReviewConfig, ReviewChange, ReviewFieldDecision, ReviewResolution, InterruptResolution, InterruptApiResponse, InterruptListResponse, InterruptResponse, InterruptMessageMetadata, InterruptPollingConfig } from '../types/interrupt.js';
147
148
  export { isInterruptMetadata, extractInterruptMetadata, metadataToInterrupt, defaultInterruptPollingConfig } from '../types/interrupt.js';
@@ -149,7 +150,7 @@ export { InterruptStore } from '../stores/interruptStore.svelte.js';
149
150
  export type { InterruptWithState } from '../stores/interruptStore.svelte.js';
150
151
  export { mountPlayground, unmountPlayground, mountPlaygroundStudio, mountPlaygroundApp, type PlaygroundMountOptions, type PlaygroundStudioMountOptions, type PlaygroundAppMountOptions, type MountedPlayground } from './mount.js';
151
152
  export type { PipelineViewDef, PipelineViewProps } from '../types/index.js';
152
- export { createEndpointConfig, defaultEndpointConfig, buildEndpointUrl, type EndpointConfig } from '../config/endpoints.js';
153
+ export { createEndpointConfig, defaultEndpointConfig, sessionsEndpoints, resolveSessionEndpoint, buildEndpointUrl, type EndpointConfig, type SessionEndpointKey, type ResolvedSessionEndpoint } from '../config/endpoints.js';
153
154
  /**
154
155
  * The composer's out-of-band control lane. Exported so hosts can inspect what
155
156
  * is available against their configuration (`getAvailableCommands`) or reuse
@@ -159,6 +159,7 @@ export { PipelineSignalService, pipelineSignalService } from '../services/pipeli
159
159
  // Playground Store
160
160
  // ============================================================================
161
161
  export { PlaygroundStore } from '../stores/playgroundStore.svelte.js';
162
+ export { resolvePlaygroundInputMode, interfaceFormEntries, interfaceFormSchema, collectInterfaceInputs } from '../utils/workflowInterface.js';
162
163
  export { isChatInputNode, CHAT_INPUT_PATTERNS, defaultShouldStopPolling, defaultIsTerminalStatus, DEFAULT_STOP_POLLING_STATUSES, DEFAULT_TERMINAL_STATUSES } from '../types/playground.js';
163
164
  export { isInterruptMetadata, extractInterruptMetadata, metadataToInterrupt, defaultInterruptPollingConfig } from '../types/interrupt.js';
164
165
  // ============================================================================
@@ -172,7 +173,7 @@ export { mountPlayground, unmountPlayground, mountPlaygroundStudio, mountPlaygro
172
173
  // ============================================================================
173
174
  // Endpoint Configuration (re-exported for convenience)
174
175
  // ============================================================================
175
- export { createEndpointConfig, defaultEndpointConfig, buildEndpointUrl } from '../config/endpoints.js';
176
+ export { createEndpointConfig, defaultEndpointConfig, sessionsEndpoints, resolveSessionEndpoint, buildEndpointUrl } from '../config/endpoints.js';
176
177
  // ============================================================================
177
178
  // Slash Commands
178
179
  // ============================================================================
@@ -20,7 +20,7 @@ export declare const FLOWDROP_SOURCE = "flowdrop";
20
20
  * Type for built-in node types.
21
21
  * Use this when you specifically need a built-in type.
22
22
  */
23
- export type BuiltinNodeType = 'workflowNode' | 'simple' | 'square' | 'atom' | 'tool' | 'gateway' | 'note' | 'terminal' | 'idea';
23
+ export type BuiltinNodeType = 'workflowNode' | 'simple' | 'square' | 'atom' | 'tool' | 'gateway' | 'note' | 'caption' | 'terminal' | 'idea';
24
24
  /**
25
25
  * Array of built-in type strings for runtime validation.
26
26
  */
@@ -27,6 +27,7 @@ export const BUILTIN_NODE_TYPES = [
27
27
  'tool',
28
28
  'gateway',
29
29
  'note',
30
+ 'caption',
30
31
  'terminal',
31
32
  'idea'
32
33
  ];
@@ -14,6 +14,7 @@ import AtomNode from '../components/nodes/AtomNode.svelte';
14
14
  import ToolNode from '../components/nodes/ToolNode.svelte';
15
15
  import GatewayNode from '../components/nodes/GatewayNode.svelte';
16
16
  import NotesNode from '../components/nodes/NotesNode.svelte';
17
+ import CaptionNode from '../components/nodes/CaptionNode.svelte';
17
18
  import TerminalNode from '../components/nodes/TerminalNode.svelte';
18
19
  import IdeaNode from '../components/nodes/IdeaNode.svelte';
19
20
  // Pure type metadata + resolution helpers are re-exported for backward
@@ -103,6 +104,18 @@ export const BUILTIN_NODE_COMPONENTS = [
103
104
  statusPosition: 'bottom-right',
104
105
  statusSize: 'sm'
105
106
  },
107
+ {
108
+ type: 'caption',
109
+ displayName: 'Caption',
110
+ description: 'Short high-contrast text that names or marks nearby nodes',
111
+ component: CaptionNode,
112
+ icon: 'mdi:format-title',
113
+ category: 'layout',
114
+ source: FLOWDROP_SOURCE,
115
+ statusPosition: 'bottom-right',
116
+ statusSize: 'sm',
117
+ editsInPlace: true
118
+ },
106
119
  {
107
120
  type: 'terminal',
108
121
  displayName: 'Terminal (Start/End/Exit)',
@@ -25,6 +25,8 @@ export interface NodeComponentProps {
25
25
  type: string;
26
26
  data: WorkflowNode['data'];
27
27
  }) => void;
28
+ /** Injected by the editor for nodes that edit in place: the cleaned text, or null when cancelled. */
29
+ onInlineCommit?: (id: string, text: string | null) => void;
28
30
  };
29
31
  /** Whether the node is currently selected */
30
32
  selected?: boolean;
@@ -67,6 +69,12 @@ export interface NodeTypeInfo {
67
69
  statusPosition?: StatusPosition;
68
70
  /** Default status overlay size for this node type */
69
71
  statusSize?: StatusSize;
72
+ /**
73
+ * The node edits its text in place. Enter on the focused node, the
74
+ * context menu's "Edit text" and a double-click then ask the component to
75
+ * start typing (via `fd.inlineEdit`) instead of opening the config panel.
76
+ */
77
+ editsInPlace?: boolean;
70
78
  }
71
79
  /**
72
80
  * Full registration for a node component.
@@ -131,6 +139,8 @@ export interface PluginNodeDefinition {
131
139
  statusPosition?: StatusPosition;
132
140
  /** Status overlay size */
133
141
  statusSize?: StatusSize;
142
+ /** The node edits its text in place (see `NodeTypeInfo.editsInPlace`) */
143
+ editsInPlace?: boolean;
134
144
  }
135
145
  /**
136
146
  * Result of plugin registration.
@@ -314,6 +324,13 @@ export declare class NodeComponentRegistry extends BaseRegistry<string, NodeComp
314
324
  * @returns The status size, or default "md"
315
325
  */
316
326
  getStatusSize(type: string): StatusSize;
327
+ /**
328
+ * Whether a node type edits its text in place.
329
+ *
330
+ * @param type - The node type
331
+ * @returns true when the registration sets `editsInPlace`
332
+ */
333
+ editsInPlace(type: string): boolean;
317
334
  /**
318
335
  * Register a single custom node without a full plugin.
319
336
  * Useful for project-specific custom nodes.
@@ -338,6 +355,7 @@ export declare class NodeComponentRegistry extends BaseRegistry<string, NodeComp
338
355
  source?: string;
339
356
  statusPosition?: StatusPosition;
340
357
  statusSize?: StatusSize;
358
+ editsInPlace?: boolean;
341
359
  }): void;
342
360
  /**
343
361
  * Register a FlowDrop plugin with custom node components.
@@ -248,6 +248,16 @@ export class NodeComponentRegistry extends BaseRegistry {
248
248
  this.trackVersion(); // reactive dependency (reads items directly)
249
249
  return this.items.get(type)?.statusSize ?? 'md';
250
250
  }
251
+ /**
252
+ * Whether a node type edits its text in place.
253
+ *
254
+ * @param type - The node type
255
+ * @returns true when the registration sets `editsInPlace`
256
+ */
257
+ editsInPlace(type) {
258
+ this.trackVersion(); // reactive dependency (reads items directly)
259
+ return this.items.get(type)?.editsInPlace === true;
260
+ }
251
261
  // ==========================================================================
252
262
  // Plugin system
253
263
  // ==========================================================================
@@ -278,7 +288,8 @@ export class NodeComponentRegistry extends BaseRegistry {
278
288
  category: options.category ?? 'custom',
279
289
  source: options.source ?? 'custom',
280
290
  statusPosition: options.statusPosition,
281
- statusSize: options.statusSize
291
+ statusSize: options.statusSize,
292
+ editsInPlace: options.editsInPlace
282
293
  });
283
294
  }
284
295
  /**
@@ -315,7 +326,8 @@ export class NodeComponentRegistry extends BaseRegistry {
315
326
  category: nodeDef.category ?? 'custom',
316
327
  source: config.namespace,
317
328
  statusPosition: nodeDef.statusPosition,
318
- statusSize: nodeDef.statusSize
329
+ statusSize: nodeDef.statusSize,
330
+ editsInPlace: nodeDef.editsInPlace
319
331
  };
320
332
  this.register(registration);
321
333
  result.registeredTypes.push(namespacedType);