/** * Push the registered-component corpus `vendo sync` captured to Vendo Cloud, so * the console's Apps gallery renders the host's own components for real instead * of a grey labeled placeholder. * * WHAT CROSSES THE WIRE: the source of every component the host registers in * ``, the source of every module in each component's * import closure, and the app-root stylesheets. Package code never does (the * capture stops at node_modules). It happens only when a Vendo Cloud key * resolves AND the project said yes once (`.vendo/cloud.json`) — keyless / BYO * makes no request at all. * * THE SHAPE, in two halves, and the split is what makes the push cheap: * * - RECORDS `vendo_host_components` — id = component name, data = * `CapturedHostComponent`: refs, no source, a few hundred bytes. Listing the * collection IS the hash manifest; there is no manifest row to drift from * the truth. * - BLOBS `vendo_host_components` — key = the module's sha-256 hex, body = * `{ source, imports? }` JSON. `blobs.list()` returns KEYS ONLY, so one call * answers "which of my hashes do you already have?" without downloading a * byte of source. Content addressing means a key that exists is by * definition current. * * An unchanged second sync therefore costs two calls and uploads nothing. */ export declare const HOST_COMPONENTS_COLLECTION = "vendo_host_components"; export declare function readPushComponents(vendoDir: string): Promise; export declare function writePushComponents(vendoDir: string, pushComponents: boolean): Promise; export interface HostComponentPushResult { pushed: string[]; /** Component records deleted from Cloud because no local FILE names them. */ pruned: string[]; /** Module blobs uploaded (the misses) and deleted (unreferenced). */ modules: { uploaded: number; deleted: number; }; /** Bytes of module source uploaded this run. */ uploadedBytes: number; /** Record files that exist but could not be read. Never a prune signal. */ unreadable: string[]; error?: string; } /** * Reconcile Cloud with `.vendo/components/`: upload the blobs Cloud is missing, * put the records whose hash moved, delete records whose file is GONE, then * delete blobs nothing references. Never throws — a Cloud hiccup returns the * partial accounting plus `error`. */ export declare function pushHostComponents(options: { vendoDir: string; apiKey: string; baseUrl?: string; fetchImpl?: typeof fetch; budgetMs?: number; }): Promise;