@askdkc/dsh-cli 0.12.2 → 0.13.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/README.md +6 -1
- package/cordis.patch.yml +12 -131
- package/lib/types/adapter/channel/session-projection.d.ts.map +1 -1
- package/lib/types/adapter/channel/session-projection.js +0 -7
- package/lib/types/adapter/ports/channel-view.d.ts +1 -1
- package/lib/types/adapter/ports/channel-view.d.ts.map +1 -1
- package/lib/types/dsh-adapter/bundled-presets.d.ts +3 -8
- package/lib/types/dsh-adapter/bundled-presets.d.ts.map +1 -1
- package/lib/types/dsh-adapter/bundled-presets.js +5 -20
- package/lib/types/dsh-adapter/channel/binding-events.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/binding-events.js +2 -9
- package/lib/types/dsh-adapter/channel/external-commands.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/external-commands.js +9 -33
- package/lib/types/dsh-adapter/channel/local-actions.d.ts +2 -1
- package/lib/types/dsh-adapter/channel/local-actions.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/local-actions.js +6 -2
- package/lib/types/dsh-adapter/channel/model-actions.js +3 -3
- package/lib/types/dsh-adapter/channel/model-switch.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/model-switch.js +0 -1
- package/lib/types/dsh-adapter/channel/permissions.d.ts +1 -6
- package/lib/types/dsh-adapter/channel/permissions.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/permissions.js +2 -54
- package/lib/types/dsh-adapter/channel/projection.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/projection.js +15 -70
- package/lib/types/dsh-adapter/channel/session-fork.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/session-fork.js +0 -1
- package/lib/types/dsh-adapter/channel/session-metadata.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/session-metadata.js +1 -4
- package/lib/types/dsh-adapter/channel/session-resume.js +2 -2
- package/lib/types/dsh-adapter/channel/session-rewind.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/session-rewind.js +0 -1
- package/lib/types/dsh-adapter/channel/session-tree-actions.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/session-tree-actions.js +1 -2
- package/lib/types/dsh-adapter/channel/session-tree.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/session-tree.js +9 -62
- package/lib/types/dsh-adapter/channel/skill-catalog.js +1 -1
- package/lib/types/dsh-adapter/channel/subagent-projection.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/subagent-projection.js +2 -8
- package/lib/types/dsh-adapter/channel/transcript.d.ts +0 -16
- package/lib/types/dsh-adapter/channel/transcript.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/transcript.js +0 -43
- package/lib/types/dsh-adapter/channel.js +2 -2
- package/lib/types/dsh-adapter/compat/index.d.ts +5 -25
- package/lib/types/dsh-adapter/compat/index.d.ts.map +1 -1
- package/lib/types/dsh-adapter/compat/index.js +5 -25
- package/lib/types/dsh-adapter/compat/liveSession.d.ts +12 -23
- package/lib/types/dsh-adapter/compat/liveSession.d.ts.map +1 -1
- package/lib/types/dsh-adapter/compat/liveSession.js +15 -68
- package/lib/types/dsh-adapter/compat/messages.d.ts +1 -3
- package/lib/types/dsh-adapter/compat/messages.d.ts.map +1 -1
- package/lib/types/dsh-adapter/compat/messages.js +2 -10
- package/lib/types/dsh-adapter/compat/persistence.d.ts +2 -3
- package/lib/types/dsh-adapter/compat/persistence.d.ts.map +1 -1
- package/lib/types/dsh-adapter/compat/persistence.js +9 -14
- package/lib/types/dsh-adapter/compat/sessionLog.d.ts +10 -144
- package/lib/types/dsh-adapter/compat/sessionLog.d.ts.map +1 -1
- package/lib/types/dsh-adapter/compat/sessionLog.js +45 -275
- package/lib/types/dsh-adapter/compat/settings.d.ts +4 -10
- package/lib/types/dsh-adapter/compat/settings.d.ts.map +1 -1
- package/lib/types/dsh-adapter/compat/settings.js +6 -23
- package/lib/types/dsh-adapter/compat/shell.d.ts +2 -3
- package/lib/types/dsh-adapter/compat/shell.d.ts.map +1 -1
- package/lib/types/dsh-adapter/compat/shell.js +2 -7
- package/lib/types/dsh-adapter/contract.d.ts +4 -34
- package/lib/types/dsh-adapter/contract.d.ts.map +1 -1
- package/lib/types/dsh-adapter/contract.js +8 -83
- package/lib/types/dsh-adapter/packaged-presets.d.ts +0 -19
- package/lib/types/dsh-adapter/packaged-presets.d.ts.map +1 -1
- package/lib/types/dsh-adapter/packaged-presets.js +1 -83
- package/lib/types/dsh-adapter/plugin.d.ts.map +1 -1
- package/lib/types/dsh-adapter/plugin.js +25 -168
- package/lib/types/dsh-adapter/preset-resolution.d.ts +1 -22
- package/lib/types/dsh-adapter/preset-resolution.d.ts.map +1 -1
- package/lib/types/dsh-adapter/preset-resolution.js +0 -34
- package/lib/types/dsh-adapter/presets.d.ts +1 -4
- package/lib/types/dsh-adapter/presets.d.ts.map +1 -1
- package/lib/types/dsh-adapter/presets.js +3 -6
- package/lib/types/dsh-adapter/questions-answerer.d.ts +5 -43
- package/lib/types/dsh-adapter/questions-answerer.d.ts.map +1 -1
- package/lib/types/dsh-adapter/questions-answerer.js +7 -63
- package/lib/types/dsh-adapter/sessionTree.d.ts +0 -19
- package/lib/types/dsh-adapter/sessionTree.d.ts.map +1 -1
- package/lib/types/dsh-adapter/sessionTree.js +2 -112
- package/lib/types/dsh-adapter/sessions/header.d.ts +2 -2
- package/lib/types/dsh-adapter/sessions/header.d.ts.map +1 -1
- package/lib/types/dsh-adapter/sessions/header.js +2 -8
- package/lib/types/dsh-adapter/sessions/list.d.ts +7 -28
- package/lib/types/dsh-adapter/sessions/list.d.ts.map +1 -1
- package/lib/types/dsh-adapter/sessions/list.js +48 -103
- package/lib/types/dsh-adapter/sessions/store.d.ts +1 -2
- package/lib/types/dsh-adapter/sessions/store.d.ts.map +1 -1
- package/lib/types/dsh-adapter/sessions/store.js +7 -10
- package/lib/types/dsh-adapter/sharp.d.ts.map +1 -1
- package/lib/types/dsh-adapter/sharp.js +0 -1
- package/lib/types/dsh-adapter/subagents.d.ts +1 -2
- package/lib/types/dsh-adapter/subagents.d.ts.map +1 -1
- package/lib/types/dsh-adapter/subagents.js +1 -12
- package/lib/types/dsh-adapter/trajectory/aggregate.d.ts +1 -1
- package/lib/types/dsh-adapter/trajectory/aggregate.js +1 -1
- package/lib/types/dsh-adapter/trajectory/guards.d.ts +5 -22
- package/lib/types/dsh-adapter/trajectory/guards.d.ts.map +1 -1
- package/lib/types/dsh-adapter/trajectory/guards.js +5 -23
- package/lib/types/dsh-adapter/trajectory/projection.d.ts +5 -21
- package/lib/types/dsh-adapter/trajectory/projection.d.ts.map +1 -1
- package/lib/types/dsh-adapter/trajectory/projection.js +4 -38
- package/lib/types/dsh-adapter/trajectory/types.d.ts +1 -1
- package/lib/types/dsh-adapter/trajectory/types.d.ts.map +1 -1
- package/lib/types/i18n.d.ts +2 -22
- package/lib/types/i18n.d.ts.map +1 -1
- package/lib/types/i18n.js +2 -10
- package/lib/types/presetPrefs.d.ts +1 -3
- package/lib/types/presetPrefs.d.ts.map +1 -1
- package/lib/types/presetPrefs.js +2 -4
- package/node_modules/@askdkc/dsh-auth/README.ja.md +28 -3
- package/node_modules/@askdkc/dsh-auth/README.md +19 -3
- package/node_modules/@askdkc/dsh-auth/dsh-plugin.json +3 -3
- package/node_modules/@askdkc/dsh-auth/lib/THIRD_PARTY_NOTICES.txt +168 -0
- package/node_modules/@askdkc/dsh-auth/lib/abortable.d.ts +2 -0
- package/node_modules/@askdkc/dsh-auth/lib/abortable.js +9 -0
- package/node_modules/@askdkc/dsh-auth/lib/auth-contract.d.ts +66 -0
- package/node_modules/@askdkc/dsh-auth/lib/auth-contract.js +1 -0
- package/node_modules/@askdkc/dsh-auth/lib/command.js +15 -1
- package/node_modules/@askdkc/dsh-auth/lib/credentials.d.ts +8 -14
- package/node_modules/@askdkc/dsh-auth/lib/credentials.js +1 -1
- package/node_modules/@askdkc/dsh-auth/lib/index.d.ts +8 -27
- package/node_modules/@askdkc/dsh-auth/lib/index.js +67 -64
- package/node_modules/@askdkc/dsh-auth/lib/interaction.d.ts +5 -5
- package/node_modules/@askdkc/dsh-auth/lib/opencode-adapter.d.ts +37 -0
- package/node_modules/@askdkc/dsh-auth/lib/opencode-adapter.js +197 -0
- package/node_modules/@askdkc/dsh-auth/lib/opencode-catalog.d.ts +72 -0
- package/node_modules/@askdkc/dsh-auth/lib/opencode-catalog.js +252 -0
- package/node_modules/@askdkc/dsh-auth/lib/opencode-codec.d.ts +6 -0
- package/node_modules/@askdkc/dsh-auth/lib/opencode-codec.js +93 -0
- package/node_modules/@askdkc/dsh-auth/lib/opencode-owned.generated.d.ts +113 -0
- package/node_modules/@askdkc/dsh-auth/lib/opencode-owned.generated.js +2866 -0
- package/node_modules/@askdkc/dsh-auth/lib/opencode-replay.d.ts +15 -0
- package/node_modules/@askdkc/dsh-auth/lib/opencode-replay.js +141 -0
- package/node_modules/@askdkc/dsh-auth/lib/opencode-sdk.d.ts +5 -0
- package/node_modules/@askdkc/dsh-auth/lib/opencode-sdk.js +43465 -0
- package/node_modules/@askdkc/dsh-auth/lib/opencode-sdk.js.map +7 -0
- package/node_modules/@askdkc/dsh-auth/lib/opencode-transport.d.ts +5 -0
- package/node_modules/@askdkc/dsh-auth/lib/opencode-transport.js +69 -0
- package/node_modules/@askdkc/dsh-auth/lib/pi-ai.d.ts +2 -1
- package/node_modules/@askdkc/dsh-auth/lib/pi-ai.js +2 -1
- package/node_modules/@askdkc/dsh-auth/lib/pi-routes.d.ts +32 -0
- package/node_modules/@askdkc/dsh-auth/lib/pi-routes.js +45 -0
- package/node_modules/@askdkc/dsh-auth/lib/profiles.d.ts +2 -20
- package/node_modules/@askdkc/dsh-auth/lib/profiles.js +6 -35
- package/node_modules/@askdkc/dsh-auth/lib/routes.d.ts +20 -0
- package/node_modules/@askdkc/dsh-auth/lib/routes.js +13 -0
- package/node_modules/@askdkc/dsh-auth/lib/service.d.ts +11 -2
- package/node_modules/@askdkc/dsh-auth/lib/service.js +26 -16
- package/node_modules/@askdkc/dsh-auth/package.json +26 -14
- package/package.json +100 -96
- package/lib/types/dsh-adapter/providerGuard.d.ts +0 -75
- package/lib/types/dsh-adapter/providerGuard.d.ts.map +0 -1
- package/lib/types/dsh-adapter/providerGuard.js +0 -104
- package/lib/types/migrationPrefs.d.ts +0 -60
- package/lib/types/migrationPrefs.d.ts.map +0 -1
- package/lib/types/migrationPrefs.js +0 -97
- package/presets/liangshen/.dsh-tui-managed.json +0 -5
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { Context } from '@deepseek-ai/cordis';
|
|
2
2
|
import type Schema from '@deepseek-ai/schemastery';
|
|
3
|
-
/**
|
|
3
|
+
/** Volatile Config fields are refs; ordinary fields retain plain values. */
|
|
4
4
|
export type RuntimeConfig<T> = {
|
|
5
5
|
[K in keyof T]: T[K] | {
|
|
6
6
|
get(): T[K];
|
|
@@ -16,16 +16,10 @@ interface SettingsScope<T> {
|
|
|
16
16
|
get(): T;
|
|
17
17
|
watch(callback: (next: T) => void): () => void;
|
|
18
18
|
}
|
|
19
|
-
/**
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
*/
|
|
23
|
-
export declare function createSettingsScope<T>(ctx: Context, service: unknown, ns: string, schema: Schema<T>, current: () => T): SettingsScope<T> & {
|
|
24
|
-
legacy: boolean;
|
|
25
|
-
};
|
|
26
|
-
/** New settings forms expose values through describe(), not get(). */
|
|
19
|
+
/** Watch committed Config values on the owning Loader fiber. */
|
|
20
|
+
export declare function createSettingsScope<T>(ctx: Context, current: () => T): SettingsScope<T>;
|
|
21
|
+
/** Read the current settings form descriptor. */
|
|
27
22
|
export declare function settingsValue(settings: {
|
|
28
|
-
get?(ns: string): unknown;
|
|
29
23
|
describe(): readonly {
|
|
30
24
|
ns: string;
|
|
31
25
|
value?: unknown;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"settings.d.ts","sourceRoot":"","sources":["../../../../src/dsh-adapter/compat/settings.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAA;AAClD,OAAO,KAAK,MAAM,MAAM,0BAA0B,CAAA;AAElD,4EAA4E;AAC5E,MAAM,MAAM,aAAa,CAAC,CAAC,IAAI;KAAG,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG;QAAE,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC,CAAA;KAAE;CAAE,CAAA;AAEzE,iFAAiF;AACjF,wBAAgB,cAAc,CAAC,CAAC,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,SAAS,CAAC,MAAM,CAAC,CAAC,EAAE,GAAG,MAAM,CAAC,CAAC,EAAE,aAAa,CAAC,CAAC,CAAC,CAAC,CAM5G;AAED,4EAA4E;AAC5E,wBAAgB,wBAAwB,CAAC,GAAG,EAAE,OAAO,EAAE,MAAM,EAAE,IAAI,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,MAAM,
|
|
1
|
+
{"version":3,"file":"settings.d.ts","sourceRoot":"","sources":["../../../../src/dsh-adapter/compat/settings.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAA;AAClD,OAAO,KAAK,MAAM,MAAM,0BAA0B,CAAA;AAElD,4EAA4E;AAC5E,MAAM,MAAM,aAAa,CAAC,CAAC,IAAI;KAAG,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG;QAAE,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC,CAAA;KAAE;CAAE,CAAA;AAEzE,iFAAiF;AACjF,wBAAgB,cAAc,CAAC,CAAC,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,SAAS,CAAC,MAAM,CAAC,CAAC,EAAE,GAAG,MAAM,CAAC,CAAC,EAAE,aAAa,CAAC,CAAC,CAAC,CAAC,CAM5G;AAED,4EAA4E;AAC5E,wBAAgB,wBAAwB,CAAC,GAAG,EAAE,OAAO,EAAE,MAAM,EAAE,IAAI,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,MAAM,CAQ3F;AAED,iFAAiF;AACjF,wBAAgB,YAAY,CAAC,CAAC,SAAS,MAAM,EAAE,MAAM,EAAE,aAAa,CAAC,CAAC,CAAC,GAAG,CAAC,CAO1E;AAED,UAAU,aAAa,CAAC,CAAC;IACvB,GAAG,IAAI,CAAC,CAAA;IACR,KAAK,CAAC,QAAQ,EAAE,CAAC,IAAI,EAAE,CAAC,KAAK,IAAI,GAAG,MAAM,IAAI,CAAA;CAC/C;AAED,gEAAgE;AAChE,wBAAgB,mBAAmB,CAAC,CAAC,EAAE,GAAG,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,CAAC,GAAG,aAAa,CAAC,CAAC,CAAC,CAKvF;AAED,iDAAiD;AACjD,wBAAgB,aAAa,CAAC,QAAQ,EAAE;IACtC,QAAQ,IAAI,SAAS;QAAE,EAAE,EAAE,MAAM,CAAC;QAAC,KAAK,CAAC,EAAE,OAAO,CAAA;KAAE,EAAE,CAAA;CACvD,EAAE,EAAE,EAAE,MAAM,GAAG,OAAO,CAEtB"}
|
|
@@ -2,16 +2,13 @@
|
|
|
2
2
|
export function editableConfig(schema, keys) {
|
|
3
3
|
for (const key of keys) {
|
|
4
4
|
const field = schema.dict?.[String(key)];
|
|
5
|
-
if (field !== undefined
|
|
5
|
+
if (field !== undefined)
|
|
6
6
|
schema.dict[String(key)] = field.volatile();
|
|
7
7
|
}
|
|
8
8
|
return schema;
|
|
9
9
|
}
|
|
10
10
|
/** Settings forms use the Config owner's Loader ID, not the plugin name. */
|
|
11
11
|
export function resolveSettingsNamespace(ctx, schema) {
|
|
12
|
-
const settings = ctx.get('settings');
|
|
13
|
-
if (!settings || typeof settings.register === 'function')
|
|
14
|
-
return 'dsh-tui';
|
|
15
12
|
if (!Object.values(schema.dict ?? {}).some(field => field.meta.volatile === true)) {
|
|
16
13
|
throw new Error('dsh-tui: profile-backed settings require @deepseek-ai/schemastery >= 3.18.3 with volatile Config support. Update DSH and reinstall the current profile dependencies before starting the TUI.');
|
|
17
14
|
}
|
|
@@ -30,28 +27,14 @@ export function configValues(config) {
|
|
|
30
27
|
: value,
|
|
31
28
|
]));
|
|
32
29
|
}
|
|
33
|
-
/**
|
|
34
|
-
|
|
35
|
-
* Pass the Config owner's context, and dispose watch with the consumer's lifecycle.
|
|
36
|
-
*/
|
|
37
|
-
export function createSettingsScope(ctx, service, ns, schema, current) {
|
|
38
|
-
const settings = service;
|
|
39
|
-
if (typeof settings.register === 'function') {
|
|
40
|
-
const scope = settings.register(ns, schema);
|
|
41
|
-
return { legacy: true, get: () => scope.get(), watch: callback => scope.watch(callback) };
|
|
42
|
-
}
|
|
30
|
+
/** Watch committed Config values on the owning Loader fiber. */
|
|
31
|
+
export function createSettingsScope(ctx, current) {
|
|
43
32
|
return {
|
|
44
|
-
legacy: false,
|
|
45
33
|
get: current,
|
|
46
|
-
watch(callback)
|
|
47
|
-
// The event is absent from the old framework's type map. Cordis owns
|
|
48
|
-
// listener disposal and emits it only to the updated plugin fiber.
|
|
49
|
-
const events = ctx;
|
|
50
|
-
return events.on('loader/volatile-update', () => callback(current()));
|
|
51
|
-
},
|
|
34
|
+
watch: callback => ctx.on('loader/volatile-update', () => callback(current())),
|
|
52
35
|
};
|
|
53
36
|
}
|
|
54
|
-
/**
|
|
37
|
+
/** Read the current settings form descriptor. */
|
|
55
38
|
export function settingsValue(settings, ns) {
|
|
56
|
-
return
|
|
39
|
+
return settings.describe().find(row => row.ns === ns)?.value;
|
|
57
40
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** Foreground shell
|
|
1
|
+
/** Foreground shell requests retain the host-resolved execution policy. */
|
|
2
2
|
export interface ShellRequest {
|
|
3
3
|
command: string;
|
|
4
4
|
workdir?: string;
|
|
@@ -15,8 +15,7 @@ export interface ShellResult {
|
|
|
15
15
|
}
|
|
16
16
|
export interface ForegroundShell {
|
|
17
17
|
resolve(request: ShellRequest): unknown;
|
|
18
|
-
|
|
19
|
-
execute?(spec: unknown): Promise<{
|
|
18
|
+
execute(spec: unknown): Promise<{
|
|
20
19
|
result(): Promise<ShellResult>;
|
|
21
20
|
}>;
|
|
22
21
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shell.d.ts","sourceRoot":"","sources":["../../../../src/dsh-adapter/compat/shell.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"shell.d.ts","sourceRoot":"","sources":["../../../../src/dsh-adapter/compat/shell.ts"],"names":[],"mappings":"AAAA,2EAA2E;AAC3E,MAAM,WAAW,YAAY;IAC3B,OAAO,EAAE,MAAM,CAAA;IACf,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,SAAS,EAAE,MAAM,CAAA;CAClB;AAED,MAAM,WAAW,WAAW;IAC1B,MAAM,EAAE;QAAE,IAAI,EAAE,MAAM,CAAA;KAAE,CAAA;IACxB,MAAM,EAAE;QAAE,IAAI,EAAE,MAAM,CAAA;KAAE,CAAA;IACxB,QAAQ,EAAE,OAAO,CAAA;CAClB;AAED,MAAM,WAAW,eAAe;IAC9B,OAAO,CAAC,OAAO,EAAE,YAAY,GAAG,OAAO,CAAA;IACvC,OAAO,CAAC,IAAI,EAAE,OAAO,GAAG,OAAO,CAAC;QAAE,MAAM,IAAI,OAAO,CAAC,WAAW,CAAC,CAAA;KAAE,CAAC,CAAA;CACpE;AAED,iFAAiF;AACjF,wBAAsB,kBAAkB,CAAC,KAAK,EAAE,eAAe,EAAE,OAAO,EAAE,YAAY,GAAG,OAAO,CAAC,WAAW,CAAC,CAI5G"}
|
|
@@ -1,11 +1,6 @@
|
|
|
1
1
|
/** Resolve through the host so workspace, timeout and sandbox policy survive. */
|
|
2
2
|
export async function runForegroundShell(shell, request) {
|
|
3
3
|
const spec = shell.resolve(request);
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
return execution.result();
|
|
7
|
-
}
|
|
8
|
-
if (typeof shell.run === 'function')
|
|
9
|
-
return shell.run(spec);
|
|
10
|
-
throw new Error('dsh-tui: shell provides neither execute() nor run()');
|
|
4
|
+
const execution = await shell.execute(spec);
|
|
5
|
+
return execution.result();
|
|
11
6
|
}
|
|
@@ -1,23 +1,7 @@
|
|
|
1
1
|
/** Primary validated upstream line (newest). */
|
|
2
2
|
export declare const UPSTREAM_VALIDATED_VERSION = "0.2.0-rc.2";
|
|
3
|
-
/**
|
|
4
|
-
|
|
5
|
-
*
|
|
6
|
-
* 0.2.0-rc.2 = primary continuous-CI line; 0.2.0-rc.1 = previous primary;
|
|
7
|
-
* 0.1.7-rc.2/rc.1 = previous
|
|
8
|
-
* build (mapped compatibility); 0.1.5-rc.1/alpha.2/alpha.1 = mapped
|
|
9
|
-
* compatibility lines (source-checked when the primary line moves);
|
|
10
|
-
* 0.1.3-alpha.2 = compatibility line (the only 0.1.3 build on npm);
|
|
11
|
-
* 0.1.2-rc.1 = previous family (full CI coverage); 0.1.2-alpha.3–alpha.5 =
|
|
12
|
-
* mapped compatibility lines; 0.1.1-rc.1/rc.2 = compatibility lines
|
|
13
|
-
* (install- and type-level compatibility); 0.1.0-rc.7/rc.8 = full CI
|
|
14
|
-
* coverage; 0.1.0-rc.6 = legacy line (install- and type-level
|
|
15
|
-
* compatibility, feature surface may lack later additions — new features
|
|
16
|
-
* must degrade gracefully there).
|
|
17
|
-
* The peer range in package.json is deliberately wider than this list: an
|
|
18
|
-
* install on an older or newer line is allowed but reports drift at boot.
|
|
19
|
-
*/
|
|
20
|
-
export declare const UPSTREAM_VALIDATED_VERSIONS: readonly ["0.1.0-rc.6", "0.1.0-rc.7", "0.1.0-rc.8", "0.1.1-rc.1", "0.1.1-rc.2", "0.1.2-alpha.3", "0.1.2-alpha.4", "0.1.2-alpha.5", "0.1.2-rc.1", "0.1.3-alpha.2", "0.1.5-alpha.1", "0.1.5-alpha.2", "0.1.5-rc.1", "0.1.7-rc.1", "0.1.7-rc.2", "0.2.0-rc.1", "0.2.0-rc.2"];
|
|
3
|
+
/** Update the baseline in place; older releases are unsupported. */
|
|
4
|
+
export declare const UPSTREAM_VALIDATED_VERSIONS: readonly ["0.2.0-rc.2"];
|
|
21
5
|
/**
|
|
22
6
|
* Framework packages version on their own lines; the contract validates
|
|
23
7
|
* their MAJOR (breaking surface), not the harness prerelease number.
|
|
@@ -38,23 +22,9 @@ export type UpstreamVersionTuple = readonly [number, number, number, UpstreamPre
|
|
|
38
22
|
export declare function parseUpstreamVersion(version: string | undefined): UpstreamVersionTuple | undefined;
|
|
39
23
|
/** Order two parsed versions: negative/positive/zero as a `<`/`>`/`=`. */
|
|
40
24
|
export declare function compareVersions(a: UpstreamVersionTuple, b: UpstreamVersionTuple): number;
|
|
41
|
-
/** Human-readable
|
|
42
|
-
export declare const UPSTREAM_VALIDATED_LABEL
|
|
25
|
+
/** Human-readable supported release. */
|
|
26
|
+
export declare const UPSTREAM_VALIDATED_LABEL = "0.2.0-rc.2";
|
|
43
27
|
export declare function installedUpstreamVersions(): Record<string, string | undefined>;
|
|
44
|
-
/**
|
|
45
|
-
* The installed upstream version of one blessed package, parsed; undefined
|
|
46
|
-
* when missing or not on a supported `x.y.z-(alpha|beta|rc).n` line. Feature gates
|
|
47
|
-
* compare this against the line a behavior was introduced on, so the
|
|
48
|
-
* adapter degrades on older installs instead of calling APIs they do not
|
|
49
|
-
* have.
|
|
50
|
-
*/
|
|
51
|
-
export declare function installedUpstreamVersion(packageName: string): UpstreamVersionTuple | undefined;
|
|
52
|
-
/**
|
|
53
|
-
* Whether the installed version of `packageName` is at or beyond `minimum`
|
|
54
|
-
* (a literal like `'0.1.0-rc.8'`). Unparseable or older installs return
|
|
55
|
-
* false so features introduced on the minimum line degrade gracefully.
|
|
56
|
-
*/
|
|
57
|
-
export declare function installedMeetsVersion(packageName: string, minimum: string): boolean;
|
|
58
28
|
/**
|
|
59
29
|
* The distinct installed prerelease versions across the blessed harness
|
|
60
30
|
* packages (framework packages excluded). One entry = coherent install;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"contract.d.ts","sourceRoot":"","sources":["../../../src/dsh-adapter/contract.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"contract.d.ts","sourceRoot":"","sources":["../../../src/dsh-adapter/contract.ts"],"names":[],"mappings":"AAeA,gDAAgD;AAChD,eAAO,MAAM,0BAA0B,eAAe,CAAA;AAEtD,oEAAoE;AACpE,eAAO,MAAM,2BAA2B,yBAAwC,CAAA;AAEhF;;;GAGG;AACH,eAAO,MAAM,yBAAyB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAG5D,CAAA;AAED,qEAAqE;AACrE,eAAO,MAAM,yBAAyB,o8BA+B5B,CAAA;AAEV,MAAM,WAAW,kBAAkB;IACjC,OAAO,EAAE,MAAM,CAAA;IACf,SAAS,EAAE,MAAM,GAAG,SAAS,CAAA;IAC7B,SAAS,EAAE,MAAM,CAAA;CAClB;AASD,4EAA4E;AAC5E,MAAM,MAAM,yBAAyB,GAAG,OAAO,GAAG,MAAM,GAAG,IAAI,CAAA;AAE/D,4FAA4F;AAC5F,MAAM,MAAM,oBAAoB,GAAG,SAAS,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,yBAAyB,EAAE,MAAM,CAAC,CAAA;AAEvG,wEAAwE;AACxE,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,MAAM,GAAG,SAAS,GAAG,oBAAoB,GAAG,SAAS,CAKlG;AAED,0EAA0E;AAC1E,wBAAgB,eAAe,CAAC,CAAC,EAAE,oBAAoB,EAAE,CAAC,EAAE,oBAAoB,GAAG,MAAM,CAQxF;AAED,wCAAwC;AACxC,eAAO,MAAM,wBAAwB,eAA6B,CAAA;AAYlE,wBAAgB,yBAAyB,IAAI,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC,CAqB9E;AAED;;;;;GAKG;AACH,wBAAgB,sBAAsB,CACpC,iBAAiB,GAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC,CAA+B,GAC5F,MAAM,EAAE,CAQV;AAED;;;;GAIG;AACH,wBAAgB,aAAa,CAC3B,iBAAiB,GAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC,CAA+B,GAC5F,kBAAkB,EAAE,CAuBtB;AAED;;;;;;GAMG;AACH,MAAM,MAAM,iBAAiB,GAAG,OAAO,GAAG,OAAO,GAAG,OAAO,GAAG,QAAQ,CAAA;AAEtE,wEAAwE;AACxE,MAAM,WAAW,oBAAoB;IACnC,IAAI,EAAE,iBAAiB,CAAA;IACvB,sFAAsF;IACtF,QAAQ,EAAE,MAAM,EAAE,CAAA;CACnB;AAED;;;;;GAKG;AACH,wBAAgB,oBAAoB,CAClC,iBAAiB,GAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC,CAA+B,GAC5F,oBAAoB,GAAG,SAAS,CA0BlC"}
|
|
@@ -1,10 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Upstream compatibility contract.
|
|
3
3
|
*
|
|
4
|
-
* The TUI
|
|
5
|
-
* current primary (0.2.0-rc.2) plus older lines kept in backward
|
|
6
|
-
* compatibility across the 0.1.5, 0.1.3, 0.1.2, 0.1.1 and 0.1.0 release
|
|
7
|
-
* families.
|
|
4
|
+
* The TUI supports one validated upstream release: 0.2.0-rc.2.
|
|
8
5
|
* Every official package this adapter touches is blessed here; anything
|
|
9
6
|
* else must go through upstream channels or the adapter, never the UI.
|
|
10
7
|
*
|
|
@@ -17,42 +14,8 @@ import { readFileSync } from 'node:fs';
|
|
|
17
14
|
import { fileURLToPath } from 'node:url';
|
|
18
15
|
/** Primary validated upstream line (newest). */
|
|
19
16
|
export const UPSTREAM_VALIDATED_VERSION = '0.2.0-rc.2';
|
|
20
|
-
/**
|
|
21
|
-
|
|
22
|
-
*
|
|
23
|
-
* 0.2.0-rc.2 = primary continuous-CI line; 0.2.0-rc.1 = previous primary;
|
|
24
|
-
* 0.1.7-rc.2/rc.1 = previous
|
|
25
|
-
* build (mapped compatibility); 0.1.5-rc.1/alpha.2/alpha.1 = mapped
|
|
26
|
-
* compatibility lines (source-checked when the primary line moves);
|
|
27
|
-
* 0.1.3-alpha.2 = compatibility line (the only 0.1.3 build on npm);
|
|
28
|
-
* 0.1.2-rc.1 = previous family (full CI coverage); 0.1.2-alpha.3–alpha.5 =
|
|
29
|
-
* mapped compatibility lines; 0.1.1-rc.1/rc.2 = compatibility lines
|
|
30
|
-
* (install- and type-level compatibility); 0.1.0-rc.7/rc.8 = full CI
|
|
31
|
-
* coverage; 0.1.0-rc.6 = legacy line (install- and type-level
|
|
32
|
-
* compatibility, feature surface may lack later additions — new features
|
|
33
|
-
* must degrade gracefully there).
|
|
34
|
-
* The peer range in package.json is deliberately wider than this list: an
|
|
35
|
-
* install on an older or newer line is allowed but reports drift at boot.
|
|
36
|
-
*/
|
|
37
|
-
export const UPSTREAM_VALIDATED_VERSIONS = [
|
|
38
|
-
'0.1.0-rc.6',
|
|
39
|
-
'0.1.0-rc.7',
|
|
40
|
-
'0.1.0-rc.8',
|
|
41
|
-
'0.1.1-rc.1',
|
|
42
|
-
'0.1.1-rc.2',
|
|
43
|
-
'0.1.2-alpha.3',
|
|
44
|
-
'0.1.2-alpha.4',
|
|
45
|
-
'0.1.2-alpha.5',
|
|
46
|
-
'0.1.2-rc.1',
|
|
47
|
-
'0.1.3-alpha.2',
|
|
48
|
-
'0.1.5-alpha.1',
|
|
49
|
-
'0.1.5-alpha.2',
|
|
50
|
-
'0.1.5-rc.1',
|
|
51
|
-
'0.1.7-rc.1',
|
|
52
|
-
'0.1.7-rc.2',
|
|
53
|
-
'0.2.0-rc.1',
|
|
54
|
-
'0.2.0-rc.2',
|
|
55
|
-
];
|
|
17
|
+
/** Update the baseline in place; older releases are unsupported. */
|
|
18
|
+
export const UPSTREAM_VALIDATED_VERSIONS = [UPSTREAM_VALIDATED_VERSION];
|
|
56
19
|
/**
|
|
57
20
|
* Framework packages version on their own lines; the contract validates
|
|
58
21
|
* their MAJOR (breaking surface), not the harness prerelease number.
|
|
@@ -94,8 +57,7 @@ export const UPSTREAM_BLESSED_PACKAGES = [
|
|
|
94
57
|
'@deepseek-ai/dsh-user-approval',
|
|
95
58
|
'@deepseek-ai/dsh-user-questions',
|
|
96
59
|
];
|
|
97
|
-
// These capabilities are
|
|
98
|
-
// supported host line. Their absence is valid at runtime, not in the CI tree.
|
|
60
|
+
// These capabilities are optional at runtime. CI requires the complete dev tree.
|
|
99
61
|
const OPTIONAL_RUNTIME_PACKAGES = new Set([
|
|
100
62
|
'@deepseek-ai/dsh-agent-preset-registry',
|
|
101
63
|
'@deepseek-ai/dsh-ptc-runtime-node',
|
|
@@ -120,23 +82,8 @@ export function compareVersions(a, b) {
|
|
|
120
82
|
const channelOrder = channelRank[a[3]] - channelRank[b[3]];
|
|
121
83
|
return channelOrder !== 0 ? channelOrder : a[4] - b[4];
|
|
122
84
|
}
|
|
123
|
-
/**
|
|
124
|
-
|
|
125
|
-
const groups = [];
|
|
126
|
-
for (const version of UPSTREAM_VALIDATED_VERSIONS) {
|
|
127
|
-
const [major, minor, patch, channel, number] = parseUpstreamVersion(version);
|
|
128
|
-
const release = `${major}.${minor}.${patch}`;
|
|
129
|
-
let group = groups.find(candidate => candidate.release === release && candidate.channel === channel);
|
|
130
|
-
if (group === undefined) {
|
|
131
|
-
group = { release, channel, numbers: [] };
|
|
132
|
-
groups.push(group);
|
|
133
|
-
}
|
|
134
|
-
group.numbers.push(number);
|
|
135
|
-
}
|
|
136
|
-
return groups.map(({ release, channel, numbers }) => `${release}-${channel}.${numbers.join('/')}`).join(', ');
|
|
137
|
-
}
|
|
138
|
-
/** Human-readable summary of the exact validated prerelease lines. */
|
|
139
|
-
export const UPSTREAM_VALIDATED_LABEL = `${UPSTREAM_VALIDATED_VERSION} (${validatedLinesLabel()})`;
|
|
85
|
+
/** Human-readable supported release. */
|
|
86
|
+
export const UPSTREAM_VALIDATED_LABEL = UPSTREAM_VALIDATED_VERSION;
|
|
140
87
|
function resolvePackageJson(packageName) {
|
|
141
88
|
try {
|
|
142
89
|
const path = import.meta.resolve(`${packageName}/package.json`);
|
|
@@ -148,8 +95,8 @@ function resolvePackageJson(packageName) {
|
|
|
148
95
|
}
|
|
149
96
|
let cachedVersions;
|
|
150
97
|
export function installedUpstreamVersions() {
|
|
151
|
-
// Package manifests do not change mid-process; memoize
|
|
152
|
-
//
|
|
98
|
+
// Package manifests do not change mid-process; memoize the boot diagnosis.
|
|
99
|
+
// Frozen so callers can
|
|
153
100
|
// never corrupt the shared cache.
|
|
154
101
|
if (cachedVersions !== undefined)
|
|
155
102
|
return cachedVersions;
|
|
@@ -171,28 +118,6 @@ export function installedUpstreamVersions() {
|
|
|
171
118
|
cachedVersions = Object.freeze(result);
|
|
172
119
|
return cachedVersions;
|
|
173
120
|
}
|
|
174
|
-
/**
|
|
175
|
-
* The installed upstream version of one blessed package, parsed; undefined
|
|
176
|
-
* when missing or not on a supported `x.y.z-(alpha|beta|rc).n` line. Feature gates
|
|
177
|
-
* compare this against the line a behavior was introduced on, so the
|
|
178
|
-
* adapter degrades on older installs instead of calling APIs they do not
|
|
179
|
-
* have.
|
|
180
|
-
*/
|
|
181
|
-
export function installedUpstreamVersion(packageName) {
|
|
182
|
-
return parseUpstreamVersion(installedUpstreamVersions()[packageName]);
|
|
183
|
-
}
|
|
184
|
-
/**
|
|
185
|
-
* Whether the installed version of `packageName` is at or beyond `minimum`
|
|
186
|
-
* (a literal like `'0.1.0-rc.8'`). Unparseable or older installs return
|
|
187
|
-
* false so features introduced on the minimum line degrade gracefully.
|
|
188
|
-
*/
|
|
189
|
-
export function installedMeetsVersion(packageName, minimum) {
|
|
190
|
-
const installed = installedUpstreamVersion(packageName);
|
|
191
|
-
const floor = parseUpstreamVersion(minimum);
|
|
192
|
-
if (installed === undefined || floor === undefined)
|
|
193
|
-
return false;
|
|
194
|
-
return compareVersions(installed, floor) >= 0;
|
|
195
|
-
}
|
|
196
121
|
/**
|
|
197
122
|
* The distinct installed prerelease versions across the blessed harness
|
|
198
123
|
* packages (framework packages excluded). One entry = coherent install;
|
|
@@ -1,22 +1,3 @@
|
|
|
1
|
-
export interface PackagedPresetResult {
|
|
2
|
-
id: string;
|
|
3
|
-
status: 'installed' | 'updated' | 'current' | 'conflict';
|
|
4
|
-
}
|
|
5
|
-
export interface PackagedPresetOptions {
|
|
6
|
-
dshHome?: string;
|
|
7
|
-
sourceRoot?: string;
|
|
8
|
-
moduleUrl?: string;
|
|
9
|
-
}
|
|
10
1
|
/** Resolve the package asset in both src/tsx and compiled npm layouts. */
|
|
11
2
|
export declare function packagedPresetRoot(moduleUrl?: string): string;
|
|
12
|
-
/**
|
|
13
|
-
* Materialize presets shipped by dsh-tui into the Harness user preset root.
|
|
14
|
-
*
|
|
15
|
-
* The official launcher replaces the roster's configured roots with its own
|
|
16
|
-
* shipped root at the end of profile composition, so a bundle patch cannot
|
|
17
|
-
* add a second system root. The user root is the roster's supported extension
|
|
18
|
-
* seam and is discovered on every list/resolve call. Existing unmarked
|
|
19
|
-
* directories are never overwritten.
|
|
20
|
-
*/
|
|
21
|
-
export declare function ensurePackagedPresets(options?: PackagedPresetOptions): PackagedPresetResult[];
|
|
22
3
|
//# sourceMappingURL=packaged-presets.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"packaged-presets.d.ts","sourceRoot":"","sources":["../../../src/dsh-adapter/packaged-presets.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"packaged-presets.d.ts","sourceRoot":"","sources":["../../../src/dsh-adapter/packaged-presets.ts"],"names":[],"mappings":"AAIA,0EAA0E;AAC1E,wBAAgB,kBAAkB,CAAC,SAAS,GAAE,MAAwB,GAAG,MAAM,CAQ9E"}
|
|
@@ -1,27 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { cpSync, existsSync, mkdirSync, readFileSync, readdirSync, renameSync, rmSync, } from 'node:fs';
|
|
3
|
-
import { homedir } from 'node:os';
|
|
1
|
+
import { existsSync } from 'node:fs';
|
|
4
2
|
import { dirname, join } from 'node:path';
|
|
5
3
|
import { fileURLToPath } from 'node:url';
|
|
6
|
-
const OWNER = '@askdkc/dsh-cli';
|
|
7
|
-
const PREVIOUS_OWNER = 'dsh-cli';
|
|
8
|
-
const LEGACY_OWNER = '@deepseek-harness-tui/dsh-tui';
|
|
9
|
-
const MARKER = '.dsh-tui-managed.json';
|
|
10
|
-
function readMarker(directory) {
|
|
11
|
-
try {
|
|
12
|
-
const value = JSON.parse(readFileSync(join(directory, MARKER), 'utf8'));
|
|
13
|
-
if ((value.owner === OWNER || value.owner === PREVIOUS_OWNER || value.owner === LEGACY_OWNER)
|
|
14
|
-
&& typeof value.preset === 'string'
|
|
15
|
-
&& typeof value.revision === 'string'
|
|
16
|
-
&& value.revision.length > 0) {
|
|
17
|
-
return value;
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
catch {
|
|
21
|
-
// An absent or user-authored marker means this directory is not ours.
|
|
22
|
-
}
|
|
23
|
-
return undefined;
|
|
24
|
-
}
|
|
25
4
|
/** Resolve the package asset in both src/tsx and compiled npm layouts. */
|
|
26
5
|
export function packagedPresetRoot(moduleUrl = import.meta.url) {
|
|
27
6
|
const directory = dirname(fileURLToPath(moduleUrl));
|
|
@@ -32,64 +11,3 @@ export function packagedPresetRoot(moduleUrl = import.meta.url) {
|
|
|
32
11
|
}
|
|
33
12
|
return found;
|
|
34
13
|
}
|
|
35
|
-
/**
|
|
36
|
-
* Materialize presets shipped by dsh-tui into the Harness user preset root.
|
|
37
|
-
*
|
|
38
|
-
* The official launcher replaces the roster's configured roots with its own
|
|
39
|
-
* shipped root at the end of profile composition, so a bundle patch cannot
|
|
40
|
-
* add a second system root. The user root is the roster's supported extension
|
|
41
|
-
* seam and is discovered on every list/resolve call. Existing unmarked
|
|
42
|
-
* directories are never overwritten.
|
|
43
|
-
*/
|
|
44
|
-
export function ensurePackagedPresets(options = {}) {
|
|
45
|
-
const sourceRoot = options.sourceRoot ?? packagedPresetRoot(options.moduleUrl);
|
|
46
|
-
const dshHome = options.dshHome ?? process.env.DSH_HOME ?? join(homedir(), '.dsh');
|
|
47
|
-
const targetRoot = join(dshHome, '.agent-presets');
|
|
48
|
-
const results = [];
|
|
49
|
-
for (const entry of readdirSync(sourceRoot, { withFileTypes: true })) {
|
|
50
|
-
if (!entry.isDirectory())
|
|
51
|
-
continue;
|
|
52
|
-
const id = entry.name;
|
|
53
|
-
const source = join(sourceRoot, id);
|
|
54
|
-
const sourceMarker = readMarker(source);
|
|
55
|
-
if (sourceMarker === undefined || sourceMarker.preset !== id) {
|
|
56
|
-
throw new Error(`dsh-tui: packaged preset ${id} has no valid ${MARKER}`);
|
|
57
|
-
}
|
|
58
|
-
const target = join(targetRoot, id);
|
|
59
|
-
if (!existsSync(target)) {
|
|
60
|
-
mkdirSync(targetRoot, { recursive: true });
|
|
61
|
-
// `filter` forces the JS copy path (see src/utils/paths.ts): the native
|
|
62
|
-
// cpSync fast path fails with EIO or crashes under a non-ASCII home
|
|
63
|
-
// directory such as `C:\Users\米`.
|
|
64
|
-
cpSync(source, target, { recursive: true, force: false, errorOnExist: true, filter: () => true });
|
|
65
|
-
results.push({ id, status: 'installed' });
|
|
66
|
-
continue;
|
|
67
|
-
}
|
|
68
|
-
const targetMarker = readMarker(target);
|
|
69
|
-
if (targetMarker === undefined || targetMarker.preset !== id) {
|
|
70
|
-
results.push({ id, status: 'conflict' });
|
|
71
|
-
continue;
|
|
72
|
-
}
|
|
73
|
-
if (targetMarker.revision === sourceMarker.revision) {
|
|
74
|
-
results.push({ id, status: 'current' });
|
|
75
|
-
continue;
|
|
76
|
-
}
|
|
77
|
-
const suffix = `${process.pid}-${randomUUID()}`;
|
|
78
|
-
const staged = join(targetRoot, `.${id}.staged-${suffix}`);
|
|
79
|
-
const backup = join(targetRoot, `.${id}.backup-${suffix}`);
|
|
80
|
-
cpSync(source, staged, { recursive: true, force: false, errorOnExist: true, filter: () => true });
|
|
81
|
-
try {
|
|
82
|
-
renameSync(target, backup);
|
|
83
|
-
renameSync(staged, target);
|
|
84
|
-
rmSync(backup, { recursive: true, force: true });
|
|
85
|
-
}
|
|
86
|
-
catch (error) {
|
|
87
|
-
if (!existsSync(target) && existsSync(backup))
|
|
88
|
-
renameSync(backup, target);
|
|
89
|
-
rmSync(staged, { recursive: true, force: true });
|
|
90
|
-
throw error;
|
|
91
|
-
}
|
|
92
|
-
results.push({ id, status: 'updated' });
|
|
93
|
-
}
|
|
94
|
-
return results;
|
|
95
|
-
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin.d.ts","sourceRoot":"","sources":["../../../src/dsh-adapter/plugin.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,KAAK,EAAe,MAAM,wBAAwB,CAAA;AAGhE,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAA;AAGlD,OAAO,EAAE,MAAM,EAAE,MAAM,YAAY,CAAA;AACnC,OAAO,EAA+D,KAAK,aAAa,EAAE,MAAM,sBAAsB,CAAA;
|
|
1
|
+
{"version":3,"file":"plugin.d.ts","sourceRoot":"","sources":["../../../src/dsh-adapter/plugin.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,KAAK,EAAe,MAAM,wBAAwB,CAAA;AAGhE,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAA;AAGlD,OAAO,EAAE,MAAM,EAAE,MAAM,YAAY,CAAA;AACnC,OAAO,EAA+D,KAAK,aAAa,EAAE,MAAM,sBAAsB,CAAA;AAuDtH,OAAO,EAAE,MAAM,EAAkC,MAAM,UAAU,CAAA;AAgCjE;;;GAGG;AACH,wBAAgB,4BAA4B,CAAC,IAAI,EAAE,SAAS,MAAM,EAAE,GAAG,SAAS,GAAG,MAAM,CAcxF;AAED;;;;;;;;;;;;GAYG;AACH,MAAM,MAAM,WAAW,GAAG,aAAa,GAAG,yBAAyB,GAAG,eAAe,CAAA;AAErF,wBAAgB,kBAAkB,CAChC,WAAW,UAAgC,EAC3C,GAAG,GAAE,MAAM,CAAC,UAAwB,GACnC,WAAW,CASb;AAED,wBAAsB,KAAK,CAAC,GAAG,EAAE,OAAO,EAAE,aAAa,EAAE,aAAa,CAAC,MAAM,CAAC,EAAE,WAAW,GAAE,OAAa,GAAG,OAAO,CAAC,IAAI,CAAC,CAq+CzH;AAmMD;;;;;;;;;;;;;GAaG;AACH,wBAAgB,gBAAgB,CAAC,IAAI,EAAE;IAAE,UAAU,EAAE,CAAC,KAAK,CAAC,EAAE,OAAO,KAAK,IAAI,CAAA;CAAE,GAAG;IACjF,UAAU,EAAE,CAAC,KAAK,CAAC,EAAE,OAAO,KAAK,IAAI,CAAA;IACrC,YAAY,EAAE,MAAM,IAAI,CAAA;CACzB,CAcA;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,eAAe,CAAC,IAAI,EAAE;IACpC,YAAY,EAAE,MAAM,CAAA;IACpB,SAAS,EAAE,KAAK,GAAG,SAAS,CAAA;IAC5B,YAAY,EAAE,KAAK,CAAA;CACpB,GAAG,OAAO,CAQV;AAgBD;;;GAGG;AACH,wBAAsB,UAAU,CAC9B,GAAG,EAAE,OAAO,EACZ,QAAQ,EAAE,OAAO,CAAC,UAAU,CAAC,OAAO,MAAM,CAAC,CAAC,GAAG,SAAS,EACxD,UAAU,EAAE,OAAO,EACnB,MAAM,EAAE,MAAM,GAAG,SAAS,EAC1B,YAAY,EAAE,MAAM,GAAG,SAAS,EAChC,IAAI,EAAE,MAAM,IAAI,GACf,OAAO,CAAC,IAAI,CAAC,CAmFf;AA4HD,gFAAgF;AAChF,wBAAgB,kBAAkB,CAAC,GAAG,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,GAAG,IAAI,CAIrE"}
|