0pflow 0.1.0-dev.b8b505d → 0.1.0-dev.bdfaa95

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 (90) hide show
  1. package/dist/__tests__/factory.test.js +6 -0
  2. package/dist/__tests__/factory.test.js.map +1 -1
  3. package/dist/agent.d.ts.map +1 -1
  4. package/dist/agent.js +16 -1
  5. package/dist/agent.js.map +1 -1
  6. package/dist/cli/deploy.d.ts +27 -0
  7. package/dist/cli/deploy.d.ts.map +1 -0
  8. package/dist/cli/deploy.js +332 -0
  9. package/dist/cli/deploy.js.map +1 -0
  10. package/dist/cli/index.d.ts.map +1 -1
  11. package/dist/cli/index.js +35 -0
  12. package/dist/cli/index.js.map +1 -1
  13. package/dist/cli/install.d.ts +67 -0
  14. package/dist/cli/install.d.ts.map +1 -0
  15. package/dist/cli/install.js +270 -0
  16. package/dist/cli/install.js.map +1 -0
  17. package/dist/cli/mcp/lib/scaffolding.d.ts.map +1 -1
  18. package/dist/cli/mcp/lib/scaffolding.js +13 -36
  19. package/dist/cli/mcp/lib/scaffolding.js.map +1 -1
  20. package/dist/cli/run.d.ts.map +1 -1
  21. package/dist/cli/run.js +270 -101
  22. package/dist/cli/run.js.map +1 -1
  23. package/dist/connections/cloud-auth.d.ts.map +1 -1
  24. package/dist/connections/cloud-auth.js +5 -1
  25. package/dist/connections/cloud-auth.js.map +1 -1
  26. package/dist/connections/cloud-integration-provider.d.ts +1 -0
  27. package/dist/connections/cloud-integration-provider.d.ts.map +1 -1
  28. package/dist/connections/cloud-integration-provider.js +16 -1
  29. package/dist/connections/cloud-integration-provider.js.map +1 -1
  30. package/dist/connections/connection-labels.d.ts +14 -0
  31. package/dist/connections/connection-labels.d.ts.map +1 -0
  32. package/dist/connections/connection-labels.js +46 -0
  33. package/dist/connections/connection-labels.js.map +1 -0
  34. package/dist/connections/index.d.ts +1 -0
  35. package/dist/connections/index.d.ts.map +1 -1
  36. package/dist/connections/index.js +1 -0
  37. package/dist/connections/index.js.map +1 -1
  38. package/dist/connections/integration-provider.d.ts +1 -0
  39. package/dist/connections/integration-provider.d.ts.map +1 -1
  40. package/dist/connections/local-integration-provider.d.ts +1 -0
  41. package/dist/connections/local-integration-provider.d.ts.map +1 -1
  42. package/dist/connections/local-integration-provider.js +17 -1
  43. package/dist/connections/local-integration-provider.js.map +1 -1
  44. package/dist/dev-ui/api.d.ts +2 -0
  45. package/dist/dev-ui/api.d.ts.map +1 -1
  46. package/dist/dev-ui/api.js +36 -0
  47. package/dist/dev-ui/api.js.map +1 -1
  48. package/dist/dev-ui/deploy-api.d.ts +14 -0
  49. package/dist/dev-ui/deploy-api.d.ts.map +1 -0
  50. package/dist/dev-ui/deploy-api.js +112 -0
  51. package/dist/dev-ui/deploy-api.js.map +1 -0
  52. package/dist/dev-ui/dev-server.d.ts.map +1 -1
  53. package/dist/dev-ui/dev-server.js +53 -2
  54. package/dist/dev-ui/dev-server.js.map +1 -1
  55. package/dist/dev-ui/watcher.d.ts.map +1 -1
  56. package/dist/dev-ui/watcher.js +6 -2
  57. package/dist/dev-ui/watcher.js.map +1 -1
  58. package/dist/dev-ui-client/assets/index-CFhxfKAk.js +176 -0
  59. package/dist/dev-ui-client/assets/index-D9wFwfPp.css +32 -0
  60. package/dist/dev-ui-client/index.html +2 -2
  61. package/dist/discover.d.ts.map +1 -1
  62. package/dist/discover.js +5 -2
  63. package/dist/discover.js.map +1 -1
  64. package/dist/factory.d.ts.map +1 -1
  65. package/dist/factory.js +12 -1
  66. package/dist/factory.js.map +1 -1
  67. package/dist/index.d.ts +1 -0
  68. package/dist/index.d.ts.map +1 -1
  69. package/dist/index.js +3 -1
  70. package/dist/index.js.map +1 -1
  71. package/dist/registry-gen.d.ts +6 -0
  72. package/dist/registry-gen.d.ts.map +1 -0
  73. package/dist/registry-gen.js +146 -0
  74. package/dist/registry-gen.js.map +1 -0
  75. package/dist/workflow.d.ts.map +1 -1
  76. package/dist/workflow.js +16 -1
  77. package/dist/workflow.js.map +1 -1
  78. package/package.json +4 -2
  79. package/templates/app/.dockerignore +6 -0
  80. package/templates/app/Dockerfile +34 -0
  81. package/templates/app/generated/registry.ts +8 -0
  82. package/templates/app/next.config.js +4 -1
  83. package/templates/app/package.json +2 -0
  84. package/templates/app/src/lib/pflow.ts +5 -6
  85. package/dist/dev-ui-client/assets/index-C-LxzUII.css +0 -32
  86. package/dist/dev-ui-client/assets/index-aAIwXl4O.js +0 -127
  87. package/dist/version.d.ts +0 -6
  88. package/dist/version.d.ts.map +0 -1
  89. package/dist/version.js +0 -7
  90. package/dist/version.js.map +0 -1
