@dsh-workbench/core 1.1.4 → 1.1.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (32) hide show
  1. package/client.js +945 -341
  2. package/dist/client/client.body.js +945 -341
  3. package/dist/client/index.js +807 -203
  4. package/dist/host/index.js +540 -108
  5. package/dist/types/app/layouts/approval-detail.d.ts +6 -3
  6. package/dist/types/app/layouts/market/add-module-registry-prefs.d.ts +11 -0
  7. package/dist/types/app/layouts/market/market-check.d.ts +3 -1
  8. package/dist/types/app/layouts/rightbar/AskAgentButton.d.ts +6 -0
  9. package/dist/types/app/layouts/rightbar/FailureCard.d.ts +8 -0
  10. package/dist/types/app/layouts/rightbar/MarketView.d.ts +2 -1
  11. package/dist/types/app/layouts/rightbar/SharedSection.d.ts +5 -2
  12. package/dist/types/app/layouts/rightbar/failure-card-text.d.ts +14 -0
  13. package/dist/types/app/layouts/rightbar/market-act.d.ts +2 -5
  14. package/dist/types/app/layouts/rightbar/market-change.d.ts +1 -0
  15. package/dist/types/app/layouts/rightbar/market-hint.d.ts +2 -0
  16. package/dist/types/app/layouts/rightbar/market-install.d.ts +11 -0
  17. package/dist/types/app/layouts/rightbar/market-row-types.d.ts +7 -1
  18. package/dist/types/app/layouts/rightbar/market-rows.d.ts +12 -1
  19. package/dist/types/app/layouts/rightbar/market-section.d.ts +5 -3
  20. package/dist/types/app/layouts/rightbar/market-transient-state.d.ts +3 -8
  21. package/dist/types/app/layouts/rightbar/market-view-text.d.ts +2 -0
  22. package/dist/types/kernel/client/registry.d.ts +1 -0
  23. package/dist/types/kernel/contract/bundle-install.d.ts +1 -1
  24. package/dist/types/modules/panels/model/market-install-error.d.ts +3 -0
  25. package/dist/types/modules/panels/model/market-install-error.test.d.ts +1 -0
  26. package/dist/types/modules/panels/model/market-registry.d.ts +2 -1
  27. package/dist/types/modules/panels/model/market-remove.d.ts +13 -0
  28. package/dist/types/modules/panels/model/market-remove.test.d.ts +1 -0
  29. package/dist/types/modules/panels/model/market-route.d.ts +1 -1
  30. package/dist/types/modules/panels/model/market.d.ts +1 -0
  31. package/package.json +3 -3
  32. package/skills/workbench-module-diy/TOOLS.md +11 -2
@@ -1,4 +1,4 @@
1
- import type { ApprovalInput, ReactNode, Translate } from '@dsh-workbench/shared';
1
+ import type { ApprovalInput, ReactNode, Translate, UnitManifest, UnitToolOpencli } from '@dsh-workbench/shared';
2
2
  import type { MarketSourcesPayload, PublishPreview } from '../../kernel/contract/market-index';
