Files
bare-operating-system/packages/bare-os-protocol/lib/seed-rpc-methods.js
T
Raven Scott 16ac71815f feat(booter): cache syscalls proc JSON, net tuning hints, /dev/shm unlink, POSIX/docs sync
- Cache /proc/bare_os/syscalls.json until warm read cache clear; invalidate with vfs.bareOsClearWarmReadCaches
- net_summary: optional udxTuning / hyperswarmTuning from BARE_OS_UDX_* / BARE_OS_HYPERSWARM_* JSON
- Metric: operator.corestore_snapshot_hint on bareOsCorestoreSnapshotHint
- pathconf: _PC_NAME_MAX 128 under /dev/shm
- vfs: fix unlink for /dev/shm segments; add roundtrip test
- protocol: bareOsIsAllowedSeedRpcMethodShort + tests
- getconf: _POSIX_SHARED_MEMORY_OBJECTS, _POSIX_MESSAGE_PASSING, _POSIX_ASYNCHRONOUS_IO + test
- microbench: syscall suite (syscalls proc JSON stringify)
- JSON Schema bare-os-syscalls.schema.json schemaVersion 5; posix-conformance-matrix ops = getconf
- Docs: blind-relay security note, compat matrix (1.38.0 / 1.0.4), handbook 04/09, appendix, OTA note
- Pear: document host coupling in compatibility-matrix (no pear-runtime manifest entry)
2026-04-04 23:36:58 -04:00

133 lines
3.3 KiB
JavaScript

/**
* Single source of truth for `bare_os.*` seed RPC method names (short form, without `bare_os.` prefix).
* Used by `channel.js` for `kernel_info` and unknown-method handling.
*/
export const BARE_OS_SEED_RPC_METHOD_SHORT_NAMES = [
'version',
'health',
'kernel_info',
'capabilities',
'replication_status',
'gossip',
'manifest_hints',
'peer_health',
'staging_slot',
'replication_queue',
'capability_attestation',
'mbr_layout',
'snapshot_hints',
'peer_firewall_stats',
'replication_plan',
'dht_bootstrap_hint',
'snapshot_chain',
'mirror_compaction_hint',
'updater_state',
'blind_peer_topology_v2',
'compact_ping',
'corestore_stats',
'snapshot_manifest_slice',
'mirror_drive_hint_v2',
'hrpc_registry_summary',
'protomux_capability_ad',
'dht_address_book',
'replication_throttle_hint',
'bundlebee_stage',
'http_dht_proxy_hint',
'protomux_rpc_pool_hint',
'hyperblob_store_hint',
'signing_request_queue_hint',
'core_storage_layout_hint',
'mirror_drive_compaction_v3',
'bundlebee_cli_stage',
'ready_guard_v2',
'blind_relay_circuit_hint',
'http_dht_proxy_routes',
'pear_stage_hint',
'updater_channel_matrix',
'appling_bundle_pointer',
'drive_resolve_policy',
'bundle_id_fingerprint',
'hyperdb_migration_hint',
'sidecar_bundle_index_v2',
'pear_message_queue_sketch',
'runtime_bootstrap_etag',
'force_update_guard',
'gracedown_window',
'tryboot_slot',
'hotmods_allowlist',
'prefetcher_budget',
'opstream_backpressure',
'multisig_link_pointer',
'md_render_caps',
'bundlebee_cli_stage_v2',
'seed_manifest_diff_v2',
'peer_handshake_latency_budget',
'mirror_drive_compaction_v4',
'ready_guard_v3',
'blind_relay_circuit_v2',
'http_dht_proxy_routes_v2',
'pear_doctor_hint',
'pear_info_sketch',
'pear_inspect_caps',
'pear_dump_budget',
'pear_reset_guard',
'pear_restart_window',
'pear_run_flags',
'pear_bundle_manifest_slice',
'pear_pack_layout_hint',
'pear_seed_topology',
'pear_state_snapshot',
'pear_stamp_pointer',
'pear_shake_latency',
'pear_crasher_class',
'pear_errors_rate_hint',
'pear_bridge_health',
'pear_link_matrix',
'pear_pipe_backpressure',
'pear_opwait_budget',
'pear_terminal_caps',
'ready_guard_v4',
'mirror_drive_compaction_v5',
'blind_relay_circuit_v3',
'compact_ping_v4',
'hypercore_replicate_budget_v2',
'drive_version_graph',
'protomux_backpressure_v3',
'pear_runtime_matrix',
'bundle_preload_hint',
'autopass_rotation_hint',
'hrpc_method_allowlist',
'sidecar_resource_cap',
'git_lfs_budget',
'net_qos_class',
'storage_tier_hint',
'indexer_catchup',
'multisig_quorum_hint',
'relay_geo_hint',
'compact_ping_v5',
'staging_slot_v8',
'peer_firewall_stats_v6',
'http_dht_proxy_routes_v3',
'ready_guard_v5',
'mirror_drive_compaction_v6'
]
/** @type {Set<string>} */
export const BARE_OS_SEED_RPC_METHOD_SHORT_NAME_SET = new Set(
BARE_OS_SEED_RPC_METHOD_SHORT_NAMES
)
/**
* Strict allowlist check for `bare_os.*` RPC short names (matches `channel.js` gate).
* @param {string} name
* @returns {boolean}
*/
export function bareOsIsAllowedSeedRpcMethodShort(name) {
return BARE_OS_SEED_RPC_METHOD_SHORT_NAME_SET.has(String(name ?? '').trim())
}
/** Full dotted names for documentation / tests. */
export const BARE_OS_SEED_RPC_METHODS = BARE_OS_SEED_RPC_METHOD_SHORT_NAMES.map(
(m) => 'bare_os.' + m
)