@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
|
@@ -113,27 +113,31 @@ export declare class DaemonCommandHandler implements CommandHelpers {
|
|
|
113
113
|
*/
|
|
114
114
|
private handleRefreshScripts;
|
|
115
115
|
/**
|
|
116
|
-
* Return per-provider availability so
|
|
117
|
-
* "Installed" badges. Reuses the existing detection state from
|
|
116
|
+
* Return per-provider availability so the dashboard's provider catalog
|
|
117
|
+
* can show "Installed" badges. Reuses the existing detection state from
|
|
118
118
|
* ProviderLoader.getMachineProviderStatus() — no probing is triggered.
|
|
119
119
|
*/
|
|
120
120
|
private handleListProviderAvailability;
|
|
121
121
|
/**
|
|
122
|
-
* Compute the *
|
|
123
|
-
*
|
|
124
|
-
*
|
|
125
|
-
*
|
|
126
|
-
*
|
|
127
|
-
*
|
|
122
|
+
* Compute the *upstream cache root*. install_provider_manifest writes
|
|
123
|
+
* official-registry manifests here so the daemon's standard upstream
|
|
124
|
+
* layer picks them up — no special handling needed at load time, and
|
|
125
|
+
* the manifests inherit the official-trust badge instead of the
|
|
126
|
+
* untrusted-external one.
|
|
127
|
+
*
|
|
128
|
+
* Path matches ProviderLoader.upstreamDir but we recompute it from
|
|
129
|
+
* homedir() so this method stays usable in dev where userDir can
|
|
130
|
+
* point at a sibling git checkout.
|
|
128
131
|
*/
|
|
129
|
-
private
|
|
132
|
+
private getUpstreamInstallRoot;
|
|
130
133
|
/**
|
|
131
134
|
* Download a single provider manifest from the registry and write it to
|
|
132
|
-
* ~/.adhdev/
|
|
135
|
+
* ~/.adhdev/providers/.upstream/{category}/{type}/provider.json.
|
|
133
136
|
*
|
|
134
|
-
* Used by
|
|
135
|
-
*
|
|
136
|
-
* the
|
|
137
|
+
* Used by standalone onboarding to seed the upstream cache with the
|
|
138
|
+
* default provider set on first launch. Verifies SHA-256 checksum
|
|
139
|
+
* against the registry meta before persisting. Refuses to write
|
|
140
|
+
* outside the upstream root.
|
|
137
141
|
*
|
|
138
142
|
* Args: { type: string, category?: string, version?: string }
|
|
139
143
|
* If category/version are omitted, looks up the latest from the registry.
|
|
@@ -151,13 +155,16 @@ export declare class DaemonCommandHandler implements CommandHelpers {
|
|
|
151
155
|
*/
|
|
152
156
|
private fetchProviderSources;
|
|
153
157
|
/**
|
|
154
|
-
* Remove a provider manifest from the
|
|
155
|
-
* (~/.adhdev/
|
|
156
|
-
* outside that root.
|
|
158
|
+
* Remove a provider manifest from the upstream cache root
|
|
159
|
+
* (~/.adhdev/providers/.upstream/{category}/{type}/). Refuses to touch
|
|
160
|
+
* anything outside that root. Used by onboarding to opt out of a
|
|
161
|
+
* provider the user doesn't want; the dashboard no longer exposes a
|
|
162
|
+
* per-provider uninstall button (external sources are removed as a
|
|
163
|
+
* whole via remove_provider_source).
|
|
157
164
|
*/
|
|
158
165
|
private handleUninstallProviderManifest;
|
|
159
166
|
/**
|
|
160
|
-
* Return everything currently installed in
|
|
167
|
+
* Return everything currently installed in the upstream cache with its
|
|
161
168
|
* version. This is the "what does this daemon have" answer used both by
|
|
162
169
|
* the UI and by the update checker.
|
|
163
170
|
*/
|
|
@@ -171,6 +178,43 @@ export declare class DaemonCommandHandler implements CommandHelpers {
|
|
|
171
178
|
* updateAvailable, error? }] }
|
|
172
179
|
*/
|
|
173
180
|
private handleCheckProviderUpdates;
|
|
181
|
+
/**
|
|
182
|
+
* Register a new external provider source. The daemon clones the repo
|
|
183
|
+
* to ~/.adhdev/external/<name>/, walks it once to detect provided
|
|
184
|
+
* types, and surfaces any conflicts with already-installed types so
|
|
185
|
+
* the dashboard can ask the user how to resolve them.
|
|
186
|
+
*
|
|
187
|
+
* Args: { url: string, ref?: string, name?: string }
|
|
188
|
+
* - url: https://, git@, or any git-cloneable URL
|
|
189
|
+
* - ref: branch/tag/commit (default "main")
|
|
190
|
+
* - name: short identifier (default derived from URL)
|
|
191
|
+
*
|
|
192
|
+
* Returns: { source, providers, conflicts }
|
|
193
|
+
* - conflicts: list of types this new source provides that another
|
|
194
|
+
* source already exposes. UI uses this to prompt for active-source
|
|
195
|
+
* selection before the load takes effect.
|
|
196
|
+
*/
|
|
197
|
+
private handleAddProviderSource;
|
|
198
|
+
/**
|
|
199
|
+
* Remove a registered external source. Deletes the clone directory and
|
|
200
|
+
* any active-source entry pointing to it.
|
|
201
|
+
*
|
|
202
|
+
* Args: { name: string }
|
|
203
|
+
*/
|
|
204
|
+
private handleRemoveProviderSource;
|
|
205
|
+
/**
|
|
206
|
+
* List registered external sources + each source's currently installed
|
|
207
|
+
* providers + the active selection for any conflicting types. Used by
|
|
208
|
+
* the dashboard's "Sources" tab.
|
|
209
|
+
*/
|
|
210
|
+
private handleListProviderSources;
|
|
211
|
+
/**
|
|
212
|
+
* Pick which source's copy of a conflicting provider type is active.
|
|
213
|
+
* Other sources' copies stay on disk but the loader ignores them.
|
|
214
|
+
*
|
|
215
|
+
* Args: { type: string, sourceName: string }
|
|
216
|
+
*/
|
|
217
|
+
private handleSetActiveProviderSource;
|
|
174
218
|
private proxyDevServerPost;
|
|
175
219
|
private proxyDevServerGet;
|
|
176
220
|
private proxyDevServerScaffold;
|