@dsh-workbench/shared 0.2.14 → 0.2.16

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 (47) hide show
  1. package/dist/api/dsh.d.ts +1 -0
  2. package/dist/api/host-write.d.ts +1 -1
  3. package/dist/components/FormRows.css +10 -4
  4. package/dist/components/Rows.css +12 -5
  5. package/dist/components/SelectField.css +20 -0
  6. package/dist/components/SelectField.d.ts +3 -1
  7. package/dist/components/SelectField.js +43 -25
  8. package/dist/components/SelectFieldNodes.d.ts +21 -0
  9. package/dist/components/SelectFieldNodes.js +17 -0
  10. package/dist/config/constants.d.ts +3 -0
  11. package/dist/config/constants.js +3 -0
  12. package/dist/host/http.d.ts +3 -0
  13. package/dist/host/http.js +10 -1
  14. package/dist/host/tool-kit.d.ts +1 -0
  15. package/dist/host/tool-kit.js +4 -0
  16. package/dist/host.d.ts +2 -0
  17. package/dist/host.js +2 -0
  18. package/dist/i18n/en.js +14 -0
  19. package/dist/i18n/index.d.ts +15 -1
  20. package/dist/i18n/zh.d.ts +14 -0
  21. package/dist/i18n/zh.js +14 -0
  22. package/dist/index.d.ts +2 -0
  23. package/dist/index.js +2 -0
  24. package/dist/lib/board-fact.d.ts +13 -0
  25. package/dist/lib/board-fact.js +28 -0
  26. package/dist/lib/diy-debug.d.ts +39 -0
  27. package/dist/lib/diy-debug.js +70 -0
  28. package/package.json +1 -1
  29. package/src/api/dsh.ts +6 -1
  30. package/src/api/host-write.ts +5 -1
  31. package/src/components/FormRows.css +10 -4
  32. package/src/components/Rows.css +12 -5
  33. package/src/components/SelectField.css +20 -0
  34. package/src/components/SelectField.test.tsx +63 -0
  35. package/src/components/SelectField.tsx +56 -81
  36. package/src/components/SelectFieldNodes.tsx +77 -0
  37. package/src/config/constants.ts +5 -0
  38. package/src/host/http.ts +16 -3
  39. package/src/host/tool-kit.ts +5 -0
  40. package/src/host.ts +2 -0
  41. package/src/i18n/en.ts +15 -0
  42. package/src/i18n/zh.ts +15 -0
  43. package/src/index.ts +2 -0
  44. package/src/lib/board-fact.test.ts +86 -0
  45. package/src/lib/board-fact.ts +45 -0
  46. package/src/lib/diy-debug.test.ts +110 -0
  47. package/src/lib/diy-debug.ts +118 -0
