@hhuangpanda/dsh-automation 0.0.0-stage → 0.3.34

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.
Files changed (63) hide show
  1. package/LICENSE +22 -0
  2. package/README.md +133 -2
  3. package/README.zh.md +134 -0
  4. package/cordis.patch.yml +3 -0
  5. package/docs/images/automation-overview-en.png +0 -0
  6. package/docs/images/automation-overview-zh.png +0 -0
  7. package/docs/reference.md +55 -0
  8. package/docs/reference.zh.md +55 -0
  9. package/lib/agent-configuration.d.ts +27 -0
  10. package/lib/agent-configuration.js +217 -0
  11. package/lib/api.d.ts +5 -0
  12. package/lib/api.js +253 -0
  13. package/lib/client/AutomationPanel.d.ts +9 -0
  14. package/lib/client/EmptyState.d.ts +10 -0
  15. package/lib/client/ModelSelection.d.ts +17 -0
  16. package/lib/client/ScheduleSection.d.ts +32 -0
  17. package/lib/client/SchedulerHealth.d.ts +10 -0
  18. package/lib/client/SkillPicker.d.ts +15 -0
  19. package/lib/client/TaskDetail.d.ts +34 -0
  20. package/lib/client/TaskEditor.d.ts +38 -0
  21. package/lib/client/TaskRow.d.ts +12 -0
  22. package/lib/client/editor-layout.d.ts +20 -0
  23. package/lib/client/i18n.d.ts +15 -0
  24. package/lib/client/icons.d.ts +30 -0
  25. package/lib/client/index.d.ts +6 -0
  26. package/lib/client/locales.d.ts +260 -0
  27. package/lib/client/rrule-editor.d.ts +15 -0
  28. package/lib/client/session-selection.d.ts +4 -0
  29. package/lib/client/shared.d.ts +77 -0
  30. package/lib/client/store.d.ts +40 -0
  31. package/lib/client.js +3014 -0
  32. package/lib/controller.d.ts +36 -0
  33. package/lib/controller.js +154 -0
  34. package/lib/domain.d.ts +44 -0
  35. package/lib/domain.js +473 -0
  36. package/lib/errors.d.ts +14 -0
  37. package/lib/errors.js +16 -0
  38. package/lib/im-delivery.d.ts +30 -0
  39. package/lib/im-delivery.js +69 -0
  40. package/lib/index.d.ts +25 -0
  41. package/lib/index.js +92 -0
  42. package/lib/recurrence.d.ts +14 -0
  43. package/lib/recurrence.js +203 -0
  44. package/lib/runner.d.ts +27 -0
  45. package/lib/runner.js +295 -0
  46. package/lib/runtime-marker.d.ts +3 -0
  47. package/lib/runtime-marker.js +2 -0
  48. package/lib/scheduler.d.ts +58 -0
  49. package/lib/scheduler.js +287 -0
  50. package/lib/store.d.ts +14 -0
  51. package/lib/store.js +108 -0
  52. package/lib/tool-configuration.d.ts +8 -0
  53. package/lib/tool-configuration.js +220 -0
  54. package/lib/tool-support.d.ts +67 -0
  55. package/lib/tool-support.js +47 -0
  56. package/lib/tools.d.ts +6 -0
  57. package/lib/tools.js +140 -0
  58. package/lib/types.d.ts +465 -0
  59. package/lib/types.js +99 -0
  60. package/lib/validation.d.ts +34 -0
  61. package/lib/validation.js +99 -0
  62. package/package.json +163 -4
  63. package/screenshots.json +1 -0
