@chrysb/alphaclaw 0.8.1 → 0.8.2
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/README.md +32 -24
- package/bin/alphaclaw.js +13 -2
- package/lib/public/css/tailwind.generated.css +1 -0
- package/lib/public/css/tailwind.input.css +3 -0
- package/lib/public/css/theme.css +28 -0
- package/lib/public/css/vendor/xterm.css +218 -0
- package/lib/public/dist/app.bundle.js +10514 -0
- package/lib/public/dist/chunks/addon-fit-W4YZGRNV.js +1 -0
- package/lib/public/dist/chunks/chunk-72ZECFVW.js +1 -0
- package/lib/public/dist/chunks/xterm-KOX4YMOF.js +9 -0
- package/lib/public/js/app.js +4 -4
- package/lib/public/js/components/action-button.js +8 -8
- package/lib/public/js/components/add-channel-menu.js +2 -2
- package/lib/public/js/components/agent-send-modal.js +6 -6
- package/lib/public/js/components/agents-tab/agent-bindings-section/channel-item-trailing.js +7 -7
- package/lib/public/js/components/agents-tab/agent-bindings-section/index.js +3 -3
- package/lib/public/js/components/agents-tab/agent-bindings-section/use-agent-bindings.js +1 -1
- package/lib/public/js/components/agents-tab/agent-bindings-section/use-channel-items.js +4 -4
- package/lib/public/js/components/agents-tab/agent-detail-panel.js +5 -5
- package/lib/public/js/components/agents-tab/agent-identity-section.js +18 -18
- package/lib/public/js/components/agents-tab/agent-overview/index.js +2 -2
- package/lib/public/js/components/agents-tab/agent-overview/manage-card.js +2 -2
- package/lib/public/js/components/agents-tab/agent-overview/model-card.js +8 -8
- package/lib/public/js/components/agents-tab/agent-overview/tools-card.js +5 -5
- package/lib/public/js/components/agents-tab/agent-overview/use-model-card.js +1 -1
- package/lib/public/js/components/agents-tab/agent-overview/use-workspace-card.js +1 -1
- package/lib/public/js/components/agents-tab/agent-overview/workspace-card.js +4 -4
- package/lib/public/js/components/agents-tab/agent-pairing-section.js +4 -4
- package/lib/public/js/components/agents-tab/agent-tools/index.js +5 -5
- package/lib/public/js/components/agents-tab/agent-tools/use-agent-tools.js +1 -1
- package/lib/public/js/components/agents-tab/create-agent-modal.js +13 -13
- package/lib/public/js/components/agents-tab/create-channel-modal.js +34 -34
- package/lib/public/js/components/agents-tab/delete-agent-dialog.js +3 -3
- package/lib/public/js/components/agents-tab/edit-agent-modal.js +9 -9
- package/lib/public/js/components/agents-tab/index.js +3 -3
- package/lib/public/js/components/agents-tab/use-agents.js +1 -1
- package/lib/public/js/components/badge.js +6 -6
- package/lib/public/js/components/channel-account-status-badge.js +2 -2
- package/lib/public/js/components/channel-operations-panel.js +2 -2
- package/lib/public/js/components/channels.js +9 -9
- package/lib/public/js/components/confirm-dialog.js +5 -5
- package/lib/public/js/components/credentials-modal.js +22 -22
- package/lib/public/js/components/cron-tab/cron-calendar.js +6 -6
- package/lib/public/js/components/cron-tab/cron-insights-panel.js +10 -10
- package/lib/public/js/components/cron-tab/cron-job-detail.js +4 -4
- package/lib/public/js/components/cron-tab/cron-job-list.js +4 -4
- package/lib/public/js/components/cron-tab/cron-job-settings-card.js +15 -15
- package/lib/public/js/components/cron-tab/cron-job-trends-panel.js +5 -5
- package/lib/public/js/components/cron-tab/cron-job-usage.js +16 -16
- package/lib/public/js/components/cron-tab/cron-overview.js +10 -10
- package/lib/public/js/components/cron-tab/cron-prompt-editor.js +3 -3
- package/lib/public/js/components/cron-tab/cron-run-history-panel.js +39 -39
- package/lib/public/js/components/cron-tab/cron-runs-trend-card.js +4 -4
- package/lib/public/js/components/cron-tab/index.js +5 -5
- package/lib/public/js/components/cron-tab/use-cron-tab.js +1 -1
- package/lib/public/js/components/device-pairings.js +12 -12
- package/lib/public/js/components/doctor/findings-list.js +22 -22
- package/lib/public/js/components/doctor/fix-card-modal.js +2 -2
- package/lib/public/js/components/doctor/general-warning.js +5 -5
- package/lib/public/js/components/doctor/index.js +26 -26
- package/lib/public/js/components/doctor/summary-cards.js +5 -5
- package/lib/public/js/components/envars.js +16 -16
- package/lib/public/js/components/features.js +4 -4
- package/lib/public/js/components/file-tree.js +4 -4
- package/lib/public/js/components/file-viewer/diff-viewer.js +2 -2
- package/lib/public/js/components/file-viewer/editor-surface.js +2 -2
- package/lib/public/js/components/file-viewer/frontmatter-panel.js +2 -2
- package/lib/public/js/components/file-viewer/index.js +3 -3
- package/lib/public/js/components/file-viewer/markdown-split-view.js +2 -2
- package/lib/public/js/components/file-viewer/media-preview.js +2 -2
- package/lib/public/js/components/file-viewer/scroll-sync.js +1 -1
- package/lib/public/js/components/file-viewer/sqlite-viewer.js +2 -2
- package/lib/public/js/components/file-viewer/status-banners.js +2 -2
- package/lib/public/js/components/file-viewer/toolbar.js +2 -2
- package/lib/public/js/components/file-viewer/use-editor-line-number-sync.js +1 -1
- package/lib/public/js/components/file-viewer/use-editor-selection-restore.js +1 -1
- package/lib/public/js/components/file-viewer/use-file-diff.js +1 -1
- package/lib/public/js/components/file-viewer/use-file-loader.js +1 -1
- package/lib/public/js/components/file-viewer/use-file-viewer-draft-sync.js +1 -1
- package/lib/public/js/components/file-viewer/use-file-viewer-hotkeys.js +1 -1
- package/lib/public/js/components/file-viewer/use-file-viewer.js +2 -2
- package/lib/public/js/components/gateway.js +12 -12
- package/lib/public/js/components/general/index.js +7 -7
- package/lib/public/js/components/general/use-general-tab.js +1 -1
- package/lib/public/js/components/global-restart-banner.js +2 -2
- package/lib/public/js/components/google/account-row.js +7 -7
- package/lib/public/js/components/google/add-account-modal.js +8 -8
- package/lib/public/js/components/google/gmail-setup-wizard.js +24 -24
- package/lib/public/js/components/google/gmail-watch-toggle.js +5 -5
- package/lib/public/js/components/google/index.js +6 -6
- package/lib/public/js/components/google/use-gmail-watch.js +1 -1
- package/lib/public/js/components/google/use-google-accounts.js +1 -1
- package/lib/public/js/components/icons.js +2 -2
- package/lib/public/js/components/info-tooltip.js +3 -3
- package/lib/public/js/components/loading-spinner.js +2 -2
- package/lib/public/js/components/modal-shell.js +5 -5
- package/lib/public/js/components/models-tab/index.js +11 -11
- package/lib/public/js/components/models-tab/model-picker.js +9 -9
- package/lib/public/js/components/models-tab/provider-auth-card.js +12 -12
- package/lib/public/js/components/models-tab/use-models.js +1 -1
- package/lib/public/js/components/models.js +18 -18
- package/lib/public/js/components/nodes-tab/browser-attach/index.js +5 -5
- package/lib/public/js/components/nodes-tab/connected-nodes/index.js +32 -32
- package/lib/public/js/components/nodes-tab/connected-nodes/use-connected-nodes-card.js +18 -3
- package/lib/public/js/components/nodes-tab/exec-allowlist/index.js +10 -10
- package/lib/public/js/components/nodes-tab/exec-allowlist/use-exec-allowlist.js +1 -1
- package/lib/public/js/components/nodes-tab/exec-config/index.js +13 -13
- package/lib/public/js/components/nodes-tab/exec-config/use-exec-config.js +1 -1
- package/lib/public/js/components/nodes-tab/index.js +2 -2
- package/lib/public/js/components/nodes-tab/setup-wizard/index.js +14 -14
- package/lib/public/js/components/nodes-tab/setup-wizard/use-setup-wizard.js +1 -1
- package/lib/public/js/components/nodes-tab/use-nodes-tab.js +1 -1
- package/lib/public/js/components/onboarding/use-welcome-codex.js +1 -1
- package/lib/public/js/components/onboarding/use-welcome-pairing.js +1 -1
- package/lib/public/js/components/onboarding/use-welcome-storage.js +1 -1
- package/lib/public/js/components/onboarding/welcome-config.js +3 -3
- package/lib/public/js/components/onboarding/welcome-form-step.js +34 -34
- package/lib/public/js/components/onboarding/welcome-header.js +2 -2
- package/lib/public/js/components/onboarding/welcome-import-step.js +22 -22
- package/lib/public/js/components/onboarding/welcome-pairing-step.js +15 -15
- package/lib/public/js/components/onboarding/welcome-placeholder-review-step.js +7 -7
- package/lib/public/js/components/onboarding/welcome-pre-step.js +9 -9
- package/lib/public/js/components/onboarding/welcome-secret-review-step.js +15 -15
- package/lib/public/js/components/onboarding/welcome-setup-step.js +8 -8
- package/lib/public/js/components/overflow-menu.js +3 -3
- package/lib/public/js/components/page-header.js +2 -2
- package/lib/public/js/components/pairings.js +14 -14
- package/lib/public/js/components/pane-shell.js +2 -2
- package/lib/public/js/components/pill-tabs.js +4 -4
- package/lib/public/js/components/pop-actions.js +3 -3
- package/lib/public/js/components/providers.js +17 -17
- package/lib/public/js/components/routes/agents-route.js +2 -2
- package/lib/public/js/components/routes/browse-route.js +2 -2
- package/lib/public/js/components/routes/cron-route.js +2 -2
- package/lib/public/js/components/routes/doctor-route.js +2 -2
- package/lib/public/js/components/routes/envars-route.js +2 -2
- package/lib/public/js/components/routes/general-route.js +2 -2
- package/lib/public/js/components/routes/models-route.js +2 -2
- package/lib/public/js/components/routes/nodes-route.js +2 -2
- package/lib/public/js/components/routes/providers-route.js +2 -2
- package/lib/public/js/components/routes/route-redirect.js +2 -2
- package/lib/public/js/components/routes/telegram-route.js +2 -2
- package/lib/public/js/components/routes/usage-route.js +2 -2
- package/lib/public/js/components/routes/watchdog-route.js +2 -2
- package/lib/public/js/components/routes/webhooks-route.js +2 -2
- package/lib/public/js/components/scope-picker.js +9 -9
- package/lib/public/js/components/secret-input.js +5 -5
- package/lib/public/js/components/segmented-control.js +2 -2
- package/lib/public/js/components/session-select-field.js +7 -7
- package/lib/public/js/components/sidebar-git-panel.js +3 -3
- package/lib/public/js/components/sidebar.js +3 -3
- package/lib/public/js/components/summary-stat-card.js +3 -3
- package/lib/public/js/components/telegram-workspace/index.js +10 -10
- package/lib/public/js/components/telegram-workspace/manage.js +36 -36
- package/lib/public/js/components/telegram-workspace/onboarding.js +73 -73
- package/lib/public/js/components/toast.js +8 -8
- package/lib/public/js/components/toggle-switch.js +2 -2
- package/lib/public/js/components/tooltip.js +5 -5
- package/lib/public/js/components/update-action-button.js +2 -2
- package/lib/public/js/components/update-modal.js +9 -9
- package/lib/public/js/components/usage-tab/constants.js +2 -2
- package/lib/public/js/components/usage-tab/index.js +3 -3
- package/lib/public/js/components/usage-tab/overview-section.js +15 -15
- package/lib/public/js/components/usage-tab/sessions-section.js +19 -19
- package/lib/public/js/components/usage-tab/use-usage-tab.js +2 -2
- package/lib/public/js/components/watchdog-tab/console/index.js +22 -8
- package/lib/public/js/components/watchdog-tab/console/use-console.js +28 -2
- package/lib/public/js/components/watchdog-tab/helpers.js +35 -6
- package/lib/public/js/components/watchdog-tab/incidents/index.js +6 -6
- package/lib/public/js/components/watchdog-tab/incidents/use-incidents.js +1 -1
- package/lib/public/js/components/watchdog-tab/index.js +4 -2
- package/lib/public/js/components/watchdog-tab/resource-bar.js +5 -5
- package/lib/public/js/components/watchdog-tab/resources/index.js +14 -3
- package/lib/public/js/components/watchdog-tab/resources/use-resources.js +1 -1
- package/lib/public/js/components/watchdog-tab/settings/index.js +97 -30
- package/lib/public/js/components/watchdog-tab/settings/use-settings.js +1 -1
- package/lib/public/js/components/watchdog-tab/terminal/index.js +3 -3
- package/lib/public/js/components/watchdog-tab/terminal/use-terminal.js +41 -5
- package/lib/public/js/components/watchdog-tab/use-watchdog-tab.js +2 -0
- package/lib/public/js/components/webhooks/create-webhook-modal/index.js +17 -17
- package/lib/public/js/components/webhooks/helpers.js +3 -3
- package/lib/public/js/components/webhooks/index.js +4 -4
- package/lib/public/js/components/webhooks/request-history/index.js +14 -14
- package/lib/public/js/components/webhooks/request-history/use-request-history.js +1 -1
- package/lib/public/js/components/webhooks/webhook-detail/index.js +41 -41
- package/lib/public/js/components/webhooks/webhook-detail/use-webhook-detail.js +1 -1
- package/lib/public/js/components/webhooks/webhook-list/index.js +11 -11
- package/lib/public/js/components/webhooks/webhook-list/use-webhook-list.js +1 -1
- package/lib/public/js/components/welcome/index.js +3 -3
- package/lib/public/js/components/welcome/use-welcome.js +10 -10
- package/lib/public/js/hooks/use-app-shell-controller.js +1 -1
- package/lib/public/js/hooks/use-app-shell-ui.js +1 -1
- package/lib/public/js/hooks/use-browse-navigation.js +1 -1
- package/lib/public/js/hooks/use-cached-fetch.js +1 -1
- package/lib/public/js/hooks/use-destination-session-selection.js +1 -1
- package/lib/public/js/hooks/use-hash-location.js +1 -1
- package/lib/public/js/hooks/useAgentSessions.js +1 -1
- package/lib/public/js/hooks/usePolling.js +1 -1
- package/lib/public/js/tailwind-config.js +39 -0
- package/lib/public/login.html +3 -18
- package/lib/public/setup.html +2 -18
- package/lib/server/init/register-server-routes.js +2 -0
- package/lib/server/routes/nodes.js +10 -2
- package/lib/server/routes/pairings.js +5 -1
- package/lib/server/routes/system.js +5 -0
- package/lib/server/routes/watchdog.js +15 -0
- package/lib/server/watchdog.js +137 -51
- package/lib/server.js +2 -0
- package/package.json +14 -3
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { h } from "
|
|
2
|
-
import { useMemo, useState } from "
|
|
3
|
-
import htm from "
|
|
1
|
+
import { h } from "preact";
|
|
2
|
+
import { useMemo, useState } from "preact/hooks";
|
|
3
|
+
import htm from "htm";
|
|
4
4
|
import { SegmentedControl } from "../segmented-control.js";
|
|
5
5
|
import { Badge } from "../badge.js";
|
|
6
6
|
import {
|
|
@@ -134,7 +134,7 @@ const renderInsightRow = ({
|
|
|
134
134
|
const topRow = rows[0];
|
|
135
135
|
const overflowRows = rows.slice(1);
|
|
136
136
|
return html`
|
|
137
|
-
<div class="rounded-lg border border-border bg-
|
|
137
|
+
<div class="rounded-lg border border-border bg-field px-3 py-2 space-y-1.5">
|
|
138
138
|
<button
|
|
139
139
|
type="button"
|
|
140
140
|
class="w-full text-left hover:brightness-110 transition"
|
|
@@ -142,8 +142,8 @@ const renderInsightRow = ({
|
|
|
142
142
|
>
|
|
143
143
|
<div class="flex items-start justify-between gap-3">
|
|
144
144
|
<div class="min-w-0">
|
|
145
|
-
<div class="text-sm text-
|
|
146
|
-
<div class="text-xs text-
|
|
145
|
+
<div class="text-sm text-bright truncate">${topRow.jobName}</div>
|
|
146
|
+
<div class="text-xs text-fg-muted truncate mt-1">
|
|
147
147
|
${`${topRow.primaryLabel} · ${topRow.secondaryLabel}`}
|
|
148
148
|
</div>
|
|
149
149
|
</div>
|
|
@@ -157,7 +157,7 @@ const renderInsightRow = ({
|
|
|
157
157
|
? html`
|
|
158
158
|
<details class="group">
|
|
159
159
|
<summary
|
|
160
|
-
class="list-none cursor-pointer text-[11px] text-
|
|
160
|
+
class="list-none cursor-pointer text-[11px] text-fg-muted hover:text-body"
|
|
161
161
|
>
|
|
162
162
|
Show more
|
|
163
163
|
</summary>
|
|
@@ -172,17 +172,17 @@ const renderInsightRow = ({
|
|
|
172
172
|
>
|
|
173
173
|
<div class="flex items-start justify-between gap-3">
|
|
174
174
|
<div class="min-w-0">
|
|
175
|
-
<div class="text-sm text-
|
|
175
|
+
<div class="text-sm text-body truncate">
|
|
176
176
|
${row.jobName}
|
|
177
177
|
</div>
|
|
178
178
|
<div
|
|
179
|
-
class="text-[11px] text-
|
|
179
|
+
class="text-[11px] text-fg-muted truncate mt-1"
|
|
180
180
|
>
|
|
181
181
|
${`${row.primaryLabel} · ${row.secondaryLabel}`}
|
|
182
182
|
</div>
|
|
183
183
|
</div>
|
|
184
184
|
<div
|
|
185
|
-
class="text-[11px] uppercase tracking-wide text-
|
|
185
|
+
class="text-[11px] uppercase tracking-wide text-fg-muted"
|
|
186
186
|
>
|
|
187
187
|
#${index + 2}
|
|
188
188
|
</div>
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { h } from "
|
|
2
|
-
import { useMemo } from "
|
|
3
|
-
import htm from "
|
|
1
|
+
import { h } from "preact";
|
|
2
|
+
import { useMemo } from "preact/hooks";
|
|
3
|
+
import htm from "htm";
|
|
4
4
|
import { ActionButton } from "../action-button.js";
|
|
5
5
|
import { formatTokenCount } from "./cron-helpers.js";
|
|
6
6
|
import { CronJobUsage } from "./cron-job-usage.js";
|
|
@@ -54,7 +54,7 @@ export const CronJobDetail = ({
|
|
|
54
54
|
}) => {
|
|
55
55
|
if (!job) {
|
|
56
56
|
return html`
|
|
57
|
-
<div class="h-full flex items-center justify-center text-sm text-
|
|
57
|
+
<div class="h-full flex items-center justify-center text-sm text-fg-muted">
|
|
58
58
|
Select a cron job to view details.
|
|
59
59
|
</div>
|
|
60
60
|
`;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { h } from "
|
|
2
|
-
import { useEffect, useMemo, useRef, useState } from "
|
|
3
|
-
import htm from "
|
|
1
|
+
import { h } from "preact";
|
|
2
|
+
import { useEffect, useMemo, useRef, useState } from "preact/hooks";
|
|
3
|
+
import htm from "htm";
|
|
4
4
|
import {
|
|
5
5
|
formatCronScheduleLabel,
|
|
6
6
|
formatRelativeCompact,
|
|
@@ -350,7 +350,7 @@ export const CronJobList = ({
|
|
|
350
350
|
</div>
|
|
351
351
|
${filteredJobs.length === 0
|
|
352
352
|
? html`
|
|
353
|
-
<div class="text-xs text-
|
|
353
|
+
<div class="text-xs text-fg-muted px-1 py-2">No cron jobs match your search.</div>
|
|
354
354
|
`
|
|
355
355
|
: null}
|
|
356
356
|
</div>
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { h } from "
|
|
2
|
-
import { useMemo } from "
|
|
3
|
-
import htm from "
|
|
1
|
+
import { h } from "preact";
|
|
2
|
+
import { useMemo } from "preact/hooks";
|
|
3
|
+
import htm from "htm";
|
|
4
4
|
import { ActionButton } from "../action-button.js";
|
|
5
5
|
import { SegmentedControl } from "../segmented-control.js";
|
|
6
6
|
import { ToggleSwitch } from "../toggle-switch.js";
|
|
@@ -113,22 +113,22 @@ export const CronJobSettingsCard = ({
|
|
|
113
113
|
return html`
|
|
114
114
|
<section class="bg-surface border border-border rounded-xl p-4 space-y-3">
|
|
115
115
|
<div class="flex items-center justify-between gap-3">
|
|
116
|
-
<div class="text-xs text-
|
|
116
|
+
<div class="text-xs text-fg-muted">ID: <code>${job.id}</code></div>
|
|
117
117
|
</div>
|
|
118
118
|
<div class="grid grid-cols-2 gap-2 text-xs">
|
|
119
119
|
<div class=${kMetaCardClassName}>
|
|
120
|
-
<div class="text-
|
|
121
|
-
<div class="text-
|
|
120
|
+
<div class="text-fg-muted">Schedule</div>
|
|
121
|
+
<div class="text-body font-mono">
|
|
122
122
|
${formatCronScheduleLabel(job.schedule, {
|
|
123
123
|
includeTimeZoneWhenDifferent: true,
|
|
124
124
|
})}
|
|
125
125
|
</div>
|
|
126
126
|
</div>
|
|
127
127
|
<div class=${kMetaCardClassName}>
|
|
128
|
-
<div class="text-
|
|
129
|
-
<div class="text-
|
|
128
|
+
<div class="text-fg-muted">Next run</div>
|
|
129
|
+
<div class="text-body font-mono">
|
|
130
130
|
${formatNextRunAbsolute(job?.state?.nextRunAtMs)}
|
|
131
|
-
<span class="text-
|
|
131
|
+
<span class="text-fg-muted">
|
|
132
132
|
${` (${formatNextRunRelativeMs(job?.state?.nextRunAtMs)})`}
|
|
133
133
|
</span>
|
|
134
134
|
</div>
|
|
@@ -136,7 +136,7 @@ export const CronJobSettingsCard = ({
|
|
|
136
136
|
</div>
|
|
137
137
|
<div class="grid grid-cols-3 gap-2 text-xs">
|
|
138
138
|
<div class=${kMetaCardClassName}>
|
|
139
|
-
<div class="text-
|
|
139
|
+
<div class="text-fg-muted">Session target</div>
|
|
140
140
|
<div class="pt-1">
|
|
141
141
|
<${SegmentedControl}
|
|
142
142
|
options=${kSessionTargetOptions}
|
|
@@ -150,7 +150,7 @@ export const CronJobSettingsCard = ({
|
|
|
150
150
|
</div>
|
|
151
151
|
</div>
|
|
152
152
|
<div class=${kMetaCardClassName}>
|
|
153
|
-
<div class="text-
|
|
153
|
+
<div class="text-fg-muted">Wake mode</div>
|
|
154
154
|
<div class="pt-1">
|
|
155
155
|
<${SegmentedControl}
|
|
156
156
|
options=${kWakeModeOptions}
|
|
@@ -164,7 +164,7 @@ export const CronJobSettingsCard = ({
|
|
|
164
164
|
</div>
|
|
165
165
|
</div>
|
|
166
166
|
<div class=${kMetaCardClassName}>
|
|
167
|
-
<div class="text-
|
|
167
|
+
<div class="text-fg-muted">Delivery</div>
|
|
168
168
|
<div class="pt-1">
|
|
169
169
|
<select
|
|
170
170
|
value=${deliverySelectValue}
|
|
@@ -187,7 +187,7 @@ export const CronJobSettingsCard = ({
|
|
|
187
187
|
}));
|
|
188
188
|
}}
|
|
189
189
|
disabled=${savingChanges}
|
|
190
|
-
class="w-full bg-
|
|
190
|
+
class="w-full bg-field border border-border rounded-lg px-2 py-1.5 text-[11px] text-body focus:border-fg-muted"
|
|
191
191
|
>
|
|
192
192
|
<option value=${kDeliveryNoneValue}>None</option>
|
|
193
193
|
${deliverySessionOptions.map(
|
|
@@ -200,12 +200,12 @@ export const CronJobSettingsCard = ({
|
|
|
200
200
|
</select>
|
|
201
201
|
</div>
|
|
202
202
|
${loadingDeliverySessions
|
|
203
|
-
? html`<div class="text-[11px] text-
|
|
203
|
+
? html`<div class="text-[11px] text-fg-muted pt-1">
|
|
204
204
|
Loading delivery sessions...
|
|
205
205
|
</div>`
|
|
206
206
|
: null}
|
|
207
207
|
${deliverySessionsError
|
|
208
|
-
? html`<div class="text-[11px] text-
|
|
208
|
+
? html`<div class="text-[11px] text-status-error-muted pt-1">
|
|
209
209
|
${deliverySessionsError}
|
|
210
210
|
</div>`
|
|
211
211
|
: null}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { h } from "
|
|
2
|
-
import { useEffect, useMemo, useRef, useState } from "
|
|
3
|
-
import htm from "
|
|
1
|
+
import { h } from "preact";
|
|
2
|
+
import { useEffect, useMemo, useRef, useState } from "preact/hooks";
|
|
3
|
+
import htm from "htm";
|
|
4
|
+
import Chart from "chart.js/auto";
|
|
4
5
|
import { formatCost, formatTokenCount } from "./cron-helpers.js";
|
|
5
6
|
import { formatChartBucketLabel, formatDurationCompactMs } from "../../lib/format.js";
|
|
6
7
|
import { SegmentedControl } from "../segmented-control.js";
|
|
@@ -165,7 +166,6 @@ export const CronJobTrendsPanel = ({
|
|
|
165
166
|
);
|
|
166
167
|
useEffect(() => {
|
|
167
168
|
const canvas = chartCanvasRef.current;
|
|
168
|
-
const Chart = window.Chart;
|
|
169
169
|
if (!canvas || !Chart) return;
|
|
170
170
|
if (chartInstanceRef.current) {
|
|
171
171
|
chartInstanceRef.current.destroy();
|
|
@@ -313,7 +313,7 @@ export const CronJobTrendsPanel = ({
|
|
|
313
313
|
<canvas ref=${chartCanvasRef}></canvas>
|
|
314
314
|
</div>
|
|
315
315
|
`
|
|
316
|
-
: html`<div class="text-xs text-
|
|
316
|
+
: html`<div class="text-xs text-fg-muted">No run data in this window yet.</div>`}
|
|
317
317
|
</section>
|
|
318
318
|
`;
|
|
319
319
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { h } from "
|
|
2
|
-
import htm from "
|
|
1
|
+
import { h } from "preact";
|
|
2
|
+
import htm from "htm";
|
|
3
3
|
import { formatCost, formatTokenCount } from "./cron-helpers.js";
|
|
4
4
|
import { formatDurationCompactMs } from "../../lib/format.js";
|
|
5
5
|
import { SegmentedControl } from "../segmented-control.js";
|
|
@@ -42,35 +42,35 @@ export const CronJobUsage = ({ usage = null, usageDays = 30, onSetUsageDays = ()
|
|
|
42
42
|
</div>
|
|
43
43
|
<div class="grid grid-cols-3 gap-2 text-xs">
|
|
44
44
|
<div class="ac-surface-inset rounded-lg p-2">
|
|
45
|
-
<div class="text-
|
|
46
|
-
<div class="text-
|
|
45
|
+
<div class="text-fg-muted">Total runs</div>
|
|
46
|
+
<div class="text-body font-mono">${formatTokenCount(totalRuns)}</div>
|
|
47
47
|
</div>
|
|
48
48
|
<div class="ac-surface-inset rounded-lg p-2">
|
|
49
|
-
<div class="text-
|
|
50
|
-
<div class="text-
|
|
49
|
+
<div class="text-fg-muted">Total tokens</div>
|
|
50
|
+
<div class="text-body font-mono">${formatTokenCount(totalTokens)}</div>
|
|
51
51
|
</div>
|
|
52
52
|
<div class="ac-surface-inset rounded-lg p-2">
|
|
53
|
-
<div class="text-
|
|
54
|
-
<div class="text-
|
|
53
|
+
<div class="text-fg-muted">Total cost</div>
|
|
54
|
+
<div class="text-body font-mono">${formatCost(totalCost)}</div>
|
|
55
55
|
</div>
|
|
56
56
|
<div class="ac-surface-inset rounded-lg p-2">
|
|
57
|
-
<div class="text-
|
|
58
|
-
<div class="text-
|
|
57
|
+
<div class="text-fg-muted">Avg run time</div>
|
|
58
|
+
<div class="text-body font-mono">
|
|
59
59
|
${averageDurationMs > 0 ? formatDurationCompactMs(averageDurationMs) : "—"}
|
|
60
60
|
</div>
|
|
61
61
|
</div>
|
|
62
62
|
<div class="ac-surface-inset rounded-lg p-2">
|
|
63
|
-
<div class="text-
|
|
64
|
-
<div class="text-
|
|
63
|
+
<div class="text-fg-muted">Avg tokens/run</div>
|
|
64
|
+
<div class="text-body font-mono">${formatTokenCount(averageTokensPerRun)}</div>
|
|
65
65
|
</div>
|
|
66
66
|
<div class="ac-surface-inset rounded-lg p-2">
|
|
67
|
-
<div class="text-
|
|
68
|
-
<div class="text-
|
|
67
|
+
<div class="text-fg-muted">Avg cost/run</div>
|
|
68
|
+
<div class="text-body font-mono">${formatCost(averageCostPerRun)}</div>
|
|
69
69
|
</div>
|
|
70
70
|
</div>
|
|
71
|
-
<div class="text-xs text-
|
|
71
|
+
<div class="text-xs text-fg-muted">
|
|
72
72
|
Dominant model:${" "}
|
|
73
|
-
<span class="text-
|
|
73
|
+
<span class="text-body font-mono">${resolveDominantModel(usage)}</span>
|
|
74
74
|
</div>
|
|
75
75
|
</section>
|
|
76
76
|
`;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { h } from "
|
|
2
|
-
import { useEffect, useMemo, useState } from "
|
|
3
|
-
import htm from "
|
|
1
|
+
import { h } from "preact";
|
|
2
|
+
import { useEffect, useMemo, useState } from "preact/hooks";
|
|
3
|
+
import htm from "htm";
|
|
4
4
|
import {
|
|
5
5
|
buildCronOptimizationWarnings,
|
|
6
6
|
formatTokenCount,
|
|
@@ -33,10 +33,10 @@ const kRunStatusFilterOptions = [
|
|
|
33
33
|
];
|
|
34
34
|
|
|
35
35
|
const warningClassName = (tone) => {
|
|
36
|
-
if (tone === "error") return "border-
|
|
36
|
+
if (tone === "error") return "border-status-error-border bg-status-error-bg text-status-error";
|
|
37
37
|
if (tone === "warning")
|
|
38
|
-
return "border-
|
|
39
|
-
return "border-border bg-
|
|
38
|
+
return "border-status-warning-border bg-status-warning-bg text-status-warning";
|
|
39
|
+
return "border-border bg-field text-body";
|
|
40
40
|
};
|
|
41
41
|
|
|
42
42
|
const formatWarningsAttentionText = (warnings = []) => {
|
|
@@ -277,21 +277,21 @@ export const CronOverview = ({
|
|
|
277
277
|
<div class="flex items-center justify-between gap-2">
|
|
278
278
|
<div class="inline-flex items-center gap-2 min-w-0">
|
|
279
279
|
<${ErrorWarningLineIcon}
|
|
280
|
-
className="w-4 h-4 text-
|
|
280
|
+
className="w-4 h-4 text-status-warning shrink-0"
|
|
281
281
|
/>
|
|
282
|
-
<div class="text-xs text-
|
|
282
|
+
<div class="text-xs text-status-warning truncate">
|
|
283
283
|
${formatWarningsAttentionText(warnings)}
|
|
284
284
|
</div>
|
|
285
285
|
</div>
|
|
286
286
|
<span
|
|
287
|
-
class="text-
|
|
287
|
+
class="text-fg-muted text-xs transition-transform group-open:rotate-90"
|
|
288
288
|
>▸</span
|
|
289
289
|
>
|
|
290
290
|
</div>
|
|
291
291
|
</summary>
|
|
292
292
|
<div class="mt-3">
|
|
293
293
|
${warnings.length === 0
|
|
294
|
-
? html`<div class="text-xs text-
|
|
294
|
+
? html`<div class="text-xs text-fg-muted">
|
|
295
295
|
No warnings right now.
|
|
296
296
|
</div>`
|
|
297
297
|
: html`
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { h } from "
|
|
2
|
-
import { useEffect, useMemo, useRef, useState } from "
|
|
3
|
-
import htm from "
|
|
1
|
+
import { h } from "preact";
|
|
2
|
+
import { useEffect, useMemo, useRef, useState } from "preact/hooks";
|
|
3
|
+
import htm from "htm";
|
|
4
4
|
import { EditorSurface } from "../file-viewer/editor-surface.js";
|
|
5
5
|
import { countTextLines, shouldUseSimpleEditorMode } from "../file-viewer/utils.js";
|
|
6
6
|
import {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { h } from "
|
|
2
|
-
import htm from "
|
|
1
|
+
import { h } from "preact";
|
|
2
|
+
import htm from "htm";
|
|
3
3
|
import { SegmentedControl } from "../segmented-control.js";
|
|
4
4
|
import {
|
|
5
5
|
formatDurationCompactMs,
|
|
@@ -17,10 +17,10 @@ const runStatusClassName = (status = "") => {
|
|
|
17
17
|
const normalized = String(status || "")
|
|
18
18
|
.trim()
|
|
19
19
|
.toLowerCase();
|
|
20
|
-
if (normalized === "ok") return "text-
|
|
21
|
-
if (normalized === "error") return "text-
|
|
22
|
-
if (normalized === "skipped") return "text-
|
|
23
|
-
return "text-
|
|
20
|
+
if (normalized === "ok") return "text-status-success";
|
|
21
|
+
if (normalized === "error") return "text-status-error";
|
|
22
|
+
if (normalized === "skipped") return "text-status-warning";
|
|
23
|
+
return "text-fg-muted";
|
|
24
24
|
};
|
|
25
25
|
const runDeliveryLabel = (run) =>
|
|
26
26
|
String(run?.deliveryStatus || "not-requested");
|
|
@@ -53,23 +53,23 @@ const renderEntrySummaryRow = ({ runEntry = {}, variant = "overview" }) => {
|
|
|
53
53
|
<span class="inline-flex items-center gap-2 min-w-0">
|
|
54
54
|
${isDetail
|
|
55
55
|
? html`
|
|
56
|
-
<span class="truncate text-xs text-
|
|
56
|
+
<span class="truncate text-xs text-body">
|
|
57
57
|
${formatRowTimestamp(runEntry.ts, variant)}
|
|
58
58
|
</span>
|
|
59
59
|
`
|
|
60
60
|
: hasRunTitle
|
|
61
61
|
? html`
|
|
62
62
|
<span class="inline-flex items-center gap-2 min-w-0">
|
|
63
|
-
<span class="truncate text-xs text-
|
|
63
|
+
<span class="truncate text-xs text-body"
|
|
64
64
|
>${runTitle}</span
|
|
65
65
|
>
|
|
66
|
-
<span class="text-xs text-
|
|
66
|
+
<span class="text-xs text-fg-muted shrink-0">
|
|
67
67
|
${formatRowTimestamp(runEntry.ts, variant)}
|
|
68
68
|
</span>
|
|
69
69
|
</span>
|
|
70
70
|
`
|
|
71
71
|
: html`
|
|
72
|
-
<span class="truncate text-xs text-
|
|
72
|
+
<span class="truncate text-xs text-body">
|
|
73
73
|
${runEntry.jobId} -
|
|
74
74
|
${formatRowTimestamp(runEntry.ts, variant)}
|
|
75
75
|
</span>
|
|
@@ -77,16 +77,16 @@ const renderEntrySummaryRow = ({ runEntry = {}, variant = "overview" }) => {
|
|
|
77
77
|
</span>
|
|
78
78
|
<span class="inline-flex items-center gap-3 shrink-0 text-xs">
|
|
79
79
|
<span class=${runStatusClassName(runStatus)}>${runStatus}</span>
|
|
80
|
-
<span class="text-
|
|
80
|
+
<span class="text-fg-muted"
|
|
81
81
|
>${formatDurationCompactMs(runEntry.durationMs)}</span
|
|
82
82
|
>
|
|
83
|
-
<span class="text-
|
|
83
|
+
<span class="text-fg-muted">${formatTokenCount(runTokens)} tk</span>
|
|
84
84
|
${isDetail
|
|
85
|
-
? html`<span class="text-
|
|
85
|
+
? html`<span class="text-fg-muted"
|
|
86
86
|
>${runDeliveryLabel(runEntry)}</span
|
|
87
87
|
>`
|
|
88
88
|
: html`
|
|
89
|
-
<span class="text-
|
|
89
|
+
<span class="text-fg-muted">
|
|
90
90
|
${runEstimatedCost == null
|
|
91
91
|
? "—"
|
|
92
92
|
: `~${formatCost(runEstimatedCost)}`}
|
|
@@ -124,19 +124,19 @@ const renderCollapsedGroupRow = ({ row, rowIndex, onSelectJob = () => {} }) => {
|
|
|
124
124
|
<span class="inline-flex items-center gap-2 min-w-0">
|
|
125
125
|
<span class="ac-history-toggle shrink-0" aria-hidden="true">▸</span>
|
|
126
126
|
<span class="inline-flex items-center gap-2 min-w-0">
|
|
127
|
-
<span class="truncate text-xs text-
|
|
127
|
+
<span class="truncate text-xs text-body">
|
|
128
128
|
${row.jobName} - ${formatTokenCount(row.count)} runs
|
|
129
129
|
</span>
|
|
130
|
-
<span class="text-xs text-
|
|
130
|
+
<span class="text-xs text-fg-muted shrink-0"
|
|
131
131
|
>${timeRangeLabel}</span
|
|
132
132
|
>
|
|
133
133
|
</span>
|
|
134
134
|
</span>
|
|
135
135
|
<span class="inline-flex items-center gap-3 shrink-0 text-xs">
|
|
136
|
-
<span class="text-
|
|
136
|
+
<span class="text-fg-muted"
|
|
137
137
|
>${formatTokenCount(totalTokens)} tk</span
|
|
138
138
|
>
|
|
139
|
-
<span class="text-
|
|
139
|
+
<span class="text-fg-muted">
|
|
140
140
|
${hasAnyCost ? `~${formatCost(totalCost)}` : "—"}
|
|
141
141
|
</span>
|
|
142
142
|
</span>
|
|
@@ -168,7 +168,7 @@ const renderCollapsedGroupRow = ({ row, rowIndex, onSelectJob = () => {} }) => {
|
|
|
168
168
|
<div class="px-2.5 pt-2 pb-0.5">
|
|
169
169
|
<button
|
|
170
170
|
type="button"
|
|
171
|
-
class="text-xs px-2 py-1 rounded border border-border text-
|
|
171
|
+
class="text-xs px-2 py-1 rounded border border-border text-fg-muted hover:text-body"
|
|
172
172
|
onclick=${() => onSelectJob(row.jobId)}
|
|
173
173
|
>
|
|
174
174
|
Open ${row.jobName || row.jobId}
|
|
@@ -214,46 +214,46 @@ const renderEntryRow = ({
|
|
|
214
214
|
<div class="ac-history-body space-y-2 text-xs">
|
|
215
215
|
${runEntry.summary
|
|
216
216
|
? html`<div>
|
|
217
|
-
<span class="text-
|
|
217
|
+
<span class="text-fg-muted">Summary:</span> ${runEntry.summary}
|
|
218
218
|
</div>`
|
|
219
219
|
: null}
|
|
220
220
|
${runEntry.error
|
|
221
|
-
? html`<div class="text-
|
|
222
|
-
<span class="text-
|
|
221
|
+
? html`<div class="text-status-error">
|
|
222
|
+
<span class="text-fg-muted">Error:</span> ${runEntry.error}
|
|
223
223
|
</div>`
|
|
224
224
|
: null}
|
|
225
225
|
<div class="ac-surface-inset rounded-lg p-2.5 space-y-1.5">
|
|
226
|
-
<div class="text-
|
|
226
|
+
<div class="text-fg-muted">
|
|
227
227
|
Model:
|
|
228
|
-
<span class="text-
|
|
228
|
+
<span class="text-body font-mono"
|
|
229
229
|
>${runEntry.model || "—"}</span
|
|
230
230
|
>
|
|
231
231
|
</div>
|
|
232
|
-
<div class="text-
|
|
232
|
+
<div class="text-fg-muted">
|
|
233
233
|
Session:
|
|
234
|
-
<span class="text-
|
|
234
|
+
<span class="text-body font-mono"
|
|
235
235
|
>${runEntry.sessionKey || "—"}</span
|
|
236
236
|
>
|
|
237
237
|
</div>
|
|
238
|
-
<div class="text-
|
|
238
|
+
<div class="text-fg-muted">
|
|
239
239
|
Tokens in:
|
|
240
|
-
<span class="text-
|
|
240
|
+
<span class="text-body"
|
|
241
241
|
>${formatTokenCount(runInputTokens)}</span
|
|
242
242
|
>
|
|
243
243
|
</div>
|
|
244
|
-
<div class="text-
|
|
244
|
+
<div class="text-fg-muted">
|
|
245
245
|
Tokens out:
|
|
246
|
-
<span class="text-
|
|
246
|
+
<span class="text-body"
|
|
247
247
|
>${formatTokenCount(runOutputTokens)}</span
|
|
248
248
|
>
|
|
249
249
|
</div>
|
|
250
|
-
<div class="text-
|
|
250
|
+
<div class="text-fg-muted">
|
|
251
251
|
Total tokens:
|
|
252
|
-
<span class="text-
|
|
252
|
+
<span class="text-body">${formatTokenCount(runTokens)}</span>
|
|
253
253
|
</div>
|
|
254
|
-
<div class="text-
|
|
254
|
+
<div class="text-fg-muted">
|
|
255
255
|
Total cost:
|
|
256
|
-
<span class="text-
|
|
256
|
+
<span class="text-body">
|
|
257
257
|
${runEstimatedCost == null
|
|
258
258
|
? "—"
|
|
259
259
|
: `~${formatCost(runEstimatedCost)}`}
|
|
@@ -265,7 +265,7 @@ const renderEntryRow = ({
|
|
|
265
265
|
<div>
|
|
266
266
|
<button
|
|
267
267
|
type="button"
|
|
268
|
-
class="text-xs px-2 py-1 rounded border border-border text-
|
|
268
|
+
class="text-xs px-2 py-1 rounded border border-border text-fg-muted hover:text-body"
|
|
269
269
|
onclick=${() => onSelectJob(runEntry.jobId)}
|
|
270
270
|
>
|
|
271
271
|
Open ${runEntry.jobName || runEntry.jobId}
|
|
@@ -299,7 +299,7 @@ export const CronRunHistoryPanel = ({
|
|
|
299
299
|
<div class="flex items-start justify-between gap-3">
|
|
300
300
|
<div class="inline-flex items-center gap-3">
|
|
301
301
|
<h3 class="card-label card-label-bright">Recent runs</h3>
|
|
302
|
-
<div class="text-xs text-
|
|
302
|
+
<div class="text-xs text-fg-muted">${entryCountLabel}</div>
|
|
303
303
|
</div>
|
|
304
304
|
<div class="shrink-0 inline-flex items-center gap-2">
|
|
305
305
|
<${SegmentedControl}
|
|
@@ -323,12 +323,12 @@ export const CronRunHistoryPanel = ({
|
|
|
323
323
|
? html`
|
|
324
324
|
<div class="flex items-center">
|
|
325
325
|
<span
|
|
326
|
-
class="inline-flex items-center gap-1.5 text-xs pl-2.5 pr-2 py-1 rounded-full border border-border text-
|
|
326
|
+
class="inline-flex items-center gap-1.5 text-xs pl-2.5 pr-2 py-1 rounded-full border border-border text-body bg-field"
|
|
327
327
|
>
|
|
328
328
|
Filtered to ${activeFilterLabel}
|
|
329
329
|
<button
|
|
330
330
|
type="button"
|
|
331
|
-
class="text-
|
|
331
|
+
class="text-fg-muted hover:text-body leading-none"
|
|
332
332
|
onclick=${onClearActiveFilter}
|
|
333
333
|
aria-label="Clear trend filter"
|
|
334
334
|
>
|
|
@@ -339,7 +339,7 @@ export const CronRunHistoryPanel = ({
|
|
|
339
339
|
`
|
|
340
340
|
: null}
|
|
341
341
|
${rows.length === 0
|
|
342
|
-
? html`<div class="text-sm text-
|
|
342
|
+
? html`<div class="text-sm text-fg-muted">${emptyText}</div>`
|
|
343
343
|
: html`
|
|
344
344
|
<div class="ac-history-list">
|
|
345
345
|
${rows.map((row, rowIndex) =>
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { h } from "
|
|
2
|
-
import { useEffect, useMemo, useRef, useState } from "
|
|
3
|
-
import htm from "
|
|
1
|
+
import { h } from "preact";
|
|
2
|
+
import { useEffect, useMemo, useRef, useState } from "preact/hooks";
|
|
3
|
+
import htm from "htm";
|
|
4
|
+
import Chart from "chart.js/auto";
|
|
4
5
|
import { formatChartBucketLabel } from "../../lib/format.js";
|
|
5
6
|
import { SegmentedControl } from "../segmented-control.js";
|
|
6
7
|
import {
|
|
@@ -259,7 +260,6 @@ export const CronRunsTrendCard = ({
|
|
|
259
260
|
|
|
260
261
|
useEffect(() => {
|
|
261
262
|
const canvas = chartCanvasRef.current;
|
|
262
|
-
const Chart = window.Chart;
|
|
263
263
|
if (!canvas || !Chart) return;
|
|
264
264
|
if (chartInstanceRef.current) {
|
|
265
265
|
chartInstanceRef.current.destroy();
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { h } from "
|
|
2
|
-
import { useEffect, useMemo, useRef, useState } from "
|
|
3
|
-
import htm from "
|
|
1
|
+
import { h } from "preact";
|
|
2
|
+
import { useEffect, useMemo, useRef, useState } from "preact/hooks";
|
|
3
|
+
import htm from "htm";
|
|
4
4
|
import { ActionButton } from "../action-button.js";
|
|
5
5
|
import { AlarmLineIcon } from "../icons.js";
|
|
6
6
|
import { PageHeader } from "../page-header.js";
|
|
@@ -151,10 +151,10 @@ export const CronTab = ({ jobId = "", onSetLocation = () => {} }) => {
|
|
|
151
151
|
<div class="max-w-md w-full flex flex-col items-center gap-4">
|
|
152
152
|
<${AlarmLineIcon} className="h-12 w-12 text-cyan-400" />
|
|
153
153
|
<div class="space-y-2">
|
|
154
|
-
<h2 class="font-semibold text-lg text-
|
|
154
|
+
<h2 class="font-semibold text-lg text-bright">
|
|
155
155
|
No cron jobs yet
|
|
156
156
|
</h2>
|
|
157
|
-
<p class="text-xs text-
|
|
157
|
+
<p class="text-xs text-fg-muted leading-5">
|
|
158
158
|
Cron jobs are managed via the OpenClaw CLI. Once jobs are
|
|
159
159
|
configured, schedules and run history will appear here.
|
|
160
160
|
</p>
|
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
useMemo,
|
|
5
5
|
useRef,
|
|
6
6
|
useState,
|
|
7
|
-
} from "
|
|
7
|
+
} from "preact/hooks";
|
|
8
8
|
import { usePolling } from "../../hooks/usePolling.js";
|
|
9
9
|
import { useDestinationSessionSelection } from "../../hooks/use-destination-session-selection.js";
|
|
10
10
|
import {
|