expxagents 0.12.2 → 0.13.0

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 (62) hide show
  1. package/dist/dashboard/assets/{BufferResource-DTKCcSRK.js → BufferResource-D9aUIz5c.js} +1 -1
  2. package/dist/dashboard/assets/{CanvasRenderer-RC-R9HHB.js → CanvasRenderer-DfAInYD0.js} +1 -1
  3. package/dist/dashboard/assets/{JarvisView-BxEaO5CE.js → JarvisView-D78mY8i-.js} +1 -1
  4. package/dist/dashboard/assets/{RenderTargetSystem-BNs6mZy_.js → RenderTargetSystem-DZo6ujA0.js} +1 -1
  5. package/dist/dashboard/assets/{WebGLRenderer-DZqhYwUo.js → WebGLRenderer-BKreDG7Z.js} +1 -1
  6. package/dist/dashboard/assets/{WebGPURenderer-DKvNGGnd.js → WebGPURenderer-DeKuexG2.js} +1 -1
  7. package/dist/dashboard/assets/{browserAll-DpQDqd5Z.js → browserAll-3U5O7dnB.js} +1 -1
  8. package/dist/dashboard/assets/index-CahtAeF7.js +400 -0
  9. package/dist/dashboard/assets/index-DHu3wE8e.css +1 -0
  10. package/dist/dashboard/assets/{webworkerAll-DKgN-y6e.js → webworkerAll-CBlDUJVW.js} +1 -1
  11. package/dist/dashboard/index.html +2 -2
  12. package/dist/server/api/__tests__/integration-routes.test.d.ts +2 -0
  13. package/dist/server/api/__tests__/integration-routes.test.d.ts.map +1 -0
  14. package/dist/server/api/__tests__/integration-routes.test.js +243 -0
  15. package/dist/server/api/__tests__/integration-routes.test.js.map +1 -0
  16. package/dist/server/api/__tests__/team-routes.test.d.ts +2 -0
  17. package/dist/server/api/__tests__/team-routes.test.d.ts.map +1 -0
  18. package/dist/server/api/__tests__/team-routes.test.js +116 -0
  19. package/dist/server/api/__tests__/team-routes.test.js.map +1 -0
  20. package/dist/server/api/integration-routes.d.ts +23 -0
  21. package/dist/server/api/integration-routes.d.ts.map +1 -0
  22. package/dist/server/api/integration-routes.js +321 -0
  23. package/dist/server/api/integration-routes.js.map +1 -0
  24. package/dist/server/api/squads-routes.d.ts.map +1 -1
  25. package/dist/server/api/squads-routes.js +12 -1
  26. package/dist/server/api/squads-routes.js.map +1 -1
  27. package/dist/server/api/team-routes.d.ts +8 -0
  28. package/dist/server/api/team-routes.d.ts.map +1 -0
  29. package/dist/server/api/team-routes.js +55 -0
  30. package/dist/server/api/team-routes.js.map +1 -0
  31. package/dist/server/app.d.ts.map +1 -1
  32. package/dist/server/app.js +4 -0
  33. package/dist/server/app.js.map +1 -1
  34. package/dist/server/bridge/__tests__/claude-bridge.test.js +79 -11
  35. package/dist/server/bridge/__tests__/claude-bridge.test.js.map +1 -1
  36. package/dist/server/bridge/chat-handler.d.ts +6 -1
  37. package/dist/server/bridge/chat-handler.d.ts.map +1 -1
  38. package/dist/server/bridge/chat-handler.js +106 -5
  39. package/dist/server/bridge/chat-handler.js.map +1 -1
  40. package/dist/server/bridge/claude-bridge.d.ts +6 -0
  41. package/dist/server/bridge/claude-bridge.d.ts.map +1 -1
  42. package/dist/server/bridge/claude-bridge.js +90 -10
  43. package/dist/server/bridge/claude-bridge.js.map +1 -1
  44. package/dist/server/bridge/conversation.d.ts +1 -0
  45. package/dist/server/bridge/conversation.d.ts.map +1 -1
  46. package/dist/server/bridge/conversation.js +5 -0
  47. package/dist/server/bridge/conversation.js.map +1 -1
  48. package/dist/server/db/schema.d.ts +1 -1
  49. package/dist/server/db/schema.d.ts.map +1 -1
  50. package/dist/server/db/schema.js +18 -0
  51. package/dist/server/db/schema.js.map +1 -1
  52. package/dist/server/routes/__tests__/conversations.test.js +18 -1
  53. package/dist/server/routes/__tests__/conversations.test.js.map +1 -1
  54. package/dist/server/routes/conversations.d.ts.map +1 -1
  55. package/dist/server/routes/conversations.js +12 -1
  56. package/dist/server/routes/conversations.js.map +1 -1
  57. package/dist/server/ws/ws-handler.d.ts.map +1 -1
  58. package/dist/server/ws/ws-handler.js +17 -3
  59. package/dist/server/ws/ws-handler.js.map +1 -1
  60. package/package.json +1 -1
  61. package/dist/dashboard/assets/index-B-8_BLE5.css +0 -1
  62. package/dist/dashboard/assets/index-C_HJOTiO.js +0 -344
