opencode-windows-scheduler 1.4.0 → 1.5.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +61 -1
- package/LICENSE +21 -21
- package/README.md +26 -4
- package/ROADMAP-STRATEGY.md +43 -24
- package/ROADMAP.md +549 -31
- package/dist/core/dry-run.d.ts +41 -0
- package/dist/core/dry-run.d.ts.map +1 -1
- package/dist/core/dry-run.js +165 -16
- package/dist/core/file-watcher.d.ts.map +1 -1
- package/dist/core/file-watcher.js +53 -10
- package/dist/core/git-trigger.d.ts +80 -0
- package/dist/core/git-trigger.d.ts.map +1 -0
- package/dist/core/git-trigger.js +294 -0
- package/dist/core/glob.d.ts +38 -0
- package/dist/core/glob.d.ts.map +1 -0
- package/dist/core/glob.js +233 -0
- package/dist/core/matrix.d.ts.map +1 -1
- package/dist/core/matrix.js +48 -22
- package/dist/core/ps-wrapper.d.ts.map +1 -1
- package/dist/core/ps-wrapper.js +7 -0
- package/dist/core/schedule-gate.js +55 -30
- package/dist/core/schedule-v2.d.ts +29 -1
- package/dist/core/schedule-v2.d.ts.map +1 -1
- package/dist/core/schedule-v2.js +107 -17
- package/dist/core/scheduler/types.d.ts +7 -1
- package/dist/core/scheduler/types.d.ts.map +1 -1
- package/dist/core/scheduler/windows.d.ts +6 -2
- package/dist/core/scheduler/windows.d.ts.map +1 -1
- package/dist/core/scheduler/windows.js +25 -10
- package/dist/core/telegram.d.ts.map +1 -1
- package/dist/core/telegram.js +13 -10
- package/dist/core/wrappers/bash.d.ts.map +1 -1
- package/dist/core/wrappers/bash.js +4 -0
- package/dist/db/git-state-repo.d.ts +16 -0
- package/dist/db/git-state-repo.d.ts.map +1 -0
- package/dist/db/git-state-repo.js +38 -0
- package/dist/db/schema.d.ts +1 -1
- package/dist/db/schema.d.ts.map +1 -1
- package/dist/db/schema.js +8 -0
- package/dist/i18n.d.ts +52 -0
- package/dist/i18n.d.ts.map +1 -0
- package/dist/i18n.js +292 -0
- package/dist/index.d.ts +50 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1020 -197
- package/dist/notifications.d.ts.map +1 -1
- package/dist/notifications.js +74 -40
- package/dist/rpc.d.ts +238 -2
- package/dist/rpc.d.ts.map +1 -1
- package/dist/rpc.js +79 -2
- package/dist/server.d.ts.map +1 -1
- package/dist/server.js +89 -48
- package/dist/settings.d.ts +3 -0
- package/dist/settings.d.ts.map +1 -1
- package/dist/settings.js +20 -8
- package/dist/task-transfer.d.ts +43 -3
- package/dist/task-transfer.d.ts.map +1 -1
- package/dist/task-transfer.js +94 -6
- package/dist/templates.d.ts +1 -1
- package/dist/templates.d.ts.map +1 -1
- package/dist/types.d.ts +11 -0
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js +32 -0
- package/docs/ARCHITECTURE.md +37 -1
- package/docs/FEATURES.md +70 -0
- package/docs/README.ru.md +19 -3
- package/gui-experimental.cjs +9 -4
- package/locales/en.json +695 -0
- package/locales/ru.json +695 -0
- package/package.json +9 -3
- package/scripts/test-locale.mjs +44 -0
- package/src/core/dry-run.ts +244 -19
- package/src/core/file-watcher.ts +65 -10
- package/src/core/git-trigger.ts +373 -0
- package/src/core/glob.ts +226 -0
- package/src/core/matrix.ts +52 -26
- package/src/core/ps-wrapper.ts +7 -0
- package/src/core/schedule-gate.ts +67 -33
- package/src/core/schedule-v2.ts +152 -17
- package/src/core/scheduler/types.ts +7 -1
- package/src/core/scheduler/windows.ts +25 -10
- package/src/core/telegram.ts +16 -10
- package/src/core/wrappers/bash.ts +4 -0
- package/src/db/git-state-repo.ts +62 -0
- package/src/db/schema.ts +8 -0
- package/src/gui.tsx +772 -456
- package/src/i18n.ts +339 -0
- package/src/index.ts +1274 -212
- package/src/notifications.ts +83 -42
- package/src/rpc.ts +79 -2
- package/src/server.ts +89 -48
- package/src/settings.ts +38 -10
- package/src/task-transfer.ts +148 -5
- package/src/templates.ts +1 -1
- package/src/types.ts +37 -0
package/gui-experimental.cjs
CHANGED
|
@@ -1,4 +1,9 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("solid-js/web"),o=require("solid-js"),Oo=require("@opencode/plugin/gui"),Cp=require("@opencode/plugin/rpc"),xi={type:["object","null"],properties:{server:{type:"string"},event:{type:"string"},filter:{type:"string"}},required:["server","event"]},Fo={type:["object","null"],properties:{workspaceIds:{type:"array",items:{type:"string"}},strategy:{type:["string","null"]},failureMode:{type:["string","null"]},aggregation:{type:["string","null"]},createAggregator:{type:["boolean","null"]},concurrency:{type:["number","null"]},overrides:{type:["object","null"],additionalProperties:{type:"object",properties:{prompt:{type:["string","null"]},model:{type:["string","null"]},qualityGate:{type:["string","null"]},beforeScript:{type:["string","null"]},afterScript:{type:["string","null"]}}}}},required:["workspaceIds"]},zp={type:"object",properties:{name:{type:"string"},schedule:{type:"string"},status:{type:"string"},nextRun:{type:["string","null"]},model:{type:["string","null"]},priority:{type:["number","null"]},retryCount:{type:["number","null"]},retryDelay:{type:["number","null"]},qualityGate:{type:["string","null"]},nextTaskOnSuccess:{type:["string","null"]},nextTaskOnError:{type:["string","null"]},dependsOn:{type:"array",items:{type:"string"}},prompt:{type:"string"},beforeScript:{type:["string","null"]},afterScript:{type:["string","null"]},triggerType:{type:["string","null"]},runAt:{type:["string","null"]},session:{type:["string","null"]},sessionId:{type:["string","null"]},sessionMaxRuns:{type:["number","null"]},mcpEvent:xi,watchPath:{type:["string","null"]},timezone:{type:["string","null"]},notBefore:{type:["string","null"]},notAfter:{type:["string","null"]},pausedUntil:{type:["string","null"]},workingDirectory:{type:["string","null"]},workspaceId:{type:["string","null"]},workspaceName:{type:["string","null"]},workspaceColor:{type:["string","null"]},allowedTools:{type:["array","null"],items:{type:"string"}},deniedTools:{type:["array","null"],items:{type:"string"}},matrix:Fo,matrixParentId:{type:["string","null"]},isMatrixParent:{type:"boolean"},paused:{type:"boolean"},orphaned:{type:"boolean"},runsTotal:{type:"number"},runsSuccess:{type:"number"},runsError:{type:"number"},runsPartial:{type:"number"},matrixSummary:{type:["object","null"],properties:{totalCount:{type:"number"},successCount:{type:"number"},errorCount:{type:"number"},pendingCount:{type:"number"},status:{type:"string"},message:{type:"string"}}}},required:["name","schedule","status"]},jo={type:"object",properties:{},additionalProperties:!1},Tp={type:"object",properties:{tasks:{type:"array",items:zp}},required:["tasks"]},Ep={type:"object",properties:{name:{type:"string"},schedule:{type:"string"},prompt:{type:"string"},model:{type:"string"},priority:{type:"number"},retryCount:{type:"number"},retryDelay:{type:"number"},qualityGate:{type:"string"},nextTaskOnSuccess:{type:"string"},nextTaskOnError:{type:"string"},dependsOn:{type:"array",items:{type:"string"}},beforeScript:{type:"string"},afterScript:{type:"string"},triggerType:{type:"string"},runAt:{type:"string"},delaySeconds:{type:"number"},session:{type:"string"},sessionMaxRuns:{type:"number"},mcpEvent:xi,watchPath:{type:"string"},workspaceId:{type:"string"},workingDirectory:{type:"string"},allowedTools:{type:"array",items:{type:"string"}},deniedTools:{type:"array",items:{type:"string"}},matrix:Fo,timezone:{type:"string"},notBefore:{type:"string"},notAfter:{type:"string"}},required:["name","prompt"]},Ap={type:"object",properties:{success:{type:"boolean"},message:{type:"string"}},required:["success","message"]},Dn={type:"object",properties:{name:{type:"string"}},required:["name"]},Pp=Dn,Mp=Dn,bi={type:"object",properties:{success:{type:"boolean"},message:{type:"string"}},required:["success","message"]},Lp=bi,Rp=Dn,qp={type:"object",properties:{success:{type:"boolean"},logs:{type:"string"},error:{type:"string"}},required:["success","logs"]},Dp={type:"object",properties:{taskName:{type:"string"},status:{type:"string"},startedAt:{type:"string"},finishedAt:{type:"string"},durationMs:{type:"number"},error:{type:["string","null"]},nextTask:{type:["string","null"]},model:{type:["string","null"]},preFlightStatus:{type:["string","null"]},postFlightStatus:{type:["string","null"]},allowedTools:{type:["array","null"],items:{type:"string"}},deniedTools:{type:["array","null"],items:{type:"string"}}},required:["taskName","status","startedAt","finishedAt","durationMs","error"]},Ip={type:"object",properties:{limit:{type:"number"},taskName:{type:"string"},status:{type:"string"}},additionalProperties:!1},Op={type:"object",properties:{records:{type:"array",items:Dp}},required:["records"]},jp={type:"object",properties:{total:{type:"number"},success:{type:"number"},error:{type:"number"}},required:["total","success","error"]},Np={type:"object",properties:{},additionalProperties:!1},Bp=jp,Fp={type:"object",properties:{},additionalProperties:!1},Gp={type:"object",properties:{port:{type:["number","null"]}},required:["port"]},Wp={type:"object",properties:{},additionalProperties:!1},Up={type:"object",properties:{platform:{type:"string"},title:{type:"string"}},required:["platform","title"]},Hp={type:"object",properties:{},additionalProperties:!1},Vp={type:"object",properties:{success:{type:"boolean"},data:{type:"string"},count:{type:"number"},error:{type:"string"}},required:["success"]},Jp={type:"object",properties:{data:{type:"string"}},required:["data"]},Qp={type:"object",properties:{success:{type:"boolean"},imported:{type:"number"},errors:{type:"array",items:{type:"string"}},error:{type:"string"}},required:["success"]},Kp={type:"object",properties:{},additionalProperties:!1},Go={type:"object",properties:{enabled:{type:"boolean"},onlyOnError:{type:"boolean"},webhook:{type:"object",properties:{enabled:{type:"boolean"},url:{type:"string"},timeoutMs:{type:"number"},retryCount:{type:"number"},retryDelayMs:{type:"number"}},required:["enabled","url"]},templates:{type:"object",properties:{success:{type:"string"},error:{type:"string"}},required:["success","error"]},filters:{type:"object",properties:{include:{type:"array",items:{type:"string"}},exclude:{type:"array",items:{type:"string"}}},required:["include","exclude"]},telegram:{type:"object",properties:{enabled:{type:"boolean"},botToken:{type:"string"},chatId:{type:"string"},parseMode:{type:"string",enum:["","HTML","Markdown","MarkdownV2"]},disableNotification:{type:"boolean"},messageThreadId:{type:["number","null"]},includeDashboardLink:{type:"boolean"},apiBase:{type:"string"}},required:["enabled"]},native:{type:"object",properties:{enabled:{type:"boolean"},sound:{type:"boolean"}},required:["enabled"]},quietHours:{type:"object",properties:{enabled:{type:"boolean"},from:{type:"string"},to:{type:"string"}},required:["enabled","from","to"]},dashboardUrl:{type:"string"},matrix:{type:"object",properties:{enabled:{type:"boolean"},onPartial:{type:"boolean"},onAllFailed:{type:"boolean"},stuckAfterMinutes:{type:"number"}},required:["enabled","onPartial","onAllFailed","stuckAfterMinutes"]},digest:{type:"object",properties:{enabled:{type:"boolean"},frequency:{type:"string",enum:["daily","weekly"]},time:{type:"string"},lastSentAt:{type:["string","null"]}},required:["enabled","frequency","time"]}},required:["enabled","onlyOnError"]},Wo={type:"object",properties:{retentionDays:{type:"number"},maxRecords:{type:"number"},lastCleanupAt:{type:["string","null"]},lastCleanupDeleted:{type:"number"}},required:["retentionDays","maxRecords"]},Uo={type:"object",properties:{enabled:{type:"boolean"},retentionDays:{type:"number"},maxRecords:{type:"number"}},required:["enabled","retentionDays","maxRecords"]},Yp={type:"object",properties:{maxConcurrent:{type:"number"},winterMode:{type:"boolean"},notifications:Go,history:Wo,audit:Uo},required:["maxConcurrent","winterMode","notifications"]},Zp={type:"object",properties:{maxConcurrent:{type:"number"},winterMode:{type:"boolean"},notifications:Go,history:Wo,audit:Uo},additionalProperties:!1},Xp={type:"object",properties:{success:{type:"boolean"},maxConcurrent:{type:"number"},winterMode:{type:"boolean"},notifications:Go,history:Wo,audit:Uo},required:["success","maxConcurrent","winterMode","notifications"]},ed={type:"object",properties:{retentionDays:{type:"number"},maxRecords:{type:"number"}},additionalProperties:!1},td={type:"object",properties:{success:{type:"boolean"},message:{type:"string"},deleted:{type:"number"},deletedByAge:{type:"number"},deletedByCount:{type:"number"},kept:{type:"number"},retentionDays:{type:"number"},maxRecords:{type:"number"},vacuumed:{type:"boolean"}},required:["success","message","deleted","kept"]},rd={type:"object",properties:{days:{type:"number"},topLimit:{type:"number"}},additionalProperties:!1},id={type:"object",properties:{success:{type:"boolean"},report:{type:["object","null"]},error:{type:"string"}},required:["success","report"]},nd={type:"object",properties:{},additionalProperties:!1},od={type:"object",properties:{success:{type:"boolean"},message:{type:"string"}},required:["success","message"]},ld={type:"object",properties:{},additionalProperties:!1},sd={type:"object",properties:{success:{type:"boolean"},message:{type:"string"}},required:["success","message"]},Bs={type:"object",properties:{name:{type:"string"},preview:{type:"string"},updatedAt:{type:"string"}},required:["name","preview"]},ad={type:"object",properties:{},additionalProperties:!1},pd={type:"object",properties:{success:{type:"boolean"},secrets:{type:"array",items:Bs}},required:["success","secrets"]},dd={type:"object",properties:{name:{type:"string"},value:{type:"string"}},required:["name","value"],additionalProperties:!1},cd={type:"object",properties:{success:{type:"boolean"},message:{type:"string"},secret:Bs},required:["success"]},ud={type:"object",properties:{name:{type:"string"}},required:["name"],additionalProperties:!1},fd={type:"object",properties:{success:{type:"boolean"},message:{type:"string"}},required:["success","message"]},gd={type:"object",properties:{id:{type:"number"},ts:{type:"string"},action:{type:"string"},targetType:{type:["string","null"]},target:{type:["string","null"]},actor:{type:"string"},source:{type:["string","null"]},details:{},remote:{type:["string","null"]}},required:["id","ts","action","actor"]},yd={type:"object",properties:{action:{type:"string"},target:{type:"string"},actor:{type:"string"},since:{type:"string"},until:{type:"string"},limit:{type:"number"}},additionalProperties:!1},bd={type:"object",properties:{success:{type:"boolean"},records:{type:"array",items:gd},total:{type:"number"}},required:["success","records","total"]},Fs={type:"object",properties:{id:{type:"string"},name:{type:"string"},prompt:{type:"string"},schedule:{type:"string"},timeoutSeconds:{type:"number"},model:{type:"string"},priority:{type:"number"},retryCount:{type:"number"},retryDelay:{type:"number"},qualityGate:{type:"string"},nextTaskOnSuccess:{type:"string"},nextTaskOnError:{type:"string"},dependsOn:{type:"array",items:{type:"string"}},beforeScript:{type:"string"},afterScript:{type:"string"},triggerType:{type:"string"},mcpEvent:xi,watchPath:{type:"string"},workspaceId:{type:"string"},workingDirectory:{type:"string"},allowedTools:{type:"array",items:{type:"string"}},deniedTools:{type:"array",items:{type:"string"}}},required:["id","name","prompt"]},xd={type:"object",properties:{},additionalProperties:!1},md={type:"object",properties:{templates:{type:"array",items:Fs}},required:["templates"]},vd={type:"object",properties:{id:{type:"string"},name:{type:"string"},prompt:{type:"string"},schedule:{type:"string"},timeoutSeconds:{type:"number"},model:{type:"string"},priority:{type:"number"},retryCount:{type:"number"},retryDelay:{type:"number"},qualityGate:{type:"string"},nextTaskOnSuccess:{type:"string"},nextTaskOnError:{type:"string"},dependsOn:{type:"array",items:{type:"string"}},beforeScript:{type:"string"},afterScript:{type:"string"},triggerType:{type:"string"},mcpEvent:xi,watchPath:{type:"string"},workspaceId:{type:"string"},workingDirectory:{type:"string"},allowedTools:{type:"array",items:{type:"string"}},deniedTools:{type:"array",items:{type:"string"}}},required:["name","prompt"],additionalProperties:!1},hd={type:"object",properties:{success:{type:"boolean"},template:Fs,error:{type:"string"}},required:["success"]},$d={type:"object",properties:{id:{type:"string"}},required:["id"]},wd={type:"object",properties:{success:{type:"boolean"},error:{type:"string"}},required:["success"]},qs={type:"object",properties:{name:{type:"string"},until:{type:"string"}},required:["name"]},_d={type:"object",properties:{name:{type:"string"},newSchedule:{type:"string"},newPrompt:{type:"string"},model:{type:"string"},priority:{type:"number"},retryCount:{type:"number"},retryDelay:{type:"number"},qualityGate:{type:"string"},nextTaskOnSuccess:{type:"string"},nextTaskOnError:{type:"string"},dependsOn:{type:"array",items:{type:"string"}},beforeScript:{type:"string"},afterScript:{type:"string"},triggerType:{type:"string"},runAt:{type:"string"},delaySeconds:{type:"number"},session:{type:"string"},sessionMaxRuns:{type:"number"},mcpEvent:xi,watchPath:{type:"string"},workspaceId:{type:"string"},workingDirectory:{type:"string"},allowedTools:{type:"array",items:{type:"string"}},deniedTools:{type:"array",items:{type:"string"}},matrix:Fo,timezone:{type:"string"},notBefore:{type:"string"},notAfter:{type:"string"}},required:["name"]},kd=bi,Gs={type:"object",properties:{id:{type:"string"},name:{type:"string"},path:{type:"string"},gitRemote:{type:["string","null"]},gitBranch:{type:["string","null"]},color:{type:["string","null"]},env:{type:["object","null"],additionalProperties:{type:"string"}},envFile:{type:["string","null"]},createdAt:{type:"string"}},required:["id","name","path","createdAt"]},Sd={type:"object",properties:{},additionalProperties:!1},Cd={type:"object",properties:{workspaces:{type:"array",items:Gs}},required:["workspaces"]},zd={type:"object",properties:{name:{type:"string"},path:{type:"string"},color:{type:"string"},env:{type:["object","null"],additionalProperties:{type:"string"}},envFile:{type:["string","null"]}},required:["path"],additionalProperties:!1},Ds={type:"object",properties:{success:{type:"boolean"},workspace:Gs,error:{type:"string"}},required:["success"]},Td={type:"object",properties:{id:{type:"string"},name:{type:"string"},path:{type:"string"},color:{type:"string"},env:{type:["object","null"],additionalProperties:{type:"string"}},envFile:{type:["string","null"]}},required:["id"],additionalProperties:!1},Ed={type:"object",properties:{id:{type:"string"}},required:["id"]},Ad={type:"object",properties:{success:{type:"boolean"},message:{type:"string"}},required:["success"]},Pd={type:"object",properties:{eventName:{type:"string"},payload:{type:["object","null","string","number","boolean","array"]}},required:["eventName"]},Md={type:"object",properties:{success:{type:"boolean"},message:{type:"string"},triggered:{type:"array",items:{type:"string"}}},required:["success","triggered"]},Ld={type:"object",properties:{name:{type:"string"},order:{type:"number"},trigger:{type:"string"},cwd:{type:"string"},command:{type:"string"},workspace:{type:["object","null"],properties:{name:{type:"string"},path:{type:"string"}},required:["name","path"]},preFlight:{type:["string","null"]},postFlight:{type:["string","null"]},qualityGate:{type:["string","null"]},roleScoped:{type:["object","null"],properties:{allowed:{type:"array",items:{type:"string"}},denied:{type:"array",items:{type:"string"}}}},estimatedDurationSec:{type:["number","null"]},estimatedCostUsd:{type:["number","null"]},estimatedTokens:{type:["number","null"]},matrixParent:{type:"string"}},required:["name","order","trigger","cwd","command"]},Ws={type:"object",properties:{success:{type:"boolean"},taskName:{type:"string"},tasks:{type:"array",items:Ld},totals:{type:"object",properties:{estimatedDurationSec:{type:["number","null"]},estimatedCostUsd:{type:["number","null"]},estimatedTokens:{type:["number","null"]}},required:[]},warnings:{type:"array",items:{type:"string"}},error:{type:"string"}},required:["success","taskName","tasks","warnings"]},Rd={type:"object",properties:{taskName:{type:"string"}},required:["taskName"],additionalProperties:!1},qd={type:"object",properties:{success:{type:"boolean"},reports:{type:"array",items:Ws}},required:["success","reports"]},Dd={type:"object",properties:{name:{type:"string"},workspaceId:{type:["string","null"]},workspaceName:{type:["string","null"]},status:{type:"string"},error:{type:["string","null"]},finishedAt:{type:["string","null"]}},required:["name","status"]},Id={type:"object",properties:{parentId:{type:"string"}},required:["parentId"],additionalProperties:!1},Od={type:"object",properties:{parentId:{type:"string"},totalCount:{type:"number"},successCount:{type:"number"},errorCount:{type:"number"},pendingCount:{type:"number"},status:{type:"string"},message:{type:"string"},clones:{type:"array",items:Dd}},required:["parentId","totalCount","successCount","errorCount","status"]},jd={type:"object",properties:{success:{type:"boolean"},report:Od,error:{type:"string"}},required:["success"]},Nd={type:"object",properties:{name:{type:"string"},workspaceIds:{type:"array",items:{type:"string"}},strategy:{type:"string"},failureMode:{type:"string"},aggregation:{type:"string"}},required:["workspaceIds"],additionalProperties:!1},Bd={type:"object",properties:{success:{type:"boolean"},clones:{type:"array",items:{type:"object",properties:{name:{type:"string"},workspaceId:{type:"string"},workspaceName:{type:["string","null"]}},required:["name","workspaceId"]}},error:{type:"string"}},required:["success","clones"]},Fd={type:"object",properties:{success:{type:"boolean"},message:{type:"string"},cancelled:{type:"array",items:{type:"string"}}},required:["success","message","cancelled"]},Gd={type:"object",properties:{success:{type:"boolean"},message:{type:"string"},removed:{type:"array",items:{type:"string"}}},required:["success","message","removed"]},Us={type:"object",properties:{name:{type:"string"},dir:{type:"string"},port:{type:["number","null"]},isDefault:{type:"boolean"},active:{type:"boolean"}},required:["name","dir","isDefault","active"]},Wd={type:"object",properties:{},additionalProperties:!1},Ud={type:"object",properties:{current:{type:"string"},pinnedByEnv:{type:"boolean"},profiles:{type:"array",items:Us}},required:["current","pinnedByEnv","profiles"]},Hd={type:"object",properties:{name:{type:"string"}},required:["name"],additionalProperties:!1},Vd={type:"object",properties:{success:{type:"boolean"},message:{type:"string"},current:{type:"string"},restartRequired:{type:"boolean"}},required:["success","message","current","restartRequired"]},Jd={type:"object",properties:{name:{type:"string"},port:{type:"number"}},required:["name"],additionalProperties:!1},Qd={type:"object",properties:{success:{type:"boolean"},message:{type:"string"},profile:Us,error:{type:"string"}},required:["success"]},Kd={type:"object",properties:{name:{type:"string"}},required:["name"],additionalProperties:!1},Yd={type:"object",properties:{success:{type:"boolean"},message:{type:"string"}},required:["success","message"]},Zd=Cp.Rpc.define({id:"opencode-windows-scheduler",methods:{get_tasks:{input:jo,output:Tp},create_task:{input:Ep,output:Ap},delete_task:{input:Pp,output:bi},run_task:{input:Mp,output:Lp},pause_task:{input:qs,output:bi},resume_task:{input:qs,output:bi},update_task:{input:_d,output:kd},get_task_logs:{input:Rp,output:qp},get_history:{input:Ip,output:Op},get_metrics:{input:Np,output:Bp},get_dashboard_port:{input:Fp,output:Gp},get_platform:{input:Wp,output:Up},dry_run:{input:Rd,output:Ws},dry_run_all:{input:jo,output:qd},get_matrix_results:{input:Id,output:jd},cancel_matrix:{input:Dn,output:Fd},cleanup_matrix_orphans:{input:jo,output:Gd},cleanup_history:{input:ed,output:td},get_analytics:{input:rd,output:id},expand_matrix_preview:{input:Nd,output:Bd},get_workspaces:{input:Sd,output:Cd},add_workspace:{input:zd,output:Ds},update_workspace:{input:Td,output:Ds},delete_workspace:{input:Ed,output:Ad},get_profiles:{input:Wd,output:Ud},set_profile:{input:Hd,output:Vd},create_profile:{input:Jd,output:Qd},delete_profile:{input:Kd,output:Yd},export_tasks:{input:Hp,output:Vp},import_tasks:{input:Jp,output:Qp},get_settings:{input:Kp,output:Yp},save_settings:{input:Zp,output:Xp},get_templates:{input:xd,output:md},save_template:{input:vd,output:hd},delete_template:{input:$d,output:wd},emit_event:{input:Pd,output:Md},test_notification:{input:nd,output:od},send_digest:{input:ld,output:sd},list_secrets:{input:ad,output:pd},save_secret:{input:dd,output:cd},delete_secret:{input:ud,output:fd},get_audit:{input:yd,output:bd}},events:{}});var Xd=e.template('<div><div style=display:flex;justify-content:space-between;align-items:center;gap:12px;width:100%><div style=display:flex;align-items:center;gap:12px;flex:1;min-width:0><div style=flex:1;min-width:0><div style=display:flex;align-items:center;gap:6px;min-width:0><div style=font-weight:700;font-size:16px;color:#ffffff;white-space:nowrap;overflow:hidden;text-overflow:ellipsis></div></div><div title="Запуски именно этой задачи: успешные / частичные / ошибки и таймауты"style=font-size:12px;color:#a0a0a6;margin-top:4px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis>📊 Всего: <!> | ✅ <!> | 🟠 <!> | ❌ </div></div><div style=display:flex;align-items:center;gap:8px;flex-shrink:0;min-width:110px></div></div><div style=display:flex;gap:6px><button></button><button></button><button>📄</button><button>🧪</button><button>📜</button><button>✏️'),ec=e.template("<span>📦 "),tc=e.template('<span style="font-size:11px;font-weight:600;flex-shrink:0;cursor:help;white-space:nowrap;padding:2px 7px;border-radius:999px;border:1px solid #ff9f0a;color:#ff9f0a;background:rgba(255,159,10,0.12)">📦 Matrix (<!>)'),rc=e.template('<span style="font-size:11px;font-weight:600;flex-shrink:0;cursor:help;white-space:nowrap;padding:2px 7px;border-radius:999px;border:1px solid #8e8e93;color:#b0b0b6;background:rgba(142,142,147,0.12)">↳ matrix '),ic=e.template("<span style=font-size:13px;flex-shrink:0;cursor:help>👁️"),nc=e.template('<span style="font-size:11px;font-weight:600;flex-shrink:0;cursor:help;white-space:nowrap;padding:2px 7px;border-radius:999px;border:1px solid #64d2ff;color:#64d2ff;background:rgba(100,210,255,0.12)">🌍 '),oc=e.template('<span style="font-size:11px;font-weight:600;flex-shrink:0;cursor:help;white-space:nowrap;padding:2px 7px;border-radius:999px;border:1px solid #bf5af2;color:#bf5af2;background:rgba(191,90,242,0.12)">🪟 <!>–'),lc=e.template('<span style="font-size:11px;font-weight:600;flex-shrink:0;cursor:help;white-space:nowrap;padding:2px 7px;border-radius:999px;border:1px solid #ffd60a;color:#ffd60a;background:rgba(255,214,10,0.12)">⏸ до '),sc=e.template("<span style=font-size:13px;flex-shrink:0;cursor:help>⚡"),ac=e.template("<span style=font-size:13px;flex-shrink:0;cursor:help>📡"),pc=e.template('<span style="font-size:11px;font-weight:600;flex-shrink:0;cursor:help;white-space:nowrap;padding:2px 7px;border-radius:999px;border:1px solid #30d158;color:#30d158;background:rgba(48,209,88,0.12)">'),dc=e.template("<span style=font-size:12px;flex-shrink:0;cursor:help;color:#c084fc;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:200px>🧠 "),cc=e.template("<span style=font-size:12px;flex-shrink:0;cursor:help;color:#f5a623;white-space:nowrap>🚀 "),uc=e.template("<span style=font-size:13px;flex-shrink:0;cursor:help>🔒"),fc=e.template("<div style=display:flex;flex-direction:column;gap:2px;margin-top:4px;font-size:11px;line-height:1.35><span style=color:#5ac8fa;white-space:nowrap;overflow:hidden;text-overflow:ellipsis>🔗 Зависит от: "),gc=e.template("<div style=display:flex;flex-direction:column;gap:2px;margin-top:4px;font-size:11px;line-height:1.35><span>📦 Matrix: <!>/<!> успешных"),yc=e.template("<div style=display:flex;align-items:center;gap:8px;font-size:12px;color:#a0a0a6;margin-top:2px><span style=white-space:nowrap;overflow:hidden;text-overflow:ellipsis>"),bc=e.template("<span>→ "),xc=e.template("<div style=font-size:12px;color:#f5a623;font-weight:600;white-space:nowrap>🟡 Выполняется: <!> сек"),mc=e.template("<div style=font-size:12px;font-weight:600;white-space:nowrap>"),vc=e.template("<button>⛔"),hc=e.template("<button>🗑"),$c=e.template('<div style="margin-top:8px;padding:8px 12px;background:#1e1e1e;border:1px solid #333;border-radius:6px;display:flex;flex-direction:column;gap:6px;width:100%"><div style=font-size:12px;font-weight:600;color:#ffffff;display:flex;align-items:center;gap:6px>📜 История последних запусков<button style=background:none;border:none;color:#8e8e93;cursor:pointer;font-size:14px;padding:0>✕'),wc=e.template('<div style="font-size:12px;color:#8e8e93;padding:6px 0">Запусков пока нет.'),_c=e.template('<div style="display:flex;align-items:flex-start;gap:10px;font-size:12px;color:#e0e0e0;padding:4px 0;border-bottom:1px solid #333"><span style=color:#8e8e93;white-space:nowrap></span><span style=fontWeight:600;whiteSpace:nowrap></span><span style=color:#b0b0b0;white-space:nowrap> мс'),kc=e.template("<span style=color:#c084fc;white-space:nowrap>🧠 "),Sc=e.template("<span style=whiteSpace:nowrap>⚡ pre: "),Cc=e.template("<span style=whiteSpace:nowrap>⚡ post: "),zc=e.template("<div style=margin-top:2px;color:#ff6b6b;font-size:11px;white-space:pre-wrap;word-break:break-word>"),Tc=e.template('<span title="Запущена следующая задача в цепочке"style=color:#5ac8fa;font-size:11px;white-space:nowrap>🔗 → '),Ec=e.template('<div style="margin-top:8px;padding:8px 12px;background:#1e1e1e;border:1px solid #333;border-radius:6px;display:flex;flex-direction:column;gap:6px;width:100%"><div style=font-size:12px;font-weight:600;color:#ffffff;display:flex;align-items:center;gap:6px>🧪 Dry-Run: <button style=background:none;border:none;color:#8e8e93;cursor:pointer;font-size:14px;padding:0>✕'),Ac=e.template('<div style="font-size:12px;color:#8e8e93;padding:6px 0">Симуляция…'),Pc=e.template('<div style="font-size:12px;color:#ff6b6b;padding:6px 0">❌ '),Mc=e.template("<div style=display:flex;flex-direction:column;gap:4px>"),Lc=e.template('<div style="font-size:11px;color:#f5a623;padding:4px 0">⚠ '),Rc=e.template('<div style="font-size:11px;color:#e0e0e0;padding:4px 0;border-bottom:1px solid #333;display:flex;flex-wrap:wrap;gap:6px;align-items:baseline"><span style=color:#8e8e93;white-space:nowrap>#<!> </span><span style=font-weight:600;white-space:nowrap>🧪 </span><span style=color:#8e8e93;white-space:nowrap>cwd: </span><div style=width:100%;color:#a0a0a6;overflow-wrap:anywhere>$ '),qc=e.template("<span style=color:#5ac8fa;white-space:nowrap>📦 "),Dc=e.template("<span style=color:#ff9f0a;white-space:nowrap>↳ matrix "),Ic=e.template("<span style=cursor:help>🔒"),Oc=e.template("<span style=color:#8e8e93;white-space:nowrap>⏱ ~<!> с"),jc=e.template("<span style=color:#8e8e93;white-space:nowrap>· ~<!> ток."),Nc=e.template("<span style=color:#8e8e93;white-space:nowrap>· ~$"),Bc=e.template("<div style=width:100%;color:#8e8e93;overflow-wrap:anywhere>⚡ pre: "),Fc=e.template("<div style=width:100%;color:#8e8e93;overflow-wrap:anywhere>⚡ post: "),Gc=e.template("<div style=width:100%;color:#8e8e93;overflow-wrap:anywhere>✅ QG: "),Wc=e.template('<div style="font-size:11px;color:#b0b0b0;padding:4px 0">Σ '),Uc=e.template('<div><div style=display:flex;align-items:flex-start;justify-content:space-between;gap:12px;flex-wrap:wrap><div style=min-width:0><h2 style=margin:0;font-size:22px;font-weight:800;letter-spacing:0.2px;line-height:1.2;color:#ffffff></h2><div style=margin-top:5px;font-size:11px;font-weight:600;letter-spacing:1.2px;text-transform:uppercase;color:#8e8e93>Local AI CI/CD Orchestrator</div><div title="Суммарные метрики по всем задачам (включая архивные записи метрик)"style=margin-top:4px;font-size:11px;color:#8e8e93>📊 Всего по всем задачам: <!> · ✅ <!> · ❌ </div></div><div style=display:flex;align-items:center;gap:10px;flex-wrap:wrap><select title="Фильтр задач по workspace"style="padding:6px 10px;border-radius:999px;cursor:pointer;font-size:12px;border:1px solid #333;background:#1e1e1e;color:#e0e0e0;outline:none;max-width:200px"><option value=all>Все workspace</option><option value=none>Без workspace</option></select><button>👤 </button><button title="Открыть локальный веб-дашборд (фактический порт сервера)"style="display:flex;align-items:center;gap:6px;padding:6px 12px;border-radius:999px;cursor:pointer;font-size:12px;user-select:none;white-space:nowrap;transition:background 0.2s ease, border-color 0.2s ease;border:1px solid #333;background:#1e1e1e;color:#e0e0e0">🌐 Открыть дашборд</button><label title="Переключить зимнюю тему"><input type=checkbox style=accent-color:#5ac8fa;cursor:pointer;margin:0>❄️ Зимний режим</label></div></div><div style=display:flex;gap:8px;flex-wrap:wrap;margin-top:8px><button></button><input type=file accept=.json style=display:none><button></button></div><div style=display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin-top:8px><label style=font-size:12px;color:#b0b0b0;font-weight:500;white-space:nowrap>Макс. одновременных задач:</label><input type=number min=0 style="width:60px;padding:4px 6px;background:#1e1e1e;border:1px solid #333;border-radius:4px;color:#fff;font-size:12px;outline:none"><span style=font-size:11px;color:#8e8e93;white-space:nowrap>(0 = без ограничений)</span></div><div style="width:100%;max-width:700px;box-sizing:border-box;margin-top:8px;background:#1e1e1e;border:1px solid #333;border-radius:10px;overflow:hidden"><button style="display:flex;align-items:center;justify-content:space-between;gap:8px;width:100%;box-sizing:border-box;padding:10px 14px;background:transparent;border:none;color:#e0e0e0;font-size:12px;font-weight:600;cursor:pointer;text-align:left"><span>🔔 Уведомления</span><span style=display:flex;align-items:center;gap:8px;font-size:11px;font-weight:400;color:#8e8e93><span></span></span></button></div><div style="width:100%;max-width:700px;box-sizing:border-box;margin-top:8px;background:#1e1e1e;border:1px solid #333;border-radius:10px;overflow:hidden"><button style="display:flex;align-items:center;justify-content:space-between;gap:8px;width:100%;box-sizing:border-box;padding:10px 14px;background:transparent;border:none;color:#e0e0e0;font-size:12px;font-weight:600;cursor:pointer;text-align:left"><span>🧹 История и ретеншн</span><span style=display:flex;align-items:center;gap:8px;font-size:11px;font-weight:400;color:#8e8e93> · <span></span></span></button></div><div style="width:100%;max-width:900px;box-sizing:border-box;margin-top:8px;background:#1e1e1e;border:1px solid #333;border-radius:10px;overflow:hidden"><div style="display:flex;align-items:center;justify-content:space-between;gap:8px;padding:10px 14px"><button style=display:flex;align-items:center;gap:8px;background:transparent;border:none;color:#e0e0e0;font-size:12px;font-weight:600;cursor:pointer;text-align:left;padding:0><span>📜 Журнал аудита</span><span style=font-size:11px;font-weight:400;color:#8e8e93></span><span style=font-size:11px;color:#8e8e93></span></button></div></div><div style="width:100%;max-width:700px;box-sizing:border-box;margin-top:8px;background:#1e1e1e;border:1px solid #333;border-radius:10px;overflow:hidden"><div style="display:flex;align-items:center;justify-content:space-between;gap:8px;padding:10px 14px"><span style=font-size:12px;font-weight:600;color:#e0e0e0>Журнал аудита — хранение</span></div><div style="padding:0 14px 14px;display:flex;flex-direction:column;gap:10px"><div style=display:flex;align-items:center;gap:8px;flex-wrap:wrap><label style=display:flex;align-items:center;gap:6px;font-size:12px;cursor:pointer><input type=checkbox style=accent-color:#5ac8fa;cursor:pointer;margin:0>Включить аудит</label></div><div style=display:flex;align-items:center;gap:10px;flex-wrap:wrap><label style=font-size:12px;color:#e0e0e0;white-space:nowrap>Удалять записи старше, дней</label><input type=number min=0 style="width:80px;padding:4px 6px;background:#1e1e1e;border:1px solid #333;border-radius:4px;color:#fff;font-size:12px;outline:none"><span style=font-size:11px;color:#8e8e93>0 = не удалять по возрасту</span></div><div style=display:flex;align-items:center;gap:10px;flex-wrap:wrap><label style=font-size:12px;color:#e0e0e0;white-space:nowrap>Хранить не более записей</label><input type=number min=0 style="width:80px;padding:4px 6px;background:#1e1e1e;border:1px solid #333;border-radius:4px;color:#fff;font-size:12px;outline:none"><span style=font-size:11px;color:#8e8e93>0 = без ограничения</span></div></div></div><div style="width:100%;max-width:700px;box-sizing:border-box;background:#1e1e1e;border:1px solid #333;border-radius:10px;overflow:hidden"><div style="display:flex;align-items:center;justify-content:space-between;gap:8px;padding:10px 14px"><button style=display:flex;align-items:center;gap:8px;background:transparent;border:none;color:#e0e0e0;font-size:12px;font-weight:600;cursor:pointer;text-align:left;padding:0><span>📦 Workspaces</span><span style=font-size:11px;font-weight:400;color:#8e8e93></span><span style=font-size:11px;color:#8e8e93></span></button><button title="Добавить workspace (git-репозиторий)">+ Добавить</button></div></div><div style=display:block;width:100%;margin-top:24px><h3 style=margin:0;margin-bottom:8px;font-size:14px;font-weight:600;color:#ffffff>Задачи'),Is=e.template("<div style=padding:16px;color:#ff3b30;font-size:13px>Ошибка UI: "),Os=e.template("<option>📦 "),Hc=e.template('<div style="background:#1e1e1e;border:1px solid #333;border-radius:10px;padding:12px 14px;display:flex;flex-direction:column;gap:8px"><div style=display:flex;align-items:center;justify-content:space-between;gap:8px;flex-wrap:wrap><div style=font-size:12px;font-weight:600;color:#e0e0e0>👤 Профили</div><button>+ Создать</button></div><div style=display:flex;flex-direction:column;gap:6px></div><div style=font-size:11px;color:#8e8e93>У каждого профиля своя БД, настройки, логи и порт дашборда. После переключения перезапустите OpenCode.'),Vc=e.template("<div style=font-size:11px;color:#ffd60a>Профиль задан переменной OPENCODE_SCHEDULER_PROFILE. Переключение в GUI недоступно."),Jc=e.template("<div style=display:flex;align-items:center;gap:8px;flex-wrap:wrap;font-size:12px><span></span><span style=font-size:11px;color:#8e8e93></span><span style=font-size:11px;color:#8e8e93;overflow:hidden;text-overflow:ellipsis;max-width:340px>"),Qc=e.template("<span style=font-size:11px;color:#34c759>активен"),Kc=e.template("<button>Переключить"),Yc=e.template("<button>Удалить"),Zc=e.template('<div style="padding:0 14px 14px;display:flex;flex-direction:column;gap:10px"><label style=display:flex;align-items:center;gap:8px;font-size:12px;color:#e0e0e0;cursor:pointer><input type=checkbox style=accent-color:#5ac8fa;cursor:pointer;margin:0>Включить уведомления</label><label><input type=checkbox style=accent-color:#5ac8fa;cursor:pointer;margin:0>Только при ошибке</label><div style="border-top:1px solid #333;padding-top:10px;display:flex;flex-direction:column;gap:8px"><label><input type=checkbox style=accent-color:#5ac8fa;cursor:pointer;margin:0>Webhook (Discord / Slack / generic)</label><input type=url placeholder=https://discord.com/api/webhooks/...><div style=font-size:11px;color:#8e8e93>POST с JSON { content, text } — совместимо с Discord и Slack.</div><div style=display:flex;align-items:center;gap:8px;flex-wrap:wrap;font-size:11px;color:#b0b0b0><span>Таймаут, мс:</span><input type=number min=1000 max=120000 step=1000 style="width:80px;padding:4px 6px;background:#1e1e1e;border:1px solid #333;border-radius:4px;color:#fff;font-size:12px;outline:none"><span>повторов:</span><input type=number min=0 max=5 style="width:56px;padding:4px 6px;background:#1e1e1e;border:1px solid #333;border-radius:4px;color:#fff;font-size:12px;outline:none"><span>пауза, мс:</span><input type=number min=100 max=60000 step=100 style="width:80px;padding:4px 6px;background:#1e1e1e;border:1px solid #333;border-radius:4px;color:#fff;font-size:12px;outline:none"></div><div style=font-size:11px;color:#8e8e93>Повтор при сетевой ошибке, таймауте, 5xx и 429 (экспоненциальная пауза).</div></div><div style="border-top:1px solid #333;padding-top:10px;display:flex;flex-direction:column;gap:8px"><label><input type=checkbox style=accent-color:#5ac8fa;cursor:pointer;margin:0>Telegram</label><input type=password autocomplete=off placeholder="Токен бота из @BotFather"><input type=text placeholder="chat_id (например, 123456789 или -100...)"><div><span>разметка:</span><select style="padding:4px 6px;background:#1e1e1e;border:1px solid #333;border-radius:4px;color:#fff;font-size:12px;outline:none"><option value=HTML>HTML</option><option value=MarkdownV2>MarkdownV2</option><option value=Markdown>Markdown</option><option value>plain text</option></select><label style=display:flex;align-items:center;gap:6px;cursor:pointer><input type=checkbox style=accent-color:#5ac8fa;cursor:pointer;margin:0>без звука</label><label style=display:flex;align-items:center;gap:6px;cursor:pointer><input type=checkbox style=accent-color:#5ac8fa;cursor:pointer;margin:0>ссылка на дашборд</label></div><div style=font-size:11px;color:#8e8e93>Токен можно не хранить в settings.json: задайте OPENCODE_SCHEDULER_TELEGRAM_BOT_TOKEN и OPENCODE_SCHEDULER_TELEGRAM_CHAT_ID.</div></div><div style="border-top:1px solid #333;padding-top:10px;display:flex;flex-direction:column;gap:8px"><label><input type=checkbox style=accent-color:#5ac8fa;cursor:pointer;margin:0>Нативные уведомления ОС</label><label><input type=checkbox style=accent-color:#5ac8fa;cursor:pointer;margin:0>со звуком</label><div style=font-size:11px;color:#8e8e93>Windows Toast, macOS Notification Center, Linux notify-send. Без внешних зависимостей.</div></div><div style="border-top:1px solid #333;padding-top:10px;display:flex;flex-direction:column;gap:8px"><label><input type=checkbox style=accent-color:#5ac8fa;cursor:pointer;margin:0>Тихие часы</label><div><span>с</span><input type=time style="padding:4px 6px;background:#1e1e1e;border:1px solid #333;border-radius:4px;color:#fff;font-size:12px;outline:none"><span>до</span><input type=time style="padding:4px 6px;background:#1e1e1e;border:1px solid #333;border-radius:4px;color:#fff;font-size:12px;outline:none"></div><div style=font-size:11px;color:#8e8e93>В тихие часы success и partial подавляются, ошибки и таймауты отправляются.</div></div><div style="border-top:1px solid #333;padding-top:10px;display:flex;flex-direction:column;gap:8px"><div style=font-size:12px;color:#e0e0e0;font-weight:600>Фильтры по задачам</div><input type=text placeholder="Только эти задачи (через запятую, * — маска)"><input type=text placeholder="Исключить задачи (через запятую, * — маска)"><div style=font-size:11px;color:#8e8e93>Пустой список «только» = все задачи. Исключения важнее включений.</div></div><div style="border-top:1px solid #333;padding-top:10px;display:flex;flex-direction:column;gap:8px"><div style=font-size:12px;color:#e0e0e0;font-weight:600>Шаблоны сообщений</div><input type=text placeholder="✅ Задача "{task}" выполнена ({duration})"><input type=text placeholder="❌ Задача "{task}" упала ({duration}){error}"><div style=font-size:11px;color:#8e8e93>Плейсхолдеры: {task} {status} {duration} {error} {emoji} {cost} {tokens}. Пусто = шаблон по умолчанию.</div></div><div style="width:100%;max-width:700px;box-sizing:border-box;margin-top:8px;background:#1e1e1e;border:1px solid #333;border-radius:10px;overflow:hidden"><div style="display:flex;align-items:center;justify-content:space-between;gap:8px;padding:10px 14px"><span style=font-size:12px;font-weight:600;color:#e0e0e0>🔐 Секреты</span><span style=font-size:11px;color:#8e8e93></span></div><div style="padding:0 14px 14px;display:flex;flex-direction:column;gap:10px"><div style=display:flex;align-items:center;gap:8px;flex-wrap:wrap><input type=text placeholder="Имя секрета (A-Za-z0-9_.-)"style="width:220px;padding:4px 6px;background:#1e1e1e;border:1px solid #333;border-radius:4px;color:#fff;font-size:12px;outline:none"><input type=password autocomplete=new-password placeholder="Значение (не возвращается при чтении)"style="width:320px;padding:4px 6px;background:#1e1e1e;border:1px solid #333;border-radius:4px;color:#fff;font-size:12px;outline:none"><button></button></div><div style=display:flex;align-items:center;gap:10px;flex-wrap:wrap;overflow:auto></div><div style=font-size:11px;color:#8e8e93>В задачах используйте ссылку <code style=color:#dcdcaa>${secret:NAME}</code> — значение подставляется из хранилища при запуске и маскируется в логах.</div></div></div><div style="border-top:1px solid #333;padding-top:10px;display:flex;flex-direction:column;gap:8px"><div style=font-size:12px;color:#e0e0e0;font-weight:600>Матрицы</div><label><input type=checkbox style=accent-color:#5ac8fa;cursor:pointer;margin:0>Уведомлять о завершении матриц</label><div><label style=display:flex;align-items:center;gap:6px;cursor:pointer><input type=checkbox style=accent-color:#5ac8fa;cursor:pointer;margin:0>partial</label><label style=display:flex;align-items:center;gap:6px;cursor:pointer><input type=checkbox style=accent-color:#5ac8fa;cursor:pointer;margin:0>все упали</label><span>зависший клон, мин:</span><input type=number min=0 max=10080 style="width:72px;padding:4px 6px;background:#1e1e1e;border:1px solid #333;border-radius:4px;color:#fff;font-size:12px;outline:none"></div><div style=font-size:11px;color:#8e8e93>Клон, выполняющийся дольше указанного времени, уведомляется один раз. 0 — выключить.</div></div><div style="border-top:1px solid #333;padding-top:10px;display:flex;flex-direction:column;gap:8px"><div style=font-size:12px;color:#e0e0e0;font-weight:600>Дайджест</div><label><input type=checkbox style=accent-color:#5ac8fa;cursor:pointer;margin:0>Отправлять дайджест</label><div><select style="padding:4px 6px;background:#1e1e1e;border:1px solid #333;border-radius:4px;color:#fff;font-size:12px;outline:none"><option value=daily>ежедневно</option><option value=weekly>еженедельно (Пн)</option></select><input type=time style="padding:4px 6px;background:#1e1e1e;border:1px solid #333;border-radius:4px;color:#fff;font-size:12px;outline:none"><span style=font-size:11px;color:#8e8e93></span></div><div style=font-size:11px;color:#8e8e93>Запуски, success rate, стоимость и топ ошибок за сутки/неделю.</div></div><div style=display:flex;align-items:center;gap:10px;flex-wrap:wrap><button></button><button></button><span style=font-size:11px;color:#8e8e93>Каналы: webhook, Telegram, нативные уведомления ОС.'),Xc=e.template('<span style="display:flex;align-items:center;gap:6px;padding:4px 8px;background:#252526;border:1px solid #333;border-radius:4px;font-size:11px;color:#e0e0e0"><span style=font-weight:600;color:#569cd6></span><span style=color:#ce9178>•••• </span><button title=Удалить style="padding:2px 6px;background:#c43b2b;color:white;border:none;border-radius:3px;cursor:pointer;font-size:10px;font-weight:600;line-height:1">×'),eu=e.template("<span style=font-size:11px;color:#8e8e93>Секретов нет. Значения хранятся зашифрованно в secrets.json."),tu=e.template('<div style="padding:0 14px 14px;display:flex;flex-direction:column;gap:10px"><div style=display:flex;align-items:center;gap:10px;flex-wrap:wrap><label style=font-size:12px;color:#e0e0e0;white-space:nowrap>Удалять записи старше, дней</label><input type=number min=0 style="width:70px;padding:4px 6px;background:#1e1e1e;border:1px solid #333;border-radius:4px;color:#fff;font-size:12px;outline:none"><span style=font-size:11px;color:#8e8e93>0 = не удалять по возрасту</span></div><div style=display:flex;align-items:center;gap:10px;flex-wrap:wrap><label style=font-size:12px;color:#e0e0e0;white-space:nowrap>Хранить не более записей</label><input type=number min=0 style="width:80px;padding:4px 6px;background:#1e1e1e;border:1px solid #333;border-radius:4px;color:#fff;font-size:12px;outline:none"><span style=font-size:11px;color:#8e8e93>0 = без ограничения</span></div><div style=font-size:11px;color:#8e8e93>Последняя очистка: </div><div style=display:flex;align-items:center;gap:10px;flex-wrap:wrap><button></button><span style=font-size:11px;color:#8e8e93>Удаляются только завершённые записи; незавершённые запуски не трогаются.'),ru=e.template('<div style="padding:0 14px 14px;display:flex;flex-direction:column;gap:10px"><div style=display:flex;align-items:center;gap:8px;flex-wrap:wrap><label style=font-size:12px;color:#e0e0e0;white-space:nowrap>Действие</label><input type=text placeholder="например task.create"style="width:150px;padding:4px 6px;background:#1e1e1e;border:1px solid #333;border-radius:4px;color:#fff;font-size:12px;outline:none"><label style=font-size:12px;color:#e0e0e0;white-space:nowrap>Источник</label><input type=text placeholder=mcp/gui/http style="width:110px;padding:4px 6px;background:#1e1e1e;border:1px solid #333;border-radius:4px;color:#fff;font-size:12px;outline:none"><label style=font-size:12px;color:#e0e0e0;white-space:nowrap>Цель</label><input type=text placeholder="имя задачи/секрета"style="width:180px;padding:4px 6px;background:#1e1e1e;border:1px solid #333;border-radius:4px;color:#fff;font-size:12px;outline:none"><button></button></div><div style="width:100%;overflow:auto;border:1px solid #333;border-radius:6px;background:#0f0f0f"><table style=width:100%;border-collapse:collapse;font-size:11px><thead><tr style="border-bottom:1px solid #333"><th style="text-align:left;padding:6px 8px;color:#8e8e93">Время</th><th style="text-align:left;padding:6px 8px;color:#8e8e93">Действие</th><th style="text-align:left;padding:6px 8px;color:#8e8e93">Цель</th><th style="text-align:left;padding:6px 8px;color:#8e8e93">Источник</th><th style="text-align:left;padding:6px 8px;color:#8e8e93">Автор</th><th style="text-align:left;padding:6px 8px;color:#8e8e93">Удалён с</th></tr></thead><tbody></tbody></table></div><div style=font-size:11px;color:#8e8e93>Записываются мутации задач, настроек, шаблонов, профилей, рабочих зон, секретов, импорта и очистки истории. Детали маскируются (секреты заменены на <code style=color:#dcdcaa>***</code>).'),iu=e.template('<tr style="border-bottom:1px solid #222"><td style="padding:5px 8px;color:#e0e0e0;white-space:nowrap"></td><td style="padding:5px 8px;color:#569cd6"></td><td style="padding:5px 8px;color:#e0e0e0;white-space:nowrap">: </td><td style="padding:5px 8px;color:#ce9178"></td><td style="padding:5px 8px;color:#e0e0e0"></td><td style="padding:5px 8px;color:#8e8e93;white-space:nowrap">'),nu=e.template('<tr><td colspan=6 style="padding:10px 8px;color:#8e8e93;text-align:center">Записей аудита нет.'),ou=e.template('<div style="display:flex;flex-direction:column;gap:6px;padding:0 14px 12px">'),lu=e.template('<div style="font-size:12px;color:#8e8e93;padding:4px 0">Workspace не добавлен. Задача без workspace использует рабочую директорию проекта.'),su=e.template('<div style="display:flex;align-items:center;gap:10px;padding:8px 10px;background:#252526;border:1px solid #333;border-radius:8px;min-width:0"><span></span><div style=display:flex;flex-direction:column;gap:2px;flex:1;min-width:0><span style=font-size:12px;font-weight:700;color:#ffffff;white-space:nowrap;overflow:hidden;text-overflow:ellipsis>📦 </span><span style=font-size:10px;color:#8e8e93;white-space:nowrap;overflow:hidden;text-overflow:ellipsis></span><span style=font-size:10px;color:#a0a0a6;white-space:nowrap;overflow:hidden;text-overflow:ellipsis>git: <!> · </span><span style=font-size:10px;color:#8e8e93;white-space:nowrap;overflow:hidden;text-overflow:ellipsis>env: </span></div><div style=display:flex;gap:4px;flex-shrink:0><button title="Env-переменные workspace (секреты маскируются в логах)"style=background:transparent;border:none;color:#a0a0a6;cursor:pointer;font-size:14px;padding:2px>🔑</button><button title="Редактировать workspace"style=background:transparent;border:none;color:#a0a0a6;cursor:pointer;font-size:14px;padding:2px>✏️</button><button title="Удалить workspace (задачи сохраняются)"style=background:transparent;border:none;color:#ff3b30;cursor:pointer;font-size:14px;padding:2px>🗑'),au=e.template('<button title="Развернуть форму создания задачи"style="display:flex;align-items:center;justify-content:center;gap:8px;width:100%;max-width:700px;box-sizing:border-box;padding:12px 16px;background:#1e1e1e;border:1px dashed #3a3a3a;border-radius:10px;color:#e0e0e0;font-size:13px;font-weight:600;cursor:pointer;transition:border-color 0.18s ease, background 0.18s ease">➕ Создать задачу'),pu=e.template('<div style="display:block;width:100%;max-width:700px;box-sizing:border-box;background:#1e1e1e;padding:20px;border-radius:10px;box-shadow:0 4px 12px rgba(0,0,0,0.2)"><div style=display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:16px><h3 style=margin:0;font-size:14px;font-weight:600;color:#ffffff></h3><div style=display:flex;align-items:center;gap:8px><button title="Сохранить текущие настройки формы как шаблон"style="background:transparent;border:1px solid #333;border-radius:6px;padding:4px 10px;color:#a0a0a6;font-size:11px;cursor:pointer;white-space:nowrap;transition:color 0.18s ease, border-color 0.18s ease">💾 Сохранить как шаблон</button><button title="Свернуть форму"style="background:transparent;border:1px solid #333;border-radius:6px;padding:4px 10px;color:#a0a0a6;font-size:11px;cursor:pointer;white-space:nowrap;transition:color 0.18s ease, border-color 0.18s ease">Скрыть форму ▴</button></div></div><div style="display:block;width:100%;margin-bottom:12px;padding:10px 12px;background:#1a1a1a;border:1px solid #333;border-radius:8px"><label style=display:flex;align-items:center;gap:8px;cursor:pointer;font-size:13px;font-weight:600;color:#fff><input type=checkbox style=accent-color:#ff9f0a>📦 Matrix (Fan-Out)</label><div style=font-size:11px;color:#8e8e93;margin-top:4px;line-height:1.45>Задача-шаблон раскладывается на клоны по workspace. Родитель сам не выполняется — он запускает клоны и агрегирует результат.</div></div><div style=display:block;width:100%;margin-bottom:12px><label style=display:block;margin-bottom:8px;font-size:12px;color:#b0b0b0;font-weight:500>Имя задачи</label><input type=text placeholder="например, Gui-Test"style="display:block;width:100%;box-sizing:border-box;padding:8px;background:#1e1e1e;border:1px solid #333;border-radius:6px;color:#fff;font-size:13px;outline:none"></div><div style=display:block;width:100%;margin-bottom:12px><label style=display:block;margin-bottom:8px;font-size:12px;color:#b0b0b0;font-weight:500>Тип триггера</label><div style=display:flex;gap:8px;flex-wrap:wrap><label style=display:flex;align-items:center;gap:6px;cursor:pointer;flex:1><input type=radio name=triggerType style=accent-color:#007acc>По расписанию (Cron)</label><label style=display:flex;align-items:center;gap:6px;cursor:pointer;flex:1><input type=radio name=triggerType style=accent-color:#007acc>При изменении файла</label><label style=display:flex;align-items:center;gap:6px;cursor:pointer;flex:1><input type=radio name=triggerType style=accent-color:#007acc>MCP Event</label><label style=display:flex;align-items:center;gap:6px;cursor:pointer;flex:1><input type=radio name=triggerType style=accent-color:#007acc>Разово</label></div></div><div style=display:block;width:100%;margin-bottom:12px><label style=display:block;margin-bottom:8px;font-size:12px;color:#b0b0b0;font-weight:500>Сессия OpenCode</label><div style=display:flex;gap:8px;flex-wrap:wrap><label style=display:flex;align-items:center;gap:6px;cursor:pointer;flex:1><input type=radio name=sessionMode style=accent-color:#007acc>Новая</label><label style=display:flex;align-items:center;gap:6px;cursor:pointer;flex:1><input type=radio name=sessionMode style=accent-color:#007acc>Переиспользовать</label><label style=display:flex;align-items:center;gap:6px;cursor:pointer;flex:1><input type=radio name=sessionMode style=accent-color:#007acc>Последняя (--continue)</label></div></div><div style=width:100%;marginBottom:12px><label style=display:block;margin-bottom:8px;font-size:12px;color:#b0b0b0;font-weight:500>Расписание</label><select style="display:block;width:100%;box-sizing:border-box;padding:8px;background:#1e1e1e;border:1px solid #333;border-radius:6px;color:#fff;font-size:13px;outline:none"></select><div style=display:block;width:100%;margin-top:12px><label style=display:block;margin-bottom:8px;font-size:12px;color:#b0b0b0;font-weight:500>Часовой пояс (IANA)</label><input type=text list=iana-timezones placeholder="Пусто — системный пояс"style="display:block;width:100%;box-sizing:border-box;padding:8px;background:#1e1e1e;border:1px solid #333;border-radius:6px;color:#fff;font-size:13px;outline:none"><datalist id=iana-timezones><option value=Europe/Moscow></option><option value=Europe/London></option><option value=Europe/Berlin></option><option value=America/New_York></option><option value=America/Los_Angeles></option><option value=Asia/Almaty></option><option value=Asia/Tokyo></option><option value=UTC></option></datalist><div style=display:block;margin-top:6px;font-size:11px;color:#808080>Другая зона — задача будится каждую минуту, cron проверяется с учётом пояса.</div></div><div style=display:block;width:100%;margin-top:12px><label style=display:block;margin-bottom:8px;font-size:12px;color:#b0b0b0;font-weight:500>Окно запуска (необязательно)</label><div style=display:flex;gap:8px;align-items:center><input type=time title="Начало окна"style="display:block;flex:1;box-sizing:border-box;padding:8px;background:#1e1e1e;border:1px solid #333;border-radius:6px;color:#fff;font-size:13px;outline:none"><span style=color:#808080;font-size:12px>—</span><input type=time title="Конец окна (может быть меньше начала)"style="display:block;flex:1;box-sizing:border-box;padding:8px;background:#1e1e1e;border:1px solid #333;border-radius:6px;color:#fff;font-size:13px;outline:none"></div><div style=display:block;margin-top:6px;font-size:11px;color:#808080>Вне окна запуск переносится на его открытие, а не пропускается. Например 22:00 — 06:00.</div></div></div><div style=display:block;width:100%;margin-bottom:12px><label style=display:block;margin-bottom:8px;font-size:12px;color:#b0b0b0;font-weight:500>Промпт</label><textarea placeholder="Напиши краткий отчет о состоянии рынка"rows=2 style="display:block;width:100%;box-sizing:border-box;padding:8px;background:#1e1e1e;border:1px solid #333;border-radius:6px;color:#fff;font-size:13px;outline:none;resize:vertical"></textarea></div><div style=display:block;width:100%;margin-bottom:12px><label style=display:block;margin-bottom:8px;font-size:12px;color:#b0b0b0;font-weight:500>Шаблон промпта</label><select style="display:block;width:100%;box-sizing:border-box;padding:8px;background:#1e1e1e;border:1px solid #333;border-radius:6px;color:#fff;font-size:13px;outline:none"></select></div><div style=display:block;width:100%;margin-bottom:12px><label style=display:block;margin-bottom:8px;font-size:12px;color:#b0b0b0;font-weight:500>Модель LLM</label><input type=text list=scheduler-model-presets placeholder="по умолчанию (как в OpenCode)"style="display:block;width:100%;box-sizing:border-box;padding:8px;background:#1e1e1e;border:1px solid #333;border-radius:6px;color:#fff;font-size:13px;outline:none"><datalist id=scheduler-model-presets><option value=anthropic/claude-3-5-sonnet></option><option value=openai/gpt-4o></option><option value=deepseek/deepseek-coder></option><option value=google/gemini-2.5-pro></option><option value=openai/gpt-4o-mini></option></datalist><div style=font-size:11px;color:#8e8e93;margin-top:6px>Пусто — модель OpenCode по умолчанию. Иначе будет передан флаг --model.</div></div><div style=display:block;width:100%;margin-bottom:12px><label style=display:block;margin-bottom:8px;font-size:12px;color:#b0b0b0;font-weight:500>Приоритет</label><select style="display:block;width:100%;box-sizing:border-box;padding:8px;background:#1e1e1e;border:1px solid #333;border-radius:6px;color:#fff;font-size:13px;outline:none"></select><div style=font-size:11px;color:#8e8e93;margin-top:6px>Если готовы несколько задач сразу, первой запускается задача с более высоким приоритетом.</div></div><div style=display:block;width:100%;margin-bottom:12px><label style=display:block;margin-bottom:8px;font-size:12px;color:#b0b0b0;font-weight:500>Кол-во повторов при ошибке</label><input type=number min=0 placeholder=0 style="display:block;width:100%;box-sizing:border-box;padding:8px;background:#1e1e1e;border:1px solid #333;border-radius:6px;color:#fff;font-size:13px;outline:none"></div><div style=display:block;width:100%;margin-bottom:12px><label style=display:block;margin-bottom:8px;font-size:12px;color:#b0b0b0;font-weight:500>Задержка перед повтором (сек)</label><input type=number min=1 placeholder=60 style="display:block;width:100%;box-sizing:border-box;padding:8px;background:#1e1e1e;border:1px solid #333;border-radius:6px;color:#fff;font-size:13px;outline:none"></div><div style=display:block;width:100%;margin-bottom:12px><label style=display:block;margin-bottom:8px;font-size:12px;color:#b0b0b0;font-weight:500>Проверочная команда (Quality Gate)</label><input type=text placeholder="например: npm run test"style="display:block;width:100%;box-sizing:border-box;padding:8px;background:#1e1e1e;border:1px solid #333;border-radius:6px;color:#fff;font-size:13px;outline:none"><div style=font-size:11px;color:#8e8e93;margin-top:6px>Выполняется после успешного ответа ИИ. Ненулевой код = ошибка задачи.</div></div><div style=display:block;width:100%;margin-bottom:12px><label style=display:block;margin-bottom:8px;font-size:12px;color:#b0b0b0;font-weight:500>Команда перед запуском (Pre-flight)</label><input type=text placeholder="например: git pull"style="display:block;width:100%;box-sizing:border-box;padding:8px;background:#1e1e1e;border:1px solid #333;border-radius:6px;color:#fff;font-size:13px;outline:none"><div style=font-size:11px;color:#8e8e93;margin-top:6px>Например: git pull или npm install. Выполняется в рабочей директории задачи. Ненулевой код отменяет запуск (Pre-flight script failed).</div></div><div style=display:block;width:100%;margin-bottom:12px><label style=display:block;margin-bottom:8px;font-size:12px;color:#b0b0b0;font-weight:500>Команда после запуска (Post-flight)</label><input type=text placeholder="например: git push"style="display:block;width:100%;box-sizing:border-box;padding:8px;background:#1e1e1e;border:1px solid #333;border-radius:6px;color:#fff;font-size:13px;outline:none"><div style=font-size:11px;color:#8e8e93;margin-top:6px>Например: git push или npm run build. Выполняется в рабочей директории задачи даже при ошибке основной задачи.</div></div><div style=display:block;width:100%;margin-bottom:12px><label style=display:block;margin-bottom:8px;font-size:12px;color:#b0b0b0;font-weight:500>Зависит от задач (успешное завершение)</label><div style="display:flex;flex-wrap:wrap;gap:6px;padding:8px;background:#1e1e1e;border:1px solid #333;border-radius:6px;min-height:38px;box-sizing:border-box"></div><div style=font-size:11px;color:#8e8e93;margin-top:6px>Задача запустится автоматически, когда все отмеченные задачи завершатся успешно.</div></div><details style=display:block;width:100%;margin-bottom:12px><summary style=cursor:pointer;font-size:12px;color:#b0b0b0;font-weight:500;margin-bottom:8px;user-select:none>🔒 Ограничения инструментов</summary><div style="display:block;width:100%;padding:10px;background:#1e1e1e;border:1px solid #333;border-radius:6px;box-sizing:border-box"><div style=font-size:11px;color:#8e8e93;margin-bottom:8px>⚠ Metadata-only: opencode 2.2.3 не поддерживает allow/deny флаги — ограничения фиксируются в логе и истории. При конфликте приоритет у <b>denied</b>. Пустой allowedTools запрещён.</div><div style=font-size:11px;color:#b0b0b0;margin-bottom:4px>Белый список (allowedTools)</div><div style=display:flex;flex-wrap:wrap;gap:6px;margin-bottom:8px></div><div style=font-size:11px;color:#b0b0b0;margin-bottom:4px>Чёрный список (deniedTools)</div><div style=display:flex;flex-wrap:wrap;gap:6px;margin-bottom:8px></div><div style=display:flex;gap:6px><input type=text placeholder="свой инструмент, например websearch"style="flex:1;padding:6px 8px;background:#141414;border:1px solid #333;border-radius:6px;color:#fff;font-size:12px;outline:none"><button style="padding:6px 10px;background:transparent;border:1px solid #34c759;color:#34c759;border-radius:6px;cursor:pointer;font-size:12px">+ allowed</button><button style="padding:6px 10px;background:transparent;border:1px solid #ff3b30;color:#ff3b30;border-radius:6px;cursor:pointer;font-size:12px">+ denied</button></div></div></details><div style=display:block;width:100%;margin-top:8px><button title="Локальное превью команды по текущим полям формы (без RPC и без запуска)"style="display:block;width:100%;padding:8px;margin-top:4px;background:transparent;border:1px solid #333;border-radius:6px;color:#d4e6ff;cursor:pointer;font-size:12px">🧪 Превью</button><button>'),du=e.template('<div style=margin-top:10px;display:flex;flex-direction:column;gap:10px><div><div style=font-size:12px;color:#b0b0b0;font-weight:500;margin-bottom:6px>Workspaces (для матрицы) — выбрано </div></div><div style=display:flex;gap:8px;flex-wrap:wrap><label style=flex:1;min-width:150px;font-size:11px;color:#b0b0b0>Стратегия<select style="display:block;width:100%;box-sizing:border-box;margin-top:4px;padding:6px;background:#1e1e1e;border:1px solid #333;border-radius:6px;color:#fff;font-size:12px;outline:none"><option value=parallel>parallel — все сразу</option><option value=sequential>sequential — по одному</option></select></label><label style=flex:1;min-width:150px;font-size:11px;color:#b0b0b0>При ошибке<select style="display:block;width:100%;box-sizing:border-box;margin-top:4px;padding:6px;background:#1e1e1e;border:1px solid #333;border-radius:6px;color:#fff;font-size:12px;outline:none"><option value=continue>continue — продолжать</option><option value=stop>stop — остановить</option></select></label><label style=flex:1;min-width:150px;font-size:11px;color:#b0b0b0>Агрегация<select style="display:block;width:100%;box-sizing:border-box;margin-top:4px;padding:6px;background:#1e1e1e;border:1px solid #333;border-radius:6px;color:#fff;font-size:12px;outline:none"><option value=summary>summary — сводка</option><option value=per-task>per-task — по задачам</option></select></label></div><label style=display:flex;align-items:center;gap:8px;cursor:pointer;font-size:12px;color:#e0e0e0><input type=checkbox style=accent-color:#ff9f0a>Создать aggregator-задачу matrix-complete (запустится после всех клонов)</label><label style=font-size:11px;color:#b0b0b0;max-width:240px>Одновременно клонов (concurrency)<input type=number min=1 step=1 style="display:block;width:100%;box-sizing:border-box;margin-top:4px;padding:6px;background:#1e1e1e;border:1px solid #333;border-radius:6px;color:#fff;font-size:12px;outline:none"></label><div style="padding:8px 10px;background:#141414;border:1px solid #333;border-radius:6px;font-size:11px;line-height:1.55;color:#a0a0a6">'),cu=e.template("<div style=font-size:11px;color:#f5a623>Сначала добавьте хотя бы один workspace."),uu=e.template('<div style="display:flex;flex-direction:column;gap:4px;max-height:170px;overflow:auto;padding:6px 8px;background:#141414;border:1px solid #333;border-radius:6px">'),fu=e.template("<label style=display:flex;align-items:center;gap:8px;cursor:pointer;font-size:12px;color:#e0e0e0><input type=checkbox style=accent-color:#ff9f0a><span>📦 </span><span style=font-size:10px;color:#8e8e93;white-space:nowrap;overflow:hidden;text-overflow:ellipsis>"),gu=e.template('<details style="padding:8px 10px;background:#141414;border:1px solid #333;border-radius:6px"><summary style=cursor:pointer;font-size:12px;color:#b0b0b0;font-weight:500>⚙ Настройки по workspace — переопределено </summary><div style=margin-top:8px;display:flex;flex-direction:column;gap:8px;max-height:340px;overflow:auto>'),yu=e.template('<div style="padding:8px;background:#101010;border:1px solid #2a2a2a;border-radius:6px"><div>📦 <span style=margin-left:6px;font-size:10px;color:#8e8e93></span></div><div style=display:flex;flex-direction:column;gap:6px><textarea rows=2 placeholder="Промпт (по умолчанию — общий промпт формы)"style="padding:6px;background:#1e1e1e;border:1px solid #333;border-radius:6px;color:#fff;font-size:12px;outline:none;box-sizing:border-box;width:100%;resize:vertical;font-family:inherit"></textarea><div style=display:flex;gap:6px;flex-wrap:wrap><input placeholder="Модель (override)"style="padding:6px;background:#1e1e1e;border:1px solid #333;border-radius:6px;color:#fff;font-size:12px;outline:none;box-sizing:border-box;flex:1;min-width:150px"><input placeholder="Quality Gate (override)"style="padding:6px;background:#1e1e1e;border:1px solid #333;border-radius:6px;color:#fff;font-size:12px;outline:none;box-sizing:border-box;flex:1;min-width:150px"></div><div style=display:flex;gap:6px;flex-wrap:wrap><input placeholder="beforeScript (override)"style="padding:6px;background:#1e1e1e;border:1px solid #333;border-radius:6px;color:#fff;font-size:12px;outline:none;box-sizing:border-box;flex:1;min-width:150px"><input placeholder="afterScript (override)"style="padding:6px;background:#1e1e1e;border:1px solid #333;border-radius:6px;color:#fff;font-size:12px;outline:none;box-sizing:border-box;flex:1;min-width:150px">'),bu=e.template("<div style=color:#ff9f0a;font-weight:600>Будет создано <!> клон(а/ов):"),xu=e.template("<div style=color:#e0e0e0;word-break:break-all>"),mu=e.template("<span style=color:#f5a623>Выберите хотя бы один workspace — превью клонов появится здесь."),vu=e.template('<div style=display:block;width:100%;margin-bottom:12px><label style=display:block;margin-bottom:8px;font-size:12px;color:#b0b0b0;font-weight:500>Workspace (multi-repo)</label><select style="display:block;width:100%;box-sizing:border-box;padding:8px;background:#1e1e1e;border:1px solid #333;border-radius:6px;color:#fff;font-size:13px;outline:none"><option value>Без workspace — рабочая директория'),hu=e.template('<div style="margin-top:8px;padding:8px 10px;background:#141414;border:1px solid #333;border-radius:6px;font-size:11px;line-height:1.55;color:#a0a0a6"><div>cwd = <span style=color:#e0e0e0></span></div><div>git branch = <span style=color:#5ac8fa></span></div><div>git remote = <span style=color:#e0e0e0>'),$u=e.template('<div style=display:block;width:100%;margin-bottom:12px><label style=display:block;margin-bottom:8px;font-size:12px;color:#b0b0b0;font-weight:500>Рабочая директория</label><input type=text placeholder="по умолчанию — папка проекта"style="display:block;width:100%;box-sizing:border-box;padding:8px;background:#1e1e1e;border:1px solid #333;border-radius:6px;color:#fff;font-size:13px;outline:none"><div style=font-size:11px;color:#8e8e93;margin-top:6px>В этой папке задача запустит opencode run — здесь подхватятся MCP-серверы из opencode.json.'),wu=e.template('<div style=display:block;width:100%;margin-bottom:12px><label style=display:block;margin-bottom:8px;font-size:12px;color:#b0b0b0;font-weight:500>Путь к файлу для отслеживания</label><input type=text placeholder="например, C:\\project\\src\\main.ts"style="display:block;width:100%;box-sizing:border-box;padding:8px;background:#1e1e1e;border:1px solid #333;border-radius:6px;color:#fff;font-size:13px;outline:none">'),_u=e.template('<div style=display:block;width:100%;margin-bottom:12px><label style=display:block;margin-bottom:8px;font-size:12px;color:#b0b0b0;font-weight:500>MCP-сервер / источник</label><input type=text placeholder="например, github"style="display:block;width:100%;box-sizing:border-box;padding:8px;background:#1e1e1e;border:1px solid #333;border-radius:6px;color:#fff;font-size:13px;outline:none">'),ku=e.template('<div style=display:block;width:100%;margin-bottom:12px><label style=display:block;margin-bottom:8px;font-size:12px;color:#b0b0b0;font-weight:500>Имя события</label><input type=text placeholder="например, github.pr.opened"style="display:block;width:100%;box-sizing:border-box;padding:8px;background:#1e1e1e;border:1px solid #333;border-radius:6px;color:#fff;font-size:13px;outline:none">'),Su=e.template('<div style=display:block;width:100%;margin-bottom:12px><label style=display:block;margin-bottom:8px;font-size:12px;color:#b0b0b0;font-weight:500>Фильтр (опционально)</label><input type=text placeholder="например, repo="my-project" или regex"style="display:block;width:100%;box-sizing:border-box;padding:8px;background:#1e1e1e;border:1px solid #333;border-radius:6px;color:#fff;font-size:13px;outline:none"><div style=font-size:11px;color:#8e8e93;margin-top:6px>key=value сравнивается с полем payload, иначе фильтр считается regex/подстрокой. События приходят через RPC emit_event.'),Cu=e.template('<div style=display:block;width:100%;margin-bottom:12px><label style=display:block;margin-bottom:8px;font-size:12px;color:#b0b0b0;font-weight:500>Время однократного запуска</label><input type=text placeholder="2026-11-14T10:00:00.000Z или локальная дата"style="display:block;width:100%;box-sizing:border-box;padding:8px;background:#1e1e1e;border:1px solid #333;border-radius:6px;color:#fff;font-size:13px;outline:none"><div style="font-size:11px;color:#8e8e93;margin:6px 0">Или задержка в секундах от нажатия кнопки «Создать задачу»:</div><input type=number min=1 placeholder="например, 3600"style="display:block;width:100%;box-sizing:border-box;padding:8px;background:#1e1e1e;border:1px solid #333;border-radius:6px;color:#fff;font-size:13px;outline:none"><div style=font-size:11px;color:#8e8e93;margin-top:6px>Приоритет у runAt: если задано время, delaySeconds игнорируется. После запуска задача больше не повторится.'),zu=e.template('<div style=margin-top:8px><label style=display:block;margin-bottom:6px;font-size:11px;color:#8e8e93>Сколько запусков переживает сессия (sessionMaxRuns, необязательно)</label><input type=number min=1 placeholder="без ограничения"style="display:block;width:100%;box-sizing:border-box;padding:8px;background:#1e1e1e;border:1px solid #333;border-radius:6px;color:#fff;font-size:13px;outline:none"><div style=font-size:11px;color:#8e8e93;margin-top:6px>sessionId генерируется плагином автоматически. При достижении лимита сессия удаляется, следующий запуск начинает чистую сессию.'),qn=e.template("<option>"),Tu=e.template('<div style=display:block;width:100%;margin-top:8px><label style=display:block;margin-bottom:8px;font-size:12px;color:#b0b0b0;font-weight:500>Cron-выражение</label><input type=text placeholder="* * * * *"style="display:block;width:100%;box-sizing:border-box;padding:8px;background:#1e1e1e;border:1px solid #333;border-radius:6px;color:#fff;font-size:13px;outline:none">'),Eu=e.template('<div style="display:block;max-height:80px;overflow-y:auto;margin-top:8px;padding:8px;background:#2a1113;border:1px solid #5a1d21;border-radius:6px;font-size:11px;line-height:1.4;color:#ff6b6b;white-space:pre-wrap;word-break:break-word">'),Au=e.template('<div style=display:flex;align-items:center;gap:6px;margin-top:8px><span style=font-size:10px;color:#8e8e93>Кастомный шаблон:</span><button title="Удалить шаблон"style=background:transparent;border:none;color:#ff3b30;cursor:pointer;font-size:14px;line-height:1;padding:0>🗑'),Pu=e.template("<span style=font-size:11px;color:#ff3b30;font-weight:500;cursor:default>"),Mu=e.template("<option>Другой (<!>)"),Lu=e.template("<span style=font-size:12px;color:#8e8e93>Других задач пока нет"),No=e.template("<label><input type=checkbox style=margin:0>"),Ru=e.template("<span style=color:#5ac8fa;font-size:11px;margin-left:6px>(<!> allowed · <!> denied)"),qu=e.template("<div style=font-size:11px;color:#cfcfd2;margin-top:8px>"),Du=e.template("<div>allowed: [<!>]"),Iu=e.template("<div>denied: [<!>]"),Ou=e.template('<button style="background:transparent;border:1px solid #333;border-radius:6px;padding:8px 16px;color:#ff3b30;cursor:pointer;font-size:13px;width:100%">Отмена'),ju=e.template('<div style="display:block;width:100%;margin-top:8px;padding:10px;background:#1e1e1e;border:1px solid #333;border-radius:6px"><div style=font-size:12px;font-weight:600;color:#ffffff;display:flex;justify-content:space-between;align-items:center>🧪 Превью (локальное, по полям формы)<button style=background:none;border:none;color:#8e8e93;cursor:pointer;font-size:14px;padding:0>✕'),Nu=e.template("<div style=display:flex;flex-direction:column;gap:4px;font-size:11px;color:#e0e0e0;margin-top:6px><div style=overflow-wrap:anywhere>$ </div><div style=color:#8e8e93>cwd: "),Bu=e.template("<div style=color:#8e8e93>🔒 allowed=[<!>] · denied=[<!>]"),Fu=e.template("<div style=color:#8e8e93>⚡ pre: "),Gu=e.template("<div style=color:#8e8e93>⚡ post: "),Wu=e.template("<div style=color:#8e8e93>✅ QG: "),Uu=e.template("<div style=color:#f5a623>⚠ "),Hu=e.template("<div style=font-size:11px;color:#8e8e93;margin-bottom:8px>Фильтр: <!> · показано <!> из "),Vu=e.template('<div style="display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;padding:40px 16px;color:#a0a0a6;font-size:13px;gap:10px"><span style=font-size:40px;line-height:1></span><span style=max-width:380px;line-height:1.5>'),Ju=e.template("<div style=display:flex;flex-direction:column;gap:0>"),Qu=e.template('<div style=position:fixed;inset:0;background:rgba(0,0,0,0.55);display:flex;align-items:center;justify-content:center;z-index:2000;padding:20px><div style="width:min(540px,100%);background:#1e1e1e;border:1px solid #444;border-radius:10px;padding:16px;display:flex;flex-direction:column;gap:12px;box-shadow:0 12px 40px rgba(0,0,0,0.6)"><div style=font-size:13px;font-weight:600;color:#e0e0e0;white-space:pre-wrap></div><div style=display:flex;justify-content:flex-end;gap:8px><button style="padding:6px 14px;border-radius:6px;border:1px solid #3a3a3a;background:#262626;color:#e0e0e0;font-size:12px;cursor:pointer">Отмена</button><button style="padding:6px 14px;border-radius:6px;border:1px solid #0a84ff;background:#0a84ff;color:#fff;font-size:12px;font-weight:600;cursor:pointer">ОК'),Ku=e.template(`<textarea autofocus rows=6 style="width:100%;box-sizing:border-box;resize:vertical;padding:8px 10px;border-radius:8px;border:1px solid #3a3a3a;background:#141414;color:#e0e0e0;font-family:Menlo, Monaco, 'Courier New', monospace;font-size:12px;outline:none">`),Yu=e.template('<input autofocus style="width:100%;box-sizing:border-box;padding:8px 10px;border-radius:8px;border:1px solid #3a3a3a;background:#141414;color:#e0e0e0;font-size:13px;outline:none">'),Zu=e.template("<div style=font-size:11px;color:#8e8e93>Ctrl+Enter — сохранить, Escape — отмена"),Xu=e.template(`<div style="position:fixed;bottom:16px;left:16px;right:16px;background:#1e1e1e;border:1px solid #333;border-radius:8px;padding:0;max-height:300px;overflow:hidden;display:flex;flex-direction:column;z-index:1000"><div style="display:flex;align-items:center;justify-content:space-between;padding:10px 14px;border-bottom:1px solid #333;background:#252526;border-radius:8px 8px 0 0"><div style=display:flex;align-items:center;gap:8px><span style=font-size:13px;font-weight:600;color:#ffffff>Логи</span><span style=font-size:11px;color:#8e8e93></span></div><button style=background:transparent;border:none;color:#8e8e93;cursor:pointer;font-size:18px;line-height:1;padding:0;width:24px;height:24px;display:flex;align-items:center;justify-content:center>✕</button></div><div style="flex:1;overflow-y:auto;padding:12px;font-family:Menlo, Monaco, 'Courier New', monospace;font-size:11px;line-height:1.5;color:#d4d4d4;background:#1e1e1e;border-radius:0 0 8px 8px">`),ef=e.template("<div style=white-space:pre-wrap;margin-bottom:2px>"),tf=e.template(`<div style="padding:16px;display:flex;flex-direction:column;gap:16px;font-size:13px;font-family:-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;color:#e0e0e0;background:#0f0f0f"><h2 style=margin:0;font-size:22px;font-weight:800;color:#ffffff></h2><div style=margin-top:5px;font-size:11px;font-weight:600;letter-spacing:1.2px;text-transform:uppercase;color:#8e8e93>Local AI CI/CD Orchestrator</div><div style="background:#2a1a1a;border:1px solid #ff3b30;border-radius:8px;padding:16px;color:#ff3b30">Произошла ошибка отображения. Попробуйте перезагрузить панель.`);function rf(c){switch(c){case"running":return"#f5a623";case"success":return"#34c759";case"error":return"#ff3b30";case"partial":return"#ff9f0a";default:return"#8e8e93"}}const Ye=5;function js(c){const $=typeof c=="number"&&Number.isFinite(c)?Math.min(10,Math.max(0,Math.floor(c))):Ye;return $>=10?"Критический":$>=8?"Высокий":$<=3?"Низкий":"Обычный"}const Ns=[{value:2,label:"Низкий"},{value:5,label:"Обычный"},{value:8,label:"Высокий"},{value:10,label:"Критический"}];function U(c){return c instanceof Error?c.message:typeof c=="object"&&c!==null&&"message"in c?String(c.message):JSON.stringify(c)}function Oe(c,$=150){const gt=(c||"").split(/\r?\n/).map(In=>In.trim()).find(Boolean)??"";return gt.length>$?gt.slice(0,$-1).trimEnd()+"…":gt}const Bo=[{label:"Каждую минуту",value:"* * * * *"},{label:"Каждый час",value:"0 * * * *"},{label:"Каждый день в 09:00",value:"0 9 * * *"},{label:"Каждый понедельник в 10:00",value:"0 10 * * 1"},{label:"Свое расписание…",value:"__custom__"}],nf=Oo.Plugin.define({setup(c){const $=c.client.rpc(Zd),[gt,In]=o.createSignal([]),[xe,Hs]=o.createSignal([]),[On,Vs]=o.createSignal(!1),[Lt,Ho]=o.createSignal("all"),[Rt,Ze]=o.createSignal(!1),[qt,Xe]=o.createSignal(""),[Js,Qs]=o.createSignal([]),[Vo,Jo]=o.createSignal("default"),[Dt,Ks]=o.createSignal(!1),[mi,Ys]=o.createSignal(!1),[It,Ot]=o.createSignal(!1),[Zs,Qo]=o.createSignal(!1),[jn,Xs]=o.createSignal(""),[vr,Nn]=o.createSignal("");let vi=null;function et(r,t=""){return vi?.(null),new Promise(n=>{vi=n,Xs(r),Nn(t),Qo(!0)})}function yt(r){const t=vi;vi=null,Qo(!1),t?.(r)}const[ea,jt]=o.createSignal(""),[Bn,Fn]=o.createSignal(null),[hr,Ko]=o.createSignal(!1),[Yo,hi]=o.createSignal(""),[Gn,ta]=o.createSignal({total:0,success:0,error:0}),[$i,Zo]=o.createSignal(null),[Xo,ra]=o.createSignal([]),el=[{label:"Свой промпт",value:"custom",prompt:""},{label:"Ночной сторож (тесты)",value:"night-watch",prompt:"Запусти ночные проверки: прогнали тесты, зафиксируй ошибки и составь краткий отчёт о состоянии репозитория."},{label:"Утренний дайджест",value:"morning-digest",prompt:"Собери утренний дайджест: какие изменения были за ночь, есть ли проваленные сборки, что требует внимания сегодня."},{label:"Гигиена кода",value:"code-hygiene",prompt:"Проведи аудит гигиены кода: найди неиспользуемые импорты, неиспользуемые переменные, лишние зависимости и предложи правки."}],[$r,wi]=o.createSignal("custom"),[_i,ia]=o.createSignal([]),[na,oa]=o.createSignal(0);setInterval(()=>oa(r=>r+1),1e3);const[la,Wn]=o.createSignal(1),[Te,Un]=o.createSignal(!1),[m,tl]=o.createSignal(!1),[Hn,rl]=o.createSignal(!0),[me,il]=o.createSignal(!1),[nl,ol]=o.createSignal(""),[Vn,sa]=o.createSignal(!0),[ki,ll]=o.createSignal(!1),[sl,al]=o.createSignal(1e4),[pl,dl]=o.createSignal(2),[cl,ul]=o.createSignal(1e3),[fl,gl]=o.createSignal(""),[yl,bl]=o.createSignal(""),[xl,ml]=o.createSignal(""),[vl,hl]=o.createSignal(""),[Nt,$l]=o.createSignal(!0),[wl,_l]=o.createSignal(!0),[kl,Sl]=o.createSignal(!0),[Cl,zl]=o.createSignal(60),[wr,Tl]=o.createSignal(!1),[El,Al]=o.createSignal("daily"),[Pl,Ml]=o.createSignal("09:00"),[Jn,aa]=o.createSignal(null),[oe,Ll]=o.createSignal(!1),[Rl,ql]=o.createSignal(""),[Dl,Il]=o.createSignal(""),[Ol,jl]=o.createSignal("HTML"),[Nl,Bl]=o.createSignal(!1),[Fl,Gl]=o.createSignal(!0),[pa,da]=o.createSignal("https://api.telegram.org"),[ca,ua]=o.createSignal(null),[Ee,Wl]=o.createSignal(!1),[Ul,Hl]=o.createSignal(!0),[_r,Vl]=o.createSignal(!1),[Jl,Ql]=o.createSignal("22:00"),[Kl,Yl]=o.createSignal("08:00"),[Si,Zl]=o.createSignal(!1),[Qn,fa]=o.createSignal([]),[Kn,Bt]=o.createSignal(!1),[Ci,Xl]=o.createSignal(""),[zi,es]=o.createSignal(""),[Yn,ga]=o.createSignal([]),[Zn,ts]=o.createSignal(!1),[Xn,ya]=o.createSignal(!0),[rs,ba]=o.createSignal(""),[is,xa]=o.createSignal(""),[ns,ma]=o.createSignal(""),[eo,Ti]=o.createSignal(!0),[to,Ei]=o.createSignal(90),[ro,Ai]=o.createSignal(1e4),[Pi,Mi]=o.createSignal(30),[Li,Ri]=o.createSignal(5e3),[io,no]=o.createSignal(null),[os,oo]=o.createSignal(0),[lo,va]=o.createSignal(!0),[qi,ls]=o.createSignal(!1),Ft=new Map;o.onCleanup(()=>{for(const r of Ft.values())clearInterval(r);Ft.clear()});const[so,ha]=o.createSignal("Планировщик задач");async function $a(){try{const r=await $.get_platform({});r?.title&&ha(r.title)}catch(r){console.error("RPC Error (get_platform):",r)}}function ss(r){tl(!!r?.enabled),rl(r?.onlyOnError!==!1),il(!!r?.webhook?.enabled),ol(r?.webhook?.url??""),al(Number(r?.webhook?.timeoutMs??1e4)),dl(Number(r?.webhook?.retryCount??2)),ul(Number(r?.webhook?.retryDelayMs??1e3)),gl(r?.templates?.success??""),bl(r?.templates?.error??""),ml((r?.filters?.include??[]).join(", ")),hl((r?.filters?.exclude??[]).join(", ")),$l(r?.matrix?.enabled!==!1),_l(r?.matrix?.onPartial!==!1),Sl(r?.matrix?.onAllFailed!==!1),zl(Number(r?.matrix?.stuckAfterMinutes??60)),Tl(!!r?.digest?.enabled),Al(r?.digest?.frequency==="weekly"?"weekly":"daily"),Ml(r?.digest?.time??"09:00"),aa(r?.digest?.lastSentAt??null),Ll(!!r?.telegram?.enabled),ql(r?.telegram?.botToken??""),Il(r?.telegram?.chatId??""),jl(r?.telegram?.parseMode??"HTML"),Bl(!!r?.telegram?.disableNotification),Gl(r?.telegram?.includeDashboardLink!==!1),da(r?.telegram?.apiBase??"https://api.telegram.org"),ua(typeof r?.telegram?.messageThreadId=="number"?r.telegram.messageThreadId:null),Wl(!!r?.native?.enabled),Hl(r?.native?.sound!==!1),Vl(!!r?.quietHours?.enabled),Ql(r?.quietHours?.from??"22:00"),Yl(r?.quietHours?.to??"08:00");const t=r?.audit;Ti(t?.enabled!==!1),Ei(Number(t?.retentionDays??90)),Ai(Number(t?.maxRecords??1e4))}async function wa(){try{const r=await $.get_settings({});Wn(r.maxConcurrent??1),Un(!!r.winterMode),ss(r.notifications);const t=r.history;Mi(Number(t?.retentionDays??30)),Ri(Number(t?.maxRecords??5e3)),no(t?.lastCleanupAt??null),oo(Number(t?.lastCleanupDeleted??0));const n=r.audit;Ti(n?.enabled!==!1),Ei(Number(n?.retentionDays??90)),Ai(Number(n?.maxRecords??1e4))}catch(r){console.error("RPC Error (get_settings):",r)}ao(),kr()}function _a(){const r=t=>t.split(",").map(n=>n.trim()).filter(n=>n.length>0);return{enabled:m(),onlyOnError:Hn(),webhook:{enabled:me(),url:(nl()||"").trim(),timeoutMs:Math.max(1e3,Math.min(12e4,Math.floor(Number(sl())||1e4))),retryCount:Math.max(0,Math.min(5,Math.floor(Number(pl())||0))),retryDelayMs:Math.max(100,Math.min(6e4,Math.floor(Number(cl())||1e3)))},templates:{success:fl().trim(),error:yl().trim()},filters:{include:r(xl()),exclude:r(vl())},telegram:{enabled:oe(),botToken:(Rl()||"").trim(),chatId:(Dl()||"").trim(),parseMode:Ol(),disableNotification:Nl(),messageThreadId:ca(),includeDashboardLink:Fl(),apiBase:pa()},native:{enabled:Ee(),sound:Ul()},quietHours:{enabled:_r(),from:(Jl()||"22:00").trim(),to:(Kl()||"08:00").trim()},matrix:{enabled:Nt(),onPartial:wl(),onAllFailed:kl(),stuckAfterMinutes:Math.max(0,Math.min(10080,Math.floor(Number(Cl())||0)))},digest:{enabled:wr(),frequency:El(),time:(Pl()||"09:00").trim(),lastSentAt:Jn()},audit:{enabled:eo(),retentionDays:to(),maxRecords:ro()}}}function as(){return{retentionDays:Math.max(0,Math.floor(Number(Pi())||0)),maxRecords:Math.max(0,Math.floor(Number(Li())||0)),lastCleanupAt:io(),lastCleanupDeleted:Math.max(0,Math.floor(Number(os())||0))}}async function Gt(r){try{const t=await $.save_settings(r);if(r.maxConcurrent!==void 0&&Wn(t.maxConcurrent),r.winterMode!==void 0&&Un(!!t.winterMode),r.notifications!==void 0&&ss(t.notifications),r.history!==void 0){const n=t.history;Mi(Number(n?.retentionDays??30)),Ri(Number(n?.maxRecords??5e3)),no(n?.lastCleanupAt??null),oo(Number(n?.lastCleanupDeleted??0))}if(r.audit!==void 0){const n=t.audit;Ti(n?.enabled!==!1),Ei(Number(n?.retentionDays??90)),Ai(Number(n?.maxRecords??1e4))}}catch(t){console.error("RPC Error (save_settings):",t),c.toast.show({title:"Не удалось сохранить настройки",variant:"error",description:U(t)})}}async function R(){await Gt({notifications:_a()})}async function ps(){await Gt({history:as()})}async function ka(){ls(!0);try{await Gt({history:as()});const r=await $.cleanup_history({}),n=(await $.get_settings({})).history;Mi(Number(n?.retentionDays??30)),Ri(Number(n?.maxRecords??5e3)),no(n?.lastCleanupAt??null),oo(Number(n?.lastCleanupDeleted??0)),c.toast.show({title:r.success?"Очистка истории завершена":"Очистка не удалась",variant:r.success?"success":"error",description:r.message})}catch(r){console.error("RPC Error (cleanup_history):",r),c.toast.show({title:"Очистка не удалась",variant:"error",description:U(r)})}finally{ls(!1)}}async function ao(){Bt(!0);try{const r=await $.list_secrets({});fa(r?.secrets??[])}catch(r){console.error("RPC Error (list_secrets):",r)}finally{Bt(!1)}}async function Sa(){const r=Ci().trim(),t=zi();if(!(!r||!t)){Bt(!0);try{const n=await $.save_secret({name:r,value:t});n?.success?(Xl(""),es(""),c.toast.show({title:"Секрет сохранён",variant:"success",description:n.message}),ao()):c.toast.show({title:"Секрет не сохранён",variant:"error",description:n?.message??""})}catch(n){console.error("RPC Error (save_secret):",n),c.toast.show({title:"Секрет не сохранён",variant:"error",description:U(n)})}finally{Bt(!1)}}}async function Ca(r){Bt(!0);try{const t=await $.delete_secret({name:r});t?.success?(c.toast.show({title:"Секрет удалён",variant:"success",description:t?.message??""}),ao()):c.toast.show({title:"Секрет не удалён",variant:"error",description:t?.message??""})}catch(t){console.error("RPC Error (delete_secret):",t),c.toast.show({title:"Секрет не удалён",variant:"error",description:U(t)})}finally{Bt(!1)}}async function kr(){ts(!0);try{const r=await $.get_audit({action:rs()||void 0,actor:is()||void 0,target:ns()||void 0,limit:200});r?.success&&ga(r?.records??[])}catch(r){console.error("RPC Error (get_audit):",r)}finally{ts(!1)}}async function po(){await Gt({audit:{enabled:eo(),retentionDays:to(),maxRecords:ro()}})}async function za(){ll(!0);try{await R();const r=await $.test_notification({});c.toast.show({title:r.success?"Тестовое уведомление отправлено":"Тест не удался",variant:r.success?"success":"error",description:r.message})}catch(r){console.error("RPC Error (test_notification):",r),c.toast.show({title:"Тест не удался",variant:"error",description:U(r)})}finally{ll(!1)}}async function Ta(){Zl(!0);try{await R();const r=await $.send_digest({});c.toast.show({title:r.success?"Дайджест отправлен":"Дайджест не отправлен",variant:r.success?"success":"error",description:r.message})}catch(r){console.error("RPC Error (send_digest):",r),c.toast.show({title:"Дайджест не отправлен",variant:"error",description:U(r)})}finally{Zl(!1)}}async function Ea(r){Wn(r),await Gt({maxConcurrent:r})}async function Aa(r){Un(r),await Gt({winterMode:r})}const[co,Di]=o.createSignal(null),[Pa,uo]=o.createSignal(!1),[Ae,Ii]=o.createSignal(""),[Oi,Wt]=o.createSignal("* * * * *"),[Ut,Ht]=o.createSignal(""),[ds,Sr]=o.createSignal("* * * * *"),[ji,Cr]=o.createSignal(0),[Ni,zr]=o.createSignal(60),[Tr,Er]=o.createSignal(""),[bt,Ar]=o.createSignal(Ye),[Bi,Pr]=o.createSignal(""),[xt,Mr]=o.createSignal([]),[Fi,Lr]=o.createSignal(""),[Gi,Rr]=o.createSignal(""),[ae,tt]=o.createSignal("cron"),[fo,qr]=o.createSignal(""),[go,Wi]=o.createSignal(""),[Ui,Hi]=o.createSignal(""),[je,Vt]=o.createSignal("new"),[Dr,Vi]=o.createSignal(""),[Ji,Ir]=o.createSignal(""),[Qi,Or]=o.createSignal(""),[Ki,jr]=o.createSignal(""),[yo,Nr]=o.createSignal(""),[bo,Br]=o.createSignal(""),[Fr,Gr]=o.createSignal(""),[Yi,Jt]=o.createSignal(""),[te,Qt]=o.createSignal([]),[re,Kt]=o.createSignal([]),[cs,us]=o.createSignal(""),[Ne,Zi]=o.createSignal(!1),[Be,Wr]=o.createSignal([]),[xo,Xi]=o.createSignal("parallel"),[fs,en]=o.createSignal("continue"),[gs,tn]=o.createSignal("summary"),[ys,rn]=o.createSignal(!1),[nn,on]=o.createSignal(""),[mo,ln]=o.createSignal({}),[Ur,vo]=o.createSignal(!1),[ho,bs]=o.createSignal(!1),[ie,Hr]=o.createSignal(null),[Vr,$o]=o.createSignal(""),xs=["bash","edit","write","read","grep","glob","webfetch"];function ms(r,t){r==="allowed"?Qt(n=>n.includes(t)?n.filter(a=>a!==t):[...n,t]):Kt(n=>n.includes(t)?n.filter(a=>a!==t):[...n,t])}function vs(r){const t=cs().trim();t&&(r==="allowed"?te().includes(t)||Qt([...te(),t]):re().includes(t)||Kt([...re(),t]),us(""))}function Ma(r,t){Wr(n=>t?n.includes(r)?n:[...n,r]:n.filter(a=>a!==r))}function wo(r,t){const n=r.trim()||"task",a=t.trim().replace(/[\\/:*?"<>|]+/g,"-").replace(/\s+/g,"-");return`${n}-matrix-${a||"workspace"}`}const _o=()=>Be().map(r=>xe().find(t=>t.id===r)).filter(r=>!!r).map(r=>wo(Ae(),r.name));function Jr(r,t,n){ln(a=>{const H={...a[r]??{}};n.trim()?H[t]=n:delete H[t];const K={...a};return Object.keys(H).length>0?K[r]=H:delete K[r],K})}const La=()=>Object.keys(mo()).length,hs=()=>{if(!Ne())return;const r=nn().trim(),t=r?Number(r):void 0,n=mo();return{workspaceIds:Be(),strategy:xo(),failureMode:fs(),aggregation:gs(),createAggregator:ys(),...t!==void 0&&Number.isFinite(t)&&t>=1?{concurrency:Math.floor(t)}:{},...Object.keys(n).length>0?{overrides:n}:{}}};function sn(){Zi(!1),Wr([]),Xi("parallel"),en("continue"),tn("summary"),rn(!1),on(""),ln({})}function Ra(){const r=Tr().trim()?` --model ${Tr().trim()}`:"",t=je()==="last"?" --continue":je()==="reuse"?" --session <id>":"";return`opencode run${r}${t} "${Ut().replace(/\s+/g," ").trim()}"`}const[of,qa]=o.createSignal(null),[an,$s]=o.createSignal(!1),[pn,lf]=o.createSignal(!1),[sf,Da]=o.createSignal(null);async function Ia(){$s(!0);try{const r=await $.export_tasks({});if(!r.success){c.toast.show({title:"Ошибка экспорта",variant:"error",description:r.error});return}qa(r.data);const t=new Blob([r.data],{type:"application/json"}),n=URL.createObjectURL(t),a=document.createElement("a");a.href=n,a.download=`windows-scheduler-tasks-${new Date().toISOString().slice(0,10)}.json`,document.body.appendChild(a),a.click(),document.body.removeChild(a),URL.revokeObjectURL(n),c.toast.show({title:`Экспортировано задач: ${r.count}`,variant:"success"})}catch(r){console.error("RPC Error (export_tasks):",r),c.toast.show({title:"Ошибка экспорта",variant:"error",description:U(r)})}finally{$s(!1)}}function Oa(r){const n=r.target.files?.[0]??null;Da(n)}async function ko(){try{const r=await $.get_templates({}),t=Array.isArray(r?.templates)?r.templates:[];ia(t)}catch(r){console.error("RPC Error (get_templates):",r)}}async function Qr(){try{const r=await $.get_workspaces({}),t=Array.isArray(r?.workspaces)?r.workspaces:[];Hs(t)}catch(r){console.error("RPC Error (get_workspaces):",r)}}const Kr=()=>xe().find(r=>r.id===qt());async function dn(){try{const r=await $.get_profiles({}),t=Array.isArray(r?.profiles)?r.profiles:[];Qs(t),r?.current&&Jo(r.current),Ks(!!r?.pinnedByEnv)}catch(r){console.error("RPC Error (get_profiles):",r)}}async function ja(r){if(!(!r||r===Vo())){Ot(!0);try{const t=await $.set_profile({name:r});if(!t.success){c.toast.show({title:"Не удалось переключить профиль",variant:"error",description:t.message??"Неизвестная ошибка"});return}Jo(t.current??r),c.toast.show({title:"Профиль переключён",variant:"success",description:t.message}),await dn()}catch(t){console.error("RPC Error (set_profile):",t),c.toast.show({title:"Ошибка переключения профиля",variant:"error",description:Oe(U(t))})}finally{Ot(!1)}}}async function Na(){const r=(await et("Имя нового профиля (латиница, цифры, - и _)","")??"").trim();if(r){Ot(!0);try{const t=await $.create_profile({name:r});if(!t.success){c.toast.show({title:"Не удалось создать профиль",variant:"error",description:t.message??"Неизвестная ошибка"});return}await dn(),c.toast.show({title:"Профиль создан",variant:"success",description:t.message})}catch(t){console.error("RPC Error (create_profile):",t),c.toast.show({title:"Ошибка создания профиля",variant:"error",description:Oe(U(t))})}finally{Ot(!1)}}}async function Ba(r){if(!(!r||r==="default")&&window.confirm(`Удалить профиль "${r}" вместе с его БД, настройками и логами?`)){Ot(!0);try{const t=await $.delete_profile({name:r});if(!t.success){c.toast.show({title:"Не удалось удалить профиль",variant:"error",description:t.message??"Неизвестная ошибка"});return}await dn(),c.toast.show({title:"Профиль удалён",variant:"success"})}catch(t){console.error("RPC Error (delete_profile):",t),c.toast.show({title:"Ошибка удаления профиля",variant:"error",description:Oe(U(t))})}finally{Ot(!1)}}}function Fa(r){return r?Object.entries(r).map(([t,n])=>`${t}=${n}`).join(`
|
|
2
|
-
`):""}function Ga(r){const t={};for(const n of r.split(/\r?\n/)){const a=n.trim();if(!a||a.startsWith("#"))continue;const H=a.indexOf("=");if(H<=0)return null;const K=a.slice(0,H).trim();if(!/^[A-Za-z_][A-Za-z0-9_]*$/.test(K))return null;t[K]=a.slice(H+1).trim()}return t}async function Wa(r){const t=await et(`Env-переменные workspace, по одной в строке KEY=VALUE
|
|
3
|
-
(пустое поле — очистить)`,Fa(r.env));if(t===null)return;const n=Ga(t);if(!n){c.toast.show({title:"Неверный формат env",variant:"error",description:"Нужны строки KEY=VALUE, имя — латиница/цифры/_"});return}const a=await et("Путь к .env-файлу workspace (необязательно, пусто — без файла)",r.envFile??"");if(a!==null){Ze(!0);try{const H=await $.update_workspace({id:r.id,env:Object.keys(n).length?n:null,envFile:a.trim()||null});if(!H.success){c.toast.show({title:"Не удалось сохранить env",variant:"error",description:H.error??"Неизвестная ошибка"});return}await Qr(),c.toast.show({title:"Env-переменные сохранены",variant:"success",description:"Секреты маскируются в логах"})}catch(H){console.error("RPC Error (update_workspace env):",H),c.toast.show({title:"Ошибка сохранения env",variant:"error",description:Oe(U(H))})}finally{Ze(!1)}}}async function Ua(){const r=(await et("Путь к git-репозиторию (workspace)","")??"").trim();if(!r)return;const t=(await et("Название workspace (необязательно)","")??"").trim();Ze(!0);try{const n=await $.add_workspace({path:r,...t?{name:t}:{}});if(!n.success){c.toast.show({title:"Ошибка добавления workspace",variant:"error",description:n.error??"Неизвестная ошибка"});return}await Qr(),n.workspace?.id&&Xe(n.workspace.id),c.toast.show({title:"Workspace добавлен",variant:"success"})}catch(n){console.error("RPC Error (add_workspace):",n),c.toast.show({title:"Ошибка добавления workspace",variant:"error",description:Oe(U(n))})}finally{Ze(!1)}}async function Ha(r){const t=(await et("Путь к git-репозиторию",r.path)??"").trim();if(!t)return;const n=(await et("Название workspace",r.name)??"").trim();Ze(!0);try{const a=await $.update_workspace({id:r.id,path:t,...n?{name:n}:{}});if(!a.success){c.toast.show({title:"Ошибка обновления workspace",variant:"error",description:a.error??"Неизвестная ошибка"});return}await Qr(),c.toast.show({title:"Workspace обновлён",variant:"success"})}catch(a){console.error("RPC Error (update_workspace):",a),c.toast.show({title:"Ошибка обновления workspace",variant:"error",description:Oe(U(a))})}finally{Ze(!1)}}async function Va(r){if(window.confirm(`Удалить workspace "${r.name}"? Задачи сохранены, привязка будет очищена.`)){Ze(!0);try{const t=await $.delete_workspace({id:r.id});if(!t.success){c.toast.show({title:"Ошибка удаления workspace",variant:"error",description:t.message??"Неизвестная ошибка"});return}qt()===r.id&&Xe(""),Lt()===r.id&&Ho("all"),await Qr(),await Pe(),c.toast.show({title:"Workspace удалён",variant:"success",description:t.message})}catch(t){console.error("RPC Error (delete_workspace):",t),c.toast.show({title:"Ошибка удаления workspace",variant:"error",description:Oe(U(t))})}finally{Ze(!1)}}}const Ja=r=>{if(wi(r),r.startsWith("custom:")){const n=_i().find(a=>`custom:${a.id}`===r);if(!n)return;if(Ht(n.prompt??""),n.schedule){Wt(n.schedule);const a=Bo.find(H=>H.value===n.schedule);Sr(a?a.value:"__custom__")}if(Cr(n.retryCount??0),zr(n.retryDelay??60),Pr(n.qualityGate??""),Er(n.model??""),Ar(typeof n.priority=="number"?n.priority:Ye),Mr(Array.isArray(n.dependsOn)?n.dependsOn:[]),Lr(n.beforeScript??""),Rr(n.afterScript??""),tt(n.triggerType==="file"?"file":n.triggerType==="mcp-event"?"mcp-event":"cron"),qr(n.watchPath??""),Ir(n.timezone??""),Or(n.notBefore??""),jr(n.notAfter??""),Nr(n.mcpEvent?.server??""),Br(n.mcpEvent?.event??""),Gr(n.mcpEvent?.filter??""),Jt(n.workingDirectory??""),Xe(n.workspaceId??""),Qt(Array.isArray(n.allowedTools)?n.allowedTools:[]),Kt(Array.isArray(n.deniedTools)?n.deniedTools:[]),n.matrix){Zi(!0),Wr(Array.isArray(n.matrix.workspaceIds)?n.matrix.workspaceIds:[]),Xi(n.matrix.strategy==="sequential"?"sequential":"parallel"),en(n.matrix.failureMode==="stop"?"stop":"continue"),tn(n.matrix.aggregation==="per-task"?"per-task":"summary"),rn(!!n.matrix.createAggregator),on(typeof n.matrix.concurrency=="number"?String(n.matrix.concurrency):"");const a=n.matrix.overrides;ln(a?{...a}:{})}else sn();return}const t=el.find(n=>n.value===r);t&&Ht(t.prompt)};async function Qa(){if(!(Ut()||"").trim()){c.toast.show({title:"Нечего сохранять",variant:"error",description:"Сначала заполните промпт — он обязателен для шаблона."});return}const r=(await et("Название шаблона","")??"").trim();if(r)try{const t=await $.save_template({name:r,prompt:(Ut()||"").trim(),schedule:(Oi()||"").trim(),timeoutSeconds:3600,model:(Tr()||"").trim(),priority:bt(),retryCount:ji(),retryDelay:Ni(),qualityGate:(Bi()||"").trim(),beforeScript:(Fi()||"").trim(),afterScript:(Gi()||"").trim(),dependsOn:xt(),triggerType:ae(),timezone:(Ji()||"").trim()||void 0,notBefore:(Qi()||"").trim()||void 0,notAfter:(Ki()||"").trim()||void 0,mcpEvent:ae()==="mcp-event"?{server:(yo()||"").trim(),event:(bo()||"").trim(),...Fr().trim()?{filter:Fr().trim()}:{}}:void 0,watchPath:(fo()||"").trim(),workingDirectory:(Yi()||"").trim(),workspaceId:(qt()||"").trim()||void 0,allowedTools:te().length>0?te():void 0,deniedTools:re().length>0?re():void 0,matrix:hs()});if(!t.success){c.toast.show({title:"Не удалось сохранить шаблон",variant:"error",description:t.error||"Неизвестная ошибка"});return}await ko();const n=t.template;n?.id&&wi(`custom:${n.id}`),c.toast.show({title:`Шаблон "${r}" сохранён`,variant:"success"})}catch(t){console.error("RPC Error (save_template):",t),c.toast.show({title:"Ошибка сохранения шаблона",variant:"error",description:U(t)})}}async function Ka(r){if(window.confirm(`Удалить шаблон "${r.name}"?`))try{const t=await $.delete_template({id:r.id});if(!t.success){c.toast.show({title:"Не удалось удалить шаблон",variant:"error",description:t.error||"Неизвестная ошибка"});return}$r()===`custom:${r.id}`&&wi("custom"),await ko(),c.toast.show({title:`Шаблон "${r.name}" удалён`,variant:"success"})}catch(t){console.error("RPC Error (delete_template):",t),c.toast.show({title:"Ошибка удаления шаблона",variant:"error",description:U(t)})}}async function Pe(){try{const r=await $.get_tasks({});console.log("[GUI] Received tasks:",r);const t=Array.isArray(r?.tasks)?r.tasks:[];console.log("[GUI] tasks count:",t.length);const n=t.map(a=>({name:a.name,schedule:a.schedule,status:a.status??"unknown",runsTotal:typeof a.runsTotal=="number"?a.runsTotal:0,runsSuccess:typeof a.runsSuccess=="number"?a.runsSuccess:0,runsError:typeof a.runsError=="number"?a.runsError:0,runsPartial:typeof a.runsPartial=="number"?a.runsPartial:0,nextRun:a.nextRun??void 0,paused:!!a.paused,orphaned:!!a.orphaned,retryCount:a.retryCount??0,retryDelay:a.retryDelay??60,qualityGate:a.qualityGate??void 0,dependsOn:Array.isArray(a.dependsOn)?a.dependsOn:void 0,model:a.model??void 0,priority:typeof a.priority=="number"?a.priority:Ye,beforeScript:a.beforeScript??void 0,afterScript:a.afterScript??void 0,triggerType:a.triggerType??"cron",runAt:a.runAt??void 0,session:a.session??void 0,sessionMaxRuns:a.sessionMaxRuns??void 0,mcpEvent:a.mcpEvent??void 0,watchPath:a.watchPath??void 0,timezone:a.timezone??void 0,notBefore:a.notBefore??void 0,notAfter:a.notAfter??void 0,pausedUntil:a.pausedUntil??void 0,workingDirectory:a.workingDirectory??void 0,workspaceId:a.workspaceId??void 0,workspaceName:a.workspaceName??void 0,workspaceColor:a.workspaceColor??void 0,allowedTools:Array.isArray(a.allowedTools)?a.allowedTools:void 0,deniedTools:Array.isArray(a.deniedTools)?a.deniedTools:void 0,matrix:a.matrix??null,matrixParentId:a.matrixParentId??null,isMatrixParent:!!a.isMatrixParent,matrixSummary:a.matrixSummary??null,prompt:a.prompt??""}));In(n),console.log("[GUI] jobs:",gt()),await Ya()}catch(r){console.error("RPC Error (get_tasks):",r),c.toast.show({title:"Ошибка загрузки задач",variant:"error",description:Oe(U(r))})}}async function Ya(){try{const r=await $.get_metrics({});ta({total:r.total??0,success:r.success??0,error:r.error??0})}catch(r){console.error("RPC Error (get_metrics):",r)}}async function Za(r){Zo(r);try{const t=await $.get_history({limit:10,taskName:r});ra(t.records??[])}catch(t){console.error("RPC Error (get_history):",t),c.toast.show({title:"Ошибка загрузки истории",variant:"error",description:U(t)})}}async function Xa(r){vo(!0),$o(r),bs(!0),Hr(null);try{const t=await $.dry_run({taskName:r});Hr(t)}catch(t){console.error("RPC Error (dry_run):",t),Hr({success:!1,error:U(t),tasks:[],warnings:[]})}finally{bs(!1)}}function ws(){vo(!1),$o(""),Hr(null)}async function ep(){Ko(!0),hi("");try{const r=await $.create_task({name:(Ae()||"").trim(),schedule:(Oi()||"").trim(),prompt:(Ut()||"").trim(),model:(Tr()||"").trim(),priority:bt(),retryCount:ji(),retryDelay:Ni(),qualityGate:(Bi()||"").trim(),beforeScript:(Fi()||"").trim(),afterScript:(Gi()||"").trim(),dependsOn:xt(),triggerType:ae(),session:je(),...je()==="reuse"&&(Dr()||"").trim()?{sessionMaxRuns:Number((Dr()||"").trim())}:{},...ae()==="once"?{runAt:(go()||"").trim()||void 0,delaySeconds:(Ui()||"").trim()?Number(Ui().trim()):void 0}:{},timezone:(Ji()||"").trim()||void 0,notBefore:(Qi()||"").trim()||void 0,notAfter:(Ki()||"").trim()||void 0,mcpEvent:ae()==="mcp-event"?{server:(yo()||"").trim(),event:(bo()||"").trim(),...Fr().trim()?{filter:Fr().trim()}:{}}:void 0,watchPath:(fo()||"").trim(),workingDirectory:(Yi()||"").trim(),workspaceId:(qt()||"").trim()||void 0,allowedTools:te().length>0?te():void 0,deniedTools:re().length>0?re():void 0,matrix:hs()});if(!r.success){const t=Oe(r.message);hi(t),c.toast.show({title:"Ошибка создания задачи",variant:"error",description:t});return}await new Promise(t=>setTimeout(t,500)),await Pe(),Ii(""),Wt("* * * * *"),Ht(""),Sr("* * * * *"),Cr(0),zr(60),Pr(""),Mr([]),Er(""),Ar(Ye),Lr(""),Rr(""),tt("cron"),qr(""),Wi(""),Hi(""),Vt("new"),Vi(""),Ir(""),Or(""),jr(""),Nr(""),Br(""),Gr(""),Jt(""),Xe(""),Qt([]),Kt([]),sn(),Di(null),wi("custom"),c.toast.show({title:"Задача создана",variant:"success"})}catch(r){console.error("RPC Error (create_task):",r);const t=Oe(U(r));hi(t),c.toast.show({title:"Ошибка создания задачи",variant:"error",description:t})}finally{Ko(!1)}}function tp(r){const t=new Date().toISOString(),n=Ft.get(r);n&&clearInterval(n);let a=0;const H=setInterval(()=>{if(a+=1,a>900){clearInterval(H),Ft.delete(r);return}(async()=>{try{const Me=((await $.get_history({limit:50})).records??[]).find(mt=>String(mt.taskName??"").toLowerCase()===r.toLowerCase()&&typeof mt.startedAt=="string"&&mt.startedAt>=t);if(!Me)return;clearInterval(H),Ft.delete(r);const we=Me.status==="success",Yt=((Number(Me.durationMs)||0)/1e3).toFixed(1),Zr=Me.error?`: ${Me.error}`:"";c.toast.show({title:we?`Задача "${r}" выполнена`:`Задача "${r}" упала`,variant:we?"success":"error",description:`${Yt}s${Zr}`}),await Pe()}catch(K){console.error("RPC Error (get_history):",K)}})()},2e3);Ft.set(r,H)}async function rp(r){if(!r||typeof r!="string"){console.error("[GUI] run_task aborted: empty task name");return}try{const t=await $.run_task({name:r});if(!t.success){c.toast.show({title:`Не удалось запустить "${r}"`,variant:"error",description:t.message});return}c.toast.show({title:t.message||`Задача "${r}" запущена`,variant:"success"}),/уже выполняется/i.test(t.message||"")||tp(r),await Pe()}catch(t){console.error("RPC Error (run_task):",t),c.toast.show({title:"Ошибка запуска",variant:"error",description:U(t)})}}async function ip(r){try{const t=await $.pause_task({name:r});if(!t.success){c.toast.show({title:`Не удалось поставить на паузу "${r}"`,variant:"error",description:t.message});return}c.toast.show({title:`Задача "${r}" поставлена на паузу`,variant:"success"}),await Pe()}catch(t){console.error("RPC Error (pause_task):",t),c.toast.show({title:"Ошибка паузы",variant:"error",description:U(t)})}}async function np(r){try{const t=await $.resume_task({name:r});if(!t.success){c.toast.show({title:`Не удалось возобновить "${r}"`,variant:"error",description:t.message});return}c.toast.show({title:`Задача "${r}" возобновлена`,variant:"success"}),await Pe()}catch(t){console.error("RPC Error (resume_task):",t),c.toast.show({title:"Ошибка возобновления",variant:"error",description:U(t)})}}async function op(r){if(window.confirm(`Отменить выполняющиеся клоны матрицы "${r}"?`))try{const t=await $.cancel_matrix({name:r});if(!t.success){c.toast.show({title:"Не удалось отменить матрицу",variant:"error",description:t.message});return}c.toast.show({title:t.message,variant:"success"}),await Pe()}catch(t){console.error("RPC Error (cancel_matrix):",t),c.toast.show({title:"Ошибка отмены матрицы",variant:"error",description:U(t)})}}async function lp(r){const n=gt().find(a=>a.name===r)?.matrix?`Удалить матрицу "${r}" вместе со всеми клонами и агрегатором?`:`Удалить задачу "${r}"?`;if(window.confirm(n))try{const a=await $.delete_task({name:r});if(!a.success){c.toast.show({title:"Ошибка удаления",variant:"error",description:a.message});return}c.toast.show({title:`Задача "${r}" удалена`,variant:"success"}),Bn()===r&&(jt(""),Fn(null)),co()?.name===r&&Di(null),await Pe()}catch(a){console.error("RPC Error (delete_task):",a),c.toast.show({title:"Ошибка удаления",variant:"error",description:U(a)})}}async function sp(r){Fn(r),jt("Загрузка логов…");try{const t=await $.get_task_logs({name:r});if(!t.success){jt(t.error||"Не удалось загрузить логи"),c.toast.show({title:"Ошибка чтения логов",variant:"error",description:t.error});return}jt(t.logs||"(пусто)")}catch(t){console.error("RPC Error (get_task_logs):",t),jt("Ошибка чтения логов: "+U(t))}}function ap(r){Di(r),uo(!1),Ii(r.name),Wt(r.schedule),Ht(r.prompt??""),Er(r.model??""),Ar(typeof r.priority=="number"?r.priority:Ye),Cr(r.retryCount??0),zr(r.retryDelay??60),Pr(r.qualityGate??""),Mr(Array.isArray(r.dependsOn)?r.dependsOn:[]),Lr(r.beforeScript??""),Rr(r.afterScript??""),tt(r.triggerType??"cron"),qr(r.watchPath??""),Wi(r.runAt??""),Hi(""),Vt(r.session==="reuse"||r.session==="last"?r.session:"new"),Vi(typeof r.sessionMaxRuns=="number"?String(r.sessionMaxRuns):""),Ir(r.timezone??""),Or(r.notBefore??""),jr(r.notAfter??""),Nr(r.mcpEvent?.server??""),Br(r.mcpEvent?.event??""),Gr(r.mcpEvent?.filter??""),Jt(r.workingDirectory??""),Xe(r.workspaceId??""),Qt(Array.isArray(r.allowedTools)?r.allowedTools:[]),Kt(Array.isArray(r.deniedTools)?r.deniedTools:[]),r.matrix?(Zi(!0),Wr(Array.isArray(r.matrix.workspaceIds)?r.matrix.workspaceIds:[]),Xi(r.matrix.strategy==="sequential"?"sequential":"parallel"),en(r.matrix.failureMode==="stop"?"stop":"continue"),tn(r.matrix.aggregation==="per-task"?"per-task":"summary"),rn(!!r.matrix.createAggregator),on(typeof r.matrix.concurrency=="number"?String(r.matrix.concurrency):""),ln(r.matrix.overrides?{...r.matrix.overrides}:{})):sn();const t=Bo.find(n=>n.value===r.schedule);Sr(t?t.value:"__custom__")}Pe(),Qr(),dn(),wa(),$a(),ko();const pp=setInterval(Pe,5e3);o.onCleanup(()=>clearInterval(pp));const dp=ds()==="__custom__",So=co()!==null,cp=()=>{const r=(Ji()||"").trim();if(!r)return!0;try{return new Intl.DateTimeFormat("en-US",{timeZone:r}),!0}catch{return!1}},Co=(r,t,n)=>Number.isInteger(r)&&r>=t&&(n===void 0||r<=n),_s=()=>{const r=(Ae()||"").trim();if(!r)return"Укажите имя задачи.";if(!(Ut()||"").trim())return"Укажите промпт.";if(ae()==="cron"&&!(Oi()||"").trim())return"Укажите cron-расписание.";if(ae()==="once"&&!(go()||"").trim()&&!(Ui()||"").trim())return"Укажите время запуска или задержку.";if(Ne()&&Be().length===0)return"Выберите хотя бы один workspace для матрицы.";if(je()==="reuse"&&(Dr()||"").trim()&&!/^[1-9]\d*$/.test(Dr().trim()))return"Лимит запусков сессии — целое положительное число.";if(Ne()&&(nn()||"").trim()&&!/^[1-9]\d*$/.test(nn().trim()))return"Concurrency матрицы — целое положительное число.";if((Qi()||"").trim()===""!=((Ki()||"").trim()===""))return"Окно запуска задаётся только парой «с/по».";if(!cp())return"Неизвестная таймзона. Укажите IANA-пояс, например Europe/Moscow.";if(!Co(bt(),0,10))return"Приоритет — целое число от 0 до 10.";if(!Co(ji(),0))return"Количество повторов — целое число ≥ 0.";if(!Co(Ni(),0))return"Задержка повтора — целое число секунд ≥ 0.";const t=r.toLowerCase();return xt().some(n=>n.trim().toLowerCase()===t)?"Задача не может зависеть от самой себя.":""},cn=()=>_s()==="",Yr=()=>gt()??[],zo=()=>{const r=Lt();return r==="all"?Yr():r==="none"?Yr().filter(t=>!t.workspaceId):Yr().filter(t=>t.workspaceId===r)},ks=()=>{const r=(co()?.name??Ae()).trim().toLowerCase();return Yr().map(t=>t.name).filter(t=>t.trim().toLowerCase()!==r)};function up(r,t){Mr(n=>t?n.some(a=>a.toLowerCase()===r.toLowerCase())?n:[...n,r]:n.filter(a=>a.toLowerCase()!==r.toLowerCase()))}const[fp,Ss]=o.createSignal(null);function rt(r=!1){return`background:${r?"rgba(90,200,250,0.16)":"transparent"};border:1px solid ${r?"rgba(90,200,250,0.5)":"#333"};border-radius:6px;width:32px;height:32px;display:flex;align-items:center;justify-content:center;cursor:pointer;color:${r?"#5ac8fa":"#cfcfd2"};font-size:14px;line-height:1;padding:0;transition:background 0.18s ease, border-color 0.18s ease, color 0.18s ease`}function le(r,t,n=!1){const a=r.currentTarget;a&&(a.style.background=t?"rgba(255,255,255,0.09)":n?"rgba(90,200,250,0.16)":"transparent",a.style.borderColor=t?"#5ac8fa":n?"rgba(90,200,250,0.5)":"#333",a.style.color=t||n?"#5ac8fa":"#cfcfd2")}const gp=r=>{const t=r.job;return!t||!t.name?null:(()=>{var n=Xd(),a=n.firstChild,H=a.firstChild,K=H.firstChild,ee=K.firstChild,Me=ee.firstChild,we=ee.nextSibling,Yt=we.firstChild,Zr=Yt.nextSibling,mt=Zr.nextSibling,it=mt.nextSibling,To=it.nextSibling,un=To.nextSibling;un.nextSibling;var Fe=K.nextSibling,fn=H.nextSibling,_e=fn.firstChild,Se=_e.nextSibling,Ge=Se.nextSibling,Le=Ge.nextSibling,ke=Le.nextSibling,nt=ke.nextSibling;return e.insert(Me,()=>t.name),e.insert(ee,(()=>{var d=e.memo(()=>!!t.workspaceName);return()=>d()&&(()=>{var p=ec();return p.firstChild,e.insert(p,()=>t.workspaceName,null),e.effect(b=>{var D=`Workspace: ${t.workspaceName}${t.workingDirectory?` (${t.workingDirectory})`:""}`,I=`font-size:11px;font-weight:600;flex-shrink:0;cursor:help;white-space:nowrap;padding:2px 7px;border-radius:999px;border:1px solid ${t.workspaceColor||"#5ac8fa"};color:${t.workspaceColor||"#5ac8fa"};background:${t.workspaceColor||"#5ac8fa"}1a`;return D!==b.e&&e.setAttribute(p,"title",b.e=D),b.t=e.style(p,I,b.t),b},{e:void 0,t:void 0}),p})()})(),null),e.insert(ee,(()=>{var d=e.memo(()=>!!(t.isMatrixParent&&t.matrix));return()=>d()&&(()=>{var p=tc(),b=p.firstChild,D=b.nextSibling;return D.nextSibling,e.insert(p,()=>t.matrix.workspaceIds.length,D),e.insert(p,(()=>{var I=e.memo(()=>!!t.matrix.concurrency);return()=>I()?` ⚙${t.matrix.concurrency}`:""})(),null),e.effect(()=>e.setAttribute(p,"title",`Matrix fan-out: ${t.matrix.workspaceIds.length} клонов, стратегия: ${t.matrix.strategy??"parallel"}, при ошибке: ${t.matrix.failureMode??"continue"}${t.matrix.concurrency?`, одновременно: ${t.matrix.concurrency}`:""}${t.matrix.overrides?`, переопределено workspace: ${Object.keys(t.matrix.overrides).length}`:""}`)),p})()})(),null),e.insert(ee,(()=>{var d=e.memo(()=>!!t.matrixParentId);return()=>d()&&(()=>{var p=rc();return p.firstChild,e.insert(p,()=>t.matrixParentId,null),e.effect(()=>e.setAttribute(p,"title",`Клон матрицы. Родитель: ${t.matrixParentId}`)),p})()})(),null),e.insert(ee,(()=>{var d=e.memo(()=>!!t.watchPath);return()=>d()&&(()=>{var p=ic();return e.effect(()=>e.setAttribute(p,"title",`Отслеживание файла: ${t.watchPath}`)),p})()})(),null),e.insert(ee,(()=>{var d=e.memo(()=>!!t.timezone);return()=>d()&&(()=>{var p=nc();return p.firstChild,e.insert(p,()=>t.timezone,null),e.effect(()=>e.setAttribute(p,"title",`Часовой пояс задачи: ${t.timezone}`)),p})()})(),null),e.insert(ee,(()=>{var d=e.memo(()=>!!(t.notBefore&&t.notAfter));return()=>d()&&(()=>{var p=oc(),b=p.firstChild,D=b.nextSibling;return D.nextSibling,e.insert(p,()=>t.notBefore,D),e.insert(p,()=>t.notAfter,null),e.effect(()=>e.setAttribute(p,"title",`Окно запуска: ${t.notBefore}–${t.notAfter}. Вне окна запуск переносится на его открытие.`)),p})()})(),null),e.insert(ee,(()=>{var d=e.memo(()=>!!t.pausedUntil);return()=>d()&&(()=>{var p=lc();return p.firstChild,e.insert(p,()=>new Date(t.pausedUntil).toLocaleDateString(),null),e.effect(()=>e.setAttribute(p,"title",`Пауза до ${new Date(t.pausedUntil).toLocaleString()} — задача включится автоматически.`)),p})()})(),null),e.insert(ee,(()=>{var d=e.memo(()=>!!(t.beforeScript||t.afterScript));return()=>d()&&(()=>{var p=sc();return e.effect(()=>e.setAttribute(p,"title",`Lifecycle hooks: ${[t.beforeScript?`pre: ${t.beforeScript}`:"",t.afterScript?`post: ${t.afterScript}`:""].filter(Boolean).join(" · ")}`)),p})()})(),null),e.insert(ee,(()=>{var d=e.memo(()=>t.triggerType==="mcp-event");return()=>d()&&(()=>{var p=ac();return e.effect(()=>e.setAttribute(p,"title",`MCP-событие: ${t.mcpEvent?.event??"—"}${t.mcpEvent?.filter?` (фильтр: ${t.mcpEvent.filter})`:""}`)),p})()})(),null),e.insert(ee,(()=>{var d=e.memo(()=>!!(t.session&&t.session!=="new"));return()=>d()&&(()=>{var p=pc();return e.insert(p,()=>t.session==="reuse"?"⟳ сессия":"↪ продолжение"),e.effect(()=>e.setAttribute(p,"title",t.session==="reuse"?`Переиспользуемая сессия OpenCode${t.sessionId?`: ${t.sessionId}`:""}`:"Продолжение последней сессии OpenCode (--continue)")),p})()})(),null),e.insert(ee,(()=>{var d=e.memo(()=>!!t.model);return()=>d()&&(()=>{var p=dc();return p.firstChild,e.insert(p,()=>t.model,null),e.effect(()=>e.setAttribute(p,"title",`Модель LLM: ${t.model}`)),p})()})(),null),e.insert(ee,(()=>{var d=e.memo(()=>typeof t.priority=="number"&&t.priority!==Ye);return()=>d()&&(()=>{var p=cc();return p.firstChild,e.insert(p,()=>js(t.priority),null),e.effect(()=>e.setAttribute(p,"title",`Приоритет: ${js(t.priority)} (${t.priority})`)),p})()})(),null),e.insert(ee,(()=>{var d=e.memo(()=>!!(Array.isArray(t.allowedTools)&&t.allowedTools.length>0||Array.isArray(t.deniedTools)&&t.deniedTools.length>0));return()=>d()?(()=>{var p=uc();return e.effect(()=>e.setAttribute(p,"title",`Ограничения инструментов: ${[t.allowedTools?.length?`allowed=[${t.allowedTools.join(", ")}]`:"",t.deniedTools?.length?`denied=[${t.deniedTools.join(", ")}]`:""].filter(Boolean).join(" · ")}`)),p})():null})(),null),e.insert(K,(()=>{var d=e.memo(()=>!!(Array.isArray(t.dependsOn)&&t.dependsOn.length>0));return()=>d()&&(()=>{var p=fc(),b=p.firstChild;return b.firstChild,e.insert(b,()=>t.dependsOn.join(" + "),null),p})()})(),we),e.insert(K,(()=>{var d=e.memo(()=>!!(t.isMatrixParent&&t.matrixSummary));return()=>d()&&(()=>{var p=gc(),b=p.firstChild,D=b.firstChild,I=D.nextSibling,J=I.nextSibling,T=J.nextSibling;return T.nextSibling,e.insert(b,()=>t.matrixSummary.successCount,I),e.insert(b,()=>t.matrixSummary.totalCount,T),e.insert(b,(()=>{var x=e.memo(()=>t.matrixSummary.errorCount>0);return()=>x()?` · ❌ ${t.matrixSummary.errorCount}`:""})(),null),e.insert(b,(()=>{var x=e.memo(()=>t.matrixSummary.pendingCount>0);return()=>x()?` · ⏳ ${t.matrixSummary.pendingCount}`:""})(),null),e.effect(x=>{var q=t.matrixSummary.message,Z=`cursor:help;color:${rf(t.matrixSummary.status)};white-space:nowrap;overflow:hidden;text-overflow:ellipsis`;return q!==x.e&&e.setAttribute(b,"title",x.e=q),x.t=e.style(b,Z,x.t),x},{e:void 0,t:void 0}),p})()})(),we),e.insert(we,()=>t.runsTotal??0,Zr),e.insert(we,()=>t.runsSuccess??0,it),e.insert(we,()=>t.runsPartial??0,un),e.insert(we,()=>t.runsError??0,null),e.insert(K,(()=>{var d=e.memo(()=>!!(t.schedule||t.nextRun));return()=>d()&&(()=>{var p=yc(),b=p.firstChild;return e.insert(b,()=>t.schedule),e.insert(p,(()=>{var D=e.memo(()=>!!t.nextRun);return()=>D()&&(()=>{var I=bc();return I.firstChild,e.insert(I,()=>t.nextRun,null),I})()})(),null),p})()})(),null),e.insert(Fe,(()=>{var d=e.memo(()=>t.status==="running");return()=>d()?(()=>{var p=xc(),b=p.firstChild,D=b.nextSibling;return D.nextSibling,e.insert(p,na,D),p})():(()=>{var p=mc();return e.insert(p,(()=>{var b=e.memo(()=>!!t.orphaned);return()=>b()?"🧟 Нет в планировщике":e.memo(()=>!!t.paused)()?"⏸ Пауза":e.memo(()=>t.status==="success")()?"🟢 Готова":e.memo(()=>t.status==="error")()?"🔴 Ошибка":e.memo(()=>t.status==="partial")()?"🟠 Частично":t.status==="idle"?"⚪ Не запускалась":"⚪ Неизвестно"})()),p})()})()),_e.addEventListener("mouseleave",d=>{le(d,!1),Ss(p=>p===t.name?null:p)}),_e.addEventListener("mouseenter",d=>{le(d,!0),Te()&&Ss(t.name)}),_e.$$click=()=>{rp(t.name)},e.insert(_e,()=>Te()&&fp()===t.name?"❄️":"▶"),Se.addEventListener("mouseleave",d=>le(d,!1)),Se.addEventListener("mouseenter",d=>le(d,!0)),Se.$$click=()=>{t.orphaned||(t.paused?np(t.name):ip(t.name))},e.insert(Se,()=>t.paused?"▶":"⏸"),Ge.addEventListener("mouseleave",d=>le(d,!1)),Ge.addEventListener("mouseenter",d=>le(d,!0)),Ge.$$click=()=>{sp(t.name)},Le.addEventListener("mouseleave",d=>le(d,!1,Ur()&&Vr()===t.name)),Le.addEventListener("mouseenter",d=>le(d,!0,Ur()&&Vr()===t.name)),Le.$$click=()=>{Xa(t.name)},ke.addEventListener("mouseleave",d=>le(d,!1,$i()===t.name)),ke.addEventListener("mouseenter",d=>le(d,!0,$i()===t.name)),ke.$$click=()=>{Za(t.name)},nt.addEventListener("mouseleave",d=>le(d,!1)),nt.addEventListener("mouseenter",d=>le(d,!0)),nt.$$click=()=>{ap(t)},e.insert(fn,(()=>{var d=e.memo(()=>!!t.matrix);return()=>d()&&(()=>{var p=vc();return p.addEventListener("mouseleave",b=>le(b,!1)),p.addEventListener("mouseenter",b=>le(b,!0)),p.$$click=()=>{op(t.name)},e.effect(b=>{var D=`Отменить выполняющиеся клоны матрицы "${t.name}"`,I=rt();return D!==b.e&&e.setAttribute(p,"title",b.e=D),b.t=e.style(p,I,b.t),b},{e:void 0,t:void 0}),p})()})(),null),e.insert(fn,(()=>{var d=e.memo(()=>!t.matrixParentId);return()=>d()&&(()=>{var p=hc();return p.addEventListener("mouseleave",b=>le(b,!1)),p.addEventListener("mouseenter",b=>le(b,!0)),p.$$click=()=>{lp(t.name)},e.effect(b=>{var D=t.matrix?`Удалить матрицу "${t.name}" вместе с клонами`:`Удалить "${t.name}"`,I=rt();return D!==b.e&&e.setAttribute(p,"title",b.e=D),b.t=e.style(p,I,b.t),b},{e:void 0,t:void 0}),p})()})(),null),e.insert(n,(()=>{var d=e.memo(()=>$i()===t.name);return()=>d()&&(()=>{var p=$c(),b=p.firstChild,D=b.firstChild,I=D.nextSibling;return I.addEventListener("mouseleave",J=>{J.target.style.color="#8e8e93"}),I.addEventListener("mouseenter",J=>{J.target.style.color="#ffffff"}),I.$$click=()=>Zo(null),e.insert(p,(()=>{var J=e.memo(()=>Xo().length===0);return()=>J()?wc():Xo().map(T=>(()=>{var x=_c(),q=x.firstChild,Z=q.nextSibling,We=Z.nextSibling,Ue=We.firstChild;return e.insert(q,()=>new Date(T.startedAt).toLocaleString()),e.insert(Z,()=>T.status==="success"?"✅ Успех":"❌ Ошибка"),e.insert(We,()=>T.durationMs,Ue),e.insert(x,(()=>{var V=e.memo(()=>!!T.model);return()=>V()&&(()=>{var E=kc();return E.firstChild,e.insert(E,()=>T.model,null),e.effect(()=>e.setAttribute(E,"title",`Модель: ${T.model}`)),E})()})(),null),e.insert(x,(()=>{var V=e.memo(()=>!!(T.preFlightStatus&&T.preFlightStatus!=="skipped"));return()=>V()&&(()=>{var E=Sc();return E.firstChild,e.insert(E,()=>T.preFlightStatus==="success"?"✅":"❌",null),e.effect(F=>{var B=`Pre-flight: ${T.preFlightStatus}`,C=T.preFlightStatus==="success"?"#34c759":"#ff3b30";return B!==F.e&&e.setAttribute(E,"title",F.e=B),C!==F.t&&e.setStyleProperty(E,"color",F.t=C),F},{e:void 0,t:void 0}),E})()})(),null),e.insert(x,(()=>{var V=e.memo(()=>!!(T.postFlightStatus&&T.postFlightStatus!=="skipped"));return()=>V()&&(()=>{var E=Cc();return E.firstChild,e.insert(E,()=>T.postFlightStatus==="success"?"✅":"❌",null),e.effect(F=>{var B=`Post-flight: ${T.postFlightStatus}`,C=T.postFlightStatus==="success"?"#34c759":"#ff3b30";return B!==F.e&&e.setAttribute(E,"title",F.e=B),C!==F.t&&e.setStyleProperty(E,"color",F.t=C),F},{e:void 0,t:void 0}),E})()})(),null),e.insert(x,(()=>{var V=e.memo(()=>!!T.error);return()=>V()&&(()=>{var E=zc();return e.insert(E,()=>T.error),E})()})(),null),e.insert(x,(()=>{var V=e.memo(()=>!!T.nextTask);return()=>V()&&(()=>{var E=Tc();return E.firstChild,e.insert(E,()=>T.nextTask,null),E})()})(),null),e.effect(V=>{var E=T.startedAt+T.durationMs,F=T.status==="success"?"#34c759":"#ff3b30";return E!==V.e&&e.setAttribute(x,"key",V.e=E),F!==V.t&&e.setStyleProperty(Z,"color",V.t=F),V},{e:void 0,t:void 0}),x})())})(),null),p})()})(),null),e.insert(n,(()=>{var d=e.memo(()=>!!(Ur()&&Vr()===t.name));return()=>d()&&(()=>{var p=Ec(),b=p.firstChild,D=b.firstChild,I=D.nextSibling;return e.insert(b,()=>t.name,I),I.addEventListener("mouseleave",J=>{J.target.style.color="#8e8e93"}),I.addEventListener("mouseenter",J=>{J.target.style.color="#ffffff"}),I.$$click=()=>ws(),e.insert(p,(()=>{var J=e.memo(()=>!!ho());return()=>J()&&Ac()})(),null),e.insert(p,(()=>{var J=e.memo(()=>!!(!ho()&&ie()&&!ie().success));return()=>J()&&(()=>{var T=Pc();return T.firstChild,e.insert(T,()=>ie().error??"Симуляция не удалась",null),T})()})(),null),e.insert(p,(()=>{var J=e.memo(()=>!!(!ho()&&ie()&&ie().success));return()=>J()&&(()=>{var T=Mc();return e.insert(T,(()=>{var x=e.memo(()=>!!(Array.isArray(ie().warnings)&&ie().warnings.length>0));return()=>x()&&(()=>{var q=Lc();return q.firstChild,e.insert(q,()=>ie().warnings.map(Z=>`· ${Z}`).join(" | "),null),q})()})(),null),e.insert(T,()=>ie().tasks.map(x=>(()=>{var q=Rc(),Z=q.firstChild,We=Z.firstChild,Ue=We.nextSibling;Ue.nextSibling;var V=Z.nextSibling;V.firstChild;var E=V.nextSibling;E.firstChild;var F=E.nextSibling;return F.firstChild,e.insert(Z,()=>(x.order??0)+1,Ue),e.insert(Z,()=>x.trigger,null),e.insert(V,()=>x.name,null),e.insert(q,(()=>{var B=e.memo(()=>!!x.workspace);return()=>B()&&(()=>{var C=qc();return C.firstChild,e.insert(C,()=>x.workspace.name,null),C})()})(),E),e.insert(q,(()=>{var B=e.memo(()=>!!x.matrixParent);return()=>B()&&(()=>{var C=Dc();return C.firstChild,e.insert(C,()=>x.matrixParent,null),C})()})(),E),e.insert(E,()=>x.cwd||"(папка проекта)",null),e.insert(q,(()=>{var B=e.memo(()=>!!x.roleScoped);return()=>B()&&(()=>{var C=Ic();return e.effect(()=>e.setAttribute(C,"title",`allowed=[${(x.roleScoped.allowed??[]).join(", ")}] · denied=[${(x.roleScoped.denied??[]).join(", ")}]`)),C})()})(),F),e.insert(q,(()=>{var B=e.memo(()=>x.estimatedDurationSec!=null);return()=>B()&&(()=>{var C=Oc(),Zt=C.firstChild,vt=Zt.nextSibling;return vt.nextSibling,e.insert(C,()=>x.estimatedDurationSec,vt),C})()})(),F),e.insert(q,(()=>{var B=e.memo(()=>x.estimatedTokens!=null);return()=>B()&&(()=>{var C=jc(),Zt=C.firstChild,vt=Zt.nextSibling;return vt.nextSibling,e.insert(C,()=>x.estimatedTokens,vt),C})()})(),F),e.insert(q,(()=>{var B=e.memo(()=>x.estimatedCostUsd!=null);return()=>B()&&(()=>{var C=Nc();return C.firstChild,e.insert(C,()=>Number(x.estimatedCostUsd).toFixed(4),null),C})()})(),F),e.insert(F,()=>x.command,null),e.insert(q,(()=>{var B=e.memo(()=>!!x.preFlight);return()=>B()&&(()=>{var C=Bc();return C.firstChild,e.insert(C,()=>x.preFlight,null),C})()})(),null),e.insert(q,(()=>{var B=e.memo(()=>!!x.postFlight);return()=>B()&&(()=>{var C=Fc();return C.firstChild,e.insert(C,()=>x.postFlight,null),C})()})(),null),e.insert(q,(()=>{var B=e.memo(()=>!!x.qualityGate);return()=>B()&&(()=>{var C=Gc();return C.firstChild,e.insert(C,()=>x.qualityGate,null),C})()})(),null),e.effect(()=>e.setAttribute(q,"key",`${x.name}-${x.order}`)),q})()),null),e.insert(T,(()=>{var x=e.memo(()=>!!(ie().totals&&(ie().totals.estimatedDurationSec!=null||ie().totals.estimatedTokens!=null)));return()=>x()&&(()=>{var q=Wc();return q.firstChild,e.insert(q,()=>(ie().totals.estimatedDurationSec??"—")+" с · "+(ie().totals.estimatedTokens??"—")+" токенов"+(ie().totals.estimatedCostUsd!=null?` · ~$${Number(ie().totals.estimatedCostUsd).toFixed(4)}`:""),null),q})()})(),null),T})()})(),null),p})()})(),null),e.effect(d=>{var p=`background:#252526;border-radius:10px;padding:16px;margin-bottom:12px;display:flex;flex-direction:column;gap:10px;border:1px solid ${Te()?"rgba(135, 206, 250, 0.4)":"#333"}`,b=`Запустить "${t.name}"`,D=rt(),I=!!t.orphaned,J=t.orphaned?`Задача "${t.name}" отсутствует в планировщике ОС — пауза недоступна`:t.paused?`Возобновить "${t.name}"`:`Поставить на паузу "${t.name}"`,T=rt(),x=`Логи "${t.name}"`,q=rt(),Z=`Dry-Run симуляция "${t.name}"`,We=rt(Ur()&&Vr()===t.name),Ue=`История "${t.name}"`,V=rt($i()===t.name),E=`Редактировать "${t.name}"`,F=rt();return d.e=e.style(n,p,d.e),b!==d.t&&e.setAttribute(_e,"title",d.t=b),d.a=e.style(_e,D,d.a),I!==d.o&&(Se.disabled=d.o=I),J!==d.i&&e.setAttribute(Se,"title",d.i=J),d.n=e.style(Se,T,d.n),x!==d.s&&e.setAttribute(Ge,"title",d.s=x),d.h=e.style(Ge,q,d.h),Z!==d.r&&e.setAttribute(Le,"title",d.r=Z),d.d=e.style(Le,We,d.d),Ue!==d.l&&e.setAttribute(ke,"title",d.l=Ue),d.u=e.style(ke,V,d.u),E!==d.c&&e.setAttribute(nt,"title",d.c=E),d.w=e.style(nt,F,d.w),d},{e:void 0,t:void 0,a:void 0,o:void 0,i:void 0,n:void 0,s:void 0,h:void 0,r:void 0,d:void 0,l:void 0,u:void 0,c:void 0,w:void 0}),n})()};try{return c.add(Oo.Panel,{id:"scheduler-jobs",region:"side",list:()=>[{id:"jobs",title:"Планировщик",pinned:!0}],render:()=>e.createComponent(o.ErrorBoundary,{fallback:r=>(()=>{var t=Is(),n=t.firstChild;return e.insert(t,()=>r.message,null),t})(),get children(){var r=Uc(),t=r.firstChild,n=t.firstChild,a=n.firstChild,H=a.nextSibling,K=H.nextSibling,ee=K.firstChild,Me=ee.nextSibling,we=Me.nextSibling,Yt=we.nextSibling,Zr=Yt.nextSibling,mt=n.nextSibling,it=mt.firstChild,To=it.firstChild,un=To.nextSibling,Fe=it.nextSibling,fn=Fe.firstChild,_e=Fe.nextSibling,Se=_e.nextSibling,Ge=Se.firstChild,Le=t.nextSibling,ke=Le.firstChild,nt=ke.nextSibling,d=nt.nextSibling,p=Le.nextSibling,b=p.firstChild,D=b.nextSibling,I=p.nextSibling,J=I.firstChild,T=J.firstChild,x=T.nextSibling,q=x.firstChild,Z=I.nextSibling,We=Z.firstChild,Ue=We.firstChild,V=Ue.nextSibling,E=V.firstChild,F=E.nextSibling,B=Z.nextSibling,C=B.firstChild,Zt=C.firstChild,vt=Zt.firstChild,Cs=vt.nextSibling,yp=Cs.nextSibling,zs=B.nextSibling,bp=zs.firstChild,xp=bp.nextSibling,Ts=xp.firstChild,mp=Ts.firstChild,Es=mp.firstChild,As=Ts.nextSibling,vp=As.firstChild,Ps=vp.nextSibling,hp=As.nextSibling,$p=hp.firstChild,Ms=$p.nextSibling,Eo=zs.nextSibling,wp=Eo.firstChild,Ao=wp.firstChild,_p=Ao.firstChild,Ls=_p.nextSibling,kp=Ls.nextSibling,Po=Ao.nextSibling,gn=Eo.nextSibling,af=gn.firstChild;return e.insert(a,(()=>{var u=e.memo(()=>!!Te());return()=>u()?`❄️ ${so()} ❄️`:so()})()),e.insert(K,()=>Gn().total,Me),e.insert(K,()=>Gn().success,Yt),e.insert(K,()=>Gn().error,null),it.addEventListener("change",u=>Ho(u.currentTarget.value)),e.insert(it,()=>xe().map(u=>(()=>{var g=Os(),w=g.firstChild;return e.insert(g,()=>u.name,null),e.effect(()=>e.setAttribute(g,"key",u.id)),e.effect(()=>g.value=u.id),g})()),un),Fe.$$click=()=>Ys(u=>!u),e.insert(Fe,Vo,null),e.insert(Fe,()=>Dt()?" 🔒":"",null),_e.addEventListener("mouseleave",u=>{const g=u.currentTarget;g.style.borderColor="#333",g.style.background="#1e1e1e",g.style.color="#e0e0e0"}),_e.addEventListener("mouseenter",u=>{const g=u.currentTarget;g.style.borderColor="#5ac8fa",g.style.background="rgba(90,200,250,0.12)",g.style.color="#5ac8fa"}),_e.$$click=async()=>{const u=window.open("","_blank");let g=3782;try{const v=await $.get_dashboard_port({});v&&typeof v.port=="number"&&v.port>0&&(g=v.port)}catch(v){console.warn("[scheduler] Не удалось получить порт дашборда:",v)}const w="http://localhost:"+g;u?u.location.href=w:window.open(w,"_blank")},Ge.addEventListener("change",u=>{Aa(u.currentTarget.checked)}),e.insert(r,(()=>{var u=e.memo(()=>!!mi());return()=>u()&&(()=>{var g=Hc(),w=g.firstChild,v=w.firstChild,N=v.nextSibling,O=w.nextSibling;return N.$$click=()=>{Na()},e.insert(g,(()=>{var h=e.memo(()=>!!Dt());return()=>h()&&Vc()})(),O),e.insert(O,()=>Js().map(h=>(()=>{var P=Jc(),_=P.firstChild,k=_.nextSibling,Y=k.nextSibling;return e.insert(_,()=>h.name,null),e.insert(_,()=>h.isDefault?" (по умолчанию)":"",null),e.insert(k,(()=>{var G=e.memo(()=>!!h.port);return()=>G()?`порт ${h.port}`:"порт по умолчанию"})()),e.insert(Y,()=>h.dir),e.insert(P,(()=>{var G=e.memo(()=>!!h.active);return()=>G()?Qc():(()=>{var M=Kc();return M.$$click=()=>{ja(h.name)},e.effect(j=>{var z=It()||Dt(),X=`padding:2px 8px;border-radius:6px;border:1px solid #333;background:#262626;color:#e0e0e0;font-size:11px;cursor:${It()||Dt()?"not-allowed":"pointer"};opacity:${Dt()?.5:1}`;return z!==j.e&&(M.disabled=j.e=z),j.t=e.style(M,X,j.t),j},{e:void 0,t:void 0}),M})()})(),null),e.insert(P,(()=>{var G=e.memo(()=>!h.isDefault&&!h.active);return()=>G()&&(()=>{var M=Yc();return M.$$click=()=>{Ba(h.name)},e.effect(j=>{var z=It(),X=`padding:2px 8px;border-radius:6px;border:1px solid rgba(255,59,48,0.4);background:rgba(255,59,48,0.12);color:#ff3b30;font-size:11px;cursor:${It()?"not-allowed":"pointer"}`;return z!==j.e&&(M.disabled=j.e=z),j.t=e.style(M,X,j.t),j},{e:void 0,t:void 0}),M})()})(),null),e.effect(G=>{var M=`font-weight:${h.active?700:400};color:${h.active?"#bf5af2":"#e0e0e0"}`,j=h.dir;return G.e=e.style(_,M,G.e),j!==G.t&&e.setAttribute(Y,"title",G.t=j),G},{e:void 0,t:void 0}),P})())),e.effect(h=>{var P=It(),_=`padding:4px 10px;border-radius:6px;border:1px solid #333;background:#262626;color:#e0e0e0;font-size:11px;cursor:${It()?"not-allowed":"pointer"}`;return P!==h.e&&(N.disabled=h.e=P),h.t=e.style(N,_,h.t),h},{e:void 0,t:void 0}),g})()})(),Le),ke.$$click=Ia,e.insert(ke,()=>an()?"Экспорт...":"Экспорт"),nt.addEventListener("change",Oa),d.$$click=()=>document.querySelector('input[type="file"]')?.click(),e.insert(d,()=>pn()?"Импорт...":"Импорт"),D.addEventListener("change",u=>Ea(Number(u.currentTarget.value)||1)),J.$$click=()=>sa(!Vn()),e.insert(x,(()=>{var u=e.memo(()=>!!m());return()=>u()?Hn()?"только ошибки":"все запуски":"выключены"})(),q),e.insert(q,()=>Vn()?"▾":"▴"),e.insert(I,(()=>{var u=e.memo(()=>!Vn());return()=>u()&&(()=>{var g=Zc(),w=g.firstChild,v=w.firstChild,N=w.nextSibling,O=N.firstChild,h=N.nextSibling,P=h.firstChild,_=P.firstChild,k=P.nextSibling,Y=k.nextSibling,G=Y.nextSibling,M=G.firstChild,j=M.nextSibling,z=j.nextSibling,X=z.nextSibling,Re=X.nextSibling,ue=Re.nextSibling,fe=h.nextSibling,Ce=fe.firstChild,Q=Ce.firstChild,ge=Ce.nextSibling,ye=ge.nextSibling,ht=ye.nextSibling,$t=ht.firstChild,be=$t.nextSibling,yn=be.nextSibling,Xr=yn.firstChild,bn=yn.nextSibling,Xt=bn.firstChild,ei=fe.nextSibling,er=ei.firstChild,ti=er.firstChild,ri=er.nextSibling,He=ri.firstChild,xn=ei.nextSibling,ot=xn.firstChild,lt=ot.firstChild,mn=ot.nextSibling,vn=mn.firstChild,wt=vn.nextSibling,Mo=wt.nextSibling,tr=Mo.nextSibling,rr=xn.nextSibling,Lo=rr.firstChild,Ve=Lo.nextSibling,st=Ve.nextSibling,hn=rr.nextSibling,$n=hn.firstChild,qe=$n.nextSibling,_t=qe.nextSibling,kt=hn.nextSibling,ii=kt.firstChild,Ro=ii.firstChild,wn=Ro.nextSibling,_n=ii.nextSibling,kn=_n.firstChild,at=kn.firstChild,ir=at.nextSibling,nr=ir.nextSibling,ni=kn.nextSibling,oi=kt.nextSibling,qo=oi.firstChild,or=qo.nextSibling,lr=or.firstChild,Sn=or.nextSibling,li=Sn.firstChild,sr=li.firstChild,Cn=li.nextSibling,ar=Cn.firstChild,zn=Cn.nextSibling,pr=zn.nextSibling,si=oi.nextSibling,Tn=si.firstChild,ai=Tn.nextSibling,pi=ai.firstChild,di=ai.nextSibling,pt=di.firstChild,dr=pt.nextSibling,En=dr.nextSibling,Do=si.nextSibling,St=Do.firstChild,Ct=St.nextSibling;return v.addEventListener("change",i=>{tl(i.currentTarget.checked),R()}),O.addEventListener("change",i=>{rl(i.currentTarget.checked),R()}),_.addEventListener("change",i=>{il(i.currentTarget.checked),R()}),k.addEventListener("change",()=>{R()}),k.$$input=i=>ol(i.currentTarget.value),j.addEventListener("change",()=>{R()}),j.$$input=i=>al(Number(i.currentTarget.value)||1e4),X.addEventListener("change",()=>{R()}),X.$$input=i=>dl(Number(i.currentTarget.value)||0),ue.addEventListener("change",()=>{R()}),ue.$$input=i=>ul(Number(i.currentTarget.value)||1e3),Q.addEventListener("change",i=>{Ll(i.currentTarget.checked),R()}),ge.addEventListener("change",()=>{R()}),ge.$$input=i=>ql(i.currentTarget.value),ye.addEventListener("change",()=>{R()}),ye.$$input=i=>Il(i.currentTarget.value),be.addEventListener("change",i=>{jl(i.currentTarget.value),R()}),Xr.addEventListener("change",i=>{Bl(i.currentTarget.checked),R()}),Xt.addEventListener("change",i=>{Gl(i.currentTarget.checked),R()}),ti.addEventListener("change",i=>{Wl(i.currentTarget.checked),R()}),He.addEventListener("change",i=>{Hl(i.currentTarget.checked),R()}),lt.addEventListener("change",i=>{Vl(i.currentTarget.checked),R()}),wt.addEventListener("change",()=>{R()}),wt.$$input=i=>Ql(i.currentTarget.value),tr.addEventListener("change",()=>{R()}),tr.$$input=i=>Yl(i.currentTarget.value),Ve.addEventListener("change",()=>{R()}),Ve.$$input=i=>ml(i.currentTarget.value),st.addEventListener("change",()=>{R()}),st.$$input=i=>hl(i.currentTarget.value),qe.addEventListener("change",()=>{R()}),qe.$$input=i=>gl(i.currentTarget.value),_t.addEventListener("change",()=>{R()}),_t.$$input=i=>bl(i.currentTarget.value),e.insert(wn,()=>Qn().length),at.$$input=i=>Xl(i.currentTarget.value),ir.$$input=i=>es(i.currentTarget.value),nr.$$click=()=>{Sa()},e.insert(nr,()=>Kn()?"Сохранение...":"💾 Сохранить"),e.insert(ni,()=>Qn().map(i=>(()=>{var dt=Xc(),zt=dt.firstChild,Je=zt.nextSibling,cr=Je.firstChild,ur=Je.nextSibling;return e.insert(zt,()=>i.name),e.insert(Je,()=>i.preview,null),ur.$$click=()=>{Ca(i.name)},e.effect(()=>e.setAttribute(dt,"key",i.name)),dt})()),null),e.insert(ni,(()=>{var i=e.memo(()=>Qn().length===0);return()=>i()&&eu()})(),null),lr.addEventListener("change",i=>{$l(i.currentTarget.checked),R()}),sr.addEventListener("change",i=>{_l(i.currentTarget.checked),R()}),ar.addEventListener("change",i=>{Sl(i.currentTarget.checked),R()}),pr.addEventListener("change",()=>{R()}),pr.$$input=i=>zl(Number(i.currentTarget.value)||0),pi.addEventListener("change",i=>{Tl(i.currentTarget.checked),R()}),pt.addEventListener("change",i=>{Al(i.currentTarget.value==="weekly"?"weekly":"daily"),R()}),dr.addEventListener("change",()=>{R()}),dr.$$input=i=>Ml(i.currentTarget.value),e.insert(En,(()=>{var i=e.memo(()=>!!Jn());return()=>i()?`последняя отправка: ${new Date(Jn()).toLocaleString()}`:"ещё не отправлялся"})()),St.$$click=()=>{za()},e.insert(St,()=>ki()?"Отправка...":"🧪 Тестовое уведомление"),Ct.$$click=()=>{Ta()},e.insert(Ct,()=>Si()?"Отправка...":"📊 Отправить дайджест сейчас"),e.effect(i=>{var dt=`display:flex;align-items:center;gap:8px;font-size:12px;cursor:pointer;opacity:${m()?1:.5}`,zt=!m(),Je=`display:flex;align-items:center;gap:8px;font-size:12px;cursor:pointer;opacity:${m()?1:.5}`,cr=!m(),ur=!m()||!me(),An=`display:block;width:100%;box-sizing:border-box;padding:8px;background:#1e1e1e;border:1px solid #333;border-radius:6px;color:#fff;font-size:13px;outline:none;opacity:${m()&&me()?1:.5}`,ci=!m()||!me(),ct=!m()||!me(),s=!m()||!me(),l=`display:flex;align-items:center;gap:8px;font-size:12px;cursor:pointer;opacity:${m()?1:.5}`,y=!m(),f=!m()||!oe(),S=`display:block;width:100%;box-sizing:border-box;padding:8px;background:#1e1e1e;border:1px solid #333;border-radius:6px;color:#fff;font-size:13px;outline:none;opacity:${m()&&oe()?1:.5}`,A=!m()||!oe(),L=`display:block;width:100%;box-sizing:border-box;padding:8px;background:#1e1e1e;border:1px solid #333;border-radius:6px;color:#fff;font-size:13px;outline:none;opacity:${m()&&oe()?1:.5}`,pe=`display:flex;align-items:center;gap:10px;flex-wrap:wrap;font-size:12px;color:#b0b0b0;opacity:${m()&&oe()?1:.5}`,ze=!m()||!oe(),ut=!m()||!oe(),De=!m()||!oe(),Tt=`display:flex;align-items:center;gap:8px;font-size:12px;cursor:pointer;opacity:${m()?1:.5}`,se=!m(),W=`display:flex;align-items:center;gap:8px;font-size:12px;cursor:pointer;opacity:${m()&&Ee()?1:.5}`,ve=!m()||!Ee(),Qe=`display:flex;align-items:center;gap:8px;font-size:12px;cursor:pointer;opacity:${m()?1:.5}`,Et=!m(),At=`display:flex;align-items:center;gap:8px;flex-wrap:wrap;font-size:12px;color:#b0b0b0;opacity:${m()&&_r()?1:.5}`,ui=!m()||!_r(),fr=!m()||!_r(),fi=!m(),ne=`display:block;width:100%;box-sizing:border-box;padding:8px;background:#1e1e1e;border:1px solid #333;border-radius:6px;color:#fff;font-size:13px;outline:none;opacity:${m()?1:.5}`,de=!m(),he=`display:block;width:100%;box-sizing:border-box;padding:8px;background:#1e1e1e;border:1px solid #333;border-radius:6px;color:#fff;font-size:13px;outline:none;opacity:${m()?1:.5}`,Ke=!m(),ft=`display:block;width:100%;box-sizing:border-box;padding:8px;background:#1e1e1e;border:1px solid #333;border-radius:6px;color:#fff;font-size:12px;outline:none;opacity:${m()?1:.5}`,ce=!m(),Pt=`display:block;width:100%;box-sizing:border-box;padding:8px;background:#1e1e1e;border:1px solid #333;border-radius:6px;color:#fff;font-size:12px;outline:none;opacity:${m()?1:.5}`,Ie=Kn()||!Ci().trim()||!zi(),gr=Kn()||!Ci().trim()||!zi()?"padding:6px 12px;background:#666;color:white;border:none;border-radius:6px;cursor:not-allowed;font-size:12px;font-weight:500;opacity:0.6":"padding:6px 12px;background:#007acc;color:white;border:none;border-radius:6px;cursor:pointer;font-size:12px;font-weight:500;opacity:1",yr=`display:flex;align-items:center;gap:8px;font-size:12px;cursor:pointer;opacity:${m()?1:.5}`,Mt=!m(),Io=`display:flex;align-items:center;gap:10px;flex-wrap:wrap;font-size:12px;color:#b0b0b0;opacity:${m()&&Nt()?1:.5}`,gi=!m()||!Nt(),Pn=!m()||!Nt(),br=!m()||!Nt(),Mn=`display:flex;align-items:center;gap:8px;font-size:12px;cursor:pointer;opacity:${m()?1:.5}`,xr=!m(),Ln=`display:flex;align-items:center;gap:8px;flex-wrap:wrap;font-size:12px;color:#b0b0b0;opacity:${m()&&wr()?1:.5}`,Rn=!m()||!wr(),mr=!m()||!wr(),yi=ki()||!(me()||oe()||Ee()),$e=`padding:6px 12px;background:#007acc;color:white;border:none;border-radius:6px;cursor:${ki()||!(me()||oe()||Ee())?"not-allowed":"pointer"};font-size:12px;font-weight:500;opacity:${ki()||!(me()||oe()||Ee())?.6:1}`,Rs=Si()||!(me()||oe()||Ee()),Sp=`padding:6px 12px;background:#2d7d46;color:white;border:none;border-radius:6px;cursor:${Si()||!(me()||oe()||Ee())?"not-allowed":"pointer"};font-size:12px;font-weight:500;opacity:${Si()||!(me()||oe()||Ee())?.6:1}`;return i.e=e.style(N,dt,i.e),zt!==i.t&&(O.disabled=i.t=zt),i.a=e.style(P,Je,i.a),cr!==i.o&&(_.disabled=i.o=cr),ur!==i.i&&(k.disabled=i.i=ur),i.n=e.style(k,An,i.n),ci!==i.s&&(j.disabled=i.s=ci),ct!==i.h&&(X.disabled=i.h=ct),s!==i.r&&(ue.disabled=i.r=s),i.d=e.style(Ce,l,i.d),y!==i.l&&(Q.disabled=i.l=y),f!==i.u&&(ge.disabled=i.u=f),i.c=e.style(ge,S,i.c),A!==i.w&&(ye.disabled=i.w=A),i.m=e.style(ye,L,i.m),i.f=e.style(ht,pe,i.f),ze!==i.y&&(be.disabled=i.y=ze),ut!==i.g&&(Xr.disabled=i.g=ut),De!==i.p&&(Xt.disabled=i.p=De),i.b=e.style(er,Tt,i.b),se!==i.T&&(ti.disabled=i.T=se),i.A=e.style(ri,W,i.A),ve!==i.O&&(He.disabled=i.O=ve),i.I=e.style(ot,Qe,i.I),Et!==i.S&&(lt.disabled=i.S=Et),i.W=e.style(mn,At,i.W),ui!==i.C&&(wt.disabled=i.C=ui),fr!==i.B&&(tr.disabled=i.B=fr),fi!==i.v&&(Ve.disabled=i.v=fi),i.k=e.style(Ve,ne,i.k),de!==i.x&&(st.disabled=i.x=de),i.j=e.style(st,he,i.j),Ke!==i.q&&(qe.disabled=i.q=Ke),i.z=e.style(qe,ft,i.z),ce!==i.P&&(_t.disabled=i.P=ce),i.H=e.style(_t,Pt,i.H),Ie!==i.F&&(nr.disabled=i.F=Ie),i.M=e.style(nr,gr,i.M),i.D=e.style(or,yr,i.D),Mt!==i.R&&(lr.disabled=i.R=Mt),i.E=e.style(Sn,Io,i.E),gi!==i.L&&(sr.disabled=i.L=gi),Pn!==i.N&&(ar.disabled=i.N=Pn),br!==i.G&&(pr.disabled=i.G=br),i.U=e.style(ai,Mn,i.U),xr!==i.K&&(pi.disabled=i.K=xr),i.V=e.style(di,Ln,i.V),Rn!==i.Y&&(pt.disabled=i.Y=Rn),mr!==i.J&&(dr.disabled=i.J=mr),yi!==i.Q&&(St.disabled=i.Q=yi),i.Z=e.style(St,$e,i.Z),Rs!==i.X&&(Ct.disabled=i.X=Rs),i._=e.style(Ct,Sp,i._),i},{e:void 0,t:void 0,a:void 0,o:void 0,i:void 0,n:void 0,s:void 0,h:void 0,r:void 0,d:void 0,l:void 0,u:void 0,c:void 0,w:void 0,m:void 0,f:void 0,y:void 0,g:void 0,p:void 0,b:void 0,T:void 0,A:void 0,O:void 0,I:void 0,S:void 0,W:void 0,C:void 0,B:void 0,v:void 0,k:void 0,x:void 0,j:void 0,q:void 0,z:void 0,P:void 0,H:void 0,F:void 0,M:void 0,D:void 0,R:void 0,E:void 0,L:void 0,N:void 0,G:void 0,U:void 0,K:void 0,V:void 0,Y:void 0,J:void 0,Q:void 0,Z:void 0,X:void 0,_:void 0}),e.effect(()=>v.checked=m()),e.effect(()=>O.checked=Hn()),e.effect(()=>_.checked=me()),e.effect(()=>k.value=nl()||""),e.effect(()=>j.value=sl()),e.effect(()=>X.value=pl()),e.effect(()=>ue.value=cl()),e.effect(()=>Q.checked=oe()),e.effect(()=>ge.value=Rl()||""),e.effect(()=>ye.value=Dl()||""),e.effect(()=>be.value=Ol()),e.effect(()=>Xr.checked=Nl()),e.effect(()=>Xt.checked=Fl()),e.effect(()=>ti.checked=Ee()),e.effect(()=>He.checked=Ul()),e.effect(()=>lt.checked=_r()),e.effect(()=>wt.value=Jl()),e.effect(()=>tr.value=Kl()),e.effect(()=>Ve.value=xl()||""),e.effect(()=>st.value=vl()||""),e.effect(()=>qe.value=fl()||""),e.effect(()=>_t.value=yl()||""),e.effect(()=>at.value=Ci()),e.effect(()=>ir.value=zi()),e.effect(()=>lr.checked=Nt()),e.effect(()=>sr.checked=wl()),e.effect(()=>ar.checked=kl()),e.effect(()=>pr.value=Cl()),e.effect(()=>pi.checked=wr()),e.effect(()=>pt.value=El()),e.effect(()=>dr.value=Pl()),g})()})(),null),We.$$click=()=>va(!lo()),e.insert(V,(()=>{var u=e.memo(()=>Pi()>0);return()=>u()?`старше ${Pi()} дн.`:"без срока"})(),E),e.insert(V,(()=>{var u=e.memo(()=>Li()>0);return()=>u()?`до ${Li()} записей`:"без лимита"})(),F),e.insert(F,()=>lo()?"▾":"▴"),e.insert(Z,(()=>{var u=e.memo(()=>!lo());return()=>u()&&(()=>{var g=tu(),w=g.firstChild,v=w.firstChild,N=v.nextSibling,O=w.nextSibling,h=O.firstChild,P=h.nextSibling,_=O.nextSibling,k=_.firstChild,Y=_.nextSibling,G=Y.firstChild;return N.addEventListener("change",M=>{Mi(Math.max(0,Math.floor(Number(M.currentTarget.value)||0))),ps()}),P.addEventListener("change",M=>{Ri(Math.max(0,Math.floor(Number(M.currentTarget.value)||0))),ps()}),e.insert(_,(()=>{var M=e.memo(()=>!!io());return()=>M()?`${new Date(io()).toLocaleString()} · удалено ${os()}`:"ещё не выполнялась"})(),null),G.$$click=()=>{ka()},e.insert(G,()=>qi()?"Очистка...":"🧹 Очистить сейчас"),e.effect(M=>{var j=qi(),z=`padding:6px 12px;background:#007acc;color:white;border:none;border-radius:6px;cursor:${qi()?"not-allowed":"pointer"};font-size:12px;font-weight:500;opacity:${qi()?.6:1}`;return j!==M.e&&(G.disabled=M.e=j),M.t=e.style(G,z,M.t),M},{e:void 0,t:void 0}),e.effect(()=>N.value=Pi()),e.effect(()=>P.value=Li()),g})()})(),null),Zt.$$click=()=>ya(!Xn()),e.insert(Cs,()=>Yn().length),e.insert(yp,()=>Xn()?"▾":"▴"),e.insert(B,(()=>{var u=e.memo(()=>!Xn());return()=>u()&&(()=>{var g=ru(),w=g.firstChild,v=w.firstChild,N=v.nextSibling,O=N.nextSibling,h=O.nextSibling,P=h.nextSibling,_=P.nextSibling,k=_.nextSibling,Y=w.nextSibling,G=Y.firstChild,M=G.firstChild,j=M.nextSibling;return N.addEventListener("change",()=>{kr()}),N.$$input=z=>ba(z.currentTarget.value),h.addEventListener("change",()=>{kr()}),h.$$input=z=>xa(z.currentTarget.value),_.addEventListener("change",()=>{kr()}),_.$$input=z=>ma(z.currentTarget.value),k.$$click=()=>{kr()},e.insert(k,()=>Zn()?"Загрузка...":"Обновить"),e.insert(j,()=>Yn().map(z=>(()=>{var X=iu(),Re=X.firstChild,ue=Re.nextSibling,fe=ue.nextSibling,Ce=fe.firstChild,Q=fe.nextSibling,ge=Q.nextSibling,ye=ge.nextSibling;return e.insert(Re,()=>new Date(z.ts).toLocaleString()),e.insert(ue,()=>z.action),e.insert(fe,()=>z.targetType??"",Ce),e.insert(fe,()=>z.target??"—",null),e.insert(Q,()=>z.source??"—"),e.insert(ge,()=>z.actor),e.insert(ye,()=>z.remote??"—"),e.effect(()=>e.setAttribute(X,"key",z.id)),X})()),null),e.insert(j,(()=>{var z=e.memo(()=>Yn().length===0);return()=>z()&&nu()})(),null),e.effect(z=>{var X=Zn(),Re=Zn()?"padding:6px 12px;background:#666;color:white;border:none;border-radius:6px;cursor:not-allowed;font-size:12px;font-weight:500;opacity:0.6":"padding:6px 12px;background:#007acc;color:white;border:none;border-radius:6px;cursor:pointer;font-size:12px;font-weight:500;opacity:1";return X!==z.e&&(k.disabled=z.e=X),z.t=e.style(k,Re,z.t),z},{e:void 0,t:void 0}),e.effect(()=>N.value=rs()),e.effect(()=>h.value=is()),e.effect(()=>_.value=ns()),g})()})(),null),Es.addEventListener("change",u=>{Ti(u.currentTarget.checked),po()}),Ps.addEventListener("change",u=>{Ei(Math.max(0,Math.floor(Number(u.currentTarget.value)||0))),po()}),Ms.addEventListener("change",u=>{Ai(Math.max(0,Math.floor(Number(u.currentTarget.value)||0))),po()}),Ao.$$click=()=>Vs(!On()),e.insert(Ls,()=>xe().length),e.insert(kp,()=>On()?"▾":"▴"),Po.$$click=()=>{Ua()},e.insert(Eo,(()=>{var u=e.memo(()=>!On());return()=>u()&&(()=>{var g=ou();return e.insert(g,(()=>{var w=e.memo(()=>xe().length===0);return()=>w()?lu():xe().map(v=>(()=>{var N=su(),O=N.firstChild,h=O.nextSibling,P=h.firstChild,_=P.firstChild,k=P.nextSibling,Y=k.nextSibling,G=Y.firstChild,M=G.nextSibling,j=M.nextSibling,z=Y.nextSibling,X=z.firstChild,Re=h.nextSibling,ue=Re.firstChild,fe=ue.nextSibling,Ce=fe.nextSibling;return e.insert(P,()=>v.name,null),e.insert(k,()=>v.path),e.insert(Y,()=>v.gitBranch||"—",M),e.insert(Y,()=>v.gitRemote||"remote не задан",null),e.insert(z,(()=>{var Q=e.memo(()=>!!v.env);return()=>Q()?`${Object.keys(v.env).length} перем.`:"—"})(),null),e.insert(z,()=>v.envFile?" · .env-файл":"",null),ue.$$click=()=>{Wa(v)},fe.$$click=()=>{Ha(v)},Ce.$$click=()=>{Va(v)},e.effect(Q=>{var ge=`width:9px;height:9px;border-radius:50%;background:${v.color||"#5ac8fa"};flex-shrink:0`,ye=v.path,ht=Rt(),$t=Rt(),be=Rt();return Q.e=e.style(O,ge,Q.e),ye!==Q.t&&e.setAttribute(k,"title",Q.t=ye),ht!==Q.a&&(ue.disabled=Q.a=ht),$t!==Q.o&&(fe.disabled=Q.o=$t),be!==Q.i&&(Ce.disabled=Q.i=be),Q},{e:void 0,t:void 0,a:void 0,o:void 0,i:void 0}),N})())})()),g})()})(),null),e.insert(r,(()=>{var u=e.memo(()=>!!Pa());return()=>u()?(()=>{var g=au();return g.addEventListener("mouseleave",w=>{const v=w.currentTarget;v.style.borderColor="#3a3a3a",v.style.background="#1e1e1e"}),g.addEventListener("mouseenter",w=>{const v=w.currentTarget;v.style.borderColor="#5ac8fa",v.style.background="#232326"}),g.$$click=()=>uo(!1),g})():(()=>{var g=pu(),w=g.firstChild,v=w.firstChild,N=v.nextSibling,O=N.firstChild,h=O.nextSibling,P=w.nextSibling,_=P.firstChild,k=_.firstChild,Y=_.nextSibling,G=P.nextSibling,M=G.firstChild,j=M.nextSibling,z=G.nextSibling,X=z.firstChild,Re=X.nextSibling,ue=Re.firstChild,fe=ue.firstChild,Ce=ue.nextSibling,Q=Ce.firstChild,ge=Ce.nextSibling,ye=ge.firstChild,ht=ge.nextSibling,$t=ht.firstChild,be=z.nextSibling,yn=be.firstChild,Xr=yn.nextSibling,bn=Xr.firstChild,Xt=bn.firstChild,ei=bn.nextSibling,er=ei.firstChild,ti=ei.nextSibling,ri=ti.firstChild,He=be.nextSibling,xn=He.firstChild,ot=xn.nextSibling,lt=ot.nextSibling,mn=lt.firstChild,vn=mn.nextSibling,wt=lt.nextSibling,Mo=wt.firstChild,tr=Mo.nextSibling,rr=tr.firstChild,Lo=rr.nextSibling,Ve=Lo.nextSibling,st=He.nextSibling,hn=st.firstChild,$n=hn.nextSibling,qe=st.nextSibling,_t=qe.firstChild,kt=_t.nextSibling,ii=qe.nextSibling,Ro=ii.firstChild,wn=Ro.nextSibling,_n=ii.nextSibling,kn=_n.firstChild,at=kn.nextSibling,ir=_n.nextSibling,nr=ir.firstChild,ni=nr.nextSibling,oi=ir.nextSibling,qo=oi.firstChild,or=qo.nextSibling,lr=oi.nextSibling,Sn=lr.firstChild,li=Sn.nextSibling,sr=lr.nextSibling,Cn=sr.firstChild,ar=Cn.nextSibling,zn=sr.nextSibling,pr=zn.firstChild,si=pr.nextSibling,Tn=zn.nextSibling,ai=Tn.firstChild,pi=ai.nextSibling,di=Tn.nextSibling,pt=di.firstChild,dr=pt.firstChild,En=pt.nextSibling,Do=En.firstChild,St=Do.nextSibling,Ct=St.nextSibling,i=Ct.nextSibling,dt=i.nextSibling,zt=dt.nextSibling,Je=zt.firstChild,cr=Je.nextSibling,ur=cr.nextSibling,An=di.nextSibling,ci=An.firstChild,ct=ci.nextSibling;return e.insert(v,So?"Редактирование задачи":"Новая задача"),O.addEventListener("mouseleave",s=>{const l=s.currentTarget;l.style.color="#a0a0a6",l.style.borderColor="#333"}),O.addEventListener("mouseenter",s=>{const l=s.currentTarget;l.style.color="#5ac8fa",l.style.borderColor="#5ac8fa"}),O.$$click=Qa,h.addEventListener("mouseleave",s=>{const l=s.currentTarget;l.style.color="#a0a0a6",l.style.borderColor="#333"}),h.addEventListener("mouseenter",s=>{const l=s.currentTarget;l.style.color="#5ac8fa",l.style.borderColor="#5ac8fa"}),h.$$click=()=>uo(!0),k.addEventListener("change",s=>{const l=s.currentTarget.checked;Zi(l),l&&(Xe(""),Be().length===0&&Wr(xe().map(y=>y.id)))}),e.insert(P,(()=>{var s=e.memo(()=>!!Ne());return()=>s()&&(()=>{var l=du(),y=l.firstChild,f=y.firstChild,S=f.firstChild,A=y.nextSibling,L=A.firstChild,pe=L.firstChild,ze=pe.nextSibling,ut=L.nextSibling,De=ut.firstChild,Tt=De.nextSibling,se=ut.nextSibling,W=se.firstChild,ve=W.nextSibling,Qe=A.nextSibling,Et=Qe.firstChild,At=Qe.nextSibling,ui=At.firstChild,fr=ui.nextSibling,fi=At.nextSibling;return e.insert(f,()=>Be().length,null),e.insert(y,(()=>{var ne=e.memo(()=>xe().length===0);return()=>ne()?cu():(()=>{var de=uu();return e.insert(de,()=>xe().map(he=>(()=>{var Ke=fu(),ft=Ke.firstChild,ce=ft.nextSibling,Pt=ce.firstChild,Ie=ce.nextSibling;return ft.addEventListener("change",gr=>Ma(he.id,gr.currentTarget.checked)),e.insert(ce,()=>he.name,null),e.insert(Ie,()=>he.path),e.effect(gr=>e.style(ce,`color:${he.color||"#5ac8fa"}`,gr)),e.effect(()=>ft.checked=Be().includes(he.id)),Ke})())),de})()})(),null),ze.addEventListener("change",ne=>Xi(ne.currentTarget.value==="sequential"?"sequential":"parallel")),Tt.addEventListener("change",ne=>en(ne.currentTarget.value==="stop"?"stop":"continue")),ve.addEventListener("change",ne=>tn(ne.currentTarget.value==="per-task"?"per-task":"summary")),Et.addEventListener("change",ne=>rn(ne.currentTarget.checked)),fr.$$input=ne=>on(ne.currentTarget.value),e.insert(l,(()=>{var ne=e.memo(()=>Be().length>0);return()=>ne()&&(()=>{var de=gu(),he=de.firstChild,Ke=he.firstChild,ft=he.nextSibling;return e.insert(he,La,null),e.insert(ft,()=>Be().map(ce=>{const Pt=xe().find(yr=>yr.id===ce);if(!Pt)return null;const Ie=mo()[ce]??{},gr="padding:6px;background:#1e1e1e;border:1px solid #333;border-radius:6px;color:#fff;font-size:12px;outline:none;box-sizing:border-box";return(()=>{var yr=yu(),Mt=yr.firstChild,Io=Mt.firstChild,gi=Io.nextSibling,Pn=Mt.nextSibling,br=Pn.firstChild,Mn=br.nextSibling,xr=Mn.firstChild,Ln=xr.nextSibling,Rn=Mn.nextSibling,mr=Rn.firstChild,yi=mr.nextSibling;return e.insert(Mt,()=>Pt.name,gi),e.insert(gi,()=>wo(Ae(),Pt.name)),br.$$input=$e=>Jr(ce,"prompt",$e.currentTarget.value),xr.$$input=$e=>Jr(ce,"model",$e.currentTarget.value),Ln.$$input=$e=>Jr(ce,"qualityGate",$e.currentTarget.value),mr.$$input=$e=>Jr(ce,"beforeScript",$e.currentTarget.value),yi.$$input=$e=>Jr(ce,"afterScript",$e.currentTarget.value),e.effect($e=>e.style(Mt,`font-size:12px;font-weight:600;margin-bottom:6px;color:${Pt.color||"#5ac8fa"}`,$e)),e.effect(()=>br.value=Ie.prompt??""),e.effect(()=>xr.value=Ie.model??""),e.effect(()=>Ln.value=Ie.qualityGate??""),e.effect(()=>mr.value=Ie.beforeScript??""),e.effect(()=>yi.value=Ie.afterScript??""),yr})()})),de})()})(),fi),e.insert(fi,(()=>{var ne=e.memo(()=>_o().length>0);return()=>ne()?[(()=>{var de=bu(),he=de.firstChild,Ke=he.nextSibling,ft=Ke.nextSibling;return e.insert(de,()=>_o().length,Ke),de})(),(()=>{var de=xu();return e.insert(de,()=>_o().join(", ")),de})()]:mu()})()),e.effect(()=>e.setAttribute(fr,"placeholder",xo()==="sequential"?"1 (sequential)":"без лимита")),e.effect(()=>ze.value=xo()),e.effect(()=>Tt.value=fs()),e.effect(()=>ve.value=gs()),e.effect(()=>Et.checked=ys()),e.effect(()=>fr.value=nn()),l})()})(),null),e.insert(g,(()=>{var s=e.memo(()=>!Ne());return()=>s()&&(()=>{var l=vu(),y=l.firstChild,f=y.nextSibling,S=f.firstChild;return f.addEventListener("change",A=>{Xe(A.currentTarget.value),A.currentTarget.value&&Jt("")}),e.insert(f,()=>xe().map(A=>(()=>{var L=Os(),pe=L.firstChild;return e.insert(L,()=>A.name,null),e.effect(()=>e.setAttribute(L,"key",A.id)),e.effect(()=>L.value=A.id),L})()),null),e.insert(l,(()=>{var A=e.memo(()=>!!Kr());return()=>A()&&(()=>{var L=hu(),pe=L.firstChild,ze=pe.firstChild,ut=ze.nextSibling,De=pe.nextSibling,Tt=De.firstChild,se=Tt.nextSibling,W=De.nextSibling,ve=W.firstChild,Qe=ve.nextSibling;return e.insert(ut,()=>Kr().path),e.insert(se,()=>Kr().gitBranch||"—"),e.insert(Qe,()=>Kr().gitRemote||"—"),L})()})(),null),e.effect(()=>f.value=qt()),l})()})(),G),j.$$input=s=>Ii(s.currentTarget.value),e.insert(g,(()=>{var s=e.memo(()=>!qt()&&!Ne());return()=>s()&&(()=>{var l=$u(),y=l.firstChild,f=y.nextSibling;return f.$$input=S=>Jt(S.currentTarget.value),e.effect(()=>f.value=Yi()||""),l})()})(),z),fe.addEventListener("change",()=>tt("cron")),Q.addEventListener("change",()=>tt("file")),ye.addEventListener("change",()=>tt("mcp-event")),$t.addEventListener("change",()=>tt("once")),e.insert(g,(()=>{var s=e.memo(()=>ae()==="file");return()=>s()&&(()=>{var l=wu(),y=l.firstChild,f=y.nextSibling;return f.$$input=S=>qr(S.currentTarget.value),e.effect(()=>f.value=fo()||""),l})()})(),be),e.insert(g,(()=>{var s=e.memo(()=>ae()==="mcp-event");return()=>s()&&[(()=>{var l=_u(),y=l.firstChild,f=y.nextSibling;return f.$$input=S=>Nr(S.currentTarget.value),e.effect(()=>f.value=yo()||""),l})(),(()=>{var l=ku(),y=l.firstChild,f=y.nextSibling;return f.$$input=S=>Br(S.currentTarget.value),e.effect(()=>f.value=bo()||""),l})(),(()=>{var l=Su(),y=l.firstChild,f=y.nextSibling;return f.$$input=S=>Gr(S.currentTarget.value),e.effect(()=>f.value=Fr()||""),l})()]})(),be),e.insert(g,(()=>{var s=e.memo(()=>ae()==="once");return()=>s()&&(()=>{var l=Cu(),y=l.firstChild,f=y.nextSibling,S=f.nextSibling,A=S.nextSibling;return f.$$input=L=>Wi(L.currentTarget.value),A.$$input=L=>Hi(L.currentTarget.value),e.effect(()=>f.value=go()||""),e.effect(()=>A.value=Ui()||""),l})()})(),be),Xt.addEventListener("change",()=>Vt("new")),er.addEventListener("change",()=>Vt("reuse")),ri.addEventListener("change",()=>Vt("last")),e.insert(be,(()=>{var s=e.memo(()=>je()==="reuse");return()=>s()&&(()=>{var l=zu(),y=l.firstChild,f=y.nextSibling;return f.$$input=S=>Vi(S.currentTarget.value),e.effect(()=>f.value=Dr()||""),l})()})(),null),ot.addEventListener("change",s=>{const l=s.currentTarget.value;Sr(l),l!=="__custom__"&&Wt(l)}),e.insert(ot,()=>Bo.map(s=>(()=>{var l=qn();return e.insert(l,()=>s.label),e.effect(()=>e.setAttribute(l,"key",s.value)),e.effect(()=>l.value=s.value),l})())),e.insert(He,dp&&(()=>{var s=Tu(),l=s.firstChild,y=l.nextSibling;return y.$$input=f=>Wt(f.currentTarget.value),e.effect(()=>y.value=Oi()||""),s})(),lt),e.insert(He,(()=>{var s=e.memo(()=>!!Yo());return()=>s()&&(()=>{var l=Eu();return e.insert(l,Yo),l})()})(),lt),vn.$$input=s=>Ir(s.currentTarget.value),rr.$$input=s=>Or(s.currentTarget.value),Ve.$$input=s=>jr(s.currentTarget.value),$n.$$input=s=>Ht(s.currentTarget.value),kt.addEventListener("change",s=>Ja(s.currentTarget.value)),e.insert(kt,()=>el.map(s=>(()=>{var l=qn();return e.insert(l,()=>s.label),e.effect(()=>e.setAttribute(l,"key",s.value)),e.effect(()=>l.value=s.value),l})()),null),e.insert(kt,()=>_i().map(s=>(()=>{var l=qn();return e.insert(l,()=>s.name),e.effect(()=>e.setAttribute(l,"key",s.id)),e.effect(()=>l.value=`custom:${s.id}`),l})()),null),e.insert(qe,(()=>{var s=e.memo(()=>!!$r().startsWith("custom:"));return()=>s()&&(()=>{var l=Au(),y=l.firstChild,f=y.nextSibling;return e.insert(l,()=>_i().map(S=>`custom:${S.id}`!==$r()?null:(()=>{var A=Pu();return e.insert(A,()=>S.name),e.effect(()=>e.setAttribute(A,"key",S.id)),A})()),f),f.addEventListener("mouseleave",S=>{S.currentTarget.style.color="#ff3b30"}),f.addEventListener("mouseenter",S=>{S.currentTarget.style.color="#c92a2a"}),f.$$click=()=>{const S=_i().find(A=>`custom:${A.id}`===$r());S&&Ka(S)},l})()})(),null),wn.$$input=s=>Er(s.currentTarget.value),at.addEventListener("change",s=>Ar(Number(s.currentTarget.value)||Ye)),e.insert(at,()=>Ns.map(s=>(()=>{var l=qn();return e.insert(l,()=>s.label),e.effect(()=>e.setAttribute(l,"key",s.value)),e.effect(()=>l.value=String(s.value)),l})()),null),e.insert(at,(()=>{var s=e.memo(()=>!Ns.some(l=>l.value===bt()));return()=>s()&&(()=>{var l=Mu(),y=l.firstChild,f=y.nextSibling,S=f.nextSibling;return e.insert(l,bt,f),e.effect(()=>l.value=String(bt())),l})()})(),null),ni.$$input=s=>Cr(Number(s.currentTarget.value)||0),or.$$input=s=>zr(Number(s.currentTarget.value)||60),li.$$input=s=>Pr(s.currentTarget.value),ar.$$input=s=>Lr(s.currentTarget.value),si.$$input=s=>Rr(s.currentTarget.value),e.insert(pi,(()=>{var s=e.memo(()=>ks().length===0);return()=>s()?Lu():ks().map(l=>(()=>{var y=No(),f=y.firstChild;return f.addEventListener("change",S=>up(l,S.currentTarget.checked)),e.insert(y,l,null),e.effect(S=>e.style(y,`display:flex;align-items:center;gap:6px;padding:6px 10px;border-radius:14px;border:1px solid ${xt().includes(l)?"#5ac8fa":"#333"};background:${xt().includes(l)?"rgba(90,200,250,0.12)":"transparent"};color:${xt().includes(l)?"#5ac8fa":"#cfcfd2"};font-size:12px;cursor:pointer;user-select:none`,S)),e.effect(()=>f.checked=xt().includes(l)),y})())})()),e.insert(pt,(()=>{var s=e.memo(()=>te().length>0||re().length>0);return()=>s()&&(()=>{var l=Ru(),y=l.firstChild,f=y.nextSibling,S=f.nextSibling,A=S.nextSibling,L=A.nextSibling;return e.insert(l,()=>te().length,f),e.insert(l,()=>re().length,A),l})()})(),null),e.insert(Ct,()=>xs.map(s=>(()=>{var l=No(),y=l.firstChild;return y.addEventListener("change",()=>ms("allowed",s)),e.insert(l,s,null),e.effect(f=>e.style(l,`display:flex;align-items:center;gap:5px;padding:4px 9px;border-radius:12px;border:1px solid ${te().includes(s)?"#34c759":"#333"};background:${te().includes(s)?"rgba(52,199,89,0.12)":"transparent"};color:${te().includes(s)?"#34c759":"#cfcfd2"};font-size:11px;cursor:pointer;user-select:none`,f)),e.effect(()=>y.checked=te().includes(s)),l})())),e.insert(dt,()=>xs.map(s=>(()=>{var l=No(),y=l.firstChild;return y.addEventListener("change",()=>ms("denied",s)),e.insert(l,s,null),e.effect(f=>e.style(l,`display:flex;align-items:center;gap:5px;padding:4px 9px;border-radius:12px;border:1px solid ${re().includes(s)?"#ff3b30":"#333"};background:${re().includes(s)?"rgba(255,59,48,0.12)":"transparent"};color:${re().includes(s)?"#ff3b30":"#cfcfd2"};font-size:11px;cursor:pointer;user-select:none`,f)),e.effect(()=>y.checked=re().includes(s)),l})())),Je.$$input=s=>us(s.currentTarget.value),cr.$$click=()=>vs("allowed"),ur.$$click=()=>vs("denied"),e.insert(En,(()=>{var s=e.memo(()=>te().length>0||re().length>0);return()=>s()&&(()=>{var l=qu();return e.insert(l,(()=>{var y=e.memo(()=>te().length>0);return()=>y()&&(()=>{var f=Du(),S=f.firstChild,A=S.nextSibling,L=A.nextSibling;return e.insert(f,()=>te().join(", "),A),f})()})(),null),e.insert(l,(()=>{var y=e.memo(()=>re().length>0);return()=>y()&&(()=>{var f=Iu(),S=f.firstChild,A=S.nextSibling,L=A.nextSibling;return e.insert(f,()=>re().join(", "),A),f})()})(),null),l})()})(),null),ci.$$click=()=>{$o("(форма)");const s={order:0,trigger:"manual",command:Ra(),roleScoped:te().length>0||re().length>0?{allowed:te(),denied:re()}:null,preFlight:(Fi()||"").trim()||null,postFlight:(Gi()||"").trim()||null,qualityGate:(Bi()||"").trim()||null},l=Be().map(y=>xe().find(f=>f.id===y)).filter(y=>!!y).map((y,f)=>({...s,name:wo(Ae(),y.name),order:f,cwd:y.path,matrixParent:Ae()||"(без имени)"}));Hr({tasks:Ne()?l:[{...s,name:Ae()||"(без имени)",cwd:Kr()?.path||(Yi()||"").trim()||"(папка проекта)"}],totals:{},warnings:[...Ae().trim()?[]:["Не указано имя — превью локальное (форма не сохранена)."],...Ne()?[`Matrix: будет создано ${l.length} клон(а/ов) по workspace; родитель сам не выполняется.`]:[]]}),vo(!0)},ct.$$click=ep,e.insert(ct,()=>hr()?"Создание...":So?"Сохранить":"Создать задачу"),e.insert(An,So&&(()=>{var s=Ou();return s.$$click=()=>{Di(null),Ii(""),Wt("* * * * *"),Ht(""),Er(""),Ar(Ye),Cr(0),zr(60),Pr(""),Mr([]),Lr(""),Rr(""),tt("cron"),qr(""),Wi(""),Hi(""),Vt("new"),Vi(""),Ir(""),Or(""),jr(""),Nr(""),Br(""),Gr(""),Jt(""),Xe(""),Qt([]),Kt([]),sn(),Sr("* * * * *"),hi("")},s})(),null),e.insert(g,(()=>{var s=e.memo(()=>!!(Ur()&&Vr()==="(форма)"));return()=>s()&&(()=>{var l=ju(),y=l.firstChild,f=y.firstChild,S=f.nextSibling;return S.$$click=()=>ws(),e.insert(l,()=>{const A=ie();if(!A)return null;const L=A.tasks?.[0];return(()=>{var pe=Nu(),ze=pe.firstChild,ut=ze.firstChild,De=ze.nextSibling,Tt=De.firstChild;return e.insert(ze,()=>L?.command,null),e.insert(De,()=>L?.cwd,null),e.insert(pe,(()=>{var se=e.memo(()=>!!L?.roleScoped);return()=>se()&&(()=>{var W=Bu(),ve=W.firstChild,Qe=ve.nextSibling,Et=Qe.nextSibling,At=Et.nextSibling,ui=At.nextSibling;return e.insert(W,()=>(L.roleScoped.allowed??[]).join(", "),Qe),e.insert(W,()=>(L.roleScoped.denied??[]).join(", "),At),W})()})(),null),e.insert(pe,(()=>{var se=e.memo(()=>!!L?.preFlight);return()=>se()&&(()=>{var W=Fu(),ve=W.firstChild;return e.insert(W,()=>L.preFlight,null),W})()})(),null),e.insert(pe,(()=>{var se=e.memo(()=>!!L?.postFlight);return()=>se()&&(()=>{var W=Gu(),ve=W.firstChild;return e.insert(W,()=>L.postFlight,null),W})()})(),null),e.insert(pe,(()=>{var se=e.memo(()=>!!L?.qualityGate);return()=>se()&&(()=>{var W=Wu(),ve=W.firstChild;return e.insert(W,()=>L.qualityGate,null),W})()})(),null),e.insert(pe,(()=>{var se=e.memo(()=>!!(Array.isArray(A.warnings)&&A.warnings.length>0));return()=>se()&&(()=>{var W=Uu(),ve=W.firstChild;return e.insert(W,()=>A.warnings.join(" | "),null),W})()})(),null),pe})()},null),l})()})(),null),e.effect(s=>{var l=ae()!=="cron"?"none":"block",y=hr()||!cn(),f=cn()?void 0:_s(),S=`display:block;width:100%;padding:10px;margin-top:8px;background:${hr()?"#666":"#007acc"};color:white;border-radius:6px;border:none;cursor:${hr()||!cn()?"not-allowed":"pointer"};font-size:13px;font-weight:500;opacity:${hr()||!cn()?.6:1}`;return l!==s.e&&e.setStyleProperty(He,"display",s.e=l),y!==s.t&&(ct.disabled=s.t=y),f!==s.a&&e.setAttribute(ct,"title",s.a=f),s.o=e.style(ct,S,s.o),s},{e:void 0,t:void 0,a:void 0,o:void 0}),e.effect(()=>k.checked=Ne()),e.effect(()=>j.value=Ae()||""),e.effect(()=>fe.checked=ae()==="cron"),e.effect(()=>Q.checked=ae()==="file"),e.effect(()=>ye.checked=ae()==="mcp-event"),e.effect(()=>$t.checked=ae()==="once"),e.effect(()=>Xt.checked=je()==="new"),e.effect(()=>er.checked=je()==="reuse"),e.effect(()=>ri.checked=je()==="last"),e.effect(()=>ot.value=ds()),e.effect(()=>vn.value=Ji()||""),e.effect(()=>rr.value=Qi()||""),e.effect(()=>Ve.value=Ki()||""),e.effect(()=>$n.value=Ut()||""),e.effect(()=>kt.value=$r()),e.effect(()=>wn.value=Tr()||""),e.effect(()=>at.value=String(bt())),e.effect(()=>ni.value=ji()),e.effect(()=>or.value=Ni()),e.effect(()=>li.value=Bi()||""),e.effect(()=>ar.value=Fi()||""),e.effect(()=>si.value=Gi()||""),e.effect(()=>Je.value=cs()),g})()})(),gn),e.insert(gn,(()=>{var u=e.memo(()=>Lt()!=="all");return()=>u()&&(()=>{var g=Hu(),w=g.firstChild,v=w.nextSibling,N=v.nextSibling,O=N.nextSibling,h=O.nextSibling;return e.insert(g,(()=>{var P=e.memo(()=>Lt()==="none");return()=>P()?"без workspace":`📦 ${xe().find(_=>_.id===Lt())?.name??"workspace"}`})(),v),e.insert(g,()=>zo().length,O),e.insert(g,()=>Yr().length,null),g})()})(),null),e.insert(gn,(()=>{var u=e.memo(()=>zo().length===0);return()=>u()?(()=>{var g=Vu(),w=g.firstChild,v=w.nextSibling;return e.insert(w,()=>Te()?"🎄":"📅"),e.insert(v,()=>Te()?"Задач пока нет. Самое время украсить ёлку!":"Нет активных задач. Создайте первую и доверьте рутину ИИ!"),g})():(()=>{var g=Ju();return e.insert(g,()=>zo().map(w=>e.createComponent(gp,{get key(){return w.name},job:w}))),g})()})(),null),e.insert(r,(()=>{var u=e.memo(()=>!!Zs());return()=>u()&&(()=>{var g=Qu(),w=g.firstChild,v=w.firstChild,N=v.nextSibling,O=N.firstChild,h=O.nextSibling;return g.$$click=()=>yt(null),w.$$click=P=>P.stopPropagation(),e.insert(v,jn),e.insert(w,(()=>{var P=e.memo(()=>!!jn().includes("KEY=VALUE"));return()=>P()?(()=>{var _=Ku();return _.$$keydown=k=>{k.key==="Escape"&&yt(null),k.key==="Enter"&&(k.ctrlKey||k.metaKey)&&(k.preventDefault(),yt(vr())),k.stopPropagation()},_.$$input=k=>Nn(k.currentTarget.value),e.effect(()=>_.value=vr()),_})():(()=>{var _=Yu();return _.$$keydown=k=>{k.key==="Escape"&&yt(null),k.key==="Enter"&&(k.preventDefault(),yt(vr())),k.stopPropagation()},_.$$input=k=>Nn(k.currentTarget.value),e.effect(()=>_.value=vr()),_})()})(),N),O.$$click=()=>yt(null),h.$$click=()=>yt(vr()),e.insert(w,(()=>{var P=e.memo(()=>!!jn().includes("KEY=VALUE"));return()=>P()&&Zu()})(),null),g})()})(),null),e.insert(r,(()=>{var u=e.memo(()=>!!Bn());return()=>u()&&(()=>{var g=Xu(),w=g.firstChild,v=w.firstChild,N=v.firstChild,O=N.nextSibling,h=v.nextSibling,P=w.nextSibling;return e.insert(O,Bn),h.addEventListener("mouseleave",_=>{_.target.style.color="#8e8e93"}),h.addEventListener("mouseenter",_=>{_.target.style.color="#ff3b30"}),h.$$click=()=>{Fn(null),jt("")},e.insert(P,()=>ea().split(`
|
|
4
|
-
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("solid-js/web"),d=require("solid-js"),wa=require("@opencode/plugin/gui"),ju=require("@opencode/plugin/rpc"),Yl=require("node:fs"),gn=require("node:path"),Nu=require("node:url");var ka=typeof document<"u"?document.currentScript:null;const Wi={type:["object","null"],properties:{server:{type:"string"},event:{type:"string"},filter:{type:"string"}},required:["server","event"]},Ea={type:["object","null"],properties:{workspaceIds:{type:"array",items:{type:"string"}},strategy:{type:["string","null"]},failureMode:{type:["string","null"]},aggregation:{type:["string","null"]},createAggregator:{type:["boolean","null"]},concurrency:{type:["number","null"]},overrides:{type:["object","null"],additionalProperties:{type:"object",properties:{prompt:{type:["string","null"]},model:{type:["string","null"]},qualityGate:{type:["string","null"]},beforeScript:{type:["string","null"]},afterScript:{type:["string","null"]}}}}},required:["workspaceIds"]},qu={type:"object",properties:{name:{type:"string"},schedule:{type:"string"},status:{type:"string"},nextRun:{type:["string","null"]},model:{type:["string","null"]},priority:{type:["number","null"]},retryCount:{type:["number","null"]},retryDelay:{type:["number","null"]},qualityGate:{type:["string","null"]},nextTaskOnSuccess:{type:["string","null"]},nextTaskOnError:{type:["string","null"]},dependsOn:{type:"array",items:{type:"string"}},prompt:{type:"string"},beforeScript:{type:["string","null"]},afterScript:{type:["string","null"]},triggerType:{type:["string","null"]},runAt:{type:["string","null"]},session:{type:["string","null"]},sessionId:{type:["string","null"]},sessionMaxRuns:{type:["number","null"]},mcpEvent:Wi,watchPath:{type:["string","null"]},timezone:{type:["string","null"]},notBefore:{type:["string","null"]},notAfter:{type:["string","null"]},activeDays:{type:["array","null"],items:{type:"number"}},windowPolicy:{type:["string","null"]},watchGlobs:{type:["array","null"],items:{type:"string"}},watchIgnore:{type:["array","null"],items:{type:"string"}},gitBranch:{type:["string","null"]},gitPaths:{type:["array","null"],items:{type:"string"}},gitIgnore:{type:["array","null"],items:{type:"string"}},gitPollSeconds:{type:["number","null"]},pausedUntil:{type:["string","null"]},workingDirectory:{type:["string","null"]},workspaceId:{type:["string","null"]},workspaceName:{type:["string","null"]},workspaceColor:{type:["string","null"]},allowedTools:{type:["array","null"],items:{type:"string"}},deniedTools:{type:["array","null"],items:{type:"string"}},matrix:Ea,matrixParentId:{type:["string","null"]},isMatrixParent:{type:"boolean"},paused:{type:"boolean"},orphaned:{type:"boolean"},runsTotal:{type:"number"},runsSuccess:{type:"number"},runsError:{type:"number"},runsPartial:{type:"number"},matrixSummary:{type:["object","null"],properties:{totalCount:{type:"number"},successCount:{type:"number"},errorCount:{type:"number"},pendingCount:{type:"number"},status:{type:"string"},message:{type:"string"}}}},required:["name","schedule","status"]},$a={type:"object",properties:{},additionalProperties:!1},Hu={type:"object",properties:{tasks:{type:"array",items:qu}},required:["tasks"]},Wu={type:"object",properties:{name:{type:"string"},schedule:{type:"string"},prompt:{type:"string"},model:{type:"string"},priority:{type:"number"},retryCount:{type:"number"},retryDelay:{type:"number"},qualityGate:{type:"string"},nextTaskOnSuccess:{type:"string"},nextTaskOnError:{type:"string"},dependsOn:{type:"array",items:{type:"string"}},beforeScript:{type:"string"},afterScript:{type:"string"},triggerType:{type:"string"},runAt:{type:"string"},delaySeconds:{type:"number"},session:{type:"string"},sessionMaxRuns:{type:"number"},mcpEvent:Wi,watchPath:{type:"string"},workspaceId:{type:"string"},workingDirectory:{type:"string"},allowedTools:{type:"array",items:{type:"string"}},deniedTools:{type:"array",items:{type:"string"}},matrix:Ea,timezone:{type:"string"},notBefore:{type:"string"},notAfter:{type:"string"},activeDays:{type:"array",items:{type:"number"}},windowPolicy:{type:"string"},watchGlobs:{type:"array",items:{type:"string"}},watchIgnore:{type:"array",items:{type:"string"}},gitBranch:{type:"string"},gitPaths:{type:"array",items:{type:"string"}},gitIgnore:{type:"array",items:{type:"string"}},gitPollSeconds:{type:"number"}},required:["name","prompt"]},Bu={type:"object",properties:{success:{type:"boolean"},message:{type:"string"}},required:["success","message"]},mn={type:"object",properties:{name:{type:"string"}},required:["name"]},Uu=mn,Gu=mn,qi={type:"object",properties:{success:{type:"boolean"},message:{type:"string"}},required:["success","message"]},Vu=qi,Ku=mn,Yu={type:"object",properties:{success:{type:"boolean"},logs:{type:"string"},error:{type:"string"}},required:["success","logs"]},Ju={type:"object",properties:{taskName:{type:"string"},status:{type:"string"},startedAt:{type:"string"},finishedAt:{type:"string"},durationMs:{type:"number"},error:{type:["string","null"]},nextTask:{type:["string","null"]},model:{type:["string","null"]},preFlightStatus:{type:["string","null"]},postFlightStatus:{type:["string","null"]},allowedTools:{type:["array","null"],items:{type:"string"}},deniedTools:{type:["array","null"],items:{type:"string"}}},required:["taskName","status","startedAt","finishedAt","durationMs","error"]},Qu={type:"object",properties:{limit:{type:"number"},taskName:{type:"string"},status:{type:"string"}},additionalProperties:!1},Zu={type:"object",properties:{records:{type:"array",items:Ju}},required:["records"]},Xu={type:"object",properties:{total:{type:"number"},success:{type:"number"},error:{type:"number"}},required:["total","success","error"]},ep={type:"object",properties:{},additionalProperties:!1},tp=Xu,rp={type:"object",properties:{},additionalProperties:!1},ip={type:"object",properties:{port:{type:["number","null"]}},required:["port"]},op={type:"object",properties:{},additionalProperties:!1},np={type:"object",properties:{platform:{type:"string"},title:{type:"string"}},required:["platform","title"]},ap={type:"object",properties:{},additionalProperties:!1},sp={type:"object",properties:{success:{type:"boolean"},data:{type:"string"},count:{type:"number"},error:{type:"string"}},required:["success"]},lp={type:"object",properties:{data:{type:"string"}},required:["data"]},dp={type:"object",properties:{success:{type:"boolean"},imported:{type:"number"},errors:{type:"array",items:{type:"string"}},error:{type:"string"}},required:["success"]},up={type:"object",properties:{},additionalProperties:!1},Pa={type:"object",properties:{enabled:{type:"boolean"},onlyOnError:{type:"boolean"},webhook:{type:"object",properties:{enabled:{type:"boolean"},url:{type:"string"},timeoutMs:{type:"number"},retryCount:{type:"number"},retryDelayMs:{type:"number"}},required:["enabled","url"]},templates:{type:"object",properties:{success:{type:"string"},error:{type:"string"}},required:["success","error"]},filters:{type:"object",properties:{include:{type:"array",items:{type:"string"}},exclude:{type:"array",items:{type:"string"}}},required:["include","exclude"]},telegram:{type:"object",properties:{enabled:{type:"boolean"},botToken:{type:"string"},chatId:{type:"string"},parseMode:{type:"string",enum:["","HTML","Markdown","MarkdownV2"]},disableNotification:{type:"boolean"},messageThreadId:{type:["number","null"]},includeDashboardLink:{type:"boolean"},apiBase:{type:"string"}},required:["enabled"]},native:{type:"object",properties:{enabled:{type:"boolean"},sound:{type:"boolean"}},required:["enabled"]},quietHours:{type:"object",properties:{enabled:{type:"boolean"},from:{type:"string"},to:{type:"string"}},required:["enabled","from","to"]},dashboardUrl:{type:"string"},matrix:{type:"object",properties:{enabled:{type:"boolean"},onPartial:{type:"boolean"},onAllFailed:{type:"boolean"},stuckAfterMinutes:{type:"number"}},required:["enabled","onPartial","onAllFailed","stuckAfterMinutes"]},digest:{type:"object",properties:{enabled:{type:"boolean"},frequency:{type:"string",enum:["daily","weekly"]},time:{type:"string"},lastSentAt:{type:["string","null"]}},required:["enabled","frequency","time"]}},required:["enabled","onlyOnError"]},za={type:"object",properties:{retentionDays:{type:"number"},maxRecords:{type:"number"},lastCleanupAt:{type:["string","null"]},lastCleanupDeleted:{type:"number"}},required:["retentionDays","maxRecords"]},Ra={type:"object",properties:{enabled:{type:"boolean"},retentionDays:{type:"number"},maxRecords:{type:"number"}},required:["enabled","retentionDays","maxRecords"]},pp={type:"object",properties:{maxConcurrent:{type:"number"},locale:{type:"string",enum:["ru","en"]},winterMode:{type:"boolean"},notifications:Pa,history:za,audit:Ra},required:["maxConcurrent","locale","winterMode","notifications"]},cp={type:"object",properties:{maxConcurrent:{type:"number"},locale:{type:"string",enum:["ru","en"]},winterMode:{type:"boolean"},notifications:Pa,history:za,audit:Ra},additionalProperties:!1},gp={type:"object",properties:{success:{type:"boolean"},maxConcurrent:{type:"number"},locale:{type:"string",enum:["ru","en"]},winterMode:{type:"boolean"},notifications:Pa,history:za,audit:Ra},required:["success","maxConcurrent","locale","winterMode","notifications"]},mp={type:"object",properties:{retentionDays:{type:"number"},maxRecords:{type:"number"}},additionalProperties:!1},fp={type:"object",properties:{success:{type:"boolean"},message:{type:"string"},deleted:{type:"number"},deletedByAge:{type:"number"},deletedByCount:{type:"number"},kept:{type:"number"},retentionDays:{type:"number"},maxRecords:{type:"number"},vacuumed:{type:"boolean"}},required:["success","message","deleted","kept"]},yp={type:"object",properties:{days:{type:"number"},topLimit:{type:"number"}},additionalProperties:!1},bp={type:"object",properties:{success:{type:"boolean"},report:{type:["object","null"]},error:{type:"string"}},required:["success","report"]},xp={type:"object",properties:{},additionalProperties:!1},hp={type:"object",properties:{success:{type:"boolean"},message:{type:"string"}},required:["success","message"]},vp={type:"object",properties:{},additionalProperties:!1},wp={type:"object",properties:{success:{type:"boolean"},message:{type:"string"}},required:["success","message"]},Jl={type:"object",properties:{name:{type:"string"},preview:{type:"string"},updatedAt:{type:"string"}},required:["name","preview"]},kp={type:"object",properties:{},additionalProperties:!1},$p={type:"object",properties:{success:{type:"boolean"},secrets:{type:"array",items:Jl}},required:["success","secrets"]},Sp={type:"object",properties:{name:{type:"string"},value:{type:"string"}},required:["name","value"],additionalProperties:!1},_p={type:"object",properties:{success:{type:"boolean"},message:{type:"string"},secret:Jl},required:["success"]},Tp={type:"object",properties:{name:{type:"string"}},required:["name"],additionalProperties:!1},Cp={type:"object",properties:{success:{type:"boolean"},message:{type:"string"}},required:["success","message"]},Ep={type:"object",properties:{id:{type:"number"},ts:{type:"string"},action:{type:"string"},targetType:{type:["string","null"]},target:{type:["string","null"]},actor:{type:"string"},source:{type:["string","null"]},details:{},remote:{type:["string","null"]}},required:["id","ts","action","actor"]},Pp={type:"object",properties:{action:{type:"string"},target:{type:"string"},actor:{type:"string"},since:{type:"string"},until:{type:"string"},limit:{type:"number"}},additionalProperties:!1},zp={type:"object",properties:{success:{type:"boolean"},records:{type:"array",items:Ep},total:{type:"number"}},required:["success","records","total"]},Ql={type:"object",properties:{id:{type:"string"},name:{type:"string"},prompt:{type:"string"},schedule:{type:"string"},timeoutSeconds:{type:"number"},model:{type:"string"},priority:{type:"number"},retryCount:{type:"number"},retryDelay:{type:"number"},qualityGate:{type:"string"},nextTaskOnSuccess:{type:"string"},nextTaskOnError:{type:"string"},dependsOn:{type:"array",items:{type:"string"}},beforeScript:{type:"string"},afterScript:{type:"string"},triggerType:{type:"string"},mcpEvent:Wi,watchPath:{type:"string"},watchGlobs:{type:"array",items:{type:"string"}},watchIgnore:{type:"array",items:{type:"string"}},gitBranch:{type:"string"},gitPaths:{type:"array",items:{type:"string"}},gitIgnore:{type:"array",items:{type:"string"}},gitPollSeconds:{type:"number"},activeDays:{type:"array",items:{type:"number"}},windowPolicy:{type:"string"},workspaceId:{type:"string"},workingDirectory:{type:"string"},allowedTools:{type:"array",items:{type:"string"}},deniedTools:{type:"array",items:{type:"string"}}},required:["id","name","prompt"]},Rp={type:"object",properties:{},additionalProperties:!1},Lp={type:"object",properties:{templates:{type:"array",items:Ql}},required:["templates"]},Ap={type:"object",properties:{id:{type:"string"},name:{type:"string"},prompt:{type:"string"},schedule:{type:"string"},timeoutSeconds:{type:"number"},model:{type:"string"},priority:{type:"number"},retryCount:{type:"number"},retryDelay:{type:"number"},qualityGate:{type:"string"},nextTaskOnSuccess:{type:"string"},nextTaskOnError:{type:"string"},dependsOn:{type:"array",items:{type:"string"}},beforeScript:{type:"string"},afterScript:{type:"string"},triggerType:{type:"string"},mcpEvent:Wi,watchPath:{type:"string"},workspaceId:{type:"string"},workingDirectory:{type:"string"},allowedTools:{type:"array",items:{type:"string"}},deniedTools:{type:"array",items:{type:"string"}}},required:["name","prompt"],additionalProperties:!1},Dp={type:"object",properties:{success:{type:"boolean"},template:Ql,error:{type:"string"}},required:["success"]},Mp={type:"object",properties:{id:{type:"string"}},required:["id"]},Fp={type:"object",properties:{success:{type:"boolean"},error:{type:"string"}},required:["success"]},Al={type:"object",properties:{name:{type:"string"},until:{type:"string"}},required:["name"]},Op={type:"object",properties:{name:{type:"string"},newSchedule:{type:"string"},newPrompt:{type:"string"},model:{type:"string"},priority:{type:"number"},retryCount:{type:"number"},retryDelay:{type:"number"},qualityGate:{type:"string"},nextTaskOnSuccess:{type:"string"},nextTaskOnError:{type:"string"},dependsOn:{type:"array",items:{type:"string"}},beforeScript:{type:"string"},afterScript:{type:"string"},triggerType:{type:"string"},runAt:{type:"string"},delaySeconds:{type:"number"},session:{type:"string"},sessionMaxRuns:{type:"number"},mcpEvent:Wi,watchPath:{type:"string"},workspaceId:{type:"string"},workingDirectory:{type:"string"},allowedTools:{type:"array",items:{type:"string"}},deniedTools:{type:"array",items:{type:"string"}},matrix:Ea,timezone:{type:"string"},notBefore:{type:"string"},notAfter:{type:"string"},activeDays:{type:"array",items:{type:"number"}},windowPolicy:{type:"string"},watchGlobs:{type:"array",items:{type:"string"}},watchIgnore:{type:"array",items:{type:"string"}},gitBranch:{type:"string"},gitPaths:{type:"array",items:{type:"string"}},gitIgnore:{type:"array",items:{type:"string"}},gitPollSeconds:{type:"number"}},required:["name"]},Ip=qi,Zl={type:"object",properties:{id:{type:"string"},name:{type:"string"},path:{type:"string"},gitRemote:{type:["string","null"]},gitBranch:{type:["string","null"]},color:{type:["string","null"]},env:{type:["object","null"],additionalProperties:{type:"string"}},envFile:{type:["string","null"]},createdAt:{type:"string"}},required:["id","name","path","createdAt"]},jp={type:"object",properties:{},additionalProperties:!1},Np={type:"object",properties:{workspaces:{type:"array",items:Zl}},required:["workspaces"]},qp={type:"object",properties:{name:{type:"string"},path:{type:"string"},color:{type:"string"},env:{type:["object","null"],additionalProperties:{type:"string"}},envFile:{type:["string","null"]}},required:["path"],additionalProperties:!1},Dl={type:"object",properties:{success:{type:"boolean"},workspace:Zl,error:{type:"string"}},required:["success"]},Hp={type:"object",properties:{id:{type:"string"},name:{type:"string"},path:{type:"string"},color:{type:"string"},env:{type:["object","null"],additionalProperties:{type:"string"}},envFile:{type:["string","null"]}},required:["id"],additionalProperties:!1},Wp={type:"object",properties:{id:{type:"string"}},required:["id"]},Bp={type:"object",properties:{success:{type:"boolean"},message:{type:"string"}},required:["success"]},Up={type:"object",properties:{eventName:{type:"string"},payload:{type:["object","null","string","number","boolean","array"]}},required:["eventName"]},Gp={type:"object",properties:{success:{type:"boolean"},message:{type:"string"},triggered:{type:"array",items:{type:"string"}}},required:["success","triggered"]},Vp={type:"object",properties:{name:{type:"string"},order:{type:"number"},trigger:{type:"string"},cwd:{type:"string"},command:{type:"string"},workspace:{type:["object","null"],properties:{name:{type:"string"},path:{type:"string"}},required:["name","path"]},preFlight:{type:["string","null"]},postFlight:{type:["string","null"]},qualityGate:{type:["string","null"]},roleScoped:{type:["object","null"],properties:{allowed:{type:"array",items:{type:"string"}},denied:{type:"array",items:{type:"string"}}}},estimatedDurationSec:{type:["number","null"]},estimatedCostUsd:{type:["number","null"]},estimatedTokens:{type:["number","null"]},matrixParent:{type:"string"}},required:["name","order","trigger","cwd","command"]},Xl={type:"object",properties:{success:{type:"boolean"},taskName:{type:"string"},tasks:{type:"array",items:Vp},totals:{type:"object",properties:{estimatedDurationSec:{type:["number","null"]},estimatedCostUsd:{type:["number","null"]},estimatedTokens:{type:["number","null"]}},required:[]},warnings:{type:"array",items:{type:"string"}},error:{type:"string"}},required:["success","taskName","tasks","warnings"]},Kp={type:"object",properties:{taskName:{type:"string"}},required:["taskName"],additionalProperties:!1},Yp={type:"object",properties:{success:{type:"boolean"},reports:{type:"array",items:Xl}},required:["success","reports"]},Jp={type:"object",properties:{name:{type:"string"},workspaceId:{type:["string","null"]},workspaceName:{type:["string","null"]},status:{type:"string"},error:{type:["string","null"]},finishedAt:{type:["string","null"]}},required:["name","status"]},Qp={type:"object",properties:{parentId:{type:"string"}},required:["parentId"],additionalProperties:!1},Zp={type:"object",properties:{parentId:{type:"string"},totalCount:{type:"number"},successCount:{type:"number"},errorCount:{type:"number"},pendingCount:{type:"number"},status:{type:"string"},message:{type:"string"},clones:{type:"array",items:Jp}},required:["parentId","totalCount","successCount","errorCount","status"]},Xp={type:"object",properties:{success:{type:"boolean"},report:Zp,error:{type:"string"}},required:["success"]},ec={type:"object",properties:{name:{type:"string"},workspaceIds:{type:"array",items:{type:"string"}},strategy:{type:"string"},failureMode:{type:"string"},aggregation:{type:"string"}},required:["workspaceIds"],additionalProperties:!1},tc={type:"object",properties:{success:{type:"boolean"},clones:{type:"array",items:{type:"object",properties:{name:{type:"string"},workspaceId:{type:"string"},workspaceName:{type:["string","null"]}},required:["name","workspaceId"]}},error:{type:"string"}},required:["success","clones"]},rc={type:"object",properties:{success:{type:"boolean"},message:{type:"string"},cancelled:{type:"array",items:{type:"string"}}},required:["success","message","cancelled"]},ic={type:"object",properties:{success:{type:"boolean"},message:{type:"string"},removed:{type:"array",items:{type:"string"}}},required:["success","message","removed"]},ed={type:"object",properties:{name:{type:"string"},dir:{type:"string"},port:{type:["number","null"]},isDefault:{type:"boolean"},active:{type:"boolean"}},required:["name","dir","isDefault","active"]},oc={type:"object",properties:{},additionalProperties:!1},nc={type:"object",properties:{current:{type:"string"},pinnedByEnv:{type:"boolean"},profiles:{type:"array",items:ed}},required:["current","pinnedByEnv","profiles"]},ac={type:"object",properties:{name:{type:"string"}},required:["name"],additionalProperties:!1},sc={type:"object",properties:{success:{type:"boolean"},message:{type:"string"},current:{type:"string"},restartRequired:{type:"boolean"}},required:["success","message","current","restartRequired"]},lc={type:"object",properties:{name:{type:"string"},port:{type:"number"}},required:["name"],additionalProperties:!1},dc={type:"object",properties:{success:{type:"boolean"},message:{type:"string"},profile:ed,error:{type:"string"}},required:["success"]},uc={type:"object",properties:{name:{type:"string"}},required:["name"],additionalProperties:!1},pc={type:"object",properties:{success:{type:"boolean"},message:{type:"string"}},required:["success","message"]},cc=ju.Rpc.define({id:"opencode-windows-scheduler",methods:{get_tasks:{input:$a,output:Hu},create_task:{input:Wu,output:Bu},delete_task:{input:Uu,output:qi},run_task:{input:Gu,output:Vu},pause_task:{input:Al,output:qi},resume_task:{input:Al,output:qi},update_task:{input:Op,output:Ip},get_task_logs:{input:Ku,output:Yu},get_history:{input:Qu,output:Zu},get_metrics:{input:ep,output:tp},get_dashboard_port:{input:rp,output:ip},get_platform:{input:op,output:np},dry_run:{input:Kp,output:Xl},dry_run_all:{input:$a,output:Yp},get_matrix_results:{input:Qp,output:Xp},cancel_matrix:{input:mn,output:rc},cleanup_matrix_orphans:{input:$a,output:ic},cleanup_history:{input:mp,output:fp},get_analytics:{input:yp,output:bp},expand_matrix_preview:{input:ec,output:tc},get_workspaces:{input:jp,output:Np},add_workspace:{input:qp,output:Dl},update_workspace:{input:Hp,output:Dl},delete_workspace:{input:Wp,output:Bp},get_profiles:{input:oc,output:nc},set_profile:{input:ac,output:sc},create_profile:{input:lc,output:dc},delete_profile:{input:uc,output:pc},export_tasks:{input:ap,output:sp},import_tasks:{input:lp,output:dp},get_settings:{input:up,output:pp},save_settings:{input:cp,output:gp},get_templates:{input:Rp,output:Lp},save_template:{input:Ap,output:Dp},delete_template:{input:Mp,output:Fp},emit_event:{input:Up,output:Gp},test_notification:{input:xp,output:hp},send_digest:{input:vp,output:wp},list_secrets:{input:kp,output:$p},save_secret:{input:Sp,output:_p},delete_secret:{input:Tp,output:Cp},get_audit:{input:Pp,output:zp}},events:{}}),gc=["ru","en"],Hi="ru",Ml=gn.dirname(Nu.fileURLToPath(typeof document>"u"?require("url").pathToFileURL(__filename).href:ka&&ka.tagName.toUpperCase()==="SCRIPT"&&ka.src||new URL("gui-experimental.cjs",document.baseURI).href));function mc(){return[gn.resolve(Ml,"../locales"),gn.resolve(Ml,"locales")]}const Ta=new Map,Fl=new Map,fc=td(process.env.OPENCODE_SCHEDULER_LOCALE);let Ca=fc;function yc(s){return typeof s=="string"&&gc.includes(s)}function td(s,y=Hi){return yc(s)?s:y}function bc(s){return Ca=td(s,Hi),Ca}function xc(s){for(const y of mc()){const w=gn.join(y,`${s}.json`);try{if(Yl.statSync(w).isFile())return w}catch{}}return null}function Ol(s){const y=Ta.get(s);if(y)return y;const w=xc(s),N={};if(w)try{const P=JSON.parse(Yl.readFileSync(w,"utf8"));if(P&&typeof P=="object"&&!Array.isArray(P))for(const[te,Te]of Object.entries(P))typeof Te=="string"&&Te.length>0&&(N[te]=Te)}catch(P){console.error(`[i18n] Не удалось прочитать ${w}: ${P instanceof Error?P.message:String(P)}`)}return Ta.set(s,N),N}function rd(s,y){const w={};for(const[N,P]of Object.entries(y))typeof P=="string"&&P.length>0&&(w[N]=P);Ta.set(s,w)}function hc(s,y){let w=Fl.get(y);return w||(w=new Intl.PluralRules(y),Fl.set(y,w)),w.select(s)}function vc(s,y){try{return new Intl.NumberFormat(y).format(s)}catch{return String(s)}}function id(s,y){let w=0;for(let N=y;N<s.length;N++){const P=s[N];if(P==="{")w++;else if(P==="}"&&(w--,w===0))return N}return-1}function wc(s){let y=0;for(let w=0;w<s.length;w++){const N=s[w];if(N==="{")y++;else if(N==="}")y--;else if(N===","&&y===0)return w}return-1}function kc(s){const y={};let w=0;for(;w<s.length;){for(;w<s.length&&/[\s,]/.test(s[w]);)w++;const N=w;for(;w<s.length&&s[w]!=="{";)w++;if(w>=s.length)break;const P=s.slice(N,w).trim(),te=id(s,w);if(te===-1)break;P&&(y[P]=s.slice(w+1,te)),w=te+1}return y}function od(s,y,w,N){let P="",te=0;for(;te<s.length;){const Te=s[te];if(Te==="#"&&N!==void 0){P+=vc(N,y),te++;continue}if(Te!=="{"){P+=Te,te++;continue}const Tt=id(s,te);if(Tt===-1){P+=s.slice(te);break}P+=$c(s.slice(te+1,Tt),y,w),te=Tt+1}return P}function $c(s,y,w){const N=wc(s),P=(N===-1?s:s.slice(0,N)).trim(),te=w[P];if(N===-1)return te==null?`{${s}}`:String(te);const Te=s.slice(N+1).trim(),Tt=/^([a-zA-Z]+)/.exec(Te),lt=Tt?Tt[1]:"";if(lt==="plural"){const jr=Number(te),dt=Number.isFinite(jr)?jr:0,je=kc(Te.slice(lt.length)),ut=hc(dt,y),Ke=je[ut]??je.other??"";return od(Ke,y,w,dt)}return te==null?`{${s}}`:String(te)}function Sc(s,y){const w=Ca;let N=Ol(w)[s],P=w;return N===void 0&&w!==Hi&&(N=Ol(Hi)[s],P=Hi),N===void 0?s:od(N,P,y??{})}const _c={"app.dashboardTitle":"Веб-дашборд","common.runsCount":"запусков: {count, plural, one {# запуск} few {# запуска} many {# запусков} other {# запуска}}","dryRun.cron":"По расписанию «{schedule}».","dryRun.cronParseError":'Не удалось разобрать cron "{schedule}" для расчёта ближайших запусков.',"dryRun.cronTimezone":"По расписанию «{schedule}» ({timezone}).","dryRun.cwdImplicit":"Рабочая директория не задана явно — будет использована папка текущего проекта.","dryRun.cwdMissing":'Рабочая директория "{path}" не существует на диске.',"dryRun.cwdNotDir":'Путь "{path}" существует, но не является директорией.',"dryRun.cycle":'Обнаружена циклическая зависимость вокруг задачи "{task}" — конвейер разорван на этом узле.',"dryRun.danger.forcePush":"принудительный push в git (`git push --force`)","dryRun.danger.rmRoot":"возможна рекурсивная очистка корня файловой системы (`rm -rf /`)","dryRun.dangerPattern":"Опасный паттерн: {message}.","dryRun.dependencyMissing":'Зависимость "{task}" не найдена среди задач — узел пропущен.',"dryRun.file.any":"Файловый триггер: любое изменение подходит.","dryRun.file.globs":"маски: {count}","dryRun.file.ignore":"исключения: {count}","dryRun.file.trigger":"Файловый триггер: {parts}.","dryRun.git.branchMismatch":"Ветка не подходит под фильтр «{branch}».","dryRun.git.checkError":"Git-триггер: ошибка проверки — {error}.","dryRun.git.notRepo":"Задача с git-триггером, но рабочая директория не является git-репозиторием.","dryRun.manual":"Запуск вручную (в составе конвейера).","dryRun.matrix.expandError":"Матрица не может быть развёрнута: {error}","dryRun.matrix.parent":"[{name}] Родитель матрицы не выполняется сам — показаны {count} клон(а/ов) по workspace.","dryRun.mcp.event":"MCP-событие {server}:{event}{filter}.","dryRun.mcp.filter":" (фильтр «{filter}»)","dryRun.mcp.missing":"MCP-событие (параметры не заданы).","dryRun.noHistory":"Нет успешных запусков в истории — оценка длительности/токенов/стоимости недоступна.","dryRun.once":"Однократный запуск.","dryRun.once.at":"Однократно в {runAt}.","dryRun.taskNotFound":'Задача "{task}" не найдена.',"dryRun.window.noOpening":"Сейчас {reason}: открытие окна не найдено, запуск пропущен.","dryRun.window.outside":"вне окна","dryRun.window.postpone":"Сейчас {reason}: запуск будет перенесён на {nextOpenAt}.","dryRun.window.run":"Сейчас {reason}: политика run — задача выполнится всё равно.","dryRun.window.skip":"Сейчас {reason}: при политике skip запуск будет пропущен.","gitTrigger.baseline":"Запомнен текущий коммит {commit} — задача запустится на следующем изменении.","gitTrigger.branchMismatch":"Ветка {branch} не подходит под фильтр «{pattern}».","gitTrigger.changed":"Новый коммит {commit}: изменено файлов {count} ({files}).","gitTrigger.ignored":"Изменено файлов: {count}, но ни один не подходит под фильтры.","gitTrigger.noChanges":"Новых коммитов нет.","gitTrigger.noRepo":"«{cwd}» не git-репозиторий — git-триггер не сработает.","gui.add":"+ Добавить","gui.addWorkspaceFirst":"Сначала добавьте хотя бы один workspace.","gui.aggregation":"Агрегация","gui.allowedToolsLabel":"Белый список (allowedTools)","gui.app.title":"Планировщик задач","gui.auditAction":"Действие","gui.auditActionPlaceholder":"например task.create","gui.auditActor":"Автор","gui.auditDeletedFrom":"Удалён с","gui.auditEmpty":"Записей аудита нет.","gui.auditEnable":"Включить аудит","gui.auditHeading":"📜 Журнал аудита","gui.auditHint":"Записываются мутации задач, настроек, шаблонов, профилей, рабочих зон, секретов, импорта и очистки истории. Детали маскируются (секреты заменены на {redacted}).","gui.auditSource":"Источник","gui.auditStorageHeading":"Журнал аудита — хранение","gui.auditTarget":"Цель","gui.auditTargetPlaceholder":"имя задачи/секрета","gui.auditTime":"Время","gui.botTokenEnvHint":"Токен можно не хранить в settings.json: задайте OPENCODE_SCHEDULER_TELEGRAM_BOT_TOKEN и OPENCODE_SCHEDULER_TELEGRAM_CHAT_ID.","gui.botTokenPlaceholder":"Токен бота из @BotFather","gui.cancel":"Отмена","gui.chatIdPlaceholder":"chat_id (например, 123456789 или -100...)","gui.cleaningUp":"Очистка...","gui.cleanupNow":"🧹 Очистить сейчас","gui.collapseFormTitle":"Свернуть форму","gui.common.projectDir":"(папка проекта)","gui.common.unknownError":"Неизвестная ошибка","gui.concurrencySequentialPlaceholder":"1 (sequential)","gui.concurrencyUnlimitedPlaceholder":"без лимита","gui.createProfile":"+ Создать","gui.createTask":"➕ Создать задачу","gui.createTaskSubmit":"Создать задачу","gui.creating":"Создание...","gui.cron.custom":"Свое расписание…","gui.cron.dailyAt9":"Каждый день в 09:00","gui.cron.everyHour":"Каждый час","gui.cron.everyMinute":"Каждую минуту","gui.cron.mondayAt10":"Каждый понедельник в 10:00","gui.cronExprLabel":"Cron-выражение","gui.customTemplate":"Кастомный шаблон:","gui.dashboardLink":"ссылка на дашборд","gui.defaultSuffix":"(по умолчанию)","gui.delete":"Удалить","gui.deleteTemplateTitle":"Удалить шаблон","gui.deniedToolsLabel":"Чёрный список (deniedTools)","gui.dependsOnHint":"Задача запустится автоматически, когда все отмеченные задачи завершатся успешно.","gui.dependsOnLabel":"Зависит от задач (успешное завершение)","gui.digestChannels":"Каналы: webhook, Telegram, нативные уведомления ОС.","gui.digestDaily":"ежедневно","gui.digestEnable":"Отправлять дайджест","gui.digestHeading":"Дайджест","gui.digestHint":"Запуски, success rate, стоимость и топ ошибок за сутки/неделю.","gui.digestLastSent":"последняя отправка: {when}","gui.digestNeverSent":"ещё не отправлялся","gui.digestWeekly":"еженедельно (Пн)","gui.dryRunButton":"🧪 Превью","gui.dryRunLocalTitle":"🧪 Превью (локальное, по полям формы)","gui.dryRunMatrixPreview":"Matrix: будет создано {count, plural, one {# клон} few {# клона} many {# клонов} other {# клонов}} по workspace; родитель сам не выполняется.","gui.dryRunNoNameWarning":"Не указано имя — превью локальное (форма не сохранена).","gui.dryRunPreviewTitle":"Локальное превью команды по текущим полям формы (без RPC и без запуска)","gui.editingTask":"Редактирование задачи","gui.emptyNormal":"Нет активных задач. Создайте первую и доверьте рутину ИИ!","gui.emptyWinter":"Задач пока нет. Самое время украсить ёлку!","gui.errorBoundaryDetail":"Произошла ошибка отображения. Попробуйте перезагрузить панель.","gui.expandFormTitle":"Развернуть форму создания задачи","gui.export":"Экспорт","gui.exportBusy":"Экспорт...","gui.filterExcludePlaceholder":"Исключить задачи (через запятую, * — маска)","gui.filterHint":"Пустой список «только» = все задачи. Исключения важнее включений.","gui.filterIncludePlaceholder":"Только эти задачи (через запятую, * — маска)","gui.filterSummary":"Фильтр: {scope} · показано {visible} из {total}","gui.gitBranchesLabel":"Ветки (glob, через запятую; пусто — любая)","gui.gitIgnoreLabel":"Игнорируемые пути (glob, по одной в строке)","gui.gitPathsLabel":"Пути изменений (glob, по одной в строке; пусто — любой файл)","gui.gitPollHint":"Первый опрос запоминает текущий HEAD без запуска задачи — дальше задача стартует на новом коммите, затронувшем подходящие файлы.","gui.gitPollLabel":"Период опроса, секунды (минимум 5, по умолчанию 60)","gui.hideForm":"Скрыть форму ▴","gui.history.durationMs":"{ms} мс","gui.history.error":"❌ Ошибка","gui.history.modelTitle":"Модель: {model}","gui.history.nextTaskTitle":"Запущена следующая задача в цепочке","gui.history.success":"✅ Успех","gui.historyCleanupHint":"Удаляются только завершённые записи; незавершённые запуски не трогаются.","gui.historyDeleteOlderLabel":"Удалять записи старше, дней","gui.historyHeading":"🧹 История и ретеншн","gui.historyKeepMaxLabel":"Хранить не более записей","gui.historyNoExpiry":"без срока","gui.historyNoLimit":"без лимита","gui.historyOlderThan":"старше {days} дн.","gui.historyUpToRecords":"до {count} записей","gui.import":"Импорт","gui.importBusy":"Импорт...","gui.job.activeDaysTitle":"Запуск только в дни: {days}","gui.job.cancelMatrixTitle":'Отменить выполняющиеся клоны матрицы "{name}"',"gui.job.deleteMatrixTitle":'Удалить матрицу "{name}" вместе с клонами',"gui.job.deleteTitle":'Удалить "{name}"',"gui.job.dependsOn":"🔗 Зависит от: {list}","gui.job.dryRunTitle":'Dry-Run симуляция "{name}"',"gui.job.durationEst":"⏱ ~{seconds} с","gui.job.editTitle":'Редактировать "{name}"',"gui.job.fanoutConcurrency":", одновременно: {concurrency}","gui.job.fanoutOverrides":", переопределено workspace: {overrides}","gui.job.fanoutTitle":"Matrix fan-out: {count} клонов, стратегия: {strategy}, при ошибке: {failureMode}{concurrency}{overrides}","gui.job.gitTriggerBranch":" в ветке {branch}","gui.job.gitTriggerPaths":", пути: {paths}","gui.job.gitTriggerTitle":"Git-триггер: новый коммит{branch}{paths}. Опрос каждые {seconds} с.","gui.job.historyEmpty":"Запусков пока нет.","gui.job.historyPanelTitle":"📜 История последних запусков","gui.job.historyTitle":'История "{name}"',"gui.job.logonModeUnknown":"неизвестен","gui.job.logsTitle":'Логи "{name}"',"gui.job.matrixClone":"Клон матрицы. Родитель: {parent}","gui.job.matrixDone":"📦 Matrix: {success}/{total} успешных","gui.job.mcpEventFilterSuffix":" (фильтр: {filter})","gui.job.mcpEventTitle":"MCP-событие: {event}{filterSuffix}","gui.job.modelTitle":"Модель LLM: {model}","gui.job.pauseTitle":'Поставить на паузу "{name}"',"gui.job.pauseUnavailable":'Задача "{name}" отсутствует в планировщике ОС — пауза недоступна',"gui.job.pausedUntilShort":"⏸ до {date}","gui.job.pausedUntilTitle":"Пауза до {date} — задача включится автоматически.","gui.job.priorityTitle":"Приоритет: {label} ({priority})","gui.job.resumeTitle":'Возобновить "{name}"',"gui.job.runTitle":'Запустить "{name}"',"gui.job.runWhenLoggedOffShort":"без входа","gui.job.runWhenLoggedOffTitle":"Задача запускается без входа пользователя. Режим в планировщике: {mode}","gui.job.runsLine":"📊 Всего: {total} | ✅ {success} | 🟠 {partial} | ❌ {error}","gui.job.runsTitle":"Запуски именно этой задачи: успешные / частичные / ошибки и таймауты","gui.job.sessionContinueShort":"↪ продолжение","gui.job.sessionContinueTitle":"Продолжение последней сессии OpenCode (--continue)","gui.job.sessionReuseShort":"⟳ сессия","gui.job.sessionReuseTitle":"Переиспользуемая сессия OpenCode","gui.job.sessionReuseTitleId":"Переиспользуемая сессия OpenCode: {id}","gui.job.simulating":"Симуляция…","gui.job.simulationFailed":"Симуляция не удалась","gui.job.timezoneTitle":"Часовой пояс задачи: {tz}","gui.job.tokensEst":"· ~{tokens} ток.","gui.job.toolLimitsTitle":"Ограничения инструментов: {limits}","gui.job.totalsLine":"Σ {duration} с · {tokens} токенов{cost}","gui.job.watchFile":"Отслеживание файла: {path}","gui.job.watchGlobsCount":"✳ {count, plural, one {# маска} few {# маски} many {# масок} other {# масок}}","gui.job.watchGlobsTitle":"Glob-маски файлового триггера: {globs}","gui.job.windowTitle":"Окно запуска: {from}–{to}. Вне окна запуск переносится на его открытие.","gui.jobStatus.error":"🔴 Ошибка","gui.jobStatus.never":"⚪ Не запускалась","gui.jobStatus.orphan":"🧟 Нет в планировщике","gui.jobStatus.partial":"🟠 Частично","gui.jobStatus.paused":"⏸ Пауза","gui.jobStatus.running":"🟡 Выполняется: {seconds} сек","gui.jobStatus.success":"🟢 Готова","gui.jobStatus.unknown":"⚪ Неизвестно","gui.jobsTitle":"Планировщик","gui.lastCleanupDone":"{when} · удалено {deleted}","gui.lastCleanupLabel":"Последняя очистка:","gui.lastCleanupNever":"ещё не выполнялась","gui.loading":"Загрузка...","gui.logs.empty":"(пусто)","gui.logs.loadFailed":"Не удалось загрузить логи","gui.logs.loading":"Загрузка логов…","gui.logs.readError":"Ошибка чтения логов:","gui.logsHeading":"Логи","gui.matrix.cancelClonesConfirm":'Отменить выполняющиеся клоны матрицы "{name}"?',"gui.matrix.deleteConfirm":'Удалить матрицу "{name}" вместе со всеми клонами и агрегатором?',"gui.matrixAggregator":"Создать aggregator-задачу matrix-complete (запустится после всех клонов)","gui.matrixAllFailed":"все упали","gui.matrixConcurrency":"Одновременно клонов (concurrency)","gui.matrixContinue":"continue — продолжать","gui.matrixHint":"Задача-шаблон раскладывается на клоны по workspace. Родитель сам не выполняется — он запускает клоны и агрегирует результат.","gui.matrixModelPlaceholder":"Модель (override)","gui.matrixNotifyEnable":"Уведомлять о завершении матриц","gui.matrixNotifyHeading":"Матрицы","gui.matrixOverridesTitle":"⚙ Настройки по workspace — переопределено {count}","gui.matrixParallel":"parallel — все сразу","gui.matrixPerTask":"per-task — по задачам","gui.matrixPromptPlaceholder":"Промпт (по умолчанию — общий промпт формы)","gui.matrixSelectHint":"Выберите хотя бы один workspace — превью клонов появится здесь.","gui.matrixSequential":"sequential — по одному","gui.matrixStop":"stop — остановить","gui.matrixStuckHint":"Клон, выполняющийся дольше указанного времени, уведомляется один раз. 0 — выключить.","gui.matrixStuckMinutes":"зависший клон, мин:","gui.matrixSummary":"summary — сводка","gui.matrixWillCreate":"Будет создано {count, plural, one {# клон} few {# клона} many {# клонов} other {# клонов}}:","gui.matrixWorkspacesSelected":"Workspaces (для матрицы) — выбрано","gui.maxConcurrentLabel":"Макс. одновременных задач:","gui.maxRetriesLabel":"Кол-во повторов при ошибке","gui.mcpEventLabel":"Имя события","gui.mcpEventPlaceholder":"например, github.pr.opened","gui.mcpFilterHint":"key=value сравнивается с полем payload, иначе фильтр считается regex/подстрокой. События приходят через RPC emit_event.","gui.mcpFilterLabel":"Фильтр (опционально)","gui.mcpFilterPlaceholder":'например, repo="my-project" или regex',"gui.mcpSourceLabel":"MCP-сервер / источник","gui.mcpSourcePlaceholder":"например, github","gui.metricsTotalsLine":"📊 Всего по всем задачам: {total} · ✅ {success} · ❌ {error}","gui.metricsTotalsTitle":"Суммарные метрики по всем задачам (включая архивные записи метрик)","gui.modalShortcutHint":"Ctrl+Enter — сохранить, Escape — отмена","gui.modelHint":"Пусто — модель OpenCode по умолчанию. Иначе будет передан флаг --model.","gui.modelLabel":"Модель LLM","gui.modelPlaceholder":"по умолчанию (как в OpenCode)","gui.nativeHint":"Windows Toast, macOS Notification Center, Linux notify-send. Без внешних зависимостей.","gui.nativeNotifications":"Нативные уведомления ОС","gui.newTask":"Новая задача","gui.noNameFallback":"(без имени)","gui.noOtherTasks":"Других задач пока нет","gui.noWorkspaceOption":"Без workspace — рабочая директория","gui.notifications":"🔔 Уведомления","gui.notifyAllRuns":"все запуски","gui.notifyDisabled":"выключены","gui.notifyEnable":"Включить уведомления","gui.notifyOnlyErrors":"только ошибки","gui.notifyOnlyOnError":"Только при ошибке","gui.ok":"ОК","gui.onFailure":"При ошибке","gui.oneShotDelayHint":"Или задержка в секундах от нажатия кнопки «Создать задачу»:","gui.oneShotDelayPlaceholder":"например, 3600","gui.oneShotHint":"Приоритет у runAt: если задано время, delaySeconds игнорируется. После запуска задача больше не повторится.","gui.oneShotTimeLabel":"Время однократного запуска","gui.oneShotTimePlaceholder":"2026-11-14T10:00:00.000Z или локальная дата","gui.openDashboard":"🌐 Открыть дашборд","gui.openDashboardTitle":"Открыть локальный веб-дашборд (фактический порт сервера)","gui.otherPriorityOption":"Другой ({priority})","gui.outsideWindowLabel":"Вне окна или в неразрешённый день","gui.parseModeLabel":"разметка:","gui.postflightHint":"Например: git push или npm run build. Выполняется в рабочей директории задачи даже при ошибке основной задачи.","gui.postflightLabel":"Команда после запуска (Post-flight)","gui.postflightPlaceholder":"например: git push","gui.preflightHint":"Например: git pull или npm install. Выполняется в рабочей директории задачи. Ненулевой код отменяет запуск (Pre-flight script failed).","gui.preflightLabel":"Команда перед запуском (Pre-flight)","gui.preflightPlaceholder":"например: git pull","gui.priority.critical":"Критический","gui.priority.high":"Высокий","gui.priority.low":"Низкий","gui.priority.normal":"Обычный","gui.priorityHint":"Если готовы несколько задач сразу, первой запускается задача с более высоким приоритетом.","gui.priorityLabel":"Приоритет","gui.profile.deleteConfirm":'Удалить профиль "{name}" вместе с его БД, настройками и логами?',"gui.profile.namePrompt":"Имя нового профиля (латиница, цифры, - и _)","gui.profileActive":"активен","gui.profileDelete":"Удалить","gui.profileEnvLocked":"Профиль задан переменной OPENCODE_SCHEDULER_PROFILE. Переключение в GUI недоступно.","gui.profileEnvLockedTitle":"Профиль задан переменной окружения OPENCODE_SCHEDULER_PROFILE — переключение в GUI недоступно","gui.profilePort":"порт {port}","gui.profilePortDefault":"порт по умолчанию","gui.profileSwitch":"Переключить","gui.profilesHeading":"👤 Профили","gui.profilesHint":"У каждого профиля своя БД, настройки, логи и порт дашборда. После переключения перезапустите OpenCode.","gui.profilesTitle":"Профили: отдельные БД, настройки и порт дашборда","gui.projectFolderFallback":"(папка проекта)","gui.promptLabel":"Промпт","gui.promptPlaceholder":"Напиши краткий отчет о состоянии рынка","gui.promptTemplateLabel":"Шаблон промпта","gui.promptTemplates.codeHygiene":"Гигиена кода","gui.promptTemplates.codeHygienePrompt":"Проведи аудит гигиены кода: найди неиспользуемые импорты, неиспользуемые переменные, лишние зависимости и предложи правки.","gui.promptTemplates.custom":"Свой промпт","gui.promptTemplates.morningDigest":"Утренний дайджест","gui.promptTemplates.morningDigestPrompt":"Собери утренний дайджест: какие изменения были за ночь, есть ли проваленные сборки, что требует внимания сегодня.","gui.promptTemplates.nightWatch":"Ночной сторож (тесты)","gui.promptTemplates.nightWatchPrompt":"Запусти ночные проверки: прогнали тесты, зафиксируй ошибки и составь краткий отчёт о состоянии репозитория.","gui.qualityGateHint":"Выполняется после успешного ответа ИИ. Ненулевой код = ошибка задачи.","gui.qualityGateLabel":"Проверочная команда (Quality Gate)","gui.qualityGatePlaceholder":"например: npm run test","gui.quietFrom":"с","gui.quietHours":"Тихие часы","gui.quietHoursHint":"В тихие часы success и partial подавляются, ошибки и таймауты отправляются.","gui.quietTo":"до","gui.refresh":"Обновить","gui.remoteNotSet":"remote не задан","gui.retryCount":"повторов:","gui.retryDelayLabel":"Задержка перед повтором (сек)","gui.retryDelayMs":"пауза, мс:","gui.retryHint":"Повтор при сетевой ошибке, таймауте, 5xx и 429 (экспоненциальная пауза).","gui.runWhenLoggedOffHint":"Windows: задача будет запускаться и тогда, когда никто не вошёл в систему (/ru SYSTEM). Она работает в session 0 — без вашего профиля, сетевых дисков и сохранённых паролей, поэтому задачи, которым нужны ваши файлы или сеть, могут не сработать. Обычно требуется запуск OpenCode от имени администратора.","gui.runWhenLoggedOffLabel":"Запускать без входа пользователя","gui.save":"💾 Сохранить","gui.saveAsTemplate":"💾 Сохранить как шаблон","gui.saveAsTemplateTitle":"Сохранить текущие настройки формы как шаблон","gui.saving":"Сохранение...","gui.scheduleLabel":"Расписание","gui.secretNamePlaceholder":"Имя секрета (A-Za-z0-9_.-)","gui.secretValuePlaceholder":"Значение (не возвращается при чтении)","gui.secrets":"🔐 Секреты","gui.secretsEmpty":"Секретов нет. Значения хранятся зашифрованно в secrets.json.","gui.secretsUsage":"В задачах используйте ссылку {secretRef} — значение подставляется из хранилища при запуске и маскируется в логах.","gui.sendDigestNow":"📊 Отправить дайджест сейчас","gui.sendTestNotification":"🧪 Тестовое уведомление","gui.sending":"Отправка...","gui.sessionContinue":"Последняя (--continue)","gui.sessionLabel":"Сессия OpenCode","gui.sessionMaxRunsHint":"sessionId генерируется плагином автоматически. При достижении лимита сессия удаляется, следующий запуск начинает чистую сессию.","gui.sessionMaxRunsLabel":"Сколько запусков переживает сессия (sessionMaxRuns, необязательно)","gui.sessionNew":"Новая","gui.sessionReuse":"Переиспользовать","gui.silent":"без звука","gui.strategy":"Стратегия","gui.task.deleteConfirm":'Удалить задачу "{name}"?',"gui.taskFiltersHeading":"Фильтры по задачам","gui.taskNameLabel":"Имя задачи","gui.taskNamePlaceholder":"например, Gui-Test","gui.tasksHeading":"Задачи","gui.templateErrorPlaceholder":'❌ Задача "{task}" упала ({duration}){error}',"gui.templateHint":"Плейсхолдеры: {task} {status} {duration} {error} {emoji} {cost} {tokens}. Пусто = шаблон по умолчанию.","gui.templateSuccessPlaceholder":'✅ Задача "{task}" выполнена ({duration})',"gui.templates.deleteConfirm":'Удалить шаблон "{name}"?',"gui.templates.namePrompt":"Название шаблона","gui.templatesHeading":"Шаблоны сообщений","gui.timeoutMs":"Таймаут, мс:","gui.timezoneHint":"Другая зона — задача будится каждую минуту, cron проверяется с учётом пояса.","gui.timezoneLabel":"Часовой пояс (IANA)","gui.timezonePlaceholder":"Пусто — системный пояс","gui.toast.chooseFile":"Выберите файл","gui.toast.deleteFailed":"Ошибка удаления","gui.toast.digestFailed":"Дайджест не отправлен","gui.toast.digestSent":"Дайджест отправлен","gui.toast.envInvalid":"Неверный формат env","gui.toast.envSaveError":"Ошибка сохранения env","gui.toast.envSaveFailed":"Не удалось сохранить env","gui.toast.envSaved":"Env-переменные сохранены","gui.toast.exportFailed":"Ошибка экспорта","gui.toast.exported":"Экспортировано задач: {count}","gui.toast.historyCleanupDone":"Очистка истории завершена","gui.toast.historyCleanupFailed":"Очистка не удалась","gui.toast.historyLoadFailed":"Ошибка загрузки истории","gui.toast.importFailed":"Ошибка импорта","gui.toast.imported":"Импортировано задач: {count}","gui.toast.jobsLoadFailed":"Ошибка загрузки задач","gui.toast.logsReadFailed":"Ошибка чтения логов","gui.toast.matrixCancelError":"Ошибка отмены матрицы","gui.toast.matrixCancelFailed":"Не удалось отменить матрицу","gui.toast.noFileForImport":"Не выбран файл для импорта.","gui.toast.nothingToSave":"Нечего сохранять","gui.toast.pauseError":"Ошибка паузы","gui.toast.pauseFailed":'Не удалось поставить на паузу "{name}"',"gui.toast.paused":'Задача "{name}" поставлена на паузу',"gui.toast.profileCreateError":"Ошибка создания профиля","gui.toast.profileCreateFailed":"Не удалось создать профиль","gui.toast.profileCreated":"Профиль создан","gui.toast.profileDeleteError":"Ошибка удаления профиля","gui.toast.profileDeleteFailed":"Не удалось удалить профиль","gui.toast.profileDeleted":"Профиль удалён","gui.toast.profileSwitchError":"Ошибка переключения профиля","gui.toast.profileSwitchFailed":"Не удалось переключить профиль","gui.toast.profileSwitched":"Профиль переключён","gui.toast.promptRequired":"Сначала заполните промпт — он обязателен для шаблона.","gui.toast.resumeError":"Ошибка возобновления","gui.toast.resumeFailed":'Не удалось возобновить "{name}"',"gui.toast.resumed":'Задача "{name}" возобновлена',"gui.toast.runFailed":"Ошибка запуска","gui.toast.secretDeleted":"Секрет удалён","gui.toast.secretNotDeleted":"Секрет не удалён","gui.toast.secretNotSaved":"Секрет не сохранён","gui.toast.secretSaved":"Секрет сохранён","gui.toast.settingsSaveFailed":"Не удалось сохранить настройки","gui.toast.taskCrashed":'Задача "{name}" упала',"gui.toast.taskCreateFailed":"Ошибка создания задачи","gui.toast.taskCreated":"Задача создана","gui.toast.taskDeleted":'Задача "{name}" удалена',"gui.toast.taskDone":'Задача "{name}" выполнена',"gui.toast.taskStartFailed":'Не удалось запустить "{name}"',"gui.toast.taskStarted":'Задача "{name}" запущена',"gui.toast.taskUpdateFailed":"Ошибка обновления задачи","gui.toast.taskUpdated":"Задача обновлена","gui.toast.templateDeleteError":"Ошибка удаления шаблона","gui.toast.templateDeleteFailed":"Не удалось удалить шаблон","gui.toast.templateDeleted":'Шаблон "{name}" удалён',"gui.toast.templateSaveError":"Ошибка сохранения шаблона","gui.toast.templateSaveFailed":"Не удалось сохранить шаблон","gui.toast.templateSaved":'Шаблон "{name}" сохранён',"gui.toast.testFailed":"Тест не удался","gui.toast.testSent":"Тестовое уведомление отправлено","gui.toast.workspaceAddFailed":"Ошибка добавления workspace","gui.toast.workspaceAdded":"Workspace добавлен","gui.toast.workspaceDeleteFailed":"Ошибка удаления workspace","gui.toast.workspaceDeleted":"Workspace удалён","gui.toast.workspaceUpdateFailed":"Ошибка обновления workspace","gui.toast.workspaceUpdated":"Workspace обновлён","gui.toolLimitsDenied":"При конфликте приоритет у denied. Пустой allowedTools запрещён.","gui.toolLimitsHeading":"🔒 Ограничения инструментов","gui.toolLimitsNote":"⚠ Metadata-only: opencode 2.2.3 не поддерживает allow/deny флаги — ограничения фиксируются в логе и истории.","gui.toolPlaceholder":"свой инструмент, например websearch","gui.triggerCron":"По расписанию (Cron)","gui.triggerFile":"При изменении файла","gui.triggerGit":"Новый коммит (Git)","gui.triggerOnce":"Разово","gui.triggerTypeLabel":"Тип триггера","gui.uiError":"Ошибка UI: {message}","gui.unboundedPlaceholder":"без ограничения","gui.validation.cronRequired":"Укажите cron-расписание.","gui.validation.dependsOnSelf":"Задача не может зависеть от самой себя.","gui.validation.gitPollInvalid":"Период опроса git — целое число секунд не меньше 5.","gui.validation.gitWorkspaceRequired":"Для git-триггера выберите workspace или укажите рабочую директорию.","gui.validation.matrixConcurrencyInvalid":"Concurrency матрицы — целое положительное число.","gui.validation.matrixWorkspacesRequired":"Выберите хотя бы один workspace для матрицы.","gui.validation.priorityInvalid":"Приоритет — целое число от 0 до 10.","gui.validation.promptRequired":"Укажите промпт.","gui.validation.retryCountInvalid":"Количество повторов — целое число ≥ 0.","gui.validation.retryDelayInvalid":"Задержка повтора — целое число секунд ≥ 0.","gui.validation.runAtRequired":"Укажите время запуска или задержку.","gui.validation.sessionMaxRunsInvalid":"Лимит запусков сессии — целое положительное число.","gui.validation.taskNameRequired":"Укажите имя задачи.","gui.validation.timezoneInvalid":"Неизвестная таймзона. Укажите IANA-пояс, например Europe/Moscow.","gui.validation.windowPairRequired":"Окно запуска задаётся только парой «с/по».","gui.watchFileLabel":"Путь к файлу для отслеживания","gui.watchFilePlaceholder":"например, C:\\project\\src\\main.ts","gui.watchGlobsHint":"Маски считаются от пути watchPath. Поддерживаются *, **, ? и классы [abc]; маска каталога с /** рекурсивна.","gui.watchGlobsLabel":"Glob-маски (по одной в строке, пусто — любое изменение)","gui.watchIgnoreLabel":"Исключения (glob, по одной в строке)","gui.webhookLabel":"Webhook (Discord / Slack / generic)","gui.webhookPostHint":"POST с JSON {payload} — совместимо с Discord и Slack.","gui.weekday.0":"Вс","gui.weekday.1":"Пн","gui.weekday.2":"Вт","gui.weekday.3":"Ср","gui.weekday.4":"Чт","gui.weekday.5":"Пт","gui.weekday.6":"Сб","gui.weekdaysLabel":"Дни недели (пусто — все дни)","gui.windowEndTitle":"Конец окна (может быть меньше начала)","gui.windowHint":"Вне окна запуск переносится на его открытие, а не пропускается. Например 22:00 — 06:00.","gui.windowLabel":"Окно запуска (необязательно)","gui.windowPolicyHint":"Для cron политика применяется в обёртке, для файловых и git-триггеров — при обработке события. Перенос ждёт не дольше 12 часов.","gui.windowPostpone":"Перенести на открытие окна (по умолчанию)","gui.windowRun":"Выполнить всё равно","gui.windowSkip":"Пропустить запуск","gui.windowStartTitle":"Начало окна","gui.winterMode":"❄️ Зимний режим","gui.winterModeTitle":"Переключить зимнюю тему","gui.withSound":"со звуком","gui.workingDirectoryHint":"В этой папке задача запустит opencode run — здесь подхватятся MCP-серверы из opencode.json.","gui.workingDirectoryLabel":"Рабочая директория","gui.workingDirectoryPlaceholder":"по умолчанию — папка проекта","gui.workspace.deleteConfirm":'Удалить workspace "{name}"? Задачи сохранены, привязка будет очищена.',"gui.workspace.envFilePrompt":"Путь к .env-файлу workspace (необязательно, пусто — без файла)","gui.workspace.envInvalidHelp":"Нужны строки KEY=VALUE, имя — латиница/цифры/_","gui.workspace.envPrompt":"Env-переменные workspace, по одной в строке KEY=VALUE\\n(пустое поле — очистить)","gui.workspace.envSecretsMasked":"Секреты маскируются в логах","gui.workspace.namePrompt":"Название workspace (необязательно)","gui.workspace.namePromptShort":"Название workspace","gui.workspace.pathPrompt":"Путь к git-репозиторию (workspace)","gui.workspace.pathPromptShort":"Путь к git-репозиторию","gui.workspaceAddTitle":"Добавить workspace (git-репозиторий)","gui.workspaceAll":"Все workspace","gui.workspaceDeleteTitle":"Удалить workspace (задачи сохраняются)","gui.workspaceEditTitle":"Редактировать workspace","gui.workspaceEmpty":"Workspace не добавлен. Задача без workspace использует рабочую директорию проекта.","gui.workspaceEnvFile":" · .env-файл","gui.workspaceEnvLine":"{count} перем.","gui.workspaceEnvTitle":"Env-переменные workspace (секреты маскируются в логах)","gui.workspaceFilterTitle":"Фильтр задач по workspace","gui.workspaceGitInfo":"git: {branch} · {remote}","gui.workspaceMultiRepo":"Workspace (multi-repo)","gui.workspaceNone":"Без workspace","gui.zeroKeepByAge":"0 = не удалять по возрасту","gui.zeroNoLimit":"0 = без ограничения","gui.zeroUnlimited":"(0 = без ограничений)","matrix.aggregate.empty":'У матрицы "{parent}" нет клонов.',"matrix.aggregate.partial":"Частичный успех: {success} из {total} успешно, {errors} с ошибкой.","matrix.aggregate.running":"Выполняется: {done} из {total}.","matrix.aggregate.stopped":"Остановлено после первой ошибки: {errors} из {total} с ошибкой.","matrix.aggregate.stoppedFirst":" Первая ошибка ({name}): {error}","matrix.aggregate.success":"Все {total} клонов завершились успешно.","matrix.aggregator.prompt":'Все клоны матрицы "{parent}" завершились. Проверь результаты: {clones}.',"matrix.cancel.defaultReason":"Отменено пользователем.","matrix.clone.runningChanges":'Клон "{name}" выполняется — изменения применятся после завершения.',"matrix.clone.runningDeletion":'Клон "{name}" выполняется — удаление отложено до завершения.',"matrix.deletionGuard":'Задача "{name}" — клон матрицы "{parent}". Удалите матрицу целиком (родитель + все клоны) или измените список workspace-ов родителя.',"matrix.error.cloneCreation":'Задача "{task}": не удалось создать ни одного клона матрицы.',"matrix.error.noClones":'У матрицы "{task}" нет клонов — пересоздайте задачу, чтобы развернуть её по workspace.',"matrix.error.notMatrix":'Задача "{task}" не является матрицей.',"matrix.error.workspaceIdsEmpty":'Задача "{task}": matrix.workspaceIds не может быть пустым.',"matrix.error.workspaceMissing":'Задача "{task}": workspace "{workspace}" не найден.',"notify.digest.cost":"Стоимость: {cost} · токенов: {tokens}","notify.digest.noErrors":"Ошибок нет 🎉","notify.digest.period.daily":"за сутки","notify.digest.period.weekly":"за неделю","notify.digest.runs":"Запусков: {total} — ✅ {success}, ❌ {error}, ⚠️ {partial} ({rate}%)","notify.digest.title":"📊 Дайджест {period} ({date})","notify.digest.topErrorRow":"• {message} — {count}","notify.digest.topErrors":"Топ ошибок:","notify.error.digestDisabled":"Уведомления выключены.","notify.error.digestFailed":"Не удалось отправить дайджест ни в один канал.","notify.error.digestMissing":"Настройки дайджеста не найдены.","notify.error.digestNoChannels":"Все каналы выключены. Включите webhook, Telegram или нативные уведомления.","notify.error.nativeFailed":"не удалось показать уведомление","notify.error.telegramApiBaseInvalid":"Некорректный адрес Telegram API.","notify.error.telegramChatMissing":"Не задан chat_id Telegram.","notify.error.telegramNoCreds":"Telegram включён, но не заданы botToken/chatId.","notify.error.telegramScheme":"Telegram API поддерживает только http:// или https://.","notify.error.telegramTimeout":"Таймаут Telegram API ({seconds} с).","notify.error.telegramTokenInvalid":"Некорректный токен Telegram-бота.","notify.error.telegramTokenMissing":"Не задан токен Telegram-бота.","notify.error.testChannelOff":"Канал {channel} выключен.","notify.error.testDisabled":"Уведомления выключены. Включите главный переключатель.","notify.error.testNoChannels":"Все каналы выключены. Включите webhook, Telegram или нативные уведомления.","notify.error.testNotSent":"Тестовое уведомление не отправлено.","notify.error.testUnknown":"неизвестная ошибка","notify.error.webhookScheme":"Вебхук поддерживает только http:// или https://.","notify.error.webhookTimeout":"Таймаут запроса ({seconds} с).","notify.error.webhookUrlInvalid":"Некорректный URL вебхука.","notify.error.webhookUrlMissing":"URL вебхука не задан.","notify.matrix.failed":'❌ Матрица "{parent}" завершилась с ошибками: успешно {success}, ошибок {error} из {total}.',"notify.matrix.failedAll":'❌ Матрица "{parent}": все {total} клонов упали.',"notify.matrix.partial":'⚠️ Матрица "{parent}" завершилась частично: успешно {success} из {total}, ошибок {error}.',"notify.matrix.success":'✅ Матрица "{parent}" завершилась: {success} из {total} клонов успешно.',"notify.native.title":"OpenCode Scheduler","notify.ok.digestSent":"Дайджест отправлен.","notify.reason":": {error}","notify.stuck":'⏳ Матрица "{parent}": клон "{clone}" выполняется дольше {minutes} мин (запущен {startedAt}).',"notify.task.error":'❌ Задача "{task}" упала ({duration}){error}{cost}',"notify.task.success":'✅ Задача "{task}" выполнена ({duration}){cost}',"notify.telegram.openDashboard":"📊 Открыть дашборд","notify.telegram.openDashboardUrl":"📊 Открыть дашборд: {url}","notify.test.body":"🧪 Тестовое уведомление от OpenCode Scheduler — канал настроен корректно.","notify.test.errors":"Ошибки: {errors}.","notify.test.sent":"Отправлено: {channels}.","notify.usage.tokens":"{tokens} tok","schedule.error.cronEmptyItem":"Пустой элемент в списке «{token}».","schedule.error.cronFields":"Ожидается 5 полей cron, получено {count}: «{raw}».","schedule.error.cronRangeBounds":"Диапазон «{item}» вне границ {min}..{max}.","schedule.error.cronRangeInvalid":"Недопустимый диапазон «{item}».","schedule.error.cronStepInvalid":"Недопустимый шаг «/{step}» в «{raw}».","schedule.error.cronStepMissing":"Некорректный шаг в «{raw}»: перед «/» ничего нет.","schedule.error.cronValueBounds":"Значение «{raw}» вне границ {min}..{max}.","schedule.error.everyInterval":"Неподдерживаемый интервал «@every {value}» (m: 1..59, h: 1..23, d: 1..31).","schedule.error.lastDomOnly":"«L» поддерживается только в поле дня месяца.","schedule.error.notAfterFormat":'notAfter должен быть в формате HH:MM, не "{value}".',"schedule.error.notBeforeFormat":'notBefore должен быть в формате HH:MM, не "{value}".',"schedule.error.weekdayBounds":"День недели «{value}» вне границ 0..7 в «{field}».","schedule.reason.dayNotAllowed":"день недели не разрешён ({days})","schedule.reason.outsideWindow":"время вне окна {notBefore}–{notAfter}","schedule.weekday.0":"Вс","schedule.weekday.1":"Пн","schedule.weekday.2":"Вт","schedule.weekday.3":"Ср","schedule.weekday.4":"Чт","schedule.weekday.5":"Пт","schedule.weekday.6":"Сб","server.hookTaskMissing":'Задача "{task}" не найдена — хук отклонён.',"server.matrixNotFound":'Матрица "{parentId}" не найдена.',"server.methodNotAllowed":"Метод не поддерживается.","server.notFound":"Страница не найдена.","server.taskNotFound":'Задача "{task}" не найдена.',"tool.error.allowedToolsEmpty":'Задача "{task}": пустой allowedTools запрещён — задайте список инструментов или уберите поле.',"tool.error.cronSchedule":"Для triggerType=cron нужно cron-выражение schedule.","tool.error.gitCwdRequired":'Задача "{task}": для git-триггера нужна рабочая директория или workspace.',"tool.error.gitNoRepo":'Задача "{task}": git-триггер требует git-репозиторий в "{path}".',"tool.error.matrixCloneFailed":'клон "{clone}" (workspace "{workspace}"): {error}',"tool.error.matrixConcurrency":'Задача "{task}": matrix.concurrency должен быть числом не меньше 1.',"tool.error.matrixExpandRuntime":'Не удалось развернуть матрицу "{name}": {error}. Созданные клоны удалены.',"tool.error.matrixNoClones":'У матрицы "{name}" нет клонов.',"tool.error.matrixNotMatrix":'Задача "{name}" не является матрицей.',"tool.error.matrixOverride":'Задача "{task}": matrix.overrides содержит workspace "{workspace}", которого нет в workspaceIds.',"tool.error.mcpEventRequired":"Для MCP-триггера нужно указать имя события (mcpEvent.event).","tool.error.onceFields":"runAt/delaySeconds допустимы только при triggerType=once.","tool.error.onceMatrixSchema":"One-shot нельзя комбинировать с matrix: матрица запускается только вручную.","tool.error.onceMatrixUpdate":"One-shot нельзя комбинировать с matrix.","tool.error.onceSchedule":"Для triggerType=once нужен runAt (ISO-8601) или delaySeconds.","tool.error.oneShotMatrix":'Задача "{name}": one-shot нельзя комбинировать с matrix. Запустите матрицу вручную или используйте cron/file-триггер.',"tool.error.pauseDateInvalid":'Задача "{name}": некорректная дата паузы "{until}". Нужен ISO-момент, например 2026-12-01T09:00:00Z.',"tool.error.pauseDatePast":'Задача "{name}": дата паузы уже прошла.',"tool.error.prepareFiles":"Не удалось подготовить файлы задачи: {error}","tool.error.schedulerKeptFiles":"Файлы обёртки оставлены для диагностики.","tool.error.schedulerNotConfirmed":'Планировщик не подтвердил создание задачи "{task}": её нет в списке {scheduler}.',"tool.error.schedulerRemovedFiles":"Файлы задачи удалены, запись в БД не создана.","tool.error.sessionMaxRuns":'Задача "{name}": sessionMaxRuns должен быть целым числом ≥ 1.',"tool.error.sessionUnknown":'Задача "{name}": неизвестный режим сессии "{session}".',"tool.error.taskNameMissing":"Не передано имя задачи.","tool.error.taskNotFound":'Задача "{name}" не найдена.',"tool.error.taskReason":'Задача "{name}": {error}',"tool.error.timezone":'Задача "{task}": неизвестный часовой пояс "{timezone}". Укажите IANA-зону, например Europe/Moscow.',"tool.error.updateCron":'Для обновления задачи "{name}" нужен cron-график.',"tool.error.updatePrompt":'Для обновления задачи "{name}" нужен промпт.',"tool.error.window":'Задача "{task}": {error}',"tool.error.workspaceIdConflict":'Задача "{task}": нельзя одновременно workspaceId и matrix.workspaceIds.',"tool.error.workspaceIdMissing":"Workspace '{id}' не найден.","tool.error.workspaceIdsEmpty":'Задача "{task}": matrix.workspaceIds не может быть пустым.',"tool.error.workspaceMissing":'Задача "{task}": workspace "{id}" не найден.',"tool.error.workspacePathMissing":"Workspace '{name}' недоступен по пути '{path}'","tool.error.workspaceUnavailable":'Задача "{task}": workspace "{workspace}" недоступен по пути "{path}".',"tool.error.wrapper":"Не удалось создать обёртку задачи: {error}","tool.event.nameRequired":"Не передано имя события.","tool.event.nameRequiredShort":"Не передано имя события (eventName).","tool.event.none":'Нет задач, подписанных на событие "{event}".',"tool.event.processed":'Событие "{event}" обработано. Запущено задач: {count}.',"tool.event.triggered":"Запущено задач: {count}.","tool.history.cleanFailed":"Не удалось очистить историю: {error}","tool.history.cleaned":"Удалено {deleted} записей (по возрасту: {byAge}, по лимиту: {byCount}), осталось {kept}.","tool.matrix.actionName":"Для action={action} нужен name матрицы.","tool.matrix.cancelFinished":"Уже завершены и не тронуты: {count}.","tool.matrix.cancelRunning":"Остановлено выполнявшихся: {count}.","tool.matrix.cancelSummary":'Матрица "{matrix}": отменено {cancelled} из {total} клонов.',"tool.matrix.cancelWarnings":"Предупреждения: {warnings}.","tool.matrix.completed":'Матрица "{name}" завершена. Проверь результаты клонов: {clones}.',"tool.matrix.limit":"Достигнут лимит одновременных задач. Дождитесь завершения текущих.","tool.matrix.orphansNone":"Осиротевших задач не найдено.","tool.matrix.orphansRemoved":"Удалено осиротевших задач: {count}.","tool.matrix.parentMissing":"Не передан parentId матрицы.","tool.matrix.recreateFailed":"{clone}: не удалось пересоздать — {error}","tool.matrix.started":'Матрица "{name}": запущено {started} из {total}',"tool.matrix.startedErrors":". Ошибки: {errors}","tool.matrix.startedSkipped":", пропущено {count}","tool.matrix.stopFailed":"{clone}: не удалось остановить — {error}","tool.profile.active":"Активный профиль: {name}. Перезапустите OpenCode, чтобы применить изменения.","tool.profile.created":'Профиль "{name}" создан (порт дашборда {port}).',"tool.profile.deleted":'Профиль "{name}" удалён вместе с его БД и настройками.',"tool.profile.envVar":"Профиль задан переменной OPENCODE_SCHEDULER_PROFILE={name}. Перезапустите OpenCode.","tool.profile.envVarLong":"Профиль задан переменной OPENCODE_SCHEDULER_PROFILE={name}. Перезапустите OpenCode, чтобы применить изменения.","tool.profile.nameRequired":"Для action={action} нужно имя профиля.","tool.profile.notFound":"Профиль не найден.","tool.secret.deleted":"Секрет {name} удалён.","tool.secret.nameRequired":"Для set/delete нужно имя секрета.","tool.secret.needName":"Нужно имя секрета.","tool.secret.needValue":"Нужно непустое значение секрета.","tool.secret.notFound":"Секрет {name} не найден.","tool.secret.saved":"Секрет {name} сохранён в зашифрованном виде.","tool.secret.valueRequired":"Для action=set нужно непустое значение value.","tool.settings.updateFields":"Для action=update передайте хотя бы одно поле: maxConcurrent, locale, winterMode, notifications, history, integrations или audit.","tool.task.alreadyAbsent":'Задача "{name}" уже отсутствует (удалена или не существовала).',"tool.task.alreadyRunning":'Задача "{name}" уже выполняется.',"tool.task.autosave":"не удалось сохранить автопродолжение: {error}","tool.task.created":'Задача "{name}" успешно создана.',"tool.task.deleted":'Задача "{name}" успешно удалена.',"tool.task.found":"Найдено задач: {count}.","tool.task.foundOsUnavailable":"Найдено задач: {count}. Статус планировщика ОС недоступен — показано состояние из БД.","tool.task.listEmpty":"Задачи плагина не найдены.","tool.task.listOsUnavailable":"Статус планировщика ОС недоступен — показано состояние из БД.","tool.task.matrixDeletedCount":'Матрица "{name}" удалена вместе с {count} задачами (клоны и агрегатор).',"tool.task.matrixDeletedList":'Матрица "{name}" удалена вместе с клонами: {list}.',"tool.task.matrixPauseErrors":" Ошибки: {warnings}.","tool.task.matrixPaused":'Матрица "{name}" {verb}{until}: {affected} из {total} клонов.',"tool.task.pauseError":" Ошибка: {warnings}.","tool.task.paused":"поставлена на паузу","tool.task.pausedText":'Задача "{name}" {verb}{until}.',"tool.task.resumed":"возобновлена","tool.task.rollbackFailed":'{cause} Откат не удался: {restore}. Задача "{name}" отсутствует в планировщике — создайте её заново.',"tool.task.rollbackKept":"{cause} Прежняя версия не тронута: удалить задачу из планировщика не удалось.","tool.task.rollbackRestored":"{cause} Обновление отменено, прежняя версия восстановлена.","tool.task.started":'Задача "{name}" запущена.',"tool.task.until":" до {date}","tool.task.updated":'Задача "{name}" обновлена.',"tool.template.deleted":"Шаблон {id} удалён.","tool.template.namePromptRequired":"Нужны непустые название шаблона и промпт.","tool.template.needDeleteId":"Для action=delete нужен id шаблона.","tool.template.needId":"Не передан id шаблона.","tool.template.notFound":"Шаблон {id} не найден.","tool.template.saveRequired":"Для action=save нужны непустые name и prompt.","tool.transfer.importData":"Для action=import нужны данные экспорта.","tool.transfer.noData":"Не переданы данные для импорта.","tool.transfer.noTasks":"В данных нет задач для импорта.","tool.transfer.noTasksInFile":"В файле нет задач для импорта.","tool.workspace.deleted":"Workspace удалён. Задачи сохранены, привязка очищена.","tool.workspace.needDeleteId":"Для action=delete нужен id.","tool.workspace.needPath":"Для action=add нужен path.","tool.workspace.needUpdateId":"Для action=update нужен id.","tool.workspace.notFound":"Workspace не найден."},Tc={"app.dashboardTitle":"Web dashboard","common.runsCount":"runs: {count, plural, one {# run} other {# runs}}","dryRun.cron":'By schedule "{schedule}".',"dryRun.cronParseError":'Failed to parse cron "{schedule}" to compute upcoming runs.',"dryRun.cronTimezone":'By schedule "{schedule}" ({timezone}).',"dryRun.cwdImplicit":"Working directory is not set explicitly — the current project folder will be used.","dryRun.cwdMissing":'Working directory "{path}" does not exist on disk.',"dryRun.cwdNotDir":'Path "{path}" exists but is not a directory.',"dryRun.cycle":'Circular dependency detected around task "{task}" — the pipeline is cut at this node.',"dryRun.danger.forcePush":"forced git push (`git push --force`)","dryRun.danger.rmRoot":"possible recursive wipe of the filesystem root (`rm -rf /`)","dryRun.dangerPattern":"Dangerous pattern: {message}.","dryRun.dependencyMissing":'Dependency "{task}" not found among tasks — node skipped.',"dryRun.file.any":"File trigger: any change matches.","dryRun.file.globs":"globs: {count}","dryRun.file.ignore":"excludes: {count}","dryRun.file.trigger":"File trigger: {parts}.","dryRun.git.branchMismatch":'Branch does not match the filter "{branch}".',"dryRun.git.checkError":"Git trigger: check failed — {error}.","dryRun.git.notRepo":"Task has a git trigger, but the working directory is not a git repository.","dryRun.manual":"Manual run (as part of a pipeline).","dryRun.matrix.expandError":"Matrix cannot be expanded: {error}","dryRun.matrix.parent":"[{name}] The matrix parent is not executed itself — {count} clone(s) per workspace are shown.","dryRun.mcp.event":"MCP event {server}:{event}{filter}.","dryRun.mcp.filter":' (filter "{filter}")',"dryRun.mcp.missing":"MCP event (parameters not set).","dryRun.noHistory":"No successful runs in history — duration/tokens/cost estimate is unavailable.","dryRun.once":"One-time run.","dryRun.once.at":"One-time run at {runAt}.","dryRun.taskNotFound":'Task "{task}" not found.',"dryRun.window.noOpening":"Now {reason}: no window opening found, the run is skipped.","dryRun.window.outside":"outside the window","dryRun.window.postpone":"Now {reason}: the run will be postponed to {nextOpenAt}.","dryRun.window.run":"Now {reason}: run policy — the task will execute anyway.","dryRun.window.skip":"Now {reason}: with the skip policy the run will be skipped.","gitTrigger.baseline":"Remembered current commit {commit} — the task will run on the next change.","gitTrigger.branchMismatch":'Branch {branch} does not match the filter "{pattern}".',"gitTrigger.changed":"New commit {commit}: {count} files changed ({files}).","gitTrigger.ignored":"Files changed: {count}, but none match the filters.","gitTrigger.noChanges":"No new commits.","gitTrigger.noRepo":'"{cwd}" is not a git repository — the git trigger will not fire.',"gui.add":"+ Add","gui.addWorkspaceFirst":"Add at least one workspace first.","gui.aggregation":"Aggregation","gui.allowedToolsLabel":"Allowlist (allowedTools)","gui.app.title":"Task scheduler","gui.auditAction":"Action","gui.auditActionPlaceholder":"e.g. task.create","gui.auditActor":"Actor","gui.auditDeletedFrom":"Deleted from","gui.auditEmpty":"No audit records.","gui.auditEnable":"Enable audit","gui.auditHeading":"📜 Audit log","gui.auditHint":"Records mutations of tasks, settings, templates, profiles, workspaces, secrets, imports and history cleanup. Details are masked (secrets replaced with {redacted}).","gui.auditSource":"Source","gui.auditStorageHeading":"Audit log — storage","gui.auditTarget":"Target","gui.auditTargetPlaceholder":"task/secret name","gui.auditTime":"Time","gui.botTokenEnvHint":"You can avoid storing the token in settings.json: set OPENCODE_SCHEDULER_TELEGRAM_BOT_TOKEN and OPENCODE_SCHEDULER_TELEGRAM_CHAT_ID.","gui.botTokenPlaceholder":"Bot token from @BotFather","gui.cancel":"Cancel","gui.chatIdPlaceholder":"chat_id (e.g. 123456789 or -100...)","gui.cleaningUp":"Cleaning up...","gui.cleanupNow":"🧹 Clean up now","gui.collapseFormTitle":"Collapse the form","gui.common.projectDir":"(project folder)","gui.common.unknownError":"Unknown error","gui.concurrencySequentialPlaceholder":"1 (sequential)","gui.concurrencyUnlimitedPlaceholder":"no limit","gui.createProfile":"+ Create","gui.createTask":"➕ Create task","gui.createTaskSubmit":"Create task","gui.creating":"Creating...","gui.cron.custom":"Custom schedule…","gui.cron.dailyAt9":"Every day at 09:00","gui.cron.everyHour":"Every hour","gui.cron.everyMinute":"Every minute","gui.cron.mondayAt10":"Every Monday at 10:00","gui.cronExprLabel":"Cron expression","gui.customTemplate":"Custom template:","gui.dashboardLink":"dashboard link","gui.defaultSuffix":"(default)","gui.delete":"Delete","gui.deleteTemplateTitle":"Delete template","gui.deniedToolsLabel":"Denylist (deniedTools)","gui.dependsOnHint":"The task starts automatically once all selected tasks finish successfully.","gui.dependsOnLabel":"Depends on tasks (successful completion)","gui.digestChannels":"Channels: webhook, Telegram, native OS notifications.","gui.digestDaily":"daily","gui.digestEnable":"Send digest","gui.digestHeading":"Digest","gui.digestHint":"Runs, success rate, cost and top errors per day/week.","gui.digestLastSent":"last sent: {when}","gui.digestNeverSent":"never sent","gui.digestWeekly":"weekly (Mon)","gui.dryRunButton":"🧪 Preview","gui.dryRunLocalTitle":"🧪 Preview (local, based on form fields)","gui.dryRunMatrixPreview":"Matrix: {count, plural, one {# clone} other {# clones}} will be created per workspace; the parent does not run.","gui.dryRunNoNameWarning":"No name — preview is local (form not saved).","gui.dryRunPreviewTitle":"Local preview of the command based on current form fields (no RPC, no run)","gui.editingTask":"Editing task","gui.emptyNormal":"No active tasks. Create your first one and let AI handle the routine!","gui.emptyWinter":"No tasks yet. Time to decorate the tree!","gui.errorBoundaryDetail":"Display error occurred. Try reloading the panel.","gui.expandFormTitle":"Expand the task creation form","gui.export":"Export","gui.exportBusy":"Exporting...","gui.filterExcludePlaceholder":"Exclude tasks (comma-separated, * — wildcard)","gui.filterHint":"Empty “only” list = all tasks. Exclusions beat inclusions.","gui.filterIncludePlaceholder":"Only these tasks (comma-separated, * — wildcard)","gui.filterSummary":"Filter: {scope} · showing {visible} of {total}","gui.gitBranchesLabel":"Branches (glob, comma-separated; empty — any)","gui.gitIgnoreLabel":"Ignored paths (glob, one per line)","gui.gitPathsLabel":"Changed paths (glob, one per line; empty — any file)","gui.gitPollHint":"The first poll records the current HEAD without running the task — then the task starts on a new commit touching matching files.","gui.gitPollLabel":"Poll interval, seconds (min 5, default 60)","gui.hideForm":"Hide form ▴","gui.history.durationMs":"{ms} ms","gui.history.error":"❌ Error","gui.history.modelTitle":"Model: {model}","gui.history.nextTaskTitle":"Next task in the chain was started","gui.history.success":"✅ Success","gui.historyCleanupHint":"Only finished records are deleted; unfinished runs are kept.","gui.historyDeleteOlderLabel":"Delete records older than, days","gui.historyHeading":"🧹 History & retention","gui.historyKeepMaxLabel":"Keep at most records","gui.historyNoExpiry":"no expiry","gui.historyNoLimit":"no limit","gui.historyOlderThan":"older than {days} d","gui.historyUpToRecords":"up to {count} records","gui.import":"Import","gui.importBusy":"Importing...","gui.job.activeDaysTitle":"Run only on days: {days}","gui.job.cancelMatrixTitle":'Cancel running matrix clones "{name}"',"gui.job.deleteMatrixTitle":'Delete matrix "{name}" along with its clones',"gui.job.deleteTitle":'Delete "{name}"',"gui.job.dependsOn":"🔗 Depends on: {list}","gui.job.dryRunTitle":'Dry-Run simulation "{name}"',"gui.job.durationEst":"⏱ ~{seconds} s","gui.job.editTitle":'Edit "{name}"',"gui.job.fanoutConcurrency":", concurrency: {concurrency}","gui.job.fanoutOverrides":", workspace overrides: {overrides}","gui.job.fanoutTitle":"Matrix fan-out: {count} clones, strategy: {strategy}, on failure: {failureMode}{concurrency}{overrides}","gui.job.gitTriggerBranch":" on branch {branch}","gui.job.gitTriggerPaths":", paths: {paths}","gui.job.gitTriggerTitle":"Git trigger: new commit{branch}{paths}. Polling every {seconds} s.","gui.job.historyEmpty":"No runs yet.","gui.job.historyPanelTitle":"📜 Recent runs history","gui.job.historyTitle":'History "{name}"',"gui.job.logonModeUnknown":"unknown","gui.job.logsTitle":'Logs "{name}"',"gui.job.matrixClone":"Matrix clone. Parent: {parent}","gui.job.matrixDone":"📦 Matrix: {success}/{total} succeeded","gui.job.mcpEventFilterSuffix":" (filter: {filter})","gui.job.mcpEventTitle":"MCP event: {event}{filterSuffix}","gui.job.modelTitle":"LLM model: {model}","gui.job.pauseTitle":'Pause "{name}"',"gui.job.pauseUnavailable":'Task "{name}" is absent from the OS scheduler — pausing is unavailable',"gui.job.pausedUntilShort":"⏸ until {date}","gui.job.pausedUntilTitle":"Paused until {date} — the task resumes automatically.","gui.job.priorityTitle":"Priority: {label} ({priority})","gui.job.resumeTitle":'Resume "{name}"',"gui.job.runTitle":'Run "{name}"',"gui.job.runWhenLoggedOffShort":"no logon","gui.job.runWhenLoggedOffTitle":"The task runs without a logged-on user. Scheduler logon mode: {mode}","gui.job.runsLine":"📊 Total: {total} | ✅ {success} | 🟠 {partial} | ❌ {error}","gui.job.runsTitle":"Runs of this task only: succeeded / partial / errors and timeouts","gui.job.sessionContinueShort":"↪ continue","gui.job.sessionContinueTitle":"Continue the last OpenCode session (--continue)","gui.job.sessionReuseShort":"⟳ session","gui.job.sessionReuseTitle":"Reusable OpenCode session","gui.job.sessionReuseTitleId":"Reusable OpenCode session: {id}","gui.job.simulating":"Simulating…","gui.job.simulationFailed":"Simulation failed","gui.job.timezoneTitle":"Task timezone: {tz}","gui.job.tokensEst":"· ~{tokens} tok.","gui.job.toolLimitsTitle":"Tool limits: {limits}","gui.job.totalsLine":"Σ {duration} s · {tokens} tokens{cost}","gui.job.watchFile":"File watch: {path}","gui.job.watchGlobsCount":"✳ {count, plural, one {# mask} other {# masks}}","gui.job.watchGlobsTitle":"File trigger globs: {globs}","gui.job.windowTitle":"Run window: {from}–{to}. Outside the window the run is postponed to its start.","gui.jobStatus.error":"🔴 Error","gui.jobStatus.never":"⚪ Never ran","gui.jobStatus.orphan":"🧟 Not in OS scheduler","gui.jobStatus.partial":"🟠 Partial","gui.jobStatus.paused":"⏸ Paused","gui.jobStatus.running":"🟡 Running: {seconds} s","gui.jobStatus.success":"🟢 Done","gui.jobStatus.unknown":"⚪ Unknown","gui.jobsTitle":"Scheduler","gui.lastCleanupDone":"{when} · deleted {deleted}","gui.lastCleanupLabel":"Last cleanup:","gui.lastCleanupNever":"never run","gui.loading":"Loading...","gui.logs.empty":"(empty)","gui.logs.loadFailed":"Failed to load logs","gui.logs.loading":"Loading logs…","gui.logs.readError":"Failed to read logs:","gui.logsHeading":"Logs","gui.matrix.cancelClonesConfirm":'Cancel running matrix clones "{name}"?',"gui.matrix.deleteConfirm":'Delete matrix "{name}" along with all its clones and the aggregator?',"gui.matrixAggregator":"Create aggregator task matrix-complete (runs after all clones)","gui.matrixAllFailed":"all failed","gui.matrixConcurrency":"Concurrent clones (concurrency)","gui.matrixContinue":"continue — keep going","gui.matrixHint":"Template task fans out into clones per workspace. The parent itself does not run — it launches clones and aggregates the result.","gui.matrixModelPlaceholder":"Model (override)","gui.matrixNotifyEnable":"Notify about matrix completion","gui.matrixNotifyHeading":"Matrices","gui.matrixOverridesTitle":"⚙ Per-workspace settings — {count} overridden","gui.matrixParallel":"parallel — all at once","gui.matrixPerTask":"per-task — per task","gui.matrixPromptPlaceholder":"Prompt (default — the shared form prompt)","gui.matrixSelectHint":"Select at least one workspace — the clone preview will appear here.","gui.matrixSequential":"sequential — one by one","gui.matrixStop":"stop — halt","gui.matrixStuckHint":"A clone running longer than the given time is notified once. 0 — disabled.","gui.matrixStuckMinutes":"stuck clone, min:","gui.matrixSummary":"summary — summary","gui.matrixWillCreate":"Will create {count, plural, one {# clone} other {# clones}}:","gui.matrixWorkspacesSelected":"Workspaces (for the matrix) — selected","gui.maxConcurrentLabel":"Max concurrent tasks:","gui.maxRetriesLabel":"Retry count on failure","gui.mcpEventLabel":"Event name","gui.mcpEventPlaceholder":"e.g. github.pr.opened","gui.mcpFilterHint":"key=value is compared to the payload field; otherwise the filter is treated as regex/substring. Events arrive via RPC emit_event.","gui.mcpFilterLabel":"Filter (optional)","gui.mcpFilterPlaceholder":'e.g. repo="my-project" or regex',"gui.mcpSourceLabel":"MCP server / source","gui.mcpSourcePlaceholder":"e.g. github","gui.metricsTotalsLine":"📊 Total across all tasks: {total} · ✅ {success} · ❌ {error}","gui.metricsTotalsTitle":"Total metrics across all tasks (including archived metric records)","gui.modalShortcutHint":"Ctrl+Enter — save, Escape — cancel","gui.modelHint":"Empty — the default OpenCode model. Otherwise the --model flag is passed.","gui.modelLabel":"LLM model","gui.modelPlaceholder":"default (as in OpenCode)","gui.nativeHint":"Windows Toast, macOS Notification Center, Linux notify-send. No external dependencies.","gui.nativeNotifications":"Native OS notifications","gui.newTask":"New task","gui.noNameFallback":"(no name)","gui.noOtherTasks":"No other tasks yet","gui.noWorkspaceOption":"No workspace — working directory","gui.notifications":"🔔 Notifications","gui.notifyAllRuns":"all runs","gui.notifyDisabled":"disabled","gui.notifyEnable":"Enable notifications","gui.notifyOnlyErrors":"errors only","gui.notifyOnlyOnError":"Only on error","gui.ok":"OK","gui.onFailure":"On failure","gui.oneShotDelayHint":"Or a delay in seconds from the “Create task” click:","gui.oneShotDelayPlaceholder":"e.g. 3600","gui.oneShotHint":"runAt wins: if a time is set, delaySeconds is ignored. After running, the task never repeats.","gui.oneShotTimeLabel":"One-off run time","gui.oneShotTimePlaceholder":"2026-11-14T10:00:00.000Z or local date","gui.openDashboard":"🌐 Open dashboard","gui.openDashboardTitle":"Open the local web dashboard (actual server port)","gui.otherPriorityOption":"Other ({priority})","gui.outsideWindowLabel":"Outside the window or on a disallowed day","gui.parseModeLabel":"markup:","gui.postflightHint":"E.g. git push or npm run build. Runs in the task's working directory even on failure of the main task.","gui.postflightLabel":"Command after the run (Post-flight)","gui.postflightPlaceholder":"e.g. git push","gui.preflightHint":"E.g. git pull or npm install. Runs in the task's working directory. A non-zero exit cancels the run (Pre-flight script failed).","gui.preflightLabel":"Command before the run (Pre-flight)","gui.preflightPlaceholder":"e.g. git pull","gui.priority.critical":"Critical","gui.priority.high":"High","gui.priority.low":"Low","gui.priority.normal":"Normal","gui.priorityHint":"If several tasks are ready at once, the highest-priority task starts first.","gui.priorityLabel":"Priority","gui.profile.deleteConfirm":'Delete profile "{name}" along with its DB, settings and logs?',"gui.profile.namePrompt":"New profile name (latin letters, digits, - and _)","gui.profileActive":"active","gui.profileDelete":"Delete","gui.profileEnvLocked":"The profile is set via the OPENCODE_SCHEDULER_PROFILE variable. Switching in the GUI is unavailable.","gui.profileEnvLockedTitle":"The profile is set via the OPENCODE_SCHEDULER_PROFILE environment variable — switching in the GUI is unavailable","gui.profilePort":"port {port}","gui.profilePortDefault":"default port","gui.profileSwitch":"Switch","gui.profilesHeading":"👤 Profiles","gui.profilesHint":"Each profile has its own DB, settings, logs and dashboard port. Restart OpenCode after switching.","gui.profilesTitle":"Profiles: separate DBs, settings and dashboard port","gui.projectFolderFallback":"(project folder)","gui.promptLabel":"Prompt","gui.promptPlaceholder":"Write a brief market report","gui.promptTemplateLabel":"Prompt template","gui.promptTemplates.codeHygiene":"Code hygiene","gui.promptTemplates.codeHygienePrompt":"Audit code hygiene: find unused imports, unused variables, extra dependencies and suggest fixes.","gui.promptTemplates.custom":"Custom prompt","gui.promptTemplates.morningDigest":"Morning digest","gui.promptTemplates.morningDigestPrompt":"Put together the morning digest: what changed overnight, any failed builds, what needs attention today.","gui.promptTemplates.nightWatch":"Night watch (tests)","gui.promptTemplates.nightWatchPrompt":"Run nightly checks: run the tests, record failures and write a short repo status report.","gui.qualityGateHint":"Runs after the AI responds successfully. Non-zero exit = task failure.","gui.qualityGateLabel":"Verification command (Quality Gate)","gui.qualityGatePlaceholder":"e.g. npm run test","gui.quietFrom":"from","gui.quietHours":"Quiet hours","gui.quietHoursHint":"In quiet hours, success and partial are suppressed; errors and timeouts are sent.","gui.quietTo":"to","gui.refresh":"Refresh","gui.remoteNotSet":"remote not set","gui.retryCount":"retries:","gui.retryDelayLabel":"Delay before retry (sec)","gui.retryDelayMs":"pause, ms:","gui.retryHint":"Retry on network error, timeout, 5xx and 429 (exponential backoff).","gui.runWhenLoggedOffHint":"Windows: the task also runs when nobody is signed in (/ru SYSTEM). It runs in session 0 — without your profile, mapped drives or saved credentials — so tasks that need your files or network may fail. Creating such a task usually requires running OpenCode as administrator.","gui.runWhenLoggedOffLabel":"Run without a logged-on user","gui.save":"💾 Save","gui.saveAsTemplate":"💾 Save as template","gui.saveAsTemplateTitle":"Save current form settings as a template","gui.saving":"Saving...","gui.scheduleLabel":"Schedule","gui.secretNamePlaceholder":"Secret name (A-Za-z0-9_.-)","gui.secretValuePlaceholder":"Value (not returned on read)","gui.secrets":"🔐 Secrets","gui.secretsEmpty":"No secrets. Values are stored encrypted in secrets.json.","gui.secretsUsage":"Use the {secretRef} reference in tasks — the value is injected from the vault at run time and masked in logs.","gui.sendDigestNow":"📊 Send digest now","gui.sendTestNotification":"🧪 Test notification","gui.sending":"Sending...","gui.sessionContinue":"Last (--continue)","gui.sessionLabel":"OpenCode session","gui.sessionMaxRunsHint":"sessionId is generated by the plugin automatically. When the limit is reached the session is removed; the next run starts a clean session.","gui.sessionMaxRunsLabel":"How many runs a session survives (sessionMaxRuns, optional)","gui.sessionNew":"New","gui.sessionReuse":"Reuse","gui.silent":"silent","gui.strategy":"Strategy","gui.task.deleteConfirm":'Delete task "{name}"?',"gui.taskFiltersHeading":"Task filters","gui.taskNameLabel":"Task name","gui.taskNamePlaceholder":"e.g. Gui-Test","gui.tasksHeading":"Tasks","gui.templateErrorPlaceholder":'❌ Task "{task}" failed ({duration}){error}',"gui.templateHint":"Placeholders: {task} {status} {duration} {error} {emoji} {cost} {tokens}. Empty = default template.","gui.templateSuccessPlaceholder":'✅ Task "{task}" completed ({duration})',"gui.templates.deleteConfirm":'Delete template "{name}"?',"gui.templates.namePrompt":"Template name","gui.templatesHeading":"Message templates","gui.timeoutMs":"Timeout, ms:","gui.timezoneHint":"Another zone — the task wakes every minute, cron is checked in that zone.","gui.timezoneLabel":"Time zone (IANA)","gui.timezonePlaceholder":"Empty — system zone","gui.toast.chooseFile":"Choose a file","gui.toast.deleteFailed":"Delete failed","gui.toast.digestFailed":"Digest was not sent","gui.toast.digestSent":"Digest sent","gui.toast.envInvalid":"Invalid env format","gui.toast.envSaveError":"Failed to save env","gui.toast.envSaveFailed":"Could not save env","gui.toast.envSaved":"Env variables saved","gui.toast.exportFailed":"Export failed","gui.toast.exported":"Tasks exported: {count}","gui.toast.historyCleanupDone":"History cleanup completed","gui.toast.historyCleanupFailed":"History cleanup failed","gui.toast.historyLoadFailed":"Failed to load history","gui.toast.importFailed":"Import failed","gui.toast.imported":"Tasks imported: {count}","gui.toast.jobsLoadFailed":"Failed to load tasks","gui.toast.logsReadFailed":"Failed to read logs","gui.toast.matrixCancelError":"Matrix cancel failed","gui.toast.matrixCancelFailed":"Could not cancel the matrix","gui.toast.noFileForImport":"No file selected for import.","gui.toast.nothingToSave":"Nothing to save","gui.toast.pauseError":"Pause failed","gui.toast.pauseFailed":'Could not pause "{name}"',"gui.toast.paused":'Task "{name}" paused',"gui.toast.profileCreateError":"Profile creation failed","gui.toast.profileCreateFailed":"Could not create the profile","gui.toast.profileCreated":"Profile created","gui.toast.profileDeleteError":"Profile deletion failed","gui.toast.profileDeleteFailed":"Could not delete the profile","gui.toast.profileDeleted":"Profile deleted","gui.toast.profileSwitchError":"Profile switch failed","gui.toast.profileSwitchFailed":"Could not switch the profile","gui.toast.profileSwitched":"Profile switched","gui.toast.promptRequired":"Fill in the prompt first — it is required for a template.","gui.toast.resumeError":"Resume failed","gui.toast.resumeFailed":'Could not resume "{name}"',"gui.toast.resumed":'Task "{name}" resumed',"gui.toast.runFailed":"Run failed","gui.toast.secretDeleted":"Secret deleted","gui.toast.secretNotDeleted":"Secret not deleted","gui.toast.secretNotSaved":"Secret not saved","gui.toast.secretSaved":"Secret saved","gui.toast.settingsSaveFailed":"Could not save settings","gui.toast.taskCrashed":'Task "{name}" failed',"gui.toast.taskCreateFailed":"Task creation failed","gui.toast.taskCreated":"Task created","gui.toast.taskDeleted":'Task "{name}" deleted',"gui.toast.taskDone":'Task "{name}" completed',"gui.toast.taskStartFailed":'Could not start "{name}"',"gui.toast.taskStarted":'Task "{name}" started',"gui.toast.taskUpdateFailed":"Task update failed","gui.toast.taskUpdated":"Task updated","gui.toast.templateDeleteError":"Template deletion failed","gui.toast.templateDeleteFailed":"Could not delete the template","gui.toast.templateDeleted":'Template "{name}" deleted',"gui.toast.templateSaveError":"Template save failed","gui.toast.templateSaveFailed":"Could not save the template","gui.toast.templateSaved":'Template "{name}" saved',"gui.toast.testFailed":"Test failed","gui.toast.testSent":"Test notification sent","gui.toast.workspaceAddFailed":"Workspace add failed","gui.toast.workspaceAdded":"Workspace added","gui.toast.workspaceDeleteFailed":"Workspace delete failed","gui.toast.workspaceDeleted":"Workspace deleted","gui.toast.workspaceUpdateFailed":"Workspace update failed","gui.toast.workspaceUpdated":"Workspace updated","gui.toolLimitsDenied":"On conflict, denied wins. An empty allowedTools is forbidden.","gui.toolLimitsHeading":"🔒 Tool limits","gui.toolLimitsNote":"⚠ Metadata-only: opencode 2.2.3 has no allow/deny flags — limits are recorded in logs and history.","gui.toolPlaceholder":"custom tool, e.g. websearch","gui.triggerCron":"On a schedule (Cron)","gui.triggerFile":"On file change","gui.triggerGit":"New commit (Git)","gui.triggerOnce":"Once","gui.triggerTypeLabel":"Trigger type","gui.uiError":"UI error: {message}","gui.unboundedPlaceholder":"no limit","gui.validation.cronRequired":"Specify a cron schedule.","gui.validation.dependsOnSelf":"A task cannot depend on itself.","gui.validation.gitPollInvalid":"Git poll interval — a whole number of seconds of at least 5.","gui.validation.gitWorkspaceRequired":"For a git trigger, pick a workspace or set a working directory.","gui.validation.matrixConcurrencyInvalid":"Matrix concurrency — a positive whole number.","gui.validation.matrixWorkspacesRequired":"Select at least one workspace for the matrix.","gui.validation.priorityInvalid":"Priority — a whole number from 0 to 10.","gui.validation.promptRequired":"Specify a prompt.","gui.validation.retryCountInvalid":"Retry count — a whole number ≥ 0.","gui.validation.retryDelayInvalid":"Retry delay — a whole number of seconds ≥ 0.","gui.validation.runAtRequired":"Specify a run time or a delay.","gui.validation.sessionMaxRunsInvalid":"Session run limit — a positive whole number.","gui.validation.taskNameRequired":"Specify a task name.","gui.validation.timezoneInvalid":"Unknown time zone. Use an IANA zone, e.g. Europe/Moscow.","gui.validation.windowPairRequired":"The run window is set only as a from/to pair.","gui.watchFileLabel":"Path of the file to watch","gui.watchFilePlaceholder":"e.g. C:\\project\\src\\main.ts","gui.watchGlobsHint":"Globs are resolved from the watchPath. Supports *, **, ? and [abc] classes; a directory glob with /** is recursive.","gui.watchGlobsLabel":"Glob patterns (one per line, empty — any change)","gui.watchIgnoreLabel":"Excludes (glob, one per line)","gui.webhookLabel":"Webhook (Discord / Slack / generic)","gui.webhookPostHint":"POST with JSON {payload} — compatible with Discord and Slack.","gui.weekday.0":"Sun","gui.weekday.1":"Mon","gui.weekday.2":"Tue","gui.weekday.3":"Wed","gui.weekday.4":"Thu","gui.weekday.5":"Fri","gui.weekday.6":"Sat","gui.weekdaysLabel":"Days of week (empty — all days)","gui.windowEndTitle":"Window end (may be earlier than the start)","gui.windowHint":"Outside the window the run is postponed to the start of the window, not skipped. E.g. 22:00 — 06:00.","gui.windowLabel":"Run window (optional)","gui.windowPolicyHint":"For cron the policy is applied in the wrapper; for file and git triggers — when the event is handled. A postpone waits no longer than 12 hours.","gui.windowPostpone":"Postpone to window start (default)","gui.windowRun":"Run anyway","gui.windowSkip":"Skip the run","gui.windowStartTitle":"Window start","gui.winterMode":"❄️ Winter mode","gui.winterModeTitle":"Toggle the winter theme","gui.withSound":"with sound","gui.workingDirectoryHint":"The task runs opencode run in this folder — MCP servers from opencode.json are picked up here.","gui.workingDirectoryLabel":"Working directory","gui.workingDirectoryPlaceholder":"default — project folder","gui.workspace.deleteConfirm":'Delete workspace "{name}"? Tasks are kept, the binding is cleared.',"gui.workspace.envFilePrompt":"Path to the workspace .env file (optional, empty — none)","gui.workspace.envInvalidHelp":"Lines must be KEY=VALUE; name — latin/digits/_","gui.workspace.envPrompt":`Workspace env variables, one per line KEY=VALUE
|
|
2
|
+
(empty clears)`,"gui.workspace.envSecretsMasked":"Secrets are masked in logs","gui.workspace.namePrompt":"Workspace name (optional)","gui.workspace.namePromptShort":"Workspace name","gui.workspace.pathPrompt":"Path to the git repository (workspace)","gui.workspace.pathPromptShort":"Path to the git repository","gui.workspaceAddTitle":"Add a workspace (git repository)","gui.workspaceAll":"All workspaces","gui.workspaceDeleteTitle":"Delete workspace (tasks are kept)","gui.workspaceEditTitle":"Edit workspace","gui.workspaceEmpty":"No workspaces added. A task without a workspace uses the project working directory.","gui.workspaceEnvFile":" · .env file","gui.workspaceEnvLine":"{count} vars","gui.workspaceEnvTitle":"Workspace env variables (secrets are masked in logs)","gui.workspaceFilterTitle":"Filter tasks by workspace","gui.workspaceGitInfo":"git: {branch} · {remote}","gui.workspaceMultiRepo":"Workspace (multi-repo)","gui.workspaceNone":"No workspace","gui.zeroKeepByAge":"0 = don't delete by age","gui.zeroNoLimit":"0 = no limit","gui.zeroUnlimited":"(0 = no limit)","matrix.aggregate.empty":'Matrix "{parent}" has no clones.',"matrix.aggregate.partial":"Partial success: {success} of {total} succeeded, {errors} failed.","matrix.aggregate.running":"Running: {done} of {total}.","matrix.aggregate.stopped":"Stopped after the first error: {errors} of {total} failed.","matrix.aggregate.stoppedFirst":" First error ({name}): {error}","matrix.aggregate.success":"All {total} clones finished successfully.","matrix.aggregator.prompt":'All clones of matrix "{parent}" finished. Check the results: {clones}.',"matrix.cancel.defaultReason":"Cancelled by the user.","matrix.clone.runningChanges":'Clone "{name}" is running — changes will be applied after it finishes.',"matrix.clone.runningDeletion":'Clone "{name}" is running — deletion is postponed until it finishes.',"matrix.deletionGuard":`Task "{name}" is a clone of matrix "{parent}". Delete the whole matrix (parent + all clones) or change the parent's workspace list.`,"matrix.error.cloneCreation":'Task "{task}": failed to create any matrix clone.',"matrix.error.noClones":'Matrix "{task}" has no clones — recreate the task to expand it across workspaces.',"matrix.error.notMatrix":'Task "{task}" is not a matrix.',"matrix.error.workspaceIdsEmpty":'Task "{task}": matrix.workspaceIds cannot be empty.',"matrix.error.workspaceMissing":'Task "{task}": workspace "{workspace}" not found.',"notify.digest.cost":"Cost: {cost} · tokens: {tokens}","notify.digest.noErrors":"No errors 🎉","notify.digest.period.daily":"for the last day","notify.digest.period.weekly":"for the week","notify.digest.runs":"Runs: {total} — ✅ {success}, ❌ {error}, ⚠️ {partial} ({rate}%)","notify.digest.title":"📊 Digest {period} ({date})","notify.digest.topErrorRow":"• {message} — {count}","notify.digest.topErrors":"Top errors:","notify.error.digestDisabled":"Notifications are disabled.","notify.error.digestFailed":"Failed to deliver the digest to any channel.","notify.error.digestMissing":"Digest settings not found.","notify.error.digestNoChannels":"All channels are disabled. Enable webhook, Telegram or native notifications.","notify.error.nativeFailed":"failed to show the notification","notify.error.telegramApiBaseInvalid":"Invalid Telegram API address.","notify.error.telegramChatMissing":"Telegram chat_id is not set.","notify.error.telegramNoCreds":"Telegram is enabled, but botToken/chatId are not set.","notify.error.telegramScheme":"Telegram API supports only http:// or https://.","notify.error.telegramTimeout":"Telegram API timeout ({seconds} s).","notify.error.telegramTokenInvalid":"Invalid Telegram bot token.","notify.error.telegramTokenMissing":"Telegram bot token is not set.","notify.error.testChannelOff":"Channel {channel} is disabled.","notify.error.testDisabled":"Notifications are disabled. Turn on the main switch.","notify.error.testNoChannels":"All channels are disabled. Enable webhook, Telegram or native notifications.","notify.error.testNotSent":"Test notification was not sent.","notify.error.testUnknown":"unknown error","notify.error.webhookScheme":"Webhook supports only http:// or https://.","notify.error.webhookTimeout":"Request timeout ({seconds} s).","notify.error.webhookUrlInvalid":"Invalid webhook URL.","notify.error.webhookUrlMissing":"Webhook URL is not set.","notify.matrix.failed":'❌ Matrix "{parent}" finished with errors: {success} succeeded, {error} failed out of {total}.',"notify.matrix.failedAll":'❌ Matrix "{parent}": all {total} clones failed.',"notify.matrix.partial":'⚠️ Matrix "{parent}" finished partially: {success} of {total} succeeded, {error} failed.',"notify.matrix.success":'✅ Matrix "{parent}" finished: {success} of {total} clones succeeded.',"notify.native.title":"OpenCode Scheduler","notify.ok.digestSent":"Digest sent.","notify.reason":": {error}","notify.stuck":'⏳ Matrix "{parent}": clone "{clone}" has been running longer than {minutes} min (started {startedAt}).',"notify.task.error":'❌ Task "{task}" failed ({duration}){error}{cost}',"notify.task.success":'✅ Task "{task}" completed ({duration}){cost}',"notify.telegram.openDashboard":"📊 Open dashboard","notify.telegram.openDashboardUrl":"📊 Open dashboard: {url}","notify.test.body":"🧪 Test notification from OpenCode Scheduler — the channel is configured correctly.","notify.test.errors":"Errors: {errors}.","notify.test.sent":"Sent: {channels}.","notify.usage.tokens":"{tokens} tok","schedule.error.cronEmptyItem":'Empty item in the list "{token}".',"schedule.error.cronFields":'Expected 5 cron fields, got {count}: "{raw}".',"schedule.error.cronRangeBounds":'Range "{item}" is outside {min}..{max}.',"schedule.error.cronRangeInvalid":'Invalid range "{item}".',"schedule.error.cronStepInvalid":'Invalid step "/{step}" in "{raw}".',"schedule.error.cronStepMissing":'Invalid step in "{raw}": nothing before "/".',"schedule.error.cronValueBounds":'Value "{raw}" is outside {min}..{max}.',"schedule.error.everyInterval":'Unsupported interval "@every {value}" (m: 1..59, h: 1..23, d: 1..31).',"schedule.error.lastDomOnly":'"L" is supported only in the day-of-month field.',"schedule.error.notAfterFormat":'notAfter must be in HH:MM format, not "{value}".',"schedule.error.notBeforeFormat":'notBefore must be in HH:MM format, not "{value}".',"schedule.error.weekdayBounds":'Weekday "{value}" is outside 0..7 in "{field}".',"schedule.reason.dayNotAllowed":"weekday not allowed ({days})","schedule.reason.outsideWindow":"time outside the window {notBefore}–{notAfter}","schedule.weekday.0":"Sun","schedule.weekday.1":"Mon","schedule.weekday.2":"Tue","schedule.weekday.3":"Wed","schedule.weekday.4":"Thu","schedule.weekday.5":"Fri","schedule.weekday.6":"Sat","server.hookTaskMissing":'Task "{task}" not found — hook rejected.',"server.matrixNotFound":'Matrix "{parentId}" not found.',"server.methodNotAllowed":"Method not allowed.","server.notFound":"Page not found.","server.taskNotFound":'Task "{task}" not found.',"tool.error.allowedToolsEmpty":'Task "{task}": an empty allowedTools is not allowed — provide a tool list or omit the field.',"tool.error.cronSchedule":"triggerType=cron requires a schedule cron expression.","tool.error.gitCwdRequired":'Task "{task}": a git trigger requires a working directory or workspace.',"tool.error.gitNoRepo":'Task "{task}": a git trigger requires a git repository at "{path}".',"tool.error.matrixCloneFailed":'clone "{clone}" (workspace "{workspace}"): {error}',"tool.error.matrixConcurrency":'Task "{task}": matrix.concurrency must be a number not less than 1.',"tool.error.matrixExpandRuntime":'Failed to expand matrix "{name}": {error}. Created clones were removed.',"tool.error.matrixNoClones":'Matrix "{name}" has no clones.',"tool.error.matrixNotMatrix":'Task "{name}" is not a matrix.',"tool.error.matrixOverride":'Task "{task}": matrix.overrides contains workspace "{workspace}" that is not listed in workspaceIds.',"tool.error.mcpEventRequired":"An MCP trigger requires an event name (mcpEvent.event).","tool.error.onceFields":"runAt/delaySeconds are only allowed with triggerType=once.","tool.error.onceMatrixSchema":"One-shot cannot be combined with matrix: a matrix is started manually only.","tool.error.onceMatrixUpdate":"One-shot cannot be combined with matrix.","tool.error.onceSchedule":"triggerType=once requires runAt (ISO-8601) or delaySeconds.","tool.error.oneShotMatrix":'Task "{name}": one-shot cannot be combined with matrix. Start the matrix manually or use a cron/file trigger.',"tool.error.pauseDateInvalid":'Task "{name}": invalid pause date "{until}". An ISO instant is required, e.g. 2026-12-01T09:00:00Z.',"tool.error.pauseDatePast":'Task "{name}": the pause date has already passed.',"tool.error.prepareFiles":"Failed to prepare task files: {error}","tool.error.schedulerKeptFiles":"Wrapper files were kept for diagnostics.","tool.error.schedulerNotConfirmed":'The scheduler did not confirm creation of task "{task}": it is missing from {scheduler}.',"tool.error.schedulerRemovedFiles":"Task files were removed; no database record was created.","tool.error.sessionMaxRuns":'Task "{name}": sessionMaxRuns must be an integer ≥ 1.',"tool.error.sessionUnknown":'Task "{name}": unknown session mode "{session}".',"tool.error.taskNameMissing":"Task name is required.","tool.error.taskNotFound":'Task "{name}" not found.',"tool.error.taskReason":'Task "{name}": {error}',"tool.error.timezone":'Task "{task}": unknown timezone "{timezone}". Specify an IANA zone, e.g. Europe/Moscow.',"tool.error.updateCron":'Updating task "{name}" requires a cron schedule.',"tool.error.updatePrompt":'Updating task "{name}" requires a prompt.',"tool.error.window":'Task "{task}": {error}',"tool.error.workspaceIdConflict":'Task "{task}": workspaceId and matrix.workspaceIds cannot be used together.',"tool.error.workspaceIdMissing":"Workspace '{id}' not found.","tool.error.workspaceIdsEmpty":'Task "{task}": matrix.workspaceIds cannot be empty.',"tool.error.workspaceMissing":'Task "{task}": workspace "{id}" not found.',"tool.error.workspacePathMissing":"Workspace '{name}' is unavailable at '{path}'","tool.error.workspaceUnavailable":'Task "{task}": workspace "{workspace}" is unavailable at "{path}".',"tool.error.wrapper":"Failed to create the task wrapper: {error}","tool.event.nameRequired":"Event name is required.","tool.event.nameRequiredShort":"Event name is required (eventName).","tool.event.none":'No tasks are subscribed to event "{event}".',"tool.event.processed":'Event "{event}" processed. Tasks started: {count}.',"tool.event.triggered":"Tasks started: {count}.","tool.history.cleanFailed":"Failed to clean history: {error}","tool.history.cleaned":"Deleted {deleted} records (by age: {byAge}, by limit: {byCount}), {kept} left.","tool.matrix.actionName":"action={action} requires the matrix name.","tool.matrix.cancelFinished":"Already finished and left untouched: {count}.","tool.matrix.cancelRunning":"Stopped running: {count}.","tool.matrix.cancelSummary":'Matrix "{matrix}": cancelled {cancelled} of {total} clones.',"tool.matrix.cancelWarnings":"Warnings: {warnings}.","tool.matrix.completed":'Matrix "{name}" completed. Check the clone results: {clones}.',"tool.matrix.limit":"The concurrent task limit has been reached. Wait for the current tasks to finish.","tool.matrix.orphansNone":"No orphaned tasks found.","tool.matrix.orphansRemoved":"Removed orphaned tasks: {count}.","tool.matrix.parentMissing":"Matrix parentId is required.","tool.matrix.recreateFailed":"{clone}: failed to recreate — {error}","tool.matrix.started":'Matrix "{name}": started {started} of {total}',"tool.matrix.startedErrors":". Errors: {errors}","tool.matrix.startedSkipped":", skipped {count}","tool.matrix.stopFailed":"{clone}: failed to stop — {error}","tool.profile.active":"Active profile: {name}. Restart OpenCode to apply the changes.","tool.profile.created":'Profile "{name}" created (dashboard port {port}).',"tool.profile.deleted":'Profile "{name}" deleted along with its database and settings.',"tool.profile.envVar":"The profile is set by OPENCODE_SCHEDULER_PROFILE={name}. Restart OpenCode.","tool.profile.envVarLong":"The profile is set by OPENCODE_SCHEDULER_PROFILE={name}. Restart OpenCode to apply the changes.","tool.profile.nameRequired":"action={action} requires a profile name.","tool.profile.notFound":"Profile not found.","tool.secret.deleted":"Secret {name} deleted.","tool.secret.nameRequired":"set/delete requires a secret name.","tool.secret.needName":"A secret name is required.","tool.secret.needValue":"A non-empty secret value is required.","tool.secret.notFound":"Secret {name} not found.","tool.secret.saved":"Secret {name} saved in encrypted form.","tool.secret.valueRequired":"action=set requires a non-empty value.","tool.settings.updateFields":"For action=update pass at least one field: maxConcurrent, locale, winterMode, notifications, history, integrations or audit.","tool.task.alreadyAbsent":'Task "{name}" is already absent (deleted or never existed).',"tool.task.alreadyRunning":'Task "{name}" is already running.',"tool.task.autosave":"failed to save auto-resume: {error}","tool.task.created":'Task "{name}" created successfully.',"tool.task.deleted":'Task "{name}" deleted successfully.',"tool.task.found":"Tasks found: {count}.","tool.task.foundOsUnavailable":"Tasks found: {count}. OS scheduler status is unavailable — showing database state.","tool.task.listEmpty":"No plugin tasks found.","tool.task.listOsUnavailable":"OS scheduler status is unavailable — showing database state.","tool.task.matrixDeletedCount":'Matrix "{name}" deleted along with {count} tasks (clones and aggregator).',"tool.task.matrixDeletedList":'Matrix "{name}" deleted along with its clones: {list}.',"tool.task.matrixPauseErrors":" Errors: {warnings}.","tool.task.matrixPaused":'Matrix "{name}" {verb}{until}: {affected} of {total} clones.',"tool.task.pauseError":" Error: {warnings}.","tool.task.paused":"paused","tool.task.pausedText":'Task "{name}" {verb}{until}.',"tool.task.resumed":"resumed","tool.task.rollbackFailed":'{cause} Rollback failed: {restore}. Task "{name}" is missing from the scheduler — create it again.',"tool.task.rollbackKept":"{cause} The previous version was left untouched: the task could not be removed from the scheduler.","tool.task.rollbackRestored":"{cause} The update was cancelled and the previous version restored.","tool.task.started":'Task "{name}" started.',"tool.task.until":" until {date}","tool.task.updated":'Task "{name}" updated.',"tool.template.deleted":"Template {id} deleted.","tool.template.namePromptRequired":"A non-empty template name and prompt are required.","tool.template.needDeleteId":"action=delete requires the template id.","tool.template.needId":"Template id is required.","tool.template.notFound":"Template {id} not found.","tool.template.saveRequired":"action=save requires non-empty name and prompt.","tool.transfer.importData":"action=import requires export data.","tool.transfer.noData":"Import data is required.","tool.transfer.noTasks":"The data contains no tasks to import.","tool.transfer.noTasksInFile":"The file contains no tasks to import.","tool.workspace.deleted":"Workspace deleted. Tasks were kept and their binding was cleared.","tool.workspace.needDeleteId":"action=delete requires id.","tool.workspace.needPath":"action=add requires path.","tool.workspace.needUpdateId":"action=update requires id.","tool.workspace.notFound":"Workspace not found."};var Cc=e.template("<div><div style=display:flex;justify-content:space-between;align-items:center;gap:12px;width:100%><div style=display:flex;align-items:center;gap:12px;flex:1;min-width:0><div style=flex:1;min-width:0><div style=display:flex;align-items:center;gap:6px;min-width:0><div style=font-weight:700;font-size:16px;color:#ffffff;white-space:nowrap;overflow:hidden;text-overflow:ellipsis></div></div><div style=font-size:12px;color:#a0a0a6;margin-top:4px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis></div></div><div style=display:flex;align-items:center;gap:8px;flex-shrink:0;min-width:110px></div></div><div style=display:flex;gap:6px><button></button><button></button><button>📄</button><button>🧪</button><button>📜</button><button>✏️"),Ec=e.template("<span>📦 "),Pc=e.template('<span style="font-size:11px;font-weight:600;flex-shrink:0;cursor:help;white-space:nowrap;padding:2px 7px;border-radius:999px;border:1px solid #ff9f0a;color:#ff9f0a;background:rgba(255,159,10,0.12)">📦 Matrix (<!>)'),zc=e.template('<span style="font-size:11px;font-weight:600;flex-shrink:0;cursor:help;white-space:nowrap;padding:2px 7px;border-radius:999px;border:1px solid #8e8e93;color:#b0b0b6;background:rgba(142,142,147,0.12)">↳ matrix '),Rc=e.template("<span style=font-size:13px;flex-shrink:0;cursor:help>👁️"),Lc=e.template('<span style="font-size:11px;font-weight:600;flex-shrink:0;cursor:help;white-space:nowrap;padding:2px 7px;border-radius:999px;border:1px solid #5ac8fa;color:#5ac8fa;background:rgba(90,200,250,0.12)">'),Ac=e.template('<span style="font-size:11px;font-weight:600;flex-shrink:0;cursor:help;white-space:nowrap;padding:2px 7px;border-radius:999px;border:1px solid #ff9f0a;color:#ff9f0a;background:rgba(255,159,10,0.12)">🔀 git'),Dc=e.template('<span style="font-size:11px;font-weight:600;flex-shrink:0;cursor:help;white-space:nowrap;padding:2px 7px;border-radius:999px;border:1px solid #30d158;color:#30d158;background:rgba(48,209,88,0.12)">📅 <!>/7'),Mc=e.template('<span style="font-size:11px;font-weight:600;flex-shrink:0;cursor:help;white-space:nowrap;padding:2px 7px;border-radius:999px;border:1px solid #64d2ff;color:#64d2ff;background:rgba(100,210,255,0.12)">🌍 '),Fc=e.template('<span style="font-size:11px;font-weight:600;flex-shrink:0;cursor:help;white-space:nowrap;padding:2px 7px;border-radius:999px;border:1px solid #bf5af2;color:#bf5af2;background:rgba(191,90,242,0.12)">🪟 <!>–'),Oc=e.template('<span style="font-size:11px;font-weight:600;flex-shrink:0;cursor:help;white-space:nowrap;padding:2px 7px;border-radius:999px;border:1px solid #ffd60a;color:#ffd60a;background:rgba(255,214,10,0.12)">'),Ic=e.template('<span style="font-size:11px;font-weight:600;flex-shrink:0;cursor:help;white-space:nowrap;padding:2px 7px;border-radius:999px;border:1px solid #ff9f0a;color:#ff9f0a;background:rgba(255,159,10,0.12)">🌙 '),jc=e.template("<span style=font-size:13px;flex-shrink:0;cursor:help>⚡"),Nc=e.template("<span style=font-size:13px;flex-shrink:0;cursor:help>📡"),qc=e.template('<span style="font-size:11px;font-weight:600;flex-shrink:0;cursor:help;white-space:nowrap;padding:2px 7px;border-radius:999px;border:1px solid #30d158;color:#30d158;background:rgba(48,209,88,0.12)">'),Hc=e.template("<span style=font-size:12px;flex-shrink:0;cursor:help;color:#c084fc;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:200px>🧠 "),Wc=e.template("<span style=font-size:12px;flex-shrink:0;cursor:help;color:#f5a623;white-space:nowrap>🚀 "),Bc=e.template("<span style=font-size:13px;flex-shrink:0;cursor:help>🔒"),Uc=e.template("<div style=display:flex;flex-direction:column;gap:2px;margin-top:4px;font-size:11px;line-height:1.35><span style=color:#5ac8fa;white-space:nowrap;overflow:hidden;text-overflow:ellipsis>"),Gc=e.template("<div style=display:flex;flex-direction:column;gap:2px;margin-top:4px;font-size:11px;line-height:1.35><span>"),Vc=e.template("<div style=display:flex;align-items:center;gap:8px;font-size:12px;color:#a0a0a6;margin-top:2px><span style=white-space:nowrap;overflow:hidden;text-overflow:ellipsis>"),Kc=e.template("<span>→ "),Yc=e.template("<div style=font-size:12px;color:#f5a623;font-weight:600;white-space:nowrap>"),Jc=e.template("<div style=font-size:12px;font-weight:600;white-space:nowrap>"),Qc=e.template("<button>⛔"),Zc=e.template("<button>🗑"),Xc=e.template('<div style="margin-top:8px;padding:8px 12px;background:#1e1e1e;border:1px solid #333;border-radius:6px;display:flex;flex-direction:column;gap:6px;width:100%"><div style=font-size:12px;font-weight:600;color:#ffffff;display:flex;align-items:center;gap:6px><button style=background:none;border:none;color:#8e8e93;cursor:pointer;font-size:14px;padding:0>✕'),Il=e.template('<div style="font-size:12px;color:#8e8e93;padding:6px 0">'),eg=e.template('<div style="display:flex;align-items:flex-start;gap:10px;font-size:12px;color:#e0e0e0;padding:4px 0;border-bottom:1px solid #333"><span style=color:#8e8e93;white-space:nowrap></span><span style=fontWeight:600;whiteSpace:nowrap></span><span style=color:#b0b0b0;white-space:nowrap>'),tg=e.template("<span style=color:#c084fc;white-space:nowrap>🧠 "),rg=e.template("<span style=whiteSpace:nowrap>⚡ pre: "),ig=e.template("<span style=whiteSpace:nowrap>⚡ post: "),og=e.template("<div style=margin-top:2px;color:#ff6b6b;font-size:11px;white-space:pre-wrap;word-break:break-word>"),ng=e.template("<span style=color:#5ac8fa;font-size:11px;white-space:nowrap>🔗 → "),ag=e.template('<div style="margin-top:8px;padding:8px 12px;background:#1e1e1e;border:1px solid #333;border-radius:6px;display:flex;flex-direction:column;gap:6px;width:100%"><div style=font-size:12px;font-weight:600;color:#ffffff;display:flex;align-items:center;gap:6px>🧪 Dry-Run: <button style=background:none;border:none;color:#8e8e93;cursor:pointer;font-size:14px;padding:0>✕'),sg=e.template('<div style="font-size:12px;color:#ff6b6b;padding:6px 0">❌ '),lg=e.template("<div style=display:flex;flex-direction:column;gap:4px>"),dg=e.template('<div style="font-size:11px;color:#f5a623;padding:4px 0">⚠ '),ug=e.template('<div style="font-size:11px;color:#e0e0e0;padding:4px 0;border-bottom:1px solid #333;display:flex;flex-wrap:wrap;gap:6px;align-items:baseline"><span style=color:#8e8e93;white-space:nowrap>#<!> </span><span style=font-weight:600;white-space:nowrap>🧪 </span><span style=color:#8e8e93;white-space:nowrap>cwd: </span><div style=width:100%;color:#a0a0a6;overflow-wrap:anywhere>$ '),pg=e.template("<span style=color:#5ac8fa;white-space:nowrap>📦 "),cg=e.template("<span style=color:#ff9f0a;white-space:nowrap>↳ matrix "),gg=e.template("<span style=cursor:help>🔒"),jl=e.template("<span style=color:#8e8e93;white-space:nowrap>"),mg=e.template("<span style=color:#8e8e93;white-space:nowrap>· ~$"),fg=e.template("<div style=width:100%;color:#8e8e93;overflow-wrap:anywhere>⚡ pre: "),yg=e.template("<div style=width:100%;color:#8e8e93;overflow-wrap:anywhere>⚡ post: "),bg=e.template("<div style=width:100%;color:#8e8e93;overflow-wrap:anywhere>✅ QG: "),xg=e.template('<div style="font-size:11px;color:#b0b0b0;padding:4px 0">'),hg=e.template('<div class=scheduler-panel-root><style>.scheduler-panel-root > * { flex-shrink: 0; }</style><div style=display:flex;align-items:flex-start;justify-content:space-between;gap:12px;flex-wrap:wrap><div style=min-width:0><h2 style=margin:0;font-size:22px;font-weight:800;letter-spacing:0.2px;line-height:1.2;color:#ffffff></h2><div style=margin-top:5px;font-size:11px;font-weight:600;letter-spacing:1.2px;text-transform:uppercase;color:#8e8e93>Local AI CI/CD Orchestrator</div><div style=margin-top:4px;font-size:11px;color:#8e8e93></div></div><div style=display:flex;align-items:center;gap:10px;flex-wrap:wrap><select style="padding:6px 10px;border-radius:999px;cursor:pointer;font-size:12px;border:1px solid #333;background:#1e1e1e;color:#e0e0e0;outline:none;max-width:200px"><option value=all></option><option value=none></option></select><button>👤 </button><button style="display:flex;align-items:center;gap:6px;padding:6px 12px;border-radius:999px;cursor:pointer;font-size:12px;user-select:none;white-space:nowrap;transition:background 0.2s ease, border-color 0.2s ease;border:1px solid #333;background:#1e1e1e;color:#e0e0e0"></button><label><input type=checkbox style=accent-color:#5ac8fa;cursor:pointer;margin:0></label></div></div><div style=display:flex;gap:8px;flex-wrap:wrap;margin-top:8px><button></button><input type=file accept=.json style=display:none><button></button></div><div style=display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin-top:8px><label style=font-size:12px;color:#b0b0b0;font-weight:500;white-space:nowrap></label><input type=number min=0 style="width:60px;padding:4px 6px;background:#1e1e1e;border:1px solid #333;border-radius:4px;color:#fff;font-size:12px;outline:none"><span style=font-size:11px;color:#8e8e93;white-space:nowrap></span></div><div style="width:100%;max-width:700px;box-sizing:border-box;margin-top:8px;background:#1e1e1e;border:1px solid #333;border-radius:10px;overflow:hidden"><button style="display:flex;align-items:center;justify-content:space-between;gap:8px;width:100%;box-sizing:border-box;padding:10px 14px;background:transparent;border:none;color:#e0e0e0;font-size:12px;font-weight:600;cursor:pointer;text-align:left"><span></span><span style=display:flex;align-items:center;gap:8px;font-size:11px;font-weight:400;color:#8e8e93><span></span></span></button></div><div style="width:100%;max-width:700px;box-sizing:border-box;margin-top:8px;background:#1e1e1e;border:1px solid #333;border-radius:10px;overflow:hidden"><button style="display:flex;align-items:center;justify-content:space-between;gap:8px;width:100%;box-sizing:border-box;padding:10px 14px;background:transparent;border:none;color:#e0e0e0;font-size:12px;font-weight:600;cursor:pointer;text-align:left"><span></span><span style=display:flex;align-items:center;gap:8px;font-size:11px;font-weight:400;color:#8e8e93> · <span></span></span></button></div><div style="width:100%;max-width:900px;box-sizing:border-box;margin-top:8px;background:#1e1e1e;border:1px solid #333;border-radius:10px;overflow:hidden"><div style="display:flex;align-items:center;justify-content:space-between;gap:8px;padding:10px 14px"><button style=display:flex;align-items:center;gap:8px;background:transparent;border:none;color:#e0e0e0;font-size:12px;font-weight:600;cursor:pointer;text-align:left;padding:0><span></span><span style=font-size:11px;font-weight:400;color:#8e8e93></span><span style=font-size:11px;color:#8e8e93></span></button></div></div><div style="width:100%;max-width:700px;box-sizing:border-box;margin-top:8px;background:#1e1e1e;border:1px solid #333;border-radius:10px;overflow:hidden"><div style="display:flex;align-items:center;justify-content:space-between;gap:8px;padding:10px 14px"><span style=font-size:12px;font-weight:600;color:#e0e0e0></span></div><div style="padding:0 14px 14px;display:flex;flex-direction:column;gap:10px"><div style=display:flex;align-items:center;gap:8px;flex-wrap:wrap><label style=display:flex;align-items:center;gap:6px;font-size:12px;cursor:pointer><input type=checkbox style=accent-color:#5ac8fa;cursor:pointer;margin:0></label></div><div style=display:flex;align-items:center;gap:10px;flex-wrap:wrap><label style=font-size:12px;color:#e0e0e0;white-space:nowrap></label><input type=number min=0 style="width:80px;padding:4px 6px;background:#1e1e1e;border:1px solid #333;border-radius:4px;color:#fff;font-size:12px;outline:none"><span style=font-size:11px;color:#8e8e93></span></div><div style=display:flex;align-items:center;gap:10px;flex-wrap:wrap><label style=font-size:12px;color:#e0e0e0;white-space:nowrap></label><input type=number min=0 style="width:80px;padding:4px 6px;background:#1e1e1e;border:1px solid #333;border-radius:4px;color:#fff;font-size:12px;outline:none"><span style=font-size:11px;color:#8e8e93></span></div></div></div><div style="width:100%;max-width:700px;box-sizing:border-box;background:#1e1e1e;border:1px solid #333;border-radius:10px;overflow:hidden"><div style="display:flex;align-items:center;justify-content:space-between;gap:8px;padding:10px 14px"><button style=display:flex;align-items:center;gap:8px;background:transparent;border:none;color:#e0e0e0;font-size:12px;font-weight:600;cursor:pointer;text-align:left;padding:0><span>📦 Workspaces</span><span style=font-size:11px;font-weight:400;color:#8e8e93></span><span style=font-size:11px;color:#8e8e93></span></button><button></button></div></div><div style=display:block;width:100%;margin-top:24px><h3 style=margin:0;margin-bottom:8px;font-size:14px;font-weight:600;color:#ffffff>'),Nl=e.template("<div style=padding:16px;color:#ff3b30;font-size:13px>"),ql=e.template("<option>📦 "),vg=e.template('<div style="background:#1e1e1e;border:1px solid #333;border-radius:10px;padding:12px 14px;display:flex;flex-direction:column;gap:8px"><div style=display:flex;align-items:center;justify-content:space-between;gap:8px;flex-wrap:wrap><div style=font-size:12px;font-weight:600;color:#e0e0e0></div><button></button></div><div style=display:flex;flex-direction:column;gap:6px></div><div style=font-size:11px;color:#8e8e93>'),wg=e.template("<div style=font-size:11px;color:#ffd60a>"),kg=e.template("<div style=display:flex;align-items:center;gap:8px;flex-wrap:wrap;font-size:12px><span></span><span style=font-size:11px;color:#8e8e93></span><span style=font-size:11px;color:#8e8e93;overflow:hidden;text-overflow:ellipsis;max-width:340px>"),$g=e.template("<span style=font-size:11px;color:#34c759>"),Hl=e.template("<button>"),Sg=e.template('<div style="padding:0 14px 14px;display:flex;flex-direction:column;gap:10px"><label style=display:flex;align-items:center;gap:8px;font-size:12px;color:#e0e0e0;cursor:pointer><input type=checkbox style=accent-color:#5ac8fa;cursor:pointer;margin:0></label><label><input type=checkbox style=accent-color:#5ac8fa;cursor:pointer;margin:0></label><div style="border-top:1px solid #333;padding-top:10px;display:flex;flex-direction:column;gap:8px"><label><input type=checkbox style=accent-color:#5ac8fa;cursor:pointer;margin:0></label><input type=url placeholder=https://discord.com/api/webhooks/...><div style=font-size:11px;color:#8e8e93></div><div style=display:flex;align-items:center;gap:8px;flex-wrap:wrap;font-size:11px;color:#b0b0b0><span></span><input type=number min=1000 max=120000 step=1000 style="width:80px;padding:4px 6px;background:#1e1e1e;border:1px solid #333;border-radius:4px;color:#fff;font-size:12px;outline:none"><span></span><input type=number min=0 max=5 style="width:56px;padding:4px 6px;background:#1e1e1e;border:1px solid #333;border-radius:4px;color:#fff;font-size:12px;outline:none"><span></span><input type=number min=100 max=60000 step=100 style="width:80px;padding:4px 6px;background:#1e1e1e;border:1px solid #333;border-radius:4px;color:#fff;font-size:12px;outline:none"></div><div style=font-size:11px;color:#8e8e93></div></div><div style="border-top:1px solid #333;padding-top:10px;display:flex;flex-direction:column;gap:8px"><label><input type=checkbox style=accent-color:#5ac8fa;cursor:pointer;margin:0>Telegram</label><input type=password autocomplete=off><input type=text><div><span></span><select style="padding:4px 6px;background:#1e1e1e;border:1px solid #333;border-radius:4px;color:#fff;font-size:12px;outline:none"><option value=HTML>HTML</option><option value=MarkdownV2>MarkdownV2</option><option value=Markdown>Markdown</option><option value>plain text</option></select><label style=display:flex;align-items:center;gap:6px;cursor:pointer><input type=checkbox style=accent-color:#5ac8fa;cursor:pointer;margin:0></label><label style=display:flex;align-items:center;gap:6px;cursor:pointer><input type=checkbox style=accent-color:#5ac8fa;cursor:pointer;margin:0></label></div><div style=font-size:11px;color:#8e8e93></div></div><div style="border-top:1px solid #333;padding-top:10px;display:flex;flex-direction:column;gap:8px"><label><input type=checkbox style=accent-color:#5ac8fa;cursor:pointer;margin:0></label><label><input type=checkbox style=accent-color:#5ac8fa;cursor:pointer;margin:0></label><div style=font-size:11px;color:#8e8e93></div></div><div style="border-top:1px solid #333;padding-top:10px;display:flex;flex-direction:column;gap:8px"><label><input type=checkbox style=accent-color:#5ac8fa;cursor:pointer;margin:0></label><div><span></span><input type=time style="padding:4px 6px;background:#1e1e1e;border:1px solid #333;border-radius:4px;color:#fff;font-size:12px;outline:none"><span></span><input type=time style="padding:4px 6px;background:#1e1e1e;border:1px solid #333;border-radius:4px;color:#fff;font-size:12px;outline:none"></div><div style=font-size:11px;color:#8e8e93></div></div><div style="border-top:1px solid #333;padding-top:10px;display:flex;flex-direction:column;gap:8px"><div style=font-size:12px;color:#e0e0e0;font-weight:600></div><input type=text><input type=text><div style=font-size:11px;color:#8e8e93></div></div><div style="border-top:1px solid #333;padding-top:10px;display:flex;flex-direction:column;gap:8px"><div style=font-size:12px;color:#e0e0e0;font-weight:600></div><input type=text><input type=text><div style=font-size:11px;color:#8e8e93></div></div><div style="width:100%;max-width:700px;box-sizing:border-box;margin-top:8px;background:#1e1e1e;border:1px solid #333;border-radius:10px;overflow:hidden"><div style="display:flex;align-items:center;justify-content:space-between;gap:8px;padding:10px 14px"><span style=font-size:12px;font-weight:600;color:#e0e0e0></span><span style=font-size:11px;color:#8e8e93></span></div><div style="padding:0 14px 14px;display:flex;flex-direction:column;gap:10px"><div style=display:flex;align-items:center;gap:8px;flex-wrap:wrap><input type=text style="width:220px;padding:4px 6px;background:#1e1e1e;border:1px solid #333;border-radius:4px;color:#fff;font-size:12px;outline:none"><input type=password autocomplete=new-password style="width:320px;padding:4px 6px;background:#1e1e1e;border:1px solid #333;border-radius:4px;color:#fff;font-size:12px;outline:none"><button></button></div><div style=display:flex;align-items:center;gap:10px;flex-wrap:wrap;overflow:auto></div><div style=font-size:11px;color:#8e8e93></div></div></div><div style="border-top:1px solid #333;padding-top:10px;display:flex;flex-direction:column;gap:8px"><div style=font-size:12px;color:#e0e0e0;font-weight:600></div><label><input type=checkbox style=accent-color:#5ac8fa;cursor:pointer;margin:0></label><div><label style=display:flex;align-items:center;gap:6px;cursor:pointer><input type=checkbox style=accent-color:#5ac8fa;cursor:pointer;margin:0>partial</label><label style=display:flex;align-items:center;gap:6px;cursor:pointer><input type=checkbox style=accent-color:#5ac8fa;cursor:pointer;margin:0></label><span></span><input type=number min=0 max=10080 style="width:72px;padding:4px 6px;background:#1e1e1e;border:1px solid #333;border-radius:4px;color:#fff;font-size:12px;outline:none"></div><div style=font-size:11px;color:#8e8e93></div></div><div style="border-top:1px solid #333;padding-top:10px;display:flex;flex-direction:column;gap:8px"><div style=font-size:12px;color:#e0e0e0;font-weight:600></div><label><input type=checkbox style=accent-color:#5ac8fa;cursor:pointer;margin:0></label><div><select style="padding:4px 6px;background:#1e1e1e;border:1px solid #333;border-radius:4px;color:#fff;font-size:12px;outline:none"><option value=daily></option><option value=weekly></option></select><input type=time style="padding:4px 6px;background:#1e1e1e;border:1px solid #333;border-radius:4px;color:#fff;font-size:12px;outline:none"><span style=font-size:11px;color:#8e8e93></span></div><div style=font-size:11px;color:#8e8e93></div></div><div style=display:flex;align-items:center;gap:10px;flex-wrap:wrap><button></button><button></button><span style=font-size:11px;color:#8e8e93>'),_g=e.template('<span style="display:flex;align-items:center;gap:6px;padding:4px 8px;background:#252526;border:1px solid #333;border-radius:4px;font-size:11px;color:#e0e0e0"><span style=font-weight:600;color:#569cd6></span><span style=color:#ce9178>•••• </span><button style="padding:2px 6px;background:#c43b2b;color:white;border:none;border-radius:3px;cursor:pointer;font-size:10px;font-weight:600;line-height:1">×'),Tg=e.template("<span style=font-size:11px;color:#8e8e93>"),Cg=e.template('<div style="padding:0 14px 14px;display:flex;flex-direction:column;gap:10px"><div style=display:flex;align-items:center;gap:10px;flex-wrap:wrap><label style=font-size:12px;color:#e0e0e0;white-space:nowrap></label><input type=number min=0 style="width:70px;padding:4px 6px;background:#1e1e1e;border:1px solid #333;border-radius:4px;color:#fff;font-size:12px;outline:none"><span style=font-size:11px;color:#8e8e93></span></div><div style=display:flex;align-items:center;gap:10px;flex-wrap:wrap><label style=font-size:12px;color:#e0e0e0;white-space:nowrap></label><input type=number min=0 style="width:80px;padding:4px 6px;background:#1e1e1e;border:1px solid #333;border-radius:4px;color:#fff;font-size:12px;outline:none"><span style=font-size:11px;color:#8e8e93></span></div><div style=font-size:11px;color:#8e8e93> </div><div style=display:flex;align-items:center;gap:10px;flex-wrap:wrap><button></button><span style=font-size:11px;color:#8e8e93>'),Eg=e.template('<div style="padding:0 14px 14px;display:flex;flex-direction:column;gap:10px"><div style=display:flex;align-items:center;gap:8px;flex-wrap:wrap><label style=font-size:12px;color:#e0e0e0;white-space:nowrap></label><input type=text style="width:150px;padding:4px 6px;background:#1e1e1e;border:1px solid #333;border-radius:4px;color:#fff;font-size:12px;outline:none"><label style=font-size:12px;color:#e0e0e0;white-space:nowrap></label><input type=text placeholder=mcp/gui/http style="width:110px;padding:4px 6px;background:#1e1e1e;border:1px solid #333;border-radius:4px;color:#fff;font-size:12px;outline:none"><label style=font-size:12px;color:#e0e0e0;white-space:nowrap></label><input type=text style="width:180px;padding:4px 6px;background:#1e1e1e;border:1px solid #333;border-radius:4px;color:#fff;font-size:12px;outline:none"><button></button></div><div style="width:100%;overflow:auto;border:1px solid #333;border-radius:6px;background:#0f0f0f"><table style=width:100%;border-collapse:collapse;font-size:11px><thead><tr style="border-bottom:1px solid #333"><th style="text-align:left;padding:6px 8px;color:#8e8e93"></th><th style="text-align:left;padding:6px 8px;color:#8e8e93"></th><th style="text-align:left;padding:6px 8px;color:#8e8e93"></th><th style="text-align:left;padding:6px 8px;color:#8e8e93"></th><th style="text-align:left;padding:6px 8px;color:#8e8e93"></th><th style="text-align:left;padding:6px 8px;color:#8e8e93"></th></tr></thead><tbody></tbody></table></div><div style=font-size:11px;color:#8e8e93>'),Pg=e.template('<tr style="border-bottom:1px solid #222"><td style="padding:5px 8px;color:#e0e0e0;white-space:nowrap"></td><td style="padding:5px 8px;color:#569cd6"></td><td style="padding:5px 8px;color:#e0e0e0;white-space:nowrap">: </td><td style="padding:5px 8px;color:#ce9178"></td><td style="padding:5px 8px;color:#e0e0e0"></td><td style="padding:5px 8px;color:#8e8e93;white-space:nowrap">'),zg=e.template('<tr><td colspan=6 style="padding:10px 8px;color:#8e8e93;text-align:center">'),Rg=e.template('<div style="display:flex;flex-direction:column;gap:6px;padding:0 14px 12px">'),Lg=e.template('<div style="font-size:12px;color:#8e8e93;padding:4px 0">'),Ag=e.template('<div style="display:flex;align-items:center;gap:10px;padding:8px 10px;background:#252526;border:1px solid #333;border-radius:8px;min-width:0"><span></span><div style=display:flex;flex-direction:column;gap:2px;flex:1;min-width:0><span style=font-size:12px;font-weight:700;color:#ffffff;white-space:nowrap;overflow:hidden;text-overflow:ellipsis>📦 </span><span style=font-size:10px;color:#8e8e93;white-space:nowrap;overflow:hidden;text-overflow:ellipsis></span><span style=font-size:10px;color:#a0a0a6;white-space:nowrap;overflow:hidden;text-overflow:ellipsis></span><span style=font-size:10px;color:#8e8e93;white-space:nowrap;overflow:hidden;text-overflow:ellipsis></span></div><div style=display:flex;gap:4px;flex-shrink:0><button style=background:transparent;border:none;color:#a0a0a6;cursor:pointer;font-size:14px;padding:2px>🔑</button><button style=background:transparent;border:none;color:#a0a0a6;cursor:pointer;font-size:14px;padding:2px>✏️</button><button style=background:transparent;border:none;color:#ff3b30;cursor:pointer;font-size:14px;padding:2px>🗑'),Dg=e.template('<button style="display:flex;align-items:center;justify-content:center;gap:8px;width:100%;max-width:700px;box-sizing:border-box;padding:12px 16px;background:#1e1e1e;border:1px dashed #3a3a3a;border-radius:10px;color:#e0e0e0;font-size:13px;font-weight:600;cursor:pointer;transition:border-color 0.18s ease, background 0.18s ease">'),Mg=e.template('<div style="display:block;width:100%;max-width:700px;box-sizing:border-box;background:#1e1e1e;padding:20px;border-radius:10px;box-shadow:0 4px 12px rgba(0,0,0,0.2)"><div style=display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:16px;flex-wrap:wrap><h3 style=margin:0;font-size:14px;font-weight:600;color:#ffffff></h3><div style=display:flex;align-items:center;gap:8px;flex-wrap:wrap><button style="background:transparent;border:1px solid #333;border-radius:6px;padding:4px 10px;color:#a0a0a6;font-size:11px;cursor:pointer;white-space:nowrap;transition:color 0.18s ease, border-color 0.18s ease"></button><button style="background:transparent;border:1px solid #333;border-radius:6px;padding:4px 10px;color:#a0a0a6;font-size:11px;cursor:pointer;white-space:nowrap;transition:color 0.18s ease, border-color 0.18s ease"></button></div></div><div style="display:block;width:100%;margin-bottom:12px;padding:10px 12px;background:#1a1a1a;border:1px solid #333;border-radius:8px"><label style=display:flex;align-items:center;gap:8px;cursor:pointer;font-size:13px;font-weight:600;color:#fff><input type=checkbox style=accent-color:#ff9f0a>📦 Matrix (Fan-Out)</label><div style=font-size:11px;color:#8e8e93;margin-top:4px;line-height:1.45></div></div><div style=display:block;width:100%;margin-bottom:12px><label style=display:block;margin-bottom:8px;font-size:12px;color:#b0b0b0;font-weight:500></label><input type=text style="display:block;width:100%;box-sizing:border-box;padding:8px;background:#1e1e1e;border:1px solid #333;border-radius:6px;color:#fff;font-size:13px;outline:none"></div><div style=display:block;width:100%;margin-bottom:12px><label style=display:block;margin-bottom:8px;font-size:12px;color:#b0b0b0;font-weight:500></label><div style=display:flex;gap:8px;flex-wrap:wrap><label style=display:flex;align-items:center;gap:6px;cursor:pointer;flex:1><input type=radio name=triggerType style=accent-color:#007acc></label><label style=display:flex;align-items:center;gap:6px;cursor:pointer;flex:1><input type=radio name=triggerType style=accent-color:#007acc></label><label style=display:flex;align-items:center;gap:6px;cursor:pointer;flex:1><input type=radio name=triggerType style=accent-color:#007acc></label><label style=display:flex;align-items:center;gap:6px;cursor:pointer;flex:1><input type=radio name=triggerType style=accent-color:#007acc>MCP Event</label><label style=display:flex;align-items:center;gap:6px;cursor:pointer;flex:1><input type=radio name=triggerType style=accent-color:#007acc></label></div></div><div style=display:block;width:100%;margin-bottom:12px><label style=display:block;margin-bottom:8px;font-size:12px;color:#b0b0b0;font-weight:500></label><div style=display:flex;gap:8px;flex-wrap:wrap><label style=display:flex;align-items:center;gap:6px;cursor:pointer;flex:1><input type=radio name=sessionMode style=accent-color:#007acc></label><label style=display:flex;align-items:center;gap:6px;cursor:pointer;flex:1><input type=radio name=sessionMode style=accent-color:#007acc></label><label style=display:flex;align-items:center;gap:6px;cursor:pointer;flex:1><input type=radio name=sessionMode style=accent-color:#007acc></label></div></div><div style=width:100%;marginBottom:12px><label style=display:block;margin-bottom:8px;font-size:12px;color:#b0b0b0;font-weight:500></label><select style="display:block;width:100%;box-sizing:border-box;padding:8px;background:#1e1e1e;border:1px solid #333;border-radius:6px;color:#fff;font-size:13px;outline:none"></select><div style=display:block;width:100%;margin-top:12px><label style=display:block;margin-bottom:8px;font-size:12px;color:#b0b0b0;font-weight:500></label><input type=text list=iana-timezones style="display:block;width:100%;box-sizing:border-box;padding:8px;background:#1e1e1e;border:1px solid #333;border-radius:6px;color:#fff;font-size:13px;outline:none"><datalist id=iana-timezones><option value=Europe/Moscow></option><option value=Europe/London></option><option value=Europe/Berlin></option><option value=America/New_York></option><option value=America/Los_Angeles></option><option value=Asia/Almaty></option><option value=Asia/Tokyo></option><option value=UTC></option></datalist><div style=display:block;margin-top:6px;font-size:11px;color:#808080></div></div><div style=display:block;width:100%;margin-top:12px><label style=display:block;margin-bottom:8px;font-size:12px;color:#b0b0b0;font-weight:500></label><div style=display:flex;gap:8px;align-items:center><input type=time style="display:block;flex:1;box-sizing:border-box;padding:8px;background:#1e1e1e;border:1px solid #333;border-radius:6px;color:#fff;font-size:13px;outline:none"><span style=color:#808080;font-size:12px>—</span><input type=time style="display:block;flex:1;box-sizing:border-box;padding:8px;background:#1e1e1e;border:1px solid #333;border-radius:6px;color:#fff;font-size:13px;outline:none"></div><div style=display:block;margin-top:6px;font-size:11px;color:#808080></div><div style=display:block;margin-top:12px><label style=display:block;margin-bottom:8px;font-size:12px;color:#b0b0b0;font-weight:500></label><div style=display:flex;gap:10px;flex-wrap:wrap></div></div><div style=display:block;margin-top:12px><label style=display:block;margin-bottom:8px;font-size:12px;color:#b0b0b0;font-weight:500></label><select style="display:block;width:100%;box-sizing:border-box;padding:8px;background:#1e1e1e;border:1px solid #333;border-radius:6px;color:#fff;font-size:13px;outline:none"><option value=postpone></option><option value=skip></option><option value=run></option></select><div style=display:block;margin-top:6px;font-size:11px;color:#808080></div></div></div></div><div style=display:block;width:100%;margin-bottom:12px><label style=display:block;margin-bottom:8px;font-size:12px;color:#b0b0b0;font-weight:500></label><textarea rows=2 style="display:block;width:100%;box-sizing:border-box;padding:8px;background:#1e1e1e;border:1px solid #333;border-radius:6px;color:#fff;font-size:13px;outline:none;resize:vertical"></textarea></div><div style=display:block;width:100%;margin-bottom:12px><label style=display:block;margin-bottom:8px;font-size:12px;color:#b0b0b0;font-weight:500></label><select style="display:block;width:100%;box-sizing:border-box;padding:8px;background:#1e1e1e;border:1px solid #333;border-radius:6px;color:#fff;font-size:13px;outline:none"></select></div><div style=display:block;width:100%;margin-bottom:12px><label style=display:block;margin-bottom:8px;font-size:12px;color:#b0b0b0;font-weight:500></label><input type=text list=scheduler-model-presets style="display:block;width:100%;box-sizing:border-box;padding:8px;background:#1e1e1e;border:1px solid #333;border-radius:6px;color:#fff;font-size:13px;outline:none"><datalist id=scheduler-model-presets><option value=anthropic/claude-3-5-sonnet></option><option value=openai/gpt-4o></option><option value=deepseek/deepseek-coder></option><option value=google/gemini-2.5-pro></option><option value=openai/gpt-4o-mini></option></datalist><div style=font-size:11px;color:#8e8e93;margin-top:6px></div></div><div style=display:block;width:100%;margin-bottom:12px><label style=display:block;margin-bottom:8px;font-size:12px;color:#b0b0b0;font-weight:500></label><select style="display:block;width:100%;box-sizing:border-box;padding:8px;background:#1e1e1e;border:1px solid #333;border-radius:6px;color:#fff;font-size:13px;outline:none"></select><div style=font-size:11px;color:#8e8e93;margin-top:6px></div></div><div style=display:block;width:100%;margin-bottom:12px><label style=display:block;margin-bottom:8px;font-size:12px;color:#b0b0b0;font-weight:500></label><input type=number min=0 placeholder=0 style="display:block;width:100%;box-sizing:border-box;padding:8px;background:#1e1e1e;border:1px solid #333;border-radius:6px;color:#fff;font-size:13px;outline:none"></div><div style=display:block;width:100%;margin-bottom:12px><label style=display:block;margin-bottom:8px;font-size:12px;color:#b0b0b0;font-weight:500></label><input type=number min=1 placeholder=60 style="display:block;width:100%;box-sizing:border-box;padding:8px;background:#1e1e1e;border:1px solid #333;border-radius:6px;color:#fff;font-size:13px;outline:none"></div><div style=display:block;width:100%;margin-bottom:12px><label style=display:block;margin-bottom:8px;font-size:12px;color:#b0b0b0;font-weight:500></label><input type=text style="display:block;width:100%;box-sizing:border-box;padding:8px;background:#1e1e1e;border:1px solid #333;border-radius:6px;color:#fff;font-size:13px;outline:none"><div style=font-size:11px;color:#8e8e93;margin-top:6px></div></div><div style=display:block;width:100%;margin-bottom:12px><label style=display:block;margin-bottom:8px;font-size:12px;color:#b0b0b0;font-weight:500></label><input type=text style="display:block;width:100%;box-sizing:border-box;padding:8px;background:#1e1e1e;border:1px solid #333;border-radius:6px;color:#fff;font-size:13px;outline:none"><div style=font-size:11px;color:#8e8e93;margin-top:6px></div></div><div style=display:block;width:100%;margin-bottom:12px><label style=display:block;margin-bottom:8px;font-size:12px;color:#b0b0b0;font-weight:500></label><input type=text style="display:block;width:100%;box-sizing:border-box;padding:8px;background:#1e1e1e;border:1px solid #333;border-radius:6px;color:#fff;font-size:13px;outline:none"><div style=font-size:11px;color:#8e8e93;margin-top:6px></div></div><div style=display:block;width:100%;margin-bottom:12px><label style=display:block;margin-bottom:8px;font-size:12px;color:#b0b0b0;font-weight:500></label><div style="display:flex;flex-wrap:wrap;gap:6px;padding:8px;background:#1e1e1e;border:1px solid #333;border-radius:6px;min-height:38px;box-sizing:border-box"></div><div style=font-size:11px;color:#8e8e93;margin-top:6px></div></div><details style=display:block;width:100%;margin-bottom:12px><summary style=cursor:pointer;font-size:12px;color:#b0b0b0;font-weight:500;margin-bottom:8px;user-select:none></summary><div style="display:block;width:100%;padding:10px;background:#1e1e1e;border:1px solid #333;border-radius:6px;box-sizing:border-box"><div style=font-size:11px;color:#8e8e93;margin-bottom:8px></div><div style=font-size:11px;color:#b0b0b0;margin-bottom:4px></div><div style=display:flex;flex-wrap:wrap;gap:6px;margin-bottom:8px></div><div style=font-size:11px;color:#b0b0b0;margin-bottom:4px></div><div style=display:flex;flex-wrap:wrap;gap:6px;margin-bottom:8px></div><div style=display:flex;gap:6px><input type=text style="flex:1;padding:6px 8px;background:#141414;border:1px solid #333;border-radius:6px;color:#fff;font-size:12px;outline:none"><button style="padding:6px 10px;background:transparent;border:1px solid #34c759;color:#34c759;border-radius:6px;cursor:pointer;font-size:12px">+ allowed</button><button style="padding:6px 10px;background:transparent;border:1px solid #ff3b30;color:#ff3b30;border-radius:6px;cursor:pointer;font-size:12px">+ denied</button></div></div></details><div style=display:block;width:100%;margin-top:8px><button style="display:block;width:100%;padding:8px;margin-top:4px;background:transparent;border:1px solid #333;border-radius:6px;color:#d4e6ff;cursor:pointer;font-size:12px"></button><button>'),Fg=e.template('<div style=margin-top:10px;display:flex;flex-direction:column;gap:10px><div><div style=font-size:12px;color:#b0b0b0;font-weight:500;margin-bottom:6px></div></div><div style=display:flex;gap:8px;flex-wrap:wrap><label style=flex:1;min-width:150px;font-size:11px;color:#b0b0b0><select style="display:block;width:100%;box-sizing:border-box;margin-top:4px;padding:6px;background:#1e1e1e;border:1px solid #333;border-radius:6px;color:#fff;font-size:12px;outline:none"><option value=parallel></option><option value=sequential></option></select></label><label style=flex:1;min-width:150px;font-size:11px;color:#b0b0b0><select style="display:block;width:100%;box-sizing:border-box;margin-top:4px;padding:6px;background:#1e1e1e;border:1px solid #333;border-radius:6px;color:#fff;font-size:12px;outline:none"><option value=continue></option><option value=stop></option></select></label><label style=flex:1;min-width:150px;font-size:11px;color:#b0b0b0><select style="display:block;width:100%;box-sizing:border-box;margin-top:4px;padding:6px;background:#1e1e1e;border:1px solid #333;border-radius:6px;color:#fff;font-size:12px;outline:none"><option value=summary></option><option value=per-task></option></select></label></div><label style=display:flex;align-items:center;gap:8px;cursor:pointer;font-size:12px;color:#e0e0e0><input type=checkbox style=accent-color:#ff9f0a></label><label style=font-size:11px;color:#b0b0b0;max-width:240px><input type=number min=1 step=1 style="display:block;width:100%;box-sizing:border-box;margin-top:4px;padding:6px;background:#1e1e1e;border:1px solid #333;border-radius:6px;color:#fff;font-size:12px;outline:none"></label><div style="padding:8px 10px;background:#141414;border:1px solid #333;border-radius:6px;font-size:11px;line-height:1.55;color:#a0a0a6">'),Og=e.template("<div style=font-size:11px;color:#f5a623>"),Ig=e.template('<div style="display:flex;flex-direction:column;gap:4px;max-height:170px;overflow:auto;padding:6px 8px;background:#141414;border:1px solid #333;border-radius:6px">'),jg=e.template("<label style=display:flex;align-items:center;gap:8px;cursor:pointer;font-size:12px;color:#e0e0e0><input type=checkbox style=accent-color:#ff9f0a><span>📦 </span><span style=font-size:10px;color:#8e8e93;white-space:nowrap;overflow:hidden;text-overflow:ellipsis>"),Ng=e.template('<details style="padding:8px 10px;background:#141414;border:1px solid #333;border-radius:6px"><summary style=cursor:pointer;font-size:12px;color:#b0b0b0;font-weight:500></summary><div style=margin-top:8px;display:flex;flex-direction:column;gap:8px;max-height:340px;overflow:auto>'),qg=e.template('<div style="padding:8px;background:#101010;border:1px solid #2a2a2a;border-radius:6px"><div>📦 <span style=margin-left:6px;font-size:10px;color:#8e8e93></span></div><div style=display:flex;flex-direction:column;gap:6px><textarea rows=2 style="padding:6px;background:#1e1e1e;border:1px solid #333;border-radius:6px;color:#fff;font-size:12px;outline:none;box-sizing:border-box;width:100%;resize:vertical;font-family:inherit"></textarea><div style=display:flex;gap:6px;flex-wrap:wrap><input style="padding:6px;background:#1e1e1e;border:1px solid #333;border-radius:6px;color:#fff;font-size:12px;outline:none;box-sizing:border-box;flex:1;min-width:150px"><input placeholder="Quality Gate (override)"style="padding:6px;background:#1e1e1e;border:1px solid #333;border-radius:6px;color:#fff;font-size:12px;outline:none;box-sizing:border-box;flex:1;min-width:150px"></div><div style=display:flex;gap:6px;flex-wrap:wrap><input placeholder="beforeScript (override)"style="padding:6px;background:#1e1e1e;border:1px solid #333;border-radius:6px;color:#fff;font-size:12px;outline:none;box-sizing:border-box;flex:1;min-width:150px"><input placeholder="afterScript (override)"style="padding:6px;background:#1e1e1e;border:1px solid #333;border-radius:6px;color:#fff;font-size:12px;outline:none;box-sizing:border-box;flex:1;min-width:150px">'),Hg=e.template("<div style=color:#ff9f0a;font-weight:600>"),Wg=e.template("<div style=color:#e0e0e0;word-break:break-all>"),Bg=e.template("<span style=color:#f5a623>"),Ug=e.template('<div style=display:block;width:100%;margin-bottom:12px><label style=display:block;margin-bottom:8px;font-size:12px;color:#b0b0b0;font-weight:500></label><select style="display:block;width:100%;box-sizing:border-box;padding:8px;background:#1e1e1e;border:1px solid #333;border-radius:6px;color:#fff;font-size:13px;outline:none"><option value>'),Gg=e.template('<div style="margin-top:8px;padding:8px 10px;background:#141414;border:1px solid #333;border-radius:6px;font-size:11px;line-height:1.55;color:#a0a0a6"><div>cwd = <span style=color:#e0e0e0></span></div><div>git branch = <span style=color:#5ac8fa></span></div><div>git remote = <span style=color:#e0e0e0>'),Wl=e.template('<div style=display:block;width:100%;margin-bottom:12px><label style=display:block;margin-bottom:8px;font-size:12px;color:#b0b0b0;font-weight:500></label><input type=text style="display:block;width:100%;box-sizing:border-box;padding:8px;background:#1e1e1e;border:1px solid #333;border-radius:6px;color:#fff;font-size:13px;outline:none"><div style=font-size:11px;color:#8e8e93;margin-top:6px>'),Vg=e.template(`<div style=display:block;width:100%;margin-bottom:12px><label style=display:block;margin-bottom:8px;font-size:12px;color:#b0b0b0;font-weight:500></label><input type=text style="display:block;width:100%;box-sizing:border-box;padding:8px;background:#1e1e1e;border:1px solid #333;border-radius:6px;color:#fff;font-size:13px;outline:none"><label style="display:block;margin:12px 0 6px;font-size:12px;color:#b0b0b0;font-weight:500"></label><textarea rows=3 placeholder="**/*.md
|
|
3
|
+
src/**"style="display:block;width:100%;box-sizing:border-box;padding:8px;background:#1e1e1e;border:1px solid #333;border-radius:6px;color:#fff;font-size:13px;outline:none;resize:vertical;font-family:ui-monospace,Consolas,monospace"></textarea><label style="display:block;margin:12px 0 6px;font-size:12px;color:#b0b0b0;font-weight:500"></label><textarea rows=2 placeholder="node_modules/**
|
|
4
|
+
*.log"style="display:block;width:100%;box-sizing:border-box;padding:8px;background:#1e1e1e;border:1px solid #333;border-radius:6px;color:#fff;font-size:13px;outline:none;resize:vertical;font-family:ui-monospace,Consolas,monospace"></textarea><div style=font-size:11px;color:#8e8e93;margin-top:6px>`),Kg=e.template('<div style=display:block;width:100%;margin-bottom:12px><label style=display:block;margin-bottom:8px;font-size:12px;color:#b0b0b0;font-weight:500></label><input type=text placeholder="main, release/*"style="display:block;width:100%;box-sizing:border-box;padding:8px;background:#1e1e1e;border:1px solid #333;border-radius:6px;color:#fff;font-size:13px;outline:none">'),Yg=e.template(`<div style=display:block;width:100%;margin-bottom:12px><label style=display:block;margin-bottom:8px;font-size:12px;color:#b0b0b0;font-weight:500></label><textarea rows=3 placeholder="src/**
|
|
5
|
+
**/*.md"style="display:block;width:100%;box-sizing:border-box;padding:8px;background:#1e1e1e;border:1px solid #333;border-radius:6px;color:#fff;font-size:13px;outline:none;resize:vertical;font-family:ui-monospace,Consolas,monospace">`),Jg=e.template(`<div style=display:block;width:100%;margin-bottom:12px><label style=display:block;margin-bottom:8px;font-size:12px;color:#b0b0b0;font-weight:500></label><textarea rows=2 placeholder="docs/**
|
|
6
|
+
*.lock"style="display:block;width:100%;box-sizing:border-box;padding:8px;background:#1e1e1e;border:1px solid #333;border-radius:6px;color:#fff;font-size:13px;outline:none;resize:vertical;font-family:ui-monospace,Consolas,monospace">`),Qg=e.template('<div style=display:block;width:100%;margin-bottom:12px><label style=display:block;margin-bottom:8px;font-size:12px;color:#b0b0b0;font-weight:500></label><input type=number min=5 placeholder=60 style="display:block;width:100%;box-sizing:border-box;padding:8px;background:#1e1e1e;border:1px solid #333;border-radius:6px;color:#fff;font-size:13px;outline:none"><div style=font-size:11px;color:#8e8e93;margin-top:6px>'),Bl=e.template('<div style=display:block;width:100%;margin-bottom:12px><label style=display:block;margin-bottom:8px;font-size:12px;color:#b0b0b0;font-weight:500></label><input type=text style="display:block;width:100%;box-sizing:border-box;padding:8px;background:#1e1e1e;border:1px solid #333;border-radius:6px;color:#fff;font-size:13px;outline:none">'),Zg=e.template('<div style=display:block;width:100%;margin-bottom:12px><label style=display:block;margin-bottom:8px;font-size:12px;color:#b0b0b0;font-weight:500></label><input type=text style="display:block;width:100%;box-sizing:border-box;padding:8px;background:#1e1e1e;border:1px solid #333;border-radius:6px;color:#fff;font-size:13px;outline:none"><div style="font-size:11px;color:#8e8e93;margin:6px 0"></div><input type=number min=1 style="display:block;width:100%;box-sizing:border-box;padding:8px;background:#1e1e1e;border:1px solid #333;border-radius:6px;color:#fff;font-size:13px;outline:none"><div style=font-size:11px;color:#8e8e93;margin-top:6px>'),Xg=e.template('<div style=margin-top:8px><label style=display:block;margin-bottom:6px;font-size:11px;color:#8e8e93></label><input type=number min=1 style="display:block;width:100%;box-sizing:border-box;padding:8px;background:#1e1e1e;border:1px solid #333;border-radius:6px;color:#fff;font-size:13px;outline:none"><div style=font-size:11px;color:#8e8e93;margin-top:6px>'),em=e.template("<div style=display:block;width:100%;margin-bottom:12px><label style=display:flex;align-items:flex-start;gap:8px;cursor:pointer><input type=checkbox style=accent-color:#007acc;margin-top:3px><span><span style=display:block;font-size:12px;color:#b0b0b0;font-weight:500></span><span style=display:block;font-size:11px;margin-top:4px>"),Ni=e.template("<option>"),tm=e.template('<div style=display:block;width:100%;margin-top:8px><label style=display:block;margin-bottom:8px;font-size:12px;color:#b0b0b0;font-weight:500></label><input type=text placeholder="* * * * *"style="display:block;width:100%;box-sizing:border-box;padding:8px;background:#1e1e1e;border:1px solid #333;border-radius:6px;color:#fff;font-size:13px;outline:none">'),rm=e.template('<div style="display:block;max-height:80px;overflow-y:auto;margin-top:8px;padding:8px;background:#2a1113;border:1px solid #5a1d21;border-radius:6px;font-size:11px;line-height:1.4;color:#ff6b6b;white-space:pre-wrap;word-break:break-word">'),im=e.template("<label style=display:flex;align-items:center;gap:5px;cursor:pointer;font-size:12px;color:#d0d0d5><input type=checkbox style=accent-color:#007acc>"),om=e.template("<div style=display:flex;align-items:center;gap:6px;margin-top:8px><span style=font-size:10px;color:#8e8e93></span><button style=background:transparent;border:none;color:#ff3b30;cursor:pointer;font-size:14px;line-height:1;padding:0>🗑"),nm=e.template("<span style=font-size:11px;color:#ff3b30;font-weight:500;cursor:default>"),am=e.template("<span style=font-size:12px;color:#8e8e93>"),Sa=e.template("<label><input type=checkbox style=margin:0>"),sm=e.template("<span style=color:#5ac8fa;font-size:11px;margin-left:6px>(<!> allowed · <!> denied)"),lm=e.template("<div style=font-size:11px;color:#cfcfd2;margin-top:8px>"),dm=e.template("<div>allowed: [<!>]"),um=e.template("<div>denied: [<!>]"),pm=e.template('<button style="background:transparent;border:1px solid #333;border-radius:6px;padding:8px 16px;color:#ff3b30;cursor:pointer;font-size:13px;width:100%">'),cm=e.template('<div style="display:block;width:100%;margin-top:8px;padding:10px;background:#1e1e1e;border:1px solid #333;border-radius:6px"><div style=font-size:12px;font-weight:600;color:#ffffff;display:flex;justify-content:space-between;align-items:center><button style=background:none;border:none;color:#8e8e93;cursor:pointer;font-size:14px;padding:0>✕'),gm=e.template("<div style=display:flex;flex-direction:column;gap:4px;font-size:11px;color:#e0e0e0;margin-top:6px><div style=overflow-wrap:anywhere>$ </div><div style=color:#8e8e93>cwd: "),mm=e.template("<div style=color:#8e8e93>🔒 allowed=[<!>] · denied=[<!>]"),fm=e.template("<div style=color:#8e8e93>⚡ pre: "),ym=e.template("<div style=color:#8e8e93>⚡ post: "),bm=e.template("<div style=color:#8e8e93>✅ QG: "),xm=e.template("<div style=color:#f5a623>⚠ "),hm=e.template("<div style=font-size:11px;color:#8e8e93;margin-bottom:8px>"),vm=e.template('<div style="display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;padding:40px 16px;color:#a0a0a6;font-size:13px;gap:10px"><span style=font-size:40px;line-height:1></span><span style=max-width:380px;line-height:1.5>'),wm=e.template("<div style=display:flex;flex-direction:column;gap:0>"),km=e.template('<div style=position:fixed;inset:0;background:rgba(0,0,0,0.55);display:flex;align-items:center;justify-content:center;z-index:2000;padding:20px><div style="width:min(540px,100%);background:#1e1e1e;border:1px solid #444;border-radius:10px;padding:16px;display:flex;flex-direction:column;gap:12px;box-shadow:0 12px 40px rgba(0,0,0,0.6)"><div style=font-size:13px;font-weight:600;color:#e0e0e0;white-space:pre-wrap></div><div style=display:flex;justify-content:flex-end;gap:8px><button style="padding:6px 14px;border-radius:6px;border:1px solid #3a3a3a;background:#262626;color:#e0e0e0;font-size:12px;cursor:pointer"></button><button style="padding:6px 14px;border-radius:6px;border:1px solid #0a84ff;background:#0a84ff;color:#fff;font-size:12px;font-weight:600;cursor:pointer">'),$m=e.template(`<textarea autofocus rows=6 style="width:100%;box-sizing:border-box;resize:vertical;padding:8px 10px;border-radius:8px;border:1px solid #3a3a3a;background:#141414;color:#e0e0e0;font-family:Menlo, Monaco, 'Courier New', monospace;font-size:12px;outline:none">`),Sm=e.template('<input autofocus style="width:100%;box-sizing:border-box;padding:8px 10px;border-radius:8px;border:1px solid #3a3a3a;background:#141414;color:#e0e0e0;font-size:13px;outline:none">'),_m=e.template("<div style=font-size:11px;color:#8e8e93>"),Tm=e.template(`<div style="position:fixed;bottom:16px;left:16px;right:16px;background:#1e1e1e;border:1px solid #333;border-radius:8px;padding:0;max-height:300px;overflow:hidden;display:flex;flex-direction:column;z-index:1000"><div style="display:flex;align-items:center;justify-content:space-between;padding:10px 14px;border-bottom:1px solid #333;background:#252526;border-radius:8px 8px 0 0"><div style=display:flex;align-items:center;gap:8px><span style=font-size:13px;font-weight:600;color:#ffffff></span><span style=font-size:11px;color:#8e8e93></span></div><button style=background:transparent;border:none;color:#8e8e93;cursor:pointer;font-size:18px;line-height:1;padding:0;width:24px;height:24px;display:flex;align-items:center;justify-content:center>✕</button></div><div style="flex:1;overflow-y:auto;padding:12px;font-family:Menlo, Monaco, 'Courier New', monospace;font-size:11px;line-height:1.5;color:#d4d4d4;background:#1e1e1e;border-radius:0 0 8px 8px">`),Cm=e.template("<div style=white-space:pre-wrap;margin-bottom:2px>"),Em=e.template(`<div style="padding:16px;display:flex;flex-direction:column;gap:16px;font-size:13px;font-family:-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;color:#e0e0e0;background:#0f0f0f"><h2 style=margin:0;font-size:22px;font-weight:800;color:#ffffff></h2><div style=margin-top:5px;font-size:11px;font-weight:600;letter-spacing:1.2px;text-transform:uppercase;color:#8e8e93>Local AI CI/CD Orchestrator</div><div style="background:#2a1a1a;border:1px solid #ff3b30;border-radius:8px;padding:16px;color:#ff3b30">`);rd("ru",_c);rd("en",Tc);const[Pm,zm]=d.createSignal(0),t=(s,y)=>(Pm(),Sc(s,y)),_a=s=>{bc(s),zm(y=>y+1)};function Rm(s){switch(s){case"running":return"#f5a623";case"success":return"#34c759";case"error":return"#ff3b30";case"partial":return"#ff9f0a";default:return"#8e8e93"}}const _t=5,Ul="form";function Gl(s){const y=typeof s=="number"&&Number.isFinite(s)?Math.min(10,Math.max(0,Math.floor(s))):_t;return y>=10?t("gui.priority.critical"):y>=8?t("gui.priority.high"):y<=3?t("gui.priority.low"):t("gui.priority.normal")}const Vl=()=>[{value:2,label:t("gui.priority.low")},{value:5,label:t("gui.priority.normal")},{value:8,label:t("gui.priority.high")},{value:10,label:t("gui.priority.critical")}];function Q(s){return s instanceof Error?s.message:typeof s=="object"&&s!==null&&"message"in s?String(s.message):JSON.stringify(s)}function st(s,y=150){const w=(s||"").split(/\r?\n/).map(N=>N.trim()).find(Boolean)??"";return w.length>y?w.slice(0,y-1).trimEnd()+"…":w}function cn(s){return(s||"").split(/[\r\n,]+/).map(y=>y.trim()).filter(Boolean)}function Nt(s){return Array.isArray(s)?s.join(`
|
|
7
|
+
`):""}const Kl=()=>[{label:t("gui.cron.everyMinute"),value:"* * * * *"},{label:t("gui.cron.everyHour"),value:"0 * * * *"},{label:t("gui.cron.dailyAt9"),value:"0 9 * * *"},{label:t("gui.cron.mondayAt10"),value:"0 10 * * 1"},{label:t("gui.cron.custom"),value:"__custom__"}],Lm=wa.Plugin.define({setup(s){const y=s.client.rpc(cc),[w,N]=d.createSignal([]),[P,te]=d.createSignal([]),[Te,Tt]=d.createSignal(!1),[lt,jr]=d.createSignal("all"),[dt,je]=d.createSignal(!1),[ut,Ke]=d.createSignal(""),[nd,ad]=d.createSignal([]),[La,Aa]=d.createSignal("default"),[ur,sd]=d.createSignal(!1),[Bi,ld]=d.createSignal(!1),[pr,cr]=d.createSignal(!1),[dd,Da]=d.createSignal(!1),[fn,ud]=d.createSignal(""),[Nr,yn]=d.createSignal("");let Ui=null;function Ct(i,r=""){return Ui?.(null),new Promise(n=>{Ui=n,ud(i),yn(r),Da(!0)})}function qt(i){const r=Ui;Ui=null,Da(!1),r?.(i)}const[pd,gr]=d.createSignal(""),[bn,xn]=d.createSignal(null),[qr,Ma]=d.createSignal(!1),[Fa,Gi]=d.createSignal(""),[hn,cd]=d.createSignal({total:0,success:0,error:0}),[Vi,Oa]=d.createSignal(null),[Ia,gd]=d.createSignal([]),ja=()=>[{label:t("gui.promptTemplates.custom"),value:"custom",prompt:""},{label:t("gui.promptTemplates.nightWatch"),value:"night-watch",prompt:t("gui.promptTemplates.nightWatchPrompt")},{label:t("gui.promptTemplates.morningDigest"),value:"morning-digest",prompt:t("gui.promptTemplates.morningDigestPrompt")},{label:t("gui.promptTemplates.codeHygiene"),value:"code-hygiene",prompt:t("gui.promptTemplates.codeHygienePrompt")}],[Hr,Ki]=d.createSignal("custom"),[Yi,md]=d.createSignal([]),[fd,yd]=d.createSignal(0);setInterval(()=>yd(i=>i+1),1e3);const[bd,vn]=d.createSignal(1),[Ye,wn]=d.createSignal(!1),[S,Na]=d.createSignal(!1),[kn,qa]=d.createSignal(!0),[Re,Ha]=d.createSignal(!1),[Wa,Ba]=d.createSignal(""),[$n,xd]=d.createSignal(!0),[Ji,Ua]=d.createSignal(!1),[Ga,Va]=d.createSignal(1e4),[Ka,Ya]=d.createSignal(2),[Ja,Qa]=d.createSignal(1e3),[Za,Xa]=d.createSignal(""),[es,ts]=d.createSignal(""),[rs,is]=d.createSignal(""),[os,ns]=d.createSignal(""),[mr,as]=d.createSignal(!0),[ss,ls]=d.createSignal(!0),[ds,us]=d.createSignal(!0),[ps,cs]=d.createSignal(60),[Wr,gs]=d.createSignal(!1),[ms,fs]=d.createSignal("daily"),[ys,bs]=d.createSignal("09:00"),[Sn,hd]=d.createSignal(null),[ve,xs]=d.createSignal(!1),[hs,vs]=d.createSignal(""),[ws,ks]=d.createSignal(""),[$s,Ss]=d.createSignal("HTML"),[_s,Ts]=d.createSignal(!1),[Cs,Es]=d.createSignal(!0),[vd,wd]=d.createSignal("https://api.telegram.org"),[kd,$d]=d.createSignal(null),[Je,Ps]=d.createSignal(!1),[zs,Rs]=d.createSignal(!0),[Br,Ls]=d.createSignal(!1),[As,Ds]=d.createSignal("22:00"),[Ms,Fs]=d.createSignal("08:00"),[Qi,Os]=d.createSignal(!1),[_n,Sd]=d.createSignal([]),[Tn,fr]=d.createSignal(!1),[Zi,Is]=d.createSignal(""),[Xi,js]=d.createSignal(""),[Cn,_d]=d.createSignal([]),[En,Ns]=d.createSignal(!1),[Pn,Td]=d.createSignal(!0),[qs,Cd]=d.createSignal(""),[Hs,Ed]=d.createSignal(""),[Ws,Pd]=d.createSignal(""),[zn,eo]=d.createSignal(!0),[Rn,to]=d.createSignal(90),[Ln,ro]=d.createSignal(1e4),[io,oo]=d.createSignal(30),[no,ao]=d.createSignal(5e3),[An,Dn]=d.createSignal(null),[Bs,Mn]=d.createSignal(0),[Fn,zd]=d.createSignal(!0),[so,Us]=d.createSignal(!1),yr=new Map;d.onCleanup(()=>{for(const i of yr.values())clearInterval(i);yr.clear()});const[On,Rd]=d.createSignal(t("gui.app.title")),[Ld,Ad]=d.createSignal("");async function Dd(){try{const i=await y.get_platform({});i?.title&&Rd(i.title),i?.platform&&Ad(i.platform)}catch(i){console.error("RPC Error (get_platform):",i)}}function Gs(i){Na(!!i?.enabled),qa(i?.onlyOnError!==!1),Ha(!!i?.webhook?.enabled),Ba(i?.webhook?.url??""),Va(Number(i?.webhook?.timeoutMs??1e4)),Ya(Number(i?.webhook?.retryCount??2)),Qa(Number(i?.webhook?.retryDelayMs??1e3)),Xa(i?.templates?.success??""),ts(i?.templates?.error??""),is((i?.filters?.include??[]).join(", ")),ns((i?.filters?.exclude??[]).join(", ")),as(i?.matrix?.enabled!==!1),ls(i?.matrix?.onPartial!==!1),us(i?.matrix?.onAllFailed!==!1),cs(Number(i?.matrix?.stuckAfterMinutes??60)),gs(!!i?.digest?.enabled),fs(i?.digest?.frequency==="weekly"?"weekly":"daily"),bs(i?.digest?.time??"09:00"),hd(i?.digest?.lastSentAt??null),xs(!!i?.telegram?.enabled),vs(i?.telegram?.botToken??""),ks(i?.telegram?.chatId??""),Ss(i?.telegram?.parseMode??"HTML"),Ts(!!i?.telegram?.disableNotification),Es(i?.telegram?.includeDashboardLink!==!1),wd(i?.telegram?.apiBase??"https://api.telegram.org"),$d(typeof i?.telegram?.messageThreadId=="number"?i.telegram.messageThreadId:null),Ps(!!i?.native?.enabled),Rs(i?.native?.sound!==!1),Ls(!!i?.quietHours?.enabled),Ds(i?.quietHours?.from??"22:00"),Fs(i?.quietHours?.to??"08:00");const r=i?.audit;eo(r?.enabled!==!1),to(Number(r?.retentionDays??90)),ro(Number(r?.maxRecords??1e4))}async function Md(){try{const i=await y.get_settings({});vn(i.maxConcurrent??1),wn(!!i.winterMode),Gs(i.notifications);const r=i.history;oo(Number(r?.retentionDays??30)),ao(Number(r?.maxRecords??5e3)),Dn(r?.lastCleanupAt??null),Mn(Number(r?.lastCleanupDeleted??0));const n=i.audit;eo(n?.enabled!==!1),to(Number(n?.retentionDays??90)),ro(Number(n?.maxRecords??1e4)),_a(i.locale)}catch(i){console.error("RPC Error (get_settings):",i)}In(),Ur()}function Fd(){const i=r=>r.split(",").map(n=>n.trim()).filter(n=>n.length>0);return{enabled:S(),onlyOnError:kn(),webhook:{enabled:Re(),url:(Wa()||"").trim(),timeoutMs:Math.max(1e3,Math.min(12e4,Math.floor(Number(Ga())||1e4))),retryCount:Math.max(0,Math.min(5,Math.floor(Number(Ka())||0))),retryDelayMs:Math.max(100,Math.min(6e4,Math.floor(Number(Ja())||1e3)))},templates:{success:Za().trim(),error:es().trim()},filters:{include:i(rs()),exclude:i(os())},telegram:{enabled:ve(),botToken:(hs()||"").trim(),chatId:(ws()||"").trim(),parseMode:$s(),disableNotification:_s(),messageThreadId:kd(),includeDashboardLink:Cs(),apiBase:vd()},native:{enabled:Je(),sound:zs()},quietHours:{enabled:Br(),from:(As()||"22:00").trim(),to:(Ms()||"08:00").trim()},matrix:{enabled:mr(),onPartial:ss(),onAllFailed:ds(),stuckAfterMinutes:Math.max(0,Math.min(10080,Math.floor(Number(ps())||0)))},digest:{enabled:Wr(),frequency:ms(),time:(ys()||"09:00").trim(),lastSentAt:Sn()},audit:{enabled:zn(),retentionDays:Rn(),maxRecords:Ln()}}}function Vs(){return{retentionDays:Math.max(0,Math.floor(Number(io())||0)),maxRecords:Math.max(0,Math.floor(Number(no())||0)),lastCleanupAt:An(),lastCleanupDeleted:Math.max(0,Math.floor(Number(Bs())||0))}}async function br(i){try{const r=await y.save_settings(i);if(i.maxConcurrent!==void 0&&vn(r.maxConcurrent),i.winterMode!==void 0&&wn(!!r.winterMode),i.notifications!==void 0&&Gs(r.notifications),i.history!==void 0){const n=r.history;oo(Number(n?.retentionDays??30)),ao(Number(n?.maxRecords??5e3)),Dn(n?.lastCleanupAt??null),Mn(Number(n?.lastCleanupDeleted??0))}if(i.audit!==void 0){const n=r.audit;eo(n?.enabled!==!1),to(Number(n?.retentionDays??90)),ro(Number(n?.maxRecords??1e4))}_a(r.locale)}catch(r){console.error("RPC Error (save_settings):",r),s.toast.show({title:t("gui.toast.settingsSaveFailed"),variant:"error",description:Q(r)})}}async function B(){await br({notifications:Fd()})}async function Ks(){await br({history:Vs()})}async function Od(){Us(!0);try{await br({history:Vs()});const i=await y.cleanup_history({}),r=await y.get_settings({}),n=r.history;oo(Number(n?.retentionDays??30)),ao(Number(n?.maxRecords??5e3)),Dn(n?.lastCleanupAt??null),Mn(Number(n?.lastCleanupDeleted??0)),_a(r.locale),s.toast.show({title:i.success?t("gui.toast.historyCleanupDone"):t("gui.toast.historyCleanupFailed"),variant:i.success?"success":"error",description:i.message})}catch(i){console.error("RPC Error (cleanup_history):",i),s.toast.show({title:t("gui.toast.historyCleanupFailed"),variant:"error",description:Q(i)})}finally{Us(!1)}}async function In(){fr(!0);try{const i=await y.list_secrets({});Sd(i?.secrets??[])}catch(i){console.error("RPC Error (list_secrets):",i)}finally{fr(!1)}}async function Id(){const i=Zi().trim(),r=Xi();if(!(!i||!r)){fr(!0);try{const n=await y.save_secret({name:i,value:r});n?.success?(Is(""),js(""),s.toast.show({title:t("gui.toast.secretSaved"),variant:"success",description:n.message}),In()):s.toast.show({title:t("gui.toast.secretNotSaved"),variant:"error",description:n?.message??""})}catch(n){console.error("RPC Error (save_secret):",n),s.toast.show({title:t("gui.toast.secretNotSaved"),variant:"error",description:Q(n)})}finally{fr(!1)}}}async function jd(i){fr(!0);try{const r=await y.delete_secret({name:i});r?.success?(s.toast.show({title:t("gui.toast.secretDeleted"),variant:"success",description:r?.message??""}),In()):s.toast.show({title:t("gui.toast.secretNotDeleted"),variant:"error",description:r?.message??""})}catch(r){console.error("RPC Error (delete_secret):",r),s.toast.show({title:t("gui.toast.secretNotDeleted"),variant:"error",description:Q(r)})}finally{fr(!1)}}async function Ur(){Ns(!0);try{const i=await y.get_audit({action:qs()||void 0,actor:Hs()||void 0,target:Ws()||void 0,limit:200});i?.success&&_d(i?.records??[])}catch(i){console.error("RPC Error (get_audit):",i)}finally{Ns(!1)}}async function jn(){await br({audit:{enabled:zn(),retentionDays:Rn(),maxRecords:Ln()}})}async function Nd(){Ua(!0);try{await B();const i=await y.test_notification({});s.toast.show({title:i.success?t("gui.toast.testSent"):t("gui.toast.testFailed"),variant:i.success?"success":"error",description:i.message})}catch(i){console.error("RPC Error (test_notification):",i),s.toast.show({title:t("gui.toast.testFailed"),variant:"error",description:Q(i)})}finally{Ua(!1)}}async function qd(){Os(!0);try{await B();const i=await y.send_digest({});s.toast.show({title:i.success?t("gui.toast.digestSent"):t("gui.toast.digestFailed"),variant:i.success?"success":"error",description:i.message})}catch(i){console.error("RPC Error (send_digest):",i),s.toast.show({title:t("gui.toast.digestFailed"),variant:"error",description:Q(i)})}finally{Os(!1)}}async function Hd(i){vn(i),await br({maxConcurrent:i})}async function Wd(i){wn(i),await br({winterMode:i})}const[Nn,lo]=d.createSignal(null),[Bd,qn]=d.createSignal(!1),[Qe,uo]=d.createSignal(""),[po,xr]=d.createSignal("* * * * *"),[hr,vr]=d.createSignal(""),[Ys,Gr]=d.createSignal("* * * * *"),[co,Vr]=d.createSignal(0),[go,Kr]=d.createSignal(60),[Yr,Jr]=d.createSignal(""),[Ht,Qr]=d.createSignal(_t),[mo,Zr]=d.createSignal(""),[Wt,Xr]=d.createSignal([]),[fo,ei]=d.createSignal(""),[yo,ti]=d.createSignal(""),[pe,pt]=d.createSignal("cron"),[Hn,ri]=d.createSignal(""),[Wn,bo]=d.createSignal(""),[xo,ho]=d.createSignal(""),[ct,wr]=d.createSignal("new"),[ii,vo]=d.createSignal(""),[Bn,wo]=d.createSignal(!1),[ko,oi]=d.createSignal(""),[$o,ni]=d.createSignal(""),[So,ai]=d.createSignal(""),[si,Un]=d.createSignal([]),[Js,Gn]=d.createSignal("postpone"),[Qs,Vn]=d.createSignal(""),[Zs,Kn]=d.createSignal(""),[Xs,Yn]=d.createSignal(""),[el,Jn]=d.createSignal(""),[tl,Qn]=d.createSignal(""),[_o,Zn]=d.createSignal(""),[Xn,li]=d.createSignal(""),[ea,di]=d.createSignal(""),[ui,pi]=d.createSignal(""),[ci,kr]=d.createSignal(""),[fe,$r]=d.createSignal([]),[ye,Sr]=d.createSignal([]),[rl,il]=d.createSignal(""),[gt,To]=d.createSignal(!1),[mt,gi]=d.createSignal([]),[ta,Co]=d.createSignal("parallel"),[ol,Eo]=d.createSignal("continue"),[nl,Po]=d.createSignal("summary"),[al,zo]=d.createSignal(!1),[Ro,Lo]=d.createSignal(""),[ra,Ao]=d.createSignal({}),[mi,ia]=d.createSignal(!1),[oa,sl]=d.createSignal(!1),[be,fi]=d.createSignal(null),[yi,na]=d.createSignal(""),ll=["bash","edit","write","read","grep","glob","webfetch"];function dl(i,r){i==="allowed"?$r(n=>n.includes(r)?n.filter(p=>p!==r):[...n,r]):Sr(n=>n.includes(r)?n.filter(p=>p!==r):[...n,r])}function ul(i){const r=rl().trim();r&&(i==="allowed"?fe().includes(r)||$r([...fe(),r]):ye().includes(r)||Sr([...ye(),r]),il(""))}function Ud(i,r){gi(n=>r?n.includes(i)?n:[...n,i]:n.filter(p=>p!==i))}function aa(i,r){const n=i.trim()||"task",p=r.trim().replace(/[\\/:*?"<>|]+/g,"-").replace(/\s+/g,"-");return`${n}-matrix-${p||"workspace"}`}const sa=()=>mt().map(i=>P().find(r=>r.id===i)).filter(i=>!!i).map(i=>aa(Qe(),i.name));function bi(i,r,n){Ao(p=>{const Y={...p[i]??{}};n.trim()?Y[r]=n:delete Y[r];const xe={...p};return Object.keys(Y).length>0?xe[i]=Y:delete xe[i],xe})}const Gd=()=>Object.keys(ra()).length,pl=()=>{if(!gt())return;const i=Ro().trim(),r=i?Number(i):void 0,n=ra();return{workspaceIds:mt(),strategy:ta(),failureMode:ol(),aggregation:nl(),createAggregator:al(),...r!==void 0&&Number.isFinite(r)&&r>=1?{concurrency:Math.floor(r)}:{},...Object.keys(n).length>0?{overrides:n}:{}}},cl=()=>{const i=_o().trim(),r=i?Number(i):void 0;return{activeDays:si().length>0?si():void 0,windowPolicy:Js(),watchGlobs:cn(Qs()),watchIgnore:cn(Zs()),gitBranch:(Xs()||"").trim(),gitPaths:cn(el()),gitIgnore:cn(tl()),...r!==void 0&&Number.isFinite(r)&&r>=5?{gitPollSeconds:Math.floor(r)}:{}}};function Do(){To(!1),gi([]),Co("parallel"),Eo("continue"),Po("summary"),zo(!1),Lo(""),Ao({})}function Vd(){const i=Yr().trim()?` --model ${Yr().trim()}`:"",r=ct()==="last"?" --continue":ct()==="reuse"?" --session <id>":"";return`opencode run${i}${r} "${hr().replace(/\s+/g," ").trim()}"`}const[Am,Kd]=d.createSignal(null),[Mo,gl]=d.createSignal(!1),[Fo,Dm]=d.createSignal(!1),[Mm,Yd]=d.createSignal(null);async function Jd(){gl(!0);try{const i=await y.export_tasks({});if(!i.success){s.toast.show({title:t("gui.toast.exportFailed"),variant:"error",description:i.error});return}Kd(i.data);const r=new Blob([i.data],{type:"application/json"}),n=URL.createObjectURL(r),p=document.createElement("a");p.href=n,p.download=`windows-scheduler-tasks-${new Date().toISOString().slice(0,10)}.json`,document.body.appendChild(p),p.click(),document.body.removeChild(p),URL.revokeObjectURL(n),s.toast.show({title:t("gui.toast.exported",{count:i.count}),variant:"success"})}catch(i){console.error("RPC Error (export_tasks):",i),s.toast.show({title:t("gui.toast.exportFailed"),variant:"error",description:Q(i)})}finally{gl(!1)}}function Qd(i){const n=i.target.files?.[0]??null;Yd(n)}async function la(){try{const i=await y.get_templates({}),r=Array.isArray(i?.templates)?i.templates:[];md(r)}catch(i){console.error("RPC Error (get_templates):",i)}}async function xi(){try{const i=await y.get_workspaces({}),r=Array.isArray(i?.workspaces)?i.workspaces:[];te(r)}catch(i){console.error("RPC Error (get_workspaces):",i)}}const hi=()=>P().find(i=>i.id===ut());async function Oo(){try{const i=await y.get_profiles({}),r=Array.isArray(i?.profiles)?i.profiles:[];ad(r),i?.current&&Aa(i.current),sd(!!i?.pinnedByEnv)}catch(i){console.error("RPC Error (get_profiles):",i)}}async function Zd(i){if(!(!i||i===La())){cr(!0);try{const r=await y.set_profile({name:i});if(!r.success){s.toast.show({title:t("gui.toast.profileSwitchFailed"),variant:"error",description:r.message??t("gui.common.unknownError")});return}Aa(r.current??i),s.toast.show({title:t("gui.toast.profileSwitched"),variant:"success",description:r.message}),await Oo()}catch(r){console.error("RPC Error (set_profile):",r),s.toast.show({title:t("gui.toast.profileSwitchError"),variant:"error",description:st(Q(r))})}finally{cr(!1)}}}async function Xd(){const i=(await Ct(t("gui.profile.namePrompt"),"")??"").trim();if(i){cr(!0);try{const r=await y.create_profile({name:i});if(!r.success){s.toast.show({title:t("gui.toast.profileCreateFailed"),variant:"error",description:r.message??t("gui.common.unknownError")});return}await Oo(),s.toast.show({title:t("gui.toast.profileCreated"),variant:"success",description:r.message})}catch(r){console.error("RPC Error (create_profile):",r),s.toast.show({title:t("gui.toast.profileCreateError"),variant:"error",description:st(Q(r))})}finally{cr(!1)}}}async function eu(i){if(!(!i||i==="default")&&window.confirm(t("gui.profile.deleteConfirm",{name:i}))){cr(!0);try{const r=await y.delete_profile({name:i});if(!r.success){s.toast.show({title:t("gui.toast.profileDeleteFailed"),variant:"error",description:r.message??t("gui.common.unknownError")});return}await Oo(),s.toast.show({title:t("gui.toast.profileDeleted"),variant:"success"})}catch(r){console.error("RPC Error (delete_profile):",r),s.toast.show({title:t("gui.toast.profileDeleteError"),variant:"error",description:st(Q(r))})}finally{cr(!1)}}}function tu(i){return i?Object.entries(i).map(([r,n])=>`${r}=${n}`).join(`
|
|
8
|
+
`):""}function ru(i){const r={};for(const n of i.split(/\r?\n/)){const p=n.trim();if(!p||p.startsWith("#"))continue;const Y=p.indexOf("=");if(Y<=0)return null;const xe=p.slice(0,Y).trim();if(!/^[A-Za-z_][A-Za-z0-9_]*$/.test(xe))return null;r[xe]=p.slice(Y+1).trim()}return r}async function iu(i){const r=await Ct(t("gui.workspace.envPrompt"),tu(i.env));if(r===null)return;const n=ru(r);if(!n){s.toast.show({title:t("gui.toast.envInvalid"),variant:"error",description:t("gui.workspace.envInvalidHelp")});return}const p=await Ct(t("gui.workspace.envFilePrompt"),i.envFile??"");if(p!==null){je(!0);try{const Y=await y.update_workspace({id:i.id,env:Object.keys(n).length?n:null,envFile:p.trim()||null});if(!Y.success){s.toast.show({title:t("gui.toast.envSaveFailed"),variant:"error",description:Y.error??t("gui.common.unknownError")});return}await xi(),s.toast.show({title:t("gui.toast.envSaved"),variant:"success",description:t("gui.workspace.envSecretsMasked")})}catch(Y){console.error("RPC Error (update_workspace env):",Y),s.toast.show({title:t("gui.toast.envSaveError"),variant:"error",description:st(Q(Y))})}finally{je(!1)}}}async function ou(){const i=(await Ct(t("gui.workspace.pathPrompt"),"")??"").trim();if(!i)return;const r=(await Ct(t("gui.workspace.namePrompt"),"")??"").trim();je(!0);try{const n=await y.add_workspace({path:i,...r?{name:r}:{}});if(!n.success){s.toast.show({title:t("gui.toast.workspaceAddFailed"),variant:"error",description:n.error??t("gui.common.unknownError")});return}await xi(),n.workspace?.id&&Ke(n.workspace.id),s.toast.show({title:t("gui.toast.workspaceAdded"),variant:"success"})}catch(n){console.error("RPC Error (add_workspace):",n),s.toast.show({title:t("gui.toast.workspaceAddFailed"),variant:"error",description:st(Q(n))})}finally{je(!1)}}async function nu(i){const r=(await Ct(t("gui.workspace.pathPromptShort"),i.path)??"").trim();if(!r)return;const n=(await Ct(t("gui.workspace.namePromptShort"),i.name)??"").trim();je(!0);try{const p=await y.update_workspace({id:i.id,path:r,...n?{name:n}:{}});if(!p.success){s.toast.show({title:t("gui.toast.workspaceUpdateFailed"),variant:"error",description:p.error??t("gui.common.unknownError")});return}await xi(),s.toast.show({title:t("gui.toast.workspaceUpdated"),variant:"success"})}catch(p){console.error("RPC Error (update_workspace):",p),s.toast.show({title:t("gui.toast.workspaceUpdateFailed"),variant:"error",description:st(Q(p))})}finally{je(!1)}}async function au(i){if(window.confirm(t("gui.workspace.deleteConfirm",{name:i.name}))){je(!0);try{const r=await y.delete_workspace({id:i.id});if(!r.success){s.toast.show({title:t("gui.toast.workspaceDeleteFailed"),variant:"error",description:r.message??t("gui.common.unknownError")});return}ut()===i.id&&Ke(""),lt()===i.id&&jr("all"),await xi(),await Ze(),s.toast.show({title:t("gui.toast.workspaceDeleted"),variant:"success",description:r.message})}catch(r){console.error("RPC Error (delete_workspace):",r),s.toast.show({title:t("gui.toast.workspaceDeleteFailed"),variant:"error",description:st(Q(r))})}finally{je(!1)}}}const su=i=>{if(Ki(i),i.startsWith("custom:")){const n=Yi().find(p=>`custom:${p.id}`===i);if(!n)return;if(vr(n.prompt??""),n.schedule){xr(n.schedule);const p=Kl().find(Y=>Y.value===n.schedule);Gr(p?p.value:"__custom__")}if(Vr(n.retryCount??0),Kr(n.retryDelay??60),Zr(n.qualityGate??""),Jr(n.model??""),Qr(typeof n.priority=="number"?n.priority:_t),Xr(Array.isArray(n.dependsOn)?n.dependsOn:[]),ei(n.beforeScript??""),ti(n.afterScript??""),pt(n.triggerType==="file"?"file":n.triggerType==="git"?"git":n.triggerType==="mcp-event"?"mcp-event":"cron"),ri(n.watchPath??""),Vn(Nt(n.watchGlobs)),Kn(Nt(n.watchIgnore)),Yn(n.gitBranch??""),Jn(Nt(n.gitPaths)),Qn(Nt(n.gitIgnore)),Zn(n.gitPollSeconds?String(n.gitPollSeconds):""),Un(Array.isArray(n.activeDays)?n.activeDays:[]),Gn(n.windowPolicy??"postpone"),oi(n.timezone??""),ni(n.notBefore??""),ai(n.notAfter??""),li(n.mcpEvent?.server??""),di(n.mcpEvent?.event??""),pi(n.mcpEvent?.filter??""),kr(n.workingDirectory??""),Ke(n.workspaceId??""),$r(Array.isArray(n.allowedTools)?n.allowedTools:[]),Sr(Array.isArray(n.deniedTools)?n.deniedTools:[]),n.matrix){To(!0),gi(Array.isArray(n.matrix.workspaceIds)?n.matrix.workspaceIds:[]),Co(n.matrix.strategy==="sequential"?"sequential":"parallel"),Eo(n.matrix.failureMode==="stop"?"stop":"continue"),Po(n.matrix.aggregation==="per-task"?"per-task":"summary"),zo(!!n.matrix.createAggregator),Lo(typeof n.matrix.concurrency=="number"?String(n.matrix.concurrency):"");const p=n.matrix.overrides;Ao(p?{...p}:{})}else Do();return}const r=ja().find(n=>n.value===i);r&&vr(r.prompt)};async function lu(){if(!(hr()||"").trim()){s.toast.show({title:t("gui.toast.nothingToSave"),variant:"error",description:t("gui.toast.promptRequired")});return}const i=(await Ct(t("gui.templates.namePrompt"),"")??"").trim();if(i)try{const r=await y.save_template({name:i,prompt:(hr()||"").trim(),schedule:(po()||"").trim(),timeoutSeconds:3600,model:(Yr()||"").trim(),priority:Ht(),retryCount:co(),retryDelay:go(),qualityGate:(mo()||"").trim(),beforeScript:(fo()||"").trim(),afterScript:(yo()||"").trim(),dependsOn:Wt(),triggerType:pe(),timezone:(ko()||"").trim()||void 0,notBefore:($o()||"").trim()||void 0,notAfter:(So()||"").trim()||void 0,mcpEvent:pe()==="mcp-event"?{server:(Xn()||"").trim(),event:(ea()||"").trim(),...ui().trim()?{filter:ui().trim()}:{}}:void 0,watchPath:(Hn()||"").trim(),...cl(),workingDirectory:(ci()||"").trim(),workspaceId:(ut()||"").trim()||void 0,allowedTools:fe().length>0?fe():void 0,deniedTools:ye().length>0?ye():void 0,matrix:pl()});if(!r.success){s.toast.show({title:t("gui.toast.templateSaveFailed"),variant:"error",description:r.error||t("gui.common.unknownError")});return}await la();const n=r.template;n?.id&&Ki(`custom:${n.id}`),s.toast.show({title:t("gui.toast.templateSaved",{name:i}),variant:"success"})}catch(r){console.error("RPC Error (save_template):",r),s.toast.show({title:t("gui.toast.templateSaveError"),variant:"error",description:Q(r)})}}async function du(i){if(window.confirm(t("gui.templates.deleteConfirm",{name:i.name})))try{const r=await y.delete_template({id:i.id});if(!r.success){s.toast.show({title:t("gui.toast.templateDeleteFailed"),variant:"error",description:r.error||t("gui.common.unknownError")});return}Hr()===`custom:${i.id}`&&Ki("custom"),await la(),s.toast.show({title:t("gui.toast.templateDeleted",{name:i.name}),variant:"success"})}catch(r){console.error("RPC Error (delete_template):",r),s.toast.show({title:t("gui.toast.templateDeleteError"),variant:"error",description:Q(r)})}}async function Ze(){try{const i=await y.get_tasks({});console.log("[GUI] Received tasks:",i);const r=Array.isArray(i?.tasks)?i.tasks:[];console.log("[GUI] tasks count:",r.length);const n=r.map(p=>({name:p.name,schedule:p.schedule,status:p.status??"unknown",runsTotal:typeof p.runsTotal=="number"?p.runsTotal:0,runsSuccess:typeof p.runsSuccess=="number"?p.runsSuccess:0,runsError:typeof p.runsError=="number"?p.runsError:0,runsPartial:typeof p.runsPartial=="number"?p.runsPartial:0,nextRun:p.nextRun??void 0,paused:!!p.paused,orphaned:!!p.orphaned,retryCount:p.retryCount??0,retryDelay:p.retryDelay??60,qualityGate:p.qualityGate??void 0,dependsOn:Array.isArray(p.dependsOn)?p.dependsOn:void 0,model:p.model??void 0,priority:typeof p.priority=="number"?p.priority:_t,beforeScript:p.beforeScript??void 0,afterScript:p.afterScript??void 0,triggerType:p.triggerType??"cron",runAt:p.runAt??void 0,session:p.session??void 0,sessionMaxRuns:p.sessionMaxRuns??void 0,mcpEvent:p.mcpEvent??void 0,watchPath:p.watchPath??void 0,timezone:p.timezone??void 0,notBefore:p.notBefore??void 0,notAfter:p.notAfter??void 0,pausedUntil:p.pausedUntil??void 0,workingDirectory:p.workingDirectory??void 0,workspaceId:p.workspaceId??void 0,workspaceName:p.workspaceName??void 0,workspaceColor:p.workspaceColor??void 0,allowedTools:Array.isArray(p.allowedTools)?p.allowedTools:void 0,deniedTools:Array.isArray(p.deniedTools)?p.deniedTools:void 0,matrix:p.matrix??null,matrixParentId:p.matrixParentId??null,isMatrixParent:!!p.isMatrixParent,matrixSummary:p.matrixSummary??null,prompt:p.prompt??""}));N(n),console.log("[GUI] jobs:",w()),await uu()}catch(i){console.error("RPC Error (get_tasks):",i),s.toast.show({title:t("gui.toast.jobsLoadFailed"),variant:"error",description:st(Q(i))})}}async function uu(){try{const i=await y.get_metrics({});cd({total:i.total??0,success:i.success??0,error:i.error??0})}catch(i){console.error("RPC Error (get_metrics):",i)}}async function pu(i){Oa(i);try{const r=await y.get_history({limit:10,taskName:i});gd(r.records??[])}catch(r){console.error("RPC Error (get_history):",r),s.toast.show({title:t("gui.toast.historyLoadFailed"),variant:"error",description:Q(r)})}}async function cu(i){ia(!0),na(i),sl(!0),fi(null);try{const r=await y.dry_run({taskName:i});fi(r)}catch(r){console.error("RPC Error (dry_run):",r),fi({success:!1,error:Q(r),tasks:[],warnings:[]})}finally{sl(!1)}}function ml(){ia(!1),na(""),fi(null)}async function gu(){Ma(!0),Gi("");try{const i=await y.create_task({name:(Qe()||"").trim(),schedule:(po()||"").trim(),prompt:(hr()||"").trim(),model:(Yr()||"").trim(),priority:Ht(),retryCount:co(),retryDelay:go(),qualityGate:(mo()||"").trim(),beforeScript:(fo()||"").trim(),afterScript:(yo()||"").trim(),dependsOn:Wt(),triggerType:pe(),session:ct(),...ct()==="reuse"&&(ii()||"").trim()?{sessionMaxRuns:Number((ii()||"").trim())}:{},...pe()==="once"?{runAt:(Wn()||"").trim()||void 0,delaySeconds:(xo()||"").trim()?Number(xo().trim()):void 0}:{},timezone:(ko()||"").trim()||void 0,notBefore:($o()||"").trim()||void 0,notAfter:(So()||"").trim()||void 0,mcpEvent:pe()==="mcp-event"?{server:(Xn()||"").trim(),event:(ea()||"").trim(),...ui().trim()?{filter:ui().trim()}:{}}:void 0,watchPath:(Hn()||"").trim(),...cl(),workingDirectory:(ci()||"").trim(),workspaceId:(ut()||"").trim()||void 0,allowedTools:fe().length>0?fe():void 0,deniedTools:ye().length>0?ye():void 0,runWhenLoggedOff:Bn(),matrix:pl()});if(!i.success){const r=st(i.message);Gi(r),s.toast.show({title:t("gui.toast.taskCreateFailed"),variant:"error",description:r});return}await new Promise(r=>setTimeout(r,500)),await Ze(),uo(""),xr("* * * * *"),vr(""),Gr("* * * * *"),Vr(0),Kr(60),Zr(""),Xr([]),Jr(""),Qr(_t),ei(""),ti(""),pt("cron"),ri(""),bo(""),ho(""),wr("new"),vo(""),wo(!1),oi(""),ni(""),ai(""),li(""),di(""),pi(""),kr(""),Ke(""),$r([]),Sr([]),Do(),lo(null),Ki("custom"),s.toast.show({title:t("gui.toast.taskCreated"),variant:"success"})}catch(i){console.error("RPC Error (create_task):",i);const r=st(Q(i));Gi(r),s.toast.show({title:t("gui.toast.taskCreateFailed"),variant:"error",description:r})}finally{Ma(!1)}}function mu(i){const r=new Date().toISOString(),n=yr.get(i);n&&clearInterval(n);let p=0;const Y=setInterval(()=>{if(p+=1,p>900){clearInterval(Y),yr.delete(i);return}(async()=>{try{const ft=((await y.get_history({limit:50})).records??[]).find(ue=>String(ue.taskName??"").toLowerCase()===i.toLowerCase()&&typeof ue.startedAt=="string"&&ue.startedAt>=r);if(!ft)return;clearInterval(Y),yr.delete(i);const Ce=ft.status==="success",_r=((Number(ft.durationMs)||0)/1e3).toFixed(1),Pt=ft.error?`: ${ft.error}`:"";s.toast.show({title:Ce?t("gui.toast.taskDone",{name:i}):t("gui.toast.taskCrashed",{name:i}),variant:Ce?"success":"error",description:`${_r}s${Pt}`}),await Ze()}catch(xe){console.error("RPC Error (get_history):",xe)}})()},2e3);yr.set(i,Y)}async function fu(i){if(!i||typeof i!="string"){console.error("[GUI] run_task aborted: empty task name");return}try{const r=await y.run_task({name:i});if(!r.success){s.toast.show({title:t("gui.toast.taskStartFailed",{name:i}),variant:"error",description:r.message});return}s.toast.show({title:r.message||t("gui.toast.taskStarted",{name:i}),variant:"success"}),/уже выполняется/i.test(r.message||"")||mu(i),await Ze()}catch(r){console.error("RPC Error (run_task):",r),s.toast.show({title:t("gui.toast.runFailed"),variant:"error",description:Q(r)})}}async function yu(i){try{const r=await y.pause_task({name:i});if(!r.success){s.toast.show({title:t("gui.toast.pauseFailed",{name:i}),variant:"error",description:r.message});return}s.toast.show({title:t("gui.toast.paused",{name:i}),variant:"success"}),await Ze()}catch(r){console.error("RPC Error (pause_task):",r),s.toast.show({title:t("gui.toast.pauseError"),variant:"error",description:Q(r)})}}async function bu(i){try{const r=await y.resume_task({name:i});if(!r.success){s.toast.show({title:t("gui.toast.resumeFailed",{name:i}),variant:"error",description:r.message});return}s.toast.show({title:t("gui.toast.resumed",{name:i}),variant:"success"}),await Ze()}catch(r){console.error("RPC Error (resume_task):",r),s.toast.show({title:t("gui.toast.resumeError"),variant:"error",description:Q(r)})}}async function xu(i){if(window.confirm(t("gui.matrix.cancelClonesConfirm",{name:i})))try{const r=await y.cancel_matrix({name:i});if(!r.success){s.toast.show({title:t("gui.toast.matrixCancelFailed"),variant:"error",description:r.message});return}s.toast.show({title:r.message,variant:"success"}),await Ze()}catch(r){console.error("RPC Error (cancel_matrix):",r),s.toast.show({title:t("gui.toast.matrixCancelError"),variant:"error",description:Q(r)})}}async function hu(i){const n=w().find(p=>p.name===i)?.matrix?t("gui.matrix.deleteConfirm",{name:i}):t("gui.task.deleteConfirm",{name:i});if(window.confirm(n))try{const p=await y.delete_task({name:i});if(!p.success){s.toast.show({title:t("gui.toast.deleteFailed"),variant:"error",description:p.message});return}s.toast.show({title:t("gui.toast.taskDeleted",{name:i}),variant:"success"}),bn()===i&&(gr(""),xn(null)),Nn()?.name===i&&lo(null),await Ze()}catch(p){console.error("RPC Error (delete_task):",p),s.toast.show({title:t("gui.toast.deleteFailed"),variant:"error",description:Q(p)})}}async function vu(i){xn(i),gr(t("gui.logs.loading"));try{const r=await y.get_task_logs({name:i});if(!r.success){gr(r.error||t("gui.logs.loadFailed")),s.toast.show({title:t("gui.toast.logsReadFailed"),variant:"error",description:r.error});return}gr(r.logs||t("gui.logs.empty"))}catch(r){console.error("RPC Error (get_task_logs):",r),gr(t("gui.logs.readError",{error:Q(r)}))}}function wu(i){lo(i),qn(!1),uo(i.name),xr(i.schedule),vr(i.prompt??""),Jr(i.model??""),Qr(typeof i.priority=="number"?i.priority:_t),Vr(i.retryCount??0),Kr(i.retryDelay??60),Zr(i.qualityGate??""),Xr(Array.isArray(i.dependsOn)?i.dependsOn:[]),ei(i.beforeScript??""),ti(i.afterScript??""),pt(i.triggerType??"cron"),ri(i.watchPath??""),Vn(Nt(i.watchGlobs)),Kn(Nt(i.watchIgnore)),Yn(i.gitBranch??""),Jn(Nt(i.gitPaths)),Qn(Nt(i.gitIgnore)),Zn(typeof i.gitPollSeconds=="number"?String(i.gitPollSeconds):""),Un(Array.isArray(i.activeDays)?i.activeDays:[]),Gn(i.windowPolicy??"postpone"),bo(i.runAt??""),ho(""),wr(i.session==="reuse"||i.session==="last"?i.session:"new"),wo(i.runWhenLoggedOff===!0),vo(typeof i.sessionMaxRuns=="number"?String(i.sessionMaxRuns):""),oi(i.timezone??""),ni(i.notBefore??""),ai(i.notAfter??""),li(i.mcpEvent?.server??""),di(i.mcpEvent?.event??""),pi(i.mcpEvent?.filter??""),kr(i.workingDirectory??""),Ke(i.workspaceId??""),$r(Array.isArray(i.allowedTools)?i.allowedTools:[]),Sr(Array.isArray(i.deniedTools)?i.deniedTools:[]),i.matrix?(To(!0),gi(Array.isArray(i.matrix.workspaceIds)?i.matrix.workspaceIds:[]),Co(i.matrix.strategy==="sequential"?"sequential":"parallel"),Eo(i.matrix.failureMode==="stop"?"stop":"continue"),Po(i.matrix.aggregation==="per-task"?"per-task":"summary"),zo(!!i.matrix.createAggregator),Lo(typeof i.matrix.concurrency=="number"?String(i.matrix.concurrency):""),Ao(i.matrix.overrides?{...i.matrix.overrides}:{})):Do();const r=CRON_PRESETS.find(n=>n.value===i.schedule);Gr(r?r.value:"__custom__")}Ze(),xi(),Oo(),Md(),Dd(),la();const ku=setInterval(Ze,5e3);d.onCleanup(()=>clearInterval(ku));const $u=Ys()==="__custom__",da=Nn()!==null,Su=()=>{const i=(ko()||"").trim();if(!i)return!0;try{return new Intl.DateTimeFormat("en-US",{timeZone:i}),!0}catch{return!1}},ua=(i,r,n)=>Number.isInteger(i)&&i>=r&&(n===void 0||i<=n),fl=()=>{const i=(Qe()||"").trim();if(!i)return t("gui.validation.taskNameRequired");if(!(hr()||"").trim())return t("gui.validation.promptRequired");if(pe()==="cron"&&!(po()||"").trim())return t("gui.validation.cronRequired");if(pe()==="once"&&!(Wn()||"").trim()&&!(xo()||"").trim())return t("gui.validation.runAtRequired");if(pe()==="git"&&!(ut()||"").trim()&&!(ci()||"").trim())return t("gui.validation.gitWorkspaceRequired");if((_o()||"").trim()&&!/^([5-9]|[1-9]\d+)$/.test(_o().trim()))return t("gui.validation.gitPollInvalid");if(gt()&&mt().length===0)return t("gui.validation.matrixWorkspacesRequired");if(ct()==="reuse"&&(ii()||"").trim()&&!/^[1-9]\d*$/.test(ii().trim()))return t("gui.validation.sessionMaxRunsInvalid");if(gt()&&(Ro()||"").trim()&&!/^[1-9]\d*$/.test(Ro().trim()))return t("gui.validation.matrixConcurrencyInvalid");if(($o()||"").trim()===""!=((So()||"").trim()===""))return t("gui.validation.windowPairRequired");if(!Su())return t("gui.validation.timezoneInvalid");if(!ua(Ht(),0,10))return t("gui.validation.priorityInvalid");if(!ua(co(),0))return t("gui.validation.retryCountInvalid");if(!ua(go(),0))return t("gui.validation.retryDelayInvalid");const r=i.toLowerCase();return Wt().some(n=>n.trim().toLowerCase()===r)?t("gui.validation.dependsOnSelf"):""},Io=()=>fl()==="",vi=()=>w()??[],pa=()=>{const i=lt();return i==="all"?vi():i==="none"?vi().filter(r=>!r.workspaceId):vi().filter(r=>r.workspaceId===i)},yl=()=>{const i=(Nn()?.name??Qe()).trim().toLowerCase();return vi().map(r=>r.name).filter(r=>r.trim().toLowerCase()!==i)};function _u(i,r){Xr(n=>r?n.some(p=>p.toLowerCase()===i.toLowerCase())?n:[...n,i]:n.filter(p=>p.toLowerCase()!==i.toLowerCase()))}const[Tu,bl]=d.createSignal(null);function Et(i=!1){return`background:${i?"rgba(90,200,250,0.16)":"transparent"};border:1px solid ${i?"rgba(90,200,250,0.5)":"#333"};border-radius:6px;width:32px;height:32px;display:flex;align-items:center;justify-content:center;cursor:pointer;color:${i?"#5ac8fa":"#cfcfd2"};font-size:14px;line-height:1;padding:0;transition:background 0.18s ease, border-color 0.18s ease, color 0.18s ease`}function we(i,r,n=!1){const p=i.currentTarget;p&&(p.style.background=r?"rgba(255,255,255,0.09)":n?"rgba(90,200,250,0.16)":"transparent",p.style.borderColor=r?"#5ac8fa":n?"rgba(90,200,250,0.5)":"#333",p.style.color=r||n?"#5ac8fa":"#cfcfd2")}const Cu=i=>{const r=i.job;return!r||!r.name?null:(()=>{var n=Cc(),p=n.firstChild,Y=p.firstChild,xe=Y.firstChild,ie=xe.firstChild,ft=ie.firstChild,Ce=ie.nextSibling,_r=xe.nextSibling,Pt=Y.nextSibling,ue=Pt.firstChild,yt=ue.nextSibling,Le=yt.nextSibling,Ne=Le.nextSibling,bt=Ne.nextSibling,xt=bt.nextSibling;return e.insert(ft,()=>r.name),e.insert(ie,(()=>{var c=e.memo(()=>!!r.workspaceName);return()=>c()&&(()=>{var u=Ec();return u.firstChild,e.insert(u,()=>r.workspaceName,null),e.effect(v=>{var z=`Workspace: ${r.workspaceName}${r.workingDirectory?` (${r.workingDirectory})`:""}`,q=`font-size:11px;font-weight:600;flex-shrink:0;cursor:help;white-space:nowrap;padding:2px 7px;border-radius:999px;border:1px solid ${r.workspaceColor||"#5ac8fa"};color:${r.workspaceColor||"#5ac8fa"};background:${r.workspaceColor||"#5ac8fa"}1a`;return z!==v.e&&e.setAttribute(u,"title",v.e=z),v.t=e.style(u,q,v.t),v},{e:void 0,t:void 0}),u})()})(),null),e.insert(ie,(()=>{var c=e.memo(()=>!!(r.isMatrixParent&&r.matrix));return()=>c()&&(()=>{var u=Pc(),v=u.firstChild,z=v.nextSibling;return z.nextSibling,e.insert(u,()=>r.matrix.workspaceIds.length,z),e.insert(u,(()=>{var q=e.memo(()=>!!r.matrix.concurrency);return()=>q()?` ⚙${r.matrix.concurrency}`:""})(),null),e.effect(()=>e.setAttribute(u,"title",t("gui.job.fanoutTitle",{count:r.matrix.workspaceIds.length,strategy:r.matrix.strategy??"parallel",failureMode:r.matrix.failureMode??"continue",concurrency:r.matrix.concurrency?t("gui.job.fanoutConcurrency",{concurrency:r.matrix.concurrency}):"",overrides:r.matrix.overrides?t("gui.job.fanoutOverrides",{overrides:Object.keys(r.matrix.overrides).length}):""}))),u})()})(),null),e.insert(ie,(()=>{var c=e.memo(()=>!!r.matrixParentId);return()=>c()&&(()=>{var u=zc();return u.firstChild,e.insert(u,()=>r.matrixParentId,null),e.effect(()=>e.setAttribute(u,"title",t("gui.job.matrixClone",{parent:r.matrixParentId}))),u})()})(),null),e.insert(ie,(()=>{var c=e.memo(()=>!!r.watchPath);return()=>c()&&(()=>{var u=Rc();return e.effect(()=>e.setAttribute(u,"title",t("gui.job.watchFile",{path:r.watchPath}))),u})()})(),null),e.insert(ie,(()=>{var c=e.memo(()=>!!(Array.isArray(r.watchGlobs)&&r.watchGlobs.length>0));return()=>c()&&(()=>{var u=Lc();return e.insert(u,()=>t("gui.job.watchGlobsCount",{count:r.watchGlobs.length})),e.effect(()=>e.setAttribute(u,"title",t("gui.job.watchGlobsTitle",{globs:r.watchGlobs.join(", ")}))),u})()})(),null),e.insert(ie,(()=>{var c=e.memo(()=>r.triggerType==="git");return()=>c()&&(()=>{var u=Ac();return e.effect(()=>e.setAttribute(u,"title",t("gui.job.gitTriggerTitle",{branch:r.gitBranch?t("gui.job.gitTriggerBranch",{branch:r.gitBranch}):"",paths:Array.isArray(r.gitPaths)&&r.gitPaths.length>0?t("gui.job.gitTriggerPaths",{paths:r.gitPaths.join(", ")}):"",seconds:r.gitPollSeconds??60}))),u})()})(),null),e.insert(ie,(()=>{var c=e.memo(()=>!!(Array.isArray(r.activeDays)&&r.activeDays.length>0));return()=>c()&&(()=>{var u=Dc(),v=u.firstChild,z=v.nextSibling;return z.nextSibling,e.insert(u,()=>r.activeDays.length,z),e.effect(()=>e.setAttribute(u,"title",t("gui.job.activeDaysTitle",{days:r.activeDays.map(q=>[t("gui.weekday.0"),t("gui.weekday.1"),t("gui.weekday.2"),t("gui.weekday.3"),t("gui.weekday.4"),t("gui.weekday.5"),t("gui.weekday.6")][q]??q).join(", ")}))),u})()})(),null),e.insert(ie,(()=>{var c=e.memo(()=>!!r.timezone);return()=>c()&&(()=>{var u=Mc();return u.firstChild,e.insert(u,()=>r.timezone,null),e.effect(()=>e.setAttribute(u,"title",t("gui.job.timezoneTitle",{tz:r.timezone}))),u})()})(),null),e.insert(ie,(()=>{var c=e.memo(()=>!!(r.notBefore&&r.notAfter));return()=>c()&&(()=>{var u=Fc(),v=u.firstChild,z=v.nextSibling;return z.nextSibling,e.insert(u,()=>r.notBefore,z),e.insert(u,()=>r.notAfter,null),e.effect(()=>e.setAttribute(u,"title",t("gui.job.windowTitle",{from:r.notBefore,to:r.notAfter}))),u})()})(),null),e.insert(ie,(()=>{var c=e.memo(()=>!!r.pausedUntil);return()=>c()&&(()=>{var u=Oc();return e.insert(u,()=>t("gui.job.pausedUntilShort",{date:new Date(r.pausedUntil).toLocaleDateString()})),e.effect(()=>e.setAttribute(u,"title",t("gui.job.pausedUntilTitle",{date:new Date(r.pausedUntil).toLocaleString()}))),u})()})(),null),e.insert(ie,(()=>{var c=e.memo(()=>!!r.runWhenLoggedOff);return()=>c()&&(()=>{var u=Ic();return u.firstChild,e.insert(u,()=>t("gui.job.runWhenLoggedOffShort"),null),e.effect(()=>e.setAttribute(u,"title",t("gui.job.runWhenLoggedOffTitle",{mode:r.logonMode??t("gui.job.logonModeUnknown")}))),u})()})(),null),e.insert(ie,(()=>{var c=e.memo(()=>!!(r.beforeScript||r.afterScript));return()=>c()&&(()=>{var u=jc();return e.effect(()=>e.setAttribute(u,"title",`Lifecycle hooks: ${[r.beforeScript?`pre: ${r.beforeScript}`:"",r.afterScript?`post: ${r.afterScript}`:""].filter(Boolean).join(" · ")}`)),u})()})(),null),e.insert(ie,(()=>{var c=e.memo(()=>r.triggerType==="mcp-event");return()=>c()&&(()=>{var u=Nc();return e.effect(()=>e.setAttribute(u,"title",t("gui.job.mcpEventTitle",{event:r.mcpEvent?.event??"—",filterSuffix:r.mcpEvent?.filter?t("gui.job.mcpEventFilterSuffix",{filter:r.mcpEvent.filter}):""}))),u})()})(),null),e.insert(ie,(()=>{var c=e.memo(()=>!!(r.session&&r.session!=="new"));return()=>c()&&(()=>{var u=qc();return e.insert(u,(()=>{var v=e.memo(()=>r.session==="reuse");return()=>v()?t("gui.job.sessionReuseShort"):t("gui.job.sessionContinueShort")})()),e.effect(()=>e.setAttribute(u,"title",r.session==="reuse"?r.sessionId?t("gui.job.sessionReuseTitleId",{id:r.sessionId}):t("gui.job.sessionReuseTitle"):t("gui.job.sessionContinueTitle"))),u})()})(),null),e.insert(ie,(()=>{var c=e.memo(()=>!!r.model);return()=>c()&&(()=>{var u=Hc();return u.firstChild,e.insert(u,()=>r.model,null),e.effect(()=>e.setAttribute(u,"title",t("gui.job.modelTitle",{model:r.model}))),u})()})(),null),e.insert(ie,(()=>{var c=e.memo(()=>typeof r.priority=="number"&&r.priority!==_t);return()=>c()&&(()=>{var u=Wc();return u.firstChild,e.insert(u,()=>Gl(r.priority),null),e.effect(()=>e.setAttribute(u,"title",t("gui.job.priorityTitle",{label:Gl(r.priority),priority:r.priority}))),u})()})(),null),e.insert(ie,(()=>{var c=e.memo(()=>!!(Array.isArray(r.allowedTools)&&r.allowedTools.length>0||Array.isArray(r.deniedTools)&&r.deniedTools.length>0));return()=>c()?(()=>{var u=Bc();return e.effect(()=>e.setAttribute(u,"title",t("gui.job.toolLimitsTitle",{limits:[r.allowedTools?.length?`allowed=[${r.allowedTools.join(", ")}]`:"",r.deniedTools?.length?`denied=[${r.deniedTools.join(", ")}]`:""].filter(Boolean).join(" · ")}))),u})():null})(),null),e.insert(xe,(()=>{var c=e.memo(()=>!!(Array.isArray(r.dependsOn)&&r.dependsOn.length>0));return()=>c()&&(()=>{var u=Uc(),v=u.firstChild;return e.insert(v,()=>t("gui.job.dependsOn",{list:r.dependsOn.join(" + ")})),u})()})(),Ce),e.insert(xe,(()=>{var c=e.memo(()=>!!(r.isMatrixParent&&r.matrixSummary));return()=>c()&&(()=>{var u=Gc(),v=u.firstChild;return e.insert(v,()=>t("gui.job.matrixDone",{success:r.matrixSummary.successCount,total:r.matrixSummary.totalCount}),null),e.insert(v,(()=>{var z=e.memo(()=>r.matrixSummary.errorCount>0);return()=>z()?` · ❌ ${r.matrixSummary.errorCount}`:""})(),null),e.insert(v,(()=>{var z=e.memo(()=>r.matrixSummary.pendingCount>0);return()=>z()?` · ⏳ ${r.matrixSummary.pendingCount}`:""})(),null),e.effect(z=>{var q=r.matrixSummary.message,C=`cursor:help;color:${Rm(r.matrixSummary.status)};white-space:nowrap;overflow:hidden;text-overflow:ellipsis`;return q!==z.e&&e.setAttribute(v,"title",z.e=q),z.t=e.style(v,C,z.t),z},{e:void 0,t:void 0}),u})()})(),Ce),e.insert(Ce,()=>t("gui.job.runsLine",{total:r.runsTotal??0,success:r.runsSuccess??0,partial:r.runsPartial??0,error:r.runsError??0})),e.insert(xe,(()=>{var c=e.memo(()=>!!(r.schedule||r.nextRun));return()=>c()&&(()=>{var u=Vc(),v=u.firstChild;return e.insert(v,()=>r.schedule),e.insert(u,(()=>{var z=e.memo(()=>!!r.nextRun);return()=>z()&&(()=>{var q=Kc();return q.firstChild,e.insert(q,()=>r.nextRun,null),q})()})(),null),u})()})(),null),e.insert(_r,(()=>{var c=e.memo(()=>r.status==="running");return()=>c()?(()=>{var u=Yc();return e.insert(u,()=>t("gui.jobStatus.running",{seconds:fd()})),u})():(()=>{var u=Jc();return e.insert(u,(()=>{var v=e.memo(()=>!!r.orphaned);return()=>v()?t("gui.jobStatus.orphan"):e.memo(()=>!!r.paused)()?t("gui.jobStatus.paused"):e.memo(()=>r.status==="success")()?t("gui.jobStatus.success"):e.memo(()=>r.status==="error")()?t("gui.jobStatus.error"):e.memo(()=>r.status==="partial")()?t("gui.jobStatus.partial"):e.memo(()=>r.status==="idle")()?t("gui.jobStatus.never"):t("gui.jobStatus.unknown")})()),u})()})()),ue.addEventListener("mouseleave",c=>{we(c,!1),bl(u=>u===r.name?null:u)}),ue.addEventListener("mouseenter",c=>{we(c,!0),Ye()&&bl(r.name)}),ue.$$click=()=>{fu(r.name)},e.insert(ue,()=>Ye()&&Tu()===r.name?"❄️":"▶"),yt.addEventListener("mouseleave",c=>we(c,!1)),yt.addEventListener("mouseenter",c=>we(c,!0)),yt.$$click=()=>{r.orphaned||(r.paused?bu(r.name):yu(r.name))},e.insert(yt,()=>r.paused?"▶":"⏸"),Le.addEventListener("mouseleave",c=>we(c,!1)),Le.addEventListener("mouseenter",c=>we(c,!0)),Le.$$click=()=>{vu(r.name)},Ne.addEventListener("mouseleave",c=>we(c,!1,mi()&&yi()===r.name)),Ne.addEventListener("mouseenter",c=>we(c,!0,mi()&&yi()===r.name)),Ne.$$click=()=>{cu(r.name)},bt.addEventListener("mouseleave",c=>we(c,!1,Vi()===r.name)),bt.addEventListener("mouseenter",c=>we(c,!0,Vi()===r.name)),bt.$$click=()=>{pu(r.name)},xt.addEventListener("mouseleave",c=>we(c,!1)),xt.addEventListener("mouseenter",c=>we(c,!0)),xt.$$click=()=>{wu(r)},e.insert(Pt,(()=>{var c=e.memo(()=>!!r.matrix);return()=>c()&&(()=>{var u=Qc();return u.addEventListener("mouseleave",v=>we(v,!1)),u.addEventListener("mouseenter",v=>we(v,!0)),u.$$click=()=>{xu(r.name)},e.effect(v=>{var z=t("gui.job.cancelMatrixTitle",{name:r.name}),q=Et();return z!==v.e&&e.setAttribute(u,"title",v.e=z),v.t=e.style(u,q,v.t),v},{e:void 0,t:void 0}),u})()})(),null),e.insert(Pt,(()=>{var c=e.memo(()=>!r.matrixParentId);return()=>c()&&(()=>{var u=Zc();return u.addEventListener("mouseleave",v=>we(v,!1)),u.addEventListener("mouseenter",v=>we(v,!0)),u.$$click=()=>{hu(r.name)},e.effect(v=>{var z=r.matrix?t("gui.job.deleteMatrixTitle",{name:r.name}):t("gui.job.deleteTitle",{name:r.name}),q=Et();return z!==v.e&&e.setAttribute(u,"title",v.e=z),v.t=e.style(u,q,v.t),v},{e:void 0,t:void 0}),u})()})(),null),e.insert(n,(()=>{var c=e.memo(()=>Vi()===r.name);return()=>c()&&(()=>{var u=Xc(),v=u.firstChild,z=v.firstChild;return e.insert(v,()=>t("gui.job.historyPanelTitle"),z),z.addEventListener("mouseleave",q=>{q.target.style.color="#8e8e93"}),z.addEventListener("mouseenter",q=>{q.target.style.color="#ffffff"}),z.$$click=()=>Oa(null),e.insert(u,(()=>{var q=e.memo(()=>Ia().length===0);return()=>q()?(()=>{var C=Il();return e.insert(C,()=>t("gui.job.historyEmpty")),C})():Ia().map(C=>(()=>{var Z=eg(),A=Z.firstChild,K=A.nextSibling,Ae=K.nextSibling;return e.insert(A,()=>new Date(C.startedAt).toLocaleString()),e.insert(K,(()=>{var X=e.memo(()=>C.status==="success");return()=>X()?t("gui.history.success"):t("gui.history.error")})()),e.insert(Ae,()=>t("gui.history.durationMs",{ms:C.durationMs})),e.insert(Z,(()=>{var X=e.memo(()=>!!C.model);return()=>X()&&(()=>{var F=tg();return F.firstChild,e.insert(F,()=>C.model,null),e.effect(()=>e.setAttribute(F,"title",t("gui.history.modelTitle",{model:C.model}))),F})()})(),null),e.insert(Z,(()=>{var X=e.memo(()=>!!(C.preFlightStatus&&C.preFlightStatus!=="skipped"));return()=>X()&&(()=>{var F=rg();return F.firstChild,e.insert(F,()=>C.preFlightStatus==="success"?"✅":"❌",null),e.effect(ee=>{var ke=`Pre-flight: ${C.preFlightStatus}`,ce=C.preFlightStatus==="success"?"#34c759":"#ff3b30";return ke!==ee.e&&e.setAttribute(F,"title",ee.e=ke),ce!==ee.t&&e.setStyleProperty(F,"color",ee.t=ce),ee},{e:void 0,t:void 0}),F})()})(),null),e.insert(Z,(()=>{var X=e.memo(()=>!!(C.postFlightStatus&&C.postFlightStatus!=="skipped"));return()=>X()&&(()=>{var F=ig();return F.firstChild,e.insert(F,()=>C.postFlightStatus==="success"?"✅":"❌",null),e.effect(ee=>{var ke=`Post-flight: ${C.postFlightStatus}`,ce=C.postFlightStatus==="success"?"#34c759":"#ff3b30";return ke!==ee.e&&e.setAttribute(F,"title",ee.e=ke),ce!==ee.t&&e.setStyleProperty(F,"color",ee.t=ce),ee},{e:void 0,t:void 0}),F})()})(),null),e.insert(Z,(()=>{var X=e.memo(()=>!!C.error);return()=>X()&&(()=>{var F=og();return e.insert(F,()=>C.error),F})()})(),null),e.insert(Z,(()=>{var X=e.memo(()=>!!C.nextTask);return()=>X()&&(()=>{var F=ng();return F.firstChild,e.insert(F,()=>C.nextTask,null),e.effect(()=>e.setAttribute(F,"title",t("gui.history.nextTaskTitle"))),F})()})(),null),e.effect(X=>{var F=C.startedAt+C.durationMs,ee=C.status==="success"?"#34c759":"#ff3b30";return F!==X.e&&e.setAttribute(Z,"key",X.e=F),ee!==X.t&&e.setStyleProperty(K,"color",X.t=ee),X},{e:void 0,t:void 0}),Z})())})(),null),u})()})(),null),e.insert(n,(()=>{var c=e.memo(()=>!!(mi()&&yi()===r.name));return()=>c()&&(()=>{var u=ag(),v=u.firstChild,z=v.firstChild,q=z.nextSibling;return e.insert(v,()=>r.name,q),q.addEventListener("mouseleave",C=>{C.target.style.color="#8e8e93"}),q.addEventListener("mouseenter",C=>{C.target.style.color="#ffffff"}),q.$$click=()=>ml(),e.insert(u,(()=>{var C=e.memo(()=>!!oa());return()=>C()&&(()=>{var Z=Il();return e.insert(Z,()=>t("gui.job.simulating")),Z})()})(),null),e.insert(u,(()=>{var C=e.memo(()=>!!(!oa()&&be()&&!be().success));return()=>C()&&(()=>{var Z=sg();return Z.firstChild,e.insert(Z,()=>be().error??t("gui.job.simulationFailed"),null),Z})()})(),null),e.insert(u,(()=>{var C=e.memo(()=>!!(!oa()&&be()&&be().success));return()=>C()&&(()=>{var Z=lg();return e.insert(Z,(()=>{var A=e.memo(()=>!!(Array.isArray(be().warnings)&&be().warnings.length>0));return()=>A()&&(()=>{var K=dg();return K.firstChild,e.insert(K,()=>be().warnings.map(Ae=>`· ${Ae}`).join(" | "),null),K})()})(),null),e.insert(Z,()=>be().tasks.map(A=>(()=>{var K=ug(),Ae=K.firstChild,X=Ae.firstChild,F=X.nextSibling;F.nextSibling;var ee=Ae.nextSibling;ee.firstChild;var ke=ee.nextSibling;ke.firstChild;var ce=ke.nextSibling;return ce.firstChild,e.insert(Ae,()=>(A.order??0)+1,F),e.insert(Ae,()=>A.trigger,null),e.insert(ee,()=>A.name,null),e.insert(K,(()=>{var oe=e.memo(()=>!!A.workspace);return()=>oe()&&(()=>{var O=pg();return O.firstChild,e.insert(O,()=>A.workspace.name,null),O})()})(),ke),e.insert(K,(()=>{var oe=e.memo(()=>!!A.matrixParent);return()=>oe()&&(()=>{var O=cg();return O.firstChild,e.insert(O,()=>A.matrixParent,null),O})()})(),ke),e.insert(ke,()=>A.cwd||t("gui.common.projectDir"),null),e.insert(K,(()=>{var oe=e.memo(()=>!!A.roleScoped);return()=>oe()&&(()=>{var O=gg();return e.effect(()=>e.setAttribute(O,"title",`allowed=[${(A.roleScoped.allowed??[]).join(", ")}] · denied=[${(A.roleScoped.denied??[]).join(", ")}]`)),O})()})(),ce),e.insert(K,(()=>{var oe=e.memo(()=>A.estimatedDurationSec!=null);return()=>oe()&&(()=>{var O=jl();return e.insert(O,()=>t("gui.job.durationEst",{seconds:A.estimatedDurationSec})),O})()})(),ce),e.insert(K,(()=>{var oe=e.memo(()=>A.estimatedTokens!=null);return()=>oe()&&(()=>{var O=jl();return e.insert(O,()=>t("gui.job.tokensEst",{tokens:A.estimatedTokens})),O})()})(),ce),e.insert(K,(()=>{var oe=e.memo(()=>A.estimatedCostUsd!=null);return()=>oe()&&(()=>{var O=mg();return O.firstChild,e.insert(O,()=>Number(A.estimatedCostUsd).toFixed(4),null),O})()})(),ce),e.insert(ce,()=>A.command,null),e.insert(K,(()=>{var oe=e.memo(()=>!!A.preFlight);return()=>oe()&&(()=>{var O=fg();return O.firstChild,e.insert(O,()=>A.preFlight,null),O})()})(),null),e.insert(K,(()=>{var oe=e.memo(()=>!!A.postFlight);return()=>oe()&&(()=>{var O=yg();return O.firstChild,e.insert(O,()=>A.postFlight,null),O})()})(),null),e.insert(K,(()=>{var oe=e.memo(()=>!!A.qualityGate);return()=>oe()&&(()=>{var O=bg();return O.firstChild,e.insert(O,()=>A.qualityGate,null),O})()})(),null),e.effect(()=>e.setAttribute(K,"key",`${A.name}-${A.order}`)),K})()),null),e.insert(Z,(()=>{var A=e.memo(()=>!!(be().totals&&(be().totals.estimatedDurationSec!=null||be().totals.estimatedTokens!=null)));return()=>A()&&(()=>{var K=xg();return e.insert(K,()=>t("gui.job.totalsLine",{duration:be().totals.estimatedDurationSec??"—",tokens:be().totals.estimatedTokens??"—",cost:be().totals.estimatedCostUsd!=null?` · ~$${Number(be().totals.estimatedCostUsd).toFixed(4)}`:""})),K})()})(),null),Z})()})(),null),u})()})(),null),e.effect(c=>{var u=`background:#252526;border-radius:10px;padding:16px;margin-bottom:12px;display:flex;flex-direction:column;gap:10px;border:1px solid ${Ye()?"rgba(135, 206, 250, 0.4)":"#333"}`,v=t("gui.job.runsTitle"),z=t("gui.job.runTitle",{name:r.name}),q=Et(),C=!!r.orphaned,Z=r.orphaned?t("gui.job.pauseUnavailable",{name:r.name}):r.paused?t("gui.job.resumeTitle",{name:r.name}):t("gui.job.pauseTitle",{name:r.name}),A=Et(),K=t("gui.job.logsTitle",{name:r.name}),Ae=Et(),X=t("gui.job.dryRunTitle",{name:r.name}),F=Et(mi()&&yi()===r.name),ee=t("gui.job.historyTitle",{name:r.name}),ke=Et(Vi()===r.name),ce=t("gui.job.editTitle",{name:r.name}),oe=Et();return c.e=e.style(n,u,c.e),v!==c.t&&e.setAttribute(Ce,"title",c.t=v),z!==c.a&&e.setAttribute(ue,"title",c.a=z),c.o=e.style(ue,q,c.o),C!==c.i&&(yt.disabled=c.i=C),Z!==c.n&&e.setAttribute(yt,"title",c.n=Z),c.s=e.style(yt,A,c.s),K!==c.h&&e.setAttribute(Le,"title",c.h=K),c.r=e.style(Le,Ae,c.r),X!==c.d&&e.setAttribute(Ne,"title",c.d=X),c.l=e.style(Ne,F,c.l),ee!==c.u&&e.setAttribute(bt,"title",c.u=ee),c.c=e.style(bt,ke,c.c),ce!==c.w&&e.setAttribute(xt,"title",c.w=ce),c.m=e.style(xt,oe,c.m),c},{e:void 0,t:void 0,a:void 0,o:void 0,i:void 0,n:void 0,s:void 0,h:void 0,r:void 0,d:void 0,l:void 0,u:void 0,c:void 0,w:void 0,m:void 0}),n})()};try{return s.add(wa.Panel,{id:"scheduler-jobs",region:"side",list:()=>[{id:"jobs",title:t("gui.jobsTitle"),pinned:!0}],render:()=>e.createComponent(d.ErrorBoundary,{fallback:i=>(()=>{var r=Nl();return e.insert(r,()=>t("gui.uiError",{message:i.message})),r})(),get children(){var i=hg(),r=i.firstChild,n=r.nextSibling,p=n.firstChild,Y=p.firstChild,xe=Y.nextSibling,ie=xe.nextSibling,ft=p.nextSibling,Ce=ft.firstChild,_r=Ce.firstChild,Pt=_r.nextSibling,ue=Ce.nextSibling,yt=ue.firstChild,Le=ue.nextSibling,Ne=Le.nextSibling,bt=Ne.firstChild,xt=n.nextSibling,c=xt.firstChild,u=c.nextSibling,v=u.nextSibling,z=xt.nextSibling,q=z.firstChild,C=q.nextSibling,Z=C.nextSibling,A=z.nextSibling,K=A.firstChild,Ae=K.firstChild,X=Ae.nextSibling,F=X.firstChild,ee=A.nextSibling,ke=ee.firstChild,ce=ke.firstChild,oe=ce.nextSibling,O=oe.firstChild,xl=O.nextSibling,ca=ee.nextSibling,Eu=ca.firstChild,hl=Eu.firstChild,vl=hl.firstChild,wl=vl.nextSibling,Pu=wl.nextSibling,kl=ca.nextSibling,$l=kl.firstChild,zu=$l.firstChild,Ru=$l.nextSibling,Sl=Ru.firstChild,_l=Sl.firstChild,Tl=_l.firstChild,Cl=Sl.nextSibling,El=Cl.firstChild,ga=El.nextSibling,Lu=ga.nextSibling,Au=Cl.nextSibling,Pl=Au.firstChild,ma=Pl.nextSibling,Du=ma.nextSibling,fa=kl.nextSibling,Mu=fa.firstChild,ya=Mu.firstChild,Fu=ya.firstChild,zl=Fu.nextSibling,Ou=zl.nextSibling,wi=ya.nextSibling,jo=fa.nextSibling,Iu=jo.firstChild;return e.insert(Y,(()=>{var m=e.memo(()=>!!Ye());return()=>m()?`❄️ ${On()} ❄️`:On()})()),e.insert(ie,()=>t("gui.metricsTotalsLine",{total:hn().total,success:hn().success,error:hn().error})),Ce.addEventListener("change",m=>jr(m.currentTarget.value)),e.insert(_r,()=>t("gui.workspaceAll")),e.insert(Ce,()=>P().map(m=>(()=>{var x=ql(),E=x.firstChild;return e.insert(x,()=>m.name,null),e.effect(()=>e.setAttribute(x,"key",m.id)),e.effect(()=>x.value=m.id),x})()),Pt),e.insert(Pt,()=>t("gui.workspaceNone")),ue.$$click=()=>ld(m=>!m),e.insert(ue,La,null),e.insert(ue,()=>ur()?" 🔒":"",null),Le.addEventListener("mouseleave",m=>{const x=m.currentTarget;x.style.borderColor="#333",x.style.background="#1e1e1e",x.style.color="#e0e0e0"}),Le.addEventListener("mouseenter",m=>{const x=m.currentTarget;x.style.borderColor="#5ac8fa",x.style.background="rgba(90,200,250,0.12)",x.style.color="#5ac8fa"}),Le.$$click=async()=>{const m=window.open("","_blank");let x=3782;try{const k=await y.get_dashboard_port({});k&&typeof k.port=="number"&&k.port>0&&(x=k.port)}catch(k){console.warn("[scheduler] Не удалось получить порт дашборда:",k)}const E="http://localhost:"+x;m?m.location.href=E:window.open(E,"_blank")},e.insert(Le,()=>t("gui.openDashboard")),bt.addEventListener("change",m=>{Wd(m.currentTarget.checked)}),e.insert(Ne,()=>t("gui.winterMode"),null),e.insert(i,(()=>{var m=e.memo(()=>!!Bi());return()=>m()&&(()=>{var x=vg(),E=x.firstChild,k=E.firstChild,I=k.nextSibling,G=E.nextSibling,U=G.nextSibling;return e.insert(k,()=>t("gui.profilesHeading")),I.$$click=()=>{Xd()},e.insert(I,()=>t("gui.createProfile")),e.insert(x,(()=>{var $=e.memo(()=>!!ur());return()=>$()&&(()=>{var _=wg();return e.insert(_,()=>t("gui.profileEnvLocked")),_})()})(),G),e.insert(G,()=>nd().map($=>(()=>{var _=kg(),T=_.firstChild,re=T.nextSibling,ge=re.nextSibling;return e.insert(T,()=>$.name,null),e.insert(T,(()=>{var J=e.memo(()=>!!$.isDefault);return()=>J()?t("gui.defaultSuffix"):""})(),null),e.insert(re,(()=>{var J=e.memo(()=>!!$.port);return()=>J()?t("gui.profilePort",{port:$.port}):t("gui.profilePortDefault")})()),e.insert(ge,()=>$.dir),e.insert(_,(()=>{var J=e.memo(()=>!!$.active);return()=>J()?(()=>{var R=$g();return e.insert(R,()=>t("gui.profileActive")),R})():(()=>{var R=Hl();return R.$$click=()=>{Zd($.name)},e.insert(R,()=>t("gui.profileSwitch")),e.effect(j=>{var M=pr()||ur(),W=`padding:2px 8px;border-radius:6px;border:1px solid #333;background:#262626;color:#e0e0e0;font-size:11px;cursor:${pr()||ur()?"not-allowed":"pointer"};opacity:${ur()?.5:1}`;return M!==j.e&&(R.disabled=j.e=M),j.t=e.style(R,W,j.t),j},{e:void 0,t:void 0}),R})()})(),null),e.insert(_,(()=>{var J=e.memo(()=>!$.isDefault&&!$.active);return()=>J()&&(()=>{var R=Hl();return R.$$click=()=>{eu($.name)},e.insert(R,()=>t("gui.profileDelete")),e.effect(j=>{var M=pr(),W=`padding:2px 8px;border-radius:6px;border:1px solid rgba(255,59,48,0.4);background:rgba(255,59,48,0.12);color:#ff3b30;font-size:11px;cursor:${pr()?"not-allowed":"pointer"}`;return M!==j.e&&(R.disabled=j.e=M),j.t=e.style(R,W,j.t),j},{e:void 0,t:void 0}),R})()})(),null),e.effect(J=>{var R=`font-weight:${$.active?700:400};color:${$.active?"#bf5af2":"#e0e0e0"}`,j=$.dir;return J.e=e.style(T,R,J.e),j!==J.t&&e.setAttribute(ge,"title",J.t=j),J},{e:void 0,t:void 0}),_})())),e.insert(U,()=>t("gui.profilesHint")),e.effect($=>{var _=pr(),T=`padding:4px 10px;border-radius:6px;border:1px solid #333;background:#262626;color:#e0e0e0;font-size:11px;cursor:${pr()?"not-allowed":"pointer"}`;return _!==$.e&&(I.disabled=$.e=_),$.t=e.style(I,T,$.t),$},{e:void 0,t:void 0}),x})()})(),xt),c.$$click=Jd,e.insert(c,(()=>{var m=e.memo(()=>!!Mo());return()=>m()?t("gui.exportBusy"):t("gui.export")})()),u.addEventListener("change",Qd),v.$$click=()=>document.querySelector('input[type="file"]')?.click(),e.insert(v,(()=>{var m=e.memo(()=>!!Fo());return()=>m()?t("gui.importBusy"):t("gui.import")})()),e.insert(q,()=>t("gui.maxConcurrentLabel")),C.addEventListener("change",m=>Hd(Number(m.currentTarget.value)||1)),e.insert(Z,()=>t("gui.zeroUnlimited")),K.$$click=()=>xd(!$n()),e.insert(Ae,()=>t("gui.notifications")),e.insert(X,(()=>{var m=e.memo(()=>!!S());return()=>m()?e.memo(()=>!!kn())()?t("gui.notifyOnlyErrors"):t("gui.notifyAllRuns"):t("gui.notifyDisabled")})(),F),e.insert(F,()=>$n()?"▾":"▴"),e.insert(A,(()=>{var m=e.memo(()=>!$n());return()=>m()&&(()=>{var x=Sg(),E=x.firstChild,k=E.firstChild,I=E.nextSibling,G=I.firstChild,U=I.nextSibling,$=U.firstChild,_=$.firstChild,T=$.nextSibling,re=T.nextSibling,ge=re.nextSibling,J=ge.firstChild,R=J.nextSibling,j=R.nextSibling,M=j.nextSibling,W=M.nextSibling,Se=W.nextSibling,Xe=ge.nextSibling,qe=U.nextSibling,Fe=qe.firstChild,Oe=Fe.firstChild,L=Fe.nextSibling,ne=L.nextSibling,he=ne.nextSibling,He=he.firstChild,Ee=He.nextSibling,De=Ee.nextSibling,ht=De.firstChild,Bt=De.nextSibling,vt=Bt.firstChild,No=he.nextSibling,Tr=qe.nextSibling,Ut=Tr.firstChild,Cr=Ut.firstChild,Gt=Ut.nextSibling,et=Gt.firstChild,qo=Gt.nextSibling,Vt=Tr.nextSibling,wt=Vt.firstChild,Er=wt.firstChild,zt=wt.nextSibling,Ho=zt.firstChild,Kt=Ho.nextSibling,Wo=Kt.nextSibling,Yt=Wo.nextSibling,Bo=zt.nextSibling,Jt=Vt.nextSibling,Uo=Jt.firstChild,We=Uo.nextSibling,tt=We.nextSibling,Go=tt.nextSibling,ki=Jt.nextSibling,Vo=ki.firstChild,kt=Vo.nextSibling,rt=kt.nextSibling,Pr=rt.nextSibling,$i=ki.nextSibling,Si=$i.firstChild,Ko=Si.firstChild,ba=Ko.nextSibling,Yo=Si.nextSibling,_i=Yo.firstChild,Rt=_i.firstChild,Lt=Rt.nextSibling,Qt=Lt.nextSibling,At=_i.nextSibling,Jo=At.nextSibling,Ti=$i.nextSibling,Zt=Ti.firstChild,zr=Zt.nextSibling,Ci=zr.firstChild,Rr=zr.nextSibling,Ei=Rr.firstChild,$t=Ei.firstChild,Pi=Ei.nextSibling,Lr=Pi.firstChild,zi=Pi.nextSibling,Xt=zi.nextSibling,Qo=Rr.nextSibling,Ri=Ti.nextSibling,Li=Ri.firstChild,er=Li.nextSibling,Ar=er.firstChild,Dt=er.nextSibling,tr=Dt.firstChild,Ai=tr.firstChild,Zo=Ai.nextSibling,it=tr.nextSibling,xa=it.nextSibling,Xo=Dt.nextSibling,en=Ri.nextSibling,ot=en.firstChild,rr=ot.nextSibling,tn=rr.nextSibling;return k.addEventListener("change",o=>{Na(o.currentTarget.checked),B()}),e.insert(E,()=>t("gui.notifyEnable"),null),G.addEventListener("change",o=>{qa(o.currentTarget.checked),B()}),e.insert(I,()=>t("gui.notifyOnlyOnError"),null),_.addEventListener("change",o=>{Ha(o.currentTarget.checked),B()}),e.insert($,()=>t("gui.webhookLabel"),null),T.addEventListener("change",()=>{B()}),T.$$input=o=>Ba(o.currentTarget.value),e.insert(re,()=>t("gui.webhookPostHint",{payload:"{ content, text }"})),e.insert(J,()=>t("gui.timeoutMs")),R.addEventListener("change",()=>{B()}),R.$$input=o=>Va(Number(o.currentTarget.value)||1e4),e.insert(j,()=>t("gui.retryCount")),M.addEventListener("change",()=>{B()}),M.$$input=o=>Ya(Number(o.currentTarget.value)||0),e.insert(W,()=>t("gui.retryDelayMs")),Se.addEventListener("change",()=>{B()}),Se.$$input=o=>Qa(Number(o.currentTarget.value)||1e3),e.insert(Xe,()=>t("gui.retryHint")),Oe.addEventListener("change",o=>{xs(o.currentTarget.checked),B()}),L.addEventListener("change",()=>{B()}),L.$$input=o=>vs(o.currentTarget.value),ne.addEventListener("change",()=>{B()}),ne.$$input=o=>ks(o.currentTarget.value),e.insert(He,()=>t("gui.parseModeLabel")),Ee.addEventListener("change",o=>{Ss(o.currentTarget.value),B()}),ht.addEventListener("change",o=>{Ts(o.currentTarget.checked),B()}),e.insert(De,()=>t("gui.silent"),null),vt.addEventListener("change",o=>{Es(o.currentTarget.checked),B()}),e.insert(Bt,()=>t("gui.dashboardLink"),null),e.insert(No,()=>t("gui.botTokenEnvHint")),Cr.addEventListener("change",o=>{Ps(o.currentTarget.checked),B()}),e.insert(Ut,()=>t("gui.nativeNotifications"),null),et.addEventListener("change",o=>{Rs(o.currentTarget.checked),B()}),e.insert(Gt,()=>t("gui.withSound"),null),e.insert(qo,()=>t("gui.nativeHint")),Er.addEventListener("change",o=>{Ls(o.currentTarget.checked),B()}),e.insert(wt,()=>t("gui.quietHours"),null),e.insert(Ho,()=>t("gui.quietFrom")),Kt.addEventListener("change",()=>{B()}),Kt.$$input=o=>Ds(o.currentTarget.value),e.insert(Wo,()=>t("gui.quietTo")),Yt.addEventListener("change",()=>{B()}),Yt.$$input=o=>Fs(o.currentTarget.value),e.insert(Bo,()=>t("gui.quietHoursHint")),e.insert(Uo,()=>t("gui.taskFiltersHeading")),We.addEventListener("change",()=>{B()}),We.$$input=o=>is(o.currentTarget.value),tt.addEventListener("change",()=>{B()}),tt.$$input=o=>ns(o.currentTarget.value),e.insert(Go,()=>t("gui.filterHint")),e.insert(Vo,()=>t("gui.templatesHeading")),kt.addEventListener("change",()=>{B()}),kt.$$input=o=>Xa(o.currentTarget.value),rt.addEventListener("change",()=>{B()}),rt.$$input=o=>ts(o.currentTarget.value),e.insert(Pr,()=>t("gui.templateHint")),e.insert(Ko,()=>t("gui.secrets")),e.insert(ba,()=>_n().length),Rt.$$input=o=>Is(o.currentTarget.value),Lt.$$input=o=>js(o.currentTarget.value),Qt.$$click=()=>{Id()},e.insert(Qt,(()=>{var o=e.memo(()=>!!Tn());return()=>o()?t("gui.saving"):t("gui.save")})()),e.insert(At,()=>_n().map(o=>(()=>{var Be=_g(),ir=Be.firstChild,Mt=ir.nextSibling,or=Mt.firstChild,Ft=Mt.nextSibling;return e.insert(ir,()=>o.name),e.insert(Mt,()=>o.preview,null),Ft.$$click=()=>{jd(o.name)},e.effect(Ue=>{var Ot=o.name,It=t("gui.delete");return Ot!==Ue.e&&e.setAttribute(Be,"key",Ue.e=Ot),It!==Ue.t&&e.setAttribute(Ft,"title",Ue.t=It),Ue},{e:void 0,t:void 0}),Be})()),null),e.insert(At,(()=>{var o=e.memo(()=>_n().length===0);return()=>o()&&(()=>{var Be=Tg();return e.insert(Be,()=>t("gui.secretsEmpty")),Be})()})(),null),e.insert(Jo,()=>t("gui.secretsUsage",{secretRef:"{secret:NAME}"})),e.insert(Zt,()=>t("gui.matrixNotifyHeading")),Ci.addEventListener("change",o=>{as(o.currentTarget.checked),B()}),e.insert(zr,()=>t("gui.matrixNotifyEnable"),null),$t.addEventListener("change",o=>{ls(o.currentTarget.checked),B()}),Lr.addEventListener("change",o=>{us(o.currentTarget.checked),B()}),e.insert(Pi,()=>t("gui.matrixAllFailed"),null),e.insert(zi,()=>t("gui.matrixStuckMinutes")),Xt.addEventListener("change",()=>{B()}),Xt.$$input=o=>cs(Number(o.currentTarget.value)||0),e.insert(Qo,()=>t("gui.matrixStuckHint")),e.insert(Li,()=>t("gui.digestHeading")),Ar.addEventListener("change",o=>{gs(o.currentTarget.checked),B()}),e.insert(er,()=>t("gui.digestEnable"),null),tr.addEventListener("change",o=>{fs(o.currentTarget.value==="weekly"?"weekly":"daily"),B()}),e.insert(Ai,()=>t("gui.digestDaily")),e.insert(Zo,()=>t("gui.digestWeekly")),it.addEventListener("change",()=>{B()}),it.$$input=o=>bs(o.currentTarget.value),e.insert(xa,(()=>{var o=e.memo(()=>!!Sn());return()=>o()?t("gui.digestLastSent",{when:new Date(Sn()).toLocaleString()}):t("gui.digestNeverSent")})()),e.insert(Xo,()=>t("gui.digestHint")),ot.$$click=()=>{Nd()},e.insert(ot,(()=>{var o=e.memo(()=>!!Ji());return()=>o()?t("gui.sending"):t("gui.sendTestNotification")})()),rr.$$click=()=>{qd()},e.insert(rr,(()=>{var o=e.memo(()=>!!Qi());return()=>o()?t("gui.sending"):t("gui.sendDigestNow")})()),e.insert(tn,()=>t("gui.digestChannels")),e.effect(o=>{var Be=`display:flex;align-items:center;gap:8px;font-size:12px;cursor:pointer;opacity:${S()?1:.5}`,ir=!S(),Mt=`display:flex;align-items:center;gap:8px;font-size:12px;cursor:pointer;opacity:${S()?1:.5}`,or=!S(),Ft=!S()||!Re(),Ue=`display:block;width:100%;box-sizing:border-box;padding:8px;background:#1e1e1e;border:1px solid #333;border-radius:6px;color:#fff;font-size:13px;outline:none;opacity:${S()&&Re()?1:.5}`,Ot=!S()||!Re(),It=!S()||!Re(),Di=!S()||!Re(),rn=`display:flex;align-items:center;gap:8px;font-size:12px;cursor:pointer;opacity:${S()?1:.5}`,on=!S(),nr=!S()||!ve(),Mi=t("gui.botTokenPlaceholder"),ha=`display:block;width:100%;box-sizing:border-box;padding:8px;background:#1e1e1e;border:1px solid #333;border-radius:6px;color:#fff;font-size:13px;outline:none;opacity:${S()&&ve()?1:.5}`,Fi=!S()||!ve(),ar=t("gui.chatIdPlaceholder"),sr=`display:block;width:100%;box-sizing:border-box;padding:8px;background:#1e1e1e;border:1px solid #333;border-radius:6px;color:#fff;font-size:13px;outline:none;opacity:${S()&&ve()?1:.5}`,a=`display:flex;align-items:center;gap:10px;flex-wrap:wrap;font-size:12px;color:#b0b0b0;opacity:${S()&&ve()?1:.5}`,l=!S()||!ve(),f=!S()||!ve(),g=!S()||!ve(),h=`display:flex;align-items:center;gap:8px;font-size:12px;cursor:pointer;opacity:${S()?1:.5}`,b=!S(),D=`display:flex;align-items:center;gap:8px;font-size:12px;cursor:pointer;opacity:${S()&&Je()?1:.5}`,H=!S()||!Je(),Pe=`display:flex;align-items:center;gap:8px;font-size:12px;cursor:pointer;opacity:${S()?1:.5}`,ae=!S(),Me=`display:flex;align-items:center;gap:8px;flex-wrap:wrap;font-size:12px;color:#b0b0b0;opacity:${S()&&Br()?1:.5}`,se=!S()||!Br(),V=!S()||!Br(),$e=!S(),_e=t("gui.filterIncludePlaceholder"),Ge=`display:block;width:100%;box-sizing:border-box;padding:8px;background:#1e1e1e;border:1px solid #333;border-radius:6px;color:#fff;font-size:13px;outline:none;opacity:${S()?1:.5}`,nt=!S(),St=t("gui.filterExcludePlaceholder"),nn=`display:block;width:100%;box-sizing:border-box;padding:8px;background:#1e1e1e;border:1px solid #333;border-radius:6px;color:#fff;font-size:13px;outline:none;opacity:${S()?1:.5}`,Dr=!S(),lr=t("gui.templateSuccessPlaceholder"),an=`display:block;width:100%;box-sizing:border-box;padding:8px;background:#1e1e1e;border:1px solid #333;border-radius:6px;color:#fff;font-size:12px;outline:none;opacity:${S()?1:.5}`,me=!S(),le=t("gui.templateErrorPlaceholder"),at=`display:block;width:100%;box-sizing:border-box;padding:8px;background:#1e1e1e;border:1px solid #333;border-radius:6px;color:#fff;font-size:12px;outline:none;opacity:${S()?1:.5}`,dr=t("gui.secretNamePlaceholder"),ze=t("gui.secretValuePlaceholder"),Ie=Tn()||!Zi().trim()||!Xi(),jt=Tn()||!Zi().trim()||!Xi()?"padding:6px 12px;background:#666;color:white;border:none;border-radius:6px;cursor:not-allowed;font-size:12px;font-weight:500;opacity:0.6":"padding:6px 12px;background:#007acc;color:white;border:none;border-radius:6px;cursor:pointer;font-size:12px;font-weight:500;opacity:1",sn=`display:flex;align-items:center;gap:8px;font-size:12px;cursor:pointer;opacity:${S()?1:.5}`,Ve=!S(),Mr=`display:flex;align-items:center;gap:10px;flex-wrap:wrap;font-size:12px;color:#b0b0b0;opacity:${S()&&mr()?1:.5}`,ln=!S()||!mr(),Oi=!S()||!mr(),dn=!S()||!mr(),Fr=`display:flex;align-items:center;gap:8px;font-size:12px;cursor:pointer;opacity:${S()?1:.5}`,Ii=!S(),Or=`display:flex;align-items:center;gap:8px;flex-wrap:wrap;font-size:12px;color:#b0b0b0;opacity:${S()&&Wr()?1:.5}`,ji=!S()||!Wr(),un=!S()||!Wr(),Ir=Ji()||!(Re()||ve()||Je()),pn=`padding:6px 12px;background:#007acc;color:white;border:none;border-radius:6px;cursor:${Ji()||!(Re()||ve()||Je())?"not-allowed":"pointer"};font-size:12px;font-weight:500;opacity:${Ji()||!(Re()||ve()||Je())?.6:1}`,de=Qi()||!(Re()||ve()||Je()),va=`padding:6px 12px;background:#2d7d46;color:white;border:none;border-radius:6px;cursor:${Qi()||!(Re()||ve()||Je())?"not-allowed":"pointer"};font-size:12px;font-weight:500;opacity:${Qi()||!(Re()||ve()||Je())?.6:1}`;return o.e=e.style(I,Be,o.e),ir!==o.t&&(G.disabled=o.t=ir),o.a=e.style($,Mt,o.a),or!==o.o&&(_.disabled=o.o=or),Ft!==o.i&&(T.disabled=o.i=Ft),o.n=e.style(T,Ue,o.n),Ot!==o.s&&(R.disabled=o.s=Ot),It!==o.h&&(M.disabled=o.h=It),Di!==o.r&&(Se.disabled=o.r=Di),o.d=e.style(Fe,rn,o.d),on!==o.l&&(Oe.disabled=o.l=on),nr!==o.u&&(L.disabled=o.u=nr),Mi!==o.c&&e.setAttribute(L,"placeholder",o.c=Mi),o.w=e.style(L,ha,o.w),Fi!==o.m&&(ne.disabled=o.m=Fi),ar!==o.f&&e.setAttribute(ne,"placeholder",o.f=ar),o.y=e.style(ne,sr,o.y),o.g=e.style(he,a,o.g),l!==o.p&&(Ee.disabled=o.p=l),f!==o.b&&(ht.disabled=o.b=f),g!==o.T&&(vt.disabled=o.T=g),o.A=e.style(Ut,h,o.A),b!==o.O&&(Cr.disabled=o.O=b),o.I=e.style(Gt,D,o.I),H!==o.S&&(et.disabled=o.S=H),o.W=e.style(wt,Pe,o.W),ae!==o.C&&(Er.disabled=o.C=ae),o.B=e.style(zt,Me,o.B),se!==o.v&&(Kt.disabled=o.v=se),V!==o.k&&(Yt.disabled=o.k=V),$e!==o.x&&(We.disabled=o.x=$e),_e!==o.j&&e.setAttribute(We,"placeholder",o.j=_e),o.q=e.style(We,Ge,o.q),nt!==o.z&&(tt.disabled=o.z=nt),St!==o.P&&e.setAttribute(tt,"placeholder",o.P=St),o.H=e.style(tt,nn,o.H),Dr!==o.F&&(kt.disabled=o.F=Dr),lr!==o.M&&e.setAttribute(kt,"placeholder",o.M=lr),o.D=e.style(kt,an,o.D),me!==o.R&&(rt.disabled=o.R=me),le!==o.E&&e.setAttribute(rt,"placeholder",o.E=le),o.L=e.style(rt,at,o.L),dr!==o.N&&e.setAttribute(Rt,"placeholder",o.N=dr),ze!==o.G&&e.setAttribute(Lt,"placeholder",o.G=ze),Ie!==o.U&&(Qt.disabled=o.U=Ie),o.K=e.style(Qt,jt,o.K),o.V=e.style(zr,sn,o.V),Ve!==o.Y&&(Ci.disabled=o.Y=Ve),o.J=e.style(Rr,Mr,o.J),ln!==o.Q&&($t.disabled=o.Q=ln),Oi!==o.Z&&(Lr.disabled=o.Z=Oi),dn!==o.X&&(Xt.disabled=o.X=dn),o._=e.style(er,Fr,o._),Ii!==o.$&&(Ar.disabled=o.$=Ii),o.te=e.style(Dt,Or,o.te),ji!==o.tt&&(tr.disabled=o.tt=ji),un!==o.ta&&(it.disabled=o.ta=un),Ir!==o.to&&(ot.disabled=o.to=Ir),o.ti=e.style(ot,pn,o.ti),de!==o.tn&&(rr.disabled=o.tn=de),o.ts=e.style(rr,va,o.ts),o},{e:void 0,t:void 0,a:void 0,o:void 0,i:void 0,n:void 0,s:void 0,h:void 0,r:void 0,d:void 0,l:void 0,u:void 0,c:void 0,w:void 0,m:void 0,f:void 0,y:void 0,g:void 0,p:void 0,b:void 0,T:void 0,A:void 0,O:void 0,I:void 0,S:void 0,W:void 0,C:void 0,B:void 0,v:void 0,k:void 0,x:void 0,j:void 0,q:void 0,z:void 0,P:void 0,H:void 0,F:void 0,M:void 0,D:void 0,R:void 0,E:void 0,L:void 0,N:void 0,G:void 0,U:void 0,K:void 0,V:void 0,Y:void 0,J:void 0,Q:void 0,Z:void 0,X:void 0,_:void 0,$:void 0,te:void 0,tt:void 0,ta:void 0,to:void 0,ti:void 0,tn:void 0,ts:void 0}),e.effect(()=>k.checked=S()),e.effect(()=>G.checked=kn()),e.effect(()=>_.checked=Re()),e.effect(()=>T.value=Wa()||""),e.effect(()=>R.value=Ga()),e.effect(()=>M.value=Ka()),e.effect(()=>Se.value=Ja()),e.effect(()=>Oe.checked=ve()),e.effect(()=>L.value=hs()||""),e.effect(()=>ne.value=ws()||""),e.effect(()=>Ee.value=$s()),e.effect(()=>ht.checked=_s()),e.effect(()=>vt.checked=Cs()),e.effect(()=>Cr.checked=Je()),e.effect(()=>et.checked=zs()),e.effect(()=>Er.checked=Br()),e.effect(()=>Kt.value=As()),e.effect(()=>Yt.value=Ms()),e.effect(()=>We.value=rs()||""),e.effect(()=>tt.value=os()||""),e.effect(()=>kt.value=Za()||""),e.effect(()=>rt.value=es()||""),e.effect(()=>Rt.value=Zi()),e.effect(()=>Lt.value=Xi()),e.effect(()=>Ci.checked=mr()),e.effect(()=>$t.checked=ss()),e.effect(()=>Lr.checked=ds()),e.effect(()=>Xt.value=ps()),e.effect(()=>Ar.checked=Wr()),e.effect(()=>tr.value=ms()),e.effect(()=>it.value=ys()),x})()})(),null),ke.$$click=()=>zd(!Fn()),e.insert(ce,()=>t("gui.historyHeading")),e.insert(oe,(()=>{var m=e.memo(()=>io()>0);return()=>m()?t("gui.historyOlderThan",{days:io()}):t("gui.historyNoExpiry")})(),O),e.insert(oe,(()=>{var m=e.memo(()=>no()>0);return()=>m()?t("gui.historyUpToRecords",{count:no()}):t("gui.historyNoLimit")})(),xl),e.insert(xl,()=>Fn()?"▾":"▴"),e.insert(ee,(()=>{var m=e.memo(()=>!Fn());return()=>m()&&(()=>{var x=Cg(),E=x.firstChild,k=E.firstChild,I=k.nextSibling,G=I.nextSibling,U=E.nextSibling,$=U.firstChild,_=$.nextSibling,T=_.nextSibling,re=U.nextSibling,ge=re.firstChild,J=re.nextSibling,R=J.firstChild,j=R.nextSibling;return e.insert(k,()=>t("gui.historyDeleteOlderLabel")),I.addEventListener("change",M=>{oo(Math.max(0,Math.floor(Number(M.currentTarget.value)||0))),Ks()}),e.insert(G,()=>t("gui.zeroKeepByAge")),e.insert($,()=>t("gui.historyKeepMaxLabel")),_.addEventListener("change",M=>{ao(Math.max(0,Math.floor(Number(M.currentTarget.value)||0))),Ks()}),e.insert(T,()=>t("gui.zeroNoLimit")),e.insert(re,()=>t("gui.lastCleanupLabel"),ge),e.insert(re,(()=>{var M=e.memo(()=>!!An());return()=>M()?t("gui.lastCleanupDone",{when:new Date(An()).toLocaleString(),deleted:Bs()}):t("gui.lastCleanupNever")})(),null),R.$$click=()=>{Od()},e.insert(R,(()=>{var M=e.memo(()=>!!so());return()=>M()?t("gui.cleaningUp"):t("gui.cleanupNow")})()),e.insert(j,()=>t("gui.historyCleanupHint")),e.effect(M=>{var W=so(),Se=`padding:6px 12px;background:#007acc;color:white;border:none;border-radius:6px;cursor:${so()?"not-allowed":"pointer"};font-size:12px;font-weight:500;opacity:${so()?.6:1}`;return W!==M.e&&(R.disabled=M.e=W),M.t=e.style(R,Se,M.t),M},{e:void 0,t:void 0}),e.effect(()=>I.value=io()),e.effect(()=>_.value=no()),x})()})(),null),hl.$$click=()=>Td(!Pn()),e.insert(vl,()=>t("gui.auditHeading")),e.insert(wl,()=>Cn().length),e.insert(Pu,()=>Pn()?"▾":"▴"),e.insert(ca,(()=>{var m=e.memo(()=>!Pn());return()=>m()&&(()=>{var x=Eg(),E=x.firstChild,k=E.firstChild,I=k.nextSibling,G=I.nextSibling,U=G.nextSibling,$=U.nextSibling,_=$.nextSibling,T=_.nextSibling,re=E.nextSibling,ge=re.firstChild,J=ge.firstChild,R=J.firstChild,j=R.firstChild,M=j.nextSibling,W=M.nextSibling,Se=W.nextSibling,Xe=Se.nextSibling,qe=Xe.nextSibling,Fe=J.nextSibling,Oe=re.nextSibling;return e.insert(k,()=>t("gui.auditAction")),I.addEventListener("change",()=>{Ur()}),I.$$input=L=>Cd(L.currentTarget.value),e.insert(G,()=>t("gui.auditSource")),U.addEventListener("change",()=>{Ur()}),U.$$input=L=>Ed(L.currentTarget.value),e.insert($,()=>t("gui.auditTarget")),_.addEventListener("change",()=>{Ur()}),_.$$input=L=>Pd(L.currentTarget.value),T.$$click=()=>{Ur()},e.insert(T,(()=>{var L=e.memo(()=>!!En());return()=>L()?t("gui.loading"):t("gui.refresh")})()),e.insert(j,()=>t("gui.auditTime")),e.insert(M,()=>t("gui.auditAction")),e.insert(W,()=>t("gui.auditTarget")),e.insert(Se,()=>t("gui.auditSource")),e.insert(Xe,()=>t("gui.auditActor")),e.insert(qe,()=>t("gui.auditDeletedFrom")),e.insert(Fe,()=>Cn().map(L=>(()=>{var ne=Pg(),he=ne.firstChild,He=he.nextSibling,Ee=He.nextSibling,De=Ee.firstChild,ht=Ee.nextSibling,Bt=ht.nextSibling,vt=Bt.nextSibling;return e.insert(he,()=>new Date(L.ts).toLocaleString()),e.insert(He,()=>L.action),e.insert(Ee,()=>L.targetType??"",De),e.insert(Ee,()=>L.target??"—",null),e.insert(ht,()=>L.source??"—"),e.insert(Bt,()=>L.actor),e.insert(vt,()=>L.remote??"—"),e.effect(()=>e.setAttribute(ne,"key",L.id)),ne})()),null),e.insert(Fe,(()=>{var L=e.memo(()=>Cn().length===0);return()=>L()&&(()=>{var ne=zg(),he=ne.firstChild;return e.insert(he,()=>t("gui.auditEmpty")),ne})()})(),null),e.insert(Oe,()=>t("gui.auditHint",{redacted:"***"})),e.effect(L=>{var ne=t("gui.auditActionPlaceholder"),he=t("gui.auditTargetPlaceholder"),He=En(),Ee=En()?"padding:6px 12px;background:#666;color:white;border:none;border-radius:6px;cursor:not-allowed;font-size:12px;font-weight:500;opacity:0.6":"padding:6px 12px;background:#007acc;color:white;border:none;border-radius:6px;cursor:pointer;font-size:12px;font-weight:500;opacity:1";return ne!==L.e&&e.setAttribute(I,"placeholder",L.e=ne),he!==L.t&&e.setAttribute(_,"placeholder",L.t=he),He!==L.a&&(T.disabled=L.a=He),L.o=e.style(T,Ee,L.o),L},{e:void 0,t:void 0,a:void 0,o:void 0}),e.effect(()=>I.value=qs()),e.effect(()=>U.value=Hs()),e.effect(()=>_.value=Ws()),x})()})(),null),e.insert(zu,()=>t("gui.auditStorageHeading")),Tl.addEventListener("change",m=>{eo(m.currentTarget.checked),jn()}),e.insert(_l,()=>t("gui.auditEnable"),null),e.insert(El,()=>t("gui.historyDeleteOlderLabel")),ga.addEventListener("change",m=>{to(Math.max(0,Math.floor(Number(m.currentTarget.value)||0))),jn()}),e.insert(Lu,()=>t("gui.zeroKeepByAge")),e.insert(Pl,()=>t("gui.historyKeepMaxLabel")),ma.addEventListener("change",m=>{ro(Math.max(0,Math.floor(Number(m.currentTarget.value)||0))),jn()}),e.insert(Du,()=>t("gui.zeroNoLimit")),ya.$$click=()=>Tt(!Te()),e.insert(zl,()=>P().length),e.insert(Ou,()=>Te()?"▾":"▴"),wi.$$click=()=>{ou()},e.insert(wi,()=>t("gui.add")),e.insert(fa,(()=>{var m=e.memo(()=>!Te());return()=>m()&&(()=>{var x=Rg();return e.insert(x,(()=>{var E=e.memo(()=>P().length===0);return()=>E()?(()=>{var k=Lg();return e.insert(k,()=>t("gui.workspaceEmpty")),k})():P().map(k=>(()=>{var I=Ag(),G=I.firstChild,U=G.nextSibling,$=U.firstChild,_=$.firstChild,T=$.nextSibling,re=T.nextSibling,ge=re.nextSibling,J=U.nextSibling,R=J.firstChild,j=R.nextSibling,M=j.nextSibling;return e.insert($,()=>k.name,null),e.insert(T,()=>k.path),e.insert(re,()=>t("gui.workspaceGitInfo",{branch:k.gitBranch||"—",remote:k.gitRemote||t("gui.remoteNotSet")})),e.insert(ge,()=>t("gui.workspaceEnvLine",{count:k.env?Object.keys(k.env).length:"—",envFile:k.envFile?t("gui.workspaceEnvFile"):""})),R.$$click=()=>{iu(k)},j.$$click=()=>{nu(k)},M.$$click=()=>{au(k)},e.effect(W=>{var Se=`width:9px;height:9px;border-radius:50%;background:${k.color||"#5ac8fa"};flex-shrink:0`,Xe=k.path,qe=dt(),Fe=t("gui.workspaceEnvTitle"),Oe=dt(),L=t("gui.workspaceEditTitle"),ne=dt(),he=t("gui.workspaceDeleteTitle");return W.e=e.style(G,Se,W.e),Xe!==W.t&&e.setAttribute(T,"title",W.t=Xe),qe!==W.a&&(R.disabled=W.a=qe),Fe!==W.o&&e.setAttribute(R,"title",W.o=Fe),Oe!==W.i&&(j.disabled=W.i=Oe),L!==W.n&&e.setAttribute(j,"title",W.n=L),ne!==W.s&&(M.disabled=W.s=ne),he!==W.h&&e.setAttribute(M,"title",W.h=he),W},{e:void 0,t:void 0,a:void 0,o:void 0,i:void 0,n:void 0,s:void 0,h:void 0}),I})())})()),x})()})(),null),e.insert(i,(()=>{var m=e.memo(()=>!!Bd());return()=>m()?(()=>{var x=Dg();return x.addEventListener("mouseleave",E=>{const k=E.currentTarget;k.style.borderColor="#3a3a3a",k.style.background="#1e1e1e"}),x.addEventListener("mouseenter",E=>{const k=E.currentTarget;k.style.borderColor="#5ac8fa",k.style.background="#232326"}),x.$$click=()=>qn(!1),e.insert(x,()=>t("gui.createTask")),e.effect(()=>e.setAttribute(x,"title",t("gui.expandFormTitle"))),x})():(()=>{var x=Mg(),E=x.firstChild,k=E.firstChild,I=k.nextSibling,G=I.firstChild,U=G.nextSibling,$=E.nextSibling,_=$.firstChild,T=_.firstChild,re=_.nextSibling,ge=$.nextSibling,J=ge.firstChild,R=J.nextSibling,j=ge.nextSibling,M=j.firstChild,W=M.nextSibling,Se=W.firstChild,Xe=Se.firstChild,qe=Se.nextSibling,Fe=qe.firstChild,Oe=qe.nextSibling,L=Oe.firstChild,ne=Oe.nextSibling,he=ne.firstChild,He=ne.nextSibling,Ee=He.firstChild,De=j.nextSibling,ht=De.firstChild,Bt=ht.nextSibling,vt=Bt.firstChild,No=vt.firstChild,Tr=vt.nextSibling,Ut=Tr.firstChild,Cr=Tr.nextSibling,Gt=Cr.firstChild,et=De.nextSibling,qo=et.firstChild,Vt=qo.nextSibling,wt=Vt.nextSibling,Er=wt.firstChild,zt=Er.nextSibling,Ho=zt.nextSibling,Kt=Ho.nextSibling,Wo=wt.nextSibling,Yt=Wo.firstChild,Bo=Yt.nextSibling,Jt=Bo.firstChild,Uo=Jt.nextSibling,We=Uo.nextSibling,tt=Bo.nextSibling,Go=tt.nextSibling,ki=Go.firstChild,Vo=ki.nextSibling,kt=Go.nextSibling,rt=kt.firstChild,Pr=rt.nextSibling,$i=Pr.firstChild,Si=$i.nextSibling,Ko=Si.nextSibling,ba=Pr.nextSibling,Yo=et.nextSibling,_i=Yo.firstChild,Rt=_i.nextSibling,Lt=Yo.nextSibling,Qt=Lt.firstChild,At=Qt.nextSibling,Jo=Lt.nextSibling,Ti=Jo.firstChild,Zt=Ti.nextSibling,zr=Zt.nextSibling,Ci=zr.nextSibling,Rr=Jo.nextSibling,Ei=Rr.firstChild,$t=Ei.nextSibling,Pi=$t.nextSibling,Lr=Rr.nextSibling,zi=Lr.firstChild,Xt=zi.nextSibling,Qo=Lr.nextSibling,Ri=Qo.firstChild,Li=Ri.nextSibling,er=Qo.nextSibling,Ar=er.firstChild,Dt=Ar.nextSibling,tr=Dt.nextSibling,Ai=er.nextSibling,Zo=Ai.firstChild,it=Zo.nextSibling,xa=it.nextSibling,Xo=Ai.nextSibling,en=Xo.firstChild,ot=en.nextSibling,rr=ot.nextSibling,tn=Xo.nextSibling,o=tn.firstChild,Be=o.nextSibling,ir=Be.nextSibling,Mt=tn.nextSibling,or=Mt.firstChild,Ft=or.nextSibling,Ue=Ft.firstChild,Ot=Ue.nextSibling,It=Ot.nextSibling,Di=It.nextSibling,rn=Di.nextSibling,on=rn.nextSibling,nr=on.firstChild,Mi=nr.nextSibling,ha=Mi.nextSibling,Fi=Mt.nextSibling,ar=Fi.firstChild,sr=ar.nextSibling;return e.insert(k,()=>t(da?"gui.editingTask":"gui.newTask")),G.addEventListener("mouseleave",a=>{const l=a.currentTarget;l.style.color="#a0a0a6",l.style.borderColor="#333"}),G.addEventListener("mouseenter",a=>{const l=a.currentTarget;l.style.color="#5ac8fa",l.style.borderColor="#5ac8fa"}),G.$$click=lu,e.insert(G,()=>t("gui.saveAsTemplate")),U.addEventListener("mouseleave",a=>{const l=a.currentTarget;l.style.color="#a0a0a6",l.style.borderColor="#333"}),U.addEventListener("mouseenter",a=>{const l=a.currentTarget;l.style.color="#5ac8fa",l.style.borderColor="#5ac8fa"}),U.$$click=()=>qn(!0),e.insert(U,()=>t("gui.hideForm")),T.addEventListener("change",a=>{const l=a.currentTarget.checked;To(l),l&&(Ke(""),mt().length===0&&gi(P().map(f=>f.id)))}),e.insert(re,()=>t("gui.matrixHint")),e.insert($,(()=>{var a=e.memo(()=>!!gt());return()=>a()&&(()=>{var l=Fg(),f=l.firstChild,g=f.firstChild,h=f.nextSibling,b=h.firstChild,D=b.firstChild,H=D.firstChild,Pe=H.nextSibling,ae=b.nextSibling,Me=ae.firstChild,se=Me.firstChild,V=se.nextSibling,$e=ae.nextSibling,_e=$e.firstChild,Ge=_e.firstChild,nt=Ge.nextSibling,St=h.nextSibling,nn=St.firstChild,Dr=St.nextSibling,lr=Dr.firstChild,an=Dr.nextSibling;return e.insert(g,()=>t("gui.matrixWorkspacesSelected",{count:mt().length})),e.insert(f,(()=>{var me=e.memo(()=>P().length===0);return()=>me()?(()=>{var le=Og();return e.insert(le,()=>t("gui.addWorkspaceFirst")),le})():(()=>{var le=Ig();return e.insert(le,()=>P().map(at=>(()=>{var dr=jg(),ze=dr.firstChild,Ie=ze.nextSibling,jt=Ie.firstChild,sn=Ie.nextSibling;return ze.addEventListener("change",Ve=>Ud(at.id,Ve.currentTarget.checked)),e.insert(Ie,()=>at.name,null),e.insert(sn,()=>at.path),e.effect(Ve=>e.style(Ie,`color:${at.color||"#5ac8fa"}`,Ve)),e.effect(()=>ze.checked=mt().includes(at.id)),dr})())),le})()})(),null),e.insert(b,()=>t("gui.strategy"),D),D.addEventListener("change",me=>Co(me.currentTarget.value==="sequential"?"sequential":"parallel")),e.insert(H,()=>t("gui.matrixParallel")),e.insert(Pe,()=>t("gui.matrixSequential")),e.insert(ae,()=>t("gui.onFailure"),Me),Me.addEventListener("change",me=>Eo(me.currentTarget.value==="stop"?"stop":"continue")),e.insert(se,()=>t("gui.matrixContinue")),e.insert(V,()=>t("gui.matrixStop")),e.insert($e,()=>t("gui.aggregation"),_e),_e.addEventListener("change",me=>Po(me.currentTarget.value==="per-task"?"per-task":"summary")),e.insert(Ge,()=>t("gui.matrixSummary")),e.insert(nt,()=>t("gui.matrixPerTask")),nn.addEventListener("change",me=>zo(me.currentTarget.checked)),e.insert(St,()=>t("gui.matrixAggregator"),null),e.insert(Dr,()=>t("gui.matrixConcurrency"),lr),lr.$$input=me=>Lo(me.currentTarget.value),e.insert(l,(()=>{var me=e.memo(()=>mt().length>0);return()=>me()&&(()=>{var le=Ng(),at=le.firstChild,dr=at.nextSibling;return e.insert(at,()=>t("gui.matrixOverridesTitle",{count:Gd()})),e.insert(dr,()=>mt().map(ze=>{const Ie=P().find(Ve=>Ve.id===ze);if(!Ie)return null;const jt=ra()[ze]??{},sn="padding:6px;background:#1e1e1e;border:1px solid #333;border-radius:6px;color:#fff;font-size:12px;outline:none;box-sizing:border-box";return(()=>{var Ve=qg(),Mr=Ve.firstChild,ln=Mr.firstChild,Oi=ln.nextSibling,dn=Mr.nextSibling,Fr=dn.firstChild,Ii=Fr.nextSibling,Or=Ii.firstChild,ji=Or.nextSibling,un=Ii.nextSibling,Ir=un.firstChild,pn=Ir.nextSibling;return e.insert(Mr,()=>Ie.name,Oi),e.insert(Oi,()=>aa(Qe(),Ie.name)),Fr.$$input=de=>bi(ze,"prompt",de.currentTarget.value),Or.$$input=de=>bi(ze,"model",de.currentTarget.value),ji.$$input=de=>bi(ze,"qualityGate",de.currentTarget.value),Ir.$$input=de=>bi(ze,"beforeScript",de.currentTarget.value),pn.$$input=de=>bi(ze,"afterScript",de.currentTarget.value),e.effect(de=>{var va=`font-size:12px;font-weight:600;margin-bottom:6px;color:${Ie.color||"#5ac8fa"}`,Rl=t("gui.matrixPromptPlaceholder"),Ll=t("gui.matrixModelPlaceholder");return de.e=e.style(Mr,va,de.e),Rl!==de.t&&e.setAttribute(Fr,"placeholder",de.t=Rl),Ll!==de.a&&e.setAttribute(Or,"placeholder",de.a=Ll),de},{e:void 0,t:void 0,a:void 0}),e.effect(()=>Fr.value=jt.prompt??""),e.effect(()=>Or.value=jt.model??""),e.effect(()=>ji.value=jt.qualityGate??""),e.effect(()=>Ir.value=jt.beforeScript??""),e.effect(()=>pn.value=jt.afterScript??""),Ve})()})),le})()})(),an),e.insert(an,(()=>{var me=e.memo(()=>sa().length>0);return()=>me()?[(()=>{var le=Hg();return e.insert(le,()=>t("gui.matrixWillCreate",{count:sa().length})),le})(),(()=>{var le=Wg();return e.insert(le,()=>sa().join(", ")),le})()]:(()=>{var le=Bg();return e.insert(le,()=>t("gui.matrixSelectHint")),le})()})()),e.effect(()=>e.setAttribute(lr,"placeholder",ta()==="sequential"?t("gui.concurrencySequentialPlaceholder"):t("gui.concurrencyUnlimitedPlaceholder"))),e.effect(()=>D.value=ta()),e.effect(()=>Me.value=ol()),e.effect(()=>_e.value=nl()),e.effect(()=>nn.checked=al()),e.effect(()=>lr.value=Ro()),l})()})(),null),e.insert(x,(()=>{var a=e.memo(()=>!gt());return()=>a()&&(()=>{var l=Ug(),f=l.firstChild,g=f.nextSibling,h=g.firstChild;return e.insert(f,()=>t("gui.workspaceMultiRepo")),g.addEventListener("change",b=>{Ke(b.currentTarget.value),b.currentTarget.value&&kr("")}),e.insert(h,()=>t("gui.noWorkspaceOption")),e.insert(g,()=>P().map(b=>(()=>{var D=ql(),H=D.firstChild;return e.insert(D,()=>b.name,null),e.effect(()=>e.setAttribute(D,"key",b.id)),e.effect(()=>D.value=b.id),D})()),null),e.insert(l,(()=>{var b=e.memo(()=>!!hi());return()=>b()&&(()=>{var D=Gg(),H=D.firstChild,Pe=H.firstChild,ae=Pe.nextSibling,Me=H.nextSibling,se=Me.firstChild,V=se.nextSibling,$e=Me.nextSibling,_e=$e.firstChild,Ge=_e.nextSibling;return e.insert(ae,()=>hi().path),e.insert(V,()=>hi().gitBranch||"—"),e.insert(Ge,()=>hi().gitRemote||"—"),D})()})(),null),e.effect(()=>g.value=ut()),l})()})(),ge),e.insert(J,()=>t("gui.taskNameLabel")),R.$$input=a=>uo(a.currentTarget.value),e.insert(x,(()=>{var a=e.memo(()=>!ut()&&!gt());return()=>a()&&(()=>{var l=Wl(),f=l.firstChild,g=f.nextSibling,h=g.nextSibling;return e.insert(f,()=>t("gui.workingDirectoryLabel")),g.$$input=b=>kr(b.currentTarget.value),e.insert(h,()=>t("gui.workingDirectoryHint")),e.effect(()=>e.setAttribute(g,"placeholder",t("gui.workingDirectoryPlaceholder"))),e.effect(()=>g.value=ci()||""),l})()})(),j),e.insert(M,()=>t("gui.triggerTypeLabel")),Xe.addEventListener("change",()=>pt("cron")),e.insert(Se,()=>t("gui.triggerCron"),null),Fe.addEventListener("change",()=>pt("file")),e.insert(qe,()=>t("gui.triggerFile"),null),L.addEventListener("change",()=>pt("git")),e.insert(Oe,()=>t("gui.triggerGit"),null),he.addEventListener("change",()=>pt("mcp-event")),Ee.addEventListener("change",()=>pt("once")),e.insert(He,()=>t("gui.triggerOnce"),null),e.insert(x,(()=>{var a=e.memo(()=>pe()==="file");return()=>a()&&(()=>{var l=Vg(),f=l.firstChild,g=f.nextSibling,h=g.nextSibling,b=h.nextSibling,D=b.nextSibling,H=D.nextSibling,Pe=H.nextSibling;return e.insert(f,()=>t("gui.watchFileLabel")),g.$$input=ae=>ri(ae.currentTarget.value),e.insert(h,()=>t("gui.watchGlobsLabel")),b.$$input=ae=>Vn(ae.currentTarget.value),e.insert(D,()=>t("gui.watchIgnoreLabel")),H.$$input=ae=>Kn(ae.currentTarget.value),e.insert(Pe,()=>t("gui.watchGlobsHint")),e.effect(()=>e.setAttribute(g,"placeholder",t("gui.watchFilePlaceholder"))),e.effect(()=>g.value=Hn()||""),e.effect(()=>b.value=Qs()||""),e.effect(()=>H.value=Zs()||""),l})()})(),De),e.insert(x,(()=>{var a=e.memo(()=>pe()==="git");return()=>a()&&[(()=>{var l=Kg(),f=l.firstChild,g=f.nextSibling;return e.insert(f,()=>t("gui.gitBranchesLabel")),g.$$input=h=>Yn(h.currentTarget.value),e.effect(()=>g.value=Xs()||""),l})(),(()=>{var l=Yg(),f=l.firstChild,g=f.nextSibling;return e.insert(f,()=>t("gui.gitPathsLabel")),g.$$input=h=>Jn(h.currentTarget.value),e.effect(()=>g.value=el()||""),l})(),(()=>{var l=Jg(),f=l.firstChild,g=f.nextSibling;return e.insert(f,()=>t("gui.gitIgnoreLabel")),g.$$input=h=>Qn(h.currentTarget.value),e.effect(()=>g.value=tl()||""),l})(),(()=>{var l=Qg(),f=l.firstChild,g=f.nextSibling,h=g.nextSibling;return e.insert(f,()=>t("gui.gitPollLabel")),g.$$input=b=>Zn(b.currentTarget.value),e.insert(h,()=>t("gui.gitPollHint")),e.effect(()=>g.value=_o()||""),l})()]})(),De),e.insert(x,(()=>{var a=e.memo(()=>pe()==="mcp-event");return()=>a()&&[(()=>{var l=Bl(),f=l.firstChild,g=f.nextSibling;return e.insert(f,()=>t("gui.mcpSourceLabel")),g.$$input=h=>li(h.currentTarget.value),e.effect(()=>e.setAttribute(g,"placeholder",t("gui.mcpSourcePlaceholder"))),e.effect(()=>g.value=Xn()||""),l})(),(()=>{var l=Bl(),f=l.firstChild,g=f.nextSibling;return e.insert(f,()=>t("gui.mcpEventLabel")),g.$$input=h=>di(h.currentTarget.value),e.effect(()=>e.setAttribute(g,"placeholder",t("gui.mcpEventPlaceholder"))),e.effect(()=>g.value=ea()||""),l})(),(()=>{var l=Wl(),f=l.firstChild,g=f.nextSibling,h=g.nextSibling;return e.insert(f,()=>t("gui.mcpFilterLabel")),g.$$input=b=>pi(b.currentTarget.value),e.insert(h,()=>t("gui.mcpFilterHint")),e.effect(()=>e.setAttribute(g,"placeholder",t("gui.mcpFilterPlaceholder"))),e.effect(()=>g.value=ui()||""),l})()]})(),De),e.insert(x,(()=>{var a=e.memo(()=>pe()==="once");return()=>a()&&(()=>{var l=Zg(),f=l.firstChild,g=f.nextSibling,h=g.nextSibling,b=h.nextSibling,D=b.nextSibling;return e.insert(f,()=>t("gui.oneShotTimeLabel")),g.$$input=H=>bo(H.currentTarget.value),e.insert(h,()=>t("gui.oneShotDelayHint")),b.$$input=H=>ho(H.currentTarget.value),e.insert(D,()=>t("gui.oneShotHint")),e.effect(H=>{var Pe=t("gui.oneShotTimePlaceholder"),ae=t("gui.oneShotDelayPlaceholder");return Pe!==H.e&&e.setAttribute(g,"placeholder",H.e=Pe),ae!==H.t&&e.setAttribute(b,"placeholder",H.t=ae),H},{e:void 0,t:void 0}),e.effect(()=>g.value=Wn()||""),e.effect(()=>b.value=xo()||""),l})()})(),De),e.insert(ht,()=>t("gui.sessionLabel")),No.addEventListener("change",()=>wr("new")),e.insert(vt,()=>t("gui.sessionNew"),null),Ut.addEventListener("change",()=>wr("reuse")),e.insert(Tr,()=>t("gui.sessionReuse"),null),Gt.addEventListener("change",()=>wr("last")),e.insert(Cr,()=>t("gui.sessionContinue"),null),e.insert(De,(()=>{var a=e.memo(()=>ct()==="reuse");return()=>a()&&(()=>{var l=Xg(),f=l.firstChild,g=f.nextSibling,h=g.nextSibling;return e.insert(f,()=>t("gui.sessionMaxRunsLabel")),g.$$input=b=>vo(b.currentTarget.value),e.insert(h,()=>t("gui.sessionMaxRunsHint")),e.effect(()=>e.setAttribute(g,"placeholder",t("gui.unboundedPlaceholder"))),e.effect(()=>g.value=ii()||""),l})()})(),null),e.insert(x,(()=>{var a=e.memo(()=>Ld()==="win32");return()=>a()&&(()=>{var l=em(),f=l.firstChild,g=f.firstChild,h=g.nextSibling,b=h.firstChild,D=b.nextSibling;return g.addEventListener("change",H=>wo(H.currentTarget.checked)),e.insert(b,()=>t("gui.runWhenLoggedOffLabel")),e.insert(D,()=>t("gui.runWhenLoggedOffHint")),e.effect(H=>e.setStyleProperty(D,"color",Bn()?"#ffd60a":"#8e8e93")),e.effect(()=>g.checked=Bn()),l})()})(),et),e.insert(qo,()=>t("gui.scheduleLabel")),Vt.addEventListener("change",a=>{const l=a.currentTarget.value;Gr(l),l!=="__custom__"&&xr(l)}),e.insert(Vt,()=>Kl().map(a=>(()=>{var l=Ni();return e.insert(l,()=>a.label),e.effect(()=>e.setAttribute(l,"key",a.value)),e.effect(()=>l.value=a.value),l})())),e.insert(et,$u&&(()=>{var a=tm(),l=a.firstChild,f=l.nextSibling;return e.insert(l,()=>t("gui.cronExprLabel")),f.$$input=g=>xr(g.currentTarget.value),e.effect(()=>f.value=po()||""),a})(),wt),e.insert(et,(()=>{var a=e.memo(()=>!!Fa());return()=>a()&&(()=>{var l=rm();return e.insert(l,Fa),l})()})(),wt),e.insert(Er,()=>t("gui.timezoneLabel")),zt.$$input=a=>oi(a.currentTarget.value),e.insert(Kt,()=>t("gui.timezoneHint")),e.insert(Yt,()=>t("gui.windowLabel")),Jt.$$input=a=>ni(a.currentTarget.value),We.$$input=a=>ai(a.currentTarget.value),e.insert(tt,()=>t("gui.windowHint")),e.insert(ki,()=>t("gui.weekdaysLabel")),e.insert(Vo,()=>[{value:1,day:"gui.weekday.1"},{value:2,day:"gui.weekday.2"},{value:3,day:"gui.weekday.3"},{value:4,day:"gui.weekday.4"},{value:5,day:"gui.weekday.5"},{value:6,day:"gui.weekday.6"},{value:0,day:"gui.weekday.0"}].map(a=>(()=>{var l=im(),f=l.firstChild;return f.addEventListener("change",g=>{const h=g.currentTarget.checked?[...si(),a.value]:si().filter(b=>b!==a.value);Un([...h].sort((b,D)=>b-D))}),e.insert(l,()=>t(a.day),null),e.effect(()=>f.checked=si().includes(a.value)),l})())),e.insert(rt,()=>t("gui.outsideWindowLabel")),Pr.addEventListener("change",a=>Gn(a.currentTarget.value)),e.insert($i,()=>t("gui.windowPostpone")),e.insert(Si,()=>t("gui.windowSkip")),e.insert(Ko,()=>t("gui.windowRun")),e.insert(ba,()=>t("gui.windowPolicyHint")),e.insert(_i,()=>t("gui.promptLabel")),Rt.$$input=a=>vr(a.currentTarget.value),e.insert(Qt,()=>t("gui.promptTemplateLabel")),At.addEventListener("change",a=>su(a.currentTarget.value)),e.insert(At,()=>ja().map(a=>(()=>{var l=Ni();return e.insert(l,()=>a.label),e.effect(()=>e.setAttribute(l,"key",a.value)),e.effect(()=>l.value=a.value),l})()),null),e.insert(At,()=>Yi().map(a=>(()=>{var l=Ni();return e.insert(l,()=>a.name),e.effect(()=>e.setAttribute(l,"key",a.id)),e.effect(()=>l.value=`custom:${a.id}`),l})()),null),e.insert(Lt,(()=>{var a=e.memo(()=>!!Hr().startsWith("custom:"));return()=>a()&&(()=>{var l=om(),f=l.firstChild,g=f.nextSibling;return e.insert(f,()=>t("gui.customTemplate")),e.insert(l,()=>Yi().map(h=>`custom:${h.id}`!==Hr()?null:(()=>{var b=nm();return e.insert(b,()=>h.name),e.effect(()=>e.setAttribute(b,"key",h.id)),b})()),g),g.addEventListener("mouseleave",h=>{h.currentTarget.style.color="#ff3b30"}),g.addEventListener("mouseenter",h=>{h.currentTarget.style.color="#c92a2a"}),g.$$click=()=>{const h=Yi().find(b=>`custom:${b.id}`===Hr());h&&du(h)},e.effect(()=>e.setAttribute(g,"title",t("gui.deleteTemplateTitle"))),l})()})(),null),e.insert(Ti,()=>t("gui.modelLabel")),Zt.$$input=a=>Jr(a.currentTarget.value),e.insert(Ci,()=>t("gui.modelHint")),e.insert(Ei,()=>t("gui.priorityLabel")),$t.addEventListener("change",a=>Qr(Number(a.currentTarget.value)||_t)),e.insert($t,()=>Vl().map(a=>(()=>{var l=Ni();return e.insert(l,()=>a.label),e.effect(()=>e.setAttribute(l,"key",a.value)),e.effect(()=>l.value=String(a.value)),l})()),null),e.insert($t,(()=>{var a=e.memo(()=>!Vl().some(l=>l.value===Ht()));return()=>a()&&(()=>{var l=Ni();return e.insert(l,()=>t("gui.otherPriorityOption",{priority:Ht()})),e.effect(()=>l.value=String(Ht())),l})()})(),null),e.insert(Pi,()=>t("gui.priorityHint")),e.insert(zi,()=>t("gui.maxRetriesLabel")),Xt.$$input=a=>Vr(Number(a.currentTarget.value)||0),e.insert(Ri,()=>t("gui.retryDelayLabel")),Li.$$input=a=>Kr(Number(a.currentTarget.value)||60),e.insert(Ar,()=>t("gui.qualityGateLabel")),Dt.$$input=a=>Zr(a.currentTarget.value),e.insert(tr,()=>t("gui.qualityGateHint")),e.insert(Zo,()=>t("gui.preflightLabel")),it.$$input=a=>ei(a.currentTarget.value),e.insert(xa,()=>t("gui.preflightHint")),e.insert(en,()=>t("gui.postflightLabel")),ot.$$input=a=>ti(a.currentTarget.value),e.insert(rr,()=>t("gui.postflightHint")),e.insert(o,()=>t("gui.dependsOnLabel")),e.insert(Be,(()=>{var a=e.memo(()=>yl().length===0);return()=>a()?(()=>{var l=am();return e.insert(l,()=>t("gui.noOtherTasks")),l})():yl().map(l=>(()=>{var f=Sa(),g=f.firstChild;return g.addEventListener("change",h=>_u(l,h.currentTarget.checked)),e.insert(f,l,null),e.effect(h=>e.style(f,`display:flex;align-items:center;gap:6px;padding:6px 10px;border-radius:14px;border:1px solid ${Wt().includes(l)?"#5ac8fa":"#333"};background:${Wt().includes(l)?"rgba(90,200,250,0.12)":"transparent"};color:${Wt().includes(l)?"#5ac8fa":"#cfcfd2"};font-size:12px;cursor:pointer;user-select:none`,h)),e.effect(()=>g.checked=Wt().includes(l)),f})())})()),e.insert(ir,()=>t("gui.dependsOnHint")),e.insert(or,()=>t("gui.toolLimitsHeading"),null),e.insert(or,(()=>{var a=e.memo(()=>fe().length>0||ye().length>0);return()=>a()&&(()=>{var l=sm(),f=l.firstChild,g=f.nextSibling,h=g.nextSibling,b=h.nextSibling,D=b.nextSibling;return e.insert(l,()=>fe().length,g),e.insert(l,()=>ye().length,b),l})()})(),null),e.insert(Ue,()=>t("gui.toolLimitsNote"),null),e.insert(Ue,()=>t("gui.toolLimitsDenied"),null),e.insert(Ot,()=>t("gui.allowedToolsLabel")),e.insert(It,()=>ll.map(a=>(()=>{var l=Sa(),f=l.firstChild;return f.addEventListener("change",()=>dl("allowed",a)),e.insert(l,a,null),e.effect(g=>e.style(l,`display:flex;align-items:center;gap:5px;padding:4px 9px;border-radius:12px;border:1px solid ${fe().includes(a)?"#34c759":"#333"};background:${fe().includes(a)?"rgba(52,199,89,0.12)":"transparent"};color:${fe().includes(a)?"#34c759":"#cfcfd2"};font-size:11px;cursor:pointer;user-select:none`,g)),e.effect(()=>f.checked=fe().includes(a)),l})())),e.insert(Di,()=>t("gui.deniedToolsLabel")),e.insert(rn,()=>ll.map(a=>(()=>{var l=Sa(),f=l.firstChild;return f.addEventListener("change",()=>dl("denied",a)),e.insert(l,a,null),e.effect(g=>e.style(l,`display:flex;align-items:center;gap:5px;padding:4px 9px;border-radius:12px;border:1px solid ${ye().includes(a)?"#ff3b30":"#333"};background:${ye().includes(a)?"rgba(255,59,48,0.12)":"transparent"};color:${ye().includes(a)?"#ff3b30":"#cfcfd2"};font-size:11px;cursor:pointer;user-select:none`,g)),e.effect(()=>f.checked=ye().includes(a)),l})())),nr.$$input=a=>il(a.currentTarget.value),Mi.$$click=()=>ul("allowed"),ha.$$click=()=>ul("denied"),e.insert(Ft,(()=>{var a=e.memo(()=>fe().length>0||ye().length>0);return()=>a()&&(()=>{var l=lm();return e.insert(l,(()=>{var f=e.memo(()=>fe().length>0);return()=>f()&&(()=>{var g=dm(),h=g.firstChild,b=h.nextSibling,D=b.nextSibling;return e.insert(g,()=>fe().join(", "),b),g})()})(),null),e.insert(l,(()=>{var f=e.memo(()=>ye().length>0);return()=>f()&&(()=>{var g=um(),h=g.firstChild,b=h.nextSibling,D=b.nextSibling;return e.insert(g,()=>ye().join(", "),b),g})()})(),null),l})()})(),null),ar.$$click=()=>{na(Ul);const a={order:0,trigger:"manual",command:Vd(),roleScoped:fe().length>0||ye().length>0?{allowed:fe(),denied:ye()}:null,preFlight:(fo()||"").trim()||null,postFlight:(yo()||"").trim()||null,qualityGate:(mo()||"").trim()||null},l=mt().map(f=>P().find(g=>g.id===f)).filter(f=>!!f).map((f,g)=>({...a,name:aa(Qe(),f.name),order:g,cwd:f.path,matrixParent:Qe()||t("gui.noNameFallback")}));fi({tasks:gt()?l:[{...a,name:Qe()||t("gui.noNameFallback"),cwd:hi()?.path||(ci()||"").trim()||t("gui.projectFolderFallback")}],totals:{},warnings:[...Qe().trim()?[]:[t("gui.dryRunNoNameWarning")],...gt()?[t("gui.dryRunMatrixPreview",{count:l.length})]:[]]}),ia(!0)},e.insert(ar,()=>t("gui.dryRunButton")),sr.$$click=gu,e.insert(sr,(()=>{var a=e.memo(()=>!!qr());return()=>a()?t("gui.creating"):t(da?"gui.save":"gui.createTaskSubmit")})()),e.insert(Fi,da&&(()=>{var a=pm();return a.$$click=()=>{lo(null),uo(""),xr("* * * * *"),vr(""),Jr(""),Qr(_t),Vr(0),Kr(60),Zr(""),Xr([]),ei(""),ti(""),pt("cron"),ri(""),bo(""),ho(""),wr("new"),vo(""),wo(!1),oi(""),ni(""),ai(""),li(""),di(""),pi(""),kr(""),Ke(""),$r([]),Sr([]),Do(),Gr("* * * * *"),Gi("")},e.insert(a,()=>t("gui.cancel")),a})(),null),e.insert(x,(()=>{var a=e.memo(()=>!!(mi()&&yi()===Ul));return()=>a()&&(()=>{var l=cm(),f=l.firstChild,g=f.firstChild;return e.insert(f,()=>t("gui.dryRunLocalTitle"),g),g.$$click=()=>ml(),e.insert(l,()=>{const h=be();if(!h)return null;const b=h.tasks?.[0];return(()=>{var D=gm(),H=D.firstChild,Pe=H.firstChild,ae=H.nextSibling,Me=ae.firstChild;return e.insert(H,()=>b?.command,null),e.insert(ae,()=>b?.cwd,null),e.insert(D,(()=>{var se=e.memo(()=>!!b?.roleScoped);return()=>se()&&(()=>{var V=mm(),$e=V.firstChild,_e=$e.nextSibling,Ge=_e.nextSibling,nt=Ge.nextSibling,St=nt.nextSibling;return e.insert(V,()=>(b.roleScoped.allowed??[]).join(", "),_e),e.insert(V,()=>(b.roleScoped.denied??[]).join(", "),nt),V})()})(),null),e.insert(D,(()=>{var se=e.memo(()=>!!b?.preFlight);return()=>se()&&(()=>{var V=fm(),$e=V.firstChild;return e.insert(V,()=>b.preFlight,null),V})()})(),null),e.insert(D,(()=>{var se=e.memo(()=>!!b?.postFlight);return()=>se()&&(()=>{var V=ym(),$e=V.firstChild;return e.insert(V,()=>b.postFlight,null),V})()})(),null),e.insert(D,(()=>{var se=e.memo(()=>!!b?.qualityGate);return()=>se()&&(()=>{var V=bm(),$e=V.firstChild;return e.insert(V,()=>b.qualityGate,null),V})()})(),null),e.insert(D,(()=>{var se=e.memo(()=>!!(Array.isArray(h.warnings)&&h.warnings.length>0));return()=>se()&&(()=>{var V=xm(),$e=V.firstChild;return e.insert(V,()=>h.warnings.join(" | "),null),V})()})(),null),D})()},null),l})()})(),null),e.effect(a=>{var l=t("gui.saveAsTemplateTitle"),f=t("gui.collapseFormTitle"),g=t("gui.taskNamePlaceholder"),h=pe()!=="cron"?"none":"block",b=t("gui.timezonePlaceholder"),D=t("gui.windowStartTitle"),H=t("gui.windowEndTitle"),Pe=t("gui.promptPlaceholder"),ae=t("gui.modelPlaceholder"),Me=t("gui.qualityGatePlaceholder"),se=t("gui.preflightPlaceholder"),V=t("gui.postflightPlaceholder"),$e=t("gui.toolPlaceholder"),_e=t("gui.dryRunPreviewTitle"),Ge=qr()||!Io(),nt=Io()?void 0:fl(),St=`display:block;width:100%;padding:10px;margin-top:8px;background:${qr()?"#666":"#007acc"};color:white;border-radius:6px;border:none;cursor:${qr()||!Io()?"not-allowed":"pointer"};font-size:13px;font-weight:500;opacity:${qr()||!Io()?.6:1}`;return l!==a.e&&e.setAttribute(G,"title",a.e=l),f!==a.t&&e.setAttribute(U,"title",a.t=f),g!==a.a&&e.setAttribute(R,"placeholder",a.a=g),h!==a.o&&e.setStyleProperty(et,"display",a.o=h),b!==a.i&&e.setAttribute(zt,"placeholder",a.i=b),D!==a.n&&e.setAttribute(Jt,"title",a.n=D),H!==a.s&&e.setAttribute(We,"title",a.s=H),Pe!==a.h&&e.setAttribute(Rt,"placeholder",a.h=Pe),ae!==a.r&&e.setAttribute(Zt,"placeholder",a.r=ae),Me!==a.d&&e.setAttribute(Dt,"placeholder",a.d=Me),se!==a.l&&e.setAttribute(it,"placeholder",a.l=se),V!==a.u&&e.setAttribute(ot,"placeholder",a.u=V),$e!==a.c&&e.setAttribute(nr,"placeholder",a.c=$e),_e!==a.w&&e.setAttribute(ar,"title",a.w=_e),Ge!==a.m&&(sr.disabled=a.m=Ge),nt!==a.f&&e.setAttribute(sr,"title",a.f=nt),a.y=e.style(sr,St,a.y),a},{e:void 0,t:void 0,a:void 0,o:void 0,i:void 0,n:void 0,s:void 0,h:void 0,r:void 0,d:void 0,l:void 0,u:void 0,c:void 0,w:void 0,m:void 0,f:void 0,y:void 0}),e.effect(()=>T.checked=gt()),e.effect(()=>R.value=Qe()||""),e.effect(()=>Xe.checked=pe()==="cron"),e.effect(()=>Fe.checked=pe()==="file"),e.effect(()=>L.checked=pe()==="git"),e.effect(()=>he.checked=pe()==="mcp-event"),e.effect(()=>Ee.checked=pe()==="once"),e.effect(()=>No.checked=ct()==="new"),e.effect(()=>Ut.checked=ct()==="reuse"),e.effect(()=>Gt.checked=ct()==="last"),e.effect(()=>Vt.value=Ys()),e.effect(()=>zt.value=ko()||""),e.effect(()=>Jt.value=$o()||""),e.effect(()=>We.value=So()||""),e.effect(()=>Pr.value=Js()),e.effect(()=>Rt.value=hr()||""),e.effect(()=>At.value=Hr()),e.effect(()=>Zt.value=Yr()||""),e.effect(()=>$t.value=String(Ht())),e.effect(()=>Xt.value=co()),e.effect(()=>Li.value=go()),e.effect(()=>Dt.value=mo()||""),e.effect(()=>it.value=fo()||""),e.effect(()=>ot.value=yo()||""),e.effect(()=>nr.value=rl()),x})()})(),jo),e.insert(Iu,()=>t("gui.tasksHeading")),e.insert(jo,(()=>{var m=e.memo(()=>lt()!=="all");return()=>m()&&(()=>{var x=hm();return e.insert(x,()=>t("gui.filterSummary",{scope:lt()==="none"?t("gui.workspaceNone"):`📦 ${P().find(E=>E.id===lt())?.name??"workspace"}`,visible:pa().length,total:vi().length})),x})()})(),null),e.insert(jo,(()=>{var m=e.memo(()=>pa().length===0);return()=>m()?(()=>{var x=vm(),E=x.firstChild,k=E.nextSibling;return e.insert(E,()=>Ye()?"🎄":"📅"),e.insert(k,(()=>{var I=e.memo(()=>!!Ye());return()=>I()?t("gui.emptyWinter"):t("gui.emptyNormal")})()),x})():(()=>{var x=wm();return e.insert(x,()=>pa().map(E=>e.createComponent(Cu,{get key(){return E.name},job:E}))),x})()})(),null),e.insert(i,(()=>{var m=e.memo(()=>!!dd());return()=>m()&&(()=>{var x=km(),E=x.firstChild,k=E.firstChild,I=k.nextSibling,G=I.firstChild,U=G.nextSibling;return x.$$click=()=>qt(null),E.$$click=$=>$.stopPropagation(),e.insert(k,fn),e.insert(E,(()=>{var $=e.memo(()=>!!fn().includes("KEY=VALUE"));return()=>$()?(()=>{var _=$m();return _.$$keydown=T=>{T.key==="Escape"&&qt(null),T.key==="Enter"&&(T.ctrlKey||T.metaKey)&&(T.preventDefault(),qt(Nr())),T.stopPropagation()},_.$$input=T=>yn(T.currentTarget.value),e.effect(()=>_.value=Nr()),_})():(()=>{var _=Sm();return _.$$keydown=T=>{T.key==="Escape"&&qt(null),T.key==="Enter"&&(T.preventDefault(),qt(Nr())),T.stopPropagation()},_.$$input=T=>yn(T.currentTarget.value),e.effect(()=>_.value=Nr()),_})()})(),I),G.$$click=()=>qt(null),e.insert(G,()=>t("gui.cancel")),U.$$click=()=>qt(Nr()),e.insert(U,()=>t("gui.ok")),e.insert(E,(()=>{var $=e.memo(()=>!!fn().includes("KEY=VALUE"));return()=>$()&&(()=>{var _=_m();return e.insert(_,()=>t("gui.modalShortcutHint")),_})()})(),null),x})()})(),null),e.insert(i,(()=>{var m=e.memo(()=>!!bn());return()=>m()&&(()=>{var x=Tm(),E=x.firstChild,k=E.firstChild,I=k.firstChild,G=I.nextSibling,U=k.nextSibling,$=E.nextSibling;return e.insert(I,()=>t("gui.logsHeading")),e.insert(G,bn),U.addEventListener("mouseleave",_=>{_.target.style.color="#8e8e93"}),U.addEventListener("mouseenter",_=>{_.target.style.color="#ff3b30"}),U.$$click=()=>{xn(null),gr("")},e.insert($,()=>pd().split(`
|
|
9
|
+
`).map((_,T)=>(()=>{var re=Cm();return e.setAttribute(re,"key",T),e.insert(re,_),re})())),x})()})(),null),e.effect(m=>{var x=`display:flex;flex-direction:column;width:100%;height:100%;max-height:100vh;min-height:0;box-sizing:border-box;overflow-y:auto;overflow-x:hidden;gap:24px;padding:20px;font-size:13px;font-family:-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;color:#e0e0e0;transition:background 0.3s ease;scrollbar-width:thin;scrollbar-color:#444 transparent;background:${Ye()?"linear-gradient(180deg, #0f172a 0%, #000000 100%)":"#0f0f0f"}`,E=t("gui.metricsTotalsTitle"),k=t("gui.workspaceFilterTitle"),I=ur()?t("gui.profileEnvLockedTitle"):t("gui.profilesTitle"),G=`display:flex;align-items:center;gap:6px;padding:6px 12px;border-radius:999px;cursor:pointer;font-size:12px;user-select:none;white-space:nowrap;border:1px solid ${Bi()?"#bf5af2":"#333"};background:${Bi()?"rgba(191,90,242,0.12)":"#1e1e1e"};color:${Bi()?"#bf5af2":"#e0e0e0"}`,U=t("gui.openDashboardTitle"),$=t("gui.winterModeTitle"),_=`display:flex;align-items:center;gap:6px;padding:6px 12px;border-radius:999px;cursor:pointer;font-size:12px;user-select:none;white-space:nowrap;transition:background 0.2s ease, border-color 0.2s ease;border:1px solid ${Ye()?"rgba(135, 206, 250, 0.5)":"#333"};background:${Ye()?"rgba(135, 206, 250, 0.12)":"#1e1e1e"};color:#e0e0e0`,T=Mo(),re=`padding:6px 12px;background:#007acc;color:white;border:none;border-radius:6px;cursor:${Mo()?"not-allowed":"pointer"};font-size:12px;font-weight:500;opacity:${Mo()?.6:1};transition:background 0.18s ease`,ge=Fo(),J=`padding:6px 12px;background:#007acc;color:white;border:none;border-radius:6px;cursor:${Fo()?"not-allowed":"pointer"};font-size:12px;font-weight:500;opacity:${Fo()?.6:1};transition:background 0.18s ease`,R=dt(),j=t("gui.workspaceAddTitle"),M=`padding:5px 10px;border-radius:6px;border:1px solid #333;background:#252526;color:${dt()?"#666":"#5ac8fa"};font-size:11px;font-weight:600;cursor:${dt()?"not-allowed":"pointer"}`;return m.e=e.style(i,x,m.e),E!==m.t&&e.setAttribute(ie,"title",m.t=E),k!==m.a&&e.setAttribute(Ce,"title",m.a=k),I!==m.o&&e.setAttribute(ue,"title",m.o=I),m.i=e.style(ue,G,m.i),U!==m.n&&e.setAttribute(Le,"title",m.n=U),$!==m.s&&e.setAttribute(Ne,"title",m.s=$),m.h=e.style(Ne,_,m.h),T!==m.r&&(c.disabled=m.r=T),m.d=e.style(c,re,m.d),ge!==m.l&&(v.disabled=m.l=ge),m.u=e.style(v,J,m.u),R!==m.c&&(wi.disabled=m.c=R),j!==m.w&&e.setAttribute(wi,"title",m.w=j),m.m=e.style(wi,M,m.m),m},{e:void 0,t:void 0,a:void 0,o:void 0,i:void 0,n:void 0,s:void 0,h:void 0,r:void 0,d:void 0,l:void 0,u:void 0,c:void 0,w:void 0,m:void 0}),e.effect(()=>Ce.value=lt()),e.effect(()=>bt.checked=Ye()),e.effect(()=>C.value=bd()),e.effect(()=>Tl.checked=zn()),e.effect(()=>ga.value=Rn()),e.effect(()=>ma.value=Ln()),i}})})}catch(i){return console.error("GUI render error:",i),s.add(wa.Panel,{id:"scheduler-jobs",region:"side",list:()=>[{id:"jobs",title:t("gui.jobsTitle"),pinned:!0}],render:()=>e.createComponent(d.ErrorBoundary,{fallback:r=>(()=>{var n=Nl();return e.insert(n,()=>t("gui.uiError",{message:r.message})),n})(),get children(){var r=Em(),n=r.firstChild,p=n.nextSibling,Y=p.nextSibling;return e.insert(n,On),e.insert(Y,()=>t("gui.errorBoundaryDetail")),r}})})}}});e.delegateEvents(["click","input","keydown"]);exports.default=Lm;
|