chore(8.0): final pre-RC1 sweep — API consistency, named errors, orphans, zero-cast codebase

This commit is contained in:
David Snelling 2026-06-11 14:51:00 -07:00
parent 970e08c466
commit 1f7e365a4e
237 changed files with 1951 additions and 49413 deletions

View file

@ -6,7 +6,7 @@
import { EventEmitter } from 'node:events'
import * as os from 'node:os'
import { StorageAdapter } from '../coreTypes.js'
import { NounMetadata, StorageAdapter } from '../coreTypes.js'
export interface NodeInfo {
id: string
@ -357,7 +357,11 @@ export class StorageDiscovery extends EventEmitter {
*/
private async loadNodeRegistry(): Promise<string[]> {
try {
const registry = await this.storage.getMetadata(`${this.CLUSTER_PATH}/registry.json`) as any
// The registry document is written by updateNodeRegistry() below with a
// `nodes` string-ID array on top of the base NounMetadata shape.
const registry = await this.storage.getMetadata(
`${this.CLUSTER_PATH}/registry.json`
) as (NounMetadata & { nodes?: string[] }) | null
return registry?.nodes || []
} catch (err) {
return []