@sparkelf/dsh-plus 0.2.2-alpha.2.3 → 0.2.2-alpha.2.30
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 +5 -7
- package/README.zh.md +5 -7
- package/lib/apply.js +1 -1
- package/lib/bin.js +144 -178
- package/lib/types/apply.d.ts +1 -1
- package/lib/types/apply.js +117 -56
- package/lib/types/standalone-cli.js +2 -93
- package/lib/types/standalone-profile.d.ts +1 -8
- package/lib/types/standalone-profile.js +25 -126
- package/package.json +60 -33
- package/patches/ui-schedule-plaza-tab.patch +217 -0
- package/LICENSE +0 -21
|
@@ -0,0 +1,217 @@
|
|
|
1
|
+
diff --git a/packages/client/ui-schedule/src/client/TaskManagerPage.module.css b/packages/client/ui-schedule/src/client/TaskManagerPage.module.css
|
|
2
|
+
index 7c4acf5a3d..ea9d29e2e3 100644
|
|
3
|
+
--- a/packages/client/ui-schedule/src/client/TaskManagerPage.module.css
|
|
4
|
+
+++ b/packages/client/ui-schedule/src/client/TaskManagerPage.module.css
|
|
5
|
+
@@ -149,6 +149,12 @@
|
|
6
|
+
neutral hairline, the 10px radius, and the mock's `--muted` leading icon. The
|
|
7
|
+
mock brightens the border on hover and takes the brand stroke on focus
|
|
8
|
+
rather than drawing a ring around the control. */
|
|
9
|
+
+/* The runtime extension tab keeps the page's centered column, so a contributor
|
|
10
|
+
+ body lines up with the search field and the task rows. */
|
|
11
|
+
+.plazaBody {
|
|
12
|
+
+ min-width: 0;
|
|
13
|
+
+}
|
|
14
|
+
+
|
|
15
|
+
.searchTools {
|
|
16
|
+
--task-search-height: 36px;
|
|
17
|
+
display: flex;
|
|
18
|
+
diff --git a/packages/client/ui-schedule/src/client/TaskManagerPage.tsx b/packages/client/ui-schedule/src/client/TaskManagerPage.tsx
|
|
19
|
+
index 3c330c9f26..f7e7b78312 100644
|
|
20
|
+
--- a/packages/client/ui-schedule/src/client/TaskManagerPage.tsx
|
|
21
|
+
+++ b/packages/client/ui-schedule/src/client/TaskManagerPage.tsx
|
|
22
|
+
@@ -5,7 +5,7 @@ import {
|
|
23
|
+
Button, IconClockOutlineRegular, IconCloseOutlineRegular, IconEllipsisOutlineRegular, IconPlusOutlineRegular,
|
|
24
|
+
IconSearchOutlineRegular, IconTrashOutlineRegular, Input, Menu, Modal, Tooltip,
|
|
25
|
+
} from '@deepseek-ai/dsh-client-ui-primitives'
|
|
26
|
+
-import type { HostObservable, InjectFace, PropsLocale, PropsRuntime } from '@deepseek-ai/dsh-client-ui-slots'
|
|
27
|
+
+import type { HostObservable, InjectFace, PropsLocale, PropsRenderSlots, PropsRuntime } from '@deepseek-ai/dsh-client-ui-slots'
|
|
28
|
+
import type {} from '@deepseek-ai/dsh-client-ui-layout/client'
|
|
29
|
+
import type { ScheduleCatalogEntry, ScheduleId } from '@deepseek-ai/dsh-schedule/client'
|
|
30
|
+
import type { CatalogSnapshot } from './catalog-source.ts'
|
|
31
|
+
@@ -36,14 +36,26 @@ export interface TaskManagerInjected extends TaskDetailInjected {
|
|
32
|
+
* @returns resolution after the outcome is reported.
|
|
33
|
+
*/
|
|
34
|
+
readonly onClearEnded: () => Promise<void>
|
|
35
|
+
+ /**
|
|
36
|
+
+ * Whether a plugin currently contributes the page's runtime extension tab.
|
|
37
|
+
+ *
|
|
38
|
+
+ * The page reads this while rendering, so a contributor that registers after
|
|
39
|
+
+ * the page mounted still makes its tab appear on the next render; with no
|
|
40
|
+
+ * contributor the page keeps exactly its three status tabs.
|
|
41
|
+
+ * @returns true when the `schedule.manager.tabs` seat has an occupant.
|
|
42
|
+
+ */
|
|
43
|
+
+ readonly plazaAvailable?: () => boolean
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
/** Root-scoped task catalog props derived from the framework and injected actions. */
|
|
47
|
+
export type TaskManagerPageProps = PropsRuntime<'main'>
|
|
48
|
+
& InjectFace<TaskManagerInjected>
|
|
49
|
+
& PropsLocale<'schedule.manager'>
|
|
50
|
+
+ // Narrowed to the one seat this page declares; optional so a unit test can
|
|
51
|
+
+ // render the page without a slot host, as every other page-level test does.
|
|
52
|
+
+ & Partial<PropsRenderSlots<'schedule.manager.tabs'>>
|
|
53
|
+
|
|
54
|
+
-type StatusFilter = 'all' | ScheduleCatalogEntry['status']
|
|
55
|
+
+type StatusFilter = 'all' | ScheduleCatalogEntry['status'] | 'plaza'
|
|
56
|
+
|
|
57
|
+
/**
|
|
58
|
+
* Render retained tasks with authoritative deletion and timing-only edits.
|
|
59
|
+
@@ -51,7 +63,7 @@ type StatusFilter = 'all' | ScheduleCatalogEntry['status']
|
|
60
|
+
* @returns the searchable task list beside the selected task's detail.
|
|
61
|
+
*/
|
|
62
|
+
export function TaskManagerPage(props: TaskManagerPageProps) {
|
|
63
|
+
- const { useCatalog, onNewTask, onClearEnded, onRetry, t } = props
|
|
64
|
+
+ const { useCatalog, onNewTask, onClearEnded, onRetry, plazaAvailable, renderSlot, t } = props
|
|
65
|
+
const catalog = useCatalog(snapshot => snapshot)
|
|
66
|
+
const { records, status } = catalog
|
|
67
|
+
const [search, setSearch] = useState('')
|
|
68
|
+
@@ -85,7 +97,7 @@ export function TaskManagerPage(props: TaskManagerPageProps) {
|
|
69
|
+
const rows = useMemo(() => {
|
|
70
|
+
const query = search.trim().toLowerCase()
|
|
71
|
+
return records.filter(record => (
|
|
72
|
+
- (statusFilter === 'all' || record.status === statusFilter)
|
|
73
|
+
+ (statusFilter === 'all' || (statusFilter !== 'plaza' && record.status === statusFilter))
|
|
74
|
+
&& (record.prompt.toLowerCase().includes(query)
|
|
75
|
+
|| record.sessionId.toLowerCase().includes(query)
|
|
76
|
+
|| taskName(record).toLowerCase().includes(query))
|
|
77
|
+
@@ -202,8 +214,24 @@ export function TaskManagerPage(props: TaskManagerPageProps) {
|
|
78
|
+
{t(value === 'all' ? 'statusFilter.all' : `status.${value}`)}
|
|
79
|
+
</button>
|
|
80
|
+
))}
|
|
81
|
+
+ {plazaAvailable?.() === true && (
|
|
82
|
+
+ <button
|
|
83
|
+
+ type="button"
|
|
84
|
+
+ className={clsx(css.filterTab, statusFilter === 'plaza' && css.filterTabActive)}
|
|
85
|
+
+ aria-pressed={statusFilter === 'plaza'}
|
|
86
|
+
+ data-testid="task-manager-plaza-tab"
|
|
87
|
+
+ onClick={() => { setStatusFilter('plaza') }}
|
|
88
|
+
+ >
|
|
89
|
+
+ {t('statusFilter.plaza')}
|
|
90
|
+
+ </button>
|
|
91
|
+
+ )}
|
|
92
|
+
</div>
|
|
93
|
+
</div>
|
|
94
|
+
+ {statusFilter === 'plaza' ? (
|
|
95
|
+
+ <div className={css.plazaBody} data-testid="task-manager-plaza-body">
|
|
96
|
+
+ {renderSlot?.('schedule.manager.tabs', {})}
|
|
97
|
+
+ </div>
|
|
98
|
+
+ ) : (<>
|
|
99
|
+
<div className={css.searchTools}>
|
|
100
|
+
<div className={css.searchField}>
|
|
101
|
+
<Input
|
|
102
|
+
@@ -299,6 +327,7 @@ export function TaskManagerPage(props: TaskManagerPageProps) {
|
|
103
|
+
})}
|
|
104
|
+
</ul>
|
|
105
|
+
</div>
|
|
106
|
+
+ </>)}
|
|
107
|
+
</div>
|
|
108
|
+
</div>
|
|
109
|
+
</div>
|
|
110
|
+
diff --git a/packages/client/ui-schedule/src/client/index.ts b/packages/client/ui-schedule/src/client/index.ts
|
|
111
|
+
index 7dcbc32ee3..cd072150e7 100644
|
|
112
|
+
--- a/packages/client/ui-schedule/src/client/index.ts
|
|
113
|
+
+++ b/packages/client/ui-schedule/src/client/index.ts
|
|
114
|
+
@@ -73,6 +73,21 @@ declare module '@deepseek-ai/dsh-client-ui-slots' {
|
|
115
|
+
/** Host task management page and task tab copy. */
|
|
116
|
+
'schedule.manager': TaskManagerKey
|
|
117
|
+
}
|
|
118
|
+
+ interface SlotMap {
|
|
119
|
+
+ /**
|
|
120
|
+
+ * One extension body contributed at runtime to the automation-task page.
|
|
121
|
+
+ *
|
|
122
|
+
+ * The page renders the single occupant as an additional status tab and
|
|
123
|
+
+ * supplies no owner props: a contributor owns its own data and needs no
|
|
124
|
+
+ * identity from the page. The seat belongs to no Session, so opening the
|
|
125
|
+
+ * page never mounts a contributor against an arbitrary conversation.
|
|
126
|
+
+ */
|
|
127
|
+
+ 'schedule.manager.tabs': {
|
|
128
|
+
+ kind: 'single'
|
|
129
|
+
+ scope: 'root'
|
|
130
|
+
+ owner: Record<string, never>
|
|
131
|
+
+ }
|
|
132
|
+
+ }
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
/** Required services for catalogs, ambient Session marks, the right Sidebar, Remote queries, original-Session navigation, and access. */
|
|
136
|
+
@@ -197,8 +212,13 @@ export function apply(ctx: ClientContext): void {
|
|
137
|
+
name: 'main',
|
|
138
|
+
key: PANEL_ID,
|
|
139
|
+
locale: MANAGER_NS,
|
|
140
|
+
+ // The automation page is the one first-level page that accepts a runtime
|
|
141
|
+
+ // extension tab. Declaring the seat here is what lets a plugin contribute
|
|
142
|
+
+ // a tab body without this package importing that plugin.
|
|
143
|
+
+ children: { 'schedule.manager.tabs': { kind: 'single', scope: 'root' } },
|
|
144
|
+
inject: (): TaskManagerInjected => ({
|
|
145
|
+
...detail,
|
|
146
|
+
+ plazaAvailable: () => ctx.slots.entriesOfSlot('schedule.manager.tabs').length > 0,
|
|
147
|
+
// The page has no creation form: a new reminder starts in a Session.
|
|
148
|
+
onNewTask: () => { ctx.uiWorkspace.startSession() },
|
|
149
|
+
onClearEnded: async () => {
|
|
150
|
+
diff --git a/packages/client/ui-schedule/src/client/task-manager-locales.ts b/packages/client/ui-schedule/src/client/task-manager-locales.ts
|
|
151
|
+
index fffde14568..145b05a825 100644
|
|
152
|
+
--- a/packages/client/ui-schedule/src/client/task-manager-locales.ts
|
|
153
|
+
+++ b/packages/client/ui-schedule/src/client/task-manager-locales.ts
|
|
154
|
+
@@ -20,6 +20,7 @@ export const en = {
|
|
155
|
+
'empty.action': 'New automation task',
|
|
156
|
+
'statusFilter.label': 'Task status',
|
|
157
|
+
'statusFilter.all': 'All',
|
|
158
|
+
+ 'statusFilter.plaza': 'Workflow plaza',
|
|
159
|
+
'status.active': 'Enabled',
|
|
160
|
+
'status.inactive': 'Inactive',
|
|
161
|
+
'detail.label': 'Task details',
|
|
162
|
+
@@ -176,6 +177,7 @@ export const zh: Record<TaskManagerKey, string> = {
|
|
163
|
+
'empty.action': '新建自动化任务',
|
|
164
|
+
'statusFilter.label': '任务状态',
|
|
165
|
+
'statusFilter.all': '全部',
|
|
166
|
+
+ 'statusFilter.plaza': '工作流广场',
|
|
167
|
+
'status.active': '已开启',
|
|
168
|
+
'status.inactive': '已结束',
|
|
169
|
+
'detail.label': '任务详情',
|
|
170
|
+
@@ -327,6 +329,7 @@ export const ja = {
|
|
171
|
+
'empty.action': '新規自動化タスク',
|
|
172
|
+
'statusFilter.label': 'タスクの状態',
|
|
173
|
+
'statusFilter.all': 'すべて',
|
|
174
|
+
+ 'statusFilter.plaza': 'ワークフロープラザ',
|
|
175
|
+
'status.active': '有効',
|
|
176
|
+
'status.inactive': '無効',
|
|
177
|
+
'detail.label': 'タスクの詳細',
|
|
178
|
+
@@ -476,6 +479,7 @@ export const es = {
|
|
179
|
+
'empty.action': 'Nueva tarea de automatización',
|
|
180
|
+
'statusFilter.label': 'Estado de la tarea',
|
|
181
|
+
'statusFilter.all': 'Todos',
|
|
182
|
+
+ 'statusFilter.plaza': 'Plaza de flujos',
|
|
183
|
+
'status.active': 'Habilitado',
|
|
184
|
+
'status.inactive': 'Inactivo',
|
|
185
|
+
'detail.label': 'Detalles de la tarea',
|
|
186
|
+
@@ -628,6 +632,7 @@ export const fr = {
|
|
187
|
+
'empty.action': "Nouvelle tâche d'automatisation",
|
|
188
|
+
'statusFilter.label': 'Statut de la tâche',
|
|
189
|
+
'statusFilter.all': 'Tout',
|
|
190
|
+
+ 'statusFilter.plaza': 'Place des workflows',
|
|
191
|
+
'status.active': 'Activé',
|
|
192
|
+
'status.inactive': 'Inactif',
|
|
193
|
+
'detail.label': 'Détails de la tâche',
|
|
194
|
+
@@ -780,6 +785,7 @@ export const de = {
|
|
195
|
+
'empty.action': 'Neue Automatisierungsaufgabe',
|
|
196
|
+
'statusFilter.label': 'Aufgabenstatus',
|
|
197
|
+
'statusFilter.all': 'Alle',
|
|
198
|
+
+ 'statusFilter.plaza': 'Workflow-Plaza',
|
|
199
|
+
'status.active': 'Aktiviert',
|
|
200
|
+
'status.inactive': 'Inaktiv',
|
|
201
|
+
'detail.label': 'Aufgabendetails',
|
|
202
|
+
@@ -932,6 +938,7 @@ export const ru = {
|
|
203
|
+
'empty.action': 'Новая задача автоматизации',
|
|
204
|
+
'statusFilter.label': 'Статус задачи',
|
|
205
|
+
'statusFilter.all': 'Все',
|
|
206
|
+
+ 'statusFilter.plaza': 'Витрина сценариев',
|
|
207
|
+
'status.active': 'Включено',
|
|
208
|
+
'status.inactive': 'Неактивный',
|
|
209
|
+
'detail.label': 'Подробности задачи',
|
|
210
|
+
@@ -1084,6 +1091,7 @@ export const pt = {
|
|
211
|
+
'empty.action': 'Nova tarefa de automação',
|
|
212
|
+
'statusFilter.label': 'Status da tarefa',
|
|
213
|
+
'statusFilter.all': 'Todos',
|
|
214
|
+
+ 'statusFilter.plaza': 'Praça de fluxos',
|
|
215
|
+
'status.active': 'Habilitado',
|
|
216
|
+
'status.inactive': 'Inativo',
|
|
217
|
+
'detail.label': 'Detalhes da tarefa',
|
package/LICENSE
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
MIT License
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2026 DeepSeek
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
in the Software without restriction, including without limitation the rights
|
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
furnished to do so, subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in all
|
|
13
|
-
copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
-
SOFTWARE.
|