super-dsh 0.3.3 → 0.3.4-c
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 +15 -14
- package/agent-agy/dist/world-plugin.js +1 -0
- package/agent-agy/package.json +6 -6
- package/agent-agy-sdk/dist/world-plugin.js +1 -0
- package/agent-agy-sdk/package.json +5 -5
- package/agent-claude/package.json +8 -8
- package/agent-codex/dist/world-plugin.js +1 -0
- package/agent-codex/package.json +7 -7
- package/agent-codex-sdk/dist/world-plugin.js +1 -0
- package/agent-codex-sdk/package.json +7 -7
- package/agent-hermes/bridge/hermes-ws-bridge.py +273 -0
- package/agent-hermes/dist/agent.js +27 -4
- package/agent-hermes/dist/hermes-client.js +55 -10
- package/agent-hermes/dist/index.js +12 -3
- package/agent-hermes/dist/world-plugin.js +1 -0
- package/agent-hermes/package.json +7 -7
- package/agent-omp/dist/world-plugin.js +1 -0
- package/agent-omp/package.json +8 -8
- package/agent-omp-sdk/dist/world-plugin.js +1 -0
- package/agent-omp-sdk/package.json +8 -8
- package/agent-pi/dist/world-plugin.js +1 -0
- package/agent-pi/package.json +7 -7
- package/client/index.js +106 -249
- package/cordis.patch.yml +0 -6
- package/package.json +23 -27
- package/remote/plugin.d.ts +93 -20
- package/remote/plugin.js +921 -452
- package/remote/provenance.json +15 -13
- package/superd-hub/dist/fusion-transport.js +0 -1
- package/superd-hub/dist/world-join.js +1 -0
- package/superd-hub/dist/world-provision.d.ts +4 -0
- package/superd-hub/dist/world-provision.js +37 -0
- package/superd-hub/lib/client/index.js +106 -249
- package/superd-hub/package.json +11 -11
- package/superd-hub/dist/bundle-setup.d.ts +0 -27
- package/superd-hub/dist/bundle-setup.js +0 -94
- package/superd-hub/dist/client/companion-api.d.ts +0 -5
- package/superd-hub/dist/client/companion-api.js +0 -30
- package/superd-hub/dist/companion-contract.d.ts +0 -9
- package/superd-hub/dist/companion-contract.js +0 -1
- package/superd-hub/dist/companions.d.ts +0 -30
- package/superd-hub/dist/companions.js +0 -211
|
@@ -1,94 +0,0 @@
|
|
|
1
|
-
var __runInitializers = (this && this.__runInitializers) || function (thisArg, initializers, value) {
|
|
2
|
-
var useValue = arguments.length > 2;
|
|
3
|
-
for (var i = 0; i < initializers.length; i++) {
|
|
4
|
-
value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);
|
|
5
|
-
}
|
|
6
|
-
return useValue ? value : void 0;
|
|
7
|
-
};
|
|
8
|
-
var __esDecorate = (this && this.__esDecorate) || function (ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {
|
|
9
|
-
function accept(f) { if (f !== void 0 && typeof f !== "function") throw new TypeError("Function expected"); return f; }
|
|
10
|
-
var kind = contextIn.kind, key = kind === "getter" ? "get" : kind === "setter" ? "set" : "value";
|
|
11
|
-
var target = !descriptorIn && ctor ? contextIn["static"] ? ctor : ctor.prototype : null;
|
|
12
|
-
var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});
|
|
13
|
-
var _, done = false;
|
|
14
|
-
for (var i = decorators.length - 1; i >= 0; i--) {
|
|
15
|
-
var context = {};
|
|
16
|
-
for (var p in contextIn) context[p] = p === "access" ? {} : contextIn[p];
|
|
17
|
-
for (var p in contextIn.access) context.access[p] = contextIn.access[p];
|
|
18
|
-
context.addInitializer = function (f) { if (done) throw new TypeError("Cannot add initializers after decoration has completed"); extraInitializers.push(accept(f || null)); };
|
|
19
|
-
var result = (0, decorators[i])(kind === "accessor" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);
|
|
20
|
-
if (kind === "accessor") {
|
|
21
|
-
if (result === void 0) continue;
|
|
22
|
-
if (result === null || typeof result !== "object") throw new TypeError("Object expected");
|
|
23
|
-
if (_ = accept(result.get)) descriptor.get = _;
|
|
24
|
-
if (_ = accept(result.set)) descriptor.set = _;
|
|
25
|
-
if (_ = accept(result.init)) initializers.unshift(_);
|
|
26
|
-
}
|
|
27
|
-
else if (_ = accept(result)) {
|
|
28
|
-
if (kind === "field") initializers.unshift(_);
|
|
29
|
-
else descriptor[key] = _;
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
if (target) Object.defineProperty(target, contextIn.name, descriptor);
|
|
33
|
-
done = true;
|
|
34
|
-
};
|
|
35
|
-
import { Remote, TypertRemoteService } from '@deepseek-ai/dsh-typert-protocol';
|
|
36
|
-
import { BetterDashCompanion } from './companions.js';
|
|
37
|
-
import { PACK_VERSION } from './pack-version.js';
|
|
38
|
-
export { BetterDashCompanion } from './companions.js';
|
|
39
|
-
export const name = 'superd-bundle-setup';
|
|
40
|
-
export const inject = ['profileContext', 'appReady'];
|
|
41
|
-
let SuperdCompanions = (() => {
|
|
42
|
-
let _classSuper = TypertRemoteService;
|
|
43
|
-
let _instanceExtraInitializers = [];
|
|
44
|
-
let _getBetterDash_decorators;
|
|
45
|
-
let _installBetterDash_decorators;
|
|
46
|
-
return class SuperdCompanions extends _classSuper {
|
|
47
|
-
static {
|
|
48
|
-
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
49
|
-
_getBetterDash_decorators = [Remote];
|
|
50
|
-
_installBetterDash_decorators = [Remote];
|
|
51
|
-
__esDecorate(this, null, _getBetterDash_decorators, { kind: "method", name: "getBetterDash", static: false, private: false, access: { has: obj => "getBetterDash" in obj, get: obj => obj.getBetterDash }, metadata: _metadata }, null, _instanceExtraInitializers);
|
|
52
|
-
__esDecorate(this, null, _installBetterDash_decorators, { kind: "method", name: "installBetterDash", static: false, private: false, access: { has: obj => "installBetterDash" in obj, get: obj => obj.installBetterDash }, metadata: _metadata }, null, _instanceExtraInitializers);
|
|
53
|
-
if (_metadata) Object.defineProperty(this, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
54
|
-
}
|
|
55
|
-
companion = __runInitializers(this, _instanceExtraInitializers);
|
|
56
|
-
constructor(ctx, companion) {
|
|
57
|
-
super(ctx, 'superdCompanions');
|
|
58
|
-
this.companion = companion;
|
|
59
|
-
}
|
|
60
|
-
getBetterDash() { return this.companion.getBetterDash(); }
|
|
61
|
-
installBetterDash() { return this.companion.installBetterDash(); }
|
|
62
|
-
};
|
|
63
|
-
})();
|
|
64
|
-
export { SuperdCompanions };
|
|
65
|
-
export function apply(ctx) {
|
|
66
|
-
const companion = new BetterDashCompanion(ctx.profileContext, PACK_VERSION, () => ctx.get('pluginManager'));
|
|
67
|
-
new SuperdCompanions(ctx, companion);
|
|
68
|
-
ctx.effect(() => {
|
|
69
|
-
let ready = false, registering = true;
|
|
70
|
-
const start = () => {
|
|
71
|
-
void companion.ensureAutomatic().then(status => {
|
|
72
|
-
if (status.error !== undefined)
|
|
73
|
-
ctx.logger.warn(status.error);
|
|
74
|
-
}).catch(error => ctx.logger.warn('Better Dash companion status failed', error));
|
|
75
|
-
};
|
|
76
|
-
const offReady = ctx.appReady.onReady(() => {
|
|
77
|
-
ready = true;
|
|
78
|
-
// Cold readiness occurs after boot, outside HMR. A live mount gets an
|
|
79
|
-
// immediate callback while its parent HMR transaction is still active:
|
|
80
|
-
// wait for the native changed notification below instead.
|
|
81
|
-
if (!registering)
|
|
82
|
-
start();
|
|
83
|
-
});
|
|
84
|
-
registering = false;
|
|
85
|
-
const offChange = ctx.on('plugin-manager/changed', () => {
|
|
86
|
-
// Native configure/HMR has finished here, but the parent's profile lock
|
|
87
|
-
// is still held. Return immediately; child install queues that lock.
|
|
88
|
-
if (ready)
|
|
89
|
-
start();
|
|
90
|
-
});
|
|
91
|
-
return () => { offReady(); offChange(); companion.dispose(); };
|
|
92
|
-
}, 'bundle-delivery: native companions');
|
|
93
|
-
}
|
|
94
|
-
export default { name, inject, apply };
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
/** Local ctx0 companion management, independent of the selected agent world. */
|
|
2
|
-
import { type FetchLike } from './runtime-settings-api.js';
|
|
3
|
-
import type { BetterDashStatus } from '../companion-contract.js';
|
|
4
|
-
export type CompanionOperation = 'getBetterDash' | 'installBetterDash';
|
|
5
|
-
export declare function callCompanion(operation: CompanionOperation, doFetch?: FetchLike): Promise<BetterDashStatus>;
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
/** Local ctx0 companion management, independent of the selected agent world. */
|
|
2
|
-
import { mintRpcId } from './runtime-settings-api.js';
|
|
3
|
-
export async function callCompanion(operation, doFetch) {
|
|
4
|
-
const method = `superdCompanions/${operation}`;
|
|
5
|
-
const send = doFetch ?? ((path, init) => fetch(path, init));
|
|
6
|
-
const response = await send(`/api/${method}`, {
|
|
7
|
-
method: 'POST', credentials: 'same-origin', headers: { 'content-type': 'application/json' },
|
|
8
|
-
body: JSON.stringify({ type: 'client-request', rpcId: mintRpcId(), method, payload: { args: {} } }),
|
|
9
|
-
});
|
|
10
|
-
if (!response.ok)
|
|
11
|
-
throw new Error(`Better Dash: HTTP ${response.status}`);
|
|
12
|
-
let body;
|
|
13
|
-
try {
|
|
14
|
-
body = JSON.parse(await response.text());
|
|
15
|
-
}
|
|
16
|
-
catch {
|
|
17
|
-
throw new Error('Better Dash: unreadable response');
|
|
18
|
-
}
|
|
19
|
-
const result = body?.result;
|
|
20
|
-
if (result?.ok !== true)
|
|
21
|
-
throw new Error(result?.error?.message ?? 'Better Dash: request failed');
|
|
22
|
-
const value = result.value;
|
|
23
|
-
if (value === null || typeof value !== 'object' || typeof value.installed !== 'boolean'
|
|
24
|
-
|| typeof value.installing !== 'boolean' || typeof value.requestedVersion !== 'string'
|
|
25
|
-
|| (value.version !== undefined && typeof value.version !== 'string')
|
|
26
|
-
|| (value.enabled !== undefined && typeof value.enabled !== 'boolean')
|
|
27
|
-
|| (value.error !== undefined && typeof value.error !== 'string'))
|
|
28
|
-
throw new Error('Better Dash: invalid status');
|
|
29
|
-
return value;
|
|
30
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import type { ProfileContext } from '@deepseek-ai/dsh-app-boot';
|
|
2
|
-
import type { PluginManager } from '@deepseek-ai/dsh-plugin-manager';
|
|
3
|
-
import type { BetterDashStatus } from './companion-contract.js';
|
|
4
|
-
type Manager = Pick<PluginManager, 'listBundles' | 'installBundle'>;
|
|
5
|
-
/** One controller per native profile; no package, registry, HMR or selection writer of its own. */
|
|
6
|
-
export declare class BetterDashCompanion {
|
|
7
|
-
private readonly version;
|
|
8
|
-
private readonly manager;
|
|
9
|
-
private readonly directory;
|
|
10
|
-
private readonly receipt;
|
|
11
|
-
private readonly legacy;
|
|
12
|
-
private initialized?;
|
|
13
|
-
private intent;
|
|
14
|
-
private active?;
|
|
15
|
-
private stopped;
|
|
16
|
-
private restartNotice?;
|
|
17
|
-
constructor(profile: Pick<ProfileContext, 'home' | 'dir'>, version: string, manager: () => Manager | undefined);
|
|
18
|
-
private initialize;
|
|
19
|
-
private cleanLegacy;
|
|
20
|
-
private save;
|
|
21
|
-
getBetterDash(): Promise<BetterDashStatus>;
|
|
22
|
-
ensureAutomatic(): Promise<BetterDashStatus>;
|
|
23
|
-
installBetterDash(): Promise<BetterDashStatus>;
|
|
24
|
-
private run;
|
|
25
|
-
private install;
|
|
26
|
-
/** Read-only observation: an intermediate native event must never trigger reinstatement. */
|
|
27
|
-
observeNativeChange(): Promise<BetterDashStatus>;
|
|
28
|
-
dispose(): void;
|
|
29
|
-
}
|
|
30
|
-
export {};
|
|
@@ -1,211 +0,0 @@
|
|
|
1
|
-
/** Companion intent and the single native installation operation. */
|
|
2
|
-
import { createHash } from 'node:crypto';
|
|
3
|
-
import { readFile, mkdir, unlink, rmdir } from 'node:fs/promises';
|
|
4
|
-
import { join, dirname } from 'node:path';
|
|
5
|
-
import { writeFileAtomic } from '@deepseek-ai/dsh-atomic-write';
|
|
6
|
-
// done marks a CONFIRMED first use (Better observed installed); removed marks a
|
|
7
|
-
// migrated legacy removal record. A receipt with attempted but neither done,
|
|
8
|
-
// error, nor removed is an interrupted first use — e.g. killed by the restart
|
|
9
|
-
// that installing Super itself triggers — and must re-arm, not suppress, the retry.
|
|
10
|
-
const message = (error) => error instanceof Error ? error.message : String(error);
|
|
11
|
-
async function optionalJson(path) {
|
|
12
|
-
try {
|
|
13
|
-
return JSON.parse(await readFile(path, 'utf8'));
|
|
14
|
-
}
|
|
15
|
-
catch (error) {
|
|
16
|
-
if (error.code === 'ENOENT')
|
|
17
|
-
return undefined;
|
|
18
|
-
throw error;
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
function nativeFailure(result) {
|
|
22
|
-
if ((result.application === 'applied' || result.application === 'restart-required') && result.error === undefined
|
|
23
|
-
&& (result.packageResult === undefined || result.packageResult.exitCode === 0))
|
|
24
|
-
return undefined;
|
|
25
|
-
return [result.application, result.error?.code, result.error?.diagnostic,
|
|
26
|
-
result.packageResult?.kind, result.packageResult?.logPath].filter(Boolean).join(': ');
|
|
27
|
-
}
|
|
28
|
-
/** One controller per native profile; no package, registry, HMR or selection writer of its own. */
|
|
29
|
-
export class BetterDashCompanion {
|
|
30
|
-
version;
|
|
31
|
-
manager;
|
|
32
|
-
directory;
|
|
33
|
-
receipt;
|
|
34
|
-
legacy;
|
|
35
|
-
initialized;
|
|
36
|
-
intent = { attempted: false };
|
|
37
|
-
active;
|
|
38
|
-
stopped = false;
|
|
39
|
-
restartNotice;
|
|
40
|
-
constructor(profile, version, manager) {
|
|
41
|
-
this.version = version;
|
|
42
|
-
this.manager = manager;
|
|
43
|
-
const key = createHash('sha256').update(profile.dir).digest('hex') + '.json';
|
|
44
|
-
this.directory = join(profile.home, 'superd', 'companions');
|
|
45
|
-
this.receipt = join(this.directory, key);
|
|
46
|
-
this.legacy = join(profile.home, 'companion-registration', key);
|
|
47
|
-
}
|
|
48
|
-
initialize() {
|
|
49
|
-
return this.initialized ??= (async () => {
|
|
50
|
-
const saved = await optionalJson(this.receipt);
|
|
51
|
-
if (saved !== undefined) {
|
|
52
|
-
// Never-resurrect applies to a CONFIRMED first use, a recorded failure,
|
|
53
|
-
// or a migrated removal record; an interrupted first use (no done, no
|
|
54
|
-
// error, no removal marker) re-arms.
|
|
55
|
-
this.intent = saved.attempted && saved.done !== true && saved.error === undefined && saved.removed !== true
|
|
56
|
-
? { attempted: false } : saved;
|
|
57
|
-
await this.cleanLegacy();
|
|
58
|
-
return;
|
|
59
|
-
}
|
|
60
|
-
const old = await optionalJson(this.legacy);
|
|
61
|
-
// Any old registration was first use. An absent Better now means removal,
|
|
62
|
-
// including when Super has since changed version; never resurrect it.
|
|
63
|
-
if (old?.['super-dsh:better-dsh'] !== undefined) {
|
|
64
|
-
this.intent = { attempted: true, removed: true };
|
|
65
|
-
await this.save();
|
|
66
|
-
await this.cleanLegacy();
|
|
67
|
-
}
|
|
68
|
-
})();
|
|
69
|
-
}
|
|
70
|
-
async cleanLegacy() {
|
|
71
|
-
try {
|
|
72
|
-
await unlink(this.legacy);
|
|
73
|
-
}
|
|
74
|
-
catch (error) {
|
|
75
|
-
if (error.code !== 'ENOENT')
|
|
76
|
-
throw error;
|
|
77
|
-
}
|
|
78
|
-
try {
|
|
79
|
-
await rmdir(dirname(this.legacy));
|
|
80
|
-
}
|
|
81
|
-
catch (error) {
|
|
82
|
-
if (!['ENOENT', 'ENOTEMPTY'].includes(error.code ?? ''))
|
|
83
|
-
throw error;
|
|
84
|
-
}
|
|
85
|
-
}
|
|
86
|
-
async save() {
|
|
87
|
-
await mkdir(this.directory, { recursive: true, mode: 0o700 });
|
|
88
|
-
await writeFileAtomic(this.receipt, JSON.stringify(this.intent) + '\n', { mode: 0o600 });
|
|
89
|
-
}
|
|
90
|
-
async getBetterDash() {
|
|
91
|
-
const status = { installed: false, installing: this.active !== undefined, requestedVersion: this.version };
|
|
92
|
-
try {
|
|
93
|
-
await this.initialize();
|
|
94
|
-
const manager = this.manager();
|
|
95
|
-
if (manager === undefined)
|
|
96
|
-
throw new Error('Native Plugin Manager is unavailable; enable it and retry Install in Settings.');
|
|
97
|
-
const better = (await manager.listBundles()).find(bundle => bundle.name === 'better-dsh' && bundle.installed);
|
|
98
|
-
if (better !== undefined) {
|
|
99
|
-
status.installed = true;
|
|
100
|
-
if (better.version !== undefined)
|
|
101
|
-
status.version = better.version;
|
|
102
|
-
status.enabled = better.enabled;
|
|
103
|
-
// An installed dependency alone does not prove application succeeded:
|
|
104
|
-
// native configure can fail after writing that dependency. Only a
|
|
105
|
-
// missing -> installed recovery clears a previous failure here.
|
|
106
|
-
if (this.active === undefined && this.intent.attempted
|
|
107
|
-
&& (this.intent.done !== true || (this.intent.error !== undefined && this.intent.missingAfterFailure === true))) {
|
|
108
|
-
this.intent.done = true;
|
|
109
|
-
delete this.intent.error;
|
|
110
|
-
delete this.intent.missingAfterFailure;
|
|
111
|
-
await this.save();
|
|
112
|
-
}
|
|
113
|
-
}
|
|
114
|
-
else {
|
|
115
|
-
this.restartNotice = undefined;
|
|
116
|
-
if (this.active === undefined && this.intent.error !== undefined && this.intent.missingAfterFailure !== true) {
|
|
117
|
-
this.intent.missingAfterFailure = true;
|
|
118
|
-
await this.save();
|
|
119
|
-
}
|
|
120
|
-
}
|
|
121
|
-
const error = this.intent.error ?? this.restartNotice;
|
|
122
|
-
if (error !== undefined)
|
|
123
|
-
status.error = error;
|
|
124
|
-
}
|
|
125
|
-
catch (error) {
|
|
126
|
-
status.error = message(error);
|
|
127
|
-
}
|
|
128
|
-
return status;
|
|
129
|
-
}
|
|
130
|
-
ensureAutomatic() { return this.run(false); }
|
|
131
|
-
installBetterDash() { return this.run(true); }
|
|
132
|
-
run(manual) {
|
|
133
|
-
if (this.active !== undefined)
|
|
134
|
-
return this.active;
|
|
135
|
-
const task = this.install(manual).catch(async (error) => {
|
|
136
|
-
this.intent.error = `Better Dash installation failed: ${message(error)}. Check Better Dash in Plugin Manager; if missing, retry Install in Settings.`;
|
|
137
|
-
const status = await this.getBetterDash();
|
|
138
|
-
this.intent.missingAfterFailure = !status.installed;
|
|
139
|
-
try {
|
|
140
|
-
await this.save();
|
|
141
|
-
}
|
|
142
|
-
catch { /* Report the operation error even when persistence is unavailable. */ }
|
|
143
|
-
return status;
|
|
144
|
-
}).then(status => ({ ...status, installing: false })).finally(() => { this.active = undefined; });
|
|
145
|
-
this.active = task;
|
|
146
|
-
return task;
|
|
147
|
-
}
|
|
148
|
-
async install(manual) {
|
|
149
|
-
await this.initialize();
|
|
150
|
-
const before = await this.getBetterDash();
|
|
151
|
-
if (this.stopped)
|
|
152
|
-
return before;
|
|
153
|
-
if (before.installed) {
|
|
154
|
-
this.intent.attempted = true;
|
|
155
|
-
this.intent.done = true;
|
|
156
|
-
if (this.intent.missingAfterFailure === true) {
|
|
157
|
-
delete this.intent.error;
|
|
158
|
-
delete this.intent.missingAfterFailure;
|
|
159
|
-
}
|
|
160
|
-
await this.save();
|
|
161
|
-
return this.getBetterDash(); // Native disablement and installed versions belong to the user.
|
|
162
|
-
}
|
|
163
|
-
// Native changed notifications enter through this operation, so its
|
|
164
|
-
// read is active and deliberately cannot update the receipt itself.
|
|
165
|
-
// Record removal here even when first-use installation is already done.
|
|
166
|
-
if (this.intent.error !== undefined && this.intent.missingAfterFailure !== true) {
|
|
167
|
-
this.intent.missingAfterFailure = true;
|
|
168
|
-
await this.save();
|
|
169
|
-
}
|
|
170
|
-
if (!manual && this.intent.attempted)
|
|
171
|
-
return before;
|
|
172
|
-
this.intent = { attempted: true };
|
|
173
|
-
await this.save(); // First use is durable before native HMR can unload this row.
|
|
174
|
-
const manager = this.manager();
|
|
175
|
-
if (manager === undefined)
|
|
176
|
-
throw new Error('Native Plugin Manager is unavailable');
|
|
177
|
-
if (this.version === 'unknown' || this.version.trim() === '')
|
|
178
|
-
throw new Error('The installed Super Dash package version could not be read');
|
|
179
|
-
const failures = [];
|
|
180
|
-
for (const spec of [`better-dsh@${this.version}`, 'better-dsh@latest', 'better-dsh']) {
|
|
181
|
-
if (this.stopped)
|
|
182
|
-
break;
|
|
183
|
-
try {
|
|
184
|
-
const result = await manager.installBundle(spec);
|
|
185
|
-
const failure = nativeFailure(result);
|
|
186
|
-
if (failure === undefined) {
|
|
187
|
-
const after = await this.getBetterDash();
|
|
188
|
-
if (after.installed) {
|
|
189
|
-
this.intent.done = true;
|
|
190
|
-
delete this.intent.error;
|
|
191
|
-
delete this.intent.missingAfterFailure;
|
|
192
|
-
this.restartNotice = result.application === 'restart-required'
|
|
193
|
-
? 'Better Dash is installed; restart DSH to apply the native change.' : undefined;
|
|
194
|
-
await this.save();
|
|
195
|
-
return this.getBetterDash();
|
|
196
|
-
}
|
|
197
|
-
failures.push(`${spec}: native manager reported ${result.application}, but Better Dash is not installed`);
|
|
198
|
-
}
|
|
199
|
-
else
|
|
200
|
-
failures.push(`${spec}: ${failure}`);
|
|
201
|
-
}
|
|
202
|
-
catch (error) {
|
|
203
|
-
failures.push(`${spec}: ${message(error)}`);
|
|
204
|
-
}
|
|
205
|
-
}
|
|
206
|
-
throw new Error(failures.join('; ') || 'Super Dash companion component was unloaded');
|
|
207
|
-
}
|
|
208
|
-
/** Read-only observation: an intermediate native event must never trigger reinstatement. */
|
|
209
|
-
async observeNativeChange() { return this.getBetterDash(); }
|
|
210
|
-
dispose() { this.stopped = true; }
|
|
211
|
-
}
|