comisai 1.0.24 → 1.0.26
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.
- package/node_modules/@comis/agent/dist/bootstrap/sections/tool-descriptions.js +130 -10
- package/node_modules/@comis/agent/dist/bootstrap/sections/tooling-sections.d.ts +1 -1
- package/node_modules/@comis/agent/dist/bootstrap/sections/tooling-sections.js +9 -2
- package/node_modules/@comis/agent/dist/bridge/bridge-metrics.d.ts +8 -0
- package/node_modules/@comis/agent/dist/bridge/bridge-metrics.js +2 -0
- package/node_modules/@comis/agent/dist/bridge/pi-event-bridge.d.ts +29 -0
- package/node_modules/@comis/agent/dist/bridge/pi-event-bridge.js +242 -2
- package/node_modules/@comis/agent/dist/bridge/thinking-block-hash-invariant.d.ts +210 -0
- package/node_modules/@comis/agent/dist/bridge/thinking-block-hash-invariant.js +566 -0
- package/node_modules/@comis/agent/dist/context-engine/context-engine.js +8 -6
- package/node_modules/@comis/agent/dist/context-engine/signature-replay-scrubber.d.ts +51 -30
- package/node_modules/@comis/agent/dist/context-engine/signature-replay-scrubber.js +109 -36
- package/node_modules/@comis/agent/dist/executor/executor-context-engine-setup.js +5 -1
- package/node_modules/@comis/agent/dist/executor/executor-post-execution.js +22 -20
- package/node_modules/@comis/agent/dist/executor/executor-prompt-runner.d.ts +2 -0
- package/node_modules/@comis/agent/dist/executor/executor-prompt-runner.js +111 -15
- package/node_modules/@comis/agent/dist/executor/executor-response-filter.d.ts +20 -17
- package/node_modules/@comis/agent/dist/executor/executor-response-filter.js +132 -52
- package/node_modules/@comis/agent/dist/executor/executor-tool-assembly.js +16 -3
- package/node_modules/@comis/agent/dist/executor/model-retry.d.ts +14 -0
- package/node_modules/@comis/agent/dist/executor/model-retry.js +72 -1
- package/node_modules/@comis/agent/dist/executor/pi-executor.d.ts +3 -0
- package/node_modules/@comis/agent/dist/executor/pi-executor.js +68 -9
- package/node_modules/@comis/agent/dist/executor/post-batch-continuation.d.ts +82 -0
- package/node_modules/@comis/agent/dist/executor/post-batch-continuation.js +200 -0
- package/node_modules/@comis/agent/dist/executor/stream-wrappers/request-body-injector.js +1 -9
- package/node_modules/@comis/agent/dist/executor/tool-deferral.d.ts +37 -2
- package/node_modules/@comis/agent/dist/executor/tool-deferral.js +45 -3
- package/node_modules/@comis/agent/dist/executor/tool-parallelism.js +0 -1
- package/node_modules/@comis/agent/dist/executor/types.d.ts +11 -2
- package/node_modules/@comis/agent/dist/index.d.ts +3 -1
- package/node_modules/@comis/agent/dist/index.js +2 -0
- package/node_modules/@comis/agent/dist/model/last-known-model.d.ts +36 -0
- package/node_modules/@comis/agent/dist/model/last-known-model.js +49 -0
- package/node_modules/@comis/agent/dist/model/model-registry-adapter.d.ts +16 -4
- package/node_modules/@comis/agent/dist/model/model-registry-adapter.js +65 -21
- package/node_modules/@comis/agent/dist/planner/types.d.ts +0 -2
- package/node_modules/@comis/agent/dist/session/comis-session-manager.d.ts +10 -0
- package/node_modules/@comis/agent/dist/session/comis-session-manager.js +5 -0
- package/node_modules/@comis/agent/dist/spawn/pi-mono-adapters.js +7 -0
- package/node_modules/@comis/agent/package.json +1 -1
- package/node_modules/@comis/channels/package.json +1 -1
- package/node_modules/@comis/cli/dist/client/rpc-client.js +6 -1
- package/node_modules/@comis/cli/dist/commands/doctor.js +5 -3
- package/node_modules/@comis/cli/dist/commands/health.js +5 -2
- package/node_modules/@comis/cli/dist/wizard/json-output.js +7 -3
- package/node_modules/@comis/cli/dist/wizard/steps/11-daemon-start.js +130 -0
- package/node_modules/@comis/cli/package.json +1 -1
- package/node_modules/@comis/core/dist/bootstrap.js +5 -0
- package/node_modules/@comis/core/dist/config/env-layer.d.ts +31 -0
- package/node_modules/@comis/core/dist/config/env-layer.js +41 -0
- package/node_modules/@comis/core/dist/config/immutable-keys.d.ts +2 -2
- package/node_modules/@comis/core/dist/config/immutable-keys.js +8 -3
- package/node_modules/@comis/core/dist/config/layered.d.ts +9 -0
- package/node_modules/@comis/core/dist/config/layered.js +11 -0
- package/node_modules/@comis/core/dist/config/managed-sections.d.ts +43 -4
- package/node_modules/@comis/core/dist/config/managed-sections.js +100 -6
- package/node_modules/@comis/core/dist/config/schema-agent.d.ts +39 -0
- package/node_modules/@comis/core/dist/config/schema-agent.js +14 -0
- package/node_modules/@comis/core/dist/config/schema.d.ts +4 -0
- package/node_modules/@comis/core/dist/config/schema.js +14 -0
- package/node_modules/@comis/core/dist/domain/execution-graph.d.ts +1 -1
- package/node_modules/@comis/core/dist/event-bus/events-agent.d.ts +17 -2
- package/node_modules/@comis/core/dist/exports/config.d.ts +2 -2
- package/node_modules/@comis/core/dist/exports/config.js +1 -1
- package/node_modules/@comis/core/package.json +1 -1
- package/node_modules/@comis/daemon/dist/daemon.d.ts +22 -0
- package/node_modules/@comis/daemon/dist/daemon.js +45 -0
- package/node_modules/@comis/daemon/dist/rpc/agent-handlers.d.ts +5 -2
- package/node_modules/@comis/daemon/dist/rpc/agent-handlers.js +80 -1
- package/node_modules/@comis/daemon/dist/rpc/agent-inline-workspace.d.ts +67 -0
- package/node_modules/@comis/daemon/dist/rpc/agent-inline-workspace.js +139 -0
- package/node_modules/@comis/daemon/dist/rpc/model-handlers.d.ts +3 -0
- package/node_modules/@comis/daemon/dist/rpc/model-handlers.js +29 -5
- package/node_modules/@comis/daemon/dist/rpc/probe-provider-auth.d.ts +30 -0
- package/node_modules/@comis/daemon/dist/rpc/probe-provider-auth.js +59 -0
- package/node_modules/@comis/daemon/dist/rpc/provider-handlers.d.ts +37 -0
- package/node_modules/@comis/daemon/dist/rpc/provider-handlers.js +330 -0
- package/node_modules/@comis/daemon/dist/rpc/rpc-dispatch.js +18 -1
- package/node_modules/@comis/daemon/dist/setup-docker-restart-warn.d.ts +4 -0
- package/node_modules/@comis/daemon/dist/setup-docker-restart-warn.js +30 -0
- package/node_modules/@comis/daemon/dist/wiring/setup-agents.d.ts +3 -1
- package/node_modules/@comis/daemon/dist/wiring/setup-agents.js +28 -2
- package/node_modules/@comis/daemon/dist/wiring/setup-cross-session.js +1 -0
- package/node_modules/@comis/daemon/dist/wiring/setup-tools.js +7 -4
- package/node_modules/@comis/daemon/package.json +1 -1
- package/node_modules/@comis/gateway/package.json +1 -1
- package/node_modules/@comis/infra/dist/index.d.ts +1 -0
- package/node_modules/@comis/infra/dist/index.js +2 -0
- package/node_modules/@comis/infra/dist/runtime/is-docker.d.ts +1 -0
- package/node_modules/@comis/infra/dist/runtime/is-docker.js +25 -0
- package/node_modules/@comis/infra/package.json +1 -1
- package/node_modules/@comis/memory/package.json +1 -1
- package/node_modules/@comis/scheduler/package.json +1 -1
- package/node_modules/@comis/shared/package.json +1 -1
- package/node_modules/@comis/skills/dist/bridge/tool-metadata-registry.js +1 -3
- package/node_modules/@comis/skills/dist/builtin/platform/admin-manage-factory.js +24 -1
- package/node_modules/@comis/skills/dist/builtin/platform/agents-manage-tool.d.ts +53 -7
- package/node_modules/@comis/skills/dist/builtin/platform/agents-manage-tool.js +218 -24
- package/node_modules/@comis/skills/dist/builtin/platform/gateway-tool.d.ts +4 -1
- package/node_modules/@comis/skills/dist/builtin/platform/gateway-tool.js +16 -1
- package/node_modules/@comis/skills/dist/builtin/platform/index.d.ts +1 -1
- package/node_modules/@comis/skills/dist/builtin/platform/index.js +1 -1
- package/node_modules/@comis/skills/dist/builtin/platform/providers-manage-tool.d.ts +56 -0
- package/node_modules/@comis/skills/dist/builtin/platform/providers-manage-tool.js +203 -0
- package/node_modules/@comis/skills/dist/index.d.ts +1 -1
- package/node_modules/@comis/skills/dist/index.js +2 -2
- package/node_modules/@comis/skills/dist/policy/tool-policy.js +0 -1
- package/node_modules/@comis/skills/package.json +1 -1
- package/node_modules/@comis/web/dist/assets/{agent-detail-BG9MGWWj.js → agent-detail-DqL6Artv.js} +270 -270
- package/node_modules/@comis/web/dist/assets/agent-editor-CNM_h94Y.js +2173 -0
- package/node_modules/@comis/web/dist/assets/{agent-list-LHCJ4rw2.js → agent-list-Dbh-xD_F.js} +170 -170
- package/node_modules/@comis/web/dist/assets/{approvals-q9VH_IKr.js → approvals-C-K6hN2U.js} +13 -13
- package/node_modules/@comis/web/dist/assets/billing-view-C1DmtyzK.js +375 -0
- package/node_modules/@comis/web/dist/assets/{channel-detail-CaInesJM.js → channel-detail-CtCH22N1.js} +265 -265
- package/node_modules/@comis/web/dist/assets/channel-list-C7xXn-60.js +323 -0
- package/node_modules/@comis/web/dist/assets/{chat-console-CNmzl0JW.js → chat-console-C51pjFwk.js} +243 -246
- package/node_modules/@comis/web/dist/assets/{config-editor-DX4ITw6y.js → config-editor-BLArYRB7.js} +477 -477
- package/node_modules/@comis/web/dist/assets/{context-dag-browser-BwiaF5tf.js → context-dag-browser-fuyMinNI.js} +105 -105
- package/node_modules/@comis/web/dist/assets/{context-engine-BZ5Am6hA.js → context-engine-Bngf2bH0.js} +136 -136
- package/node_modules/@comis/web/dist/assets/decorate-BvWYovGE.js +38 -0
- package/node_modules/@comis/web/dist/assets/{delivery-view-OfBZof-m.js → delivery-view-C80hucxX.js} +134 -134
- package/node_modules/@comis/web/dist/assets/{diagnostics-view-YFwCxgr2.js → diagnostics-view-Cl4VbHZ6.js} +82 -82
- package/node_modules/@comis/web/dist/assets/directive-BOYXJ-K-.js +1 -0
- package/node_modules/@comis/web/dist/assets/{extract-variables-BM5qyK-s.js → extract-variables-B7-Doo7l.js} +39 -39
- package/node_modules/@comis/web/dist/assets/{ic-array-editor-B7m6x7-S.js → ic-array-editor-BLoEyeLS.js} +29 -29
- package/node_modules/@comis/web/dist/assets/{ic-breadcrumb-CUMpp3BL.js → ic-breadcrumb-DqN6G3gc.js} +16 -16
- package/node_modules/@comis/web/dist/assets/{ic-budget-segment-bar-BtJ6x5mN.js → ic-budget-segment-bar-zLsMzjDO.js} +20 -20
- package/node_modules/@comis/web/dist/assets/ic-chat-message-ByFUoMm6.js +352 -0
- package/node_modules/@comis/web/dist/assets/{ic-confirm-dialog-CCDbB04e.js → ic-confirm-dialog-DGlPbV1T.js} +26 -26
- package/node_modules/@comis/web/dist/assets/{ic-connection-dot-CnT1b8xr.js → ic-connection-dot-C4nDHgY2.js} +13 -13
- package/node_modules/@comis/web/dist/assets/ic-data-table-CKIvr-ag.js +277 -0
- package/node_modules/@comis/web/dist/assets/ic-delivery-row-B3YwjjuM.js +67 -0
- package/node_modules/@comis/web/dist/assets/{ic-detail-panel-BF83r-if.js → ic-detail-panel-DiCe4hLr.js} +27 -27
- package/node_modules/@comis/web/dist/assets/{ic-empty-state-60l2ePhd.js → ic-empty-state-CM3Wbj2f.js} +19 -19
- package/node_modules/@comis/web/dist/assets/ic-graph-canvas-ByRjij68.js +359 -0
- package/node_modules/@comis/web/dist/assets/ic-icon-BGNCCPpZ.js +33 -0
- package/node_modules/@comis/web/dist/assets/{ic-layer-waterfall-COvEYMg5.js → ic-layer-waterfall-WkaFyu-l.js} +18 -18
- package/node_modules/@comis/web/dist/assets/ic-relative-time-B3UAnTqg.js +12 -0
- package/node_modules/@comis/web/dist/assets/{ic-search-input-CSOxY9g7.js → ic-search-input-B02AGw1i.js} +22 -22
- package/node_modules/@comis/web/dist/assets/{ic-select-Ce-Raudx.js → ic-select-BqfZISjw.js} +29 -29
- package/node_modules/@comis/web/dist/assets/ic-tabs-yBjkWKJH.js +95 -0
- package/node_modules/@comis/web/dist/assets/ic-tag-CvMVQFRR.js +33 -0
- package/node_modules/@comis/web/dist/assets/{ic-time-range-picker-CypCT68y.js → ic-time-range-picker-DXbYeBmY.js} +31 -31
- package/node_modules/@comis/web/dist/assets/{ic-tool-call-7MaXSsCW.js → ic-tool-call-Bh5kq-yY.js} +51 -51
- package/node_modules/@comis/web/dist/assets/index-BBkuC-EU.js +2792 -0
- package/node_modules/@comis/web/dist/assets/index-CVEaS9aY.css +2 -0
- package/node_modules/@comis/web/dist/assets/{mcp-management-BNZPnpDn.js → mcp-management-DB-phOo7.js} +209 -209
- package/node_modules/@comis/web/dist/assets/{media-config-BBvTYxOX.js → media-config-CRqZ1ZUH.js} +154 -154
- package/node_modules/@comis/web/dist/assets/{media-test-BkK3RCRK.js → media-test-C9vE20Oy.js} +259 -259
- package/node_modules/@comis/web/dist/assets/{memory-inspector-1hDGCGat.js → memory-inspector-CeqfnxMZ.js} +450 -450
- package/node_modules/@comis/web/dist/assets/{message-center-CXefwsUu.js → message-center-Daup7Mof.js} +290 -290
- package/node_modules/@comis/web/dist/assets/{models-C1qcU_j3.js → models-DLYnEU8E.js} +371 -371
- package/node_modules/@comis/web/dist/assets/observability-types-D0tkwElU.js +1 -0
- package/node_modules/@comis/web/dist/assets/{observe-view-C0VBhX4C.js → observe-view-BTSt_PO5.js} +399 -399
- package/node_modules/@comis/web/dist/assets/pipeline-builder-DknfzyLt.js +1495 -0
- package/node_modules/@comis/web/dist/assets/{pipeline-history-DkfOQ6SW.js → pipeline-history-JnHZdeU_.js} +124 -124
- package/node_modules/@comis/web/dist/assets/{pipeline-history-detail-hyHgD0ai.js → pipeline-history-detail-Dg4knsEb.js} +65 -65
- package/node_modules/@comis/web/dist/assets/{pipeline-list-BPW8hV-q.js → pipeline-list-AEnibjsp.js} +227 -227
- package/node_modules/@comis/web/dist/assets/{pipeline-monitor-Bip16T7e.js → pipeline-monitor-DG7RbIOO.js} +298 -298
- package/node_modules/@comis/web/dist/assets/{scheduler-BGgwKd06.js → scheduler-uL1fYKAT.js} +486 -486
- package/node_modules/@comis/web/dist/assets/{security-D15st4xx.js → security-C3DywRLH.js} +389 -389
- package/node_modules/@comis/web/dist/assets/{session-detail-SGEYNJ0M.js → session-detail-BtqCNWXV.js} +294 -294
- package/node_modules/@comis/web/dist/assets/session-key-parser-Dkqcj2Ss.js +1 -0
- package/node_modules/@comis/web/dist/assets/session-list-CJXWa2XT.js +231 -0
- package/node_modules/@comis/web/dist/assets/{setup-wizard-nT0tz9QP.js → setup-wizard-ywn7oJvu.js} +486 -494
- package/node_modules/@comis/web/dist/assets/{skills-D8yVfSUy.js → skills-DX0KYnWD.js} +329 -329
- package/node_modules/@comis/web/dist/assets/{subagents-HHXMeHYo.js → subagents-B8p5YJEB.js} +74 -74
- package/node_modules/@comis/web/dist/assets/{workspace-manager-BQlr10iH.js → workspace-manager-CgzNIrw1.js} +236 -236
- package/node_modules/@comis/web/dist/index.html +3 -2
- package/node_modules/@comis/web/package.json +1 -1
- package/package.json +15 -15
- package/node_modules/@comis/skills/dist/builtin/platform/agents-list-tool.d.ts +0 -19
- package/node_modules/@comis/skills/dist/builtin/platform/agents-list-tool.js +0 -39
- package/node_modules/@comis/web/dist/assets/agent-editor-C26Q_xCs.js +0 -2173
- package/node_modules/@comis/web/dist/assets/billing-view-CtYvBqTE.js +0 -375
- package/node_modules/@comis/web/dist/assets/channel-list-B8dj3O9a.js +0 -323
- package/node_modules/@comis/web/dist/assets/directive-DoeGSK_T.js +0 -1
- package/node_modules/@comis/web/dist/assets/ic-chat-message-CFyDJd0z.js +0 -352
- package/node_modules/@comis/web/dist/assets/ic-data-table-CKUNTxHw.js +0 -277
- package/node_modules/@comis/web/dist/assets/ic-delivery-row-GP5Fkygs.js +0 -67
- package/node_modules/@comis/web/dist/assets/ic-graph-canvas-C8FuSMe1.js +0 -359
- package/node_modules/@comis/web/dist/assets/ic-icon-xeGTVhVG.js +0 -33
- package/node_modules/@comis/web/dist/assets/ic-relative-time-3FqpjeAI.js +0 -12
- package/node_modules/@comis/web/dist/assets/ic-tabs-B7QtM_v8.js +0 -95
- package/node_modules/@comis/web/dist/assets/ic-tag-CPPUnDLF.js +0 -33
- package/node_modules/@comis/web/dist/assets/index-CEcM1R_C.js +0 -2830
- package/node_modules/@comis/web/dist/assets/index-CIJFuItj.css +0 -1
- package/node_modules/@comis/web/dist/assets/observability-types-D7jUtSde.js +0 -1
- package/node_modules/@comis/web/dist/assets/pipeline-builder-DcUUIrm0.js +0 -1496
- package/node_modules/@comis/web/dist/assets/session-key-parser-DPORMVyU.js +0 -1
- package/node_modules/@comis/web/dist/assets/session-list-6ybUTxbY.js +0 -231
|
@@ -1,1496 +0,0 @@
|
|
|
1
|
-
import{s as T,i as M,n as w,r as u,a as A,A as f,b as d,t as O,f as V,I as z}from"./index-CEcM1R_C.js";import"./ic-breadcrumb-CUMpp3BL.js";import{D as G,s as H,c as J,a as F,z as B,N as W,b as K,M as Y,d as X}from"./ic-graph-canvas-C8FuSMe1.js";import"./ic-confirm-dialog-CCDbB04e.js";import{e as Z,s as Q}from"./extract-variables-BM5qyK-s.js";import"./directive-DoeGSK_T.js";const ee=50,q={label:"Untitled Pipeline",onFailure:"fail-fast"};function te(){let e=[],t=[],s={...q},i=new Set,a=null,r={...G},o=null,l=!1,p=[],g=[];const _=new Set;function n(){for(const c of _)c()}function h(){return structuredClone({nodes:e,edges:t,settings:s})}function b(){p.push(h()),p.length>ee&&p.shift(),g=[]}function D(c){e=structuredClone(c.nodes),t=structuredClone(c.edges),s=structuredClone(c.settings)}return{subscribe(c){return _.add(c),()=>{_.delete(c)}},getSnapshot(){return Object.freeze({nodes:[...e],edges:[...t],settings:{...s},selectedNodeIds:new Set(i),selectedEdgeId:a,viewport:{...r},validationResult:o,isDirty:l,canUndo:p.length>0,canRedo:g.length>0})},addNode(c){b(),e.push(c),l=!0,n()},updateNode(c,y){b(),e=e.map(k=>k.id===c?{...k,...y,id:k.id}:k),l=!0,n()},removeNode(c){b(),e=e.filter(y=>y.id!==c),t=t.filter(y=>y.source!==c&&y.target!==c),l=!0,n()},addEdge(c,y){b();const k={id:`${c}->${y}`,source:c,target:y};t.push(k),l=!0,n()},removeEdge(c){b(),t=t.filter(y=>y.id!==c),l=!0,n()},updateSettings(c){b(),s={...s,...c},l=!0,n()},moveNodes(c){b();for(const{nodeId:y,position:k}of c)e=e.map(L=>L.id===y?{...L,position:k}:L);l=!0,n()},selectNode(c,y=!1){a=null,y?(i=new Set(i),i.add(c)):i=new Set([c]),n()},selectAll(){i=new Set(e.map(c=>c.id)),n()},clearSelection(){i=new Set,a=null,n()},selectEdge(c){a=c,i=new Set,n()},clearEdgeSelection(){a=null,n()},setViewport(c){r={...c},n()},setValidation(c){o=c,n()},undo(){if(p.length===0)return;g.push(h());const c=p.pop();D(c),l=!0,n()},redo(){if(g.length===0)return;p.push(h());const c=g.pop();D(c),l=!0,n()},markClean(){l=!1,n()},reset(){e=[],t=[],s={...q},i=new Set,a=null,r={...G},o=null,l=!1,p=[],g=[],n()}}}function j(e,t,s){if(t===s)return!0;const i=new Map;for(const l of e){let p=i.get(l.source);p||(p=[],i.set(l.source,p)),p.push(l.target)}let a=i.get(t);a||(a=[],i.set(t,a)),a.push(s);const r=new Set,o=[s];for(;o.length>0;){const l=o.pop();if(l===t)return!0;if(r.has(l))continue;r.add(l);const p=i.get(l);if(p)for(const g of p)r.has(g)||o.push(g)}return!1}var se=Object.defineProperty,ie=Object.getOwnPropertyDescriptor,E=(e,t,s,i)=>{for(var a=i>1?void 0:i?ie(t,s):t,r=e.length-1,o;r>=0;r--)(o=e[r])&&(a=(i?o(t,s,a):o(a))||a);return i&&a&&se(t,s,a),a};let C=class extends A{constructor(){super(...arguments),this.settings={label:"Untitled Pipeline",onFailure:"fail-fast"},this.hasErrors=!1,this.isDirty=!1,this.validateResult="",this._validating=!1}_dispatchSettingsChange(e){this.dispatchEvent(new CustomEvent("settings-change",{detail:e,bubbles:!0,composed:!0}))}_onLabelChange(e){const t=e.target.value;this._dispatchSettingsChange({label:t})}_onPolicyChange(e){const t=e.target.value;this._dispatchSettingsChange({onFailure:t})}_onTimeoutChange(e){const t=e.target.value,s=t?parseInt(t,10):void 0;this._dispatchSettingsChange({timeoutMs:s&&s>0?s:void 0})}_onMaxTokensChange(e){const t=e.target.value,s=t?parseInt(t,10):void 0,i=this.settings.budget??{};this._dispatchSettingsChange({budget:{...i,maxTokens:s&&s>0?s:void 0}})}_onMaxCostChange(e){const t=e.target.value,s=t?parseFloat(t):void 0,i=this.settings.budget??{};this._dispatchSettingsChange({budget:{...i,maxCost:s&&s>0?s:void 0}})}_onValidate(){this.dispatchEvent(new CustomEvent("validate",{bubbles:!0,composed:!0}))}_onSaveDraft(){this.dispatchEvent(new CustomEvent("save-draft",{bubbles:!0,composed:!0}))}_onRun(){this.dispatchEvent(new CustomEvent("run",{bubbles:!0,composed:!0}))}render(){const e=this.validateResult.startsWith("Error:");return d`
|
|
2
|
-
<div class="settings-bar">
|
|
3
|
-
<div class="field">
|
|
4
|
-
<label>Label:</label>
|
|
5
|
-
<input
|
|
6
|
-
class="field-label-input"
|
|
7
|
-
type="text"
|
|
8
|
-
placeholder="Pipeline label"
|
|
9
|
-
.value=${this.settings.label}
|
|
10
|
-
@input=${this._onLabelChange}
|
|
11
|
-
/>
|
|
12
|
-
</div>
|
|
13
|
-
<div class="field">
|
|
14
|
-
<label>Policy:</label>
|
|
15
|
-
<select .value=${this.settings.onFailure} @change=${this._onPolicyChange}>
|
|
16
|
-
<option value="fail-fast" ?selected=${this.settings.onFailure==="fail-fast"}>fail-fast</option>
|
|
17
|
-
<option value="continue" ?selected=${this.settings.onFailure==="continue"}>continue</option>
|
|
18
|
-
</select>
|
|
19
|
-
</div>
|
|
20
|
-
<div class="field">
|
|
21
|
-
<label>Timeout:</label>
|
|
22
|
-
<input
|
|
23
|
-
class="field-number"
|
|
24
|
-
type="number"
|
|
25
|
-
min="0"
|
|
26
|
-
placeholder="ms"
|
|
27
|
-
.value=${this.settings.timeoutMs!=null?String(this.settings.timeoutMs):""}
|
|
28
|
-
@input=${this._onTimeoutChange}
|
|
29
|
-
/>
|
|
30
|
-
</div>
|
|
31
|
-
<div class="field">
|
|
32
|
-
<label>Max Tokens:</label>
|
|
33
|
-
<input
|
|
34
|
-
class="field-number"
|
|
35
|
-
type="number"
|
|
36
|
-
min="0"
|
|
37
|
-
placeholder="0"
|
|
38
|
-
.value=${this.settings.budget?.maxTokens!=null?String(this.settings.budget.maxTokens):""}
|
|
39
|
-
@input=${this._onMaxTokensChange}
|
|
40
|
-
/>
|
|
41
|
-
</div>
|
|
42
|
-
<div class="field">
|
|
43
|
-
<label>Max Cost:</label>
|
|
44
|
-
<input
|
|
45
|
-
class="field-cost"
|
|
46
|
-
type="number"
|
|
47
|
-
min="0"
|
|
48
|
-
step="0.01"
|
|
49
|
-
placeholder="$0.00"
|
|
50
|
-
.value=${this.settings.budget?.maxCost!=null?String(this.settings.budget.maxCost):""}
|
|
51
|
-
@input=${this._onMaxCostChange}
|
|
52
|
-
/>
|
|
53
|
-
</div>
|
|
54
|
-
<div class="spacer"></div>
|
|
55
|
-
<button
|
|
56
|
-
class="btn-validate"
|
|
57
|
-
?disabled=${this._validating}
|
|
58
|
-
@click=${this._onValidate}
|
|
59
|
-
>
|
|
60
|
-
${this._validating?"Validating...":"Validate"}
|
|
61
|
-
</button>
|
|
62
|
-
<button
|
|
63
|
-
class="btn-save"
|
|
64
|
-
?disabled=${!this.isDirty}
|
|
65
|
-
@click=${this._onSaveDraft}
|
|
66
|
-
>
|
|
67
|
-
Save Draft
|
|
68
|
-
</button>
|
|
69
|
-
<button
|
|
70
|
-
class="btn-run"
|
|
71
|
-
?disabled=${this.hasErrors}
|
|
72
|
-
title=${this.hasErrors?"Fix validation errors before running":"Run pipeline"}
|
|
73
|
-
@click=${this._onRun}
|
|
74
|
-
>
|
|
75
|
-
Run
|
|
76
|
-
</button>
|
|
77
|
-
</div>
|
|
78
|
-
${this.validateResult?d`<div class="validate-result ${e?"is-error":""}">${this.validateResult}</div>`:f}
|
|
79
|
-
`}};C.styles=[T,M`
|
|
80
|
-
:host {
|
|
81
|
-
display: block;
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
.settings-bar {
|
|
85
|
-
display: flex;
|
|
86
|
-
flex-wrap: wrap;
|
|
87
|
-
gap: 8px;
|
|
88
|
-
align-items: center;
|
|
89
|
-
padding: 8px 12px;
|
|
90
|
-
min-height: 48px;
|
|
91
|
-
background: var(--ic-surface);
|
|
92
|
-
border-bottom: 1px solid var(--ic-border);
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
.field {
|
|
96
|
-
display: flex;
|
|
97
|
-
align-items: center;
|
|
98
|
-
gap: 4px;
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
.field label {
|
|
102
|
-
font-size: var(--ic-text-xs);
|
|
103
|
-
color: var(--ic-text-muted);
|
|
104
|
-
white-space: nowrap;
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
.field input,
|
|
108
|
-
.field select {
|
|
109
|
-
background: var(--ic-surface-2);
|
|
110
|
-
border: 1px solid var(--ic-border);
|
|
111
|
-
border-radius: var(--ic-radius-sm);
|
|
112
|
-
padding: 4px 8px;
|
|
113
|
-
color: var(--ic-text);
|
|
114
|
-
font-size: var(--ic-text-sm);
|
|
115
|
-
font-family: inherit;
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
.field input:focus,
|
|
119
|
-
.field select:focus {
|
|
120
|
-
border-color: var(--ic-accent);
|
|
121
|
-
outline: none;
|
|
122
|
-
}
|
|
123
|
-
|
|
124
|
-
.field-label-input {
|
|
125
|
-
width: 160px;
|
|
126
|
-
}
|
|
127
|
-
|
|
128
|
-
.field-number {
|
|
129
|
-
width: 80px;
|
|
130
|
-
}
|
|
131
|
-
|
|
132
|
-
.field-cost {
|
|
133
|
-
width: 90px;
|
|
134
|
-
}
|
|
135
|
-
|
|
136
|
-
.spacer {
|
|
137
|
-
flex: 1;
|
|
138
|
-
}
|
|
139
|
-
|
|
140
|
-
.btn-validate {
|
|
141
|
-
padding: 4px 14px;
|
|
142
|
-
background: var(--ic-accent);
|
|
143
|
-
color: var(--ic-text);
|
|
144
|
-
border: none;
|
|
145
|
-
border-radius: var(--ic-radius-sm);
|
|
146
|
-
font-size: var(--ic-text-sm);
|
|
147
|
-
font-family: inherit;
|
|
148
|
-
cursor: pointer;
|
|
149
|
-
white-space: nowrap;
|
|
150
|
-
}
|
|
151
|
-
|
|
152
|
-
.btn-validate:hover {
|
|
153
|
-
filter: brightness(1.1);
|
|
154
|
-
}
|
|
155
|
-
|
|
156
|
-
.btn-validate:disabled {
|
|
157
|
-
opacity: 0.5;
|
|
158
|
-
cursor: not-allowed;
|
|
159
|
-
}
|
|
160
|
-
|
|
161
|
-
.btn-save {
|
|
162
|
-
padding: 4px 14px;
|
|
163
|
-
background: var(--ic-surface-2);
|
|
164
|
-
color: var(--ic-text-muted);
|
|
165
|
-
border: 1px solid var(--ic-border);
|
|
166
|
-
border-radius: var(--ic-radius-sm);
|
|
167
|
-
font-size: var(--ic-text-sm);
|
|
168
|
-
font-family: inherit;
|
|
169
|
-
cursor: pointer;
|
|
170
|
-
white-space: nowrap;
|
|
171
|
-
}
|
|
172
|
-
.btn-save:hover:not(:disabled) {
|
|
173
|
-
background: var(--ic-accent);
|
|
174
|
-
color: var(--ic-text);
|
|
175
|
-
border-color: var(--ic-accent);
|
|
176
|
-
}
|
|
177
|
-
.btn-save:disabled {
|
|
178
|
-
opacity: 0.5;
|
|
179
|
-
cursor: not-allowed;
|
|
180
|
-
}
|
|
181
|
-
|
|
182
|
-
.btn-run {
|
|
183
|
-
padding: 4px 14px;
|
|
184
|
-
background: #22c55e;
|
|
185
|
-
color: #fff;
|
|
186
|
-
border: none;
|
|
187
|
-
border-radius: var(--ic-radius-sm);
|
|
188
|
-
font-size: var(--ic-text-sm);
|
|
189
|
-
font-family: inherit;
|
|
190
|
-
cursor: pointer;
|
|
191
|
-
white-space: nowrap;
|
|
192
|
-
}
|
|
193
|
-
|
|
194
|
-
.btn-run:hover:not(:disabled) {
|
|
195
|
-
filter: brightness(1.1);
|
|
196
|
-
}
|
|
197
|
-
|
|
198
|
-
.btn-run:disabled {
|
|
199
|
-
opacity: 0.5;
|
|
200
|
-
cursor: not-allowed;
|
|
201
|
-
}
|
|
202
|
-
|
|
203
|
-
.validate-result {
|
|
204
|
-
width: 100%;
|
|
205
|
-
padding: 4px 12px;
|
|
206
|
-
font-size: var(--ic-text-xs);
|
|
207
|
-
color: var(--ic-text-muted);
|
|
208
|
-
}
|
|
209
|
-
|
|
210
|
-
.validate-result.is-error {
|
|
211
|
-
color: var(--ic-error);
|
|
212
|
-
}
|
|
213
|
-
`];E([w({attribute:!1})],C.prototype,"settings",2);E([w({type:Boolean})],C.prototype,"hasErrors",2);E([w({type:Boolean})],C.prototype,"isDirty",2);E([w()],C.prototype,"validateResult",2);E([u()],C.prototype,"_validating",2);C=E([O("ic-graph-settings")],C);var ae=Object.defineProperty,re=Object.getOwnPropertyDescriptor,P=(e,t,s,i)=>{for(var a=i>1?void 0:i?re(t,s):t,r=e.length-1,o;r>=0;r--)(o=e[r])&&(a=(i?o(t,s,a):o(a))||a);return i&&a&&ae(t,s,a),a};let N=class extends A{constructor(){super(...arguments),this.validationResult=null,this._expandErrors=!1,this._expandWarnings=!1}_onMessageClick(e){e.nodeIds&&e.nodeIds.length>0&&this.dispatchEvent(new CustomEvent("highlight-nodes",{detail:{nodeIds:e.nodeIds},bubbles:!0,composed:!0}))}render(){if(!this.validationResult)return f;const{valid:e,errors:t,warnings:s}=this.validationResult,i=t.length,a=s.length;return d`
|
|
214
|
-
<div class="validation-bar">
|
|
215
|
-
<div class="status-row">
|
|
216
|
-
${i>0?d`<span class="status-icon invalid">\u2716</span>`:d`<span class="status-icon valid">\u2714</span>`}
|
|
217
|
-
${i>0?d`<span
|
|
218
|
-
class="badge badge-error"
|
|
219
|
-
@click=${()=>{this._expandErrors=!this._expandErrors}}
|
|
220
|
-
>${i} error${i!==1?"s":""}</span>`:f}
|
|
221
|
-
${a>0?d`<span
|
|
222
|
-
class="badge badge-warning"
|
|
223
|
-
@click=${()=>{this._expandWarnings=!this._expandWarnings}}
|
|
224
|
-
>${a} warning${a!==1?"s":""}</span>`:f}
|
|
225
|
-
${e&&a===0?d`<span class="valid-text">Valid</span>`:f}
|
|
226
|
-
</div>
|
|
227
|
-
${this._expandErrors&&i>0?this._renderMessageList(t):f}
|
|
228
|
-
${this._expandWarnings&&a>0?this._renderMessageList(s):f}
|
|
229
|
-
</div>
|
|
230
|
-
`}_renderMessageList(e){return d`
|
|
231
|
-
<div class="message-list">
|
|
232
|
-
${e.map(t=>d`
|
|
233
|
-
<div class="message-row" @click=${()=>this._onMessageClick(t)}>
|
|
234
|
-
<span class="message-severity ${t.severity}">${t.severity==="error"?"✖":"⚠"}</span>
|
|
235
|
-
<span class="message-text">${t.message}</span>
|
|
236
|
-
${t.nodeIds&&t.nodeIds.length>0?d`<span class="message-nodes">${t.nodeIds.join(", ")}</span>`:f}
|
|
237
|
-
</div>
|
|
238
|
-
`)}
|
|
239
|
-
</div>
|
|
240
|
-
`}};N.styles=[T,M`
|
|
241
|
-
:host {
|
|
242
|
-
display: block;
|
|
243
|
-
position: absolute;
|
|
244
|
-
bottom: 0;
|
|
245
|
-
left: 0;
|
|
246
|
-
right: 0;
|
|
247
|
-
z-index: 10;
|
|
248
|
-
pointer-events: auto;
|
|
249
|
-
}
|
|
250
|
-
|
|
251
|
-
.validation-bar {
|
|
252
|
-
background: var(--ic-surface);
|
|
253
|
-
border-top: 1px solid var(--ic-border);
|
|
254
|
-
}
|
|
255
|
-
|
|
256
|
-
.status-row {
|
|
257
|
-
display: flex;
|
|
258
|
-
align-items: center;
|
|
259
|
-
gap: 12px;
|
|
260
|
-
padding: 6px 12px;
|
|
261
|
-
min-height: 32px;
|
|
262
|
-
cursor: default;
|
|
263
|
-
}
|
|
264
|
-
|
|
265
|
-
.status-icon {
|
|
266
|
-
font-size: 14px;
|
|
267
|
-
line-height: 1;
|
|
268
|
-
}
|
|
269
|
-
|
|
270
|
-
.status-icon.valid {
|
|
271
|
-
color: #22c55e;
|
|
272
|
-
}
|
|
273
|
-
|
|
274
|
-
.status-icon.invalid {
|
|
275
|
-
color: var(--ic-error);
|
|
276
|
-
}
|
|
277
|
-
|
|
278
|
-
.badge {
|
|
279
|
-
display: inline-flex;
|
|
280
|
-
align-items: center;
|
|
281
|
-
gap: 4px;
|
|
282
|
-
padding: 2px 8px;
|
|
283
|
-
border-radius: 9999px;
|
|
284
|
-
font-size: var(--ic-text-xs);
|
|
285
|
-
cursor: pointer;
|
|
286
|
-
user-select: none;
|
|
287
|
-
}
|
|
288
|
-
|
|
289
|
-
.badge:hover {
|
|
290
|
-
filter: brightness(1.2);
|
|
291
|
-
}
|
|
292
|
-
|
|
293
|
-
.badge-error {
|
|
294
|
-
background: color-mix(in srgb, var(--ic-error) 15%, transparent);
|
|
295
|
-
color: var(--ic-error);
|
|
296
|
-
}
|
|
297
|
-
|
|
298
|
-
.badge-warning {
|
|
299
|
-
background: color-mix(in srgb, #eab308 15%, transparent);
|
|
300
|
-
color: #eab308;
|
|
301
|
-
}
|
|
302
|
-
|
|
303
|
-
.valid-text {
|
|
304
|
-
font-size: var(--ic-text-xs);
|
|
305
|
-
color: #22c55e;
|
|
306
|
-
}
|
|
307
|
-
|
|
308
|
-
.message-list {
|
|
309
|
-
max-height: 200px;
|
|
310
|
-
overflow-y: auto;
|
|
311
|
-
border-top: 1px solid var(--ic-border);
|
|
312
|
-
}
|
|
313
|
-
|
|
314
|
-
.message-row {
|
|
315
|
-
display: flex;
|
|
316
|
-
align-items: center;
|
|
317
|
-
gap: 8px;
|
|
318
|
-
padding: 4px 12px;
|
|
319
|
-
font-size: var(--ic-text-xs);
|
|
320
|
-
cursor: pointer;
|
|
321
|
-
color: var(--ic-text-muted);
|
|
322
|
-
}
|
|
323
|
-
|
|
324
|
-
.message-row:hover {
|
|
325
|
-
background: var(--ic-surface-2);
|
|
326
|
-
}
|
|
327
|
-
|
|
328
|
-
.message-severity {
|
|
329
|
-
flex-shrink: 0;
|
|
330
|
-
width: 12px;
|
|
331
|
-
text-align: center;
|
|
332
|
-
}
|
|
333
|
-
|
|
334
|
-
.message-severity.error {
|
|
335
|
-
color: var(--ic-error);
|
|
336
|
-
}
|
|
337
|
-
|
|
338
|
-
.message-severity.warning {
|
|
339
|
-
color: #eab308;
|
|
340
|
-
}
|
|
341
|
-
|
|
342
|
-
.message-text {
|
|
343
|
-
flex: 1;
|
|
344
|
-
overflow: hidden;
|
|
345
|
-
text-overflow: ellipsis;
|
|
346
|
-
white-space: nowrap;
|
|
347
|
-
}
|
|
348
|
-
|
|
349
|
-
.message-nodes {
|
|
350
|
-
flex-shrink: 0;
|
|
351
|
-
font-family: var(--ic-font-mono);
|
|
352
|
-
color: var(--ic-text-dim);
|
|
353
|
-
}
|
|
354
|
-
`];P([w({attribute:!1})],N.prototype,"validationResult",2);P([u()],N.prototype,"_expandErrors",2);P([u()],N.prototype,"_expandWarnings",2);N=P([O("ic-graph-validation")],N);function ne(e,t){const s=[],i=[];if(e.length===0)return s.push({severity:"error",message:"Graph must have at least 1 node"}),{valid:!1,errors:s,warnings:i};e.length>20&&s.push({severity:"error",message:`Graph exceeds maximum of 20 nodes (current: ${e.length})`});const a=new Set,r=new Set;for(const n of e)r.has(n.id)?s.push({severity:"error",message:`Duplicate node ID "${n.id}"`,nodeIds:[n.id]}):r.add(n.id),a.add(n.id);for(const n of e){(!n.task||n.task.trim().length===0)&&s.push({severity:"error",message:`Node "${n.id}" has no task defined`,nodeIds:[n.id]});for(const h of n.dependsOn)h===n.id&&s.push({severity:"error",message:`Node "${n.id}" has a self-dependency`,nodeIds:[n.id]});for(const h of n.dependsOn)h!==n.id&&!a.has(h)&&s.push({severity:"error",message:`Node "${n.id}" depends on missing node "${h}"`,nodeIds:[n.id]})}const o=new Map,l=new Map;for(const n of e)o.set(n.id,0),l.set(n.id,[]);for(const n of t){const h=l.get(n.source);h&&h.push(n.target),o.set(n.target,(o.get(n.target)??0)+1)}for(const n of e)for(const h of n.dependsOn)if(a.has(h)){const b=l.get(h);b&&!b.includes(n.id)&&(b.push(n.id),o.set(n.id,(o.get(n.id)??0)+1))}const p=[];for(const[n,h]of o)h===0&&p.push(n);let g=0;for(;p.length>0;){const n=p.shift();g++;const h=l.get(n);if(h)for(const b of h){const D=(o.get(b)??1)-1;o.set(b,D),D===0&&p.push(b)}}if(g<a.size){const n=[];for(const[h,b]of o)b>0&&n.push(h);s.push({severity:"error",message:`Cycle detected involving nodes: ${n.join(", ")}`,nodeIds:n})}const _=new Set;for(const n of t)_.add(n.source),_.add(n.target);for(const n of e)for(const h of n.dependsOn)a.has(h)&&(_.add(n.id),_.add(h));for(const n of e){if(!n.agentId){const h=n.typeConfig;typeof h?.agent=="string"&&h.agent!==""||Array.isArray(h?.agents)&&h.agents.length>0||Array.isArray(h?.voters)&&h.voters.length>0||Array.isArray(h?.reviewers)&&h.reviewers.length>0||Array.isArray(h?.mappers)&&h.mappers.length>0||i.push({severity:"warning",message:`Node "${n.id}" has no agent assigned`,nodeIds:[n.id]})}n.barrierMode&&n.dependsOn.length<=1&&i.push({severity:"warning",message:`Node "${n.id}" has barrier mode "${n.barrierMode}" but only ${n.dependsOn.length} dependency`,nodeIds:[n.id]}),e.length>1&&!_.has(n.id)&&i.push({severity:"warning",message:`Node "${n.id}" is disconnected from the graph`,nodeIds:[n.id]}),n.typeId&&!n.typeConfig&&s.push({severity:"error",message:`Node "${n.id}" has typeId "${n.typeId}" but no typeConfig`,nodeIds:[n.id]}),!n.typeId&&n.typeConfig&&s.push({severity:"error",message:`Node "${n.id}" has typeConfig but no typeId`,nodeIds:[n.id]}),n.typeId&&(n.retries??0)>0&&["debate","vote","map-reduce","collaborate"].includes(n.typeId)&&i.push({severity:"warning",message:`Node "${n.id}" has retries on a "${n.typeId}" node -- retrying multi-agent execution is expensive`,nodeIds:[n.id]}),n.typeId==="approval-gate"&&(n.retries??0)>0&&i.push({severity:"warning",message:`Node "${n.id}" has retries on an approval-gate -- retrying will re-prompt the user`,nodeIds:[n.id]}),n.contextMode&&n.contextMode!=="full"&&n.dependsOn.length===0&&i.push({severity:"warning",message:`Node "${n.id}" has contextMode "${n.contextMode}" but no dependencies to receive context from`,nodeIds:[n.id]})}return{valid:s.length===0,errors:s,warnings:i}}var oe=Object.defineProperty,de=Object.getOwnPropertyDescriptor,$=(e,t,s,i)=>{for(var a=i>1?void 0:i?de(t,s):t,r=e.length-1,o;r>=0;r--)(o=e[r])&&(a=(i?o(t,s,a):o(a))||a);return i&&a&&oe(t,s,a),a};const U={agent:{label:"Agent",description:"Run a single sub-agent with explicit driver config"},debate:{label:"Debate",description:"Multi-round adversarial debate between agents"},vote:{label:"Vote",description:"Parallel independent voting by multiple agents"},refine:{label:"Refine",description:"Sequential refinement chain through reviewers"},collaborate:{label:"Collaborate",description:"Sequential multi-perspective collaboration"},"approval-gate":{label:"Approval Gate",description:"Human approval checkpoint with timeout"},"map-reduce":{label:"Map-Reduce",description:"Parallel map tasks then single reduce"}};function le(e){switch(e){case"agent":return{agent:"",model:"",max_steps:10};case"debate":return{agents:[],rounds:2,synthesizer:""};case"vote":return{voters:[],prompt_suffix:"",verdict_format:"",min_voters:0};case"refine":return{reviewers:[]};case"collaborate":return{agents:[],rounds:1};case"approval-gate":return{message:"",timeout_minutes:60};case"map-reduce":return{mappers:[],reducer:"",reducer_prompt:""};default:return{}}}let x=class extends A{constructor(){super(...arguments),this.node=null,this.allNodes=[],this.allEdges=[],this.rpcClient=null,this._agents=[],this._models=[],this._allowAgents=[],this._agentsLoading=!0,this._modelsLoading=!0,this._showVariables=!1,this._cycleErrors=new Map,this._agentsLoaded=!1,this._modelsLoaded=!1,this._allowListLoaded=!1,this._textareaRef=null}connectedCallback(){super.connectedCallback(),this._loadAgents(),this._loadModels(),this._loadAllowList()}updated(e){e.has("rpcClient")&&this.rpcClient&&(this._agentsLoaded||this._loadAgents(),this._modelsLoaded||this._loadModels(),this._allowListLoaded||this._loadAllowList())}async _loadAgents(){if(this._agentsLoaded||!this.rpcClient){this._agentsLoading=!1;return}try{const t=(await this.rpcClient.call("agents.list")).agents??[],s=await Promise.allSettled(t.map(i=>this.rpcClient.call("agents.get",{agentId:i})));this._agents=s.filter(i=>i.status==="fulfilled").map(i=>({id:i.value.agentId,model:i.value.config?.model??"unknown",provider:i.value.config?.provider??"unknown",suspended:i.value.suspended===!0})).sort((i,a)=>i.id.localeCompare(a.id)),this._agentsLoaded=!0}catch{this._agents=[]}finally{this._agentsLoading=!1}}async _loadModels(){if(this._modelsLoaded||!this.rpcClient){this._modelsLoading=!1;return}try{const e=await this.rpcClient.call("models.list",{});this._models=(e.providers??[]).flatMap(t=>(t.models??[]).map(s=>({provider:t.name,modelId:typeof s=="string"?s:s.modelId}))),this._modelsLoaded=!0}catch{this._models=[]}finally{this._modelsLoading=!1}}async _loadAllowList(){if(!(this._allowListLoaded||!this.rpcClient))try{const e=await this.rpcClient.call("config.read",{section:"security"});this._allowAgents=e?.agentToAgent?.allowAgents??[],this._allowListLoaded=!0}catch{this._allowAgents=[],this._allowListLoaded=!0}}render(){if(!this.node)return d`<div class="empty-state">Select a node to edit</div>`;const e=this.node,s=this._getDependencies(e).length;return d`
|
|
355
|
-
${this._renderHeader(e)}
|
|
356
|
-
${this._renderTask(e)}
|
|
357
|
-
${e.typeId?f:this._renderAgent(e)}
|
|
358
|
-
${this._renderDependencies(e)}
|
|
359
|
-
${this._renderConstraints(e,s)}
|
|
360
|
-
${this._renderRetries(e)}
|
|
361
|
-
${this._renderContextMode(e)}
|
|
362
|
-
${this._renderNodeType(e)}
|
|
363
|
-
${this._renderModelOverride(e)}
|
|
364
|
-
${this._renderActions(e)}
|
|
365
|
-
`}_renderHeader(e){return d`
|
|
366
|
-
<h3>${e.id}</h3>
|
|
367
|
-
<div class="node-id-label">Node ID: ${e.id}</div>
|
|
368
|
-
`}_renderTask(e){const t=this._getDependencies(e);return d`
|
|
369
|
-
<div class="section-header">Task</div>
|
|
370
|
-
<textarea
|
|
371
|
-
rows="4"
|
|
372
|
-
.value=${e.task}
|
|
373
|
-
@input=${s=>{const i=s.target;this._textareaRef=i,this._dispatchNodeUpdate(e.id,{task:i.value})}}
|
|
374
|
-
placeholder="Describe the task for this node..."
|
|
375
|
-
></textarea>
|
|
376
|
-
<button
|
|
377
|
-
class="variables-toggle"
|
|
378
|
-
@click=${()=>{this._showVariables=!this._showVariables}}
|
|
379
|
-
>
|
|
380
|
-
${this._showVariables?"▼":"▶"} Variables
|
|
381
|
-
</button>
|
|
382
|
-
${this._showVariables?this._renderVariablesList(t):f}
|
|
383
|
-
`}_renderVariablesList(e){return e.length===0?d`<div class="no-variables">No dependencies -- add dependencies to use variables</div>`:d`
|
|
384
|
-
<div class="variables-list">
|
|
385
|
-
${e.map(t=>d`
|
|
386
|
-
<span
|
|
387
|
-
class="variable-chip"
|
|
388
|
-
@click=${()=>this._insertVariable(`{{${t.source}.result}}`)}
|
|
389
|
-
>{{${t.source}.result}}</span>
|
|
390
|
-
`)}
|
|
391
|
-
</div>
|
|
392
|
-
`}_insertVariable(e){const t=this._textareaRef??this.renderRoot.querySelector("textarea");if(!t)return;const s=t.selectionStart,i=t.selectionEnd,a=t.value,r=a.substring(0,s)+e+a.substring(i);t.value=r,t.selectionStart=t.selectionEnd=s+e.length,t.focus(),this.node&&this._dispatchNodeUpdate(this.node.id,{task:r})}_renderAgent(e){const t=this._agents.find(i=>i.id===e.agentId),s=this._allowAgents.length>0&&e.agentId!=null&&e.agentId!==""&&!this._allowAgents.includes(e.agentId);return d`
|
|
393
|
-
<div class="section-header">Agent</div>
|
|
394
|
-
${this._agentsLoading?d`<div class="loading">Loading agents...</div>`:d`
|
|
395
|
-
<div class="agent-row">
|
|
396
|
-
<select
|
|
397
|
-
.value=${e.agentId??""}
|
|
398
|
-
@change=${i=>{const a=i.target.value;this._dispatchNodeUpdate(e.id,{agentId:a||void 0})}}
|
|
399
|
-
>
|
|
400
|
-
<option value="">-- No agent (uses default) --</option>
|
|
401
|
-
${this._agents.map(i=>d`
|
|
402
|
-
<option value=${i.id} ?selected=${i.id===e.agentId}>
|
|
403
|
-
${i.id}${i.suspended?" (suspended)":""}
|
|
404
|
-
</option>
|
|
405
|
-
`)}
|
|
406
|
-
</select>
|
|
407
|
-
${t?d`<span
|
|
408
|
-
class="status-dot ${t.suspended?"status-dot--suspended":"status-dot--active"}"
|
|
409
|
-
title=${t.suspended?"Suspended":"Active"}
|
|
410
|
-
></span>`:f}
|
|
411
|
-
</div>
|
|
412
|
-
${t?d`<div class="agent-info">${t.model} (${t.provider})</div>`:f}
|
|
413
|
-
${s?d`<div class="allowlist-warning">This agent is not in the security allowlist and may be restricted</div>`:f}
|
|
414
|
-
`}
|
|
415
|
-
`}_renderDependencies(e){const t=this.allNodes.filter(s=>s.id!==e.id).slice().sort((s,i)=>{const a=s.position.y-i.position.y;return a!==0?a:s.position.x-i.position.x});return t.length===0?d`
|
|
416
|
-
<div class="section-header">Dependencies</div>
|
|
417
|
-
<div class="loading">No other nodes in graph</div>
|
|
418
|
-
`:d`
|
|
419
|
-
<div class="section-header">Dependencies</div>
|
|
420
|
-
<div class="dep-list">
|
|
421
|
-
${t.map(s=>{const i=this.allEdges.some(r=>r.source===s.id&&r.target===e.id),a=this._cycleErrors.get(s.id)??!1;return d`
|
|
422
|
-
<label class="dep-item">
|
|
423
|
-
<input
|
|
424
|
-
type="checkbox"
|
|
425
|
-
.checked=${i}
|
|
426
|
-
@change=${r=>{const o=r.target.checked;this._handleDependencyChange(e.id,s.id,o)}}
|
|
427
|
-
/>
|
|
428
|
-
<span>${s.id}</span>
|
|
429
|
-
<span class="dep-task-preview">${this._truncate(s.task,30)}</span>
|
|
430
|
-
${a?d`<span class="cycle-error">Would create cycle</span>`:f}
|
|
431
|
-
</label>
|
|
432
|
-
`})}
|
|
433
|
-
</div>
|
|
434
|
-
`}_handleDependencyChange(e,t,s){if(s){if(j(this.allEdges,t,e)){const i=new Map(this._cycleErrors);i.set(t,!0),this._cycleErrors=i,setTimeout(()=>{const a=new Map(this._cycleErrors);a.delete(t),this._cycleErrors=a},2e3);return}this.dispatchEvent(new CustomEvent("edge-add",{detail:{source:t,target:e},bubbles:!0,composed:!0}))}else this.dispatchEvent(new CustomEvent("edge-remove",{detail:{source:t,target:e},bubbles:!0,composed:!0}))}_renderConstraints(e,t){const s={all:"Wait for all dependencies to complete",majority:"Proceed when >50% of dependencies complete","best-effort":"Proceed when any dependency completes"};return d`
|
|
435
|
-
<div class="section-header">Constraints</div>
|
|
436
|
-
|
|
437
|
-
${t>=2?d`
|
|
438
|
-
<div class="constraint-row">
|
|
439
|
-
<div class="constraint-label">Barrier Mode</div>
|
|
440
|
-
<select
|
|
441
|
-
.value=${e.barrierMode??"all"}
|
|
442
|
-
@change=${i=>{const a=i.target.value;this._dispatchNodeUpdate(e.id,{barrierMode:a})}}
|
|
443
|
-
>
|
|
444
|
-
<option value="all">all</option>
|
|
445
|
-
<option value="majority">majority</option>
|
|
446
|
-
<option value="best-effort">best-effort</option>
|
|
447
|
-
</select>
|
|
448
|
-
<div class="constraint-help">
|
|
449
|
-
${s[e.barrierMode??"all"]}
|
|
450
|
-
</div>
|
|
451
|
-
</div>
|
|
452
|
-
`:f}
|
|
453
|
-
|
|
454
|
-
<div class="constraint-row">
|
|
455
|
-
<div class="constraint-label">Timeout (ms)</div>
|
|
456
|
-
<input
|
|
457
|
-
type="number"
|
|
458
|
-
min="0"
|
|
459
|
-
step="1000"
|
|
460
|
-
placeholder="Default"
|
|
461
|
-
.value=${e.timeoutMs!=null?String(e.timeoutMs):""}
|
|
462
|
-
@change=${i=>{const a=i.target.value;this._dispatchNodeUpdate(e.id,{timeoutMs:a?Number(a):void 0})}}
|
|
463
|
-
/>
|
|
464
|
-
</div>
|
|
465
|
-
|
|
466
|
-
<div class="constraint-row">
|
|
467
|
-
<div class="constraint-label">Max Steps</div>
|
|
468
|
-
<input
|
|
469
|
-
type="number"
|
|
470
|
-
min="1"
|
|
471
|
-
max="50"
|
|
472
|
-
placeholder="Default"
|
|
473
|
-
.value=${e.maxSteps!=null?String(e.maxSteps):""}
|
|
474
|
-
@change=${i=>{const a=i.target.value;this._dispatchNodeUpdate(e.id,{maxSteps:a?Number(a):void 0})}}
|
|
475
|
-
/>
|
|
476
|
-
</div>
|
|
477
|
-
`}_renderRetries(e){return d`
|
|
478
|
-
<div class="constraint-row">
|
|
479
|
-
<div class="constraint-label">Retries</div>
|
|
480
|
-
<input
|
|
481
|
-
type="number"
|
|
482
|
-
min="0"
|
|
483
|
-
max="3"
|
|
484
|
-
step="1"
|
|
485
|
-
placeholder="0"
|
|
486
|
-
.value=${e.retries!=null?String(e.retries):""}
|
|
487
|
-
@change=${t=>{const s=t.target.value;this._dispatchNodeUpdate(e.id,{retries:s?Number(s):void 0})}}
|
|
488
|
-
/>
|
|
489
|
-
<div class="constraint-help">Automatic retry with exponential backoff (0-3)</div>
|
|
490
|
-
</div>
|
|
491
|
-
`}_renderContextMode(e){return d`
|
|
492
|
-
<div class="constraint-row">
|
|
493
|
-
<div class="constraint-label">Context Mode</div>
|
|
494
|
-
<select
|
|
495
|
-
.value=${e.contextMode??"full"}
|
|
496
|
-
@change=${t=>{const s=t.target.value;this._dispatchNodeUpdate(e.id,{contextMode:s==="full"?void 0:s})}}
|
|
497
|
-
>
|
|
498
|
-
<option value="full">full (complete upstream outputs)</option>
|
|
499
|
-
<option value="summary">summary (truncated + shared dir ref)</option>
|
|
500
|
-
<option value="none">none (inline templates only)</option>
|
|
501
|
-
</select>
|
|
502
|
-
</div>
|
|
503
|
-
`}_renderNodeType(e){return d`
|
|
504
|
-
<div class="section-header">Node Type</div>
|
|
505
|
-
<select
|
|
506
|
-
class="type-select"
|
|
507
|
-
.value=${e.typeId??""}
|
|
508
|
-
@change=${t=>{const s=t.target.value;s===""?this._dispatchNodeUpdate(e.id,{typeId:void 0,typeConfig:void 0}):this._dispatchNodeUpdate(e.id,{typeId:s,typeConfig:le(s)})}}
|
|
509
|
-
>
|
|
510
|
-
<option value="">Standard (no type driver)</option>
|
|
511
|
-
${Object.entries(U).map(([t,s])=>d`
|
|
512
|
-
<option value=${t} ?selected=${e.typeId===t}>${s.label}</option>
|
|
513
|
-
`)}
|
|
514
|
-
</select>
|
|
515
|
-
${e.typeId&&U[e.typeId]?d`<div class="type-description">${U[e.typeId].description}</div>`:f}
|
|
516
|
-
${e.typeId?this._renderTypeConfigForm(e):f}
|
|
517
|
-
`}_renderTypeConfigForm(e){const t=e.typeConfig??{};switch(e.typeId){case"agent":return this._renderAgentTypeConfig(e,t);case"debate":return this._renderDebateTypeConfig(e,t);case"vote":return this._renderVoteTypeConfig(e,t);case"refine":return this._renderRefineTypeConfig(e,t);case"collaborate":return this._renderCollaborateTypeConfig(e,t);case"approval-gate":return this._renderApprovalGateTypeConfig(e,t);case"map-reduce":return this._renderMapReduceTypeConfig(e,t);default:return f}}_renderAgentTypeConfig(e,t){return d`
|
|
518
|
-
<div class="constraint-row">
|
|
519
|
-
<div class="constraint-label">Agent</div>
|
|
520
|
-
<select
|
|
521
|
-
.value=${String(t.agent??"")}
|
|
522
|
-
@change=${s=>{const i=s.target.value;this._dispatchNodeUpdate(e.id,{typeConfig:{...t,agent:i||void 0}})}}
|
|
523
|
-
>
|
|
524
|
-
<option value="">-- Select agent --</option>
|
|
525
|
-
${this._agents.map(s=>d`
|
|
526
|
-
<option value=${s.id} ?selected=${s.id===t.agent}>${s.id}${s.suspended?" (suspended)":""}</option>
|
|
527
|
-
`)}
|
|
528
|
-
</select>
|
|
529
|
-
</div>
|
|
530
|
-
<div class="constraint-row">
|
|
531
|
-
<div class="constraint-label">Model</div>
|
|
532
|
-
<select
|
|
533
|
-
.value=${String(t.model??"")}
|
|
534
|
-
@change=${s=>{const i=s.target.value;this._dispatchNodeUpdate(e.id,{typeConfig:{...t,model:i||void 0}})}}
|
|
535
|
-
>
|
|
536
|
-
<option value="">-- Default --</option>
|
|
537
|
-
${this._models.map(s=>d`
|
|
538
|
-
<option value=${s.modelId} ?selected=${s.modelId===t.model}>${s.modelId}</option>
|
|
539
|
-
`)}
|
|
540
|
-
</select>
|
|
541
|
-
</div>
|
|
542
|
-
<div class="constraint-row">
|
|
543
|
-
<div class="constraint-label">Max Steps</div>
|
|
544
|
-
<input type="number" min="1" max="50" placeholder="10"
|
|
545
|
-
.value=${t.max_steps!=null?String(t.max_steps):""}
|
|
546
|
-
@change=${s=>{const i=s.target.value;this._dispatchNodeUpdate(e.id,{typeConfig:{...t,max_steps:i?Number(i):void 0}})}}
|
|
547
|
-
/>
|
|
548
|
-
</div>
|
|
549
|
-
`}_renderDebateTypeConfig(e,t){const s=Array.isArray(t.agents)?t.agents:[];return d`
|
|
550
|
-
<div class="constraint-label">Debate Agents (min 2)</div>
|
|
551
|
-
<div class="type-agent-list">
|
|
552
|
-
${s.map((i,a)=>d`
|
|
553
|
-
<div class="type-agent-row">
|
|
554
|
-
<select .value=${i} @change=${r=>{const o=r.target.value,l=[...s];l[a]=o,this._dispatchNodeUpdate(e.id,{typeConfig:{...t,agents:l}})}}>
|
|
555
|
-
<option value="">-- Select agent --</option>
|
|
556
|
-
${this._agents.map(r=>d`<option value=${r.id} ?selected=${r.id===i}>${r.id}${r.suspended?" (suspended)":""}</option>`)}
|
|
557
|
-
</select>
|
|
558
|
-
<button class="type-remove-btn" @click=${()=>{this._dispatchNodeUpdate(e.id,{typeConfig:{...t,agents:s.filter((r,o)=>o!==a)}})}}>Remove</button>
|
|
559
|
-
</div>
|
|
560
|
-
`)}
|
|
561
|
-
<button class="type-add-btn" @click=${()=>{this._dispatchNodeUpdate(e.id,{typeConfig:{...t,agents:[...s,""]}})}}>+ Add agent</button>
|
|
562
|
-
</div>
|
|
563
|
-
<div class="constraint-row">
|
|
564
|
-
<div class="constraint-label">Rounds</div>
|
|
565
|
-
<input type="number" min="1" max="5" placeholder="2"
|
|
566
|
-
.value=${t.rounds!=null?String(t.rounds):""}
|
|
567
|
-
@change=${i=>{const a=i.target.value;this._dispatchNodeUpdate(e.id,{typeConfig:{...t,rounds:a?Number(a):void 0}})}}
|
|
568
|
-
/>
|
|
569
|
-
</div>
|
|
570
|
-
<div class="constraint-row">
|
|
571
|
-
<div class="constraint-label">Synthesizer</div>
|
|
572
|
-
<select .value=${String(t.synthesizer??"")} @change=${i=>{const a=i.target.value;this._dispatchNodeUpdate(e.id,{typeConfig:{...t,synthesizer:a||void 0}})}}>
|
|
573
|
-
<option value="">-- None --</option>
|
|
574
|
-
${this._agents.map(i=>d`<option value=${i.id} ?selected=${i.id===t.synthesizer}>${i.id}${i.suspended?" (suspended)":""}</option>`)}
|
|
575
|
-
</select>
|
|
576
|
-
</div>
|
|
577
|
-
`}_renderVoteTypeConfig(e,t){const s=Array.isArray(t.voters)?t.voters:[];return d`
|
|
578
|
-
<div class="constraint-label">Voters (min 2)</div>
|
|
579
|
-
<div class="type-agent-list">
|
|
580
|
-
${s.map((i,a)=>d`
|
|
581
|
-
<div class="type-agent-row">
|
|
582
|
-
<select .value=${i} @change=${r=>{const o=r.target.value,l=[...s];l[a]=o,this._dispatchNodeUpdate(e.id,{typeConfig:{...t,voters:l}})}}>
|
|
583
|
-
<option value="">-- Select agent --</option>
|
|
584
|
-
${this._agents.map(r=>d`<option value=${r.id} ?selected=${r.id===i}>${r.id}${r.suspended?" (suspended)":""}</option>`)}
|
|
585
|
-
</select>
|
|
586
|
-
<button class="type-remove-btn" @click=${()=>{this._dispatchNodeUpdate(e.id,{typeConfig:{...t,voters:s.filter((r,o)=>o!==a)}})}}>Remove</button>
|
|
587
|
-
</div>
|
|
588
|
-
`)}
|
|
589
|
-
<button class="type-add-btn" @click=${()=>{this._dispatchNodeUpdate(e.id,{typeConfig:{...t,voters:[...s,""]}})}}>+ Add voter</button>
|
|
590
|
-
</div>
|
|
591
|
-
<div class="constraint-row">
|
|
592
|
-
<div class="constraint-label">Verdict Format</div>
|
|
593
|
-
<input type="text" placeholder="YES or NO with justification"
|
|
594
|
-
.value=${String(t.verdict_format??"")}
|
|
595
|
-
@change=${i=>{const a=i.target.value;this._dispatchNodeUpdate(e.id,{typeConfig:{...t,verdict_format:a||void 0}})}}
|
|
596
|
-
/>
|
|
597
|
-
</div>
|
|
598
|
-
<div class="constraint-row">
|
|
599
|
-
<div class="constraint-label">Prompt Suffix</div>
|
|
600
|
-
<textarea rows="2" placeholder="Additional instructions for voters..."
|
|
601
|
-
.value=${String(t.prompt_suffix??"")}
|
|
602
|
-
@change=${i=>{const a=i.target.value;this._dispatchNodeUpdate(e.id,{typeConfig:{...t,prompt_suffix:a||void 0}})}}
|
|
603
|
-
></textarea>
|
|
604
|
-
</div>
|
|
605
|
-
<div class="constraint-row">
|
|
606
|
-
<div class="constraint-label">Min Voters</div>
|
|
607
|
-
<input type="number" min="0" max="20" placeholder="0 (all)"
|
|
608
|
-
.value=${t.min_voters!=null?String(t.min_voters):""}
|
|
609
|
-
@change=${i=>{const a=i.target.value;this._dispatchNodeUpdate(e.id,{typeConfig:{...t,min_voters:a?Number(a):void 0}})}}
|
|
610
|
-
/>
|
|
611
|
-
</div>
|
|
612
|
-
`}_renderRefineTypeConfig(e,t){const s=Array.isArray(t.reviewers)?t.reviewers:[];return d`
|
|
613
|
-
<div class="constraint-label">Reviewers (min 2, sequential order)</div>
|
|
614
|
-
<div class="type-agent-list">
|
|
615
|
-
${s.map((i,a)=>d`
|
|
616
|
-
<div class="type-agent-row">
|
|
617
|
-
<select .value=${i} @change=${r=>{const o=r.target.value,l=[...s];l[a]=o,this._dispatchNodeUpdate(e.id,{typeConfig:{...t,reviewers:l}})}}>
|
|
618
|
-
<option value="">-- Select agent --</option>
|
|
619
|
-
${this._agents.map(r=>d`<option value=${r.id} ?selected=${r.id===i}>${r.id}${r.suspended?" (suspended)":""}</option>`)}
|
|
620
|
-
</select>
|
|
621
|
-
<button class="type-remove-btn" @click=${()=>{this._dispatchNodeUpdate(e.id,{typeConfig:{...t,reviewers:s.filter((r,o)=>o!==a)}})}}>Remove</button>
|
|
622
|
-
</div>
|
|
623
|
-
`)}
|
|
624
|
-
<button class="type-add-btn" @click=${()=>{this._dispatchNodeUpdate(e.id,{typeConfig:{...t,reviewers:[...s,""]}})}}>+ Add reviewer</button>
|
|
625
|
-
</div>
|
|
626
|
-
`}_renderCollaborateTypeConfig(e,t){const s=Array.isArray(t.agents)?t.agents:[];return d`
|
|
627
|
-
<div class="constraint-label">Collaborators (min 2)</div>
|
|
628
|
-
<div class="type-agent-list">
|
|
629
|
-
${s.map((i,a)=>d`
|
|
630
|
-
<div class="type-agent-row">
|
|
631
|
-
<select .value=${i} @change=${r=>{const o=r.target.value,l=[...s];l[a]=o,this._dispatchNodeUpdate(e.id,{typeConfig:{...t,agents:l}})}}>
|
|
632
|
-
<option value="">-- Select agent --</option>
|
|
633
|
-
${this._agents.map(r=>d`<option value=${r.id} ?selected=${r.id===i}>${r.id}${r.suspended?" (suspended)":""}</option>`)}
|
|
634
|
-
</select>
|
|
635
|
-
<button class="type-remove-btn" @click=${()=>{this._dispatchNodeUpdate(e.id,{typeConfig:{...t,agents:s.filter((r,o)=>o!==a)}})}}>Remove</button>
|
|
636
|
-
</div>
|
|
637
|
-
`)}
|
|
638
|
-
<button class="type-add-btn" @click=${()=>{this._dispatchNodeUpdate(e.id,{typeConfig:{...t,agents:[...s,""]}})}}>+ Add collaborator</button>
|
|
639
|
-
</div>
|
|
640
|
-
<div class="constraint-row">
|
|
641
|
-
<div class="constraint-label">Rounds</div>
|
|
642
|
-
<input type="number" min="1" max="3" placeholder="1"
|
|
643
|
-
.value=${t.rounds!=null?String(t.rounds):""}
|
|
644
|
-
@change=${i=>{const a=i.target.value;this._dispatchNodeUpdate(e.id,{typeConfig:{...t,rounds:a?Number(a):void 0}})}}
|
|
645
|
-
/>
|
|
646
|
-
</div>
|
|
647
|
-
`}_renderApprovalGateTypeConfig(e,t){return d`
|
|
648
|
-
<div class="constraint-row">
|
|
649
|
-
<div class="constraint-label">Message</div>
|
|
650
|
-
<textarea rows="2" placeholder="Approval request message..."
|
|
651
|
-
.value=${String(t.message??"")}
|
|
652
|
-
@change=${s=>{const i=s.target.value;this._dispatchNodeUpdate(e.id,{typeConfig:{...t,message:i||void 0}})}}
|
|
653
|
-
></textarea>
|
|
654
|
-
</div>
|
|
655
|
-
<div class="constraint-row">
|
|
656
|
-
<div class="constraint-label">Timeout (min)</div>
|
|
657
|
-
<input type="number" min="1" max="1440" placeholder="60"
|
|
658
|
-
.value=${t.timeout_minutes!=null?String(t.timeout_minutes):""}
|
|
659
|
-
@change=${s=>{const i=s.target.value;this._dispatchNodeUpdate(e.id,{typeConfig:{...t,timeout_minutes:i?Number(i):void 0}})}}
|
|
660
|
-
/>
|
|
661
|
-
</div>
|
|
662
|
-
`}_renderMapReduceTypeConfig(e,t){const s=Array.isArray(t.mappers)?t.mappers:[];return d`
|
|
663
|
-
<div class="constraint-label">Mappers (min 2)</div>
|
|
664
|
-
<div class="type-agent-list">
|
|
665
|
-
${s.map((i,a)=>d`
|
|
666
|
-
<div class="type-mapper-row">
|
|
667
|
-
<div class="type-mapper-header">
|
|
668
|
-
<span class="constraint-label">Mapper ${a+1}</span>
|
|
669
|
-
<button class="type-remove-btn" @click=${()=>{this._dispatchNodeUpdate(e.id,{typeConfig:{...t,mappers:s.filter((r,o)=>o!==a)}})}}>Remove</button>
|
|
670
|
-
</div>
|
|
671
|
-
<select .value=${i.agent??""} @change=${r=>{const o=r.target.value,l=[...s];l[a]={...i,agent:o},this._dispatchNodeUpdate(e.id,{typeConfig:{...t,mappers:l}})}}>
|
|
672
|
-
<option value="">-- Select agent --</option>
|
|
673
|
-
${this._agents.map(r=>d`<option value=${r.id} ?selected=${r.id===i.agent}>${r.id}${r.suspended?" (suspended)":""}</option>`)}
|
|
674
|
-
</select>
|
|
675
|
-
<input type="text" placeholder="Task suffix (optional)"
|
|
676
|
-
.value=${i.task_suffix??""}
|
|
677
|
-
@change=${r=>{const o=r.target.value,l=[...s];l[a]={...i,task_suffix:o||void 0},this._dispatchNodeUpdate(e.id,{typeConfig:{...t,mappers:l}})}}
|
|
678
|
-
/>
|
|
679
|
-
</div>
|
|
680
|
-
`)}
|
|
681
|
-
<button class="type-add-btn" @click=${()=>{this._dispatchNodeUpdate(e.id,{typeConfig:{...t,mappers:[...s,{agent:""}]}})}}>+ Add mapper</button>
|
|
682
|
-
</div>
|
|
683
|
-
<div class="constraint-row">
|
|
684
|
-
<div class="constraint-label">Reducer Agent</div>
|
|
685
|
-
<select .value=${String(t.reducer??"")} @change=${i=>{const a=i.target.value;this._dispatchNodeUpdate(e.id,{typeConfig:{...t,reducer:a||void 0}})}}>
|
|
686
|
-
<option value="">-- Select agent --</option>
|
|
687
|
-
${this._agents.map(i=>d`<option value=${i.id} ?selected=${i.id===t.reducer}>${i.id}${i.suspended?" (suspended)":""}</option>`)}
|
|
688
|
-
</select>
|
|
689
|
-
</div>
|
|
690
|
-
<div class="constraint-row">
|
|
691
|
-
<div class="constraint-label">Reducer Prompt</div>
|
|
692
|
-
<textarea rows="2" placeholder="Instructions for the reducer..."
|
|
693
|
-
.value=${String(t.reducer_prompt??"")}
|
|
694
|
-
@change=${i=>{const a=i.target.value;this._dispatchNodeUpdate(e.id,{typeConfig:{...t,reducer_prompt:a||void 0}})}}
|
|
695
|
-
></textarea>
|
|
696
|
-
</div>
|
|
697
|
-
`}_renderModelOverride(e){const t=new Map;for(const s of this._models){let i=t.get(s.provider);i||(i=[],t.set(s.provider,i)),i.push(s.modelId)}return d`
|
|
698
|
-
<div class="section-header">Model Override</div>
|
|
699
|
-
${this._modelsLoading?d`<div class="loading">Loading models...</div>`:d`
|
|
700
|
-
<select
|
|
701
|
-
.value=${e.modelId??""}
|
|
702
|
-
@change=${s=>{const i=s.target.value;this._dispatchNodeUpdate(e.id,{modelId:i||void 0})}}
|
|
703
|
-
>
|
|
704
|
-
<option value="">-- Use agent default --</option>
|
|
705
|
-
${[...t.entries()].map(([s,i])=>d`
|
|
706
|
-
<optgroup label=${s}>
|
|
707
|
-
${i.map(a=>d`
|
|
708
|
-
<option
|
|
709
|
-
value=${a}
|
|
710
|
-
?selected=${a===e.modelId}
|
|
711
|
-
>
|
|
712
|
-
${a}
|
|
713
|
-
</option>
|
|
714
|
-
`)}
|
|
715
|
-
</optgroup>
|
|
716
|
-
`)}
|
|
717
|
-
</select>
|
|
718
|
-
`}
|
|
719
|
-
`}_renderActions(e){return d`
|
|
720
|
-
<div class="actions">
|
|
721
|
-
<button
|
|
722
|
-
class="btn btn-accent"
|
|
723
|
-
@click=${()=>{this.dispatchEvent(new CustomEvent("node-duplicate",{detail:{nodeId:e.id},bubbles:!0,composed:!0}))}}
|
|
724
|
-
>
|
|
725
|
-
Duplicate
|
|
726
|
-
</button>
|
|
727
|
-
<button
|
|
728
|
-
class="btn btn-danger"
|
|
729
|
-
@click=${()=>{this.dispatchEvent(new CustomEvent("node-delete",{detail:{nodeId:e.id},bubbles:!0,composed:!0}))}}
|
|
730
|
-
>
|
|
731
|
-
Delete
|
|
732
|
-
</button>
|
|
733
|
-
</div>
|
|
734
|
-
`}_getDependencies(e){return this.allEdges.filter(t=>t.target===e.id)}_dispatchNodeUpdate(e,t){this.dispatchEvent(new CustomEvent("node-update",{detail:{nodeId:e,partial:t},bubbles:!0,composed:!0}))}_truncate(e,t){return e.length>t?e.slice(0,t-1)+"…":e}};x.styles=[T,V,M`
|
|
735
|
-
:host {
|
|
736
|
-
display: block;
|
|
737
|
-
width: 320px;
|
|
738
|
-
border-left: 1px solid var(--ic-border);
|
|
739
|
-
overflow-y: auto;
|
|
740
|
-
background: var(--ic-surface);
|
|
741
|
-
padding: 16px;
|
|
742
|
-
}
|
|
743
|
-
|
|
744
|
-
.section-header {
|
|
745
|
-
font-size: var(--ic-text-sm);
|
|
746
|
-
font-weight: 600;
|
|
747
|
-
color: var(--ic-text);
|
|
748
|
-
margin: 16px 0 8px;
|
|
749
|
-
}
|
|
750
|
-
|
|
751
|
-
.section-header:first-of-type {
|
|
752
|
-
margin-top: 0;
|
|
753
|
-
}
|
|
754
|
-
|
|
755
|
-
h3 {
|
|
756
|
-
margin: 0 0 4px;
|
|
757
|
-
font-size: var(--ic-text-base);
|
|
758
|
-
color: var(--ic-text);
|
|
759
|
-
}
|
|
760
|
-
|
|
761
|
-
.node-id-label {
|
|
762
|
-
font-size: var(--ic-text-xs);
|
|
763
|
-
color: var(--ic-text-muted);
|
|
764
|
-
margin-bottom: 12px;
|
|
765
|
-
}
|
|
766
|
-
|
|
767
|
-
/* Form elements */
|
|
768
|
-
textarea,
|
|
769
|
-
input[type="text"],
|
|
770
|
-
input[type="number"],
|
|
771
|
-
select {
|
|
772
|
-
width: 100%;
|
|
773
|
-
padding: 6px 8px;
|
|
774
|
-
border: 1px solid var(--ic-border);
|
|
775
|
-
border-radius: var(--ic-radius-sm);
|
|
776
|
-
background: var(--ic-bg);
|
|
777
|
-
color: var(--ic-text);
|
|
778
|
-
font-family: var(--ic-font-sans);
|
|
779
|
-
font-size: var(--ic-text-sm);
|
|
780
|
-
}
|
|
781
|
-
|
|
782
|
-
textarea {
|
|
783
|
-
resize: vertical;
|
|
784
|
-
font-family: var(--ic-font-mono);
|
|
785
|
-
line-height: 1.4;
|
|
786
|
-
}
|
|
787
|
-
|
|
788
|
-
textarea:focus,
|
|
789
|
-
input:focus,
|
|
790
|
-
select:focus {
|
|
791
|
-
outline: 2px solid var(--ic-accent);
|
|
792
|
-
outline-offset: -1px;
|
|
793
|
-
border-color: var(--ic-accent);
|
|
794
|
-
}
|
|
795
|
-
|
|
796
|
-
/* Variables toggle */
|
|
797
|
-
.variables-toggle {
|
|
798
|
-
display: inline-flex;
|
|
799
|
-
align-items: center;
|
|
800
|
-
gap: 4px;
|
|
801
|
-
margin-top: 4px;
|
|
802
|
-
padding: 2px 8px;
|
|
803
|
-
border: 1px solid var(--ic-border);
|
|
804
|
-
border-radius: var(--ic-radius-sm);
|
|
805
|
-
background: transparent;
|
|
806
|
-
color: var(--ic-text-muted);
|
|
807
|
-
font-size: var(--ic-text-xs);
|
|
808
|
-
cursor: pointer;
|
|
809
|
-
}
|
|
810
|
-
|
|
811
|
-
.variables-toggle:hover {
|
|
812
|
-
background: var(--ic-surface-2);
|
|
813
|
-
color: var(--ic-text);
|
|
814
|
-
}
|
|
815
|
-
|
|
816
|
-
.variables-list {
|
|
817
|
-
display: flex;
|
|
818
|
-
flex-wrap: wrap;
|
|
819
|
-
gap: 4px;
|
|
820
|
-
margin-top: 6px;
|
|
821
|
-
}
|
|
822
|
-
|
|
823
|
-
.variable-chip {
|
|
824
|
-
display: inline-block;
|
|
825
|
-
padding: 2px 8px;
|
|
826
|
-
border: 1px solid var(--ic-border);
|
|
827
|
-
border-radius: 9999px;
|
|
828
|
-
background: var(--ic-surface-2);
|
|
829
|
-
color: var(--ic-text-muted);
|
|
830
|
-
font-family: var(--ic-font-mono);
|
|
831
|
-
font-size: var(--ic-text-xs);
|
|
832
|
-
cursor: pointer;
|
|
833
|
-
user-select: none;
|
|
834
|
-
}
|
|
835
|
-
|
|
836
|
-
.variable-chip:hover {
|
|
837
|
-
background: color-mix(in srgb, var(--ic-accent) 15%, transparent);
|
|
838
|
-
color: var(--ic-accent);
|
|
839
|
-
border-color: var(--ic-accent);
|
|
840
|
-
}
|
|
841
|
-
|
|
842
|
-
.no-variables {
|
|
843
|
-
font-size: var(--ic-text-xs);
|
|
844
|
-
color: var(--ic-text-dim);
|
|
845
|
-
font-style: italic;
|
|
846
|
-
}
|
|
847
|
-
|
|
848
|
-
/* Agent info */
|
|
849
|
-
.agent-row {
|
|
850
|
-
display: flex;
|
|
851
|
-
align-items: center;
|
|
852
|
-
gap: 8px;
|
|
853
|
-
}
|
|
854
|
-
|
|
855
|
-
.agent-row select {
|
|
856
|
-
flex: 1;
|
|
857
|
-
}
|
|
858
|
-
|
|
859
|
-
.status-dot {
|
|
860
|
-
width: 8px;
|
|
861
|
-
height: 8px;
|
|
862
|
-
border-radius: 50%;
|
|
863
|
-
flex-shrink: 0;
|
|
864
|
-
}
|
|
865
|
-
|
|
866
|
-
.status-dot--active {
|
|
867
|
-
background: var(--ic-success, #22c55e);
|
|
868
|
-
}
|
|
869
|
-
|
|
870
|
-
.status-dot--suspended {
|
|
871
|
-
background: var(--ic-danger, #ef4444);
|
|
872
|
-
}
|
|
873
|
-
|
|
874
|
-
.agent-info {
|
|
875
|
-
font-size: var(--ic-text-xs);
|
|
876
|
-
color: var(--ic-text-muted);
|
|
877
|
-
margin-top: 4px;
|
|
878
|
-
}
|
|
879
|
-
|
|
880
|
-
.allowlist-warning {
|
|
881
|
-
margin-top: 6px;
|
|
882
|
-
padding: 6px 8px;
|
|
883
|
-
border-radius: var(--ic-radius-sm);
|
|
884
|
-
background: color-mix(in srgb, var(--ic-warning, #f59e0b) 10%, transparent);
|
|
885
|
-
border: 1px solid color-mix(in srgb, var(--ic-warning, #f59e0b) 30%, transparent);
|
|
886
|
-
color: var(--ic-warning, #f59e0b);
|
|
887
|
-
font-size: var(--ic-text-xs);
|
|
888
|
-
}
|
|
889
|
-
|
|
890
|
-
/* Dependency checkboxes */
|
|
891
|
-
.dep-list {
|
|
892
|
-
display: flex;
|
|
893
|
-
flex-direction: column;
|
|
894
|
-
gap: 4px;
|
|
895
|
-
}
|
|
896
|
-
|
|
897
|
-
.dep-item {
|
|
898
|
-
display: flex;
|
|
899
|
-
align-items: center;
|
|
900
|
-
gap: 6px;
|
|
901
|
-
font-size: var(--ic-text-sm);
|
|
902
|
-
color: var(--ic-text);
|
|
903
|
-
}
|
|
904
|
-
|
|
905
|
-
.dep-item input[type="checkbox"] {
|
|
906
|
-
width: auto;
|
|
907
|
-
margin: 0;
|
|
908
|
-
cursor: pointer;
|
|
909
|
-
}
|
|
910
|
-
|
|
911
|
-
.dep-task-preview {
|
|
912
|
-
color: var(--ic-text-muted);
|
|
913
|
-
font-size: var(--ic-text-xs);
|
|
914
|
-
overflow: hidden;
|
|
915
|
-
text-overflow: ellipsis;
|
|
916
|
-
white-space: nowrap;
|
|
917
|
-
max-width: 150px;
|
|
918
|
-
}
|
|
919
|
-
|
|
920
|
-
.cycle-error {
|
|
921
|
-
color: var(--ic-danger, #ef4444);
|
|
922
|
-
font-size: var(--ic-text-xs);
|
|
923
|
-
margin-left: 4px;
|
|
924
|
-
}
|
|
925
|
-
|
|
926
|
-
/* Constraint fields */
|
|
927
|
-
.constraint-row {
|
|
928
|
-
margin-bottom: 8px;
|
|
929
|
-
}
|
|
930
|
-
|
|
931
|
-
.constraint-label {
|
|
932
|
-
font-size: var(--ic-text-xs);
|
|
933
|
-
color: var(--ic-text-muted);
|
|
934
|
-
margin-bottom: 2px;
|
|
935
|
-
}
|
|
936
|
-
|
|
937
|
-
.constraint-help {
|
|
938
|
-
font-size: var(--ic-text-xs);
|
|
939
|
-
color: var(--ic-text-dim);
|
|
940
|
-
margin-top: 2px;
|
|
941
|
-
}
|
|
942
|
-
|
|
943
|
-
/* Actions */
|
|
944
|
-
.actions {
|
|
945
|
-
display: flex;
|
|
946
|
-
gap: 8px;
|
|
947
|
-
margin-top: 16px;
|
|
948
|
-
}
|
|
949
|
-
|
|
950
|
-
.btn {
|
|
951
|
-
flex: 1;
|
|
952
|
-
padding: 6px 12px;
|
|
953
|
-
border: 1px solid var(--ic-border);
|
|
954
|
-
border-radius: var(--ic-radius-sm);
|
|
955
|
-
font-size: var(--ic-text-sm);
|
|
956
|
-
cursor: pointer;
|
|
957
|
-
text-align: center;
|
|
958
|
-
}
|
|
959
|
-
|
|
960
|
-
.btn-accent {
|
|
961
|
-
background: color-mix(in srgb, var(--ic-accent) 10%, transparent);
|
|
962
|
-
color: var(--ic-accent);
|
|
963
|
-
border-color: color-mix(in srgb, var(--ic-accent) 30%, transparent);
|
|
964
|
-
}
|
|
965
|
-
|
|
966
|
-
.btn-accent:hover {
|
|
967
|
-
background: color-mix(in srgb, var(--ic-accent) 20%, transparent);
|
|
968
|
-
}
|
|
969
|
-
|
|
970
|
-
.btn-danger {
|
|
971
|
-
background: color-mix(in srgb, var(--ic-danger, #ef4444) 10%, transparent);
|
|
972
|
-
color: var(--ic-danger, #ef4444);
|
|
973
|
-
border-color: color-mix(in srgb, var(--ic-danger, #ef4444) 30%, transparent);
|
|
974
|
-
}
|
|
975
|
-
|
|
976
|
-
.btn-danger:hover {
|
|
977
|
-
background: color-mix(in srgb, var(--ic-danger, #ef4444) 20%, transparent);
|
|
978
|
-
}
|
|
979
|
-
|
|
980
|
-
/* Loading state */
|
|
981
|
-
.loading {
|
|
982
|
-
font-size: var(--ic-text-xs);
|
|
983
|
-
color: var(--ic-text-dim);
|
|
984
|
-
font-style: italic;
|
|
985
|
-
}
|
|
986
|
-
|
|
987
|
-
.empty-state {
|
|
988
|
-
padding: 32px 16px;
|
|
989
|
-
text-align: center;
|
|
990
|
-
color: var(--ic-text-muted);
|
|
991
|
-
font-size: var(--ic-text-sm);
|
|
992
|
-
}
|
|
993
|
-
|
|
994
|
-
/* Node type system */
|
|
995
|
-
.type-select {
|
|
996
|
-
width: 100%;
|
|
997
|
-
padding: 6px 8px;
|
|
998
|
-
background: var(--ic-input-bg);
|
|
999
|
-
color: var(--ic-text);
|
|
1000
|
-
border: 1px solid var(--ic-border);
|
|
1001
|
-
border-radius: 4px;
|
|
1002
|
-
font-size: var(--ic-text-sm);
|
|
1003
|
-
margin-bottom: 8px;
|
|
1004
|
-
}
|
|
1005
|
-
|
|
1006
|
-
.type-description {
|
|
1007
|
-
font-size: var(--ic-text-xs);
|
|
1008
|
-
color: var(--ic-text-secondary);
|
|
1009
|
-
margin-bottom: 12px;
|
|
1010
|
-
}
|
|
1011
|
-
|
|
1012
|
-
.type-agent-list {
|
|
1013
|
-
display: flex;
|
|
1014
|
-
flex-direction: column;
|
|
1015
|
-
gap: 4px;
|
|
1016
|
-
margin-bottom: 8px;
|
|
1017
|
-
}
|
|
1018
|
-
|
|
1019
|
-
.type-agent-row {
|
|
1020
|
-
display: flex;
|
|
1021
|
-
gap: 4px;
|
|
1022
|
-
align-items: center;
|
|
1023
|
-
}
|
|
1024
|
-
|
|
1025
|
-
.type-agent-row select {
|
|
1026
|
-
flex: 1;
|
|
1027
|
-
}
|
|
1028
|
-
|
|
1029
|
-
.type-remove-btn {
|
|
1030
|
-
background: none;
|
|
1031
|
-
border: 1px solid var(--ic-border);
|
|
1032
|
-
color: var(--ic-text-secondary);
|
|
1033
|
-
border-radius: 4px;
|
|
1034
|
-
padding: 4px 8px;
|
|
1035
|
-
cursor: pointer;
|
|
1036
|
-
font-size: var(--ic-text-xs);
|
|
1037
|
-
}
|
|
1038
|
-
|
|
1039
|
-
.type-remove-btn:hover {
|
|
1040
|
-
border-color: var(--ic-error);
|
|
1041
|
-
color: var(--ic-error);
|
|
1042
|
-
}
|
|
1043
|
-
|
|
1044
|
-
.type-add-btn {
|
|
1045
|
-
background: none;
|
|
1046
|
-
border: 1px dashed var(--ic-border);
|
|
1047
|
-
color: var(--ic-text-secondary);
|
|
1048
|
-
border-radius: 4px;
|
|
1049
|
-
padding: 6px;
|
|
1050
|
-
cursor: pointer;
|
|
1051
|
-
font-size: var(--ic-text-xs);
|
|
1052
|
-
width: 100%;
|
|
1053
|
-
text-align: center;
|
|
1054
|
-
}
|
|
1055
|
-
|
|
1056
|
-
.type-add-btn:hover {
|
|
1057
|
-
border-color: var(--ic-accent);
|
|
1058
|
-
color: var(--ic-accent);
|
|
1059
|
-
}
|
|
1060
|
-
|
|
1061
|
-
.type-mapper-row {
|
|
1062
|
-
display: flex;
|
|
1063
|
-
flex-direction: column;
|
|
1064
|
-
gap: 4px;
|
|
1065
|
-
padding: 8px;
|
|
1066
|
-
border: 1px solid var(--ic-border);
|
|
1067
|
-
border-radius: 4px;
|
|
1068
|
-
margin-bottom: 4px;
|
|
1069
|
-
}
|
|
1070
|
-
|
|
1071
|
-
.type-mapper-header {
|
|
1072
|
-
display: flex;
|
|
1073
|
-
justify-content: space-between;
|
|
1074
|
-
align-items: center;
|
|
1075
|
-
}
|
|
1076
|
-
`];$([w({attribute:!1})],x.prototype,"node",2);$([w({attribute:!1})],x.prototype,"allNodes",2);$([w({attribute:!1})],x.prototype,"allEdges",2);$([w({attribute:!1})],x.prototype,"rpcClient",2);$([u()],x.prototype,"_agents",2);$([u()],x.prototype,"_models",2);$([u()],x.prototype,"_allowAgents",2);$([u()],x.prototype,"_agentsLoading",2);$([u()],x.prototype,"_modelsLoading",2);$([u()],x.prototype,"_showVariables",2);$([u()],x.prototype,"_cycleErrors",2);x=$([O("ic-node-editor")],x);function ce(){return{nodes:[{id:"step-1",task:"Research the latest developments in renewable energy technology. Focus on solar, wind, and battery storage advances from the past year.",dependsOn:[],position:{x:300,y:50}},{id:"step-2",task:`Analyze the research findings and identify the top 3 most promising technologies.
|
|
1077
|
-
|
|
1078
|
-
Research data:
|
|
1079
|
-
{{step-1.result}}`,dependsOn:["step-1"],position:{x:300,y:220}},{id:"step-3",task:`Write a concise executive summary based on the analysis.
|
|
1080
|
-
|
|
1081
|
-
Analysis:
|
|
1082
|
-
{{step-2.result}}`,dependsOn:["step-2"],position:{x:300,y:390}}],edges:[{id:"step-1->step-2",source:"step-1",target:"step-2"},{id:"step-2->step-3",source:"step-2",target:"step-3"}],settings:{label:"Linear Chain"}}}function pe(){return{nodes:[{id:"start",task:"Define the key aspects to investigate about the given topic. List 2 focus areas, one per line.",dependsOn:[],position:{x:300,y:50}},{id:"worker-1",task:`Investigate the first focus area from the plan. Provide detailed findings.
|
|
1083
|
-
|
|
1084
|
-
Plan:
|
|
1085
|
-
{{start.result}}`,dependsOn:["start"],position:{x:180,y:220}},{id:"worker-2",task:`Investigate the second focus area from the plan. Provide detailed findings.
|
|
1086
|
-
|
|
1087
|
-
Plan:
|
|
1088
|
-
{{start.result}}`,dependsOn:["start"],position:{x:420,y:220}},{id:"merge",task:`Synthesize both sets of findings into a unified report.
|
|
1089
|
-
|
|
1090
|
-
Findings 1:
|
|
1091
|
-
{{worker-1.result}}
|
|
1092
|
-
|
|
1093
|
-
Findings 2:
|
|
1094
|
-
{{worker-2.result}}`,dependsOn:["worker-1","worker-2"],position:{x:300,y:390}}],edges:[{id:"start->worker-1",source:"start",target:"worker-1"},{id:"start->worker-2",source:"start",target:"worker-2"},{id:"worker-1->merge",source:"worker-1",target:"merge"},{id:"worker-2->merge",source:"worker-2",target:"merge"}],settings:{label:"Fan-out Fan-in"}}}function he(){return{nodes:[{id:"track-a1",task:"Gather quantitative data and statistics on the topic.",dependsOn:[],position:{x:200,y:50}},{id:"track-a2",task:`Create charts and visualizations from the quantitative data.
|
|
1095
|
-
|
|
1096
|
-
Data:
|
|
1097
|
-
{{track-a1.result}}`,dependsOn:["track-a1"],position:{x:200,y:220}},{id:"track-b1",task:"Collect qualitative insights and expert opinions on the topic.",dependsOn:[],position:{x:450,y:50}},{id:"track-b2",task:`Summarize the qualitative insights into key themes.
|
|
1098
|
-
|
|
1099
|
-
Insights:
|
|
1100
|
-
{{track-b1.result}}`,dependsOn:["track-b1"],position:{x:450,y:220}}],edges:[{id:"track-a1->track-a2",source:"track-a1",target:"track-a2"},{id:"track-b1->track-b2",source:"track-b1",target:"track-b2"}],settings:{label:"Parallel Tracks"}}}function ue(){return{nodes:[{id:"worker-1",task:"Monitor social media channels for brand mentions and sentiment.",dependsOn:[],position:{x:150,y:100}},{id:"worker-2",task:"Check system health dashboards and report any anomalies.",dependsOn:[],position:{x:350,y:100}},{id:"worker-3",task:"Review and categorize incoming support tickets by priority.",dependsOn:[],position:{x:550,y:100}}],edges:[],settings:{label:"Independent Workers"}}}function ge(){return{nodes:[{id:"top",task:"Break down the project requirements into technical and business categories.",dependsOn:[],position:{x:300,y:50}},{id:"left",task:`Evaluate the technical requirements and estimate implementation effort.
|
|
1101
|
-
|
|
1102
|
-
Requirements:
|
|
1103
|
-
{{top.result}}`,dependsOn:["top"],position:{x:180,y:220}},{id:"right",task:`Assess the business requirements and estimate business value.
|
|
1104
|
-
|
|
1105
|
-
Requirements:
|
|
1106
|
-
{{top.result}}`,dependsOn:["top"],position:{x:420,y:220}},{id:"bottom",task:`Create a prioritized roadmap combining technical effort and business value.
|
|
1107
|
-
|
|
1108
|
-
Technical evaluation:
|
|
1109
|
-
{{left.result}}
|
|
1110
|
-
|
|
1111
|
-
Business evaluation:
|
|
1112
|
-
{{right.result}}`,dependsOn:["left","right"],position:{x:300,y:390}}],edges:[{id:"top->left",source:"top",target:"left"},{id:"top->right",source:"top",target:"right"},{id:"left->bottom",source:"left",target:"bottom"},{id:"right->bottom",source:"right",target:"bottom"}],settings:{label:"Diamond"}}}function ve(){return{nodes:[{id:"research",task:"Research the given topic and prepare a comprehensive briefing document with key facts, statistics, and relevant context.",dependsOn:[],position:{x:300,y:50}},{id:"debate",task:`Debate the implications and best course of action based on the research.
|
|
1113
|
-
|
|
1114
|
-
Research briefing:
|
|
1115
|
-
{{research.result}}`,dependsOn:["research"],typeId:"debate",typeConfig:{agents:[],rounds:2},position:{x:300,y:220}},{id:"conclusion",task:`Based on the debate transcript, write a balanced conclusion with actionable recommendations.
|
|
1116
|
-
|
|
1117
|
-
Debate outcome:
|
|
1118
|
-
{{debate.result}}`,dependsOn:["debate"],position:{x:300,y:390}}],edges:[{id:"research->debate",source:"research",target:"debate"},{id:"debate->conclusion",source:"debate",target:"conclusion"}],settings:{label:"Debate Pipeline"}}}function fe(){return{nodes:[{id:"research",task:"Research the given topic thoroughly and prepare a comprehensive briefing with key facts and arguments for and against.",dependsOn:[],position:{x:300,y:50}},{id:"vote",task:`Based on the research, vote on the best course of action.
|
|
1119
|
-
|
|
1120
|
-
Research briefing:
|
|
1121
|
-
{{research.result}}`,dependsOn:["research"],typeId:"vote",typeConfig:{voters:[],verdict_format:"YES or NO with one-line justification"},position:{x:300,y:220}},{id:"summarize",task:`Summarize the voting results and recommend next steps based on the majority decision.
|
|
1122
|
-
|
|
1123
|
-
Vote results:
|
|
1124
|
-
{{vote.result}}`,dependsOn:["vote"],position:{x:300,y:390}}],edges:[{id:"research->vote",source:"research",target:"vote"},{id:"vote->summarize",source:"vote",target:"summarize"}],settings:{label:"Vote Pipeline"}}}function me(){return{nodes:[{id:"draft",task:"Write a first draft addressing the given topic. Include all key points but don't worry about polish.",dependsOn:[],position:{x:300,y:50}},{id:"refine",task:`Review and refine the draft. Each reviewer improves upon the previous version.
|
|
1125
|
-
|
|
1126
|
-
Draft:
|
|
1127
|
-
{{draft.result}}`,dependsOn:["draft"],typeId:"refine",typeConfig:{reviewers:[]},position:{x:300,y:220}},{id:"publish",task:`Format the refined document for publication. Add headers, sections, and a summary.
|
|
1128
|
-
|
|
1129
|
-
Refined content:
|
|
1130
|
-
{{refine.result}}`,dependsOn:["refine"],position:{x:300,y:390}}],edges:[{id:"draft->refine",source:"draft",target:"refine"},{id:"refine->publish",source:"refine",target:"publish"}],settings:{label:"Refine Chain"}}}function be(){return{nodes:[{id:"plan",task:"Break the topic into distinct sub-topics that can be researched independently. List each sub-topic clearly.",dependsOn:[],position:{x:300,y:50}},{id:"analyze",task:`Each mapper researches their assigned sub-topic in depth.
|
|
1131
|
-
|
|
1132
|
-
Sub-topics:
|
|
1133
|
-
{{plan.result}}`,dependsOn:["plan"],typeId:"map-reduce",typeConfig:{mappers:[],reducer:"",reducer_prompt:"Synthesize all mapper outputs into a comprehensive report with sections for each sub-topic."},position:{x:300,y:220}},{id:"report",task:`Format the synthesized analysis into a polished final report with executive summary.
|
|
1134
|
-
|
|
1135
|
-
Analysis:
|
|
1136
|
-
{{analyze.result}}`,dependsOn:["analyze"],position:{x:300,y:390}}],edges:[{id:"plan->analyze",source:"plan",target:"analyze"},{id:"analyze->report",source:"analyze",target:"report"}],settings:{label:"Map-Reduce Pipeline"}}}function _e(){return{nodes:[{id:"prepare",task:"Analyze the request and prepare a detailed action plan. Include cost estimates and risk assessment.",dependsOn:[],position:{x:300,y:50}},{id:"approve",task:`Review the action plan and approve or deny execution.
|
|
1137
|
-
|
|
1138
|
-
Action plan:
|
|
1139
|
-
{{prepare.result}}`,dependsOn:["prepare"],typeId:"approval-gate",typeConfig:{message:"Please review the action plan and reply APPROVE or DENY.",timeout_minutes:60},position:{x:300,y:220}},{id:"execute",task:`Execute the approved action plan.
|
|
1140
|
-
|
|
1141
|
-
Approved plan:
|
|
1142
|
-
{{prepare.result}}
|
|
1143
|
-
|
|
1144
|
-
Approval:
|
|
1145
|
-
{{approve.result}}`,dependsOn:["approve"],position:{x:300,y:390}}],edges:[{id:"prepare->approve",source:"prepare",target:"approve"},{id:"approve->execute",source:"approve",target:"execute"}],settings:{label:"Approval Gate Pipeline"}}}function ye(){return{nodes:[],edges:[],settings:{label:"Untitled Pipeline"}}}const xe=[{id:"linear-chain",name:"Linear Chain",description:"Sequential pipeline: each step depends on the previous one.",nodeCount:"3 nodes",icon:"↓",create:ce},{id:"fan-out-fan-in",name:"Fan-out Fan-in",description:"Parallel workers with a single merge point.",nodeCount:"4 nodes",icon:"↔",create:pe},{id:"parallel-tracks",name:"Parallel Tracks",description:"Two independent streams running side by side.",nodeCount:"4 nodes",icon:"≡",create:he},{id:"independent-workers",name:"Independent Workers",description:"Unconnected nodes that run in parallel with no dependencies.",nodeCount:"3 nodes",icon:"☰",create:ue},{id:"diamond",name:"Diamond",description:"Fork into two paths, then converge at the end.",nodeCount:"4 nodes",icon:"◈",create:ge},{id:"debate",name:"Debate Pipeline",description:"Research, multi-agent debate, then synthesize conclusions.",nodeCount:"3 nodes",icon:"⚔",create:ve},{id:"vote-pipeline",name:"Vote Pipeline",description:"Research a topic, have multiple agents vote, then summarize results.",nodeCount:"3 nodes",icon:"✔",create:fe},{id:"refine-chain",name:"Refine Chain",description:"Draft content, refine through sequential reviewers, then publish.",nodeCount:"3 nodes",icon:"✎",create:me},{id:"map-reduce",name:"Map-Reduce",description:"Split work across parallel mappers, then reduce into a single output.",nodeCount:"3 nodes",icon:"⇄",create:be},{id:"approval-gate",name:"Approval Gate",description:"Prepare an action, wait for human approval, then execute.",nodeCount:"3 nodes",icon:"☑",create:_e},{id:"blank",name:"Blank Canvas",description:"Start from scratch with an empty graph.",nodeCount:"0 nodes",icon:"➕",create:ye}];var we=Object.defineProperty,$e=Object.getOwnPropertyDescriptor,R=(e,t,s,i)=>{for(var a=i>1?void 0:i?$e(t,s):t,r=e.length-1,o;r>=0;r--)(o=e[r])&&(a=(i?o(t,s,a):o(a))||a);return i&&a&&we(t,s,a),a};let I=class extends A{constructor(){super(...arguments),this.open=!1,this._showJsonImport=!1,this._jsonError="",this._jsonText="",this._onKeyDown=e=>{if(e.key==="Escape"){e.preventDefault(),this._fireCancel();return}if(e.key==="Tab"){const t=this.shadowRoot?.querySelectorAll("button:not([disabled]), textarea");if(!t||t.length===0)return;const s=t[0],i=t[t.length-1],a=this.shadowRoot?.activeElement;e.shiftKey&&a===s?(e.preventDefault(),i.focus()):!e.shiftKey&&a===i&&(e.preventDefault(),s.focus())}}}updated(e){e.has("open")&&this.open&&(this._showJsonImport=!1,this._jsonError="",this._jsonText="",this.updateComplete.then(()=>{this.shadowRoot?.querySelector("button.template-card, button.cancel-btn")?.focus()}))}_onBackdropClick(e){e.target.classList.contains("backdrop")&&this._fireCancel()}_onTemplateClick(e){const{nodes:t,edges:s,settings:i}=e.create();this.dispatchEvent(new CustomEvent("template-select",{detail:{nodes:t,edges:s,settings:i},bubbles:!0,composed:!0})),this._fireCancel()}_onToggleJsonImport(){this._showJsonImport=!this._showJsonImport,this._jsonError=""}_onJsonInput(e){this._jsonText=e.target.value,this._jsonError=""}_onJsonImport(){const e=this._jsonText.trim();if(!e){this._jsonError="Please paste JSON content.";return}let t;try{t=JSON.parse(e)}catch{this._jsonError="Invalid JSON. Please check your syntax.";return}const s=t.nodes;if(!Array.isArray(s)||s.length===0){this._jsonError='JSON must contain a "nodes" array with at least one node.';return}for(let p=0;p<s.length;p++){const g=s[p];if(!g||typeof g!="object"){this._jsonError=`Node at index ${p} is not a valid object.`;return}const _=g.nodeId??g.id;if(typeof _!="string"||!_){this._jsonError=`Node at index ${p} is missing "nodeId" or "id" (string).`;return}if(typeof g.task!="string"||!g.task){this._jsonError=`Node at index ${p} is missing "task" (string).`;return}}const{nodes:i,edges:a}=Se(s),r=typeof t.label=="string"&&t.label?t.label:"Imported Pipeline",o=t.onFailure==="continue"?"continue":"fail-fast",l={label:r,onFailure:o};typeof t.timeoutMs=="number"&&(l.timeoutMs=t.timeoutMs),this.dispatchEvent(new CustomEvent("template-select",{detail:{nodes:i,edges:a,settings:l},bubbles:!0,composed:!0})),this._fireCancel()}_fireCancel(){this.dispatchEvent(new CustomEvent("cancel"))}render(){return this.open?d`
|
|
1146
|
-
<div
|
|
1147
|
-
class="backdrop"
|
|
1148
|
-
@click=${this._onBackdropClick}
|
|
1149
|
-
@keydown=${this._onKeyDown}
|
|
1150
|
-
>
|
|
1151
|
-
<div
|
|
1152
|
-
class="dialog"
|
|
1153
|
-
role="dialog"
|
|
1154
|
-
aria-modal="true"
|
|
1155
|
-
aria-labelledby="picker-title"
|
|
1156
|
-
>
|
|
1157
|
-
<div class="header">
|
|
1158
|
-
<h2 class="title" id="picker-title">Choose a Template</h2>
|
|
1159
|
-
<button
|
|
1160
|
-
class="toggle-link"
|
|
1161
|
-
@click=${this._onToggleJsonImport}
|
|
1162
|
-
>
|
|
1163
|
-
${this._showJsonImport?"Back to templates":"Or import JSON"}
|
|
1164
|
-
</button>
|
|
1165
|
-
</div>
|
|
1166
|
-
|
|
1167
|
-
${this._showJsonImport?this._renderJsonImport():this._renderTemplateGrid()}
|
|
1168
|
-
|
|
1169
|
-
<div class="footer">
|
|
1170
|
-
<button class="cancel-btn" @click=${this._fireCancel}>
|
|
1171
|
-
Cancel
|
|
1172
|
-
</button>
|
|
1173
|
-
</div>
|
|
1174
|
-
</div>
|
|
1175
|
-
</div>
|
|
1176
|
-
`:f}_renderTemplateGrid(){return d`
|
|
1177
|
-
<div class="template-grid">
|
|
1178
|
-
${xe.map(e=>d`
|
|
1179
|
-
<button
|
|
1180
|
-
class="template-card"
|
|
1181
|
-
@click=${()=>this._onTemplateClick(e)}
|
|
1182
|
-
>
|
|
1183
|
-
<div class="card-icon">${e.icon}</div>
|
|
1184
|
-
<div class="card-name">${e.name}</div>
|
|
1185
|
-
<div class="card-desc">${e.description}</div>
|
|
1186
|
-
<div class="card-meta">${e.nodeCount}</div>
|
|
1187
|
-
</button>
|
|
1188
|
-
`)}
|
|
1189
|
-
</div>
|
|
1190
|
-
`}_renderJsonImport(){return d`
|
|
1191
|
-
<div class="json-section">
|
|
1192
|
-
<textarea
|
|
1193
|
-
class="json-textarea"
|
|
1194
|
-
rows="12"
|
|
1195
|
-
placeholder="Paste ExecutionGraph JSON..."
|
|
1196
|
-
.value=${this._jsonText}
|
|
1197
|
-
@input=${this._onJsonInput}
|
|
1198
|
-
></textarea>
|
|
1199
|
-
${this._jsonError?d`<div class="json-error">${this._jsonError}</div>`:f}
|
|
1200
|
-
<button class="import-btn" @click=${this._onJsonImport}>
|
|
1201
|
-
Import
|
|
1202
|
-
</button>
|
|
1203
|
-
</div>
|
|
1204
|
-
`}};I.styles=[T,V,M`
|
|
1205
|
-
:host {
|
|
1206
|
-
display: contents;
|
|
1207
|
-
}
|
|
1208
|
-
|
|
1209
|
-
.backdrop {
|
|
1210
|
-
position: fixed;
|
|
1211
|
-
inset: 0;
|
|
1212
|
-
background: rgba(0, 0, 0, 0.6);
|
|
1213
|
-
z-index: 9999;
|
|
1214
|
-
display: flex;
|
|
1215
|
-
align-items: center;
|
|
1216
|
-
justify-content: center;
|
|
1217
|
-
}
|
|
1218
|
-
|
|
1219
|
-
.dialog {
|
|
1220
|
-
max-width: 40rem;
|
|
1221
|
-
width: calc(100% - var(--ic-space-lg) * 2);
|
|
1222
|
-
max-height: calc(100vh - var(--ic-space-lg) * 2);
|
|
1223
|
-
overflow-y: auto;
|
|
1224
|
-
background: var(--ic-surface);
|
|
1225
|
-
border: 1px solid var(--ic-border);
|
|
1226
|
-
border-radius: var(--ic-radius-lg);
|
|
1227
|
-
padding: var(--ic-space-lg);
|
|
1228
|
-
box-shadow: var(--ic-shadow-lg);
|
|
1229
|
-
}
|
|
1230
|
-
|
|
1231
|
-
.header {
|
|
1232
|
-
display: flex;
|
|
1233
|
-
justify-content: space-between;
|
|
1234
|
-
align-items: center;
|
|
1235
|
-
margin-bottom: var(--ic-space-md);
|
|
1236
|
-
}
|
|
1237
|
-
|
|
1238
|
-
.title {
|
|
1239
|
-
font-size: var(--ic-text-lg);
|
|
1240
|
-
font-weight: 600;
|
|
1241
|
-
color: var(--ic-text);
|
|
1242
|
-
margin: 0;
|
|
1243
|
-
}
|
|
1244
|
-
|
|
1245
|
-
.toggle-link {
|
|
1246
|
-
background: none;
|
|
1247
|
-
border: none;
|
|
1248
|
-
color: var(--ic-accent);
|
|
1249
|
-
font-size: var(--ic-text-sm);
|
|
1250
|
-
cursor: pointer;
|
|
1251
|
-
padding: 0;
|
|
1252
|
-
font-family: inherit;
|
|
1253
|
-
text-decoration: underline;
|
|
1254
|
-
}
|
|
1255
|
-
|
|
1256
|
-
.toggle-link:hover {
|
|
1257
|
-
color: var(--ic-accent-hover);
|
|
1258
|
-
}
|
|
1259
|
-
|
|
1260
|
-
/* Template grid */
|
|
1261
|
-
|
|
1262
|
-
.template-grid {
|
|
1263
|
-
display: grid;
|
|
1264
|
-
grid-template-columns: 1fr 1fr;
|
|
1265
|
-
gap: var(--ic-space-md);
|
|
1266
|
-
margin-bottom: var(--ic-space-lg);
|
|
1267
|
-
}
|
|
1268
|
-
|
|
1269
|
-
@media (max-width: 480px) {
|
|
1270
|
-
.template-grid {
|
|
1271
|
-
grid-template-columns: 1fr;
|
|
1272
|
-
}
|
|
1273
|
-
}
|
|
1274
|
-
|
|
1275
|
-
.template-card {
|
|
1276
|
-
border: 1px solid var(--ic-border);
|
|
1277
|
-
border-radius: var(--ic-radius-md);
|
|
1278
|
-
padding: var(--ic-space-md);
|
|
1279
|
-
cursor: pointer;
|
|
1280
|
-
transition:
|
|
1281
|
-
border-color var(--ic-transition),
|
|
1282
|
-
background var(--ic-transition);
|
|
1283
|
-
text-align: center;
|
|
1284
|
-
background: transparent;
|
|
1285
|
-
color: inherit;
|
|
1286
|
-
font-family: inherit;
|
|
1287
|
-
width: 100%;
|
|
1288
|
-
}
|
|
1289
|
-
|
|
1290
|
-
.template-card:hover {
|
|
1291
|
-
border-color: var(--ic-accent);
|
|
1292
|
-
background: var(--ic-surface-2, rgba(255, 255, 255, 0.03));
|
|
1293
|
-
}
|
|
1294
|
-
|
|
1295
|
-
.card-icon {
|
|
1296
|
-
font-size: 2rem;
|
|
1297
|
-
line-height: 1;
|
|
1298
|
-
margin-bottom: var(--ic-space-xs);
|
|
1299
|
-
}
|
|
1300
|
-
|
|
1301
|
-
.card-name {
|
|
1302
|
-
font-size: var(--ic-text-sm);
|
|
1303
|
-
font-weight: 600;
|
|
1304
|
-
color: var(--ic-text);
|
|
1305
|
-
margin-bottom: var(--ic-space-xs);
|
|
1306
|
-
}
|
|
1307
|
-
|
|
1308
|
-
.card-desc {
|
|
1309
|
-
font-size: var(--ic-text-xs);
|
|
1310
|
-
color: var(--ic-text-muted);
|
|
1311
|
-
line-height: 1.4;
|
|
1312
|
-
margin-bottom: var(--ic-space-xs);
|
|
1313
|
-
}
|
|
1314
|
-
|
|
1315
|
-
.card-meta {
|
|
1316
|
-
font-size: var(--ic-text-xs);
|
|
1317
|
-
color: var(--ic-text-dim, var(--ic-text-muted));
|
|
1318
|
-
}
|
|
1319
|
-
|
|
1320
|
-
/* JSON import */
|
|
1321
|
-
|
|
1322
|
-
.json-section {
|
|
1323
|
-
margin-bottom: var(--ic-space-lg);
|
|
1324
|
-
}
|
|
1325
|
-
|
|
1326
|
-
.json-textarea {
|
|
1327
|
-
width: 100%;
|
|
1328
|
-
min-height: 12rem;
|
|
1329
|
-
padding: var(--ic-space-sm);
|
|
1330
|
-
background: var(--ic-surface-2, var(--ic-surface));
|
|
1331
|
-
color: var(--ic-text);
|
|
1332
|
-
border: 1px solid var(--ic-border);
|
|
1333
|
-
border-radius: var(--ic-radius-md);
|
|
1334
|
-
font-family: monospace;
|
|
1335
|
-
font-size: var(--ic-text-sm);
|
|
1336
|
-
resize: vertical;
|
|
1337
|
-
}
|
|
1338
|
-
|
|
1339
|
-
.json-textarea::placeholder {
|
|
1340
|
-
color: var(--ic-text-muted);
|
|
1341
|
-
}
|
|
1342
|
-
|
|
1343
|
-
.json-error {
|
|
1344
|
-
color: var(--ic-error);
|
|
1345
|
-
font-size: var(--ic-text-xs);
|
|
1346
|
-
margin-top: var(--ic-space-xs);
|
|
1347
|
-
}
|
|
1348
|
-
|
|
1349
|
-
.import-btn {
|
|
1350
|
-
margin-top: var(--ic-space-sm);
|
|
1351
|
-
padding: var(--ic-space-sm) var(--ic-space-md);
|
|
1352
|
-
background: var(--ic-accent);
|
|
1353
|
-
border: 1px solid var(--ic-accent);
|
|
1354
|
-
border-radius: var(--ic-radius-md);
|
|
1355
|
-
color: #fff;
|
|
1356
|
-
font-size: var(--ic-text-sm);
|
|
1357
|
-
font-family: inherit;
|
|
1358
|
-
cursor: pointer;
|
|
1359
|
-
transition: background var(--ic-transition);
|
|
1360
|
-
}
|
|
1361
|
-
|
|
1362
|
-
.import-btn:hover {
|
|
1363
|
-
background: var(--ic-accent-hover);
|
|
1364
|
-
}
|
|
1365
|
-
|
|
1366
|
-
/* Footer */
|
|
1367
|
-
|
|
1368
|
-
.footer {
|
|
1369
|
-
display: flex;
|
|
1370
|
-
justify-content: flex-end;
|
|
1371
|
-
}
|
|
1372
|
-
|
|
1373
|
-
.cancel-btn {
|
|
1374
|
-
padding: var(--ic-space-sm) var(--ic-space-md);
|
|
1375
|
-
border-radius: var(--ic-radius-md);
|
|
1376
|
-
font-size: var(--ic-text-sm);
|
|
1377
|
-
font-family: inherit;
|
|
1378
|
-
cursor: pointer;
|
|
1379
|
-
background: transparent;
|
|
1380
|
-
border: 1px solid var(--ic-border);
|
|
1381
|
-
color: var(--ic-text-muted);
|
|
1382
|
-
transition:
|
|
1383
|
-
background var(--ic-transition),
|
|
1384
|
-
border-color var(--ic-transition);
|
|
1385
|
-
}
|
|
1386
|
-
|
|
1387
|
-
.cancel-btn:hover {
|
|
1388
|
-
border-color: var(--ic-text-dim, var(--ic-text-muted));
|
|
1389
|
-
color: var(--ic-text);
|
|
1390
|
-
}
|
|
1391
|
-
`];R([w({type:Boolean,reflect:!0})],I.prototype,"open",2);R([u()],I.prototype,"_showJsonImport",2);R([u()],I.prototype,"_jsonError",2);R([u()],I.prototype,"_jsonText",2);I=R([O("ic-template-picker")],I);const ke=170;function Se(e){const t=[],s=[];for(let i=0;i<e.length;i++){const a=e[i],r=(a.nodeId??a.id).trim(),o=a.task.trim(),l=Array.isArray(a.dependsOn)?a.dependsOn.filter(_=>typeof _=="string"):[],p={x:300,y:50+i*ke},g={id:r,task:o,dependsOn:l,position:p,...typeof a.agentId=="string"&&a.agentId?{agentId:a.agentId}:{},...typeof a.maxSteps=="number"?{maxSteps:a.maxSteps}:{},...typeof a.timeoutMs=="number"?{timeoutMs:a.timeoutMs}:{},...a.barrierMode==="all"||a.barrierMode==="majority"||a.barrierMode==="best-effort"?{barrierMode:a.barrierMode}:{},...typeof a.model=="string"&&a.model?{modelId:a.model}:typeof a.modelId=="string"&&a.modelId?{modelId:a.modelId}:{},...typeof a.retries=="number"&&a.retries>=0&&a.retries<=3?{retries:a.retries}:{},...a.contextMode==="full"||a.contextMode==="summary"||a.contextMode==="none"?{contextMode:a.contextMode}:a.context_mode==="full"||a.context_mode==="summary"||a.context_mode==="none"?{contextMode:a.context_mode}:{},typeId:a.typeId,typeConfig:a.typeConfig&&typeof a.typeConfig=="object"?a.typeConfig:void 0};t.push(g);for(const _ of l)s.push({id:`${_}->${r}`,source:_,target:r})}return{nodes:t,edges:s}}var Ce=Object.defineProperty,Ie=Object.getOwnPropertyDescriptor,m=(e,t,s,i)=>{for(var a=i>1?void 0:i?Ie(t,s):t,r=e.length-1,o;r>=0;r--)(o=e[r])&&(a=(i?o(t,s,a):o(a))||a);return i&&a&&Ce(t,s,a),a};const S=24;let v=class extends A{constructor(){super(...arguments),this.rpcClient=null,this.graphId="",this._graphState=null,this._stateUnsub=null,this._rpcStatusUnsub=null,this._serverLoadDone=!1,this._nodeCounter=0,this._viewport={x:0,y:0,scale:1},this._nodes=[],this._edges=[],this._selectedNodeIds=new Set,this._selectedEdgeId=null,this._showDeleteConfirm=!1,this._deleteMessage="",this._snapToGrid=!1,this._validationResult=null,this._settings={label:"Untitled Pipeline",onFailure:"fail-fast"},this._highlightNodeIds=[],this._validateResultText="",this._showTemplatePicker=!1,this._showVariablePrompt=!1,this._variableNames=[],this._draftId="",this._isDirty=!1,this._pendingDeleteNodeIds=[],this._pendingDeleteEdgeId=null,this._validationTimer=null,this._beforeUnloadHandler=e=>{this._isDirty&&e.preventDefault()},this._hashChangeHandler=()=>{this._isDirty&&this._builderHash&&(window.confirm("You have unsaved changes. Leave anyway?")||(window.location.hash=this._builderHash))},this._builderHash="",this._onKeyDown=e=>{const t=e.composedPath()[0];if(t instanceof HTMLInputElement||t instanceof HTMLTextAreaElement||t instanceof HTMLSelectElement||t instanceof Element&&t.closest("[contenteditable]"))return;const s=e.metaKey||e.ctrlKey;if(s&&e.shiftKey&&e.key==="z"){e.preventDefault(),this._graphState?.redo();return}if(s&&!e.shiftKey&&e.key==="z"){e.preventDefault(),this._graphState?.undo();return}if(s&&e.key==="a"){e.preventDefault(),this._graphState?.selectAll();return}if(s&&e.key==="d"){e.preventDefault(),this._duplicateSelected();return}if(!s){if(e.key==="Backspace"||e.key==="Delete"){e.preventDefault(),this._deleteSelected();return}if(e.key==="Escape"){this._graphState?.clearSelection(),this.renderRoot.querySelector("ic-graph-canvas")?.cancelInteraction();return}if(e.key==="n"||e.key==="N"){this._addNodeAtViewportCenter();return}if(e.key==="f"||e.key==="F"){this._fitView();return}if(e.key==="l"||e.key==="L"){this._autoLayout();return}if(e.key==="+"||e.key==="="){this._zoomStep(1);return}if(e.key==="-"){this._zoomStep(-1);return}if(e.key==="0"){this._graphState?.setViewport({x:0,y:0,scale:1});return}if(e.key==="Tab"){e.preventDefault(),this._cycleNodeSelection(e.shiftKey?-1:1);return}if(e.key==="ArrowUp"||e.key==="ArrowDown"||e.key==="ArrowLeft"||e.key==="ArrowRight"){e.preventDefault(),this._nudgeSelected(e.key);return}}}}connectedCallback(){super.connectedCallback(),this._graphState=te(),this._stateUnsub=this._graphState.subscribe(()=>{const t=this._graphState.getSnapshot();this._viewport=t.viewport,this._nodes=t.nodes,this._edges=t.edges,this._selectedNodeIds=t.selectedNodeIds,this._selectedEdgeId=t.selectedEdgeId,this._settings=t.settings,this._isDirty=t.isDirty,this._validationTimer&&clearTimeout(this._validationTimer),this._validationTimer=setTimeout(()=>{const s=ne(this._nodes,this._edges);this._graphState?.setValidation(s),this._validationResult=s},150)});const e=this._graphState.getSnapshot();this._viewport=e.viewport,this._nodes=e.nodes,this._edges=e.edges,this._selectedNodeIds=e.selectedNodeIds,this._selectedEdgeId=e.selectedEdgeId,this._settings=e.settings,document.addEventListener("keydown",this._onKeyDown),window.addEventListener("beforeunload",this._beforeUnloadHandler),this._builderHash=window.location.hash,window.addEventListener("hashchange",this._hashChangeHandler),this.graphId?(this._draftId=this.graphId,this._loadGraph()):(this._draftId=crypto.randomUUID(),this._showTemplatePicker=!0)}disconnectedCallback(){document.removeEventListener("keydown",this._onKeyDown),window.removeEventListener("beforeunload",this._beforeUnloadHandler),window.removeEventListener("hashchange",this._hashChangeHandler),this._rpcStatusUnsub?.(),this._rpcStatusUnsub=null,this._validationTimer&&(clearTimeout(this._validationTimer),this._validationTimer=null),this._stateUnsub&&(this._stateUnsub(),this._stateUnsub=null),this._graphState=null,super.disconnectedCallback()}updated(e){e.has("rpcClient")&&this.rpcClient&&this.graphId&&!this._serverLoadDone&&(this._rpcStatusUnsub?.(),this.rpcClient.status==="connected"?this._loadGraph():this._rpcStatusUnsub=this.rpcClient.onStatusChange(t=>{t==="connected"&&!this._serverLoadDone&&(this._rpcStatusUnsub=null,this._loadGraph())}))}get _breadcrumbs(){const e=[{label:"Pipelines",route:"pipelines"}];return this.graphId?(e.push({label:this.graphId}),e.push({label:"Edit"})):e.push({label:"New Pipeline"}),e}_onNodeSelect(e){const{nodeId:t,multi:s}=e.detail;this._graphState?.selectNode(t,s)}_onNodeDragEnd(e){this._graphState?.moveNodes(e.detail.moves)}_onEdgeCreate(e){const{source:t,target:s}=e.detail,i=this._graphState?.getSnapshot();if(!i||t===s||i.edges.some(r=>r.source===t&&r.target===s)||j(i.edges,t,s))return;this._graphState?.addEdge(t,s);const a=i.nodes.find(r=>r.id===s);a&&!a.dependsOn.includes(t)&&this._graphState?.updateNode(s,{dependsOn:[...a.dependsOn,t]})}_onCanvasClick(){this._graphState?.clearSelection()}_onHighlightNodes(e){this._highlightNodeIds=e.detail.nodeIds,setTimeout(()=>{this._highlightNodeIds=[]},3e3)}_onNodeUpdate(e){this._graphState?.updateNode(e.detail.nodeId,e.detail.partial)}_onNodeDelete(e){this._graphState?.selectNode(e.detail.nodeId),this._deleteSelected()}_onNodeDuplicate(e){this._graphState?.selectNode(e.detail.nodeId),this._duplicateSelected()}_onEditorEdgeAdd(e){const{source:t,target:s}=e.detail;if(!this._graphState)return;const i=this._graphState.getSnapshot();if(t===s||i.edges.some(r=>r.source===t&&r.target===s)||j(i.edges,t,s))return;this._graphState.addEdge(t,s);const a=i.nodes.find(r=>r.id===s);a&&!a.dependsOn.includes(t)&&this._graphState.updateNode(s,{dependsOn:[...a.dependsOn,t]})}_onEditorEdgeRemove(e){const{source:t,target:s}=e.detail;if(!this._graphState)return;const i=this._graphState.getSnapshot(),a=`${t}->${s}`;i.edges.find(l=>l.id===a)&&this._graphState.removeEdge(a);const o=i.nodes.find(l=>l.id===s);if(o){const l=o.dependsOn.filter(p=>p!==t);this._graphState.updateNode(s,{dependsOn:l})}}async _onValidate(){if(!this.rpcClient||!this._graphState)return;const e=this._graphState.getSnapshot(),t={nodes:e.nodes.map(s=>{const i=e.edges.filter(a=>a.target===s.id).map(a=>a.source);return{nodeId:s.id,task:s.task,agentId:s.agentId,dependsOn:i,maxSteps:s.maxSteps,timeoutMs:s.timeoutMs,barrierMode:s.barrierMode,model:s.modelId,retries:s.retries,type_id:s.typeId,type_config:s.typeConfig,context_mode:s.contextMode}}),label:e.settings.label||void 0,onFailure:e.settings.onFailure,timeoutMs:e.settings.timeoutMs,budget:e.settings.budget};try{const i=await this.rpcClient.call("graph.define",t);this._validateResultText=`Valid: ${i.nodeCount??e.nodes.length} nodes${Array.isArray(i.executionOrder)?`, order: ${i.executionOrder.join(" -> ")}`:""}`}catch(s){this._validateResultText=`Error: ${s instanceof Error?s.message:String(s)}`}}_addNodeAtViewportCenter(){if(!this._graphState)return;const e=this._graphState.getSnapshot();this._nodeCounter=Math.max(this._nodeCounter,e.nodes.length);let t;do this._nodeCounter++,t=`node-${this._nodeCounter}`;while(e.nodes.some(o=>o.id===t));const i=this.renderRoot.querySelector(".canvas-area")?.getBoundingClientRect();let a=200,r=200;if(i){const o=H(i.left+i.width/2,i.top+i.height/2,i,this._viewport);a=o.x-W/2,r=o.y-K/2}this._graphState.addNode({id:t,task:"",dependsOn:[],position:{x:a,y:r}})}_duplicateSelected(){if(!this._graphState)return;const e=this._graphState.getSnapshot();if(e.selectedNodeIds.size!==0)for(const t of e.selectedNodeIds){const s=e.nodes.find(o=>o.id===t);if(!s)continue;let i=`${s.id}-copy`,a=1;const r=new Set(e.nodes.map(o=>o.id));for(;r.has(i);)a++,i=`${s.id}-copy-${a}`;r.add(i),this._graphState.addNode({id:i,task:s.task,agentId:s.agentId,dependsOn:[],maxSteps:s.maxSteps,timeoutMs:s.timeoutMs,barrierMode:s.barrierMode,modelId:s.modelId,retries:s.retries,typeId:s.typeId,typeConfig:s.typeConfig?{...s.typeConfig}:void 0,contextMode:s.contextMode,position:{x:s.position.x+60,y:s.position.y+40}})}}_deleteSelected(){if(!this._graphState)return;const e=this._graphState.getSnapshot();if(e.selectedEdgeId&&e.selectedNodeIds.size===0){this._graphState.removeEdge(e.selectedEdgeId);return}if(e.selectedNodeIds.size===0)return;const t=[...e.selectedNodeIds],s=[];for(const i of t)for(const a of e.edges)a.source===i&&!e.selectedNodeIds.has(a.target)&&s.push(`"${a.target}" depends on "${i}"`);if(s.length>0)this._deleteMessage=`Deleting will break dependencies:
|
|
1392
|
-
${s.join(`
|
|
1393
|
-
`)}`,this._pendingDeleteNodeIds=t,this._showDeleteConfirm=!0;else for(const i of t)this._graphState.removeNode(i)}_confirmDelete(){if(this._graphState){for(const e of this._pendingDeleteNodeIds)this._graphState.removeNode(e);this._pendingDeleteEdgeId&&this._graphState.removeEdge(this._pendingDeleteEdgeId),this._showDeleteConfirm=!1,this._pendingDeleteNodeIds=[],this._pendingDeleteEdgeId=null}}_fitView(){if(!this._graphState)return;const e=this._graphState.getSnapshot();if(e.nodes.length===0)return;const s=this.renderRoot.querySelector(".canvas-area")?.getBoundingClientRect();if(!s)return;const i=J(e.nodes,s.width,s.height);this._graphState.setViewport(i)}_autoLayout(){if(!this._graphState)return;const e=this._graphState.getSnapshot();if(e.nodes.length===0)return;const t=F(e.nodes,e.edges),s=[];for(const[i,a]of t.positions)s.push({nodeId:i,position:a});this._graphState.moveNodes(s)}_zoomStep(e){if(!this._graphState)return;const s=this.renderRoot.querySelector(".canvas-area")?.getBoundingClientRect();if(!s)return;const i=s.width/2,a=s.height/2,r=e>0?-100:100,o=B(this._viewport,i,a,r,X,Y);this._graphState.setViewport(o)}_cycleNodeSelection(e){if(!this._graphState)return;const t=this._graphState.getSnapshot();if(t.nodes.length===0)return;const s=[...t.nodes].sort((r,o)=>r.position.y!==o.position.y?r.position.y-o.position.y:r.position.x-o.position.x);let i=-1;if(t.selectedNodeIds.size===1){const r=[...t.selectedNodeIds][0];i=s.findIndex(o=>o.id===r)}let a=i+e;a<0&&(a=s.length-1),a>=s.length&&(a=0),this._graphState.selectNode(s[a].id)}_nudgeSelected(e){if(!this._graphState)return;const t=this._graphState.getSnapshot();if(t.selectedNodeIds.size===0)return;let s=0,i=0;switch(e){case"ArrowUp":i=-S;break;case"ArrowDown":i=S;break;case"ArrowLeft":s=-S;break;case"ArrowRight":s=S;break}const a=[];for(const r of t.selectedNodeIds){const o=t.nodes.find(g=>g.id===r);if(!o)continue;let l=o.position.x+s,p=o.position.y+i;this._snapToGrid&&(l=Math.round(l/S)*S,p=Math.round(p/S)*S),a.push({nodeId:r,position:{x:l,y:p}})}this._graphState.moveNodes(a)}async _loadGraph(){if(!(!this._graphState||!this.graphId)&&this.rpcClient)try{const e=await this.rpcClient.call("graph.load",{id:this.graphId});if(e&&this._graphState){this._graphState.reset();const t=[],s=[];for(const r of e.nodes){const l={id:r.id??r.nodeId,task:r.task??"",agentId:r.agentId??r.agent,dependsOn:r.dependsOn??[],maxSteps:r.maxSteps,timeoutMs:r.timeoutMs,barrierMode:r.barrierMode,modelId:r.modelId??r.model,retries:typeof r.retries=="number"?r.retries:void 0,contextMode:r.contextMode==="full"||r.contextMode==="summary"||r.contextMode==="none"?r.contextMode:r.context_mode==="full"||r.context_mode==="summary"||r.context_mode==="none"?r.context_mode:void 0,typeId:r.typeId,typeConfig:r.typeConfig&&typeof r.typeConfig=="object"?r.typeConfig:void 0,position:r.position??{x:0,y:0}};t.push(l)}if(e.edges&&e.edges.length>0)for(const r of e.edges)s.push(r);else for(const r of t)for(const o of r.dependsOn)s.push({id:`${o}->${r.id}`,source:o,target:r.id});if(t.length>0&&t.every(r=>r.position.x===0&&r.position.y===0)){const r=F(t,s);for(const o of t){const l=r.positions.get(o.id);l&&(o.position=l)}}for(const r of t)this._graphState.addNode(r);for(const r of s)this._graphState.addEdge(r.source,r.target);const a={...e.settings,...e.label?{label:e.label}:{}};Object.keys(a).length>0&&this._graphState.updateSettings(a),this._serverLoadDone=!0}}catch{}}_onTemplateSelect(e){if(!this._graphState)return;const{nodes:t,edges:s,settings:i}=e.detail;this._graphState.reset();for(const a of t)this._graphState.addNode(a);for(const a of s)this._graphState.addEdge(a.source,a.target);(i.label||i.onFailure)&&this._graphState.updateSettings(i),this._showTemplatePicker=!1}async _onSaveDraft(){if(!this._graphState)return;const e=this._graphState.getSnapshot();if(!this.rpcClient){z.show("Cannot save: not connected to daemon","error");return}try{await this.rpcClient.call("graph.save",{id:this._draftId,label:e.settings.label,nodes:e.nodes,edges:e.edges,settings:e.settings}),this._graphState.markClean(),z.show("Pipeline saved","success")}catch(t){z.show(`Save failed: ${t instanceof Error?t.message:"Unknown error"}`,"error")}}async _onRun(){if(!this.rpcClient||!this._graphState)return;const e=this._graphState.getSnapshot(),t=e.nodes.map(i=>i.task),s=Z(t);if(s.length>0){this._variableNames=s,this._showVariablePrompt=!0;return}await this._executeGraph(e.nodes.map(i=>i.task))}async _onVariableConfirm(e){if(this._showVariablePrompt=!1,!this.rpcClient||!this._graphState)return;const s=this._graphState.getSnapshot().nodes.map(i=>Q(i.task,e.detail.values));await this._executeGraph(s)}async _executeGraph(e){if(!this.rpcClient||!this._graphState)return;const t=this._graphState.getSnapshot(),s={nodes:t.nodes.map((i,a)=>{const r=t.edges.filter(o=>o.target===i.id).map(o=>o.source);return{nodeId:i.id,task:e[a],agentId:i.agentId,dependsOn:r,maxSteps:i.maxSteps,timeoutMs:i.timeoutMs,barrierMode:i.barrierMode,model:i.modelId,retries:i.retries,type_id:i.typeId,type_config:i.typeConfig,context_mode:i.contextMode}}),label:t.settings.label||void 0,onFailure:t.settings.onFailure,timeoutMs:t.settings.timeoutMs,budget:t.settings.budget};try{const i=await this.rpcClient.call("graph.execute",s);this.dispatchEvent(new CustomEvent("navigate",{detail:`pipelines/${i.graphId}`,bubbles:!0,composed:!0}))}catch(i){z.show(`Run failed: ${i instanceof Error?i.message:String(i)}`,"error")}}render(){const e=this._graphState?.getSnapshot(),t=e&&e.selectedNodeIds.size===1?e.nodes.find(s=>e.selectedNodeIds.has(s.id))??null:null;return d`
|
|
1394
|
-
<ic-breadcrumb .items=${this._breadcrumbs}
|
|
1395
|
-
@navigate=${s=>this.dispatchEvent(new CustomEvent("navigate",{detail:s.detail,bubbles:!0,composed:!0}))}
|
|
1396
|
-
></ic-breadcrumb>
|
|
1397
|
-
<div class="mobile-message">
|
|
1398
|
-
<h2>Desktop Required</h2>
|
|
1399
|
-
<p>The pipeline builder requires a desktop browser. Please use a screen wider than 768px.</p>
|
|
1400
|
-
</div>
|
|
1401
|
-
<div class="builder-container">
|
|
1402
|
-
<ic-graph-settings
|
|
1403
|
-
.settings=${this._settings}
|
|
1404
|
-
.hasErrors=${(this._validationResult?.errors.length??0)>0}
|
|
1405
|
-
.isDirty=${this._isDirty}
|
|
1406
|
-
.validateResult=${this._validateResultText}
|
|
1407
|
-
@settings-change=${s=>this._graphState?.updateSettings(s.detail)}
|
|
1408
|
-
@validate=${this._onValidate}
|
|
1409
|
-
@save-draft=${this._onSaveDraft}
|
|
1410
|
-
@run=${this._onRun}
|
|
1411
|
-
></ic-graph-settings>
|
|
1412
|
-
<div class="toolbar">
|
|
1413
|
-
<button class="toolbar-btn ${this._snapToGrid?"toolbar-btn--active":""}"
|
|
1414
|
-
@click=${()=>{this._snapToGrid=!this._snapToGrid}}
|
|
1415
|
-
title="Snap to grid (24px)">Grid</button>
|
|
1416
|
-
<button class="toolbar-btn"
|
|
1417
|
-
@click=${()=>{this._showTemplatePicker=!0}}
|
|
1418
|
-
title="Choose a template">Templates</button>
|
|
1419
|
-
</div>
|
|
1420
|
-
<div class="builder-body">
|
|
1421
|
-
<div class="canvas-area">
|
|
1422
|
-
<ic-graph-canvas
|
|
1423
|
-
.viewport=${this._viewport}
|
|
1424
|
-
.nodes=${this._nodes}
|
|
1425
|
-
.edges=${this._edges}
|
|
1426
|
-
.selectedNodeIds=${this._selectedNodeIds}
|
|
1427
|
-
.selectedEdgeId=${this._selectedEdgeId}
|
|
1428
|
-
.snapToGrid=${this._snapToGrid}
|
|
1429
|
-
.highlightNodeIds=${this._highlightNodeIds}
|
|
1430
|
-
@viewport-change=${s=>{this._graphState?.setViewport(s.detail)}}
|
|
1431
|
-
@edge-select=${s=>{this._graphState?.selectEdge(s.detail)}}
|
|
1432
|
-
@node-select=${this._onNodeSelect}
|
|
1433
|
-
@node-drag-end=${this._onNodeDragEnd}
|
|
1434
|
-
@edge-create=${this._onEdgeCreate}
|
|
1435
|
-
@canvas-click=${this._onCanvasClick}
|
|
1436
|
-
></ic-graph-canvas>
|
|
1437
|
-
<ic-graph-validation
|
|
1438
|
-
.validationResult=${this._validationResult}
|
|
1439
|
-
@highlight-nodes=${this._onHighlightNodes}
|
|
1440
|
-
></ic-graph-validation>
|
|
1441
|
-
</div>
|
|
1442
|
-
${t?d`
|
|
1443
|
-
<ic-node-editor
|
|
1444
|
-
.node=${t}
|
|
1445
|
-
.allNodes=${this._nodes}
|
|
1446
|
-
.allEdges=${this._edges}
|
|
1447
|
-
.rpcClient=${this.rpcClient}
|
|
1448
|
-
@node-update=${this._onNodeUpdate}
|
|
1449
|
-
@node-delete=${this._onNodeDelete}
|
|
1450
|
-
@node-duplicate=${this._onNodeDuplicate}
|
|
1451
|
-
@edge-add=${this._onEditorEdgeAdd}
|
|
1452
|
-
@edge-remove=${this._onEditorEdgeRemove}
|
|
1453
|
-
></ic-node-editor>
|
|
1454
|
-
`:f}
|
|
1455
|
-
</div>
|
|
1456
|
-
</div>
|
|
1457
|
-
<ic-confirm-dialog
|
|
1458
|
-
?open=${this._showDeleteConfirm}
|
|
1459
|
-
title="Delete Node"
|
|
1460
|
-
.message=${this._deleteMessage}
|
|
1461
|
-
variant="danger"
|
|
1462
|
-
confirmLabel="Delete"
|
|
1463
|
-
@confirm=${this._confirmDelete}
|
|
1464
|
-
@cancel=${()=>{this._showDeleteConfirm=!1,this._pendingDeleteNodeIds=[],this._pendingDeleteEdgeId=null}}
|
|
1465
|
-
></ic-confirm-dialog>
|
|
1466
|
-
<ic-template-picker
|
|
1467
|
-
?open=${this._showTemplatePicker}
|
|
1468
|
-
@template-select=${this._onTemplateSelect}
|
|
1469
|
-
@cancel=${()=>{this._showTemplatePicker=!1}}
|
|
1470
|
-
></ic-template-picker>
|
|
1471
|
-
<ic-variable-prompt
|
|
1472
|
-
?open=${this._showVariablePrompt}
|
|
1473
|
-
.variables=${this._variableNames}
|
|
1474
|
-
.pipelineLabel=${this._settings.label}
|
|
1475
|
-
@confirm=${this._onVariableConfirm}
|
|
1476
|
-
@cancel=${()=>{this._showVariablePrompt=!1}}
|
|
1477
|
-
></ic-variable-prompt>
|
|
1478
|
-
`}};v.styles=[T,V,M`
|
|
1479
|
-
:host { display: block; height: 100%; }
|
|
1480
|
-
.builder-container { display: flex; flex-direction: column; height: calc(100vh - 120px); }
|
|
1481
|
-
.toolbar { display: flex; gap: 4px; padding: 4px 0; }
|
|
1482
|
-
.toolbar-btn { padding: 4px 12px; background: var(--ic-surface-2); border: 1px solid var(--ic-border);
|
|
1483
|
-
border-radius: var(--ic-radius-sm); color: var(--ic-text-muted); font-size: var(--ic-text-xs); cursor: pointer; }
|
|
1484
|
-
.toolbar-btn:hover { background: var(--ic-accent); color: var(--ic-text); }
|
|
1485
|
-
.toolbar-btn--active { background: var(--ic-accent); color: var(--ic-text); border-color: var(--ic-accent); }
|
|
1486
|
-
.builder-body { display: flex; flex: 1; overflow: hidden; }
|
|
1487
|
-
.canvas-area { flex: 1; position: relative; border: 1px solid var(--ic-border); border-radius: var(--ic-radius-md);
|
|
1488
|
-
background: var(--ic-bg); overflow: hidden; }
|
|
1489
|
-
.mobile-message { display: none; text-align: center; padding: 3rem 1.5rem; color: var(--ic-text-muted); }
|
|
1490
|
-
.mobile-message h2 { font-size: 1.25rem; font-weight: 600; margin-bottom: 0.5rem; }
|
|
1491
|
-
.mobile-message p { font-size: var(--ic-text-sm); color: var(--ic-text-dim); }
|
|
1492
|
-
@media (max-width: 767px) {
|
|
1493
|
-
.builder-container { display: none; }
|
|
1494
|
-
.mobile-message { display: block; }
|
|
1495
|
-
}
|
|
1496
|
-
`];m([w({attribute:!1})],v.prototype,"rpcClient",2);m([w()],v.prototype,"graphId",2);m([u()],v.prototype,"_viewport",2);m([u()],v.prototype,"_nodes",2);m([u()],v.prototype,"_edges",2);m([u()],v.prototype,"_selectedNodeIds",2);m([u()],v.prototype,"_selectedEdgeId",2);m([u()],v.prototype,"_showDeleteConfirm",2);m([u()],v.prototype,"_deleteMessage",2);m([u()],v.prototype,"_snapToGrid",2);m([u()],v.prototype,"_validationResult",2);m([u()],v.prototype,"_settings",2);m([u()],v.prototype,"_highlightNodeIds",2);m([u()],v.prototype,"_validateResultText",2);m([u()],v.prototype,"_showTemplatePicker",2);m([u()],v.prototype,"_showVariablePrompt",2);m([u()],v.prototype,"_variableNames",2);m([u()],v.prototype,"_draftId",2);m([u()],v.prototype,"_isDirty",2);v=m([O("ic-pipeline-builder")],v);export{v as IcPipelineBuilder};
|