@@ -0,0 +1,32 @@
1
+ .react-flow{direction:ltr;--xy-edge-stroke-default: #b1b1b7;--xy-edge-stroke-width-default: 1;--xy-edge-stroke-selected-default: #555;--xy-connectionline-stroke-default: #b1b1b7;--xy-connectionline-stroke-width-default: 1;--xy-attribution-background-color-default: rgba(255, 255, 255, .5);--xy-minimap-background-color-default: #fff;--xy-minimap-mask-background-color-default: rgba(240, 240, 240, .6);--xy-minimap-mask-stroke-color-default: transparent;--xy-minimap-mask-stroke-width-default: 1;--xy-minimap-node-background-color-default: #e2e2e2;--xy-minimap-node-stroke-color-default: transparent;--xy-minimap-node-stroke-width-default: 2;--xy-background-color-default: transparent;--xy-background-pattern-dots-color-default: #91919a;--xy-background-pattern-lines-color-default: #eee;--xy-background-pattern-cross-color-default: #e2e2e2;background-color:var(--xy-background-color, var(--xy-background-color-default));--xy-node-color-default: inherit;--xy-node-border-default: 1px solid #1a192b;--xy-node-background-color-default: #fff;--xy-node-group-background-color-default: rgba(240, 240, 240, .25);--xy-node-boxshadow-hover-default: 0 1px 4px 1px rgba(0, 0, 0, .08);--xy-node-boxshadow-selected-default: 0 0 0 .5px #1a192b;--xy-node-border-radius-default: 3px;--xy-handle-background-color-default: #1a192b;--xy-handle-border-color-default: #fff;--xy-selection-background-color-default: rgba(0, 89, 220, .08);--xy-selection-border-default: 1px dotted rgba(0, 89, 220, .8);--xy-controls-button-background-color-default: #fefefe;--xy-controls-button-background-color-hover-default: #f4f4f4;--xy-controls-button-color-default: inherit;--xy-controls-button-color-hover-default: inherit;--xy-controls-button-border-color-default: #eee;--xy-controls-box-shadow-default: 0 0 2px 1px rgba(0, 0, 0, .08);--xy-edge-label-background-color-default: #ffffff;--xy-edge-label-color-default: inherit;--xy-resize-background-color-default: #3367d9}.react-flow.dark{--xy-edge-stroke-default: #3e3e3e;--xy-edge-stroke-width-default: 1;--xy-edge-stroke-selected-default: #727272;--xy-connectionline-stroke-default: #b1b1b7;--xy-connectionline-stroke-width-default: 1;--xy-attribution-background-color-default: rgba(150, 150, 150, .25);--xy-minimap-background-color-default: #141414;--xy-minimap-mask-background-color-default: rgba(60, 60, 60, .6);--xy-minimap-mask-stroke-color-default: transparent;--xy-minimap-mask-stroke-width-default: 1;--xy-minimap-node-background-color-default: #2b2b2b;--xy-minimap-node-stroke-color-default: transparent;--xy-minimap-node-stroke-width-default: 2;--xy-background-color-default: #141414;--xy-background-pattern-dots-color-default: #777;--xy-background-pattern-lines-color-default: #777;--xy-background-pattern-cross-color-default: #777;--xy-node-color-default: #f8f8f8;--xy-node-border-default: 1px solid #3c3c3c;--xy-node-background-color-default: #1e1e1e;--xy-node-group-background-color-default: rgba(240, 240, 240, .25);--xy-node-boxshadow-hover-default: 0 1px 4px 1px rgba(255, 255, 255, .08);--xy-node-boxshadow-selected-default: 0 0 0 .5px #999;--xy-handle-background-color-default: #bebebe;--xy-handle-border-color-default: #1e1e1e;--xy-selection-background-color-default: rgba(200, 200, 220, .08);--xy-selection-border-default: 1px dotted rgba(200, 200, 220, .8);--xy-controls-button-background-color-default: #2b2b2b;--xy-controls-button-background-color-hover-default: #3e3e3e;--xy-controls-button-color-default: #f8f8f8;--xy-controls-button-color-hover-default: #fff;--xy-controls-button-border-color-default: #5b5b5b;--xy-controls-box-shadow-default: 0 0 2px 1px rgba(0, 0, 0, .08);--xy-edge-label-background-color-default: #141414;--xy-edge-label-color-default: #f8f8f8}.react-flow__background{background-color:var(--xy-background-color-props, var(--xy-background-color, var(--xy-background-color-default)));pointer-events:none;z-index:-1}.react-flow__container{position:absolute;width:100%;height:100%;top:0;left:0}.react-flow__pane{z-index:1}.react-flow__pane.draggable{cursor:grab}.react-flow__pane.dragging{cursor:grabbing}.react-flow__pane.selection{cursor:pointer}.react-flow__viewport{transform-origin:0 0;z-index:2;pointer-events:none}.react-flow__renderer{z-index:4}.react-flow__selection{z-index:6}.react-flow__nodesselection-rect:focus,.react-flow__nodesselection-rect:focus-visible{outline:none}.react-flow__edge-path{stroke:var(--xy-edge-stroke, var(--xy-edge-stroke-default));stroke-width:var(--xy-edge-stroke-width, var(--xy-edge-stroke-width-default));fill:none}.react-flow__connection-path{stroke:var(--xy-connectionline-stroke, var(--xy-connectionline-stroke-default));stroke-width:var(--xy-connectionline-stroke-width, var(--xy-connectionline-stroke-width-default));fill:none}.react-flow .react-flow__edges{position:absolute}.react-flow .react-flow__edges svg{overflow:visible;position:absolute;pointer-events:none}.react-flow__edge{pointer-events:visibleStroke}.react-flow__edge.selectable{cursor:pointer}.react-flow__edge.animated path{stroke-dasharray:5;animation:dashdraw .5s linear infinite}.react-flow__edge.animated path.react-flow__edge-interaction{stroke-dasharray:none;animation:none}.react-flow__edge.inactive{pointer-events:none}.react-flow__edge.selected,.react-flow__edge:focus,.react-flow__edge:focus-visible{outline:none}.react-flow__edge.selected .react-flow__edge-path,.react-flow__edge.selectable:focus .react-flow__edge-path,.react-flow__edge.selectable:focus-visible .react-flow__edge-path{stroke:var(--xy-edge-stroke-selected, var(--xy-edge-stroke-selected-default))}.react-flow__edge-textwrapper{pointer-events:all}.react-flow__edge .react-flow__edge-text{pointer-events:none;-webkit-user-select:none;-moz-user-select:none;user-select:none}.react-flow__arrowhead polyline{stroke:var(--xy-edge-stroke, var(--xy-edge-stroke-default))}.react-flow__arrowhead polyline.arrowclosed{fill:var(--xy-edge-stroke, var(--xy-edge-stroke-default))}.react-flow__connection{pointer-events:none}.react-flow__connection .animated{stroke-dasharray:5;animation:dashdraw .5s linear infinite}svg.react-flow__connectionline{z-index:1001;overflow:visible;position:absolute}.react-flow__nodes{pointer-events:none;transform-origin:0 0}.react-flow__node{position:absolute;-webkit-user-select:none;-moz-user-select:none;user-select:none;pointer-events:all;transform-origin:0 0;box-sizing:border-box;cursor:default}.react-flow__node.selectable{cursor:pointer}.react-flow__node.draggable{cursor:grab;pointer-events:all}.react-flow__node.draggable.dragging{cursor:grabbing}.react-flow__nodesselection{z-index:3;transform-origin:left top;pointer-events:none}.react-flow__nodesselection-rect{position:absolute;pointer-events:all;cursor:grab}.react-flow__handle{position:absolute;pointer-events:none;min-width:5px;min-height:5px;width:6px;height:6px;background-color:var(--xy-handle-background-color, var(--xy-handle-background-color-default));border:1px solid var(--xy-handle-border-color, var(--xy-handle-border-color-default));border-radius:100%}.react-flow__handle.connectingfrom{pointer-events:all}.react-flow__handle.connectionindicator{pointer-events:all;cursor:crosshair}.react-flow__handle-bottom{top:auto;left:50%;bottom:0;transform:translate(-50%,50%)}.react-flow__handle-top{top:0;left:50%;transform:translate(-50%,-50%)}.react-flow__handle-left{top:50%;left:0;transform:translate(-50%,-50%)}.react-flow__handle-right{top:50%;right:0;transform:translate(50%,-50%)}.react-flow__edgeupdater{cursor:move;pointer-events:all}.react-flow__pane.selection .react-flow__panel{pointer-events:none}.react-flow__panel{position:absolute;z-index:5;margin:15px}.react-flow__panel.top{top:0}.react-flow__panel.bottom{bottom:0}.react-flow__panel.top.center,.react-flow__panel.bottom.center{left:50%;transform:translate(-15px) translate(-50%)}.react-flow__panel.left{left:0}.react-flow__panel.right{right:0}.react-flow__panel.left.center,.react-flow__panel.right.center{top:50%;transform:translateY(-15px) translateY(-50%)}.react-flow__attribution{font-size:10px;background:var(--xy-attribution-background-color, var(--xy-attribution-background-color-default));padding:2px 3px;margin:0}.react-flow__attribution a{text-decoration:none;color:#999}@keyframes dashdraw{0%{stroke-dashoffset:10}}.react-flow__edgelabel-renderer{position:absolute;width:100%;height:100%;pointer-events:none;-webkit-user-select:none;-moz-user-select:none;user-select:none;left:0;top:0}.react-flow__viewport-portal{position:absolute;width:100%;height:100%;left:0;top:0;-webkit-user-select:none;-moz-user-select:none;user-select:none}.react-flow__minimap{background:var( --xy-minimap-background-color-props, var(--xy-minimap-background-color, var(--xy-minimap-background-color-default)) )}.react-flow__minimap-svg{display:block}.react-flow__minimap-mask{fill:var( --xy-minimap-mask-background-color-props, var(--xy-minimap-mask-background-color, var(--xy-minimap-mask-background-color-default)) );stroke:var( --xy-minimap-mask-stroke-color-props, var(--xy-minimap-mask-stroke-color, var(--xy-minimap-mask-stroke-color-default)) );stroke-width:var( --xy-minimap-mask-stroke-width-props, var(--xy-minimap-mask-stroke-width, var(--xy-minimap-mask-stroke-width-default)) )}.react-flow__minimap-node{fill:var( --xy-minimap-node-background-color-props, var(--xy-minimap-node-background-color, var(--xy-minimap-node-background-color-default)) );stroke:var( --xy-minimap-node-stroke-color-props, var(--xy-minimap-node-stroke-color, var(--xy-minimap-node-stroke-color-default)) );stroke-width:var( --xy-minimap-node-stroke-width-props, var(--xy-minimap-node-stroke-width, var(--xy-minimap-node-stroke-width-default)) )}.react-flow__background-pattern.dots{fill:var( --xy-background-pattern-color-props, var(--xy-background-pattern-color, var(--xy-background-pattern-dots-color-default)) )}.react-flow__background-pattern.lines{stroke:var( --xy-background-pattern-color-props, var(--xy-background-pattern-color, var(--xy-background-pattern-lines-color-default)) )}.react-flow__background-pattern.cross{stroke:var( --xy-background-pattern-color-props, var(--xy-background-pattern-color, var(--xy-background-pattern-cross-color-default)) )}.react-flow__controls{display:flex;flex-direction:column;box-shadow:var(--xy-controls-box-shadow, var(--xy-controls-box-shadow-default))}.react-flow__controls.horizontal{flex-direction:row}.react-flow__controls-button{display:flex;justify-content:center;align-items:center;height:26px;width:26px;padding:4px;border:none;background:var(--xy-controls-button-background-color, var(--xy-controls-button-background-color-default));border-bottom:1px solid var( --xy-controls-button-border-color-props, var(--xy-controls-button-border-color, var(--xy-controls-button-border-color-default)) );color:var( --xy-controls-button-color-props, var(--xy-controls-button-color, var(--xy-controls-button-color-default)) );cursor:pointer;-webkit-user-select:none;-moz-user-select:none;user-select:none}.react-flow__controls-button svg{width:100%;max-width:12px;max-height:12px;fill:currentColor}.react-flow__edge.updating .react-flow__edge-path{stroke:#777}.react-flow__edge-text{font-size:10px}.react-flow__node.selectable:focus,.react-flow__node.selectable:focus-visible{outline:none}.react-flow__node-input,.react-flow__node-default,.react-flow__node-output,.react-flow__node-group{padding:10px;border-radius:var(--xy-node-border-radius, var(--xy-node-border-radius-default));width:150px;font-size:12px;color:var(--xy-node-color, var(--xy-node-color-default));text-align:center;border:var(--xy-node-border, var(--xy-node-border-default));background-color:var(--xy-node-background-color, var(--xy-node-background-color-default))}.react-flow__node-input.selectable:hover,.react-flow__node-default.selectable:hover,.react-flow__node-output.selectable:hover,.react-flow__node-group.selectable:hover{box-shadow:var(--xy-node-boxshadow-hover, var(--xy-node-boxshadow-hover-default))}.react-flow__node-input.selectable.selected,.react-flow__node-input.selectable:focus,.react-flow__node-input.selectable:focus-visible,.react-flow__node-default.selectable.selected,.react-flow__node-default.selectable:focus,.react-flow__node-default.selectable:focus-visible,.react-flow__node-output.selectable.selected,.react-flow__node-output.selectable:focus,.react-flow__node-output.selectable:focus-visible,.react-flow__node-group.selectable.selected,.react-flow__node-group.selectable:focus,.react-flow__node-group.selectable:focus-visible{box-shadow:var(--xy-node-boxshadow-selected, var(--xy-node-boxshadow-selected-default))}.react-flow__node-group{background-color:var(--xy-node-group-background-color, var(--xy-node-group-background-color-default))}.react-flow__nodesselection-rect,.react-flow__selection{background:var(--xy-selection-background-color, var(--xy-selection-background-color-default));border:var(--xy-selection-border, var(--xy-selection-border-default))}.react-flow__nodesselection-rect:focus,.react-flow__nodesselection-rect:focus-visible,.react-flow__selection:focus,.react-flow__selection:focus-visible{outline:none}.react-flow__controls-button:hover{background:var( --xy-controls-button-background-color-hover-props, var(--xy-controls-button-background-color-hover, var(--xy-controls-button-background-color-hover-default)) );color:var( --xy-controls-button-color-hover-props, var(--xy-controls-button-color-hover, var(--xy-controls-button-color-hover-default)) )}.react-flow__controls-button:disabled{pointer-events:none}.react-flow__controls-button:disabled svg{fill-opacity:.4}.react-flow__controls-button:last-child{border-bottom:none}.react-flow__controls.horizontal .react-flow__controls-button{border-bottom:none;border-right:1px solid var( --xy-controls-button-border-color-props, var(--xy-controls-button-border-color, var(--xy-controls-button-border-color-default)) )}.react-flow__controls.horizontal .react-flow__controls-button:last-child{border-right:none}.react-flow__resize-control{position:absolute}.react-flow__resize-control.left,.react-flow__resize-control.right{cursor:ew-resize}.react-flow__resize-control.top,.react-flow__resize-control.bottom{cursor:ns-resize}.react-flow__resize-control.top.left,.react-flow__resize-control.bottom.right{cursor:nwse-resize}.react-flow__resize-control.bottom.left,.react-flow__resize-control.top.right{cursor:nesw-resize}.react-flow__resize-control.handle{width:5px;height:5px;border:1px solid #fff;border-radius:1px;background-color:var(--xy-resize-background-color, var(--xy-resize-background-color-default));translate:-50% -50%}.react-flow__resize-control.handle.left{left:0;top:50%}.react-flow__resize-control.handle.right{left:100%;top:50%}.react-flow__resize-control.handle.top{left:50%;top:0}.react-flow__resize-control.handle.bottom{left:50%;top:100%}.react-flow__resize-control.handle.top.left,.react-flow__resize-control.handle.bottom.left{left:0}.react-flow__resize-control.handle.top.right,.react-flow__resize-control.handle.bottom.right{left:100%}.react-flow__resize-control.line{border-color:var(--xy-resize-background-color, var(--xy-resize-background-color-default));border-width:0;border-style:solid}.react-flow__resize-control.line.left,.react-flow__resize-control.line.right{width:1px;transform:translate(-50%);top:0;height:100%}.react-flow__resize-control.line.left{left:0;border-left-width:1px}.react-flow__resize-control.line.right{left:100%;border-right-width:1px}.react-flow__resize-control.line.top,.react-flow__resize-control.line.bottom{height:1px;transform:translateY(-50%);left:0;width:100%}.react-flow__resize-control.line.top{top:0;border-top-width:1px}.react-flow__resize-control.line.bottom{border-bottom-width:1px;top:100%}.react-flow__edge-textbg{fill:var(--xy-edge-label-background-color, var(--xy-edge-label-background-color-default))}.react-flow__edge-text{fill:var(--xy-edge-label-color, var(--xy-edge-label-color-default))}/**
2
+ * Copyright (c) 2014 The xterm.js authors. All rights reserved.
3
+ * Copyright (c) 2012-2013, Christopher Jeffrey (MIT License)
4
+ * https://github.com/chjj/term.js
5
+ * @license MIT
6
+ *
7
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
8
+ * of this software and associated documentation files (the "Software"), to deal
9
+ * in the Software without restriction, including without limitation the rights
10
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11
+ * copies of the Software, and to permit persons to whom the Software is
12
+ * furnished to do so, subject to the following conditions:
13
+ *
14
+ * The above copyright notice and this permission notice shall be included in
15
+ * all copies or substantial portions of the Software.
16
+ *
17
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
23
+ * THE SOFTWARE.
24
+ *
25
+ * Originally forked from (with the author's permission):
26
+ * Fabrice Bellard's javascript vt100 for jslinux:
27
+ * http://bellard.org/jslinux/
28
+ * Copyright (c) 2011 Fabrice Bellard
29
+ * The original design remains. The terminal itself
30
+ * has been extended to include xterm CSI codes, among
31
+ * other features.
32
+ */.xterm{cursor:text;position:relative;user-select:none;-ms-user-select:none;-webkit-user-select:none}.xterm.focus,.xterm:focus{outline:none}.xterm .xterm-helpers{position:absolute;top:0;z-index:5}.xterm .xterm-helper-textarea{padding:0;border:0;margin:0;position:absolute;opacity:0;left:-9999em;top:0;width:0;height:0;z-index:-5;white-space:nowrap;overflow:hidden;resize:none}.xterm .composition-view{background:#000;color:#fff;display:none;position:absolute;white-space:nowrap;z-index:1}.xterm .composition-view.active{display:block}.xterm .xterm-viewport{background-color:#000;overflow-y:scroll;cursor:default;position:absolute;right:0;left:0;top:0;bottom:0}.xterm .xterm-screen{position:relative}.xterm .xterm-screen canvas{position:absolute;left:0;top:0}.xterm-char-measure-element{display:inline-block;visibility:hidden;position:absolute;top:0;left:-9999em;line-height:normal}.xterm.enable-mouse-events{cursor:default}.xterm.xterm-cursor-pointer,.xterm .xterm-cursor-pointer{cursor:pointer}.xterm.column-select.focus{cursor:crosshair}.xterm .xterm-accessibility:not(.debug),.xterm .xterm-message{position:absolute;left:0;top:0;bottom:0;right:0;z-index:10;color:transparent;pointer-events:none}.xterm .xterm-accessibility-tree:not(.debug) *::selection{color:transparent}.xterm .xterm-accessibility-tree{font-family:monospace;-webkit-user-select:text;user-select:text;white-space:pre}.xterm .xterm-accessibility-tree>div{transform-origin:left;width:fit-content}.xterm .live-region{position:absolute;left:-9999px;width:1px;height:1px;overflow:hidden}.xterm-dim{opacity:1!important}.xterm-underline-1{text-decoration:underline}.xterm-underline-2{text-decoration:double underline}.xterm-underline-3{text-decoration:wavy underline}.xterm-underline-4{text-decoration:dotted underline}.xterm-underline-5{text-decoration:dashed underline}.xterm-overline{text-decoration:overline}.xterm-overline.xterm-underline-1{text-decoration:overline underline}.xterm-overline.xterm-underline-2{text-decoration:overline double underline}.xterm-overline.xterm-underline-3{text-decoration:overline wavy underline}.xterm-overline.xterm-underline-4{text-decoration:overline dotted underline}.xterm-overline.xterm-underline-5{text-decoration:overline dashed underline}.xterm-strikethrough{text-decoration:line-through}.xterm-screen .xterm-decoration-container .xterm-decoration{z-index:6;position:absolute}.xterm-screen .xterm-decoration-container .xterm-decoration.xterm-decoration-top-layer{z-index:7}.xterm-decoration-overview-ruler{z-index:8;position:absolute;top:0;right:0;pointer-events:none}.xterm-decoration-top{z-index:2;position:relative}.xterm .xterm-scrollable-element>.scrollbar{cursor:default}.xterm .xterm-scrollable-element>.scrollbar>.scra{cursor:pointer;font-size:11px!important}.xterm .xterm-scrollable-element>.visible{opacity:1;background:#0000;transition:opacity .1s linear;z-index:11}.xterm .xterm-scrollable-element>.invisible{opacity:0;pointer-events:none}.xterm .xterm-scrollable-element>.invisible.fade{transition:opacity .8s linear}.xterm .xterm-scrollable-element>.shadow{position:absolute;display:none}.xterm .xterm-scrollable-element>.shadow.top{display:block;top:0;left:3px;height:3px;width:100%;box-shadow:var(--vscode-scrollbar-shadow, #000) 0 6px 6px -6px inset}.xterm .xterm-scrollable-element>.shadow.left{display:block;top:3px;left:0;height:100%;width:3px;box-shadow:var(--vscode-scrollbar-shadow, #000) 6px 0 6px -6px inset}.xterm .xterm-scrollable-element>.shadow.top-left-corner{display:block;top:0;left:0;height:3px;width:3px}.xterm .xterm-scrollable-element>.shadow.top.left{box-shadow:var(--vscode-scrollbar-shadow, #000) 6px 0 6px -6px inset}/*! tailwindcss v4.1.18 | MIT License | https://tailwindcss.com */@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-space-y-reverse:0;--tw-border-style:solid;--tw-leading:initial;--tw-font-weight:initial;--tw-tracking:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-backdrop-blur:initial;--tw-backdrop-brightness:initial;--tw-backdrop-contrast:initial;--tw-backdrop-grayscale:initial;--tw-backdrop-hue-rotate:initial;--tw-backdrop-invert:initial;--tw-backdrop-opacity:initial;--tw-backdrop-saturate:initial;--tw-backdrop-sepia:initial}}}@layer theme{:root,:host{--font-sans:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";--font-serif:ui-serif,Georgia,Cambria,"Times New Roman",Times,serif;--font-mono:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;--color-red-50:oklch(97.1% .013 17.38);--color-red-400:oklch(70.4% .191 22.216);--color-red-500:oklch(63.7% .237 25.331);--color-red-600:oklch(57.7% .245 27.325);--color-red-700:oklch(50.5% .213 27.518);--color-amber-50:oklch(98.7% .022 95.277);--color-amber-200:oklch(92.4% .12 95.746);--color-amber-400:oklch(82.8% .189 84.429);--color-amber-600:oklch(66.6% .179 58.318);--color-amber-700:oklch(55.5% .163 48.998);--color-yellow-400:oklch(85.2% .199 91.936);--color-green-400:oklch(79.2% .209 151.711);--color-emerald-50:oklch(97.9% .021 166.113);--color-emerald-500:oklch(69.6% .17 162.48);--color-emerald-600:oklch(59.6% .145 163.225);--color-emerald-700:oklch(50.8% .118 165.612);--color-blue-400:oklch(70.7% .165 254.624);--color-purple-50:oklch(97.7% .014 308.299);--color-purple-600:oklch(55.8% .288 302.321);--color-gray-50:oklch(98.5% .002 247.839);--color-gray-100:oklch(96.7% .003 264.542);--color-gray-200:oklch(92.8% .006 264.531);--color-gray-300:oklch(87.2% .01 258.338);--color-gray-400:oklch(70.7% .022 261.325);--color-gray-500:oklch(55.1% .027 264.364);--color-gray-700:oklch(37.3% .034 259.733);--color-gray-800:oklch(27.8% .033 256.848);--color-zinc-400:oklch(70.5% .015 286.067);--color-zinc-500:oklch(55.2% .016 285.938);--color-black:#000;--color-white:#fff;--spacing:.25rem;--container-md:28rem;--text-xs:.75rem;--text-xs--line-height:calc(1/.75);--text-sm:.875rem;--text-sm--line-height:calc(1.25/.875);--text-lg:1.125rem;--text-lg--line-height:calc(1.75/1.125);--font-weight-medium:500;--font-weight-semibold:600;--font-weight-bold:700;--tracking-wide:.025em;--tracking-wider:.05em;--leading-relaxed:1.625;--radius-md:.375rem;--radius-lg:.5rem;--radius-xl:.75rem;--animate-spin:spin 1s linear infinite;--blur-sm:8px;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4,0,.2,1);--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono)}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;-moz-tab-size:4;tab-size:4;line-height:1.5;font-family:var(--default-font-family,ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-mono-font-family,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab,red,red)){::placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){-webkit-appearance:button;-moz-appearance:button;appearance:button}::file-selector-button{-webkit-appearance:button;-moz-appearance:button;appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}*{border-color:var(--border)}body{background-color:var(--background);color:var(--foreground)}}@layer components;@layer utilities{.visible{visibility:visible}.absolute{position:absolute}.fixed{position:fixed}.relative{position:relative}.inset-0{inset:calc(var(--spacing)*0)}.inset-y-0{inset-block:calc(var(--spacing)*0)}.top-0{top:calc(var(--spacing)*0)}.top-3{top:calc(var(--spacing)*3)}.right-0{right:calc(var(--spacing)*0)}.right-3{right:calc(var(--spacing)*3)}.bottom-0{bottom:calc(var(--spacing)*0)}.bottom-3{bottom:calc(var(--spacing)*3)}.left-0{left:calc(var(--spacing)*0)}.left-1\/2{left:50%}.left-3{left:calc(var(--spacing)*3)}.z-20{z-index:20}.z-50{z-index:50}.container{width:100%}@media(min-width:40rem){.container{max-width:40rem}}@media(min-width:48rem){.container{max-width:48rem}}@media(min-width:64rem){.container{max-width:64rem}}@media(min-width:80rem){.container{max-width:80rem}}@media(min-width:96rem){.container{max-width:96rem}}.mx-4{margin-inline:calc(var(--spacing)*4)}.my-2{margin-block:calc(var(--spacing)*2)}.mt-0\.5{margin-top:calc(var(--spacing)*.5)}.mt-1{margin-top:calc(var(--spacing)*1)}.mt-2{margin-top:calc(var(--spacing)*2)}.mt-3{margin-top:calc(var(--spacing)*3)}.mr-2{margin-right:calc(var(--spacing)*2)}.mb-0\.5{margin-bottom:calc(var(--spacing)*.5)}.mb-1{margin-bottom:calc(var(--spacing)*1)}.mb-1\.5{margin-bottom:calc(var(--spacing)*1.5)}.mb-2{margin-bottom:calc(var(--spacing)*2)}.ml-2{margin-left:calc(var(--spacing)*2)}.ml-7{margin-left:calc(var(--spacing)*7)}.block{display:block}.flex{display:flex}.\!h-0{height:calc(var(--spacing)*0)!important}.\!h-\[6px\]{height:6px!important}.h-1{height:calc(var(--spacing)*1)}.h-1\.5{height:calc(var(--spacing)*1.5)}.h-2{height:calc(var(--spacing)*2)}.h-2\.5{height:calc(var(--spacing)*2.5)}.h-3{height:calc(var(--spacing)*3)}.h-3\.5{height:calc(var(--spacing)*3.5)}.h-5{height:calc(var(--spacing)*5)}.h-7{height:calc(var(--spacing)*7)}.h-8{height:calc(var(--spacing)*8)}.h-10{height:calc(var(--spacing)*10)}.h-40{height:calc(var(--spacing)*40)}.h-\[1\.5px\]{height:1.5px}.h-\[300px\]{height:300px}.h-full{height:100%}.h-screen{height:100vh}.max-h-32{max-height:calc(var(--spacing)*32)}.max-h-\[60vh\]{max-height:60vh}.max-h-\[100px\]{max-height:100px}.min-h-0{min-height:calc(var(--spacing)*0)}.\!w-0{width:calc(var(--spacing)*0)!important}.\!w-\[6px\]{width:6px!important}.w-1{width:calc(var(--spacing)*1)}.w-1\.5{width:calc(var(--spacing)*1.5)}.w-1\/2{width:50%}.w-2{width:calc(var(--spacing)*2)}.w-2\.5{width:calc(var(--spacing)*2.5)}.w-3{width:calc(var(--spacing)*3)}.w-3\.5{width:calc(var(--spacing)*3.5)}.w-5{width:calc(var(--spacing)*5)}.w-7{width:calc(var(--spacing)*7)}.w-8{width:calc(var(--spacing)*8)}.w-10{width:calc(var(--spacing)*10)}.w-\[2px\]{width:2px}.w-\[300px\]{width:300px}.w-\[480px\]{width:480px}.w-full{width:100%}.w-screen{width:100vw}.max-w-\[50\%\]{max-width:50%}.max-w-\[240px\]{max-width:240px}.max-w-md{max-width:var(--container-md)}.min-w-0{min-width:calc(var(--spacing)*0)}.flex-1{flex:1}.shrink-0{flex-shrink:0}.-translate-x-1\/2{--tw-translate-x: -50% ;translate:var(--tw-translate-x)var(--tw-translate-y)}.transform{transform:var(--tw-rotate-x,)var(--tw-rotate-y,)var(--tw-rotate-z,)var(--tw-skew-x,)var(--tw-skew-y,)}.animate-spin{animation:var(--animate-spin)}.cursor-default{cursor:default}.cursor-ew-resize{cursor:ew-resize}.cursor-ns-resize{cursor:ns-resize}.cursor-pointer{cursor:pointer}.resize-y{resize:vertical}.list-decimal{list-style-type:decimal}.list-disc{list-style-type:disc}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.items-center{align-items:center}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.justify-end{justify-content:flex-end}.gap-0{gap:calc(var(--spacing)*0)}.gap-1{gap:calc(var(--spacing)*1)}.gap-1\.5{gap:calc(var(--spacing)*1.5)}.gap-2{gap:calc(var(--spacing)*2)}.gap-2\.5{gap:calc(var(--spacing)*2.5)}.gap-3{gap:calc(var(--spacing)*3)}:where(.space-y-0\.5>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*.5)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*.5)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-1>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*1)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*1)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-3>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*3)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*3)*calc(1 - var(--tw-space-y-reverse)))}.gap-x-2{column-gap:calc(var(--spacing)*2)}.gap-y-0\.5{row-gap:calc(var(--spacing)*.5)}.truncate{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-y-auto{overflow-y:auto}.rounded{border-radius:.25rem}.rounded-full{border-radius:3.40282e38px}.rounded-lg{border-radius:var(--radius-lg)}.rounded-md{border-radius:var(--radius-md)}.rounded-xl{border-radius:var(--radius-xl)}.\!border{border-style:var(--tw-border-style)!important;border-width:1px!important}.\!border-0{border-style:var(--tw-border-style)!important;border-width:0!important}.border{border-style:var(--tw-border-style);border-width:1px}.border-2{border-style:var(--tw-border-style);border-width:2px}.border-x{border-inline-style:var(--tw-border-style);border-inline-width:1px}.border-t{border-top-style:var(--tw-border-style);border-top-width:1px}.border-b{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.border-l-2{border-left-style:var(--tw-border-style);border-left-width:2px}.border-dashed{--tw-border-style:dashed;border-style:dashed}.\!border-gray-200{border-color:var(--color-gray-200)!important}.border-accent{border-color:var(--accent)}.border-amber-200{border-color:var(--color-amber-200)}.border-border{border-color:var(--border)}.border-foreground\/20{border-color:var(--foreground)}@supports (color:color-mix(in lab,red,red)){.border-foreground\/20{border-color:color-mix(in oklab,var(--foreground)20%,transparent)}}.border-gray-100{border-color:var(--color-gray-100)}.border-gray-200{border-color:var(--color-gray-200)}.\!bg-gray-300{background-color:var(--color-gray-300)!important}.\!bg-transparent{background-color:#0000!important}.bg-\[\#1a1a1a\]{background-color:#1a1a1a}.bg-\[\#b8ad9e\]{background-color:#b8ad9e}.bg-\[\#e0d9cf\]{background-color:#e0d9cf}.bg-\[\#e8e0d4\]{background-color:#e8e0d4}.bg-\[\#f3ede5\]{background-color:#f3ede5}.bg-\[\#f5f3f0\]{background-color:#f5f3f0}.bg-amber-50{background-color:var(--color-amber-50)}.bg-amber-400{background-color:var(--color-amber-400)}.bg-background{background-color:var(--background)}.bg-black\/30{background-color:#0000004d}@supports (color:color-mix(in lab,red,red)){.bg-black\/30{background-color:color-mix(in oklab,var(--color-black)30%,transparent)}}.bg-card,.bg-card\/80{background-color:var(--card)}@supports (color:color-mix(in lab,red,red)){.bg-card\/80{background-color:color-mix(in oklab,var(--card)80%,transparent)}}.bg-emerald-50{background-color:var(--color-emerald-50)}.bg-emerald-500{background-color:var(--color-emerald-500)}.bg-foreground,.bg-foreground\/15{background-color:var(--foreground)}@supports (color:color-mix(in lab,red,red)){.bg-foreground\/15{background-color:color-mix(in oklab,var(--foreground)15%,transparent)}}.bg-gray-50{background-color:var(--color-gray-50)}.bg-green-400{background-color:var(--color-green-400)}.bg-muted{background-color:var(--muted)}.bg-popover{background-color:var(--popover)}.bg-purple-50{background-color:var(--color-purple-50)}.bg-red-50{background-color:var(--color-red-50)}.bg-red-50\/30{background-color:#fef2f24d}@supports (color:color-mix(in lab,red,red)){.bg-red-50\/30{background-color:color-mix(in oklab,var(--color-red-50)30%,transparent)}}.bg-red-400{background-color:var(--color-red-400)}.bg-red-500{background-color:var(--color-red-500)}.bg-white{background-color:var(--color-white)}.bg-yellow-400{background-color:var(--color-yellow-400)}.bg-zinc-400{background-color:var(--color-zinc-400)}.p-1{padding:calc(var(--spacing)*1)}.p-1\.5{padding:calc(var(--spacing)*1.5)}.p-3{padding:calc(var(--spacing)*3)}.p-8{padding:calc(var(--spacing)*8)}.px-1{padding-inline:calc(var(--spacing)*1)}.px-1\.5{padding-inline:calc(var(--spacing)*1.5)}.px-2{padding-inline:calc(var(--spacing)*2)}.px-2\.5{padding-inline:calc(var(--spacing)*2.5)}.px-3{padding-inline:calc(var(--spacing)*3)}.px-4{padding-inline:calc(var(--spacing)*4)}.px-5{padding-inline:calc(var(--spacing)*5)}.py-0\.5{padding-block:calc(var(--spacing)*.5)}.py-1{padding-block:calc(var(--spacing)*1)}.py-1\.5{padding-block:calc(var(--spacing)*1.5)}.py-2{padding-block:calc(var(--spacing)*2)}.py-3{padding-block:calc(var(--spacing)*3)}.py-4{padding-block:calc(var(--spacing)*4)}.pt-3{padding-top:calc(var(--spacing)*3)}.pl-2{padding-left:calc(var(--spacing)*2)}.pl-2\.5{padding-left:calc(var(--spacing)*2.5)}.pl-4{padding-left:calc(var(--spacing)*4)}.text-center{text-align:center}.text-left{text-align:left}.font-mono{font-family:var(--font-mono)}.font-serif{font-family:var(--font-serif)}.text-lg{font-size:var(--text-lg);line-height:var(--tw-leading,var(--text-lg--line-height))}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.text-\[9px\]{font-size:9px}.text-\[10px\]{font-size:10px}.text-\[11px\]{font-size:11px}.text-\[12px\]{font-size:12px}.text-\[13px\]{font-size:13px}.text-\[15px\]{font-size:15px}.leading-relaxed{--tw-leading:var(--leading-relaxed);line-height:var(--leading-relaxed)}.font-bold{--tw-font-weight:var(--font-weight-bold);font-weight:var(--font-weight-bold)}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.font-semibold{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.tracking-wide{--tw-tracking:var(--tracking-wide);letter-spacing:var(--tracking-wide)}.tracking-wider{--tw-tracking:var(--tracking-wider);letter-spacing:var(--tracking-wider)}.break-all{word-break:break-all}.whitespace-pre-wrap{white-space:pre-wrap}.text-\[\#6b6358\]{color:#6b6358}.text-\[\#a8a099\]{color:#a8a099}.text-amber-600{color:var(--color-amber-600)}.text-amber-700{color:var(--color-amber-700)}.text-background{color:var(--background)}.text-blue-400{color:var(--color-blue-400)}.text-emerald-600{color:var(--color-emerald-600)}.text-emerald-700{color:var(--color-emerald-700)}.text-foreground,.text-foreground\/60{color:var(--foreground)}@supports (color:color-mix(in lab,red,red)){.text-foreground\/60{color:color-mix(in oklab,var(--foreground)60%,transparent)}}.text-foreground\/80{color:var(--foreground)}@supports (color:color-mix(in lab,red,red)){.text-foreground\/80{color:color-mix(in oklab,var(--foreground)80%,transparent)}}.text-gray-400{color:var(--color-gray-400)}.text-gray-500{color:var(--color-gray-500)}.text-gray-700{color:var(--color-gray-700)}.text-gray-800{color:var(--color-gray-800)}.text-green-400{color:var(--color-green-400)}.text-muted-foreground{color:var(--muted-foreground)}.text-popover-foreground{color:var(--popover-foreground)}.text-purple-600{color:var(--color-purple-600)}.text-red-400{color:var(--color-red-400)}.text-red-600{color:var(--color-red-600)}.text-red-700{color:var(--color-red-700)}.text-zinc-500{color:var(--color-zinc-500)}.capitalize{text-transform:capitalize}.uppercase{text-transform:uppercase}.italic{font-style:italic}.underline{text-decoration-line:underline}.accent-foreground{accent-color:var(--foreground)}.\!opacity-60{opacity:.6!important}.opacity-0{opacity:0}.opacity-25{opacity:.25}.opacity-75{opacity:.75}.shadow-2xl{--tw-shadow:0 25px 50px -12px var(--tw-shadow-color,#00000040);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\[0_1px_4px_rgba\(0\,0\,0\,0\.04\)\]{--tw-shadow:0 1px 4px var(--tw-shadow-color,#0000000a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\[inset_0_0_0_1px_rgba\(0\,0\,0\,0\.04\)\]{--tw-shadow:inset 0 0 0 1px var(--tw-shadow-color,#0000000a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\[inset_0_0_20px_rgba\(0\,0\,0\,0\.03\)\]{--tw-shadow:inset 0 0 20px var(--tw-shadow-color,#00000008);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-lg{--tw-shadow:0 10px 15px -3px var(--tw-shadow-color,#0000001a),0 4px 6px -4px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-sm{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a),0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-xl{--tw-shadow:0 20px 25px -5px var(--tw-shadow-color,#0000001a),0 8px 10px -6px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.backdrop-blur-\[2px\]{--tw-backdrop-blur:blur(2px);-webkit-backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,)}.backdrop-blur-sm{--tw-backdrop-blur:blur(var(--blur-sm));-webkit-backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,)}.transition-colors{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-opacity{transition-property:opacity;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.select-none{-webkit-user-select:none;user-select:none}@media(hover:hover){.group-hover\:underline:is(:where(.group):hover *){text-decoration-line:underline}.group-hover\:opacity-100:is(:where(.group):hover *){opacity:1}}.last\:mb-0:last-child{margin-bottom:calc(var(--spacing)*0)}@media(hover:hover){.hover\:bg-\[\#d5cdc0\]:hover{background-color:#d5cdc0}.hover\:bg-accent:hover,.hover\:bg-accent\/60:hover{background-color:var(--accent)}@supports (color:color-mix(in lab,red,red)){.hover\:bg-accent\/60:hover{background-color:color-mix(in oklab,var(--accent)60%,transparent)}}.hover\:text-foreground:hover,.hover\:text-foreground\/70:hover{color:var(--foreground)}@supports (color:color-mix(in lab,red,red)){.hover\:text-foreground\/70:hover{color:color-mix(in oklab,var(--foreground)70%,transparent)}}.hover\:text-popover-foreground:hover{color:var(--popover-foreground)}.hover\:opacity-90:hover{opacity:.9}}.focus\:ring-1:focus{--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(1px + var(--tw-ring-offset-width))var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.focus\:ring-foreground\/20:focus{--tw-ring-color:var(--foreground)}@supports (color:color-mix(in lab,red,red)){.focus\:ring-foreground\/20:focus{--tw-ring-color:color-mix(in oklab,var(--foreground)20%,transparent)}}.focus\:outline-none:focus{--tw-outline-style:none;outline-style:none}.disabled\:opacity-50:disabled{opacity:.5}.disabled\:opacity-60:disabled{opacity:.6}}:root{--background:#f7f3ee;--foreground:#111827;--card:#fff;--card-foreground:#111827;--popover:#fff;--popover-foreground:#111827;--muted:#f0ebe3;--muted-foreground:#6b7280;--accent:#f0fdf4;--accent-foreground:#111827;--border:#e5e7eb}.react-flow__node{box-shadow:none;background:0 0;border:none;border-radius:0;padding:0}.react-flow__edge-text{fill:#6b7280;font-size:12px}.react-flow__minimap{border-radius:10px;overflow:hidden;box-shadow:0 1px 4px #0000000f;background:#f0ebe3!important}.react-flow__controls{border:1px solid #e5e7eb;border-radius:10px;overflow:hidden;box-shadow:0 1px 4px #0000000f}.react-flow__controls button{color:#6b7280;background:#fff;border-color:#e5e7eb}.react-flow__controls button:hover{background:#f3f4f6}.react-flow__controls button svg{fill:#6b7280}@property --tw-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-y{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-z{syntax:"*";inherits:false;initial-value:0}@property --tw-rotate-x{syntax:"*";inherits:false}@property --tw-rotate-y{syntax:"*";inherits:false}@property --tw-rotate-z{syntax:"*";inherits:false}@property --tw-skew-x{syntax:"*";inherits:false}@property --tw-skew-y{syntax:"*";inherits:false}@property --tw-space-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-leading{syntax:"*";inherits:false}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-tracking{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-backdrop-blur{syntax:"*";inherits:false}@property --tw-backdrop-brightness{syntax:"*";inherits:false}@property --tw-backdrop-contrast{syntax:"*";inherits:false}@property --tw-backdrop-grayscale{syntax:"*";inherits:false}@property --tw-backdrop-hue-rotate{syntax:"*";inherits:false}@property --tw-backdrop-invert{syntax:"*";inherits:false}@property --tw-backdrop-opacity{syntax:"*";inherits:false}@property --tw-backdrop-saturate{syntax:"*";inherits:false}@property --tw-backdrop-sepia{syntax:"*";inherits:false}@keyframes spin{to{transform:rotate(360deg)}}
@@ -4,8 +4,8 @@
4
4
  <meta charset="UTF-8" />
5
5
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
6
6
  <title>0pflow Dev UI</title>
7
- <script type="module" crossorigin src="/assets/index-aAIwXl4O.js"></script>
8
- <link rel="stylesheet" crossorigin href="/assets/index-C-LxzUII.css">
7
+ <script type="module" crossorigin src="/assets/index-CFhxfKAk.js"></script>
8
+ <link rel="stylesheet" crossorigin href="/assets/index-D9wFwfPp.css">
9
9
  </head>
10
10
  <body>
11
11
  <div id="root"></div>
@@ -1 +1 @@
1
- {"version":3,"file":"discover.d.ts","sourceRoot":"","sources":["../src/discover.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAQ7C,KAAK,aAAa,GAAG,UAAU,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC;AAE1C,MAAM,WAAW,cAAc;IAC7B,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,aAAa,CAAC,CAAC;IACzC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,aAAa,CAAC,CAAC;IACtC,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,aAAa,CAAC,CAAC;IACrC,QAAQ,EAAE,MAAM,EAAE,CAAC;CACpB;AAED;;;GAGG;AACH,wBAAsB,QAAQ,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,cAAc,CAAC,CAyB1E"}
1
+ {"version":3,"file":"discover.d.ts","sourceRoot":"","sources":["../src/discover.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAQ7C,KAAK,aAAa,GAAG,UAAU,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC;AAE1C,MAAM,WAAW,cAAc;IAC7B,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,aAAa,CAAC,CAAC;IACzC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,aAAa,CAAC,CAAC;IACtC,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,aAAa,CAAC,CAAC;IACrC,QAAQ,EAAE,MAAM,EAAE,CAAC;CACpB;AAED;;;GAGG;AACH,wBAAsB,QAAQ,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,cAAc,CAAC,CA6B1E"}
package/dist/discover.js CHANGED
@@ -4,11 +4,14 @@ import { discoverWorkflows, discoverNodes, discoverAgents, } from "./cli/discove
4
4
  * Returns the exact shape that create0pflow() expects.
5
5
  */
6
6
  export async function discover(projectDir) {
7
- const [wfResult, nodeResult, agentResult] = await Promise.all([
8
- discoverWorkflows(projectDir),
7
+ // Discover agents and nodes first so they're in jiti's module cache.
8
+ // Workflows import agents/nodes, and if loaded in parallel, the same
9
+ // agent file gets evaluated twice causing duplicate DBOS registration.
10
+ const [nodeResult, agentResult] = await Promise.all([
9
11
  discoverNodes(projectDir),
10
12
  discoverAgents(projectDir),
11
13
  ]);
14
+ const wfResult = await discoverWorkflows(projectDir);
12
15
  // Convert workflows array to Record keyed by name
13
16
  const workflows = {};
14
17
  for (const wf of wfResult.workflows) {
@@ -1 +1 @@
1
- {"version":3,"file":"discover.js","sourceRoot":"","sources":["../src/discover.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,iBAAiB,EACjB,aAAa,EACb,cAAc,GACf,MAAM,oBAAoB,CAAC;AAY5B;;;GAGG;AACH,MAAM,CAAC,KAAK,UAAU,QAAQ,CAAC,UAAkB;IAC/C,MAAM,CAAC,QAAQ,EAAE,UAAU,EAAE,WAAW,CAAC,GAAG,MAAM,OAAO,CAAC,GAAG,CAAC;QAC5D,iBAAiB,CAAC,UAAU,CAAC;QAC7B,aAAa,CAAC,UAAU,CAAC;QACzB,cAAc,CAAC,UAAU,CAAC;KAC3B,CAAC,CAAC;IAEH,kDAAkD;IAClD,MAAM,SAAS,GAAkC,EAAE,CAAC;IACpD,KAAK,MAAM,EAAE,IAAI,QAAQ,CAAC,SAAS,EAAE,CAAC;QACpC,SAAS,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC;IAC1B,CAAC;IAED,MAAM,QAAQ,GAAG;QACf,GAAG,QAAQ,CAAC,QAAQ;QACpB,GAAG,UAAU,CAAC,QAAQ;QACtB,GAAG,WAAW,CAAC,QAAQ;KACxB,CAAC;IAEF,OAAO;QACL,SAAS;QACT,MAAM,EAAE,WAAW,CAAC,MAAM;QAC1B,KAAK,EAAE,UAAU,CAAC,KAAK;QACvB,QAAQ;KACT,CAAC;AACJ,CAAC"}
1
+ {"version":3,"file":"discover.js","sourceRoot":"","sources":["../src/discover.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,iBAAiB,EACjB,aAAa,EACb,cAAc,GACf,MAAM,oBAAoB,CAAC;AAY5B;;;GAGG;AACH,MAAM,CAAC,KAAK,UAAU,QAAQ,CAAC,UAAkB;IAC/C,qEAAqE;IACrE,qEAAqE;IACrE,uEAAuE;IACvE,MAAM,CAAC,UAAU,EAAE,WAAW,CAAC,GAAG,MAAM,OAAO,CAAC,GAAG,CAAC;QAClD,aAAa,CAAC,UAAU,CAAC;QACzB,cAAc,CAAC,UAAU,CAAC;KAC3B,CAAC,CAAC;IAEH,MAAM,QAAQ,GAAG,MAAM,iBAAiB,CAAC,UAAU,CAAC,CAAC;IAErD,kDAAkD;IAClD,MAAM,SAAS,GAAkC,EAAE,CAAC;IACpD,KAAK,MAAM,EAAE,IAAI,QAAQ,CAAC,SAAS,EAAE,CAAC;QACpC,SAAS,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC;IAC1B,CAAC;IAED,MAAM,QAAQ,GAAG;QACf,GAAG,QAAQ,CAAC,QAAQ;QACpB,GAAG,UAAU,CAAC,QAAQ;QACtB,GAAG,WAAW,CAAC,QAAQ;KACxB,CAAC;IAEF,OAAO;QACL,SAAS;QACT,MAAM,EAAE,WAAW,CAAC,MAAM;QAC1B,KAAK,EAAE,UAAU,CAAC,KAAK;QACvB,QAAQ;KACT,CAAC;AACJ,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"factory.d.ts","sourceRoot":"","sources":["../src/factory.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,KAAK,EAAE,WAAW,EAAmB,MAAM,YAAY,CAAC;AAStE;;GAEG;AACH,wBAAsB,YAAY,CAAC,MAAM,EAAE,WAAW,GAAG,OAAO,CAAC,KAAK,CAAC,CA0GtE"}
1
+ {"version":3,"file":"factory.d.ts","sourceRoot":"","sources":["../src/factory.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,KAAK,EAAE,WAAW,EAAmB,MAAM,YAAY,CAAC;AAatE;;GAEG;AACH,wBAAsB,YAAY,CAAC,MAAM,EAAE,WAAW,GAAG,OAAO,CAAC,KAAK,CAAC,CAmHtE"}
package/dist/factory.js CHANGED
@@ -5,10 +5,18 @@ import { configureAgentRuntime } from "./agent.js";
5
5
  import { Workflow, configureWorkflowRuntime } from "./workflow.js";
6
6
  import { createIntegrationProvider } from "./connections/integration-provider.js";
7
7
  import pg from "pg";
8
+ // Global singleton to survive across Turbopack chunk duplication.
9
+ // Module-level `let` in user's pflow.ts breaks across chunks, but globalThis is shared.
10
+ const PFLOW_INSTANCE_KEY = Symbol.for("opflow.pflowInstance");
8
11
  /**
9
12
  * Create a 0pflow instance
10
13
  */
11
14
  export async function create0pflow(config) {
15
+ // Return cached instance if already initialized
16
+ // (handles Turbopack chunk duplication where pflow.ts module-level singleton breaks)
17
+ const cached = globalThis[PFLOW_INSTANCE_KEY];
18
+ if (cached)
19
+ return cached;
12
20
  // Build registry from provided executables (before DBOS init)
13
21
  const registry = new Registry({
14
22
  workflows: config.workflows,
@@ -48,7 +56,7 @@ export async function create0pflow(config) {
48
56
  integrationProvider,
49
57
  appSchema,
50
58
  });
51
- return {
59
+ const pflow = {
52
60
  listWorkflows: () => registry.listWorkflows(),
53
61
  getWorkflow: (name) => registry.getWorkflow(name),
54
62
  triggerWorkflow: async (name, inputs) => {
@@ -87,5 +95,8 @@ export async function create0pflow(config) {
87
95
  await shutdownDBOS();
88
96
  },
89
97
  };
98
+ // Cache on globalThis so duplicate module copies return the same instance
99
+ globalThis[PFLOW_INSTANCE_KEY] = pflow;
100
+ return pflow;
90
101
  }
91
102
  //# sourceMappingURL=factory.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"factory.js","sourceRoot":"","sources":["../src/factory.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,cAAc,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AACzD,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AACnD,OAAO,EAAE,qBAAqB,EAAE,MAAM,YAAY,CAAC;AACnD,OAAO,EAAE,QAAQ,EAAE,wBAAwB,EAAoB,MAAM,eAAe,CAAC;AACrF,OAAO,EAAE,yBAAyB,EAAE,MAAM,uCAAuC,CAAC;AAClF,OAAO,EAAE,MAAM,IAAI,CAAC;AAEpB;;GAEG;AACH,MAAM,CAAC,KAAK,UAAU,YAAY,CAAC,MAAmB;IACpD,8DAA8D;IAC9D,MAAM,QAAQ,GAAG,IAAI,QAAQ,CAAC;QAC5B,SAAS,EAAE,MAAM,CAAC,SAAS;QAC3B,MAAM,EAAE,MAAM,CAAC,MAAM;QACrB,KAAK,EAAE,MAAM,CAAC,KAAK;KACpB,CAAC,CAAC;IAEH,kEAAkE;IAClE,iFAAiF;IACjF,MAAM,gBAAgB,GAAG,IAAI,GAAG,EAAuB,CAAC;IACxD,KAAK,MAAM,QAAQ,IAAI,QAAQ,CAAC,SAAS,EAAE,EAAE,CAAC;QAC5C,MAAM,IAAI,GAAG,QAAQ,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC;QACxC,IAAI,IAAI,EAAE,CAAC;YACT,gBAAgB,CAAC,GAAG,CAAC,QAAQ,EAAE,QAAQ,CAAC,iBAAiB,CAAC,QAAQ,EAAE,IAAI,CAAC,CAAC,CAAC;QAC7E,CAAC;IACH,CAAC;IAED,sEAAsE;IACtE,MAAM,cAAc,CAAC,EAAE,WAAW,EAAE,MAAM,CAAC,WAAW,EA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,OAAO,KAAK,CAAC;AACf,CAAC"}
package/dist/index.d.ts CHANGED
@@ -3,6 +3,7 @@ export { create0pflow } from "./factory.js";
3
3
  export { getSchemaName } from "./dbos.js";
4
4
  export { discover } from "./discover.js";
5
5
  export type { DiscoverResult } from "./discover.js";
6
+ export { generateRegistry } from "./registry-gen.js";
6
7
  export { Node } from "./node.js";
7
8
  export type { NodeDefinition } from "./node.js";
8
9
  export { Workflow } from "./workflow.js";
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,OAAO,UAAU,CAAC;AAG/B,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAC5C,OAAO,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAG1C,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,YAAY,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAGpD,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,YAAY,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAEhD,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,YAAY,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAC;AAE5E,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AACnC,YAAY,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAGnE,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AACnD,YAAY,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AAC9D,OAAO,EAAE,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAGjE,OAAO,EAAE,cAAc,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAChF,YAAY,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AACzD,OAAO,EACL,qBAAqB,EACrB,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,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAGnE,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AACnD,YAAY,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AAC9D,OAAO,EAAE,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAGjE,OAAO,EAAE,cAAc,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAChF,YAAY,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AACzD,OAAO,EACL,qBAAqB,EACrB,sBAAsB,EACtB,gBAAgB,GACjB,MAAM,+BAA+B,CAAC;AACvC,YAAY,EACV,WAAW,EACX,aAAa,EACb,gBAAgB,EAChB,QAAQ,GACT,MAAM,+BAA+B,CAAC;AACvC,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AACzD,YAAY,EACV,oBAAoB,EACpB,mBAAmB,EACnB,SAAS,EACT,UAAU,GACX,MAAM,2BAA2B,CAAC;AAGnC,OAAO,EACL,mBAAmB,EACnB,gBAAgB,EAChB,eAAe,EACf,gBAAgB,EAChB,SAAS,EACT,QAAQ,EACR,gBAAgB,EAChB,yBAAyB,GAC1B,MAAM,wBAAwB,CAAC;AAChC,YAAY,EAAE,iBAAiB,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;AAGrF,YAAY,EACV,UAAU,EACV,eAAe,EACf,qBAAqB,EACrB,QAAQ,EACR,WAAW,EACX,KAAK,GACN,MAAM,YAAY,CAAC"}
package/dist/index.js CHANGED
@@ -4,8 +4,10 @@ export const VERSION = "0.1.0";
4
4
  // Factory
5
5
  export { create0pflow } from "./factory.js";
6
6
  export { getSchemaName } from "./dbos.js";
7
- // Discovery
7
+ // Discovery (CLI / non-bundled environments)
8
8
  export { discover } from "./discover.js";
9
+ // Registry generation (for bundled builds - Next.js, etc.)
10
+ export { generateRegistry } from "./registry-gen.js";
9
11
  // Executable factories
10
12
  export { Node } from "./node.js";
11
13
  export { Workflow } from "./workflow.js";
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,6BAA6B;AAC7B,qCAAqC;AACrC,MAAM,CAAC,MAAM,OAAO,GAAG,OAAO,CAAC;AAE/B,UAAU;AACV,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAC5C,OAAO,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAE1C,YAAY;AACZ,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAGzC,uBAAuB;AACvB,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAGjC,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAGzC,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AAGnC,4CAA4C;AAC5C,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAEnD,OAAO,EAAE,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAEjE,2CAA2C;AAC3C,OAAO,EAAE,cAAc,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAEhF,OAAO,EACL,qBAAqB,EACrB,sBAAsB,EACtB,gBAAgB,GACjB,MAAM,+BAA+B,CAAC;AAOvC,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAQzD,wBAAwB;AACxB,OAAO,EACL,mBAAmB,EACnB,gBAAgB,EAChB,eAAe,EACf,gBAAgB,EAChB,SAAS,EACT,QAAQ,EACR,gBAAgB,EAChB,yBAAyB,GAC1B,MAAM,wBAAwB,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,6BAA6B;AAC7B,qCAAqC;AACrC,MAAM,CAAC,MAAM,OAAO,GAAG,OAAO,CAAC;AAE/B,UAAU;AACV,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAC5C,OAAO,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAE1C,6CAA6C;AAC7C,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAGzC,2DAA2D;AAC3D,OAAO,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAErD,uBAAuB;AACvB,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAGjC,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAGzC,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AAGnC,4CAA4C;AAC5C,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAEnD,OAAO,EAAE,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAEjE,2CAA2C;AAC3C,OAAO,EAAE,cAAc,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAEhF,OAAO,EACL,qBAAqB,EACrB,sBAAsB,EACtB,gBAAgB,GACjB,MAAM,+BAA+B,CAAC;AAOvC,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAQzD,wBAAwB;AACxB,OAAO,EACL,mBAAmB,EACnB,gBAAgB,EAChB,eAAe,EACf,gBAAgB,EAChB,SAAS,EACT,QAAQ,EACR,gBAAgB,EAChB,yBAAyB,GAC1B,MAAM,wBAAwB,CAAC"}
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Generate generated/registry.ts with static imports for all executables.
3
+ * Call this during build (e.g., `0pflow build` or as a prebuild script).
4
+ */
5
+ export declare function generateRegistry(projectDir: string): string;
6
+ //# sourceMappingURL=registry-gen.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"registry-gen.d.ts","sourceRoot":"","sources":["../src/registry-gen.ts"],"names":[],"mappings":"AAyGA;;;GAGG;AACH,wBAAgB,gBAAgB,CAAC,UAAU,EAAE,MAAM,GAAG,MAAM,CA0C3D"}
@@ -0,0 +1,146 @@
1
+ // packages/core/src/registry-gen.ts
2
+ // Generates generated/registry.ts with static imports for all workflows, agents, and nodes.
3
+ // This replaces runtime discover() for bundled environments (Next.js, etc.).
4
+ import fs from "node:fs";
5
+ import path from "node:path";
6
+ /**
7
+ * Scan a directory for .ts/.js files and extract exported executable info.
8
+ * Looks for patterns like: export const foo = Workflow.create({ name: "foo-bar", ... })
9
+ */
10
+ function scanDirectory(dir) {
11
+ if (!fs.existsSync(dir))
12
+ return [];
13
+ const files = fs
14
+ .readdirSync(dir)
15
+ .filter((f) => (f.endsWith(".ts") || f.endsWith(".js")) && f !== "index.ts" && f !== "index.js");
16
+ const entries = [];
17
+ for (const file of files) {
18
+ const filePath = path.join(dir, file);
19
+ const content = fs.readFileSync(filePath, "utf-8");
20
+ // Match: export const <name> = (Workflow|Agent|Node).create({
21
+ const exportMatch = content.match(/export\s+const\s+(\w+)\s*=\s*(?:Workflow|Agent|Node)\.create\s*\(/);
22
+ if (!exportMatch)
23
+ continue;
24
+ const importName = exportMatch[1];
25
+ // Match: name: "some-name" or name: 'some-name'
26
+ const nameMatch = content.match(/name:\s*["']([^"']+)["']/);
27
+ if (!nameMatch)
28
+ continue;
29
+ entries.push({
30
+ importName,
31
+ executableName: nameMatch[1],
32
+ importPath: "", // filled in by caller
33
+ });
34
+ }
35
+ return entries;
36
+ }
37
+ /**
38
+ * Generate the registry.ts file content
39
+ */
40
+ function buildRegistrySource(workflows, agents, nodes) {
41
+ const lines = [
42
+ "// generated/registry.ts",
43
+ "// Auto-generated by 0pflow build - do not edit directly",
44
+ "",
45
+ ];
46
+ // Import statements
47
+ for (const entry of [...workflows, ...agents, ...nodes]) {
48
+ lines.push(`import { ${entry.importName} } from "${entry.importPath}";`);
49
+ }
50
+ lines.push("");
51
+ // Workflow record
52
+ lines.push("export const workflows = {");
53
+ for (const entry of workflows) {
54
+ lines.push(` "${entry.executableName}": ${entry.importName},`);
55
+ }
56
+ lines.push("};");
57
+ lines.push("");
58
+ // Agent record
59
+ lines.push("export const agents = {");
60
+ for (const entry of agents) {
61
+ lines.push(` "${entry.executableName}": ${entry.importName},`);
62
+ }
63
+ lines.push("};");
64
+ lines.push("");
65
+ // Node record
66
+ lines.push("export const nodes = {");
67
+ for (const entry of nodes) {
68
+ lines.push(` "${entry.executableName}": ${entry.importName},`);
69
+ }
70
+ lines.push("};");
71
+ lines.push("");
72
+ return lines.join("\n");
73
+ }
74
+ /**
75
+ * Generate generated/registry.ts with static imports for all executables.
76
+ * Call this during build (e.g., `0pflow build` or as a prebuild script).
77
+ */
78
+ export function generateRegistry(projectDir) {
79
+ const workflowDir = path.join(projectDir, "generated", "workflows");
80
+ const agentsDir = path.join(projectDir, "agents");
81
+ // Support both src/nodes/ and nodes/ layouts
82
+ const srcNodesDir = path.join(projectDir, "src", "nodes");
83
+ const rootNodesDir = path.join(projectDir, "nodes");
84
+ const nodesDir = fs.existsSync(srcNodesDir) ? srcNodesDir : rootNodesDir;
85
+ const nodesRelative = fs.existsSync(srcNodesDir) ? "../src/nodes" : "../nodes";
86
+ // Scan each directory
87
+ const workflows = scanDirectory(workflowDir);
88
+ const agents = scanDirectory(agentsDir);
89
+ const nodes = scanDirectory(nodesDir);
90
+ // Set import paths relative to generated/registry.ts
91
+ // Use actual file extensions (not .js) for bundler compatibility (Turbopack, etc.)
92
+ for (const entry of workflows) {
93
+ entry.importPath = `./workflows/${toSourceFilename(workflowDir, entry)}`;
94
+ }
95
+ for (const entry of agents) {
96
+ entry.importPath = `../agents/${toSourceFilename(agentsDir, entry)}`;
97
+ }
98
+ for (const entry of nodes) {
99
+ entry.importPath = `${nodesRelative}/${toSourceFilename(nodesDir, entry)}`;
100
+ }
101
+ const source = buildRegistrySource(workflows, agents, nodes);
102
+ // Strip .js extensions from imports in generated workflow files
103
+ // (Turbopack can't resolve .js → .ts in production builds)
104
+ stripJsExtensionsInDir(workflowDir);
105
+ // Write the file
106
+ const outDir = path.join(projectDir, "generated");
107
+ if (!fs.existsSync(outDir)) {
108
+ fs.mkdirSync(outDir, { recursive: true });
109
+ }
110
+ const outPath = path.join(outDir, "registry.ts");
111
+ fs.writeFileSync(outPath, source);
112
+ return outPath;
113
+ }
114
+ /**
115
+ * Strip .js extensions from relative imports in all .ts files in a directory.
116
+ * Turbopack can't resolve .js → .ts in production builds.
117
+ */
118
+ function stripJsExtensionsInDir(dir) {
119
+ if (!fs.existsSync(dir))
120
+ return;
121
+ for (const file of fs.readdirSync(dir).filter((f) => f.endsWith(".ts"))) {
122
+ const filePath = path.join(dir, file);
123
+ const content = fs.readFileSync(filePath, "utf-8");
124
+ // Replace .js extension in relative imports: from "../../foo.js" → from "../../foo"
125
+ const updated = content.replace(/(from\s+["']\.\.?\/[^"']*?)\.js(["'])/g, "$1$2");
126
+ if (updated !== content) {
127
+ fs.writeFileSync(filePath, updated);
128
+ }
129
+ }
130
+ }
131
+ /**
132
+ * Find the source filename (without extension) for a registry entry
133
+ */
134
+ function toSourceFilename(dir, entry) {
135
+ // Find the actual file that contains this export (returns basename without extension)
136
+ const files = fs.readdirSync(dir).filter((f) => f.endsWith(".ts") || f.endsWith(".js"));
137
+ for (const file of files) {
138
+ const content = fs.readFileSync(path.join(dir, file), "utf-8");
139
+ if (content.includes(`export const ${entry.importName}`)) {
140
+ return file.replace(/\.(ts|js)$/, "");
141
+ }
142
+ }
143
+ // Fallback: derive from executable name
144
+ return entry.executableName;
145
+ }
146
+ //# sourceMappingURL=registry-gen.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"registry-gen.js","sourceRoot":"","sources":["../src/registry-gen.ts"],"names":[],"mappings":"AAAA,oCAAoC;AACpC,4FAA4F;AAC5F,6EAA6E;AAE7E,OAAO,EAAE,MAAM,SAAS,CAAC;AACzB,OAAO,IAAI,MAAM,WAAW,CAAC;AAW7B;;;GAGG;AACH,SAAS,aAAa,CAAC,GAAW;IAChC,IAAI,CAAC,EAAE,CAAC,UAAU,CAAC,GAAG,CAAC;QAAE,OAAO,EAAE,CAAC;IAEnC,MAAM,KAAK,GAA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O,CAAC;IAoCtC;;;;;OAKG;sBACe,MAAM,EAAE,OAAO,YACrB,MAAM,QACV,UAAU,CAAC,MAAM,EAAE,OAAO,CAAC,GAChC,WAAW,CAAC,MAAM,EAAE,OAAO,CAAC;CAkChC,CAAC"}
package/dist/workflow.js CHANGED
@@ -75,11 +75,24 @@ export function configureWorkflowRuntime(sql, integrationProvider, appSchema) {
75
75
  globalThis[PROVIDER_KEY] = integrationProvider;
76
76
  globalThis[SCHEMA_KEY] = appSchema;
77
77
  }
78
+ // Global cache for workflow executables to prevent duplicate DBOS registration
79
+ // when bundlers (Turbopack) re-evaluate the same module in multiple chunks.
80
+ const WORKFLOW_CACHE_KEY = Symbol.for("opflow.workflowCache");
81
+ function getWorkflowCache() {
82
+ const g = globalThis;
83
+ if (!g[WORKFLOW_CACHE_KEY])
84
+ g[WORKFLOW_CACHE_KEY] = new Map();
85
+ return g[WORKFLOW_CACHE_KEY];
86
+ }
78
87
  /**
79
88
  * Factory for creating workflow executables
80
89
  */
81
90
  export const Workflow = {
82
91
  create(definition) {
92
+ // Return cached executable if already registered (bundler re-evaluation)
93
+ const cached = getWorkflowCache().get(definition.name);
94
+ if (cached)
95
+ return cached;
83
96
  // Create the DBOS-registered workflow function
84
97
  async function workflowImpl(inputs) {
85
98
  const ctx = createDurableContext({
@@ -94,7 +107,7 @@ export const Workflow = {
94
107
  const durableWorkflow = DBOS.registerWorkflow(workflowImpl, {
95
108
  name: definition.name,
96
109
  });
97
- return {
110
+ const executable = {
98
111
  name: definition.name,
99
112
  type: "workflow",
100
113
  description: definition.description,
@@ -104,6 +117,8 @@ export const Workflow = {
104
117
  // execute ignores the ctx param and uses DBOS context instead
105
118
  execute: (_ctx, inputs) => durableWorkflow(inputs),
106
119
  };
120
+ getWorkflowCache().set(definition.name, executable);
121
+ return executable;
107
122
  },
108
123
  /**
109
124
  * Create a wrapper workflow for running a node standalone.
@@ -1 +1 @@
1
- {"version":3,"file":"workflow.js","sourceRoot":"","sources":["../src/workflow.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gBACV,IAAI,EAAE,WAAW;gBACjB,IAAI,EAAE,UAAU;gBAChB,WAAW,EAAE,6BAA6B,QAAQ,EAAE;gBACpD,OAAO,EAAE,CAAC;gBACV,WAAW,EAAE,IAAI,CAAC,WAAW;gBAC7B,YAAY,EAAE,IAAI,CAAC,YAAY;gBAC/B,OAAO,EAAE,CAAC,IAAqB,EAAE,MAAc,EAAE,EAAE,CAAC,cAAc,CAAC,MAAM,CAAC;aAC3E;YACD,qBAAqB,EAAE,CAAC,IAAI,EAAE,EAAE,GAAG,mBAAmB,GAAG,IAAI,CAAC,CAAC,CAAC;SACjE,CAAC;IACJ,CAAC;CACF,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "0pflow",
3
- "version": "0.1.0-dev.b8b505d",
3
+ "version": "0.1.0-dev.bdfaa95",
4
4
  "type": "module",
5
5
  "repository": {
6
6
  "type": "git",
@@ -22,7 +22,7 @@
22
22
  "templates"
23
23
  ],
24
24
  "scripts": {
25
- "build": "node scripts/generate-version.js && tsc --build && vite build dev-ui && chmod +x dist/cli/index.js",
25
+ "build": "tsc --build && vite build dev-ui && chmod +x dist/cli/index.js",
26
26
  "test": "vitest run",
27
27
  "test:watch": "vitest"
28
28
  },
@@ -46,6 +46,8 @@
46
46
  "node-pty": "1.2.0-beta.11",
47
47
  "pg": "^8.17.2",
48
48
  "picocolors": "^1.1.1",
49
+ "react-markdown": "^10.1.0",
50
+ "roughjs": "^4.6.6",
49
51
  "tree-sitter-typescript": "^0.23.2",
50
52
  "web-tree-sitter": "^0.24.7",
51
53
  "ws": "^8.18.0",
@@ -0,0 +1,6 @@
1
+ node_modules
2
+ .git
3
+ .next
4
+ dist
5
+ .dbos
6
+ package-lock.json
@@ -0,0 +1,34 @@
1
+ FROM node:22-alpine AS base
2
+
3
+ # --- Dependencies ---
4
+ FROM base AS deps
5
+ WORKDIR /app
6
+ COPY package.json ./
7
+ RUN npm install
8
+
9
+ # --- Builder ---
10
+ FROM base AS builder
11
+ WORKDIR /app
12
+ COPY --from=deps /app/node_modules ./node_modules
13
+ COPY . .
14
+ ENV NODE_ENV=production
15
+ ENV SKIP_ENV_VALIDATION=1
16
+ RUN npm run build
17
+
18
+ # --- Runner ---
19
+ FROM base AS runner
20
+ WORKDIR /app
21
+ ENV NODE_ENV=production
22
+
23
+ RUN addgroup --system --gid 1001 nodejs && adduser --system --uid 1001 nextjs
24
+
25
+ COPY --from=builder /app/public ./public
26
+ COPY --from=builder /app/specs ./specs
27
+ COPY --from=builder --chown=nextjs:nodejs /app/.next/standalone ./
28
+ COPY --from=builder --chown=nextjs:nodejs /app/.next/static ./.next/static
29
+
30
+ USER nextjs
31
+ EXPOSE 3000
32
+ ENV PORT=3000
33
+ ENV HOSTNAME="0.0.0.0"
34
+ CMD ["node", "server.js"]
@@ -0,0 +1,8 @@
1
+ // generated/registry.ts
2
+ // Auto-generated by 0pflow build - do not edit directly
3
+
4
+ export const workflows = {};
5
+
6
+ export const agents = {};
7
+
8
+ export const nodes = {};
@@ -5,6 +5,9 @@
5
5
  import "./src/env.js";
6
6
 
7
7
  /** @type {import("next").NextConfig} */
8
- const config = {};
8
+ const config = {
9
+ output: "standalone",
10
+ serverExternalPackages: ["@dbos-inc/dbos-sdk"],
11
+ };
9
12
 
10
13
  export default config;