@@ -0,0 +1 @@
1
+ @import"https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500;600;700&family=Outfit:wght@300;400;500;600;700;800&display=swap";:root{--surface-0: #07080e;--surface-1: #0c0e18;--surface-2: #121425;--surface-3: #1a1d35;--surface-4: #232745;--border-subtle: rgba(100, 120, 200, .08);--border-default: rgba(100, 120, 200, .15);--border-strong: rgba(100, 120, 200, .25);--border-glow: rgba(0, 200, 255, .3);--text-primary: #e8ecf4;--text-secondary: #8b93a8;--text-muted: #555d73;--text-inverse: #07080e;--accent: #00c8ff;--accent-dim: #0090b8;--accent-glow: rgba(0, 200, 255, .15);--accent-glow-strong: rgba(0, 200, 255, .35);--status-active: #00e68a;--status-active-glow: rgba(0, 230, 138, .15);--status-warning: #ffb020;--status-warning-glow: rgba(255, 176, 32, .15);--status-error: #ff4070;--status-error-glow: rgba(255, 64, 112, .15);--status-idle: #555d73;--user-bubble: #1a3a6a;--agent-bubble: var(--surface-3);--font-display: "Outfit", sans-serif;--font-mono: "JetBrains Mono", monospace;--radius-xs: 4px;--radius-sm: 6px;--radius-md: 10px;--radius-lg: 14px;--radius-xl: 20px;--radius-full: 9999px;--shadow-sm: 0 1px 3px rgba(0, 0, 0, .4);--shadow-md: 0 4px 16px rgba(0, 0, 0, .5);--shadow-lg: 0 8px 32px rgba(0, 0, 0, .6);--shadow-glow: 0 0 20px rgba(0, 200, 255, .1);--shadow-glow-strong: 0 0 40px rgba(0, 200, 255, .2);--ease-out: cubic-bezier(.16, 1, .3, 1);--ease-spring: cubic-bezier(.34, 1.56, .64, 1);--duration-fast: .15s;--duration-normal: .25s;--duration-slow: .4s;--sp-1: 4px;--sp-2: 8px;--sp-3: 12px;--sp-4: 16px;--sp-5: 20px;--sp-6: 24px;--sp-8: 32px;--sp-10: 40px;--sp-12: 48px;--sidebar-width: 220px;--sidebar-collapsed: 56px;--header-height: 52px;--statusbar-height: 36px}*,*:before,*:after{margin:0;padding:0;box-sizing:border-box}html{font-size:14px;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}body{font-family:var(--font-display);font-weight:400;background:var(--surface-0);color:var(--text-primary);line-height:1.5;overflow:hidden}code,pre,.mono{font-family:var(--font-mono)}::-webkit-scrollbar{width:6px;height:6px}::-webkit-scrollbar-track{background:transparent}::-webkit-scrollbar-thumb{background:var(--border-default);border-radius:var(--radius-full)}::-webkit-scrollbar-thumb:hover{background:var(--border-strong)}:focus-visible{outline:2px solid var(--accent);outline-offset:2px}::selection{background:var(--accent-glow-strong);color:var(--text-primary)}@keyframes fadeIn{0%{opacity:0}to{opacity:1}}@keyframes fadeInUp{0%{opacity:0;transform:translateY(12px)}to{opacity:1;transform:translateY(0)}}@keyframes fadeInDown{0%{opacity:0;transform:translateY(-8px)}to{opacity:1;transform:translateY(0)}}@keyframes slideInLeft{0%{opacity:0;transform:translate(-16px)}to{opacity:1;transform:translate(0)}}@keyframes slideInRight{0%{opacity:0;transform:translate(16px)}to{opacity:1;transform:translate(0)}}@keyframes scaleIn{0%{opacity:0;transform:scale(.95)}to{opacity:1;transform:scale(1)}}@keyframes pulse{0%,to{opacity:1}50%{opacity:.5}}@keyframes glow{0%,to{box-shadow:0 0 8px #00c8ff33}50%{box-shadow:0 0 20px #00c8ff66}}@keyframes statusPulse{0%,to{transform:scale(1);opacity:1}50%{transform:scale(1.4);opacity:.6}}@keyframes shimmer{0%{background-position:-200% 0}to{background-position:200% 0}}@keyframes gridMove{0%{background-position:0 0}to{background-position:40px 40px}}.noise-bg:before{content:"";position:fixed;top:0;right:0;bottom:0;left:0;opacity:.025;pointer-events:none;z-index:9999;background-image:url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");background-repeat:repeat;background-size:256px 256px}.grid-bg{background-image:linear-gradient(rgba(100,120,200,.03) 1px,transparent 1px),linear-gradient(90deg,rgba(100,120,200,.03) 1px,transparent 1px);background-size:40px 40px}.glass{background:#0c0e18b3;backdrop-filter:blur(12px);-webkit-backdrop-filter:blur(12px);border:1px solid var(--border-subtle)}.glow-border{border:1px solid var(--border-glow);box-shadow:var(--shadow-glow)}.btn{display:inline-flex;align-items:center;justify-content:center;gap:var(--sp-2);padding:var(--sp-2) var(--sp-4);font-family:var(--font-display);font-size:.85rem;font-weight:500;border-radius:var(--radius-sm);border:1px solid var(--border-default);background:var(--surface-3);color:var(--text-primary);cursor:pointer;transition:all var(--duration-fast) var(--ease-out);white-space:nowrap}.btn:hover{background:var(--surface-4);border-color:var(--border-strong);transform:translateY(-1px)}.btn:active{transform:translateY(0)}.btn-accent{background:var(--accent);color:var(--text-inverse);border-color:var(--accent);font-weight:600}.btn-accent:hover{background:#00d4ff;border-color:#00d4ff;box-shadow:var(--shadow-glow-strong)}.btn-ghost{background:transparent;border-color:transparent;color:var(--text-secondary)}.btn-ghost:hover{background:var(--surface-3);color:var(--text-primary)}.btn-danger{border-color:var(--status-error);color:var(--status-error);background:#ff407014}.btn-danger:hover{background:#ff40702e;box-shadow:0 0 16px #ff407026}.btn-sm{padding:var(--sp-1) var(--sp-3);font-size:.78rem}.input{width:100%;padding:var(--sp-2) var(--sp-3);font-family:var(--font-display);font-size:.9rem;color:var(--text-primary);background:var(--surface-2);border:1px solid var(--border-default);border-radius:var(--radius-sm);transition:border-color var(--duration-fast) var(--ease-out),box-shadow var(--duration-fast) var(--ease-out)}.input::placeholder{color:var(--text-muted)}.input:focus{outline:none;border-color:var(--accent);box-shadow:0 0 0 3px var(--accent-glow)}.card{background:var(--surface-2);border:1px solid var(--border-subtle);border-radius:var(--radius-md);padding:var(--sp-4);transition:border-color var(--duration-normal) var(--ease-out),box-shadow var(--duration-normal) var(--ease-out)}.card:hover{border-color:var(--border-default)}.card-interactive:hover{border-color:var(--accent-dim);box-shadow:var(--shadow-glow);cursor:pointer}.badge{display:inline-flex;align-items:center;gap:4px;padding:2px 8px;font-size:.72rem;font-weight:600;text-transform:uppercase;letter-spacing:.04em;border-radius:var(--radius-full);border:1px solid transparent}.stagger-1{animation-delay:50ms}.stagger-2{animation-delay:.1s}.stagger-3{animation-delay:.15s}.stagger-4{animation-delay:.2s}.stagger-5{animation-delay:.25s}.stagger-6{animation-delay:.3s}pre code.hljs{display:block;overflow-x:auto;padding:1em}code.hljs{padding:3px 5px}.hljs{color:#abb2bf;background:#282c34}.hljs-comment,.hljs-quote{color:#5c6370;font-style:italic}.hljs-doctag,.hljs-keyword,.hljs-formula{color:#c678dd}.hljs-section,.hljs-name,.hljs-selector-tag,.hljs-deletion,.hljs-subst{color:#e06c75}.hljs-literal{color:#56b6c2}.hljs-string,.hljs-regexp,.hljs-addition,.hljs-attribute,.hljs-meta .hljs-string{color:#98c379}.hljs-attr,.hljs-variable,.hljs-template-variable,.hljs-type,.hljs-selector-class,.hljs-selector-attr,.hljs-selector-pseudo,.hljs-number{color:#d19a66}.hljs-symbol,.hljs-bullet,.hljs-link,.hljs-meta,.hljs-selector-id,.hljs-title{color:#61aeee}.hljs-built_in,.hljs-title.class_,.hljs-class .hljs-title{color:#e6c07b}.hljs-emphasis{font-style:italic}.hljs-strong{font-weight:700}.hljs-link{text-decoration:underline}.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))}
@@ -1,4 +1,4 @@
1
- import{a0 as G,a2 as I,a3 as B,k as _,M as k,V as O,L as A,a8 as m,T as v,ar as C,R as E,w as z,a7 as U,t as w}from"./index-C_HJOTiO.js";var M=`in vec2 aPosition;
1
+ import{a0 as G,a2 as I,a3 as B,k as _,M as k,V as O,L as A,a8 as m,T as v,ar as C,R as E,w as z,a7 as U,t as w}from"./index-CahtAeF7.js";var M=`in vec2 aPosition;
2
2
  out vec2 vTextureCoord;
3
3
 
4
4
  uniform vec4 uInputSize;
@@ -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>ExpxAgents — Mission Control</title>
7
- <script type="module" crossorigin src="/assets/index-C_HJOTiO.js"></script>
8
- <link rel="stylesheet" crossorigin href="/assets/index-B-8_BLE5.css">
7
+ <script type="module" crossorigin src="/assets/index-CahtAeF7.js"></script>
8
+ <link rel="stylesheet" crossorigin href="/assets/index-DHu3wE8e.css">
9
9
  </head>
10
10
  <body>
11
11
  <div id="root"></div>
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=integration-routes.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"integration-routes.test.d.ts","sourceRoot":"","sources":["../../../src/api/__tests__/integration-routes.test.ts"],"names":[],"mappings":""}
@@ -0,0 +1,243 @@
1
+ import { describe, it, expect, beforeAll, afterAll } from 'vitest';
2
+ import { buildApp } from '../../app.js';
3
+ import { parseEnvFile } from '../settings-routes.js';
4
+ describe('integration routes', () => {
5
+ let app;
6
+ let cookie;
7
+ beforeAll(async () => {
8
+ app = await buildApp({ config: { jwtSecret: 'test-secret-integrations' } });
9
+ await app.ready();
10
+ const loginRes = await app.inject({
11
+ method: 'POST',
12
+ url: '/api/auth/login',
13
+ payload: { username: 'admin', password: 'admin' },
14
+ });
15
+ const cookies = loginRes.cookies;
16
+ const access = cookies.find((c) => c.name === 'access_token');
17
+ const refresh = cookies.find((c) => c.name === 'refresh_token');
18
+ cookie = `access_token=${access.value}; refresh_token=${refresh.value}`;
19
+ // Clean table from previous runs
20
+ app.db.exec('DELETE FROM integrations');
21
+ });
22
+ afterAll(async () => {
23
+ // Clean up: remove all test integrations so env keys don't persist
24
+ app.db.exec('DELETE FROM integrations');
25
+ // Clean env keys written by tests
26
+ for (const key of Object.keys(process.env)) {
27
+ if (/^(GITHUB|TELEGRAM|BREVO|DISCORD)_/.test(key)) {
28
+ delete process.env[key];
29
+ }
30
+ }
31
+ // Rewrite .env without test keys
32
+ const envPath = process.env.DOTENV_PATH ?? new URL('../../../../.env', import.meta.url).pathname;
33
+ const entries = parseEnvFile(envPath);
34
+ for (const k of [...entries.keys()]) {
35
+ if (/^(GITHUB|TELEGRAM|BREVO|DISCORD)_/.test(k)) {
36
+ entries.delete(k);
37
+ }
38
+ }
39
+ const { writeEnvFile } = await import('../settings-routes.js');
40
+ writeEnvFile(envPath, entries);
41
+ await app.close();
42
+ });
43
+ it('GET /api/integrations/catalog — returns provider catalog', async () => {
44
+ const res = await app.inject({
45
+ method: 'GET',
46
+ url: '/api/integrations/catalog',
47
+ headers: { cookie },
48
+ });
49
+ expect(res.statusCode).toBe(200);
50
+ const body = res.json();
51
+ expect(body.providers).toBeInstanceOf(Array);
52
+ expect(body.providers.length).toBeGreaterThanOrEqual(30);
53
+ const github = body.providers.find((p) => p.key === 'github');
54
+ expect(github).toBeDefined();
55
+ expect(github.name).toBe('GitHub');
56
+ expect(github.category).toBe('dev');
57
+ expect(github.fields.length).toBeGreaterThanOrEqual(1);
58
+ });
59
+ it('GET /api/integrations — returns empty list initially', async () => {
60
+ const res = await app.inject({
61
+ method: 'GET',
62
+ url: '/api/integrations',
63
+ headers: { cookie },
64
+ });
65
+ expect(res.statusCode).toBe(200);
66
+ const body = res.json();
67
+ expect(body.integrations).toEqual([]);
68
+ });
69
+ it('PATCH /api/integrations/:provider — creates a new integration', async () => {
70
+ const res = await app.inject({
71
+ method: 'PATCH',
72
+ url: '/api/integrations/github',
73
+ headers: { cookie },
74
+ payload: {
75
+ enabled: true,
76
+ config: { token: 'ghp_abc123def456ghi789', org: 'my-org' },
77
+ },
78
+ });
79
+ expect(res.statusCode).toBe(200);
80
+ const body = res.json();
81
+ expect(body.integration.provider).toBe('github');
82
+ expect(body.integration.enabled).toBe(true);
83
+ // Token should be masked
84
+ expect(body.integration.config.token).toContain('••••');
85
+ expect(body.integration.config.token).not.toBe('ghp_abc123def456ghi789');
86
+ // Org is plain text, not masked
87
+ expect(body.integration.config.org).toBe('my-org');
88
+ });
89
+ it('PATCH /api/integrations/:provider — updates existing integration', async () => {
90
+ // First create
91
+ await app.inject({
92
+ method: 'PATCH',
93
+ url: '/api/integrations/telegram',
94
+ headers: { cookie },
95
+ payload: {
96
+ enabled: true,
97
+ config: { bot_token: 'secret-bot-token-123', default_chat_id: '-100123' },
98
+ },
99
+ });
100
+ // Update only chat_id, send masked token back
101
+ const res = await app.inject({
102
+ method: 'PATCH',
103
+ url: '/api/integrations/telegram',
104
+ headers: { cookie },
105
+ payload: {
106
+ config: { bot_token: 'secr••••23', default_chat_id: '-100456' },
107
+ },
108
+ });
109
+ expect(res.statusCode).toBe(200);
110
+ const body = res.json();
111
+ expect(body.integration.config.default_chat_id).toBe('-100456');
112
+ // Token should still be masked (preserved original)
113
+ expect(body.integration.config.bot_token).toContain('••••');
114
+ });
115
+ it('PATCH /api/integrations/:provider — rejects unknown provider', async () => {
116
+ const res = await app.inject({
117
+ method: 'PATCH',
118
+ url: '/api/integrations/unknown_service',
119
+ headers: { cookie },
120
+ payload: { enabled: true, config: {} },
121
+ });
122
+ expect(res.statusCode).toBe(400);
123
+ expect(res.json().error).toContain('Unknown provider');
124
+ });
125
+ it('PATCH /api/integrations/:provider — toggles enabled', async () => {
126
+ await app.inject({
127
+ method: 'PATCH',
128
+ url: '/api/integrations/brevo',
129
+ headers: { cookie },
130
+ payload: { enabled: true, config: { api_key: 'xkeysib-test123' } },
131
+ });
132
+ const res = await app.inject({
133
+ method: 'PATCH',
134
+ url: '/api/integrations/brevo',
135
+ headers: { cookie },
136
+ payload: { enabled: false },
137
+ });
138
+ expect(res.statusCode).toBe(200);
139
+ expect(res.json().integration.enabled).toBe(false);
140
+ });
141
+ it('GET /api/integrations — lists configured integrations', async () => {
142
+ const res = await app.inject({
143
+ method: 'GET',
144
+ url: '/api/integrations',
145
+ headers: { cookie },
146
+ });
147
+ expect(res.statusCode).toBe(200);
148
+ const body = res.json();
149
+ expect(body.integrations.length).toBeGreaterThanOrEqual(1);
150
+ // All secrets should be masked
151
+ for (const integ of body.integrations) {
152
+ expect(integ.provider).toBeDefined();
153
+ expect(typeof integ.enabled).toBe('boolean');
154
+ }
155
+ });
156
+ it('DELETE /api/integrations/:provider — deletes an integration', async () => {
157
+ await app.inject({
158
+ method: 'PATCH',
159
+ url: '/api/integrations/discord',
160
+ headers: { cookie },
161
+ payload: { enabled: true, config: { bot_token: 'tok123' } },
162
+ });
163
+ const res = await app.inject({
164
+ method: 'DELETE',
165
+ url: '/api/integrations/discord',
166
+ headers: { cookie },
167
+ });
168
+ expect(res.statusCode).toBe(200);
169
+ expect(res.json().ok).toBe(true);
170
+ // Verify deleted
171
+ const delRes = await app.inject({
172
+ method: 'DELETE',
173
+ url: '/api/integrations/discord',
174
+ headers: { cookie },
175
+ });
176
+ expect(delRes.statusCode).toBe(404);
177
+ });
178
+ it('PATCH syncs enabled integration config to .env', async () => {
179
+ await app.inject({
180
+ method: 'PATCH',
181
+ url: '/api/integrations/github',
182
+ headers: { cookie },
183
+ payload: {
184
+ enabled: true,
185
+ config: { token: 'ghp_testtoken123', org: 'test-org' },
186
+ },
187
+ });
188
+ // Check process.env was updated
189
+ expect(process.env.GITHUB_TOKEN).toBe('ghp_testtoken123');
190
+ expect(process.env.GITHUB_ORG).toBe('test-org');
191
+ // Check .env file was updated
192
+ const envPath = process.env.DOTENV_PATH ?? new URL('../../../../.env', import.meta.url).pathname;
193
+ const entries = parseEnvFile(envPath);
194
+ expect(entries.get('GITHUB_TOKEN')).toBe('ghp_testtoken123');
195
+ expect(entries.get('GITHUB_ORG')).toBe('test-org');
196
+ });
197
+ it('DELETE removes integration keys from .env', async () => {
198
+ // Create first
199
+ await app.inject({
200
+ method: 'PATCH',
201
+ url: '/api/integrations/discord',
202
+ headers: { cookie },
203
+ payload: { enabled: true, config: { bot_token: 'test-discord-tok' } },
204
+ });
205
+ expect(process.env.DISCORD_BOT_TOKEN).toBe('test-discord-tok');
206
+ // Delete
207
+ await app.inject({
208
+ method: 'DELETE',
209
+ url: '/api/integrations/discord',
210
+ headers: { cookie },
211
+ });
212
+ expect(process.env.DISCORD_BOT_TOKEN).toBeUndefined();
213
+ const envPath = process.env.DOTENV_PATH ?? new URL('../../../../.env', import.meta.url).pathname;
214
+ const entries = parseEnvFile(envPath);
215
+ expect(entries.has('DISCORD_BOT_TOKEN')).toBe(false);
216
+ });
217
+ it('disabled integration removes keys from .env', async () => {
218
+ // Create enabled
219
+ await app.inject({
220
+ method: 'PATCH',
221
+ url: '/api/integrations/brevo',
222
+ headers: { cookie },
223
+ payload: { enabled: true, config: { api_key: 'xkeysib-test' } },
224
+ });
225
+ expect(process.env.BREVO_API_KEY).toBe('xkeysib-test');
226
+ // Disable
227
+ await app.inject({
228
+ method: 'PATCH',
229
+ url: '/api/integrations/brevo',
230
+ headers: { cookie },
231
+ payload: { enabled: false },
232
+ });
233
+ expect(process.env.BREVO_API_KEY).toBeUndefined();
234
+ });
235
+ it('rejects unauthenticated requests', async () => {
236
+ const res = await app.inject({
237
+ method: 'GET',
238
+ url: '/api/integrations',
239
+ });
240
+ expect(res.statusCode).toBe(401);
241
+ });
242
+ });
243
+ //# sourceMappingURL=integration-routes.test.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"integration-routes.test.js","sourceRoot":"","sources":["../../../src/api/__tests__/integration-routes.test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE,MAAM,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,QAAQ,CAAC;AACnE,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AAExC,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAErD,QAAQ,CAAC,oBAAoB,EAAE,GAAG,EAAE;IAClC,IAAI,GAAoB,CAAC;IACzB,IAAI,MAAc,CAAC;IAEnB,SAAS,CAAC,KAAK,IAAI,EAAE;QACnB,GAAG,GAAG,MAAM,QAAQ,CAAC,EAAE,MAAM,EAAE,EAAE,SAAS,EAAE,0BAA0B,EAAE,EAAE,CAAC,CAAC;QAC5E,MAAM,GAAG,CAAC,KAAK,EAAE,CAAC;QAElB,MAAM,QAAQ,GAAG,MAAM,GAAG,CAAC,MAAM,CAAC;YAChC,MAAM,EAAE,MAAM;YACd,GAAG,EAAE,iBAAiB;YACtB,OAAO,EAAE,EAAE,QAAQ,EAAE,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE;SAClD,CAAC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EAAE;SAChE,CAAC,CAAC;QACH,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,aAAa,CAAC,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC;QAEvD,UAAU;QACV,MAAM,GAAG,CAAC,MAAM,CAAC;YACf,MAAM,EAAE,OAAO;YACf,GAAG,EAAE,yBAAyB;YAC9B,OAAO,EAAE,EAAE,MAAM,EAAE;YACnB,OAAO,EAAE,EAAE,OAAO,EAAE,KAAK,EAAE;SAC5B,CAAC,CAAC;QACH,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,aAAa,CAAC,CAAC,aAAa,EAAE,CAAC;IACpD,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,kCAAkC,EAAE,KAAK,IAAI,EAAE;QAChD,MAAM,GAAG,GAAG,MAAM,GAAG,CAAC,MAAM,CAAC;YAC3B,MAAM,EAAE,KAAK;YACb,GAAG,EAAE,mBAAmB;SACzB,CAAC,CAAC;QACH,MAAM,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IACnC,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=team-routes.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"team-routes.test.d.ts","sourceRoot":"","sources":["../../../src/api/__tests__/team-routes.test.ts"],"names":[],"mappings":""}
@@ -0,0 +1,116 @@
1
+ import { describe, it, expect, beforeAll, afterAll } from 'vitest';
2
+ import { buildApp } from '../../app.js';
3
+ describe('team routes', () => {
4
+ let app;
5
+ let cookie;
6
+ beforeAll(async () => {
7
+ app = await buildApp({ config: { jwtSecret: 'test-secret-team' } });
8
+ await app.ready();
9
+ // Login as default admin
10
+ const loginRes = await app.inject({
11
+ method: 'POST',
12
+ url: '/api/auth/login',
13
+ payload: { username: 'admin', password: 'admin' },
14
+ });
15
+ const cookies = loginRes.cookies;
16
+ const access = cookies.find((c) => c.name === 'access_token');
17
+ const refresh = cookies.find((c) => c.name === 'refresh_token');
18
+ cookie = `access_token=${access.value}; refresh_token=${refresh.value}`;
19
+ // Clean table from previous runs
20
+ app.db.exec('DELETE FROM team_members');
21
+ });
22
+ afterAll(async () => {
23
+ await app.close();
24
+ });
25
+ it('GET /api/team — returns empty list initially', async () => {
26
+ const res = await app.inject({
27
+ method: 'GET',
28
+ url: '/api/team',
29
+ headers: { cookie },
30
+ });
31
+ expect(res.statusCode).toBe(200);
32
+ const body = res.json();
33
+ expect(body.members).toEqual([]);
34
+ });
35
+ it('POST /api/team — creates a team member', async () => {
36
+ const res = await app.inject({
37
+ method: 'POST',
38
+ url: '/api/team',
39
+ headers: { cookie },
40
+ payload: {
41
+ name: 'Maria Silva',
42
+ role: 'Designer',
43
+ email: 'maria@example.com',
44
+ phone: '+55 11 99999-0000',
45
+ },
46
+ });
47
+ expect(res.statusCode).toBe(201);
48
+ const body = res.json();
49
+ expect(body.member.name).toBe('Maria Silva');
50
+ expect(body.member.role).toBe('Designer');
51
+ expect(body.member.email).toBe('maria@example.com');
52
+ expect(body.member.phone).toBe('+55 11 99999-0000');
53
+ expect(body.member.id).toMatch(/^tm-/);
54
+ });
55
+ it('POST /api/team — rejects missing name', async () => {
56
+ const res = await app.inject({
57
+ method: 'POST',
58
+ url: '/api/team',
59
+ headers: { cookie },
60
+ payload: { role: 'Dev' },
61
+ });
62
+ expect(res.statusCode).toBe(400);
63
+ });
64
+ it('PATCH /api/team/:id — updates a team member', async () => {
65
+ // Create first
66
+ const createRes = await app.inject({
67
+ method: 'POST',
68
+ url: '/api/team',
69
+ headers: { cookie },
70
+ payload: { name: 'Joao', role: 'Dev' },
71
+ });
72
+ const { member } = createRes.json();
73
+ const res = await app.inject({
74
+ method: 'PATCH',
75
+ url: `/api/team/${member.id}`,
76
+ headers: { cookie },
77
+ payload: { role: 'Senior Dev', email: 'joao@test.com' },
78
+ });
79
+ expect(res.statusCode).toBe(200);
80
+ const updated = res.json().member;
81
+ expect(updated.name).toBe('Joao');
82
+ expect(updated.role).toBe('Senior Dev');
83
+ expect(updated.email).toBe('joao@test.com');
84
+ });
85
+ it('DELETE /api/team/:id — deletes a team member', async () => {
86
+ const createRes = await app.inject({
87
+ method: 'POST',
88
+ url: '/api/team',
89
+ headers: { cookie },
90
+ payload: { name: 'Temp User', role: 'Intern' },
91
+ });
92
+ const { member } = createRes.json();
93
+ const res = await app.inject({
94
+ method: 'DELETE',
95
+ url: `/api/team/${member.id}`,
96
+ headers: { cookie },
97
+ });
98
+ expect(res.statusCode).toBe(200);
99
+ expect(res.json().ok).toBe(true);
100
+ // Verify deleted
101
+ const delRes = await app.inject({
102
+ method: 'DELETE',
103
+ url: `/api/team/${member.id}`,
104
+ headers: { cookie },
105
+ });
106
+ expect(delRes.statusCode).toBe(404);
107
+ });
108
+ it('rejects unauthenticated requests', async () => {
109
+ const res = await app.inject({
110
+ method: 'GET',
111
+ url: '/api/team',
112
+ });
113
+ expect(res.statusCode).toBe(401);
114
+ });
115
+ });
116
+ //# sourceMappingURL=team-routes.test.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"team-routes.test.js","sourceRoot":"","sources":["../../../src/api/__tests__/team-routes.test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE,MAAM,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,QAAQ,CAAC;AACnE,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AAGxC,QAAQ,CAAC,aAAa,EAAE,GAAG,EAAE;IAC3B,IAAI,GAAoB,CAAC;IACzB,IAAI,MAAc,CAAC;IAEnB,SAAS,CAAC,KAAK,IAAI,EAAE;QACnB,GAAG,GAAG,MAAM,QAAQ,CAAC,EAAE,MAAM,EAAE,EAAE,SAAS,EAAE,kBAAkB,EAAE,EAAE,CAAC,CAAC;QACpE,MAAM,GAAG,CAAC,KAAK,EAAE,CAAC;QAElB,yBAAyB;QACzB,MAAM,QAAQ,GAA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AAM,EAAE;YACnB,OAAO,EAAE,EAAE,IAAI,EAAE,WAAW,EAAE,IAAI,EAAE,QAAQ,EAAE;SAC/C,CAAC,CAAC;QACH,MAAM,EAAE,MAAM,EAAE,GAAG,SAAS,CAAC,IAAI,EAAE,CAAC;QAEpC,MAAM,GAAG,GAAG,MAAM,GAAG,CAAC,MAAM,CAAC;YAC3B,MAAM,EAAE,QAAQ;YAChB,GAAG,EAAE,aAAa,MAAM,CAAC,EAAE,EAAE;YAC7B,OAAO,EAAE,EAAE,MAAM,EAAE;SACpB,CAAC,CAAC;QACH,MAAM,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QACjC,MAAM,CAAC,GAAG,CAAC,IAAI,EAAE,CAAC,EAAE,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAEjC,iBAAiB;QACjB,MAAM,MAAM,GAAG,MAAM,GAAG,CAAC,MAAM,CAAC;YAC9B,MAAM,EAAE,QAAQ;YAChB,GAAG,EAAE,aAAa,MAAM,CAAC,EAAE,EAAE;YAC7B,OAAO,EAAE,EAAE,MAAM,EAAE;SACpB,CAAC,CAAC;QACH,MAAM,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IACtC,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,kCAAkC,EAAE,KAAK,IAAI,EAAE;QAChD,MAAM,GAAG,GAAG,MAAM,GAAG,CAAC,MAAM,CAAC;YAC3B,MAAM,EAAE,KAAK;YACb,GAAG,EAAE,WAAW;SACjB,CAAC,CAAC;QACH,MAAM,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IACnC,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
@@ -0,0 +1,23 @@
1
+ import type { FastifyInstance, FastifyPluginOptions } from 'fastify';
2
+ import type Database from 'better-sqlite3';
3
+ interface IntegrationRoutesOptions extends FastifyPluginOptions {
4
+ db: Database.Database;
5
+ }
6
+ export interface ProviderField {
7
+ key: string;
8
+ label: string;
9
+ type: 'text' | 'password' | 'url';
10
+ required?: boolean;
11
+ placeholder?: string;
12
+ }
13
+ export interface ProviderDefinition {
14
+ key: string;
15
+ name: string;
16
+ category: 'dev' | 'messaging' | 'ads' | 'crm' | 'support' | 'email' | 'sales' | 'pm' | 'monitoring' | 'cloud' | 'design';
17
+ description: string;
18
+ fields: ProviderField[];
19
+ }
20
+ export declare const PROVIDER_CATALOG: ProviderDefinition[];
21
+ export declare function integrationRoutes(app: FastifyInstance, opts: IntegrationRoutesOptions): Promise<void>;
22
+ export {};
23
+ //# sourceMappingURL=integration-routes.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"integration-routes.d.ts","sourceRoot":"","sources":["../../src/api/integration-routes.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAC;AACrE,OAAO,KAAK,QAAQ,MAAM,gBAAgB,CAAC;AAG3C,UAAU,wBAAyB,SAAQ,oBAAoB;IAC7D,EAAE,EAAE,QAAQ,CAAC,QAAQ,CAAC;CACvB;AAUD,MAAM,WAAW,aAAa;IAC5B,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,GAAG,UAAU,GAAG,KAAK,CAAC;IAClC,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,MAAM,WAAW,kBAAkB;IACjC,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,KAAK,GAAG,WAAW,GAAG,KAAK,GAAG,KAAK,GAAG,SAAS,GAAG,OAAO,GAAG,OAAO,GAAG,IAAI,GAAG,YAAY,GAAG,OAAO,GAAG,QAAQ,CAAC;IACzH,WAAW,EAAE,MAAM,CAAC;IACpB,MAAM,EAAE,aAAa,EAAE,CAAC;CACzB;AAED,eAAO,MAAM,gBAAgB,EAAE,kBAAkB,EAoKhD,CAAC;AAgFF,wBAAsB,iBAAiB,CACrC,GAAG,EAAE,eAAe,EACpB,IAAI,EAAE,wBAAwB,GAC7B,OAAO,CAAC,IAAI,CAAC,CAqHf"}