release: prepare v0.9.7

This commit is contained in:
BigBodyCobain
2026-05-01 22:55:04 -06:00
parent ea457f27da
commit 28b3bd5ebf
670 changed files with 187060 additions and 14006 deletions
@@ -21,6 +21,7 @@ export interface InfonetBootstrapSnapshot {
sync_peer_count?: number;
push_peer_count?: number;
operator_peer_count?: number;
default_sync_peer_count?: number;
last_bootstrap_error?: string;
}
@@ -70,6 +71,16 @@ export interface InfonetNodeStatusSnapshot {
private_lane_tier?: string;
}
export interface NodeSettingsSnapshot {
enabled?: boolean;
timemachine_enabled?: boolean;
updated_at?: number;
node_mode?: string;
node_enabled?: boolean;
}
export const DEFAULT_INFONET_SEED_URL = 'https://node.shadowbroker.info';
const CACHE_TTL_MS = 15000;
type CacheEntry<T> = {
@@ -106,6 +117,12 @@ function loadInfonetNodeStatus(): Promise<InfonetNodeStatusSnapshot> {
});
}
function loadNodeSettings(): Promise<NodeSettingsSnapshot> {
return controlPlaneJson<NodeSettingsSnapshot>('/api/settings/node', {
requireAdminSession: false,
});
}
async function resolveCached<T>(
cache: CacheEntry<T>,
loader: () => Promise<T>,
@@ -188,3 +205,18 @@ export async function fetchInfonetNodeStatusSnapshot(
force,
);
}
export async function fetchNodeSettingsSnapshot(): Promise<NodeSettingsSnapshot> {
return loadNodeSettings();
}
export async function setInfonetNodeEnabled(enabled: boolean): Promise<NodeSettingsSnapshot> {
const result = await controlPlaneJson<NodeSettingsSnapshot>('/api/settings/node', {
method: 'PUT',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({ enabled }),
requireAdminSession: false,
});
invalidateInfonetNodeStatusCache();
return result;
}