comisai 1.0.24 → 1.0.25
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/node_modules/@comis/agent/package.json +1 -1
- package/node_modules/@comis/channels/package.json +1 -1
- package/node_modules/@comis/cli/package.json +1 -1
- package/node_modules/@comis/core/dist/bootstrap.js +5 -0
- package/node_modules/@comis/core/dist/config/env-layer.d.ts +31 -0
- package/node_modules/@comis/core/dist/config/env-layer.js +41 -0
- package/node_modules/@comis/core/dist/config/layered.d.ts +9 -0
- package/node_modules/@comis/core/dist/config/layered.js +11 -0
- package/node_modules/@comis/core/package.json +1 -1
- package/node_modules/@comis/daemon/dist/daemon.js +3 -0
- package/node_modules/@comis/daemon/package.json +1 -1
- package/node_modules/@comis/gateway/package.json +1 -1
- package/node_modules/@comis/infra/package.json +1 -1
- package/node_modules/@comis/memory/package.json +1 -1
- package/node_modules/@comis/scheduler/package.json +1 -1
- package/node_modules/@comis/shared/package.json +1 -1
- package/node_modules/@comis/skills/package.json +1 -1
- package/node_modules/@comis/web/dist/assets/{agent-detail-BG9MGWWj.js → agent-detail-ru-AhppM.js} +270 -270
- package/node_modules/@comis/web/dist/assets/agent-editor-hjwRuFVp.js +2173 -0
- package/node_modules/@comis/web/dist/assets/{agent-list-LHCJ4rw2.js → agent-list-6Uotjatr.js} +170 -170
- package/node_modules/@comis/web/dist/assets/{approvals-q9VH_IKr.js → approvals-C-K6hN2U.js} +13 -13
- package/node_modules/@comis/web/dist/assets/billing-view-CxysXH0p.js +375 -0
- package/node_modules/@comis/web/dist/assets/{channel-detail-CaInesJM.js → channel-detail-BBCKtmne.js} +265 -265
- package/node_modules/@comis/web/dist/assets/channel-list-FkfeOLBQ.js +323 -0
- package/node_modules/@comis/web/dist/assets/{chat-console-CNmzl0JW.js → chat-console-BumBaIgO.js} +243 -246
- package/node_modules/@comis/web/dist/assets/{config-editor-DX4ITw6y.js → config-editor-C9BSwHGy.js} +477 -477
- package/node_modules/@comis/web/dist/assets/{context-dag-browser-BwiaF5tf.js → context-dag-browser-BHm00mJD.js} +105 -105
- package/node_modules/@comis/web/dist/assets/{context-engine-BZ5Am6hA.js → context-engine-BENY3pWE.js} +136 -136
- package/node_modules/@comis/web/dist/assets/decorate-BvWYovGE.js +38 -0
- package/node_modules/@comis/web/dist/assets/{delivery-view-OfBZof-m.js → delivery-view-BCnkPsAp.js} +134 -134
- package/node_modules/@comis/web/dist/assets/{diagnostics-view-YFwCxgr2.js → diagnostics-view-C_jQFG2H.js} +82 -82
- package/node_modules/@comis/web/dist/assets/directive-BOYXJ-K-.js +1 -0
- package/node_modules/@comis/web/dist/assets/{extract-variables-BM5qyK-s.js → extract-variables-B7-Doo7l.js} +39 -39
- package/node_modules/@comis/web/dist/assets/{ic-array-editor-B7m6x7-S.js → ic-array-editor-BLoEyeLS.js} +29 -29
- package/node_modules/@comis/web/dist/assets/{ic-breadcrumb-CUMpp3BL.js → ic-breadcrumb-DqN6G3gc.js} +16 -16
- package/node_modules/@comis/web/dist/assets/{ic-budget-segment-bar-BtJ6x5mN.js → ic-budget-segment-bar-zLsMzjDO.js} +20 -20
- package/node_modules/@comis/web/dist/assets/ic-chat-message-FdQcZsSQ.js +352 -0
- package/node_modules/@comis/web/dist/assets/{ic-confirm-dialog-CCDbB04e.js → ic-confirm-dialog-DGlPbV1T.js} +26 -26
- package/node_modules/@comis/web/dist/assets/{ic-connection-dot-CnT1b8xr.js → ic-connection-dot-BgYiK2N4.js} +13 -13
- package/node_modules/@comis/web/dist/assets/ic-data-table-CKIvr-ag.js +277 -0
- package/node_modules/@comis/web/dist/assets/ic-delivery-row-B3YwjjuM.js +67 -0
- package/node_modules/@comis/web/dist/assets/{ic-detail-panel-BF83r-if.js → ic-detail-panel-DiCe4hLr.js} +27 -27
- package/node_modules/@comis/web/dist/assets/{ic-empty-state-60l2ePhd.js → ic-empty-state-CM3Wbj2f.js} +19 -19
- package/node_modules/@comis/web/dist/assets/ic-graph-canvas-ByRjij68.js +359 -0
- package/node_modules/@comis/web/dist/assets/ic-icon-BGNCCPpZ.js +33 -0
- package/node_modules/@comis/web/dist/assets/{ic-layer-waterfall-COvEYMg5.js → ic-layer-waterfall-WkaFyu-l.js} +18 -18
- package/node_modules/@comis/web/dist/assets/ic-relative-time-B3UAnTqg.js +12 -0
- package/node_modules/@comis/web/dist/assets/{ic-search-input-CSOxY9g7.js → ic-search-input-B02AGw1i.js} +22 -22
- package/node_modules/@comis/web/dist/assets/{ic-select-Ce-Raudx.js → ic-select-BqfZISjw.js} +29 -29
- package/node_modules/@comis/web/dist/assets/ic-tabs-yBjkWKJH.js +95 -0
- package/node_modules/@comis/web/dist/assets/ic-tag-CvMVQFRR.js +33 -0
- package/node_modules/@comis/web/dist/assets/{ic-time-range-picker-CypCT68y.js → ic-time-range-picker-DXbYeBmY.js} +31 -31
- package/node_modules/@comis/web/dist/assets/{ic-tool-call-7MaXSsCW.js → ic-tool-call-DMPHsLyx.js} +51 -51
- package/node_modules/@comis/web/dist/assets/index-CVEaS9aY.css +2 -0
- package/node_modules/@comis/web/dist/assets/index-FLPhHz8p.js +2792 -0
- package/node_modules/@comis/web/dist/assets/{mcp-management-BNZPnpDn.js → mcp-management-5jyScQis.js} +209 -209
- package/node_modules/@comis/web/dist/assets/{media-config-BBvTYxOX.js → media-config-J9oT9PPs.js} +154 -154
- package/node_modules/@comis/web/dist/assets/{media-test-BkK3RCRK.js → media-test-DGTCtM8-.js} +259 -259
- package/node_modules/@comis/web/dist/assets/{memory-inspector-1hDGCGat.js → memory-inspector-D5Re9ptG.js} +450 -450
- package/node_modules/@comis/web/dist/assets/{message-center-CXefwsUu.js → message-center-cRLK6ZmG.js} +290 -290
- package/node_modules/@comis/web/dist/assets/{models-C1qcU_j3.js → models-D5vu07MR.js} +371 -371
- package/node_modules/@comis/web/dist/assets/observability-types-D0tkwElU.js +1 -0
- package/node_modules/@comis/web/dist/assets/{observe-view-C0VBhX4C.js → observe-view-CalNNEmd.js} +399 -399
- package/node_modules/@comis/web/dist/assets/pipeline-builder-DUYDGwZf.js +1495 -0
- package/node_modules/@comis/web/dist/assets/{pipeline-history-DkfOQ6SW.js → pipeline-history-BAO8brOe.js} +124 -124
- package/node_modules/@comis/web/dist/assets/{pipeline-history-detail-hyHgD0ai.js → pipeline-history-detail-DectIoQt.js} +65 -65
- package/node_modules/@comis/web/dist/assets/{pipeline-list-BPW8hV-q.js → pipeline-list-BHlaBKww.js} +227 -227
- package/node_modules/@comis/web/dist/assets/{pipeline-monitor-Bip16T7e.js → pipeline-monitor-BhtpNEHf.js} +298 -298
- package/node_modules/@comis/web/dist/assets/{scheduler-BGgwKd06.js → scheduler-VafN_8xi.js} +486 -486
- package/node_modules/@comis/web/dist/assets/{security-D15st4xx.js → security-QQXMRTlo.js} +389 -389
- package/node_modules/@comis/web/dist/assets/{session-detail-SGEYNJ0M.js → session-detail-BpZ_8Yih.js} +294 -294
- package/node_modules/@comis/web/dist/assets/session-key-parser-Dkqcj2Ss.js +1 -0
- package/node_modules/@comis/web/dist/assets/session-list-DfCm8Cec.js +231 -0
- package/node_modules/@comis/web/dist/assets/{setup-wizard-nT0tz9QP.js → setup-wizard-C-z477CG.js} +486 -494
- package/node_modules/@comis/web/dist/assets/{skills-D8yVfSUy.js → skills-BCOGPf6s.js} +329 -329
- package/node_modules/@comis/web/dist/assets/{subagents-HHXMeHYo.js → subagents-l-auUraL.js} +74 -74
- package/node_modules/@comis/web/dist/assets/{workspace-manager-BQlr10iH.js → workspace-manager-DlvBixiq.js} +236 -236
- package/node_modules/@comis/web/dist/index.html +3 -2
- package/node_modules/@comis/web/package.json +1 -1
- package/package.json +15 -15
- package/node_modules/@comis/web/dist/assets/agent-editor-C26Q_xCs.js +0 -2173
- package/node_modules/@comis/web/dist/assets/billing-view-CtYvBqTE.js +0 -375
- package/node_modules/@comis/web/dist/assets/channel-list-B8dj3O9a.js +0 -323
- package/node_modules/@comis/web/dist/assets/directive-DoeGSK_T.js +0 -1
- package/node_modules/@comis/web/dist/assets/ic-chat-message-CFyDJd0z.js +0 -352
- package/node_modules/@comis/web/dist/assets/ic-data-table-CKUNTxHw.js +0 -277
- package/node_modules/@comis/web/dist/assets/ic-delivery-row-GP5Fkygs.js +0 -67
- package/node_modules/@comis/web/dist/assets/ic-graph-canvas-C8FuSMe1.js +0 -359
- package/node_modules/@comis/web/dist/assets/ic-icon-xeGTVhVG.js +0 -33
- package/node_modules/@comis/web/dist/assets/ic-relative-time-3FqpjeAI.js +0 -12
- package/node_modules/@comis/web/dist/assets/ic-tabs-B7QtM_v8.js +0 -95
- package/node_modules/@comis/web/dist/assets/ic-tag-CPPUnDLF.js +0 -33
- package/node_modules/@comis/web/dist/assets/index-CEcM1R_C.js +0 -2830
- package/node_modules/@comis/web/dist/assets/index-CIJFuItj.css +0 -1
- package/node_modules/@comis/web/dist/assets/observability-types-D7jUtSde.js +0 -1
- package/node_modules/@comis/web/dist/assets/pipeline-builder-DcUUIrm0.js +0 -1496
- package/node_modules/@comis/web/dist/assets/session-key-parser-DPORMVyU.js +0 -1
- package/node_modules/@comis/web/dist/assets/session-list-6ybUTxbY.js +0 -231
|
@@ -1,241 +1,4 @@
|
|
|
1
|
-
import{
|
|
2
|
-
<div class="editor-card">
|
|
3
|
-
<h2>${e}</h2>
|
|
4
|
-
|
|
5
|
-
<div class="form-grid">
|
|
6
|
-
<!-- ID -->
|
|
7
|
-
<div class="field">
|
|
8
|
-
<label for="cron-id">ID</label>
|
|
9
|
-
<input
|
|
10
|
-
id="cron-id"
|
|
11
|
-
type="text"
|
|
12
|
-
.value=${this._id}
|
|
13
|
-
?disabled=${this.mode==="edit"}
|
|
14
|
-
placeholder="e.g. daily-report"
|
|
15
|
-
@input=${t=>{this._id=t.target.value}}
|
|
16
|
-
/>
|
|
17
|
-
</div>
|
|
18
|
-
|
|
19
|
-
<!-- Name -->
|
|
20
|
-
<div class="field">
|
|
21
|
-
<label for="cron-name">Name</label>
|
|
22
|
-
<input
|
|
23
|
-
id="cron-name"
|
|
24
|
-
type="text"
|
|
25
|
-
.value=${this._name}
|
|
26
|
-
placeholder="Human-readable name"
|
|
27
|
-
@input=${t=>{this._name=t.target.value}}
|
|
28
|
-
/>
|
|
29
|
-
</div>
|
|
30
|
-
|
|
31
|
-
<!-- Schedule Kind -->
|
|
32
|
-
<div class="field">
|
|
33
|
-
<label>Schedule Kind</label>
|
|
34
|
-
<div class="kind-group">
|
|
35
|
-
<label class="kind-option">
|
|
36
|
-
<input
|
|
37
|
-
type="radio"
|
|
38
|
-
name="schedule-kind"
|
|
39
|
-
value="cron"
|
|
40
|
-
.checked=${this._scheduleKind==="cron"}
|
|
41
|
-
@change=${()=>{this._scheduleKind="cron"}}
|
|
42
|
-
/>
|
|
43
|
-
<span>Cron</span>
|
|
44
|
-
</label>
|
|
45
|
-
<label class="kind-option">
|
|
46
|
-
<input
|
|
47
|
-
type="radio"
|
|
48
|
-
name="schedule-kind"
|
|
49
|
-
value="every"
|
|
50
|
-
.checked=${this._scheduleKind==="every"}
|
|
51
|
-
@change=${()=>{this._scheduleKind="every"}}
|
|
52
|
-
/>
|
|
53
|
-
<span>Interval</span>
|
|
54
|
-
</label>
|
|
55
|
-
<label class="kind-option">
|
|
56
|
-
<input
|
|
57
|
-
type="radio"
|
|
58
|
-
name="schedule-kind"
|
|
59
|
-
value="at"
|
|
60
|
-
.checked=${this._scheduleKind==="at"}
|
|
61
|
-
@change=${()=>{this._scheduleKind="at"}}
|
|
62
|
-
/>
|
|
63
|
-
<span>One-shot</span>
|
|
64
|
-
</label>
|
|
65
|
-
</div>
|
|
66
|
-
</div>
|
|
67
|
-
|
|
68
|
-
<!-- Cron fields -->
|
|
69
|
-
${this._scheduleKind==="cron"?r`
|
|
70
|
-
<div class="field">
|
|
71
|
-
<label for="cron-expr">Schedule Expression</label>
|
|
72
|
-
<input
|
|
73
|
-
id="cron-expr"
|
|
74
|
-
type="text"
|
|
75
|
-
.value=${this._cronExpr}
|
|
76
|
-
placeholder="0 9 * * *"
|
|
77
|
-
@input=${t=>{this._cronExpr=t.target.value}}
|
|
78
|
-
/>
|
|
79
|
-
</div>
|
|
80
|
-
<div class="field">
|
|
81
|
-
<label for="cron-tz">Timezone</label>
|
|
82
|
-
<select
|
|
83
|
-
id="cron-tz"
|
|
84
|
-
.value=${this._timezone}
|
|
85
|
-
@change=${t=>{this._timezone=t.target.value}}
|
|
86
|
-
>
|
|
87
|
-
${Y.map(t=>r`<option value=${t} ?selected=${t===this._timezone}>${t}</option>`)}
|
|
88
|
-
</select>
|
|
89
|
-
</div>
|
|
90
|
-
`:p}
|
|
91
|
-
|
|
92
|
-
<!-- Interval field -->
|
|
93
|
-
${this._scheduleKind==="every"?r`
|
|
94
|
-
<div class="field">
|
|
95
|
-
<label for="cron-interval">Interval (minutes)</label>
|
|
96
|
-
<input
|
|
97
|
-
id="cron-interval"
|
|
98
|
-
type="number"
|
|
99
|
-
min="1"
|
|
100
|
-
.value=${String(Math.round(this._everyMs/6e4))}
|
|
101
|
-
@input=${t=>{const i=parseInt(t.target.value,10);!isNaN(i)&&i>0&&(this._everyMs=i*6e4)}}
|
|
102
|
-
/>
|
|
103
|
-
</div>
|
|
104
|
-
`:p}
|
|
105
|
-
|
|
106
|
-
<!-- One-shot field -->
|
|
107
|
-
${this._scheduleKind==="at"?r`
|
|
108
|
-
<div class="field">
|
|
109
|
-
<label for="cron-at">Run At</label>
|
|
110
|
-
<input
|
|
111
|
-
id="cron-at"
|
|
112
|
-
type="datetime-local"
|
|
113
|
-
.value=${this._atDateTime}
|
|
114
|
-
@input=${t=>{this._atDateTime=t.target.value}}
|
|
115
|
-
/>
|
|
116
|
-
</div>
|
|
117
|
-
`:p}
|
|
118
|
-
|
|
119
|
-
<!-- Enabled -->
|
|
120
|
-
<div class="field checkbox-field">
|
|
121
|
-
<input
|
|
122
|
-
id="cron-enabled"
|
|
123
|
-
type="checkbox"
|
|
124
|
-
.checked=${this._enabled}
|
|
125
|
-
@change=${t=>{this._enabled=t.target.checked}}
|
|
126
|
-
/>
|
|
127
|
-
<label for="cron-enabled">Enabled</label>
|
|
128
|
-
</div>
|
|
129
|
-
|
|
130
|
-
<!-- Agent -->
|
|
131
|
-
<div class="field">
|
|
132
|
-
<label for="cron-agent">Agent</label>
|
|
133
|
-
<select
|
|
134
|
-
id="cron-agent"
|
|
135
|
-
.value=${this._agentId}
|
|
136
|
-
@change=${t=>{this._agentId=t.target.value}}
|
|
137
|
-
>
|
|
138
|
-
${this.agents.length===0?r`<option value="">No agents available</option>`:this.agents.map(t=>r`<option value=${t} ?selected=${t===this._agentId}>${t}</option>`)}
|
|
139
|
-
</select>
|
|
140
|
-
</div>
|
|
141
|
-
|
|
142
|
-
<!-- Message -->
|
|
143
|
-
<div class="field">
|
|
144
|
-
<label for="cron-message">Message</label>
|
|
145
|
-
<textarea
|
|
146
|
-
id="cron-message"
|
|
147
|
-
rows="3"
|
|
148
|
-
.value=${this._message}
|
|
149
|
-
placeholder="Message to send to the agent..."
|
|
150
|
-
@input=${t=>{this._message=t.target.value}}
|
|
151
|
-
></textarea>
|
|
152
|
-
</div>
|
|
153
|
-
|
|
154
|
-
<!-- Session Target -->
|
|
155
|
-
<div class="field">
|
|
156
|
-
<label for="cron-session">Session Target</label>
|
|
157
|
-
<select
|
|
158
|
-
id="cron-session"
|
|
159
|
-
.value=${this._sessionTarget}
|
|
160
|
-
@change=${t=>{this._sessionTarget=t.target.value}}
|
|
161
|
-
>
|
|
162
|
-
<option value="main" ?selected=${this._sessionTarget==="main"}>Main</option>
|
|
163
|
-
<option value="isolated" ?selected=${this._sessionTarget==="isolated"}>Isolated</option>
|
|
164
|
-
</select>
|
|
165
|
-
</div>
|
|
166
|
-
|
|
167
|
-
<!-- Delivery Target -->
|
|
168
|
-
<div class="field">
|
|
169
|
-
<label for="cron-delivery">Delivery</label>
|
|
170
|
-
<select
|
|
171
|
-
id="cron-delivery"
|
|
172
|
-
.value=${this._deliveryMode}
|
|
173
|
-
@change=${t=>{this._deliveryMode=t.target.value}}
|
|
174
|
-
>
|
|
175
|
-
<option value="none" ?selected=${this._deliveryMode==="none"}>None (local only)</option>
|
|
176
|
-
<option value="origin" ?selected=${this._deliveryMode==="origin"}>Origin (captured channel)</option>
|
|
177
|
-
<option value="custom" ?selected=${this._deliveryMode==="custom"}>Custom channel</option>
|
|
178
|
-
</select>
|
|
179
|
-
</div>
|
|
180
|
-
${this._deliveryMode==="origin"&&this.job?.deliveryTarget?r`
|
|
181
|
-
<div class="field">
|
|
182
|
-
<label>Current target</label>
|
|
183
|
-
<span style="font-size:var(--ic-text-sm);color:var(--ic-text-dim)">${this.job.deliveryTarget.channelType??"unknown"}:${this.job.deliveryTarget.channelId}</span>
|
|
184
|
-
</div>
|
|
185
|
-
`:p}
|
|
186
|
-
${this._deliveryMode==="custom"?r`
|
|
187
|
-
<div class="field">
|
|
188
|
-
<label for="cron-delivery-type">Channel Type</label>
|
|
189
|
-
<input
|
|
190
|
-
id="cron-delivery-type"
|
|
191
|
-
type="text"
|
|
192
|
-
.value=${this._deliveryChannelType}
|
|
193
|
-
placeholder="telegram"
|
|
194
|
-
@input=${t=>{this._deliveryChannelType=t.target.value}}
|
|
195
|
-
/>
|
|
196
|
-
</div>
|
|
197
|
-
<div class="field">
|
|
198
|
-
<label for="cron-delivery-id">Channel ID</label>
|
|
199
|
-
<input
|
|
200
|
-
id="cron-delivery-id"
|
|
201
|
-
type="text"
|
|
202
|
-
.value=${this._deliveryChannelId}
|
|
203
|
-
placeholder="-100372..."
|
|
204
|
-
@input=${t=>{this._deliveryChannelId=t.target.value}}
|
|
205
|
-
/>
|
|
206
|
-
</div>
|
|
207
|
-
`:p}
|
|
208
|
-
|
|
209
|
-
<!-- Max Concurrent -->
|
|
210
|
-
<div class="field">
|
|
211
|
-
<label for="cron-max">Max Concurrent</label>
|
|
212
|
-
<input
|
|
213
|
-
id="cron-max"
|
|
214
|
-
type="number"
|
|
215
|
-
min="1"
|
|
216
|
-
.value=${String(this._maxConcurrent)}
|
|
217
|
-
@input=${t=>{const i=parseInt(t.target.value,10);!isNaN(i)&&i>=1&&(this._maxConcurrent=i)}}
|
|
218
|
-
/>
|
|
219
|
-
</div>
|
|
220
|
-
|
|
221
|
-
<!-- Next 5 runs preview -->
|
|
222
|
-
<div class="next-runs">
|
|
223
|
-
<h3>Next 5 runs</h3>
|
|
224
|
-
${this._nextRuns.length>0?r`
|
|
225
|
-
<ul>
|
|
226
|
-
${this._nextRuns.map(t=>r`<li>${t}</li>`)}
|
|
227
|
-
</ul>
|
|
228
|
-
`:r`<p class="empty-msg">Enter a valid schedule</p>`}
|
|
229
|
-
</div>
|
|
230
|
-
</div>
|
|
231
|
-
|
|
232
|
-
<!-- Buttons -->
|
|
233
|
-
<div class="button-row">
|
|
234
|
-
<button class="btn btn-cancel" @click=${this._onCancel}>Cancel</button>
|
|
235
|
-
<button class="btn btn-save" @click=${this._onSave}>Save</button>
|
|
236
|
-
</div>
|
|
237
|
-
</div>
|
|
238
|
-
`}};h.styles=[C,E,A`
|
|
1
|
+
import{c as e,f as t,h as n,l as r,n as i,o as a,r as o,s,t as c,u as l}from"./decorate-BvWYovGE.js";import{a as u,i as d}from"./index-FLPhHz8p.js";import"./ic-tag-CvMVQFRR.js";import"./ic-relative-time-B3UAnTqg.js";import"./ic-icon-BGNCCPpZ.js";import"./ic-empty-state-CM3Wbj2f.js";import"./ic-tabs-yBjkWKJH.js";function f(e,t,n){let r=new Set;for(let i of e.split(`,`)){let e=i.trim(),a=e.match(/^(\*|(\d+)-(\d+))\/(\d+)$/);if(a){let e=parseInt(a[4],10);if(e<=0)return null;let i=t,o=n;if(a[2]!==void 0&&a[3]!==void 0&&(i=parseInt(a[2],10),o=parseInt(a[3],10)),i<t||o>n||i>o)return null;for(let t=i;t<=o;t+=e)r.add(t);continue}if(e===`*`){for(let e=t;e<=n;e++)r.add(e);continue}let o=e.match(/^(\d+)-(\d+)$/);if(o){let e=parseInt(o[1],10),i=parseInt(o[2],10);if(e<t||i>n||e>i)return null;for(let t=e;t<=i;t++)r.add(t);continue}if(/^\d+$/.test(e)){let i=parseInt(e,10);if(i<t||i>n)return null;r.add(i);continue}return null}return r.size>0?Array.from(r).sort((e,t)=>e-t):null}function p(e,t,n,r){let i=e.trim().split(/\s+/);if(i.length!==5)return[];let a=f(i[0],0,59),o=f(i[1],0,23),s=f(i[2],1,31),c=f(i[3],1,12),l=f(i[4],0,6);if(!a||!o||!s||!c||!l)return[];let u=new Set(a),d=new Set(o),p=new Set(s),m=new Set(c),h=new Set(l),g=[],_=r.getTime()+366*24*60*60*1e3,v=new Date(r);for(v.setSeconds(0,0),v.setTime(v.getTime()+6e4);v.getTime()<=_&&g.length<n;){let e=v.getMinutes(),t=v.getHours(),n=v.getDate(),r=v.getMonth()+1,i=v.getDay();u.has(e)&&d.has(t)&&p.has(n)&&m.has(r)&&h.has(i)&&g.push(new Date(v)),v.setTime(v.getTime()+6e4)}return g}function m(e,t,n){if(e<=0||!Number.isFinite(e))return[];let r=[],i=n.getTime();for(let n=0;n<t;n++)i+=e,r.push(new Date(i));return r}function h(e,t){let n=new Date(e);if(isNaN(n.getTime()))return[];let r=t??new Date;return n.getTime()>r.getTime()?[n]:[]}function g(e,t){try{return new Intl.DateTimeFormat(`en-US`,{weekday:`short`,year:`numeric`,month:`2-digit`,day:`2-digit`,hour:`2-digit`,minute:`2-digit`,timeZone:t||void 0,timeZoneName:`short`,hour12:!1}).format(e)}catch{return e.toISOString()}}var _=[`UTC`,`America/New_York`,`America/Chicago`,`America/Denver`,`America/Los_Angeles`,`Europe/London`,`Europe/Berlin`,`Asia/Tokyo`,`Asia/Shanghai`,`Australia/Sydney`],v=class extends r{constructor(...e){super(...e),this.job=null,this.mode=`create`,this.agents=[],this._id=``,this._name=``,this._scheduleKind=`cron`,this._cronExpr=``,this._timezone=`UTC`,this._everyMs=6e4,this._atDateTime=``,this._enabled=!0,this._agentId=``,this._message=``,this._maxConcurrent=1,this._sessionTarget=`main`,this._deliveryMode=`none`,this._deliveryChannelType=``,this._deliveryChannelId=``,this._nextRuns=[],this._previewTimer=null}static{this.styles=[o,i,n`
|
|
239
2
|
:host {
|
|
240
3
|
display: block;
|
|
241
4
|
}
|
|
@@ -413,264 +176,244 @@ import{s as C,f as E,i as A,n as f,r as o,a as M,A as p,b as r,t as S,S as H,I}f
|
|
|
413
176
|
.btn-save:hover {
|
|
414
177
|
filter: brightness(1.1);
|
|
415
178
|
}
|
|
416
|
-
`];u([f({type:Object})],h.prototype,"job",2);u([f()],h.prototype,"mode",2);u([f({type:Array})],h.prototype,"agents",2);u([o()],h.prototype,"_id",2);u([o()],h.prototype,"_name",2);u([o()],h.prototype,"_scheduleKind",2);u([o()],h.prototype,"_cronExpr",2);u([o()],h.prototype,"_timezone",2);u([o()],h.prototype,"_everyMs",2);u([o()],h.prototype,"_atDateTime",2);u([o()],h.prototype,"_enabled",2);u([o()],h.prototype,"_agentId",2);u([o()],h.prototype,"_message",2);u([o()],h.prototype,"_maxConcurrent",2);u([o()],h.prototype,"_sessionTarget",2);u([o()],h.prototype,"_deliveryMode",2);u([o()],h.prototype,"_deliveryChannelType",2);u([o()],h.prototype,"_deliveryChannelId",2);u([o()],h.prototype,"_nextRuns",2);h=u([S("ic-cron-editor")],h);var q=Object.defineProperty,Q=Object.getOwnPropertyDescriptor,d=(e,t,i,a)=>{for(var s=a>1?void 0:a?Q(t,i):t,n=e.length-1,l;n>=0;n--)(l=e[n])&&(s=(a?l(t,i,s):l(s))||s);return a&&s&&q(t,i,s),s};const W=[{id:"cron-jobs",label:"Cron Jobs"},{id:"heartbeat",label:"Heartbeat"},{id:"extracted-tasks",label:"Extracted Tasks"}];function X(e){switch(e.kind){case"cron":return e.expr??"cron";case"every":{const t=e.everyMs??0;return t>=36e5?`Every ${Math.round(t/36e5)}h`:t>=6e4?`Every ${Math.round(t/6e4)}m`:`Every ${Math.round(t/1e3)}s`}case"at":return e.at?new Date(e.at).toLocaleString():"one-shot";default:return e.kind}}function T(e){return e<1e3?`${e}ms`:`${(e/1e3).toFixed(1)}s`}function w(e){return e<=0?"--":new Date(e).toLocaleTimeString(void 0,{hour:"2-digit",minute:"2-digit",second:"2-digit"})}function k(e){return e>=36e5?`Every ${Math.round(e/36e5)}h`:e>=6e4?`Every ${Math.round(e/6e4)}m`:`Every ${Math.round(e/1e3)}s`}function ee(e){return{id:e.id,name:e.name,agentId:e.agentId,schedule:{kind:e.schedule.kind,expr:e.schedule.expr,tz:e.schedule.tz,everyMs:e.schedule.everyMs,at:e.schedule.at},message:e.payload?.message??e.payload?.text??"",enabled:e.enabled,maxConcurrent:1,sessionTarget:e.sessionTarget??"main",deliveryTarget:e.deliveryTarget}}let c=class extends M{constructor(){super(...arguments),this.rpcClient=null,this.routeParams={},this.eventDispatcher=null,this._jobs=[],this._loading=!0,this._error="",this._activeTab="cron-jobs",this._executions=[],this._heartbeats=[],this._heartbeatEnabled=!1,this._heartbeatIntervalMs=3e5,this._extractedTasks=[],this._editorOpen=!1,this._editingJob=null,this._editorError="",this._configAgentIds=[],this._selectedAgentId="",this._cronEnabled=null,this._cronJobCount=0,this._heartbeatAgents=[],this._heartbeatAlerts=[],this._heartbeatDeliveries=[],this._rpcStatusUnsubs=[],this._sse=null,this._jobsLoaded=!1}connectedCallback(){super.connectedCallback(),this._initSse()}disconnectedCallback(){super.disconnectedCallback();for(const e of this._rpcStatusUnsubs)e();this._rpcStatusUnsubs=[]}updated(e){if(e.has("rpcClient")&&this.rpcClient&&!this._jobsLoaded){this._loadAll();const t=this.rpcClient.onStatusChange(i=>{i==="connected"&&!this._jobsLoaded&&(this._error="",this._loadAll())});this._rpcStatusUnsubs.push(t)}if((e.has("routeParams")||e.has("_jobs"))&&this.routeParams.jobId&&this._jobsLoaded){const t=this._jobs.find(i=>i.id===this.routeParams.jobId);t&&!this._editorOpen&&(this._editingJob=t,this._editorOpen=!0,this._editorError="")}e.has("eventDispatcher")&&this.eventDispatcher&&!this._sse&&this._initSse()}_initSse(){!this.eventDispatcher||this._sse||(this._sse=new H(this,this.eventDispatcher,{"scheduler:job_started":e=>{const t=e,i={jobId:t.jobId,jobName:t.jobName??t.jobId,agentId:t.agentId??"",timestamp:t.timestamp??Date.now(),success:"pending"};this._executions=[i,...this._executions].slice(0,50)},"scheduler:job_completed":e=>{const t=e,i=this._executions.findIndex(a=>a.jobId===t.jobId&&a.success==="pending");if(i>=0){const a=[...this._executions];a[i]={...a[i],success:t.success??!0,durationMs:t.durationMs,error:t.error,timestamp:t.timestamp??a[i].timestamp},this._executions=a}else{const a={jobId:t.jobId,jobName:t.jobName??t.jobId,agentId:t.agentId??"",timestamp:t.timestamp??Date.now(),success:t.success??!0,durationMs:t.durationMs,error:t.error};this._executions=[a,...this._executions].slice(0,50)}},"scheduler:heartbeat_delivered":e=>{const t=e,i={agentId:t.agentId??"",channelType:t.channelType??"",outcome:t.outcome??"delivered",level:t.level??"ok",reason:t.reason,durationMs:t.durationMs??0,timestamp:t.timestamp??Date.now()};this._heartbeatDeliveries=[i,...this._heartbeatDeliveries].slice(0,50)},"scheduler:heartbeat_alert":e=>{const t=e,i={agentId:t.agentId??"",classification:t.classification??"transient",reason:t.reason??"",consecutiveErrors:t.consecutiveErrors??0,backoffMs:t.backoffMs??0,timestamp:t.timestamp??Date.now()};this._heartbeatAlerts=[i,...this._heartbeatAlerts].slice(0,50),this._updateAgentFromAlert(i)},"scheduler:task_extracted":e=>{const t=e,i={taskId:t.taskId??`task-${Date.now()}`,title:t.title??"Untitled task",priority:t.priority??"medium",confidence:t.confidence??0,sessionKey:t.sessionKey??"",timestamp:t.timestamp??Date.now(),status:"pending"};this._extractedTasks=[i,...this._extractedTasks]}}))}_loadAll(){this._loadAgentIds().then(()=>{Promise.allSettled([this._loadJobs(),this._loadCronStatus()])}),Promise.allSettled([this._loadHeartbeatConfig(),this._loadHeartbeatStates()])}async _loadJobs(){if(!this.rpcClient){this._loading=!1;return}try{const e=await this.rpcClient.call("cron.list",{_agentId:this._selectedAgentId||void 0});this._jobs=Array.isArray(e)?e:e.jobs??[],this._jobsLoaded=!0}catch(e){const t=e instanceof Error?e.message:"Failed to load jobs";t.includes("not enabled")?(this._cronEnabled=!1,this._error=""):this._error=t}finally{this._loading=!1}}async _loadHeartbeatConfig(){if(this.rpcClient)try{const t=(await this.rpcClient.call("config.read",{section:"scheduler"}))?.heartbeat;t&&(this._heartbeatEnabled=t.enabled??!1,this._heartbeatIntervalMs=t.intervalMs??3e5)}catch{}}async _loadAgentIds(){if(this.rpcClient){try{const e=await this.rpcClient.call("config.read",{section:"agents"});e&&typeof e=="object"&&(this._configAgentIds=Object.keys(e))}catch{}this._configAgentIds.length>0&&!this._selectedAgentId&&(this._selectedAgentId=this._configAgentIds[0])}}async _loadCronStatus(){if(!(!this.rpcClient||!this._selectedAgentId))try{const e=await this.rpcClient.call("cron.status",{_agentId:this._selectedAgentId});this._cronEnabled=e?.running??null,this._cronJobCount=e?.jobCount??0}catch{this._cronEnabled=null}}async _loadHeartbeatStates(){if(this.rpcClient)try{const e=await this.rpcClient.call("heartbeat.states",{});this._heartbeatAgents=e?.agents??[]}catch{}}_updateAgentFromAlert(e){const t=this._heartbeatAgents.findIndex(a=>a.agentId===e.agentId);if(t<0)return;const i=[...this._heartbeatAgents];i[t]={...i[t],consecutiveErrors:e.consecutiveErrors,lastAlertMs:e.timestamp,lastErrorKind:e.classification},this._heartbeatAgents=i}_onAgentSelect(e){e!==this._selectedAgentId&&(this._selectedAgentId=e,this._jobs=[],this._executions=[],this._error="",this._loading=!0,this._jobsLoaded=!1,this._loadJobs(),this._loadCronStatus())}async _handleEditorSave(e){if(!this.rpcClient)return;const t=e.detail;if(this._editorError="",this._editingJob){const i=[...this._jobs],a=this._jobs.findIndex(s=>s.id===this._editingJob.id);if(a>=0){const s={...this._jobs[a],name:t.name,agentId:t.agentId,schedule:t.schedule,payload:{kind:"agent_turn",message:t.message},sessionTarget:t.sessionTarget,enabled:t.enabled,deliveryTarget:t.deliveryTarget},n=[...this._jobs];n[a]=s,this._jobs=n}try{await this.rpcClient.call("cron.update",{jobId:this._editingJob.id,_agentId:this._selectedAgentId,...t}),this._editorOpen=!1,this._editingJob=null}catch(s){this._jobs=i,this._editorError=s instanceof Error?s.message:"Failed to update job"}}else{const i={id:t.id,name:t.name,agentId:t.agentId,schedule:t.schedule,payload:{kind:"agent_turn",message:t.message},sessionTarget:t.sessionTarget,enabled:t.enabled,consecutiveErrors:0,createdAtMs:Date.now(),deliveryTarget:t.deliveryTarget};this._jobs=[...this._jobs,i];try{const a=await this.rpcClient.call("cron.add",{...t,_agentId:this._selectedAgentId,_deliveryTarget:t.deliveryTarget});if(a?.jobId&&a.jobId!==i.id){const s=this._jobs.findIndex(n=>n.id===i.id);if(s>=0){const n=[...this._jobs];n[s]={...n[s],id:a.jobId},this._jobs=n}}this._editorOpen=!1,this._editingJob=null}catch(a){this._jobs=this._jobs.filter(s=>s.id!==i.id),this._editorError=a instanceof Error?a.message:"Failed to create job"}}}async _handleDeleteJob(e){if(!this.rpcClient||!window.confirm("Delete this job?"))return;const t=[...this._jobs];this._jobs=this._jobs.filter(i=>i.id!==e);try{await this.rpcClient.call("cron.remove",{jobId:e,_agentId:this._selectedAgentId})}catch(i){this._jobs=t,this._error=i instanceof Error?i.message:"Failed to delete job"}}async _handleToggleHeartbeat(){if(!this.rpcClient)return;const e=!this._heartbeatEnabled;this._heartbeatEnabled=e;try{await this.rpcClient.call("config.set",{section:"scheduler",path:"heartbeat.enabled",value:e})}catch(t){this._heartbeatEnabled=!e,this._error=t instanceof Error?t.message:"Failed to toggle heartbeat"}}_handleCompleteTask(e){this._extractedTasks=this._extractedTasks.map(t=>t.taskId===e?{...t,status:"completed"}:t)}_handleDismissTask(e){this._extractedTasks=this._extractedTasks.map(t=>t.taskId===e?{...t,status:"dismissed"}:t)}async _handleRunJob(e){if(this.rpcClient)try{await this.rpcClient.call("cron.run",{jobName:e,_agentId:this._selectedAgentId}),I.show("Job triggered","success")}catch(t){this._error=t instanceof Error?t.message:"Failed to run job"}}async _handleTriggerHeartbeat(e){if(this.rpcClient)try{await this.rpcClient.call("heartbeat.trigger",{agentId:e}),I.show("Heartbeat triggered for "+e,"success")}catch(t){this._error=t instanceof Error?t.message:"Failed to trigger heartbeat"}}_openCreateEditor(){this._editingJob=null,this._editorOpen=!0,this._editorError=""}_openEditEditor(e){this._editingJob=e,this._editorOpen=!0,this._editorError=""}_closeEditor(){this._editorOpen=!1,this._editingJob=null,this._editorError=""}_closeEditorOnBackdrop(e){e.target===e.currentTarget&&this._closeEditor()}_onTabChange(e){this._activeTab=e.detail}get _editingJobInput(){return this._editingJob?ee(this._editingJob):null}get _agentIds(){const e=new Set([...this._configAgentIds,...this._jobs.map(i=>i.agentId)]),t=Array.from(e);if(this._selectedAgentId){const i=t.indexOf(this._selectedAgentId);i>0&&(t.splice(i,1),t.unshift(this._selectedAgentId))}return t}_renderAgentSelector(){return this._configAgentIds.length<=1&&this._jobs.length===0?p:r`
|
|
417
|
-
<div class="
|
|
418
|
-
<
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
</div>
|
|
433
|
-
`}_renderJobRow(e){const t=e.enabled?e.consecutiveErrors>0?"status-dot status-dot--error":"status-dot status-dot--active":"status-dot status-dot--inactive";return r`
|
|
434
|
-
<div class="grid-row" role="row" @click=${()=>this._openEditEditor(e)}>
|
|
435
|
-
<div class="cell" role="cell">${e.name||e.id}</div>
|
|
436
|
-
<div class="cell" role="cell">${X(e.schedule)}</div>
|
|
437
|
-
<div class="cell" role="cell">
|
|
438
|
-
${e.lastRunAtMs&&e.lastRunAtMs>0?r`<ic-relative-time .timestamp=${e.lastRunAtMs}></ic-relative-time>`:"Never"}
|
|
439
|
-
</div>
|
|
440
|
-
<div class="cell" role="cell">
|
|
441
|
-
${e.enabled&&e.nextRunAtMs&&e.nextRunAtMs>0?r`<ic-relative-time .timestamp=${e.nextRunAtMs}></ic-relative-time>`:"(off)"}
|
|
442
|
-
</div>
|
|
443
|
-
<div class="cell" role="cell">
|
|
444
|
-
<span class="status-info">
|
|
445
|
-
<span class=${t}></span>
|
|
446
|
-
${e.consecutiveErrors>0?r`<span class="error-count">${e.consecutiveErrors} errors</span>`:p}
|
|
447
|
-
</span>
|
|
448
|
-
</div>
|
|
449
|
-
<div class="cell" role="cell">
|
|
450
|
-
${e.deliveryTarget?r`<ic-tag variant="info">${e.deliveryTarget.channelType??"channel"}</ic-tag>`:r`<span style="color:var(--ic-text-dim)">local</span>`}
|
|
451
|
-
</div>
|
|
452
|
-
<div class="cell" role="cell">
|
|
453
|
-
<div class="action-group">
|
|
454
|
-
<button
|
|
455
|
-
class="btn-run"
|
|
456
|
-
?disabled=${!e.enabled}
|
|
457
|
-
title=${e.enabled?"Execute this job now":"Enable job to run"}
|
|
458
|
-
@click=${i=>{i.stopPropagation(),this._handleRunJob(e.name||e.id)}}
|
|
459
|
-
>Run</button>
|
|
460
|
-
<button
|
|
461
|
-
class="btn-edit"
|
|
462
|
-
title="Edit this job"
|
|
463
|
-
@click=${i=>{i.stopPropagation(),this._openEditEditor(e)}}
|
|
464
|
-
>Edit</button>
|
|
465
|
-
<button
|
|
466
|
-
class="btn-delete"
|
|
467
|
-
@click=${i=>{i.stopPropagation(),this._handleDeleteJob(e.id)}}
|
|
468
|
-
>Delete</button>
|
|
179
|
+
`]}willUpdate(e){e.has(`job`)&&this.job&&this._populateFromJob(this.job),e.has(`agents`)&&this.agents.length>0&&!this._agentId&&(this._agentId=this.agents[0])}updated(e){[`_scheduleKind`,`_cronExpr`,`_timezone`,`_everyMs`,`_atDateTime`].some(t=>e.has(t))&&this._schedulePreviewDebounced()}disconnectedCallback(){super.disconnectedCallback(),this._previewTimer!==null&&(clearTimeout(this._previewTimer),this._previewTimer=null)}_populateFromJob(e){this._id=e.id,this._name=e.name,this._agentId=e.agentId,this._message=e.message,this._enabled=e.enabled,this._maxConcurrent=e.maxConcurrent,this._sessionTarget=e.sessionTarget,this._scheduleKind=e.schedule.kind,this._cronExpr=e.schedule.expr??``,this._timezone=e.schedule.tz??`UTC`,this._everyMs=e.schedule.everyMs??6e4,this._atDateTime=e.schedule.at??``,e.deliveryTarget?(this._deliveryMode=`origin`,this._deliveryChannelType=e.deliveryTarget.channelType??``,this._deliveryChannelId=e.deliveryTarget.channelId??``):(this._deliveryMode=`none`,this._deliveryChannelType=``,this._deliveryChannelId=``)}_schedulePreviewDebounced(){this._previewTimer!==null&&clearTimeout(this._previewTimer),this._previewTimer=setTimeout(()=>{this._computePreview()},500)}_computePreview(){let e=new Date,t=[];switch(this._scheduleKind){case`cron`:t=p(this._cronExpr,this._timezone,5,e);break;case`every`:t=m(this._everyMs,5,e);break;case`at`:t=h(this._atDateTime,e);break}this._nextRuns=t.map(e=>g(e,this._scheduleKind===`cron`?this._timezone:void 0))}_assembleJob(){let e={kind:this._scheduleKind};switch(this._scheduleKind){case`cron`:e.expr=this._cronExpr,e.tz=this._timezone;break;case`every`:e.everyMs=this._everyMs;break;case`at`:e.at=this._atDateTime;break}let t;return this._deliveryMode===`origin`&&this.job?.deliveryTarget?t=this.job.deliveryTarget:this._deliveryMode===`custom`&&(t={channelId:this._deliveryChannelId,channelType:this._deliveryChannelType,userId:`system`,tenantId:`default`}),{id:this._id,name:this._name,agentId:this._agentId,schedule:e,message:this._message,enabled:this._enabled,maxConcurrent:this._maxConcurrent,sessionTarget:this._sessionTarget,deliveryTarget:t}}_onSave(){this.dispatchEvent(new CustomEvent(`save`,{detail:this._assembleJob()}))}_onCancel(){this.dispatchEvent(new CustomEvent(`cancel`))}render(){return t`
|
|
180
|
+
<div class="editor-card">
|
|
181
|
+
<h2>${this.mode===`edit`?`Edit Cron Job`:`New Cron Job`}</h2>
|
|
182
|
+
|
|
183
|
+
<div class="form-grid">
|
|
184
|
+
<!-- ID -->
|
|
185
|
+
<div class="field">
|
|
186
|
+
<label for="cron-id">ID</label>
|
|
187
|
+
<input
|
|
188
|
+
id="cron-id"
|
|
189
|
+
type="text"
|
|
190
|
+
.value=${this._id}
|
|
191
|
+
?disabled=${this.mode===`edit`}
|
|
192
|
+
placeholder="e.g. daily-report"
|
|
193
|
+
@input=${e=>{this._id=e.target.value}}
|
|
194
|
+
/>
|
|
469
195
|
</div>
|
|
470
|
-
</div>
|
|
471
|
-
</div>
|
|
472
|
-
`}_renderCronJobsTab(){return r`
|
|
473
|
-
${this._renderAgentSelector()}
|
|
474
|
-
${this._renderAgentStatus()}
|
|
475
|
-
${this._loading?r`<ic-skeleton-view variant="list"></ic-skeleton-view>`:this._jobs.length===0?r`
|
|
476
|
-
<ic-empty-state
|
|
477
|
-
icon="clock"
|
|
478
|
-
message="No scheduled jobs"
|
|
479
|
-
description="Configure cron jobs or heartbeat checks for your agents."
|
|
480
|
-
>
|
|
481
|
-
<button class="cta-btn" style="background:var(--ic-accent);color:#fff;border:none;border-radius:var(--ic-radius-md);padding:0.5rem 1rem;cursor:pointer;font-family:inherit;font-size:var(--ic-text-sm)" @click=${()=>{window.location.hash="#/config"}}>Open Settings</button>
|
|
482
|
-
</ic-empty-state>
|
|
483
|
-
`:r`
|
|
484
|
-
<div class="job-grid" role="table">
|
|
485
|
-
<div class="grid-header" role="row">
|
|
486
|
-
<div class="cell" role="columnheader">Name</div>
|
|
487
|
-
<div class="cell" role="columnheader">Schedule</div>
|
|
488
|
-
<div class="cell" role="columnheader">Last Run</div>
|
|
489
|
-
<div class="cell" role="columnheader">Next Run</div>
|
|
490
|
-
<div class="cell" role="columnheader">Status</div>
|
|
491
|
-
<div class="cell" role="columnheader">Deliver</div>
|
|
492
|
-
<div class="cell" role="columnheader">Actions</div>
|
|
493
|
-
</div>
|
|
494
|
-
${this._jobs.map(e=>this._renderJobRow(e))}
|
|
495
|
-
</div>
|
|
496
196
|
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
<span class="exec-job">${e.jobName||e.jobId}</span>
|
|
508
|
-
<span class=${e.success==="pending"?"exec-result--pending":e.success?"exec-result--success":"exec-result--fail"}>${e.success==="pending"?"...":e.success?"OK":"FAIL"}</span>
|
|
509
|
-
${e.durationMs!=null?r`<span class="exec-duration">(${T(e.durationMs)})</span>`:p}
|
|
510
|
-
${e.error?r`<span class="exec-error">${e.error}</span>`:p}
|
|
511
|
-
</div>
|
|
512
|
-
`)}
|
|
513
|
-
</div>
|
|
514
|
-
`}
|
|
515
|
-
</div>
|
|
516
|
-
`}_renderHeartbeatTab(){if(this._heartbeatAgents.length===0)return this._heartbeatEnabled||this._heartbeats.length>0?r`
|
|
517
|
-
<div class="hb-summary-bar">
|
|
518
|
-
<span>Global heartbeat: ${this._heartbeatEnabled?"enabled":"disabled"}</span>
|
|
519
|
-
<span>Interval: ${k(this._heartbeatIntervalMs)}</span>
|
|
197
|
+
<!-- Name -->
|
|
198
|
+
<div class="field">
|
|
199
|
+
<label for="cron-name">Name</label>
|
|
200
|
+
<input
|
|
201
|
+
id="cron-name"
|
|
202
|
+
type="text"
|
|
203
|
+
.value=${this._name}
|
|
204
|
+
placeholder="Human-readable name"
|
|
205
|
+
@input=${e=>{this._name=e.target.value}}
|
|
206
|
+
/>
|
|
520
207
|
</div>
|
|
521
|
-
<ic-empty-state
|
|
522
|
-
icon="scheduler"
|
|
523
|
-
message="No heartbeat agents"
|
|
524
|
-
description="Configure heartbeat in agent settings to see per-agent status."
|
|
525
|
-
></ic-empty-state>
|
|
526
|
-
`:r`
|
|
527
|
-
<ic-empty-state
|
|
528
|
-
icon="scheduler"
|
|
529
|
-
message="No heartbeat agents"
|
|
530
|
-
description="Configure heartbeat in agent settings to see per-agent status."
|
|
531
|
-
></ic-empty-state>
|
|
532
|
-
`;const e=Date.now(),t=this._heartbeatAgents.filter(s=>s.enabled).length,i=this._heartbeatAgents.filter(s=>s.backoffUntilMs>e).length,a=this._heartbeatAgents.filter(s=>s.consecutiveErrors>0).length;return r`
|
|
533
|
-
<div class="hb-summary-bar">
|
|
534
|
-
<span>${t} agent${t!==1?"s":""} enabled</span>
|
|
535
|
-
${i>0?r`<span class="alerts-highlight">${i} in backoff</span>`:p}
|
|
536
|
-
${a>0?r`<span class="alerts-highlight">${a} with errors</span>`:p}
|
|
537
|
-
</div>
|
|
538
208
|
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
209
|
+
<!-- Schedule Kind -->
|
|
210
|
+
<div class="field">
|
|
211
|
+
<label>Schedule Kind</label>
|
|
212
|
+
<div class="kind-group">
|
|
213
|
+
<label class="kind-option">
|
|
214
|
+
<input
|
|
215
|
+
type="radio"
|
|
216
|
+
name="schedule-kind"
|
|
217
|
+
value="cron"
|
|
218
|
+
.checked=${this._scheduleKind===`cron`}
|
|
219
|
+
@change=${()=>{this._scheduleKind=`cron`}}
|
|
220
|
+
/>
|
|
221
|
+
<span>Cron</span>
|
|
222
|
+
</label>
|
|
223
|
+
<label class="kind-option">
|
|
224
|
+
<input
|
|
225
|
+
type="radio"
|
|
226
|
+
name="schedule-kind"
|
|
227
|
+
value="every"
|
|
228
|
+
.checked=${this._scheduleKind===`every`}
|
|
229
|
+
@change=${()=>{this._scheduleKind=`every`}}
|
|
230
|
+
/>
|
|
231
|
+
<span>Interval</span>
|
|
232
|
+
</label>
|
|
233
|
+
<label class="kind-option">
|
|
234
|
+
<input
|
|
235
|
+
type="radio"
|
|
236
|
+
name="schedule-kind"
|
|
237
|
+
value="at"
|
|
238
|
+
.checked=${this._scheduleKind===`at`}
|
|
239
|
+
@change=${()=>{this._scheduleKind=`at`}}
|
|
240
|
+
/>
|
|
241
|
+
<span>One-shot</span>
|
|
242
|
+
</label>
|
|
243
|
+
</div>
|
|
244
|
+
</div>
|
|
542
245
|
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
<
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
</
|
|
246
|
+
<!-- Cron fields -->
|
|
247
|
+
${this._scheduleKind===`cron`?t`
|
|
248
|
+
<div class="field">
|
|
249
|
+
<label for="cron-expr">Schedule Expression</label>
|
|
250
|
+
<input
|
|
251
|
+
id="cron-expr"
|
|
252
|
+
type="text"
|
|
253
|
+
.value=${this._cronExpr}
|
|
254
|
+
placeholder="0 9 * * *"
|
|
255
|
+
@input=${e=>{this._cronExpr=e.target.value}}
|
|
256
|
+
/>
|
|
257
|
+
</div>
|
|
258
|
+
<div class="field">
|
|
259
|
+
<label for="cron-tz">Timezone</label>
|
|
260
|
+
<select
|
|
261
|
+
id="cron-tz"
|
|
262
|
+
.value=${this._timezone}
|
|
263
|
+
@change=${e=>{this._timezone=e.target.value}}
|
|
264
|
+
>
|
|
265
|
+
${_.map(e=>t`<option value=${e} ?selected=${e===this._timezone}>${e}</option>`)}
|
|
266
|
+
</select>
|
|
557
267
|
</div>
|
|
558
|
-
`:
|
|
268
|
+
`:l}
|
|
559
269
|
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
<
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
</div>
|
|
572
|
-
`)}
|
|
573
|
-
</div>
|
|
270
|
+
<!-- Interval field -->
|
|
271
|
+
${this._scheduleKind===`every`?t`
|
|
272
|
+
<div class="field">
|
|
273
|
+
<label for="cron-interval">Interval (minutes)</label>
|
|
274
|
+
<input
|
|
275
|
+
id="cron-interval"
|
|
276
|
+
type="number"
|
|
277
|
+
min="1"
|
|
278
|
+
.value=${String(Math.round(this._everyMs/6e4))}
|
|
279
|
+
@input=${e=>{let t=parseInt(e.target.value,10);!isNaN(t)&&t>0&&(this._everyMs=t*6e4)}}
|
|
280
|
+
/>
|
|
574
281
|
</div>
|
|
575
|
-
`:
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
<
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
class="
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
</div>
|
|
625
|
-
`}_renderTaskRow(e){const t=`priority-tag priority-tag--${e.priority}`;return r`
|
|
626
|
-
<div class="grid-row" role="row">
|
|
627
|
-
<div class="cell" role="cell">${e.title}</div>
|
|
628
|
-
<div class="cell" role="cell">
|
|
629
|
-
<span class=${t}>${e.priority}</span>
|
|
630
|
-
</div>
|
|
631
|
-
<div class="cell" role="cell">${e.status}</div>
|
|
632
|
-
<div class="cell" role="cell">
|
|
633
|
-
${e.status==="pending"?r`
|
|
634
|
-
<div class="task-actions">
|
|
635
|
-
<button class="btn-sm btn-complete" @click=${()=>this._handleCompleteTask(e.taskId)}>Complete</button>
|
|
636
|
-
<button class="btn-sm btn-dismiss" @click=${()=>this._handleDismissTask(e.taskId)}>Dismiss</button>
|
|
637
|
-
</div>
|
|
638
|
-
`:p}
|
|
639
|
-
</div>
|
|
640
|
-
</div>
|
|
641
|
-
`}_renderEditorOverlay(){return this._editorOpen?r`
|
|
642
|
-
<div class="editor-overlay" @click=${this._closeEditorOnBackdrop}>
|
|
643
|
-
<div class="editor-panel" @click=${e=>e.stopPropagation()}>
|
|
644
|
-
<ic-cron-editor
|
|
645
|
-
.job=${this._editingJobInput}
|
|
646
|
-
.mode=${this._editingJob?"edit":"create"}
|
|
647
|
-
.agents=${this._agentIds}
|
|
648
|
-
@save=${this._handleEditorSave}
|
|
649
|
-
@cancel=${()=>this._closeEditor()}
|
|
650
|
-
></ic-cron-editor>
|
|
651
|
-
${this._editorError?r`<div class="editor-error">${this._editorError}</div>`:p}
|
|
652
|
-
</div>
|
|
653
|
-
</div>
|
|
654
|
-
`:p}render(){return r`
|
|
655
|
-
<div class="scheduler-header">
|
|
656
|
-
<h2>Scheduler</h2>
|
|
657
|
-
<button class="btn-primary" @click=${()=>this._openCreateEditor()}>+ New Job</button>
|
|
658
|
-
</div>
|
|
282
|
+
`:l}
|
|
283
|
+
|
|
284
|
+
<!-- One-shot field -->
|
|
285
|
+
${this._scheduleKind===`at`?t`
|
|
286
|
+
<div class="field">
|
|
287
|
+
<label for="cron-at">Run At</label>
|
|
288
|
+
<input
|
|
289
|
+
id="cron-at"
|
|
290
|
+
type="datetime-local"
|
|
291
|
+
.value=${this._atDateTime}
|
|
292
|
+
@input=${e=>{this._atDateTime=e.target.value}}
|
|
293
|
+
/>
|
|
294
|
+
</div>
|
|
295
|
+
`:l}
|
|
296
|
+
|
|
297
|
+
<!-- Enabled -->
|
|
298
|
+
<div class="field checkbox-field">
|
|
299
|
+
<input
|
|
300
|
+
id="cron-enabled"
|
|
301
|
+
type="checkbox"
|
|
302
|
+
.checked=${this._enabled}
|
|
303
|
+
@change=${e=>{this._enabled=e.target.checked}}
|
|
304
|
+
/>
|
|
305
|
+
<label for="cron-enabled">Enabled</label>
|
|
306
|
+
</div>
|
|
307
|
+
|
|
308
|
+
<!-- Agent -->
|
|
309
|
+
<div class="field">
|
|
310
|
+
<label for="cron-agent">Agent</label>
|
|
311
|
+
<select
|
|
312
|
+
id="cron-agent"
|
|
313
|
+
.value=${this._agentId}
|
|
314
|
+
@change=${e=>{this._agentId=e.target.value}}
|
|
315
|
+
>
|
|
316
|
+
${this.agents.length===0?t`<option value="">No agents available</option>`:this.agents.map(e=>t`<option value=${e} ?selected=${e===this._agentId}>${e}</option>`)}
|
|
317
|
+
</select>
|
|
318
|
+
</div>
|
|
319
|
+
|
|
320
|
+
<!-- Message -->
|
|
321
|
+
<div class="field">
|
|
322
|
+
<label for="cron-message">Message</label>
|
|
323
|
+
<textarea
|
|
324
|
+
id="cron-message"
|
|
325
|
+
rows="3"
|
|
326
|
+
.value=${this._message}
|
|
327
|
+
placeholder="Message to send to the agent..."
|
|
328
|
+
@input=${e=>{this._message=e.target.value}}
|
|
329
|
+
></textarea>
|
|
330
|
+
</div>
|
|
659
331
|
|
|
660
|
-
|
|
332
|
+
<!-- Session Target -->
|
|
333
|
+
<div class="field">
|
|
334
|
+
<label for="cron-session">Session Target</label>
|
|
335
|
+
<select
|
|
336
|
+
id="cron-session"
|
|
337
|
+
.value=${this._sessionTarget}
|
|
338
|
+
@change=${e=>{this._sessionTarget=e.target.value}}
|
|
339
|
+
>
|
|
340
|
+
<option value="main" ?selected=${this._sessionTarget===`main`}>Main</option>
|
|
341
|
+
<option value="isolated" ?selected=${this._sessionTarget===`isolated`}>Isolated</option>
|
|
342
|
+
</select>
|
|
343
|
+
</div>
|
|
661
344
|
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
345
|
+
<!-- Delivery Target -->
|
|
346
|
+
<div class="field">
|
|
347
|
+
<label for="cron-delivery">Delivery</label>
|
|
348
|
+
<select
|
|
349
|
+
id="cron-delivery"
|
|
350
|
+
.value=${this._deliveryMode}
|
|
351
|
+
@change=${e=>{this._deliveryMode=e.target.value}}
|
|
352
|
+
>
|
|
353
|
+
<option value="none" ?selected=${this._deliveryMode===`none`}>None (local only)</option>
|
|
354
|
+
<option value="origin" ?selected=${this._deliveryMode===`origin`}>Origin (captured channel)</option>
|
|
355
|
+
<option value="custom" ?selected=${this._deliveryMode===`custom`}>Custom channel</option>
|
|
356
|
+
</select>
|
|
357
|
+
</div>
|
|
358
|
+
${this._deliveryMode===`origin`&&this.job?.deliveryTarget?t`
|
|
359
|
+
<div class="field">
|
|
360
|
+
<label>Current target</label>
|
|
361
|
+
<span style="font-size:var(--ic-text-sm);color:var(--ic-text-dim)">${this.job.deliveryTarget.channelType??`unknown`}:${this.job.deliveryTarget.channelId}</span>
|
|
362
|
+
</div>
|
|
363
|
+
`:l}
|
|
364
|
+
${this._deliveryMode===`custom`?t`
|
|
365
|
+
<div class="field">
|
|
366
|
+
<label for="cron-delivery-type">Channel Type</label>
|
|
367
|
+
<input
|
|
368
|
+
id="cron-delivery-type"
|
|
369
|
+
type="text"
|
|
370
|
+
.value=${this._deliveryChannelType}
|
|
371
|
+
placeholder="telegram"
|
|
372
|
+
@input=${e=>{this._deliveryChannelType=e.target.value}}
|
|
373
|
+
/>
|
|
374
|
+
</div>
|
|
375
|
+
<div class="field">
|
|
376
|
+
<label for="cron-delivery-id">Channel ID</label>
|
|
377
|
+
<input
|
|
378
|
+
id="cron-delivery-id"
|
|
379
|
+
type="text"
|
|
380
|
+
.value=${this._deliveryChannelId}
|
|
381
|
+
placeholder="-100372..."
|
|
382
|
+
@input=${e=>{this._deliveryChannelId=e.target.value}}
|
|
383
|
+
/>
|
|
384
|
+
</div>
|
|
385
|
+
`:l}
|
|
671
386
|
|
|
672
|
-
|
|
673
|
-
|
|
387
|
+
<!-- Max Concurrent -->
|
|
388
|
+
<div class="field">
|
|
389
|
+
<label for="cron-max">Max Concurrent</label>
|
|
390
|
+
<input
|
|
391
|
+
id="cron-max"
|
|
392
|
+
type="number"
|
|
393
|
+
min="1"
|
|
394
|
+
.value=${String(this._maxConcurrent)}
|
|
395
|
+
@input=${e=>{let t=parseInt(e.target.value,10);!isNaN(t)&&t>=1&&(this._maxConcurrent=t)}}
|
|
396
|
+
/>
|
|
397
|
+
</div>
|
|
398
|
+
|
|
399
|
+
<!-- Next 5 runs preview -->
|
|
400
|
+
<div class="next-runs">
|
|
401
|
+
<h3>Next 5 runs</h3>
|
|
402
|
+
${this._nextRuns.length>0?t`
|
|
403
|
+
<ul>
|
|
404
|
+
${this._nextRuns.map(e=>t`<li>${e}</li>`)}
|
|
405
|
+
</ul>
|
|
406
|
+
`:t`<p class="empty-msg">Enter a valid schedule</p>`}
|
|
407
|
+
</div>
|
|
408
|
+
</div>
|
|
409
|
+
|
|
410
|
+
<!-- Buttons -->
|
|
411
|
+
<div class="button-row">
|
|
412
|
+
<button class="btn btn-cancel" @click=${this._onCancel}>Cancel</button>
|
|
413
|
+
<button class="btn btn-save" @click=${this._onSave}>Save</button>
|
|
414
|
+
</div>
|
|
415
|
+
</div>
|
|
416
|
+
`}};c([s({type:Object})],v.prototype,`job`,void 0),c([s()],v.prototype,`mode`,void 0),c([s({type:Array})],v.prototype,`agents`,void 0),c([a()],v.prototype,`_id`,void 0),c([a()],v.prototype,`_name`,void 0),c([a()],v.prototype,`_scheduleKind`,void 0),c([a()],v.prototype,`_cronExpr`,void 0),c([a()],v.prototype,`_timezone`,void 0),c([a()],v.prototype,`_everyMs`,void 0),c([a()],v.prototype,`_atDateTime`,void 0),c([a()],v.prototype,`_enabled`,void 0),c([a()],v.prototype,`_agentId`,void 0),c([a()],v.prototype,`_message`,void 0),c([a()],v.prototype,`_maxConcurrent`,void 0),c([a()],v.prototype,`_sessionTarget`,void 0),c([a()],v.prototype,`_deliveryMode`,void 0),c([a()],v.prototype,`_deliveryChannelType`,void 0),c([a()],v.prototype,`_deliveryChannelId`,void 0),c([a()],v.prototype,`_nextRuns`,void 0),v=c([e(`ic-cron-editor`)],v);var y=[{id:`cron-jobs`,label:`Cron Jobs`},{id:`heartbeat`,label:`Heartbeat`},{id:`extracted-tasks`,label:`Extracted Tasks`}];function b(e){switch(e.kind){case`cron`:return e.expr??`cron`;case`every`:{let t=e.everyMs??0;return t>=36e5?`Every ${Math.round(t/36e5)}h`:t>=6e4?`Every ${Math.round(t/6e4)}m`:`Every ${Math.round(t/1e3)}s`}case`at`:return e.at?new Date(e.at).toLocaleString():`one-shot`;default:return e.kind}}function x(e){return e<1e3?`${e}ms`:`${(e/1e3).toFixed(1)}s`}function S(e){return e<=0?`--`:new Date(e).toLocaleTimeString(void 0,{hour:`2-digit`,minute:`2-digit`,second:`2-digit`})}function C(e){return e>=36e5?`Every ${Math.round(e/36e5)}h`:e>=6e4?`Every ${Math.round(e/6e4)}m`:`Every ${Math.round(e/1e3)}s`}function w(e){return{id:e.id,name:e.name,agentId:e.agentId,schedule:{kind:e.schedule.kind,expr:e.schedule.expr,tz:e.schedule.tz,everyMs:e.schedule.everyMs,at:e.schedule.at},message:e.payload?.message??e.payload?.text??``,enabled:e.enabled,maxConcurrent:1,sessionTarget:e.sessionTarget??`main`,deliveryTarget:e.deliveryTarget}}var T=class extends r{constructor(...e){super(...e),this.rpcClient=null,this.routeParams={},this.eventDispatcher=null,this._jobs=[],this._loading=!0,this._error=``,this._activeTab=`cron-jobs`,this._executions=[],this._heartbeats=[],this._heartbeatEnabled=!1,this._heartbeatIntervalMs=3e5,this._extractedTasks=[],this._editorOpen=!1,this._editingJob=null,this._editorError=``,this._configAgentIds=[],this._selectedAgentId=``,this._cronEnabled=null,this._cronJobCount=0,this._heartbeatAgents=[],this._heartbeatAlerts=[],this._heartbeatDeliveries=[],this._rpcStatusUnsubs=[],this._sse=null,this._jobsLoaded=!1}static{this.styles=[o,i,n`
|
|
674
417
|
:host {
|
|
675
418
|
display: block;
|
|
676
419
|
}
|
|
@@ -1179,4 +922,261 @@ import{s as C,f as E,i as A,n as f,r as o,a as M,A as p,b as r,t as S,S as H,I}f
|
|
|
1179
922
|
height: 8px;
|
|
1180
923
|
border-radius: 50%;
|
|
1181
924
|
}
|
|
1182
|
-
`];
|
|
925
|
+
`]}connectedCallback(){super.connectedCallback(),this._initSse()}disconnectedCallback(){super.disconnectedCallback();for(let e of this._rpcStatusUnsubs)e();this._rpcStatusUnsubs=[]}updated(e){if(e.has(`rpcClient`)&&this.rpcClient&&!this._jobsLoaded){this._loadAll();let e=this.rpcClient.onStatusChange(e=>{e===`connected`&&!this._jobsLoaded&&(this._error=``,this._loadAll())});this._rpcStatusUnsubs.push(e)}if((e.has(`routeParams`)||e.has(`_jobs`))&&this.routeParams.jobId&&this._jobsLoaded){let e=this._jobs.find(e=>e.id===this.routeParams.jobId);e&&!this._editorOpen&&(this._editingJob=e,this._editorOpen=!0,this._editorError=``)}e.has(`eventDispatcher`)&&this.eventDispatcher&&!this._sse&&this._initSse()}_initSse(){!this.eventDispatcher||this._sse||(this._sse=new d(this,this.eventDispatcher,{"scheduler:job_started":e=>{let t=e,n={jobId:t.jobId,jobName:t.jobName??t.jobId,agentId:t.agentId??``,timestamp:t.timestamp??Date.now(),success:`pending`};this._executions=[n,...this._executions].slice(0,50)},"scheduler:job_completed":e=>{let t=e,n=this._executions.findIndex(e=>e.jobId===t.jobId&&e.success===`pending`);if(n>=0){let e=[...this._executions];e[n]={...e[n],success:t.success??!0,durationMs:t.durationMs,error:t.error,timestamp:t.timestamp??e[n].timestamp},this._executions=e}else{let e={jobId:t.jobId,jobName:t.jobName??t.jobId,agentId:t.agentId??``,timestamp:t.timestamp??Date.now(),success:t.success??!0,durationMs:t.durationMs,error:t.error};this._executions=[e,...this._executions].slice(0,50)}},"scheduler:heartbeat_delivered":e=>{let t=e,n={agentId:t.agentId??``,channelType:t.channelType??``,outcome:t.outcome??`delivered`,level:t.level??`ok`,reason:t.reason,durationMs:t.durationMs??0,timestamp:t.timestamp??Date.now()};this._heartbeatDeliveries=[n,...this._heartbeatDeliveries].slice(0,50)},"scheduler:heartbeat_alert":e=>{let t=e,n={agentId:t.agentId??``,classification:t.classification??`transient`,reason:t.reason??``,consecutiveErrors:t.consecutiveErrors??0,backoffMs:t.backoffMs??0,timestamp:t.timestamp??Date.now()};this._heartbeatAlerts=[n,...this._heartbeatAlerts].slice(0,50),this._updateAgentFromAlert(n)},"scheduler:task_extracted":e=>{let t=e,n={taskId:t.taskId??`task-${Date.now()}`,title:t.title??`Untitled task`,priority:t.priority??`medium`,confidence:t.confidence??0,sessionKey:t.sessionKey??``,timestamp:t.timestamp??Date.now(),status:`pending`};this._extractedTasks=[n,...this._extractedTasks]}}))}_loadAll(){this._loadAgentIds().then(()=>{Promise.allSettled([this._loadJobs(),this._loadCronStatus()])}),Promise.allSettled([this._loadHeartbeatConfig(),this._loadHeartbeatStates()])}async _loadJobs(){if(!this.rpcClient){this._loading=!1;return}try{let e=await this.rpcClient.call(`cron.list`,{_agentId:this._selectedAgentId||void 0});this._jobs=Array.isArray(e)?e:e.jobs??[],this._jobsLoaded=!0}catch(e){let t=e instanceof Error?e.message:`Failed to load jobs`;t.includes(`not enabled`)?(this._cronEnabled=!1,this._error=``):this._error=t}finally{this._loading=!1}}async _loadHeartbeatConfig(){if(this.rpcClient)try{let e=(await this.rpcClient.call(`config.read`,{section:`scheduler`}))?.heartbeat;e&&(this._heartbeatEnabled=e.enabled??!1,this._heartbeatIntervalMs=e.intervalMs??3e5)}catch{}}async _loadAgentIds(){if(this.rpcClient){try{let e=await this.rpcClient.call(`config.read`,{section:`agents`});e&&typeof e==`object`&&(this._configAgentIds=Object.keys(e))}catch{}this._configAgentIds.length>0&&!this._selectedAgentId&&(this._selectedAgentId=this._configAgentIds[0])}}async _loadCronStatus(){if(!(!this.rpcClient||!this._selectedAgentId))try{let e=await this.rpcClient.call(`cron.status`,{_agentId:this._selectedAgentId});this._cronEnabled=e?.running??null,this._cronJobCount=e?.jobCount??0}catch{this._cronEnabled=null}}async _loadHeartbeatStates(){if(this.rpcClient)try{let e=await this.rpcClient.call(`heartbeat.states`,{});this._heartbeatAgents=e?.agents??[]}catch{}}_updateAgentFromAlert(e){let t=this._heartbeatAgents.findIndex(t=>t.agentId===e.agentId);if(t<0)return;let n=[...this._heartbeatAgents];n[t]={...n[t],consecutiveErrors:e.consecutiveErrors,lastAlertMs:e.timestamp,lastErrorKind:e.classification},this._heartbeatAgents=n}_onAgentSelect(e){e!==this._selectedAgentId&&(this._selectedAgentId=e,this._jobs=[],this._executions=[],this._error=``,this._loading=!0,this._jobsLoaded=!1,this._loadJobs(),this._loadCronStatus())}async _handleEditorSave(e){if(!this.rpcClient)return;let t=e.detail;if(this._editorError=``,this._editingJob){let e=[...this._jobs],n=this._jobs.findIndex(e=>e.id===this._editingJob.id);if(n>=0){let e={...this._jobs[n],name:t.name,agentId:t.agentId,schedule:t.schedule,payload:{kind:`agent_turn`,message:t.message},sessionTarget:t.sessionTarget,enabled:t.enabled,deliveryTarget:t.deliveryTarget},r=[...this._jobs];r[n]=e,this._jobs=r}try{await this.rpcClient.call(`cron.update`,{jobId:this._editingJob.id,_agentId:this._selectedAgentId,...t}),this._editorOpen=!1,this._editingJob=null}catch(t){this._jobs=e,this._editorError=t instanceof Error?t.message:`Failed to update job`}}else{let e={id:t.id,name:t.name,agentId:t.agentId,schedule:t.schedule,payload:{kind:`agent_turn`,message:t.message},sessionTarget:t.sessionTarget,enabled:t.enabled,consecutiveErrors:0,createdAtMs:Date.now(),deliveryTarget:t.deliveryTarget};this._jobs=[...this._jobs,e];try{let n=await this.rpcClient.call(`cron.add`,{...t,_agentId:this._selectedAgentId,_deliveryTarget:t.deliveryTarget});if(n?.jobId&&n.jobId!==e.id){let t=this._jobs.findIndex(t=>t.id===e.id);if(t>=0){let e=[...this._jobs];e[t]={...e[t],id:n.jobId},this._jobs=e}}this._editorOpen=!1,this._editingJob=null}catch(t){this._jobs=this._jobs.filter(t=>t.id!==e.id),this._editorError=t instanceof Error?t.message:`Failed to create job`}}}async _handleDeleteJob(e){if(!this.rpcClient||!window.confirm(`Delete this job?`))return;let t=[...this._jobs];this._jobs=this._jobs.filter(t=>t.id!==e);try{await this.rpcClient.call(`cron.remove`,{jobId:e,_agentId:this._selectedAgentId})}catch(e){this._jobs=t,this._error=e instanceof Error?e.message:`Failed to delete job`}}async _handleToggleHeartbeat(){if(!this.rpcClient)return;let e=!this._heartbeatEnabled;this._heartbeatEnabled=e;try{await this.rpcClient.call(`config.set`,{section:`scheduler`,path:`heartbeat.enabled`,value:e})}catch(t){this._heartbeatEnabled=!e,this._error=t instanceof Error?t.message:`Failed to toggle heartbeat`}}_handleCompleteTask(e){this._extractedTasks=this._extractedTasks.map(t=>t.taskId===e?{...t,status:`completed`}:t)}_handleDismissTask(e){this._extractedTasks=this._extractedTasks.map(t=>t.taskId===e?{...t,status:`dismissed`}:t)}async _handleRunJob(e){if(this.rpcClient)try{await this.rpcClient.call(`cron.run`,{jobName:e,_agentId:this._selectedAgentId}),u.show(`Job triggered`,`success`)}catch(e){this._error=e instanceof Error?e.message:`Failed to run job`}}async _handleTriggerHeartbeat(e){if(this.rpcClient)try{await this.rpcClient.call(`heartbeat.trigger`,{agentId:e}),u.show(`Heartbeat triggered for `+e,`success`)}catch(e){this._error=e instanceof Error?e.message:`Failed to trigger heartbeat`}}_openCreateEditor(){this._editingJob=null,this._editorOpen=!0,this._editorError=``}_openEditEditor(e){this._editingJob=e,this._editorOpen=!0,this._editorError=``}_closeEditor(){this._editorOpen=!1,this._editingJob=null,this._editorError=``}_closeEditorOnBackdrop(e){e.target===e.currentTarget&&this._closeEditor()}_onTabChange(e){this._activeTab=e.detail}get _editingJobInput(){return this._editingJob?w(this._editingJob):null}get _agentIds(){let e=new Set([...this._configAgentIds,...this._jobs.map(e=>e.agentId)]),t=Array.from(e);if(this._selectedAgentId){let e=t.indexOf(this._selectedAgentId);e>0&&(t.splice(e,1),t.unshift(this._selectedAgentId))}return t}_renderAgentSelector(){return this._configAgentIds.length<=1&&this._jobs.length===0?l:t`
|
|
926
|
+
<div class="agent-selector" role="radiogroup" aria-label="Select agent">
|
|
927
|
+
<span class="agent-selector-label">Agent:</span>
|
|
928
|
+
${this._configAgentIds.map(e=>t`
|
|
929
|
+
<button
|
|
930
|
+
class="agent-pill ${e===this._selectedAgentId?`agent-pill--active`:``}"
|
|
931
|
+
role="radio"
|
|
932
|
+
aria-checked=${e===this._selectedAgentId?`true`:`false`}
|
|
933
|
+
@click=${()=>this._onAgentSelect(e)}
|
|
934
|
+
>${e}</button>
|
|
935
|
+
`)}
|
|
936
|
+
</div>
|
|
937
|
+
`}_renderAgentStatus(){return this._cronEnabled===null?l:t`
|
|
938
|
+
<div class="agent-status">
|
|
939
|
+
<span class=${this._cronEnabled?`status-dot status-dot--active`:`status-dot status-dot--inactive`}></span>
|
|
940
|
+
<span>${this._cronEnabled?`Cron scheduler running (${this._cronJobCount} job${this._cronJobCount===1?``:`s`})`:`Cron scheduler not enabled for '${this._selectedAgentId}'`}</span>
|
|
941
|
+
</div>
|
|
942
|
+
`}_renderJobRow(e){let n=e.enabled?e.consecutiveErrors>0?`status-dot status-dot--error`:`status-dot status-dot--active`:`status-dot status-dot--inactive`;return t`
|
|
943
|
+
<div class="grid-row" role="row" @click=${()=>this._openEditEditor(e)}>
|
|
944
|
+
<div class="cell" role="cell">${e.name||e.id}</div>
|
|
945
|
+
<div class="cell" role="cell">${b(e.schedule)}</div>
|
|
946
|
+
<div class="cell" role="cell">
|
|
947
|
+
${e.lastRunAtMs&&e.lastRunAtMs>0?t`<ic-relative-time .timestamp=${e.lastRunAtMs}></ic-relative-time>`:`Never`}
|
|
948
|
+
</div>
|
|
949
|
+
<div class="cell" role="cell">
|
|
950
|
+
${e.enabled&&e.nextRunAtMs&&e.nextRunAtMs>0?t`<ic-relative-time .timestamp=${e.nextRunAtMs}></ic-relative-time>`:`(off)`}
|
|
951
|
+
</div>
|
|
952
|
+
<div class="cell" role="cell">
|
|
953
|
+
<span class="status-info">
|
|
954
|
+
<span class=${n}></span>
|
|
955
|
+
${e.consecutiveErrors>0?t`<span class="error-count">${e.consecutiveErrors} errors</span>`:l}
|
|
956
|
+
</span>
|
|
957
|
+
</div>
|
|
958
|
+
<div class="cell" role="cell">
|
|
959
|
+
${e.deliveryTarget?t`<ic-tag variant="info">${e.deliveryTarget.channelType??`channel`}</ic-tag>`:t`<span style="color:var(--ic-text-dim)">local</span>`}
|
|
960
|
+
</div>
|
|
961
|
+
<div class="cell" role="cell">
|
|
962
|
+
<div class="action-group">
|
|
963
|
+
<button
|
|
964
|
+
class="btn-run"
|
|
965
|
+
?disabled=${!e.enabled}
|
|
966
|
+
title=${e.enabled?`Execute this job now`:`Enable job to run`}
|
|
967
|
+
@click=${t=>{t.stopPropagation(),this._handleRunJob(e.name||e.id)}}
|
|
968
|
+
>Run</button>
|
|
969
|
+
<button
|
|
970
|
+
class="btn-edit"
|
|
971
|
+
title="Edit this job"
|
|
972
|
+
@click=${t=>{t.stopPropagation(),this._openEditEditor(e)}}
|
|
973
|
+
>Edit</button>
|
|
974
|
+
<button
|
|
975
|
+
class="btn-delete"
|
|
976
|
+
@click=${t=>{t.stopPropagation(),this._handleDeleteJob(e.id)}}
|
|
977
|
+
>Delete</button>
|
|
978
|
+
</div>
|
|
979
|
+
</div>
|
|
980
|
+
</div>
|
|
981
|
+
`}_renderCronJobsTab(){return t`
|
|
982
|
+
${this._renderAgentSelector()}
|
|
983
|
+
${this._renderAgentStatus()}
|
|
984
|
+
${this._loading?t`<ic-skeleton-view variant="list"></ic-skeleton-view>`:this._jobs.length===0?t`
|
|
985
|
+
<ic-empty-state
|
|
986
|
+
icon="clock"
|
|
987
|
+
message="No scheduled jobs"
|
|
988
|
+
description="Configure cron jobs or heartbeat checks for your agents."
|
|
989
|
+
>
|
|
990
|
+
<button class="cta-btn" style="background:var(--ic-accent);color:#fff;border:none;border-radius:var(--ic-radius-md);padding:0.5rem 1rem;cursor:pointer;font-family:inherit;font-size:var(--ic-text-sm)" @click=${()=>{window.location.hash=`#/config`}}>Open Settings</button>
|
|
991
|
+
</ic-empty-state>
|
|
992
|
+
`:t`
|
|
993
|
+
<div class="job-grid" role="table">
|
|
994
|
+
<div class="grid-header" role="row">
|
|
995
|
+
<div class="cell" role="columnheader">Name</div>
|
|
996
|
+
<div class="cell" role="columnheader">Schedule</div>
|
|
997
|
+
<div class="cell" role="columnheader">Last Run</div>
|
|
998
|
+
<div class="cell" role="columnheader">Next Run</div>
|
|
999
|
+
<div class="cell" role="columnheader">Status</div>
|
|
1000
|
+
<div class="cell" role="columnheader">Deliver</div>
|
|
1001
|
+
<div class="cell" role="columnheader">Actions</div>
|
|
1002
|
+
</div>
|
|
1003
|
+
${this._jobs.map(e=>this._renderJobRow(e))}
|
|
1004
|
+
</div>
|
|
1005
|
+
|
|
1006
|
+
${this._renderRecentExecutions()}
|
|
1007
|
+
`}
|
|
1008
|
+
`}_renderRecentExecutions(){return t`
|
|
1009
|
+
<div class="executions-section">
|
|
1010
|
+
<h3>Recent Executions</h3>
|
|
1011
|
+
${this._executions.length===0?t`<div class="no-data">No recent executions</div>`:t`
|
|
1012
|
+
<div class="execution-list">
|
|
1013
|
+
${this._executions.map(e=>t`
|
|
1014
|
+
<div class="execution-entry">
|
|
1015
|
+
<span class="exec-timestamp">${S(e.timestamp)}</span>
|
|
1016
|
+
<span class="exec-job">${e.jobName||e.jobId}</span>
|
|
1017
|
+
<span class=${e.success===`pending`?`exec-result--pending`:e.success?`exec-result--success`:`exec-result--fail`}>${e.success===`pending`?`...`:e.success?`OK`:`FAIL`}</span>
|
|
1018
|
+
${e.durationMs==null?l:t`<span class="exec-duration">(${x(e.durationMs)})</span>`}
|
|
1019
|
+
${e.error?t`<span class="exec-error">${e.error}</span>`:l}
|
|
1020
|
+
</div>
|
|
1021
|
+
`)}
|
|
1022
|
+
</div>
|
|
1023
|
+
`}
|
|
1024
|
+
</div>
|
|
1025
|
+
`}_renderHeartbeatTab(){if(this._heartbeatAgents.length===0)return this._heartbeatEnabled||this._heartbeats.length>0?t`
|
|
1026
|
+
<div class="hb-summary-bar">
|
|
1027
|
+
<span>Global heartbeat: ${this._heartbeatEnabled?`enabled`:`disabled`}</span>
|
|
1028
|
+
<span>Interval: ${C(this._heartbeatIntervalMs)}</span>
|
|
1029
|
+
</div>
|
|
1030
|
+
<ic-empty-state
|
|
1031
|
+
icon="scheduler"
|
|
1032
|
+
message="No heartbeat agents"
|
|
1033
|
+
description="Configure heartbeat in agent settings to see per-agent status."
|
|
1034
|
+
></ic-empty-state>
|
|
1035
|
+
`:t`
|
|
1036
|
+
<ic-empty-state
|
|
1037
|
+
icon="scheduler"
|
|
1038
|
+
message="No heartbeat agents"
|
|
1039
|
+
description="Configure heartbeat in agent settings to see per-agent status."
|
|
1040
|
+
></ic-empty-state>
|
|
1041
|
+
`;let e=Date.now(),n=this._heartbeatAgents.filter(e=>e.enabled).length,r=this._heartbeatAgents.filter(t=>t.backoffUntilMs>e).length,i=this._heartbeatAgents.filter(e=>e.consecutiveErrors>0).length;return t`
|
|
1042
|
+
<div class="hb-summary-bar">
|
|
1043
|
+
<span>${n} agent${n===1?``:`s`} enabled</span>
|
|
1044
|
+
${r>0?t`<span class="alerts-highlight">${r} in backoff</span>`:l}
|
|
1045
|
+
${i>0?t`<span class="alerts-highlight">${i} with errors</span>`:l}
|
|
1046
|
+
</div>
|
|
1047
|
+
|
|
1048
|
+
<div class="hb-card-grid">
|
|
1049
|
+
${this._heartbeatAgents.map(t=>this._renderHeartbeatCard(t,e))}
|
|
1050
|
+
</div>
|
|
1051
|
+
|
|
1052
|
+
${this._heartbeatAlerts.length>0?t`
|
|
1053
|
+
<div class="hb-recent-section">
|
|
1054
|
+
<h3>Recent Alerts</h3>
|
|
1055
|
+
<div class="hb-event-list">
|
|
1056
|
+
${this._heartbeatAlerts.slice(0,20).map(e=>t`
|
|
1057
|
+
<div class="hb-event-entry">
|
|
1058
|
+
<span class="hb-event-ts">${S(e.timestamp)}</span>
|
|
1059
|
+
<span class="hb-event-agent">${e.agentId}</span>
|
|
1060
|
+
<ic-tag variant=${e.classification===`permanent`?`error`:`warning`}>${e.classification}</ic-tag>
|
|
1061
|
+
<span class="hb-event-reason">${e.reason}</span>
|
|
1062
|
+
${e.backoffMs>0?t`<span class="hb-event-duration">(backoff ${C(e.backoffMs)})</span>`:l}
|
|
1063
|
+
</div>
|
|
1064
|
+
`)}
|
|
1065
|
+
</div>
|
|
1066
|
+
</div>
|
|
1067
|
+
`:l}
|
|
1068
|
+
|
|
1069
|
+
${this._heartbeatDeliveries.length>0?t`
|
|
1070
|
+
<div class="hb-recent-section">
|
|
1071
|
+
<h3>Recent Deliveries</h3>
|
|
1072
|
+
<div class="hb-event-list">
|
|
1073
|
+
${this._heartbeatDeliveries.slice(0,20).map(e=>t`
|
|
1074
|
+
<div class="hb-event-entry">
|
|
1075
|
+
<span class="hb-event-ts">${S(e.timestamp)}</span>
|
|
1076
|
+
<span class="hb-event-agent">${e.agentId}</span>
|
|
1077
|
+
<ic-tag variant=${e.outcome===`delivered`?`success`:e.outcome===`failed`?`error`:`warning`}>${e.outcome}</ic-tag>
|
|
1078
|
+
<span>${e.channelType}</span>
|
|
1079
|
+
<span class="hb-event-duration">(${x(e.durationMs)})</span>
|
|
1080
|
+
</div>
|
|
1081
|
+
`)}
|
|
1082
|
+
</div>
|
|
1083
|
+
</div>
|
|
1084
|
+
`:l}
|
|
1085
|
+
`}_renderHeartbeatCard(e,n){let r=e.backoffUntilMs>n,i=e.consecutiveErrors>0,a=e.tickStartedAtMs>0,o,s;return e.enabled?r?(o=`backoff`,s=`warning`):i?(o=`error`,s=`error`):(o=`healthy`,s=`success`):(o=`disabled`,s=`default`),t`
|
|
1086
|
+
<div class="hb-card">
|
|
1087
|
+
<div class="hb-card-header">
|
|
1088
|
+
<span class="hb-card-agent">${e.agentId}</span>
|
|
1089
|
+
<ic-tag variant=${s}>${o}</ic-tag>
|
|
1090
|
+
</div>
|
|
1091
|
+
<div class="hb-card-row">
|
|
1092
|
+
<span class="hb-card-label">Interval:</span>
|
|
1093
|
+
<span>${C(e.intervalMs)}</span>
|
|
1094
|
+
</div>
|
|
1095
|
+
<div class="hb-card-row">
|
|
1096
|
+
<span class="hb-card-label">Last run:</span>
|
|
1097
|
+
${e.lastRunMs>0?t`<ic-relative-time .timestamp=${e.lastRunMs}></ic-relative-time>`:t`<span>--</span>`}
|
|
1098
|
+
</div>
|
|
1099
|
+
<div class="hb-card-row">
|
|
1100
|
+
<span class="hb-card-label">Next due:</span>
|
|
1101
|
+
${e.nextDueMs>0?t`<ic-relative-time .timestamp=${e.nextDueMs}></ic-relative-time>`:t`<span>--</span>`}
|
|
1102
|
+
</div>
|
|
1103
|
+
${i?t`
|
|
1104
|
+
<div class="hb-card-row">
|
|
1105
|
+
<span class="hb-card-label">Errors:</span>
|
|
1106
|
+
<span class="alerts-highlight">${e.consecutiveErrors}${e.lastErrorKind?` (${e.lastErrorKind})`:``}</span>
|
|
1107
|
+
</div>
|
|
1108
|
+
`:l}
|
|
1109
|
+
${a?t`<span class="hb-running-indicator">running...</span>`:l}
|
|
1110
|
+
<button
|
|
1111
|
+
class="btn-run"
|
|
1112
|
+
?disabled=${!e.enabled}
|
|
1113
|
+
title=${e.enabled?`Trigger heartbeat check now`:`Enable heartbeat to trigger`}
|
|
1114
|
+
@click=${()=>this._handleTriggerHeartbeat(e.agentId)}
|
|
1115
|
+
style="margin-top:var(--ic-space-xs);align-self:flex-start"
|
|
1116
|
+
>Trigger</button>
|
|
1117
|
+
</div>
|
|
1118
|
+
`}_renderExtractedTasksTab(){return this._extractedTasks.length===0?t`
|
|
1119
|
+
<ic-empty-state
|
|
1120
|
+
icon="scheduler"
|
|
1121
|
+
message="No extracted tasks"
|
|
1122
|
+
description="Tasks will appear when agents extract them from conversations."
|
|
1123
|
+
></ic-empty-state>
|
|
1124
|
+
`:t`
|
|
1125
|
+
<div class="task-grid" role="table">
|
|
1126
|
+
<div class="grid-header" role="row">
|
|
1127
|
+
<div class="cell" role="columnheader">Title</div>
|
|
1128
|
+
<div class="cell" role="columnheader">Priority</div>
|
|
1129
|
+
<div class="cell" role="columnheader">Status</div>
|
|
1130
|
+
<div class="cell" role="columnheader">Actions</div>
|
|
1131
|
+
</div>
|
|
1132
|
+
${this._extractedTasks.map(e=>this._renderTaskRow(e))}
|
|
1133
|
+
</div>
|
|
1134
|
+
`}_renderTaskRow(e){let n=`priority-tag priority-tag--${e.priority}`;return t`
|
|
1135
|
+
<div class="grid-row" role="row">
|
|
1136
|
+
<div class="cell" role="cell">${e.title}</div>
|
|
1137
|
+
<div class="cell" role="cell">
|
|
1138
|
+
<span class=${n}>${e.priority}</span>
|
|
1139
|
+
</div>
|
|
1140
|
+
<div class="cell" role="cell">${e.status}</div>
|
|
1141
|
+
<div class="cell" role="cell">
|
|
1142
|
+
${e.status===`pending`?t`
|
|
1143
|
+
<div class="task-actions">
|
|
1144
|
+
<button class="btn-sm btn-complete" @click=${()=>this._handleCompleteTask(e.taskId)}>Complete</button>
|
|
1145
|
+
<button class="btn-sm btn-dismiss" @click=${()=>this._handleDismissTask(e.taskId)}>Dismiss</button>
|
|
1146
|
+
</div>
|
|
1147
|
+
`:l}
|
|
1148
|
+
</div>
|
|
1149
|
+
</div>
|
|
1150
|
+
`}_renderEditorOverlay(){return this._editorOpen?t`
|
|
1151
|
+
<div class="editor-overlay" @click=${this._closeEditorOnBackdrop}>
|
|
1152
|
+
<div class="editor-panel" @click=${e=>e.stopPropagation()}>
|
|
1153
|
+
<ic-cron-editor
|
|
1154
|
+
.job=${this._editingJobInput}
|
|
1155
|
+
.mode=${this._editingJob?`edit`:`create`}
|
|
1156
|
+
.agents=${this._agentIds}
|
|
1157
|
+
@save=${this._handleEditorSave}
|
|
1158
|
+
@cancel=${()=>this._closeEditor()}
|
|
1159
|
+
></ic-cron-editor>
|
|
1160
|
+
${this._editorError?t`<div class="editor-error">${this._editorError}</div>`:l}
|
|
1161
|
+
</div>
|
|
1162
|
+
</div>
|
|
1163
|
+
`:l}render(){return t`
|
|
1164
|
+
<div class="scheduler-header">
|
|
1165
|
+
<h2>Scheduler</h2>
|
|
1166
|
+
<button class="btn-primary" @click=${()=>this._openCreateEditor()}>+ New Job</button>
|
|
1167
|
+
</div>
|
|
1168
|
+
|
|
1169
|
+
${this._error?t`<div class="error-message">${this._error}</div>`:l}
|
|
1170
|
+
|
|
1171
|
+
<ic-tabs
|
|
1172
|
+
.tabs=${y}
|
|
1173
|
+
.activeTab=${this._activeTab}
|
|
1174
|
+
@tab-change=${this._onTabChange}
|
|
1175
|
+
>
|
|
1176
|
+
<div slot="cron-jobs">${this._renderCronJobsTab()}</div>
|
|
1177
|
+
<div slot="heartbeat">${this._renderHeartbeatTab()}</div>
|
|
1178
|
+
<div slot="extracted-tasks">${this._renderExtractedTasksTab()}</div>
|
|
1179
|
+
</ic-tabs>
|
|
1180
|
+
|
|
1181
|
+
${this._renderEditorOverlay()}
|
|
1182
|
+
`}};c([s({attribute:!1})],T.prototype,`rpcClient`,void 0),c([s({attribute:!1})],T.prototype,`routeParams`,void 0),c([s({attribute:!1})],T.prototype,`eventDispatcher`,void 0),c([a()],T.prototype,`_jobs`,void 0),c([a()],T.prototype,`_loading`,void 0),c([a()],T.prototype,`_error`,void 0),c([a()],T.prototype,`_activeTab`,void 0),c([a()],T.prototype,`_executions`,void 0),c([a()],T.prototype,`_heartbeats`,void 0),c([a()],T.prototype,`_heartbeatEnabled`,void 0),c([a()],T.prototype,`_heartbeatIntervalMs`,void 0),c([a()],T.prototype,`_extractedTasks`,void 0),c([a()],T.prototype,`_editorOpen`,void 0),c([a()],T.prototype,`_editingJob`,void 0),c([a()],T.prototype,`_editorError`,void 0),c([a()],T.prototype,`_configAgentIds`,void 0),c([a()],T.prototype,`_selectedAgentId`,void 0),c([a()],T.prototype,`_cronEnabled`,void 0),c([a()],T.prototype,`_cronJobCount`,void 0),c([a()],T.prototype,`_heartbeatAgents`,void 0),c([a()],T.prototype,`_heartbeatAlerts`,void 0),c([a()],T.prototype,`_heartbeatDeliveries`,void 0),T=c([e(`ic-scheduler-view`)],T);export{T as IcSchedulerView};
|