@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.
@@ -113,27 +113,31 @@ export declare class DaemonCommandHandler implements CommandHelpers {
113
113
  */
114
114
  private handleRefreshScripts;
115
115
  /**
116
- * Return per-provider availability so a Marketplace UI can show
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 *Marketplace install root*. This is always
123
- * `~/.adhdev/marketplace/` regardless of how ProviderLoader resolved its
124
- * userDir (which can point to a sibling adhdev-providers git checkout in
125
- * dev). Marketplace-installed manifests must never overwrite files in a
126
- * developer checkout, and they should be isolated from upstream/registry
127
- * sync so they survive `refresh_scripts`.
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 getMarketplaceInstallRoot;
132
+ private getUpstreamInstallRoot;
130
133
  /**
131
134
  * Download a single provider manifest from the registry and write it to
132
- * ~/.adhdev/marketplace/{category}/{type}/provider.json.
135
+ * ~/.adhdev/providers/.upstream/{category}/{type}/provider.json.
133
136
  *
134
- * Used by the Marketplace UI's Install button. Verifies SHA-256 checksum
135
- * against the registry meta before persisting. Refuses to write outside
136
- * the marketplace root.
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 marketplace install root
155
- * (~/.adhdev/marketplace/{category}/{type}/). Refuses to touch anything
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 ~/.adhdev/marketplace/ with its
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;