Cleric-K

Untitled

Mar 27th, 2026
38
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 18.73 KB | None | 0 0
  1. {
  2. "$schema": "https://json-schema.org/draft/2020-12/schema",
  3. "title": "Config",
  4. "description": "Local radicle configuration.",
  5. "type": "object",
  6. "properties": {
  7. "publicExplorer": {
  8. "description": "Public explorer. This is used for generating links.",
  9. "$ref": "#/$defs/Explorer",
  10. "default": "https://app.radicle.xyz/nodes/$host/$rid$path"
  11. },
  12. "preferredSeeds": {
  13. "description": "Preferred seeds. These seeds will be used for explorer links\nand in other situations when a seed needs to be chosen.",
  14. "type": "array",
  15. "items": {
  16. "$ref": "#/$defs/ConnectAddress"
  17. },
  18. "default": []
  19. },
  20. "web": {
  21. "description": "Web configuration.",
  22. "$ref": "#/$defs/WebConfig",
  23. "default": {
  24. "pinned": {
  25. "repositories": []
  26. }
  27. }
  28. },
  29. "cli": {
  30. "description": "CLI configuration.",
  31. "$ref": "#/$defs/CliConfig",
  32. "default": {
  33. "hints": true
  34. }
  35. },
  36. "node": {
  37. "description": "Node configuration.",
  38. "$ref": "#/$defs/NodeConfig"
  39. }
  40. },
  41. "required": [
  42. "node"
  43. ],
  44. "$defs": {
  45. "Explorer": {
  46. "description": "A public explorer.",
  47. "type": "string"
  48. },
  49. "ConnectAddress": {
  50. "description": "A node address to connect to. Format: An Ed25519 public key in multibase encoding, followed by the symbol '@', followed by an IP address, or a DNS name, or a Tor onion name, followed by the symbol ':', followed by a TCP port number.",
  51. "type": "string",
  52. "examples": [
  53. "z6MkrLMMsiPWUcNPHcRajuMi9mDfYckSoJyPwwnknocNYPm7@rosa.radicle.xyz:8776",
  54. "z6MkvUJtYD9dHDJfpevWRT98mzDDpdAtmUjwyDSkyqksUr7C@xmrhfasfg5suueegrnc4gsgyi2tyclcy5oz7f5drnrodmdtob6t2ioyd.onion:8776",
  55. "z6MknSLrJoTcukLrE435hVNQT4JUhbvWLX4kUzqkEStBU8Vi@seed.example.com:8776",
  56. ],
  57. "pattern": "^.+@.+:((6553[0-5])|(655[0-2][0-9])|(65[0-4][0-9]{2})|(6[0-4][0-9]{3})|([1-5][0-9]{4})|([0-5]{0,5})|([0-9]{1,4}))$"
  58. },
  59. "WebConfig": {
  60. "description": "Web configuration.",
  61. "type": "object",
  62. "properties": {
  63. "pinned": {
  64. "description": "Pinned content.",
  65. "$ref": "#/$defs/Pinned"
  66. },
  67. "bannerUrl": {
  68. "description": "URL pointing to an image used in the header of a node page.",
  69. "type": [
  70. "string",
  71. "null"
  72. ],
  73. "format": "uri"
  74. },
  75. "avatarUrl": {
  76. "description": "URL pointing to an image used as the node avatar.",
  77. "type": [
  78. "string",
  79. "null"
  80. ],
  81. "format": "uri"
  82. },
  83. "description": {
  84. "description": "Node description.",
  85. "type": [
  86. "string",
  87. "null"
  88. ],
  89. "format": "uri"
  90. }
  91. },
  92. "required": [
  93. "pinned"
  94. ]
  95. },
  96. "Pinned": {
  97. "description": "Pinned content. This can be used to pin certain content when\nlisting, e.g. pin repositories on a web client.",
  98. "type": "object",
  99. "properties": {
  100. "repositories": {
  101. "description": "Pinned repositories.",
  102. "type": "array",
  103. "uniqueItems": true,
  104. "items": {
  105. "$ref": "#/$defs/RepoId"
  106. }
  107. }
  108. },
  109. "required": [
  110. "repositories"
  111. ]
  112. },
  113. "RepoId": {
  114. "description": "A repository identifier.",
  115. "type": "string",
  116. "examples": [
  117. "rad:z3gqcJUoA1n9HaHKufZs5FCSGazv5"
  118. ],
  119. "minLength": 5,
  120. "pattern": "rad:z[1-9a-km-zA-HJ-NP-Z]+"
  121. },
  122. "CliConfig": {
  123. "description": "CLI configuration.",
  124. "type": "object",
  125. "properties": {
  126. "hints": {
  127. "description": "Whether to show hints or not in the CLI.",
  128. "type": "boolean",
  129. "default": false
  130. }
  131. }
  132. },
  133. "NodeConfig": {
  134. "description": "Service configuration.",
  135. "type": "object",
  136. "properties": {
  137. "alias": {
  138. "description": "Node alias.",
  139. "$ref": "#/$defs/Alias"
  140. },
  141. "listen": {
  142. "description": "Socket address (a combination of IPv4 or IPv6 address and TCP port) to listen on.",
  143. "type": "array",
  144. "items": {
  145. "type": "string"
  146. },
  147. "examples": [
  148. "127.0.0.1:8776"
  149. ],
  150. "default": []
  151. },
  152. "peers": {
  153. "description": "Peer configuration.",
  154. "$ref": "#/$defs/PeerConfig",
  155. "default": {
  156. "type": "dynamic"
  157. }
  158. },
  159. "connect": {
  160. "description": "Peers to connect to on startup.\nConnections to these peers will be maintained.",
  161. "type": "array",
  162. "uniqueItems": true,
  163. "items": {
  164. "$ref": "#/$defs/ConnectAddress"
  165. },
  166. "default": []
  167. },
  168. "externalAddresses": {
  169. "description": "Specify the node's public addresses",
  170. "type": "array",
  171. "items": {
  172. "$ref": "#/$defs/Address"
  173. },
  174. "default": []
  175. },
  176. "proxy": {
  177. "description": "Global proxy.",
  178. "type": [
  179. "string",
  180. "null"
  181. ]
  182. },
  183. "onion": {
  184. "description": "Onion address config.",
  185. "anyOf": [
  186. {
  187. "$ref": "#/$defs/AddressConfig"
  188. },
  189. {
  190. "type": "null"
  191. }
  192. ]
  193. },
  194. "network": {
  195. "description": "Peer-to-peer network.",
  196. "$ref": "#/$defs/Network",
  197. "default": "main"
  198. },
  199. "log": {
  200. "description": "Log level.",
  201. "$ref": "#/$defs/LogLevel",
  202. "default": "INFO"
  203. },
  204. "relay": {
  205. "description": "Whether or not our node should relay messages.",
  206. "$ref": "#/$defs/Relay",
  207. "default": "auto"
  208. },
  209. "limits": {
  210. "description": "Configured service limits.",
  211. "$ref": "#/$defs/Limits",
  212. "default": {
  213. "routingMaxSize": 1000,
  214. "routingMaxAge": 604800,
  215. "gossipMaxAge": 1209600,
  216. "fetchConcurrency": 1,
  217. "maxOpenFiles": 4096,
  218. "rate": {
  219. "inbound": {
  220. "fillRate": 5.0,
  221. "capacity": 1024
  222. },
  223. "outbound": {
  224. "fillRate": 10.0,
  225. "capacity": 2048
  226. }
  227. },
  228. "connection": {
  229. "inbound": 128,
  230. "outbound": 16
  231. },
  232. "fetchPackReceive": "500.0 MiB"
  233. }
  234. },
  235. "workers": {
  236. "description": "Number of worker threads to spawn.",
  237. "type": "integer",
  238. "format": "uint",
  239. "minimum": 0,
  240. "default": 8
  241. },
  242. "seedingPolicy": {
  243. "description": "Default seeding policy.",
  244. "$ref": "#/$defs/DefaultSeedingPolicy",
  245. "default": {
  246. "default": "block"
  247. }
  248. },
  249. "database": {
  250. "description": "Database configuration.",
  251. "$ref": "#/$defs/Config"
  252. },
  253. "secret": {
  254. "description": "Path to a file containing an Ed25519 secret key, in OpenSSH format, i.e.\nwith the `-----BEGIN OPENSSH PRIVATE KEY-----` header. The corresponding\npublic key will be used as the Node ID.\n\nA decryption password cannot be configured, but passed at runtime via\nthe environment variable `RAD_PASSPHRASE`.",
  255. "type": [
  256. "string",
  257. "null"
  258. ]
  259. }
  260. },
  261. "required": [
  262. "alias"
  263. ],
  264. "additionalProperties": true
  265. },
  266. "Alias": {
  267. "description": "Node alias, i.e. a short and memorable name for it.",
  268. "type": "string"
  269. },
  270. "PeerConfig": {
  271. "description": "Peer configuration.",
  272. "oneOf": [
  273. {
  274. "description": "Static peer set. Connect to the configured peers and maintain the connections.",
  275. "type": "object",
  276. "properties": {
  277. "type": {
  278. "type": "string",
  279. "const": "static"
  280. }
  281. },
  282. "required": [
  283. "type"
  284. ]
  285. },
  286. {
  287. "description": "Dynamic peer set.",
  288. "type": "object",
  289. "properties": {
  290. "type": {
  291. "type": "string",
  292. "const": "dynamic"
  293. }
  294. },
  295. "required": [
  296. "type"
  297. ]
  298. }
  299. ]
  300. },
  301. "Address": {
  302. "description": "An IP address, or a DNS name, or a Tor onion name, followed by the symbol ':', followed by a TCP port number.",
  303. "type": "string",
  304. "examples": [
  305. "xmrhfasfg5suueegrnc4gsgyi2tyclcy5oz7f5drnrodmdtob6t2ioyd.onion:8776",
  306. "seed.example.com:8776",
  307. "192.0.2.0:31337"
  308. ],
  309. "pattern": "^.+:((6553[0-5])|(655[0-2][0-9])|(65[0-4][0-9]{2})|(6[0-4][0-9]{3})|([1-5][0-9]{4})|([0-5]{0,5})|([0-9]{1,4}))$"
  310. },
  311. "AddressConfig": {
  312. "description": "Proxy configuration.",
  313. "oneOf": [
  314. {
  315. "description": "Proxy connections to this address type.",
  316. "type": "object",
  317. "properties": {
  318. "address": {
  319. "description": "Proxy address.",
  320. "type": "string"
  321. },
  322. "mode": {
  323. "type": "string",
  324. "const": "proxy"
  325. }
  326. },
  327. "required": [
  328. "mode",
  329. "address"
  330. ]
  331. },
  332. {
  333. "description": "Forward address to the next layer. Either this is the global proxy,\nor the operating system, via DNS.",
  334. "type": "object",
  335. "properties": {
  336. "mode": {
  337. "type": "string",
  338. "const": "forward"
  339. }
  340. },
  341. "required": [
  342. "mode"
  343. ]
  344. }
  345. ]
  346. },
  347. "Network": {
  348. "description": "Peer-to-peer network.",
  349. "type": "string",
  350. "enum": [
  351. "main",
  352. "test"
  353. ]
  354. },
  355. "LogLevel": {
  356. "$ref": "#/$defs/Level"
  357. },
  358. "Level": {
  359. "description": "A log level.",
  360. "oneOf": [
  361. {
  362. "description": "Designates very serious errors.",
  363. "type": "string",
  364. "const": "ERROR"
  365. },
  366. {
  367. "description": "Designates hazardous situations.",
  368. "type": "string",
  369. "const": "WARN"
  370. },
  371. {
  372. "description": "Designates useful information.",
  373. "type": "string",
  374. "const": "INFO"
  375. },
  376. {
  377. "description": "Designates lower priority information.",
  378. "type": "string",
  379. "const": "DEBUG"
  380. },
  381. {
  382. "description": "Designates very low priority, often extremely verbose, information.",
  383. "type": "string",
  384. "const": "TRACE"
  385. }
  386. ]
  387. },
  388. "Relay": {
  389. "description": "Relay configuration.",
  390. "oneOf": [
  391. {
  392. "description": "Always relay messages.",
  393. "type": "string",
  394. "const": "always"
  395. },
  396. {
  397. "description": "Never relay messages.",
  398. "type": "string",
  399. "const": "never"
  400. },
  401. {
  402. "description": "Relay messages when applicable.",
  403. "type": "string",
  404. "const": "auto"
  405. }
  406. ]
  407. },
  408. "Limits": {
  409. "description": "Configuration parameters defining attributes of minima and maxima.",
  410. "type": "object",
  411. "properties": {
  412. "routingMaxSize": {
  413. "description": "Number of routing table entries before we start pruning.",
  414. "type": "integer",
  415. "format": "uint",
  416. "minimum": 0,
  417. "default": 1000
  418. },
  419. "routingMaxAge": {
  420. "description": "How long to keep a routing table entry before being pruned.",
  421. "$ref": "#/$defs/LocalDuration",
  422. "default": 604800
  423. },
  424. "gossipMaxAge": {
  425. "description": "How long to keep a gossip message entry before pruning it.",
  426. "$ref": "#/$defs/LocalDuration",
  427. "default": 1209600
  428. },
  429. "fetchConcurrency": {
  430. "description": "Maximum number of concurrent fetches per peer connection.",
  431. "type": "integer",
  432. "format": "uint",
  433. "minimum": 0,
  434. "default": 1
  435. },
  436. "maxOpenFiles": {
  437. "description": "Maximum number of open files.",
  438. "type": "integer",
  439. "format": "uint",
  440. "minimum": 0,
  441. "default": 4096
  442. },
  443. "rate": {
  444. "description": "Rate limiter settings.",
  445. "$ref": "#/$defs/RateLimits",
  446. "default": {
  447. "inbound": {
  448. "fillRate": 5.0,
  449. "capacity": 1024
  450. },
  451. "outbound": {
  452. "fillRate": 10.0,
  453. "capacity": 2048
  454. }
  455. }
  456. },
  457. "connection": {
  458. "description": "Connection limits.",
  459. "$ref": "#/$defs/ConnectionLimits",
  460. "default": {
  461. "inbound": 128,
  462. "outbound": 16
  463. }
  464. },
  465. "fetchPackReceive": {
  466. "description": "Channel limits.",
  467. "$ref": "#/$defs/FetchPackSizeLimit",
  468. "default": "500.0 MiB"
  469. }
  470. }
  471. },
  472. "LocalDuration": {
  473. "description": "A time duration measured locally in seconds.",
  474. "type": "integer",
  475. "format": "uint128",
  476. "minimum": 0
  477. },
  478. "RateLimits": {
  479. "description": "Rate limits for inbound and outbound connections.",
  480. "type": "object",
  481. "properties": {
  482. "inbound": {
  483. "$ref": "#/$defs/RateLimit"
  484. },
  485. "outbound": {
  486. "$ref": "#/$defs/RateLimit"
  487. }
  488. },
  489. "required": [
  490. "inbound",
  491. "outbound"
  492. ]
  493. },
  494. "RateLimit": {
  495. "description": "Rate limits for a single connection.",
  496. "type": "object",
  497. "properties": {
  498. "fillRate": {
  499. "type": "number",
  500. "format": "double"
  501. },
  502. "capacity": {
  503. "type": "integer",
  504. "format": "uint",
  505. "minimum": 0
  506. }
  507. },
  508. "required": [
  509. "fillRate",
  510. "capacity"
  511. ]
  512. },
  513. "ConnectionLimits": {
  514. "description": "Connection limits.",
  515. "type": "object",
  516. "properties": {
  517. "inbound": {
  518. "description": "Max inbound connections.",
  519. "type": "integer",
  520. "format": "uint",
  521. "minimum": 0,
  522. "default": 128
  523. },
  524. "outbound": {
  525. "description": "Max outbound connections. Note that this can be higher than the *target* number.",
  526. "type": "integer",
  527. "format": "uint",
  528. "minimum": 0,
  529. "default": 16
  530. }
  531. }
  532. },
  533. "FetchPackSizeLimit": {
  534. "description": "Limiter for byte streams.\n\nDefault: 500MiB",
  535. "$ref": "#/$defs/ByteSize"
  536. },
  537. "ByteSize": {
  538. "description": "Byte quantities using unit prefixes according to SI or ISO/IEC 80000-13.",
  539. "type": "string",
  540. "pattern": "^\\d+(\\.\\d+)? ((K|M|G|T|P)i?B?|B)$",
  541. "examples": [
  542. "7 G",
  543. "50.3 TiB",
  544. "200 B",
  545. "4 Ki",
  546. "10 MB"
  547. ]
  548. },
  549. "DefaultSeedingPolicy": {
  550. "description": "Default seeding policy. Applies when no repository policies for the given repo are found.",
  551. "oneOf": [
  552. {
  553. "description": "Allow seeding.",
  554. "type": "object",
  555. "properties": {
  556. "default": {
  557. "type": "string",
  558. "const": "allow"
  559. }
  560. },
  561. "anyOf": [
  562. {
  563. "$ref": "#/$defs/Scope"
  564. },
  565. {
  566. "type": "null"
  567. }
  568. ],
  569. "required": [
  570. "default"
  571. ]
  572. },
  573. {
  574. "description": "Block seeding.",
  575. "type": "object",
  576. "properties": {
  577. "default": {
  578. "type": "string",
  579. "const": "block"
  580. }
  581. },
  582. "required": [
  583. "default"
  584. ]
  585. }
  586. ]
  587. },
  588. "Scope": {
  589. "description": "Follow scope of a seeded repository.",
  590. "oneOf": [
  591. {
  592. "description": "Seed remotes that are explicitly followed.",
  593. "type": "string",
  594. "const": "followed"
  595. },
  596. {
  597. "description": "Seed all remotes.",
  598. "type": "string",
  599. "const": "all"
  600. }
  601. ]
  602. },
  603. "Config": {
  604. "description": "Database configuration.",
  605. "type": "object",
  606. "properties": {
  607. "sqlite": {
  608. "description": "SQLite configuration.",
  609. "$ref": "#/$defs/SqliteConfig"
  610. }
  611. },
  612. "required": [
  613. "sqlite"
  614. ]
  615. },
  616. "SqliteConfig": {
  617. "description": "SQLite database configuration.",
  618. "type": "object",
  619. "properties": {
  620. "pragma": {
  621. "$ref": "#/$defs/Pragma"
  622. }
  623. }
  624. },
  625. "Pragma": {
  626. "description": "Global SQLite pragma statements to make in order to configure SQLite itself,\nsee <https://sqlite.org/pragma.html>.",
  627. "type": "object",
  628. "properties": {
  629. "journalMode": {
  630. "$ref": "#/$defs/JournalMode"
  631. },
  632. "synchronous": {
  633. "$ref": "#/$defs/Synchronous"
  634. }
  635. }
  636. },
  637. "JournalMode": {
  638. "description": "Value for a `journal_mode` pragma statement.\nFor a description of all variants please refer to\n<https://sqlite.org/pragma.html#pragma_journal_mode>.\nNote that when SQLite documentation talks about \"the application\",\nthe application linked against this crate, e.g. Radicle Node, Radicle CLI,\nand others, is meant.",
  639. "type": "string",
  640. "enum": [
  641. "DELETE",
  642. "TRUNCATE",
  643. "PERSIST",
  644. "MEMORY",
  645. "WAL",
  646. "OFF"
  647. ]
  648. },
  649. "Synchronous": {
  650. "description": "Value for a `synchronous` pragma statement.\nFor a description of all variants please refer to\n<https://sqlite.org/pragma.html#pragma_synchronous>.",
  651. "type": "string",
  652. "enum": [
  653. "EXTRA",
  654. "FULL",
  655. "NORMAL",
  656. "OFF"
  657. ]
  658. }
  659. }
  660. }
Add Comment
Please, Sign In to add comment