@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,3 +1,3 @@
|
|
|
1
1
|
export type MarketSectionKind = 'installed' | 'pending' | 'plugins' | 'shared';
|
|
2
|
-
export declare function marketSectionIcon(kind: MarketSectionKind): import("react").FunctionComponentElement<import("@dsh-
|
|
2
|
+
export declare function marketSectionIcon(kind: MarketSectionKind): import("react").FunctionComponentElement<import("@deepseek-ai/dsh-client-ui-primitives").IconProps> | import("react").FunctionComponentElement<import("@dsh-workbench/shared").IconProps>;
|
|
3
3
|
export type MarketSectionIcon = ReturnType<typeof marketSectionIcon>;
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import type { Translate } from '@dsh-workbench/shared';
|
|
2
|
+
import type { WorkbenchSelfUpdate } from '../../../kernel/contract/bundle-install';
|
|
2
3
|
import type { Pending } from './market-view-text';
|
|
3
4
|
export declare function useSettleHold(input: {
|
|
4
5
|
readonly pending: Pending | null;
|
|
5
6
|
readonly landed: boolean;
|
|
6
7
|
readonly t: Translate;
|
|
7
8
|
readonly onChanged: () => void;
|
|
9
|
+
readonly selfUpdate?: WorkbenchSelfUpdate | null | undefined;
|
|
8
10
|
readonly setPending: (next: Pending | null) => void;
|
|
9
11
|
readonly setFailed: (next: {
|
|
10
12
|
readonly id: string;
|
|
@@ -1,10 +1,13 @@
|
|
|
1
|
+
import type { WorkbenchSelfUpdate } from '../../../kernel/contract/bundle-install';
|
|
1
2
|
import type { MarketRowAction, ModuleUpdate } from './market-row-types';
|
|
3
|
+
import type { SharedState } from './market-shared-rows';
|
|
2
4
|
export declare const MODULE_SETTLE_MS = 15000;
|
|
3
5
|
export declare function holdBack(installed: readonly string[], roster: ReadonlySet<string>, active: ReadonlySet<string>, previous: ReadonlySet<string> | null): readonly string[];
|
|
4
6
|
export declare const WORKBENCH_SWAP_MS = 180000;
|
|
5
7
|
export declare const WORKBENCH_SWAP_POLL_MS = 800;
|
|
6
8
|
export declare function swapLanded(until: string | undefined, installed: string | undefined): boolean;
|
|
7
9
|
export declare function swapUntil(action: string, application: string | undefined, latest: string | undefined): string | undefined;
|
|
10
|
+
export declare const REMOVAL_ACTIONS: ReadonlySet<MarketRowAction>;
|
|
8
11
|
export declare function awaitsReadBack(action: MarketRowAction, application: string | undefined, version: string | undefined): boolean;
|
|
9
12
|
export declare function readBackDone(input: {
|
|
10
13
|
readonly action: MarketRowAction;
|
|
@@ -20,5 +23,19 @@ export declare function settleLanded(input: {
|
|
|
20
23
|
readonly entry: ModuleUpdate | undefined;
|
|
21
24
|
readonly clicked: string | undefined;
|
|
22
25
|
readonly outdated: boolean;
|
|
26
|
+
readonly sharedState?: SharedState | undefined;
|
|
27
|
+
readonly pluginOutdated?: boolean | null | undefined;
|
|
28
|
+
readonly unitGone?: boolean | null | undefined;
|
|
29
|
+
readonly pluginGone?: boolean | null | undefined;
|
|
23
30
|
}): boolean;
|
|
31
|
+
export interface SelfUpdateStop {
|
|
32
|
+
readonly kind: 'failed' | 'rolled-back';
|
|
33
|
+
readonly reason?: string;
|
|
34
|
+
readonly version?: string;
|
|
35
|
+
}
|
|
36
|
+
export declare function selfUpdateStop(input: {
|
|
37
|
+
readonly until: string | undefined;
|
|
38
|
+
readonly since: number | undefined;
|
|
39
|
+
readonly update: WorkbenchSelfUpdate | null | undefined;
|
|
40
|
+
}): SelfUpdateStop | undefined;
|
|
24
41
|
export declare function holdWindowMs(until: string | undefined): number;
|
|
@@ -5,7 +5,7 @@ export type SharedState = 'checking' | 'installed' | 'outdated' | 'unsatisfied'
|
|
|
5
5
|
export declare const SHARED_STATE_KEY: Readonly<Record<SharedState, string>>;
|
|
6
6
|
export interface SharedRow {
|
|
7
7
|
readonly id: string;
|
|
8
|
-
readonly kind: '
|
|
8
|
+
readonly kind: 'extension' | 'lib';
|
|
9
9
|
readonly label: string;
|
|
10
10
|
readonly usedByKeys: readonly string[];
|
|
11
11
|
readonly state: SharedState;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import type { Translate } from '@dsh-workbench/shared';
|
|
2
|
+
import type { BundleChange } from '../../../kernel/contract/bundle-install';
|
|
3
|
+
import type { MarketRowAction } from './market-row-types';
|
|
4
|
+
export interface UpdatedModule {
|
|
5
|
+
readonly kind?: string;
|
|
6
|
+
readonly pkg?: string;
|
|
7
|
+
readonly version?: string;
|
|
8
|
+
}
|
|
9
|
+
export type UpdateVerdict = {
|
|
10
|
+
readonly kind: 'ok';
|
|
11
|
+
} | {
|
|
12
|
+
readonly kind: 'no-change';
|
|
13
|
+
} | {
|
|
14
|
+
readonly kind: 'gone';
|
|
15
|
+
readonly restored?: string;
|
|
16
|
+
} | {
|
|
17
|
+
readonly kind: 'behind';
|
|
18
|
+
readonly installed: string;
|
|
19
|
+
};
|
|
20
|
+
export declare function updateVerdictOf(input: {
|
|
21
|
+
readonly action: MarketRowAction;
|
|
22
|
+
readonly change: BundleChange | undefined;
|
|
23
|
+
readonly module: UpdatedModule | undefined;
|
|
24
|
+
readonly restored?: string | undefined;
|
|
25
|
+
readonly clicked?: string | undefined;
|
|
26
|
+
readonly latest?: string | undefined;
|
|
27
|
+
}): UpdateVerdict;
|
|
28
|
+
export declare function updateVerdictText(verdict: UpdateVerdict, t: Translate, input: {
|
|
29
|
+
readonly from?: string | undefined;
|
|
30
|
+
readonly latest?: string | undefined;
|
|
31
|
+
}): string | undefined;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { UnitManifest } from '@dsh-workbench/shared';
|
|
2
2
|
import type { CapabilityMap } from '../../../shared/hooks/use-capabilities';
|
|
3
3
|
import type { MarketRow, MarketRowAction, ModuleUpdateMap } from './market-rows';
|
|
4
|
+
import type { SharedRow } from './market-shared-rows';
|
|
4
5
|
export declare const PROGRESS_KEY: Readonly<Record<MarketRowAction, string>>;
|
|
5
6
|
export declare const ACTION_LABEL_KEY: Readonly<Record<MarketRowAction, string>>;
|
|
6
7
|
export interface HeldRow {
|
|
@@ -14,12 +15,18 @@ export interface Pending {
|
|
|
14
15
|
readonly label?: string | undefined;
|
|
15
16
|
readonly pkg?: string | undefined;
|
|
16
17
|
readonly version?: string | undefined;
|
|
18
|
+
readonly latest?: string | undefined;
|
|
19
|
+
readonly since?: number | undefined;
|
|
17
20
|
readonly row?: MarketRow | undefined;
|
|
18
21
|
readonly until?: string | undefined;
|
|
19
22
|
readonly readBack?: boolean | undefined;
|
|
20
23
|
}
|
|
21
24
|
export declare function holdOf(pending: Pending | null, application: string | undefined): HeldRow | undefined;
|
|
22
|
-
export
|
|
25
|
+
export interface RemovalRead {
|
|
26
|
+
readonly units: ReadonlySet<string> | null;
|
|
27
|
+
readonly plugins: ReadonlySet<string> | null;
|
|
28
|
+
}
|
|
29
|
+
export declare function pendingLanded(pending: Pending | null, updates: ModuleUpdateMap, capabilities: CapabilityMap | null, installed: string | undefined, shared?: readonly SharedRow[], plugins?: readonly MarketRow[] | null, removal?: RemovalRead): boolean;
|
|
23
30
|
export declare function holdExpired(held: HeldRow | undefined, backInRoster: boolean, elapsedMs: number): boolean;
|
|
24
31
|
export declare function heldIdOf(pending: Pending | null, held: HeldRow | undefined): string | null;
|
|
25
32
|
export declare function pinnedRowOf(pending: Pending | null, held: HeldRow | undefined): MarketRow | undefined;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { WorkbenchVersion } from '../../../
|
|
1
|
+
import type { WorkbenchVersion } from '../../../kernel/contract/bundle-install';
|
|
2
2
|
import type { MarketRow } from './market-row-types';
|
|
3
3
|
export declare const WORKBENCH_ROW_ID = "workbench:self";
|
|
4
4
|
export declare const WORKBENCH_TITLE_KEY = "panels.market.workbenchName";
|
|
@@ -22,6 +22,8 @@ export interface RightbarPersistence {
|
|
|
22
22
|
readText(key: string): string | null;
|
|
23
23
|
writeText(key: string, value: string | null): void;
|
|
24
24
|
}
|
|
25
|
+
export declare function readFlag(key: string, fallback: boolean): boolean;
|
|
26
|
+
export declare function writeFlag(key: string, value: boolean): void;
|
|
25
27
|
export declare const RIGHTBAR_DEFAULT_EXPANDED = true;
|
|
26
28
|
export declare const RIGHTBAR_DEFAULT_COLUMN: RightbarColumn;
|
|
27
29
|
export interface RightbarColumnPressed {
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { DshClientContext } from '@dsh-workbench/shared';
|
|
2
|
+
import type { SidebarEdition } from '../../../kernel/contract/sidebar-edition';
|
|
3
|
+
export declare function markSidebarEditionPending(edition: SidebarEdition): void;
|
|
4
|
+
export declare function armCustomSidebarTakeover(): void;
|
|
5
|
+
export declare function disarmCustomSidebarTakeover(): void;
|
|
6
|
+
export declare function bootSidebarEdition(ctx: DshClientContext, registerOwn: () => void): void;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { SidebarEdition } from '../../../kernel/contract/sidebar-edition';
|
|
2
|
+
export declare function runtimeSidebarEdition(): SidebarEdition;
|
|
3
|
+
export declare function setRuntimeSidebarEdition(next: SidebarEdition): void;
|
|
4
|
+
export declare function subscribeSidebarEdition(listener: () => void): () => void;
|
|
5
|
+
export declare function useRuntimeSidebarEdition(): SidebarEdition;
|
|
@@ -15,8 +15,4 @@ export interface SidebarAttentionState {
|
|
|
15
15
|
readonly attention: Attention;
|
|
16
16
|
}
|
|
17
17
|
export declare function useSidebarAttention(input: SidebarAttentionInput): SidebarAttentionState;
|
|
18
|
-
/**
|
|
19
|
-
* 左栏要的那份长任务归属:外壳那条读口交回「全进程还在跑的长任务」,这里折成会话侧与工作区侧。
|
|
20
|
-
* @returns 两侧的归属(谁起了 / 哪个工作区里有几趟)。
|
|
21
|
-
*/
|
|
22
18
|
export declare function useLongTaskPresence(): LongTaskPresence;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Translate } from '@dsh-workbench/shared';
|
|
2
|
+
import type { ConfigSyncRow } from '../../../kernel/contract/config-sync';
|
|
3
|
+
export declare function SourceRows({ t, rows, picked, profile, assetOverwrites, onToggle, onToggleAsset, }: {
|
|
4
|
+
readonly t: Translate;
|
|
5
|
+
readonly rows: readonly ConfigSyncRow[];
|
|
6
|
+
readonly picked: readonly string[];
|
|
7
|
+
readonly profile: string;
|
|
8
|
+
readonly assetOverwrites: readonly string[];
|
|
9
|
+
readonly onToggle: (key: string, next: boolean) => void;
|
|
10
|
+
readonly onToggleAsset: (key: string, next: boolean) => void;
|
|
11
|
+
}): JSX.Element;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
export interface SettingsItemProps {
|
|
3
|
+
readonly title: string;
|
|
4
|
+
readonly description?: string | undefined;
|
|
5
|
+
readonly action?: ReactNode | undefined;
|
|
6
|
+
readonly children?: ReactNode | undefined;
|
|
7
|
+
}
|
|
8
|
+
export declare function SettingsItem({ title, description, action, children }: SettingsItemProps): JSX.Element;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { UnitManifest } from '@dsh-workbench/shared';
|
|
2
2
|
import type { BoardModule, UnitClientFace } from '@dsh-workbench/shared';
|
|
3
|
-
import { type BoardRegistry } from '
|
|
3
|
+
import { type BoardRegistry } from './board-registry';
|
|
4
4
|
export interface ClientUnitRefusal {
|
|
5
5
|
readonly unit: string;
|
|
6
6
|
readonly kind: ClientRefusalKind;
|
|
@@ -0,0 +1,2 @@
|
|
|
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, WorkbenchVersion, ModuleVersionsPayload } from '@dsh-workbench/shared/contract/protocol/bundle-install';
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
export { CONFIG_SYNC_ROUTE, CONFIG_SYNC_RESOURCE } from '@dsh-workbench/shared/contract/protocol/config-sync';
|
|
2
|
+
export type { ConfigSyncState, ConfigSyncAssetState, ConfigSyncAssetFile, ConfigSyncAsset, ConfigSyncRow, ConfigSyncProfile, ConfigSyncSnapshot, ConfigSyncApplied, ConfigSyncRequest } from '@dsh-workbench/shared/contract/protocol/config-sync';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { DIY_PRESET_ID, WORKSHOP_RELATIVE, WORKSHOP_TITLE, WORKSHOP_PAST_TITLES } from '@dsh-workbench/shared/contract/protocol/diy';
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export type { UnitModuleFace, UnitMountDeps, UnitMountResult } from '@dsh-workbench/shared/host';
|
|
2
|
+
export type { BoardModuleProps as BoardProps, CallOverrides, DataError, DataReader, DataRequest, DataResult, RequestRecipe, UnitClientApi, UnitClientFace, } from '@dsh-workbench/shared';
|
|
3
|
+
export type { DshClientContext as ClientContext, DshHostContext as HostContext } from '@dsh-workbench/shared';
|
|
4
|
+
export type { UnitRegistry } from '../host/unit-registry.js';
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
export { MARKET_DISCOVER_ROUTE, MARKET_DOC_ROUTE, MARKET_INDEX_FORMAT, MARKET_INDEX_PATH, MARKET_PUBLISH_PREVIEW_ROUTE, MARKET_SOURCES_RESOURCE, MARKET_WORKBENCH_LABEL, } from '@dsh-workbench/shared/contract/protocol/market-index';
|
|
2
|
+
export type { DiscoverCompat, DiscoverDoc, DiscoverDocKind, DiscoverEntry, DiscoverFilter, DiscoverInstallState, DiscoverPayload, DiscoverProblem, DiscoverSourceRow, DiscoverState, DiscoverVersionRow, IndexSourceSpec, MarketIndex, MarketIndexCategory, MarketIndexEngines, MarketIndexEntry, MarketIndexEntryMetadata, MarketIndexGitSource, MarketIndexLabel, MarketIndexMetadata, MarketIndexNpmSource, MarketIndexParse, MarketIndexProblem, MarketIndexProblemKind, MarketIndexSortKey, MarketIndexSource, MarketIndexVersion, MarketLocalizedText, MarketPublishDestination, MarketSourceConfig, MarketSourceKind, MarketSourcePolicy, MarketSourcesAction, MarketSourcesPayload, PublishChangelog, PublishPreview, } from '@dsh-workbench/shared/contract/protocol/market-index';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type { Deployment, HostOs, HostRuntime, ClientShell, ProfileName, SelfUpdateCli, HostCapabilities, ToolchainPlan, HostSurface, ClientCapabilities, ClientSurface } from '@dsh-workbench/shared/contract/protocol/platform';
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
export { PROFILE_CREATE_ROUTE, PROFILE_CREATE_RESOURCE } from '@dsh-workbench/shared/contract/protocol/profile-create';
|
|
2
|
+
export type { ProfileCreateProfile, ProfileCreateSnapshot, ProfileCreateCopy, ProfileCreateRequest, ProfileCreateApplied } from '@dsh-workbench/shared/contract/protocol/profile-create';
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
export { SIDEBAR_EDITION_ROUTE, SIDEBAR_EDITION_RESOURCE } from '@dsh-workbench/shared/contract/protocol/sidebar-edition';
|
|
2
|
+
export type { SidebarEdition, SidebarEditionSnapshot, SidebarEditionApplied, SidebarEditionRequest } from '@dsh-workbench/shared/contract/protocol/sidebar-edition';
|
|
@@ -2,6 +2,7 @@ import type { DshHostContext } from '@dsh-workbench/shared';
|
|
|
2
2
|
import type { UnitManifest } from '@dsh-workbench/shared/host';
|
|
3
3
|
import { type RouteTable } from '@dsh-workbench/shared/host';
|
|
4
4
|
import type { ContextRenderer, LongTaskBase, LongTaskChange, LongTaskRegistry, UnitMountDeps, UnitMountResult, UnitCall } from '@dsh-workbench/shared/host';
|
|
5
|
+
import type { DataReader } from '@dsh-workbench/shared/host';
|
|
5
6
|
import type { HostUnit } from './unit-registry';
|
|
6
7
|
import { type UnitReadiness } from './unit-readiness';
|
|
7
8
|
export declare function declaredNotesOf(plans: Iterable<{
|
|
@@ -60,7 +61,7 @@ export declare function mountUnits(units: readonly HostUnit[], deps: {
|
|
|
60
61
|
manifests: () => readonly UnitManifest[];
|
|
61
62
|
ownedUnits?: () => readonly string[];
|
|
62
63
|
installable?: () => readonly string[];
|
|
63
|
-
|
|
64
|
+
data?: DataReader;
|
|
64
65
|
probe?: UnitMountDeps['probe'];
|
|
65
66
|
store?: UnitMountDeps['store'];
|
|
66
67
|
values?: UnitMountDeps['values'];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { ALL_TOOLS, DIY_RECORD_PREPARE_TOOL, DIY_RECORD_READ_TOOL, LONG_TASKS_STOP_TOOL } from './unit';
|
|
1
|
+
export { ALL_TOOLS, DIY_PUBLISH_TOOL, DIY_RECORD_PREPARE_TOOL, DIY_RECORD_READ_TOOL, LONG_TASKS_STOP_TOOL } from './unit';
|
|
@@ -1,10 +1,6 @@
|
|
|
1
|
-
import type { ApprovalPolicy } from '@dsh-workbench/shared/host';
|
|
1
|
+
import type { ApprovalPolicy, RecordState } from '@dsh-workbench/shared/host';
|
|
2
|
+
import type { PublishPreview } from '@dsh-workbench/shared/contract/protocol/market-index';
|
|
2
3
|
import type { LongTaskRunsLookup } from './long-task-tools';
|
|
4
|
+
export type PublishApprovalPreview = PublishPreview;
|
|
3
5
|
export declare const panelsApproval: ApprovalPolicy;
|
|
4
|
-
|
|
5
|
-
* 面板族的审批策略:`panelsApproval` 再认长任务那一档(写成功要用户点头)。
|
|
6
|
-
* `longTaskRuns` 用来查"这一趟是谁起的" —— 自己起的免问,别的会话起的 / 用户按的要问。
|
|
7
|
-
* @param longTaskRuns 当前挂着的单元各自那把长任务注册表;没给就按"别人的"问(保守的那一侧)。
|
|
8
|
-
* @returns 审批策略:认领的写工具回 ask / allow,不是本族的回 undefined。
|
|
9
|
-
*/
|
|
10
|
-
export declare function panelsApprovalFor(longTaskRuns?: LongTaskRunsLookup | undefined): ApprovalPolicy;
|
|
6
|
+
export declare function panelsApprovalFor(longTaskRuns?: LongTaskRunsLookup | undefined, recording?: (() => RecordState | null) | undefined, publishPreview?: ((unit: string) => PublishApprovalPreview | null) | undefined): ApprovalPolicy;
|
|
@@ -34,6 +34,6 @@ export declare function clipNote(clip: PngClip, viewport: {
|
|
|
34
34
|
readonly width: number;
|
|
35
35
|
readonly height: number;
|
|
36
36
|
}): string;
|
|
37
|
-
export declare function defaultShotPath(
|
|
37
|
+
export declare function defaultShotPath(dir: string, unit: string, stamp: number): string;
|
|
38
38
|
export declare const BROWSER_TOOLS: readonly BrowserToolRow[];
|
|
39
39
|
export declare function registerBrowserTools(ctx: DshHostContext, tools: DshToolRegistry): readonly (() => void)[];
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { DshHostContext, DshToolRunContext } from '@dsh-workbench/shared';
|
|
2
|
-
import type { BundleChange } from '../../../
|
|
2
|
+
import type { BundleChange } from '../../../kernel/contract/bundle-install';
|
|
3
3
|
import type { PanelsService } from './service';
|
|
4
4
|
export declare const OUTPUT_SCHEMA: {
|
|
5
5
|
type: string;
|
|
@@ -7,7 +7,7 @@ export declare const OUTPUT_SCHEMA: {
|
|
|
7
7
|
text: {
|
|
8
8
|
type: string;
|
|
9
9
|
};
|
|
10
|
-
|
|
10
|
+
workspace: {
|
|
11
11
|
type: string;
|
|
12
12
|
};
|
|
13
13
|
modules: {
|
|
@@ -44,7 +44,7 @@ export declare const OUTPUT: {
|
|
|
44
44
|
text: {
|
|
45
45
|
type: string;
|
|
46
46
|
};
|
|
47
|
-
|
|
47
|
+
workspace: {
|
|
48
48
|
type: string;
|
|
49
49
|
};
|
|
50
50
|
modules: {
|
|
@@ -88,23 +88,25 @@ export declare function showOrReason(panels: PanelsService, unit: string, worksp
|
|
|
88
88
|
readonly ok: boolean;
|
|
89
89
|
readonly reason?: string;
|
|
90
90
|
};
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
* 登记成工作区的),**不跟着会话 cwd 走** —— 用户把自己的项目设成工作区时,cwd 往上找会撞上任意一个
|
|
94
|
-
* 带 `packages/` 的仓库,模块列表与 `shots/` 落点会一起变样(真机踩过:录制落点跑到仓库根、截图 EPERM)。
|
|
95
|
-
* 只有拿不到工坊的家时,才退回"从会话工作区往上找像工坊的目录"。
|
|
96
|
-
* @param ctx - 宿主上下文。
|
|
97
|
-
* @param exec - 这次工具调用(退回那一档要读它的会话工作区)。
|
|
98
|
-
* @returns 工坊的 packages 目录、根路径与标题。
|
|
99
|
-
*/
|
|
100
|
-
export declare function workshopOf(ctx: DshHostContext, exec: DshToolRunContext): Promise<{
|
|
101
|
-
readonly packagesDir: string;
|
|
102
|
-
readonly workspace: string | null;
|
|
91
|
+
export declare function workspaceOf(ctx: DshHostContext, exec: DshToolRunContext): Promise<{
|
|
92
|
+
readonly root: string;
|
|
103
93
|
readonly title: string;
|
|
104
94
|
}>;
|
|
105
|
-
export
|
|
95
|
+
export interface KnownUnit {
|
|
96
|
+
readonly unit: string;
|
|
97
|
+
readonly name: string;
|
|
98
|
+
readonly description: string;
|
|
99
|
+
readonly dir: string;
|
|
100
|
+
readonly installed: boolean;
|
|
101
|
+
}
|
|
102
|
+
export declare function unitsOf(ctx: DshHostContext, root: string): {
|
|
106
103
|
installed: string[];
|
|
107
|
-
modules: readonly import("@/shared/api/host/diy-
|
|
104
|
+
modules: readonly import("@/shared/api/host/diy-modules").DiyModule[];
|
|
105
|
+
units: readonly KnownUnit[];
|
|
108
106
|
};
|
|
109
|
-
export declare function
|
|
107
|
+
export declare function modulesOf(ctx: DshHostContext, root: string): {
|
|
108
|
+
installed: string[];
|
|
109
|
+
modules: readonly import("@/shared/api/host/diy-modules").DiyModule[];
|
|
110
|
+
};
|
|
111
|
+
export declare function moduleDirsOf(root: string): readonly string[];
|
|
110
112
|
export declare function panelEntriesOf(panels: PanelsService, workspace: string | null): import("./config").PanelEntry[];
|
|
@@ -4,7 +4,8 @@ import { type BoardFactState, type BoardProbe, type BoardSituation } from '@dsh-
|
|
|
4
4
|
import { type WorkbenchPage } from './diy-browser';
|
|
5
5
|
export type BoardState = BoardFactState;
|
|
6
6
|
export interface PageHandle {
|
|
7
|
-
readonly
|
|
7
|
+
readonly root: string;
|
|
8
|
+
readonly artifactsDir: string;
|
|
8
9
|
readonly unit: string;
|
|
9
10
|
readonly args: Record<string, unknown>;
|
|
10
11
|
readonly shell: DshShell;
|
|
@@ -17,7 +18,7 @@ export interface PageHandle {
|
|
|
17
18
|
export interface PageOptions {
|
|
18
19
|
readonly requireWorkbench?: boolean | undefined;
|
|
19
20
|
readonly requireUnit?: boolean | undefined;
|
|
20
|
-
readonly requireBoard?:
|
|
21
|
+
readonly requireBoard?: boolean | undefined;
|
|
21
22
|
readonly requirePact?: boolean | undefined;
|
|
22
23
|
}
|
|
23
24
|
export declare function debugPausedText(held: DebugState): string;
|
|
@@ -27,4 +28,5 @@ export declare function debugOffBoardText(held: DebugState, situation?: BoardSit
|
|
|
27
28
|
export declare function boardProbeOf(page: WorkbenchPage): BoardProbe;
|
|
28
29
|
export declare function boardStateOf(page: WorkbenchPage, workshop: string | null): BoardState;
|
|
29
30
|
export declare function boardGateText(situation: BoardSituation, unit: string, page: WorkbenchPage, title?: string): string;
|
|
31
|
+
export declare function desktopPageText(page?: WorkbenchPage): string;
|
|
30
32
|
export declare function pageAt(ctx: DshHostContext, exec: DshToolRunContext, raw: unknown, options?: PageOptions): Promise<PageHandle>;
|
|
@@ -1,20 +1,5 @@
|
|
|
1
1
|
import type { DshShell } from '@dsh-workbench/shared';
|
|
2
|
-
/**
|
|
3
|
-
* 两个地址是不是"同一页":比之前先把查询串 / 锚点 / 末尾斜杠抹掉 —— `open` 导航之后
|
|
4
|
-
* 地址栏常常多一个斜杠或一串 hash,那不算开错了页。
|
|
5
|
-
* @param here - 那一页现在真实所在的地址(`location.href`)。@param want - 我们要它去的地址。@returns 同一页为 `true`。
|
|
6
|
-
*/
|
|
7
2
|
export declare function samePageOf(here: string, want: string): boolean;
|
|
8
|
-
/**
|
|
9
|
-
* 把录制那一页开起来,并且**确认它真的开起来了**才回来。
|
|
10
|
-
*
|
|
11
|
-
* 先收掉这条会话的残留(否则新页会开进上一次留下的那扇旧窗里,不顶前台、看上去"根本没弹窗");
|
|
12
|
-
* 再 `tab new --window foreground` 开我们的页;**然后读一次 `location.href` 核实** —— 开出来是空白页
|
|
13
|
-
* 或别的地址时,回落到 opencli 的 `open`(它落在会话租约那个标签上)再核一次;两次都不对就
|
|
14
|
-
* `ok: false`,让调用方把这句话原样报给 agent,**不许在没开起来的页上装浮条说"已开始录制"**。
|
|
15
|
-
* @param input - 这条会话的名字 / 目标地址 / 捕获文件(收残留那一拍要用)。
|
|
16
|
-
* @returns `ok: false` 时 `at` 是那一页现在真实的地址(`''` = 空白页),`why` 是给 agent 看的一句话。
|
|
17
|
-
*/
|
|
18
3
|
export declare function openRecordPage(input: {
|
|
19
4
|
readonly shell: DshShell;
|
|
20
5
|
readonly command: string;
|
|
@@ -76,7 +76,6 @@ export interface RecordReadFacts {
|
|
|
76
76
|
readonly beatMs?: number;
|
|
77
77
|
}
|
|
78
78
|
export declare function renderRecordRead(input: RecordReadFacts): string;
|
|
79
|
-
/** 详情那一拍的原料:入参 / 出参 / 请求头那几块原文的渲染全靠它。 */
|
|
80
79
|
export interface RecordDetailFacts {
|
|
81
80
|
readonly found: boolean;
|
|
82
81
|
readonly where: string;
|
|
@@ -97,7 +96,6 @@ export interface RecordDetailFacts {
|
|
|
97
96
|
readonly maxBytes: number;
|
|
98
97
|
readonly note: string;
|
|
99
98
|
}
|
|
100
|
-
/** 把字段证据表插进详情正文:接在出参那一块之后、`请求头` 那一行(或第一条附注)之前;没有锚点就接在末尾。空串原样回。 */
|
|
101
99
|
export declare function renderRecordDetail(input: RecordDetailFacts): string;
|
|
102
100
|
export declare function moveOrThrow(move: RecordMove, held: RecordState | null): RecordState;
|
|
103
101
|
export declare function domainOf(url: string): string;
|
|
@@ -6,30 +6,14 @@ export declare const OPEN_TIMEOUT_MS = 30000;
|
|
|
6
6
|
export declare const SETTLE_MS = 2000;
|
|
7
7
|
export declare const WAIT_CAP_MS: number;
|
|
8
8
|
export declare const POLL_MS = 1000;
|
|
9
|
-
/**
|
|
10
|
-
* 捕获那一层要滤掉的 URL:静态资源(`data:` 与常见后缀)。用法 `new RegExp(...).test(url)`,命中即丢。
|
|
11
|
-
*/
|
|
12
9
|
export declare const STATIC_URL_PATTERN = "^(data:)|(\\.(js|css|png|jpe?g|gif|svg|woff2?|ico|map|webp|mp4)(\\?|$))";
|
|
13
10
|
export declare const DETAIL_MAX_BYTES = 60000;
|
|
14
11
|
export declare const pauseFor: (ms: number) => Promise<void>;
|
|
15
12
|
export declare function waitOf(value: unknown): number;
|
|
16
13
|
export declare function foreignDomainText(design: unknown, url: string): string;
|
|
17
|
-
export declare function captureFileOf(
|
|
14
|
+
export declare function captureFileOf(artifactsDir: string, unit: string): string;
|
|
18
15
|
export declare function lastCaptureFileOf(file: string): string;
|
|
19
|
-
/**
|
|
20
|
-
* 这一族自己的落图路径:跟 `rec-<unit>.jsonl` 同目录、`rec-shot-` 前缀(工坊那一页的图另有名字)。
|
|
21
|
-
* @param captureFile - 这一场捕获文件;图就落在它旁边。@param unit - 单元名。@param n - 页面「已拍」计数。
|
|
22
|
-
* @returns 形如 `…/shots/rec-shot-<unit>-<n>.png` 的路径。
|
|
23
|
-
*/
|
|
24
16
|
export declare function shotFileOf(captureFile: string, unit: string, n: number): string;
|
|
25
|
-
/**
|
|
26
|
-
* 把这一张现场图落进 `shots/`:argv **只有 `screenshot <path>`,一个视口参数都不给** —— `--full-page` 走
|
|
27
|
-
* `captureBeyondViewport`、`--width` / `--height` 走 `setDeviceMetricsOverride`:真机上按一下页面**看得见地闪**
|
|
28
|
-
* (2026-10-21 两次报过)、还可能让填了一半的表单跳位;调试族那把平时也是这一档(先 `eval` 量盒子再本地 `clip`)。
|
|
29
|
-
* 真机上这个平台整页高与视口一样(1512×698)—— `--full-page` 一点没多给,白闪。
|
|
30
|
-
* @param input - 看护那一拍的依赖(shell / 命令 / 会话 / 台账)。
|
|
31
|
-
* @param held - 当前那份约定(路径按它的 `unit` 拼)。@param n - 页面浮条上那个「已拍」计数。
|
|
32
|
-
*/
|
|
33
17
|
export declare function takeShotOf(input: WatchFinishDeps, held: RecordState, n: number): Promise<void>;
|
|
34
18
|
export declare function startRecordCapture(shell: DshShell, command: string, session: string, file: string): Promise<boolean>;
|
|
35
19
|
export interface WatchFinishDeps {
|
|
@@ -41,16 +25,6 @@ export interface WatchFinishDeps {
|
|
|
41
25
|
readonly url: string;
|
|
42
26
|
readonly captureFile: string;
|
|
43
27
|
}
|
|
44
|
-
/**
|
|
45
|
-
* 看护的一拍(= 一圈循环):读数那一条 `eval` **自己在页面里最多等 `RECORD_WATCH_MS`**(浮条在他按
|
|
46
|
-
* 「开始 / 截图 / 结束」时会唤醒挂在页面上的那个 waiter ⇒ 一按就回来),所以这一轮 = **恰好一条 `eval`**:
|
|
47
|
-
* 命中就立刻做那一拍,没人按就照旧 3 秒一拍 —— 兜底周期一字未变。该落图就落图;认到「结束」就封口、
|
|
48
|
-
* **叫醒 agent**、**关掉录制窗**、收工(关窗排在叫醒之后:关窗慢 / 失败不许拖住叫醒,失败也不抛 ——
|
|
49
|
-
* 那一扇是我们为录制借来的,ADR-0064 补记)。
|
|
50
|
-
* ⚠️ 读数那条**不许**改成 opencli 的 `wait xhr`:它**读一次清一次**那只捕获环(`cdp.js:346-353`),而 reaper
|
|
51
|
-
* 也读同一只环才拿得到 body ⇒ 会把 `rec-<unit>.jsonl` 吃空。理由与实测见 `.scratch/diy-write-record/issues/06-doorbell.md` §1.1。
|
|
52
|
-
* @param input - 看护那一拍的依赖。@returns `stop` = 这条循环可以收了;`delivered` = 这一拍叫醒过 agent。
|
|
53
|
-
*/
|
|
54
28
|
export declare function watchFinishStepOf(input: WatchFinishDeps): Promise<{
|
|
55
29
|
readonly stop: boolean;
|
|
56
30
|
readonly delivered: boolean;
|
|
@@ -59,10 +33,6 @@ export interface WatchRoundOut {
|
|
|
59
33
|
readonly stop: boolean;
|
|
60
34
|
readonly delivered: boolean;
|
|
61
35
|
}
|
|
62
|
-
/**
|
|
63
|
-
* 看护的一轮(就是 `watchFinishStepOf`,留着这个名字是给测试与调用点一个稳定的形)。
|
|
64
|
-
* @param input - 看护那一拍的依赖。@returns 收不收工、有没有叫醒。
|
|
65
|
-
*/
|
|
66
36
|
export declare function watchRoundOf(input: WatchFinishDeps): Promise<WatchRoundOut>;
|
|
67
37
|
export declare function watchRecordFinish(input: WatchFinishDeps): void;
|
|
68
38
|
export interface CaptureRead {
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import type { PanelUnitReport } from '@dsh-workbench/shared/host';
|
|
2
|
-
import { type
|
|
2
|
+
import { type DiyModule, type SyncState, type Toolchain, type WorkspaceShape } from '../../../shared/api/host/diy-modules';
|
|
3
3
|
export declare const SYNC_STALE_MINUTES = 15;
|
|
4
4
|
export declare const SYNC_STALE_MS: number;
|
|
5
5
|
export declare function syncNotice(input: {
|
|
6
|
-
readonly sync:
|
|
6
|
+
readonly sync: SyncState | undefined;
|
|
7
7
|
readonly shellVersion: string | undefined;
|
|
8
|
-
readonly toolchain:
|
|
8
|
+
readonly toolchain: Toolchain | undefined;
|
|
9
9
|
readonly now?: number;
|
|
10
10
|
readonly windowMs?: number;
|
|
11
11
|
}): string | undefined;
|
|
@@ -32,8 +32,7 @@ export declare function ageText(at: number, now: number): string;
|
|
|
32
32
|
export declare function stampOf(at: number): string;
|
|
33
33
|
export declare function readText(read: PanelUnitReport['cards'][number], now: number): string;
|
|
34
34
|
export declare function renderPanel(options: {
|
|
35
|
-
readonly
|
|
36
|
-
readonly workspace: string | null;
|
|
35
|
+
readonly root: string;
|
|
37
36
|
readonly rows: readonly {
|
|
38
37
|
readonly unit: string;
|
|
39
38
|
readonly name: string;
|
|
@@ -68,7 +67,7 @@ export declare function statusOf(options: {
|
|
|
68
67
|
readonly open: boolean;
|
|
69
68
|
readonly health: SuiteHealth;
|
|
70
69
|
}): ModuleStatus;
|
|
71
|
-
export declare function renderStatus(
|
|
70
|
+
export declare function renderStatus(root: string, lines: readonly ModuleStatus[], options?: {
|
|
72
71
|
readonly shellVersion?: string;
|
|
73
72
|
}): string;
|
|
74
|
-
export declare function renderList(
|
|
73
|
+
export declare function renderList(root: string, modules: readonly DiyModule[], shape?: WorkspaceShape): string;
|
|
@@ -2,4 +2,5 @@ import type { DshHostContext } from '@dsh-workbench/shared';
|
|
|
2
2
|
import type { DebugStore } from '@dsh-workbench/shared/host';
|
|
3
3
|
import type { MarketService } from './market';
|
|
4
4
|
import type { PanelsService } from './service';
|
|
5
|
+
export declare const PUBLISH_TIMEOUT_MS: number;
|
|
5
6
|
export declare function registerDiyTools(ctx: DshHostContext, market: MarketService, panels: PanelsService, debug: DebugStore): Array<() => void>;
|