package/dist/api/dsh.d.ts CHANGED
@@ -152,6 +152,7 @@ export interface DshToolDefinition {
152
152
  export interface DshToolRunContext {
153
153
  readonly agent?: {
154
154
  readonly session?: {
155
+ readonly id?: string;
155
156
  readonly header?: {
156
157
  readonly cwd?: string;
157
158
  } | undefined;
@@ -1,5 +1,5 @@
1
1
  import type { ApiResponse } from './workbench-client.js';
2
- export type WriteChannel = 'prefs' | 'actions' | 'provision';
2
+ export type WriteChannel = 'prefs' | 'actions' | 'provision' | 'diy-debug';
3
3
  export declare function writeRoute(channel: WriteChannel, resource: string): string;
4
4
  export type WriteOutcome<T> = {
5
5
  readonly ok: true;
@@ -18,10 +18,6 @@
18
18
  row-gap: var(--wb-len-8);
19
19
  }
20
20
 
21
- .wb-formRows > .wb-formRow {
22
- grid-template-columns: subgrid;
23
- }
24
-
25
21
  .wb-formRow[data-layout='stacked'] {
26
22
  grid-template-columns: minmax(0, 1fr);
27
23
  align-items: stretch;
@@ -67,3 +63,13 @@
67
63
  .wb-formRow:has(:disabled) .wb-formLabel {
68
64
  opacity: 0.4;
69
65
  }
66
+
67
+ .wb-formRows > .wb-formRow {
68
+ grid-template-columns: subgrid;
69
+ }
70
+
71
+ @supports not (grid-template-columns: subgrid) {
72
+ .wb-formRows > .wb-formRow {
73
+ grid-template-columns: minmax(72px, max-content) minmax(0, 1fr);
74
+ }
75
+ }
@@ -1,14 +1,10 @@
1
-
2
- .wb-row:has(> [data-wb-dot]) {
3
- grid-template-columns: 84px minmax(0, 1fr);
4
- }
5
1
  .wb-rows {
6
2
  display: flex;
7
3
  flex-direction: column;
8
4
  }
9
5
  .wb-row {
10
6
  display: grid;
11
- grid-template-columns: 56px minmax(0, 1fr);
7
+ grid-template-columns: minmax(72px, max-content) minmax(0, 1fr);
12
8
  align-items: baseline;
13
9
  gap: var(--wb-len-8);
14
10
  padding: var(--wb-len-4) 0;
@@ -17,6 +13,7 @@
17
13
  border-top: 0.5px solid var(--dsw-alias-border-l2);
18
14
  }
19
15
  .wb-rowKey {
16
+ white-space: nowrap;
20
17
  font-size: var(--dsw-font-xxxs-11-font-size);
21
18
  line-height: var(--wb-line-16);
22
19
  color: var(--dsw-alias-label-tertiary);
@@ -28,3 +25,13 @@
28
25
  color: var(--dsw-alias-label-primary);
29
26
  overflow-wrap: anywhere;
30
27
  }
28
+
29
+ .wb-rows > .wb-row {
30
+ grid-template-columns: subgrid;
31
+ }
32
+
33
+ @supports not (grid-template-columns: subgrid) {
34
+ .wb-rows > .wb-row {
35
+ grid-template-columns: minmax(72px, max-content) minmax(0, 1fr);
36
+ }
37
+ }
@@ -61,6 +61,26 @@
61
61
  box-shadow: none;
62
62
  }
63
63
 
64
+ .wb-selectIconOnly {
65
+ width: var(--wb-len-36);
66
+ height: var(--wb-len-36);
67
+ min-height: 0;
68
+ gap: 0;
69
+ padding: 0;
70
+ justify-content: center;
71
+ }
72
+
73
+ .wb-selectReveal {
74
+ display: inline-flex;
75
+ align-items: center;
76
+ justify-content: center;
77
+ }
78
+
79
+ .wb-selectIconOnly .wb-selectIcon {
80
+ width: 100%;
81
+ height: 100%;
82
+ }
83
+
64
84
  .wb-selectAnchor {
65
85
  display: block;
66
86
  width: 100%;
@@ -42,6 +42,8 @@ export interface SelectFieldProps {
42
42
  readonly onFooter?: (() => void) | undefined;
43
43
  readonly selection?: 'check' | 'fill' | undefined;
44
44
  readonly variant?: 'ghost' | 'boxed' | undefined;
45
+ readonly iconOnly?: boolean | undefined;
46
+ readonly revealId?: string | undefined;
45
47
  readonly ariaLabel?: string | undefined;
46
48
  readonly title?: string | undefined;
47
49
  readonly id?: string | undefined;
@@ -54,5 +56,5 @@ export declare function defaultSelectFilter(option: SelectFieldOption, query: st
54
56
  export declare function filterSelectOptions(options: readonly SelectFieldOption[], query: string, filter?: (option: SelectFieldOption, query: string) => boolean): readonly SelectFieldOption[];
55
57
  export declare function selectCursorValue(shown: readonly SelectFieldOption[], cursor: number | null): string | null;
56
58
  export declare function stepSelectCursor(shown: readonly SelectFieldOption[], cursor: number | null, step: 1 | -1): number | null;
57
- export declare function selectEntries(shown: readonly SelectFieldOption[], emptyText: string | undefined): readonly MenuEntry[];
59
+ export declare function selectEntries(shown: readonly SelectFieldOption[], emptyText: string | undefined, revealId?: string | undefined): readonly MenuEntry[];
58
60
  export declare function SelectField(props: SelectFieldProps): ReactNode;
@@ -1,35 +1,51 @@
1
1
  import { h, useEffect, useMemo, useRef, useState } from '../lib/react.js';
2
- import { IconChevronDownOutlineRegular, IconSearchOutlineRegular, Menu, TextShimmer, } from '@deepseek-ai/dsh-client-ui-primitives';
2
+ import { IconSearchOutlineRegular, Menu } from '@deepseek-ai/dsh-client-ui-primitives';
3
+ import { selectLoadingNode, selectTriggerNode } from './SelectFieldNodes.js';
3
4
  import { Field } from './Field.js';
4
5
  import { TextField } from './TextField.js';
5
- import { Spinner } from './Spinner.js';
6
6
  import './SelectField.css';
7
7
  const FOOTER_ID = '__wb-select-footer__';
8
8
  const EMPTY_ID = '__wb-select-empty__';
9
9
  function mergeClass(...parts) {
10
10
  return parts.filter((one) => one !== undefined && one !== '').join(' ');
11
11
  }
12
- function itemOf(option) {
12
+ function triggerClassOf(variantClass, iconOnly) {
13
+ return mergeClass('wb-selectTrigger', variantClass, iconOnly ? 'wb-selectIconOnly' : undefined);
14
+ }
15
+ function itemOf(option, revealId) {
16
+ const mark = option.value === revealId;
17
+ if (!mark) {
18
+ return {
19
+ id: option.value,
20
+ label: option.label,
21
+ ...(option.icon === undefined ? {} : { icon: option.icon }),
22
+ ...(option.disabled === true ? { disabled: true } : {}),
23
+ };
24
+ }
25
+ const revealed = (node) => (h("span", { className: "wb-selectReveal", "data-wb-select-reveal": "" }, node));
13
26
  return {
14
27
  id: option.value,
15
- label: option.label,
16
- ...(option.icon === undefined ? {} : { icon: option.icon }),
28
+ label: option.icon === undefined ? revealed(option.label) : option.label,
29
+ ...(option.icon === undefined ? {} : { icon: revealed(option.icon) }),
17
30
  ...(option.disabled === true ? { disabled: true } : {}),
18
31
  };
19
32
  }
20
- function triggerNode(args) {
21
- return (h("button", { type: "button", id: args.id, className: args.className, disabled: args.disabled, "aria-haspopup": "listbox", "aria-expanded": args.open, "aria-invalid": args.invalid || undefined, "aria-label": args.ariaLabel, title: args.title, onClick: args.onOpen },
22
- args.icon === undefined ? null : h("span", { className: "wb-selectIcon" }, args.icon),
23
- h("span", { className: "wb-selectValue" }, args.value),
24
- h("span", { className: "wb-selectChevron" },
25
- h(IconChevronDownOutlineRegular, { size: 14 }))));
33
+ function revealNode() {
34
+ const found = document.querySelector('[data-wb-select-reveal]');
35
+ return found instanceof HTMLElement ? found : null;
36
+ }
37
+ function useRevealOnOpen(open, revealId) {
38
+ useEffect(() => {
39
+ if (!open || revealId === undefined)
40
+ return;
41
+ revealNode()?.scrollIntoView({ block: 'nearest' });
42
+ }, [open, revealId]);
26
43
  }
27
- function loadingNode(args) {
28
- return (h("button", { type: "button", id: args.id, className: `${args.className} wb-selectLoading`, disabled: true, "aria-busy": "true", "aria-invalid": args.invalid || undefined, "aria-label": args.ariaLabel, title: args.loadingText },
29
- h("span", { className: "wb-selectValue" },
30
- h(TextShimmer, { active: true }, args.loadingText ?? '…')),
31
- h("span", { className: "wb-selectChevron" },
32
- h(Spinner, { size: 14 }))));
44
+ function selectValueNode(current, renderValue, placeholder) {
45
+ if (current === undefined) {
46
+ return h("span", { className: "wb-selectPlaceholder" }, placeholder ?? '—');
47
+ }
48
+ return renderValue === undefined ? current.label : renderValue(current);
33
49
  }
34
50
  function searchNode(args) {
35
51
  return (h("span", { ref: args.boxRef, className: args.className },
@@ -80,7 +96,7 @@ export function stepSelectCursor(shown, cursor, step) {
80
96
  return step === 1 ? 0 : shown.length - 1;
81
97
  return (cursor + step + shown.length) % shown.length;
82
98
  }
83
- export function selectEntries(shown, emptyText) {
99
+ export function selectEntries(shown, emptyText, revealId) {
84
100
  if (shown.length === 0) {
85
101
  return emptyText === undefined ? [] : [{ type: 'label', id: EMPTY_ID, text: emptyText }];
86
102
  }
@@ -91,7 +107,7 @@ export function selectEntries(shown, emptyText) {
91
107
  out.push({ type: 'label', id: `__wb-select-group-${String(out.length)}`, text: option.group });
92
108
  group = option.group;
93
109
  }
94
- out.push(itemOf(option));
110
+ out.push(itemOf(option, revealId));
95
111
  }
96
112
  return out;
97
113
  }
@@ -155,18 +171,19 @@ function useSelectState(props) {
155
171
  };
156
172
  }
157
173
  export function SelectField(props) {
158
- const { value, options, onChange, label, hint, icon, renderValue, placeholder, search = true, searchLabel, searchPlaceholder, footer, onFooter, disabled = false, invalid = false, loading = false, loadingText, fallback, selection = 'fill', variant = 'boxed', ariaLabel, title, id, name, className, menuClassName, } = props;
174
+ const { value, options, onChange, label, hint, icon, renderValue, placeholder, search = true, searchLabel, searchPlaceholder, footer, onFooter, disabled = false, invalid = false, loading = false, loadingText, fallback, selection = 'fill', variant = 'boxed', iconOnly = false, revealId, ariaLabel, title, id, name, className, menuClassName, } = props;
159
175
  const state = useSelectState(props);
160
176
  const current = options.find((option) => option.value === value);
177
+ useRevealOnOpen(state.open, revealId);
161
178
  const variantClass = variant === 'ghost' ? 'wb-selectGhost' : undefined;
162
- const triggerClass = mergeClass('wb-selectTrigger', variantClass);
179
+ const triggerClass = triggerClassOf(variantClass, iconOnly);
163
180
  if (loading) {
164
- return framed(label, hint, className, loadingNode({ id, className: triggerClass, invalid, ariaLabel, loadingText }));
181
+ return framed(label, hint, className, selectLoadingNode({ id, className: triggerClass, invalid, ariaLabel, loadingText }));
165
182
  }
166
183
  if (fallback !== undefined && options.length === 0) {
167
184
  return framed(label, hint, className, h(TextField, { id: id, name: name, className: "wb-selectFallback", invalid: invalid, "aria-label": ariaLabel, value: fallback.value, onChange: (event) => fallback.onChange(event.currentTarget.value) }));
168
185
  }
169
- const trigger = triggerNode({
186
+ const trigger = selectTriggerNode({
170
187
  id,
171
188
  className: triggerClass,
172
189
  disabled,
@@ -175,7 +192,8 @@ export function SelectField(props) {
175
192
  ariaLabel,
176
193
  title,
177
194
  icon,
178
- value: current === undefined ? (h("span", { className: "wb-selectPlaceholder" }, placeholder ?? '—')) : renderValue === undefined ? (current.label) : (renderValue(current)),
195
+ value: selectValueNode(current, renderValue, placeholder),
196
+ iconOnly,
179
197
  onOpen: () => state.setOpen(true),
180
198
  });
181
199
  const anchor = state.open && search
@@ -215,7 +233,7 @@ export function SelectField(props) {
215
233
  anchor,
216
234
  selection,
217
235
  selectedId: selectCursorValue(state.shown, state.cursor) ?? undefined,
218
- items: selectEntries(state.shown, state.empty),
236
+ items: selectEntries(state.shown, state.empty, revealId),
219
237
  footer: footer === undefined
220
238
  ? undefined
221
239
  : [
@@ -0,0 +1,21 @@
1
+ import type { ReactNode } from 'react';
2
+ export declare function selectTriggerNode(args: {
3
+ readonly id: string | undefined;
4
+ readonly className: string;
5
+ readonly disabled: boolean;
6
+ readonly invalid: boolean;
7
+ readonly open: boolean;
8
+ readonly ariaLabel: string | undefined;
9
+ readonly title: string | undefined;
10
+ readonly icon: ReactNode | undefined;
11
+ readonly value: ReactNode;
12
+ readonly iconOnly: boolean;
13
+ readonly onOpen: () => void;
14
+ }): ReactNode;
15
+ export declare function selectLoadingNode(args: {
16
+ readonly id: string | undefined;
17
+ readonly className: string;
18
+ readonly invalid: boolean;
19
+ readonly ariaLabel: string | undefined;
20
+ readonly loadingText: string | undefined;
21
+ }): ReactNode;
@@ -0,0 +1,17 @@
1
+ import { Fragment, h } from '../lib/react.js';
2
+ import { IconChevronDownOutlineRegular, TextShimmer, } from '@deepseek-ai/dsh-client-ui-primitives';
3
+ import { Spinner } from './Spinner.js';
4
+ export function selectTriggerNode(args) {
5
+ return (h("button", { type: "button", id: args.id, className: args.className, disabled: args.disabled, "aria-haspopup": "listbox", "aria-expanded": args.open, "aria-invalid": args.invalid || undefined, "aria-label": args.ariaLabel, title: args.title, onClick: args.onOpen }, args.iconOnly ? (h("span", { className: "wb-selectIcon" }, args.icon)) : (h(Fragment, null,
6
+ args.icon === undefined ? null : h("span", { className: "wb-selectIcon" }, args.icon),
7
+ h("span", { className: "wb-selectValue" }, args.value),
8
+ h("span", { className: "wb-selectChevron" },
9
+ h(IconChevronDownOutlineRegular, { size: 14 }))))));
10
+ }
11
+ export function selectLoadingNode(args) {
12
+ return (h("button", { type: "button", id: args.id, className: `${args.className} wb-selectLoading`, disabled: true, "aria-busy": "true", "aria-invalid": args.invalid || undefined, "aria-label": args.ariaLabel, title: args.loadingText },
13
+ h("span", { className: "wb-selectValue" },
14
+ h(TextShimmer, { active: true }, args.loadingText ?? '…')),
15
+ h("span", { className: "wb-selectChevron" },
16
+ h(Spinner, { size: 14 }))));
17
+ }
@@ -6,12 +6,15 @@ export declare const EVENTS_PATH = "/workbench/events";
6
6
  export declare const ACTIONS_PREFIX = "/workbench/api/actions";
7
7
  export declare const PROVISION_PREFIX = "/workbench/api/provision";
8
8
  export declare const PANEL_STATE_PATH = "panel-state";
9
+ export declare const DIY_DEBUG_PATH = "diy-debug";
10
+ export declare const DIY_DEBUG_ACT_PATH = "diy-debug/act";
9
11
  export declare const PANEL_STATE_PREFIX = "/workbench/api/panel-state";
10
12
  export declare const OPENCLI_PIN = "1.8.8";
11
13
  export declare const CODING_ISSUES_SERVICE = "workbenchCodingIssues";
12
14
  export declare const PANELS_SERVICE = "workbenchPanels";
13
15
  export declare const UNITS_SERVICE = "workbenchUnits";
14
16
  export declare const PANEL_STATE_SERVICE = "workbenchPanelState";
17
+ export declare const DIY_DEBUG_SERVICE = "workbenchDiyDebug";
15
18
  export declare const PANEL_LIST_LIMIT = 50;
16
19
  export declare const OPENCLI_TIMEOUT_MS = 120000;
17
20
  export declare const OPENCLI_MAX_CONCURRENT = 4;
@@ -9,12 +9,15 @@ export const EVENTS_PATH = "/workbench/events";
9
9
  export const ACTIONS_PREFIX = `${API_PREFIX}/actions`;
10
10
  export const PROVISION_PREFIX = `${API_PREFIX}/provision`;
11
11
  export const PANEL_STATE_PATH = "panel-state";
12
+ export const DIY_DEBUG_PATH = "diy-debug";
13
+ export const DIY_DEBUG_ACT_PATH = `${DIY_DEBUG_PATH}/act`;
12
14
  export const PANEL_STATE_PREFIX = `${API_PREFIX}/${PANEL_STATE_PATH}`;
13
15
  export const OPENCLI_PIN = "1.8.8";
14
16
  export const CODING_ISSUES_SERVICE = "workbenchCodingIssues";
15
17
  export const PANELS_SERVICE = "workbenchPanels";
16
18
  export const UNITS_SERVICE = "workbenchUnits";
17
19
  export const PANEL_STATE_SERVICE = "workbenchPanelState";
20
+ export const DIY_DEBUG_SERVICE = "workbenchDiyDebug";
18
21
  export const PANEL_LIST_LIMIT = 50;
19
22
  export const OPENCLI_TIMEOUT_MS = 120_000;
20
23
  export const OPENCLI_MAX_CONCURRENT = 4;
@@ -41,3 +41,6 @@ export declare function healthHandler(ctx: DshHostContext, opencli?: OpencliHeal
41
41
  export declare function registerPrefs(ctx: DshHostContext, resources: readonly PostResource[], wrote?: ((resource: string, write: PostWrite) => void) | undefined): () => void;
42
42
  export declare function registerActions(ctx: DshHostContext, resources: readonly PostResource[], wrote?: ((resource: string, write: PostWrite) => void) | undefined): () => void;
43
43
  export declare function registerPanelState(ctx: DshHostContext, store: PanelStateStore): () => void;
44
+ export declare function registerDiyDebugAct(ctx: DshHostContext, resource: PostResource, log?: {
45
+ bump(facts: readonly string[]): unknown;
46
+ } | undefined): () => void;
package/dist/host/http.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { unitFactScope } from '../api/facts.js';
2
2
  import { parseCardsReport, parseCrashReport } from '../lib/panel-state.js';
3
- import { ACTIONS_PREFIX, API_PREFIX, PANEL_STATE_PREFIX, PLUGIN_ID, PREFS_PREFIX, PROVISION_PREFIX } from '../config/constants.js';
3
+ import { ACTIONS_PREFIX, API_PREFIX, DIY_DEBUG_PATH, PANEL_STATE_PREFIX, PLUGIN_ID, PREFS_PREFIX, PROVISION_PREFIX } from '../config/constants.js';
4
4
  import { parseProvisionBody, } from './provision.js';
5
5
  import { WorkbenchDataError } from '../host/opencli.js';
6
6
  import { writeResultForClient } from './write-result.js';
@@ -255,3 +255,12 @@ export function registerPanelState(ctx, store) {
255
255
  ],
256
256
  });
257
257
  }
258
+ export function registerDiyDebugAct(ctx, resource, log) {
259
+ return registerPost(ctx, {
260
+ prefix: `${API_PREFIX}/${DIY_DEBUG_PATH}`,
261
+ what: '工作台 DIY 调试动作',
262
+ refusedCode: 'action-refused',
263
+ resources: [resource],
264
+ wrote: () => log?.bump(['diy-debug']),
265
+ });
266
+ }
@@ -1,5 +1,6 @@
1
1
  import type { DshToolRunContext } from '../api/dsh.js';
2
2
  export declare function sessionWorkspace(exec: DshToolRunContext | undefined): string | null;
3
+ export declare function sessionIdOf(exec: DshToolRunContext | undefined): string | null;
3
4
  export declare function textOutput(text: string): Array<Record<string, unknown>>;
4
5
  export declare function textRender(_args: unknown, value: unknown): Array<Record<string, unknown>>;
5
6
  export declare const TEXT_OUTPUT: {
@@ -3,6 +3,10 @@ export function sessionWorkspace(exec) {
3
3
  const cwd = exec?.agent?.session?.header?.cwd;
4
4
  return typeof cwd === 'string' && cwd.trim() !== '' ? cwd.trim() : null;
5
5
  }
6
+ export function sessionIdOf(exec) {
7
+ const id = exec?.agent?.session?.id;
8
+ return typeof id === 'string' && id.trim() !== '' ? id.trim() : null;
9
+ }
6
10
  export function textOutput(text) {
7
11
  return [{ type: 'text', text }];
8
12
  }
package/dist/host.d.ts CHANGED
@@ -7,6 +7,8 @@ export * from './api/long-task.js';
7
7
  export * from './lib/text.js';
8
8
  export * from './lib/ui.js';
9
9
  export * from './lib/panel-state.js';
10
+ export * from './lib/board-fact.js';
11
+ export * from './lib/diy-debug.js';
10
12
  export * from './api/blocker-table.js';
11
13
  export * from './host/browser-find.js';
12
14
  export * from './host/browser-read.js';
package/dist/host.js CHANGED
@@ -7,6 +7,8 @@ export * from './api/long-task.js';
7
7
  export * from './lib/text.js';
8
8
  export * from './lib/ui.js';
9
9
  export * from './lib/panel-state.js';
10
+ export * from './lib/board-fact.js';
11
+ export * from './lib/diy-debug.js';
10
12
  export * from './api/blocker-table.js';
11
13
  export * from './host/browser-find.js';
12
14
  export * from './host/browser-read.js';
package/dist/i18n/en.js CHANGED
@@ -406,4 +406,18 @@ export const en = {
406
406
  'configSync.noSource': 'This machine has no other profile to sync from',
407
407
  'configSync.emptyProviders': 'The workbench has no model provider yet — sync the llm- rows from some profile, or configure one under Models.',
408
408
  'configSync.failed': 'The sync did not go through; try again.',
409
+ 'debug.status': 'Workbench DIY debugging',
410
+ 'debug.status.trouble': 'Workbench DIY debugging needs attention',
411
+ 'debug.stalled': 'Workbench DIY debugging paused',
412
+ 'debug.act.pause': 'Pause debugging',
413
+ 'debug.act.resume': 'Resume debugging',
414
+ 'debug.act.stop': 'Stop debugging',
415
+ 'debug.act.stop.ask': 'Confirm stop',
416
+ 'debug.card.here.title': 'Workbench DIY debugging is on',
417
+ 'debug.card.here.note': 'Do not switch workspaces or touch the panel',
418
+ 'debug.card.away.title': 'Workbench DIY debugging is on',
419
+ 'debug.card.away.note': 'Switch to the Workbench DIY workspace',
420
+ 'debug.card.paused.note': 'Paused',
421
+ 'debug.card.hidden.note': 'Switch to the Workbench panel',
422
+ 'debug.back': 'Back to the workshop screen',
409
423
  };
@@ -408,8 +408,22 @@ export declare const dictionaries: {
408
408
  readonly 'configSync.noSource': "这台机器上只有工作台这一个 profile,没有可同步的来源";
409
409
  readonly 'configSync.emptyProviders': "工作台还没有任何模型供应商 —— 去「配置同步」从某个 profile 把 llm- 那几行搬过来,或自己去「模型」里配。";
410
410
  readonly 'configSync.failed': "同步没成功,再试一次。";
411
+ readonly 'debug.status': "工作台 DIY 开发调试中";
412
+ readonly 'debug.status.trouble': "工作台 DIY 开发调试异常";
413
+ readonly 'debug.stalled': "工作台 DIY 调试暂停";
414
+ readonly 'debug.act.pause': "暂停调试";
415
+ readonly 'debug.act.resume': "继续调试";
416
+ readonly 'debug.act.stop': "结束调试";
417
+ readonly 'debug.act.stop.ask': "确认结束";
418
+ readonly 'debug.card.here.title': "当前工作台 DIY 开发调试中";
419
+ readonly 'debug.card.here.note': "请勿切换工作区和操作面板";
420
+ readonly 'debug.card.away.title': "工作台 DIY 开发调试中";
421
+ readonly 'debug.card.away.note': "请切换到工作台 DIY 工作区";
422
+ readonly 'debug.card.paused.note': "已暂停";
423
+ readonly 'debug.card.hidden.note': "请切换到工作台面板";
424
+ readonly 'debug.back': "回到工坊那一屏";
411
425
  };
412
- en: Record<"time.now" | "time.ago" | "time.minutes" | "time.hours" | "time.days" | "blocker.retry" | "blocker.copy" | "blocker.unknown.title" | "blocker.login.go" | "blocker.login.titleGeneric" | "blocker.login.title" | "blocker.login.manual" | "blocker.login.hint" | "blocker.forbidden.open" | "blocker.forbidden.titleGeneric" | "blocker.forbidden.title" | "blocker.forbidden.hint" | "blocker.timeout.hint" | "blocker.exec.hint" | "blocker.fix.install" | "blocker.fix.update" | "blocker.market.open" | "env.unit.failed" | "env.unit.failedHint" | "env.unit.missingPlugin" | "env.unit.hint" | "env.unit.missingCommands" | "env.unit.missingCommandsHint" | "env.unit.unchecked" | "env.unit.uncheckedHint" | "brand.name" | "toggle.open" | "toggle.collapse" | "project.label" | "workspace.section" | "project.none" | "project.empty" | "project.add" | "project.add.busy" | "project.add.failed" | "project.search.label" | "project.search.placeholder" | "project.search.empty" | "project.group.workspaces" | "project.group.defaultWorkspace" | "project.group.workshop" | "project.rename.row" | "project.rename.current" | "project.rename.title" | "project.rename.description" | "project.rename.field" | "project.rename.placeholder" | "project.rename.hint" | "project.rename.save" | "project.rename.saving" | "project.rename.cancel" | "project.rename.failed" | "session.new" | "session.new.label" | "session.empty" | "session.noProject" | "session.list.label" | "session.copy" | "session.pinned" | "session.actions" | "status.idle" | "status.running" | "status.waitingApproval" | "status.planReview" | "status.waitingAnswer" | "status.compact.approval" | "status.compact.planReview" | "status.compact.answer" | "status.completed" | "status.subagentsRunning.one" | "status.subagentsRunning.other" | "project.attention.warning.one" | "project.attention.warning.other" | "project.attention.running.one" | "project.attention.running.other" | "project.attention.done.one" | "project.attention.done.other" | "project.attention.state.warning" | "project.attention.state.running" | "project.attention.state.done" | "hover.copied" | "time.short.minutes" | "time.short.hours" | "time.short.days" | "time.short.months" | "time.short.years" | "panels.title" | "panels.groupBoardless" | "panels.groupPlugins" | "panels.market.defaultHint" | "panels.market.defaultLabel" | "panels.market.defaultLocked" | "panels.followAll" | "panels.followAllConfirmTitle" | "panels.followAllConfirmDetail" | "panels.followAllConfirmAck" | "panels.followAllConfirmYes" | "panels.followAllConfirmNo" | "panels.enabled" | "panels.disabled" | "panels.choose" | "panels.buildModule" | "panels.failed" | "panels.dragHint" | "panels.unknownStep" | "panels.labelWithHint" | "panels.dep.failed" | "panels.dep.missingPlugin" | "panels.dep.missingCommands" | "panels.dep.unchecked" | "panels.tab.modules" | "panels.tab.market" | "panels.browseMarket" | "panels.noneInstalled" | "panels.noneInstalledHint" | "panels.market.installed" | "panels.market.notActive" | "panels.market.notUsable" | "panels.market.broken" | "panels.market.hasNew" | "panels.market.missing" | "panels.market.unchecked" | "panels.market.checking" | "panels.market.sectionInstalled" | "panels.market.sectionPending" | "panels.market.sectionShared" | "panels.market.sharedUsedBy" | "panels.market.listSeparator" | "panels.market.sharedMissing" | "panels.market.sharedOutdated" | "panels.market.sharedUnsatisfied" | "panels.market.sharedOk" | "panels.market.versionArrow" | "panels.market.lead" | "panels.market.install" | "panels.market.update" | "panels.market.swapSlow" | "panels.market.uninstall" | "panels.market.uninstallLabel" | "panels.market.installing" | "panels.market.updating" | "panels.market.uninstalling" | "panels.market.confirmUninstallTitle" | "panels.market.confirmUninstallDetail" | "panels.market.confirmUninstallAck" | "panels.market.confirmYes" | "panels.market.confirmNo" | "panels.market.failed" | "panels.market.needEnv" | "panels.market.needCommands" | "panels.market.localMark" | "panels.market.localHint" | "panels.market.noSource" | "panels.market.badSource" | "panels.market.empty" | "panels.market.sectionPlugins" | "panels.market.moduleOutdated" | "panels.market.moduleRefused" | "panels.market.moduleRefusedDetail" | "panels.market.moduleRestartHint" | "panels.market.pendingRestart" | "panels.market.workbenchName" | "panels.market.workbenchLocal" | "panels.market.pluginKeptInUse" | "panels.market.pluginKeptUnsure" | "panels.market.pluginKeptHeld" | "panels.market.pluginKeptUnnamed" | "panels.market.pluginBroken" | "panels.market.restartNeeded" | "panels.market.foot" | "panels.market.recheck" | "panels.market.checkUpdates" | "panels.market.checkedAt" | "panels.market.justNow" | "panels.market.minutesAgo" | "panels.market.hoursAgo" | "panels.market.add.description" | "panels.market.add.specPlaceholder" | "panels.market.add.guideToggle" | "panels.market.add.guideHide" | "panels.market.add.guideIdTitle" | "panels.market.add.guideIdExample" | "panels.market.add.guideIdHint" | "panels.market.add.guideGitTitle" | "panels.market.add.guideGitExample" | "panels.market.add.guideGitHint" | "panels.market.add.guidePathTitle" | "panels.market.add.guidePathExample" | "panels.market.add.guidePathHint" | "panels.market.add.guideExampleLabel" | "panels.market.add.guideFill" | "panels.market.add.guideSafety" | "panels.market.add.registryLegend" | "panels.market.add.registryOfficial" | "panels.market.add.registryMirror" | "panels.market.add.registryWithHost" | "panels.market.add.registryToggle" | "panels.market.add.installVersion" | "panels.market.add.registryDefault" | "panels.market.add.registryCustom" | "panels.market.add.registryCustomPlaceholder" | "panels.market.add.registryCustomHint" | "panels.market.add.registryCustomInvalid" | "panels.market.add.run" | "panels.market.add.edit" | "panels.market.add.changeRegistry" | "panels.market.add.installingTitle" | "panels.market.add.installedTitle" | "panels.market.add.failedTitle" | "panels.market.add.cancelledTitle" | "panels.market.add.failureNetworkHost" | "panels.market.add.problemInvalid" | "panels.market.add.problemInstalled" | "panels.market.add.problemNotFound" | "panels.market.add.problemNotPackage" | "panels.market.add.problemNotBundle" | "panels.market.add.problemNotWorkbenchModule" | "panels.market.add.problemNotModuleOrPlugin" | "panels.market.add.failureNotModuleOrPlugin" | "panels.market.add.installedPlugin" | "panels.market.add.pluginPreview" | "panels.market.add.pluginAlias" | "panels.market.add.problemNetwork" | "panels.market.add.problemUnknown" | "panels.market.add.failureNetwork" | "panels.market.add.failureNotFound" | "panels.market.add.failureNoMatchingVersion" | "panels.market.add.failureDiskFull" | "panels.market.add.failurePermission" | "panels.market.add.failureBuildBlocked" | "panels.market.add.failureIntegrity" | "panels.market.add.failureTimeout" | "panels.market.add.failurePnpmMissing" | "panels.market.add.failureInstalled" | "panels.market.add.failureGeneric" | "panels.market.add.approveTitle" | "panels.market.add.approveCaution" | "panels.market.add.approveRun" | "panels.market.add.restart" | "panels.market.add.tookEffect" | "panels.market.add.details" | "panels.market.add.open" | "panels.market.add.title" | "panels.market.add.intro" | "panels.market.add.specLabel" | "panels.market.add.specHint" | "panels.market.add.exampleTitle" | "panels.market.add.exampleFill" | "panels.market.add.registryLabel" | "panels.market.add.registryProfile" | "panels.market.add.registryPnpm" | "panels.market.add.check" | "panels.market.add.checking" | "panels.market.add.classifying" | "panels.market.add.change" | "panels.market.add.previewTitle" | "panels.market.add.fieldName" | "panels.market.add.fieldVersion" | "panels.market.add.fieldDescription" | "panels.market.add.fieldSource" | "panels.market.add.install" | "panels.market.add.installing" | "panels.market.add.cancel" | "panels.market.add.close" | "panels.market.add.retry" | "panels.market.add.changeSource" | "panels.market.add.approveBuilds" | "panels.market.add.approveHint" | "panels.market.add.doneApplied" | "panels.market.add.doneRestart" | "panels.market.add.restartWhy" | "panels.market.add.restartWhy.no-hmr" | "panels.market.add.restartWhy.package-moved" | "panels.market.add.restartWhy.host-module" | "panels.market.add.restartWhy.unmanaged-plugin" | "panels.market.add.restartWhy.module-comparison" | "panels.market.add.cancelled" | "panels.market.add.failed" | "panels.market.add.removed" | "panels.market.add.supplyPending" | "panels.market.add.supplyFailed" | "panels.market.add.notModule" | "panels.market.add.removedRestart" | "panels.market.add.remove" | "panels.market.add.problem.invalidSpec" | "panels.market.add.problem.alreadyInstalled" | "panels.market.add.problem.notFound" | "panels.market.add.problem.notAPackage" | "panels.market.add.problem.notABundle" | "panels.market.add.problem.network" | "panels.market.add.problem.unknown" | "panels.market.add.reason.invalidSpec" | "panels.market.add.reason.incompatible" | "panels.market.add.reason.notBundle" | "panels.market.add.reason.notRemovable" | "panels.market.add.reason.bundleInUse" | "panels.market.add.reason.stopProfile" | "panels.market.add.reason.staleApproval" | "panels.market.add.reason.operationError" | "panels.market.add.reason.buildBlocked" | "panels.market.add.reason.pnpmMissing" | "panels.market.add.reason.noMatchingVersion" | "panels.market.add.reason.diskFull" | "panels.market.add.reason.permission" | "panels.market.add.reason.integrity" | "panels.market.add.reason.timeout" | "panels.market.add.reason.network" | "panels.market.add.reason.notFound" | "panels.market.add.reason.unknown" | "blocker.fix.running" | "blocker.fix.failed" | "blocker.retry.running" | "panels.reading" | "panels.cardBroken" | "panels.cardRetry" | "panels.empty" | "panels.emptyHint" | "env.title" | "env.checking" | "env.installing" | "env.failed" | "env.elapsed" | "env.stepFailed.install" | "env.stepFailed.path" | "env.stepFailed.shell" | "env.bridge.ok" | "env.bridge.short" | "env.bridge.why" | "env.bridge.daemon" | "env.bridge.extension" | "env.bridge.extensionLink" | "env.bridge.profile" | "env.bridge.stale" | "env.bridge.unknown" | "env.fix.title" | "env.fix.why" | "env.fix.whyPath" | "env.fix.whyShell" | "env.fix.step" | "env.fix.stepPath" | "env.fix.stepShell" | "env.fix.permission" | "env.fix.network" | "env.fix.details" | "env.retry" | "env.copyCommand" | "env.copied" | "env.step.opencli" | "env.step.codingPlugin" | "env.step.bridge" | "env.step.warm" | "env.warm.done" | "env.warm.short" | "rightbar.label" | "rightbar.expand" | "rightbar.collapse" | "rightbar.column.label" | "rightbar.column.workbench" | "rightbar.column.dsh" | "rightbar.refresh" | "rightbar.refreshing" | "rightbar.updatedAt" | "rightbar.noProject" | "rightbar.openPlatform" | "coding.notARepo.title" | "error.unknown" | "board.title" | "panel.conversation" | "panels.label" | "configSync.nav" | "configSync.lead" | "configSync.source" | "configSync.sourceBroken" | "configSync.sourceRows" | "configSync.sourceDead" | "configSync.refresh" | "configSync.loading" | "configSync.readHint" | "configSync.tag.new" | "configSync.tag.differs" | "configSync.conflictNote" | "configSync.code.lang" | "configSync.code.copy" | "configSync.code.copied" | "configSync.code.wrap" | "configSync.code.unwrap" | "configSync.code.collapse" | "configSync.code.collapseAria" | "configSync.code.expandAria" | "configSync.code.expand" | "configSync.missing" | "configSync.apply" | "configSync.applyNone" | "configSync.applying" | "configSync.applied" | "configSync.appliedIds" | "configSync.skippedIds" | "configSync.nothing" | "configSync.unreadable" | "configSync.noSource" | "configSync.emptyProviders" | "configSync.failed", string>;
426
+ en: Record<"time.now" | "time.ago" | "time.minutes" | "time.hours" | "time.days" | "blocker.retry" | "blocker.copy" | "blocker.unknown.title" | "blocker.login.go" | "blocker.login.titleGeneric" | "blocker.login.title" | "blocker.login.manual" | "blocker.login.hint" | "blocker.forbidden.open" | "blocker.forbidden.titleGeneric" | "blocker.forbidden.title" | "blocker.forbidden.hint" | "blocker.timeout.hint" | "blocker.exec.hint" | "blocker.fix.install" | "blocker.fix.update" | "blocker.market.open" | "env.unit.failed" | "env.unit.failedHint" | "env.unit.missingPlugin" | "env.unit.hint" | "env.unit.missingCommands" | "env.unit.missingCommandsHint" | "env.unit.unchecked" | "env.unit.uncheckedHint" | "brand.name" | "toggle.open" | "toggle.collapse" | "project.label" | "workspace.section" | "project.none" | "project.empty" | "project.add" | "project.add.busy" | "project.add.failed" | "project.search.label" | "project.search.placeholder" | "project.search.empty" | "project.group.workspaces" | "project.group.defaultWorkspace" | "project.group.workshop" | "project.rename.row" | "project.rename.current" | "project.rename.title" | "project.rename.description" | "project.rename.field" | "project.rename.placeholder" | "project.rename.hint" | "project.rename.save" | "project.rename.saving" | "project.rename.cancel" | "project.rename.failed" | "session.new" | "session.new.label" | "session.empty" | "session.noProject" | "session.list.label" | "session.copy" | "session.pinned" | "session.actions" | "status.idle" | "status.running" | "status.waitingApproval" | "status.planReview" | "status.waitingAnswer" | "status.compact.approval" | "status.compact.planReview" | "status.compact.answer" | "status.completed" | "status.subagentsRunning.one" | "status.subagentsRunning.other" | "project.attention.warning.one" | "project.attention.warning.other" | "project.attention.running.one" | "project.attention.running.other" | "project.attention.done.one" | "project.attention.done.other" | "project.attention.state.warning" | "project.attention.state.running" | "project.attention.state.done" | "hover.copied" | "time.short.minutes" | "time.short.hours" | "time.short.days" | "time.short.months" | "time.short.years" | "panels.title" | "panels.groupBoardless" | "panels.groupPlugins" | "panels.market.defaultHint" | "panels.market.defaultLabel" | "panels.market.defaultLocked" | "panels.followAll" | "panels.followAllConfirmTitle" | "panels.followAllConfirmDetail" | "panels.followAllConfirmAck" | "panels.followAllConfirmYes" | "panels.followAllConfirmNo" | "panels.enabled" | "panels.disabled" | "panels.choose" | "panels.buildModule" | "panels.failed" | "panels.dragHint" | "panels.unknownStep" | "panels.labelWithHint" | "panels.dep.failed" | "panels.dep.missingPlugin" | "panels.dep.missingCommands" | "panels.dep.unchecked" | "panels.tab.modules" | "panels.tab.market" | "panels.browseMarket" | "panels.noneInstalled" | "panels.noneInstalledHint" | "panels.market.installed" | "panels.market.notActive" | "panels.market.notUsable" | "panels.market.broken" | "panels.market.hasNew" | "panels.market.missing" | "panels.market.unchecked" | "panels.market.checking" | "panels.market.sectionInstalled" | "panels.market.sectionPending" | "panels.market.sectionShared" | "panels.market.sharedUsedBy" | "panels.market.listSeparator" | "panels.market.sharedMissing" | "panels.market.sharedOutdated" | "panels.market.sharedUnsatisfied" | "panels.market.sharedOk" | "panels.market.versionArrow" | "panels.market.lead" | "panels.market.install" | "panels.market.update" | "panels.market.swapSlow" | "panels.market.uninstall" | "panels.market.uninstallLabel" | "panels.market.installing" | "panels.market.updating" | "panels.market.uninstalling" | "panels.market.confirmUninstallTitle" | "panels.market.confirmUninstallDetail" | "panels.market.confirmUninstallAck" | "panels.market.confirmYes" | "panels.market.confirmNo" | "panels.market.failed" | "panels.market.needEnv" | "panels.market.needCommands" | "panels.market.localMark" | "panels.market.localHint" | "panels.market.noSource" | "panels.market.badSource" | "panels.market.empty" | "panels.market.sectionPlugins" | "panels.market.moduleOutdated" | "panels.market.moduleRefused" | "panels.market.moduleRefusedDetail" | "panels.market.moduleRestartHint" | "panels.market.pendingRestart" | "panels.market.workbenchName" | "panels.market.workbenchLocal" | "panels.market.pluginKeptInUse" | "panels.market.pluginKeptUnsure" | "panels.market.pluginKeptHeld" | "panels.market.pluginKeptUnnamed" | "panels.market.pluginBroken" | "panels.market.restartNeeded" | "panels.market.foot" | "panels.market.recheck" | "panels.market.checkUpdates" | "panels.market.checkedAt" | "panels.market.justNow" | "panels.market.minutesAgo" | "panels.market.hoursAgo" | "panels.market.add.description" | "panels.market.add.specPlaceholder" | "panels.market.add.guideToggle" | "panels.market.add.guideHide" | "panels.market.add.guideIdTitle" | "panels.market.add.guideIdExample" | "panels.market.add.guideIdHint" | "panels.market.add.guideGitTitle" | "panels.market.add.guideGitExample" | "panels.market.add.guideGitHint" | "panels.market.add.guidePathTitle" | "panels.market.add.guidePathExample" | "panels.market.add.guidePathHint" | "panels.market.add.guideExampleLabel" | "panels.market.add.guideFill" | "panels.market.add.guideSafety" | "panels.market.add.registryLegend" | "panels.market.add.registryOfficial" | "panels.market.add.registryMirror" | "panels.market.add.registryWithHost" | "panels.market.add.registryToggle" | "panels.market.add.installVersion" | "panels.market.add.registryDefault" | "panels.market.add.registryCustom" | "panels.market.add.registryCustomPlaceholder" | "panels.market.add.registryCustomHint" | "panels.market.add.registryCustomInvalid" | "panels.market.add.run" | "panels.market.add.edit" | "panels.market.add.changeRegistry" | "panels.market.add.installingTitle" | "panels.market.add.installedTitle" | "panels.market.add.failedTitle" | "panels.market.add.cancelledTitle" | "panels.market.add.failureNetworkHost" | "panels.market.add.problemInvalid" | "panels.market.add.problemInstalled" | "panels.market.add.problemNotFound" | "panels.market.add.problemNotPackage" | "panels.market.add.problemNotBundle" | "panels.market.add.problemNotWorkbenchModule" | "panels.market.add.problemNotModuleOrPlugin" | "panels.market.add.failureNotModuleOrPlugin" | "panels.market.add.installedPlugin" | "panels.market.add.pluginPreview" | "panels.market.add.pluginAlias" | "panels.market.add.problemNetwork" | "panels.market.add.problemUnknown" | "panels.market.add.failureNetwork" | "panels.market.add.failureNotFound" | "panels.market.add.failureNoMatchingVersion" | "panels.market.add.failureDiskFull" | "panels.market.add.failurePermission" | "panels.market.add.failureBuildBlocked" | "panels.market.add.failureIntegrity" | "panels.market.add.failureTimeout" | "panels.market.add.failurePnpmMissing" | "panels.market.add.failureInstalled" | "panels.market.add.failureGeneric" | "panels.market.add.approveTitle" | "panels.market.add.approveCaution" | "panels.market.add.approveRun" | "panels.market.add.restart" | "panels.market.add.tookEffect" | "panels.market.add.details" | "panels.market.add.open" | "panels.market.add.title" | "panels.market.add.intro" | "panels.market.add.specLabel" | "panels.market.add.specHint" | "panels.market.add.exampleTitle" | "panels.market.add.exampleFill" | "panels.market.add.registryLabel" | "panels.market.add.registryProfile" | "panels.market.add.registryPnpm" | "panels.market.add.check" | "panels.market.add.checking" | "panels.market.add.classifying" | "panels.market.add.change" | "panels.market.add.previewTitle" | "panels.market.add.fieldName" | "panels.market.add.fieldVersion" | "panels.market.add.fieldDescription" | "panels.market.add.fieldSource" | "panels.market.add.install" | "panels.market.add.installing" | "panels.market.add.cancel" | "panels.market.add.close" | "panels.market.add.retry" | "panels.market.add.changeSource" | "panels.market.add.approveBuilds" | "panels.market.add.approveHint" | "panels.market.add.doneApplied" | "panels.market.add.doneRestart" | "panels.market.add.restartWhy" | "panels.market.add.restartWhy.no-hmr" | "panels.market.add.restartWhy.package-moved" | "panels.market.add.restartWhy.host-module" | "panels.market.add.restartWhy.unmanaged-plugin" | "panels.market.add.restartWhy.module-comparison" | "panels.market.add.cancelled" | "panels.market.add.failed" | "panels.market.add.removed" | "panels.market.add.supplyPending" | "panels.market.add.supplyFailed" | "panels.market.add.notModule" | "panels.market.add.removedRestart" | "panels.market.add.remove" | "panels.market.add.problem.invalidSpec" | "panels.market.add.problem.alreadyInstalled" | "panels.market.add.problem.notFound" | "panels.market.add.problem.notAPackage" | "panels.market.add.problem.notABundle" | "panels.market.add.problem.network" | "panels.market.add.problem.unknown" | "panels.market.add.reason.invalidSpec" | "panels.market.add.reason.incompatible" | "panels.market.add.reason.notBundle" | "panels.market.add.reason.notRemovable" | "panels.market.add.reason.bundleInUse" | "panels.market.add.reason.stopProfile" | "panels.market.add.reason.staleApproval" | "panels.market.add.reason.operationError" | "panels.market.add.reason.buildBlocked" | "panels.market.add.reason.pnpmMissing" | "panels.market.add.reason.noMatchingVersion" | "panels.market.add.reason.diskFull" | "panels.market.add.reason.permission" | "panels.market.add.reason.integrity" | "panels.market.add.reason.timeout" | "panels.market.add.reason.network" | "panels.market.add.reason.notFound" | "panels.market.add.reason.unknown" | "blocker.fix.running" | "blocker.fix.failed" | "blocker.retry.running" | "panels.reading" | "panels.cardBroken" | "panels.cardRetry" | "panels.empty" | "panels.emptyHint" | "env.title" | "env.checking" | "env.installing" | "env.failed" | "env.elapsed" | "env.stepFailed.install" | "env.stepFailed.path" | "env.stepFailed.shell" | "env.bridge.ok" | "env.bridge.short" | "env.bridge.why" | "env.bridge.daemon" | "env.bridge.extension" | "env.bridge.extensionLink" | "env.bridge.profile" | "env.bridge.stale" | "env.bridge.unknown" | "env.fix.title" | "env.fix.why" | "env.fix.whyPath" | "env.fix.whyShell" | "env.fix.step" | "env.fix.stepPath" | "env.fix.stepShell" | "env.fix.permission" | "env.fix.network" | "env.fix.details" | "env.retry" | "env.copyCommand" | "env.copied" | "env.step.opencli" | "env.step.codingPlugin" | "env.step.bridge" | "env.step.warm" | "env.warm.done" | "env.warm.short" | "rightbar.label" | "rightbar.expand" | "rightbar.collapse" | "rightbar.column.label" | "rightbar.column.workbench" | "rightbar.column.dsh" | "rightbar.refresh" | "rightbar.refreshing" | "rightbar.updatedAt" | "rightbar.noProject" | "rightbar.openPlatform" | "coding.notARepo.title" | "error.unknown" | "board.title" | "panel.conversation" | "panels.label" | "configSync.nav" | "configSync.lead" | "configSync.source" | "configSync.sourceBroken" | "configSync.sourceRows" | "configSync.sourceDead" | "configSync.refresh" | "configSync.loading" | "configSync.readHint" | "configSync.tag.new" | "configSync.tag.differs" | "configSync.conflictNote" | "configSync.code.lang" | "configSync.code.copy" | "configSync.code.copied" | "configSync.code.wrap" | "configSync.code.unwrap" | "configSync.code.collapse" | "configSync.code.collapseAria" | "configSync.code.expandAria" | "configSync.code.expand" | "configSync.missing" | "configSync.apply" | "configSync.applyNone" | "configSync.applying" | "configSync.applied" | "configSync.appliedIds" | "configSync.skippedIds" | "configSync.nothing" | "configSync.unreadable" | "configSync.noSource" | "configSync.emptyProviders" | "configSync.failed" | "debug.status" | "debug.status.trouble" | "debug.stalled" | "debug.act.pause" | "debug.act.resume" | "debug.act.stop" | "debug.act.stop.ask" | "debug.card.here.title" | "debug.card.here.note" | "debug.card.away.title" | "debug.card.away.note" | "debug.card.paused.note" | "debug.card.hidden.note" | "debug.back", string>;
413
427
  };
414
428
  export type { WorkbenchMessages };
415
429
  export interface Dictionaries {
package/dist/i18n/zh.d.ts CHANGED
@@ -406,5 +406,19 @@ export declare const zh: {
406
406
  readonly 'configSync.noSource': "这台机器上只有工作台这一个 profile,没有可同步的来源";
407
407
  readonly 'configSync.emptyProviders': "工作台还没有任何模型供应商 —— 去「配置同步」从某个 profile 把 llm- 那几行搬过来,或自己去「模型」里配。";
408
408
  readonly 'configSync.failed': "同步没成功,再试一次。";
409
+ readonly 'debug.status': "工作台 DIY 开发调试中";
410
+ readonly 'debug.status.trouble': "工作台 DIY 开发调试异常";
411
+ readonly 'debug.stalled': "工作台 DIY 调试暂停";
412
+ readonly 'debug.act.pause': "暂停调试";
413
+ readonly 'debug.act.resume': "继续调试";
414
+ readonly 'debug.act.stop': "结束调试";
415
+ readonly 'debug.act.stop.ask': "确认结束";
416
+ readonly 'debug.card.here.title': "当前工作台 DIY 开发调试中";
417
+ readonly 'debug.card.here.note': "请勿切换工作区和操作面板";
418
+ readonly 'debug.card.away.title': "工作台 DIY 开发调试中";
419
+ readonly 'debug.card.away.note': "请切换到工作台 DIY 工作区";
420
+ readonly 'debug.card.paused.note': "已暂停";
421
+ readonly 'debug.card.hidden.note': "请切换到工作台面板";
422
+ readonly 'debug.back': "回到工坊那一屏";
409
423
  };
410
424
  export type WorkbenchMessages = typeof zh;
package/dist/i18n/zh.js CHANGED
@@ -406,4 +406,18 @@ export const zh = {
406
406
  'configSync.noSource': '这台机器上只有工作台这一个 profile,没有可同步的来源',
407
407
  'configSync.emptyProviders': '工作台还没有任何模型供应商 —— 去「配置同步」从某个 profile 把 llm- 那几行搬过来,或自己去「模型」里配。',
408
408
  'configSync.failed': '同步没成功,再试一次。',
409
+ 'debug.status': '工作台 DIY 开发调试中',
410
+ 'debug.status.trouble': '工作台 DIY 开发调试异常',
411
+ 'debug.stalled': '工作台 DIY 调试暂停',
412
+ 'debug.act.pause': '暂停调试',
413
+ 'debug.act.resume': '继续调试',
414
+ 'debug.act.stop': '结束调试',
415
+ 'debug.act.stop.ask': '确认结束',
416
+ 'debug.card.here.title': '当前工作台 DIY 开发调试中',
417
+ 'debug.card.here.note': '请勿切换工作区和操作面板',
418
+ 'debug.card.away.title': '工作台 DIY 开发调试中',
419
+ 'debug.card.away.note': '请切换到工作台 DIY 工作区',
420
+ 'debug.card.paused.note': '已暂停',
421
+ 'debug.card.hidden.note': '请切换到工作台面板',
422
+ 'debug.back': '回到工坊那一屏',
409
423
  };
package/dist/index.d.ts CHANGED
@@ -45,6 +45,8 @@ export * from './i18n/zh.js';
45
45
  export * from './lib/blocker-action.js';
46
46
  export * from './lib/busy.js';
47
47
  export * from './lib/form-problem.js';
48
+ export * from './lib/board-fact.js';
49
+ export * from './lib/diy-debug.js';
48
50
  export * from './lib/panel-state.js';
49
51
  export * from './lib/react.js';
50
52
  export * from './lib/text.js';
package/dist/index.js CHANGED
@@ -45,6 +45,8 @@ export * from './i18n/zh.js';
45
45
  export * from './lib/blocker-action.js';
46
46
  export * from './lib/busy.js';
47
47
  export * from './lib/form-problem.js';
48
+ export * from './lib/board-fact.js';
49
+ export * from './lib/diy-debug.js';
48
50
  export * from './lib/panel-state.js';
49
51
  export * from './lib/react.js';
50
52
  export * from './lib/text.js';
@@ -0,0 +1,13 @@
1
+ export type BoardFactState = 'workshop' | 'other' | 'hidden' | 'unknown';
2
+ export type BoardSituation = 'ok' | 'off-workspace' | 'panel-closed' | 'other-board' | 'unknown';
3
+ export interface BoardProbe {
4
+ readonly workbench: boolean;
5
+ readonly where: string;
6
+ readonly bar: boolean;
7
+ readonly board: string;
8
+ readonly open: boolean;
9
+ readonly drawn: boolean;
10
+ }
11
+ export declare function insideWorkshop(root: string, target: string): boolean;
12
+ export declare function boardFactOf(probe: BoardProbe, workshop: string | null): BoardFactState;
13
+ export declare function boardSituation(probe: BoardProbe, workshop: string | null): BoardSituation;
@@ -0,0 +1,28 @@
1
+ export function insideWorkshop(root, target) {
2
+ if (target === root)
3
+ return true;
4
+ const base = root.endsWith('/') ? root : `${root}/`;
5
+ return target.startsWith(base);
6
+ }
7
+ export function boardFactOf(probe, workshop) {
8
+ if (!probe.workbench)
9
+ return 'unknown';
10
+ if (!probe.bar || !probe.open || !probe.drawn)
11
+ return 'hidden';
12
+ if (probe.board === '' || workshop === null)
13
+ return 'unknown';
14
+ return insideWorkshop(workshop, probe.board) ? 'workshop' : 'other';
15
+ }
16
+ export function boardSituation(probe, workshop) {
17
+ if (!probe.workbench || workshop === null)
18
+ return 'unknown';
19
+ const drawn = probe.bar && probe.open && probe.drawn;
20
+ if (drawn) {
21
+ if (probe.board === '')
22
+ return 'unknown';
23
+ return insideWorkshop(workshop, probe.board) ? 'ok' : 'other-board';
24
+ }
25
+ if (probe.where !== '' && !insideWorkshop(workshop, probe.where))
26
+ return 'off-workspace';
27
+ return 'panel-closed';
28
+ }