@deepseek-ai/dsh-app-boot 0.1.6-alpha.1 → 0.1.6-alpha.2
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.i18n.yaml +2 -2
- package/README.md +18 -8
- package/README.zh.md +17 -7
- package/lib/index.js +359 -198
- package/lib/types/index.d.ts +61 -28
- package/lib/types/profile-context.d.ts +51 -0
- package/lib/types/profile-plugins.d.ts +60 -0
- package/lib/types/profile-sanitize.d.ts +13 -0
- package/lib/types/profile.d.ts +25 -9
- package/package.json +11 -19
- package/lib/types/watch-config.d.ts +0 -13
package/lib/types/index.d.ts
CHANGED
|
@@ -5,18 +5,21 @@
|
|
|
5
5
|
* config expressions, and drive the Cordis Loader against a leaf `cordis.yml` until the tree settles.
|
|
6
6
|
* @module @deepseek-ai/dsh-app-boot
|
|
7
7
|
*/
|
|
8
|
-
import { Context } from '@deepseek-ai/cordis';
|
|
8
|
+
import { Context, type FiberState } from '@deepseek-ai/cordis';
|
|
9
9
|
import { type Entry } from '@deepseek-ai/cordis-plugin-loader';
|
|
10
10
|
import { type PatchOptions } from '@deepseek-ai/cordis-plugin-include';
|
|
11
11
|
import { dshHomePath } from '@deepseek-ai/dsh-home-paths';
|
|
12
12
|
import { type LaunchEnvironmentSnapshot } from '@deepseek-ai/dsh-launch-environment';
|
|
13
|
+
export { readProfilePatches, resolveTelemetryPatch, type ProfileContext, type ProfilePnpmInvocation } from './profile-context.ts';
|
|
14
|
+
export { sanitizeProfile } from './profile-sanitize.ts';
|
|
15
|
+
export { readProfilePlugins, reconcileProfilePlugins, writeProfileBundles, type ProfilePluginLocation, type ProfilePluginDependency, type ProfilePluginInventory, type ProfilePluginReconciliation, } from './profile-plugins.ts';
|
|
13
16
|
declare module '@deepseek-ai/cordis' {
|
|
14
17
|
interface Context {
|
|
15
18
|
/** Harness-home path resolver available to Loader `!!js` config expressions. */
|
|
16
19
|
dshHomePath?: typeof dshHomePath;
|
|
17
20
|
}
|
|
18
21
|
}
|
|
19
|
-
export { composeEntries, createProfileResolutionGeneration, DEFAULT_PROFILE_BUNDLES,
|
|
22
|
+
export { composeEntries, createProfileResolutionGeneration, DEFAULT_PROFILE_BUNDLES, OPTIONAL_BUNDLES, healProfilesModuleFallback, healIsolatedProfileModuleFallback, unlinkProfileModuleFallback, initProfile, loadProfile, loadProfileDirectory, PROFILE_PATCH_FILENAME, PROFILE_TEMPLATES, PROFILES_DIR, readProfileManifest, resolveBundleDir, resolveProfileDir, writeProfileManifest, type Profile, type ProfileLayer, type ProfileManifest, type ProfileModuleFallbackOptions, type ProfileResolutionEntry, type ProfileResolutionGeneration, type ProfileResolutionMode, type ProfileTemplate, } from './profile.ts';
|
|
20
23
|
export { PluginPackages, type PluginPackage, type PluginPackagesConfig, } from './profile-resolution/service.ts';
|
|
21
24
|
/**
|
|
22
25
|
* Resolve the config to boot. Replay swaps a `cordis.yml` basename for
|
|
@@ -48,29 +51,14 @@ export declare function loadEnv(binName: string, dir?: string, warn?: (line: str
|
|
|
48
51
|
* @throws when either file declares a bootstrap-only variable, except {@link HOME_LAYER_PROXY_NAMES} in the Harness-home file.
|
|
49
52
|
*/
|
|
50
53
|
export declare function loadLayeredEnv(binName: string, cwd?: string, warn?: (line: string) => void): LaunchEnvironmentSnapshot;
|
|
51
|
-
/**
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
/**
|
|
58
|
-
* Compose the full patch list for a fresh user-layer generation —
|
|
59
|
-
* the same composition the app booted with, so a reload can interleave the
|
|
60
|
-
* new user patches between app-owned layers (bundle layers below,
|
|
61
|
-
* overlays above). Identity when omitted: the user layer
|
|
62
|
-
* is the whole patch list.
|
|
63
|
-
*/
|
|
64
|
-
compose?: (userPatches: PatchOptions[]) => PatchOptions[];
|
|
65
|
-
}
|
|
66
|
-
/**
|
|
67
|
-
* Watch the user patch layer and reapply it to the boot Include without rollback.
|
|
68
|
-
* @param ctx - settled app context containing the root Include and an active HMR service.
|
|
69
|
-
* @param options - diagnostic, file, and patch-composition inputs.
|
|
70
|
-
* @returns an asynchronous disposer after the exact-path watcher is ready.
|
|
71
|
-
* @throws when HMR or the root Include is absent, watcher setup fails, or initial path resolution fails.
|
|
54
|
+
/** Apply one complete patch generation and wait for Loader activation diagnostics.
|
|
55
|
+
* @param ctx Booted root context.
|
|
56
|
+
* @param patches Complete ordered patch list.
|
|
57
|
+
* @param binName Diagnostic prefix.
|
|
58
|
+
* @param requiredIds Explicit enablement targets whose existing failures also reject reconciliation.
|
|
59
|
+
* @returns Diagnostics for unchanged pre-existing inactive entries; new or changed failures reject.
|
|
72
60
|
*/
|
|
73
|
-
export declare function
|
|
61
|
+
export declare function reconcileProfilePatches(ctx: Context, patches: PatchOptions[], binName: string, requiredIds?: readonly string[]): Promise<string[]>;
|
|
74
62
|
/**
|
|
75
63
|
* Load an optional patch-list file: a top-level YAML array of loader patch
|
|
76
64
|
* entries (`@deepseek-ai/cordis-plugin-include`'s `PatchOptions`): id-targeted config
|
|
@@ -196,19 +184,63 @@ export declare const FAIL_LOUD_RELEASE_TIMEOUT_MS = 2000;
|
|
|
196
184
|
* @returns the uninstaller that removes the rejection handler.
|
|
197
185
|
*/
|
|
198
186
|
export declare function installFailLoud(binName: string, proc?: FailLoudProcess, release?: () => Promise<void> | void): () => void;
|
|
187
|
+
interface InactiveEntry {
|
|
188
|
+
/** Loader entry used to identify the bootstrap Include and required ids. */
|
|
189
|
+
entry: Entry;
|
|
190
|
+
/** Activation errors and missing services remain distinct for presentation. */
|
|
191
|
+
outcome: {
|
|
192
|
+
kind: 'failed';
|
|
193
|
+
error: unknown;
|
|
194
|
+
phase?: string;
|
|
195
|
+
} | {
|
|
196
|
+
kind: 'pending';
|
|
197
|
+
missing: string[];
|
|
198
|
+
};
|
|
199
|
+
}
|
|
200
|
+
/** Inactive plugin metadata without retaining its Context or Fiber. */
|
|
201
|
+
interface StartupEntryDiagnostic {
|
|
202
|
+
id: string;
|
|
203
|
+
module: string;
|
|
204
|
+
required: boolean;
|
|
205
|
+
fiberState: FiberState | undefined;
|
|
206
|
+
outcome: InactiveEntry['outcome'];
|
|
207
|
+
}
|
|
208
|
+
/** Startup warning or error arguments, including import errors with no Fiber. */
|
|
209
|
+
interface StartupLogRecord {
|
|
210
|
+
ts: number;
|
|
211
|
+
name: string;
|
|
212
|
+
type: string;
|
|
213
|
+
args: readonly unknown[];
|
|
214
|
+
}
|
|
215
|
+
/** Startup audit failure with non-enumerable metadata and original failures as its cause. */
|
|
216
|
+
export declare class StartupError extends Error {
|
|
217
|
+
readonly entries: readonly StartupEntryDiagnostic[];
|
|
218
|
+
/** Root configuration and startup logs, attached by boot after disposal. */
|
|
219
|
+
startup?: {
|
|
220
|
+
configurationPath: string;
|
|
221
|
+
messages: readonly StartupLogRecord[];
|
|
222
|
+
};
|
|
223
|
+
/**
|
|
224
|
+
* @param message - concise terminal diagnostic.
|
|
225
|
+
* @param entries - inactive plugin metadata and original failure values.
|
|
226
|
+
*/
|
|
227
|
+
constructor(message: string, entries: readonly StartupEntryDiagnostic[]);
|
|
228
|
+
}
|
|
199
229
|
/**
|
|
200
230
|
* Apply DSH startup policy to a settled Loader tree.
|
|
201
231
|
*
|
|
202
232
|
* Inactive entries from the global required list reject startup. Other
|
|
203
|
-
* inactive entries
|
|
233
|
+
* inactive entries join that failure diagnostic, or produce one warning when
|
|
234
|
+
* no required entry failed and leave successful siblings running.
|
|
204
235
|
* Required ids absent from the tree, and disabled required entries, are ignored.
|
|
205
236
|
* A throwing disabled expression is an entry failure, not a disabled entry.
|
|
206
237
|
* The bootstrap Include must activate so unreadable or invalid root config is fatal.
|
|
207
238
|
* @param ctx - the settled context whose Loader entries to audit.
|
|
208
|
-
* @param binName - the
|
|
239
|
+
* @param binName - the prefix on startup diagnostics.
|
|
209
240
|
* @param warn - sink for optional-entry warnings.
|
|
210
241
|
* @returns after optional warnings if required startup checks pass.
|
|
211
|
-
* @throws when the bootstrap Include or a required entry is inactive or its disabled expression throws
|
|
242
|
+
* @throws {@link StartupError} when the bootstrap Include or a required entry is inactive or its disabled expression throws;
|
|
243
|
+
* its message includes optional failures too.
|
|
212
244
|
*/
|
|
213
245
|
export declare function auditStartupEntries(ctx: Context, binName: string, warn?: (line: string) => void): Promise<void>;
|
|
214
246
|
/**
|
|
@@ -236,7 +268,8 @@ export declare function auditStartupEntries(ctx: Context, binName: string, warn?
|
|
|
236
268
|
* complete plugin set.
|
|
237
269
|
* @returns the root context after the initial startup audit, or as soon as a
|
|
238
270
|
* surface disposed the tree while startup was still in flight.
|
|
239
|
-
* @throws
|
|
271
|
+
* @throws {@link StartupError} for an inactive required entry, including all inactive plugins in its message;
|
|
272
|
+
* otherwise a labelled error after disposing the partial context — `host
|
|
240
273
|
* preparation failed` when `prepare` threw before any config-tree entry
|
|
241
274
|
* mounted, `plugin tree failed to load` afterwards. Cyclic causes terminate
|
|
242
275
|
* diagnostic traversal without replacing the original cause.
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { type Profile } from './profile.ts';
|
|
2
|
+
import type { PatchOptions } from '@deepseek-ai/cordis-plugin-include';
|
|
3
|
+
/** Application-owned package manager executable; environment applies only to package operations. */
|
|
4
|
+
export interface ProfilePnpmInvocation {
|
|
5
|
+
readonly command: string;
|
|
6
|
+
readonly args: readonly string[];
|
|
7
|
+
readonly env: Readonly<Record<string, string>>;
|
|
8
|
+
}
|
|
9
|
+
/** Current profile facts; scheduling and mutation belong to their callers. */
|
|
10
|
+
export interface ProfileContext {
|
|
11
|
+
readonly name: string;
|
|
12
|
+
/** Packaged applications supply their bundled runtime instead of a PATH executable. */
|
|
13
|
+
readonly packageManager?: ProfilePnpmInvocation;
|
|
14
|
+
readonly dir: string;
|
|
15
|
+
readonly patchPath: string;
|
|
16
|
+
readonly installAnchor: string;
|
|
17
|
+
readonly cwd: string;
|
|
18
|
+
readonly home: string;
|
|
19
|
+
/** Bundle packages used to start this process, before any persisted edits. */
|
|
20
|
+
readonly startedBundles: readonly string[];
|
|
21
|
+
/** Parsed command-line overlays, applied above profile and home patches. */
|
|
22
|
+
readonly overlays: readonly PatchOptions[];
|
|
23
|
+
/** Launch-time DSH_TELEMETRY_DISABLED value; any non-empty value opts out. */
|
|
24
|
+
readonly telemetryDisabledEnv: string | undefined;
|
|
25
|
+
}
|
|
26
|
+
declare module '@deepseek-ai/cordis' {
|
|
27
|
+
interface Context {
|
|
28
|
+
/** Present only in a profile launched by dsh. */
|
|
29
|
+
profileContext: ProfileContext;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Resolve the telemetry opt-out switch into its boot patch. ANY non-empty
|
|
34
|
+
* value (including `'0'`/`'false'`) disables: a privacy switch prefers
|
|
35
|
+
* off-by-mistake over on-by-mistake. A composition without the telemetry row
|
|
36
|
+
* exports nothing, so the switch is then trivially satisfied and no patch is
|
|
37
|
+
* generated — custom profiles need not mount telemetry to run with the
|
|
38
|
+
* switch set.
|
|
39
|
+
* @param disabledEnv - the raw `DSH_TELEMETRY_DISABLED` value (`undefined` when unset).
|
|
40
|
+
* @param hasRow - whether the composition carries the telemetry row.
|
|
41
|
+
* @returns the disable patch, or `undefined` when no hard-disable patch is required.
|
|
42
|
+
*/
|
|
43
|
+
export declare function resolveTelemetryPatch(disabledEnv: string | undefined, hasRow: boolean): PatchOptions | undefined;
|
|
44
|
+
/** Read current bundle and user layers with the launch-time overlays.
|
|
45
|
+
* @param binName Diagnostic prefix for malformed or missing configuration.
|
|
46
|
+
* @param context Data supplied by the profile launcher.
|
|
47
|
+
* @param initialProfile Already loaded startup profile; omitted reads the current files.
|
|
48
|
+
* @returns Detached ordered patches; this function does not update the Loader.
|
|
49
|
+
*/
|
|
50
|
+
export declare function readProfilePatches(binName: string, context: ProfileContext, initialProfile?: Profile): PatchOptions[];
|
|
51
|
+
//# sourceMappingURL=profile-context.d.ts.map
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
/** Installed profile dependencies and their bundle activation after package-manager operations. */
|
|
2
|
+
import { type ProfileManifest } from './profile.ts';
|
|
3
|
+
/** Profile directory and installation used by the shared bundle resolver. */
|
|
4
|
+
export interface ProfilePluginLocation {
|
|
5
|
+
/** Diagnostic prefix for profile manifest failures. */
|
|
6
|
+
readonly binName: string;
|
|
7
|
+
/** Profile package directory managed by pnpm. */
|
|
8
|
+
readonly profileDir: string;
|
|
9
|
+
/** Absolute package.json path of the owning dsh installation. */
|
|
10
|
+
readonly installAnchor: string;
|
|
11
|
+
}
|
|
12
|
+
/** One dependency under its package-manager key, including npm aliases. */
|
|
13
|
+
export interface ProfilePluginDependency {
|
|
14
|
+
/** Dependency key used in package.json and the bundle list. */
|
|
15
|
+
readonly name: string;
|
|
16
|
+
/** Installed version, or the dependency spec when installed metadata is unavailable. */
|
|
17
|
+
readonly version: string;
|
|
18
|
+
/** Whether the package selected by the bundle resolver declares a patch. */
|
|
19
|
+
readonly bundle: boolean;
|
|
20
|
+
/** Whether the dependency appears in the profile's active bundle list. */
|
|
21
|
+
readonly enabled: boolean;
|
|
22
|
+
}
|
|
23
|
+
/** Profile manifest and dependencies in manifest order. */
|
|
24
|
+
export interface ProfilePluginInventory {
|
|
25
|
+
readonly manifest: ProfileManifest;
|
|
26
|
+
readonly dependencies: readonly ProfilePluginDependency[];
|
|
27
|
+
}
|
|
28
|
+
/** Result of reconciling bundle activation after a successful package operation. */
|
|
29
|
+
export interface ProfilePluginReconciliation {
|
|
30
|
+
readonly plugins: ProfilePluginInventory;
|
|
31
|
+
/** Newly added ordinary dependencies, for optional caller-owned diagnostics. */
|
|
32
|
+
readonly addedPlainDependencies: readonly string[];
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* Read installed versions and bundle declarations without requiring loadable plugin code.
|
|
36
|
+
* Missing or unreadable installed metadata leaves the dependency visible for repair or removal.
|
|
37
|
+
* @param location - profile and installation resolution inputs.
|
|
38
|
+
* @returns dependency records in package.json order and the profile manifest.
|
|
39
|
+
*/
|
|
40
|
+
export declare function readProfilePlugins(location: ProfilePluginLocation): ProfilePluginInventory;
|
|
41
|
+
/**
|
|
42
|
+
* Write a bundle list while preserving the supplied profile's other metadata.
|
|
43
|
+
* @param profileDir - directory whose package.json is updated.
|
|
44
|
+
* @param manifest - current profile manifest, read after the package operation when applicable.
|
|
45
|
+
* @param bundles - ordered active bundle names, including any template entries.
|
|
46
|
+
* @returns the written manifest.
|
|
47
|
+
*/
|
|
48
|
+
export declare function writeProfileBundles(profileDir: string, manifest: ProfileManifest, bundles: readonly string[]): ProfileManifest;
|
|
49
|
+
/**
|
|
50
|
+
* Reconcile installed bundle declarations after a successful package-manager operation.
|
|
51
|
+
* Dependency-managed entries disappear when removed or when their package loses its declaration;
|
|
52
|
+
* template entries retain their order and duplicates. New bundle dependencies activate automatically.
|
|
53
|
+
* @param options - location, inventory captured before pnpm, and whether explicitly disabled bundles remain disabled.
|
|
54
|
+
* @returns updated inventory and newly added ordinary dependencies for caller-owned warnings.
|
|
55
|
+
*/
|
|
56
|
+
export declare function reconcileProfilePlugins(options: ProfilePluginLocation & {
|
|
57
|
+
readonly before: ProfilePluginInventory;
|
|
58
|
+
readonly preserveDisabled: boolean;
|
|
59
|
+
}): ProfilePluginReconciliation;
|
|
60
|
+
//# sourceMappingURL=profile-plugins.d.ts.map
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/** Filesystem recovery for callers that own profile shutdown and write exclusion. */
|
|
2
|
+
/**
|
|
3
|
+
* Back up the profile patch and retain only the caller's recovery bundles.
|
|
4
|
+
* The caller must stop the profile and exclude concurrent profile writes.
|
|
5
|
+
* Installed packages and other manifest fields are preserved; patches are never parsed.
|
|
6
|
+
* Failures propagate and may leave completed changes in place for a retry.
|
|
7
|
+
* @param binName - Diagnostic prefix for invalid profile manifests.
|
|
8
|
+
* @param profileDir - Profile directory to recover without loading its plugins.
|
|
9
|
+
* @param bundles - Ordered bundles to enable after recovery.
|
|
10
|
+
* @returns Backup path with a Unix millisecond timestamp and optional collision ordinal, or undefined if absent.
|
|
11
|
+
*/
|
|
12
|
+
export declare function sanitizeProfile(binName: string, profileDir: string, bundles: readonly string[]): string | undefined;
|
|
13
|
+
//# sourceMappingURL=profile-sanitize.d.ts.map
|
package/lib/types/profile.d.ts
CHANGED
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
*/
|
|
25
25
|
import type { EntryOptions } from '@deepseek-ai/cordis-plugin-loader';
|
|
26
26
|
import { type PatchOptions } from '@deepseek-ai/cordis-plugin-include';
|
|
27
|
-
import type { DshPackageManifest
|
|
27
|
+
import type { DshPackageManifest } from '@deepseek-ai/dsh-package-manifest';
|
|
28
28
|
/** Directory under the Harness home holding every profile. */
|
|
29
29
|
export declare const PROFILES_DIR = "profiles";
|
|
30
30
|
/** The user patch layer inside a profile directory (hot-reloaded on long-lived surfaces). */
|
|
@@ -33,8 +33,6 @@ export declare const PROFILE_PATCH_FILENAME = "cordis.patch.yml";
|
|
|
33
33
|
export interface ProfileTemplate {
|
|
34
34
|
/** Ordered bundle layer list. */
|
|
35
35
|
bundles: readonly string[];
|
|
36
|
-
/** User patch-file lifecycle for the generated profile. */
|
|
37
|
-
patchReload: ProfilePatchReload;
|
|
38
36
|
}
|
|
39
37
|
/** Package metadata accepted by the profile reader; local profiles need no published identity. */
|
|
40
38
|
export type ProfileManifest = Partial<DshPackageManifest>;
|
|
@@ -61,8 +59,6 @@ export interface Profile {
|
|
|
61
59
|
patchPath: string;
|
|
62
60
|
/** The profile's own patches; empty when the file is absent. */
|
|
63
61
|
patches: PatchOptions[];
|
|
64
|
-
/** Whether the launcher watches user patch files after boot. */
|
|
65
|
-
patchReload: ProfilePatchReload;
|
|
66
62
|
}
|
|
67
63
|
/** One package selected by the profile module-fallback rules. */
|
|
68
64
|
export interface ProfileResolutionEntry {
|
|
@@ -101,17 +97,21 @@ export declare function resolveProfileDir(name: string, home?: string): string;
|
|
|
101
97
|
export declare const PROFILE_TEMPLATES: Record<string, ProfileTemplate>;
|
|
102
98
|
/** The bundle list a `dsh plugin` init uses for a name with no shipped template. */
|
|
103
99
|
export declare const DEFAULT_PROFILE_BUNDLES: readonly string[];
|
|
104
|
-
/**
|
|
105
|
-
|
|
100
|
+
/**
|
|
101
|
+
* The bundles the dsh installation ships for a person to switch on: each a
|
|
102
|
+
* runtime dependency of the installation that declares `dsh.bundle.patch`,
|
|
103
|
+
* selected by no shipped template, and offered switched off by the plugin
|
|
104
|
+
* manager ([rationale](../../../../.agents/notes/implemented/process/2026-09-15-shipped-optional-bundles.md)).
|
|
105
|
+
*/
|
|
106
|
+
export declare const OPTIONAL_BUNDLES: readonly string[];
|
|
106
107
|
/**
|
|
107
108
|
* Initialize a profile directory: manifest, empty user patch layer, and the
|
|
108
109
|
* pnpm settings out-of-tree plugins need. Existing files are never touched,
|
|
109
110
|
* so re-running is a no-op on an initialized profile.
|
|
110
111
|
* @param dir - the profile directory from {@link resolveProfileDir}.
|
|
111
112
|
* @param bundles - the initial `dsh.profile.bundles` layer list.
|
|
112
|
-
* @param patchReload - user patch-file lifecycle; custom profiles default to live reload.
|
|
113
113
|
*/
|
|
114
|
-
export declare function initProfile(dir: string, bundles: readonly string[]
|
|
114
|
+
export declare function initProfile(dir: string, bundles: readonly string[]): void;
|
|
115
115
|
/** Inputs for {@link healProfilesModuleFallback}. */
|
|
116
116
|
export interface ProfileModuleFallbackOptions {
|
|
117
117
|
/** Absolute package.json path of the running dsh installation. */
|
|
@@ -142,6 +142,22 @@ export declare function healProfilesModuleFallback(options: ProfileModuleFallbac
|
|
|
142
142
|
* @returns the complete immutable generation.
|
|
143
143
|
*/
|
|
144
144
|
export declare function createProfileResolutionGeneration(options: Omit<ProfileModuleFallbackOptions, 'materialize'>): Promise<ProfileResolutionGeneration>;
|
|
145
|
+
/**
|
|
146
|
+
* Supply an application-owned profile with filesystem packages from its installation and selected bundles.
|
|
147
|
+
* All fallback links belong to the profile; no shared Harness-home directory is written.
|
|
148
|
+
* Existing pnpm-managed packages remain authoritative. The caller serializes profile mutations.
|
|
149
|
+
* @param options - owning installation package.json and the loaded application profile.
|
|
150
|
+
*/
|
|
151
|
+
export declare function healIsolatedProfileModuleFallback(options: {
|
|
152
|
+
installAnchor: string;
|
|
153
|
+
profile: Profile;
|
|
154
|
+
}): void;
|
|
155
|
+
/**
|
|
156
|
+
* Detach this profile's fallback links before a package-manager mutation.
|
|
157
|
+
* Installed packages and links replaced by pnpm remain untouched; the next profile launch restores fallbacks.
|
|
158
|
+
* @param profileDir - profile directory whose package mutation is serialized by the caller.
|
|
159
|
+
*/
|
|
160
|
+
export declare function unlinkProfileModuleFallback(profileDir: string): void;
|
|
145
161
|
/**
|
|
146
162
|
* Read a profile's manifest.
|
|
147
163
|
* @param binName - the diagnostic prefix on the thrown error.
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@deepseek-ai/dsh-app-boot",
|
|
3
3
|
"description": "Shared boot glue for the app bins: .env loading, fail-loud Loader guards, snapshot-aware config resolution, and the Loader boot sequence",
|
|
4
|
-
"version": "0.1.6-alpha.
|
|
4
|
+
"version": "0.1.6-alpha.2",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
7
7
|
},
|
|
@@ -32,38 +32,30 @@
|
|
|
32
32
|
],
|
|
33
33
|
"license": "MIT",
|
|
34
34
|
"dependencies": {
|
|
35
|
-
"chokidar": "4.0.3",
|
|
36
35
|
"js-yaml": "^4.2.0",
|
|
37
36
|
"node-addon-require-builtin": "^0.1.6",
|
|
38
37
|
"resolve.exports": "^2.0.3",
|
|
39
|
-
"@deepseek-ai/dsh-atomic-write": "^0.1.6-alpha.
|
|
40
|
-
"@deepseek-ai/dsh-package-manifest": "^0.1.6-alpha.
|
|
38
|
+
"@deepseek-ai/dsh-atomic-write": "^0.1.6-alpha.2",
|
|
39
|
+
"@deepseek-ai/dsh-package-manifest": "^0.1.6-alpha.2"
|
|
41
40
|
},
|
|
42
41
|
"peerDependencies": {
|
|
43
42
|
"@deepseek-ai/cordis-plugin-group": "^1.0.2",
|
|
44
|
-
"@deepseek-ai/cordis-plugin-hmr": "^1.0.17",
|
|
45
43
|
"@deepseek-ai/cordis-plugin-include": "^1.0.7",
|
|
46
44
|
"@deepseek-ai/cordis-plugin-loader": "^1.0.3",
|
|
47
|
-
"@deepseek-ai/dsh-launch-environment": "^0.1.6-alpha.
|
|
48
|
-
"@deepseek-ai/dsh-home-paths": "^0.1.6-alpha.
|
|
49
|
-
"@deepseek-ai/
|
|
50
|
-
"@deepseek-ai/
|
|
51
|
-
},
|
|
52
|
-
"peerDependenciesMeta": {
|
|
53
|
-
"@deepseek-ai/cordis-plugin-hmr": {
|
|
54
|
-
"optional": true
|
|
55
|
-
}
|
|
45
|
+
"@deepseek-ai/dsh-launch-environment": "^0.1.6-alpha.2",
|
|
46
|
+
"@deepseek-ai/dsh-home-paths": "^0.1.6-alpha.2",
|
|
47
|
+
"@deepseek-ai/cordis": "^4.0.2",
|
|
48
|
+
"@deepseek-ai/dsh-system-prompt": "^0.1.6-alpha.2"
|
|
56
49
|
},
|
|
57
50
|
"devDependencies": {
|
|
58
51
|
"@types/js-yaml": "^4.0.9",
|
|
59
52
|
"@deepseek-ai/cordis-plugin-group": "^1.0.2",
|
|
60
|
-
"@deepseek-ai/cordis-plugin-hmr": "^1.0.17",
|
|
61
53
|
"@deepseek-ai/cordis-plugin-include": "^1.0.7",
|
|
62
54
|
"@deepseek-ai/cordis-plugin-loader": "^1.0.3",
|
|
63
55
|
"@deepseek-ai/cordis-plugin-timer": "^1.1.4",
|
|
64
|
-
"@deepseek-ai/dsh-launch-environment": "^0.1.6-alpha.
|
|
65
|
-
"@deepseek-ai/dsh-
|
|
66
|
-
"@deepseek-ai/
|
|
67
|
-
"@deepseek-ai/
|
|
56
|
+
"@deepseek-ai/dsh-launch-environment": "^0.1.6-alpha.2",
|
|
57
|
+
"@deepseek-ai/dsh-home-paths": "^0.1.6-alpha.2",
|
|
58
|
+
"@deepseek-ai/cordis": "^4.0.2",
|
|
59
|
+
"@deepseek-ai/dsh-system-prompt": "^0.1.6-alpha.2"
|
|
68
60
|
}
|
|
69
61
|
}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { type ChokidarOptions } from 'chokidar';
|
|
2
|
-
import type { Context } from '@deepseek-ai/cordis';
|
|
3
|
-
/**
|
|
4
|
-
* Watch one patch path, including missing parents, and serialize refresh callbacks.
|
|
5
|
-
* @param ctx Context that owns watcher disposal and receives refresh failures.
|
|
6
|
-
* @param filename Absolute patch-file path.
|
|
7
|
-
* @param options Deployment watcher options inherited from the HMR configuration.
|
|
8
|
-
* @param refresh Callback for additions, changes, and removals.
|
|
9
|
-
* @returns A disposer that closes the watcher and drains its current refresh.
|
|
10
|
-
* @throws When path resolution, watcher startup, or effect registration fails.
|
|
11
|
-
*/
|
|
12
|
-
export declare function watchConfig(ctx: Context, filename: string, options: ChokidarOptions, refresh: () => Promise<void> | void): Promise<() => Promise<void>>;
|
|
13
|
-
//# sourceMappingURL=watch-config.d.ts.map
|