taskmeld 0.1.1 → 0.1.41
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/LICENSE +1 -1
- package/README.md +176 -172
- package/README.zh-CN.md +176 -172
- package/dist/src/app/app-context-env.js +1 -1
- package/dist/src/app/create-app-context.js +3 -3
- package/dist/src/app/data-dir.js +13 -3
- package/dist/src/app/pipeline-config.js +4 -4
- package/dist/src/app/pipeline-registry.js +11 -11
- package/dist/src/app/pipeline-runtime.js +6 -9
- package/dist/src/app/runtime-store.js +3 -3
- package/dist/src/artifacts/artifact-cleanup.js +17 -17
- package/dist/src/artifacts/artifact-index.js +14 -14
- package/dist/src/artifacts/artifact-rebuilder.js +3 -3
- package/dist/src/artifacts/storage-service.js +18 -18
- package/dist/src/cli/bootstrap.js +7 -7
- package/dist/src/cli/commands/agent.js +12 -11
- package/dist/src/cli/commands/artifact.js +31 -30
- package/dist/src/cli/commands/init.js +49 -47
- package/dist/src/cli/commands/pipeline/result.js +9 -8
- package/dist/src/cli/commands/pipeline/selector.js +1 -1
- package/dist/src/cli/commands/pipeline/watch.js +2 -2
- package/dist/src/cli/commands/pipeline.js +54 -53
- package/dist/src/cli/commands/scheduler.js +9 -8
- package/dist/src/cli/commands/server.js +12 -11
- package/dist/src/cli/commands/system.js +4 -3
- package/dist/src/cli/errors.js +2 -2
- package/dist/src/cli/help.js +18 -17
- package/dist/src/cli/i18n.js +46 -0
- package/dist/src/cli/locales/en.json +244 -0
- package/dist/src/cli/locales/zh.json +244 -0
- package/dist/src/cli/output.js +3 -3
- package/dist/src/cli/renderers/engine/markdown.js +1 -1
- package/dist/src/cli/renderers/specs/index.js +1 -1
- package/dist/src/cli/router.js +1 -1
- package/dist/src/cli/server-runtime-client.js +54 -95
- package/dist/src/cli/ui-prompts.js +96 -0
- package/dist/src/cli/ws-runtime-client.js +51 -0
- package/dist/src/gateway/gateway-client.js +4 -4
- package/dist/src/index.js +28 -2
- package/dist/src/logs/run-log-reader.js +1 -1
- package/dist/src/pipeline/agent-activity.js +2 -2
- package/dist/src/pipeline/artifact-storage.js +11 -11
- package/dist/src/pipeline/diagnostics/dependency-diagnostic.js +11 -11
- package/dist/src/pipeline/dispatch/pipeline-inbound-queue.js +2 -2
- package/dist/src/pipeline/execution/group-item-executor.js +1 -1
- package/dist/src/pipeline/execution/node-item-executor.js +3 -3
- package/dist/src/pipeline/execution/node-runner.js +7 -7
- package/dist/src/pipeline/execution/readiness-state.js +1 -1
- package/dist/src/pipeline/execution/reject-handler.js +5 -5
- package/dist/src/pipeline/execution/rejected-artifact-archiver.js +1 -1
- package/dist/src/pipeline/execution/route-item-manager.js +4 -4
- package/dist/src/pipeline/execution/run-abort-controller.js +5 -5
- package/dist/src/pipeline/execution/run-state-helpers.js +2 -2
- package/dist/src/pipeline/execution/service.js +4 -4
- package/dist/src/pipeline/execution/structured-node-runner.js +24 -24
- package/dist/src/pipeline/execution-timeout.js +3 -3
- package/dist/src/pipeline/identity/index.js +3 -3
- package/dist/src/pipeline/item-batch-controller.js +6 -6
- package/dist/src/pipeline/scheduler/dependency-state.js +5 -5
- package/dist/src/pipeline/scheduler-service.js +24 -24
- package/dist/src/pipeline/state-machine.js +2 -2
- package/dist/src/pipeline/structured-output/contract.js +4 -4
- package/dist/src/pipeline/structured-output/index.js +2 -2
- package/dist/src/pipeline/structured-output/parser.js +5 -5
- package/dist/src/pipeline/structured-output/prompt.js +38 -38
- package/dist/src/pipeline/structured-output/waiter.js +6 -6
- package/dist/src/pipeline/template.js +5 -5
- package/dist/src/pipeline/timeline-log-store.js +5 -5
- package/dist/src/pipeline/tool-activity.js +3 -3
- package/dist/src/pipeline/types/pipeline-output.js +1 -1
- package/dist/src/pipeline/workflow/branch-rules.js +19 -19
- package/dist/src/pipeline/workflow/io.js +1 -1
- package/dist/src/pipeline/workflow/normalize.js +18 -18
- package/dist/src/pipeline/workflow/template-mapper.js +3 -3
- package/dist/src/pipeline/workflow/validate.js +39 -39
- package/dist/src/pipeline/workflow-graph.js +10 -10
- package/dist/src/server/http-handler.js +74 -0
- package/dist/src/services/agent-service.js +2 -2
- package/dist/src/services/gateway-read-helpers.js +1 -1
- package/dist/src/services/pipeline-service.js +19 -19
- package/dist/src/services/pipeline-status.js +4 -4
- package/dist/src/services/read-services.js +1 -1
- package/dist/src/services/session-service.js +6 -6
- package/dist/src/services/system-service.js +1 -1
- package/dist/src/transport/ws-broker.js +12 -1
- package/dist/src/transport/ws-handler.js +60 -0
- package/dist/src/transport/ws-methods/agents.js +144 -0
- package/dist/src/transport/ws-methods/artifacts.js +171 -0
- package/dist/src/transport/ws-methods/gateway.js +16 -0
- package/dist/src/transport/ws-methods/logs.js +43 -0
- package/dist/src/transport/ws-methods/pipeline-batch.js +68 -0
- package/dist/src/transport/ws-methods/pipeline-links.js +100 -0
- package/dist/src/transport/ws-methods/pipeline-queue.js +51 -0
- package/dist/src/transport/ws-methods/pipeline-runtime.js +151 -0
- package/dist/src/transport/ws-methods/pipeline-scheduler.js +48 -0
- package/dist/src/transport/ws-methods/pipeline-workflow.js +127 -0
- package/dist/src/transport/ws-methods/pipelines.js +56 -0
- package/dist/src/transport/ws-methods/register-all.js +32 -0
- package/dist/src/transport/ws-methods/sessions.js +154 -0
- package/dist/src/transport/ws-methods/timeline.js +10 -0
- package/dist/src/{server/routes/pipeline-identity.js → transport/ws-methods/utils.js} +14 -9
- package/dist/src/version.js +1 -1
- package/package.json +16 -7
- package/web/dist/assets/agent-DP6TMcLj.js +1 -0
- package/web/dist/assets/agent-DmJHzLyj.js +1 -0
- package/web/dist/assets/artifact-BqnoZy2M.js +1 -0
- package/web/dist/assets/artifact-DfDkgkno.js +1 -0
- package/web/dist/assets/common-DRMTVwE9.js +1 -0
- package/web/dist/assets/common-DeXccbr2.js +1 -0
- package/web/dist/assets/dispatch-CBskGCQI.js +1 -0
- package/web/dist/assets/dispatch-sk4Wp30e.js +1 -0
- package/web/dist/assets/index-C8wTjZvH.css +1 -0
- package/web/dist/assets/index-DYDQZRLk.js +58 -0
- package/web/dist/assets/log-DN8cjb0w.js +1 -0
- package/web/dist/assets/log-HSeA_dYy.js +1 -0
- package/web/dist/assets/modal-BdNai9jf.js +1 -0
- package/web/dist/assets/modal-D9_KDpFD.js +1 -0
- package/web/dist/assets/nav-BmF7oAKg.js +1 -0
- package/web/dist/assets/nav-IjC2xqXQ.js +1 -0
- package/web/dist/assets/node-detail-CENRXcrh.js +1 -0
- package/web/dist/assets/node-detail-bndPr0IM.js +1 -0
- package/web/dist/assets/overview-B87zWAxq.js +1 -0
- package/web/dist/assets/overview-gQvk-NOK.js +1 -0
- package/web/dist/assets/pipeline-D4dSJRDz.js +1 -0
- package/web/dist/assets/pipeline-DZzyOqQa.js +1 -0
- package/web/dist/assets/session-CUWvU14v.js +5 -0
- package/web/dist/assets/session-DQ6UuCaJ.js +5 -0
- package/web/dist/assets/timeline-8y_2_0Em.js +1 -0
- package/web/dist/assets/timeline-CAPsXUTC.js +1 -0
- package/web/dist/index.html +3 -3
- package/dist/src/app/pipeline-plugin-config.js +0 -2
- package/dist/src/server/api-handler.js +0 -163
- package/dist/src/server/http-utils.js +0 -34
- package/dist/src/server/middleware.js +0 -61
- package/dist/src/server/router.js +0 -105
- package/dist/src/server/routes/agents.js +0 -189
- package/dist/src/server/routes/artifacts.js +0 -163
- package/dist/src/server/routes/gateway.js +0 -18
- package/dist/src/server/routes/health.js +0 -16
- package/dist/src/server/routes/logs.js +0 -73
- package/dist/src/server/routes/pipeline-batch.js +0 -163
- package/dist/src/server/routes/pipeline-diagnostics.js +0 -33
- package/dist/src/server/routes/pipeline-links.js +0 -117
- package/dist/src/server/routes/pipeline-outputs.js +0 -27
- package/dist/src/server/routes/pipeline-queue.js +0 -62
- package/dist/src/server/routes/pipeline-runtime.js +0 -162
- package/dist/src/server/routes/pipeline-scheduler.js +0 -69
- package/dist/src/server/routes/pipeline-workflow.js +0 -180
- package/dist/src/server/routes/pipelines.js +0 -96
- package/dist/src/server/routes/sessions.js +0 -244
- package/dist/src/server/routes/timeline.js +0 -14
- package/dist/src/server/serve-static.js +0 -42
- package/web/dist/assets/index-CWnfhkn-.js +0 -65
- package/web/dist/assets/index-gZ0xOfSO.css +0 -1
- /package/dist/src/{server → transport/ws-methods}/types.js +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const o="Keyword",t="Search logs...",e="Sort",s="Level",r="Apply Filters",n="Reset",a="Raw NDJSON",l="Loaded {{loaded}} / {{total}}",c="Parse errors: {{count}}",d="Failed to load logs: {{error}}",i="No matching entries",g="Loading logs...",L="Select a log entry to view details",w="Log Center",h="Run List",F="Log List",y="Keyword search",u="Select an entry from the list to view details",S="Run Log",p="Details",N="Info",D="Warn",f="Error",v="Latest First",C="Earliest First",M="No detail",R="Close",K="Loading...",O="Load More",m="rendered {{rendered}} / loaded {{loaded}} / total {{total}}",E={searchKeyword:o,searchPlaceholder:t,sortOrder:e,level:s,applyFilters:r,reset:n,rawNdjson:a,loaded:l,parseFailed:c,loadFailed:d,noMatch:i,loading:g,selectToViewDetail:L,logCenter:w,runList:h,logList:F,keywordSearch:y,selectToViewDetailCenter:u,runLog:S,detail:p,info:N,warn:D,error:f,sortNewestFirst:v,sortOldestFirst:C,noDetail:M,close:R,loadingMore:K,loadMore:O,renderedStatus:m};export{r as applyFilters,R as close,E as default,p as detail,f as error,N as info,y as keywordSearch,s as level,d as loadFailed,O as loadMore,l as loaded,g as loading,K as loadingMore,w as logCenter,F as logList,M as noDetail,i as noMatch,c as parseFailed,a as rawNdjson,m as renderedStatus,n as reset,h as runList,S as runLog,o as searchKeyword,t as searchPlaceholder,L as selectToViewDetail,u as selectToViewDetailCenter,v as sortNewestFirst,C as sortOldestFirst,e as sortOrder,D as warn};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const f="关键字",t="搜索 text / detail",L="排序",M="级别",o="应用过滤",S="重置",e="原始 NDJSON",s="已加载 {{loaded}} / {{total}}",n="解析失败 {{count}}",r="日志加载失败: {{error}}",c="暂无匹配日志",l="日志加载中...",a="选择左侧日志后查看 detail",d="日志中心",i="运行列表",w="日志列表",g="关键字检索",h="选择中间日志后查看 detail",u="运行日志",v="详情",x="信息",C="警告",K="错误",F="最新在前",p="最早在前",y="无 detail",T="关闭",D="加载中…",N="加载更多",O="rendered {{rendered}} / loaded {{loaded}} / total {{total}}",V={searchKeyword:"关键字",searchPlaceholder:t,sortOrder:"排序",level:"级别",applyFilters:o,reset:"重置",rawNdjson:e,loaded:s,parseFailed:n,loadFailed:r,noMatch:c,loading:l,selectToViewDetail:a,logCenter:d,runList:i,logList:w,keywordSearch:g,selectToViewDetailCenter:h,runLog:u,detail:"详情",info:"信息",warn:"警告",error:"错误",sortNewestFirst:F,sortOldestFirst:p,noDetail:y,close:"关闭",loadingMore:D,loadMore:N,renderedStatus:O};export{o as applyFilters,T as close,V as default,v as detail,K as error,x as info,g as keywordSearch,M as level,r as loadFailed,N as loadMore,s as loaded,l as loading,D as loadingMore,d as logCenter,w as logList,y as noDetail,c as noMatch,n as parseFailed,e as rawNdjson,O as renderedStatus,S as reset,i as runList,u as runLog,f as searchKeyword,t as searchPlaceholder,a as selectToViewDetail,h as selectToViewDetailCenter,F as sortNewestFirst,p as sortOldestFirst,L as sortOrder,C as warn};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e="New Pipeline",n="Create Pipeline",t="Rename Pipeline",o="Delete Pipeline",i="Add Object",l="Delete Node",d="Delete Group",r="Final Output",c="Plugin Config",s="Edit Workflow JSON",a="Pipeline Scheduler Management",p={pipelineId:"Pipeline ID",pipelineTitle:"Pipeline Title",createMethod:"Create Method",blank:"Blank",clone:"Clone from Existing Pipeline",cloneSource:"Clone Source",newTitle:"New Title",createType:"Create Type",node:"Node",group:"Parallel Group",nodeId:"Node ID",nodeTitle:"Node Title",nodeInstruction:"Node Instruction",dependsOn:"Dependencies (auto-detected, multi-select)",groupId:"Group ID",members:"Members",commonUpstream:"Common Upstream",joinPolicy:"Join Policy"},u={pipelineId:"e.g. C",pipelineTitle:"e.g. Pipeline DAG-C",newTitle:"e.g. Pipeline DAG-A",nodeId:"e.g. n5",nodeTitle:"e.g. Change Summary",nodeInstruction:"Leave blank, edit later",groupId:"e.g. g_yes_parallel"},m={confirmCreate:"Create Pipeline",confirmRename:"Rename",confirmDeletePipeline:"Delete Pipeline",confirmAdd:"Add",confirmAddGroup:"Add Group",confirmDelete:"Delete",saveWorkflow:"Save Workflow JSON"},g="Saving...",C="Creating...",P="Deleting...",f="Close",w="Hold Ctrl/Command for multi-select",T="No output yet",b="Current Pipeline",N="Current Title",h="This pipeline will be deleted.",D="The archive directory will be saved to",I="This node will be deleted",v=", and its dependencies will be cleaned up. This action cannot be undone.",G="This group will be deleted",S=". Members ({{members}}) will be restored to regular nodes, and join edges will be removed.",k="Save the full workflow, including edges, groups, and scheduler settings.",y={createPipeline:e,createPipelineTitle:n,renamePipeline:t,deletePipeline:o,addObject:i,deleteNode:l,deleteGroup:d,outputContent:r,pluginConfig:c,editWorkflowJson:s,schedulerManagement:a,fieldLabel:p,placeholder:u,action:m,saving:g,creating:C,deleting:P,close:f,multiSelectHint:w,noOutput:T,currentPipeline:b,currentTitle:N,deleteConfirm:h,archiveNote:D,deleteNodeConfirm:I,deleteNodeNote:v,deleteGroupConfirm:G,deleteGroupNote:S,workflowJsonLabel:k};export{m as action,i as addObject,D as archiveNote,f as close,e as createPipeline,n as createPipelineTitle,C as creating,b as currentPipeline,N as currentTitle,y as default,h as deleteConfirm,d as deleteGroup,G as deleteGroupConfirm,S as deleteGroupNote,l as deleteNode,I as deleteNodeConfirm,v as deleteNodeNote,o as deletePipeline,P as deleting,s as editWorkflowJson,p as fieldLabel,w as multiSelectHint,T as noOutput,r as outputContent,u as placeholder,c as pluginConfig,t as renamePipeline,g as saving,a as schedulerManagement,k as workflowJsonLabel};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e="新增流水线",o="创建流水线",n="修改流水线标题",t="确认删除流水线",c="新增对象",l="确认删除节点",i="确认删除并行组",s="最终输出内容",r="插件配置",d="编辑工作流 JSON",p="流水线调度管理",a={pipelineId:"流水线 ID",pipelineTitle:"流水线标题",createMethod:"创建方式",blank:"空白创建",clone:"从现有流水线克隆",cloneSource:"克隆来源",newTitle:"新标题",createType:"创建类型",node:"节点",group:"并行组",nodeId:"节点 ID",nodeTitle:"节点标题",nodeInstruction:"节点指令",dependsOn:"依赖节点(自动识别上游,可多选)",groupId:"组 ID",members:"组内成员",commonUpstream:"公共上游",joinPolicy:"汇聚策略"},m={pipelineId:"例如 C",pipelineTitle:"例如 流水线 DAG-C",newTitle:"例如 流水线 DAG-A",nodeId:"例如 n5",nodeTitle:"例如 变更汇总",nodeInstruction:"可留空,后续再编辑",groupId:"例如 g_yes_parallel"},u={confirmCreate:"确认新增流水线",confirmRename:"确认修改标题",confirmDeletePipeline:"确认删除流水线",confirmAdd:"确认新增",confirmAddGroup:"确认新增并行组",confirmDelete:"确认删除",saveWorkflow:"保存 Workflow JSON"},f="保存中...",g="新增中...",I="删除中...",C="关闭",w="按 Ctrl/Command 可多选",T="暂无最终输出内容",N="当前流水线",D="当前标题",P="将删除流水线",b="删除后目录会归档到",k="将删除节点",G=",并清理其他节点对它的依赖。此操作不可撤销。",h="将删除并行组",A=",组内成员: {{members}}。组成员会恢复为普通节点,汇聚边会被清理。",O="可编辑整份 workflow(含 edges/groups/scheduler)",J={createPipeline:e,createPipelineTitle:o,renamePipeline:n,deletePipeline:t,addObject:c,deleteNode:l,deleteGroup:i,outputContent:s,pluginConfig:r,editWorkflowJson:d,schedulerManagement:p,fieldLabel:a,placeholder:m,action:u,saving:f,creating:g,deleting:I,close:C,multiSelectHint:w,noOutput:T,currentPipeline:N,currentTitle:D,deleteConfirm:P,archiveNote:b,deleteNodeConfirm:k,deleteNodeNote:G,deleteGroupConfirm:h,deleteGroupNote:A,workflowJsonLabel:O};export{u as action,c as addObject,b as archiveNote,C as close,e as createPipeline,o as createPipelineTitle,g as creating,N as currentPipeline,D as currentTitle,J as default,P as deleteConfirm,i as deleteGroup,h as deleteGroupConfirm,A as deleteGroupNote,l as deleteNode,k as deleteNodeConfirm,G as deleteNodeNote,t as deletePipeline,I as deleting,d as editWorkflowJson,a as fieldLabel,w as multiSelectHint,T as noOutput,s as outputContent,m as placeholder,r as pluginConfig,n as renamePipeline,f as saving,p as schedulerManagement,O as workflowJsonLabel};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const t="Overview",n="Agents",o="Pipelines",s="Run History",e="Artifacts",c="Logs",a="Scheduler",i="Home",l="Collapse Navigation",p="Expand Navigation",v="Back to Home",g="Skip to Content",r="Settings",d={overview:t,agents:n,pipeline:o,pipelineRuns:s,artifacts:e,logs:c,schedulerPanel:a,home:i,collapseNav:l,expandNav:p,backToHome:v,skipToContent:g,settings:r};export{n as agents,e as artifacts,v as backToHome,l as collapseNav,d as default,p as expandNav,i as home,c as logs,t as overview,o as pipeline,s as pipelineRuns,a as schedulerPanel,r as settings,g as skipToContent};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const a="总览",i="智能体",l="流水线",s="运行记录",p="产物",v="日志",t="调度面板",g="主页",n="收起导航",o="展开导航",e="返回主页",c="跳到主内容",r="设置",d={overview:"总览",agents:"智能体",pipeline:"流水线",pipelineRuns:s,artifacts:"产物",logs:"日志",schedulerPanel:t,home:"主页",collapseNav:n,expandNav:o,backToHome:e,skipToContent:c,settings:"设置"};export{i as agents,p as artifacts,e as backToHome,n as collapseNav,d as default,o as expandNav,g as home,v as logs,a as overview,l as pipeline,s as pipelineRuns,t as schedulerPanel,r as settings,c as skipToContent};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e="Node Details",o="Group Details",t="Node Title",n="Session",s="Agent Instruction",c="Lane",r="Route Allowed",u="Toggle Routing",H="On",z="Off",l="Delete route {{route}}",a="No routes configured. Add 2-5 custom values.",i="Enter custom route, e.g. holo",d="Add Route",g="Route Targets (route → node)",p="Not configured",m="Select target node for route {{route}}",R="Dependencies (upstream only, multi-select)",f="Edit Dependencies",D="No available upstream nodes",j="Allow Upstream Rejection",B="Yes",F="No",v="Allow this node to reject upstream results?",N="Max Reject Count",b="Artifacts",A="Retry Node",S="Saving",G="Runtime",y="Group ID",C="e.g. g_yes_parallel",I="Members",O="No available members",T="Click to toggle selection",w="Common Upstream",M="No available common upstream",P="Join Policy",h="Select group join policy",E="Member Run States",U="Group Item Runs",x="Group Artifacts",Y="Last Error",_="Saving group...",J="Group fields require manual save",L="Save Group Config",k="Deleting...",q="Delete Group",K={nodeDetail:e,groupDetail:o,nodeTitle:t,session:n,agentInstruction:s,lane:c,routeAllowed:r,toggleRoute:u,routeOn:"On",routeOff:"Off",deleteRoute:l,noRoute:a,routePlaceholder:i,addRoute:d,routeTargets:g,notConfigured:p,selectRouteTarget:m,dependsOn:R,editDepends:f,noDepends:D,allowReject:j,rejectYes:"Yes",rejectNo:"No",selectReject:v,maxRejectCount:N,artifacts:b,retryNode:A,saving:S,runtime:G,groupId:y,groupIdPlaceholder:C,members:I,noMembers:O,selectMembers:T,commonUpstream:w,noUpstream:M,joinPolicy:P,selectJoinPolicy:h,memberRunStates:E,groupItemRun:U,groupArtifacts:x,lastError:Y,groupSaving:_,groupSaveHint:J,saveGroupConfig:L,deleting:k,deleteGroup:q};export{d as addRoute,s as agentInstruction,j as allowReject,b as artifacts,w as commonUpstream,K as default,q as deleteGroup,l as deleteRoute,k as deleting,R as dependsOn,f as editDepends,x as groupArtifacts,o as groupDetail,y as groupId,C as groupIdPlaceholder,U as groupItemRun,J as groupSaveHint,_ as groupSaving,P as joinPolicy,c as lane,Y as lastError,N as maxRejectCount,E as memberRunStates,I as members,D as noDepends,O as noMembers,a as noRoute,M as noUpstream,e as nodeDetail,t as nodeTitle,p as notConfigured,F as rejectNo,B as rejectYes,A as retryNode,r as routeAllowed,z as routeOff,H as routeOn,i as routePlaceholder,g as routeTargets,G as runtime,L as saveGroupConfig,S as saving,h as selectJoinPolicy,T as selectMembers,v as selectReject,m as selectRouteTarget,n as session,u as toggleRoute};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const t="节点详情",o="并行组详情",e="节点标题",Y="会话",n="让 Agent 干嘛",s="泳道(workflow)",c="路由 allowed(workflow)",r="切换分流",E="开",H="关",u="删除路由 {{route}}",l="暂无 route,添加 2-5 个自定义值",a="输入自定义 route,例如 holo",i="添加路由",d="分流目标(按 route 发给节点)",J="未配置",g="选择 route {{route}} 的目标节点",p="依赖节点(仅上游,可多选)",f="编辑依赖节点",m="暂无可选上游节点",R="允许打回上游",q="是",z="否",j="选择是否允许打回上游",w="最大打回次数",B="产物",D="重试节点",F="保存中",I="运行时间",v="组 ID",C="例如 g_yes_parallel",O="组内成员",b="暂无可选组成员",y="直接勾选/取消,不再依赖 Ctrl 多选",A="公共上游",P="暂无可选公共上游",h="汇聚策略",N="选择并行组汇聚策略",S="成员运行态",T="组 Item 运行",K="组产物",_="最近错误",k="并行组保存中...",x="并行组字段需手动保存",G="保存并行组配置",M="删除中...",U="删除并行组",L={nodeDetail:t,groupDetail:o,nodeTitle:e,session:"会话",agentInstruction:n,lane:s,routeAllowed:c,toggleRoute:r,routeOn:"开",routeOff:"关",deleteRoute:u,noRoute:l,routePlaceholder:a,addRoute:i,routeTargets:d,notConfigured:"未配置",selectRouteTarget:g,dependsOn:p,editDepends:f,noDepends:m,allowReject:R,rejectYes:"是",rejectNo:"否",selectReject:j,maxRejectCount:w,artifacts:"产物",retryNode:D,saving:"保存中",runtime:I,groupId:v,groupIdPlaceholder:C,members:O,noMembers:b,selectMembers:y,commonUpstream:A,noUpstream:P,joinPolicy:h,selectJoinPolicy:N,memberRunStates:S,groupItemRun:T,groupArtifacts:"组产物",lastError:_,groupSaving:k,groupSaveHint:x,saveGroupConfig:G,deleting:M,deleteGroup:U};export{i as addRoute,n as agentInstruction,R as allowReject,B as artifacts,A as commonUpstream,L as default,U as deleteGroup,u as deleteRoute,M as deleting,p as dependsOn,f as editDepends,K as groupArtifacts,o as groupDetail,v as groupId,C as groupIdPlaceholder,T as groupItemRun,x as groupSaveHint,k as groupSaving,h as joinPolicy,s as lane,_ as lastError,w as maxRejectCount,S as memberRunStates,O as members,m as noDepends,b as noMembers,l as noRoute,P as noUpstream,t as nodeDetail,e as nodeTitle,J as notConfigured,z as rejectNo,q as rejectYes,D as retryNode,c as routeAllowed,H as routeOff,E as routeOn,a as routePlaceholder,d as routeTargets,I as runtime,G as saveGroupConfig,F as saving,N as selectJoinPolicy,y as selectMembers,j as selectReject,g as selectRouteTarget,Y as session,r as toggleRoute};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const t="部门运营总览",n="每个卡片代表一条流水线(部门),展示当前运行节点与最新产物。",o="当前运行节点",e="暂无运行节点",s="最新产物",c="暂无产物",i="生成时间 {{time}}",p="成功",b="失败",k="阻塞",r="异常节点",u="打开会话",d="当前无失败节点",N="结构化",a="节点返回",l="进度 {{finished}}/{{total}}",f="更新时间 {{time}}",C="进入流水线",g="工作中...",m="开始工作",R={title:t,subtitle:n,currentRunningNode:o,noRunningNode:e,latestArtifact:s,noArtifact:c,generateTime:i,successCount:"成功",failedCount:"失败",blockedCount:"阻塞",abnormalNodes:r,openSession:u,noFailedNode:d,structured:"结构化",nodeReturn:a,progress:l,updateTime:f,enterPipeline:C,working:g,startWork:m};export{r as abnormalNodes,k as blockedCount,o as currentRunningNode,R as default,C as enterPipeline,b as failedCount,i as generateTime,s as latestArtifact,c as noArtifact,d as noFailedNode,e as noRunningNode,a as nodeReturn,u as openSession,l as progress,m as startWork,N as structured,n as subtitle,p as successCount,t as title,f as updateTime,g as working};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const t="Operations Overview",e="Each card represents a pipeline, showing currently running nodes and latest artifacts.",n="Currently Running Node",o="No running nodes",s="Latest Artifact",r="No artifacts",c="Generated {{time}}",i="Success",a="Failed",d="Blocked",u="Abnormal Nodes",l="View Session",p="No failed nodes",g="Structured Output",N="Node Output",f="Progress {{finished}}/{{total}}",m="Updated {{time}}",w="View Pipeline",k="Working...",S="Start",b={title:t,subtitle:e,currentRunningNode:n,noRunningNode:o,latestArtifact:s,noArtifact:r,generateTime:c,successCount:i,failedCount:a,blockedCount:d,abnormalNodes:u,openSession:l,noFailedNode:p,structured:g,nodeReturn:N,progress:f,updateTime:m,enterPipeline:w,working:k,startWork:S};export{u as abnormalNodes,d as blockedCount,n as currentRunningNode,b as default,w as enterPipeline,a as failedCount,c as generateTime,s as latestArtifact,r as noArtifact,p as noFailedNode,o as noRunningNode,N as nodeReturn,l as openSession,f as progress,S as startWork,g as structured,e as subtitle,i as successCount,t as title,m as updateTime,k as working};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e="No agent configured",n="Move Up",t="Move Down",o="Delete Node",i="Delete Group",l="Group: {{groupId}}",c="Add Object",s="Click to create a node or group",a="No batch run status",r="Double-click to rename",d="Expand Pipeline",p="Collapse Pipeline",u="Stop Pipeline",h="Pipeline not running",g="Remote Batch Running",P="Start Remote Batch",f="Starting...",b="Start Run",m="Plugin Config",S="View Workflow JSON",B="Save Edit",N="Enter Edit Mode",w="Delete Pipeline",R="Keep at least one pipeline",C="Remote Keyword Pool Batch (DAG-{{pipelineId}})",v="No nodes",D="Branch Nodes",k="No branch nodes. Enable branch mode in the workflow settings to configure branches.",E="Pipeline {{pipelineId}} has no nodes",A="Enter batch number",G="Plugin Config (DAG-{{pipelineId}})",I="All pipelines share the same plugin capabilities. Toggle plugins on or off for this pipeline.",O="Remote Keyword Pool Batch",F="When enabled, this plugin panel will appear on the DAG-{{pipelineId}} card.",H="Remote Keyword Pool URL",K="Batch Size",T="Start Batch",U="Source Field",W="e.g. list30 or data.list30",j="Supports dot paths; falls back to default field detection if not found.",x="Scheduler",y="When enabled, shows the scheduler card and allows auto/manual scheduling.",M="Save Plugin Config",z="Scheduler Panel",J={notConfiguredAgent:e,moveUp:n,moveDown:t,deleteNode:o,deleteGroup:i,parallelGroup:l,addObject:c,addObjectHint:s,noBatchStatus:a,doubleClickTitle:r,expandPipeline:d,collapsePipeline:p,stopPipeline:u,pipelineNotRunning:h,remoteBatchRunning:g,startRemoteBatch:P,runStarting:f,startRun:b,pluginConfig:m,viewWorkflowJson:S,saveEdit:B,enterEdit:N,deletePipeline:w,keepAtLeastOne:R,remoteBatchTitle:C,noNodes:v,branchNodes:D,noBranchNodes:k,currentPipelineNoNodes:E,startBatchPlaceholder:A,pluginConfigTitle:G,pluginSharedNote:I,remoteBatchPlugin:O,remoteBatchPluginHint:F,remoteUrl:H,batchSize:K,startBatch:T,sourceField:U,sourceFieldPlaceholder:W,sourceFieldHint:j,schedulerPlugin:x,schedulerPluginHint:y,savePluginConfig:M,schedulerPanel:z};export{c as addObject,s as addObjectHint,K as batchSize,D as branchNodes,p as collapsePipeline,E as currentPipelineNoNodes,J as default,i as deleteGroup,o as deleteNode,w as deletePipeline,r as doubleClickTitle,N as enterEdit,d as expandPipeline,R as keepAtLeastOne,t as moveDown,n as moveUp,a as noBatchStatus,k as noBranchNodes,v as noNodes,e as notConfiguredAgent,l as parallelGroup,h as pipelineNotRunning,m as pluginConfig,G as pluginConfigTitle,I as pluginSharedNote,O as remoteBatchPlugin,F as remoteBatchPluginHint,g as remoteBatchRunning,C as remoteBatchTitle,H as remoteUrl,f as runStarting,B as saveEdit,M as savePluginConfig,z as schedulerPanel,x as schedulerPlugin,y as schedulerPluginHint,U as sourceField,j as sourceFieldHint,W as sourceFieldPlaceholder,T as startBatch,A as startBatchPlaceholder,P as startRemoteBatch,b as startRun,u as stopPipeline,S as viewWorkflowJson};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const t="未配置 Agent",e="上移节点",n="下移节点",o="删除节点",W="删除组",c="并行组: {{groupId}}",s="新增对象",i="点击创建节点或并行组",l="暂无批跑状态",r="双击修改标题",a="展开流水线",d="折叠流水线",p="停止流水线",u="流水线未运行",g="远程批跑中",h="启动远程批跑",P="运行启动中",B="启动运行",N="插件配置",m="查看工作流 JSON",f="保存编辑",b="进入编辑",A="删除流水线",G="至少保留一条流水线",v="远程关键词池批跑(DAG-{{pipelineId}})",w="暂无节点",C="支线节点",I="暂无支线节点(可在 workflow.lane=branch 后显示)",S="当前流水线 {{pipelineId}} 暂无节点",k="起始批次",D="插件配置(DAG-{{pipelineId}})",H="所有流水线共享同一套插件能力;这里仅配置当前流水线要不要打开对应插件。",O="远程关键词池批跑",R="启用后会在 DAG-{{pipelineId}} 卡片中显示该插件面板。",F="远程关键词池地址",T="每批可跑个数",j="默认起始批次",x="跑哪个字段",E="例如 list30 或 data.list30",J="支持点路径;取不到时后端会退回默认字段探测。",q="调度器",U="启用后显示调度器卡片,并允许自动/手动调度。",z="保存插件配置",L="调度面板",y={notConfiguredAgent:t,moveUp:e,moveDown:n,deleteNode:o,deleteGroup:"删除组",parallelGroup:c,addObject:s,addObjectHint:i,noBatchStatus:l,doubleClickTitle:r,expandPipeline:a,collapsePipeline:d,stopPipeline:p,pipelineNotRunning:u,remoteBatchRunning:g,startRemoteBatch:h,runStarting:P,startRun:B,pluginConfig:N,viewWorkflowJson:m,saveEdit:f,enterEdit:b,deletePipeline:A,keepAtLeastOne:G,remoteBatchTitle:v,noNodes:w,branchNodes:C,noBranchNodes:I,currentPipelineNoNodes:S,startBatchPlaceholder:k,pluginConfigTitle:D,pluginSharedNote:H,remoteBatchPlugin:O,remoteBatchPluginHint:R,remoteUrl:F,batchSize:T,startBatch:j,sourceField:x,sourceFieldPlaceholder:E,sourceFieldHint:J,schedulerPlugin:"调度器",schedulerPluginHint:U,savePluginConfig:z,schedulerPanel:L};export{s as addObject,i as addObjectHint,T as batchSize,C as branchNodes,d as collapsePipeline,S as currentPipelineNoNodes,y as default,W as deleteGroup,o as deleteNode,A as deletePipeline,r as doubleClickTitle,b as enterEdit,a as expandPipeline,G as keepAtLeastOne,n as moveDown,e as moveUp,l as noBatchStatus,I as noBranchNodes,w as noNodes,t as notConfiguredAgent,c as parallelGroup,u as pipelineNotRunning,N as pluginConfig,D as pluginConfigTitle,H as pluginSharedNote,O as remoteBatchPlugin,R as remoteBatchPluginHint,g as remoteBatchRunning,v as remoteBatchTitle,F as remoteUrl,P as runStarting,f as saveEdit,z as savePluginConfig,L as schedulerPanel,q as schedulerPlugin,U as schedulerPluginHint,x as sourceField,J as sourceFieldHint,E as sourceFieldPlaceholder,j as startBatch,k as startBatchPlaceholder,h as startRemoteBatch,B as startRun,p as stopPipeline,m as viewWorkflowJson};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
const s="Session Tools",e="Session",o="Core Files",n="Loading...",t="No files",i="No agent selected",l="Loading core files...",c="Failed to load core files: {{error}}",a="No core files for this agent",d="Select a file from the list",r="Loading file content...",g="Failed to load file: {{error}}",F="File is empty",S="Select a session",m="Loading session...",f="Failed to load session: {{error}}",h="No session messages",u="Thinking...",v="Scroll to Bottom",L="Type a message...",p="No active session",y="Send Message",N="Session ID",T="No sessions available",M="Send Mode",C="Auto (Recommended)",I="chat.send only",O="sessions.send only",P="Close Session",k="Edit",A="Cancel",B="Saving...",E="Save",J="Failed to save: {{error}}",b=`Sent successfully
|
|
2
|
+
method: {{method}}
|
|
3
|
+
model: {{model}}
|
|
4
|
+
params: {{params}}`,x=`Failed to send message
|
|
5
|
+
{{detail}}`,D="Failed to create session: HTTP {{status}}",H="Invalid JSON",R={sessionTools:s,session:e,coreFiles:o,loading:n,noFiles:t,noAgentSelected:i,coreFilesLoading:l,coreFilesLoadFailed:c,noCoreFiles:a,selectFile:d,fileContentLoading:r,fileLoadFailed:g,fileEmpty:F,selectSession:S,sessionLoading:m,sessionLoadFailed:f,noMessages:h,thinking:u,scrollToBottom:v,inputPlaceholder:L,inputPlaceholderNoSession:p,sendMessage:y,sessionId:N,noSessions:T,sendMode:M,auto:C,chatOnly:I,sessionsOnly:O,closeSessionModal:P,edit:k,cancel:A,saving:B,save:E,saveFailed:J,sendSuccess:b,sendFailed:x,createSessionFailed:D,invalidJson:H};export{C as auto,A as cancel,I as chatOnly,P as closeSessionModal,o as coreFiles,c as coreFilesLoadFailed,l as coreFilesLoading,D as createSessionFailed,R as default,k as edit,r as fileContentLoading,F as fileEmpty,g as fileLoadFailed,L as inputPlaceholder,p as inputPlaceholderNoSession,H as invalidJson,n as loading,i as noAgentSelected,a as noCoreFiles,t as noFiles,h as noMessages,T as noSessions,E as save,J as saveFailed,B as saving,v as scrollToBottom,d as selectFile,S as selectSession,x as sendFailed,y as sendMessage,M as sendMode,b as sendSuccess,e as session,N as sessionId,f as sessionLoadFailed,m as sessionLoading,s as sessionTools,O as sessionsOnly,u as thinking};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
const s="会话工具",D="会话",o="核心文件",n="加载中...",e="暂无文件",t="未选择智能体",c="核心文件加载中...",i="核心文件加载失败: {{error}}",a="该智能体暂无核心文件",l="请选择左侧文件",d="文件内容加载中...",r="文件加载失败: {{error}}",F="文件为空",g="请选择会话",m="会话加载中...",S="会话加载失败: {{error}}",h="暂无会话消息",u="思考中...",p="回到底部",L="输入发送给会话的文本",f="请先在系统中创建会话",v="发送消息",M="会话 ID",T="暂无可用会话",y="发送模式",O="自动选择(推荐)",P="仅 chat.send",C="仅 sessions.send",I="关闭会话弹窗",E="编辑",H="取消",J="保存中...",_="保存",N="保存失败: {{error}}",k=`发送成功
|
|
2
|
+
method: {{method}}
|
|
3
|
+
model: {{model}}
|
|
4
|
+
params: {{params}}`,x=`发送失败
|
|
5
|
+
{{detail}}`,A="新建会话失败: HTTP {{status}}",B="新建会话 JSON 格式不正确",b={sessionTools:s,session:"会话",coreFiles:o,loading:n,noFiles:e,noAgentSelected:t,coreFilesLoading:c,coreFilesLoadFailed:i,noCoreFiles:a,selectFile:l,fileContentLoading:d,fileLoadFailed:r,fileEmpty:F,selectSession:g,sessionLoading:m,sessionLoadFailed:S,noMessages:h,thinking:u,scrollToBottom:p,inputPlaceholder:L,inputPlaceholderNoSession:f,sendMessage:v,sessionId:M,noSessions:T,sendMode:y,auto:O,chatOnly:P,sessionsOnly:C,closeSessionModal:I,edit:"编辑",cancel:"取消",saving:J,save:"保存",saveFailed:N,sendSuccess:k,sendFailed:x,createSessionFailed:A,invalidJson:B};export{O as auto,H as cancel,P as chatOnly,I as closeSessionModal,o as coreFiles,i as coreFilesLoadFailed,c as coreFilesLoading,A as createSessionFailed,b as default,E as edit,d as fileContentLoading,F as fileEmpty,r as fileLoadFailed,L as inputPlaceholder,f as inputPlaceholderNoSession,B as invalidJson,n as loading,t as noAgentSelected,a as noCoreFiles,e as noFiles,h as noMessages,T as noSessions,_ as save,N as saveFailed,J as saving,p as scrollToBottom,l as selectFile,g as selectSession,x as sendFailed,v as sendMessage,y as sendMode,k as sendSuccess,D as session,M as sessionId,S as sessionLoadFailed,m as sessionLoading,s as sessionTools,C as sessionsOnly,u as thinking};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const t="Live Timeline",n="Showing {{displayed}} / {{total}} entries",e="View Full Log",o="Event Details",s="Error",i="Warning",l="Info",a="Started",c="Finished",r="Details{{suffix}} ({{count}} items)",d="Collapsed",g="In progress",u="Close",f={timeline:t,displayCount:n,viewFullLog:e,eventDetail:o,error:s,warning:i,info:l,agentStart:a,agentEnd:c,agentDetail:r,collapsed:d,inProgress:g,close:u};export{r as agentDetail,c as agentEnd,a as agentStart,u as close,d as collapsed,f as default,n as displayCount,s as error,o as eventDetail,g as inProgress,l as info,t as timeline,e as viewFullLog,i as warning};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const n="实时时间线",t="显示 {{displayed}} 条 / 原始 {{total}} 条",o="查看完整日志",s="事件详情",a="错误",i="警告",r="信息",e="开始工作",c="结束工作",l="工作细节{{suffix}} ({{count}} 条)",d="已折叠",g="进行中",f="关闭",u={timeline:n,displayCount:t,viewFullLog:o,eventDetail:s,error:"错误",warning:"警告",info:"信息",agentStart:e,agentEnd:c,agentDetail:l,collapsed:"已折叠",inProgress:"进行中",close:"关闭"};export{l as agentDetail,c as agentEnd,e as agentStart,f as close,d as collapsed,u as default,t as displayCount,a as error,s as eventDetail,g as inProgress,r as info,n as timeline,o as viewFullLog,i as warning};
|
package/web/dist/index.html
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
<!doctype html>
|
|
2
|
-
<html lang="
|
|
2
|
+
<html lang="en">
|
|
3
3
|
<head>
|
|
4
4
|
<meta charset="UTF-8" />
|
|
5
5
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
6
6
|
<link rel="icon" type="image/svg+xml" href="/favicon.svg" />
|
|
7
7
|
<title>TaskMeld</title>
|
|
8
|
-
<script type="module" crossorigin src="/assets/index-
|
|
9
|
-
<link rel="stylesheet" crossorigin href="/assets/index-
|
|
8
|
+
<script type="module" crossorigin src="/assets/index-DYDQZRLk.js"></script>
|
|
9
|
+
<link rel="stylesheet" crossorigin href="/assets/index-C8wTjZvH.css">
|
|
10
10
|
</head>
|
|
11
11
|
<body>
|
|
12
12
|
<div id="root"></div>
|
|
@@ -1,163 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.createApiHandler = void 0;
|
|
4
|
-
const node_url_1 = require("node:url");
|
|
5
|
-
const http_utils_1 = require("./http-utils");
|
|
6
|
-
const serve_static_1 = require("./serve-static");
|
|
7
|
-
const router_js_1 = require("./router.js");
|
|
8
|
-
const middleware_js_1 = require("./middleware.js");
|
|
9
|
-
const health_js_1 = require("./routes/health.js");
|
|
10
|
-
const gateway_js_1 = require("./routes/gateway.js");
|
|
11
|
-
const timeline_js_1 = require("./routes/timeline.js");
|
|
12
|
-
const logs_js_1 = require("./routes/logs.js");
|
|
13
|
-
const artifacts_js_1 = require("./routes/artifacts.js");
|
|
14
|
-
const agents_js_1 = require("./routes/agents.js");
|
|
15
|
-
const sessions_js_1 = require("./routes/sessions.js");
|
|
16
|
-
const pipelines_js_1 = require("./routes/pipelines.js");
|
|
17
|
-
const pipeline_workflow_js_1 = require("./routes/pipeline-workflow.js");
|
|
18
|
-
const pipeline_runtime_js_1 = require("./routes/pipeline-runtime.js");
|
|
19
|
-
const pipeline_batch_js_1 = require("./routes/pipeline-batch.js");
|
|
20
|
-
const pipeline_scheduler_js_1 = require("./routes/pipeline-scheduler.js");
|
|
21
|
-
const pipeline_diagnostics_js_1 = require("./routes/pipeline-diagnostics.js");
|
|
22
|
-
const pipeline_outputs_js_1 = require("./routes/pipeline-outputs.js");
|
|
23
|
-
const pipeline_links_js_1 = require("./routes/pipeline-links.js");
|
|
24
|
-
const pipeline_queue_js_1 = require("./routes/pipeline-queue.js");
|
|
25
|
-
const run_log_service_1 = require("../logs/run-log-service");
|
|
26
|
-
const pipeline_service_js_1 = require("../services/pipeline-service.js");
|
|
27
|
-
const scheduler_service_js_1 = require("../services/scheduler-service.js");
|
|
28
|
-
const data_dir_1 = require("../app/data-dir");
|
|
29
|
-
const createApiHandler = (options) => {
|
|
30
|
-
const runLogService = (0, run_log_service_1.createRunLogService)({
|
|
31
|
-
rootDir: (0, data_dir_1.resolveTaskMeldDataPath)("logs", "runs"),
|
|
32
|
-
});
|
|
33
|
-
// Phase 1-5: 基于 Router 的路由迁移(全部路由模块)
|
|
34
|
-
const router = (0, router_js_1.createRouter)();
|
|
35
|
-
(0, health_js_1.registerHealthRoutes)(router);
|
|
36
|
-
(0, gateway_js_1.registerGatewayRoutes)(router);
|
|
37
|
-
(0, timeline_js_1.registerTimelineRoutes)(router);
|
|
38
|
-
(0, logs_js_1.registerLogRoutes)(router);
|
|
39
|
-
(0, artifacts_js_1.registerArtifactsRoutes)(router);
|
|
40
|
-
(0, agents_js_1.registerAgentsRoutes)(router);
|
|
41
|
-
(0, sessions_js_1.registerSessionsRoutes)(router);
|
|
42
|
-
(0, pipelines_js_1.registerPipelinesRoutes)(router);
|
|
43
|
-
(0, pipeline_workflow_js_1.registerPipelineWorkflowRoutes)(router);
|
|
44
|
-
(0, pipeline_runtime_js_1.registerPipelineRuntimeRoutes)(router);
|
|
45
|
-
(0, pipeline_batch_js_1.registerPipelineBatchRoutes)(router);
|
|
46
|
-
(0, pipeline_scheduler_js_1.registerPipelineSchedulerRoutes)(router);
|
|
47
|
-
(0, pipeline_diagnostics_js_1.registerPipelineDiagnosticsRoutes)(router);
|
|
48
|
-
(0, pipeline_outputs_js_1.registerPipelineOutputsRoutes)(router);
|
|
49
|
-
(0, pipeline_links_js_1.registerPipelineLinksRoutes)(router);
|
|
50
|
-
(0, pipeline_queue_js_1.registerPipelineQueueRoutes)(router);
|
|
51
|
-
const pipeline = (0, middleware_js_1.composeMiddleware)(middleware_js_1.errorMiddleware, (0, middleware_js_1.corsMiddleware)(options.webOrigin));
|
|
52
|
-
// 已迁移路由共享的 services
|
|
53
|
-
const pipelineService = (0, pipeline_service_js_1.createPipelineService)(options.app);
|
|
54
|
-
const schedulerService = (0, scheduler_service_js_1.createSchedulerService)(options.app);
|
|
55
|
-
const migratedServices = {
|
|
56
|
-
client: options.app.gateway.client,
|
|
57
|
-
getLatestStatus: options.app.gateway.getLatestStatus,
|
|
58
|
-
getLatestHello: options.app.gateway.getLatestHello,
|
|
59
|
-
getLastFrame: options.app.gateway.getLastFrame,
|
|
60
|
-
getTimeline: options.app.runtime.getCombinedTimeline,
|
|
61
|
-
runLogService,
|
|
62
|
-
pickArray: options.app.gateway.pickArray,
|
|
63
|
-
refreshSessionsFromGateway: options.app.gateway.refreshSessionsFromGateway,
|
|
64
|
-
getSessionCache: options.app.gateway.getSessionCache,
|
|
65
|
-
pushTimeline: (...args) => {
|
|
66
|
-
const primary = options.app.getPrimaryRuntime();
|
|
67
|
-
primary?.runtime.pushTimeline(...args);
|
|
68
|
-
},
|
|
69
|
-
listPipelines: options.app.listPipelines.bind(options.app),
|
|
70
|
-
getPipelineDefinition: options.app.getPipelineDefinition.bind(options.app),
|
|
71
|
-
pipelineService,
|
|
72
|
-
schedulerService,
|
|
73
|
-
};
|
|
74
|
-
return async (req, res) => {
|
|
75
|
-
const method = req.method ?? "GET";
|
|
76
|
-
const reqUrl = req.url ?? "/";
|
|
77
|
-
const url = new node_url_1.URL(reqUrl, `http://127.0.0.1:${options.apiPort}`);
|
|
78
|
-
// 全局 OPTIONS 处理:所有非 router 匹配的 OPTIONS 请求统一在此返回 204
|
|
79
|
-
// (router 匹配的 OPTIONS 由 corsMiddleware 在 pipeline 内处理)
|
|
80
|
-
if (method === "OPTIONS") {
|
|
81
|
-
res.writeHead(204, {
|
|
82
|
-
"Access-Control-Allow-Origin": options.webOrigin,
|
|
83
|
-
"Access-Control-Allow-Methods": "GET,POST,PATCH,DELETE,OPTIONS",
|
|
84
|
-
"Access-Control-Allow-Headers": "Content-Type",
|
|
85
|
-
});
|
|
86
|
-
res.end();
|
|
87
|
-
return;
|
|
88
|
-
}
|
|
89
|
-
const match = router.match(method, url.pathname);
|
|
90
|
-
if (match) {
|
|
91
|
-
let _bodyPromise = null;
|
|
92
|
-
const migratedCtx = {
|
|
93
|
-
req,
|
|
94
|
-
res,
|
|
95
|
-
method,
|
|
96
|
-
url,
|
|
97
|
-
params: match.params,
|
|
98
|
-
options,
|
|
99
|
-
services: migratedServices,
|
|
100
|
-
sendJson: (code, data) => (0, http_utils_1.sendJson)(res, code, data, options.webOrigin),
|
|
101
|
-
sendRaw: (code, headers, body) => {
|
|
102
|
-
res.writeHead(code, {
|
|
103
|
-
...headers,
|
|
104
|
-
"Access-Control-Allow-Origin": options.webOrigin,
|
|
105
|
-
"Access-Control-Allow-Methods": "GET,POST,PATCH,DELETE,OPTIONS",
|
|
106
|
-
"Access-Control-Allow-Headers": "Content-Type",
|
|
107
|
-
});
|
|
108
|
-
body.pipe(res);
|
|
109
|
-
},
|
|
110
|
-
readBody: () => {
|
|
111
|
-
if (!_bodyPromise)
|
|
112
|
-
_bodyPromise = (0, http_utils_1.readJsonBody)(req);
|
|
113
|
-
return _bodyPromise;
|
|
114
|
-
},
|
|
115
|
-
getPipelineScope: () => {
|
|
116
|
-
const pipelineId = match.params.pipelineId;
|
|
117
|
-
if (!pipelineId)
|
|
118
|
-
return null;
|
|
119
|
-
const runtime = options.app.getPipelineRuntime(pipelineId);
|
|
120
|
-
const definition = options.app.getPipelineDefinition(pipelineId);
|
|
121
|
-
if (!runtime || !definition)
|
|
122
|
-
return null;
|
|
123
|
-
return {
|
|
124
|
-
pipelineId: definition.id,
|
|
125
|
-
workflowFilePath: definition.workflowFilePath,
|
|
126
|
-
pushTimeline: runtime.runtime.pushTimeline,
|
|
127
|
-
touchRun: runtime.runtime.touchRun,
|
|
128
|
-
seedRun: runtime.runtime.seedRun,
|
|
129
|
-
emitPipeline: runtime.runtime.emitPipeline,
|
|
130
|
-
getRun: runtime.runtime.getRun,
|
|
131
|
-
setRun: runtime.runtime.setRun,
|
|
132
|
-
getTemplateNodes: runtime.workflow.getTemplateNodes,
|
|
133
|
-
setTemplateNodes: runtime.workflow.setTemplateNodes,
|
|
134
|
-
getWorkflow: runtime.workflow.getWorkflow,
|
|
135
|
-
setWorkflow: runtime.workflow.setWorkflow,
|
|
136
|
-
getItemRuns: runtime.pipeline.getItemRuns,
|
|
137
|
-
drainPipeline: runtime.pipeline.drainPipeline,
|
|
138
|
-
setSchedulerEnabled: runtime.pipeline.setSchedulerEnabled,
|
|
139
|
-
setSchedulerMode: runtime.pipeline.setSchedulerMode,
|
|
140
|
-
getSchedulerState: runtime.pipeline.getSchedulerState,
|
|
141
|
-
getBatchRunState: runtime.pipeline.getBatchRunState,
|
|
142
|
-
cancelBatchRun: runtime.pipeline.cancelBatchRun,
|
|
143
|
-
executorSessionByAgentId: runtime.gateway.getExecutorSessionByAgentId(),
|
|
144
|
-
getSessionCache: runtime.gateway.getSessionCache,
|
|
145
|
-
};
|
|
146
|
-
},
|
|
147
|
-
};
|
|
148
|
-
await pipeline(migratedCtx, async () => {
|
|
149
|
-
await match.handler(migratedCtx);
|
|
150
|
-
});
|
|
151
|
-
return;
|
|
152
|
-
}
|
|
153
|
-
if (url.pathname.startsWith("/api/") || url.pathname === "/api") {
|
|
154
|
-
(0, http_utils_1.sendJson)(res, 404, { error: "not_found" }, options.webOrigin);
|
|
155
|
-
return;
|
|
156
|
-
}
|
|
157
|
-
// SPA static file serving — falls back to index.html for client-side routing
|
|
158
|
-
if ((0, serve_static_1.serveStatic)(req, res))
|
|
159
|
-
return;
|
|
160
|
-
(0, http_utils_1.sendJson)(res, 404, { error: "not_found" }, options.webOrigin);
|
|
161
|
-
};
|
|
162
|
-
};
|
|
163
|
-
exports.createApiHandler = createApiHandler;
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.firstText = exports.readJsonBody = exports.sendJson = void 0;
|
|
4
|
-
const sendJson = (res, code, data, webOrigin) => {
|
|
5
|
-
res.writeHead(code, {
|
|
6
|
-
"Content-Type": "application/json; charset=utf-8",
|
|
7
|
-
"Access-Control-Allow-Origin": webOrigin,
|
|
8
|
-
"Access-Control-Allow-Methods": "GET,POST,PATCH,OPTIONS",
|
|
9
|
-
"Access-Control-Allow-Headers": "Content-Type",
|
|
10
|
-
});
|
|
11
|
-
res.end(JSON.stringify(data));
|
|
12
|
-
};
|
|
13
|
-
exports.sendJson = sendJson;
|
|
14
|
-
const readJsonBody = async (req) => {
|
|
15
|
-
const chunks = [];
|
|
16
|
-
for await (const chunk of req) {
|
|
17
|
-
chunks.push(Buffer.isBuffer(chunk) ? chunk : Buffer.from(chunk));
|
|
18
|
-
}
|
|
19
|
-
if (chunks.length === 0) {
|
|
20
|
-
return {};
|
|
21
|
-
}
|
|
22
|
-
return JSON.parse(Buffer.concat(chunks).toString("utf8"));
|
|
23
|
-
};
|
|
24
|
-
exports.readJsonBody = readJsonBody;
|
|
25
|
-
const firstText = (body) => {
|
|
26
|
-
const candidates = [body.text, body.message, body.content, body.input];
|
|
27
|
-
for (const candidate of candidates) {
|
|
28
|
-
if (typeof candidate === "string" && candidate.trim()) {
|
|
29
|
-
return candidate.trim();
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
return "";
|
|
33
|
-
};
|
|
34
|
-
exports.firstText = firstText;
|
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.corsMiddleware = exports.errorMiddleware = exports.composeMiddleware = void 0;
|
|
4
|
-
const composeMiddleware = (...middlewares) => {
|
|
5
|
-
return (ctx, handler) => {
|
|
6
|
-
const execute = (index) => {
|
|
7
|
-
if (index >= middlewares.length) {
|
|
8
|
-
return Promise.resolve(handler(ctx)).then(() => { });
|
|
9
|
-
}
|
|
10
|
-
let nextCalled = false;
|
|
11
|
-
const next = () => {
|
|
12
|
-
if (nextCalled) {
|
|
13
|
-
throw new Error("next() called multiple times in middleware");
|
|
14
|
-
}
|
|
15
|
-
nextCalled = true;
|
|
16
|
-
return execute(index + 1);
|
|
17
|
-
};
|
|
18
|
-
const result = middlewares[index](ctx, next);
|
|
19
|
-
return Promise.resolve(result).then(() => { });
|
|
20
|
-
};
|
|
21
|
-
return execute(0);
|
|
22
|
-
};
|
|
23
|
-
};
|
|
24
|
-
exports.composeMiddleware = composeMiddleware;
|
|
25
|
-
const errorMiddleware = async (ctx, next) => {
|
|
26
|
-
try {
|
|
27
|
-
await next();
|
|
28
|
-
}
|
|
29
|
-
catch (_error) {
|
|
30
|
-
if (!ctx.res.headersSent) {
|
|
31
|
-
ctx.sendJson(500, { error: "internal_error" });
|
|
32
|
-
}
|
|
33
|
-
else {
|
|
34
|
-
try {
|
|
35
|
-
ctx.res.end();
|
|
36
|
-
}
|
|
37
|
-
catch {
|
|
38
|
-
// Socket may already be destroyed
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
};
|
|
43
|
-
exports.errorMiddleware = errorMiddleware;
|
|
44
|
-
const corsMiddleware = (webOrigin) => {
|
|
45
|
-
return (ctx, next) => {
|
|
46
|
-
if (ctx.req.method === "OPTIONS") {
|
|
47
|
-
ctx.res.writeHead(204, {
|
|
48
|
-
"Access-Control-Allow-Origin": webOrigin,
|
|
49
|
-
"Access-Control-Allow-Methods": "GET,POST,PATCH,DELETE,OPTIONS",
|
|
50
|
-
"Access-Control-Allow-Headers": "Content-Type",
|
|
51
|
-
});
|
|
52
|
-
ctx.res.end();
|
|
53
|
-
return;
|
|
54
|
-
}
|
|
55
|
-
ctx.res.setHeader("Access-Control-Allow-Origin", webOrigin);
|
|
56
|
-
ctx.res.setHeader("Access-Control-Allow-Methods", "GET,POST,PATCH,DELETE,OPTIONS");
|
|
57
|
-
ctx.res.setHeader("Access-Control-Allow-Headers", "Content-Type");
|
|
58
|
-
return next();
|
|
59
|
-
};
|
|
60
|
-
};
|
|
61
|
-
exports.corsMiddleware = corsMiddleware;
|
|
@@ -1,105 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.createRouter = void 0;
|
|
4
|
-
const createNode = () => ({
|
|
5
|
-
staticChildren: new Map(),
|
|
6
|
-
handlers: new Map(),
|
|
7
|
-
});
|
|
8
|
-
const createRouter = () => {
|
|
9
|
-
const root = createNode();
|
|
10
|
-
const register = (method, path, handler) => {
|
|
11
|
-
if (!path.startsWith("/")) {
|
|
12
|
-
throw new Error(`Route path must start with "/": ${path}`);
|
|
13
|
-
}
|
|
14
|
-
const normalizedMethod = method.toUpperCase();
|
|
15
|
-
const segments = path.split("/").slice(1);
|
|
16
|
-
let current = root;
|
|
17
|
-
for (let i = 0; i < segments.length; i++) {
|
|
18
|
-
const segment = segments[i];
|
|
19
|
-
if (!segment)
|
|
20
|
-
continue;
|
|
21
|
-
if (segment.startsWith("*")) {
|
|
22
|
-
const name = segment.slice(1);
|
|
23
|
-
if (!current.wildcardChild) {
|
|
24
|
-
current.wildcardChild = { name, node: createNode() };
|
|
25
|
-
}
|
|
26
|
-
current = current.wildcardChild.node;
|
|
27
|
-
}
|
|
28
|
-
else if (segment.startsWith(":")) {
|
|
29
|
-
const name = segment.slice(1);
|
|
30
|
-
if (!current.paramChild) {
|
|
31
|
-
current.paramChild = { name, node: createNode() };
|
|
32
|
-
}
|
|
33
|
-
current = current.paramChild.node;
|
|
34
|
-
}
|
|
35
|
-
else {
|
|
36
|
-
let child = current.staticChildren.get(segment);
|
|
37
|
-
if (!child) {
|
|
38
|
-
child = createNode();
|
|
39
|
-
current.staticChildren.set(segment, child);
|
|
40
|
-
}
|
|
41
|
-
current = child;
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
if (current.handlers.has(normalizedMethod)) {
|
|
45
|
-
throw new Error(`Duplicate route: ${normalizedMethod} ${path}`);
|
|
46
|
-
}
|
|
47
|
-
current.handlers.set(normalizedMethod, handler);
|
|
48
|
-
};
|
|
49
|
-
const match = (method, pathname) => {
|
|
50
|
-
const normalizedMethod = method.toUpperCase();
|
|
51
|
-
const segments = pathname.split("/").slice(1);
|
|
52
|
-
const params = {};
|
|
53
|
-
const matchNode = (node, index) => {
|
|
54
|
-
if (index >= segments.length) {
|
|
55
|
-
return node;
|
|
56
|
-
}
|
|
57
|
-
const segment = segments[index];
|
|
58
|
-
const staticChild = node.staticChildren.get(segment);
|
|
59
|
-
if (staticChild) {
|
|
60
|
-
const result = matchNode(staticChild, index + 1);
|
|
61
|
-
if (result)
|
|
62
|
-
return result;
|
|
63
|
-
}
|
|
64
|
-
if (node.paramChild) {
|
|
65
|
-
try {
|
|
66
|
-
const decoded = decodeURIComponent(segment);
|
|
67
|
-
const prevParam = params[node.paramChild.name];
|
|
68
|
-
params[node.paramChild.name] = decoded;
|
|
69
|
-
const result = matchNode(node.paramChild.node, index + 1);
|
|
70
|
-
if (result)
|
|
71
|
-
return result;
|
|
72
|
-
if (prevParam === undefined) {
|
|
73
|
-
delete params[node.paramChild.name];
|
|
74
|
-
}
|
|
75
|
-
else {
|
|
76
|
-
params[node.paramChild.name] = prevParam;
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
catch {
|
|
80
|
-
return null;
|
|
81
|
-
}
|
|
82
|
-
}
|
|
83
|
-
if (node.wildcardChild) {
|
|
84
|
-
const rest = segments.slice(index).join("/");
|
|
85
|
-
try {
|
|
86
|
-
params[node.wildcardChild.name] = decodeURIComponent(rest);
|
|
87
|
-
}
|
|
88
|
-
catch {
|
|
89
|
-
return null;
|
|
90
|
-
}
|
|
91
|
-
return node.wildcardChild.node;
|
|
92
|
-
}
|
|
93
|
-
return null;
|
|
94
|
-
};
|
|
95
|
-
const matchedNode = matchNode(root, 0);
|
|
96
|
-
if (!matchedNode)
|
|
97
|
-
return null;
|
|
98
|
-
const handler = matchedNode.handlers.get(normalizedMethod);
|
|
99
|
-
if (!handler)
|
|
100
|
-
return null;
|
|
101
|
-
return { handler, params };
|
|
102
|
-
};
|
|
103
|
-
return { register, match };
|
|
104
|
-
};
|
|
105
|
-
exports.createRouter = createRouter;
|