3
3
  export interface ApprovalRow {
4
4
  readonly label: string;
@@ -12,6 +12,9 @@ export interface ApprovalPlanView {
12
12
  readonly warn?: string | undefined;
13
13
  }
14
14
  export declare function marketSourceRows(tool: string, args: Readonly<Record<string, unknown>>, payload: MarketSourcesPayload | null | undefined, t: Translate): readonly ApprovalRow[];
15
+ export declare function pluginToolIndexOf(manifests: readonly UnitManifest[]): ReadonlyMap<string, UnitToolOpencli>;
16
+ export declare function pluginApprovalRows(origin: UnitToolOpencli, args: Readonly<Record<string, unknown>>, t: Translate): readonly ApprovalRow[];
17
+ export declare function shellApprovalRenderer(manifests: () => readonly UnitManifest[]): (input: ApprovalInput, t: Translate) => ReactNode;
15
18
  export declare function shellClaimsApprovalDetail(tool: string): boolean;
16
- export declare function shellApprovalPlan(input: ApprovalInput, t: Translate): ApprovalPlanView | undefined;
17
- export declare function shellApprovalDetail(input: ApprovalInput, t: Translate): ReactNode;
19
+ export declare function shellApprovalPlan(input: ApprovalInput, t: Translate, pluginTools?: ReadonlyMap<string, UnitToolOpencli> | undefined): ApprovalPlanView | undefined;
20
+ export declare function shellApprovalDetail(input: ApprovalInput, t: Translate, pluginTools?: ReadonlyMap<string, UnitToolOpencli> | undefined): ReactNode;
@@ -0,0 +1,11 @@
1
+ import { type RegistryChoice, type RegistryOption } from './add-module-text';
2
+ export interface RegistryPrefs {
3
+ readonly choice: RegistryChoice;
4
+ readonly custom: string;
5
+ }
6
+ export declare const DEFAULT_REGISTRY_CHOICE: RegistryChoice;
7
+ export declare function parseRegistryChoice(raw: string | null): RegistryChoice;
8
+ export declare function readRegistryPrefs(): RegistryPrefs;
9
+ export declare function writeRegistryChoice(choice: RegistryChoice): void;
10
+ export declare function writeRegistryCustom(value: string): void;
11
+ export declare function reconcileRegistryChoice(choice: RegistryChoice, choices: readonly RegistryOption[]): RegistryChoice;
@@ -1,10 +1,12 @@
1
1
  import type { Translate } from '@dsh-workbench/shared';
2
+ import type { LatestCheckSummary } from '../rightbar/market-rows';
2
3
  export interface MarketCheckProps {
3
4
  readonly t: Translate;
4
5
  readonly checkedAt: number | null;
6
+ readonly latestCheck?: LatestCheckSummary | undefined;
5
7
  readonly checking: boolean;
6
8
  readonly failed: boolean;
7
9
  readonly disabled: boolean;
8
10
  readonly onCheck: () => void;
9
11
  }
10
- export declare function MarketCheck({ t, checkedAt, checking, failed, disabled, onCheck }: MarketCheckProps): JSX.Element;
12
+ export declare function MarketCheck({ t, checkedAt, latestCheck, checking, failed, disabled, onCheck, }: MarketCheckProps): JSX.Element;
@@ -0,0 +1,6 @@
1
+ import type { Translate } from '@dsh-workbench/shared';
2
+ export declare function AskAgentButton({ t, text, label, }: {
3
+ readonly t: Translate;
4
+ readonly text: string;
5
+ readonly label: string;
6
+ }): JSX.Element;
@@ -0,0 +1,8 @@
1
+ import type { Translate } from '@dsh-workbench/shared';
2
+ import type { InstallFailure } from '@dsh-workbench/shared';
3
+ export declare function FailureCard({ t, failure, onRecheck, rechecking, }: {
4
+ readonly t: Translate;
5
+ readonly failure: InstallFailure;
6
+ readonly onRecheck: () => void;
7
+ readonly rechecking: boolean;
8
+ }): JSX.Element;
@@ -28,8 +28,9 @@ export interface MarketViewProps {
28
28
  readonly selfUpdate?: WorkbenchSelfUpdate | null | undefined;
29
29
  readonly plugins?: readonly InstalledPlugin[] | null | undefined;
30
30
  readonly settling?: ReadonlySet<string> | undefined;
31
+ readonly installing?: boolean | undefined;
31
32
  readonly mock?: MarketMock | undefined;
32
33
  readonly defaults?: readonly string[] | undefined;
33
34
  readonly changed?: Readonly<Record<string, number>> | undefined;
34
35
  }
35
- export declare function MarketView({ t, titleOf, manifests, installable, capabilities, freshness, onChanged, onPending, updates, updatesCheckedAt, updatesFailed, installed, installedRead, workbench, selfUpdate, plugins, settling, mock, defaults, changed, }: MarketViewProps): JSX.Element;
36
+ export declare function MarketView({ t, titleOf, manifests, installable, capabilities, freshness, onChanged, onPending, updates, updatesCheckedAt, updatesFailed, installed, installedRead, workbench, selfUpdate, plugins, settling, installing, mock, defaults, changed, }: MarketViewProps): JSX.Element;
@@ -1,11 +1,14 @@
1
1
  import type { Translate } from '@dsh-workbench/shared';
2
2
  import { type SharedRow } from './market-rows';
3
+ import type { MarketFailure } from './market-row-types';
3
4
  import { type Pending } from './market-view-text';
4
5
  import type { MarketRowAction } from './market-rows';
5
- export declare function SharedSection({ t, rows, pending, failureOf, act, }: {
6
+ export declare function SharedSection({ t, rows, pending, failureOf, act, onRecheck, rechecking, }: {
6
7
  readonly t: Translate;
7
8
  readonly rows: readonly SharedRow[];
8
9
  readonly pending: Pending | null;
9
- readonly failureOf: (id: string) => string | null;
10
+ readonly failureOf: (id: string) => MarketFailure | null;
10
11
  readonly act: (id: string, action: MarketRowAction) => Promise<void>;
12
+ readonly onRecheck: () => void;
13
+ readonly rechecking: boolean;
11
14
  }): JSX.Element | null;
@@ -0,0 +1,14 @@
1
+ import type { InstallFailure, Translate } from '@dsh-workbench/shared';
2
+ export interface FailureCardModel {
3
+ readonly title: string;
4
+ readonly fact: string;
5
+ readonly fixLabel: string;
6
+ readonly fix: string;
7
+ readonly copiedHint: string;
8
+ readonly command: string;
9
+ readonly output: string;
10
+ readonly exitCode: number | null;
11
+ }
12
+ export declare function shellPath(path: string): string;
13
+ export declare function ownerLabel(uid: number): string;
14
+ export declare function failureCardOf(failure: InstallFailure, t: Translate): FailureCardModel;
@@ -1,15 +1,12 @@
1
1
  import type { Translate, WriteOutcome } from '@dsh-workbench/shared';
2
- import type { MarketRow } from './market-row-types';
2
+ import type { MarketFailure, MarketRow } from './market-row-types';
3
3
  import { type MarketRowAction } from './market-rows';
4
4
  import { type HeldRow, type Pending } from './market-view-text';
5
5
  export interface MarketActSeats {
6
6
  readonly setPending: (next: Pending | null) => void;
7
7
  readonly setHeld: (next: HeldRow | undefined) => void;
8
8
  readonly setConfirming: (next: string | null) => void;
9
- readonly setFailed: (next: {
10
- readonly id: string;
11
- readonly message: string;
12
- } | null) => void;
9
+ readonly setFailed: (next: MarketFailure | null) => void;
13
10
  readonly setNotice: (next: string | null) => void;
14
11
  }
15
12
  export interface MarketActOptions {
@@ -2,3 +2,4 @@ import type { Translate } from '@dsh-workbench/shared';
2
2
  import type { BundleChange } from '../../../kernel/contract/bundle-install';
3
3
  export declare function changeOf(value: unknown): BundleChange | undefined;
4
4
  export declare function changeFailure(change: BundleChange | undefined, t: Translate): string | undefined;
5
+ export declare function appliedUnitsOf(value: unknown): readonly string[];
@@ -13,5 +13,7 @@ export interface MarketHintInput {
13
13
  readonly plugins?: readonly InstalledPlugin[] | null | undefined;
14
14
  readonly workbench?: WorkbenchVersion | null | undefined;
15
15
  readonly busy?: ReadonlySet<string> | undefined;
16
+ readonly installing?: boolean | undefined;
17
+ readonly applied?: ReadonlySet<string> | undefined;
16
18
  }
17
19
  export declare function marketHintOf(input: MarketHintInput): PanelHint | null;
@@ -0,0 +1,11 @@
1
+ export interface MarketInstallState {
2
+ readonly installing: boolean;
3
+ readonly applied: ReadonlySet<string>;
4
+ }
5
+ export declare function marketInstallState(): MarketInstallState;
6
+ export declare function subscribeMarketInstall(listener: () => void): () => void;
7
+ export declare function publishMarketInstalling(token: string, active: boolean): void;
8
+ export declare function publishMarketApplied(units: readonly string[]): void;
9
+ export declare function resetMarketInstall(): void;
10
+ export declare function useMarketInstallState(): MarketInstallState;
11
+ export declare function usePublishMarketInstalling(token: string, active: boolean): void;
@@ -1,9 +1,15 @@
1
1
  import type { ModuleUpdateBlock } from '../../../kernel/contract/bundle-install';
2
2
  import type { MarketInstalledModule } from '../../../kernel/contract/market-index';
3
+ import type { InstallFailure } from '@dsh-workbench/shared';
4
+ export interface MarketFailure {
5
+ readonly id: string;
6
+ readonly message: string;
7
+ readonly failure?: InstallFailure;
8
+ }
3
9
  export type MarketRowAction = 'install' | 'update' | 'update-bundle' | 'install-version' | 'remove-bundle' | 'uninstall' | 'update-dependency' | 'update-plugin' | 'uninstall-plugin' | 'update-workbench' | 'migrate-workbench' | 'dismiss-followup';
4
10
  export type MarketState = 'checking' | 'installed' | 'inactive' | 'unusable' | 'broken' | 'outdated' | 'pending-restart' | 'pending-followup' | 'missing' | 'unchecked' | 'unknown';
5
11
  export interface MarketNote {
6
- readonly key: 'panels.market.needEnv' | 'panels.market.noSource' | 'panels.market.badSource' | 'panels.market.needCommands' | 'panels.market.needBinary' | 'panels.market.needLib' | 'panels.market.moduleRefused' | 'panels.market.moduleRestartHint' | 'panels.market.pluginAlsoKnownAs' | 'panels.market.pluginBroken';
12
+ readonly key: 'panels.market.needEnv' | 'panels.market.noSource' | 'panels.market.badSource' | 'panels.market.needCommands' | 'panels.market.needBinary' | 'panels.market.needLib' | 'panels.market.moduleRefused' | 'panels.market.moduleRestartHint' | 'panels.market.pluginAlsoKnownAs' | 'panels.market.pluginBroken' | 'panels.market.latestNoRegistry' | 'panels.market.latestProbeFailed';
7
13
  readonly params: Readonly<Record<string, string>>;
8
14
  readonly tone?: 'plain' | 'alert';
9
15
  }
@@ -1,4 +1,4 @@
1
- import type { ModuleUpdateBlock, ModuleVersion } from '../../../kernel/contract/bundle-install';
1
+ import type { LatestUnavailable, ModuleUpdateBlock, ModuleVersion } from '../../../kernel/contract/bundle-install';
2
2
  import type { MarketInstalledModule } from '../../../kernel/contract/market-index';
3
3
  import type { Translate, UnitManifest, UnitTitle } from '@dsh-workbench/shared';
4
4
  import type { MarketNameMap } from './market-names';
@@ -19,6 +19,7 @@ export interface InstalledWorkbenchModule {
19
19
  readonly title?: UnitTitle | undefined;
20
20
  readonly latest?: string | undefined;
21
21
  readonly latestBlocked?: ModuleUpdateBlock | undefined;
22
+ readonly latestUnavailable?: LatestUnavailable | undefined;
22
23
  readonly local?: boolean | undefined;
23
24
  readonly refused?: readonly string[] | undefined;
24
25
  readonly clientRefused?: readonly string[] | undefined;
@@ -31,8 +32,14 @@ export declare function withClientRefusals(modules: readonly InstalledWorkbenchM
31
32
  }[]): readonly InstalledWorkbenchModule[];
32
33
  export declare function refusalReasons(host: readonly string[] | undefined, client: readonly string[] | undefined): readonly string[];
33
34
  export declare function installedIdSet(installed: readonly InstalledWorkbenchModule[] | undefined): ReadonlySet<string> | null;
35
+ export interface LatestCheckSummary {
36
+ readonly checked: number;
37
+ readonly unknown: number;
38
+ }
39
+ export declare function latestCheckSummary(modules: readonly InstalledWorkbenchModule[] | undefined): LatestCheckSummary;
34
40
  export declare function installedRows(modules: readonly InstalledWorkbenchModule[], manifests: readonly UnitManifest[], listed: ReadonlySet<string>, names?: MarketNameMap | undefined, defaults?: ReadonlySet<string>, changed?: Readonly<Record<string, number>>): MarketRow[];
35
41
  export declare function marketSwitchLocked(row: MarketRow): boolean;
42
+ export declare function marketAsksAgent(row: MarketRow): boolean;
36
43
  export declare function marketActions(row: MarketRow): MarketRowAction[];
37
44
  export declare function capabilityOutdated(capabilities: CapabilityMap | null, unit: string): boolean;
38
45
  export declare function marketCatalog(manifests: readonly UnitManifest[], installable: ReadonlySet<string> | null | undefined): readonly UnitManifest[];
@@ -46,4 +53,8 @@ export interface MarketSection {
46
53
  }
47
54
  export declare function marketOrder(rows: readonly MarketRow[], titleOf: (row: MarketRow) => string): MarketRow[];
48
55
  export declare function marketSections(rows: readonly MarketRow[]): MarketSection[];
56
+ export declare function checkingRows(rows: readonly MarketRow[], scope: {
57
+ readonly all: boolean;
58
+ readonly units: ReadonlySet<string>;
59
+ }): MarketRow[];
49
60
  export declare function marketRows(manifests: readonly UnitManifest[], capabilities: CapabilityMap | null, updates?: ModuleUpdateMap, defaults?: ReadonlySet<string>, changed?: Readonly<Record<string, number>>): MarketRow[];
@@ -1,15 +1,15 @@
1
1
  import type { ReactNode, Translate } from '@dsh-workbench/shared';
2
- import type { MarketRow } from './market-row-types';
2
+ import type { MarketFailure, MarketRow } from './market-row-types';
3
3
  import { type MarketRowAction } from './market-rows';
4
4
  import type { MarketSectionIcon } from './market-section-icon';
5
5
  import { type Pending } from './market-view-text';
6
- export declare function MarketSection({ t, titleKey, icon, rows, pending, failureOf, act, confirmActions, onConfirming, onDefault, boardBusy, headAction, keepHead, }: {
6
+ export declare function MarketSection({ t, titleKey, icon, rows, pending, failureOf, act, confirmActions, onConfirming, onDefault, boardBusy, headAction, keepHead, onRecheck, rechecking, }: {
7
7
  readonly t: Translate;
8
8
  readonly titleKey?: string;
9
9
  readonly icon?: MarketSectionIcon;
10
10
  readonly rows: readonly MarketRow[];
11
11
  readonly pending: Pending | null;
12
- readonly failureOf: (id: string) => string | null;
12
+ readonly failureOf: (id: string) => MarketFailure | null;
13
13
  readonly act: (id: string, action: MarketRowAction) => Promise<void>;
14
14
  readonly onDefault?: ((id: string, next: boolean) => void) | undefined;
15
15
  readonly boardBusy?: boolean | undefined;
@@ -17,4 +17,6 @@ export declare function MarketSection({ t, titleKey, icon, rows, pending, failur
17
17
  readonly onConfirming: (id: string | null) => void;
18
18
  readonly headAction?: ReactNode;
19
19
  readonly keepHead?: boolean;
20
+ readonly onRecheck: () => void;
21
+ readonly rechecking: boolean;
20
22
  }): JSX.Element | null;
@@ -1,18 +1,13 @@
1
1
  import type { MarketMock } from './market-mock';
2
2
  import type { Pending } from './market-view-text';
3
+ import type { MarketFailure } from './market-row-types';
3
4
  export interface MarketTransient {
4
5
  readonly pending: Pending | null;
5
6
  readonly setPending: (next: Pending | null) => void;
6
7
  readonly confirming: string | null;
7
8
  readonly setConfirming: (next: string | null) => void;
8
- readonly failed: {
9
- readonly id: string;
10
- readonly message: string;
11
- } | null;
12
- readonly setFailed: (next: {
13
- readonly id: string;
14
- readonly message: string;
15
- } | null) => void;
9
+ readonly failed: MarketFailure | null;
10
+ readonly setFailed: (next: MarketFailure | null) => void;
16
11
  readonly notice: string | null;
17
12
  readonly setNotice: (next: string | null) => void;
18
13
  }
@@ -48,3 +48,5 @@ export declare function pendingRowOf(input: {
48
48
  readonly rows: readonly MarketRow[];
49
49
  readonly names: MarketNameMap;
50
50
  }): MarketRow | undefined;
51
+ export declare function askAgentReason(row: MarketRow, t: Translate): string;
52
+ export declare function askAgentText(row: MarketRow, t: Translate): string;
@@ -11,6 +11,7 @@ export interface ClientUnitRegistry {
11
11
  register(face: UnitClientFace): () => void;
12
12
  all(): readonly UnitClientFace[];
13
13
  manifests(): readonly UnitManifest[];
14
+ declared(): readonly UnitManifest[];
14
15
  installable(): ReadonlySet<string> | null;
15
16
  refusals(): readonly ClientUnitRefusal[];
16
17
  setManifests(manifests: readonly UnitManifest[], installable?: readonly string[]): void;
@@ -1,2 +1,2 @@
1
1
  export { BUNDLE_REGISTRIES_ROUTE, BUNDLE_INSPECT_ROUTE, BUNDLE_REGISTRY_DEFAULT, MODULE_VERSIONS_ROUTE, SELF_UPDATE_STATES, RESTART_REASONS } from '@dsh-workbench/shared/contract/protocol/bundle-install';
2
- export type { BundleRegistry, BundleRegistries, BundleInspectProblem, BundleSpecKind, BundleInspectionAccepted, BundleInspectionRefused, BundleInspectionPlugin, BundleInspection, BundleRegistriesPayload, BundleInspectionPayload, BundleApplication, SelfUpdateState, WorkbenchSelfUpdate, RestartReason, BundleChangeStage, BundleFailureKind, BundlePackageResult, BundleChange, BundleInstallRequest, BundleCancellation, BundleSupplyState, BundleModulePayload, BundleSupplyPayload, BundleInstalledPlugin, BundleInstallPayload, BundleRemovePayload, BundleCancellationPayload, ModuleVersion, ModuleUpdateBlock, WorkbenchVersion, ModuleVersionsPayload } from '@dsh-workbench/shared/contract/protocol/bundle-install';
2
+ export type { BundleRegistry, BundleRegistries, BundleInspectProblem, BundleSpecKind, BundleInspectionAccepted, BundleInspectionRefused, BundleInspectionPlugin, BundleInspection, BundleRegistriesPayload, BundleInspectionPayload, BundleApplication, SelfUpdateState, WorkbenchSelfUpdate, RestartReason, BundleChangeStage, BundleFailureKind, BundlePackageResult, BundleChange, BundleInstallRequest, BundleCancellation, BundleSupplyState, BundleModulePayload, BundleSupplyPayload, BundleInstalledPlugin, BundleInstallPayload, BundleRemovePayload, BundleCancellationPayload, LatestUnavailable, ModuleVersion, ModuleUpdateBlock, WorkbenchVersion, ModuleVersionsPayload } from '@dsh-workbench/shared/contract/protocol/bundle-install';
@@ -0,0 +1,3 @@
1
+ import type { InstallFailure } from '@dsh-workbench/shared';
2
+ import { WorkbenchDataError } from '@dsh-workbench/shared/host';
3
+ export declare function installError(failure: InstallFailure): WorkbenchDataError;
@@ -3,10 +3,11 @@ import type { BundleManager } from '@dsh-workbench/shared/host';
3
3
  import type { RegistryNotebook } from '@dsh-workbench/shared/host';
4
4
  export interface RegistryFixDeps {
5
5
  readonly registries?: RegistryNotebook | undefined;
6
+ readonly profileDir?: string | null | undefined;
6
7
  readonly logger?: {
7
8
  info?(message: string): void;
8
9
  warn?(message: string): void;
9
10
  } | undefined;
10
11
  }
11
- export declare function rememberInstalledSource(deps: RegistryFixDeps, manager: BundleManager, pkg: string, registry: string | undefined): Promise<void>;
12
+ export declare function rememberInstalledSource(deps: RegistryFixDeps, manager: BundleManager, pkg: string, registry: string | undefined, version?: string | undefined): Promise<void>;
12
13
  export declare function retryAfterRegistryFix(deps: RegistryFixDeps, manager: BundleManager, pkg: string, change: BundleChange): Promise<BundleChange>;
@@ -0,0 +1,13 @@
1
+ import type { BundleChange } from '../../../kernel/contract/bundle-install';
2
+ import type { BundleManager } from '@dsh-workbench/shared/host';
3
+ import { type RegistryFixDeps } from './market-registry';
4
+ export interface RemoveBundleOptions {
5
+ readonly manager: BundleManager;
6
+ readonly pkg: string;
7
+ readonly profileDir?: string | null | undefined;
8
+ readonly registryFix: RegistryFixDeps;
9
+ readonly logger?: {
10
+ warn?(message: string): void;
11
+ } | undefined;
12
+ }
13
+ export declare function removeDshBundle(options: RemoveBundleOptions): Promise<BundleChange>;
@@ -22,7 +22,7 @@ export interface BundleInstallDeps {
22
22
  readonly ledger?: PluginLedger | undefined;
23
23
  readonly runAll: (commands: readonly PluginSourceCommand[]) => Promise<void>;
24
24
  readonly supplyAfter: (module: InstalledModule, change: BundleChange) => Promise<BundleSupply>;
25
- readonly rememberSource: (manager: BundleManager, pkg: string, registry: string | undefined) => Promise<void>;
25
+ readonly rememberSource: (manager: BundleManager, pkg: string, registry: string | undefined, version?: string | undefined) => Promise<void>;
26
26
  readonly remove?: ((pkg: string) => Promise<BundleChange>) | undefined;
27
27
  }
28
28
  export declare function bundleNameOf(change: BundleChange, spec: string): string;
@@ -25,6 +25,7 @@ export declare function createMarketService(options: {
25
25
  modules?: (() => readonly ProfileModule[]) | undefined;
26
26
  workbench?: ((pkg: string) => ProfilePackage | undefined) | undefined;
27
27
  registries?: RegistryNotebook | undefined;
28
+ profileDir?: string | null | undefined;
28
29
  ledger?: PluginLedger | undefined;
29
30
  references?: (() => PluginReferences) | undefined;
30
31
  dshHome?: (() => string) | undefined;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dsh-workbench/core",
3
- "version": "1.1.4",
3
+ "version": "1.1.5",
4
4
  "description": "个人工作台:Agent 工作台(左栏 + 常驻对话 + 自研右侧数据面板)。",
5
5
  "type": "module",
6
6
  "icon": "./icon.svg",
@@ -100,8 +100,8 @@
100
100
  "proper-lockfile": "^4.1.2",
101
101
  "which": "^7.0.0",
102
102
  "write-file-atomic": "^8.0.0",
103
- "@dsh-workbench/shared": "1.1.4",
104
- "@dsh-workbench/adapters-default": "1.1.4"
103
+ "@dsh-workbench/shared": "1.1.5",
104
+ "@dsh-workbench/adapters-default": "1.1.5"
105
105
  },
106
106
  "license": "MIT",
107
107
  "repository": {
@@ -108,18 +108,27 @@
108
108
  ]
109
109
  },
110
110
  { "kind": "lib", "name": "opencli-workflow", "purpose": "发布编排" },
111
- { "kind": "bin", "name": "acme", "purpose": "平台命令" },
111
+ {
112
+ "kind": "bin",
113
+ "name": "acme",
114
+ "purpose": "平台命令",
115
+ "install": { "kind": "command", "line": "brew install acme/tap/cli", "platforms": ["darwin"] },
116
+ "docs": "https://internal/acme-cli"
117
+ },
112
118
  { "kind": "env", "name": "ACME_TOKEN", "purpose": "访问令牌", "secret": true }
113
119
  ]
114
120
  ```
115
121
 
116
122
  - `sources` 按顺序试(本地 → 私有 → 公共)。没写 `sources` 就是「我自己装,你只帮我判」——外壳只探不代装。
123
+ - `bin` 想让人一键装,就写 `install.line`(一条能直接粘进终端的命令,`platforms` 可限定平台);
124
+ 不写就只显示「缺这条命令」,按钮都不会有。`docs` 是给人和 agent 看的补充链接。
117
125
  - `extension` 的 `sources[].kind` 只有 `npm` / `git` / `local`;`lib` 只认 `npm`。
118
126
  未知 `kind` 或 `source.kind` 判红;need 里未知字段只警告,`x-` 前缀忽略。
119
127
  - 未装好文案由模块写:`libInstallCommand({ need, source })`(`@dsh-workbench/shared/host`)拼好源与缓存目录,
120
128
  原样输出;放进失败态。
121
129
  - `contracts` 判据:`apiVersion` 必须是 3;`needs` 走同一份 `NEED_KINDS` 注册表校验(`purpose` 必填、
122
- `bin`/`env` 不许带 `sources`、`lib` 只认 npm 源);声明了 `lib` 必须用 `libInstallCommand`。
130
+ `bin`/`env` 不许带 `sources`(`bin` 要代装就写 `install`)、`lib` 只认 npm 源);
131
+ 声明了 `lib` 必须用 `libInstallCommand`。
123
132
  未知 `runtime` 不判红:探针会给「这个运行时工作台还不认识」的 `unchecked`,等运行时 provider 补上。
124
133
 
125
134
  ## 9 长任务