Updates
CI / test (push) Successful in 58s
Release rolling / release (push) Successful in 7m10s

This commit is contained in:
Raven Scott
2026-07-18 19:16:58 -04:00
parent 1d46b7b3ad
commit 462cce4b5b
24 changed files with 1398 additions and 51 deletions
+7
View File
@@ -22,6 +22,7 @@ import { getDb, isHyperDbEnabled } from '../db/index.js'
import { isSwarmEnabled } from '../db/replicate.js'
import { listRemoteDbs } from '../db/remote.js'
import { getParentCollector, isParentEnabled } from '../services/collectors/parent.js'
import { getRestTunnelInfo } from '../services/rest-tunnel.js'
/**
* @param {string} pathname
@@ -243,10 +244,14 @@ export async function handleRest(pathname, query) {
{ name: 'snapshot' },
{ name: 'exportSnapshot' },
{ name: 'prometheusPush' },
{ name: 'retrainAnomaly' },
{ name: 'gcBuffers' },
],
})
}
if (path === '/api/v3/tunnel') {
return json(getRestTunnelInfo())
}
if (path === '/api/v3/export' || path === '/api/v2/export') {
const { buildSnapshot, writeSnapshotFile, toPrometheusText } = await import(
'../services/export.js'
@@ -351,6 +356,7 @@ function infoPayload() {
protocol: PROTOCOL,
protocolVersion: PROTOCOL_VERSION,
publicKeyHex: getServerPublicKeyHex(),
anomalyMode: process.env.PEARDATA_ANOMALY_MODE || 'threshold',
hyperdb: getDb()
? {
publicKeyHex: getDb().publicKeyHex,
@@ -358,6 +364,7 @@ function infoPayload() {
swarm: isSwarmEnabled(),
}
: null,
restTunnel: getRestTunnelInfo(),
},
}
}