@@ -0,0 +1,20 @@
1
+ import React from 'react';
2
+ /** One labelled form row. */
3
+ export declare function Field({ label, children, full, hint, htmlFor }: {
4
+ label: string;
5
+ children: React.ReactNode;
6
+ full?: boolean;
7
+ hint?: string | undefined;
8
+ htmlFor?: string | undefined;
9
+ }): React.JSX.Element;
10
+ /** One titled group of form rows. */
11
+ export declare function Section({ title, children }: {
12
+ title: string;
13
+ children: React.ReactNode;
14
+ }): React.JSX.Element;
15
+ /** Advanced settings stay available without crowding the primary editing flow. */
16
+ export declare function Disclosure({ title, children }: {
17
+ title: React.ReactNode;
18
+ children: React.ReactNode;
19
+ }): React.JSX.Element;
20
+ //# sourceMappingURL=editor-layout.d.ts.map
@@ -0,0 +1,15 @@
1
+ import type { Context } from '@deepseek-ai/cordis';
2
+ import type { AutomationLocaleKey } from './locales.js';
3
+ import '@deepseek-ai/dsh-client-locale/client';
4
+ declare module '@deepseek-ai/dsh-client-ui-slots' {
5
+ interface LocaleNamespaceMap {
6
+ 'dsh-automation': AutomationLocaleKey;
7
+ }
8
+ }
9
+ export declare function installLocale(ctx: Context): () => void;
10
+ export declare function t(key: AutomationLocaleKey, params?: Record<string, unknown>): string;
11
+ export declare function useLocale(): {
12
+ t: typeof t;
13
+ locale: string;
14
+ };
15
+ //# sourceMappingURL=i18n.d.ts.map
@@ -0,0 +1,30 @@
1
+ interface IconProps {
2
+ size?: number | undefined;
3
+ className?: string | undefined;
4
+ }
5
+ export declare function IconAgentPresetOutline16(props: IconProps): import("react").JSX.Element;
6
+ export declare function IconAlarmClockOutline16(props: IconProps): import("react").JSX.Element;
7
+ export declare function IconCheckOutline16(props: IconProps): import("react").JSX.Element;
8
+ export declare function IconChevronDownOutline14(props: IconProps): import("react").JSX.Element;
9
+ export declare function IconChevronLeftOutline14(props: IconProps): import("react").JSX.Element;
10
+ export declare function IconChevronRightOutline14(props: IconProps): import("react").JSX.Element;
11
+ export declare function IconClockOutline16(props: IconProps): import("react").JSX.Element;
12
+ export declare function IconCloseOutline16(props: IconProps): import("react").JSX.Element;
13
+ export declare function IconCopyOutline16(props: IconProps): import("react").JSX.Element;
14
+ export declare function IconEditOutline16(props: IconProps): import("react").JSX.Element;
15
+ export declare function IconEllipsisOutline16(props: IconProps): import("react").JSX.Element;
16
+ export declare function IconFolderOpenOutline16(props: IconProps): import("react").JSX.Element;
17
+ export declare function IconLoadingOutline16(props: IconProps): import("react").JSX.Element;
18
+ export declare function IconPauseOutline16(props: IconProps): import("react").JSX.Element;
19
+ export declare function IconPlayOutline16(props: IconProps): import("react").JSX.Element;
20
+ export declare function IconPlusOutline16(props: IconProps): import("react").JSX.Element;
21
+ export declare function IconQuestionOutline14(props: IconProps): import("react").JSX.Element;
22
+ export declare function IconRefreshOutline16(props: IconProps): import("react").JSX.Element;
23
+ export declare function IconRightUpOutline14(props: IconProps): import("react").JSX.Element;
24
+ export declare function IconRightUpOutline16(props: IconProps): import("react").JSX.Element;
25
+ export declare function IconSearchOutline16(props: IconProps): import("react").JSX.Element;
26
+ export declare function IconStopFill16(props: IconProps): import("react").JSX.Element;
27
+ export declare function IconTrashOutline16(props: IconProps): import("react").JSX.Element;
28
+ export declare function IconWarningOutline16(props: IconProps): import("react").JSX.Element;
29
+ export {};
30
+ //# sourceMappingURL=icons.d.ts.map
@@ -0,0 +1,6 @@
1
+ import type { Context } from '@deepseek-ai/cordis';
2
+ import '@deepseek-ai/dsh-client-ui-layout/client';
3
+ import '@deepseek-ai/dsh-client-ui-sidebar/client';
4
+ export declare const inject: string[];
5
+ export declare function apply(ctx: Context): () => void;
6
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1,260 @@
1
+ export declare const en: {
2
+ readonly automations: "Automations";
3
+ readonly openAutomations: "Open Automations";
4
+ readonly newAutomation: "New automation";
5
+ readonly guidedCreationPrompt: "Help me create a new automation for this workspace. Ask only for missing essentials. Use automation_options before selecting Host ids. Before creating it, preview Name, Schedule/time zone, Workspace, Agent preset, Provider/Model, Reasoning effort (default or a supported level), ordered Skills, exact Host Permission, Notifications, and failure-pause policy, including any approval warning; then wait for my explicit confirmation. Do not call automation_create until I confirm.";
6
+ readonly refresh: "Refresh";
7
+ readonly close: "Close";
8
+ readonly details: "Details";
9
+ readonly configuration: "Settings";
10
+ readonly loadFailed: "Could not load tasks";
11
+ readonly loadFailedHint: "Check the connection and try again. No tasks have been changed.";
12
+ readonly noScheduledRun: "No upcoming run";
13
+ readonly noFilteredTasks: "No tasks in this view";
14
+ readonly resetFilters: "Show all tasks";
15
+ readonly discardTitle: "Discard changes?";
16
+ readonly discardDescription: "Your changes have not been saved. Keep editing or discard them to continue.";
17
+ readonly keepEditing: "Keep editing";
18
+ readonly discardChanges: "Discard changes";
19
+ readonly unsavedChanges: "Unsaved changes";
20
+ readonly editorConfigInvalid: "Review agent execution and permissions: some selected options are unavailable or incomplete.";
21
+ readonly editorRequiredFields: "Complete the required fields; values cannot contain only spaces.";
22
+ readonly copy: "Copy";
23
+ readonly taskCount: "Tasks · {count}";
24
+ readonly loading: "Loading automations…";
25
+ readonly noAutomations: "Start with an idea";
26
+ readonly createHint: "Give recurring work a schedule. Choose an example or start a new task, then confirm what to do and when in a conversation.";
27
+ readonly exampleDraftHint: "Nothing is sent automatically. Review or rewrite the prompt, then send it when ready.";
28
+ readonly creatingConversation: "Opening a new conversation…";
29
+ readonly workspaceUnavailable: "Open a workspace before creating an automation.";
30
+ readonly newConversationFailed: "Could not open a new conversation: {error}";
31
+ readonly exampleReleaseTitle: "Tomorrow’s release check";
32
+ readonly exampleReleaseDescription: "Tomorrow 09:00 · read only · failures only";
33
+ readonly exampleReleasePrompt: "Create a one-time automation for tomorrow at 9:00 AM in my current time zone. Name it “Release readiness check”. When it runs, inspect this workspace for release blockers and run relevant existing checks without modifying source files. End with Ready or Blocked, followed by blockers and evidence. Use read-only permission and notify me only if the run fails. Before creating it, show the complete creation preview and wait for my confirmation.";
34
+ readonly exampleDependenciesTitle: "Monday dependency watch";
35
+ readonly exampleDependenciesDescription: "Mondays 09:30 · read only · every run";
36
+ readonly exampleDependenciesPrompt: "Create a recurring automation for every Monday at 9:30 AM in my current time zone. Name it “Dependency watch”. When it runs, inspect dependency manifests and lockfiles for important updates, compatibility risks, and security concerns without modifying files. Report high-risk findings first and give a concrete recommendation for each. Use read-only permission, notify me after every run, and pause after 3 consecutive failures. Before creating it, show the complete creation preview and wait for my confirmation.";
37
+ readonly exampleHandoffTitle: "Weekday handoff";
38
+ readonly exampleHandoffDescription: "Weekdays 18:00 · read only · every run";
39
+ readonly exampleHandoffPrompt: "Create a recurring automation for every weekday at 6:00 PM in my current time zone. Name it “Daily handoff”. When it runs, inspect today’s workspace changes without modifying files and produce a concise handoff with Completed, Decisions, Next actions, and Blockers. Use read-only permission and notify me after every run. Before creating it, show the complete creation preview and wait for my confirmation.";
40
+ readonly once: "Once";
41
+ readonly next: "Next";
42
+ readonly schedule: "Schedule";
43
+ readonly workspace: "Workspace";
44
+ readonly executionDestination: "Execution destination";
45
+ readonly executionMode: "Session mode";
46
+ readonly executionExisting: "Use an existing session";
47
+ readonly targetSession: "Target session";
48
+ readonly selectSession: "Select a session";
49
+ readonly currentSession: "Current session";
50
+ readonly sessionSearch: "Search session title or ID";
51
+ readonly sessionWorkspaceHint: "Only sessions in this task’s workspace: {cwd}";
52
+ readonly pinnedSessionHint: "Append each run to this session with its existing context and Agent/model configuration; skills are not reloaded. The task’s permission preset is applied to the session. Busy or unavailable sessions fail without creating a new one.";
53
+ readonly sessionTargetLocked: "Wait until queued or running work finishes before changing the session.";
54
+ readonly sessionsLoading: "Loading sessions…";
55
+ readonly sessionsFailure: "Could not refresh sessions: {error}";
56
+ readonly sessionsNotReady: "No session list was received. Try again.";
57
+ readonly noSessionMatches: "No matching sessions in this workspace.";
58
+ readonly targetSessionUnavailable: "The saved session is unavailable in this workspace. Select another session or use a new session.";
59
+ readonly sessionTargetSaveHint: "Saving applies this execution destination to future runs: {target}.";
60
+ readonly executionFresh: "New session for every run";
61
+ readonly executionPinned: "Continue existing session · {sessionId} · fallback: fail";
62
+ readonly permission: "Permission";
63
+ readonly permissionReadOnly: "Read only";
64
+ readonly permissionFullAccess: "Full access";
65
+ readonly agentExecution: "Agent execution";
66
+ readonly agentPreset: "Agent preset";
67
+ readonly provider: "Provider";
68
+ readonly model: "Model";
69
+ readonly reasoningEffort: "Reasoning effort";
70
+ readonly reasoningDefault: "Default (no override)";
71
+ readonly reasoningDefaultShort: "Default";
72
+ readonly modelAndReasoning: "Model and reasoning";
73
+ readonly reasoningHint: "Default leaves reasoning settings unchanged. Other levels come from the selected model.";
74
+ readonly reasoningSelectModel: "Choose a provider and model to set a reasoning level.";
75
+ readonly reasoningUnsupported: "This model does not offer selectable reasoning levels.";
76
+ readonly reasoningUnavailable: "The Host did not return reasoning options. Restart DSH if the plugin was just updated.";
77
+ readonly reasoningFailure: "Could not load reasoning levels: {error}";
78
+ readonly reasoningSession: "Use target session settings";
79
+ readonly selectedSkills: "Selected skills";
80
+ readonly noSelectedSkills: "No selected skills";
81
+ readonly noSkills: "No user-invocable skills are available for this preset.";
82
+ readonly modelInvocable: "also model-invocable";
83
+ readonly hostDefault: "Host default";
84
+ readonly unavailable: "unavailable";
85
+ readonly notInCatalog: "not listed (validated when saved)";
86
+ readonly optionsLoading: "Loading Host options…";
87
+ readonly optionsFailure: "Could not load Host options: {error}";
88
+ readonly providerFailure: "{provider} model catalog failed: {error}";
89
+ readonly selectModel: "Select a model";
90
+ readonly approvalAskWarning: "This permission asks for approval. Unattended runs never auto-approve and may wait until their timeout.";
91
+ readonly confirmPermissionChange: "I confirm future runs may use {permission}.";
92
+ readonly messageDelivery: "Message delivery";
93
+ readonly deliveryEnabled: "Send via dsh-im";
94
+ readonly deliveryHint: "Enabling sends results outside DSH. Saved changes apply to future runs.";
95
+ readonly deliveryHelp: "About message delivery";
96
+ readonly deliveryHelpText: "Send Automation results and failure reports through dsh-im installed on the same Host. Configure a bot and save a target in dsh-im first. No pinned Session or two-way sync is required.";
97
+ readonly deliveryBot: "Bot";
98
+ readonly deliveryTarget: "Saved target";
99
+ readonly selectDeliveryBot: "Select a bot";
100
+ readonly selectDeliveryTarget: "Select a saved target";
101
+ readonly deliveryLocked: "Wait until queued or running work finishes before changing delivery.";
102
+ readonly deliveryLoading: "Loading delivery options…";
103
+ readonly deliveryLoadFailed: "Could not load delivery options: {error}";
104
+ readonly deliveryUnavailable: "dsh-im delivery is unavailable. You can keep the saved destination or turn delivery off.";
105
+ readonly deliverySavedUnavailable: "The saved bot or target is unavailable. Keep it unchanged, choose another, or turn delivery off.";
106
+ readonly deliveryNoBots: "No bots available. Configure a bot in dsh-im, then refresh.";
107
+ readonly deliveryNoTargets: "No saved targets. Add a target in dsh-im settings, then refresh.";
108
+ readonly deliverySaveHint: "Saving sends future task results and failure reports outside DSH to {bot} / {target}.";
109
+ readonly deliverySending: "Sending";
110
+ readonly deliverySent: "Platform accepted";
111
+ readonly deliveryFailed: "Delivery failed";
112
+ readonly deliveryUnknown: "Delivery unknown";
113
+ readonly deliveryError: "Message delivery: {error}";
114
+ readonly deliveryAttemptedAt: "Delivery attempted";
115
+ readonly deliveryFinishedAt: "Delivery finished";
116
+ readonly notifications: "Notifications";
117
+ readonly notificationFailures: "Failures only";
118
+ readonly notificationAlways: "Every completion";
119
+ readonly notificationNever: "Never";
120
+ readonly pauseAfterFailures: "Pause after 3 failures";
121
+ readonly enabled: "Enabled";
122
+ readonly disabled: "Disabled";
123
+ readonly consecutiveFailures: "Consecutive failures";
124
+ readonly unreadNotifications: "{count} unread automation notifications";
125
+ readonly runNow: "Run now";
126
+ readonly retry: "Retry";
127
+ readonly stopRun: "Stop run";
128
+ readonly pause: "Pause";
129
+ readonly resume: "Resume";
130
+ readonly resumeAndRun: "Resume & run";
131
+ readonly openLatestSession: "Open latest session";
132
+ readonly edit: "Edit";
133
+ readonly editTask: "Edit automation";
134
+ readonly editFutureRunsHint: "Changes apply to future runs.";
135
+ readonly sectionBasics: "Basics";
136
+ readonly nameLabel: "Name";
137
+ readonly promptLabel: "Instructions";
138
+ readonly scheduleType: "Schedule type";
139
+ readonly oneTimeSchedule: "One time";
140
+ readonly recurringSchedule: "Recurring";
141
+ readonly runAt: "Run at";
142
+ readonly recurrenceRule: "Recurrence";
143
+ readonly ruleMode: "Recurrence editor mode";
144
+ readonly visualMode: "Visual";
145
+ readonly advancedMode: "Advanced RRULE";
146
+ readonly advancedRuleHint: "Use a single RFC 5545 RRULE without DTSTART.";
147
+ readonly unsupportedRuleHint: "This rule uses advanced options. Edit the RRULE string or simplify it before switching to Visual.";
148
+ readonly frequency: "Frequency";
149
+ readonly frequencyDaily: "Daily";
150
+ readonly frequencyWeekly: "Weekly";
151
+ readonly frequencyMonthly: "Monthly";
152
+ readonly everyDay: "Every day";
153
+ readonly everyDays: "Every {count} days";
154
+ readonly everyWeek: "Every week";
155
+ readonly everyWeeks: "Every {count} weeks";
156
+ readonly everyMonth: "Every month";
157
+ readonly everyMonths: "Every {count} months";
158
+ readonly dayOfMonth: "day {day}";
159
+ readonly repeatEvery: "Repeat every";
160
+ readonly intervalDays: "day(s)";
161
+ readonly intervalWeeks: "week(s)";
162
+ readonly intervalMonths: "month(s)";
163
+ readonly repeatOn: "Repeat on";
164
+ readonly monthlyOnDay: "Day of month";
165
+ readonly useStartDayHint: "No selection uses the weekday from the start date.";
166
+ readonly ends: "Ends";
167
+ readonly endsNever: "Never";
168
+ readonly endsAfter: "After a number of runs";
169
+ readonly endsOnDate: "On a date";
170
+ readonly occurrences: "Number of runs";
171
+ readonly endDate: "End date";
172
+ readonly weekdayLabel: "{day}";
173
+ readonly weekdaySeparator: ", ";
174
+ readonly weekdayMonday: "Mon";
175
+ readonly weekdayTuesday: "Tue";
176
+ readonly weekdayWednesday: "Wed";
177
+ readonly weekdayThursday: "Thu";
178
+ readonly weekdayFriday: "Fri";
179
+ readonly weekdaySaturday: "Sat";
180
+ readonly weekdaySunday: "Sun";
181
+ readonly timeZone: "Time zone";
182
+ readonly startsAt: "Starts at";
183
+ readonly saveChanges: "Save changes";
184
+ readonly saving: "Saving…";
185
+ readonly delete: "Delete";
186
+ readonly cancel: "Cancel";
187
+ readonly confirmDelete: "Delete task";
188
+ readonly deleteConfirm: "Delete “{name}”? Existing run sessions will remain.";
189
+ readonly latestResult: "Latest result";
190
+ readonly recentRuns: "Recent runs ({count})";
191
+ readonly open: "Open";
192
+ readonly requestFailed: "Automation request failed ({status}).";
193
+ readonly taskId: "Task ID";
194
+ readonly schedulerRetrying: "Scheduling temporarily failed and will retry automatically: {error}";
195
+ readonly schedulerStopped: "Scheduling is stopped. Restart DSH to resume automations.";
196
+ readonly unknownError: "Unknown error";
197
+ readonly statusActive: "active";
198
+ readonly statusPaused: "paused";
199
+ readonly statusCompleted: "completed";
200
+ readonly statusQueued: "queued";
201
+ readonly statusRunning: "running";
202
+ readonly statusSucceeded: "succeeded";
203
+ readonly statusFailed: "failed";
204
+ readonly statusInterrupted: "interrupted";
205
+ readonly statusOutcomeUnknown: "outcome unknown";
206
+ readonly statusTimedOut: "timed out";
207
+ readonly statusCanceled: "canceled";
208
+ readonly triggerManual: "manual";
209
+ readonly triggerScheduled: "scheduled";
210
+ readonly searchPlaceholder: "Search automations";
211
+ readonly filterAll: "All";
212
+ readonly filterActive: "Active";
213
+ readonly filterPaused: "Paused";
214
+ readonly filterCompleted: "Completed";
215
+ readonly noMatches: "No automation matches “{query}”.";
216
+ readonly clearSearch: "Clear search";
217
+ readonly selectTaskHint: "Select an automation to see its schedule, configuration, and run history.";
218
+ readonly backToList: "Back to list";
219
+ readonly moreActions: "More actions";
220
+ readonly overview: "Overview";
221
+ readonly runHistory: "Run history";
222
+ readonly noRuns: "No run records.";
223
+ readonly deleteRun: "Delete record";
224
+ readonly deletingRun: "Deleting…";
225
+ readonly deleteRunTitle: "Delete this run record?";
226
+ readonly deleteRunConfirm: "Only this run record will be deleted. Its session and sent messages are kept, and future runs are unaffected. This cannot be undone.";
227
+ readonly deleteRunBlocked: "Wait until execution and message delivery have finished before deleting this record.";
228
+ readonly deleteRunFailed: "Could not delete the record: {error}. You can try again.";
229
+ readonly schedulerHealthy: "Scheduler healthy";
230
+ readonly schedulerHealthRetrying: "Scheduler retrying";
231
+ readonly schedulerHealthStopped: "Scheduler stopped";
232
+ readonly schedulerLastError: "Last error";
233
+ readonly schedulerLastFailedAt: "Last failed";
234
+ readonly schedulerRetryAt: "Next retry";
235
+ readonly schedulerFailureCount: "Consecutive scheduling failures";
236
+ readonly createdAt: "Created";
237
+ readonly createdBySession: "Created in session";
238
+ readonly pausedAt: "Paused at";
239
+ readonly pausedNextRunAt: "Next run when resumed";
240
+ readonly runId: "Run ID";
241
+ readonly enqueuedAt: "Queued";
242
+ readonly startedAt: "Started";
243
+ readonly finishedAt: "Finished";
244
+ readonly duration: "Duration";
245
+ readonly trigger: "Trigger";
246
+ readonly runTarget: "Run target";
247
+ readonly skillSearchPlaceholder: "Filter skills";
248
+ readonly noSkillMatches: "No skill matches the filter.";
249
+ readonly selectedCount: "{count} selected";
250
+ readonly clearSkills: "Clear all";
251
+ readonly openSession: "Open session";
252
+ readonly copied: "Copied";
253
+ readonly tasksHeading: "Automations";
254
+ readonly deleteTitle: "Delete automation";
255
+ readonly editingTask: "Editing “{name}”";
256
+ readonly requiresWorkspace: "Open a workspace first to create an automation.";
257
+ };
258
+ export type AutomationLocaleKey = keyof typeof en;
259
+ export declare const zh: Record<AutomationLocaleKey, string>;
260
+ //# sourceMappingURL=locales.d.ts.map
@@ -0,0 +1,15 @@
1
+ export declare const WEEKDAYS: readonly ["MO", "TU", "WE", "TH", "FR", "SA", "SU"];
2
+ export type Weekday = typeof WEEKDAYS[number];
3
+ export interface CommonRRule {
4
+ frequency: 'DAILY' | 'WEEKLY' | 'MONTHLY';
5
+ interval: string;
6
+ weekdays: Weekday[];
7
+ monthDay: string;
8
+ end: 'never' | 'count' | 'until';
9
+ count: string;
10
+ until: string;
11
+ }
12
+ export declare function defaultCommonRRule(monthDay?: string): CommonRRule;
13
+ export declare function parseCommonRRule(value: string, defaultMonthDay?: string): CommonRRule | undefined;
14
+ export declare function buildCommonRRule(rule: CommonRRule): string;
15
+ //# sourceMappingURL=rrule-editor.d.ts.map
@@ -0,0 +1,4 @@
1
+ import type { SessionListState } from '@deepseek-ai/dsh-api-session-controller/client';
2
+ /** The current conversation is the Session retained by the main view. */
3
+ export declare function selectedSessionId(sessions: Pick<SessionListState, 'byId'>): import("@deepseek-ai/dsh-session/types").SessionId | undefined;
4
+ //# sourceMappingURL=session-selection.d.ts.map
@@ -0,0 +1,77 @@
1
+ import React from 'react';
2
+ import { Button, type StateDotState, type TagTone } from '@deepseek-ai/dsh-client-ui-primitives';
3
+ import { t as translate } from './i18n.js';
4
+ /** Platform state-dot semantic for a task or run status. */
5
+ export declare function statusState(status: string): StateDotState;
6
+ /** Platform tag tone for a task or run status. */
7
+ export declare function statusTone(status: string): TagTone;
8
+ /** Localized label for every task and run status the API can return. */
9
+ export declare function statusLabel(status: string, t: typeof translate): string;
10
+ /** Localized label for a run's trigger. */
11
+ export declare function triggerLabel(trigger: string, t: typeof translate): string;
12
+ /** Absolute instant in the active locale. */
13
+ export declare function formatDate(value: string, locale: string, timeZone?: string): string;
14
+ /** Signed relative time using the largest natural clock unit. */
15
+ export declare function formatRelative(value: string, locale: string): string;
16
+ /** Wall-clock span between a run's start and finish, absent while either is. */
17
+ export declare function formatRunDuration(startedAt: string | undefined, finishedAt: string | undefined, locale: string): string | undefined;
18
+ /** Trailing path segment, for showing a workspace by folder name. */
19
+ export declare function basename(path: string): string;
20
+ /** One option of a {@link Select}. */
21
+ export interface SelectOption {
22
+ value: string;
23
+ label: string;
24
+ /** Secondary line under the label inside the menu. */
25
+ hint?: string | undefined;
26
+ disabled?: boolean | undefined;
27
+ }
28
+ /**
29
+ * Menu-backed replacement for a native `<select>`.
30
+ * @param props.value - the selected option's value.
31
+ * @param props.options - the choices, in display order.
32
+ * @returns a trigger button that opens the platform menu.
33
+ */
34
+ export declare function Select({ value, options, onChange, disabled, id, ariaLabel }: {
35
+ value: string;
36
+ options: readonly SelectOption[];
37
+ onChange: (next: string) => void;
38
+ disabled?: boolean | undefined;
39
+ id?: string | undefined;
40
+ ariaLabel?: string | undefined;
41
+ }): React.JSX.Element;
42
+ /**
43
+ * Copy an identifier to the clipboard with inline confirmation.
44
+ * @param props.value - the exact text to copy.
45
+ * @returns a compact icon button.
46
+ */
47
+ export declare function CopyButton({ value, t }: {
48
+ value: string;
49
+ t: typeof translate;
50
+ }): React.JSX.Element;
51
+ /** One labelled fact in the detail overview grid. */
52
+ export declare function Fact({ icon, label, children, full }: {
53
+ icon: React.ReactNode;
54
+ label: string;
55
+ children: React.ReactNode;
56
+ full?: boolean;
57
+ }): React.JSX.Element;
58
+ /** Status dot plus its localized label, the shared status pairing. */
59
+ export declare function StatusTag({ status, t }: {
60
+ status: string;
61
+ t: typeof translate;
62
+ }): React.JSX.Element;
63
+ /** Permission shield; the platform icon set has no equivalent. */
64
+ export declare const IconShield: ({ size }: {
65
+ size?: number;
66
+ }) => React.JSX.Element;
67
+ /** Notification bell; the platform icon set has no equivalent. */
68
+ export declare const IconBell: ({ size }: {
69
+ size?: number;
70
+ }) => React.JSX.Element;
71
+ /** Calendar; the platform icon set has no equivalent. */
72
+ export declare const IconCalendar: ({ size }: {
73
+ size?: number;
74
+ }) => React.JSX.Element;
75
+ /** Primary action button, re-exported so call sites import one module. */
76
+ export { Button };
77
+ //# sourceMappingURL=shared.d.ts.map
@@ -0,0 +1,40 @@
1
+ import type { SessionId } from '@deepseek-ai/dsh-session/types';
2
+ import type { AutomationSchedulerHealth, AutomationTaskView } from '../types.js';
3
+ /** Send one Automation API request, unwrapping the shared error envelope. */
4
+ export declare function request(path: string, options?: RequestInit): Promise<unknown>;
5
+ /** Everything the panel and the sidebar badge read from one shared poll. */
6
+ export interface AutomationSnapshot {
7
+ tasks: readonly AutomationTaskView[];
8
+ scheduler: AutomationSchedulerHealth | undefined;
9
+ /** Unread notifications summed across every task. */
10
+ unread: number;
11
+ /** True until the first response settles, so the panel can show a skeleton. */
12
+ loading: boolean;
13
+ /** Set when the first load failed; later failures keep the last good data. */
14
+ error: string | undefined;
15
+ }
16
+ /** Fetch once and publish; a concurrent call joins the in-flight request. */
17
+ export declare function refresh(): Promise<void>;
18
+ /** Publish a confirmed deletion without waiting for an unrelated poll. */
19
+ export declare function deleteRunRecord(taskId: string, runId: string): Promise<void>;
20
+ /** Subscribe to the shared task snapshot. */
21
+ export declare function useAutomations(): AutomationSnapshot;
22
+ /** Drop the recorded error so a retry starts from a clean banner. */
23
+ export declare function clearError(): void;
24
+ /** Publish a request failure as the panel's banner without touching the list. */
25
+ export declare function reportError(message: string): void;
26
+ /** Zero the badge locally after the server marked notifications read. */
27
+ export declare function clearUnread(): void;
28
+ /** Open or close the overlay, retuning the poll cadence to match. */
29
+ export declare function setPanelOpen(open: boolean): void;
30
+ /** Subscribe to overlay visibility. */
31
+ export declare function usePanelOpen(): boolean;
32
+ /** Stage prompt text for the next render of a session's composer. */
33
+ export declare function queueDraft(sessionId: SessionId, text: string): void;
34
+ /** Take a session's staged prompt, if any. */
35
+ export declare function consumeDraft(sessionId: SessionId): string | undefined;
36
+ /** Subscribe to draft-queue changes. */
37
+ export declare function useDraftRevision(): number;
38
+ /** Reset module state when the plugin unloads. */
39
+ export declare function resetStore(): void;
40
+ //# sourceMappingURL=store.d.ts.map