@dsh-workbench/core 0.3.10 → 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 +148 -105
- package/bin/dsh-workbench +132 -31
- package/bin/dsh-workbench.cmd +5 -0
- package/bin/opencli-isolated +3 -2
- package/bin/opencli-isolated.mjs +44 -0
- package/bin/opencli-node-mode.cjs +1 -0
- package/bin/seed-workshop-windows.mjs +307 -0
- package/client.js +8192 -4904
- package/cordis.patch.yml +62 -37
- package/dist/client/client.body.js +8192 -4904
- package/dist/client/index.js +7186 -3898
- package/dist/host/index.js +7277 -6956
- package/dist/types/app/client.d.ts +3 -1
- package/dist/types/app/host.d.ts +2 -1
- package/dist/types/app/layouts/approval-detail.d.ts +3 -0
- package/dist/types/app/layouts/env-gate/boot-gate.d.ts +1 -12
- package/dist/types/app/layouts/env-gate/gate-text.d.ts +2 -1
- package/dist/types/app/layouts/market/DiscoverPanel.d.ts +8 -0
- package/dist/types/app/layouts/market/add-module-text.d.ts +1 -1
- package/dist/types/app/layouts/market/discover-categories.d.ts +8 -0
- package/dist/types/app/layouts/market/discover-confirm.d.ts +14 -0
- package/dist/types/app/layouts/market/discover-detail.d.ts +12 -0
- package/dist/types/app/layouts/market/discover-dialogs.d.ts +7 -0
- package/dist/types/app/layouts/market/discover-doc.d.ts +18 -0
- package/dist/types/app/layouts/market/discover-init-dialog.d.ts +10 -0
- package/dist/types/app/layouts/market/discover-rows.d.ts +24 -0
- package/dist/types/app/layouts/market/discover-sources-dialog.d.ts +16 -0
- package/dist/types/app/layouts/market/discover-states.d.ts +22 -0
- package/dist/types/app/layouts/market/discover-toolbar.d.ts +23 -0
- package/dist/types/app/layouts/market/discover-versions.d.ts +9 -0
- package/dist/types/app/layouts/market/discover-view.d.ts +38 -0
- package/dist/types/app/layouts/market/market-header.d.ts +13 -0
- package/dist/types/app/layouts/market/panel.d.ts +1 -1
- package/dist/types/app/layouts/market/use-add-module.d.ts +1 -1
- package/dist/types/app/layouts/market/use-discover.d.ts +72 -0
- package/dist/types/app/layouts/market/use-module-versions.d.ts +6 -2
- package/dist/types/app/layouts/rightbar/MarketView.d.ts +6 -3
- package/dist/types/app/layouts/rightbar/Rightbar.d.ts +1 -1
- package/dist/types/app/layouts/rightbar/board-shape.d.ts +1 -14
- package/dist/types/app/layouts/rightbar/market-act.d.ts +6 -3
- package/dist/types/app/layouts/rightbar/market-busy.d.ts +0 -22
- package/dist/types/app/layouts/rightbar/market-change.d.ts +1 -1
- package/dist/types/app/layouts/rightbar/market-hint.d.ts +1 -7
- package/dist/types/app/layouts/rightbar/market-plugin-rows.d.ts +0 -7
- package/dist/types/app/layouts/rightbar/market-row-icon.d.ts +1 -1
- package/dist/types/app/layouts/rightbar/market-row-types.d.ts +2 -2
- package/dist/types/app/layouts/rightbar/market-rows.d.ts +1 -1
- package/dist/types/app/layouts/rightbar/market-section-icon.d.ts +1 -1
- package/dist/types/app/layouts/rightbar/market-settle-hold.d.ts +2 -0
- package/dist/types/app/layouts/rightbar/market-settle.d.ts +17 -0
- package/dist/types/app/layouts/rightbar/market-shared-rows.d.ts +1 -1
- package/dist/types/app/layouts/rightbar/market-update-verdict.d.ts +31 -0
- package/dist/types/app/layouts/rightbar/market-view-text.d.ts +8 -1
- package/dist/types/app/layouts/rightbar/market-workbench-row.d.ts +1 -1
- package/dist/types/app/layouts/rightbar/store.d.ts +2 -0
- package/dist/types/app/layouts/sidebar/LongTaskDot.d.ts +6 -0
- package/dist/types/app/layouts/sidebar/LongTaskHover.d.ts +6 -0
- package/dist/types/app/layouts/sidebar/edition-boot.d.ts +6 -0
- package/dist/types/app/layouts/sidebar/edition.d.ts +5 -0
- package/dist/types/app/layouts/sidebar/use-attention.d.ts +0 -4
- package/dist/types/app/layouts/sidebar/workshop-preset.d.ts +2 -0
- package/dist/types/app/layouts/workbench-settings/AdapterSetItem.d.ts +5 -0
- package/dist/types/app/layouts/workbench-settings/ConfigSyncItem.d.ts +5 -0
- package/dist/types/app/layouts/workbench-settings/ConfigSyncRows.d.ts +11 -0
- package/dist/types/app/layouts/workbench-settings/NewWorkbenchItem.d.ts +5 -0
- package/dist/types/app/layouts/workbench-settings/SettingsItem.d.ts +8 -0
- package/dist/types/app/layouts/workbench-settings/SidebarEditionItem.d.ts +5 -0
- package/dist/types/app/layouts/workbench-settings/WorkbenchSettingsSection.d.ts +5 -0
- package/dist/types/app/units/manifests.d.ts +1 -1
- package/dist/types/{app/units → kernel/client}/registry.d.ts +1 -1
- package/dist/types/kernel/contract/bundle-install.d.ts +2 -0
- package/dist/types/kernel/contract/config-sync.d.ts +2 -0
- package/dist/types/kernel/contract/diy.d.ts +1 -0
- package/dist/types/kernel/contract/dsh-plugins.d.ts +2 -0
- package/dist/types/kernel/contract/index.d.ts +4 -0
- package/dist/types/kernel/contract/long-tasks.d.ts +2 -0
- package/dist/types/kernel/contract/market-index.d.ts +2 -0
- package/dist/types/kernel/contract/platform.d.ts +1 -0
- package/dist/types/kernel/contract/preflight-wake.d.ts +2 -0
- package/dist/types/kernel/contract/profile-create.d.ts +2 -0
- package/dist/types/kernel/contract/sidebar-edition.d.ts +2 -0
- package/dist/types/kernel/contract/unit-manifests.d.ts +2 -0
- package/dist/types/{shared/api → kernel}/host/mount-units.d.ts +2 -1
- package/dist/types/modules/panels/client.d.ts +1 -1
- package/dist/types/modules/panels/model/approval.d.ts +4 -8
- package/dist/types/modules/panels/model/diy-browser-tools.d.ts +1 -1
- package/dist/types/modules/panels/model/diy-changelog.d.ts +2 -0
- package/dist/types/modules/panels/model/diy-context.d.ts +20 -18
- package/dist/types/modules/panels/model/diy-page.d.ts +4 -2
- package/dist/types/modules/panels/model/diy-record-open.d.ts +0 -15
- package/dist/types/modules/panels/model/diy-record-text.d.ts +0 -2
- package/dist/types/modules/panels/model/diy-record.d.ts +1 -31
- package/dist/types/modules/panels/model/diy-report.d.ts +6 -7
- package/dist/types/modules/panels/model/diy-tools.d.ts +1 -0
- package/dist/types/modules/panels/model/long-task-tools.d.ts +0 -11
- package/dist/types/modules/panels/model/market-dependency-update.d.ts +15 -0
- package/dist/types/modules/panels/model/market-dependency.d.ts +15 -10
- package/dist/types/modules/panels/model/market-discover-routes.d.ts +3 -0
- package/dist/types/modules/panels/model/market-discover.d.ts +33 -0
- package/dist/types/modules/panels/model/market-dispatch.d.ts +4 -3
- package/dist/types/modules/panels/model/market-env.d.ts +2 -3
- package/dist/types/modules/panels/model/market-registry.d.ts +3 -3
- package/dist/types/modules/panels/model/market-restart.d.ts +1 -1
- package/dist/types/modules/panels/model/market-route.d.ts +5 -3
- package/dist/types/modules/panels/model/market-sources-act.d.ts +9 -0
- package/dist/types/modules/panels/model/market-types.d.ts +7 -13
- package/dist/types/modules/panels/model/market-update-bundle.d.ts +19 -0
- package/dist/types/modules/panels/model/market-verify.d.ts +15 -0
- package/dist/types/modules/panels/model/market-workbench-update.d.ts +3 -2
- package/dist/types/modules/panels/model/market.d.ts +6 -5
- package/dist/types/modules/panels/model/plugin-actions.d.ts +2 -1
- package/dist/types/modules/panels/model/plugin-section.d.ts +3 -1
- package/dist/types/modules/panels/model/publish-preview-routes.d.ts +2 -0
- package/dist/types/modules/panels/unit.d.ts +8 -5
- package/dist/types/modules/sessions/model/attention.d.ts +0 -11
- package/dist/types/modules/sessions/model/session-node.d.ts +0 -10
- package/dist/types/shared/api/diy.d.ts +6 -4
- package/dist/types/shared/api/host/approval-call.d.ts +0 -9
- package/dist/types/shared/api/host/approval-gate.d.ts +26 -0
- package/dist/types/shared/api/host/bundle-routes.d.ts +2 -1
- package/dist/types/shared/api/host/diy-artifacts.d.ts +3 -0
- package/dist/types/shared/api/host/diy-changelog.d.ts +13 -0
- package/dist/types/shared/api/host/diy-components.d.ts +2 -3
- package/dist/types/shared/api/host/diy-modules.d.ts +25 -0
- package/dist/types/shared/api/host/diy-publish-preview.d.ts +4 -0
- package/dist/types/shared/api/host/diy-recon-fs.d.ts +2 -2
- package/dist/types/shared/api/host/diy-tokens.d.ts +8 -0
- package/dist/types/shared/api/host/host-routes.d.ts +10 -0
- package/dist/types/shared/api/host/long-task-notice.d.ts +0 -20
- package/dist/types/shared/api/host/long-tasks.d.ts +1 -8
- package/dist/types/shared/api/host/market-doc.d.ts +21 -0
- package/dist/types/shared/api/host/market-index-fetch.d.ts +37 -0
- package/dist/types/shared/api/host/market-source-init.d.ts +22 -0
- package/dist/types/shared/api/host/market-sources-store.d.ts +15 -0
- package/dist/types/shared/api/host/permission-mode.d.ts +4 -0
- package/dist/types/shared/api/host/post-channels.d.ts +1 -1
- package/dist/types/shared/api/host/sidebar-edition.d.ts +14 -0
- package/dist/types/shared/api/host/unit-roster-facts.d.ts +1 -1
- package/dist/types/shared/api/host/workspace-root.d.ts +6 -0
- package/dist/types/shared/api/platform/client.d.ts +10 -0
- package/dist/types/shared/api/unit-board.d.ts +4 -0
- package/dist/types/shared/api/write-outcome.d.ts +3 -0
- package/dist/types/shared/components/IconModules.d.ts +2 -0
- package/dist/types/shared/components/PanelFoot.d.ts +0 -9
- package/dist/types/shared/components/blocker-action.d.ts +3 -0
- package/dist/types/shared/dev-surface/index.d.ts +5 -0
- package/dist/types/shared/dev-surface/types.d.ts +79 -0
- package/dist/types/shared/hooks/bundle-queries.d.ts +1 -13
- package/dist/types/shared/hooks/fact-transport.d.ts +4 -0
- package/dist/types/shared/hooks/fact-transports.d.ts +0 -4
- package/dist/types/shared/hooks/market-queries.d.ts +11 -0
- package/dist/types/shared/hooks/panel-state-report.d.ts +0 -12
- package/dist/types/shared/hooks/sidebar-edition.d.ts +2 -0
- package/dist/types/shared/hooks/use-blocker-actions.d.ts +0 -8
- package/dist/types/shared/hooks/use-capabilities.d.ts +1 -55
- package/dist/types/shared/hooks/use-capability-gate.d.ts +1 -2
- package/dist/types/shared/hooks/use-diy-debug.d.ts +0 -13
- package/dist/types/shared/hooks/use-diy-record.d.ts +0 -13
- package/dist/types/shared/hooks/use-host-write.d.ts +1 -1
- package/dist/types/shared/hooks/use-shell-long-tasks.d.ts +1 -7
- package/dist/types/shared/hooks/use-unit-board.d.ts +1 -1
- package/icon.svg +17 -28
- package/package.json +33 -13
- package/preset/diy.patch.yml +3 -3
- package/profile/isolation.patch.yml +18 -7
- package/profile/sandbox.patch.yml +2 -2
- package/scripts/clone-profile.mjs +268 -0
- package/scripts/create-workbench.mjs +166 -0
- package/scripts/seed-profile.sh +22 -10
- package/scripts/seed-workshop.sh +17 -19
- package/skills/workbench-module-diy/BUILD.md +57 -133
- package/skills/workbench-module-diy/COPY.md +89 -0
- package/skills/workbench-module-diy/DATASOURCE.md +173 -116
- package/skills/workbench-module-diy/DESIGN.md +76 -109
- package/skills/workbench-module-diy/FAMILY.md +48 -52
- package/skills/workbench-module-diy/KIT.md +78 -133
- package/skills/workbench-module-diy/LINKAGE.md +66 -105
- package/skills/workbench-module-diy/PANEL.md +81 -171
- package/skills/workbench-module-diy/REVIEW.md +67 -81
- package/skills/workbench-module-diy/SKILL.md +66 -96
- package/skills/workbench-module-diy/STEPS.md +66 -69
- package/skills/workbench-module-diy/TOOLS.md +134 -103
- package/skills/workbench-module-diy/WIRING.md +64 -84
- package/skills/workbench-module-diy/WRITES.md +115 -142
- package/dist/types/app/layouts/config-sync/ConfigSyncSection.d.ts +0 -5
- package/dist/types/shared/api/bundle-install.d.ts +0 -123
- package/dist/types/shared/api/config-sync.d.ts +0 -35
- package/dist/types/shared/api/dsh-plugins.d.ts +0 -11
- package/dist/types/shared/api/host/bundle-manager.d.ts +0 -11
- package/dist/types/shared/api/host/config-sync.d.ts +0 -46
- package/dist/types/shared/api/host/diy-preset-health.d.ts +0 -35
- package/dist/types/shared/api/host/diy-workshop.d.ts +0 -23
- package/dist/types/shared/api/host/dsh-plugins.d.ts +0 -5
- package/dist/types/shared/api/host/installed-module.d.ts +0 -54
- package/dist/types/shared/api/host/installed-module.test.d.ts +0 -1
- package/dist/types/shared/api/host/opencli-command.d.ts +0 -10
- package/dist/types/shared/api/host/opencli-command.test.d.ts +0 -1
- package/dist/types/shared/api/host/opencli.test.d.ts +0 -1
- package/dist/types/shared/api/host/package-content.d.ts +0 -6
- package/dist/types/shared/api/host/package-content.test.d.ts +0 -1
- package/dist/types/shared/api/host/package-kind.d.ts +0 -21
- package/dist/types/shared/api/host/package-kind.test.d.ts +0 -1
- package/dist/types/shared/api/host/package-route.d.ts +0 -23
- package/dist/types/shared/api/host/package-route.test.d.ts +0 -1
- package/dist/types/shared/api/host/plugin-catalog.d.ts +0 -65
- package/dist/types/shared/api/host/plugin-login-hint.d.ts +0 -2
- package/dist/types/shared/api/host/plugin-tools.d.ts +0 -14
- package/dist/types/shared/api/host/plugin-units.d.ts +0 -48
- package/dist/types/shared/api/host/preflight-route.d.ts +0 -15
- package/dist/types/shared/api/host/preflight.d.ts +0 -75
- package/dist/types/shared/api/host/probe-cache.d.ts +0 -6
- package/dist/types/shared/api/host/probe-libs.d.ts +0 -11
- package/dist/types/shared/api/host/probe-units.d.ts +0 -17
- package/dist/types/shared/api/host/probe-verdict.d.ts +0 -7
- package/dist/types/shared/api/host/profile-registries.d.ts +0 -21
- package/dist/types/shared/api/host/registry-declaration.d.ts +0 -23
- package/dist/types/shared/api/host/release.d.ts +0 -24
- package/dist/types/shared/api/host/runtime-seed.d.ts +0 -38
- package/dist/types/shared/api/host/self-update.d.ts +0 -45
- package/dist/types/shared/api/host/version-range.d.ts +0 -2
- package/dist/types/shared/api/host/workshop-root.d.ts +0 -16
- package/dist/types/shared/api/long-tasks.d.ts +0 -19
- package/dist/types/shared/api/unit-manifests.d.ts +0 -6
- package/docs/HANDOFF.md +0 -333
- package/docs/OPERATIONS.md +0 -229
- package/skills/workbench-module-diy/TOOLING.md +0 -55
- /package/dist/types/{app/layouts/rightbar/registry.d.ts → kernel/client/board-registry.d.ts} +0 -0
- /package/dist/types/{app/layouts/rightbar/registry.test.d.ts → kernel/contract/contracts.test.d.ts} +0 -0
- /package/dist/types/{shared/api/host/bundle-manager.test.d.ts → kernel/contract/index.test.d.ts} +0 -0
- /package/dist/types/{shared/api → kernel}/host/unit-readiness.d.ts +0 -0
- /package/dist/types/{shared/api → kernel}/host/unit-registry.d.ts +0 -0
- /package/dist/types/shared/{api/host/diy-workshop.test.d.ts → components/blocker-action.test.d.ts} +0 -0
- /package/dist/types/shared/{api/host/dsh-plugins.test.d.ts → dev-surface/install.d.ts} +0 -0
|
@@ -1,15 +1,4 @@
|
|
|
1
1
|
import type { DshHostContext } from '@dsh-workbench/shared';
|
|
2
2
|
import type { LongTaskBase, LongTaskRegistry } from '@dsh-workbench/shared/host';
|
|
3
|
-
/**
|
|
4
|
-
* 当前挂着的单元各自那把长任务注册表(晚绑定的取值器,形状同 `UnitMountDeps.longTaskRuns`)。
|
|
5
|
-
*/
|
|
6
3
|
export type LongTaskRunsLookup = () => ReadonlyMap<string, LongTaskRegistry<LongTaskBase>>;
|
|
7
|
-
/**
|
|
8
|
-
* 注册长任务那两把外壳工具:看得见(`workbench_long_tasks_list`)与停得了任何单元的一趟
|
|
9
|
-
* (`workbench_long_tasks_stop`)。`longTaskRuns` 是晚绑定的取值器:两把都从它取注册表,
|
|
10
|
-
* 所以单元晚挂上 / 被摘掉都跟得上;没给的话停那把一律回"没有这一趟"。
|
|
11
|
-
* @param ctx 宿主上下文,`tools` 服务不在时什么都不注册。
|
|
12
|
-
* @param longTaskRuns 当前挂着的单元各自那把长任务注册表。
|
|
13
|
-
* @returns 注销函数(没有 tools 服务就是空数组)。
|
|
14
|
-
*/
|
|
15
4
|
export declare function registerLongTaskTools(ctx: DshHostContext, longTaskRuns?: LongTaskRunsLookup | undefined): Array<() => void>;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { UnitCapability } from '@dsh-workbench/shared/host';
|
|
2
|
+
import { type DependencyTarget, type SharedDependency } from './market-dependency';
|
|
3
|
+
export interface DependencyUpdateDeps {
|
|
4
|
+
readonly capabilityOf: (unit: string, force?: boolean) => Promise<UnitCapability>;
|
|
5
|
+
readonly runAll: (commands: readonly {
|
|
6
|
+
readonly line: string;
|
|
7
|
+
readonly optional?: true;
|
|
8
|
+
}[]) => Promise<void>;
|
|
9
|
+
readonly snapshot: () => Promise<readonly SharedDependency[]>;
|
|
10
|
+
readonly logger?: {
|
|
11
|
+
info?(message: string): void;
|
|
12
|
+
warn?(message: string): void;
|
|
13
|
+
} | undefined;
|
|
14
|
+
}
|
|
15
|
+
export declare function updateDependencyRow(target: DependencyTarget, deps: DependencyUpdateDeps): Promise<readonly SharedDependency[]>;
|
|
@@ -1,13 +1,11 @@
|
|
|
1
|
-
import type { UnitCapability } from '
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
import { type PluginSourceCommand, type PluginSourceProblem } from '@dsh-workbench/shared/host';
|
|
5
|
-
export type DependencyKind = 'plugin' | 'lib';
|
|
1
|
+
import type { NeedState, ProvisionProblem, SupplySource, UnitCapability, UnitManifest } from '@dsh-workbench/shared/host';
|
|
2
|
+
export declare const DEPENDENCY_KINDS: readonly ["extension", "lib"];
|
|
3
|
+
export type DependencyKind = (typeof DEPENDENCY_KINDS)[number];
|
|
6
4
|
export interface SharedDependency {
|
|
7
5
|
readonly id: string;
|
|
8
6
|
readonly kind: DependencyKind;
|
|
9
7
|
readonly name: string;
|
|
10
|
-
readonly status: '
|
|
8
|
+
readonly status: NeedState['status'];
|
|
11
9
|
readonly installed?: string;
|
|
12
10
|
readonly latest?: string;
|
|
13
11
|
readonly purpose?: string;
|
|
@@ -19,6 +17,8 @@ export interface DependencyTarget {
|
|
|
19
17
|
readonly name: string;
|
|
20
18
|
readonly declarers: readonly UnitManifest[];
|
|
21
19
|
readonly users: readonly UnitManifest[];
|
|
20
|
+
readonly sources?: readonly SupplySource[];
|
|
21
|
+
readonly conflict?: string;
|
|
22
22
|
}
|
|
23
23
|
export declare function dependencyId(kind: DependencyKind, name: string): string;
|
|
24
24
|
export declare function parseDependencyId(id: string): {
|
|
@@ -26,17 +26,22 @@ export declare function parseDependencyId(id: string): {
|
|
|
26
26
|
readonly name: string;
|
|
27
27
|
} | undefined;
|
|
28
28
|
export declare function findDependency(manifests: readonly UnitManifest[], id: string, isReleased?: ((unit: string) => boolean) | undefined): DependencyTarget | undefined;
|
|
29
|
-
export declare function affectedUnitsOf(manifests: readonly UnitManifest[], request:
|
|
29
|
+
export declare function affectedUnitsOf(manifests: readonly UnitManifest[], request: {
|
|
30
|
+
readonly id?: string | undefined;
|
|
31
|
+
readonly unit?: string | undefined;
|
|
32
|
+
}): readonly string[];
|
|
30
33
|
export declare function sharedDependencies(options: {
|
|
31
34
|
readonly manifests: readonly UnitManifest[];
|
|
32
35
|
readonly capabilities: ReadonlyMap<string, UnitCapability>;
|
|
33
36
|
readonly isReleased?: ((unit: string) => boolean) | undefined;
|
|
34
37
|
}): SharedDependency[];
|
|
35
|
-
export type DependencyPlan = readonly
|
|
38
|
+
export type DependencyPlan = readonly {
|
|
39
|
+
readonly line: string;
|
|
40
|
+
readonly optional?: true;
|
|
41
|
+
}[] | undefined;
|
|
36
42
|
export declare function dependencyCommandPlan(options: {
|
|
37
43
|
readonly target: DependencyTarget;
|
|
38
44
|
readonly capability: UnitCapability | undefined;
|
|
39
45
|
readonly capabilities?: ReadonlyMap<string, UnitCapability> | undefined;
|
|
40
|
-
readonly command: string;
|
|
41
46
|
}): DependencyPlan;
|
|
42
|
-
export declare function sourceProblemText(problem:
|
|
47
|
+
export declare function sourceProblemText(problem: ProvisionProblem, env: string | undefined): string;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import type { DshShell } from '@dsh-workbench/shared';
|
|
2
|
+
import type { ProfileModule } from '@dsh-workbench/shared/host';
|
|
3
|
+
import type { DiscoverDoc, DiscoverDocKind, DiscoverEntry, DiscoverFilter, DiscoverPayload } from '@dsh-workbench/shared/contract/protocol/market-index';
|
|
4
|
+
import type { MarketIndexReader } from '../../../shared/api/host/market-index-fetch';
|
|
5
|
+
import type { MarketDocReader } from '../../../shared/api/host/market-doc';
|
|
6
|
+
import type { MarketSourcesStore } from '../../../shared/api/host/market-sources-store';
|
|
7
|
+
export interface MarketDiscover {
|
|
8
|
+
snapshot(filter?: DiscoverFilter & {
|
|
9
|
+
readonly force?: boolean;
|
|
10
|
+
}): Promise<DiscoverPayload>;
|
|
11
|
+
document(name: string, version: string, kind: DiscoverDocKind): Promise<DiscoverDoc>;
|
|
12
|
+
}
|
|
13
|
+
export interface MarketDiscoverOptions {
|
|
14
|
+
readonly store: MarketSourcesStore;
|
|
15
|
+
readonly reader: MarketIndexReader;
|
|
16
|
+
readonly docs: MarketDocReader;
|
|
17
|
+
readonly modules: () => readonly ProfileModule[];
|
|
18
|
+
readonly defaultRegistry: () => Promise<string | undefined>;
|
|
19
|
+
readonly shell?: DshShell | undefined;
|
|
20
|
+
readonly shellVersion?: string | undefined;
|
|
21
|
+
readonly fetchImpl?: ((url: string, init: RequestInit) => Promise<Response>) | undefined;
|
|
22
|
+
readonly now?: (() => number) | undefined;
|
|
23
|
+
readonly peerTtlMs?: number | undefined;
|
|
24
|
+
readonly timeoutMs?: number | undefined;
|
|
25
|
+
readonly logger?: {
|
|
26
|
+
warn?(message: string): void;
|
|
27
|
+
} | undefined;
|
|
28
|
+
}
|
|
29
|
+
export declare function installTargetOf(entry: DiscoverEntry, version: string): {
|
|
30
|
+
readonly spec: string;
|
|
31
|
+
readonly registry?: string;
|
|
32
|
+
} | undefined;
|
|
33
|
+
export declare function createMarketDiscover(options: MarketDiscoverOptions): MarketDiscover;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { ProvisionRequest } from '@dsh-workbench/shared/host';
|
|
2
|
-
import type { BundleCancellation, BundleChange } from '../../../
|
|
3
|
-
import type { InstalledModule } from '
|
|
2
|
+
import type { BundleCancellation, BundleChange } from '../../../kernel/contract/bundle-install';
|
|
3
|
+
import type { InstalledModule } from '@dsh-workbench/shared/host';
|
|
4
4
|
import type { BundleSupply, MarketEntry, MarketService } from './market';
|
|
5
5
|
import type { PluginKept } from './plugin-actions';
|
|
6
6
|
import type { SharedDependency } from './market-dependency';
|
|
@@ -16,10 +16,11 @@ export type ProvisionResult = {
|
|
|
16
16
|
readonly shared: readonly SharedDependency[];
|
|
17
17
|
} | {
|
|
18
18
|
readonly ok: true;
|
|
19
|
-
readonly action: 'install-bundle' | 'update-bundle';
|
|
19
|
+
readonly action: 'install-bundle' | 'install-version' | 'update-bundle';
|
|
20
20
|
readonly change: BundleChange;
|
|
21
21
|
readonly module: InstalledModule;
|
|
22
22
|
readonly supply: BundleSupply;
|
|
23
|
+
readonly restored?: string;
|
|
23
24
|
} | {
|
|
24
25
|
readonly ok: true;
|
|
25
26
|
readonly action: 'remove-bundle';
|
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import type { UnitCapability } from '../../../shared/api/host/probe-units';
|
|
1
|
+
import type { Need, UnitCapability, UnitManifest } from '@dsh-workbench/shared/host';
|
|
3
2
|
import { type PluginReferences } from './plugin-actions';
|
|
4
3
|
import type { PluginLedger } from './plugin-ledger';
|
|
5
4
|
export interface EnvDropper {
|
|
6
5
|
usersOf(plugin: string, except?: string): string[];
|
|
7
|
-
drop(unit: string,
|
|
6
|
+
drop(unit: string, needs: readonly Need[] | undefined, before: UnitCapability): Promise<string[]>;
|
|
8
7
|
}
|
|
9
8
|
export declare function createEnvDropper(options: {
|
|
10
9
|
readonly catalog: () => readonly UnitManifest[];
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { BundleChange } from '../../../
|
|
2
|
-
import type { BundleManager } from '
|
|
3
|
-
import {
|
|
1
|
+
import type { BundleChange } from '../../../kernel/contract/bundle-install';
|
|
2
|
+
import type { BundleManager } from '@dsh-workbench/shared/host';
|
|
3
|
+
import type { RegistryNotebook } from '@dsh-workbench/shared/host';
|
|
4
4
|
export interface RegistryFixDeps {
|
|
5
5
|
readonly registries?: RegistryNotebook | undefined;
|
|
6
6
|
readonly logger?: {
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import type { BundleChange } from '../../../
|
|
1
|
+
import type { BundleChange } from '../../../kernel/contract/bundle-install';
|
|
2
2
|
export declare function restartLogLine(change: BundleChange | null | undefined): string | undefined;
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import type { DshShell } from '@dsh-workbench/shared';
|
|
2
2
|
import type { PluginSourceCommand } from '@dsh-workbench/shared/host';
|
|
3
|
-
import type { BundleChange } from '../../../
|
|
4
|
-
import type { BundleManager } from '
|
|
5
|
-
import type { InstalledModule } from '
|
|
3
|
+
import type { BundleChange } from '../../../kernel/contract/bundle-install';
|
|
4
|
+
import type { BundleManager } from '@dsh-workbench/shared/host';
|
|
5
|
+
import type { InstalledModule } from '@dsh-workbench/shared/host';
|
|
6
|
+
import { type SupplyPort } from '@dsh-workbench/shared/host';
|
|
6
7
|
import type { PluginLedger } from './plugin-ledger';
|
|
7
8
|
import type { BundleInstallOptions, BundleInstallOutcome, BundleSupply } from './market-types';
|
|
8
9
|
export interface BundleInstallDeps {
|
|
@@ -11,6 +12,7 @@ export interface BundleInstallDeps {
|
|
|
11
12
|
readonly registry?: string | undefined;
|
|
12
13
|
readonly command: string;
|
|
13
14
|
readonly shell?: DshShell | undefined;
|
|
15
|
+
readonly supply?: SupplyPort | undefined;
|
|
14
16
|
readonly manager: BundleManager;
|
|
15
17
|
readonly installed?: ((pkg: string) => InstalledModule) | undefined;
|
|
16
18
|
readonly logger?: {
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { MarketSourcesAction } from '@dsh-workbench/shared/contract/protocol/market-index';
|
|
2
|
+
import type { MarketSourceInitializer } from '../../../shared/api/host/market-source-init';
|
|
3
|
+
import type { MarketSourcesStore } from '../../../shared/api/host/market-sources-store';
|
|
4
|
+
export declare const MARKET_SOURCES_ACTION_RESOURCE = "market-sources";
|
|
5
|
+
export declare function parseMarketSourcesAction(payload: unknown): MarketSourcesAction;
|
|
6
|
+
export declare function marketSourcesAction(store: MarketSourcesStore, init?: MarketSourceInitializer | undefined): {
|
|
7
|
+
readonly resource: string;
|
|
8
|
+
handle(payload: unknown): Promise<unknown>;
|
|
9
|
+
};
|
|
@@ -1,23 +1,15 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { Need } from '@dsh-workbench/shared';
|
|
2
2
|
import type { ProvisionAction } from '@dsh-workbench/shared/host';
|
|
3
|
-
import type { BundleCancellation, BundleChange, BundleInstalledPlugin } from '../../../
|
|
4
|
-
import type { InstalledModule } from '
|
|
5
|
-
import type { UnitCapability } from '
|
|
3
|
+
import type { BundleCancellation, BundleChange, BundleInstalledPlugin } from '../../../kernel/contract/bundle-install';
|
|
4
|
+
import type { InstalledModule } from '@dsh-workbench/shared/host';
|
|
5
|
+
import type { UnitCapability } from '@dsh-workbench/shared/host';
|
|
6
6
|
import type { PluginUninstallOutcome, PluginUpdateOutcome } from './plugin-actions';
|
|
7
7
|
import type { SharedDependency } from './market-dependency';
|
|
8
8
|
export type MarketAction = ProvisionAction;
|
|
9
9
|
export interface MarketEntry {
|
|
10
10
|
readonly unit: string;
|
|
11
11
|
readonly titleKey: string;
|
|
12
|
-
readonly
|
|
13
|
-
readonly name: string;
|
|
14
|
-
readonly source?: PluginSource;
|
|
15
|
-
}[];
|
|
16
|
-
readonly libs: readonly {
|
|
17
|
-
readonly name: string;
|
|
18
|
-
readonly version?: string | undefined;
|
|
19
|
-
readonly purpose: string;
|
|
20
|
-
}[];
|
|
12
|
+
readonly needs: readonly Need[];
|
|
21
13
|
readonly capability: UnitCapability;
|
|
22
14
|
}
|
|
23
15
|
export interface UninstallResult {
|
|
@@ -48,6 +40,7 @@ export interface BundleInstallOutcome {
|
|
|
48
40
|
readonly module: InstalledModule;
|
|
49
41
|
readonly supply: BundleSupply;
|
|
50
42
|
readonly plugin?: BundleInstalledPlugin;
|
|
43
|
+
readonly restored?: string;
|
|
51
44
|
}
|
|
52
45
|
export interface BundleRemoveOutcome {
|
|
53
46
|
readonly change: BundleChange;
|
|
@@ -63,6 +56,7 @@ export interface MarketService {
|
|
|
63
56
|
uninstall(unit: string): Promise<UninstallResult>;
|
|
64
57
|
updateDependency(id: string): Promise<readonly SharedDependency[]>;
|
|
65
58
|
installBundle(spec: string, options?: BundleInstallOptions): Promise<BundleInstallOutcome>;
|
|
59
|
+
replaceBundle(spec: string, options?: BundleInstallOptions): Promise<BundleInstallOutcome>;
|
|
66
60
|
updateBundle(unit: string): Promise<BundleInstallOutcome | null>;
|
|
67
61
|
updateWorkbench(pkg: string): Promise<BundleInstallOutcome>;
|
|
68
62
|
removeBundle(pkg: string): Promise<BundleRemoveOutcome>;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { DshShell } from '@dsh-workbench/shared';
|
|
2
|
+
import type { BundleManager, SupplyPort } from '@dsh-workbench/shared/host';
|
|
3
|
+
import type { InstalledModule, ProfileModule } from '@dsh-workbench/shared/host';
|
|
4
|
+
import { type ReplaceBundleDeps } from './market-route';
|
|
5
|
+
import type { BundleInstallOutcome } from './market-types';
|
|
6
|
+
export interface BundleUpdateDeps {
|
|
7
|
+
readonly modules: (() => readonly ProfileModule[]) | undefined;
|
|
8
|
+
readonly installed: ((pkg: string) => InstalledModule) | undefined;
|
|
9
|
+
readonly shell: DshShell | undefined;
|
|
10
|
+
readonly manager: BundleManager;
|
|
11
|
+
readonly routeDeps: ReplaceBundleDeps;
|
|
12
|
+
readonly sweep: () => Promise<void>;
|
|
13
|
+
readonly refreshSupply: (unit: string) => Promise<void>;
|
|
14
|
+
readonly logger?: {
|
|
15
|
+
warn?(message: string): void;
|
|
16
|
+
} | undefined;
|
|
17
|
+
readonly supply?: SupplyPort | undefined;
|
|
18
|
+
}
|
|
19
|
+
export declare function updateModuleBundle(unit: string, deps: BundleUpdateDeps): Promise<BundleInstallOutcome | null>;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { BundleChange } from '../../../kernel/contract/bundle-install';
|
|
2
|
+
import type { InstalledModule } from '@dsh-workbench/shared/host';
|
|
3
|
+
import type { UnitCapability } from '@dsh-workbench/shared/host';
|
|
4
|
+
import type { DependencyTarget } from './market-dependency';
|
|
5
|
+
export declare function verifyBundleUpdate(input: {
|
|
6
|
+
readonly change: BundleChange;
|
|
7
|
+
readonly before: string | undefined;
|
|
8
|
+
readonly after: InstalledModule;
|
|
9
|
+
readonly restored?: string | undefined;
|
|
10
|
+
}): {
|
|
11
|
+
readonly change: BundleChange;
|
|
12
|
+
readonly restored?: string;
|
|
13
|
+
};
|
|
14
|
+
export declare function supplyUpdateStillBehind(after: UnitCapability): string | undefined;
|
|
15
|
+
export declare function dependencyStillBehind(target: DependencyTarget, capabilities: ReadonlyMap<string, UnitCapability>): string | undefined;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { DshShell } from '@dsh-workbench/shared';
|
|
2
|
-
import type { InstalledModule, ProfilePackage } from '
|
|
3
|
-
import {
|
|
2
|
+
import type { InstalledModule, ProfilePackage, SupplyPort } from '@dsh-workbench/shared/host';
|
|
3
|
+
import type { SelfUpdateRequest, SelfUpdateStart } from '@dsh-workbench/shared/host';
|
|
4
4
|
import type { BundleInstallOutcome } from './market-types';
|
|
5
5
|
export interface WorkbenchUpdateDeps {
|
|
6
6
|
readonly asked: string;
|
|
@@ -15,5 +15,6 @@ export interface WorkbenchUpdateDeps {
|
|
|
15
15
|
info?(message: string): void;
|
|
16
16
|
warn?(message: string): void;
|
|
17
17
|
} | undefined;
|
|
18
|
+
readonly supply?: SupplyPort | undefined;
|
|
18
19
|
}
|
|
19
20
|
export declare function updateWorkbenchOnce(deps: WorkbenchUpdateDeps): Promise<BundleInstallOutcome>;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import type { DshShell } from '@dsh-workbench/shared';
|
|
2
2
|
import type { UnitManifest } from '@dsh-workbench/shared';
|
|
3
|
-
import type { BundleManager } from '
|
|
4
|
-
import type { InstalledModule, ProfileModule, ProfilePackage } from '
|
|
5
|
-
import type { RegistryNotebook } from '
|
|
6
|
-
import type
|
|
7
|
-
import type { SelfUpdateRequest, SelfUpdateStart } from '
|
|
3
|
+
import type { BundleManager } from '@dsh-workbench/shared/host';
|
|
4
|
+
import type { InstalledModule, ProfileModule, ProfilePackage } from '@dsh-workbench/shared/host';
|
|
5
|
+
import type { RegistryNotebook } from '@dsh-workbench/shared/host';
|
|
6
|
+
import { type SupplyPort, type UnitMountDeps } from '@dsh-workbench/shared/host';
|
|
7
|
+
import type { SelfUpdateRequest, SelfUpdateStart } from '@dsh-workbench/shared/host';
|
|
8
8
|
import { type PluginReferences } from './plugin-actions';
|
|
9
9
|
import type { PluginLedger } from './plugin-ledger';
|
|
10
10
|
import type { MarketService } from './market-types';
|
|
@@ -33,4 +33,5 @@ export declare function createMarketService(options: {
|
|
|
33
33
|
info?(message: string): void;
|
|
34
34
|
warn?(message: string): void;
|
|
35
35
|
} | undefined;
|
|
36
|
+
supply?: SupplyPort | undefined;
|
|
36
37
|
}): MarketService;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { DshShell } from '@dsh-workbench/shared';
|
|
2
|
-
import { type PluginSourceCommand } from '@dsh-workbench/shared/host';
|
|
2
|
+
import { type PluginSourceCommand, type SupplyPort } from '@dsh-workbench/shared/host';
|
|
3
3
|
import type { PluginLedger } from './plugin-ledger';
|
|
4
4
|
export type PluginKept = {
|
|
5
5
|
readonly kind: 'held';
|
|
@@ -47,4 +47,5 @@ export declare function createPluginActions(options: {
|
|
|
47
47
|
info?(message: string): void;
|
|
48
48
|
warn?(message: string): void;
|
|
49
49
|
} | undefined;
|
|
50
|
+
readonly supply?: SupplyPort | undefined;
|
|
50
51
|
}): PluginActions;
|
|
@@ -1,13 +1,15 @@
|
|
|
1
1
|
import type { DshShell } from '@dsh-workbench/shared';
|
|
2
|
-
import { type RouteTable } from '@dsh-workbench/shared/host';
|
|
2
|
+
import { type RouteTable, type SupplyPort } from '@dsh-workbench/shared/host';
|
|
3
3
|
import type { InstalledPlugin } from '../../../shared/api/installed-plugins';
|
|
4
4
|
import type { PluginLedger } from './plugin-ledger';
|
|
5
5
|
export declare function installedPlugins(options: {
|
|
6
6
|
readonly ledger: PluginLedger;
|
|
7
7
|
readonly shell?: DshShell | undefined;
|
|
8
8
|
readonly force?: boolean;
|
|
9
|
+
readonly supply?: SupplyPort | undefined;
|
|
9
10
|
}): Promise<readonly InstalledPlugin[]>;
|
|
10
11
|
export declare function pluginRoutes(options: {
|
|
11
12
|
readonly ledger: PluginLedger;
|
|
12
13
|
readonly shell?: DshShell | undefined;
|
|
14
|
+
readonly supply?: SupplyPort | undefined;
|
|
13
15
|
}): RouteTable;
|
|
@@ -14,13 +14,14 @@ export declare const MODULES_UPDATE_DEPENDENCY_TOOL = "workbench_modules_update_
|
|
|
14
14
|
export declare const MODULES_UPDATE_PLUGIN_TOOL = "workbench_modules_update_plugin";
|
|
15
15
|
export declare const MODULES_UNINSTALL_PLUGIN_TOOL = "workbench_modules_uninstall_plugin";
|
|
16
16
|
export declare const MODULES_UPDATE_WORKBENCH_TOOL = "workbench_modules_update_workbench";
|
|
17
|
-
export declare const DIY_LIST_TOOL = "workbench_diy_list";
|
|
18
17
|
export declare const DIY_STATUS_TOOL = "workbench_diy_status";
|
|
19
18
|
export declare const DIY_PANEL_TOOL = "workbench_diy_panel";
|
|
20
19
|
export declare const DIY_COMPONENTS_TOOL = "workbench_diy_components";
|
|
21
20
|
export declare const DIY_RECON_TOOL = "workbench_diy_recon";
|
|
22
21
|
export declare const DIY_SPEC_TOOL = "workbench_diy_spec";
|
|
22
|
+
export declare const DIY_CHANGELOG_TOOL = "workbench_diy_changelog";
|
|
23
23
|
export declare const DIY_INSTALL_TOOL = "workbench_diy_install";
|
|
24
|
+
export declare const DIY_PUBLISH_TOOL = "workbench_diy_publish";
|
|
24
25
|
export declare const DIY_SHOW_TOOL = "workbench_diy_show";
|
|
25
26
|
export declare const DIY_STATE_TOOL = "workbench_diy_state";
|
|
26
27
|
export declare const DIY_HTML_TOOL = "workbench_diy_html";
|
|
@@ -49,11 +50,13 @@ export declare const DIY_DEBUG_START_TOOL = "workbench_diy_debug_start";
|
|
|
49
50
|
export declare const DIY_DEBUG_PAUSE_TOOL = "workbench_diy_debug_pause";
|
|
50
51
|
export declare const DIY_DEBUG_RESUME_TOOL = "workbench_diy_debug_resume";
|
|
51
52
|
export declare const DIY_DEBUG_STOP_TOOL = "workbench_diy_debug_stop";
|
|
52
|
-
export declare const ALL_TOOLS: readonly ["workbench_panels_list", "workbench_panels_show", "workbench_panels_hide", "workbench_panels_move", "workbench_panels_reset", "workbench_panels_follow", "workbench_modules_list", "workbench_modules_install", "workbench_modules_update", "workbench_modules_uninstall", "workbench_modules_install_bundle", "workbench_modules_update_dependency", "workbench_modules_update_plugin", "workbench_modules_uninstall_plugin", "workbench_modules_update_workbench", "
|
|
53
|
+
export declare const ALL_TOOLS: readonly ["workbench_panels_list", "workbench_panels_show", "workbench_panels_hide", "workbench_panels_move", "workbench_panels_reset", "workbench_panels_follow", "workbench_modules_list", "workbench_modules_install", "workbench_modules_update", "workbench_modules_uninstall", "workbench_modules_install_bundle", "workbench_modules_update_dependency", "workbench_modules_update_plugin", "workbench_modules_uninstall_plugin", "workbench_modules_update_workbench", "workbench_diy_status", "workbench_diy_panel", "workbench_diy_components", "workbench_diy_recon", "workbench_diy_spec", "workbench_diy_changelog", "workbench_diy_install", "workbench_diy_publish", "workbench_diy_show", "workbench_diy_state", "workbench_diy_html", "workbench_diy_find", "workbench_diy_click", "workbench_diy_hover", "workbench_diy_type", "workbench_diy_fill", "workbench_diy_keys", "workbench_diy_scroll", "workbench_diy_wait", "workbench_diy_eval", "workbench_diy_screenshot", "workbench_diy_network", "workbench_diy_dialog", "workbench_diy_logs_watch", "workbench_diy_logs_read", "workbench_diy_logs_stop", "workbench_diy_record_prepare", "workbench_diy_record_read", "workbench_diy_record_detail", "workbench_diy_record_stop", "workbench_diy_debug_start", "workbench_diy_debug_pause", "workbench_diy_debug_resume", "workbench_diy_debug_stop", "workbench_long_tasks_list", "workbench_long_tasks_stop"];
|
|
53
54
|
export type PanelsToolName = (typeof ALL_TOOLS)[number];
|
|
54
|
-
export declare const READ_TOOLS: readonly ["workbench_panels_list", "workbench_modules_list", "
|
|
55
|
-
export declare const WRITE_TOOLS: readonly ["workbench_panels_show", "workbench_panels_hide", "workbench_panels_move", "workbench_panels_reset", "workbench_panels_follow", "workbench_modules_install", "workbench_modules_update", "workbench_modules_uninstall", "workbench_modules_install_bundle", "workbench_modules_update_dependency", "workbench_modules_update_plugin", "workbench_modules_uninstall_plugin", "workbench_modules_update_workbench", "workbench_diy_install", "workbench_diy_show", "workbench_diy_record_prepare", "workbench_diy_debug_start", "workbench_diy_debug_pause", "workbench_diy_debug_resume", "workbench_diy_debug_stop", "workbench_long_tasks_stop"];
|
|
56
|
-
export declare const DIY_TOOLS: readonly ["
|
|
55
|
+
export declare const READ_TOOLS: readonly ["workbench_panels_list", "workbench_modules_list", "workbench_diy_status", "workbench_diy_panel", "workbench_diy_components", "workbench_diy_recon", "workbench_diy_spec", "workbench_diy_state", "workbench_diy_html", "workbench_diy_find", "workbench_diy_click", "workbench_diy_hover", "workbench_diy_type", "workbench_diy_fill", "workbench_diy_keys", "workbench_diy_scroll", "workbench_diy_wait", "workbench_diy_eval", "workbench_diy_screenshot", "workbench_diy_network", "workbench_diy_dialog", "workbench_diy_logs_watch", "workbench_diy_logs_read", "workbench_diy_logs_stop", "workbench_diy_record_read", "workbench_diy_record_detail", "workbench_diy_record_stop", "workbench_long_tasks_list"];
|
|
56
|
+
export declare const WRITE_TOOLS: readonly ["workbench_panels_show", "workbench_panels_hide", "workbench_panels_move", "workbench_panels_reset", "workbench_panels_follow", "workbench_modules_install", "workbench_modules_update", "workbench_modules_uninstall", "workbench_modules_install_bundle", "workbench_modules_update_dependency", "workbench_modules_update_plugin", "workbench_modules_uninstall_plugin", "workbench_modules_update_workbench", "workbench_diy_changelog", "workbench_diy_install", "workbench_diy_publish", "workbench_diy_show", "workbench_diy_record_prepare", "workbench_diy_debug_start", "workbench_diy_debug_pause", "workbench_diy_debug_resume", "workbench_diy_debug_stop", "workbench_long_tasks_stop"];
|
|
57
|
+
export declare const DIY_TOOLS: readonly ["workbench_diy_status", "workbench_diy_panel", "workbench_diy_components", "workbench_diy_recon", "workbench_diy_spec", "workbench_diy_changelog", "workbench_diy_install", "workbench_diy_publish", "workbench_diy_show", "workbench_diy_state", "workbench_diy_html", "workbench_diy_find", "workbench_diy_click", "workbench_diy_hover", "workbench_diy_type", "workbench_diy_fill", "workbench_diy_keys", "workbench_diy_scroll", "workbench_diy_wait", "workbench_diy_eval", "workbench_diy_screenshot", "workbench_diy_network", "workbench_diy_dialog", "workbench_diy_logs_watch", "workbench_diy_logs_read", "workbench_diy_logs_stop"];
|
|
57
58
|
export declare const DIY_RECORD_TOOLS: readonly ["workbench_diy_record_prepare", "workbench_diy_record_read", "workbench_diy_record_detail", "workbench_diy_record_stop"];
|
|
58
59
|
export declare const DIY_DEBUG_TOOLS: readonly ["workbench_diy_debug_start", "workbench_diy_debug_pause", "workbench_diy_debug_resume", "workbench_diy_debug_stop"];
|
|
60
|
+
export declare const DIY_LOGS_TOOLS: readonly ["workbench_diy_logs_watch", "workbench_diy_logs_read", "workbench_diy_logs_stop"];
|
|
61
|
+
export declare function screenOnlyToolsFor(pageDebug: boolean): readonly PanelsToolName[];
|
|
59
62
|
export declare const panelsUnit: UnitManifest;
|
|
@@ -1,25 +1,14 @@
|
|
|
1
1
|
import type { SessionStatusSnapshot, SessionSummary, SessionsSnapshot, Translate, WorkspaceView } from '@dsh-workbench/shared';
|
|
2
2
|
export type AttentionSeverity = 'warning' | 'ongoing' | 'done';
|
|
3
|
-
/**
|
|
4
|
-
* 一个工作区那颗状态点:`count` 是**会话**条数(照旧,长任务没有会话可归时它是 0);
|
|
5
|
-
* `longTask` 为真表示这一档说的是长任务而不是会话 —— 只改那句人话的措辞。
|
|
6
|
-
*/
|
|
7
3
|
export interface WorkspaceAttention {
|
|
8
4
|
readonly severity: AttentionSeverity;
|
|
9
5
|
readonly count: number;
|
|
10
6
|
readonly longTask?: boolean | undefined;
|
|
11
7
|
}
|
|
12
|
-
/** 还在跑的长任务按两边归:会话行那颗 loading 点看 `bySession`,项目下拉每一行看 `byWorkspace`(按工作区路径数条数)。 */
|
|
13
8
|
export interface LongTaskPresence {
|
|
14
9
|
readonly bySession: ReadonlySet<string>;
|
|
15
10
|
readonly byWorkspace: ReadonlyMap<string, number>;
|
|
16
11
|
}
|
|
17
|
-
/**
|
|
18
|
-
* 把外壳那条长任务读口交回的行折成两侧的归属:有会话可归的进 `bySession`(那一行自己亮),
|
|
19
|
-
* 每一条都按它属于哪个工作区进 `byWorkspace`(没有会话可归的那些只有这一侧看得见)。
|
|
20
|
-
* @param rows 还在跑的长任务;每行要有它属于哪个工作区,会话那格可以没有。
|
|
21
|
-
* @returns 两侧的归属;空输入就是两侧都空。
|
|
22
|
-
*/
|
|
23
12
|
export declare function longTaskPresenceOf(rows: readonly {
|
|
24
13
|
readonly workspace: string;
|
|
25
14
|
readonly session?: string | undefined;
|
|
@@ -17,16 +17,6 @@ export interface SessionStatusDot {
|
|
|
17
17
|
readonly trailingLabel?: string;
|
|
18
18
|
}
|
|
19
19
|
export declare function visiblePendingKind(kind: string | undefined): string | undefined;
|
|
20
|
-
/**
|
|
21
|
-
* 把一条会话读成行上要的那几格。
|
|
22
|
-
* @param summary 会话摘要。
|
|
23
|
-
* @param statusById 会话状态表。
|
|
24
|
-
* @param list 会话快照(子代理花名册在这里)。
|
|
25
|
-
* @param pinnedIds 置顶的那些。
|
|
26
|
-
* @param archivedIds 归档的那些。
|
|
27
|
-
* @param longTaskIds 有长任务在跑的那些会话(外壳那条读口按“这趟是谁起的”算出来的);不给就是都没有。
|
|
28
|
-
* @returns 行模型;`longTask` 为真表示这条会话起的某趟长任务还在跑(它自己那一轮可能早结束了)。
|
|
29
|
-
*/
|
|
30
20
|
export declare function sessionNode(summary: SessionSummary, statusById: SessionStatusSnapshot, list: SessionsSnapshot, pinnedIds: ReadonlySet<string>, archivedIds: ReadonlySet<string>, longTaskIds?: ReadonlySet<string>): SessionNode;
|
|
31
21
|
export declare function sessionStatuses(node: SessionNode, t: Translate): SessionStatusDot[];
|
|
32
22
|
export declare function currentSessionId(list: SessionsSnapshot, panelActive: boolean): string | undefined;
|
|
@@ -1,9 +1,11 @@
|
|
|
1
|
-
export
|
|
2
|
-
export declare const WORKSHOP_RELATIVE = "workbench/diy";
|
|
3
|
-
export declare const WORKSHOP_TITLE = "\u5DE5\u4F5C\u53F0DIY";
|
|
4
|
-
export declare const WORKSHOP_PAST_TITLES: readonly string[];
|
|
1
|
+
export { DIY_PRESET_ID, WORKSHOP_PAST_TITLES, WORKSHOP_RELATIVE, WORKSHOP_TITLE } from '../../kernel/contract/diy';
|
|
5
2
|
export declare function isWorkshopPath(path: string): boolean;
|
|
6
3
|
export interface DiyStartOptions {
|
|
7
4
|
readonly agentPreset: string;
|
|
8
5
|
}
|
|
9
6
|
export declare function diyStartOptions(workspaceId: string, workshopId: string | undefined): DiyStartOptions | undefined;
|
|
7
|
+
export declare function workshopPresetUpgrade(input: {
|
|
8
|
+
readonly workshop: boolean;
|
|
9
|
+
readonly blank: boolean;
|
|
10
|
+
readonly preset: unknown;
|
|
11
|
+
}): string | undefined;
|
|
@@ -1,16 +1,7 @@
|
|
|
1
1
|
import type { DshToolRunContext } from '@dsh-workbench/shared';
|
|
2
2
|
import { type ApprovalCall } from '@dsh-workbench/shared/host';
|
|
3
|
-
/**
|
|
4
|
-
* 审批那一拍看到的这次工具调用:工具名 / 实参 / 所在工作区 / 发起的会话。
|
|
5
|
-
*/
|
|
6
3
|
export interface ApprovalExec {
|
|
7
4
|
readonly arguments?: unknown;
|
|
8
5
|
readonly agent?: DshToolRunContext['agent'];
|
|
9
6
|
}
|
|
10
|
-
/**
|
|
11
|
-
* 把 dsh 交来的那次工具调用折成审批策略要看的那份 call:工作区与发起会话都从 `exec` 现取,取不到就不写那个键。
|
|
12
|
-
* @param exec dsh 交来的执行上下文;没有就只有实参这一格。
|
|
13
|
-
* @param name 工具名;`undefined` = 这次调用没名字,不写这个键。
|
|
14
|
-
* @returns 交给 `approvalFor` 的 `ApprovalCall`。
|
|
15
|
-
*/
|
|
16
7
|
export declare function approvalCallOf(exec: ApprovalExec | undefined, name: string | undefined): ApprovalCall;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import type { DshHostContext, DshToolRunContext } from '@dsh-workbench/shared';
|
|
2
|
+
import { type ToolUnit, type UnitMountResult } from '@dsh-workbench/shared/host';
|
|
3
|
+
export interface ApprovalGateExec {
|
|
4
|
+
readonly name?: string;
|
|
5
|
+
readonly arguments?: unknown;
|
|
6
|
+
readonly agent?: DshToolRunContext['agent'];
|
|
7
|
+
}
|
|
8
|
+
export type ApprovalGateDecision = {
|
|
9
|
+
readonly kind: 'allow';
|
|
10
|
+
} | {
|
|
11
|
+
readonly kind: 'deny';
|
|
12
|
+
readonly reason: string;
|
|
13
|
+
} | {
|
|
14
|
+
readonly kind: 'cancel';
|
|
15
|
+
} | {
|
|
16
|
+
readonly kind: 'ask';
|
|
17
|
+
readonly reason?: string;
|
|
18
|
+
readonly displayReason?: Record<string, string>;
|
|
19
|
+
};
|
|
20
|
+
export interface ApprovalGateDeps {
|
|
21
|
+
readonly ctx: DshHostContext;
|
|
22
|
+
readonly toolOf: (name: string) => ToolUnit | undefined;
|
|
23
|
+
readonly faceOf: (unit: string) => UnitMountResult | undefined;
|
|
24
|
+
readonly declaredNotes: () => ReadonlySet<string>;
|
|
25
|
+
}
|
|
26
|
+
export declare function createApprovalGate(deps: ApprovalGateDeps): (exec: ApprovalGateExec, next: () => Promise<ApprovalGateDecision>) => Promise<ApprovalGateDecision>;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import type { DshHostContext, DshShell } from '@dsh-workbench/shared';
|
|
2
2
|
import { type RouteHandler } from '@dsh-workbench/shared/host';
|
|
3
|
+
import { type WorkbenchSelfUpdate } from '../../../kernel/contract/bundle-install';
|
|
3
4
|
export declare function bundleRegistriesHandler(ctx: DshHostContext): RouteHandler;
|
|
4
5
|
export declare function resetRefusalLog(): void;
|
|
5
6
|
export declare function resetHoldLog(): void;
|
|
6
|
-
export declare function moduleVersionsHandler(ctx: DshHostContext, shell: DshShell | undefined, running?: string | undefined): RouteHandler;
|
|
7
|
+
export declare function moduleVersionsHandler(ctx: DshHostContext, shell: DshShell | undefined, running?: string | undefined, selfUpdate?: (() => WorkbenchSelfUpdate | undefined) | undefined): RouteHandler;
|
|
7
8
|
export declare function bundleInspectHandler(ctx: DshHostContext): RouteHandler;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { ChangelogKind } from '@dsh-workbench/shared/host';
|
|
2
|
+
export interface ChangelogWrite {
|
|
3
|
+
readonly file: string;
|
|
4
|
+
readonly section: string;
|
|
5
|
+
readonly text: string;
|
|
6
|
+
}
|
|
7
|
+
export declare function moduleVersionOf(dir: string): string;
|
|
8
|
+
export declare function writeChangelogEntry(dir: string, input: {
|
|
9
|
+
readonly version: string;
|
|
10
|
+
readonly kind: ChangelogKind;
|
|
11
|
+
readonly note: string;
|
|
12
|
+
readonly date?: string;
|
|
13
|
+
}): ChangelogWrite;
|
|
@@ -6,7 +6,7 @@ export declare const NEAR_LIMIT = 8;
|
|
|
6
6
|
export declare const PRUNE_CHARS = 8192;
|
|
7
7
|
export declare const PRIMITIVES_PKG = "@deepseek-ai/dsh-client-ui-primitives";
|
|
8
8
|
export declare const MANIFEST_TAIL = "//# sourceMappingURL=";
|
|
9
|
-
export type SurfaceScope = 'all' | 'primitives' | 'kit';
|
|
9
|
+
export type SurfaceScope = 'all' | 'primitives' | 'kit' | 'tokens';
|
|
10
10
|
export interface SurfacePayload {
|
|
11
11
|
readonly [key: string]: unknown;
|
|
12
12
|
}
|
|
@@ -32,7 +32,6 @@ export declare function findFileOf(name: string, query: SurfaceQuery): {
|
|
|
32
32
|
} | null;
|
|
33
33
|
export declare function excerptOf(text: string, maxLines?: number): string;
|
|
34
34
|
export declare function excerptAt(file: string, maxLines?: number): string;
|
|
35
|
-
/** 指引目录:从宿主产物往上找 `skills/workbench-module-diy`(找不到回 `null`)。 */
|
|
36
35
|
export declare function skillDirOf(from: string): string | null;
|
|
37
36
|
export declare function byLocationOf(payload: SurfacePayload): readonly {
|
|
38
37
|
readonly where: string;
|
|
@@ -49,7 +48,7 @@ export declare function bucketNamesOf(query: SurfaceQuery): readonly {
|
|
|
49
48
|
readonly face: 'kit' | 'primitives';
|
|
50
49
|
readonly keys: readonly string[];
|
|
51
50
|
}[];
|
|
52
|
-
export declare const TWO_FACE_ALL = "\u26A0\uFE0F \
|
|
51
|
+
export declare const TWO_FACE_ALL = "\u26A0\uFE0F \u8981\u5168\u8868\u5C31\u6307\u540D\u4E00\u9762\uFF1Ascope=kit / primitives / tokens\u3002";
|
|
53
52
|
export declare function refusesEvery(scope: SurfaceScope, all: boolean, focused: boolean): boolean;
|
|
54
53
|
export declare function renderSurfaceText(query: SurfaceQuery, options: {
|
|
55
54
|
scope: SurfaceScope;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
export interface DiyModule {
|
|
2
|
+
readonly unit: string;
|
|
3
|
+
readonly name: string;
|
|
4
|
+
readonly description: string;
|
|
5
|
+
readonly dir: string;
|
|
6
|
+
readonly installed: boolean;
|
|
7
|
+
}
|
|
8
|
+
export declare function insideRoot(root: string, target: string): boolean;
|
|
9
|
+
export type WorkspaceShape = 'workspace' | 'package' | 'bare';
|
|
10
|
+
export declare function shapeOf(root: string): WorkspaceShape;
|
|
11
|
+
export declare function modulesIn(root: string, installed?: readonly string[]): readonly DiyModule[];
|
|
12
|
+
export declare function readDesignOfModule(dir: string): unknown;
|
|
13
|
+
export interface SyncState {
|
|
14
|
+
readonly state: 'ok' | 'syncing' | 'failed';
|
|
15
|
+
readonly version: string;
|
|
16
|
+
readonly at: string;
|
|
17
|
+
readonly reason?: string;
|
|
18
|
+
}
|
|
19
|
+
export declare function syncStateOf(workspaceRoot: string): SyncState | undefined;
|
|
20
|
+
export interface Toolchain {
|
|
21
|
+
readonly core: string;
|
|
22
|
+
readonly moduleTools: string;
|
|
23
|
+
readonly shared: string;
|
|
24
|
+
}
|
|
25
|
+
export declare function toolchainOf(workspaceRoot: string): Toolchain | undefined;
|