@adhdev/daemon-core 0.9.82-rc.165 → 0.9.82-rc.166
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/dist/commands/handler.d.ts +61 -17
- package/dist/index.js +1298 -752
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1296 -750
- package/dist/index.mjs.map +1 -1
- package/dist/providers/external-sources.d.ts +71 -0
- package/dist/providers/provider-loader.d.ts +7 -3
- package/dist/providers/provider-trust.d.ts +31 -0
- package/dist/providers/sdk/v1/index.d.ts +1 -1
- package/dist/providers/sdk/v1/validators/manifest.d.ts +1 -1
- package/dist/providers/sdk/v1/validators/taint.d.ts +1 -1
- package/dist/shared-types.d.ts +27 -1
- package/package.json +1 -1
- package/src/commands/cli-manager.ts +19 -0
- package/src/commands/handler.ts +286 -24
- package/src/providers/external-sources.ts +218 -0
- package/src/providers/provider-loader.ts +159 -23
- package/src/providers/provider-trust.ts +114 -0
- package/src/providers/sdk/v1/index.ts +1 -1
- package/src/providers/sdk/v1/sandbox/require-whitelist.ts +1 -1
- package/src/providers/sdk/v1/validators/manifest.ts +1 -1
- package/src/providers/sdk/v1/validators/taint.ts +1 -1
- package/src/shared-types.ts +33 -1
- package/src/status/snapshot.ts +49 -14
package/src/status/snapshot.ts
CHANGED
|
@@ -145,21 +145,56 @@ function buildAvailableProviders(
|
|
|
145
145
|
lastDetection?: AvailableProviderInfo['lastDetection'];
|
|
146
146
|
lastVerification?: AvailableProviderInfo['lastVerification'];
|
|
147
147
|
meshCoordinator?: AvailableProviderInfo['meshCoordinator'];
|
|
148
|
+
_sourceTrust?: AvailableProviderInfo['trust'];
|
|
149
|
+
_sourceLayer?: AvailableProviderInfo['sourceLayer'];
|
|
150
|
+
_sourceName?: string | null;
|
|
151
|
+
providerVersion?: string;
|
|
152
|
+
binary?: string;
|
|
153
|
+
status?: string;
|
|
154
|
+
details?: string;
|
|
155
|
+
links?: Record<string, string>;
|
|
148
156
|
}> = providerLoader.getAvailableProviderInfos?.() || providerLoader.getAll();
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
157
|
+
// Trust helpers come from daemon-core; resolve them lazily so the
|
|
158
|
+
// status snapshot path stays loadable in older bundles that don't
|
|
159
|
+
// ship provider-trust yet.
|
|
160
|
+
let describeTrust: (trust: AvailableProviderInfo['trust']) => string = () => '';
|
|
161
|
+
let requiresConfirmation: (trust: AvailableProviderInfo['trust']) => boolean = () => false;
|
|
162
|
+
try {
|
|
163
|
+
const mod = require('../providers/provider-trust.js') as typeof import('../providers/provider-trust.js');
|
|
164
|
+
describeTrust = mod.describeTrust as typeof describeTrust;
|
|
165
|
+
requiresConfirmation = mod.requiresConfirmation as typeof requiresConfirmation;
|
|
166
|
+
} catch { /* enrichment only */ }
|
|
167
|
+
return providers.map((provider) => {
|
|
168
|
+
const trust = (provider as any)._sourceTrust as AvailableProviderInfo['trust'] | undefined;
|
|
169
|
+
const sourceLayer = (provider as any)._sourceLayer as AvailableProviderInfo['sourceLayer'] | undefined;
|
|
170
|
+
const sourceName = (provider as any)._sourceName as string | null | undefined;
|
|
171
|
+
return {
|
|
172
|
+
type: provider.type,
|
|
173
|
+
name: provider.displayName || provider.type,
|
|
174
|
+
displayName: provider.displayName || provider.type,
|
|
175
|
+
icon: provider.icon || '💻',
|
|
176
|
+
category: provider.category,
|
|
177
|
+
...(provider.installed !== undefined ? { installed: provider.installed } : {}),
|
|
178
|
+
...(provider.detectedPath !== undefined ? { detectedPath: provider.detectedPath } : {}),
|
|
179
|
+
...(provider.enabled !== undefined ? { enabled: provider.enabled } : {}),
|
|
180
|
+
...(provider.machineStatus !== undefined ? { machineStatus: provider.machineStatus } : {}),
|
|
181
|
+
...(provider.lastDetection !== undefined ? { lastDetection: provider.lastDetection } : {}),
|
|
182
|
+
...(provider.lastVerification !== undefined ? { lastVerification: provider.lastVerification } : {}),
|
|
183
|
+
...(provider.meshCoordinator !== undefined ? { meshCoordinator: provider.meshCoordinator } : {}),
|
|
184
|
+
...(trust ? {
|
|
185
|
+
trust,
|
|
186
|
+
trustDescription: describeTrust(trust),
|
|
187
|
+
requiresConfirmation: requiresConfirmation(trust),
|
|
188
|
+
} : {}),
|
|
189
|
+
...(sourceLayer ? { sourceLayer } : {}),
|
|
190
|
+
...(sourceName ? { sourceName } : {}),
|
|
191
|
+
...(provider.providerVersion ? { providerVersion: provider.providerVersion } : {}),
|
|
192
|
+
...(provider.binary ? { binary: provider.binary } : {}),
|
|
193
|
+
...(provider.status ? { status: provider.status } : {}),
|
|
194
|
+
...(provider.details ? { details: provider.details } : {}),
|
|
195
|
+
...(provider.links ? { links: provider.links } : {}),
|
|
196
|
+
};
|
|
197
|
+
});
|
|
163
198
|
}
|
|
164
199
|
|
|
165
200
|
export function buildMachineInfo(profile: 'full' | 'live' | 'metadata' = 'full'): MachineInfo {
|