-
Notifications
You must be signed in to change notification settings - Fork 10
Expand file tree
/
Copy pathconfig-root.schema.json
More file actions
779 lines (764 loc) · 29.9 KB
/
Copy pathconfig-root.schema.json
File metadata and controls
779 lines (764 loc) · 29.9 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
{
"$schema": "https://json-schema.org/draft-06/schema",
"$id": "https://harper.fast/schema/config-root.schema.json",
"title": "HarperDB Root Configuration",
"description": "JSON Schema for harperdb-config.yaml as documented in docs.html. This focuses on the primary, documented configuration sections and keys. Unknown properties are allowed for forward compatibility.",
"type": "object",
"properties": {
"rootPath": {
"type": "string",
"description": "Root folder where Harper persists data, config, logs, and components. Default: user's home directory"
},
"componentsRoot": {
"type": "string",
"description": "Path to the folder containing local component files. Default: <ROOTPATH>/components"
},
"http": {
"type": "object",
"description": "HTTP server configuration for the main component server.",
"additionalProperties": true,
"properties": {
"sessionAffinity": {
"description": "Route multiple requests from the same client to the same thread. Use 'ip' or a header name.",
"type": ["string", "null"]
},
"compressionThreshold": {
"type": "integer",
"minimum": 0,
"description": "Responses larger than this threshold (bytes) will be compressed for clients that accept compression. Default: 1200"
},
"cors": { "type": "boolean", "description": "Enable Cross Origin Resource Sharing. Default: true" },
"corsAccessList": {
"type": ["array", "null"],
"description": "List of allowed origins for CORS.",
"items": { "type": "string" }
},
"corsAccessControlAllowHeaders": {
"type": "string",
"description": "Comma-separated list of header keys for Access-Control-Allow-Headers on OPTIONS requests. Default: 'Accept, Content-Type, Authorization'"
},
"headersTimeout": {
"type": "integer",
"description": "Milliseconds to wait for complete HTTP headers. Default: 60000"
},
"maxHeaderSize": {
"type": "integer",
"description": "Maximum allowed size of HTTP headers in bytes. Default: 16394"
},
"requestQueueLimit": {
"type": "integer",
"description": "Max estimated request queue time (ms) before rejecting with 503. Default: 20000"
},
"keepAliveTimeout": { "type": "integer", "description": "Keep-alive inactivity timeout in ms. Default: 30000" },
"port": { "type": "integer", "description": "HTTP port. Default: 9926" },
"securePort": { "type": ["integer", "null"], "description": "HTTPS port. Requires valid certificate + key." },
"http2": { "type": "boolean", "description": "Enable HTTP/2. Default: false" },
"timeout": { "type": "integer", "description": "Request timeout (ms). Default: 120000" },
"mtls": {
"description": "Enable and configure mTLS authentication for HTTP.",
"oneOf": [
{ "type": "boolean" },
{
"type": "object",
"additionalProperties": false,
"properties": {
"user": {
"type": ["string", "null"],
"description": "Authenticate all authorized mTLS connections as this user. Default: common name from certificate or null to not auto-auth."
},
"required": {
"type": "boolean",
"description": "Require client certificates for all HTTP connections. Default: false"
},
"certificateVerification": {
"description": "Enable certificate revocation checking (CRL/OCSP).",
"oneOf": [
{ "type": "boolean" },
{
"type": "object",
"additionalProperties": false,
"properties": {
"failureMode": {
"type": "string",
"enum": ["fail-open", "fail-closed"],
"description": "Global behavior when verification fails. Default: 'fail-closed'"
},
"crl": {
"type": "object",
"additionalProperties": false,
"properties": {
"enabled": { "type": "boolean", "description": "Enable CRL checking. Default: true" },
"timeout": {
"type": "number",
"description": "Max ms to wait for CRL download. Default: 10000"
},
"cacheTtl": { "type": "number", "description": "CRL cache TTL (ms). Default: 86400000" },
"gracePeriod": {
"type": "number",
"description": "Grace period after CRL nextUpdate (ms). Default: 86400000"
},
"failureMode": {
"type": "string",
"enum": ["fail-open", "fail-closed"],
"description": "CRL-specific failure mode. Default: 'fail-closed'"
}
}
},
"ocsp": {
"type": "object",
"additionalProperties": false,
"properties": {
"enabled": { "type": "boolean", "description": "Enable OCSP checking. Default: true" },
"timeout": {
"type": "number",
"description": "Max ms to wait for OCSP response. Default: 5000"
},
"cacheTtl": {
"type": "number",
"description": "Cache TTL for successful OCSP (ms). Default: 3600000"
},
"errorCacheTtl": {
"type": "number",
"description": "Cache TTL for OCSP errors (ms). Default: 300000"
},
"failureMode": {
"type": "string",
"enum": ["fail-open", "fail-closed"],
"description": "OCSP-specific failure mode. Default: 'fail-closed'"
}
}
}
}
}
]
}
}
}
]
},
"logging": {
"allOf": [{ "$ref": "#/definitions/loggerConfig" }],
"properties": {
"timing": { "type": "boolean", "description": "Log timing information for HTTP requests." },
"headers": { "type": "boolean", "description": "Log HTTP headers (verbose)." },
"id": { "type": "boolean", "description": "Assign/log unique id per request." }
}
}
}
},
"threads": {
"type": "object",
"description": "Harper worker thread configuration.",
"additionalProperties": true,
"properties": {
"count": { "type": "number", "description": "Number of worker threads. Default: logical CPU count minus one" },
"debug": {
"oneOf": [
{ "type": "boolean" },
{
"type": "object",
"additionalProperties": false,
"properties": {
"port": { "type": "integer", "description": "Port for debugging the main thread (default 9229)" },
"startingPort": {
"type": "integer",
"description": "Starting port to assign unique debugging ports per thread"
},
"host": { "type": "string", "description": "Debug host interface (default 127.0.0.1)" },
"waitForDebugger": { "type": "boolean", "description": "Wait for debugger before starting" }
}
}
]
},
"maxHeapMemory": { "type": "number", "description": "Heap memory limit per thread (MB)." },
"heapSnapshotNearLimit": { "type": "boolean", "description": "Take a heap snapshot when near the heap limit." },
"preload": {
"oneOf": [{ "type": "string" }, { "type": "array", "items": { "type": "string" } }],
"description": "Module(s) to preload via --import (ESM/loader-hook registration) before any Harper or app module on each worker thread, e.g. an APM agent's 'dd-trace/register.js' — the entry that instruments worker threads. Bare specifiers resolve against installed components' node_modules; absolute paths are also accepted."
},
"preloadRequire": {
"oneOf": [{ "type": "string" }, { "type": "array", "items": { "type": "string" } }],
"description": "Module(s) to preload via --require (CJS) before any Harper or app module on each worker thread, for agents that document the require path (e.g. 'dd-trace/init', Dynatrace OneAgent). Bare specifiers resolve against installed components' node_modules; absolute paths are also accepted."
}
}
},
"replication": {
"type": "object",
"description": "Harper replication configuration for clustering and data replication.",
"additionalProperties": true,
"properties": {
"hostname": { "type": "string", "description": "Hostname of this Harper instance." },
"url": { "type": "string", "description": "URL of this Harper instance." },
"databases": {
"description": "Databases to replicate. '*' for all, array of names, or array with objects to mark sharded databases.",
"oneOf": [
{ "type": "string" },
{
"type": "array",
"items": {
"oneOf": [
{ "type": "string" },
{
"type": "object",
"additionalProperties": false,
"properties": {
"name": { "type": "string" },
"sharded": { "type": "boolean" }
},
"required": ["name"]
}
]
}
}
]
},
"routes": {
"type": "array",
"description": "Routes to connect to other nodes. Each route can be a string or an object with hostname, port, and optional startTime.",
"items": {
"oneOf": [
{ "type": "string" },
{
"type": "object",
"additionalProperties": false,
"properties": {
"hostname": { "type": "string" },
"port": { "type": "integer" },
"startTime": {
"type": "string",
"format": "date-time",
"description": "ISO 8601 UTC start time to begin replication."
}
},
"required": ["hostname", "port"]
}
]
}
},
"startTime": { "type": "string", "format": "date-time", "description": "Start replication from this time." },
"revokedCertificates": {
"type": "array",
"items": { "type": "string" },
"description": "Array of revoked certificate serial numbers."
},
"port": { "type": "integer", "description": "Replication insecure port." },
"securePort": { "type": "integer", "description": "Replication secure port. Default: 9933" },
"enableRootCAs": {
"type": "boolean",
"description": "Verify certificates against Node.js bundled CA store. Default: true"
},
"mtls": {
"type": "object",
"description": "mTLS settings for replication connections (always required).",
"additionalProperties": true,
"properties": {
"certificateVerification": {
"description": "Enable certificate revocation checking (CRL/OCSP) for peer certificates.",
"oneOf": [
{ "type": "boolean" },
{
"type": "object",
"additionalProperties": false,
"properties": {
"failureMode": { "type": "string", "enum": ["fail-open", "fail-closed"] },
"crl": {
"type": "object",
"additionalProperties": false,
"properties": {
"enabled": { "type": "boolean" },
"timeout": { "type": "number" },
"cacheTtl": { "type": "number" },
"gracePeriod": { "type": "number" },
"failureMode": { "type": "string", "enum": ["fail-open", "fail-closed"] }
}
},
"ocsp": {
"type": "object",
"additionalProperties": false,
"properties": {
"enabled": { "type": "boolean" },
"timeout": { "type": "number" },
"cacheTtl": { "type": "number" },
"errorCacheTtl": { "type": "number" },
"failureMode": { "type": "string", "enum": ["fail-open", "fail-closed"] }
}
}
}
}
]
}
}
},
"blobTimeout": { "type": "number", "description": "Max time (ms) to wait for blob transfer. Default: 120000" },
"pingInterval": {
"type": "number",
"minimum": 1,
"description": "Interval (ms) between replication keep-alive pings. Default: 30000"
},
"pingTimeout": {
"type": "number",
"minimum": 1,
"description": "Time (ms) without socket activity before a replication connection is considered dead and terminated. Default: 2x pingInterval"
},
"replayTimeout": {
"type": "number",
"minimum": 1,
"description": "Max total wall-clock time (ms) that crash-recovery transaction-log replay may run before it is aborted so the node can finish booting. Default: 600000 (10 minutes)."
},
"failOver": {
"type": "boolean",
"description": "Attempt fail-over to different node when unreachable. Default: true"
},
"shard": { "type": "integer", "description": "Shard id for this instance." },
"logging": { "$ref": "#/definitions/loggerConfig" }
}
},
"localStudio": {
"type": "object",
"additionalProperties": false,
"properties": {
"enabled": { "type": "boolean", "description": "Enable local Harper Studio GUI. Default: false" }
}
},
"logging": {
"type": "object",
"description": "Logging configuration for Harper.",
"additionalProperties": true,
"properties": {
"auditLog": { "type": "boolean", "description": "Enable structured table transaction logging. Default: false" },
"file": { "type": "boolean", "description": "Log to file. Default: true" },
"auditRetention": {
"type": ["string", "number"],
"description": "Retention of audit logs (e.g. '3d'). Default: 3d"
},
"level": {
"type": "string",
"enum": ["trace", "debug", "info", "warn", "error", "fatal", "notify"],
"description": "Verbosity of text event logs. Default: warn"
},
"console": { "type": "boolean", "description": "Log console.* output to log file. Default: true" },
"root": { "type": "string", "description": "Directory where log files are written. Default: <ROOTPATH>/log" },
"path": { "type": "string", "description": "Log file path. Default: <ROOTPATH>/log/hdb.log" },
"rotation": {
"type": "object",
"additionalProperties": false,
"properties": {
"enabled": { "type": "boolean", "description": "Enable log rotation. Default: true" },
"compress": { "type": "boolean", "description": "Compress rotated logs with gzip. Default: false" },
"interval": {
"type": ["string", "null"],
"description": "Time between rotations (e.g. '1D', '6H', '30m'). Units: D (days), H (hours), M (months), m (minutes)."
},
"maxSize": { "type": ["string", "null"], "description": "Max size before rotation (e.g. '100M', '1G')." },
"retention": {
"type": ["string", "null"],
"description": "Delete rotated logs older than this age (e.g. '30D', '12H', '1M' for one month). Units: D (days), H (hours), M (months), m (minutes). When unset, rotated logs are kept indefinitely."
},
"path": { "type": "string", "description": "Directory to store rotated logs. Default: <ROOTPATH>/log" }
}
},
"stdStreams": { "type": "boolean", "description": "Log to stdout/stderr. Default: false" },
"auditAuthEvents": {
"type": "object",
"additionalProperties": false,
"properties": {
"logFailed": { "type": "boolean", "description": "Log failed authentication events. Default: false" },
"logSuccessful": {
"type": "boolean",
"description": "Log successful authentication events. Default: false"
}
}
},
"external": {
"$ref": "#/definitions/loggerConfig",
"description": "Logging configuration for external components that use the logger API."
}
}
},
"authentication": {
"type": "object",
"description": "Default authentication settings.",
"additionalProperties": true,
"properties": {
"authorizeLocal": {
"type": "boolean",
"description": "Automatically authorize requests from loopback IP as superuser. Default: true"
},
"cacheTTL": { "type": "number", "description": "Milliseconds an authentication can be cached. Default: 30000" },
"enableSessions": { "type": "boolean", "description": "Enable cookie-based sessions. Default: true" },
"operationTokenTimeout": {
"type": "string",
"description": "Operation token expiry duration (e.g. '1d'). Default: 1d"
},
"refreshTokenTimeout": {
"type": "string",
"description": "Refresh token expiry duration (e.g. '1d'). Default: 1d"
},
"logging": { "$ref": "#/definitions/loggerConfig" }
}
},
"operationsApi": {
"type": "object",
"description": "Operations API configuration. Values default to http configuration when not provided.",
"additionalProperties": true,
"properties": {
"network": {
"type": "object",
"additionalProperties": true,
"properties": {
"cors": { "type": "boolean" },
"corsAccessList": { "type": ["array", "null"], "items": { "type": "string" } },
"domainSocket": {
"type": "string",
"description": "Unix domain socket path for CLI access. Default: <ROOTPATH>/hdb/operations-server"
},
"headersTimeout": { "type": "integer" },
"keepAliveTimeout": { "type": "integer" },
"port": { "type": "integer", "description": "Operations API HTTP port. Default: 9925" },
"securePort": { "type": ["integer", "null"] },
"timeout": { "type": "integer" }
}
},
"componentFile": {
"type": "object",
"additionalProperties": false,
"properties": {
"maxSize": {
"type": "integer",
"minimum": 1,
"description": "Maximum size in bytes for files returned by get_component_file. Default: 5242880 (5 MB)"
}
}
},
"tls": {
"$ref": "#/definitions/tlsConfig",
"description": "TLS configuration overriding root TLS for Operations API"
}
}
},
"storage": {
"type": "object",
"description": "Storage engine configuration.",
"additionalProperties": true,
"properties": {
"writeAsync": {
"type": "boolean",
"description": "Disable fsync for faster writes (risk of data loss on crash). Default: false"
},
"caching": { "type": "boolean", "description": "Enable in-memory caching of records. Default: true" },
"compression": {
"oneOf": [
{ "type": "boolean" },
{
"type": "object",
"additionalProperties": false,
"properties": {
"dictionary": { "type": ["string", "null"], "description": "Path to compression dictionary file." },
"threshold": {
"type": "number",
"description": "Only entries larger than this many bytes will be compressed."
}
}
}
],
"description": "Enable/Configure compression (LZ4). Default: true"
},
"rocks": {
"type": "object",
"additionalProperties": true,
"properties": {
"compression": {
"type": ["string", "null"],
"description": "RocksDB block and blob compression codec for every column family. Default: null (derive from storage.compression)."
}
}
},
"compactOnStart": { "type": "boolean", "description": "Compact non-system databases on start. Default: false" },
"compactOnStartKeepBackup": {
"type": "boolean",
"description": "Keep backups created by compactOnStart. Default: false"
},
"maxTransactionQueueTime": {
"type": "string",
"description": "Max write queue time before rejecting (e.g. '45s')."
},
"noReadAhead": { "type": "boolean", "description": "Advise OS to not read ahead. Default: false" },
"randomAccessFields": {
"type": "boolean",
"description": "Encode records as typed random-access structures, optimizing for fast field access and smaller records. Best for tables with stable, homogeneous field types; wide or variably-typed schemas should leave this off. Applies to each primary table on open, so changing it switches encoding for tables that have not pinned the choice via the @table(randomAccessFields:) directive (safe at runtime: existing records still decode, only new writes change). Default: false"
},
"prefetchWrites": { "type": "boolean", "description": "Load data prior to write transactions. Default: true" },
"path": { "type": "string", "description": "Directory for all database files. Default: <rootPath>/database" },
"backupPath": {
"type": "string",
"description": "Directory for managed database backups (RocksDB directory backups created by create_backup), one subdirectory per database. Default: <rootPath>/backup"
},
"blobPaths": {
"oneOf": [{ "type": "string" }, { "type": "array", "items": { "type": "string" } }],
"description": "Path or array of paths for blob storage. Default: <rootPath>/blobs"
},
"blobReadTimeout": {
"type": "number",
"description": "Max time (ms) a blob read will wait for an in-progress write to finish before failing with a 503, rather than holding the connection. Default: 20000"
},
"pageSize": { "type": "number", "description": "Database page size (bytes). Default: OS default" },
"reclamation": {
"type": "object",
"description": "Reclamation process configuration.",
"additionalProperties": true
},
"transactionLog": {
"type": "object",
"description": "Transaction log configuration.",
"additionalProperties": true,
"properties": {
"coolingInterval": {
"type": ["string", "number"],
"description": "How often to advise mapped transaction-log pages cold (MADV_COLD) so the kernel reclaims them first under memory pressure (e.g. '30s'). Non-destructive; helps memory reclamation during replication catch-up. Set to 0 to disable. Default: '30s'"
}
}
},
"logging": { "$ref": "#/definitions/loggerConfig" }
}
},
"tls": {
"description": "TLS certificates/keys/settings for HTTPS and MQTT. Can be a single object or an array (SNI).",
"oneOf": [
{ "$ref": "#/definitions/tlsConfig" },
{ "type": "array", "items": { "$ref": "#/definitions/tlsConfig" } }
]
},
"mqtt": {
"type": "object",
"description": "MQTT server configuration.",
"additionalProperties": true,
"properties": {
"port": { "type": "number", "description": "Insecure MQTT port. Default: 1883" },
"securePort": { "type": "number", "description": "Secure MQTT port. Default: 8883" },
"webSocket": { "type": "boolean", "description": "Enable MQTT over WebSockets (on http port). Default: true" },
"requireAuthentication": {
"type": "boolean",
"description": "Require authentication for MQTT connections. Default: true"
},
"mtls": {
"oneOf": [
{ "type": "boolean" },
{
"type": "object",
"additionalProperties": false,
"properties": {
"user": {
"type": ["string", "null"],
"description": "Authenticate all authorized mTLS connections as this user (or null for none). Default: Common Name"
},
"required": {
"type": "boolean",
"description": "Require client certificates for all MQTT connections. Default: false"
},
"certificateAuthority": {
"type": "string",
"description": "Override CA path for MQTT. Default: tls.certificateAuthority"
},
"certificateVerification": {
"oneOf": [
{ "type": "boolean" },
{
"type": "object",
"additionalProperties": false,
"properties": {
"timeout": {
"type": "number",
"description": "Max ms to wait for OCSP response. Default: 5000"
},
"cacheTtl": {
"type": "number",
"description": "Cache TTL (ms) for verification results. Default: 3600000"
},
"failureMode": {
"type": "string",
"enum": ["fail-open", "fail-closed"],
"description": "Behavior on verification failure. Default: 'fail-open'"
}
}
}
]
}
}
}
]
},
"logging": { "$ref": "#/definitions/loggerConfig" }
}
},
"databases": {
"type": "object",
"description": "Optional mapping of databases and tables to file system paths.",
"additionalProperties": {
"type": "object",
"additionalProperties": false,
"properties": {
"path": { "type": "string", "description": "Path for all files of this database." },
"auditPath": { "type": "string", "description": "Path for audit log database files for this database." },
"tables": {
"type": "object",
"additionalProperties": {
"type": "object",
"additionalProperties": false,
"properties": {
"path": { "type": "string", "description": "Path for this table's files." }
},
"required": ["path"]
}
}
}
}
},
"agent": {
"type": "object",
"description": "Built-in Harper Agent component. Disabled by default to avoid surprise LLM costs.",
"additionalProperties": false,
"properties": {
"enabled": { "type": "boolean", "description": "Enable the built-in agent component. Default: false" },
"provider": {
"type": "string",
"description": "Optional model provider override. Falls back to scope.models default when omitted."
},
"model": {
"type": "string",
"description": "Optional model id override. Falls back to scope.models default when omitted."
},
"maxTurns": {
"type": "integer",
"minimum": 1,
"description": "Maximum tool-call iterations per agent run. Default: 50"
},
"maxCostUsd": {
"type": "number",
"minimum": 0,
"description": "Per-session cost budget. NOT YET ENFORCED — surfacing operator intent until #612 ships per-call cost telemetry. Default: 5.00"
},
"autoApprove": {
"type": "boolean",
"description": "Run without per-action approval gates. Destructive ops still require allowDestructive and approval. Default: false"
},
"allowDestructive": {
"type": "boolean",
"description": "Allow destructive operator tools (drop_component, restart, set_configuration, ...). Default: false"
},
"user": {
"type": "string",
"description": "Harper user the agent acts as. Default: hdb_agent (created at startup if missing)."
},
"componentsScope": {
"type": "string",
"description": "Filesystem scope for component edits, relative to rootPath. Default: ./components"
},
"systemPromptAppend": {
"type": "string",
"description": "Operator text appended to the agent's system prompt, after the built-in grounding and the Harper best-practices overview. Tunable at runtime via set_agent_config."
}
}
},
"analytics": {
"type": "object",
"additionalProperties": false,
"properties": {
"aggregatePeriod": {
"type": "number",
"description": "Seconds between aggregation of raw analytics. Default: 60"
},
"replicate": {
"type": "boolean",
"description": "Replicate aggregated analytics across cluster. Default: false"
},
"storageInterval": {
"type": "number",
"description": "Number of aggregation cycles between node storage measurements. 0 to disable. Default: 10"
},
"rawRetentionMs": {
"type": "number",
"minimum": 0,
"description": "Milliseconds to retain raw (pre-aggregation) analytics. Clamped to at least aggregatePeriod to prevent data loss. Default: 3600000 (1 hour)"
},
"aggregateRetentionMs": {
"type": "number",
"minimum": 0,
"description": "Milliseconds to retain aggregated analytics. 0 disables cleanup (keep forever). Default: 31536000000 (1 year)"
},
"logging": { "$ref": "#/definitions/loggerConfig" }
}
}
},
"additionalProperties": true,
"definitions": {
"loggerConfig": {
"type": "object",
"additionalProperties": true,
"properties": {
"path": { "type": "string" },
"root": { "type": "string" },
"level": { "type": "string", "enum": ["trace", "debug", "info", "warn", "error", "fatal", "notify"] },
"tag": { "type": "string" },
"stdStreams": { "type": "boolean" }
}
},
"tlsConfig": {
"type": "object",
"additionalProperties": false,
"properties": {
"certificate": {
"type": "string",
"description": "Path to certificate file. Default: <ROOTPATH>/keys/certificate.pem"
},
"certificateAuthority": { "type": "string", "description": "Path to CA file. Default: <ROOTPATH>/keys/ca.pem" },
"privateKey": {
"type": "string",
"description": "Path to private key file. Default: <ROOTPATH>/keys/privateKey.pem"
},
"ciphers": { "type": "string", "description": "Optional explicit cipher list." },
"host": { "type": "string", "description": "Optional SNI host this certificate applies to." },
"certificateWatchInterval": {
"type": "number",
"minimum": 0,
"description": "Interval in ms for the periodic re-read safety net that re-checks watched cert/key files in case an inotify change event was missed (e.g. on overlayfs/containers/network mounts). Honored on the top-level tls block. Default: 300000 (5 min). 0 disables polling, leaving only the inotify watcher."
}
}
}
},
"examples": [
{
"rootPath": "~/hdb",
"componentsRoot": "~/hdb/components",
"http": {
"port": 9926,
"cors": true,
"compressionThreshold": 1200,
"mtls": {
"required": false,
"certificateVerification": {
"failureMode": "fail-closed",
"crl": { "enabled": true, "timeout": 10000, "cacheTtl": 86400000, "gracePeriod": 86400000 },
"ocsp": { "enabled": true, "timeout": 5000, "cacheTtl": 3600000, "errorCacheTtl": 300000 }
}
}
},
"threads": { "count": 8, "maxHeapMemory": 300 },
"authentication": { "authorizeLocal": true, "enableSessions": true },
"operationsApi": { "network": { "port": 9925 } },
"logging": {
"level": "warn",
"file": true,
"rotation": { "enabled": true, "interval": "1D", "maxSize": "100M" }
},
"storage": { "path": "~/hdb/database", "blobPaths": ["~/hdb/blobs"] },
"tls": {
"certificate": "~/hdb/keys/certificate.pem",
"privateKey": "~/hdb/keys/privateKey.pem",
"certificateAuthority": "~/hdb/keys/ca.pem"
},
"mqtt": { "port": 1883, "securePort": 8883, "webSocket": true },
"analytics": { "aggregatePeriod": 60, "replicate": false },
"my-app": { "package": "git+https://github.com/example/my-app.git", "port": 4000 }
}
]
}