@dsh-workbench/core 0.2.10 → 0.2.12
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/client.js +785 -2361
- package/dist/board.css +0 -12
- package/dist/client/client.body.js +785 -2361
- package/dist/client/index.js +786 -2362
- package/dist/host/index.js +2902 -859
- package/dist/types/app/client.d.ts +42 -52
- package/dist/types/app/layouts/rightbar/board-mock.d.ts +1 -1
- package/dist/types/app/layouts/rightbar/board-plan.d.ts +2 -12
- package/dist/types/app/layouts/rightbar/board-shape.d.ts +14 -0
- package/dist/types/app/layouts/rightbar/kit-preview-controls.d.ts +10 -0
- package/dist/types/app/layouts/rightbar/kit-preview-frame.d.ts +14 -0
- package/dist/types/app/layouts/rightbar/kit-preview-rows.d.ts +5 -0
- package/dist/types/app/layouts/rightbar/kit-preview.d.ts +3 -0
- package/dist/types/app/layouts/rightbar/market-row-icon.d.ts +1 -1
- package/dist/types/app/layouts/rightbar/market-section-icon.d.ts +1 -1
- package/dist/types/app/layouts/sidebar/workspace-groups.d.ts +0 -1
- package/dist/types/app/layouts/sidebar/workspace-items.d.ts +2 -3
- package/dist/types/dev/MockStrip.d.ts +15 -0
- package/dist/types/dev/surface-types.d.ts +53 -0
- package/dist/types/dev/surface.d.ts +2 -0
- package/dist/types/dev/surface.stub.d.ts +2 -0
- package/dist/types/modules/panels/__tests__/diy-harness.d.ts +32 -0
- package/dist/types/modules/panels/__tests__/market-tools-harness.d.ts +1 -1
- package/dist/types/modules/panels/__tests__/scope-support.d.ts +1 -1
- package/dist/types/modules/panels/model/diy-act.d.ts +4 -0
- package/dist/types/modules/panels/model/diy-act.test.d.ts +1 -0
- package/dist/types/modules/panels/model/diy-browser-act.d.ts +47 -0
- package/dist/types/modules/panels/model/diy-browser.d.ts +47 -0
- package/dist/types/modules/panels/model/diy-browser.test.d.ts +1 -0
- package/dist/types/modules/panels/model/diy-context.d.ts +102 -0
- package/dist/types/modules/panels/model/diy-context.test.d.ts +1 -0
- package/dist/types/modules/panels/model/diy-logs.d.ts +18 -0
- package/dist/types/modules/panels/model/diy-logs.test.d.ts +1 -0
- package/dist/types/modules/panels/model/diy-look.d.ts +14 -0
- package/dist/types/modules/panels/model/diy-look.test.d.ts +1 -0
- package/dist/types/modules/panels/model/diy-net.d.ts +3 -0
- package/dist/types/modules/panels/model/diy-net.test.d.ts +1 -0
- package/dist/types/modules/panels/model/diy-page.d.ts +15 -0
- package/dist/types/modules/panels/model/diy-page.test.d.ts +1 -0
- package/dist/types/modules/panels/model/diy-schema.d.ts +9 -0
- package/dist/types/modules/panels/model/diy-schema.test.d.ts +1 -0
- package/dist/types/modules/panels/model/diy-scripts.d.ts +64 -0
- package/dist/types/modules/panels/unit.d.ts +43 -3
- package/dist/types/shared/api/diy.d.ts +4 -0
- package/dist/types/shared/api/host/__tests__/png-fixtures.d.ts +17 -0
- package/dist/types/shared/api/host/mount-units.d.ts +6 -0
- package/dist/types/shared/api/host/png-crop.d.ts +21 -0
- package/dist/types/shared/api/host/png-crop.test.d.ts +1 -0
- package/package.json +2 -2
- package/skills/workbench-module-diy/BUILD.md +4 -3
- package/skills/workbench-module-diy/DATASOURCE.md +4 -4
- package/skills/workbench-module-diy/DESIGN.md +1 -1
- package/skills/workbench-module-diy/KIT.md +121 -0
- package/skills/workbench-module-diy/PANEL.md +12 -2
- package/skills/workbench-module-diy/REVIEW.md +12 -6
- package/skills/workbench-module-diy/SKILL.md +7 -6
- package/skills/workbench-module-diy/TOOLING.md +5 -4
- package/skills/workbench-module-diy/TOOLS.md +3 -3
- package/skills/workbench-module-diy/WIRING.md +6 -6
- package/dist/types/app/layouts/sidebar/WorkspaceSearchField.d.ts +0 -9
|
@@ -5,7 +5,6 @@ import * as apiModule from '@dsh-workbench/shared';
|
|
|
5
5
|
import * as chipsModule from '../shared/api/context-chips';
|
|
6
6
|
import * as apiResourceModule from '../shared/hooks/use-api-resource';
|
|
7
7
|
import * as cardSummaryModule from '../shared/hooks/use-card-summary';
|
|
8
|
-
import * as fixturePickModule from '../shared/hooks/use-fixture-pick';
|
|
9
8
|
import * as hostWriteModule from '../shared/hooks/use-host-write';
|
|
10
9
|
import * as longTaskModule from '../shared/hooks/use-long-task';
|
|
11
10
|
import * as capabilityGateModule from '../shared/hooks/use-capability-gate';
|
|
@@ -23,8 +22,6 @@ export declare const kit: {
|
|
|
23
22
|
readonly fixture?: apiModule.CapabilityPayload | undefined;
|
|
24
23
|
}): capabilityGateModule.CapabilityGate;
|
|
25
24
|
useCapabilityMap(refreshToken: number): capabilityGateModule.CapabilityMapView;
|
|
26
|
-
mockModeOn(search: string): boolean;
|
|
27
|
-
crashModeOn(search: string): boolean;
|
|
28
25
|
useLongTask<T extends {
|
|
29
26
|
readonly id: string;
|
|
30
27
|
readonly status: apiModule.LongTaskStatus;
|
|
@@ -39,7 +36,6 @@ export declare const kit: {
|
|
|
39
36
|
useFactRevision(fact: string): number;
|
|
40
37
|
subscribeFactRevision(fact: string, listener: () => void): () => void;
|
|
41
38
|
useFactInvalidate(): (fact?: string) => void;
|
|
42
|
-
useFixturePick<T extends fixturePickModule.PickableFixture>(options: fixturePickModule.FixturePickOptions<T>): fixturePickModule.FixturePick<T>;
|
|
43
39
|
useCardSummary(onSummary: (summary: cardSummaryModule.CardSummary) => void, summary: {
|
|
44
40
|
readonly refreshing: boolean;
|
|
45
41
|
readonly at: number | null | undefined;
|
|
@@ -107,25 +103,13 @@ export declare const kit: {
|
|
|
107
103
|
ApprovalDetail(props: apiModule.ApprovalDetailProps): JSX.Element | null;
|
|
108
104
|
ApprovalPlan({ rows, hint, warn, children }: apiModule.ApprovalPlanProps): JSX.Element;
|
|
109
105
|
Card({ t, title, refreshing, onRefresh, meta, head, children }: apiModule.CardProps): JSX.Element;
|
|
106
|
+
cardIdOf(unit: string | null): string | undefined;
|
|
107
|
+
CardAnchor({ unit, children }: apiModule.CardAnchorProps): JSX.Element;
|
|
110
108
|
errorReasonOf(error: unknown): string;
|
|
111
109
|
CardBoundary: typeof apiModule.CardBoundary;
|
|
112
110
|
CardHead({ t, title, meta, refreshing, onRefresh, gear, gearOpen, onToggleGear, platformHref, platform, platformTitle, }: apiModule.CardHeadProps): JSX.Element;
|
|
113
111
|
ChoiceGroup(props: apiModule.ChoiceGroupProps): JSX.Element;
|
|
114
112
|
LongTaskRow(props: apiModule.LongTaskRowProps): JSX.Element;
|
|
115
|
-
MockStrip({ mocks, index, onPick, note, real, }: {
|
|
116
|
-
readonly mocks: readonly {
|
|
117
|
-
readonly id: string;
|
|
118
|
-
readonly label: string;
|
|
119
|
-
}[];
|
|
120
|
-
readonly index: number;
|
|
121
|
-
readonly onPick: (next: number) => void;
|
|
122
|
-
readonly note?: string;
|
|
123
|
-
readonly real?: {
|
|
124
|
-
readonly label: string;
|
|
125
|
-
readonly active: boolean;
|
|
126
|
-
readonly onPick: () => void;
|
|
127
|
-
} | undefined;
|
|
128
|
-
}): JSX.Element;
|
|
129
113
|
Note({ tone, as, role, children }: apiModule.NoteProps): JSX.Element;
|
|
130
114
|
SkeletonRows({ rows }: {
|
|
131
115
|
rows?: number;
|
|
@@ -140,6 +124,13 @@ export declare const kit: {
|
|
|
140
124
|
Row({ label, value }: apiModule.RowProps): JSX.Element;
|
|
141
125
|
SaveBar({ busy, disabled, labels, onCancel, onSave }: apiModule.SaveBarProps): JSX.Element;
|
|
142
126
|
SettingsSection({ label, title, action, children }: apiModule.SettingsSectionProps): JSX.Element;
|
|
127
|
+
searchTextOf(option: apiModule.SelectFieldOption): string;
|
|
128
|
+
defaultSelectFilter(option: apiModule.SelectFieldOption, query: string): boolean;
|
|
129
|
+
filterSelectOptions(options: readonly apiModule.SelectFieldOption[], query: string, filter?: (option: apiModule.SelectFieldOption, query: string) => boolean): readonly apiModule.SelectFieldOption[];
|
|
130
|
+
selectCursorValue(shown: readonly apiModule.SelectFieldOption[], cursor: number | null): string | null;
|
|
131
|
+
stepSelectCursor(shown: readonly apiModule.SelectFieldOption[], cursor: number | null, step: 1 | -1): number | null;
|
|
132
|
+
selectEntries(shown: readonly apiModule.SelectFieldOption[], emptyText: string | undefined): readonly import("@deepseek-ai/dsh-client-ui-primitives").MenuEntry[];
|
|
133
|
+
SelectField(props: apiModule.SelectFieldProps): apiModule.ReactNode;
|
|
143
134
|
Stack({ children }: apiModule.StackProps): JSX.Element;
|
|
144
135
|
StateBlock({ title, dot, hint, actions, resolving, children }: apiModule.StateBlockProps): JSX.Element;
|
|
145
136
|
TextField({ invalid, className, ...rest }: apiModule.TextFieldProps): JSX.Element;
|
|
@@ -150,6 +141,7 @@ export declare const kit: {
|
|
|
150
141
|
IconOpencli({ size }: apiModule.IconProps): JSX.Element;
|
|
151
142
|
IconNpm({ size }: apiModule.IconProps): JSX.Element;
|
|
152
143
|
IconModules({ size }: apiModule.IconProps): JSX.Element;
|
|
144
|
+
IconModuleMark({ size }: apiModule.IconProps): JSX.Element;
|
|
153
145
|
IconPanelScreen({ size }: apiModule.IconProps): JSX.Element;
|
|
154
146
|
PLUGIN_ID: "@dsh-workbench/core";
|
|
155
147
|
RELEASE_SIBLINGS: readonly ["@dsh-workbench/shared", "@dsh-workbench/module-tools"];
|
|
@@ -329,7 +321,7 @@ export declare const kit: {
|
|
|
329
321
|
readonly "panels.market.pluginKeptUnsure": "\u6587\u4EF6\u5148\u7559\u7740\uFF1A\u8FD9\u53F0\u673A\u5668\u4E0A\u8FD8\u6709\u6A21\u5757\u770B\u4E0D\u51FA\u7528\u4E86\u4EC0\u4E48\uFF0C\u8BF4\u4E0D\u51C6\u8C01\u5728\u7528\u5B83\u3002";
|
|
330
322
|
readonly "panels.market.pluginKeptHeld": "\u6587\u4EF6\u7559\u7740\uFF1A\u4F60\u81EA\u5DF1\u88C5\u7684\u90A3\u4E00\u4EFD\uFF0C\u6A21\u5757\u653E\u624B\u4E0D\u52A8\u5B83\u3002";
|
|
331
323
|
readonly "panels.market.pluginKeptUnnamed": "\u6587\u4EF6\u5148\u7559\u7740\uFF1A\u770B\u4E0D\u51FA\u8FD9\u662F\u54EA\u4E2A\u63D2\u4EF6\uFF0C\u8BF4\u4E0D\u51C6\u8C01\u5728\u7528\u5B83\u3002";
|
|
332
|
-
readonly "panels.market.pluginBroken": "\u8FD9\u4EFD\u88C5\u574F\u4E86\uFF1A\u770B\u4E0D\u51FA\u5B83\u662F\u4E2A\u63D2\u4EF6\u3002\u53EF\u4EE5\u5378\u8F7D\uFF0C\u6216\u8005\u76F4\u63A5\u8DDF agent \u8BF4\uFF1A\u7528
|
|
324
|
+
readonly "panels.market.pluginBroken": "\u8FD9\u4EFD\u88C5\u574F\u4E86\uFF1A\u770B\u4E0D\u51FA\u5B83\u662F\u4E2A\u63D2\u4EF6\u3002\u53EF\u4EE5\u5378\u8F7D\uFF0C\u6216\u8005\u76F4\u63A5\u8DDF agent \u8BF4\uFF1A\u7528 workbench_modules_install_bundle \u6309\u5305\u540D\u518D\u88C5\u4E00\u6B21\u3002";
|
|
333
325
|
readonly "panels.market.restartNeeded": "\u65B0\u7248\u88C5\u597D\u4E86\uFF0C\u91CD\u542F\u4E00\u6B21\u624D\u751F\u6548\u3002";
|
|
334
326
|
readonly "panels.market.foot": "\u88C5\u597D\u540E\u5230\u90A3\u4E2A\u9879\u76EE\u7684\u9762\u677F\u9875\u52FE\u9009\u5B83\uFF0C\u6A21\u5757\u624D\u4F1A\u51FA\u73B0\u3002";
|
|
335
327
|
readonly "panels.market.recheck": "\u91CD\u65B0\u68C0\u67E5\u66F4\u65B0";
|
|
@@ -733,7 +725,7 @@ export declare const kit: {
|
|
|
733
725
|
readonly "panels.market.pluginKeptUnsure": "\u6587\u4EF6\u5148\u7559\u7740\uFF1A\u8FD9\u53F0\u673A\u5668\u4E0A\u8FD8\u6709\u6A21\u5757\u770B\u4E0D\u51FA\u7528\u4E86\u4EC0\u4E48\uFF0C\u8BF4\u4E0D\u51C6\u8C01\u5728\u7528\u5B83\u3002";
|
|
734
726
|
readonly "panels.market.pluginKeptHeld": "\u6587\u4EF6\u7559\u7740\uFF1A\u4F60\u81EA\u5DF1\u88C5\u7684\u90A3\u4E00\u4EFD\uFF0C\u6A21\u5757\u653E\u624B\u4E0D\u52A8\u5B83\u3002";
|
|
735
727
|
readonly "panels.market.pluginKeptUnnamed": "\u6587\u4EF6\u5148\u7559\u7740\uFF1A\u770B\u4E0D\u51FA\u8FD9\u662F\u54EA\u4E2A\u63D2\u4EF6\uFF0C\u8BF4\u4E0D\u51C6\u8C01\u5728\u7528\u5B83\u3002";
|
|
736
|
-
readonly "panels.market.pluginBroken": "\u8FD9\u4EFD\u88C5\u574F\u4E86\uFF1A\u770B\u4E0D\u51FA\u5B83\u662F\u4E2A\u63D2\u4EF6\u3002\u53EF\u4EE5\u5378\u8F7D\uFF0C\u6216\u8005\u76F4\u63A5\u8DDF agent \u8BF4\uFF1A\u7528
|
|
728
|
+
readonly "panels.market.pluginBroken": "\u8FD9\u4EFD\u88C5\u574F\u4E86\uFF1A\u770B\u4E0D\u51FA\u5B83\u662F\u4E2A\u63D2\u4EF6\u3002\u53EF\u4EE5\u5378\u8F7D\uFF0C\u6216\u8005\u76F4\u63A5\u8DDF agent \u8BF4\uFF1A\u7528 workbench_modules_install_bundle \u6309\u5305\u540D\u518D\u88C5\u4E00\u6B21\u3002";
|
|
737
729
|
readonly "panels.market.restartNeeded": "\u65B0\u7248\u88C5\u597D\u4E86\uFF0C\u91CD\u542F\u4E00\u6B21\u624D\u751F\u6548\u3002";
|
|
738
730
|
readonly "panels.market.foot": "\u88C5\u597D\u540E\u5230\u90A3\u4E2A\u9879\u76EE\u7684\u9762\u677F\u9875\u52FE\u9009\u5B83\uFF0C\u6A21\u5757\u624D\u4F1A\u51FA\u73B0\u3002";
|
|
739
731
|
readonly "panels.market.recheck": "\u91CD\u65B0\u68C0\u67E5\u66F4\u65B0";
|
|
@@ -1008,6 +1000,8 @@ export declare const kit: {
|
|
|
1008
1000
|
h: typeof import("react").createElement;
|
|
1009
1001
|
Fragment: import("react").ExoticComponent<import("react").FragmentProps>;
|
|
1010
1002
|
Component: typeof import("react").Component;
|
|
1003
|
+
createContext: typeof import("react").createContext;
|
|
1004
|
+
useContext: typeof import("react").useContext;
|
|
1011
1005
|
useState: typeof import("react").useState;
|
|
1012
1006
|
useEffect: typeof import("react").useEffect;
|
|
1013
1007
|
useLayoutEffect: typeof import("react").useLayoutEffect;
|
|
@@ -1082,25 +1076,13 @@ export declare const kit: {
|
|
|
1082
1076
|
ApprovalDetail(props: apiModule.ApprovalDetailProps): JSX.Element | null;
|
|
1083
1077
|
ApprovalPlan({ rows, hint, warn, children }: apiModule.ApprovalPlanProps): JSX.Element;
|
|
1084
1078
|
Card({ t, title, refreshing, onRefresh, meta, head, children }: apiModule.CardProps): JSX.Element;
|
|
1079
|
+
cardIdOf(unit: string | null): string | undefined;
|
|
1080
|
+
CardAnchor({ unit, children }: apiModule.CardAnchorProps): JSX.Element;
|
|
1085
1081
|
errorReasonOf(error: unknown): string;
|
|
1086
1082
|
CardBoundary: typeof apiModule.CardBoundary;
|
|
1087
1083
|
CardHead({ t, title, meta, refreshing, onRefresh, gear, gearOpen, onToggleGear, platformHref, platform, platformTitle, }: apiModule.CardHeadProps): JSX.Element;
|
|
1088
1084
|
ChoiceGroup(props: apiModule.ChoiceGroupProps): JSX.Element;
|
|
1089
1085
|
LongTaskRow(props: apiModule.LongTaskRowProps): JSX.Element;
|
|
1090
|
-
MockStrip({ mocks, index, onPick, note, real, }: {
|
|
1091
|
-
readonly mocks: readonly {
|
|
1092
|
-
readonly id: string;
|
|
1093
|
-
readonly label: string;
|
|
1094
|
-
}[];
|
|
1095
|
-
readonly index: number;
|
|
1096
|
-
readonly onPick: (next: number) => void;
|
|
1097
|
-
readonly note?: string;
|
|
1098
|
-
readonly real?: {
|
|
1099
|
-
readonly label: string;
|
|
1100
|
-
readonly active: boolean;
|
|
1101
|
-
readonly onPick: () => void;
|
|
1102
|
-
} | undefined;
|
|
1103
|
-
}): JSX.Element;
|
|
1104
1086
|
Note({ tone, as, role, children }: apiModule.NoteProps): JSX.Element;
|
|
1105
1087
|
SkeletonRows({ rows }: {
|
|
1106
1088
|
rows?: number;
|
|
@@ -1115,6 +1097,13 @@ export declare const kit: {
|
|
|
1115
1097
|
Row({ label, value }: apiModule.RowProps): JSX.Element;
|
|
1116
1098
|
SaveBar({ busy, disabled, labels, onCancel, onSave }: apiModule.SaveBarProps): JSX.Element;
|
|
1117
1099
|
SettingsSection({ label, title, action, children }: apiModule.SettingsSectionProps): JSX.Element;
|
|
1100
|
+
searchTextOf(option: apiModule.SelectFieldOption): string;
|
|
1101
|
+
defaultSelectFilter(option: apiModule.SelectFieldOption, query: string): boolean;
|
|
1102
|
+
filterSelectOptions(options: readonly apiModule.SelectFieldOption[], query: string, filter?: (option: apiModule.SelectFieldOption, query: string) => boolean): readonly apiModule.SelectFieldOption[];
|
|
1103
|
+
selectCursorValue(shown: readonly apiModule.SelectFieldOption[], cursor: number | null): string | null;
|
|
1104
|
+
stepSelectCursor(shown: readonly apiModule.SelectFieldOption[], cursor: number | null, step: 1 | -1): number | null;
|
|
1105
|
+
selectEntries(shown: readonly apiModule.SelectFieldOption[], emptyText: string | undefined): readonly import("@deepseek-ai/dsh-client-ui-primitives").MenuEntry[];
|
|
1106
|
+
SelectField(props: apiModule.SelectFieldProps): apiModule.ReactNode;
|
|
1118
1107
|
Stack({ children }: apiModule.StackProps): JSX.Element;
|
|
1119
1108
|
StateBlock({ title, dot, hint, actions, resolving, children }: apiModule.StateBlockProps): JSX.Element;
|
|
1120
1109
|
TextField({ invalid, className, ...rest }: apiModule.TextFieldProps): JSX.Element;
|
|
@@ -1125,6 +1114,7 @@ export declare const kit: {
|
|
|
1125
1114
|
IconOpencli({ size }: apiModule.IconProps): JSX.Element;
|
|
1126
1115
|
IconNpm({ size }: apiModule.IconProps): JSX.Element;
|
|
1127
1116
|
IconModules({ size }: apiModule.IconProps): JSX.Element;
|
|
1117
|
+
IconModuleMark({ size }: apiModule.IconProps): JSX.Element;
|
|
1128
1118
|
IconPanelScreen({ size }: apiModule.IconProps): JSX.Element;
|
|
1129
1119
|
PLUGIN_ID: "@dsh-workbench/core";
|
|
1130
1120
|
RELEASE_SIBLINGS: readonly ["@dsh-workbench/shared", "@dsh-workbench/module-tools"];
|
|
@@ -1304,7 +1294,7 @@ export declare const kit: {
|
|
|
1304
1294
|
readonly "panels.market.pluginKeptUnsure": "\u6587\u4EF6\u5148\u7559\u7740\uFF1A\u8FD9\u53F0\u673A\u5668\u4E0A\u8FD8\u6709\u6A21\u5757\u770B\u4E0D\u51FA\u7528\u4E86\u4EC0\u4E48\uFF0C\u8BF4\u4E0D\u51C6\u8C01\u5728\u7528\u5B83\u3002";
|
|
1305
1295
|
readonly "panels.market.pluginKeptHeld": "\u6587\u4EF6\u7559\u7740\uFF1A\u4F60\u81EA\u5DF1\u88C5\u7684\u90A3\u4E00\u4EFD\uFF0C\u6A21\u5757\u653E\u624B\u4E0D\u52A8\u5B83\u3002";
|
|
1306
1296
|
readonly "panels.market.pluginKeptUnnamed": "\u6587\u4EF6\u5148\u7559\u7740\uFF1A\u770B\u4E0D\u51FA\u8FD9\u662F\u54EA\u4E2A\u63D2\u4EF6\uFF0C\u8BF4\u4E0D\u51C6\u8C01\u5728\u7528\u5B83\u3002";
|
|
1307
|
-
readonly "panels.market.pluginBroken": "\u8FD9\u4EFD\u88C5\u574F\u4E86\uFF1A\u770B\u4E0D\u51FA\u5B83\u662F\u4E2A\u63D2\u4EF6\u3002\u53EF\u4EE5\u5378\u8F7D\uFF0C\u6216\u8005\u76F4\u63A5\u8DDF agent \u8BF4\uFF1A\u7528
|
|
1297
|
+
readonly "panels.market.pluginBroken": "\u8FD9\u4EFD\u88C5\u574F\u4E86\uFF1A\u770B\u4E0D\u51FA\u5B83\u662F\u4E2A\u63D2\u4EF6\u3002\u53EF\u4EE5\u5378\u8F7D\uFF0C\u6216\u8005\u76F4\u63A5\u8DDF agent \u8BF4\uFF1A\u7528 workbench_modules_install_bundle \u6309\u5305\u540D\u518D\u88C5\u4E00\u6B21\u3002";
|
|
1308
1298
|
readonly "panels.market.restartNeeded": "\u65B0\u7248\u88C5\u597D\u4E86\uFF0C\u91CD\u542F\u4E00\u6B21\u624D\u751F\u6548\u3002";
|
|
1309
1299
|
readonly "panels.market.foot": "\u88C5\u597D\u540E\u5230\u90A3\u4E2A\u9879\u76EE\u7684\u9762\u677F\u9875\u52FE\u9009\u5B83\uFF0C\u6A21\u5757\u624D\u4F1A\u51FA\u73B0\u3002";
|
|
1310
1300
|
readonly "panels.market.recheck": "\u91CD\u65B0\u68C0\u67E5\u66F4\u65B0";
|
|
@@ -1708,7 +1698,7 @@ export declare const kit: {
|
|
|
1708
1698
|
readonly "panels.market.pluginKeptUnsure": "\u6587\u4EF6\u5148\u7559\u7740\uFF1A\u8FD9\u53F0\u673A\u5668\u4E0A\u8FD8\u6709\u6A21\u5757\u770B\u4E0D\u51FA\u7528\u4E86\u4EC0\u4E48\uFF0C\u8BF4\u4E0D\u51C6\u8C01\u5728\u7528\u5B83\u3002";
|
|
1709
1699
|
readonly "panels.market.pluginKeptHeld": "\u6587\u4EF6\u7559\u7740\uFF1A\u4F60\u81EA\u5DF1\u88C5\u7684\u90A3\u4E00\u4EFD\uFF0C\u6A21\u5757\u653E\u624B\u4E0D\u52A8\u5B83\u3002";
|
|
1710
1700
|
readonly "panels.market.pluginKeptUnnamed": "\u6587\u4EF6\u5148\u7559\u7740\uFF1A\u770B\u4E0D\u51FA\u8FD9\u662F\u54EA\u4E2A\u63D2\u4EF6\uFF0C\u8BF4\u4E0D\u51C6\u8C01\u5728\u7528\u5B83\u3002";
|
|
1711
|
-
readonly "panels.market.pluginBroken": "\u8FD9\u4EFD\u88C5\u574F\u4E86\uFF1A\u770B\u4E0D\u51FA\u5B83\u662F\u4E2A\u63D2\u4EF6\u3002\u53EF\u4EE5\u5378\u8F7D\uFF0C\u6216\u8005\u76F4\u63A5\u8DDF agent \u8BF4\uFF1A\u7528
|
|
1701
|
+
readonly "panels.market.pluginBroken": "\u8FD9\u4EFD\u88C5\u574F\u4E86\uFF1A\u770B\u4E0D\u51FA\u5B83\u662F\u4E2A\u63D2\u4EF6\u3002\u53EF\u4EE5\u5378\u8F7D\uFF0C\u6216\u8005\u76F4\u63A5\u8DDF agent \u8BF4\uFF1A\u7528 workbench_modules_install_bundle \u6309\u5305\u540D\u518D\u88C5\u4E00\u6B21\u3002";
|
|
1712
1702
|
readonly "panels.market.restartNeeded": "\u65B0\u7248\u88C5\u597D\u4E86\uFF0C\u91CD\u542F\u4E00\u6B21\u624D\u751F\u6548\u3002";
|
|
1713
1703
|
readonly "panels.market.foot": "\u88C5\u597D\u540E\u5230\u90A3\u4E2A\u9879\u76EE\u7684\u9762\u677F\u9875\u52FE\u9009\u5B83\uFF0C\u6A21\u5757\u624D\u4F1A\u51FA\u73B0\u3002";
|
|
1714
1704
|
readonly "panels.market.recheck": "\u91CD\u65B0\u68C0\u67E5\u66F4\u65B0";
|
|
@@ -1983,6 +1973,8 @@ export declare const kit: {
|
|
|
1983
1973
|
h: typeof import("react").createElement;
|
|
1984
1974
|
Fragment: import("react").ExoticComponent<import("react").FragmentProps>;
|
|
1985
1975
|
Component: typeof import("react").Component;
|
|
1976
|
+
createContext: typeof import("react").createContext;
|
|
1977
|
+
useContext: typeof import("react").useContext;
|
|
1986
1978
|
useState: typeof import("react").useState;
|
|
1987
1979
|
useEffect: typeof import("react").useEffect;
|
|
1988
1980
|
useLayoutEffect: typeof import("react").useLayoutEffect;
|
|
@@ -2052,25 +2044,13 @@ export declare const kit: {
|
|
|
2052
2044
|
ApprovalDetail(props: apiModule.ApprovalDetailProps): JSX.Element | null;
|
|
2053
2045
|
ApprovalPlan({ rows, hint, warn, children }: apiModule.ApprovalPlanProps): JSX.Element;
|
|
2054
2046
|
Card({ t, title, refreshing, onRefresh, meta, head, children }: apiModule.CardProps): JSX.Element;
|
|
2047
|
+
cardIdOf(unit: string | null): string | undefined;
|
|
2048
|
+
CardAnchor({ unit, children }: apiModule.CardAnchorProps): JSX.Element;
|
|
2055
2049
|
errorReasonOf(error: unknown): string;
|
|
2056
2050
|
CardBoundary: typeof apiModule.CardBoundary;
|
|
2057
2051
|
CardHead({ t, title, meta, refreshing, onRefresh, gear, gearOpen, onToggleGear, platformHref, platform, platformTitle, }: apiModule.CardHeadProps): JSX.Element;
|
|
2058
2052
|
ChoiceGroup(props: apiModule.ChoiceGroupProps): JSX.Element;
|
|
2059
2053
|
LongTaskRow(props: apiModule.LongTaskRowProps): JSX.Element;
|
|
2060
|
-
MockStrip({ mocks, index, onPick, note, real, }: {
|
|
2061
|
-
readonly mocks: readonly {
|
|
2062
|
-
readonly id: string;
|
|
2063
|
-
readonly label: string;
|
|
2064
|
-
}[];
|
|
2065
|
-
readonly index: number;
|
|
2066
|
-
readonly onPick: (next: number) => void;
|
|
2067
|
-
readonly note?: string;
|
|
2068
|
-
readonly real?: {
|
|
2069
|
-
readonly label: string;
|
|
2070
|
-
readonly active: boolean;
|
|
2071
|
-
readonly onPick: () => void;
|
|
2072
|
-
} | undefined;
|
|
2073
|
-
}): JSX.Element;
|
|
2074
2054
|
Note({ tone, as, role, children }: apiModule.NoteProps): JSX.Element;
|
|
2075
2055
|
SkeletonRows({ rows }: {
|
|
2076
2056
|
rows?: number;
|
|
@@ -2085,6 +2065,13 @@ export declare const kit: {
|
|
|
2085
2065
|
Row({ label, value }: apiModule.RowProps): JSX.Element;
|
|
2086
2066
|
SaveBar({ busy, disabled, labels, onCancel, onSave }: apiModule.SaveBarProps): JSX.Element;
|
|
2087
2067
|
SettingsSection({ label, title, action, children }: apiModule.SettingsSectionProps): JSX.Element;
|
|
2068
|
+
searchTextOf(option: apiModule.SelectFieldOption): string;
|
|
2069
|
+
defaultSelectFilter(option: apiModule.SelectFieldOption, query: string): boolean;
|
|
2070
|
+
filterSelectOptions(options: readonly apiModule.SelectFieldOption[], query: string, filter?: (option: apiModule.SelectFieldOption, query: string) => boolean): readonly apiModule.SelectFieldOption[];
|
|
2071
|
+
selectCursorValue(shown: readonly apiModule.SelectFieldOption[], cursor: number | null): string | null;
|
|
2072
|
+
stepSelectCursor(shown: readonly apiModule.SelectFieldOption[], cursor: number | null, step: 1 | -1): number | null;
|
|
2073
|
+
selectEntries(shown: readonly apiModule.SelectFieldOption[], emptyText: string | undefined): readonly import("@deepseek-ai/dsh-client-ui-primitives").MenuEntry[];
|
|
2074
|
+
SelectField(props: apiModule.SelectFieldProps): apiModule.ReactNode;
|
|
2088
2075
|
Stack({ children }: apiModule.StackProps): JSX.Element;
|
|
2089
2076
|
StateBlock({ title, dot, hint, actions, resolving, children }: apiModule.StateBlockProps): JSX.Element;
|
|
2090
2077
|
TextField({ invalid, className, ...rest }: apiModule.TextFieldProps): JSX.Element;
|
|
@@ -2095,6 +2082,7 @@ export declare const kit: {
|
|
|
2095
2082
|
IconOpencli({ size }: apiModule.IconProps): JSX.Element;
|
|
2096
2083
|
IconNpm({ size }: apiModule.IconProps): JSX.Element;
|
|
2097
2084
|
IconModules({ size }: apiModule.IconProps): JSX.Element;
|
|
2085
|
+
IconModuleMark({ size }: apiModule.IconProps): JSX.Element;
|
|
2098
2086
|
IconPanelScreen({ size }: apiModule.IconProps): JSX.Element;
|
|
2099
2087
|
PLUGIN_ID: "@dsh-workbench/core";
|
|
2100
2088
|
RELEASE_SIBLINGS: readonly ["@dsh-workbench/shared", "@dsh-workbench/module-tools"];
|
|
@@ -2274,7 +2262,7 @@ export declare const kit: {
|
|
|
2274
2262
|
readonly "panels.market.pluginKeptUnsure": "\u6587\u4EF6\u5148\u7559\u7740\uFF1A\u8FD9\u53F0\u673A\u5668\u4E0A\u8FD8\u6709\u6A21\u5757\u770B\u4E0D\u51FA\u7528\u4E86\u4EC0\u4E48\uFF0C\u8BF4\u4E0D\u51C6\u8C01\u5728\u7528\u5B83\u3002";
|
|
2275
2263
|
readonly "panels.market.pluginKeptHeld": "\u6587\u4EF6\u7559\u7740\uFF1A\u4F60\u81EA\u5DF1\u88C5\u7684\u90A3\u4E00\u4EFD\uFF0C\u6A21\u5757\u653E\u624B\u4E0D\u52A8\u5B83\u3002";
|
|
2276
2264
|
readonly "panels.market.pluginKeptUnnamed": "\u6587\u4EF6\u5148\u7559\u7740\uFF1A\u770B\u4E0D\u51FA\u8FD9\u662F\u54EA\u4E2A\u63D2\u4EF6\uFF0C\u8BF4\u4E0D\u51C6\u8C01\u5728\u7528\u5B83\u3002";
|
|
2277
|
-
readonly "panels.market.pluginBroken": "\u8FD9\u4EFD\u88C5\u574F\u4E86\uFF1A\u770B\u4E0D\u51FA\u5B83\u662F\u4E2A\u63D2\u4EF6\u3002\u53EF\u4EE5\u5378\u8F7D\uFF0C\u6216\u8005\u76F4\u63A5\u8DDF agent \u8BF4\uFF1A\u7528
|
|
2265
|
+
readonly "panels.market.pluginBroken": "\u8FD9\u4EFD\u88C5\u574F\u4E86\uFF1A\u770B\u4E0D\u51FA\u5B83\u662F\u4E2A\u63D2\u4EF6\u3002\u53EF\u4EE5\u5378\u8F7D\uFF0C\u6216\u8005\u76F4\u63A5\u8DDF agent \u8BF4\uFF1A\u7528 workbench_modules_install_bundle \u6309\u5305\u540D\u518D\u88C5\u4E00\u6B21\u3002";
|
|
2278
2266
|
readonly "panels.market.restartNeeded": "\u65B0\u7248\u88C5\u597D\u4E86\uFF0C\u91CD\u542F\u4E00\u6B21\u624D\u751F\u6548\u3002";
|
|
2279
2267
|
readonly "panels.market.foot": "\u88C5\u597D\u540E\u5230\u90A3\u4E2A\u9879\u76EE\u7684\u9762\u677F\u9875\u52FE\u9009\u5B83\uFF0C\u6A21\u5757\u624D\u4F1A\u51FA\u73B0\u3002";
|
|
2280
2268
|
readonly "panels.market.recheck": "\u91CD\u65B0\u68C0\u67E5\u66F4\u65B0";
|
|
@@ -2678,7 +2666,7 @@ export declare const kit: {
|
|
|
2678
2666
|
readonly "panels.market.pluginKeptUnsure": "\u6587\u4EF6\u5148\u7559\u7740\uFF1A\u8FD9\u53F0\u673A\u5668\u4E0A\u8FD8\u6709\u6A21\u5757\u770B\u4E0D\u51FA\u7528\u4E86\u4EC0\u4E48\uFF0C\u8BF4\u4E0D\u51C6\u8C01\u5728\u7528\u5B83\u3002";
|
|
2679
2667
|
readonly "panels.market.pluginKeptHeld": "\u6587\u4EF6\u7559\u7740\uFF1A\u4F60\u81EA\u5DF1\u88C5\u7684\u90A3\u4E00\u4EFD\uFF0C\u6A21\u5757\u653E\u624B\u4E0D\u52A8\u5B83\u3002";
|
|
2680
2668
|
readonly "panels.market.pluginKeptUnnamed": "\u6587\u4EF6\u5148\u7559\u7740\uFF1A\u770B\u4E0D\u51FA\u8FD9\u662F\u54EA\u4E2A\u63D2\u4EF6\uFF0C\u8BF4\u4E0D\u51C6\u8C01\u5728\u7528\u5B83\u3002";
|
|
2681
|
-
readonly "panels.market.pluginBroken": "\u8FD9\u4EFD\u88C5\u574F\u4E86\uFF1A\u770B\u4E0D\u51FA\u5B83\u662F\u4E2A\u63D2\u4EF6\u3002\u53EF\u4EE5\u5378\u8F7D\uFF0C\u6216\u8005\u76F4\u63A5\u8DDF agent \u8BF4\uFF1A\u7528
|
|
2669
|
+
readonly "panels.market.pluginBroken": "\u8FD9\u4EFD\u88C5\u574F\u4E86\uFF1A\u770B\u4E0D\u51FA\u5B83\u662F\u4E2A\u63D2\u4EF6\u3002\u53EF\u4EE5\u5378\u8F7D\uFF0C\u6216\u8005\u76F4\u63A5\u8DDF agent \u8BF4\uFF1A\u7528 workbench_modules_install_bundle \u6309\u5305\u540D\u518D\u88C5\u4E00\u6B21\u3002";
|
|
2682
2670
|
readonly "panels.market.restartNeeded": "\u65B0\u7248\u88C5\u597D\u4E86\uFF0C\u91CD\u542F\u4E00\u6B21\u624D\u751F\u6548\u3002";
|
|
2683
2671
|
readonly "panels.market.foot": "\u88C5\u597D\u540E\u5230\u90A3\u4E2A\u9879\u76EE\u7684\u9762\u677F\u9875\u52FE\u9009\u5B83\uFF0C\u6A21\u5757\u624D\u4F1A\u51FA\u73B0\u3002";
|
|
2684
2672
|
readonly "panels.market.recheck": "\u91CD\u65B0\u68C0\u67E5\u66F4\u65B0";
|
|
@@ -2953,6 +2941,8 @@ export declare const kit: {
|
|
|
2953
2941
|
h: typeof import("react").createElement;
|
|
2954
2942
|
Fragment: import("react").ExoticComponent<import("react").FragmentProps>;
|
|
2955
2943
|
Component: typeof import("react").Component;
|
|
2944
|
+
createContext: typeof import("react").createContext;
|
|
2945
|
+
useContext: typeof import("react").useContext;
|
|
2956
2946
|
useState: typeof import("react").useState;
|
|
2957
2947
|
useEffect: typeof import("react").useEffect;
|
|
2958
2948
|
useLayoutEffect: typeof import("react").useLayoutEffect;
|
|
@@ -1,16 +1,6 @@
|
|
|
1
1
|
import type { BoardModule } from '@dsh-workbench/shared';
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
} | {
|
|
5
|
-
readonly kind: 'empty';
|
|
6
|
-
} | {
|
|
7
|
-
readonly kind: 'unread';
|
|
8
|
-
} | {
|
|
9
|
-
readonly kind: 'all';
|
|
10
|
-
} | {
|
|
11
|
-
readonly kind: 'copies';
|
|
12
|
-
readonly count: number;
|
|
13
|
-
};
|
|
2
|
+
import type { BoardShape } from './board-shape';
|
|
3
|
+
export type { BoardShape };
|
|
14
4
|
export interface RealBoard {
|
|
15
5
|
readonly modules: readonly BoardModule[];
|
|
16
6
|
readonly configRead: boolean;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export type BoardShape = {
|
|
2
|
+
readonly kind: 'real';
|
|
3
|
+
} | {
|
|
4
|
+
readonly kind: 'empty';
|
|
5
|
+
} | {
|
|
6
|
+
readonly kind: 'unread';
|
|
7
|
+
} | {
|
|
8
|
+
readonly kind: 'kit';
|
|
9
|
+
} | {
|
|
10
|
+
readonly kind: 'all';
|
|
11
|
+
} | {
|
|
12
|
+
readonly kind: 'copies';
|
|
13
|
+
readonly count: number;
|
|
14
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export declare function TextFieldDemo(): JSX.Element;
|
|
2
|
+
export declare function SelectDemo({ variant }: {
|
|
3
|
+
readonly variant?: 'boxed' | 'ghost';
|
|
4
|
+
}): JSX.Element;
|
|
5
|
+
export declare function SelectRichDemo(): JSX.Element;
|
|
6
|
+
export declare function SelectStateDemo(): JSX.Element;
|
|
7
|
+
export declare function AppearanceDemo(): JSX.Element;
|
|
8
|
+
export declare function ChoiceDemo(): JSX.Element;
|
|
9
|
+
export declare function SaveBarDemo(): JSX.Element;
|
|
10
|
+
export declare function LinkDemo(): JSX.Element;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { ReactNode } from '@dsh-workbench/shared';
|
|
2
|
+
export declare function Section({ title, note, children, }: {
|
|
3
|
+
readonly title: string;
|
|
4
|
+
readonly note?: string;
|
|
5
|
+
readonly children?: ReactNode;
|
|
6
|
+
}): JSX.Element;
|
|
7
|
+
export declare function Grid({ children }: {
|
|
8
|
+
readonly children?: ReactNode;
|
|
9
|
+
}): JSX.Element;
|
|
10
|
+
export declare function Cell({ label, wide, children, }: {
|
|
11
|
+
readonly label: string;
|
|
12
|
+
readonly wide?: boolean;
|
|
13
|
+
readonly children?: ReactNode;
|
|
14
|
+
}): JSX.Element;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export declare function RowsSection(): JSX.Element;
|
|
2
|
+
export declare function ActivitySection(): JSX.Element;
|
|
3
|
+
export declare function LongTaskSection(): JSX.Element;
|
|
4
|
+
export declare function IconSection(): JSX.Element;
|
|
5
|
+
export declare function StripSection(): JSX.Element;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { MarketRow } from './market-row-types';
|
|
2
2
|
import type { SharedRow } from './market-rows';
|
|
3
3
|
export type PackageKind = 'module' | 'plugin' | 'lib' | 'workbench';
|
|
4
|
-
export declare function packageIcon(kind: PackageKind): import("react").FunctionComponentElement<import("@
|
|
4
|
+
export declare function packageIcon(kind: PackageKind): import("react").FunctionComponentElement<import("@dsh-workbench/shared").IconProps>;
|
|
5
5
|
export declare function marketRowKind(row: MarketRow): PackageKind;
|
|
6
6
|
export declare function sharedRowKind(row: SharedRow): PackageKind;
|
|
7
7
|
export type PackageIcon = ReturnType<typeof packageIcon>;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
export type MarketSectionKind = 'installed' | 'pending' | 'plugins' | 'shared';
|
|
2
|
-
export declare function marketSectionIcon(kind: MarketSectionKind): import("react").FunctionComponentElement<import("@
|
|
2
|
+
export declare function marketSectionIcon(kind: MarketSectionKind): import("react").FunctionComponentElement<import("@dsh-workbench/shared").IconProps> | import("react").FunctionComponentElement<import("@deepseek-ai/dsh-client-ui-primitives").IconProps>;
|
|
3
3
|
export type MarketSectionIcon = ReturnType<typeof marketSectionIcon>;
|
|
@@ -13,4 +13,3 @@ export declare function workspaceSections<T extends {
|
|
|
13
13
|
readonly path: string;
|
|
14
14
|
readonly title: string;
|
|
15
15
|
}>(items: readonly T[], headings: WorkspaceHeadings): readonly WorkspaceSectionPlan<T>[];
|
|
16
|
-
export declare function flattenSections<T>(sections: readonly WorkspaceSectionPlan<T>[]): readonly T[];
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import type { Translate, WorkspaceView } from '@dsh-workbench/shared';
|
|
2
|
-
import type { MenuEntry } from '@deepseek-ai/dsh-client-ui-primitives';
|
|
1
|
+
import type { SelectFieldOption, Translate, WorkspaceView } from '@dsh-workbench/shared';
|
|
3
2
|
import type { WorkspaceSectionPlan } from './workspace-groups';
|
|
4
3
|
export interface WorkspaceItemsOptions {
|
|
5
4
|
readonly sections: readonly WorkspaceSectionPlan<WorkspaceView>[];
|
|
@@ -9,4 +8,4 @@ export interface WorkspaceItemsOptions {
|
|
|
9
8
|
readonly onHover: (workspaceId: string | null) => void;
|
|
10
9
|
readonly onEdit: (workspace: WorkspaceView) => void;
|
|
11
10
|
}
|
|
12
|
-
export declare function
|
|
11
|
+
export declare function workspaceOptions(options: WorkspaceItemsOptions): SelectFieldOption[];
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import '@/shared/styles/mock-strip.css';
|
|
2
|
+
export declare function MockStrip({ mocks, index, onPick, note, real, }: {
|
|
3
|
+
readonly mocks: readonly {
|
|
4
|
+
readonly id: string;
|
|
5
|
+
readonly label: string;
|
|
6
|
+
}[];
|
|
7
|
+
readonly index: number;
|
|
8
|
+
readonly onPick: (next: number) => void;
|
|
9
|
+
readonly note?: string;
|
|
10
|
+
readonly real?: {
|
|
11
|
+
readonly label: string;
|
|
12
|
+
readonly active: boolean;
|
|
13
|
+
readonly onPick: () => void;
|
|
14
|
+
} | undefined;
|
|
15
|
+
}): JSX.Element;
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
import type { BoardModule, UnitManifest } from '@dsh-workbench/shared';
|
|
3
|
+
import type { PreflightSnapshot } from '../shared/api/host/preflight';
|
|
4
|
+
import type { BoardShape } from '../app/layouts/rightbar/board-shape';
|
|
5
|
+
import type { AddModuleMock } from '../app/layouts/market/add-module-mock';
|
|
6
|
+
import type { AddModuleState } from '../app/layouts/market/use-add-module';
|
|
7
|
+
export interface DevPickable {
|
|
8
|
+
readonly id: string;
|
|
9
|
+
readonly label: string;
|
|
10
|
+
}
|
|
11
|
+
export interface DevPickOptions<T extends DevPickable> {
|
|
12
|
+
readonly fixtures: readonly T[];
|
|
13
|
+
readonly selected?: string | null | undefined;
|
|
14
|
+
readonly onSelect?: ((id: string | null) => void) | undefined;
|
|
15
|
+
readonly enabled?: boolean | undefined;
|
|
16
|
+
readonly initial?: string | null | undefined;
|
|
17
|
+
}
|
|
18
|
+
export interface DevPick<T extends DevPickable> {
|
|
19
|
+
readonly enabled: boolean;
|
|
20
|
+
readonly active: string | null;
|
|
21
|
+
readonly current: T | undefined;
|
|
22
|
+
readonly nonce: number;
|
|
23
|
+
readonly index: number;
|
|
24
|
+
pick(id: string | null): void;
|
|
25
|
+
}
|
|
26
|
+
export interface DevStrips<T extends DevPickable> {
|
|
27
|
+
readonly pick: DevPick<T>;
|
|
28
|
+
readonly current: T | undefined;
|
|
29
|
+
readonly enabled: boolean;
|
|
30
|
+
readonly strip: ReactNode;
|
|
31
|
+
}
|
|
32
|
+
export interface DevBoard {
|
|
33
|
+
readonly shape: BoardShape;
|
|
34
|
+
readonly seed: readonly BoardModule[];
|
|
35
|
+
readonly strip: (show: boolean) => ReactNode;
|
|
36
|
+
readonly mode: boolean;
|
|
37
|
+
}
|
|
38
|
+
export type DevStripSite = 'panel' | 'market' | 'addModule';
|
|
39
|
+
export interface DevSurface {
|
|
40
|
+
on(search: string): boolean;
|
|
41
|
+
crash(search: string): boolean;
|
|
42
|
+
useBoard(input: {
|
|
43
|
+
readonly manifests: readonly UnitManifest[];
|
|
44
|
+
readonly all: readonly BoardModule[];
|
|
45
|
+
readonly search: string;
|
|
46
|
+
}): DevBoard;
|
|
47
|
+
useStrips<T extends DevPickable>(site: DevStripSite, manifests: readonly UnitManifest[]): DevStrips<T>;
|
|
48
|
+
addModuleState(base: AddModuleState, mock: AddModuleMock): AddModuleState;
|
|
49
|
+
gateStrip(options: {
|
|
50
|
+
readonly onPick: (snapshot: PreflightSnapshot | null) => void;
|
|
51
|
+
}): HTMLElement | null;
|
|
52
|
+
readonly kitModule: BoardModule | null;
|
|
53
|
+
}
|
|
@@ -50,8 +50,40 @@ export declare function createDiyRig(): {
|
|
|
50
50
|
specs: string[];
|
|
51
51
|
registered: {
|
|
52
52
|
name: string;
|
|
53
|
+
parameters?: Record<string, unknown>;
|
|
53
54
|
execute: (args: unknown, exec?: unknown) => Promise<unknown>;
|
|
54
55
|
}[];
|
|
56
|
+
tool: (name: string) => {
|
|
57
|
+
name: string;
|
|
58
|
+
parameters?: Record<string, unknown>;
|
|
59
|
+
execute: (args: unknown, exec?: unknown) => Promise<unknown>;
|
|
60
|
+
};
|
|
61
|
+
ctx: {
|
|
62
|
+
get: (key: string) => PanelStateStore | {
|
|
63
|
+
all: () => {
|
|
64
|
+
unit: string;
|
|
65
|
+
}[];
|
|
66
|
+
refusals: () => readonly {
|
|
67
|
+
unit: string;
|
|
68
|
+
reasons: readonly string[];
|
|
69
|
+
}[];
|
|
70
|
+
failureOf: (unit: string) => string | undefined;
|
|
71
|
+
} | ((relative: string) => string) | {
|
|
72
|
+
register(definition: {
|
|
73
|
+
name: string;
|
|
74
|
+
parameters?: Record<string, unknown>;
|
|
75
|
+
execute: (args: unknown, exec?: unknown) => Promise<unknown>;
|
|
76
|
+
}): () => void;
|
|
77
|
+
dir?: undefined;
|
|
78
|
+
} | {
|
|
79
|
+
dir: string;
|
|
80
|
+
register?: undefined;
|
|
81
|
+
} | undefined;
|
|
82
|
+
logger: {
|
|
83
|
+
info: () => void;
|
|
84
|
+
warn: () => void;
|
|
85
|
+
};
|
|
86
|
+
};
|
|
55
87
|
panels: import("../model/service").PanelsService;
|
|
56
88
|
panelState: PanelStateStore;
|
|
57
89
|
registry: {
|
|
@@ -42,4 +42,4 @@ export declare function harness(options: {
|
|
|
42
42
|
selfUpdates: SelfUpdateRequest[];
|
|
43
43
|
};
|
|
44
44
|
export declare function fakeBundles(over?: Partial<BundleManager>): BundleManager;
|
|
45
|
-
export declare function call(h: ReturnType<typeof harness>,
|
|
45
|
+
export declare function call(h: ReturnType<typeof harness>, name: string, args?: unknown): Promise<Record<string, unknown>>;
|
|
@@ -43,7 +43,7 @@ interface RanTool {
|
|
|
43
43
|
}
|
|
44
44
|
export declare function toolHarness(manifests?: readonly UnitManifest[], owned?: readonly string[]): {
|
|
45
45
|
panels: PanelsService;
|
|
46
|
-
run: (args: Record<string, unknown>, exec?: unknown) => Promise<RanTool>;
|
|
46
|
+
run: (name: string, args: Record<string, unknown>, exec?: unknown) => Promise<RanTool>;
|
|
47
47
|
};
|
|
48
48
|
export declare function machineConfig(): string;
|
|
49
49
|
export declare function workspaceConfig(workspace: string): string;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { DshHostContext, DshToolRegistry } from '@dsh-workbench/shared';
|
|
2
|
+
import { type ActStep, type ActTarget } from './diy-browser-act';
|
|
3
|
+
export declare function renderAct(verb: string, target: ActTarget, selector: string, step: ActStep): string;
|
|
4
|
+
export declare function registerActTools(ctx: DshHostContext, tools: DshToolRegistry): readonly (() => void)[];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import type { DshShell } from '@dsh-workbench/shared';
|
|
2
|
+
import { type BrowserStep } from './diy-browser';
|
|
3
|
+
export declare const ACT_TIMEOUT_MS = 15000;
|
|
4
|
+
export interface ActTarget {
|
|
5
|
+
readonly selector: string;
|
|
6
|
+
readonly role: string;
|
|
7
|
+
readonly name: string;
|
|
8
|
+
readonly testid: string;
|
|
9
|
+
readonly nth: number | null;
|
|
10
|
+
readonly page: boolean;
|
|
11
|
+
}
|
|
12
|
+
export declare function actTargetOf(raw: Record<string, unknown>): ActTarget;
|
|
13
|
+
export declare function scopedSelectorOf(unit: string, target: ActTarget): string;
|
|
14
|
+
export declare const SCOPE_ATTR = "data-diy-scope";
|
|
15
|
+
export declare function semanticOptionsOf(target: ActTarget): readonly string[];
|
|
16
|
+
export declare function targetOptionsOf(target: ActTarget): readonly string[];
|
|
17
|
+
export declare function refsOf(payload: Record<string, unknown> | undefined): readonly number[];
|
|
18
|
+
export declare function totalMatchesOf(payload: Record<string, unknown> | undefined): number;
|
|
19
|
+
export declare function scopeMarkScriptOf(unit: string, refs: readonly number[], nth: number, token: string): string;
|
|
20
|
+
export declare function scopeClearScriptOf(token: string): string;
|
|
21
|
+
export declare function scopedMarkerSelectorOf(unit: string, token: string): string;
|
|
22
|
+
export interface ActStep extends BrowserStep {
|
|
23
|
+
readonly payload: Record<string, unknown> | undefined;
|
|
24
|
+
}
|
|
25
|
+
export declare function actBrowser(shell: DshShell, command: string, session: string, argv: readonly string[], timeoutMs?: number): Promise<ActStep>;
|
|
26
|
+
export declare function actErrorOf(step: ActStep): string;
|
|
27
|
+
export declare function matchesOf(step: ActStep): number;
|
|
28
|
+
export declare function scrollIntoView(shell: DshShell, command: string, session: string, unit: string, selector: string): Promise<ActStep>;
|
|
29
|
+
export declare function reloadPage(shell: DshShell, command: string, session: string): Promise<ActStep>;
|
|
30
|
+
export interface WidthShot {
|
|
31
|
+
readonly ok: boolean;
|
|
32
|
+
readonly file: string;
|
|
33
|
+
readonly width: number;
|
|
34
|
+
readonly height: number;
|
|
35
|
+
readonly reason: string;
|
|
36
|
+
}
|
|
37
|
+
export declare function shootAtWidth(shell: DshShell, command: string, session: string, file: string, width: number, height: number): Promise<WidthShot>;
|
|
38
|
+
export interface NetworkArm {
|
|
39
|
+
readonly ok: boolean;
|
|
40
|
+
readonly pid: string;
|
|
41
|
+
readonly reason: string;
|
|
42
|
+
}
|
|
43
|
+
export declare const NET_CAP_LINES = 2000;
|
|
44
|
+
export declare const NET_CAP_SECONDS = 900;
|
|
45
|
+
export declare function armNetwork(shell: DshShell, command: string, session: string, file: string): Promise<NetworkArm>;
|
|
46
|
+
export declare function stopNetwork(shell: DshShell, session: string, file: string): Promise<boolean>;
|
|
47
|
+
export declare function readNetwork(shell: DshShell, file: string, lines: number): Promise<readonly Record<string, unknown>[]>;
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import type { DshShell } from '@dsh-workbench/shared';
|
|
2
|
+
import { type PngRect } from '../../../shared/api/host/png-crop';
|
|
3
|
+
import { type CardView, type PickRequest } from './diy-scripts';
|
|
4
|
+
export declare const LOOK_TIMEOUT_MS = 30000;
|
|
5
|
+
export interface BrowserStep {
|
|
6
|
+
readonly ok: boolean;
|
|
7
|
+
readonly stdout: string;
|
|
8
|
+
readonly stderr: string;
|
|
9
|
+
readonly exitCode: number | null;
|
|
10
|
+
readonly timedOut: boolean;
|
|
11
|
+
}
|
|
12
|
+
export declare function runBrowserStep(shell: DshShell, command: string, argv: readonly string[], timeoutMs?: number): Promise<BrowserStep>;
|
|
13
|
+
export declare function jsonOf(raw: string): Record<string, unknown> | undefined;
|
|
14
|
+
export declare function textOf(value: unknown): string;
|
|
15
|
+
export interface BoundTab {
|
|
16
|
+
readonly ok: boolean;
|
|
17
|
+
readonly url: string;
|
|
18
|
+
readonly title: string;
|
|
19
|
+
readonly reason: string;
|
|
20
|
+
}
|
|
21
|
+
export declare function bindCurrentTab(shell: DshShell, command: string, session: string): Promise<BoundTab>;
|
|
22
|
+
export interface WorkbenchPage {
|
|
23
|
+
readonly ok: boolean;
|
|
24
|
+
readonly url: string;
|
|
25
|
+
readonly title: string;
|
|
26
|
+
}
|
|
27
|
+
export declare function workbenchPageOf(shell: DshShell, command: string, session: string): Promise<WorkbenchPage>;
|
|
28
|
+
export declare function writeShotsDir(shell: DshShell, dir: string): Promise<boolean>;
|
|
29
|
+
export interface PageHandshake {
|
|
30
|
+
readonly ok: boolean;
|
|
31
|
+
readonly bound: boolean;
|
|
32
|
+
readonly page: WorkbenchPage;
|
|
33
|
+
readonly reason: string;
|
|
34
|
+
}
|
|
35
|
+
export declare function readyPageOf(shell: DshShell, command: string, session: string): Promise<PageHandshake>;
|
|
36
|
+
export declare function measureCard(shell: DshShell, command: string, session: string, unit: string, pick: PickRequest): Promise<CardView>;
|
|
37
|
+
export interface Shot {
|
|
38
|
+
readonly ok: boolean;
|
|
39
|
+
readonly file: string;
|
|
40
|
+
readonly width: number;
|
|
41
|
+
readonly height: number;
|
|
42
|
+
readonly cropped: boolean;
|
|
43
|
+
readonly reason: string;
|
|
44
|
+
}
|
|
45
|
+
export declare function insideViewportOf(view: CardView): boolean;
|
|
46
|
+
export declare function deviceRectOf(view: CardView): PngRect;
|
|
47
|
+
export declare function shootCard(shell: DshShell, command: string, session: string, unit: string, file: string, view: CardView): Promise<Shot>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|