@dsh-workbench/shared 0.3.11 → 1.0.0-beta.0
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/LICENSE +21 -0
- package/README.md +97 -0
- package/dist/api/blocker-table.d.ts +3 -3
- package/dist/api/blocker-table.js +47 -23
- package/dist/api/dsh.d.ts +1 -1
- package/dist/api/workbench-client.js +2 -1
- package/dist/components/Activity.css +0 -1
- package/dist/components/ApprovalDetail.css +1 -2
- package/dist/components/ApprovalDetail.d.ts +1 -1
- package/dist/components/ApprovalPlan.css +0 -1
- package/dist/components/Card.css +0 -1
- package/dist/components/Card.d.ts +1 -1
- package/dist/components/CardBoundary.d.ts +1 -1
- package/dist/components/CardHead.css +0 -1
- package/dist/components/CardHead.d.ts +1 -1
- package/dist/components/ChoiceGroup.css +1 -2
- package/dist/components/ConfirmBar.d.ts +1 -1
- package/dist/components/ConfirmBar.js +1 -1
- package/dist/components/Form.css +1 -1
- package/dist/components/FormActions.js +1 -1
- package/dist/components/LongTaskRow.css +1 -2
- package/dist/components/LongTaskRow.d.ts +1 -1
- package/dist/components/LongTaskRow.js +1 -1
- package/dist/components/Note.css +0 -1
- package/dist/components/ResourceStates.css +0 -1
- package/dist/components/SettingsSection.css +0 -1
- package/dist/components/Spinner.css +0 -1
- package/dist/components/Stack.css +0 -1
- package/dist/components/StateBlock.css +0 -1
- package/dist/components/board-module.d.ts +3 -3
- package/dist/components/icons.d.ts +1 -1
- package/dist/components/icons.js +11 -4
- package/dist/config/constants.d.ts +2 -2
- package/dist/config/constants.js +2 -2
- package/dist/contract/adapters.d.ts +10 -0
- package/dist/contract/cli.d.ts +3 -0
- package/dist/contract/data.d.ts +126 -0
- package/dist/{api → contract}/facts.d.ts +12 -3
- package/dist/{api → contract}/facts.js +19 -1
- package/dist/contract/needs.d.ts +132 -0
- package/dist/contract/needs.js +232 -0
- package/dist/contract/plugin-source.d.ts +1 -0
- package/dist/contract/protocol/bundle-install.d.ts +136 -0
- package/dist/contract/protocol/bundle-install.js +12 -0
- package/dist/contract/protocol/config-sync.d.ts +55 -0
- package/dist/contract/protocol/config-sync.js +2 -0
- package/dist/contract/protocol/diy.d.ts +4 -0
- package/dist/contract/protocol/diy.js +4 -0
- package/dist/contract/protocol/dsh-plugins.d.ts +11 -0
- package/dist/contract/protocol/dsh-plugins.js +1 -0
- package/dist/contract/protocol/long-tasks.d.ts +13 -0
- package/dist/contract/protocol/long-tasks.js +1 -0
- package/dist/contract/protocol/market-index.d.ts +195 -0
- package/dist/contract/protocol/market-index.js +7 -0
- package/dist/contract/protocol/platform.d.ts +44 -0
- package/dist/contract/protocol/platform.js +1 -0
- package/dist/contract/protocol/preflight-wake.d.ts +7 -0
- package/dist/contract/protocol/preflight-wake.js +1 -0
- package/dist/contract/protocol/profile-create.d.ts +30 -0
- package/dist/contract/protocol/profile-create.js +2 -0
- package/dist/contract/protocol/sidebar-edition.d.ts +14 -0
- package/dist/contract/protocol/sidebar-edition.js +2 -0
- package/dist/contract/protocol/unit-manifests.d.ts +6 -0
- package/dist/contract/protocol/unit-manifests.js +1 -0
- package/dist/contract/unit-board.js +1 -0
- package/dist/contract/unit-capability.d.ts +34 -0
- package/dist/contract/unit-capability.js +1 -0
- package/dist/{host → contract}/unit-declaration.d.ts +7 -5
- package/dist/{api → contract}/unit-declaration.js +19 -13
- package/dist/contract/unit.d.ts +57 -0
- package/dist/contract/unit.js +24 -0
- package/dist/contract/workbench-contract.d.ts +15 -0
- package/dist/contract/workbench-contract.js +1 -0
- package/dist/host/adapter-set.d.ts +26 -0
- package/dist/host/adapter-set.js +243 -0
- package/dist/host/adapter-types.d.ts +79 -0
- package/dist/host/adapter-types.js +23 -0
- package/dist/host/adapters.d.ts +22 -0
- package/dist/host/adapters.js +9 -0
- package/dist/host/browser.d.ts +3 -0
- package/dist/host/browser.js +3 -0
- package/dist/host/changelog.d.ts +21 -0
- package/dist/host/changelog.js +188 -0
- package/dist/host/channel-plugin.d.ts +15 -0
- package/dist/host/channel-plugin.js +42 -0
- package/dist/host/cli.d.ts +4 -0
- package/dist/host/cli.js +7 -0
- package/dist/host/command-name.d.ts +1 -0
- package/dist/host/command-name.js +14 -0
- package/dist/host/data-error.d.ts +13 -0
- package/dist/host/data-error.js +20 -0
- package/dist/host/data-root.js +3 -0
- package/dist/host/diy-debug.js +2 -1
- package/dist/host/diy-record.js +2 -1
- package/dist/host/facts.d.ts +1 -1
- package/dist/host/facts.js +3 -2
- package/dist/host/git.js +2 -2
- package/dist/host/http.js +1 -1
- package/dist/host/lib-capabilities.d.ts +22 -0
- package/dist/host/lib-capabilities.js +37 -0
- package/dist/host/lib-install.d.ts +9 -0
- package/dist/host/lib-install.js +10 -0
- package/dist/host/long-task.d.ts +1 -1
- package/dist/host/long-task.js +4 -3
- package/dist/host/market-index.d.ts +22 -0
- package/dist/host/market-index.js +420 -0
- package/dist/host/needs.d.ts +4 -0
- package/dist/host/needs.js +2 -0
- package/dist/host/patch.d.ts +9 -0
- package/dist/host/patch.js +78 -0
- package/dist/host/paths.d.ts +12 -0
- package/dist/host/paths.js +28 -0
- package/dist/host/platform.d.ts +14 -0
- package/dist/host/platform.js +40 -0
- package/dist/host/plugin-source.d.ts +8 -6
- package/dist/host/plugin-source.js +43 -33
- package/dist/host/plugin.d.ts +4 -0
- package/dist/host/plugin.js +39 -0
- package/dist/host/port-types.d.ts +191 -0
- package/dist/host/port-types.js +1 -0
- package/dist/host/preflight.d.ts +28 -0
- package/dist/host/preflight.js +1 -0
- package/dist/host/profile-port.d.ts +4 -0
- package/dist/host/profile-port.js +4 -0
- package/dist/host/provision.d.ts +2 -2
- package/dist/host/provision.js +5 -3
- package/dist/host/recipe-rules.d.ts +5 -0
- package/dist/host/recipe-rules.js +382 -0
- package/dist/host/recipe.d.ts +14 -0
- package/dist/host/recipe.js +283 -0
- package/dist/host/shell-text.d.ts +9 -2
- package/dist/host/shell-text.js +15 -3
- package/dist/host/shell.d.ts +2 -0
- package/dist/host/shell.js +7 -0
- package/dist/host/spec.d.ts +8 -0
- package/dist/host/spec.js +24 -0
- package/dist/host/supply-index.d.ts +34 -0
- package/dist/host/supply-index.js +202 -0
- package/dist/host/supply-port.d.ts +5 -0
- package/dist/host/supply-port.js +39 -0
- package/dist/host/time.d.ts +12 -0
- package/dist/host/time.js +19 -0
- package/dist/host/tokens.d.ts +26 -0
- package/dist/host/tokens.js +154 -0
- package/dist/host/tool-kit.js +1 -1
- package/dist/host/unit-face.d.ts +5 -4
- package/dist/host/version-range.d.ts +2 -0
- package/dist/host/version-range.js +73 -0
- package/dist/host/version.d.ts +3 -0
- package/dist/host/version.js +29 -0
- package/dist/host.d.ts +47 -16
- package/dist/host.js +47 -16
- package/dist/i18n/en.js +224 -71
- package/dist/i18n/index.d.ts +298 -73
- package/dist/i18n/merge.js +1 -1
- package/dist/i18n/need-text.d.ts +26 -0
- package/dist/i18n/need-text.js +26 -0
- package/dist/i18n/settings.d.ts +70 -0
- package/dist/i18n/settings.js +136 -0
- package/dist/i18n/zh.d.ts +297 -72
- package/dist/i18n/zh.js +226 -73
- package/dist/index.d.ts +23 -7
- package/dist/index.js +23 -7
- package/dist/{api → lib}/dsh-client.d.ts +11 -1
- package/dist/lib/dsh-client.js +1 -0
- package/dist/lib/market-index.d.ts +7 -0
- package/dist/lib/market-index.js +25 -0
- package/dist/lib/react.d.ts +0 -40
- package/dist/lib/react.js +0 -36
- package/dist/lib/ui.js +3 -9
- package/dist/testing/data.d.ts +13 -0
- package/dist/testing/data.js +46 -0
- package/dist/testing/declaration.d.ts +1 -1
- package/dist/testing/declaration.js +1 -1
- package/dist/testing/host-fakes.d.ts +0 -13
- package/dist/testing/host-fakes.js +0 -24
- package/dist/testing/needs.d.ts +16 -0
- package/dist/testing/needs.js +46 -0
- package/dist/testing.d.ts +2 -0
- package/dist/testing.js +2 -0
- package/package.json +18 -2
- package/src/api/__tests__/blocker-table.test.ts +135 -86
- package/src/api/blocker-table.ts +52 -26
- package/src/api/dsh.ts +1 -1
- package/src/api/host-write.ts +0 -1
- package/src/api/workbench-client.test.ts +2 -2
- package/src/api/workbench-client.ts +2 -1
- package/src/components/Activity.css +0 -1
- package/src/components/ApprovalDetail.css +1 -2
- package/src/components/ApprovalDetail.tsx +1 -1
- package/src/components/ApprovalPlan.css +0 -1
- package/src/components/Card.css +0 -1
- package/src/components/Card.tsx +1 -1
- package/src/components/CardAnchor.test.tsx +1 -1
- package/src/components/CardBoundary.tsx +1 -1
- package/src/components/CardHead.css +0 -1
- package/src/components/CardHead.tsx +1 -1
- package/src/components/ChoiceGroup.css +1 -2
- package/src/components/ConfirmBar.tsx +1 -1
- package/src/components/Form.css +1 -1
- package/src/components/Form.tsx +1 -1
- package/src/components/FormActions.tsx +1 -1
- package/src/components/LongTaskRow.css +1 -2
- package/src/components/LongTaskRow.tsx +1 -1
- package/src/components/Note.css +0 -1
- package/src/components/ResourceStates.css +0 -1
- package/src/components/SelectFieldNodes.tsx +0 -1
- package/src/components/SettingsSection.css +0 -1
- package/src/components/Spinner.css +0 -1
- package/src/components/Stack.css +0 -1
- package/src/components/StateBlock.css +0 -1
- package/src/components/__tests__/long-task-row.test.ts +1 -1
- package/src/components/board-module.ts +3 -3
- package/src/components/icons.tsx +16 -8
- package/src/config/constants.ts +2 -2
- package/src/{api → contract}/__tests__/facts.test.ts +73 -25
- package/src/{api → contract}/__tests__/long-task.test.ts +3 -3
- package/src/contract/__tests__/needs.test.ts +74 -0
- package/src/{host → contract}/__tests__/unit-declaration.test.ts +1 -1
- package/src/contract/__tests__/unit.test.ts +43 -0
- package/src/contract/adapters.ts +9 -0
- package/src/contract/cli.ts +3 -0
- package/src/contract/data.ts +145 -0
- package/src/{api → contract}/facts.ts +34 -4
- package/src/contract/needs.ts +331 -0
- package/src/contract/plugin-source.ts +1 -0
- package/src/contract/protocol/bundle-install.ts +198 -0
- package/src/contract/protocol/config-sync.ts +65 -0
- package/src/contract/protocol/diy.ts +4 -0
- package/src/contract/protocol/dsh-plugins.ts +13 -0
- package/src/contract/protocol/long-tasks.ts +16 -0
- package/src/contract/protocol/market-index.ts +246 -0
- package/src/contract/protocol/platform.ts +47 -0
- package/src/contract/protocol/preflight-wake.ts +17 -0
- package/src/contract/protocol/profile-create.ts +36 -0
- package/src/contract/protocol/sidebar-edition.ts +19 -0
- package/src/contract/protocol/unit-manifests.ts +8 -0
- package/src/{api → contract}/unit-board.ts +0 -1
- package/src/contract/unit-capability.ts +37 -0
- package/src/{host → contract}/unit-declaration.ts +22 -18
- package/src/contract/unit.ts +76 -0
- package/src/contract/workbench-contract.ts +30 -0
- package/src/host/__tests__/adapter-set.test.ts +228 -0
- package/src/host/__tests__/adapters.test.ts +27 -0
- package/src/host/__tests__/changelog.test.ts +102 -0
- package/src/host/__tests__/command-name.test.ts +16 -0
- package/src/host/__tests__/diy-record.test.ts +3 -3
- package/src/host/__tests__/facts.test.ts +5 -5
- package/src/host/__tests__/long-task.test.ts +1 -1
- package/src/host/__tests__/market-index.test.ts +179 -0
- package/src/host/__tests__/plugin-ledger.test.ts +10 -10
- package/src/host/__tests__/provision.test.ts +7 -6
- package/src/host/__tests__/shell-text.test.ts +16 -1
- package/src/host/__tests__/supply-index.test.ts +137 -0
- package/src/host/__tests__/tokens.test.ts +110 -0
- package/src/host/__tests__/version-range.test.ts +21 -0
- package/src/host/adapter-set.ts +298 -0
- package/src/host/adapter-types.ts +105 -0
- package/src/host/adapters.ts +44 -0
- package/src/host/browser.ts +3 -0
- package/src/host/changelog.ts +212 -0
- package/src/host/channel-plugin.ts +55 -0
- package/src/host/cli.ts +11 -0
- package/src/host/command-name.ts +15 -0
- package/src/host/data-error.ts +21 -0
- package/src/host/data-root.ts +2 -0
- package/src/host/diy-debug.ts +2 -1
- package/src/host/diy-record.ts +2 -1
- package/src/host/facts.ts +4 -3
- package/src/host/git.ts +2 -2
- package/src/host/http.ts +1 -1
- package/src/host/lib-capabilities.ts +52 -0
- package/src/host/lib-install.ts +18 -0
- package/src/host/long-task.ts +4 -3
- package/src/host/market-index.ts +413 -0
- package/src/host/needs.ts +6 -0
- package/src/host/patch.ts +93 -0
- package/src/host/paths.ts +37 -0
- package/src/host/platform.ts +48 -0
- package/src/host/plugin-source.ts +48 -56
- package/src/host/plugin.ts +39 -0
- package/src/host/port-types.ts +222 -0
- package/src/host/preflight.ts +31 -0
- package/src/host/profile-port.ts +9 -0
- package/src/host/provision.ts +7 -4
- package/src/host/recipe-rules.ts +330 -0
- package/src/host/recipe.test.ts +334 -0
- package/src/host/recipe.ts +323 -0
- package/src/host/shell-text.ts +15 -3
- package/src/host/shell.ts +9 -0
- package/src/host/spec.ts +32 -0
- package/src/host/supply-index.ts +256 -0
- package/src/host/supply-port.ts +45 -0
- package/src/host/time.ts +22 -0
- package/src/host/tokens.ts +186 -0
- package/src/host/tool-kit.ts +1 -1
- package/src/host/unit-face.ts +5 -4
- package/src/host/version-range.ts +71 -0
- package/src/host/version.ts +30 -0
- package/src/host.ts +47 -16
- package/src/i18n/en.ts +224 -71
- package/src/i18n/merge.test.ts +6 -6
- package/src/i18n/merge.ts +1 -1
- package/src/i18n/need-text.ts +27 -0
- package/src/i18n/settings.ts +141 -0
- package/src/i18n/zh.ts +227 -73
- package/src/index.ts +23 -7
- package/src/lib/blocker-action.ts +0 -1
- package/src/{api → lib}/dsh-client.ts +12 -1
- package/src/lib/market-index.ts +36 -0
- package/src/lib/react.ts +0 -40
- package/src/lib/text.test.ts +2 -2
- package/src/lib/ui.test.ts +6 -5
- package/src/lib/ui.ts +3 -9
- package/src/testing/__tests__/declaration.test.ts +1 -1
- package/src/testing/data.ts +66 -0
- package/src/testing/declaration.ts +2 -2
- package/src/testing/host-fakes.ts +0 -38
- package/src/testing/needs.ts +80 -0
- package/src/testing.ts +2 -0
- package/dist/api/unit-declaration.d.ts +0 -65
- package/dist/api/unit.d.ts +0 -85
- package/dist/api/unit.js +0 -8
- package/dist/api/workbench-contract.d.ts +0 -44
- package/dist/components/MockStrip.css +0 -39
- package/dist/components/MockStrip.d.ts +0 -15
- package/dist/components/MockStrip.js +0 -8
- package/dist/components/SaveBar.css +0 -7
- package/dist/host/browser-find.d.ts +0 -38
- package/dist/host/browser-find.js +0 -242
- package/dist/host/browser-read.d.ts +0 -28
- package/dist/host/browser-read.js +0 -243
- package/dist/host/opencli-runtime.d.ts +0 -25
- package/dist/host/opencli-runtime.js +0 -56
- package/dist/host/opencli-window.d.ts +0 -2
- package/dist/host/opencli-window.js +0 -8
- package/dist/host/opencli.d.ts +0 -37
- package/dist/host/opencli.js +0 -155
- package/dist/host/unit-declaration.js +0 -213
- package/dist/host/unit-libs.d.ts +0 -37
- package/dist/lib/diy-debug.d.ts +0 -80
- package/dist/lib/diy-debug.js +0 -88
- package/dist/lib/diy-record.d.ts +0 -135
- package/dist/lib/diy-record.js +0 -162
- package/dist/lib/lint-probe.d.ts +0 -1
- package/dist/lib/lint-probe.js +0 -6
- package/dist/lib/panel-state.d.ts +0 -120
- package/dist/lib/panel-state.js +0 -176
- package/src/api/__tests__/unit.test.ts +0 -38
- package/src/api/unit.ts +0 -93
- package/src/api/workbench-contract.ts +0 -59
- package/src/host/__tests__/browser-find.test.ts +0 -330
- package/src/host/__tests__/browser-read.test.ts +0 -228
- package/src/host/__tests__/opencli-runtime.test.ts +0 -46
- package/src/host/browser-find.ts +0 -311
- package/src/host/browser-read.ts +0 -311
- package/src/host/opencli-runtime.ts +0 -79
- package/src/host/opencli-window.ts +0 -11
- package/src/host/opencli.ts +0 -213
- package/src/host/unit-libs.ts +0 -41
- /package/dist/{api/blocker.js → contract/adapters.js} +0 -0
- /package/dist/{api → contract}/blocker.d.ts +0 -0
- /package/dist/{api/dsh-client.js → contract/blocker.js} +0 -0
- /package/dist/{api/unit-board.js → contract/cli.js} +0 -0
- /package/dist/{api/workbench-contract.js → contract/data.js} +0 -0
- /package/dist/{api → contract}/long-task.d.ts +0 -0
- /package/dist/{api → contract}/long-task.js +0 -0
- /package/dist/{host/unit-libs.js → contract/plugin-source.js} +0 -0
- /package/dist/{api → contract}/unit-board.d.ts +0 -0
- /package/src/{api → contract}/blocker.ts +0 -0
- /package/src/{api → contract}/long-task.ts +0 -0
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
export declare const BUNDLE_REGISTRIES_ROUTE = "bundle-registries";
|
|
2
|
+
export declare const BUNDLE_INSPECT_ROUTE = "bundle-inspect";
|
|
3
|
+
export declare const BUNDLE_REGISTRY_DEFAULT = "default";
|
|
4
|
+
export declare const MODULE_VERSIONS_ROUTE = "module-versions";
|
|
5
|
+
export type BundleRegistry = string | null;
|
|
6
|
+
export interface BundleRegistries {
|
|
7
|
+
readonly registry: BundleRegistry;
|
|
8
|
+
readonly fallbackRegistries: readonly BundleRegistry[];
|
|
9
|
+
readonly resolved: string | null;
|
|
10
|
+
}
|
|
11
|
+
export type BundleInspectProblem = 'invalid-spec' | 'already-installed' | 'not-found' | 'not-a-package' | 'not-a-bundle' | 'not-a-workbench-module' | 'not-a-module-or-plugin' | 'network' | 'unknown';
|
|
12
|
+
export type BundleSpecKind = 'registry' | 'path' | 'git' | 'tarball';
|
|
13
|
+
export interface BundleInspectionAccepted {
|
|
14
|
+
readonly status: 'accepted';
|
|
15
|
+
readonly kind: BundleSpecKind;
|
|
16
|
+
readonly name?: string;
|
|
17
|
+
readonly version?: string;
|
|
18
|
+
readonly description?: string;
|
|
19
|
+
readonly bundle: boolean | null;
|
|
20
|
+
readonly registry: BundleRegistry;
|
|
21
|
+
readonly host?: string;
|
|
22
|
+
}
|
|
23
|
+
export interface BundleInspectionRefused {
|
|
24
|
+
readonly status: 'refused';
|
|
25
|
+
readonly problem: BundleInspectProblem;
|
|
26
|
+
readonly reason: string;
|
|
27
|
+
readonly registries?: readonly BundleRegistry[];
|
|
28
|
+
}
|
|
29
|
+
export interface BundleInspectionPlugin {
|
|
30
|
+
readonly status: 'plugin';
|
|
31
|
+
readonly pkg: string;
|
|
32
|
+
readonly registry: BundleRegistry;
|
|
33
|
+
readonly pluginName?: string;
|
|
34
|
+
readonly version?: string;
|
|
35
|
+
}
|
|
36
|
+
export type BundleInspection = BundleInspectionAccepted | BundleInspectionRefused | BundleInspectionPlugin;
|
|
37
|
+
export interface BundleRegistriesPayload {
|
|
38
|
+
readonly available: boolean;
|
|
39
|
+
readonly registries: BundleRegistries | null;
|
|
40
|
+
}
|
|
41
|
+
export interface BundleInspectionPayload {
|
|
42
|
+
readonly inspection: BundleInspection;
|
|
43
|
+
}
|
|
44
|
+
export type BundleApplication = 'applied' | 'restart-required' | 'overridden' | 'failed' | 'cancelled';
|
|
45
|
+
export declare const SELF_UPDATE_STATES: readonly ["running", "ok", "rolled-back", "failed"];
|
|
46
|
+
export type SelfUpdateState = (typeof SELF_UPDATE_STATES)[number];
|
|
47
|
+
export interface WorkbenchSelfUpdate {
|
|
48
|
+
readonly state: SelfUpdateState;
|
|
49
|
+
readonly profile?: string;
|
|
50
|
+
readonly from?: string;
|
|
51
|
+
readonly to?: string;
|
|
52
|
+
readonly version?: string;
|
|
53
|
+
readonly at?: string;
|
|
54
|
+
readonly tail?: string;
|
|
55
|
+
}
|
|
56
|
+
export declare const RESTART_REASONS: readonly ["no-hmr", "package-moved", "host-module", "unmanaged-plugin", "module-comparison"];
|
|
57
|
+
export type RestartReason = (typeof RESTART_REASONS)[number];
|
|
58
|
+
export type BundleChangeStage = 'install' | 'enable' | 'remove';
|
|
59
|
+
export type BundleFailureKind = 'pnpm-missing' | 'timeout' | 'not-found' | 'no-matching-version' | 'network' | 'disk-full' | 'permission' | 'build-blocked' | 'integrity' | 'unknown';
|
|
60
|
+
export interface BundlePackageResult {
|
|
61
|
+
readonly exitCode: number;
|
|
62
|
+
readonly output: string;
|
|
63
|
+
readonly truncated: boolean;
|
|
64
|
+
readonly logPath: string;
|
|
65
|
+
readonly kind?: BundleFailureKind;
|
|
66
|
+
}
|
|
67
|
+
export interface BundleChange {
|
|
68
|
+
readonly application: BundleApplication;
|
|
69
|
+
readonly stage: BundleChangeStage;
|
|
70
|
+
readonly changed: boolean;
|
|
71
|
+
readonly target: string;
|
|
72
|
+
readonly bundle?: string;
|
|
73
|
+
readonly version?: string;
|
|
74
|
+
readonly errorCode?: string;
|
|
75
|
+
readonly errorDetail?: string;
|
|
76
|
+
readonly packageResult?: BundlePackageResult;
|
|
77
|
+
readonly pendingBuilds?: readonly string[];
|
|
78
|
+
readonly restartReason?: RestartReason;
|
|
79
|
+
readonly failedAt?: 'registry' | 'spec-host';
|
|
80
|
+
}
|
|
81
|
+
export interface BundleInstallRequest {
|
|
82
|
+
readonly spec: string;
|
|
83
|
+
readonly registry?: BundleRegistry;
|
|
84
|
+
readonly requestId?: string;
|
|
85
|
+
readonly approvedBuilds?: readonly string[];
|
|
86
|
+
}
|
|
87
|
+
export type BundleCancellation = 'cancelled' | 'too-late' | 'not-running';
|
|
88
|
+
export type BundleSupplyState = 'not-a-module' | 'no-needs' | 'installed' | 'failed' | 'pending-restart';
|
|
89
|
+
export interface BundleModulePayload {
|
|
90
|
+
readonly kind: 'module' | 'not-module' | 'unknown';
|
|
91
|
+
readonly pkg: string;
|
|
92
|
+
readonly unit?: string;
|
|
93
|
+
readonly version?: string;
|
|
94
|
+
}
|
|
95
|
+
export interface BundleSupplyPayload {
|
|
96
|
+
readonly state: BundleSupplyState;
|
|
97
|
+
readonly reason?: string;
|
|
98
|
+
}
|
|
99
|
+
export interface BundleInstalledPlugin {
|
|
100
|
+
readonly kind: 'opencli-plugin';
|
|
101
|
+
readonly pkg: string;
|
|
102
|
+
readonly name?: string;
|
|
103
|
+
}
|
|
104
|
+
export interface BundleInstallPayload {
|
|
105
|
+
readonly change: BundleChange;
|
|
106
|
+
readonly module: BundleModulePayload;
|
|
107
|
+
readonly supply: BundleSupplyPayload;
|
|
108
|
+
readonly plugin?: BundleInstalledPlugin;
|
|
109
|
+
}
|
|
110
|
+
export interface BundleRemovePayload {
|
|
111
|
+
readonly change: BundleChange;
|
|
112
|
+
readonly keptFor: readonly string[];
|
|
113
|
+
}
|
|
114
|
+
export interface BundleCancellationPayload {
|
|
115
|
+
readonly cancellation: BundleCancellation | null;
|
|
116
|
+
}
|
|
117
|
+
export interface ModuleVersion {
|
|
118
|
+
readonly unit: string;
|
|
119
|
+
readonly pkg: string;
|
|
120
|
+
readonly installed: string;
|
|
121
|
+
readonly latest?: string;
|
|
122
|
+
readonly local?: boolean;
|
|
123
|
+
readonly refused?: readonly string[];
|
|
124
|
+
}
|
|
125
|
+
export interface WorkbenchVersion {
|
|
126
|
+
readonly pkg: string;
|
|
127
|
+
readonly installed: string;
|
|
128
|
+
readonly latest?: string;
|
|
129
|
+
readonly running?: string;
|
|
130
|
+
readonly local?: boolean;
|
|
131
|
+
}
|
|
132
|
+
export interface ModuleVersionsPayload {
|
|
133
|
+
readonly modules: readonly ModuleVersion[];
|
|
134
|
+
readonly workbench?: WorkbenchVersion;
|
|
135
|
+
readonly selfUpdate?: WorkbenchSelfUpdate;
|
|
136
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export const BUNDLE_REGISTRIES_ROUTE = 'bundle-registries';
|
|
2
|
+
export const BUNDLE_INSPECT_ROUTE = 'bundle-inspect';
|
|
3
|
+
export const BUNDLE_REGISTRY_DEFAULT = 'default';
|
|
4
|
+
export const MODULE_VERSIONS_ROUTE = 'module-versions';
|
|
5
|
+
export const SELF_UPDATE_STATES = ['running', 'ok', 'rolled-back', 'failed'];
|
|
6
|
+
export const RESTART_REASONS = [
|
|
7
|
+
'no-hmr',
|
|
8
|
+
'package-moved',
|
|
9
|
+
'host-module',
|
|
10
|
+
'unmanaged-plugin',
|
|
11
|
+
'module-comparison',
|
|
12
|
+
];
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
export declare const CONFIG_SYNC_ROUTE = "config-sync";
|
|
2
|
+
export declare const CONFIG_SYNC_RESOURCE = "configSync";
|
|
3
|
+
export type ConfigSyncState = 'new' | 'differs' | 'same';
|
|
4
|
+
export type ConfigSyncAssetState = 'missing' | 'differs' | 'same' | 'external';
|
|
5
|
+
export interface ConfigSyncAssetFile {
|
|
6
|
+
readonly path: string;
|
|
7
|
+
readonly state: ConfigSyncAssetState;
|
|
8
|
+
readonly bytes: number | null;
|
|
9
|
+
}
|
|
10
|
+
export interface ConfigSyncAsset {
|
|
11
|
+
readonly key: string;
|
|
12
|
+
readonly path: string;
|
|
13
|
+
readonly kind: 'file' | 'dir';
|
|
14
|
+
readonly state: ConfigSyncAssetState;
|
|
15
|
+
readonly files: readonly ConfigSyncAssetFile[];
|
|
16
|
+
readonly bytes: number;
|
|
17
|
+
readonly reason?: string;
|
|
18
|
+
}
|
|
19
|
+
export interface ConfigSyncRow {
|
|
20
|
+
readonly key: string;
|
|
21
|
+
readonly id: string;
|
|
22
|
+
readonly insert: boolean;
|
|
23
|
+
readonly state: ConfigSyncState;
|
|
24
|
+
readonly body: string;
|
|
25
|
+
readonly ownBody: string | null;
|
|
26
|
+
readonly missing: readonly string[];
|
|
27
|
+
readonly assets: readonly ConfigSyncAsset[];
|
|
28
|
+
}
|
|
29
|
+
export interface ConfigSyncProfile {
|
|
30
|
+
readonly name: string;
|
|
31
|
+
readonly readable: boolean;
|
|
32
|
+
readonly candidates: number;
|
|
33
|
+
}
|
|
34
|
+
export interface ConfigSyncSnapshot {
|
|
35
|
+
readonly self: string;
|
|
36
|
+
readonly home: string;
|
|
37
|
+
readonly source: string;
|
|
38
|
+
readonly profiles: readonly ConfigSyncProfile[];
|
|
39
|
+
readonly rows: readonly ConfigSyncRow[];
|
|
40
|
+
readonly emptyProviders: boolean;
|
|
41
|
+
readonly reason?: string;
|
|
42
|
+
}
|
|
43
|
+
export interface ConfigSyncApplied {
|
|
44
|
+
readonly written: readonly string[];
|
|
45
|
+
readonly skipped: readonly string[];
|
|
46
|
+
readonly files: readonly string[];
|
|
47
|
+
readonly verified: boolean;
|
|
48
|
+
}
|
|
49
|
+
export interface ConfigSyncRequest {
|
|
50
|
+
readonly source: string;
|
|
51
|
+
readonly keys: readonly string[];
|
|
52
|
+
readonly overwrite: readonly string[];
|
|
53
|
+
readonly assets?: readonly string[];
|
|
54
|
+
readonly overwriteAssets?: readonly string[];
|
|
55
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export declare const DSH_PLUGINS_ROUTE = "dsh-plugins";
|
|
2
|
+
export interface DshPluginRow {
|
|
3
|
+
readonly name: string;
|
|
4
|
+
readonly version: string;
|
|
5
|
+
readonly enabled: boolean;
|
|
6
|
+
}
|
|
7
|
+
export interface DshPluginsSnapshot {
|
|
8
|
+
readonly available: boolean;
|
|
9
|
+
readonly bundles: readonly DshPluginRow[];
|
|
10
|
+
readonly plugins: readonly DshPluginRow[];
|
|
11
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export const DSH_PLUGINS_ROUTE = 'dsh-plugins';
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { LongTaskStatus } from '../long-task.js';
|
|
2
|
+
export declare const LONG_TASKS_ROUTE = "long-tasks";
|
|
3
|
+
export interface ShellLongTaskRow {
|
|
4
|
+
readonly unit: string;
|
|
5
|
+
readonly id: string;
|
|
6
|
+
readonly workspace: string;
|
|
7
|
+
readonly target: string;
|
|
8
|
+
readonly status: LongTaskStatus;
|
|
9
|
+
readonly session?: string | undefined;
|
|
10
|
+
}
|
|
11
|
+
export interface ShellLongTasksPayload {
|
|
12
|
+
readonly runs: readonly ShellLongTaskRow[];
|
|
13
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export const LONG_TASKS_ROUTE = 'long-tasks';
|
|
@@ -0,0 +1,195 @@
|
|
|
1
|
+
export declare const MARKET_INDEX_FORMAT = 1;
|
|
2
|
+
export declare const MARKET_INDEX_PATH = "market.json";
|
|
3
|
+
export declare const MARKET_DISCOVER_ROUTE = "panels/market-discover";
|
|
4
|
+
export declare const MARKET_DOC_ROUTE = "panels/market-doc";
|
|
5
|
+
export declare const MARKET_PUBLISH_PREVIEW_ROUTE = "panels/market-publish-preview";
|
|
6
|
+
export declare const MARKET_SOURCES_RESOURCE = "market-sources";
|
|
7
|
+
export declare const MARKET_WORKBENCH_LABEL = "workbench";
|
|
8
|
+
export type MarketSourceKind = 'http' | 'git';
|
|
9
|
+
export type MarketSourcePolicy = 'artifacts-in-repo' | 'catalog-only';
|
|
10
|
+
export interface IndexSourceSpec {
|
|
11
|
+
readonly kind: MarketSourceKind;
|
|
12
|
+
readonly url: string;
|
|
13
|
+
readonly ref?: string;
|
|
14
|
+
readonly path?: string;
|
|
15
|
+
readonly localPath?: string;
|
|
16
|
+
}
|
|
17
|
+
export interface MarketSourceConfig extends IndexSourceSpec {
|
|
18
|
+
readonly id: string;
|
|
19
|
+
readonly label: string;
|
|
20
|
+
readonly policy?: MarketSourcePolicy;
|
|
21
|
+
}
|
|
22
|
+
export interface MarketLocalizedText {
|
|
23
|
+
readonly zh?: string;
|
|
24
|
+
readonly en?: string;
|
|
25
|
+
}
|
|
26
|
+
export interface MarketIndexNpmSource {
|
|
27
|
+
readonly type: 'npm';
|
|
28
|
+
readonly registry?: string;
|
|
29
|
+
}
|
|
30
|
+
export interface MarketIndexGitSource {
|
|
31
|
+
readonly type: 'git';
|
|
32
|
+
readonly url: string;
|
|
33
|
+
readonly commit: string;
|
|
34
|
+
readonly path?: string;
|
|
35
|
+
}
|
|
36
|
+
export type MarketIndexSource = MarketIndexNpmSource | MarketIndexGitSource;
|
|
37
|
+
export interface MarketIndexEngines {
|
|
38
|
+
readonly dsh?: string;
|
|
39
|
+
}
|
|
40
|
+
export interface MarketIndexVersion {
|
|
41
|
+
readonly version: string;
|
|
42
|
+
readonly publishTimestamp?: number;
|
|
43
|
+
readonly source: MarketIndexSource;
|
|
44
|
+
readonly engines?: MarketIndexEngines;
|
|
45
|
+
}
|
|
46
|
+
export interface MarketIndexEntryMetadata {
|
|
47
|
+
readonly category?: string;
|
|
48
|
+
readonly labels?: readonly string[];
|
|
49
|
+
readonly keywords?: readonly string[];
|
|
50
|
+
readonly sortKeys?: Readonly<Record<string, string | number>>;
|
|
51
|
+
}
|
|
52
|
+
export interface MarketIndexEntry {
|
|
53
|
+
readonly name: string;
|
|
54
|
+
readonly title?: MarketLocalizedText;
|
|
55
|
+
readonly description?: MarketLocalizedText;
|
|
56
|
+
readonly author?: string;
|
|
57
|
+
readonly homepage?: string;
|
|
58
|
+
readonly icon?: string;
|
|
59
|
+
readonly metadata?: MarketIndexEntryMetadata;
|
|
60
|
+
readonly versions: readonly MarketIndexVersion[];
|
|
61
|
+
}
|
|
62
|
+
export interface MarketIndexCategory {
|
|
63
|
+
readonly title?: MarketLocalizedText;
|
|
64
|
+
}
|
|
65
|
+
export interface MarketIndexLabel {
|
|
66
|
+
readonly title?: MarketLocalizedText;
|
|
67
|
+
}
|
|
68
|
+
export interface MarketIndexSortKey {
|
|
69
|
+
readonly title?: MarketLocalizedText;
|
|
70
|
+
readonly order?: 'asc' | 'desc';
|
|
71
|
+
}
|
|
72
|
+
export interface MarketIndexMetadata {
|
|
73
|
+
readonly categories?: Readonly<Record<string, MarketIndexCategory>>;
|
|
74
|
+
readonly labels?: Readonly<Record<string, MarketIndexLabel>>;
|
|
75
|
+
readonly sortKeys?: Readonly<Record<string, MarketIndexSortKey>>;
|
|
76
|
+
}
|
|
77
|
+
export interface MarketIndex {
|
|
78
|
+
readonly format: 1;
|
|
79
|
+
readonly title?: MarketLocalizedText;
|
|
80
|
+
readonly description?: MarketLocalizedText;
|
|
81
|
+
readonly metadata?: MarketIndexMetadata;
|
|
82
|
+
readonly plugins: readonly MarketIndexEntry[];
|
|
83
|
+
}
|
|
84
|
+
export type MarketIndexProblemKind = 'not-json' | 'not-object' | 'format' | 'plugins' | 'plugin' | 'name' | 'duplicate-name' | 'versions' | 'version' | 'version-order' | 'source' | 'git-commit' | 'timestamp' | 'icon';
|
|
85
|
+
export interface MarketIndexProblem {
|
|
86
|
+
readonly kind: MarketIndexProblemKind;
|
|
87
|
+
readonly detail: string;
|
|
88
|
+
readonly at?: string;
|
|
89
|
+
}
|
|
90
|
+
export type MarketIndexParse = {
|
|
91
|
+
readonly ok: true;
|
|
92
|
+
readonly index: MarketIndex;
|
|
93
|
+
} | {
|
|
94
|
+
readonly ok: false;
|
|
95
|
+
readonly problems: readonly MarketIndexProblem[];
|
|
96
|
+
};
|
|
97
|
+
export type DiscoverCompat = 'ok' | 'incompatible' | 'unknown';
|
|
98
|
+
export type DiscoverInstallState = 'not-installed' | 'installed' | 'update-available' | 'different-version';
|
|
99
|
+
export interface DiscoverVersionRow {
|
|
100
|
+
readonly version: string;
|
|
101
|
+
readonly publishTimestamp?: number;
|
|
102
|
+
readonly source: MarketIndexSource;
|
|
103
|
+
readonly engines?: MarketIndexEngines;
|
|
104
|
+
readonly compat: DiscoverCompat;
|
|
105
|
+
readonly peer?: string;
|
|
106
|
+
readonly install: DiscoverInstallState;
|
|
107
|
+
}
|
|
108
|
+
export interface DiscoverEntry {
|
|
109
|
+
readonly name: string;
|
|
110
|
+
readonly title?: MarketLocalizedText;
|
|
111
|
+
readonly description?: MarketLocalizedText;
|
|
112
|
+
readonly author?: string;
|
|
113
|
+
readonly homepage?: string;
|
|
114
|
+
readonly icon?: string;
|
|
115
|
+
readonly category?: string;
|
|
116
|
+
readonly labels: readonly string[];
|
|
117
|
+
readonly installedVersion?: string;
|
|
118
|
+
readonly versions: readonly DiscoverVersionRow[];
|
|
119
|
+
}
|
|
120
|
+
export interface DiscoverSourceRow extends MarketSourceConfig {
|
|
121
|
+
readonly writable: boolean | null;
|
|
122
|
+
}
|
|
123
|
+
export type DiscoverState = 'no-source' | 'ready' | 'unreadable' | 'invalid';
|
|
124
|
+
export interface DiscoverProblem {
|
|
125
|
+
readonly kind: 'no-source' | 'http-status' | 'http-network' | 'http-url' | 'git-missing' | 'git-network' | 'git-auth' | 'git-file' | 'git-empty' | 'git-missing-index' | 'format' | 'timeout' | 'unknown';
|
|
126
|
+
readonly detail?: string;
|
|
127
|
+
readonly branch?: string;
|
|
128
|
+
}
|
|
129
|
+
export interface DiscoverPayload {
|
|
130
|
+
readonly state: DiscoverState;
|
|
131
|
+
readonly sources: readonly DiscoverSourceRow[];
|
|
132
|
+
readonly selected: string | null;
|
|
133
|
+
readonly entries: readonly DiscoverEntry[];
|
|
134
|
+
readonly fetchedAt?: number;
|
|
135
|
+
readonly commit?: string;
|
|
136
|
+
readonly stale?: boolean;
|
|
137
|
+
readonly problem?: DiscoverProblem;
|
|
138
|
+
}
|
|
139
|
+
export interface DiscoverFilter {
|
|
140
|
+
readonly query?: string;
|
|
141
|
+
readonly category?: string;
|
|
142
|
+
readonly label?: string;
|
|
143
|
+
}
|
|
144
|
+
export interface MarketSourcesPayload {
|
|
145
|
+
readonly sources: readonly MarketSourceConfig[];
|
|
146
|
+
readonly selected: string | null;
|
|
147
|
+
}
|
|
148
|
+
export interface MarketPublishDestination {
|
|
149
|
+
readonly url: string;
|
|
150
|
+
readonly ref?: string;
|
|
151
|
+
readonly indexPath: string;
|
|
152
|
+
readonly artifactPath: string;
|
|
153
|
+
readonly files: readonly string[];
|
|
154
|
+
readonly nextVersion?: string;
|
|
155
|
+
}
|
|
156
|
+
export interface PublishChangelog {
|
|
157
|
+
readonly version: string;
|
|
158
|
+
readonly text?: string;
|
|
159
|
+
readonly missing?: boolean;
|
|
160
|
+
}
|
|
161
|
+
export interface PublishPreview {
|
|
162
|
+
readonly name: string;
|
|
163
|
+
readonly version: string;
|
|
164
|
+
readonly registry?: string;
|
|
165
|
+
readonly market?: MarketPublishDestination;
|
|
166
|
+
readonly changelog?: PublishChangelog;
|
|
167
|
+
}
|
|
168
|
+
export type DiscoverDocKind = 'readme' | 'changelog';
|
|
169
|
+
export type DiscoverDoc = {
|
|
170
|
+
readonly ok: true;
|
|
171
|
+
readonly kind: DiscoverDocKind;
|
|
172
|
+
readonly version: string;
|
|
173
|
+
readonly text: string;
|
|
174
|
+
} | {
|
|
175
|
+
readonly ok: false;
|
|
176
|
+
readonly kind: DiscoverDocKind;
|
|
177
|
+
readonly version: string;
|
|
178
|
+
readonly reason: 'missing' | 'unavailable';
|
|
179
|
+
readonly detail?: string;
|
|
180
|
+
};
|
|
181
|
+
export type MarketSourcesAction = {
|
|
182
|
+
readonly action: 'save';
|
|
183
|
+
readonly source: MarketSourceConfig;
|
|
184
|
+
readonly select?: boolean;
|
|
185
|
+
} | {
|
|
186
|
+
readonly action: 'remove';
|
|
187
|
+
readonly id: string;
|
|
188
|
+
} | {
|
|
189
|
+
readonly action: 'select';
|
|
190
|
+
readonly id: string | null;
|
|
191
|
+
} | {
|
|
192
|
+
readonly action: 'init';
|
|
193
|
+
readonly id: string;
|
|
194
|
+
readonly ref?: string;
|
|
195
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export const MARKET_INDEX_FORMAT = 1;
|
|
2
|
+
export const MARKET_INDEX_PATH = 'market.json';
|
|
3
|
+
export const MARKET_DISCOVER_ROUTE = 'panels/market-discover';
|
|
4
|
+
export const MARKET_DOC_ROUTE = 'panels/market-doc';
|
|
5
|
+
export const MARKET_PUBLISH_PREVIEW_ROUTE = 'panels/market-publish-preview';
|
|
6
|
+
export const MARKET_SOURCES_RESOURCE = 'market-sources';
|
|
7
|
+
export const MARKET_WORKBENCH_LABEL = 'workbench';
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
export type Deployment = 'web' | 'desktop';
|
|
2
|
+
export type HostOs = 'darwin' | 'win32' | 'linux' | 'other';
|
|
3
|
+
export type HostRuntime = 'electron' | 'node';
|
|
4
|
+
export type ClientShell = 'electron' | 'browser';
|
|
5
|
+
export type ProfileName = 'desktop' | 'web' | 'workbench' | 'headless' | 'other';
|
|
6
|
+
export type SelfUpdateCli = 'path-dsh' | 'desktop-cli';
|
|
7
|
+
export interface HostCapabilities {
|
|
8
|
+
readonly pageDebug: boolean;
|
|
9
|
+
readonly siteExplore: boolean;
|
|
10
|
+
readonly recording: boolean;
|
|
11
|
+
readonly browserWake: boolean;
|
|
12
|
+
readonly selfUpdateCli: SelfUpdateCli;
|
|
13
|
+
readonly safeMode: boolean;
|
|
14
|
+
}
|
|
15
|
+
export interface ToolchainPlan {
|
|
16
|
+
readonly node: {
|
|
17
|
+
readonly source: 'desktop-shim' | 'path';
|
|
18
|
+
};
|
|
19
|
+
readonly npm: {
|
|
20
|
+
readonly neededFor: 'opencli-install';
|
|
21
|
+
};
|
|
22
|
+
readonly pnpm: {
|
|
23
|
+
readonly neededFor: 'workshop';
|
|
24
|
+
readonly expectedMajor: 10;
|
|
25
|
+
};
|
|
26
|
+
}
|
|
27
|
+
export interface HostSurface {
|
|
28
|
+
readonly deployment: Deployment;
|
|
29
|
+
readonly hostOs: HostOs;
|
|
30
|
+
readonly runtime: HostRuntime;
|
|
31
|
+
readonly profile: ProfileName;
|
|
32
|
+
readonly capabilities: HostCapabilities;
|
|
33
|
+
readonly restartHint: string;
|
|
34
|
+
readonly toolchain: ToolchainPlan;
|
|
35
|
+
}
|
|
36
|
+
export interface ClientCapabilities {
|
|
37
|
+
readonly debugFooter: boolean;
|
|
38
|
+
}
|
|
39
|
+
export interface ClientSurface {
|
|
40
|
+
readonly deployment: Deployment;
|
|
41
|
+
readonly shell: ClientShell;
|
|
42
|
+
readonly hostOs: HostOs;
|
|
43
|
+
readonly capabilities: ClientCapabilities;
|
|
44
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export declare const WAKE_BROWSER_ROUTE = "wake-browser";
|
|
2
|
+
export type DesktopBrowserId = 'chrome' | 'edge' | 'brave' | 'chromium' | 'vivaldi';
|
|
3
|
+
export type BrowserWakeStatus = 'connected' | 'browser-open' | 'no-browser' | 'launch-failed' | 'not-connected' | 'unsupported' | 'unknown';
|
|
4
|
+
export interface WakeBrowserReply {
|
|
5
|
+
readonly status: BrowserWakeStatus;
|
|
6
|
+
readonly browser?: DesktopBrowserId;
|
|
7
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export const WAKE_BROWSER_ROUTE = 'wake-browser';
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
export declare const PROFILE_CREATE_ROUTE = "profile-create";
|
|
2
|
+
export declare const PROFILE_CREATE_RESOURCE = "profileCreate";
|
|
3
|
+
export interface ProfileCreateProfile {
|
|
4
|
+
readonly name: string;
|
|
5
|
+
readonly current: boolean;
|
|
6
|
+
readonly readable: boolean;
|
|
7
|
+
}
|
|
8
|
+
export interface ProfileCreateSnapshot {
|
|
9
|
+
readonly current: string;
|
|
10
|
+
readonly profiles: readonly ProfileCreateProfile[];
|
|
11
|
+
}
|
|
12
|
+
export interface ProfileCreateCopy {
|
|
13
|
+
readonly settings: boolean;
|
|
14
|
+
readonly plugins: boolean;
|
|
15
|
+
readonly projects: boolean;
|
|
16
|
+
readonly sessions: boolean;
|
|
17
|
+
}
|
|
18
|
+
export interface ProfileCreateRequest {
|
|
19
|
+
readonly profile: string;
|
|
20
|
+
readonly source: string;
|
|
21
|
+
readonly copy: ProfileCreateCopy;
|
|
22
|
+
}
|
|
23
|
+
export interface ProfileCreateApplied {
|
|
24
|
+
readonly ok: true;
|
|
25
|
+
readonly profile: string;
|
|
26
|
+
readonly source: string;
|
|
27
|
+
readonly home: string;
|
|
28
|
+
readonly command: string;
|
|
29
|
+
readonly copied: readonly string[];
|
|
30
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export declare const SIDEBAR_EDITION_ROUTE = "sidebar-edition";
|
|
2
|
+
export declare const SIDEBAR_EDITION_RESOURCE = "sidebarEdition";
|
|
3
|
+
export type SidebarEdition = 'official' | 'custom';
|
|
4
|
+
export interface SidebarEditionSnapshot {
|
|
5
|
+
readonly edition: SidebarEdition;
|
|
6
|
+
}
|
|
7
|
+
export interface SidebarEditionApplied {
|
|
8
|
+
readonly ok: true;
|
|
9
|
+
readonly edition: SidebarEdition;
|
|
10
|
+
readonly reloadRequired: boolean;
|
|
11
|
+
}
|
|
12
|
+
export interface SidebarEditionRequest {
|
|
13
|
+
readonly edition: SidebarEdition;
|
|
14
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export const UNIT_MANIFESTS_ROUTE = 'unit-manifests';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import type { Need, NeedKind } from './needs.js';
|
|
2
|
+
import type { ProvisionProblem } from './plugin-source.js';
|
|
3
|
+
/**
|
|
4
|
+
* 一条 need 探出来的样子:状态、给人看的一句、以及能照做的修法。
|
|
5
|
+
*/
|
|
6
|
+
export interface NeedState {
|
|
7
|
+
readonly id: string;
|
|
8
|
+
readonly kind: NeedKind;
|
|
9
|
+
readonly name: string;
|
|
10
|
+
readonly status: 'ok' | 'missing' | 'outdated' | 'unsatisfied' | 'unchecked';
|
|
11
|
+
readonly detail: string;
|
|
12
|
+
readonly command?: string;
|
|
13
|
+
readonly missing?: readonly string[];
|
|
14
|
+
readonly installed?: string;
|
|
15
|
+
readonly latest?: string;
|
|
16
|
+
readonly provision?: 'ready' | ProvisionProblem;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* 一个单元的能力结论:unit 一级只做汇总,缺什么逐条看 needs。
|
|
20
|
+
*/
|
|
21
|
+
export interface UnitCapability {
|
|
22
|
+
readonly unit: string;
|
|
23
|
+
readonly status: 'ok' | 'degraded' | 'missing' | 'outdated' | 'unchecked' | 'unsupported' | 'failed';
|
|
24
|
+
readonly needs: readonly NeedState[];
|
|
25
|
+
readonly detail?: string;
|
|
26
|
+
readonly released?: boolean;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* 探一个单元的输入:单元 id 加它声明的 need 列表。
|
|
30
|
+
*/
|
|
31
|
+
export interface NeedProbeInput {
|
|
32
|
+
readonly unit: string;
|
|
33
|
+
readonly needs: readonly Need[];
|
|
34
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { UnitHostNeeds, UnitManifest } from '../contract/unit.js';
|
|
2
|
+
import { type Need } from './needs.js';
|
|
2
3
|
/**
|
|
3
4
|
* 声明协议当前版本;模块清单的 dsh.workbench.apiVersion 要写这个整数。
|
|
4
5
|
*/
|
|
5
|
-
export declare const WORKBENCH_API_VERSION =
|
|
6
|
+
export declare const WORKBENCH_API_VERSION = 2;
|
|
6
7
|
/**
|
|
7
8
|
* 外壳愿意认的协议版本;不在表里的模块当场被拒,不猜语义。
|
|
8
9
|
*/
|
|
@@ -31,14 +32,14 @@ export interface UnitDeclaration {
|
|
|
31
32
|
readonly card: UnitCardDeclaration | null;
|
|
32
33
|
readonly tools: readonly UnitToolDeclaration[];
|
|
33
34
|
readonly host: UnitHostNeeds;
|
|
34
|
-
readonly
|
|
35
|
+
readonly needs?: readonly Need[];
|
|
35
36
|
}
|
|
36
37
|
/**
|
|
37
|
-
*
|
|
38
|
+
* 协议认得的全部键;写了别的键这份清单会被拒(`protocol` 判据与运行时同一套),拼错当场报出来。
|
|
38
39
|
*/
|
|
39
40
|
export declare const DECLARATION_KEYS: readonly string[];
|
|
40
41
|
/**
|
|
41
|
-
* 协议要求必写的键;
|
|
42
|
+
* 协议要求必写的键;needs 不在其中(没有环境需要就不写)。
|
|
42
43
|
*/
|
|
43
44
|
export declare const DECLARATION_REQUIRED_KEYS: readonly string[];
|
|
44
45
|
/**
|
|
@@ -55,6 +56,7 @@ export interface DeclarationRead {
|
|
|
55
56
|
readonly declaration?: UnitDeclaration;
|
|
56
57
|
readonly manifest?: UnitManifest;
|
|
57
58
|
readonly problems: readonly string[];
|
|
59
|
+
readonly warnings: readonly string[];
|
|
58
60
|
}
|
|
59
61
|
/**
|
|
60
62
|
* 读一份清单:先查形状,过了再把声明规整成 manifest。
|