@dsh-workbench/core 1.1.9 → 1.1.11
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/README.md +3 -3
- package/client.js +1166 -841
- package/dist/client/client.body.js +1166 -841
- package/dist/client/index.js +1034 -709
- package/dist/host/index.js +223 -130
- package/dist/types/app/layouts/env-gate/gate-text.d.ts +1 -0
- package/dist/types/app/layouts/market/discover-view.d.ts +1 -0
- package/dist/types/app/layouts/rightbar/MarketView.d.ts +2 -23
- package/dist/types/app/layouts/rightbar/market-body.d.ts +25 -0
- package/dist/types/app/layouts/rightbar/market-detail-facts.d.ts +14 -0
- package/dist/types/app/layouts/rightbar/market-detail-page.d.ts +20 -0
- package/dist/types/app/layouts/rightbar/market-detail.d.ts +17 -0
- package/dist/types/app/layouts/rightbar/market-row-types.d.ts +7 -0
- package/dist/types/app/layouts/rightbar/market-rows.d.ts +2 -0
- package/dist/types/app/layouts/rightbar/market-scene-view.d.ts +33 -0
- package/dist/types/app/layouts/rightbar/market-section.d.ts +23 -4
- package/dist/types/app/layouts/rightbar/market-view-text.d.ts +1 -0
- package/dist/types/app/layouts/sidebar/workspace-groups.d.ts +1 -1
- package/dist/types/modules/panels/model/market-discover.d.ts +1 -0
- package/dist/types/shared/api/host/diy-publish-preview.d.ts +4 -4
- package/dist/types/shared/api/host/git-exec.d.ts +1 -0
- package/dist/types/shared/api/host/git-probe.d.ts +6 -6
- package/dist/types/shared/api/host/git-process.d.ts +13 -0
- package/dist/types/shared/api/host/git-routes.d.ts +5 -2
- package/dist/types/shared/api/host/market-doc.d.ts +2 -2
- package/dist/types/shared/api/host/market-index-fetch.d.ts +2 -2
- package/dist/types/shared/api/host/market-source-init.d.ts +2 -2
- package/dist/types/shared/api/installed-plugins.d.ts +2 -0
- package/package.json +4 -4
|
@@ -3,6 +3,7 @@ import type { PreflightBridgeIssue, PreflightGuidance, PreflightSnapshot, Prefli
|
|
|
3
3
|
import type { RuntimeProfile } from '@dsh-workbench/shared';
|
|
4
4
|
export declare function failedStepText(guidance: PreflightGuidance | undefined, t: Translate): string;
|
|
5
5
|
export declare function stepDetailText(step: PreflightStep, snapshot: PreflightSnapshot, t: Translate): string;
|
|
6
|
+
export declare function gateHintOf(snapshot: PreflightSnapshot, t: Translate): string;
|
|
6
7
|
export declare function showsRawDetails(snapshot: PreflightSnapshot): boolean;
|
|
7
8
|
export declare function showsRawAll(snapshot: PreflightSnapshot, panelShown: boolean): boolean;
|
|
8
9
|
export interface BridgeAdvice {
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import 'dayjs/locale/zh-cn';
|
|
2
2
|
import type { DiscoverEntry, DiscoverSourceRow, DiscoverVersionRow, MarketSourceConfig } from '../../../kernel/contract/market-index';
|
|
3
|
+
export declare function localeNow(): string;
|
|
3
4
|
export type DiscoverSort = 'default' | 'published';
|
|
4
5
|
export declare const DISCOVER_PAGE_SIZE = 50;
|
|
5
6
|
export interface DiscoverFilterState {
|
|
@@ -1,15 +1,13 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { Translate } from '@dsh-workbench/shared';
|
|
2
2
|
import type { UnitManifest } from '@dsh-workbench/shared';
|
|
3
3
|
import type { CapabilityMap } from '../../../shared/hooks/use-capabilities';
|
|
4
4
|
import type { MarketFreshness } from './market-freshness';
|
|
5
5
|
import type { InstalledPlugin } from '../../../shared/api/installed-plugins';
|
|
6
|
-
import { type InstalledWorkbenchModule
|
|
6
|
+
import { type InstalledWorkbenchModule } from './market-rows';
|
|
7
7
|
import type { TitleResolve } from './market-names';
|
|
8
8
|
import type { MarketMock } from './market-mock';
|
|
9
|
-
import type { MarketFailure } from './market-row-types';
|
|
10
9
|
import type { ModuleUpdateMap } from './market-rows';
|
|
11
10
|
import type { WorkbenchSelfUpdate, WorkbenchVersion } from '../../../kernel/contract/bundle-install';
|
|
12
|
-
import { type Pending } from './market-view-text';
|
|
13
11
|
import type { VersionsCheck, VersionsPart } from '../market/use-module-versions';
|
|
14
12
|
export interface MarketViewProps {
|
|
15
13
|
readonly t: Translate;
|
|
@@ -38,23 +36,4 @@ export interface MarketViewProps {
|
|
|
38
36
|
readonly defaults?: readonly string[] | undefined;
|
|
39
37
|
readonly changed?: Readonly<Record<string, number>> | undefined;
|
|
40
38
|
}
|
|
41
|
-
export declare function MarketBody({ t, self, shown, pluginList, installedList, shared, pending, failed, notice, act, onConfirming, setDefault, boardBusy, checks, onRecheck, rechecking, runtimePluginMarket, }: {
|
|
42
|
-
readonly t: Translate;
|
|
43
|
-
readonly runtimePluginMarket?: boolean | undefined;
|
|
44
|
-
readonly self: MarketRow | undefined;
|
|
45
|
-
readonly shown: readonly MarketRow[];
|
|
46
|
-
readonly pluginList: readonly MarketRow[];
|
|
47
|
-
readonly installedList: readonly MarketRow[];
|
|
48
|
-
readonly shared: readonly SharedRow[];
|
|
49
|
-
readonly pending: Pending | null;
|
|
50
|
-
readonly failed: MarketFailure | null;
|
|
51
|
-
readonly notice: string | null;
|
|
52
|
-
readonly act: (id: string, action: MarketRowAction) => Promise<void>;
|
|
53
|
-
readonly onConfirming: (id: string | null) => void;
|
|
54
|
-
readonly setDefault: (id: string, next: boolean) => Promise<void>;
|
|
55
|
-
readonly boardBusy: boolean;
|
|
56
|
-
readonly checks: Readonly<Record<VersionsPart, ReactNode>>;
|
|
57
|
-
readonly onRecheck: () => void;
|
|
58
|
-
readonly rechecking: boolean;
|
|
59
|
-
}): JSX.Element;
|
|
60
39
|
export declare function MarketView({ t, titleOf, manifests, installable, capabilities, runtimePluginMarket, freshness, onChanged, onPending, updates, modulesCheck, pluginsCheck, onCheck, installed, installedRead, workbench, selfUpdate, plugins, settling, installing, mock, defaults, changed, }: MarketViewProps): JSX.Element;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { ReactNode, Translate } from '@dsh-workbench/shared';
|
|
2
|
+
import type { MarketFailure, MarketRow, MarketRowAction } from './market-row-types';
|
|
3
|
+
import type { SharedRow } from './market-shared-rows';
|
|
4
|
+
import type { Pending } from './market-view-text';
|
|
5
|
+
import type { VersionsPart } from '../market/use-module-versions';
|
|
6
|
+
export declare function MarketBody({ t, self, shown, pluginList, installedList, shared, pending, failed, notice, act, onConfirming, setDefault, boardBusy, checks, onRecheck, rechecking, runtimePluginMarket, onOpenDetail, }: {
|
|
7
|
+
readonly t: Translate;
|
|
8
|
+
readonly runtimePluginMarket?: boolean | undefined;
|
|
9
|
+
readonly self: MarketRow | undefined;
|
|
10
|
+
readonly shown: readonly MarketRow[];
|
|
11
|
+
readonly pluginList: readonly MarketRow[];
|
|
12
|
+
readonly installedList: readonly MarketRow[];
|
|
13
|
+
readonly shared: readonly SharedRow[];
|
|
14
|
+
readonly pending: Pending | null;
|
|
15
|
+
readonly failed: MarketFailure | null;
|
|
16
|
+
readonly notice: string | null;
|
|
17
|
+
readonly act: (id: string, action: MarketRowAction) => Promise<void>;
|
|
18
|
+
readonly onConfirming: (id: string | null) => void;
|
|
19
|
+
readonly setDefault: (id: string, next: boolean) => Promise<void>;
|
|
20
|
+
readonly boardBusy: boolean;
|
|
21
|
+
readonly checks: Readonly<Record<VersionsPart, ReactNode>>;
|
|
22
|
+
readonly onRecheck: () => void;
|
|
23
|
+
readonly rechecking: boolean;
|
|
24
|
+
readonly onOpenDetail?: ((id: string) => void) | undefined;
|
|
25
|
+
}): JSX.Element;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { Translate } from '@dsh-workbench/shared';
|
|
2
|
+
import type { MarketRow } from './market-row-types';
|
|
3
|
+
export interface MarketDetailFact {
|
|
4
|
+
readonly labelKey: string;
|
|
5
|
+
readonly value: string;
|
|
6
|
+
readonly code?: boolean;
|
|
7
|
+
}
|
|
8
|
+
export declare function isDirectSourceSpec(spec: string): boolean;
|
|
9
|
+
export declare function localPathOf(row: MarketRow): string | undefined;
|
|
10
|
+
export declare function installSourceOf(row: MarketRow, t: Translate): {
|
|
11
|
+
readonly text: string;
|
|
12
|
+
readonly code: boolean;
|
|
13
|
+
};
|
|
14
|
+
export declare function marketDetailFacts(row: MarketRow, t: Translate): readonly MarketDetailFact[];
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { Translate } from '@dsh-workbench/shared';
|
|
2
|
+
import type { MarketFailure, MarketRow, MarketRowAction } from './market-row-types';
|
|
3
|
+
import type { Pending } from './market-view-text';
|
|
4
|
+
export declare function MarketDetailPage({ t, row, pending, failure, notice, boardBusy, confirming, confirmingRow, rowById, onBack, onConfirming, onDefault, onAct, onRecheck, rechecking, }: {
|
|
5
|
+
readonly t: Translate;
|
|
6
|
+
readonly row: MarketRow;
|
|
7
|
+
readonly pending: Pending | null;
|
|
8
|
+
readonly failure: MarketFailure | null;
|
|
9
|
+
readonly notice: string | null;
|
|
10
|
+
readonly boardBusy?: boolean | undefined;
|
|
11
|
+
readonly confirming: string | null;
|
|
12
|
+
readonly confirmingRow: MarketRow | undefined;
|
|
13
|
+
readonly rowById: ReadonlyMap<string, MarketRow>;
|
|
14
|
+
readonly onBack: () => void;
|
|
15
|
+
readonly onConfirming: (id: string | null) => void;
|
|
16
|
+
readonly onDefault: (id: string, next: boolean) => Promise<void>;
|
|
17
|
+
readonly onAct: (id: string, action: MarketRowAction) => Promise<void>;
|
|
18
|
+
readonly onRecheck: () => void;
|
|
19
|
+
readonly rechecking: boolean;
|
|
20
|
+
}): JSX.Element;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { Translate } from '@dsh-workbench/shared';
|
|
2
|
+
import type { MarketFailure, MarketRow, MarketRowAction } from './market-row-types';
|
|
3
|
+
import type { Pending } from './market-view-text';
|
|
4
|
+
export interface MarketDetailProps {
|
|
5
|
+
readonly t: Translate;
|
|
6
|
+
readonly row: MarketRow;
|
|
7
|
+
readonly pending: Pending | null;
|
|
8
|
+
readonly failure: MarketFailure | null;
|
|
9
|
+
readonly notice: string | null;
|
|
10
|
+
readonly boardBusy?: boolean | undefined;
|
|
11
|
+
readonly onBack: () => void;
|
|
12
|
+
readonly onRequest: (action: MarketRowAction) => void;
|
|
13
|
+
readonly onDefault?: ((next: boolean) => void) | undefined;
|
|
14
|
+
readonly onRecheck: () => void;
|
|
15
|
+
readonly rechecking: boolean;
|
|
16
|
+
}
|
|
17
|
+
export declare function MarketDetail({ t, row, pending, failure, notice, boardBusy, onBack, onRequest, onDefault, onRecheck, rechecking, }: MarketDetailProps): JSX.Element;
|
|
@@ -22,6 +22,9 @@ export interface ModuleUpdate {
|
|
|
22
22
|
readonly local?: boolean;
|
|
23
23
|
readonly blocked?: ModuleUpdateBlock;
|
|
24
24
|
readonly market?: MarketInstalledModule;
|
|
25
|
+
readonly pkg?: string;
|
|
26
|
+
readonly spec?: string;
|
|
27
|
+
readonly registry?: string;
|
|
25
28
|
}
|
|
26
29
|
export interface MarketFollowUp {
|
|
27
30
|
readonly id: string;
|
|
@@ -53,4 +56,8 @@ export interface MarketRow {
|
|
|
53
56
|
readonly defaultChanged?: number;
|
|
54
57
|
readonly broken?: boolean;
|
|
55
58
|
readonly followUp?: MarketFollowUp;
|
|
59
|
+
readonly spec?: string;
|
|
60
|
+
readonly registry?: string;
|
|
61
|
+
readonly installedAt?: string;
|
|
62
|
+
readonly removeViaBundle?: boolean;
|
|
56
63
|
}
|
|
@@ -25,6 +25,8 @@ export interface InstalledWorkbenchModule {
|
|
|
25
25
|
readonly refused?: readonly string[] | undefined;
|
|
26
26
|
readonly clientRefused?: readonly string[] | undefined;
|
|
27
27
|
readonly market?: MarketInstalledModule | undefined;
|
|
28
|
+
readonly spec?: string | undefined;
|
|
29
|
+
readonly registry?: string | undefined;
|
|
28
30
|
}
|
|
29
31
|
export declare function withClientRefusals(modules: readonly InstalledWorkbenchModule[], refusals: readonly {
|
|
30
32
|
readonly unit: string;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import type { ReactNode, Translate } from '@dsh-workbench/shared';
|
|
2
|
+
import type { MarketFailure, MarketRow, MarketRowAction } from './market-row-types';
|
|
3
|
+
import type { SharedRow } from './market-shared-rows';
|
|
4
|
+
import type { VersionsPart } from '../market/use-module-versions';
|
|
5
|
+
import type { Pending } from './market-view-text';
|
|
6
|
+
export declare function MarketSceneView({ t, runtimePluginMarket, self, shown, pluginList, installedList, shared, pending, failed, notice, act, onConfirming, setDefault, boardBusy, checks, onRecheck, rechecking, onOpenDetail, detailRow, confirming, confirmingRow, rowById, settled, nothing, settlingSize, onBack, }: {
|
|
7
|
+
readonly t: Translate;
|
|
8
|
+
readonly runtimePluginMarket?: boolean | undefined;
|
|
9
|
+
readonly self: MarketRow | undefined;
|
|
10
|
+
readonly shown: readonly MarketRow[];
|
|
11
|
+
readonly pluginList: readonly MarketRow[];
|
|
12
|
+
readonly installedList: readonly MarketRow[];
|
|
13
|
+
readonly shared: readonly SharedRow[];
|
|
14
|
+
readonly pending: Pending | null;
|
|
15
|
+
readonly failed: MarketFailure | null;
|
|
16
|
+
readonly notice: string | null;
|
|
17
|
+
readonly act: (id: string, action: MarketRowAction) => Promise<void>;
|
|
18
|
+
readonly onConfirming: (id: string | null) => void;
|
|
19
|
+
readonly setDefault: (id: string, next: boolean) => Promise<void>;
|
|
20
|
+
readonly boardBusy: boolean;
|
|
21
|
+
readonly checks: Readonly<Record<VersionsPart, ReactNode>>;
|
|
22
|
+
readonly onRecheck: () => void;
|
|
23
|
+
readonly rechecking: boolean;
|
|
24
|
+
readonly onOpenDetail: (id: string) => void;
|
|
25
|
+
readonly detailRow: MarketRow | undefined;
|
|
26
|
+
readonly confirming: string | null;
|
|
27
|
+
readonly confirmingRow: MarketRow | undefined;
|
|
28
|
+
readonly rowById: ReadonlyMap<string, MarketRow>;
|
|
29
|
+
readonly settled: boolean;
|
|
30
|
+
readonly nothing: boolean;
|
|
31
|
+
readonly settlingSize: number;
|
|
32
|
+
readonly onBack: () => void;
|
|
33
|
+
}): JSX.Element;
|
|
@@ -1,9 +1,27 @@
|
|
|
1
1
|
import type { ReactNode, Translate } from '@dsh-workbench/shared';
|
|
2
|
-
import type { MarketFailure, MarketRow } from './market-row-types';
|
|
3
|
-
import { type MarketRowAction } from './market-rows';
|
|
4
|
-
import type { MarketSectionIcon } from './market-section-icon';
|
|
2
|
+
import type { MarketFailure, MarketRow, MarketRowAction } from './market-row-types';
|
|
5
3
|
import { type Pending } from './market-view-text';
|
|
6
|
-
|
|
4
|
+
import type { MarketSectionIcon } from './market-section-icon';
|
|
5
|
+
export declare function MarketLineStatus({ t, row, quiet, }: {
|
|
6
|
+
readonly t: Translate;
|
|
7
|
+
readonly row: MarketRow;
|
|
8
|
+
readonly quiet: boolean;
|
|
9
|
+
}): JSX.Element | null;
|
|
10
|
+
export declare function MarketRowFailure({ t, failure, onRecheck, rechecking, }: {
|
|
11
|
+
readonly t: Translate;
|
|
12
|
+
readonly failure: MarketFailure | null;
|
|
13
|
+
readonly onRecheck: () => void;
|
|
14
|
+
readonly rechecking: boolean;
|
|
15
|
+
}): JSX.Element | null;
|
|
16
|
+
export declare function MarketRowControls({ t, row, pending, boardBusy, onRequest, onDefault, }: {
|
|
17
|
+
readonly t: Translate;
|
|
18
|
+
readonly row: MarketRow;
|
|
19
|
+
readonly pending: Pending | null;
|
|
20
|
+
readonly boardBusy?: boolean | undefined;
|
|
21
|
+
readonly onRequest: (action: MarketRowAction) => void;
|
|
22
|
+
readonly onDefault?: ((next: boolean) => void) | undefined;
|
|
23
|
+
}): JSX.Element;
|
|
24
|
+
export declare function MarketSection({ t, titleKey, icon, rows, pending, failureOf, act, confirmActions, onConfirming, onDefault, onOpenDetail, boardBusy, headAction, keepHead, onRecheck, rechecking, }: {
|
|
7
25
|
readonly t: Translate;
|
|
8
26
|
readonly titleKey?: string;
|
|
9
27
|
readonly icon?: MarketSectionIcon;
|
|
@@ -12,6 +30,7 @@ export declare function MarketSection({ t, titleKey, icon, rows, pending, failur
|
|
|
12
30
|
readonly failureOf: (id: string) => MarketFailure | null;
|
|
13
31
|
readonly act: (id: string, action: MarketRowAction) => Promise<void>;
|
|
14
32
|
readonly onDefault?: ((id: string, next: boolean) => void) | undefined;
|
|
33
|
+
readonly onOpenDetail?: ((id: string) => void) | undefined;
|
|
15
34
|
readonly boardBusy?: boolean | undefined;
|
|
16
35
|
readonly confirmActions: readonly MarketRowAction[];
|
|
17
36
|
readonly onConfirming: (id: string | null) => void;
|
|
@@ -34,6 +34,7 @@ export declare function heldIdOf(pending: Pending | null, held: HeldRow | undefi
|
|
|
34
34
|
export declare function pinnedRowOf(pending: Pending | null, held: HeldRow | undefined): MarketRow | undefined;
|
|
35
35
|
export declare function withPinnedRow(rows: readonly MarketRow[], pinned: MarketRow | undefined): MarketRow[];
|
|
36
36
|
export declare function marketFootVisible(shown: readonly MarketRow[], installed: readonly MarketRow[]): boolean;
|
|
37
|
+
export declare function marketRowMap(shown: readonly MarketRow[], self: MarketRow | undefined, installed: readonly MarketRow[], plugins: readonly MarketRow[]): ReadonlyMap<string, MarketRow>;
|
|
37
38
|
export declare function marketNamesOf(t: Translate, modules: readonly NameSource[], titleOf: TitleResolve, mocked: boolean): MarketNameMap;
|
|
38
39
|
export interface HeldRowControl {
|
|
39
40
|
readonly held: HeldRow | undefined;
|
|
@@ -10,7 +10,7 @@ export interface WorkspaceSectionPlan<T> {
|
|
|
10
10
|
readonly items: readonly T[];
|
|
11
11
|
}
|
|
12
12
|
export interface WorkspaceSectionOptions<T> {
|
|
13
|
-
readonly rankOf?: ((item: T) => number) | undefined;
|
|
13
|
+
readonly rankOf?: ((item: T) => number | null) | undefined;
|
|
14
14
|
}
|
|
15
15
|
export declare function workspaceSections<T extends {
|
|
16
16
|
readonly path: string;
|
|
@@ -16,6 +16,7 @@ export interface MarketDiscoverOptions {
|
|
|
16
16
|
readonly docs: MarketDocReader;
|
|
17
17
|
readonly modules: () => readonly ProfileModule[];
|
|
18
18
|
readonly defaultRegistry: () => Promise<string | undefined>;
|
|
19
|
+
readonly profilePath?: string | undefined;
|
|
19
20
|
readonly shell?: DshShell | undefined;
|
|
20
21
|
readonly shellVersion?: string | undefined;
|
|
21
22
|
readonly fetchImpl?: ((url: string, init: RequestInit) => Promise<Response>) | undefined;
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import type { DshShell } from '@dsh-workbench/shared';
|
|
2
1
|
import type { PublishPreview } from '@dsh-workbench/shared/contract/protocol/market-index';
|
|
2
|
+
import type { GitRunner } from './git-process';
|
|
3
3
|
export interface PublishModuleFact {
|
|
4
4
|
readonly dir: string;
|
|
5
5
|
readonly name: string;
|
|
6
6
|
readonly author: string;
|
|
7
7
|
}
|
|
8
8
|
export declare function moduleFactOf(root: string | null | undefined, unit: string): PublishModuleFact | null;
|
|
9
|
-
export declare function localGitIdentityOf(
|
|
10
|
-
export declare function lastCommitAuthorOf(
|
|
11
|
-
export declare function inferredAuthorOf(root: string | null | undefined, unit: string,
|
|
9
|
+
export declare function localGitIdentityOf(dir: string, runGit?: GitRunner): Promise<string | undefined>;
|
|
10
|
+
export declare function lastCommitAuthorOf(dir: string, runGit?: GitRunner): Promise<string | undefined>;
|
|
11
|
+
export declare function inferredAuthorOf(root: string | null | undefined, unit: string, runGit?: GitRunner): Promise<string | undefined>;
|
|
12
12
|
export declare function publishPreviewOf(root: string | null | undefined, unit: string, options?: {
|
|
13
13
|
readonly version?: string | undefined;
|
|
14
14
|
readonly author?: string | undefined;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import type { DshShell } from '@dsh-workbench/shared';
|
|
2
1
|
import type { GitProbePayload, GitProbeStatus } from '../../../kernel/contract/market-index';
|
|
2
|
+
import type { GitRunner } from './git-process.js';
|
|
3
3
|
export declare function classifyGitProbe(stderr: string, timedOut: boolean): GitProbeStatus;
|
|
4
|
-
export
|
|
4
|
+
export interface GitProbeOptions {
|
|
5
5
|
readonly timeoutMs?: number;
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
6
|
+
readonly runGit?: GitRunner;
|
|
7
|
+
}
|
|
8
|
+
export declare function probeGitAddress(url: string, options?: GitProbeOptions): Promise<GitProbePayload>;
|
|
9
|
+
export declare function probeGitAddressCached(url: string, options?: GitProbeOptions): Promise<GitProbePayload>;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export interface GitRunResult {
|
|
2
|
+
readonly exitCode: number | null;
|
|
3
|
+
readonly stdout: string;
|
|
4
|
+
readonly stderr: string;
|
|
5
|
+
readonly timedOut: boolean;
|
|
6
|
+
}
|
|
7
|
+
export interface GitRunOptions {
|
|
8
|
+
readonly cwd?: string;
|
|
9
|
+
readonly timeoutMs?: number;
|
|
10
|
+
readonly maxBytes?: number;
|
|
11
|
+
}
|
|
12
|
+
export type GitRunner = (args: readonly string[], options?: GitRunOptions) => Promise<GitRunResult>;
|
|
13
|
+
export declare const runGitProcess: GitRunner;
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
-
import type { DshHostContext } from '@dsh-workbench/shared';
|
|
2
1
|
import { type RouteHandler } from '@dsh-workbench/shared/host';
|
|
3
|
-
|
|
2
|
+
import type { GitRunner } from './git-process.js';
|
|
3
|
+
export interface GitProbeHandlerOptions {
|
|
4
|
+
readonly runGit?: GitRunner;
|
|
5
|
+
}
|
|
6
|
+
export declare function gitProbeHandler(options?: GitProbeHandlerOptions): RouteHandler;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { DshShell } from '@dsh-workbench/shared';
|
|
2
1
|
import type { DiscoverDoc, DiscoverDocKind, MarketIndexSource, MarketSourceConfig } from '@dsh-workbench/shared/contract/protocol/market-index';
|
|
2
|
+
import type { GitRunner } from './git-process.js';
|
|
3
3
|
export interface MarketDocTarget {
|
|
4
4
|
readonly name: string;
|
|
5
5
|
readonly version: string;
|
|
@@ -10,7 +10,7 @@ export interface MarketDocReader {
|
|
|
10
10
|
}
|
|
11
11
|
export interface MarketDocReaderOptions {
|
|
12
12
|
readonly root: string;
|
|
13
|
-
readonly
|
|
13
|
+
readonly runGit?: GitRunner | undefined;
|
|
14
14
|
readonly fetchImpl?: ((url: string, init: RequestInit) => Promise<Response>) | undefined;
|
|
15
15
|
readonly timeoutMs?: number | undefined;
|
|
16
16
|
readonly maxBytes?: number | undefined;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { DshShell } from '@dsh-workbench/shared';
|
|
2
1
|
import type { DiscoverProblem, IndexSourceSpec, MarketIndex, MarketSourceConfig } from '@dsh-workbench/shared/contract/protocol/market-index';
|
|
2
|
+
import type { GitRunner } from './git-process.js';
|
|
3
3
|
export interface CachedIndex {
|
|
4
4
|
readonly index: MarketIndex;
|
|
5
5
|
readonly fetchedAt: number;
|
|
@@ -24,7 +24,7 @@ export interface MarketIndexReader {
|
|
|
24
24
|
}
|
|
25
25
|
export interface MarketIndexReaderOptions {
|
|
26
26
|
readonly root: string;
|
|
27
|
-
readonly
|
|
27
|
+
readonly runGit?: GitRunner | undefined;
|
|
28
28
|
readonly fetchImpl?: ((url: string, init: RequestInit) => Promise<Response>) | undefined;
|
|
29
29
|
readonly now?: (() => number) | undefined;
|
|
30
30
|
readonly ttlMs?: number | undefined;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { DshShell } from '@dsh-workbench/shared';
|
|
2
1
|
import type { MarketSourceConfig } from '@dsh-workbench/shared/contract/protocol/market-index';
|
|
2
|
+
import type { GitRunner } from './git-process';
|
|
3
3
|
import type { MarketSourcesStore } from './market-sources-store';
|
|
4
4
|
export interface MarketSourceInitRequest {
|
|
5
5
|
readonly id: string;
|
|
@@ -17,7 +17,7 @@ export type MarketSourceInitializer = (request: MarketSourceInitRequest) => Prom
|
|
|
17
17
|
export interface MarketSourceInitOptions {
|
|
18
18
|
readonly root: string;
|
|
19
19
|
readonly store: MarketSourcesStore;
|
|
20
|
-
readonly
|
|
20
|
+
readonly runGit?: GitRunner | undefined;
|
|
21
21
|
readonly timeoutMs?: number | undefined;
|
|
22
22
|
}
|
|
23
23
|
export declare function createMarketSourceInitializer(options: MarketSourceInitOptions): MarketSourceInitializer;
|
|
@@ -6,6 +6,8 @@ export interface InstalledPlugin {
|
|
|
6
6
|
readonly latest?: string;
|
|
7
7
|
readonly local?: boolean;
|
|
8
8
|
readonly broken?: boolean;
|
|
9
|
+
readonly registry?: string;
|
|
10
|
+
readonly installedAt?: string;
|
|
9
11
|
}
|
|
10
12
|
export interface InstalledPluginsPayload {
|
|
11
13
|
readonly plugins: readonly InstalledPlugin[];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dsh-workbench/core",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.11",
|
|
4
4
|
"description": "个人工作台:Agent 工作台(左栏 + 常驻对话 + 自研右侧数据面板)。",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"icon": "./icon.svg",
|
|
@@ -76,7 +76,7 @@
|
|
|
76
76
|
}
|
|
77
77
|
},
|
|
78
78
|
"devDependencies": {
|
|
79
|
-
"@arch-guard/core": "^0.11.
|
|
79
|
+
"@arch-guard/core": "^0.11.2",
|
|
80
80
|
"@deepseek-ai/dsh-client-ui-primitives": "0.2.1-rc.2",
|
|
81
81
|
"@types/node": "^24.19.0",
|
|
82
82
|
"@types/proper-lockfile": "^4.1.4",
|
|
@@ -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/
|
|
104
|
-
"@dsh-workbench/
|
|
103
|
+
"@dsh-workbench/shared": "1.1.11",
|
|
104
|
+
"@dsh-workbench/adapters-default": "1.1.11"
|
|
105
105
|
},
|
|
106
106
|
"license": "MIT",
|
|
107
107
|
"repository": {
|