Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b4931be894
|
||
|
|
099ce3fcaa
|
||
|
|
378560175f
|
||
|
|
47ad825bfa
|
||
|
|
9df6813d1a
|
||
|
|
56f1356d75
|
||
|
|
3107a9fbe3
|
||
|
|
5505bef5ee
|
||
|
|
59d85e197f
|
||
|
|
d0d79cbf91
|
||
|
|
fdfcbab4bd
|
||
|
|
dd38d93a29
|
||
|
|
07d30c95ca
|
||
|
|
0999b7d84d
|
||
|
|
6bc78bdce8
|
||
|
|
16abc47613
|
||
|
|
81278b37e3
|
||
|
|
571254dbf7
|
||
|
|
5c3b0b9714
|
||
|
|
e80b18208e
|
||
|
|
efd71ff71f
|
||
|
|
47e8db7453
|
||
|
|
6791125aab
|
||
|
|
86b89a5957
|
||
|
|
7630a14705
|
||
|
|
cb6e2a039c
|
||
|
|
95ce309b3a
|
||
|
|
34482c8b0c
|
||
|
|
ace8c1be44
|
||
|
|
bf17e2471b
|
||
|
|
61d486fdc0
|
||
|
|
77e291fdfc
|
||
|
|
6a25153659
|
||
|
|
15efad9ad7
|
||
|
|
fa96ee852c
|
||
|
|
a101b64703
|
||
|
|
5e53e8ec0e
|
||
|
|
65cd993ee6
|
||
|
|
27cd2d0df1
|
||
|
|
f1c595d39b
|
||
|
|
5cc59c31c6
|
||
|
|
35688b449a
|
||
|
|
ea6385879f
|
||
|
|
a23417f392
|
||
|
|
db2cfe172e | ||
|
|
79be5aad96
|
||
|
|
aa3568dd52
|
||
|
|
368d484410
|
||
|
|
9b8de57a33
|
||
|
|
6356aa5d52
|
||
|
|
6a3bf1e200
|
||
|
|
a8628de625
|
||
|
|
0d267170c6
|
||
|
|
ccb36a1ca9
|
||
|
|
936c5267f0
|
||
|
|
1e105ff4c8 | ||
|
|
2e9d14412e | ||
|
|
f6eff43ca4 | ||
|
|
a2141ed4bb | ||
|
|
90e58a67e9 | ||
|
|
5dc5dbbafc | ||
|
|
74deeb74d5 | ||
|
|
3afc693063 | ||
|
|
2794416272 | ||
|
|
21980f9ced | ||
|
|
08988692c1
|
||
|
|
6b4ff8101a
|
||
|
|
24a3efcf60
|
||
|
|
bc4ac4436d
|
||
|
|
c538017523
|
||
|
|
2ea0062bef
|
||
|
|
5dc2d79fdb | ||
|
|
f0f09e9189 | ||
|
|
8bf3ace96b
|
||
|
|
8dd28b90be
|
||
|
|
e4663c22c0
|
||
|
|
fa4a078a34
|
||
|
|
f27317738d
|
||
|
|
a7686042e5
|
||
|
|
bc031880bf
|
||
|
|
eb7d852567
|
||
|
|
8c9c19efb0
|
||
|
|
cd8fad1b66
|
||
|
|
2d83b50837
|
||
|
|
4b399e44aa
|
||
|
|
7904ccdfe0
|
||
|
|
56dbb31923
|
||
|
|
74a560533e
|
||
|
|
6127ded28d
|
||
|
|
fe4d574976
|
||
|
|
c9ed3b1ae2
|
||
|
|
afdb0a0c97
|
||
|
|
d1e85c6e2a
|
||
|
|
16f17f702c
|
||
|
|
ba077f3779
|
||
|
|
58f1f9ce57
|
||
|
|
19b273a87b
|
||
|
|
ef3b5f98ea
|
||
|
|
26e19f3de4
|
||
|
|
c5591d95da
|
||
|
|
1c10378a40
|
||
|
|
efe7069bc1
|
||
|
|
67ce2901a5
|
||
|
|
21d1d2e8bf
|
||
|
|
dd57e6563a
|
||
|
|
da941f05aa
|
||
|
|
9c04b74e6f
|
||
|
|
152e7b4d2f
|
||
|
|
911152c9d1
|
||
|
|
0d25c93ea0
|
||
|
|
bed51c4bd1
|
||
|
|
f24c2b4455
|
||
|
|
2ae793cc94
|
||
|
|
b47e98e25f
|
||
|
|
8265e99466
|
||
|
|
30aa351eb6
|
||
|
|
7e701f9a50
|
||
|
|
4a9f30ef04
|
||
|
|
eb4136ffe6
|
||
|
|
383d7d6dad
|
||
|
|
dad6924a0c
|
||
|
|
de05bc2cbd
|
||
|
|
2bfb262e9c
|
||
|
|
0ad4374a2a
|
||
|
|
7f5220dea3
|
||
|
|
4b60033429
|
||
|
|
062336db91
|
||
|
|
60d9b6b7aa
|
||
|
|
e1ada94d78
|
||
|
|
8c267b6edd
|
||
|
|
33f7ebdff4
|
||
|
|
e801306c15
|
||
|
|
4707427759
|
||
|
|
faeaa0d7f0
|
||
|
|
240dc52226
|
||
|
|
7f89b03507
|
||
|
|
787a213db6
|
||
|
|
3e4b020311
|
||
|
|
51a1cf5128
|
||
|
|
d9e993e2b9
|
||
|
|
de3bfe296d
|
||
|
|
53719c6859
|
||
|
|
456c08751a
|
||
|
|
07d14c8d50
|
||
|
|
c1b4ba2b6b
|
||
|
|
84284d59c3
|
||
|
|
5c8fb901f9
|
||
|
|
501338ffbd
|
||
|
|
61f576a25c
|
||
|
|
a5826156a3
|
||
|
|
682995bdf7
|
||
|
|
9c0d043b57
|
||
|
|
aefe2b81e9
|
||
|
|
eadb88d3bf
|
||
|
|
8b9f5b2c60
|
||
|
|
a420b742e8
|
||
|
|
bc56b71539
|
||
|
|
a1347dbfc8
|
||
|
|
34c97ce8e8
|
||
|
|
bd212ec9ac
|
||
|
|
037ab0623a
|
||
|
|
9aceaa15bc
|
||
|
|
0a2aeb65ce
|
||
|
|
5004e8b40b
|
||
|
|
9c5af2c2d3
|
||
|
|
f8c572ebef
|
||
|
|
e72d9313e2
|
||
|
|
f4bfa59dec
|
||
|
|
a54654b0c8
|
||
|
|
81dcc7d94e
|
||
|
|
e3130d53e7
|
||
|
|
098d8cc328
|
||
|
|
6c59d6b742
|
||
|
|
1a0c697858
|
||
|
|
65a8b7cd47
|
||
|
|
970fb2ab84
|
||
|
|
e127b2b05d
|
||
|
|
02227a0b22
|
||
|
|
9c0ea938b8
|
||
|
|
763cd0e581
|
||
|
|
48d0212784
|
||
|
|
f6e9d48da6
|
||
|
|
46238afd62
|
||
|
|
4b494bf75b
|
||
|
|
b9a60e03a3
|
||
|
|
bc72655c8e
|
||
|
|
592d36e0d1
|
||
|
|
d318f912a8
|
||
|
|
31b2827048
|
||
|
|
01fd0fbf97
|
||
|
|
9c0da07807
|
||
|
|
14060675cd
|
||
|
|
74928925c8
|
||
|
|
35e2a216ab
|
||
|
|
b6907d8366
|
||
|
|
4b5c60330d
|
||
|
|
69b5b2aba6
|
||
|
|
d6f3a1a01d
|
||
|
|
ca279a200a
|
||
|
|
5d8c9303e0
|
||
|
|
23f23a6cab
|
||
|
|
64ef2c9af7
|
||
|
|
c091d33a44
|
||
|
|
96342c1564
|
||
|
|
a3132792ea
|
||
|
|
1989948ab3
|
||
|
|
2e48acfc92
|
||
|
|
7b6154e7e8
|
||
|
|
3513dad609
|
||
|
|
84e9116877
|
||
|
|
fb5f3ad472
|
||
|
|
a88f5630fe
|
||
|
|
f47e60db00
|
||
|
|
29a06f7c54
|
||
|
|
30b4c28e06
|
||
|
|
01eb4aaf7c
|
||
|
|
b48616798d
|
||
|
|
073959b4f9
|
||
|
|
81bca2251e
|
||
|
|
32fbf8b69c
|
||
|
|
ee66e4f0f3
|
||
|
|
e70c27faf9
|
||
|
|
ae3bbc6cfe
|
||
|
|
98c0c11cbb
|
||
|
|
9af3b29342
|
||
|
|
96fb0afcd9
|
||
|
|
90637aa457
|
||
|
|
0346bfef77
|
||
|
|
b868d450bd
|
||
|
|
064eeab748
|
||
|
|
904c510246
|
||
|
|
cf6108ad14
|
||
|
|
010b964264
|
||
|
|
731417ab48
|
||
|
|
264062866c
|
||
|
|
59b0ac03c9
|
||
|
|
c12f6b7947
|
||
|
|
7673e3a135
|
||
|
|
f47aac477a
|
||
|
|
9e776f23ed
|
||
|
|
5642058fd0
|
||
|
|
cbfcd43018
|
||
|
|
a0d14090ef
|
||
|
|
091d117459
|
||
|
|
0807fe6ad6
|
||
|
|
4db38e0d2a
|
||
|
|
9e8f160f25
|
||
|
|
64dfad6d53
|
||
|
|
6a3bf5a71a
|
||
|
|
0218e4ec89
|
||
|
|
ce70d4f3ee
|
||
|
|
83613d902a
|
||
|
|
1026d5e3b6
|
||
|
|
ee4c3f9c16
|
||
|
|
21de660ae1
|
||
|
|
52b027955b
|
||
|
|
e2917420fb
|
||
|
|
c226c4f686
|
||
|
|
9e2cf252ac
|
||
|
|
9fe446a426
|
||
|
|
20d81258ac
|
||
|
|
053ed58c08
|
||
|
|
546e5cd6ef
|
||
|
|
2f802e04a4
|
||
|
|
124d2033fc
|
||
|
|
46372b51d5
|
||
|
|
db36d853ce
|
||
|
|
4b97ac5841
|
||
|
|
e909aee155
|
||
|
|
564339e1aa
|
||
|
|
e45fee9bc9
|
||
|
|
4cdb5996c5
|
||
|
|
4657ff2646
|
||
|
|
703d5376bb
|
||
|
|
dd80500e7a
|
||
|
|
1e21aa975d
|
||
|
|
66b63260e9
|
||
|
|
470015483e
|
||
|
|
42f0688f84
|
||
|
|
b6f7059212
|
||
|
|
88afd1ebc9
|
||
|
|
a4a4e97f07
|
||
|
|
4bc0d54341
|
||
|
|
dabe0b4f7c
|
||
|
|
28733c8522
|
||
|
|
4b1ae4babf
|
||
|
|
50b75f6987
|
||
|
|
0c8b673615
|
||
|
|
ef62dcc97a
|
||
|
|
82cfc1de5b
|
||
|
|
983f462740
|
||
|
|
46edda9961
|
||
|
|
3dcc8da0de
|
||
|
|
a2972ac5d6
|
||
|
|
85e6f8eb40
|
||
|
|
55077620bb
|
||
|
|
400699cfbb
|
||
|
|
a0385a56c7
|
||
|
|
22aee72679
|
||
|
|
ff58c8e39b
|
||
|
|
25007e8316
|
||
|
|
b9dd744f8c
|
||
|
|
a91df7ec1f
|
||
|
|
5712c9c4e6
|
||
|
|
1f5163092b
|
||
|
|
4e1f1b3c4d
|
||
|
|
1b8eb362d2
|
||
|
|
7903a0e225
|
||
|
|
3a700cddfa
|
||
|
|
0238f247e5
|
||
|
|
e594ec3780
|
||
|
|
200c6d0928
|
||
|
|
0dbf241106
|
||
|
|
af753290e7
|
||
|
|
a6644c20cd
|
||
|
|
4877362223
|
||
|
|
0335872701
|
||
|
|
eb9d470ba8
|
||
|
|
a3d32e92e5
|
||
|
|
deb3865d75
|
||
|
|
6d97f62929
|
||
|
|
18d1e07a21
|
||
|
|
cf249d7643
|
||
|
|
66220e1752
|
||
|
|
93c9eb51f3
|
||
|
|
e787a79af4
|
||
|
|
777b17acf7
|
||
|
|
02df83ccb7
|
||
|
|
68d81fbbd0
|
||
|
|
75c3d2b096
|
||
|
|
e898acedc8
|
||
|
|
b89d9e0f05
|
||
|
|
58858f0d92
|
||
|
|
8b64ab0afe
|
||
|
|
e8366683a9
|
||
|
|
99a3d675a8
|
||
|
|
a69a0ea942
|
||
|
|
9cd31e48ca
|
||
|
|
998c72f8d3
|
||
|
|
7a311a3c74
|
||
|
|
e78cb1e63e
|
||
|
|
14e2474a49
|
||
|
|
86192e8053
|
||
|
|
990cd9408c
|
||
|
|
c7ce32df3e
|
||
|
|
5d620461fe
|
||
|
|
411632548c
|
||
|
|
a262151cb9
|
||
|
|
a8d1de8b5e
|
||
|
|
9f830db510
|
||
|
|
80129b7dd6
|
||
|
|
48c28b36ba
|
||
|
|
c5382a8476
|
||
|
|
eed9101d5b
|
||
|
|
cdfdf3a756
|
||
|
|
1d329bad35
|
||
|
|
f5c566bcab
|
||
|
|
90090922e1
|
||
|
|
a8f1fc9ea3
|
||
|
|
a9621b91cd
|
||
|
|
c7fabbee25
|
||
|
|
b7b6078939
|
||
|
|
39bfde195c
|
||
|
|
67ae6afec1
|
||
|
|
b314968328
|
||
|
|
432e6280d6
|
||
|
|
236d0b678a
|
||
|
|
5f45cdebb5
|
||
|
|
bfe28f6750
|
||
|
|
44a7d59acf
|
||
|
|
7148579544
|
||
|
|
6eea6aaffa
|
||
|
|
dc4cd29c83
|
||
|
|
87ed8a2e15
|
||
|
|
855e8ceb3b
|
||
|
|
7a9f507e2d
|
||
|
|
104854da2a
|
||
|
|
3225396cf1
|
||
|
|
811cab57ac
|
||
|
|
3a965e2a4f
|
||
|
|
7d664d7efb
|
||
|
|
92fbcd7a28
|
||
|
|
5edf58fd68
|
||
|
|
da1795c597
|
||
|
|
a18a4f7500
|
||
|
|
7ab209fa7e
|
||
|
|
97fbc35ee4
|
||
|
|
7d6f22d227
|
||
|
|
0451545220
|
||
|
|
5c02207d48
|
||
|
|
e784adbd7a
|
||
|
|
d3678869d2
|
||
|
|
6c287b48e6
|
||
|
|
bbd3c39ef1
|
||
|
|
2096ae8267
|
||
|
|
a1ec538a87
|
||
|
|
45b9295cb7
|
||
|
|
e7d3ed72e4
|
||
|
|
82f5afaa6d
|
||
|
|
2f95dfb67d
|
||
|
|
fb732974f5
|
||
|
|
81c59d7fac
|
||
|
|
a2b82b4c25
|
||
|
|
21dfb56e50
|
||
|
|
41f44c43a1
|
||
|
|
ca4b039cb4
|
||
|
|
841c6aea16
|
||
|
|
fb330f350d
|
||
|
|
6516477b20
|
||
|
|
9d8e4f68ab
|
||
|
|
3653376221
|
||
|
|
925365b245
|
||
|
|
5b3ae6abde
|
||
|
|
ecf4e6b95a
|
||
|
|
6a17951a3a
|
||
|
|
0cfa701f5c
|
||
|
|
a5ba2c994f
|
||
|
|
5e9e551fbb
|
||
|
|
5810c49260
|
||
|
|
e2df9cbd0a
|
||
|
|
806c82bda3
|
||
|
|
39929b9e48
|
||
|
|
f4b7652ae7
|
||
|
|
1def83a43f
|
||
|
|
6d54952cbb
|
||
|
|
757c3016ae
|
||
|
|
a0ee8e3f2e
|
||
|
|
3eb976ef83
|
||
|
|
47a340bf79
|
||
|
|
cdd636d5aa
|
||
|
|
4c54d250f6
|
||
|
|
f9ac9229d5
|
||
|
|
0d9e2d1cd8
|
||
|
|
e389e1a21e
|
||
|
|
73e32f016a
|
||
|
|
6b7f6f2731
|
||
|
|
f5be0d60dd
|
||
|
|
851cb78b04
|
||
|
|
f183a397cb
|
||
|
|
f49ba6bd66
|
||
|
|
8dba4e6dec
|
||
|
|
c26eeda939
|
||
|
|
e6a2a16bba
|
||
|
|
6cc8107ebb
|
||
|
|
8c3464163d
|
||
|
|
8d89f47d6b
|
||
|
|
260732f400
|
||
|
|
55e477794e
|
||
|
|
3ff1649322
|
||
|
|
bdc457d11e
|
||
|
|
500d02be78
|
||
|
|
0cd9cefd76
|
||
|
|
0a770ed171
|
||
|
|
0d13b919da
|
||
|
|
63a1750936
|
||
|
|
d0118756d7
|
||
|
|
f4c304cfba
|
||
|
|
afaea346ee
|
||
|
|
68e8552f0d
|
||
|
|
b25676b612
|
||
|
|
60c0f19e63
|
||
|
|
65e6bafb23
|
||
|
|
1c191b4ee0
|
||
|
|
892ed291b9
|
||
|
|
c5f24ec914
|
||
|
|
aefb4e486b
|
||
|
|
7c7129eefb
|
||
|
|
db346b159d
|
||
|
|
a3d4b751b9
|
||
|
|
f3a379add1
|
||
|
|
d7741d6088
|
||
|
|
27df64f8b0
|
||
|
|
8890c9ac3e
|
||
|
|
fb281c192a
|
||
|
|
fc6f614408
|
||
|
|
40526b077f
|
||
|
|
061227708d
|
||
|
|
a04fd3834d | ||
|
|
a4fbaaf84c | ||
|
|
606da1aee5
|
||
|
|
228f17d98a | ||
|
|
3c1ecc8087
|
||
|
|
29e263ab23
|
||
|
|
fbc9ed21e7 | ||
|
|
76be7b87b2 | ||
|
|
804d306f75
|
||
|
|
782daf8bbb | ||
|
|
5baef8805d | ||
|
|
82ca9613c7
|
||
|
|
4e9745d5c6
|
||
|
|
ea64d84696 | ||
|
|
2bec268b29 | ||
|
|
5b282c9efe | ||
|
|
7b295df8ff
|
||
|
|
607bfddd0e | ||
|
|
779b036d95 | ||
|
|
27e997e0d9 | ||
|
|
433ea390a6
|
||
|
|
ff8615b090
|
||
|
|
14da38b9b7
|
||
|
|
017a1d56e2 | ||
|
|
af02cbe832 | ||
|
|
38d9cca84a | ||
|
|
cdae23d7e9 | ||
|
|
1ae6d39680 | ||
|
|
07e4e8f727 | ||
|
|
98941c20a0
|
||
|
|
fe8afb18d0
|
||
|
|
3f092c0704
|
||
|
|
f156150a8b
|
||
|
|
9dd55646bb
|
||
|
|
6a7f8b4847 | ||
|
|
1c5915f521
|
||
|
|
864240fd61 | ||
|
|
1730938e03 | ||
|
|
2a73a37d27 | ||
|
|
4694406434 | ||
|
|
b8c394767c | ||
|
|
604d615d7a | ||
|
|
77db59141c
|
||
|
|
eabd7c8884
|
||
|
|
7ffbf0435c
|
||
|
|
8082e200f2
|
||
|
|
b234a85090
|
||
|
|
37ea698a28 | ||
|
|
bc429cd351 | ||
|
|
75044ee4c0 | ||
|
|
914a5f9b03 | ||
|
|
a7a411bd4b | ||
|
|
9ac8a60999 | ||
|
|
04975db9a1
|
||
|
|
b97eb45275
|
||
|
|
658a4cb50e
|
||
|
|
5a98c313e0
|
||
|
|
f92c5b4536
|
||
|
|
c54d328f0d
|
||
|
|
161e8f95bf
|
||
|
|
c155bb24ba
|
||
|
|
0033933a58
|
||
|
|
a9aacab79d
|
||
|
|
dcc12582ce
|
||
|
|
4728c8c253
|
||
|
|
255e0c7ee0
|
||
|
|
bc16b74c93
|
||
|
|
44237b448b
|
||
|
|
e5e968780f
|
||
|
|
31578e8857
|
||
|
|
f3f90f3224
|
||
|
|
8aa3540fa7
|
||
|
|
52549c1bab
|
||
|
|
f7c3e1788c
|
||
|
|
5ea115746c
|
||
|
|
12a25faf31 | ||
|
|
c9a8e21759 | ||
|
|
28a6ac8b98
|
||
|
|
73860b26d2 | ||
|
|
9ca3432f8e | ||
|
|
1b53c5787e | ||
|
|
b509397e8d | ||
|
|
721e6332ed
|
||
|
|
cc49fecc77
|
||
|
|
c3e64e5485 | ||
|
|
13ec693726
|
||
|
|
e3ffefdc7d
|
||
|
|
04798b990a
|
||
|
|
0e889977c0
|
||
|
|
47e3d8d837 | ||
|
|
9a9629400e | ||
|
|
0525edd3bb
|
||
|
|
82313e4af5
|
||
|
|
e34941b1eb
|
||
|
|
67c9b7a00a
|
||
|
|
20ffe63367
|
||
|
|
bcbd09fc08
|
||
|
|
a3fdbddfc0
|
||
|
|
70eef0ec99
|
||
|
|
96236b6186
|
||
|
|
e75d5c8ade
|
||
|
|
f44db54948
|
||
|
|
44b52c54c0
|
||
|
|
ec79c8123e
|
||
|
|
4b0adac674
|
||
|
|
dc2c3b983f
|
||
|
|
e3dc7fc2e9
|
||
|
|
2ae471398b
|
||
|
|
6437c8009c
|
||
|
|
f9b6077595
|
||
|
|
00f62a5772
|
||
|
|
3db75f9e28
|
||
|
|
f27e9853cc
|
||
|
|
561863613f
|
||
|
|
fce5fab2a1
|
||
|
|
3b840d7847
|
||
|
|
8e5d4e8061
|
||
|
|
c98666d6b7
|
||
|
|
055f2da9cd
|
||
|
|
fd14b8d358
|
||
|
|
2365e5ede9
|
||
|
|
c9248a251a
|
||
|
|
eb4b2fab5a
|
||
|
|
e0eb1dfdb7
|
||
|
|
031291a4bf
|
||
|
|
618b22db15
|
||
|
|
fc50b026cf
|
||
|
|
e9f5d136b4
|
||
|
|
403d5f8427
|
||
|
|
5539835dd6
|
||
|
|
b16dd6add4
|
||
|
|
a053d98d7c
|
||
|
|
f5a04ce8c5
|
||
|
|
9616dd72ce
|
||
|
|
6871abd7ee
|
||
|
|
32fcbf1a2b
|
||
|
|
632ceb0f85
|
||
|
|
5414405ceb
|
||
|
|
cdbdbbc72d | ||
|
|
2a04abb84e
|
||
|
|
98f5af3eef
|
||
|
|
d1b1bac4fb
|
||
|
|
45b368af2e
|
||
|
|
0f6448c048
|
||
|
|
b15858adc9
|
||
|
|
1ef576ca7b
|
||
|
|
50cb0b4276
|
||
|
|
472478cf83
|
||
|
|
90c7d137fb
|
||
|
|
2d51cf5106
|
||
|
|
1167f8a51e
|
||
|
|
17e6e66e72
|
||
|
|
fa76f4c994
|
||
|
|
21a523bd35
|
||
|
|
db377380a0
|
||
|
|
81fcea7a03
|
||
|
|
011d22c24c
|
||
|
|
83c8614418
|
||
|
|
ac98b68bda
|
||
|
|
ad63692781
|
||
|
|
090b220d25
|
||
|
|
514219b6a5
|
||
|
|
6a5ba67cf5
|
||
|
|
c09ece6064
|
||
|
|
43ba64684e
|
||
|
|
67fa57008e
|
||
|
|
074ebbd931
|
||
|
|
10d23e3e06
|
||
|
|
6a4e1964f6
|
||
|
|
5939ef6ff1
|
||
|
|
1d9eff6529
|
||
|
|
6ae7f319cb
|
||
|
|
260e9fc46e
|
||
|
|
52b5740c39
|
||
|
|
d11a0cd245
|
||
|
|
860b2c85e0
|
||
|
|
af7577625f
|
||
|
|
617a312ed5
|
||
|
|
a7d202fb04
|
||
|
|
2a52508a5d
|
||
|
|
98fb9dfddf
|
||
|
|
64bb195700
|
||
|
|
c8a46fd9e7
|
||
|
|
93db9a6395
|
||
|
|
89808d0719
|
||
|
|
ef99b7d74e
|
||
|
|
62ddbea0c1
|
||
|
|
b548cabcbf
|
||
|
|
8f37cc79cd
|
||
|
|
031521550a
|
||
|
|
3b67ef746f | ||
|
|
18838105f0
|
||
|
|
d70596f4bf | ||
|
|
a9878c329d | ||
|
|
558659bcf4 | ||
|
|
00e7603932 | ||
|
|
33f7323eb0 | ||
|
|
184038a918
|
||
|
|
8cb76092b6 | ||
|
|
49d7619ba3
|
||
|
|
ae53e83ff3 | ||
|
|
ef84e18f46
|
||
|
|
cf1be16763
|
||
|
|
cc8428643a
|
||
|
|
70251ff3ce | ||
|
|
76dc34a17c
|
||
|
|
a6a0c7c11e
|
||
|
|
f759387eb7
|
||
|
|
21b3591da1
|
||
|
|
e9937ded6b
|
||
|
|
bd1acdd0cc
|
||
|
|
a2c6341544
|
||
|
|
cb3372ac76
|
||
|
|
48e605a545
|
||
|
|
9a4e59f0e0
|
||
|
|
820beda72f
|
||
|
|
c6f70de82d
|
||
|
|
f37f6e2453
|
||
|
|
f7a999e317
|
||
|
|
45494d5b43
|
||
|
|
9ca9545847
|
||
|
|
fa14e7da80
|
||
|
|
12eea5eee3
|
||
|
|
ef623f6c68
|
||
|
|
ee2d19d011
|
||
|
|
53c6b3e413
|
||
|
|
d58125c0bc
|
||
|
|
029198ff61
|
||
|
|
0b08fc5242
|
||
|
|
93609c7ab3
|
||
|
|
461d3dc1f7
|
||
|
|
94f79177a2
|
||
|
|
9169e9db09
|
||
|
|
0d0cd09124
|
||
|
|
0dc5bf9a9b
|
||
|
|
ca107f6977
|
||
|
|
4dad1415e6
|
||
|
|
5bf0a696c6
|
||
|
|
7a8d948fcb
|
||
|
|
d90f7d48d0
|
||
|
|
c5a43f21aa
|
||
|
|
d3fbb0842f
|
||
|
|
dafd426316
|
||
|
|
bec374aa92
|
||
|
|
85b21578d8
|
||
|
|
03c25e7214
|
||
|
|
c30624a59e
|
||
|
|
3cf025fb4a
|
||
|
|
81b784876b
|
||
|
|
6c42f64bfa | ||
|
|
d74216c6b7
|
||
|
|
0b7ce448ab
|
||
|
|
2fb8c09a00
|
||
|
|
0442f1849f
|
||
|
|
cf049797b0
|
||
|
|
18e6fe6af6
|
||
|
|
e8a84d3e41
|
||
|
|
c5f4541cbf
|
||
|
|
369e5038ca
|
||
|
|
66862a1bab
|
||
|
|
25dcdb2d19
|
||
|
|
1830a89898
|
||
|
|
6e718e165a
|
||
|
|
0a37b551f5
|
||
|
|
864b87faa6
|
||
|
|
d55d8580cf
|
||
|
|
63229d1711
|
||
|
|
56044476fc | ||
|
|
796bfd0045
|
||
|
|
abcb72a76a
|
||
|
|
443a7a501b
|
||
|
|
88e86776e8
|
||
|
|
e10bb161fe
|
||
|
|
3b525b7482
|
||
|
|
c2cc10ebfa
|
||
|
|
2f8076d7f8
|
||
|
|
c180a2debb
|
||
|
|
5356745968
|
||
|
|
5b5059615b
|
||
|
|
bca1f3b412 | ||
|
|
3af96fd818
|
||
|
|
1043982529
|
||
|
|
6abfe32540 | ||
|
|
1f9807a99c
|
||
|
|
b2edf1fa8b
|
||
|
|
bb897e76b8 | ||
|
|
07062352b4 | ||
|
|
856c15858b
|
||
|
|
69a46249cc
|
||
|
|
6f10ecc04f
|
||
|
|
d6ca6a72a5
|
||
|
|
243832fee6
|
||
|
|
e8c2c844a8
|
||
|
|
6220387ed6
|
||
|
|
efd3eb2854
|
||
|
|
c78063eba0 | ||
|
|
0e931485a0
|
||
|
|
1bf536d4ab
|
||
|
|
2181b5fd08
|
||
|
|
a4a7c96da6
|
||
|
|
a7f6e517ad
|
||
|
|
812d9004a7
|
||
|
|
ebc6dd67e6
|
||
|
|
949457689c
|
||
|
|
0cb035555f
|
||
|
|
a5974d0ea0
|
||
|
|
1ea15462c0
|
||
|
|
9d8f364af1
|
||
|
|
c87b0c31e1 | ||
|
|
c5802cf86d | ||
|
|
4f2338810b | ||
|
|
f8da67348c | ||
|
|
003771ca48 | ||
|
|
f7926cde15 | ||
|
|
3a05b3ecd0 | ||
|
|
6031a7a14b | ||
|
|
ad9ec16844 | ||
|
|
3977eaad68 | ||
|
|
3b6de96782 | ||
|
|
decc86fd08 | ||
|
|
5485dc4690 | ||
|
|
57865b51f4 | ||
|
|
0a1aa8b3c2 | ||
|
|
7c8114bc55 | ||
|
|
aa57377c7f | ||
|
|
8aa65bc7b4 | ||
|
|
a781fde566 | ||
|
|
3b372b4a91 | ||
|
|
066522cf5d | ||
|
|
ec9bf5feb2 | ||
|
|
dfb37fb4f2 | ||
|
|
86c2909a57 | ||
|
|
b5482857f8 | ||
|
|
0c137d9319 | ||
|
|
59827b19bd | ||
|
|
34179f0f9f | ||
|
|
9c193aeebb | ||
|
|
1cd8955d23 | ||
|
|
004e38b8eb | ||
|
|
c5991a560e | ||
|
|
04ce0f9056 | ||
|
|
e5cb0ac00b | ||
|
|
abe4c488cf | ||
|
|
973541f344 | ||
|
|
3c4b7b5877 | ||
|
|
8fbfb3c99f | ||
|
|
3b33d164c7 | ||
|
|
292597660f | ||
|
|
ba3a26af3c | ||
|
|
4bb473c0b0 | ||
|
|
c3d49cbc6c | ||
|
|
e831edb005 | ||
|
|
3db2654188 | ||
|
|
afdb4b203f | ||
|
|
6f57d38669 | ||
|
|
d60995af43 | ||
|
|
472d9d8b10 | ||
|
|
11b89354a6 | ||
|
|
8150df8d81 | ||
|
|
b8e080301c | ||
|
|
2d87e9f587 | ||
|
|
749baa3e5d | ||
|
|
90deba8472 | ||
|
|
9498fad064 | ||
|
|
6ca5c7f851 | ||
|
|
dfce3360b2 | ||
|
|
58629ea03a | ||
|
|
5b3b88ed3d | ||
|
|
62dbac9247 | ||
|
|
a8aad28239 | ||
|
|
9d633855f4 | ||
|
|
56ac50931e | ||
|
|
3e437d4275 | ||
|
|
c9951c085c | ||
|
|
59c6f0e4c0 | ||
|
|
9460f51e07 | ||
|
|
3ac5b97706 | ||
|
|
1add0fca32 | ||
|
|
0d8c48cbf4 | ||
|
|
e41b7606d6 | ||
|
|
ad2ceaaec2 | ||
|
|
c3b636bf72 | ||
|
|
98acd6aad0 | ||
|
|
8f7743c73d | ||
|
|
60a19ab15e | ||
|
|
dc1e45ff82 | ||
|
|
5fefd1902f | ||
|
|
45ed5b2faf | ||
|
|
f0fac7899f | ||
|
|
c7e12b56d0 | ||
|
|
087aa45349 | ||
|
|
4cc22ac5e0 | ||
|
|
7f0ecaa192 | ||
|
|
a203cbc03b | ||
|
|
17c07a31fe | ||
|
|
87100c4aba | ||
|
|
5498c97e3d | ||
|
|
3ff6867e84 | ||
|
|
7c050eef14 | ||
|
|
d98abad8bb | ||
|
|
9e92beb4cc | ||
|
|
ca597c3678 | ||
|
|
63476393d7 | ||
|
|
9d930436c5 | ||
|
|
be0f6f5ab7 | ||
|
|
66daa071a5 | ||
|
|
ca44b9e6bb | ||
|
|
da7efa3f4e | ||
|
|
4de8882ef5 | ||
|
|
c00a90c9ca | ||
|
|
c4c50ea70d | ||
|
|
c578c8e954 | ||
|
|
e85719f2d2 | ||
|
|
4dca007003 | ||
|
|
d7d1bd4556 | ||
|
|
dc26daeebe | ||
|
|
f727d54d75 | ||
|
|
6f8371a7bf | ||
|
|
fff689312d | ||
|
|
b701f60a99 | ||
|
|
6ba6a595b8 | ||
|
|
6cd9c4a7d8 | ||
|
|
816ce2e1f8 | ||
|
|
19570ad4bb | ||
|
|
5212a4d913 | ||
|
|
46f0643cf5 | ||
|
|
656feab2a4 | ||
|
|
0611e00330 | ||
|
|
128d5e0a82 | ||
|
|
c6187b7c23 | ||
|
|
afd6669877 | ||
|
|
7bf007bb58 | ||
|
|
92a74e4b7d | ||
|
|
0880e6a01c | ||
|
|
4a889991bd | ||
|
|
89bb4eb46b | ||
|
|
f3c7555195 | ||
|
|
79f3895923 | ||
|
|
837cd91501 | ||
|
|
5112ce896b | ||
|
|
7715d6b23b | ||
|
|
373032e330 | ||
|
|
6a69fb760a | ||
|
|
4cc7573b27 | ||
|
|
1d7fd6aab3 | ||
|
|
c04a18d387 | ||
|
|
abf485b9ef | ||
|
|
0245c4e455 | ||
|
|
fa00f74af5 | ||
|
|
2f9ed7adca | ||
|
|
4f2e1c3687 | ||
|
|
2d2ca156d8 | ||
|
|
f8c3dbedf2 | ||
|
|
17354de8fe | ||
|
|
7066a6fd46 | ||
|
|
20595a70b4 | ||
|
|
568f7adf52 | ||
|
|
74e34fb07a | ||
|
|
e6d765d233 | ||
|
|
4250a31ff9 | ||
|
|
ad19271c6c | ||
|
|
b774b68ed4 | ||
|
|
8eaf7b00c3 | ||
|
|
59eecd956d | ||
|
|
e2f9388071 | ||
|
|
6c095e5ac6 | ||
|
|
274acfe6f5 | ||
|
|
f1eda629a8 | ||
|
|
5602534ba9 | ||
|
|
bc9b9952cd | ||
|
|
7f5a73d97d | ||
|
|
02a4ac0629 | ||
|
|
ab78f5c909 | ||
|
|
c9c552a1bd | ||
|
|
c24b055cf3 | ||
|
|
72052fe186 | ||
|
|
0f14378363 | ||
|
|
551220eccc | ||
|
|
287f8d71dd | ||
|
|
390e89aefb | ||
|
|
18e21661b2 | ||
|
|
8af19c79f4 | ||
|
|
b7cda2b2fe | ||
|
|
c86b8659e5 | ||
|
|
de3b41b70d | ||
|
|
5aa0aead4d | ||
|
|
0dae907dad | ||
|
|
59e3de62db | ||
|
|
6c2ab54f65 | ||
|
|
be47311883 | ||
|
|
1e9659c7a2 | ||
|
|
ca73d02804 | ||
|
|
5f827b6e19 | ||
|
|
7d9c40d79d | ||
|
|
33da08bce5 | ||
|
|
f2b8681611 | ||
|
|
fc609171ca | ||
|
|
2399da1f8d | ||
|
|
d699b9afba | ||
|
|
7a03e003a1 | ||
|
|
340223de2e | ||
|
|
54697c6e17 | ||
|
|
18eed1fb96 | ||
|
|
55c201e7c1 | ||
|
|
54a78175b4 | ||
|
|
cae19ca42e | ||
|
|
d4558c15d3 | ||
|
|
75c1dbf83c | ||
|
|
536155752c | ||
|
|
958561d255 | ||
|
|
7cd62232ef | ||
|
|
32b73c3a28 | ||
|
|
b0137d6181 | ||
|
|
a776de8b8f | ||
|
|
b577b02eb6 | ||
|
|
b006b1c943 | ||
|
|
4241dbf817 | ||
|
|
0ccd1793e3 | ||
|
|
29aad11bed | ||
|
|
6e33004ef2 | ||
|
|
afca2c164f | ||
|
|
c7e2160582 | ||
|
|
849e24757d | ||
|
|
e143362479 | ||
|
|
4146600579 | ||
|
|
a04afe8d4e | ||
|
|
550bb60691 | ||
|
|
df54db239d | ||
|
|
de532ca299 | ||
|
|
d7fc4e1fe9 | ||
|
|
e8a60c4abd | ||
|
|
1f8a9964c1 | ||
|
|
aabe8f7a80 | ||
|
|
fe9bdefc62 | ||
|
|
205d0ec976 | ||
|
|
e9ecc84064 | ||
|
|
3b7193c207 | ||
|
|
84cb0eb3fd | ||
|
|
d9fda2338f | ||
|
|
64acc0e97a | ||
|
|
8d2307d12d | ||
|
|
8c128592bd | ||
|
|
39430d78ae | ||
|
|
9c9aefd296 | ||
|
|
e63489829e | ||
|
|
87bc53c278 | ||
|
|
5bdf68594d | ||
|
|
f6988916d8 | ||
|
|
aaccbcf984 | ||
|
|
f9e3c4eaa4 | ||
|
|
97195bf2ac | ||
|
|
c787db7e07 | ||
|
|
12b5022a4f | ||
|
|
8c98f20f0e | ||
|
|
9e334c3627 | ||
|
|
66f06a1878 | ||
|
|
6d7f341de5 | ||
|
|
7973feceb0 | ||
|
|
8ccac46fc9 | ||
|
|
b70e791fed | ||
|
|
1a57aa7216 | ||
|
|
102355aba5 | ||
|
|
9a08048744 | ||
|
|
793569f6e1 | ||
|
|
ffafc3a989 | ||
|
|
951acb8088 | ||
|
|
afc0c0319b | ||
|
|
522dfa5703 | ||
|
|
332e444397 | ||
|
|
959e1e0520 | ||
|
|
d8572e17e6 | ||
|
|
b2f720cc2b | ||
|
|
c7fc55a0ef | ||
|
|
e84dd0f7e2 | ||
|
|
1624353b2b | ||
|
|
5e7b51710c | ||
|
|
97466ad27d | ||
|
|
90c5f5075a | ||
|
|
4e97975862 | ||
|
|
64e398112f | ||
|
|
2a5b50346c | ||
|
|
6ff09f92a5 | ||
|
|
07c8bf310d | ||
|
|
dc6c4826bc | ||
|
|
d915a24f4d | ||
|
|
267528efba | ||
|
|
ad827e34bb | ||
|
|
69b8c482c1 | ||
|
|
aac77950f2 | ||
|
|
614ab1e6fa | ||
|
|
2e6c493487 | ||
|
|
2ca7c9b2b9 | ||
|
|
b395eec893 | ||
|
|
5675284b08 | ||
|
|
cbe998b598 | ||
|
|
fc0dd41092 | ||
|
|
2f8d375692 | ||
|
|
8ed814cbf7 | ||
|
|
852dd4f6c7 | ||
|
|
88514a444b | ||
|
|
e33adbb12f | ||
|
|
ae178f1be0 | ||
|
|
d1b7a21b9b | ||
|
|
bf4fde5f7d | ||
|
|
6194a51ed0 | ||
|
|
4847fb0b77 | ||
|
|
fd241a59cc | ||
|
|
0f0f048380 | ||
|
|
974c93498a | ||
|
|
92bc0f692f | ||
|
|
7b2af3348d | ||
|
|
89cbbfc871 | ||
|
|
e955c45ba8 | ||
|
|
1ed8d4f543 | ||
|
|
19e5dcd9d0 | ||
|
|
caafdb266f | ||
|
|
412d73e7e1 | ||
|
|
76c0e4dd1b | ||
|
|
b8b223c87c | ||
|
|
9d3ea208ef | ||
|
|
5a55196572 | ||
|
|
35e9d5d64e | ||
|
|
b47f768076 | ||
|
|
6630b0c9bf | ||
|
|
1b2a8eec7c | ||
|
|
31da6dc7c2 | ||
|
|
d873cb5476 | ||
|
|
5179bc81b7 | ||
|
|
26e3d2bff2 | ||
|
|
61ee5fd3a7 | ||
|
|
0eecc95aac | ||
|
|
3bb8f73c6a | ||
|
|
890361468d | ||
|
|
889856aa81 | ||
|
|
63adbc71ef | ||
|
|
d876c150eb | ||
|
|
3202386eaa | ||
|
|
eade816ee0 | ||
|
|
f9861d3ea5 | ||
|
|
580108dd7f | ||
|
|
30105666e2 | ||
|
|
8d0d707d3e | ||
|
|
c94a943854 | ||
|
|
12685e264d | ||
|
|
1e56219bbe | ||
|
|
ab43c4e337 | ||
|
|
02d4e162b8 | ||
|
|
cc4f20ce30 | ||
|
|
10e1207242 | ||
|
|
24c3f7e857 | ||
|
|
a76c54d1ac | ||
|
|
9fea68815e | ||
|
|
9ff62f2cc4 | ||
|
|
3f0fd7409d | ||
|
|
bb8f716abd | ||
|
|
4201512912 | ||
|
|
409b5e6e54 | ||
|
|
490532643e | ||
|
|
b6f4481038 | ||
|
|
227a991388 | ||
|
|
18bb7b7dcb | ||
|
|
d40ba948e9 | ||
|
|
7f5fbe4135 | ||
|
|
86d4066084 | ||
|
|
912f5e99ff | ||
|
|
1d4278c5d2 | ||
|
|
3871b820d9 | ||
|
|
18d36b00bc | ||
|
|
5e62f8311f | ||
|
|
8e0614436b | ||
|
|
68b8e5d00a | ||
|
|
a202c280d8 | ||
|
|
ff5cab992b | ||
|
|
46f3c881ec | ||
|
|
a54fec0b43 | ||
|
|
f2a1aedbc2 | ||
|
|
fbe0742ef6 | ||
|
|
a0524c0cf3 | ||
|
|
bc7f4390b1 | ||
|
|
e5520ae4e5 | ||
|
|
06014f4a39 | ||
|
|
addd9b8f14 | ||
|
|
0d78e26e8d | ||
|
|
bc291255e8 | ||
|
|
5aba9b8707 | ||
|
|
6c555adb79 | ||
|
|
3eca2ef5df | ||
|
|
491c1fa683 | ||
|
|
4fe217ef0e | ||
|
|
872958127a | ||
|
|
32735a2ab1 | ||
|
|
f300b96251 | ||
|
|
b1d38bb7b7 | ||
|
|
0af9ac496e | ||
|
|
fd30a24079 | ||
|
|
0749f45054 | ||
|
|
168ddde0dd | ||
|
|
0d6d5e7dd3 | ||
|
|
27c70d8e24 | ||
|
|
0275e9e75f | ||
|
|
c618b30013 | ||
|
|
cbb2e823da | ||
|
|
113da1cd4b | ||
|
|
a9ae4ab3f1 | ||
|
|
3be983c650 | ||
|
|
7b680f8ac6 | ||
|
|
b6057a0a11 | ||
|
|
3bebdb2af7 | ||
|
|
dd80fcb337 | ||
|
|
2b523fe7e0 | ||
|
|
39e33e75a3 | ||
|
|
991b40047a | ||
|
|
39e44e9da9 | ||
|
|
499898a4fc | ||
|
|
de7571f91e | ||
|
|
fd8d2c1941 | ||
|
|
e953fc8891 | ||
|
|
b9d28418e8 | ||
|
|
3f46d2ec33 | ||
|
|
81f1be388e | ||
|
|
4b921227c5 | ||
|
|
c0bd7bb6a3 | ||
|
|
0cec2ec16d | ||
|
|
7120cf52a2 | ||
|
|
cc9151425f | ||
|
|
c744928e07 | ||
|
|
6529613496 | ||
|
|
010c8b28dd | ||
|
|
198702010f | ||
|
|
ffffaa9fe6 | ||
|
|
90b7d28627 | ||
|
|
d8b4e04861 | ||
|
|
8c1756d312 | ||
|
|
5989f0b45f | ||
|
|
846626fabf | ||
|
|
7768fa808d | ||
|
|
39c3c47ea2 | ||
|
|
f5770fdc6e | ||
|
|
b4595bf8bb | ||
|
|
8e3711b73c | ||
|
|
55deeaa88c | ||
|
|
f10199f0b6 | ||
|
|
eb6aaca1f5 | ||
|
|
9167c861d6 | ||
|
|
2d1bbb6e6a | ||
|
|
d82e316f9b | ||
|
|
33f5290015 | ||
|
|
aa1e2ca660 | ||
|
|
86600c3884 | ||
|
|
c6c7a44c5b | ||
|
|
0652ded616 | ||
|
|
2d3b6d0d87 | ||
|
|
b25263308b | ||
|
|
1410fbc565 | ||
|
|
c72c443090 | ||
|
|
6f29790b76 | ||
|
|
d936609188 | ||
|
|
8aa59bdb51 | ||
|
|
f0eee80ab7 | ||
|
|
7f9486fff1 | ||
|
|
e9f45eeb8b | ||
|
|
127e5e70a0 | ||
|
|
334787c140 | ||
|
|
2cdf3b2c85 | ||
|
|
bf14695eab | ||
|
|
a4da914994 | ||
|
|
fefbe19011 | ||
|
|
a2ade2ee42 | ||
|
|
2e7158a760 | ||
|
|
1cd0ed22f5 | ||
|
|
db982f2d93 | ||
|
|
44a10943c3 | ||
|
|
055e0250bd | ||
|
|
48dc39a3d5 | ||
|
|
f45ea9e0aa | ||
|
|
ab16bc673d | ||
|
|
7b504f9ed6 | ||
|
|
9d7287c647 | ||
|
|
c80d4750a8 | ||
|
|
e579b908f3 | ||
|
|
01acb97f96 | ||
|
|
7986ccb3f7 | ||
|
|
e452451926 | ||
|
|
9b7e7fc221 | ||
|
|
42ba637935 | ||
|
|
6aced84146 | ||
|
|
05987f04e2 | ||
|
|
32642af4a9 | ||
|
|
62ee8a0381 | ||
|
|
30216dd367 | ||
|
|
cbc4cf309d | ||
|
|
4217a50874 | ||
|
|
a8a27eb4a4 | ||
|
|
8410271fdb | ||
|
|
fe97e92dd2 | ||
|
|
9ab0121af0 | ||
|
|
6132c12835 | ||
|
|
cb48a27d16 | ||
|
|
3953a3a06c | ||
|
|
139338cf34 | ||
|
|
41cd938748 | ||
|
|
3229de9b3b | ||
|
|
dcc201e7bb | ||
|
|
1b8abd3509 | ||
|
|
7ebf842c5c | ||
|
|
74699fcd21 | ||
|
|
f8b061c314 | ||
|
|
c5158edb6c | ||
|
|
9ad270b9a4 | ||
|
|
51328c9585 | ||
|
|
aa1ca9e653 | ||
|
|
cb29967e7b | ||
|
|
474fd59759 | ||
|
|
40ee9ffafa | ||
|
|
939b912889 | ||
|
|
83aa17cf8b | ||
|
|
9cdae5642e | ||
|
|
dcf2972f26 | ||
|
|
f96c44d092 | ||
|
|
f537d5f8cd | ||
|
|
c833b651a9 | ||
|
|
062f5332a0 | ||
|
|
d9fe384fd9 | ||
|
|
8a7220f5e9 | ||
|
|
5b9ff6fa47 | ||
|
|
66b22f4833 | ||
|
|
acec5d392d | ||
|
|
59be81c7f6 | ||
|
|
c0ac39b8da | ||
|
|
7b19935a14 | ||
|
|
fa7d0d83c1 | ||
|
|
7542e3b15e | ||
|
|
6412e6d116 | ||
|
|
b1dbe519b0 | ||
|
|
3103f87b71 | ||
|
|
8664e8cd97 | ||
|
|
9e566e7278 | ||
|
|
f02a3b6d02 | ||
|
|
bf6f3512b1 | ||
|
|
00112ae205 | ||
|
|
8001c893bd | ||
|
|
0e25291d47 | ||
|
|
68fb3a7e19 | ||
|
|
541575a073 | ||
|
|
d4d24cb1db | ||
|
|
20cb2fd99d | ||
|
|
4fd6efb7f0 | ||
|
|
9eabc624ee | ||
|
|
01418b7e81 | ||
|
|
cac763a339 | ||
|
|
0dde93e57e | ||
|
|
7435b6efe5 | ||
|
|
796c7a711b | ||
|
|
4ac9fd852f | ||
|
|
06d6293a9d | ||
|
|
0c904fb9ef | ||
|
|
59645969ee | ||
|
|
acacdfdab5 | ||
|
|
2090c41960 | ||
|
|
e5a67b8ff0 | ||
|
|
8e6dfd785f | ||
|
|
b9547b01a8 | ||
|
|
0720e9629c | ||
|
|
bb67bd77f1 | ||
|
|
8ecda341e0 | ||
|
|
dee78a876a | ||
|
|
33ccfb2505 | ||
|
|
0330a65054 | ||
|
|
4eb9c20c0c | ||
|
|
1f4910a651 | ||
|
|
150bfd4605 | ||
|
|
3bf64933b0 | ||
|
|
94d2f98cc0 | ||
|
|
2df2f72fc2 | ||
|
|
8a3ba32c5a | ||
|
|
f34f60f9c7 | ||
|
|
8540c9f7c8 | ||
|
|
3014db85e7 | ||
|
|
aea7c5c9f1 | ||
|
|
c792c552cf | ||
|
|
a71f1e0817 | ||
|
|
76905c8ec6 | ||
|
|
85d8b771f0 | ||
|
|
d31a950daa | ||
|
|
f765e23812 | ||
|
|
d66dca44e0 | ||
|
|
b8f8f9a272 | ||
|
|
e128f82e11 | ||
|
|
daab5732e8 | ||
|
|
eb5703b7dd | ||
|
|
ce5fc3e226 | ||
|
|
c2a649ded4 | ||
|
|
1b0a89ca2e | ||
|
|
1441585e06 | ||
|
|
f3576342b6 | ||
|
|
ede2102c60 | ||
|
|
16d98dd47c | ||
|
|
7aca31b18f | ||
|
|
e97f1fa609 | ||
|
|
62f0baba36 | ||
|
|
40fa6f9d7d | ||
|
|
6ce605d6ea | ||
|
|
feba855326 | ||
|
|
47f75f71a7 | ||
|
|
4e060ce5ef | ||
|
|
e2e24f9d56 | ||
|
|
5aa5c2a6c8 | ||
|
|
41b2daed0c | ||
|
|
e0a79b3990 | ||
|
|
e2d6b75b10 | ||
|
|
b4be999777 | ||
|
|
5c3bf0b642 | ||
|
|
be2b897149 | ||
|
|
f5a39cfb9b | ||
|
|
f5a6fa5b32 | ||
|
|
93ec6d916b | ||
|
|
c36fb29683 | ||
|
|
cac0f43b58 | ||
|
|
805364f201 | ||
|
|
3b2a3a7630 | ||
|
|
bf29d3640e | ||
|
|
de15bffc2f | ||
|
|
1377e7ebf2 | ||
|
|
d53ebbda95 | ||
|
|
b227df3c3f | ||
|
|
a3e0e5c1bb | ||
|
|
116f8a10fb | ||
|
|
116b03534f | ||
|
|
b697a12b89 | ||
|
|
7b64699ff1 | ||
|
|
1598b3cc74 | ||
|
|
212742e880 | ||
|
|
6693e60f6f | ||
|
|
c097e50405 | ||
|
|
ccbc9c7844 | ||
|
|
948a8d34fd | ||
|
|
e078b5c4bc | ||
|
|
4a24c0b31f | ||
|
|
e988d3cc40 | ||
|
|
cd20aeadad | ||
|
|
1bb7ba1248 | ||
|
|
fdafec3d9d | ||
|
|
0fcf792db3 | ||
|
|
9cd52dd9aa | ||
|
|
5290dab199 | ||
|
|
e17c7895e4 | ||
|
|
e4ea2eaabc | ||
|
|
12b9a57404 | ||
|
|
514c6cf61c | ||
|
|
bef0ecea3a | ||
|
|
5bb5d9b660 | ||
|
|
f30405ea2b | ||
|
|
f9efae8a5e | ||
|
|
819cfc655b | ||
|
|
5afe5bcf99 | ||
|
|
0c25b2f4a6 | ||
|
|
252895e01c | ||
|
|
3ea49c7e07 | ||
|
|
66a27bd7ef | ||
|
|
b070ce4715 | ||
|
|
84b581fde6 | ||
|
|
af5e11a734 | ||
|
|
522ced45ff | ||
|
|
79d7f2fa68 | ||
|
|
eb3ee14a0e | ||
|
|
6ed6b28d02 | ||
|
|
2f4e9bbe14 | ||
|
|
3057f054b2 | ||
|
|
a4e7ea8cc3 | ||
|
|
c812192800 | ||
|
|
81121d03b0 | ||
|
|
e5f03587c9 | ||
|
|
c25e70a588 | ||
|
|
b97c79aa0b | ||
|
|
2d2c39f9e5 | ||
|
|
673a5bc2ce | ||
|
|
df5ee243b1 | ||
|
|
71fa670512 | ||
|
|
d91ab1ab0f | ||
|
|
1eb05f0d24 | ||
|
|
a49e939609 | ||
|
|
e76e2fd317 | ||
|
|
2418a81a9e | ||
|
|
c4a441d1c3 | ||
|
|
c5c145f325 | ||
|
|
3683ce9082 | ||
|
|
80dc6ec8d0 | ||
|
|
12d6585586 | ||
|
|
53916b0f96 | ||
|
|
badbbf84bd | ||
|
|
d98352d003 | ||
|
|
542bd88040 | ||
|
|
81384939a2 | ||
|
|
c8ed5619c6 | ||
|
|
3b79155602 | ||
|
|
552ee93a47 | ||
|
|
7bf429b599 | ||
|
|
0792f0ba84 | ||
|
|
02ab747ca9 | ||
|
|
c53a98ee87 | ||
|
|
1e4aa8badc | ||
|
|
1e76c99b48 | ||
|
|
ff9b6c7196 | ||
|
|
7680dc5079 | ||
|
|
d0370ed9f7 | ||
|
|
7e3b3dbd78 | ||
|
|
6b71dc8108 | ||
|
|
307f2fc9e2 | ||
|
|
455de3d799 | ||
|
|
4e74ed37b4 | ||
|
|
7ef58293be | ||
|
|
27c9647a13 | ||
|
|
89541eb3b0 | ||
|
|
3a3a714cc4 | ||
|
|
b107e4452a | ||
|
|
2b514cb526 | ||
|
|
630c30de79 | ||
|
|
a69b3455d3 | ||
|
|
ddf8383784 | ||
|
|
c1bbeba18f | ||
|
|
1f99fb592e | ||
|
|
aae01431b4 | ||
|
|
3c99f69fee | ||
|
|
b7fd13923a | ||
|
|
0a47a95cc3 | ||
|
|
ef8d9af469 | ||
|
|
549f36a1f2 | ||
|
|
187e6e81ee | ||
|
|
e60ad551f0 | ||
|
|
a0617ad437 | ||
|
|
411736fdaa | ||
|
|
bea6567933 | ||
|
|
d6b693a9b2 | ||
|
|
b8bedf4d7b | ||
|
|
5c53dfb91b | ||
|
|
e0cbbc0895 | ||
|
|
40dd546564 | ||
|
|
b89d8cbab2 | ||
|
|
4b62912343 | ||
|
|
8a8c8cf7e9 | ||
|
|
201529414b | ||
|
|
3da1f918a4 | ||
|
|
f8d8e5b1e2 | ||
|
|
826d4849df | ||
|
|
0a18bfe21b | ||
|
|
5976b94fbc | ||
|
|
698548d6ef | ||
|
|
d0584279e5 | ||
|
|
62f248fd2c | ||
|
|
8f2750a266 | ||
|
|
2ea7f7cd38 | ||
|
|
75b3810856 |
No files matched your search
@@ -1,25 +1,14 @@
|
|||||||
# Live reload for archied during dashboard work.
|
# Live reload for the single archie binary during development. The dashboard
|
||||||
#
|
# lives in archie-frontend and runs its own Vite server against this one.
|
||||||
# The frontend has its own loop -- `task ui:dev` runs Vite with HMR and proxies
|
|
||||||
# /api and /events here -- so this watcher deliberately ignores ui/. Watching
|
|
||||||
# it would rebuild the Go binary on every keystroke in a CSS file, and
|
|
||||||
# rebuilding on ui/dist changes would loop against `task ui`.
|
|
||||||
#
|
|
||||||
# ui/dist is NOT rebuilt here. During development the Vite server serves the
|
|
||||||
# frontend directly with HMR, so dist is not what you are looking at; it only
|
|
||||||
# matters for the embedded build, and `task ui` produces it before a commit.
|
|
||||||
# An earlier rule here claimed to keep dist current and never ran: air
|
|
||||||
# requires a file to satisfy include_dir AND include_file together, and ui/ is
|
|
||||||
# excluded from the walk anyway.
|
|
||||||
root = "."
|
root = "."
|
||||||
tmp_dir = ".air"
|
tmp_dir = ".air"
|
||||||
|
|
||||||
[build]
|
[build]
|
||||||
cmd = "go build -o ./.air/archied ./cmd/archied"
|
cmd = "go build -o ./.air/archie ./cmd/archie"
|
||||||
# `bin` is deprecated in air; entrypoint is the current key.
|
# `bin` is deprecated in air; entrypoint is the current key.
|
||||||
entrypoint = "./.air/archied"
|
entrypoint = "./.air/archie"
|
||||||
include_ext = ["go", "toml"]
|
include_ext = ["go", "toml", "sql", "yaml", "cedar", "tmpl", "md"]
|
||||||
exclude_dir = ["ui", "bin", "docs", ".git", ".task", ".air", "tmp"]
|
exclude_dir = ["bin", "docs", ".git", ".task", ".air", "tmp"]
|
||||||
exclude_regex = ["_test\\.go"]
|
exclude_regex = ["_test\\.go"]
|
||||||
stop_on_error = true
|
stop_on_error = true
|
||||||
delay = 400
|
delay = 400
|
||||||
|
|||||||
@@ -1,89 +0,0 @@
|
|||||||
# Dolt database (managed by Dolt, not git)
|
|
||||||
dolt/
|
|
||||||
embeddeddolt/
|
|
||||||
proxieddb/
|
|
||||||
|
|
||||||
# Runtime files
|
|
||||||
bd.sock
|
|
||||||
bd.sock.startlock
|
|
||||||
sync-state.json
|
|
||||||
last-touched
|
|
||||||
.exclusive-lock
|
|
||||||
|
|
||||||
# Daemon runtime (lock, log, pid)
|
|
||||||
daemon.*
|
|
||||||
|
|
||||||
# Push state (runtime, per-machine)
|
|
||||||
push-state.json
|
|
||||||
|
|
||||||
# Lock files (various runtime locks)
|
|
||||||
*.lock
|
|
||||||
|
|
||||||
# Credential key (encryption key for federation peer auth — never commit)
|
|
||||||
.beads-credential-key
|
|
||||||
|
|
||||||
# Local version tracking (prevents upgrade notification spam after git ops)
|
|
||||||
.local_version
|
|
||||||
|
|
||||||
proxied_server_client_info.json
|
|
||||||
|
|
||||||
# Worktree redirect file (contains relative path to main repo's .beads/)
|
|
||||||
# Must not be committed as paths would be wrong in other clones
|
|
||||||
redirect
|
|
||||||
|
|
||||||
# Sync state (local-only, per-machine)
|
|
||||||
# These files are machine-specific and should not be shared across clones
|
|
||||||
.sync.lock
|
|
||||||
|
|
||||||
# Workspace operation gate (internal/workspacegate): physical-root gate
|
|
||||||
# files live beside the guarded root inside .beads (e.g. dolt.gate.lock)
|
|
||||||
*.gate.lock*
|
|
||||||
export-state/
|
|
||||||
export-state.json
|
|
||||||
last_pull
|
|
||||||
|
|
||||||
# Ephemeral store (SQLite - wisps/molecules, intentionally not versioned)
|
|
||||||
ephemeral.sqlite3
|
|
||||||
ephemeral.sqlite3-journal
|
|
||||||
ephemeral.sqlite3-wal
|
|
||||||
ephemeral.sqlite3-shm
|
|
||||||
|
|
||||||
# Dolt server management (auto-started by bd)
|
|
||||||
dolt-server.pid
|
|
||||||
dolt-server.log
|
|
||||||
dolt-server.lock
|
|
||||||
dolt-server.port
|
|
||||||
dolt-server.activity
|
|
||||||
|
|
||||||
# Debug-mode pprof artifacts (written when dolt.debug: true in config.yaml)
|
|
||||||
dolt-pprof/
|
|
||||||
|
|
||||||
# Corrupt backup directories (created by bd doctor --fix recovery)
|
|
||||||
*.corrupt.backup/
|
|
||||||
|
|
||||||
# issues.jsonl is deliberately TRACKED (see export.git-add in config.yaml).
|
|
||||||
# Dolt remains the authoritative store and GitHub the external issue surface;
|
|
||||||
# the tracked export exists so issue state is readable and recoverable from a
|
|
||||||
# plain git clone, without a Dolt server. Removing it from this file is what
|
|
||||||
# tracks it -- do NOT add a "!issues.jsonl" negation, which would override the
|
|
||||||
# fork protection in .git/info/exclude (see the note at the end of this file).
|
|
||||||
#
|
|
||||||
# Backups stay local: they are point-in-time copies of the same data.
|
|
||||||
backup/
|
|
||||||
|
|
||||||
# Per-project environment file (Dolt connection config, GH#2520)
|
|
||||||
.env
|
|
||||||
|
|
||||||
# Legacy files (from pre-Dolt versions)
|
|
||||||
*.db
|
|
||||||
*.db?*
|
|
||||||
*.db-journal
|
|
||||||
*.db-wal
|
|
||||||
*.db-shm
|
|
||||||
db.sqlite
|
|
||||||
bd.db
|
|
||||||
# NOTE: Do NOT add negation patterns here.
|
|
||||||
# They would override fork protection in .git/info/exclude.
|
|
||||||
# Config files (metadata.json, config.yaml) are tracked by git by default
|
|
||||||
# since no pattern above ignores them.
|
|
||||||
# config.yaml
|
|
||||||
@@ -1,85 +0,0 @@
|
|||||||
# Beads - AI-Native Issue Tracking
|
|
||||||
|
|
||||||
Welcome to Beads! This repository uses **Beads** for issue tracking - a modern, AI-native tool designed to live directly in your codebase alongside your code.
|
|
||||||
|
|
||||||
## What is Beads?
|
|
||||||
|
|
||||||
Beads is issue tracking that lives in your repo, making it perfect for AI coding agents and developers who want their issues close to their code. No web UI required - everything works through the CLI and integrates seamlessly with git.
|
|
||||||
|
|
||||||
**Learn more:** [github.com/steveyegge/beads](https://github.com/steveyegge/beads)
|
|
||||||
|
|
||||||
## Quick Start
|
|
||||||
|
|
||||||
### Essential Commands
|
|
||||||
|
|
||||||
```bash
|
|
||||||
# Create new issues
|
|
||||||
bd create "Add user authentication"
|
|
||||||
|
|
||||||
# View all issues
|
|
||||||
bd list
|
|
||||||
|
|
||||||
# View issue details
|
|
||||||
bd show <issue-id>
|
|
||||||
|
|
||||||
# Update issue status
|
|
||||||
bd update <issue-id> --claim
|
|
||||||
bd update <issue-id> --status done
|
|
||||||
|
|
||||||
# Sync with Dolt remote
|
|
||||||
bd dolt push
|
|
||||||
```
|
|
||||||
|
|
||||||
### Working with Issues
|
|
||||||
|
|
||||||
Issues in Beads are:
|
|
||||||
|
|
||||||
- **Git-native**: Stored in Dolt database with version control and branching
|
|
||||||
- **AI-friendly**: CLI-first design works perfectly with AI coding agents
|
|
||||||
- **Branch-aware**: Issues can follow your branch workflow
|
|
||||||
- **Sync-ready**: Uses Dolt remotes for backup and team sharing
|
|
||||||
|
|
||||||
## Why Beads?
|
|
||||||
|
|
||||||
✨ **AI-Native Design**
|
|
||||||
|
|
||||||
- Built specifically for AI-assisted development workflows
|
|
||||||
- CLI-first interface works seamlessly with AI coding agents
|
|
||||||
- No context switching to web UIs
|
|
||||||
|
|
||||||
🚀 **Developer Focused**
|
|
||||||
|
|
||||||
- Issues live in your repo, right next to your code
|
|
||||||
- Works offline, syncs when you push
|
|
||||||
- Fast, lightweight, and stays out of your way
|
|
||||||
|
|
||||||
🔧 **Git Integration**
|
|
||||||
|
|
||||||
- Dolt-native sync via bd dolt push / bd dolt pull
|
|
||||||
- Branch-aware issue tracking
|
|
||||||
- Dolt-native three-way merge resolution
|
|
||||||
|
|
||||||
## Get Started with Beads
|
|
||||||
|
|
||||||
Try Beads in your own projects:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
# Install Beads
|
|
||||||
curl -sSL https://raw.githubusercontent.com/steveyegge/beads/main/scripts/install.sh | bash
|
|
||||||
|
|
||||||
# Initialize in your repo
|
|
||||||
bd init
|
|
||||||
|
|
||||||
# Create your first issue
|
|
||||||
bd create "Try out Beads"
|
|
||||||
```
|
|
||||||
|
|
||||||
## Learn More
|
|
||||||
|
|
||||||
- **Documentation**: [github.com/steveyegge/beads/docs](https://github.com/steveyegge/beads/tree/main/docs)
|
|
||||||
- **Quick Start Guide**: Run `bd quickstart`
|
|
||||||
- **Examples**: [github.com/steveyegge/beads/examples](https://github.com/steveyegge/beads/tree/main/examples)
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
_Beads: Issue tracking that moves at the speed of thought_ ⚡
|
|
||||||
@@ -1,80 +0,0 @@
|
|||||||
# Beads Configuration File
|
|
||||||
# This file configures default behavior for all bd commands in this repository
|
|
||||||
# All settings can also be set via environment variables (BD_* prefix)
|
|
||||||
# or overridden with command-line flags
|
|
||||||
|
|
||||||
# Issue prefix for this repository (used by bd init)
|
|
||||||
# If not set, bd init will auto-detect from directory name
|
|
||||||
# Example: issue-prefix: "myproject" creates issues like "myproject-1", "myproject-2", etc.
|
|
||||||
# issue-prefix: ""
|
|
||||||
|
|
||||||
# Use no-db mode: JSONL-only, no Dolt database
|
|
||||||
# When true, .beads/issues.jsonl is the only local store
|
|
||||||
# no-db: false
|
|
||||||
|
|
||||||
# Enable JSON output by default
|
|
||||||
# json: false
|
|
||||||
|
|
||||||
# Feedback title formatting for mutating commands (create/update/close/dep/edit)
|
|
||||||
# 0 = hide titles, N > 0 = truncate to N characters
|
|
||||||
# output:
|
|
||||||
# title-length: 255
|
|
||||||
|
|
||||||
# Default actor for audit trails (overridden by BEADS_ACTOR or --actor)
|
|
||||||
# actor: ""
|
|
||||||
|
|
||||||
# Optional JSONL sidecar for explicit agent/tool interaction audit records.
|
|
||||||
# Issue history is always recorded in the database and is visible with
|
|
||||||
# bd history <id> --events; this only controls .beads/interactions.jsonl.
|
|
||||||
# audit:
|
|
||||||
# enabled: false
|
|
||||||
|
|
||||||
# Export events (audit trail) to .beads/events.jsonl on each flush/sync
|
|
||||||
# When enabled, new events are appended incrementally using a high-water mark.
|
|
||||||
# Use 'bd export --events' to trigger manually regardless of this setting.
|
|
||||||
# events-export: false
|
|
||||||
|
|
||||||
# Multi-repo configuration (experimental - bd-307)
|
|
||||||
# Allows hydrating from multiple repositories and routing writes to the correct database
|
|
||||||
# repos:
|
|
||||||
# primary: "." # Primary repo (where this database lives)
|
|
||||||
# additional: # Additional repos to hydrate from (read-only)
|
|
||||||
# - ~/beads-planning # Personal planning repo
|
|
||||||
# - ~/work-planning # Work planning repo
|
|
||||||
|
|
||||||
# Dolt-native backup (periodic backup for off-machine recovery)
|
|
||||||
# This is full database backup only. Cross-machine sync uses Dolt remotes.
|
|
||||||
# backup:
|
|
||||||
# enabled: false # Disable auto-backup entirely
|
|
||||||
# interval: 15m # Minimum time between auto-backups
|
|
||||||
# git-push: false # Disable git push (backup locally only)
|
|
||||||
# git-repo: "" # Separate git repo for backups (default: project repo)
|
|
||||||
|
|
||||||
# Optional JSONL auto-export for viewers, interchange, and issue-level migration.
|
|
||||||
# Disabled by default; enable only when an integration needs fresh .beads/issues.jsonl.
|
|
||||||
# Use relative paths under .beads/ for JSONL import/export filenames.
|
|
||||||
export:
|
|
||||||
auto: false
|
|
||||||
path: issues.jsonl
|
|
||||||
interval: 60s
|
|
||||||
# issues.jsonl/interactions.jsonl are .gitignore'd local-only files --
|
|
||||||
# Dolt (synced via sync.remote) is the source of truth. Leave auto off
|
|
||||||
# and git-add off; do not re-track these in git.
|
|
||||||
git-add: false
|
|
||||||
import:
|
|
||||||
path: issues.jsonl
|
|
||||||
# Integration settings (access with 'bd config get/set')
|
|
||||||
# Non-secret keys (stored in the database):
|
|
||||||
# - jira.url, jira.project
|
|
||||||
# - linear.team_id
|
|
||||||
# - github.org, github.repo
|
|
||||||
#
|
|
||||||
# Secret keys (stored in this file but prefer env vars to avoid git exposure):
|
|
||||||
# - linear.api_key → use LINEAR_API_KEY env var instead
|
|
||||||
# - github.token → use GITHUB_TOKEN env var instead
|
|
||||||
sync.remote: "git+https://github.com/samcharles93/archie-core.git"
|
|
||||||
dolt:
|
|
||||||
shared-server: false
|
|
||||||
auto-commit: "on"
|
|
||||||
audit:
|
|
||||||
enabled: true
|
|
||||||
@@ -1,33 +0,0 @@
|
|||||||
#!/usr/bin/env sh
|
|
||||||
# --- BEGIN BEADS INTEGRATION v1.2.2 ---
|
|
||||||
# This section is managed by beads. Do not remove these markers.
|
|
||||||
if command -v bd >/dev/null 2>&1; then
|
|
||||||
export BD_GIT_HOOK=1
|
|
||||||
_bd_timeout=${BEADS_HOOK_TIMEOUT:-300}
|
|
||||||
_bd_used_perl=0
|
|
||||||
if command -v timeout >/dev/null 2>&1; then
|
|
||||||
timeout "$_bd_timeout" bd hooks run post-checkout "$@"
|
|
||||||
_bd_exit=$?
|
|
||||||
elif command -v gtimeout >/dev/null 2>&1; then
|
|
||||||
gtimeout "$_bd_timeout" bd hooks run post-checkout "$@"
|
|
||||||
_bd_exit=$?
|
|
||||||
elif command -v perl >/dev/null 2>&1; then
|
|
||||||
_bd_used_perl=1
|
|
||||||
perl -e 'alarm shift; exec @ARGV' "$_bd_timeout" bd hooks run post-checkout "$@"
|
|
||||||
_bd_exit=$?
|
|
||||||
else
|
|
||||||
echo >&2 "beads: hook 'post-checkout' running without timeout; install coreutils or perl to enable BEADS_HOOK_TIMEOUT"
|
|
||||||
bd hooks run post-checkout "$@"
|
|
||||||
_bd_exit=$?
|
|
||||||
fi
|
|
||||||
if [ $_bd_exit -eq 124 ] || { [ $_bd_used_perl -eq 1 ] && [ $_bd_exit -eq 142 ]; }; then
|
|
||||||
echo >&2 "beads: hook 'post-checkout' timed out after ${_bd_timeout}s — continuing without beads"
|
|
||||||
_bd_exit=0
|
|
||||||
fi
|
|
||||||
if [ $_bd_exit -eq 3 ]; then
|
|
||||||
echo >&2 "beads: database not initialized — skipping hook 'post-checkout'"
|
|
||||||
_bd_exit=0
|
|
||||||
fi
|
|
||||||
if [ $_bd_exit -ne 0 ]; then exit $_bd_exit; fi
|
|
||||||
fi
|
|
||||||
# --- END BEADS INTEGRATION v1.2.2 ---
|
|
||||||
@@ -1,33 +0,0 @@
|
|||||||
#!/usr/bin/env sh
|
|
||||||
# --- BEGIN BEADS INTEGRATION v1.2.2 ---
|
|
||||||
# This section is managed by beads. Do not remove these markers.
|
|
||||||
if command -v bd >/dev/null 2>&1; then
|
|
||||||
export BD_GIT_HOOK=1
|
|
||||||
_bd_timeout=${BEADS_HOOK_TIMEOUT:-300}
|
|
||||||
_bd_used_perl=0
|
|
||||||
if command -v timeout >/dev/null 2>&1; then
|
|
||||||
timeout "$_bd_timeout" bd hooks run post-merge "$@"
|
|
||||||
_bd_exit=$?
|
|
||||||
elif command -v gtimeout >/dev/null 2>&1; then
|
|
||||||
gtimeout "$_bd_timeout" bd hooks run post-merge "$@"
|
|
||||||
_bd_exit=$?
|
|
||||||
elif command -v perl >/dev/null 2>&1; then
|
|
||||||
_bd_used_perl=1
|
|
||||||
perl -e 'alarm shift; exec @ARGV' "$_bd_timeout" bd hooks run post-merge "$@"
|
|
||||||
_bd_exit=$?
|
|
||||||
else
|
|
||||||
echo >&2 "beads: hook 'post-merge' running without timeout; install coreutils or perl to enable BEADS_HOOK_TIMEOUT"
|
|
||||||
bd hooks run post-merge "$@"
|
|
||||||
_bd_exit=$?
|
|
||||||
fi
|
|
||||||
if [ $_bd_exit -eq 124 ] || { [ $_bd_used_perl -eq 1 ] && [ $_bd_exit -eq 142 ]; }; then
|
|
||||||
echo >&2 "beads: hook 'post-merge' timed out after ${_bd_timeout}s — continuing without beads"
|
|
||||||
_bd_exit=0
|
|
||||||
fi
|
|
||||||
if [ $_bd_exit -eq 3 ]; then
|
|
||||||
echo >&2 "beads: database not initialized — skipping hook 'post-merge'"
|
|
||||||
_bd_exit=0
|
|
||||||
fi
|
|
||||||
if [ $_bd_exit -ne 0 ]; then exit $_bd_exit; fi
|
|
||||||
fi
|
|
||||||
# --- END BEADS INTEGRATION v1.2.2 ---
|
|
||||||
@@ -1,33 +0,0 @@
|
|||||||
#!/usr/bin/env sh
|
|
||||||
# --- BEGIN BEADS INTEGRATION v1.2.2 ---
|
|
||||||
# This section is managed by beads. Do not remove these markers.
|
|
||||||
if command -v bd >/dev/null 2>&1; then
|
|
||||||
export BD_GIT_HOOK=1
|
|
||||||
_bd_timeout=${BEADS_HOOK_TIMEOUT:-300}
|
|
||||||
_bd_used_perl=0
|
|
||||||
if command -v timeout >/dev/null 2>&1; then
|
|
||||||
timeout "$_bd_timeout" bd hooks run pre-commit "$@"
|
|
||||||
_bd_exit=$?
|
|
||||||
elif command -v gtimeout >/dev/null 2>&1; then
|
|
||||||
gtimeout "$_bd_timeout" bd hooks run pre-commit "$@"
|
|
||||||
_bd_exit=$?
|
|
||||||
elif command -v perl >/dev/null 2>&1; then
|
|
||||||
_bd_used_perl=1
|
|
||||||
perl -e 'alarm shift; exec @ARGV' "$_bd_timeout" bd hooks run pre-commit "$@"
|
|
||||||
_bd_exit=$?
|
|
||||||
else
|
|
||||||
echo >&2 "beads: hook 'pre-commit' running without timeout; install coreutils or perl to enable BEADS_HOOK_TIMEOUT"
|
|
||||||
bd hooks run pre-commit "$@"
|
|
||||||
_bd_exit=$?
|
|
||||||
fi
|
|
||||||
if [ $_bd_exit -eq 124 ] || { [ $_bd_used_perl -eq 1 ] && [ $_bd_exit -eq 142 ]; }; then
|
|
||||||
echo >&2 "beads: hook 'pre-commit' timed out after ${_bd_timeout}s — continuing without beads"
|
|
||||||
_bd_exit=0
|
|
||||||
fi
|
|
||||||
if [ $_bd_exit -eq 3 ]; then
|
|
||||||
echo >&2 "beads: database not initialized — skipping hook 'pre-commit'"
|
|
||||||
_bd_exit=0
|
|
||||||
fi
|
|
||||||
if [ $_bd_exit -ne 0 ]; then exit $_bd_exit; fi
|
|
||||||
fi
|
|
||||||
# --- END BEADS INTEGRATION v1.2.2 ---
|
|
||||||
@@ -1,33 +0,0 @@
|
|||||||
#!/usr/bin/env sh
|
|
||||||
# --- BEGIN BEADS INTEGRATION v1.2.2 ---
|
|
||||||
# This section is managed by beads. Do not remove these markers.
|
|
||||||
if command -v bd >/dev/null 2>&1; then
|
|
||||||
export BD_GIT_HOOK=1
|
|
||||||
_bd_timeout=${BEADS_HOOK_TIMEOUT:-300}
|
|
||||||
_bd_used_perl=0
|
|
||||||
if command -v timeout >/dev/null 2>&1; then
|
|
||||||
timeout "$_bd_timeout" bd hooks run pre-push "$@"
|
|
||||||
_bd_exit=$?
|
|
||||||
elif command -v gtimeout >/dev/null 2>&1; then
|
|
||||||
gtimeout "$_bd_timeout" bd hooks run pre-push "$@"
|
|
||||||
_bd_exit=$?
|
|
||||||
elif command -v perl >/dev/null 2>&1; then
|
|
||||||
_bd_used_perl=1
|
|
||||||
perl -e 'alarm shift; exec @ARGV' "$_bd_timeout" bd hooks run pre-push "$@"
|
|
||||||
_bd_exit=$?
|
|
||||||
else
|
|
||||||
echo >&2 "beads: hook 'pre-push' running without timeout; install coreutils or perl to enable BEADS_HOOK_TIMEOUT"
|
|
||||||
bd hooks run pre-push "$@"
|
|
||||||
_bd_exit=$?
|
|
||||||
fi
|
|
||||||
if [ $_bd_exit -eq 124 ] || { [ $_bd_used_perl -eq 1 ] && [ $_bd_exit -eq 142 ]; }; then
|
|
||||||
echo >&2 "beads: hook 'pre-push' timed out after ${_bd_timeout}s — continuing without beads"
|
|
||||||
_bd_exit=0
|
|
||||||
fi
|
|
||||||
if [ $_bd_exit -eq 3 ]; then
|
|
||||||
echo >&2 "beads: database not initialized — skipping hook 'pre-push'"
|
|
||||||
_bd_exit=0
|
|
||||||
fi
|
|
||||||
if [ $_bd_exit -ne 0 ]; then exit $_bd_exit; fi
|
|
||||||
fi
|
|
||||||
# --- END BEADS INTEGRATION v1.2.2 ---
|
|
||||||
@@ -1,33 +0,0 @@
|
|||||||
#!/usr/bin/env sh
|
|
||||||
# --- BEGIN BEADS INTEGRATION v1.2.2 ---
|
|
||||||
# This section is managed by beads. Do not remove these markers.
|
|
||||||
if command -v bd >/dev/null 2>&1; then
|
|
||||||
export BD_GIT_HOOK=1
|
|
||||||
_bd_timeout=${BEADS_HOOK_TIMEOUT:-300}
|
|
||||||
_bd_used_perl=0
|
|
||||||
if command -v timeout >/dev/null 2>&1; then
|
|
||||||
timeout "$_bd_timeout" bd hooks run prepare-commit-msg "$@"
|
|
||||||
_bd_exit=$?
|
|
||||||
elif command -v gtimeout >/dev/null 2>&1; then
|
|
||||||
gtimeout "$_bd_timeout" bd hooks run prepare-commit-msg "$@"
|
|
||||||
_bd_exit=$?
|
|
||||||
elif command -v perl >/dev/null 2>&1; then
|
|
||||||
_bd_used_perl=1
|
|
||||||
perl -e 'alarm shift; exec @ARGV' "$_bd_timeout" bd hooks run prepare-commit-msg "$@"
|
|
||||||
_bd_exit=$?
|
|
||||||
else
|
|
||||||
echo >&2 "beads: hook 'prepare-commit-msg' running without timeout; install coreutils or perl to enable BEADS_HOOK_TIMEOUT"
|
|
||||||
bd hooks run prepare-commit-msg "$@"
|
|
||||||
_bd_exit=$?
|
|
||||||
fi
|
|
||||||
if [ $_bd_exit -eq 124 ] || { [ $_bd_used_perl -eq 1 ] && [ $_bd_exit -eq 142 ]; }; then
|
|
||||||
echo >&2 "beads: hook 'prepare-commit-msg' timed out after ${_bd_timeout}s — continuing without beads"
|
|
||||||
_bd_exit=0
|
|
||||||
fi
|
|
||||||
if [ $_bd_exit -eq 3 ]; then
|
|
||||||
echo >&2 "beads: database not initialized — skipping hook 'prepare-commit-msg'"
|
|
||||||
_bd_exit=0
|
|
||||||
fi
|
|
||||||
if [ $_bd_exit -ne 0 ]; then exit $_bd_exit; fi
|
|
||||||
fi
|
|
||||||
# --- END BEADS INTEGRATION v1.2.2 ---
|
|
||||||
@@ -1,8 +0,0 @@
|
|||||||
{
|
|
||||||
"database": "dolt",
|
|
||||||
"backend": "dolt",
|
|
||||||
"dolt_mode": "embedded",
|
|
||||||
"dolt_database": "archie_core",
|
|
||||||
"project_id": "e8a66150-1f5f-42d2-8653-dcf8463cef74",
|
|
||||||
"last_bd_version": "1.2.2"
|
|
||||||
}
|
|
||||||
+6
-1
@@ -10,7 +10,12 @@
|
|||||||
bin/
|
bin/
|
||||||
dist/
|
dist/
|
||||||
docs/
|
docs/
|
||||||
node_modules/
|
tmp/
|
||||||
|
.playwright-mcp/
|
||||||
|
# A trailing-slash pattern matches only the context root, so this is written to
|
||||||
|
# match a node_modules at any depth; the agent image compiles Go, which needs
|
||||||
|
# none of it.
|
||||||
|
**/node_modules/
|
||||||
|
|
||||||
# Stray host-built binaries committed at the repo root.
|
# Stray host-built binaries committed at the repo root.
|
||||||
/archied
|
/archied
|
||||||
|
|||||||
+183
-333
@@ -1,27 +1,11 @@
|
|||||||
# Builds and pushes the archied and archie-agent images to GHCR on every
|
|
||||||
# merge to main. Mirrors .gitea/workflows/deploy.yml, which remains the
|
|
||||||
# production build path against git.catlow.cloud until that's cut over.
|
|
||||||
name: deploy
|
name: deploy
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches: [main]
|
tags: ["v*"]
|
||||||
tags: ["archied/v*", "archie/v*", "v*"]
|
|
||||||
|
|
||||||
# Rapid successive pushes to main (a release commit right after its
|
|
||||||
# preceding fix, say) previously queued a full gate+build for each one,
|
|
||||||
# several minutes apiece, with no caching -- so a burst of pushes left
|
|
||||||
# three deploys racing in parallel for the same runner capacity. Only the
|
|
||||||
# last one's images matter (each job pushes its image tags), so cancel a
|
|
||||||
# superseded run rather than let it fight for resources it can't use.
|
|
||||||
#
|
|
||||||
# Keyed on the commit, not github.ref: a release push lands main and its
|
|
||||||
# tag in one go, both pointing at the same commit -- on.push matches
|
|
||||||
# branches and tags both, so a single release push otherwise fires
|
|
||||||
# redundant builds of identical content that a ref-keyed group can't see
|
|
||||||
# as the same work.
|
|
||||||
concurrency:
|
concurrency:
|
||||||
group: deploy-${{ github.sha }}
|
group: deploy-${{ github.ref }}
|
||||||
cancel-in-progress: true
|
cancel-in-progress: true
|
||||||
|
|
||||||
permissions:
|
permissions:
|
||||||
@@ -29,348 +13,220 @@ permissions:
|
|||||||
packages: write
|
packages: write
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
gate:
|
plan:
|
||||||
runs-on: ubuntu-latest
|
runs-on: self-hosted
|
||||||
outputs:
|
outputs:
|
||||||
archied_version: ${{ steps.release_tag.outputs.archied_version }}
|
archied_version: ${{ steps.release_tag.outputs.archied_version }}
|
||||||
|
sha: ${{ steps.release_tag.outputs.sha }}
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262
|
||||||
|
|
||||||
|
- name: Resolve the release
|
||||||
|
id: release_tag
|
||||||
|
run: |
|
||||||
|
echo "archied_version=${GITHUB_REF_NAME#v}" >> "$GITHUB_OUTPUT"
|
||||||
|
echo "sha=$(git rev-parse "${GITHUB_REF}^{commit}")" >> "$GITHUB_OUTPUT"
|
||||||
|
|
||||||
|
gate:
|
||||||
|
needs: plan
|
||||||
|
runs-on: self-hosted
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262
|
||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
|
|
||||||
# Read the release from the commit, not from github.ref. One release
|
|
||||||
# push carries main and both tags at the same SHA, and only one of
|
|
||||||
# those refs survives the concurrency group, so a ref-derived version
|
|
||||||
# is whatever won the race. The tag at HEAD is the same either way.
|
|
||||||
- name: Resolve archied tag at HEAD
|
|
||||||
id: release_tag
|
|
||||||
run: |
|
|
||||||
version="$(git tag --points-at HEAD --list 'archied/v*' --list 'v*' | sed -e 's|^archied/v||' -e 's|^v||' | sort -V | tail -1)"
|
|
||||||
echo "archied_version=$version" >> "$GITHUB_OUTPUT"
|
|
||||||
if [ -n "$version" ]; then
|
|
||||||
echo "archied release at HEAD: $version"
|
|
||||||
else
|
|
||||||
echo "no release tag at HEAD; distribution zip will be skipped"
|
|
||||||
fi
|
|
||||||
|
|
||||||
- name: Set up Go
|
- name: Set up Go
|
||||||
uses: actions/setup-go@v5
|
uses: actions/setup-go@40f1582b2485089dde7abd97c1529aa768e1baff
|
||||||
with:
|
with:
|
||||||
go-version-file: go.mod
|
go-version-file: go.mod
|
||||||
|
cache: false
|
||||||
- name: Set up Node
|
|
||||||
uses: actions/setup-node@v4
|
|
||||||
with:
|
|
||||||
node-version: "22"
|
|
||||||
|
|
||||||
- name: Install quality tools
|
- name: Install quality tools
|
||||||
run: |
|
run: |
|
||||||
go install github.com/golangci/golangci-lint/v2/cmd/golangci-lint@v2.13.2
|
go install github.com/golangci/golangci-lint/v2/cmd/golangci-lint@$(cat .golangci-version)
|
||||||
go install mvdan.cc/gofumpt@v0.11.0
|
go install mvdan.cc/gofumpt@v0.11.0
|
||||||
go install github.com/go-task/task/v3/cmd/task@v3.48.0
|
go install github.com/go-task/task/v3/cmd/task@v3.48.0
|
||||||
|
|
||||||
- name: Install protobuf tools
|
- name: Install protobuf tools
|
||||||
run: bash tools/proto.sh install
|
run: bash tools/proto.sh install
|
||||||
|
|
||||||
# The backup/restore tests shell out to pg_dump/pg_restore against a
|
|
||||||
# postgres:18 testcontainer; the runner's stock client is older and
|
|
||||||
# refuses the server version.
|
|
||||||
- name: Install PostgreSQL 18 client
|
|
||||||
run: |
|
|
||||||
sudo install -d /usr/share/postgresql-common/pgdg
|
|
||||||
sudo curl --fail --silent --show-error --location \
|
|
||||||
https://www.postgresql.org/media/keys/ACCC4CF8.asc \
|
|
||||||
--output /usr/share/postgresql-common/pgdg/apt.postgresql.org.asc
|
|
||||||
. /etc/os-release
|
|
||||||
echo "deb [signed-by=/usr/share/postgresql-common/pgdg/apt.postgresql.org.asc] https://apt.postgresql.org/pub/repos/apt ${VERSION_CODENAME}-pgdg main" \
|
|
||||||
| sudo tee /etc/apt/sources.list.d/pgdg.list
|
|
||||||
sudo apt-get update
|
|
||||||
sudo apt-get install -y --no-install-recommends postgresql-client-18
|
|
||||||
echo "/usr/lib/postgresql/18/bin" >> $GITHUB_PATH
|
|
||||||
|
|
||||||
- name: Ensure contract baseline ref
|
- name: Ensure contract baseline ref
|
||||||
run: |
|
run: |
|
||||||
if ! git show-ref --verify --quiet refs/heads/main; then
|
if ! git show-ref --verify --quiet refs/heads/main; then
|
||||||
git branch main origin/main
|
git branch main origin/main
|
||||||
fi
|
fi
|
||||||
|
|
||||||
- name: Install ripgrep
|
- name: Verify unprivileged user namespaces
|
||||||
run: sudo apt-get update && sudo apt-get install -y --no-install-recommends ripgrep
|
run: unshare --user --map-root-user --net true
|
||||||
|
|
||||||
# Extensions run in an unprivileged user and network namespace, which
|
- name: Pull test container images
|
||||||
# Ubuntu 24.04 runners forbid through AppArmor by default.
|
run: docker pull alpine:3
|
||||||
- name: Allow unprivileged user namespaces
|
|
||||||
run: sudo sysctl -w kernel.apparmor_restrict_unprivileged_userns=0
|
|
||||||
|
|
||||||
- name: Quality gate
|
- name: Quality gate
|
||||||
|
env:
|
||||||
|
RELEASE_VERSION: ${{ needs.plan.outputs.archied_version }}
|
||||||
run: |
|
run: |
|
||||||
# The formatter sequence has one owner: task fmt, which drives go fix
|
task check dist TEST_FLAGS=-count=1 VERSION="$RELEASE_VERSION"
|
||||||
# to a fixpoint and then the configured lint formatters. This step
|
|
||||||
# used to inline its own single `go fix ./...`, which leaves the
|
|
||||||
# redundant loop-variable copy that copyloopvar rejects -- the hazard
|
|
||||||
# of archie-core-wwho, surfacing here as a spurious git-diff failure
|
|
||||||
# (archie-core-6kda).
|
|
||||||
task fmt
|
|
||||||
git diff --exit-code
|
git diff --exit-code
|
||||||
bash tools/proto.sh lint
|
|
||||||
bash tools/proto.sh check
|
|
||||||
go vet ./...
|
|
||||||
golangci-lint run ./...
|
|
||||||
go build ./...
|
|
||||||
go test ./... -count=1
|
|
||||||
|
|
||||||
- name: Vulnerability scan
|
- name: Vulnerability scan
|
||||||
run: |
|
run: |
|
||||||
go install golang.org/x/vuln/cmd/govulncheck@latest
|
go install golang.org/x/vuln/cmd/govulncheck@v1.9.0
|
||||||
govulncheck ./...
|
govulncheck ./...
|
||||||
|
|
||||||
# The dashboard suite runs in CI too, or it only ever runs when
|
- name: Package the release binaries
|
||||||
# someone remembers to; the Go steps above never touch it.
|
# tar keeps the executable bit, which an uploaded artifact drops.
|
||||||
- name: Dashboard tests
|
run: tar -cf release-binaries.tar dist
|
||||||
run: |
|
|
||||||
npm ci --prefix ui || npm install --prefix ui
|
|
||||||
npm test --prefix ui
|
|
||||||
|
|
||||||
- name: Release tags must match changelogs
|
- name: Upload the release binaries
|
||||||
run: |
|
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02
|
||||||
set -e
|
with:
|
||||||
fail=0
|
name: release-binaries
|
||||||
for tag in $(git tag --points-at HEAD); do
|
path: release-binaries.tar
|
||||||
case "$tag" in
|
if-no-files-found: error
|
||||||
v*)
|
retention-days: 1
|
||||||
ver="${tag#v}"
|
|
||||||
echo " release tag $tag -> looking for [$ver] in CHANGELOG.md"
|
|
||||||
grep -q "^## \\[$ver\\]" CHANGELOG.md || {
|
|
||||||
echo " FAIL: CHANGELOG.md has no [$ver] section"
|
|
||||||
fail=1
|
|
||||||
}
|
|
||||||
;;
|
|
||||||
archied/v* | archie/v*)
|
|
||||||
# Legacy per-component tags. History is not re-tagged, and the
|
|
||||||
# merged CHANGELOG.md carries every component's versions, so the
|
|
||||||
# section is found there rather than in a component file.
|
|
||||||
ver="${tag#*/v}"
|
|
||||||
echo " legacy tag $tag -> looking for [$ver] in CHANGELOG.md"
|
|
||||||
grep -q "^## \\[$ver\\]" CHANGELOG.md || {
|
|
||||||
echo " FAIL: CHANGELOG.md has no [$ver] section"
|
|
||||||
fail=1
|
|
||||||
}
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
done
|
|
||||||
if [ $fail -ne 0 ]; then
|
|
||||||
echo
|
|
||||||
echo "A release tag points at this commit but its changelog does not"
|
|
||||||
echo "describe that version. Run: task release:prepare VERSION=<ver>"
|
|
||||||
echo "edit the generated notes, then: task release VERSION=<ver>"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
if ! git tag --points-at HEAD | grep -qE '^(v[0-9]|archied/v|archie/v)' ; then
|
|
||||||
echo "This commit is not a release, so the images are published as :edge and sha-<sha>; :latest keeps naming the newest release."
|
|
||||||
fi
|
|
||||||
|
|
||||||
archied-image:
|
archied-image:
|
||||||
needs: gate
|
needs: [plan, gate]
|
||||||
runs-on: ubuntu-latest
|
runs-on: self-hosted
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262
|
||||||
with:
|
|
||||||
fetch-depth: 0
|
|
||||||
|
|
||||||
# Deliberately NOT `github.sha`. On a tag push that is the ref's OBJECT id,
|
|
||||||
# and every release tag in this repo is annotated — measured, 80 of 80
|
|
||||||
# `archied/v*` and `archie/v*` tags are tag objects — so it names something
|
|
||||||
# that cannot be checked out. `archied/v1.36.0` is an instance: it points at
|
|
||||||
# 6720bc42 (a tag object) and dereferences to commit c25f8d39. The producer
|
|
||||||
# is right to create annotated tags; the consumer stops guessing.
|
|
||||||
- name: Resolve the commit this ref points at
|
|
||||||
id: commit
|
|
||||||
run: |
|
|
||||||
sha="$(git rev-parse "${GITHUB_REF}^{commit}")"
|
|
||||||
echo "sha=$sha" >> "$GITHUB_OUTPUT"
|
|
||||||
echo "short=${sha:0:12}" >> "$GITHUB_OUTPUT"
|
|
||||||
|
|
||||||
- name: Set up Docker Buildx
|
- name: Set up Docker Buildx
|
||||||
uses: docker/setup-buildx-action@v3
|
uses: docker/setup-buildx-action@8d2750c68a42422c14e847fe6c8ac0403b4cbd6f
|
||||||
|
with:
|
||||||
|
# One named builder that is never removed, so the Dockerfiles' cache
|
||||||
|
# mounts are still there on the next run. Removing it at the end of
|
||||||
|
# a job would take it from under another run that is building.
|
||||||
|
name: archie-ci
|
||||||
|
cleanup: false
|
||||||
|
|
||||||
- name: Log in to GHCR
|
- name: Log in to the Gitea registry
|
||||||
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u "${{ github.actor }}" --password-stdin
|
run: echo "${{ secrets.DEPLOY_TOKEN }}" | docker login git.catlow.cloud -u "${{ github.actor }}" --password-stdin
|
||||||
|
|
||||||
- name: Resolve component versions
|
|
||||||
id: versions
|
|
||||||
run: |
|
|
||||||
GATEWAY_TAG="$(git tag --points-at HEAD --list 'archied/v*' | sort -V | tail -1)"
|
|
||||||
RUNTIME_TAG="$(git tag --points-at HEAD --list 'archie/v*' | sort -V | tail -1)"
|
|
||||||
# One release stream: a `v*` tag covers the whole release, so it names
|
|
||||||
# both components' versions. Legacy per-component tags still win where
|
|
||||||
# they exist, because history is not re-tagged.
|
|
||||||
RELEASE_TAG="$(git tag --points-at HEAD --list 'v*' | sort -V | tail -1)"
|
|
||||||
GATEWAY_VERSION="${GATEWAY_TAG#archied/}"
|
|
||||||
RUNTIME_VERSION="${RUNTIME_TAG#archie/}"
|
|
||||||
[ -n "$GATEWAY_VERSION" ] || GATEWAY_VERSION="${RELEASE_TAG#v}"
|
|
||||||
[ -n "$RUNTIME_VERSION" ] || RUNTIME_VERSION="${RELEASE_TAG#v}"
|
|
||||||
# `dev+<sha>` is what a build that is NOT a release reports, and it is
|
|
||||||
# honest now that such a build no longer publishes :latest: the version
|
|
||||||
# names the commit it came from, and the sha-<sha> tag makes it
|
|
||||||
# restorable. Before, this same string reached :latest minutes after a
|
|
||||||
# release and made the release's own stamping read as dev
|
|
||||||
# (archie-core-i5nb). (On an untagged push GITHUB_SHA IS the commit —
|
|
||||||
# the tag case is handled by the dereference above.)
|
|
||||||
[ -n "$GATEWAY_VERSION" ] || GATEWAY_VERSION="dev+${GITHUB_SHA:0:12}"
|
|
||||||
[ -n "$RUNTIME_VERSION" ] || RUNTIME_VERSION="dev+${GITHUB_SHA:0:12}"
|
|
||||||
# Keep the raw tag presence separate from the version fallback: a
|
|
||||||
# LEGACY gateway-only release (archied/v* and no archie/v*) must not
|
|
||||||
# rebuild the runtime image as dev. A one-stream `v*` release is not
|
|
||||||
# gateway-only -- one version covers the runtime too -- so it does
|
|
||||||
# rebuild it, and release_tag is what tells the two apart.
|
|
||||||
echo "gateway_tag=$GATEWAY_TAG" >> "$GITHUB_OUTPUT"
|
|
||||||
echo "runtime_tag=$RUNTIME_TAG" >> "$GITHUB_OUTPUT"
|
|
||||||
echo "release_tag=$RELEASE_TAG" >> "$GITHUB_OUTPUT"
|
|
||||||
echo "gateway=$GATEWAY_VERSION" >> "$GITHUB_OUTPUT"
|
|
||||||
echo "runtime=$RUNTIME_VERSION" >> "$GITHUB_OUTPUT"
|
|
||||||
# :latest names the newest RELEASE, so only a commit that IS one
|
|
||||||
# publishes it. A push to main publishes :edge (mutable, newest main)
|
|
||||||
# and sha-<sha> (immutable) instead. That is what stops a release's
|
|
||||||
# :latest stamping from being overwritten minutes later by the next
|
|
||||||
# ordinary commit, which left a host reporting dev and made the update
|
|
||||||
# path unable to tell current from stale (archie-core-i5nb).
|
|
||||||
#
|
|
||||||
# `if` blocks rather than `[ -n "$X" ] && echo`: the latter returns
|
|
||||||
# non-zero when the test fails, and these steps run under `set -e`.
|
|
||||||
{
|
|
||||||
echo "archied_tags<<EOF"
|
|
||||||
if [ -n "$RELEASE_TAG" ]; then
|
|
||||||
echo "ghcr.io/samcharles93/archied:latest"
|
|
||||||
fi
|
|
||||||
echo "ghcr.io/samcharles93/archied:edge"
|
|
||||||
echo "ghcr.io/samcharles93/archied:sha-${{ steps.commit.outputs.sha }}"
|
|
||||||
echo "EOF"
|
|
||||||
} >> "$GITHUB_OUTPUT"
|
|
||||||
|
|
||||||
- name: Build and push archied
|
- name: Build and push archied
|
||||||
uses: docker/build-push-action@v6
|
uses: docker/build-push-action@10e90e3645eae34f1e60eeb005ba3a3d33f178e8
|
||||||
with:
|
with:
|
||||||
context: .
|
context: .
|
||||||
file: Dockerfile.archied
|
file: Dockerfile.archied
|
||||||
push: true
|
push: true
|
||||||
tags: ${{ steps.versions.outputs.archied_tags }}
|
tags: |
|
||||||
|
git.catlow.cloud/sam/archied:v${{ needs.plan.outputs.archied_version }}
|
||||||
|
git.catlow.cloud/sam/archied:sha-${{ needs.plan.outputs.sha }}
|
||||||
build-args: |
|
build-args: |
|
||||||
GATEWAY_VERSION=${{ steps.versions.outputs.gateway }}
|
GATEWAY_VERSION=${{ needs.plan.outputs.archied_version }}
|
||||||
RUNTIME_VERSION=${{ steps.versions.outputs.runtime }}
|
RUNTIME_VERSION=${{ needs.plan.outputs.archied_version }}
|
||||||
cache-from: type=gha,scope=archied
|
cache-from: type=gha,scope=archied
|
||||||
cache-to: type=gha,mode=max,scope=archied
|
cache-to: type=gha,mode=max,scope=archied
|
||||||
|
|
||||||
|
|
||||||
agent-image:
|
agent-image:
|
||||||
|
needs: [plan, gate]
|
||||||
outputs:
|
outputs:
|
||||||
agent_digest: ${{ steps.agent.outputs.digest }}
|
agent_digest: ${{ steps.agent.outputs.digest }}
|
||||||
needs: gate
|
runs-on: self-hosted
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262
|
||||||
with:
|
|
||||||
fetch-depth: 0
|
|
||||||
|
|
||||||
# Annotated tags: dereference to the commit, as archied-image does.
|
|
||||||
- name: Resolve the commit this ref points at
|
|
||||||
id: commit
|
|
||||||
run: |
|
|
||||||
sha="$(git rev-parse "${GITHUB_REF}^{commit}")"
|
|
||||||
echo "sha=$sha" >> "$GITHUB_OUTPUT"
|
|
||||||
echo "short=${sha:0:12}" >> "$GITHUB_OUTPUT"
|
|
||||||
|
|
||||||
- name: Set up Docker Buildx
|
- name: Set up Docker Buildx
|
||||||
uses: docker/setup-buildx-action@v3
|
uses: docker/setup-buildx-action@8d2750c68a42422c14e847fe6c8ac0403b4cbd6f
|
||||||
|
with:
|
||||||
|
# One named builder that is never removed, so the Dockerfiles' cache
|
||||||
|
# mounts are still there on the next run. Removing it at the end of
|
||||||
|
# a job would take it from under another run that is building.
|
||||||
|
name: archie-ci
|
||||||
|
cleanup: false
|
||||||
|
|
||||||
- name: Log in to GHCR
|
- name: Log in to the Gitea registry
|
||||||
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u "${{ github.actor }}" --password-stdin
|
run: echo "${{ secrets.DEPLOY_TOKEN }}" | docker login git.catlow.cloud -u "${{ github.actor }}" --password-stdin
|
||||||
|
|
||||||
- name: Resolve runtime version
|
|
||||||
id: versions
|
|
||||||
run: |
|
|
||||||
RUNTIME_TAG="$(git tag --points-at HEAD --list 'archie/v*' | sort -V | tail -1)"
|
|
||||||
RELEASE_TAG="$(git tag --points-at HEAD --list 'v*' | sort -V | tail -1)"
|
|
||||||
RUNTIME_VERSION="${RUNTIME_TAG#archie/}"
|
|
||||||
[ -n "$RUNTIME_VERSION" ] || RUNTIME_VERSION="${RELEASE_TAG#v}"
|
|
||||||
echo "runtime_tag=$RUNTIME_TAG" >> "$GITHUB_OUTPUT"
|
|
||||||
echo "release_tag=$RELEASE_TAG" >> "$GITHUB_OUTPUT"
|
|
||||||
echo "runtime=$RUNTIME_VERSION" >> "$GITHUB_OUTPUT"
|
|
||||||
|
|
||||||
- name: Build and push archie-agent
|
- name: Build and push archie-agent
|
||||||
id: agent
|
id: agent
|
||||||
if: steps.versions.outputs.runtime_tag != '' || steps.versions.outputs.release_tag != ''
|
uses: docker/build-push-action@10e90e3645eae34f1e60eeb005ba3a3d33f178e8
|
||||||
uses: docker/build-push-action@v6
|
|
||||||
with:
|
with:
|
||||||
context: .
|
context: .
|
||||||
file: Dockerfile
|
file: Dockerfile
|
||||||
push: true
|
push: true
|
||||||
tags: |
|
tags: |
|
||||||
ghcr.io/samcharles93/archie-agent:latest
|
git.catlow.cloud/sam/archie-agent:v${{ needs.plan.outputs.archied_version }}
|
||||||
ghcr.io/samcharles93/archie-agent:sha-${{ steps.commit.outputs.sha }}
|
git.catlow.cloud/sam/archie-agent:sha-${{ needs.plan.outputs.sha }}
|
||||||
build-args: |
|
build-args: |
|
||||||
RUNTIME_VERSION=${{ steps.versions.outputs.runtime }}
|
RUNTIME_VERSION=${{ needs.plan.outputs.archied_version }}
|
||||||
cache-from: type=gha,scope=archie-agent
|
cache-from: type=gha,scope=archie-agent
|
||||||
cache-to: type=gha,mode=max,scope=archie-agent
|
cache-to: type=gha,mode=max,scope=archie-agent
|
||||||
|
|
||||||
# Packages every host-run binary (archied, archie-gateway,
|
archie-image:
|
||||||
# archie-state-store, archie-ui, archie-messaging) as a
|
needs: [plan, gate]
|
||||||
# linux/amd64 zip for a
|
outputs:
|
||||||
# non-Docker install. It waits only for the agent image, whose digest
|
archie_digest: ${{ steps.archie.outputs.digest }}
|
||||||
# release.json pins; archie-agent itself never ships as a host binary.
|
runs-on: self-hosted
|
||||||
dist-zip:
|
|
||||||
needs: [gate, agent-image]
|
|
||||||
# Not gated on github.ref. A release is pushed as main plus both tags at
|
|
||||||
# one SHA, the concurrency group below collapses those into a single run,
|
|
||||||
# and the survivor is whichever ref happened to start last -- for
|
|
||||||
# v1.23.0 that was refs/heads/main, so this job was skipped and no zip
|
|
||||||
# was ever produced. Resolve the tag from the commit instead of trusting
|
|
||||||
# the ref that won the race, and skip only when there is genuinely no
|
|
||||||
# archied tag at HEAD.
|
|
||||||
if: needs.gate.outputs.archied_version != ''
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
# Least privilege: the workflow default is contents:read, and only this
|
|
||||||
# job needs to write, to create the Release and attach the zip to it.
|
|
||||||
permissions:
|
|
||||||
contents: write
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262
|
||||||
|
|
||||||
- name: Set up Go
|
- name: Set up Docker Buildx
|
||||||
uses: actions/setup-go@v5
|
uses: docker/setup-buildx-action@8d2750c68a42422c14e847fe6c8ac0403b4cbd6f
|
||||||
with:
|
with:
|
||||||
go-version-file: go.mod
|
name: archie-ci
|
||||||
|
cleanup: false
|
||||||
|
|
||||||
|
- name: Log in to the Gitea registry
|
||||||
|
run: echo "${{ secrets.DEPLOY_TOKEN }}" | docker login git.catlow.cloud -u "${{ github.actor }}" --password-stdin
|
||||||
|
|
||||||
|
- name: Build and push archie
|
||||||
|
id: archie
|
||||||
|
uses: docker/build-push-action@10e90e3645eae34f1e60eeb005ba3a3d33f178e8
|
||||||
|
with:
|
||||||
|
context: .
|
||||||
|
file: Dockerfile.archie
|
||||||
|
push: true
|
||||||
|
sbom: true
|
||||||
|
provenance: mode=max
|
||||||
|
tags: |
|
||||||
|
git.catlow.cloud/sam/archie:v${{ needs.plan.outputs.archied_version }}
|
||||||
|
git.catlow.cloud/sam/archie:sha-${{ needs.plan.outputs.sha }}
|
||||||
|
build-args: |
|
||||||
|
VERSION=${{ needs.plan.outputs.archied_version }}
|
||||||
|
REVISION=${{ needs.plan.outputs.sha }}
|
||||||
|
cache-from: type=gha,scope=archie
|
||||||
|
cache-to: type=gha,mode=max,scope=archie
|
||||||
|
|
||||||
|
- name: Sign image with cosign
|
||||||
|
if: env.COSIGN_PRIVATE_KEY != ''
|
||||||
|
env:
|
||||||
|
COSIGN_PRIVATE_KEY: ${{ secrets.COSIGN_PRIVATE_KEY }}
|
||||||
|
COSIGN_PASSWORD: ${{ secrets.COSIGN_PASSWORD }}
|
||||||
|
run: |
|
||||||
|
if command -v cosign >/dev/null 2>&1; then
|
||||||
|
cosign sign --yes --key env://COSIGN_PRIVATE_KEY "git.catlow.cloud/sam/archie@${{ steps.archie.outputs.digest }}"
|
||||||
|
else
|
||||||
|
echo "::warning::cosign binary not installed on runner; skipping signature"
|
||||||
|
fi
|
||||||
|
|
||||||
|
dist-zip:
|
||||||
|
needs: [plan, gate, archied-image, agent-image]
|
||||||
|
runs-on: self-hosted
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262
|
||||||
|
with:
|
||||||
|
fetch-depth: 0
|
||||||
|
|
||||||
|
# The gate built these from the tree it checked; nothing is compiled here.
|
||||||
|
- name: Download the release binaries
|
||||||
|
uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093
|
||||||
|
with:
|
||||||
|
name: release-binaries
|
||||||
|
|
||||||
|
- name: Unpack the release binaries
|
||||||
|
run: tar -xf release-binaries.tar
|
||||||
|
|
||||||
- name: Resolve archied version
|
- name: Resolve archied version
|
||||||
id: version
|
id: version
|
||||||
run: echo "version=${{ needs.gate.outputs.archied_version }}" >> "$GITHUB_OUTPUT"
|
run: echo "version=${{ needs.plan.outputs.archied_version }}" >> "$GITHUB_OUTPUT"
|
||||||
|
|
||||||
- name: Build linux/amd64 binaries
|
|
||||||
env:
|
|
||||||
GOOS: linux
|
|
||||||
GOARCH: amd64
|
|
||||||
CGO_ENABLED: "0"
|
|
||||||
run: |
|
|
||||||
set -e
|
|
||||||
# Every process in the documented deployment ships in the zip, and
|
|
||||||
# every one of them carries the archied version it was cut from:
|
|
||||||
# they are one release, and an operator matching binaries by eye
|
|
||||||
# needs each to say so.
|
|
||||||
#
|
|
||||||
# That claim is load-bearing and this list is the whole of it: the
|
|
||||||
# v1.30.0 messaging extraction moved Telegram/email/webhook out of
|
|
||||||
# archied and nothing added archie-messaging here, so a host install
|
|
||||||
# ran on with a dead Telegram bot and no error anywhere
|
|
||||||
# (archie-core-1c01). TestDistZipShipsEveryHostCommand fails if this
|
|
||||||
# list and the copy list below stop matching the commands in cmd/.
|
|
||||||
ldflags="-X github.com/samcharles93/archie-core/internal/installtype.buildType=binary -X github.com/samcharles93/archie-core/internal/buildinfo.Version=${{ steps.version.outputs.version }} -X github.com/samcharles93/archie-core/internal/buildinfo.Runtime=${{ steps.version.outputs.version }}"
|
|
||||||
mkdir -p dist
|
|
||||||
for cmd in $(jq -r '.required_topology.units[]' release.json); do
|
|
||||||
go build -ldflags "$ldflags" -o "dist/$cmd" "./cmd/$cmd"
|
|
||||||
done
|
|
||||||
|
|
||||||
- name: Assemble distribution zip
|
- name: Assemble distribution zip
|
||||||
id: zip
|
id: zip
|
||||||
@@ -378,75 +234,69 @@ jobs:
|
|||||||
set -e
|
set -e
|
||||||
name="archie-core-archied-v${{ steps.version.outputs.version }}-linux-amd64"
|
name="archie-core-archied-v${{ steps.version.outputs.version }}-linux-amd64"
|
||||||
mkdir -p "$name"
|
mkdir -p "$name"
|
||||||
for cmd in $(jq -r '.required_topology.units[]' release.json); do
|
for cmd in $(jq -r '.required_topology.units[], .required_topology.binaries[]?' release.json); do
|
||||||
cp "dist/$cmd" "$name/"
|
cp "dist/$cmd" "$name/"
|
||||||
done
|
done
|
||||||
cp deployments/INSTRUCTIONS.md CHANGELOG.md "$name/"
|
cp deployments/INSTRUCTIONS.md "$name/"
|
||||||
cp scripts/archie-update-* "$name/"
|
|
||||||
digest='${{ needs.agent-image.outputs.agent_digest }}'
|
digest='${{ needs.agent-image.outputs.agent_digest }}'
|
||||||
test -n "$digest"
|
test -n "$digest"
|
||||||
jq --arg image "ghcr.io/samcharles93/archie-agent@$digest" '. + {agent_image: $image}' release.json > "$name/release.json"
|
jq --arg image "git.catlow.cloud/sam/archie-agent@$digest" '. + {agent_image: $image}' release.json > "$name/release.json"
|
||||||
# README.md doesn't exist yet in this repo; include it once it does
|
|
||||||
# rather than fail the release on its absence.
|
|
||||||
[ -f README.md ] && cp README.md "$name/"
|
[ -f README.md ] && cp README.md "$name/"
|
||||||
zip -r "$name.zip" "$name"
|
zip -r "$name.zip" "$name"
|
||||||
sha256sum "$name.zip" > SHA256SUMS
|
|
||||||
echo "name=$name" >> "$GITHUB_OUTPUT"
|
echo "name=$name" >> "$GITHUB_OUTPUT"
|
||||||
|
|
||||||
- name: Upload distribution zip
|
- name: Upload distribution zip
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02
|
||||||
with:
|
with:
|
||||||
name: ${{ steps.zip.outputs.name }}
|
name: ${{ steps.zip.outputs.name }}
|
||||||
path: |
|
path: ${{ steps.zip.outputs.name }}.zip
|
||||||
${{ steps.zip.outputs.name }}.zip
|
|
||||||
SHA256SUMS
|
|
||||||
retention-days: 90
|
retention-days: 90
|
||||||
|
|
||||||
# A Release is what an operator can actually download from; the
|
- name: Log in to the Gitea registry
|
||||||
# artifact above is reachable only from the run's page, behind an
|
run: echo "${{ secrets.DEPLOY_TOKEN }}" | docker login git.catlow.cloud -u "${{ github.actor }}" --password-stdin
|
||||||
# Actions login, and expires after 90 days. Until this step existed the
|
|
||||||
# zip was produced and then stranded -- the only Release on this repo
|
- name: Publish the signed release
|
||||||
# (archied/v1.22.0) was created by hand and carries no asset at all.
|
|
||||||
#
|
|
||||||
# Attached to the release's v* tag, or the archied tag for a release
|
|
||||||
# cut before the single release stream.
|
|
||||||
# --generate-notes is deliberately not used: the changelog section is
|
|
||||||
# the release's own reviewed prose, and the tag/changelog gate above
|
|
||||||
# already guarantees it describes this version.
|
|
||||||
- name: Publish GitHub Release with the distribution zip
|
|
||||||
env:
|
env:
|
||||||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
ARCHIE_RELEASE_SEED: ${{ secrets.RELEASE_SIGNING_KEY }}
|
||||||
|
run: |
|
||||||
|
set -e
|
||||||
|
version="${{ steps.version.outputs.version }}"
|
||||||
|
prerelease=false
|
||||||
|
case "$version" in *-*) prerelease=true ;; esac
|
||||||
|
./dist/archied release publish -source git.catlow.cloud/sam/archie \
|
||||||
|
-version "$version" -prerelease="$prerelease" \
|
||||||
|
-zip "${{ steps.zip.outputs.name }}.zip" \
|
||||||
|
-agent-image "git.catlow.cloud/sam/archie-agent@${{ needs.agent-image.outputs.agent_digest }}" \
|
||||||
|
-changelog "https://git.catlow.cloud/sam/archie/releases/tag/v$version"
|
||||||
|
|
||||||
|
- name: Publish the Gitea release notes
|
||||||
|
env:
|
||||||
|
DEPLOY_TOKEN: ${{ secrets.DEPLOY_TOKEN }}
|
||||||
run: |
|
run: |
|
||||||
set -e
|
set -e
|
||||||
tag="v${{ steps.version.outputs.version }}"
|
tag="v${{ steps.version.outputs.version }}"
|
||||||
if ! git ls-remote --exit-code --tags origin "refs/tags/$tag" >/dev/null; then
|
|
||||||
tag="archied/v${{ steps.version.outputs.version }}"
|
|
||||||
fi
|
|
||||||
version="${{ steps.version.outputs.version }}"
|
version="${{ steps.version.outputs.version }}"
|
||||||
# The release body is this version's changelog section, not the whole
|
prerelease=false
|
||||||
# file: from its "## [x.y.z]" heading to the next "## [" heading.
|
case "$version" in *-*) prerelease=true ;; esac
|
||||||
# Extracting rather than inlining keeps the changelog the single
|
|
||||||
# source of truth, and the tag/changelog gate above has already
|
|
||||||
# proven that section exists.
|
|
||||||
notes="$(mktemp)"
|
notes="$(mktemp)"
|
||||||
awk -v hdr="## [$version]" '
|
previous="$(git describe --tags --abbrev=0 --match 'v*' "$tag^" 2>/dev/null || true)"
|
||||||
index($0, hdr) == 1 { printing = 1 }
|
git log --no-merges --format='- %s' ${previous:+"$previous.."}"$tag" > "$notes"
|
||||||
printing && /^## \[/ && index($0, hdr) != 1 { exit }
|
api="https://git.catlow.cloud/api/v1"
|
||||||
printing { print }
|
repo="sam/archie"
|
||||||
' CHANGELOG.md > "$notes"
|
auth="Authorization: token $DEPLOY_TOKEN"
|
||||||
if ! [ -s "$notes" ]; then
|
curl -sf -X DELETE -H "$auth" "$api/repos/$repo/releases/tags/$tag" >/dev/null || true
|
||||||
echo "no [$version] section extracted from CHANGELOG.md" >&2
|
curl -sf -X POST -H "$auth" -H "Content-Type: application/json" \
|
||||||
exit 1
|
-d "$(jq -n --arg tag "$tag" --arg name "Archie v$version" --arg body "$(cat "$notes")" \
|
||||||
fi
|
--argjson prerelease "$prerelease" \
|
||||||
# Idempotent: --clobber replaces the asset and leaves the notes
|
'{tag_name: $tag, name: $name, body: $body, draft: false, prerelease: $prerelease}')" \
|
||||||
# alone, so a re-run of this job (a retried or superseded deploy)
|
"$api/repos/$repo/releases" >/dev/null
|
||||||
# cannot fail on an existing Release or duplicate the zip.
|
echo "published release notes for $tag"
|
||||||
if gh release view "$tag" >/dev/null 2>&1; then
|
|
||||||
gh release upload "$tag" "${{ steps.zip.outputs.name }}.zip" SHA256SUMS --clobber
|
- name: Link the packages to this repository
|
||||||
else
|
env:
|
||||||
gh release create "$tag" \
|
DEPLOY_TOKEN: ${{ secrets.DEPLOY_TOKEN }}
|
||||||
--title "archied v$version" \
|
run: |
|
||||||
--notes-file "$notes" \
|
for name in archied archie-agent archie; do
|
||||||
"${{ steps.zip.outputs.name }}.zip" SHA256SUMS
|
curl -sS -o /dev/null -X POST -H "Authorization: token $DEPLOY_TOKEN" \
|
||||||
fi
|
"https://git.catlow.cloud/api/v1/packages/sam/container/$name/-/link/archie" || true
|
||||||
echo "published $tag with ${{ steps.zip.outputs.name }}.zip"
|
done
|
||||||
@@ -0,0 +1,43 @@
|
|||||||
|
name: promote
|
||||||
|
|
||||||
|
on:
|
||||||
|
workflow_dispatch:
|
||||||
|
inputs:
|
||||||
|
version:
|
||||||
|
description: "published release to move stable to, such as 1.63.0"
|
||||||
|
required: true
|
||||||
|
type: string
|
||||||
|
|
||||||
|
concurrency:
|
||||||
|
group: promote
|
||||||
|
cancel-in-progress: true
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
packages: write
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
promote:
|
||||||
|
runs-on: self-hosted
|
||||||
|
steps:
|
||||||
|
- name: Log in to the Gitea registry
|
||||||
|
run: echo "${{ secrets.DEPLOY_TOKEN }}" | docker login git.catlow.cloud -u "${{ github.actor }}" --password-stdin
|
||||||
|
|
||||||
|
- name: Fetch the release's archied
|
||||||
|
env:
|
||||||
|
VERSION: ${{ inputs.version }}
|
||||||
|
run: |
|
||||||
|
set -e
|
||||||
|
image="git.catlow.cloud/sam/archied:v$VERSION"
|
||||||
|
docker pull -q "$image"
|
||||||
|
container="$(docker create "$image")"
|
||||||
|
docker cp "$container:/usr/local/bin/archied" "$RUNNER_TEMP/archied"
|
||||||
|
docker rm "$container" >/dev/null
|
||||||
|
|
||||||
|
- name: Promote to stable
|
||||||
|
env:
|
||||||
|
VERSION: ${{ inputs.version }}
|
||||||
|
run: |
|
||||||
|
"$RUNNER_TEMP/archied" release promote \
|
||||||
|
-version "$VERSION" \
|
||||||
|
-latest git.catlow.cloud/sam/archied,git.catlow.cloud/sam/archie-agent
|
||||||
@@ -2,8 +2,6 @@ name: Quality
|
|||||||
|
|
||||||
on:
|
on:
|
||||||
pull_request:
|
pull_request:
|
||||||
push:
|
|
||||||
branches: [main]
|
|
||||||
|
|
||||||
permissions:
|
permissions:
|
||||||
contents: read
|
contents: read
|
||||||
@@ -14,47 +12,33 @@ concurrency:
|
|||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
check:
|
check:
|
||||||
runs-on: ubuntu-latest
|
runs-on: archie-quality
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262
|
||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
|
|
||||||
- uses: actions/setup-go@v5
|
- name: Verify unprivileged user namespaces
|
||||||
|
run: unshare --user --map-root-user --net true
|
||||||
|
|
||||||
|
- uses: actions/setup-go@40f1582b2485089dde7abd97c1529aa768e1baff
|
||||||
with:
|
with:
|
||||||
go-version-file: go.mod
|
go-version-file: go.mod
|
||||||
|
|
||||||
- uses: actions/setup-node@v4
|
|
||||||
with:
|
|
||||||
node-version: "24"
|
|
||||||
cache: npm
|
|
||||||
cache-dependency-path: ui/package-lock.json
|
|
||||||
|
|
||||||
- name: Install quality tools
|
- name: Install quality tools
|
||||||
run: |
|
run: |
|
||||||
go install github.com/go-task/task/v3/cmd/task@v3.48.0
|
go install github.com/go-task/task/v3/cmd/task@v3.48.0
|
||||||
go install github.com/golangci/golangci-lint/v2/cmd/golangci-lint@v2.13.2
|
go install github.com/golangci/golangci-lint/v2/cmd/golangci-lint@$(cat .golangci-version)
|
||||||
go install mvdan.cc/gofumpt@v0.11.0
|
go install mvdan.cc/gofumpt@v0.11.0
|
||||||
bash tools/proto.sh install
|
bash tools/proto.sh install
|
||||||
|
|
||||||
sudo apt-get update
|
- uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830
|
||||||
sudo apt-get install -y --no-install-recommends ripgrep
|
with:
|
||||||
sudo install -d /usr/share/postgresql-common/pgdg
|
path: ~/.cache/golangci-lint
|
||||||
sudo curl --fail --silent --show-error --location \
|
key: golangci-lint-${{ hashFiles('.golangci-version', '.golangci.yml', 'go.sum') }}-${{ github.sha }}
|
||||||
https://www.postgresql.org/media/keys/ACCC4CF8.asc \
|
restore-keys: |
|
||||||
--output /usr/share/postgresql-common/pgdg/apt.postgresql.org.asc
|
golangci-lint-${{ hashFiles('.golangci-version', '.golangci.yml', 'go.sum') }}-
|
||||||
|
golangci-lint-
|
||||||
. /etc/os-release
|
|
||||||
echo "deb [signed-by=/usr/share/postgresql-common/pgdg/apt.postgresql.org.asc] https://apt.postgresql.org/pub/repos/apt ${VERSION_CODENAME}-pgdg main" \
|
|
||||||
| sudo tee /etc/apt/sources.list.d/pgdg.list
|
|
||||||
|
|
||||||
sudo apt-get update
|
|
||||||
sudo apt-get install -y --no-install-recommends postgresql-client-18
|
|
||||||
|
|
||||||
echo "/usr/lib/postgresql/18/bin" >> $GITHUB_PATH
|
|
||||||
|
|
||||||
pg_dump --version
|
|
||||||
pg_restore --version
|
|
||||||
|
|
||||||
- name: Ensure contract baseline ref
|
- name: Ensure contract baseline ref
|
||||||
run: |
|
run: |
|
||||||
@@ -62,12 +46,7 @@ jobs:
|
|||||||
git branch main origin/main
|
git branch main origin/main
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Extensions run in an unprivileged user and network namespace, which
|
|
||||||
# Ubuntu 24.04 runners forbid through AppArmor by default.
|
|
||||||
- name: Allow unprivileged user namespaces
|
|
||||||
run: sudo sysctl -w kernel.apparmor_restrict_unprivileged_userns=0
|
|
||||||
|
|
||||||
- name: Run definitive gate
|
- name: Run definitive gate
|
||||||
run: |
|
run: |
|
||||||
task check
|
task --concurrency 1 check
|
||||||
git diff --exit-code
|
git diff --exit-code
|
||||||
@@ -0,0 +1,55 @@
|
|||||||
|
name: release
|
||||||
|
|
||||||
|
on:
|
||||||
|
workflow_dispatch:
|
||||||
|
inputs:
|
||||||
|
release:
|
||||||
|
description: "major, minor, patch, or an exact version such as 1.57.0"
|
||||||
|
required: true
|
||||||
|
default: minor
|
||||||
|
|
||||||
|
concurrency:
|
||||||
|
group: release
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: write
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
cut:
|
||||||
|
runs-on: self-hosted
|
||||||
|
steps:
|
||||||
|
- name: Check DEPLOY_TOKEN is configured
|
||||||
|
env:
|
||||||
|
DEPLOY_TOKEN: ${{ secrets.DEPLOY_TOKEN }}
|
||||||
|
run: |
|
||||||
|
if [ -z "$DEPLOY_TOKEN" ]; then
|
||||||
|
echo "::error::DEPLOY_TOKEN is not set for this repository, so the release cannot push its tag. Set the secret here, or dispatch the release from the Gitea primary."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262
|
||||||
|
with:
|
||||||
|
ref: main
|
||||||
|
fetch-depth: 0
|
||||||
|
token: ${{ secrets.DEPLOY_TOKEN }}
|
||||||
|
|
||||||
|
- name: Set up Go
|
||||||
|
uses: actions/setup-go@40f1582b2485089dde7abd97c1529aa768e1baff
|
||||||
|
with:
|
||||||
|
go-version-file: go.mod
|
||||||
|
cache: false
|
||||||
|
|
||||||
|
- name: Install Task
|
||||||
|
run: go install github.com/go-task/task/v3/cmd/task@v3.48.0
|
||||||
|
|
||||||
|
- name: Cut the release
|
||||||
|
env:
|
||||||
|
RELEASE: ${{ inputs.release }}
|
||||||
|
run: |
|
||||||
|
git config user.name "Sam Catlow"
|
||||||
|
git config user.email "sam@catlow.tech"
|
||||||
|
task release RELEASE="$RELEASE"
|
||||||
|
|
||||||
|
- name: Push the release
|
||||||
|
run: git push origin "$(git describe --exact-match --match 'v*' HEAD)"
|
||||||
+15
-9
@@ -1,6 +1,7 @@
|
|||||||
/archied
|
/archied
|
||||||
/archie-agent
|
/archie-agent
|
||||||
/bin/
|
/bin/
|
||||||
|
/dist/
|
||||||
.task/
|
.task/
|
||||||
*.db
|
*.db
|
||||||
.references/
|
.references/
|
||||||
@@ -22,22 +23,13 @@ config.production.toml
|
|||||||
*.png
|
*.png
|
||||||
|
|
||||||
# Frontend
|
# Frontend
|
||||||
/ui/node_modules/
|
|
||||||
/ui/.vite/
|
|
||||||
/ui/*.tsbuildinfo
|
|
||||||
# ui/dist IS committed: the Go build must not need a Node toolchain.
|
|
||||||
|
|
||||||
# air live-reload
|
# air live-reload
|
||||||
/.air/
|
/.air/
|
||||||
/tmp/
|
/tmp/
|
||||||
|
|
||||||
# Beads / Dolt files (added by bd init)
|
|
||||||
.dolt/
|
.dolt/
|
||||||
.beads-credential-key
|
|
||||||
.beads/proxieddb/
|
|
||||||
*.gate.lock*
|
*.gate.lock*
|
||||||
.beads/issues.jsonl
|
|
||||||
.beads/interactions.jsonl
|
|
||||||
.mcp.json
|
.mcp.json
|
||||||
|
|
||||||
# gh CLI state (~/.local/state/gh) mistakenly created inside the tree
|
# gh CLI state (~/.local/state/gh) mistakenly created inside the tree
|
||||||
@@ -52,3 +44,17 @@ __pycache__/
|
|||||||
|
|
||||||
# Local symlink to the archipelago marketplace repo
|
# Local symlink to the archipelago marketplace repo
|
||||||
/archipelago
|
/archipelago
|
||||||
|
.agents-run/
|
||||||
|
/.pnpm-store/
|
||||||
|
deployments/archie/.build/
|
||||||
|
.codebase-memory/
|
||||||
|
|
||||||
|
# Vale synced packages, dictionaries, and grammars (recreated by `vale sync`).
|
||||||
|
# Local house rules (.vale/styles/Archie/) and vocabulary stay tracked.
|
||||||
|
/.vale/styles/*
|
||||||
|
!/.vale/styles/Archie/
|
||||||
|
!/.vale/styles/config/
|
||||||
|
/.vale/styles/config/*
|
||||||
|
!/.vale/styles/config/vocabularies/
|
||||||
|
/.vale/styles/config/vocabularies/*
|
||||||
|
!/.vale/styles/config/vocabularies/Archie/
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
v2.14.0
|
||||||
+49
-8
@@ -42,6 +42,7 @@ linters:
|
|||||||
- errorlint
|
- errorlint
|
||||||
- fatcontext
|
- fatcontext
|
||||||
- forcetypeassert
|
- forcetypeassert
|
||||||
|
- gosec
|
||||||
- makezero
|
- makezero
|
||||||
- nilerr
|
- nilerr
|
||||||
- nilnesserr
|
- nilnesserr
|
||||||
@@ -82,8 +83,48 @@ linters:
|
|||||||
- {pkg: "github.com/samcharles93/archie-core/internal/app/archied", desc: "the daemon is another service"}
|
- {pkg: "github.com/samcharles93/archie-core/internal/app/archied", desc: "the daemon is another service"}
|
||||||
- {pkg: "github.com/samcharles93/archie-core/internal/app/archiegateway", desc: "the Gateway is another service"}
|
- {pkg: "github.com/samcharles93/archie-core/internal/app/archiegateway", desc: "the Gateway is another service"}
|
||||||
- {pkg: "github.com/nats-io", desc: "the State Store serves gRPC only"}
|
- {pkg: "github.com/nats-io", desc: "the State Store serves gRPC only"}
|
||||||
|
dashboard-service:
|
||||||
|
files: ["**/internal/webui/**", "**/internal/app/archieui/**", "**/cmd/archie-ui/**"]
|
||||||
|
deny:
|
||||||
|
- {pkg: "github.com/samcharles93/archie-core/internal/container", desc: "only the daemon owns containers"}
|
||||||
|
- {pkg: "github.com/samcharles93/archie-core/internal/agentexec", desc: "only the daemon owns containers"}
|
||||||
|
- {pkg: "github.com/samcharles93/archie-core/internal/app/archied", desc: "the daemon is another service"}
|
||||||
|
messaging-service:
|
||||||
|
files: ["**/internal/app/archiemessaging/**", "**/cmd/archie-messaging/**"]
|
||||||
|
deny:
|
||||||
|
- {pkg: "github.com/jackc/pgx", desc: "reach the State Store through its contract"}
|
||||||
|
- {pkg: "github.com/samcharles93/archie-core/internal/infrastructure/postgres", desc: "reach the State Store through its contract"}
|
||||||
|
- {pkg: "github.com/samcharles93/archie-core/internal/infrastructure/controlplanestore", desc: "reach the State Store through its contract"}
|
||||||
|
- {pkg: "github.com/samcharles93/archie-core/internal/domain/workflow", desc: "the workflow engine is the daemon's"}
|
||||||
|
- {pkg: "github.com/samcharles93/archie-core/internal/agentexec", desc: "agent execution is the daemon's"}
|
||||||
|
# The single binary replaces the services slice by slice. It never
|
||||||
|
# imports their packages, so each old path can be deleted outright.
|
||||||
|
single-binary:
|
||||||
|
files: ["**/cmd/archie/**", "**/internal/app/archie/**", "**/internal/platform/**", "**/modules/**"]
|
||||||
|
deny:
|
||||||
|
- {pkg: "github.com/samcharles93/archie-core/internal/app/archied", desc: "an old service; move what you need into a module"}
|
||||||
|
- {pkg: "github.com/samcharles93/archie-core/internal/app/statestore", desc: "an old service; move what you need into a module"}
|
||||||
|
- {pkg: "github.com/samcharles93/archie-core/internal/app/archiegateway", desc: "an old service; move what you need into a module"}
|
||||||
|
- {pkg: "github.com/samcharles93/archie-core/internal/app/archiemessaging", desc: "an old service; move what you need into a module"}
|
||||||
|
- {pkg: "github.com/samcharles93/archie-core/internal/app/archieui", desc: "an old service; move what you need into a module"}
|
||||||
|
- {pkg: "github.com/samcharles93/archie-core/internal/app/servicekit", desc: "old service plumbing"}
|
||||||
|
- {pkg: "github.com/samcharles93/archie-core/internal/daemon", desc: "old service code; move what you need into a module"}
|
||||||
|
- {pkg: "github.com/samcharles93/archie-core/internal/gateway", desc: "old service code; move what you need into a module"}
|
||||||
|
- {pkg: "github.com/samcharles93/archie-core/internal/webui", desc: "old service code; move what you need into a module"}
|
||||||
|
- {pkg: "github.com/samcharles93/archie-core/internal/domain", desc: "old domain code; move what you need into a module"}
|
||||||
|
- {pkg: "github.com/samcharles93/archie-core/internal/infrastructure", desc: "old infrastructure; move what you need into a module"}
|
||||||
|
- {pkg: "github.com/samcharles93/archie-core/internal/contracts/state", desc: "an internal service contract being deleted"}
|
||||||
|
- {pkg: "github.com/samcharles93/archie-core/internal/contracts/gateway", desc: "an internal service contract being deleted"}
|
||||||
|
- {pkg: "github.com/samcharles93/archie-core/internal/contracts/daemon", desc: "an internal service contract being deleted"}
|
||||||
|
- {pkg: "github.com/samcharles93/archie-core/internal/contracts/controlplane", desc: "an internal service contract being deleted"}
|
||||||
|
- {pkg: "github.com/samcharles93/archie-core/internal/contracts/messaging", desc: "an internal service contract being deleted"}
|
||||||
|
- {pkg: "github.com/samcharles93/archie-core/internal/contracts/logging", desc: "an internal service contract being deleted"}
|
||||||
|
- {pkg: "github.com/samcharles93/archie-core/internal/contracts/forge", desc: "an internal service contract being deleted"}
|
||||||
|
- {pkg: "github.com/samcharles93/archie-core/internal/contracts/channel", desc: "an internal service contract being deleted"}
|
||||||
|
- {pkg: "github.com/samcharles93/archie-core/internal/config", desc: "the single binary has its own bootstrap config"}
|
||||||
|
- {pkg: "github.com/nats-io", desc: "the single binary has no message bus"}
|
||||||
shared:
|
shared:
|
||||||
files: ["**/internal/app/servicekit/**", "**/internal/app/chattask/**"]
|
files: ["**/internal/app/servicekit/**"]
|
||||||
deny:
|
deny:
|
||||||
- {pkg: "github.com/samcharles93/archie-core/internal/daemon", desc: "shared code must not pull in a service"}
|
- {pkg: "github.com/samcharles93/archie-core/internal/daemon", desc: "shared code must not pull in a service"}
|
||||||
- {pkg: "github.com/samcharles93/archie-core/internal/webui", desc: "shared code must not pull in a service"}
|
- {pkg: "github.com/samcharles93/archie-core/internal/webui", desc: "shared code must not pull in a service"}
|
||||||
@@ -114,25 +155,25 @@ linters:
|
|||||||
- HACK
|
- HACK
|
||||||
- BUG
|
- BUG
|
||||||
|
|
||||||
|
gosec:
|
||||||
|
excludes:
|
||||||
|
- G104 # errcheck covers unchecked errors
|
||||||
|
- G115 # integer conversions are bounded where they occur
|
||||||
|
- G204 # running commands is what the tools and workflow steps do
|
||||||
|
- G304 # file paths come from configuration and confined worktrees
|
||||||
interfacebloat:
|
interfacebloat:
|
||||||
max: 8
|
max: 8
|
||||||
|
|
||||||
sloglint:
|
sloglint:
|
||||||
no-mixed-args: true
|
no-mixed-args: true
|
||||||
key-naming-case: snake
|
key-naming-case: snake
|
||||||
|
context: scope
|
||||||
|
|
||||||
exclusions:
|
exclusions:
|
||||||
generated: lax
|
generated: lax
|
||||||
warn-unused: true
|
warn-unused: true
|
||||||
# npm dependencies are not this module's code. `flatted`, pulled in
|
|
||||||
# transitively by the dashboard toolchain, ships a Go implementation
|
|
||||||
# alongside its JavaScript, and linting a vendored third-party file fails
|
|
||||||
# the gate on complexity nobody here can fix.
|
|
||||||
paths:
|
|
||||||
- ui/node_modules
|
|
||||||
presets:
|
presets:
|
||||||
- comments
|
- comments
|
||||||
- std-error-handling
|
|
||||||
- common-false-positives
|
- common-false-positives
|
||||||
- legacy
|
- legacy
|
||||||
rules:
|
rules:
|
||||||
|
|||||||
@@ -0,0 +1,10 @@
|
|||||||
|
{
|
||||||
|
"buildPath": "code",
|
||||||
|
"hook": {
|
||||||
|
"enabled": true,
|
||||||
|
"limits": {
|
||||||
|
"maxFindings": 5,
|
||||||
|
"maxChars": 8000
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,141 @@
|
|||||||
|
{
|
||||||
|
"schemaVersion": 2,
|
||||||
|
"generatedAt": "2026-11-24T00:00:00+11:00",
|
||||||
|
"title": "Design System: Archie",
|
||||||
|
"extensions": {
|
||||||
|
"colorMeta": {
|
||||||
|
"signal-sage": { "role": "primary", "displayName": "Signal Sage", "canonical": "#51a580", "tonalRamp": ["#0f2a1e", "#17402e", "#1f5740", "#2e795a", "#51a580", "#7dbf9f", "#acd8c2", "#dcefe5"] },
|
||||||
|
"signal-sage-deep": { "role": "primary", "displayName": "Signal Sage Deep", "canonical": "#2e795a" },
|
||||||
|
"signal-sage-ink": { "role": "primary", "displayName": "Signal Sage Ink", "canonical": "#0c6f4d" },
|
||||||
|
"graphite-card": { "role": "neutral", "displayName": "Graphite Card", "canonical": "#1c1d21", "tonalRamp": ["#0e0f10", "#16171a", "#1c1d21", "#26282c", "#3c3f45", "#70727a", "#a6a39b", "#e8e6e1"] },
|
||||||
|
"paper-canvas": { "role": "neutral", "displayName": "Paper Canvas", "canonical": "#e9e7e2", "tonalRamp": ["#1f1f1d", "#5c5a55", "#8a877f", "#c7c4bd", "#dcdad4", "#e9e7e2", "#f5f4f1", "#ffffff"] },
|
||||||
|
"amber-warn": { "role": "tertiary", "displayName": "Amber Warn", "canonical": "#d9a45b", "tonalRamp": ["#3a2a10", "#5c4116", "#8a5a12", "#b5833a", "#d9a45b", "#e5bf87", "#efd7b3", "#f8eddc"] },
|
||||||
|
"clay-danger": { "role": "tertiary", "displayName": "Clay Danger", "canonical": "#d9776b", "tonalRamp": ["#3d1714", "#5e2420", "#b3413a", "#c75d53", "#d9776b", "#e49d94", "#eec3bd", "#f8e6e3"] },
|
||||||
|
"slate-info": { "role": "tertiary", "displayName": "Slate Info", "canonical": "#8aa4c2", "tonalRamp": ["#17222f", "#24364b", "#3d5f86", "#6283a8", "#8aa4c2", "#adc0d5", "#cfdae6", "#ecf1f6"] },
|
||||||
|
"stone-idle": { "role": "neutral", "displayName": "Stone Idle", "canonical": "#9a978f" }
|
||||||
|
},
|
||||||
|
"typographyMeta": {
|
||||||
|
"page-title": { "displayName": "Page title", "purpose": "One per page, in PageHeader beside the page's actions." },
|
||||||
|
"title": { "displayName": "Title", "purpose": "Card and panel titles." },
|
||||||
|
"label": { "displayName": "Label", "purpose": "Body copy, rows, navigation, buttons and fields." },
|
||||||
|
"caption": { "displayName": "Caption", "purpose": "Metadata, column labels, step-type labels and badges." },
|
||||||
|
"section-label": { "displayName": "Section label", "purpose": "Uppercase group headings in sidebars and settings navigation." },
|
||||||
|
"micro": { "displayName": "Micro", "purpose": "The smallest annotations, used sparingly." },
|
||||||
|
"mono": { "displayName": "Mono", "purpose": "IDs, short hashes, durations, log fields and code." }
|
||||||
|
},
|
||||||
|
"shadows": [
|
||||||
|
{ "name": "rest", "value": "0 1px 2px rgba(0, 0, 0, 0.4)", "purpose": "Top bar and canvas nodes at rest (dark). Light: 0 1px 2px rgba(31, 31, 29, 0.06)." },
|
||||||
|
{ "name": "float", "value": "0 8px 28px rgba(0, 0, 0, 0.4)", "purpose": "Popovers, menus, dialogs and the expanded step node (dark). Light: 0 8px 28px rgba(31, 31, 29, 0.1)." }
|
||||||
|
],
|
||||||
|
"motion": [
|
||||||
|
{ "name": "transition", "value": "140ms cubic-bezier(0.4, 0, 0.2, 1)", "purpose": "Default colour and state transitions." },
|
||||||
|
{ "name": "node-expand", "value": "200ms", "purpose": "Step node width and shadow when it expands in place." },
|
||||||
|
{ "name": "reduced-motion", "value": "0.01ms", "purpose": "All animation and transition durations under prefers-reduced-motion or the reduced-motion setting." }
|
||||||
|
],
|
||||||
|
"breakpoints": [
|
||||||
|
{ "name": "sm", "value": "640px" },
|
||||||
|
{ "name": "md", "value": "768px" },
|
||||||
|
{ "name": "lg", "value": "1024px" }
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"components": [
|
||||||
|
{
|
||||||
|
"name": "Primary Button",
|
||||||
|
"kind": "button",
|
||||||
|
"refersTo": "button-primary",
|
||||||
|
"description": "The one filled action per view.",
|
||||||
|
"html": "<button class=\"ds-btn-primary\">Run workflow</button>",
|
||||||
|
"css": ".ds-btn-primary { height: 36px; padding: 0 10px; border: 1px solid transparent; border-radius: 8px; background: var(--primary, #2e795a); color: var(--primary-foreground, #fff); font: 500 0.8125rem 'IBM Plex Sans Variable', system-ui, sans-serif; cursor: pointer; transition: all 140ms cubic-bezier(0.4, 0, 0.2, 1); } .ds-btn-primary:hover { background: color-mix(in srgb, var(--primary, #2e795a) 80%, transparent); } .ds-btn-primary:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--ring, #51a580); } .ds-btn-primary:active { transform: translateY(1px); }"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Ghost Button",
|
||||||
|
"kind": "button",
|
||||||
|
"refersTo": "button-ghost",
|
||||||
|
"description": "Default for secondary and contextual actions.",
|
||||||
|
"html": "<button class=\"ds-btn-ghost\">Cancel</button>",
|
||||||
|
"css": ".ds-btn-ghost { height: 36px; padding: 0 10px; border: 1px solid transparent; border-radius: 8px; background: transparent; color: var(--foreground, #e8e6e1); font: 500 0.8125rem 'IBM Plex Sans Variable', system-ui, sans-serif; cursor: pointer; transition: all 140ms cubic-bezier(0.4, 0, 0.2, 1); } .ds-btn-ghost:hover { background: var(--muted, #26282c); } .ds-btn-ghost:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--ring, #51a580); } .ds-btn-ghost:active { transform: translateY(1px); }"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Attention Button",
|
||||||
|
"kind": "button",
|
||||||
|
"refersTo": "button-attention",
|
||||||
|
"description": "An action that exists because something is waiting.",
|
||||||
|
"html": "<button class=\"ds-btn-attention\">Review approval</button>",
|
||||||
|
"css": ".ds-btn-attention { height: 36px; padding: 0 10px; border: 1px solid var(--warn, #d9a45b); border-radius: 8px; background: var(--warn-soft, rgba(217,164,91,0.08)); color: var(--warn, #d9a45b); font: 500 0.8125rem 'IBM Plex Sans Variable', system-ui, sans-serif; cursor: pointer; transition: all 140ms cubic-bezier(0.4, 0, 0.2, 1); } .ds-btn-attention:hover { background: rgba(217,164,91,0.16); } .ds-btn-attention:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--ring, #51a580); }"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Text Input",
|
||||||
|
"kind": "input",
|
||||||
|
"refersTo": "input",
|
||||||
|
"description": "Single-line field on the card surface.",
|
||||||
|
"html": "<input class=\"ds-input\" placeholder=\"Workflow name\" />",
|
||||||
|
"css": ".ds-input { height: 36px; width: 240px; padding: 4px 10px; border: 1px solid var(--input, #70727a); border-radius: 8px; background: var(--card, #1c1d21); color: var(--foreground, #e8e6e1); font: 400 0.8125rem 'IBM Plex Sans Variable', system-ui, sans-serif; outline: none; transition: border-color 140ms, box-shadow 140ms; } .ds-input::placeholder { color: var(--fg-muted, #a6a39b); } .ds-input:focus-visible { border-color: var(--ring, #51a580); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ring, #51a580) 50%, transparent); }"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Status Badges",
|
||||||
|
"kind": "chip",
|
||||||
|
"refersTo": "badge-ok",
|
||||||
|
"description": "Solid tone on its soft background; the only place status colour is decided.",
|
||||||
|
"html": "<span class=\"ds-badge ds-ok\">Succeeded</span> <span class=\"ds-badge ds-warn\">Waiting</span> <span class=\"ds-badge ds-danger\">Failed</span> <span class=\"ds-badge ds-info\">Working</span> <span class=\"ds-badge ds-idle\">Idle</span>",
|
||||||
|
"css": ".ds-badge { display: inline-flex; align-items: center; height: 20px; padding: 2px 8px; border-radius: 4px; font: 500 0.6875rem 'IBM Plex Sans Variable', system-ui, sans-serif; white-space: nowrap; } .ds-ok { background: var(--ok-soft, rgba(81,165,128,0.12)); color: var(--ok, #51a580); } .ds-warn { background: var(--warn-soft, rgba(217,164,91,0.08)); color: var(--warn, #d9a45b); } .ds-danger { background: var(--danger-soft, rgba(217,119,107,0.08)); color: var(--danger, #d9776b); } .ds-info { background: var(--info-soft, rgba(138,164,194,0.1)); color: var(--info, #8aa4c2); } .ds-idle { background: var(--idle-soft, rgba(143,140,133,0.1)); color: var(--idle, #9a978f); }"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Section Card",
|
||||||
|
"kind": "card",
|
||||||
|
"refersTo": "card",
|
||||||
|
"description": "Titled card on the workspace; ring, no shadow.",
|
||||||
|
"html": "<section class=\"ds-card\"><h3 class=\"ds-card-title\">Event sources</h3><p class=\"ds-card-body\">prometheus <span class=\"ds-mono\">a41f9c2e</span></p></section>",
|
||||||
|
"css": ".ds-card { width: 320px; padding: 16px; border-radius: 12px; background: var(--card, #1c1d21); color: var(--card-foreground, #e8e6e1); box-shadow: 0 0 0 1px color-mix(in srgb, var(--foreground, #e8e6e1) 10%, transparent); font-family: 'IBM Plex Sans Variable', system-ui, sans-serif; } .ds-card-title { margin: 0 0 8px; font-size: 0.9375rem; font-weight: 500; line-height: 1.375; } .ds-card-body { margin: 0; font-size: 0.8125rem; color: var(--fg-muted, #a6a39b); } .ds-mono { font-family: 'IBM Plex Mono', ui-monospace, monospace; font-size: 0.6875rem; color: var(--fg-subtle, #99968f); }"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Top Bar",
|
||||||
|
"kind": "nav",
|
||||||
|
"refersTo": "top-bar",
|
||||||
|
"description": "Sticky 56px bar with breadcrumb and account controls.",
|
||||||
|
"html": "<header class=\"ds-topbar\"><nav class=\"ds-crumbs\"><a href=\"#\">Workflows</a><span>/</span><span class=\"ds-current\">disk-pressure</span></nav><span class=\"ds-pill\"><i></i>Connected</span></header>",
|
||||||
|
"css": ".ds-topbar { display: flex; align-items: center; justify-content: space-between; height: 56px; padding: 0 16px; background: var(--card, #1c1d21); border-bottom: 1px solid var(--border-strong, #3c3f45); box-shadow: 0 1px 2px rgba(0,0,0,0.4); font: 400 0.8125rem 'IBM Plex Sans Variable', system-ui, sans-serif; } .ds-crumbs { display: flex; gap: 6px; color: var(--fg-muted, #a6a39b); } .ds-crumbs a { color: inherit; text-decoration: none; } .ds-crumbs a:hover { color: var(--foreground, #e8e6e1); } .ds-crumbs a:focus-visible { outline: 2px solid var(--ring, #51a580); outline-offset: 2px; } .ds-current { color: var(--foreground, #e8e6e1); } .ds-pill { display: inline-flex; align-items: center; gap: 6px; font-size: 0.6875rem; color: var(--fg-muted, #a6a39b); } .ds-pill i { width: 6px; height: 6px; border-radius: 9999px; background: var(--ok, #51a580); }"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Step Node",
|
||||||
|
"kind": "custom",
|
||||||
|
"refersTo": "step-node",
|
||||||
|
"description": "The workflow canvas card; the same card shows edit state and live run state.",
|
||||||
|
"html": "<div class=\"ds-node\" tabindex=\"0\"><div class=\"ds-node-meta\"><svg width=\"14\" height=\"14\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M12 8V4H8\"/><rect width=\"16\" height=\"12\" x=\"4\" y=\"8\" rx=\"2\"/></svg><span>Agent</span><span class=\"ds-node-dur\">4.2s</span><i class=\"ds-node-dot\"></i></div><div class=\"ds-node-title\">2 Investigate disk usage</div></div>",
|
||||||
|
"css": ".ds-node { width: 240px; padding: 10px 12px; border: 1px solid var(--border, #313338); border-radius: 8px; background: var(--card, #1c1d21); box-shadow: 0 1px 2px rgba(0,0,0,0.4); font-family: 'IBM Plex Sans Variable', system-ui, sans-serif; color: var(--foreground, #e8e6e1); cursor: pointer; transition: width 200ms, box-shadow 200ms, border-color 140ms; } .ds-node:hover { border-color: var(--muted-foreground, #a6a39b); } .ds-node:focus-visible { outline: none; width: 416px; box-shadow: 0 8px 28px rgba(0,0,0,0.4), 0 0 0 2px var(--ring, #51a580); } .ds-node-meta { display: flex; align-items: center; gap: 6px; font-size: 0.6875rem; color: var(--fg-muted, #a6a39b); } .ds-node-meta svg { color: var(--link, #51a580); } .ds-node-dur { margin-left: auto; font-family: 'IBM Plex Mono', ui-monospace, monospace; color: var(--fg-subtle, #99968f); } .ds-node-dot { width: 6px; height: 6px; border-radius: 9999px; background: var(--info, #8aa4c2); } .ds-node-title { margin-top: 6px; font-size: 0.8125rem; font-weight: 500; }"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"narrative": {
|
||||||
|
"northStar": "The Operations Console",
|
||||||
|
"overview": "Archie's dashboard is a calm instrument panel for someone responsible for a live estate. It is dense and legible, and it stays quiet until something needs the operator. The mood is calm, precise and trustworthy: restraint is how the interface shows it is in control, and nothing raises its voice unless state demands it.\n\nThe palette is Graphite: warm neutral greys with no hue cast and a single accent, Signal Sage. Hierarchy comes from surface steps, hairlines and type weight, never from tinted backgrounds. Colour is a signal, not decoration. Sage marks what is live, healthy or actionable, and the four status hues (amber, clay, slate, stone) each keep one meaning everywhere they appear. Dark and light themes carry the same variable set and the same rules; the operator's OS chooses unless they pick one.\n\nDensity is a first-class setting. The default is already compact, and compact mode tightens the whole spacing scale without shrinking text or hit targets. Controls are compact and contextual: they appear where the work is, on hover or focus, rather than as permanent chrome. The interface never looks like a toy and never borrows generic SaaS gloss.",
|
||||||
|
"keyCharacteristics": [
|
||||||
|
"Warm graphite neutrals, one sage accent, four fixed status hues.",
|
||||||
|
"IBM Plex Sans with Plex Mono for IDs, durations and payloads, on a compact type scale (11 to 15px).",
|
||||||
|
"Flat tonal layers; shadows only for things that float.",
|
||||||
|
"Compact density by default, with a tighter compact mode.",
|
||||||
|
"Both themes, reduced motion and keyboard focus are invariants, not options."
|
||||||
|
],
|
||||||
|
"rules": [
|
||||||
|
{ "name": "The Semantic Names Rule", "body": "Components reference `--primary`, `--ok`, `--warn` and the rest, never a raw hex or a hue name such as `--violet`. A palette change is one file.", "section": "colors" },
|
||||||
|
{ "name": "The One Meaning Rule", "body": "A status colour means the same thing wherever it appears: a task state, a gate result, a log level and a trend all draw from the same five tones.", "section": "colors" },
|
||||||
|
{ "name": "The Measured Contrast Rule", "body": "Every foreground is checked against every surface it lands on, hover states included, at 4.5:1. Nothing dimmer than Text Subtle is allowed as text.", "section": "colors" },
|
||||||
|
{ "name": "The Type Scale Rule", "body": "Use the named steps (`text-micro`, `text-caption`, `text-label`, `text-title`), never pixel sizes. Headings are separated by weight and placement, not by size jumps.", "section": "typography" },
|
||||||
|
{ "name": "The Data Is Mono Rule", "body": "Anything the operator might copy or compare (an ID, a version, a duration, a payload) is set in Plex Mono.", "section": "typography" },
|
||||||
|
{ "name": "The Flat By Default Rule", "body": "Cards sit on the page with a 1px ring, not a shadow. A larger shadow means the element floats above the page.", "section": "elevation" }
|
||||||
|
],
|
||||||
|
"dos": [
|
||||||
|
"Do use semantic tokens (`bg-card`, `text-fg-muted`, `bg-ok-soft`) and the named type steps, so both themes and compact density work without extra code.",
|
||||||
|
"Do keep one filled primary button per view; everything else is ghost, outline or secondary.",
|
||||||
|
"Do set IDs, versions, durations and payloads in Plex Mono.",
|
||||||
|
"Do show actions on hover or focus where the work is, and make every hover action reachable by keyboard.",
|
||||||
|
"Do honour reduced motion: nothing animates when the operator asks it not to."
|
||||||
|
],
|
||||||
|
"donts": [
|
||||||
|
"Don't use generic SaaS gloss: no purple or multicolour gradients, no glow shadows, no glassmorphism cards, no gradient text.",
|
||||||
|
"Don't make it toy-like on phones: no blanket 44px minimum sizes on buttons, links and fields. Widen the tap area invisibly with `touch-hit` instead.",
|
||||||
|
"Don't tint backgrounds for hierarchy; use surface steps and borders.",
|
||||||
|
"Don't introduce a new hue or reuse a status colour for decoration.",
|
||||||
|
"Don't put white text on a status fill; use the soft background and the solid tone.",
|
||||||
|
"Don't add a shadow to a resting card."
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,4 +0,0 @@
|
|||||||
# Generated output: only its generator writes it, and the gate byte-checks it.
|
|
||||||
docs/data/generated/
|
|
||||||
internal/contracts/
|
|
||||||
ui/dist/
|
|
||||||
@@ -0,0 +1,104 @@
|
|||||||
|
StylesPath = .vale/styles
|
||||||
|
MinAlertLevel = warning
|
||||||
|
Vocab = Archie
|
||||||
|
|
||||||
|
# Run `vale sync` to install external packages and the Go comment grammar.
|
||||||
|
Packages = Google, Microsoft, Voices, TechTerms, Comments, Prompts
|
||||||
|
Grammars = go
|
||||||
|
|
||||||
|
[formats]
|
||||||
|
tmpl = md
|
||||||
|
|
||||||
|
[*.{md,tmpl}]
|
||||||
|
# Ignore Go/workflow template expressions such as {{ steps.plan.summary }}.
|
||||||
|
TokenIgnores = (\{\{[^}]*\}\})
|
||||||
|
|
||||||
|
BasedOnStyles = Vale, Voices, Direct, Google, Archie
|
||||||
|
|
||||||
|
# Australian English and Archie's technical prose conventions:
|
||||||
|
Google.Spelling = NO
|
||||||
|
Google.Quotes = NO
|
||||||
|
Google.DateFormat = NO
|
||||||
|
Google.OxfordComma = NO
|
||||||
|
Google.EmDash = NO
|
||||||
|
Google.Contractions = NO
|
||||||
|
Google.Parens = NO
|
||||||
|
Google.Semicolons = NO
|
||||||
|
Google.Colons = NO
|
||||||
|
Google.Units = NO
|
||||||
|
Google.Acronyms = NO
|
||||||
|
Google.WordList = NO
|
||||||
|
Google.WordListCase = NO
|
||||||
|
|
||||||
|
# Keep style nudges advisory (visible with --minAlertLevel=suggestion).
|
||||||
|
Google.Headings = suggestion
|
||||||
|
Google.Latin = suggestion
|
||||||
|
Google.Exclamation = warning
|
||||||
|
Google.FirstPerson = suggestion
|
||||||
|
Google.We = suggestion
|
||||||
|
Google.Will = suggestion
|
||||||
|
|
||||||
|
# Selective Microsoft rules (UI verbs, inclusive terminology, hyphens) without
|
||||||
|
# pulling in Microsoft-specific product jargon (e.g. agent -> personal digital assistant).
|
||||||
|
Microsoft.UIVerbs = warning
|
||||||
|
Microsoft.BiasFree = warning
|
||||||
|
Microsoft.Auto = warning
|
||||||
|
Microsoft.Suspended = warning
|
||||||
|
Microsoft.Accessibility = suggestion
|
||||||
|
Microsoft.Uppercase = suggestion
|
||||||
|
|
||||||
|
# "Term: explanation" is idiomatic throughout Archie's docs and comments.
|
||||||
|
Voices.ColonReveal = NO
|
||||||
|
|
||||||
|
# Replaced by Archie.Readability and Archie.SentenceLength, calibrated for technical docs.
|
||||||
|
Direct.Ease = NO
|
||||||
|
Direct.Length = NO
|
||||||
|
Direct.Hedging = warning
|
||||||
|
Direct.Preamble = warning
|
||||||
|
|
||||||
|
# Agent instruction and skill files get additional prompt-quality checks.
|
||||||
|
[{AGENTS,CLAUDE,SKILL}.md]
|
||||||
|
BasedOnStyles = Vale, Voices, Direct, Google, Archie, Prompts
|
||||||
|
# A rule file states each rule once, and many of those rules are absolutes.
|
||||||
|
# The prompt heuristic against repeated absolutes does not apply here.
|
||||||
|
Prompts.Absolutes = NO
|
||||||
|
|
||||||
|
# Model prompts are plain text (no Markdown bold) and reference tool names inline.
|
||||||
|
[internal/prompts/*.{md,tmpl}]
|
||||||
|
Vale.Spelling = suggestion
|
||||||
|
Archie.UILabelFormat = NO
|
||||||
|
|
||||||
|
# Go source comments: doc conventions, spelling, clarity, and no migration narration.
|
||||||
|
[*.go]
|
||||||
|
BasedOnStyles = Vale, Voices, Comments, GoDoc, Archie
|
||||||
|
|
||||||
|
# Go comments often mention camelCase/snake_case identifiers without backticks,
|
||||||
|
# so keep spelling advisory here.
|
||||||
|
Vale.Spelling = suggestion
|
||||||
|
|
||||||
|
# Upstream GoDoc.Sentence regex backtracks heavily on long comment blocks.
|
||||||
|
GoDoc.Sentence = NO
|
||||||
|
Voices.ColonReveal = NO
|
||||||
|
Archie.Readability = NO
|
||||||
|
Archie.SentenceLength = NO
|
||||||
|
Archie.UIElementType = NO
|
||||||
|
Archie.UILabelFormat = NO
|
||||||
|
|
||||||
|
# Never lint generated Go files (protobuf, sqlc).
|
||||||
|
[*.{pb,sql}.go]
|
||||||
|
BasedOnStyles =
|
||||||
|
|
||||||
|
# Scratch checkouts, installed skills and generated output are not Archie's
|
||||||
|
# prose: a run over the repository must report on what the repository holds.
|
||||||
|
[tmp/**]
|
||||||
|
BasedOnStyles =
|
||||||
|
[.local/**]
|
||||||
|
BasedOnStyles =
|
||||||
|
[.agents/**]
|
||||||
|
BasedOnStyles =
|
||||||
|
[archipelago/**]
|
||||||
|
BasedOnStyles =
|
||||||
|
[.agents-run/**]
|
||||||
|
BasedOnStyles =
|
||||||
|
[.impeccable/**]
|
||||||
|
BasedOnStyles =
|
||||||
@@ -0,0 +1,154 @@
|
|||||||
|
# Enforce Australian English spelling in prose.
|
||||||
|
# Intentionally omits computing standards that use US forms in Australia
|
||||||
|
# (program, disk, artifact) and verb/noun pairs (licence/license, practise/practice).
|
||||||
|
extends: substitution
|
||||||
|
message: "Use Australian English '%s' instead of '%s'."
|
||||||
|
level: warning
|
||||||
|
ignorecase: true
|
||||||
|
action:
|
||||||
|
name: replace
|
||||||
|
# Exact-case exceptions for HTTP headers and Go method names.
|
||||||
|
exceptions:
|
||||||
|
- Authorize
|
||||||
|
- Authorization
|
||||||
|
swap:
|
||||||
|
analyze: analyse
|
||||||
|
analyzed: analysed
|
||||||
|
analyzes: analyses
|
||||||
|
analyzing: analysing
|
||||||
|
authorization: authorisation
|
||||||
|
authorizations: authorisations
|
||||||
|
authorize: authorise
|
||||||
|
authorized: authorised
|
||||||
|
authorizes: authorises
|
||||||
|
authorizing: authorising
|
||||||
|
behavior: behaviour
|
||||||
|
behavioral: behavioural
|
||||||
|
behaviors: behaviours
|
||||||
|
canceled: cancelled
|
||||||
|
canceling: cancelling
|
||||||
|
canonicalize: canonicalise
|
||||||
|
canonicalized: canonicalised
|
||||||
|
canonicalizes: canonicalises
|
||||||
|
canonicalizing: canonicalising
|
||||||
|
catalog: catalogue
|
||||||
|
cataloged: catalogued
|
||||||
|
cataloging: cataloguing
|
||||||
|
catalogs: catalogues
|
||||||
|
categorization: categorisation
|
||||||
|
categorize: categorise
|
||||||
|
categorized: categorised
|
||||||
|
categorizes: categorises
|
||||||
|
categorizing: categorising
|
||||||
|
center: centre
|
||||||
|
centered: centred
|
||||||
|
centering: centring
|
||||||
|
centers: centres
|
||||||
|
color: colour
|
||||||
|
colored: coloured
|
||||||
|
coloring: colouring
|
||||||
|
colors: colours
|
||||||
|
customization: customisation
|
||||||
|
customize: customise
|
||||||
|
customized: customised
|
||||||
|
customizes: customises
|
||||||
|
customizing: customising
|
||||||
|
favor: favour
|
||||||
|
favored: favoured
|
||||||
|
favoring: favouring
|
||||||
|
favorite: favourite
|
||||||
|
favorites: favourites
|
||||||
|
favors: favours
|
||||||
|
finalize: finalise
|
||||||
|
finalized: finalised
|
||||||
|
finalizes: finalises
|
||||||
|
finalizing: finalising
|
||||||
|
fulfill: fulfil
|
||||||
|
fulfillment: fulfilment
|
||||||
|
fulfills: fulfils
|
||||||
|
initialization: initialisation
|
||||||
|
initialize: initialise
|
||||||
|
initialized: initialised
|
||||||
|
initializes: initialises
|
||||||
|
initializing: initialising
|
||||||
|
judgment: judgement
|
||||||
|
judgments: judgements
|
||||||
|
labeled: labelled
|
||||||
|
labeling: labelling
|
||||||
|
maximize: maximise
|
||||||
|
maximized: maximised
|
||||||
|
maximizes: maximises
|
||||||
|
maximizing: maximising
|
||||||
|
minimize: minimise
|
||||||
|
minimized: minimised
|
||||||
|
minimizes: minimises
|
||||||
|
minimizing: minimising
|
||||||
|
modeled: modelled
|
||||||
|
modeling: modelling
|
||||||
|
normalization: normalisation
|
||||||
|
normalize: normalise
|
||||||
|
normalized: normalised
|
||||||
|
normalizes: normalises
|
||||||
|
normalizing: normalising
|
||||||
|
optimization: optimisation
|
||||||
|
optimizations: optimisations
|
||||||
|
optimize: optimise
|
||||||
|
optimized: optimised
|
||||||
|
optimizes: optimises
|
||||||
|
optimizing: optimising
|
||||||
|
organization: organisation
|
||||||
|
organizational: organisational
|
||||||
|
organizations: organisations
|
||||||
|
organize: organise
|
||||||
|
organized: organised
|
||||||
|
organizes: organises
|
||||||
|
organizing: organising
|
||||||
|
parameterize: parameterise
|
||||||
|
parameterized: parameterised
|
||||||
|
parameterizes: parameterises
|
||||||
|
parameterizing: parameterising
|
||||||
|
prioritize: prioritise
|
||||||
|
prioritized: prioritised
|
||||||
|
prioritizes: prioritises
|
||||||
|
prioritizing: prioritising
|
||||||
|
recognize: recognise
|
||||||
|
recognized: recognised
|
||||||
|
recognizes: recognises
|
||||||
|
recognizing: recognising
|
||||||
|
sanitization: sanitisation
|
||||||
|
sanitize: sanitise
|
||||||
|
sanitized: sanitised
|
||||||
|
sanitizes: sanitises
|
||||||
|
sanitizing: sanitising
|
||||||
|
serialization: serialisation
|
||||||
|
serialize: serialise
|
||||||
|
serialized: serialised
|
||||||
|
serializes: serialises
|
||||||
|
serializing: serialising
|
||||||
|
stabilize: stabilise
|
||||||
|
stabilized: stabilised
|
||||||
|
stabilizes: stabilises
|
||||||
|
stabilizing: stabilising
|
||||||
|
summarize: summarise
|
||||||
|
summarized: summarised
|
||||||
|
summarizes: summarises
|
||||||
|
summarizing: summarising
|
||||||
|
synchronization: synchronisation
|
||||||
|
synchronize: synchronise
|
||||||
|
synchronized: synchronised
|
||||||
|
synchronizes: synchronises
|
||||||
|
synchronizing: synchronising
|
||||||
|
unauthorized: unauthorised
|
||||||
|
|
||||||
|
tests:
|
||||||
|
- name: flags US spelling
|
||||||
|
input: |
|
||||||
|
The organization enforces authorization behavior.
|
||||||
|
want: |
|
||||||
|
1:5:Archie.AustralianEnglish:Use Australian English 'organisation' instead of 'organization'.
|
||||||
|
1:27:Archie.AustralianEnglish:Use Australian English 'authorisation' instead of 'authorization'.
|
||||||
|
1:41:Archie.AustralianEnglish:Use Australian English 'behaviour' instead of 'behavior'.
|
||||||
|
- name: accepts Australian spelling and inline code
|
||||||
|
input: |
|
||||||
|
The organisation enforces authorisation behaviour via `behavior_flag`.
|
||||||
|
want: ""
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
extends: existence
|
||||||
|
message: "No em dashes. Use a comma, brackets, a colon, or a second sentence."
|
||||||
|
level: error
|
||||||
|
nonword: true
|
||||||
|
scope: raw
|
||||||
|
tokens:
|
||||||
|
- '\u2014'
|
||||||
@@ -0,0 +1,29 @@
|
|||||||
|
# AGENTS.md: "Comments explain why, not what the code already says.
|
||||||
|
# No migration history, phase names or issue narration in code."
|
||||||
|
extends: existence
|
||||||
|
message: "Avoid migration or plan narration ('%s') in code comments. Explain what the code does or why."
|
||||||
|
level: warning
|
||||||
|
scope: comment.go
|
||||||
|
ignorecase: true
|
||||||
|
nonword: true
|
||||||
|
tokens:
|
||||||
|
- '\b(?:phase|wave|slice|sprint)\s+\d+\b'
|
||||||
|
- '\bepic\s+#\d+\b'
|
||||||
|
- '\b(?:formerly|previously)\s+(?:called|named|known as)\b'
|
||||||
|
- '\b(?:migrated|moved|extracted|ported)\s+from\b'
|
||||||
|
|
||||||
|
tests:
|
||||||
|
- name: flags migration narration in Go comments
|
||||||
|
format: go
|
||||||
|
input: |
|
||||||
|
// Phase 2 moved from internal/legacy.
|
||||||
|
package demo
|
||||||
|
want: |
|
||||||
|
1:4:Archie.NoMigrationNarration:Avoid migration or plan narration ('Phase 2') in code comments. Explain what the code does or why.
|
||||||
|
1:12:Archie.NoMigrationNarration:Avoid migration or plan narration ('moved from') in code comments. Explain what the code does or why.
|
||||||
|
- name: allows normal rationale comments
|
||||||
|
format: go
|
||||||
|
input: |
|
||||||
|
// Verify the HMAC before parsing so malformed payloads cannot trigger work.
|
||||||
|
package demo
|
||||||
|
want: ""
|
||||||
@@ -0,0 +1,21 @@
|
|||||||
|
# Calibrated for developer documentation: crisp technical docs with domain
|
||||||
|
# terminology typically score 8-11 on Flesch-Kincaid; higher scores usually
|
||||||
|
# signal dense paragraphs that benefit from simpler structure.
|
||||||
|
extends: metric
|
||||||
|
message: "Try to keep the Flesch-Kincaid grade level (%s) at or below 11."
|
||||||
|
link: https://en.wikipedia.org/wiki/Flesch%E2%80%93Kincaid_readability_tests
|
||||||
|
level: warning
|
||||||
|
formula: |
|
||||||
|
(0.39 * (words / sentences)) + (11.8 * (syllables / words)) - 15.59
|
||||||
|
condition: "> 11"
|
||||||
|
|
||||||
|
tests:
|
||||||
|
- name: flags dense technical prose
|
||||||
|
input: |
|
||||||
|
Notwithstanding architectural encapsulation prerequisites, interdepartmental orchestration mechanisms necessitate comprehensive deterministic authentication verification across heterogeneous distributed administrative infrastructures.
|
||||||
|
want: |
|
||||||
|
1:1:Archie.Readability:Try to keep the Flesch-Kincaid grade level (42.40) at or below 11.
|
||||||
|
- name: accepts clear technical prose
|
||||||
|
input: |
|
||||||
|
A source receives events and checks their HMAC signature. A mapping extracts named fields from the payload. A binding selects the workflow to run.
|
||||||
|
want: ""
|
||||||
@@ -0,0 +1,17 @@
|
|||||||
|
# Flag overly long sentences in documentation. Set to 35 words so precise
|
||||||
|
# technical constraints fit comfortably while runaway sentences are caught.
|
||||||
|
extends: Std.Readability.SentenceLength
|
||||||
|
message: "This sentence has %d words. Consider splitting it for readability."
|
||||||
|
level: warning
|
||||||
|
max: 35
|
||||||
|
|
||||||
|
tests:
|
||||||
|
- name: flags long sentence
|
||||||
|
input: |
|
||||||
|
When the daemon starts a new workflow run for an incoming event that matched a signed binding, it loads the published workflow definition from storage, allocates an isolated container workspace, prepares task-scoped credentials, and dispatches the first step immediately without waiting.
|
||||||
|
want: |
|
||||||
|
1:1:Archie.SentenceLength:This sentence has 42 words. Consider splitting it for readability.
|
||||||
|
- name: accepts concise technical sentences
|
||||||
|
input: |
|
||||||
|
The daemon loads the published workflow definition and allocates an isolated container workspace. It prepares task-scoped credentials before dispatching the first step.
|
||||||
|
want: ""
|
||||||
@@ -0,0 +1,22 @@
|
|||||||
|
# Microsoft Writing Style Guide: "Don't include the type of UI element, such as
|
||||||
|
# button or checkbox, unless including it adds needed clarity."
|
||||||
|
extends: existence
|
||||||
|
message: "Omit the UI element type after a bold label ('%s') unless it adds clarity."
|
||||||
|
link: https://learn.microsoft.com/en-us/style-guide/procedures-instructions/describing-interactions-with-ui
|
||||||
|
level: warning
|
||||||
|
scope: raw
|
||||||
|
nonword: true
|
||||||
|
tokens:
|
||||||
|
- '\*\*[^*\n]{1,40}\*\*\s+(?:button|checkbox|check box|dropdown|drop-down|field|icon|link|menu|option|switch|tab|toggle)\b'
|
||||||
|
|
||||||
|
tests:
|
||||||
|
- name: flags bold label followed by UI element type
|
||||||
|
input: |
|
||||||
|
Select the **Save** button and leave the **Shared secret** field blank.
|
||||||
|
want: |
|
||||||
|
1:12:Archie.UIElementType:Omit the UI element type after a bold label ('**Save** button') unless it adds clarity.
|
||||||
|
1:42:Archie.UIElementType:Omit the UI element type after a bold label ('**Shared secret** field') unless it adds clarity.
|
||||||
|
- name: allows bold UI label without element type
|
||||||
|
input: |
|
||||||
|
Select **Save** and leave **Shared secret** blank.
|
||||||
|
want: ""
|
||||||
@@ -0,0 +1,46 @@
|
|||||||
|
# Input-neutral UI interaction verbs complementing Microsoft.UIVerbs.
|
||||||
|
# Based on Microsoft Writing Style Guide: Describing interactions with UI.
|
||||||
|
extends: substitution
|
||||||
|
message: "Use the input-neutral UI verb '%s' instead of '%s'."
|
||||||
|
link: https://learn.microsoft.com/en-us/style-guide/procedures-instructions/describing-interactions-with-ui
|
||||||
|
level: warning
|
||||||
|
ignorecase: true
|
||||||
|
action:
|
||||||
|
name: replace
|
||||||
|
swap:
|
||||||
|
deselect: clear
|
||||||
|
deselected: cleared
|
||||||
|
deselecting: clearing
|
||||||
|
deselects: clears
|
||||||
|
drag and drop: drag
|
||||||
|
drag-and-drop: drag
|
||||||
|
key in: enter
|
||||||
|
keyed in: entered
|
||||||
|
keying in: entering
|
||||||
|
mouse over: hover over
|
||||||
|
moused over: hovered over
|
||||||
|
mousing over: hovering over
|
||||||
|
navigate to: go to
|
||||||
|
navigated to: went to
|
||||||
|
navigating to: going to
|
||||||
|
press and hold: select and hold
|
||||||
|
tap and hold: select and hold
|
||||||
|
tap on: select
|
||||||
|
tapped on: selected
|
||||||
|
tapping on: selecting
|
||||||
|
uncheck: clear
|
||||||
|
unchecking: clearing
|
||||||
|
unchecks: clears
|
||||||
|
|
||||||
|
tests:
|
||||||
|
- name: flags input-specific UI verbs
|
||||||
|
input: |
|
||||||
|
Navigate to Settings, uncheck Auto-save, and mouse over the badge.
|
||||||
|
want: |
|
||||||
|
1:1:Archie.UIInteractions:Use the input-neutral UI verb 'go to' instead of 'Navigate to'.
|
||||||
|
1:23:Archie.UIInteractions:Use the input-neutral UI verb 'clear' instead of 'uncheck'.
|
||||||
|
1:46:Archie.UIInteractions:Use the input-neutral UI verb 'hover over' instead of 'mouse over'.
|
||||||
|
- name: accepts input-neutral UI verbs
|
||||||
|
input: |
|
||||||
|
Go to Settings, clear Auto-save, and hover over the badge.
|
||||||
|
want: ""
|
||||||
@@ -0,0 +1,26 @@
|
|||||||
|
# Microsoft Writing Style Guide:
|
||||||
|
# - Use bold formatting for UI element names, not quotation marks.
|
||||||
|
# - Omit trailing colons or ellipses from UI labels in instructions.
|
||||||
|
extends: existence
|
||||||
|
message: "Format UI labels in bold without quotes or trailing punctuation ('%s')."
|
||||||
|
link: https://learn.microsoft.com/en-us/style-guide/procedures-instructions/describing-interactions-with-ui
|
||||||
|
level: warning
|
||||||
|
scope: raw
|
||||||
|
ignorecase: true
|
||||||
|
nonword: true
|
||||||
|
tokens:
|
||||||
|
- '\b(?:select|choose|open|clear|go to|hover over)\s+"[^"\n]{1,40}"'
|
||||||
|
- '\b(?:select|choose|open|clear|go to|hover over)\s+\*\*[^*\n]{1,40}(?::|\.{3}|…)\*\*'
|
||||||
|
|
||||||
|
tests:
|
||||||
|
- name: flags quoted UI labels and trailing punctuation
|
||||||
|
input: |
|
||||||
|
Select "Save" or choose **Export...** and open **Settings:**.
|
||||||
|
want: |
|
||||||
|
1:1:Archie.UILabelFormat:Format UI labels in bold without quotes or trailing punctuation ('Select "Save"').
|
||||||
|
1:18:Archie.UILabelFormat:Format UI labels in bold without quotes or trailing punctuation ('choose **Export...**').
|
||||||
|
1:43:Archie.UILabelFormat:Format UI labels in bold without quotes or trailing punctuation ('open **Settings:**').
|
||||||
|
- name: accepts clean bold UI labels
|
||||||
|
input: |
|
||||||
|
Select **Save**, choose **Export**, and open **Settings**.
|
||||||
|
want: ""
|
||||||
@@ -0,0 +1,44 @@
|
|||||||
|
# Prefer concise wording over wordy phrases.
|
||||||
|
extends: substitution
|
||||||
|
message: "Use '%s' instead of '%s'."
|
||||||
|
level: warning
|
||||||
|
ignorecase: true
|
||||||
|
action:
|
||||||
|
name: replace
|
||||||
|
swap:
|
||||||
|
a large number of: many
|
||||||
|
a majority of: most
|
||||||
|
a sufficient number of: enough
|
||||||
|
as a means of: to
|
||||||
|
at this point in time: now
|
||||||
|
due to the fact that: because
|
||||||
|
for the purpose of: to
|
||||||
|
has the capability to: can
|
||||||
|
in close proximity to: near
|
||||||
|
in excess of: more than
|
||||||
|
in spite of the fact that: although
|
||||||
|
in the event that: if
|
||||||
|
in the near future: soon
|
||||||
|
make use of: use
|
||||||
|
on a daily basis: daily
|
||||||
|
on a monthly basis: monthly
|
||||||
|
on a weekly basis: weekly
|
||||||
|
prior to: before
|
||||||
|
subsequent to: after
|
||||||
|
take advantage of: use
|
||||||
|
until such time as: until
|
||||||
|
whether or not: whether
|
||||||
|
with regard to: about
|
||||||
|
with respect to: about
|
||||||
|
|
||||||
|
tests:
|
||||||
|
- name: flags wordy phrases
|
||||||
|
input: |
|
||||||
|
Check the signature prior to parsing due to the fact that payloads are untrusted.
|
||||||
|
want: |
|
||||||
|
1:21:Archie.Wordiness:Use 'before' instead of 'prior to'.
|
||||||
|
1:38:Archie.Wordiness:Use 'because' instead of 'due to the fact that'.
|
||||||
|
- name: accepts concise wording
|
||||||
|
input: |
|
||||||
|
Check the signature before parsing because payloads are untrusted.
|
||||||
|
want: ""
|
||||||
@@ -0,0 +1,32 @@
|
|||||||
|
# Case-insensitive common terms (matched in any capitalisation)
|
||||||
|
(?i)approvers?
|
||||||
|
(?i)archipelago
|
||||||
|
(?i)canonicalis(?:e[ds]?|ing)
|
||||||
|
(?i)carina
|
||||||
|
(?i)confirmers?
|
||||||
|
(?i)fulfilment
|
||||||
|
(?i)glassmorphism
|
||||||
|
(?i)passkeys?
|
||||||
|
(?i)reapprovals?
|
||||||
|
(?i)redemptions?
|
||||||
|
(?i)retags?
|
||||||
|
(?i)undispatched
|
||||||
|
(?i)unpushed
|
||||||
|
(?i)wordmarks?
|
||||||
|
(?i)worktrees?
|
||||||
|
|
||||||
|
# Proper nouns, tools, and exact-case technical terms
|
||||||
|
archied
|
||||||
|
Catlow
|
||||||
|
depguard
|
||||||
|
gosec
|
||||||
|
govulncheck
|
||||||
|
hclog
|
||||||
|
Huma
|
||||||
|
Miessler
|
||||||
|
Pdeathsig
|
||||||
|
prbench
|
||||||
|
Reka
|
||||||
|
releaseupdate
|
||||||
|
secretengine
|
||||||
|
sqlc
|
||||||
-2606
File diff suppressed because it is too large.
Load diff
@@ -5,16 +5,65 @@ here changes a decision. If a rule stops changing decisions, delete it.
|
|||||||
|
|
||||||
## What this is
|
## What this is
|
||||||
|
|
||||||
**archie-core** is event-driven agentic automation. An event (an issue, PR,
|
**archie-core** is event-driven agentic automation. It matches an event (an
|
||||||
webhook, schedule, chat message) is matched to a workflow, the workflow runs an
|
alert, a webhook, a schedule, a chat message, an issue) to a workflow. The
|
||||||
agent or tool in an isolated container, and the result lands somewhere for
|
workflow runs an agent, and archie-core judges every action before it runs. The
|
||||||
review or action. A repository is an optional input to a workflow, not the point
|
result lands somewhere for review or action. A repository is an optional input
|
||||||
of the product.
|
to a workflow, not the point of the product. A forge is one of many inputs or
|
||||||
|
outputs; core code never assumes one.
|
||||||
|
|
||||||
<temporary - this statement must be removed on 2026-10-10"> The product is
|
## Layout
|
||||||
unfinished. Many features are half-built, and the codebase carries far more
|
|
||||||
code, binaries, docs and tooling than it delivers. The job right now is to
|
Main is becoming one binary, `archie`. The design is ARCHITECTURE.md in the
|
||||||
finish features and shrink the codebase, not to extend it. </temporary>
|
private sam/archie-product repo, and the work is epic #1977. New work goes
|
||||||
|
there:
|
||||||
|
|
||||||
|
- `cmd/archie` parses flags and calls `internal/app/archie`, the composition
|
||||||
|
root.
|
||||||
|
- Each module is `modules/<name>/`: an API package and an `internal/` directory
|
||||||
|
nothing outside the module can import. Modules reach each other only through
|
||||||
|
API packages, own their schema and tables, and keep no state only in memory.
|
||||||
|
- `internal/platform/` holds the few leaf packages every module may use.
|
||||||
|
- The new code never imports the old services' packages (depguard enforces it).
|
||||||
|
Old code moves: `git mv` it into the module that owns it, then adapt it.
|
||||||
|
While an old service still imports it, copy it instead, name the source
|
||||||
|
path in the commit, and delete the old copy with its service.
|
||||||
|
MIGRATION.md in sam/archie-product gives every old package a destination and
|
||||||
|
a verdict. Writing a replacement from scratch, or deleting an old package,
|
||||||
|
needs the maintainer's verdict on its row. Before building anything an old
|
||||||
|
package already does, read that package and carry its behaviour.
|
||||||
|
|
||||||
|
### The services the binary replaces
|
||||||
|
|
||||||
|
Delete the six services below slice by slice as the binary replaces them,
|
||||||
|
each only once MIGRATION.md has a verdict for every package it holds. Don't
|
||||||
|
add features to them; fix them only when a bug blocks work.
|
||||||
|
|
||||||
|
Each service is a gRPC contract in `proto/<service>/v1`, generated into
|
||||||
|
`internal/contracts/<service>/v1`, and one binary in `cmd/` that parses flags
|
||||||
|
and calls its composition root in `internal/app/<service>`.
|
||||||
|
|
||||||
|
| Binary | Serves | Dials |
|
||||||
|
| --- | --- | --- |
|
||||||
|
| `archie-state-store` | State Store and Control Plane contracts; owns the task and control-plane tables | PostgreSQL |
|
||||||
|
| `archie-gateway` | Chat contract; owns the conversation tables | State Store, PostgreSQL |
|
||||||
|
| `archied` | Daemon contract; scheduling, workflow runs, task containers | State Store, Gateway, Messaging, NATS |
|
||||||
|
| `archie-messaging` | Messaging contract; external channel frontends | State Store, Gateway |
|
||||||
|
| `archie-ui` | Dashboard HTTP API (`internal/webui`) and the embedded SPA | State Store, Gateway, Daemon, Messaging |
|
||||||
|
| `archie-agent` | The worker inside each task container | NATS |
|
||||||
|
|
||||||
|
Forge, channel and secret-engine contracts are extension boundaries, not
|
||||||
|
services: a core binary starts the extension as a plugin process and dials it.
|
||||||
|
`archied` also runs the State Store's backup and restore during a host update.
|
||||||
|
|
||||||
|
`internal/domain` holds behaviour and interfaces; `internal/infrastructure`
|
||||||
|
implements them. Every instruction sent to a model is a file in
|
||||||
|
`internal/platform/prompts`, read through that package; never inline a prompt in
|
||||||
|
code. The old `internal/prompts` serves the services until they go.
|
||||||
|
The dashboard is its own repository, archie-frontend, and ships as its own
|
||||||
|
image; it reaches this backend only through `/api`, `/oauth2` and `/hooks`.
|
||||||
|
Workflow YAML and its step vocabulary
|
||||||
|
are in `WORKFLOWS.md`; the server catalogue is authoritative.
|
||||||
|
|
||||||
## Authority
|
## Authority
|
||||||
|
|
||||||
@@ -23,37 +72,57 @@ When sources disagree, the higher one wins:
|
|||||||
1. The maintainer's instruction in this session.
|
1. The maintainer's instruction in this session.
|
||||||
2. This file.
|
2. This file.
|
||||||
3. The code as it is in the tree.
|
3. The code as it is in the tree.
|
||||||
4. Beads issues (`bd show <id>`): the plan for a piece of work.
|
4. GitHub issues (`gh issue view <n>`): the plan for a piece of work.
|
||||||
5. Everything else (memories, comments, old docs) is a hint. Verify it against
|
5. Everything else (memories, comments, old docs) is a hint. Verify it against
|
||||||
the code before acting on it.
|
the code before acting on it.
|
||||||
|
|
||||||
|
## Working with the maintainer
|
||||||
|
|
||||||
|
- **A clear direction is the go-ahead.** Do it in the same turn. Do not restate
|
||||||
|
the plan, offer options, or ask "shall I proceed?". Stop only for destructive
|
||||||
|
or outward-facing actions (deleting data, pushing, touching a live host).
|
||||||
|
- **Push back when it matters.** If a request competes with something clearly
|
||||||
|
more urgent, or looks like the wrong call, say so once in a sentence or two.
|
||||||
|
A bug that loses work, a failure that shows nothing, a security gap and a
|
||||||
|
broken setup path are all more urgent. Suggest whether it belongs in the
|
||||||
|
backlog. Then do what the maintainer asked: don't repeat the point or hold
|
||||||
|
work back on your own judgement.
|
||||||
|
- **Post outside the repo only when told.** Chat, tickets and any external
|
||||||
|
service get a message only on the maintainer's instruction.
|
||||||
|
- **Report, don't narrate.** Final replies say what changed, what you verified,
|
||||||
|
and anything blocked, in a few lines. No preamble, no recap of the request, no
|
||||||
|
closing offers of more help. Leave out what the maintainer can see or infer:
|
||||||
|
a clean tree, unpushed commits, a passing gate (commits imply it), and steps
|
||||||
|
skipped that the task never asked for. Name a skipped step only when the
|
||||||
|
task required it.
|
||||||
|
|
||||||
## How to decide
|
## How to decide
|
||||||
|
|
||||||
- **Broken beats new.** A bug that blocks work gets fixed now, with the smallest
|
- **Broken comes first.** A bug that blocks or loses work goes ahead of new
|
||||||
change that unblocks it. No design docs and no new mechanism.
|
features. Fix the cause. When that's a bigger job, unblock with a small change
|
||||||
- **Cheapest option first.** Before building, name the smallest change that
|
first and file the proper fix rather than stopping there.
|
||||||
solves the problem, including changing configuration or deleting something. If
|
- **Cheapest option first.** Before building, consider the smallest change that
|
||||||
your plan adds a new mechanism (RPC, process, binary, abstraction, config
|
solves the problem, including changing configuration or deleting something.
|
||||||
field, tool) or grows past about 100 lines, stop and assess whether you're
|
A new mechanism (RPC, process, binary, abstraction, config field, tool) is
|
||||||
taking the path of least resistance.
|
fine when it's the right design; say why the smaller option wasn't enough.
|
||||||
- **Delete before adding.** Unused code, dead paths, fallbacks nobody takes and
|
- **Delete before adding.** Unused code, dead paths, fallbacks nobody takes and
|
||||||
features nobody runs get removed, not maintained. Solo project, single user:
|
features nobody runs get removed, not maintained. Solo project, single user:
|
||||||
breaking changes need no compatibility shims.
|
breaking changes need no compatibility shims.
|
||||||
- **Finish before starting.** Prefer completing a half-built feature end to end
|
- **Finish before starting.** Prefer completing a half-built feature end to end
|
||||||
over starting a new one.
|
over starting a new one.
|
||||||
- **Services own contracts.** A service is a gRPC contract in
|
- **Modules own their API and tables.** A module reaches another only through
|
||||||
`proto/<service>/v1` and one binary that serves it. Services reach each other
|
its API package, never its tables or `internal/`. The only real process
|
||||||
only through those contracts, never through another service's tables or
|
boundaries are extensions and the runner. A new command is a subcommand of
|
||||||
packages. A new command is a subcommand of an existing binary. A new binary
|
`archie`.
|
||||||
exists only for a new service or a real process boundary.
|
|
||||||
- **No compensating tools.** Do not write a linter, checker or generator to
|
- **No compensating tools.** Do not write a linter, checker or generator to
|
||||||
enforce something a simpler design would make unnecessary. Fix the design.
|
enforce something a simpler design would make unnecessary. Fix the design.
|
||||||
- **A setting must work end to end.** A config field that parses but has no
|
- **A setting must work end to end.** A config field that parses but has no
|
||||||
consumer is a bug. Settings are edited through the control plane (API and
|
consumer is a bug. Operators edit settings through the control plane (API and
|
||||||
dashboard), never by requiring a server login.
|
dashboard), never through a server login.
|
||||||
- **Ask only for real decisions.** Product direction and trade-offs the
|
- **Ask only for real decisions.** Product direction and trade-offs the
|
||||||
maintainer owns are questions. Everything with a conventional answer is not:
|
maintainer owns are questions. Anything with a conventional engineering
|
||||||
decide, do it, say what you chose.
|
answer or an existing pattern in the codebase is not: decide, do it, say
|
||||||
|
what you chose.
|
||||||
|
|
||||||
## Code
|
## Code
|
||||||
|
|
||||||
@@ -63,12 +132,24 @@ When sources disagree, the higher one wins:
|
|||||||
- Dependencies point inward: `cmd → app → {domain, infrastructure}`,
|
- Dependencies point inward: `cmd → app → {domain, infrastructure}`,
|
||||||
`infrastructure` implements `domain` interfaces, `domain` imports neither.
|
`infrastructure` implements `domain` interfaces, `domain` imports neither.
|
||||||
`cmd/` parses flags and calls `app`, nothing else.
|
`cmd/` parses flags and calls `app`, nothing else.
|
||||||
- Fix invalid state where it is produced, not with checks where it is consumed.
|
- Fix invalid state where the code produces it, not with checks where the
|
||||||
|
code consumes it.
|
||||||
|
- Log through the service's injected `*slog.Logger` with the `...Context`
|
||||||
|
methods, so lines carry the OpenTelemetry trace id. Never the global `slog`.
|
||||||
- If a fix fails twice, throw the block away and rewrite it simply.
|
- If a fix fails twice, throw the block away and rewrite it simply.
|
||||||
- Comments say why, briefly. No migration history, phase names or issue
|
- Comments explain why, not what the code already says. No migration
|
||||||
narration in code.
|
history, phase names or issue narration in code.
|
||||||
- Generated files (`ui/dist/`, protobuf, sqlc) are regenerated and committed
|
- Write natural, idiomatic technical English in comments, errors, logs,
|
||||||
with the change that caused them, never hand-edited.
|
test names, descriptions, prompts and user-facing text. Use conventional
|
||||||
|
terminology and normal word order. Avoid invented metaphors, awkward
|
||||||
|
possessives, inverted sentences and clever paraphrases. Prefer repeating
|
||||||
|
an established term over inventing a synonym.
|
||||||
|
- Regenerate generated files (protobuf, sqlc) and commit them with the change
|
||||||
|
that caused them; never hand-edit them.
|
||||||
|
- Foreign keys and attribution always reference immutable primary IDs, never
|
||||||
|
mutable or non-unique attributes (display names, slugs, emails). Store
|
||||||
|
display labels alongside an ID only when you need point-in-time snapshot
|
||||||
|
fidelity.
|
||||||
|
|
||||||
## Tests
|
## Tests
|
||||||
|
|
||||||
@@ -83,38 +164,65 @@ The default for a change is no new test. Write one only when:
|
|||||||
|
|
||||||
A test that exists must catch a real regression, survive refactoring, run fast,
|
A test that exists must catch a real regression, survive refactoring, run fast,
|
||||||
and be cheap to keep. Never test wiring, constants, defaults, struct shapes,
|
and be cheap to keep. Never test wiring, constants, defaults, struct shapes,
|
||||||
fakes, or call order. One table-driven test per behaviour; extend the table
|
fakes, or call order. Prefer making an invalid state unrepresentable to testing
|
||||||
instead of adding a second test. Prefer making an invalid state unrepresentable
|
that the code rejects it.
|
||||||
to testing that it is rejected. Test helpers live in `_test.go` files only.
|
|
||||||
|
How to write one:
|
||||||
|
|
||||||
|
- **Prove it.** Run the new test against the code before the fix and see it
|
||||||
|
fail. A test that passes either way proves nothing: delete it. When you
|
||||||
|
can't reproduce a bug deterministically (a race, say), fix it with an API
|
||||||
|
that rules it out and don't add a test.
|
||||||
|
- **One table per behaviour.** Extend the table instead of adding a second test.
|
||||||
|
Name the test after the behaviour, and say in its comment what regression it
|
||||||
|
guards.
|
||||||
|
- **Same gate as production.** Tests pass golangci-lint, gosec included, with no
|
||||||
|
exclusions for test files. Fix what the linter finds. A fixture that has to
|
||||||
|
look like a secret (a key the redaction must catch, a URL with a password the
|
||||||
|
parser must reject) uses a plainly fake value and a `//nolint:gosec` saying
|
||||||
|
what it tests.
|
||||||
|
- **Isolated.** Use `t.TempDir()` and `t.Setenv`, never host state. A test that
|
||||||
|
commits with git sets `GIT_CONFIG_GLOBAL` to `os.DevNull`. No test opens a
|
||||||
|
real database or needs Docker: test SQL semantics at the interceptor or domain
|
||||||
|
level with fakes. Tests write files `0o600`, or `0o700` for a script.
|
||||||
|
- **Shared setup in helpers.** When several tests repeat the same setup, put it
|
||||||
|
in a helper in a `_test.go` file, never in production code.
|
||||||
|
|
||||||
## Invariants
|
## Invariants
|
||||||
|
|
||||||
These protect users. Do not weaken them without the maintainer's say-so.
|
These protect users. Do not weaken them without the maintainer's say-so.
|
||||||
|
|
||||||
- Failure stays local. Any service may crash, restart or be absent without
|
- A crash loses no accepted work, and a restart resumes every run. The service
|
||||||
losing accepted work or taking another service down. Callers retry, degrade
|
that accepts the work acknowledges it only once it is durable. A service
|
||||||
and report the dependency as unhealthy; they never exit because a peer is
|
reports a missing dependency as unhealthy and retries it; that is never a
|
||||||
missing, and work is acknowledged only once it is durable.
|
reason to exit.
|
||||||
- The model never runs git. Commits and pushes go through the daemon.
|
- The model never runs git. Commits and pushes go through the daemon.
|
||||||
- The daemon's own credentials never enter an agent container. Containers get
|
- The daemon's own credentials never enter an agent container. Containers get
|
||||||
task-scoped grants that are revoked when the task ends.
|
task-scoped grants that the daemon revokes when the task ends.
|
||||||
- Webhook HMAC is verified before the payload is parsed.
|
- The events module verifies webhook HMAC before it parses the payload.
|
||||||
- Task briefs go in `<worktree>/.git/task.json`, never the worktree root.
|
- Task briefs go in `<worktree>/.git/task.json`, never the worktree root.
|
||||||
- NATS: task and RPC replies use `msg.Respond`; flush after registering a
|
- NATS: task and RPC replies use `msg.Respond`; flush after registering a
|
||||||
responder; `ARCHIE_TASKS` is a work queue, so never bind overlapping
|
responder; `ARCHIE_TASKS` is a work queue, so never bind overlapping
|
||||||
consumers.
|
consumers.
|
||||||
- `ai-sdk` `FullStream` must be drained completely.
|
- Drain `ai-sdk` `FullStream` completely.
|
||||||
|
|
||||||
## Build and gate
|
## Build and gate
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
task build # binaries into bin/
|
task build # binaries into bin/
|
||||||
task test # go test -short ./...
|
task test # go test -short ./...
|
||||||
task ui # dashboard into ui/dist
|
|
||||||
task check # the gate
|
task check # the gate
|
||||||
|
|
||||||
|
go test -short ./internal/domain/workflow -run TestName # one test
|
||||||
|
task dev # archie with live reload on 127.0.0.1:8484
|
||||||
```
|
```
|
||||||
|
|
||||||
Requires Go 1.27, Task, golangci-lint, Node/npm and Docker. Adopt `task fmt` and
|
`task proto:generate`, `task db:generate` and `task openapi:generate` write
|
||||||
|
the committed generated output for `proto/`, `internal/infrastructure/postgres/`
|
||||||
|
and `api/openapi.yaml`; `task check` runs their check variants and rejects stale
|
||||||
|
output.
|
||||||
|
|
||||||
|
Requires Go 1.27, Task, golangci-lint and Docker. Adopt `task fmt` and
|
||||||
`go fix` output as-is.
|
`go fix` output as-is.
|
||||||
|
|
||||||
- `task check` gates the commit: `task check && git commit ...`. Never claim a
|
- `task check` gates the commit: `task check && git commit ...`. Never claim a
|
||||||
@@ -122,31 +230,40 @@ Requires Go 1.27, Task, golangci-lint, Node/npm and Docker. Adopt `task fmt` and
|
|||||||
run, say what you did verify.
|
run, say what you did verify.
|
||||||
- Commit finished work without asking. Stage only your own paths and commit in
|
- Commit finished work without asking. Stage only your own paths and commit in
|
||||||
the same command. Conventional Commits scoped by package, short messages. Push
|
the same command. Conventional Commits scoped by package, short messages. Push
|
||||||
only when told.
|
every commit as soon as you make it; a local-only commit is not acceptable.
|
||||||
- Never commit binaries, build output, scratch files or `.references/`. Scratch
|
- Never commit binaries, build output, scratch files or `.references/`. Scratch
|
||||||
goes in `/tmp`.
|
goes in `/tmp`.
|
||||||
- Runtime config lives at `${XDG_CONFIG_HOME:-~/.config}/archie/config.toml`.
|
- Runtime config lives at `${XDG_CONFIG_HOME:-~/.config}/archie/config.toml`.
|
||||||
Nothing in the working tree is read at runtime. Systemd is optional.
|
The runtime reads nothing in the working tree. Systemd is optional.
|
||||||
- Releases: `RELEASING.md`.
|
- Releases: `RELEASING.md`.
|
||||||
|
|
||||||
## Issues (beads)
|
## Issues
|
||||||
|
|
||||||
Work is tracked in `bd`, never in Markdown TODO files.
|
Track work as issues on `archie-platform/archie-core`, never in Markdown TODO
|
||||||
|
files. Dashboard work goes on `archie-platform/archie-frontend`.
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
bd ready | bd show <id> | bd update <id> --claim | bd close <id>
|
gh issue list --label critical
|
||||||
|
gh issue view 497
|
||||||
|
gh issue edit 497 --add-label in-progress --add-assignee @me
|
||||||
|
gh issue comment 497 --body "what changed, and what was run"
|
||||||
|
gh issue close 497
|
||||||
```
|
```
|
||||||
|
|
||||||
- An issue is the plan: what is wrong or wanted, and how you know it is done.
|
- An issue is the plan: what is wrong or wanted, and how you know the work is
|
||||||
Keep it to that.
|
complete. Keep it to that.
|
||||||
- Bead state syncs through Dolt (`bd dolt push/pull`, only when told), not git.
|
- Labels carry state: a type (`bug`, `feature`, `task`, `chore`, `epic`,
|
||||||
Never commit `.beads/` exports.
|
`decision`, `discovery`), a priority (`critical`, `high`, `medium`, `low`), `in-progress`
|
||||||
- No host names, IPs, paths, PIDs or credentials in any bead: they are
|
and `deferred`. Open/closed is the issue state, not a label.
|
||||||
published.
|
- An epic's children are its sub-issues: add each one as you file it. No
|
||||||
- File follow-up work you find as a bead. Do not fix it in passing.
|
`epic/<slug>` label.
|
||||||
|
- Cite the issue number in commits and comments.
|
||||||
|
- The repository is public: no host names, IPs, paths, PIDs or credentials in
|
||||||
|
an issue, a commit or the code.
|
||||||
|
- File follow-up work you find as an issue. Do not fix it in passing.
|
||||||
|
|
||||||
## Changing this file
|
## Changing this file
|
||||||
|
|
||||||
A rule is added only after a real failure it would have prevented, and it must
|
Add a rule only after a real failure it would have prevented, and it must
|
||||||
say which decision it changes. Remove rules that no longer change decisions.
|
say which decision it changes. Remove rules that no longer change decisions.
|
||||||
Keep it short enough to read in full every session.
|
Keep it short enough to read in full every session.
|
||||||
@@ -0,0 +1,411 @@
|
|||||||
|
---
|
||||||
|
name: Archie
|
||||||
|
description: Event-driven Agentic Automation
|
||||||
|
colors:
|
||||||
|
signal-sage: "#51a580"
|
||||||
|
signal-sage-deep: "#2e795a"
|
||||||
|
signal-sage-ink: "#0c6f4d"
|
||||||
|
graphite-canvas: "#0e0f10"
|
||||||
|
graphite-workspace: "#16171a"
|
||||||
|
graphite-card: "#1c1d21"
|
||||||
|
graphite-popover: "#202226"
|
||||||
|
graphite-hover: "#26282c"
|
||||||
|
graphite-hairline: "#2a2c30"
|
||||||
|
graphite-border: "#313338"
|
||||||
|
graphite-border-strong: "#3c3f45"
|
||||||
|
graphite-input: "#70727a"
|
||||||
|
graphite-text: "#e8e6e1"
|
||||||
|
graphite-text-muted: "#a6a39b"
|
||||||
|
graphite-text-subtle: "#99968f"
|
||||||
|
paper-canvas: "#e9eaec"
|
||||||
|
paper-workspace: "#f3f4f5"
|
||||||
|
paper-card: "#ffffff"
|
||||||
|
paper-hover: "#e7e9ec"
|
||||||
|
paper-hairline: "#d2d5da"
|
||||||
|
paper-border: "#d5d8dc"
|
||||||
|
paper-border-strong: "#bec3c9"
|
||||||
|
paper-input: "#838890"
|
||||||
|
paper-text: "#202327"
|
||||||
|
paper-text-muted: "#585d64"
|
||||||
|
paper-text-subtle: "#656a72"
|
||||||
|
amber-warn: "#d9a45b"
|
||||||
|
amber-warn-ink: "#8a5a12"
|
||||||
|
clay-danger: "#d9776b"
|
||||||
|
clay-danger-ink: "#b3413a"
|
||||||
|
slate-info: "#8aa4c2"
|
||||||
|
slate-info-ink: "#3d5f86"
|
||||||
|
stone-idle: "#9a978f"
|
||||||
|
stone-idle-ink: "#5b6068"
|
||||||
|
typography:
|
||||||
|
title:
|
||||||
|
fontFamily: "IBM Plex Sans Variable, system-ui, sans-serif"
|
||||||
|
fontSize: "0.9375rem"
|
||||||
|
fontWeight: 500
|
||||||
|
lineHeight: 1.375
|
||||||
|
page-title:
|
||||||
|
fontFamily: "IBM Plex Sans Variable, system-ui, sans-serif"
|
||||||
|
fontSize: "0.9375rem"
|
||||||
|
fontWeight: 600
|
||||||
|
lineHeight: 1.25
|
||||||
|
letterSpacing: "-0.025em"
|
||||||
|
label:
|
||||||
|
fontFamily: "IBM Plex Sans Variable, system-ui, sans-serif"
|
||||||
|
fontSize: "0.8125rem"
|
||||||
|
fontWeight: 400
|
||||||
|
caption:
|
||||||
|
fontFamily: "IBM Plex Sans Variable, system-ui, sans-serif"
|
||||||
|
fontSize: "0.6875rem"
|
||||||
|
fontWeight: 500
|
||||||
|
section-label:
|
||||||
|
fontFamily: "IBM Plex Sans Variable, system-ui, sans-serif"
|
||||||
|
fontSize: "0.6875rem"
|
||||||
|
fontWeight: 500
|
||||||
|
letterSpacing: "0.06em"
|
||||||
|
micro:
|
||||||
|
fontFamily: "IBM Plex Sans Variable, system-ui, sans-serif"
|
||||||
|
fontSize: "0.625rem"
|
||||||
|
mono:
|
||||||
|
fontFamily: "IBM Plex Mono, ui-monospace, monospace"
|
||||||
|
fontSize: "0.6875rem"
|
||||||
|
fontWeight: 400
|
||||||
|
rounded:
|
||||||
|
sm: "4px"
|
||||||
|
md: "6px"
|
||||||
|
lg: "8px"
|
||||||
|
xl: "12px"
|
||||||
|
full: "9999px"
|
||||||
|
spacing:
|
||||||
|
unit: "0.25rem"
|
||||||
|
unit-compact: "0.225rem"
|
||||||
|
control-gap: "0.375rem"
|
||||||
|
card-x: "1rem"
|
||||||
|
card-y: "1rem"
|
||||||
|
page-x: "1.5rem"
|
||||||
|
page-y: "1.25rem"
|
||||||
|
components:
|
||||||
|
button-primary:
|
||||||
|
backgroundColor: "{colors.signal-sage-deep}"
|
||||||
|
textColor: "#ffffff"
|
||||||
|
typography: "{typography.label}"
|
||||||
|
rounded: "{rounded.lg}"
|
||||||
|
padding: "0 10px"
|
||||||
|
height: "36px"
|
||||||
|
button-ghost:
|
||||||
|
backgroundColor: "transparent"
|
||||||
|
textColor: "{colors.graphite-text}"
|
||||||
|
typography: "{typography.label}"
|
||||||
|
rounded: "{rounded.lg}"
|
||||||
|
padding: "0 10px"
|
||||||
|
height: "36px"
|
||||||
|
button-ghost-hover:
|
||||||
|
backgroundColor: "{colors.graphite-hover}"
|
||||||
|
button-attention:
|
||||||
|
backgroundColor: "rgba(217, 164, 91, 0.08)"
|
||||||
|
textColor: "{colors.amber-warn}"
|
||||||
|
typography: "{typography.label}"
|
||||||
|
rounded: "{rounded.lg}"
|
||||||
|
padding: "0 10px"
|
||||||
|
height: "36px"
|
||||||
|
button-destructive:
|
||||||
|
backgroundColor: "rgba(217, 119, 107, 0.2)"
|
||||||
|
textColor: "{colors.clay-danger}"
|
||||||
|
typography: "{typography.label}"
|
||||||
|
rounded: "{rounded.lg}"
|
||||||
|
padding: "0 10px"
|
||||||
|
height: "36px"
|
||||||
|
input:
|
||||||
|
backgroundColor: "{colors.graphite-card}"
|
||||||
|
textColor: "{colors.graphite-text}"
|
||||||
|
typography: "{typography.label}"
|
||||||
|
rounded: "{rounded.lg}"
|
||||||
|
padding: "4px 10px"
|
||||||
|
height: "36px"
|
||||||
|
card:
|
||||||
|
backgroundColor: "{colors.graphite-card}"
|
||||||
|
textColor: "{colors.graphite-text}"
|
||||||
|
rounded: "{rounded.xl}"
|
||||||
|
padding: "16px"
|
||||||
|
badge-ok:
|
||||||
|
backgroundColor: "rgba(81, 165, 128, 0.12)"
|
||||||
|
textColor: "{colors.signal-sage}"
|
||||||
|
typography: "{typography.caption}"
|
||||||
|
rounded: "{rounded.sm}"
|
||||||
|
padding: "2px 8px"
|
||||||
|
height: "20px"
|
||||||
|
badge-warn:
|
||||||
|
backgroundColor: "rgba(217, 164, 91, 0.08)"
|
||||||
|
textColor: "{colors.amber-warn}"
|
||||||
|
typography: "{typography.caption}"
|
||||||
|
rounded: "{rounded.sm}"
|
||||||
|
padding: "2px 8px"
|
||||||
|
height: "20px"
|
||||||
|
badge-danger:
|
||||||
|
backgroundColor: "rgba(217, 119, 107, 0.08)"
|
||||||
|
textColor: "{colors.clay-danger}"
|
||||||
|
typography: "{typography.caption}"
|
||||||
|
rounded: "{rounded.sm}"
|
||||||
|
padding: "2px 8px"
|
||||||
|
height: "20px"
|
||||||
|
status-dot:
|
||||||
|
rounded: "{rounded.full}"
|
||||||
|
size: "6px"
|
||||||
|
top-bar:
|
||||||
|
backgroundColor: "{colors.graphite-card}"
|
||||||
|
height: "56px"
|
||||||
|
padding: "0 16px"
|
||||||
|
step-node:
|
||||||
|
backgroundColor: "{colors.graphite-card}"
|
||||||
|
rounded: "{rounded.lg}"
|
||||||
|
padding: "10px 12px"
|
||||||
|
width: "240px"
|
||||||
|
step-node-expanded:
|
||||||
|
width: "416px"
|
||||||
|
---
|
||||||
|
|
||||||
|
# Design System: Archie
|
||||||
|
|
||||||
|
## Overview
|
||||||
|
|
||||||
|
**Creative North Star: "The Operations Console"**
|
||||||
|
|
||||||
|
Archie's dashboard is a calm instrument panel for someone responsible for a live
|
||||||
|
estate. It is dense and legible, and it stays quiet until something needs the
|
||||||
|
operator. The mood is calm, precise and trustworthy: restraint is how the
|
||||||
|
interface shows it is in control, and nothing raises its voice unless state
|
||||||
|
demands it.
|
||||||
|
|
||||||
|
Graphite dark and Neutral light share one accent, Signal Sage. Neutral surfaces,
|
||||||
|
hairlines and type weight set the hierarchy. Solid sage marks the primary action;
|
||||||
|
a sage line or outline marks selection and focus. Labelled badges carry status.
|
||||||
|
Both themes use the same tokens, and the operator's OS chooses the theme unless
|
||||||
|
they pick one.
|
||||||
|
|
||||||
|
Density is a first-class setting. The default is already compact, and compact mode
|
||||||
|
tightens the whole spacing scale without shrinking text or hit targets. Controls
|
||||||
|
are compact and contextual: they appear where the work is, on hover or focus,
|
||||||
|
rather than as permanent chrome. The interface never looks like a toy and never
|
||||||
|
borrows generic SaaS gloss.
|
||||||
|
|
||||||
|
**Key Characteristics:**
|
||||||
|
- Neutral light and Graphite dark, with one sage accent.
|
||||||
|
- IBM Plex Sans with Plex Mono for IDs, durations and payloads, on a compact type
|
||||||
|
scale (11 to 15px).
|
||||||
|
- Flat tonal layers; shadows only for things that float.
|
||||||
|
- Compact density by default, with a tighter compact mode.
|
||||||
|
- Both themes, reduced motion and keyboard focus are invariants, not options.
|
||||||
|
|
||||||
|
## Colours
|
||||||
|
|
||||||
|
Neutral greys carry the structure. Signal Sage marks actions and selection;
|
||||||
|
status colours retain their meaning across both themes.
|
||||||
|
|
||||||
|
### Primary
|
||||||
|
- **Signal Sage** (#51a580): the mark, accents, focus rings and links in dark mode,
|
||||||
|
and the `ok` state there. On a dark card it is 5.7:1 as text.
|
||||||
|
- **Signal Sage Deep** (#2e795a): the primary button fill in both themes (white on
|
||||||
|
it is 5.3:1) and the focus ring on paper, where bright sage falls under 3:1.
|
||||||
|
- **Signal Sage Ink** (#0c6f4d): links and `ok` text in the light theme, 5.0:1 on
|
||||||
|
the paper canvas.
|
||||||
|
|
||||||
|
### Neutral
|
||||||
|
- **Graphite Canvas** (#0e0f10) / **Paper Canvas** (#e9eaec): the page behind
|
||||||
|
everything.
|
||||||
|
- **Graphite Workspace** (#16171a) / **Paper Workspace** (#f3f4f5): the main
|
||||||
|
content area inside the sidebar shell.
|
||||||
|
- **Graphite Card** (#1c1d21) / **Paper Card** (#ffffff): cards, the top bar,
|
||||||
|
inputs and canvas nodes. **Graphite Popover** (#202226) lifts menus one step
|
||||||
|
above cards in dark mode.
|
||||||
|
- **Graphite Hover** (#26282c) / **Paper Hover** (#e7e9ec): hover, secondary and
|
||||||
|
muted surfaces (shadcn's `accent`, `muted` and `secondary` all share it).
|
||||||
|
- **Hairline, Border, Border Strong** (#2a2c30, #313338, #3c3f45 dark; #d2d5da,
|
||||||
|
#d5d8dc, #bec3c9 light): dividers, card edges and the top bar's bottom edge.
|
||||||
|
- **Input stroke** (#70727a dark, #838890 light): field borders.
|
||||||
|
- **Text, Text Muted, Text Subtle** (#e8e6e1, #a6a39b, #99968f dark; #202327,
|
||||||
|
#585d64, #656a72 light): primary copy, secondary copy, and the dimmest text
|
||||||
|
allowed, for hints and captions only.
|
||||||
|
|
||||||
|
### Status
|
||||||
|
- **Amber Warn** (#d9a45b dark, #8a5a12 light): waiting, needs attention, the
|
||||||
|
`attention` button.
|
||||||
|
- **Clay Danger** (#d9776b dark, #b3413a light): failures and destructive
|
||||||
|
actions.
|
||||||
|
- **Slate Info** (#8aa4c2 dark, #3d5f86 light): an agent that is working.
|
||||||
|
- **Stone Idle** (#9a978f dark, #5b6068 light): idle, inactive or unknown.
|
||||||
|
|
||||||
|
Each status hue has a soft background at 8 to 12% alpha of its own tone. Status
|
||||||
|
badges put the solid tone on the soft background, never white text on a fill.
|
||||||
|
|
||||||
|
### Named Rules
|
||||||
|
**The Semantic Names Rule.** Components reference `--primary`, `--ok`, `--warn`
|
||||||
|
and the rest, never a raw hex or a hue name such as `--violet`. A palette change is
|
||||||
|
one file.
|
||||||
|
|
||||||
|
**The One Meaning Rule.** A status colour means the same thing wherever it
|
||||||
|
appears: a task state, a gate result, a log level and a trend all draw from the
|
||||||
|
same five tones.
|
||||||
|
|
||||||
|
**The Measured Contrast Rule.** Every foreground is checked against every surface
|
||||||
|
it lands on, hover states included, at 4.5:1. Nothing dimmer than Text Subtle is
|
||||||
|
allowed as text.
|
||||||
|
|
||||||
|
## Typography
|
||||||
|
|
||||||
|
**Body Font:** IBM Plex Sans Variable (with system-ui, sans-serif)
|
||||||
|
**Label/Mono Font:** IBM Plex Mono (with ui-monospace, monospace)
|
||||||
|
|
||||||
|
**Character:** A sober, engineered grotesque paired with its own monospace, so
|
||||||
|
identifiers, durations and payloads read as data without changing voice.
|
||||||
|
|
||||||
|
### Hierarchy
|
||||||
|
- **Page title** (600, 0.9375rem, 1.25, -0.025em): one per page, in PageHeader
|
||||||
|
beside the page's actions.
|
||||||
|
- **Title** (500, 0.9375rem, 1.375): card and panel titles.
|
||||||
|
- **Label** (400 to 500, 0.8125rem): body copy, rows, navigation, buttons and
|
||||||
|
fields. The default text size of the dashboard.
|
||||||
|
- **Caption** (500, 0.6875rem): metadata, column labels, step-type labels and
|
||||||
|
badges.
|
||||||
|
- **Section label** (500, 0.6875rem, 0.06em, uppercase): group headings in
|
||||||
|
sidebars and settings navigation only.
|
||||||
|
- **Micro** (0.625rem): the smallest annotations, used sparingly.
|
||||||
|
- **Mono** (400, caption size): IDs, short hashes, durations, log fields and code.
|
||||||
|
|
||||||
|
### Named Rules
|
||||||
|
**The Type Scale Rule.** Use the named steps (`text-micro`, `text-caption`,
|
||||||
|
`text-label`, `text-title`), never pixel sizes. Headings are separated by weight
|
||||||
|
and placement, not by size jumps.
|
||||||
|
|
||||||
|
**The Data Is Mono Rule.** Anything the operator might copy or compare (an ID, a
|
||||||
|
version, a duration, a payload) is set in Plex Mono.
|
||||||
|
|
||||||
|
## Layout
|
||||||
|
|
||||||
|
The app shell is a collapsible sidebar plus a sticky 56px top bar holding the
|
||||||
|
breadcrumb and account controls. Page content sits in the workspace surface with
|
||||||
|
1.5rem by 1.25rem padding, dropping to 1rem below the large breakpoint, and a
|
||||||
|
bottom clearance for the docked chat composer. The chat can pin to either side,
|
||||||
|
and the workspace shifts to make room for it.
|
||||||
|
|
||||||
|
Spacing is Tailwind's 0.25rem scale; compact density sets the unit to 0.225rem,
|
||||||
|
so every gap and padding tightens together and components keep their relative
|
||||||
|
rhythm. Pages use container queries (`@container`) so panels respond to the space
|
||||||
|
they actually have, not the viewport.
|
||||||
|
|
||||||
|
Phone width is a real target. Desktop layouts collapse to dropdowns instead of
|
||||||
|
side lists and to stacked panes, and nothing overlaps the canvas. Controls keep
|
||||||
|
their desktop size on touch screens; a `touch-hit` utility widens the tap area to
|
||||||
|
44px invisibly, and only rows in floating menus grow to 2.75rem.
|
||||||
|
|
||||||
|
The workflow canvas is the one full-bleed surface: on phones it takes the full
|
||||||
|
viewport height, and steps expand in place rather than opening side panels.
|
||||||
|
|
||||||
|
## Elevation & Depth
|
||||||
|
|
||||||
|
The system is flat, with tonal layers. Depth comes from surface steps (canvas,
|
||||||
|
workspace, card, popover) and from hairlines and 1px rings. Shadows are reserved
|
||||||
|
for things that float above the page: menus, popovers, dialogs and an expanded
|
||||||
|
canvas node.
|
||||||
|
|
||||||
|
### Shadow Vocabulary
|
||||||
|
- **Rest** (`box-shadow: 0 1px 2px rgba(0, 0, 0, 0.4)` dark, `0 1px 2px
|
||||||
|
rgba(31, 31, 29, 0.06)` light): the top bar and canvas nodes at rest; barely
|
||||||
|
there.
|
||||||
|
- **Float** (`box-shadow: 0 8px 28px rgba(0, 0, 0, 0.4)` dark, `0 8px 28px
|
||||||
|
rgba(31, 31, 29, 0.1)` light): popovers, menus, dialogs and the expanded step
|
||||||
|
node.
|
||||||
|
|
||||||
|
### Named Rules
|
||||||
|
**The Flat By Default Rule.** Cards sit on the page with a 1px ring, not a
|
||||||
|
shadow. A larger shadow means the element floats above the page.
|
||||||
|
|
||||||
|
## Shapes
|
||||||
|
|
||||||
|
Gently rounded and consistent. Controls, inputs and canvas nodes use 8px corners
|
||||||
|
(`rounded.lg`); cards use 12px (`rounded.xl`); badges use 4px (`rounded.sm`), and
|
||||||
|
small buttons step down to 6px. Status dots and avatars are the only full circles.
|
||||||
|
Borders are 1px and quiet; a strong border marks structural edges such as the top
|
||||||
|
bar. Focus is always a visible 2px ring offset by 2px, in sage.
|
||||||
|
|
||||||
|
## Components
|
||||||
|
|
||||||
|
Compact and contextual: small controls that appear where the work is.
|
||||||
|
|
||||||
|
### Buttons
|
||||||
|
- **Shape:** gently rounded (8px), 36px tall by default, with 32px and 24px sizes
|
||||||
|
and square icon variants.
|
||||||
|
- **Primary:** Signal Sage Deep fill with white label text. At most one per view.
|
||||||
|
- **Ghost / Outline / Secondary:** transparent or hover-surface fills that pick
|
||||||
|
up the hover surface on hover; the default for everything that is not the main
|
||||||
|
action.
|
||||||
|
- **Attention:** amber stroke and soft amber fill, for an action that exists
|
||||||
|
because something is waiting. Not destructive.
|
||||||
|
- **Destructive:** soft clay fill with clay text, never a solid red block.
|
||||||
|
- **Hover / Focus:** 140ms colour transitions, a 3px sage focus ring, and a 1px
|
||||||
|
downward press on active.
|
||||||
|
|
||||||
|
### Chips (Badges)
|
||||||
|
- **Style:** 20px tall, 4px corners, caption type. Status badges (`ok`, `warn`,
|
||||||
|
`danger`, `info`, `idle`) set the solid tone on its soft background.
|
||||||
|
- **State:** the badge and the StatusDot are the only places status colour is
|
||||||
|
decided.
|
||||||
|
|
||||||
|
### Cards / Containers
|
||||||
|
- **Corner Style:** 12px.
|
||||||
|
- **Background:** the card surface on the workspace.
|
||||||
|
- **Edges:** a 1px border ring, without a shadow.
|
||||||
|
- **Internal Padding:** 16px, or 12px for the small size. Section wraps a card
|
||||||
|
with a title; an edited section shows a sage ring.
|
||||||
|
- **Data tables:** card surface, muted header and a border, without card padding
|
||||||
|
or a shadow.
|
||||||
|
- **Alerts:** use the semantic soft fill and a matching border so they don't
|
||||||
|
look like regular cards.
|
||||||
|
|
||||||
|
### Inputs / Fields
|
||||||
|
- **Style:** card background, 1px input stroke, 8px corners, 36px tall, label
|
||||||
|
size (title size on touch screens so phones do not zoom).
|
||||||
|
- **Focus:** the border turns sage with a 3px sage ring.
|
||||||
|
- **Error / Disabled:** a clay border and ring; disabled fields drop to 50%
|
||||||
|
opacity.
|
||||||
|
|
||||||
|
### Navigation
|
||||||
|
- **Sidebar:** card surface, label-size rows, uppercase section labels in Text
|
||||||
|
Subtle, the hover surface on hover and active. Collapses on phones.
|
||||||
|
- **Top bar:** card surface, 56px, strong bottom border with the rest shadow,
|
||||||
|
breadcrumb on the left and a connection pill and account menu on the right.
|
||||||
|
- **Selection:** the active tab uses a sage underline. Pressed toggles use a
|
||||||
|
sage outline and a soft fill.
|
||||||
|
|
||||||
|
### Status Dot
|
||||||
|
A 6px circle in one of the five status tones. It pulses (motion-safe only) while
|
||||||
|
the thing it marks is live.
|
||||||
|
|
||||||
|
### Step Node (Signature Component)
|
||||||
|
The workflow canvas card. 240px wide at rest, with an 8px corner, the rest shadow
|
||||||
|
and a caption row naming the step type with a sage icon. The run duration sits on
|
||||||
|
the right in mono, beside a status icon. The title below is label size and medium
|
||||||
|
weight. Selecting it expands it in place to 416px with the float shadow and a 2px
|
||||||
|
sage ring, main field first. The same card shows the step's live run state:
|
||||||
|
editor and observer are one surface. Added, removed and changed steps are marked
|
||||||
|
in the sage, clay and amber tones.
|
||||||
|
|
||||||
|
## Do's and Don'ts
|
||||||
|
|
||||||
|
### Do:
|
||||||
|
- **Do** use semantic tokens (`bg-card`, `text-fg-muted`, `bg-ok-soft`) and the
|
||||||
|
named type steps, so both themes and compact density work without extra code.
|
||||||
|
- **Do** keep one filled primary button per view; everything else is ghost,
|
||||||
|
outline or secondary.
|
||||||
|
- **Do** set IDs, versions, durations and payloads in Plex Mono.
|
||||||
|
- **Do** show actions on hover or focus where the work is, and make every hover
|
||||||
|
action reachable by keyboard.
|
||||||
|
- **Do** honour reduced motion: nothing animates when the operator asks it not to.
|
||||||
|
|
||||||
|
### Don't:
|
||||||
|
- **Don't** use generic SaaS gloss: no purple or multicolour gradients, no glow
|
||||||
|
shadows, no glassmorphism cards, no gradient text.
|
||||||
|
- **Don't** make it toy-like on phones: no blanket 44px minimum sizes on buttons,
|
||||||
|
links and fields. Widen the tap area invisibly with `touch-hit` instead.
|
||||||
|
- **Don't** tint backgrounds for hierarchy; use surface steps and borders.
|
||||||
|
- **Don't** introduce a new hue or reuse a status colour for decoration.
|
||||||
|
- **Don't** put white text on a status fill; use the soft background and the
|
||||||
|
solid tone.
|
||||||
|
- **Don't** add a shadow to a resting card.
|
||||||
+34
-6
@@ -2,16 +2,21 @@
|
|||||||
# Pre-installs system tools agents can't install themselves (no apt, no sudo).
|
# Pre-installs system tools agents can't install themselves (no apt, no sudo).
|
||||||
# Language packages are installed at runtime via uv/npm/go.
|
# Language packages are installed at runtime via uv/npm/go.
|
||||||
#
|
#
|
||||||
# Build: docker build -t archie-agent:latest .
|
# Build: task image:agent (or docker build --build-arg RUNTIME_VERSION=<ver>)
|
||||||
|
# A build that names no version stamps none, and the agent reports dev.
|
||||||
|
|
||||||
# ── builder ──
|
# ── builder ──
|
||||||
FROM golang:1.27-trixie AS builder
|
FROM golang:1.27-trixie AS builder
|
||||||
ARG RUNTIME_VERSION=dev
|
ARG RUNTIME_VERSION=dev
|
||||||
WORKDIR /src
|
WORKDIR /src
|
||||||
COPY go.mod go.sum ./
|
COPY go.mod go.sum ./
|
||||||
RUN go mod download
|
# Cache mounts keep modules and compiled packages on the build daemon; without
|
||||||
|
# them COPY . . makes every commit a cold compile.
|
||||||
|
RUN --mount=type=cache,target=/go/pkg/mod go mod download
|
||||||
COPY . .
|
COPY . .
|
||||||
RUN CGO_ENABLED=0 go build \
|
RUN --mount=type=cache,target=/go/pkg/mod \
|
||||||
|
--mount=type=cache,target=/root/.cache/go-build \
|
||||||
|
CGO_ENABLED=0 go build \
|
||||||
-ldflags "-X github.com/samcharles93/archie-core/internal/app/agentworker.version=${RUNTIME_VERSION} -X github.com/samcharles93/archie-core/internal/installtype.buildType=container" \
|
-ldflags "-X github.com/samcharles93/archie-core/internal/app/agentworker.version=${RUNTIME_VERSION} -X github.com/samcharles93/archie-core/internal/installtype.buildType=container" \
|
||||||
-o /usr/local/bin/archie-agent ./cmd/archie-agent/
|
-o /usr/local/bin/archie-agent ./cmd/archie-agent/
|
||||||
|
|
||||||
@@ -54,9 +59,15 @@ ENV GOPATH="/go"
|
|||||||
# /go/bin must be on PATH or anything `go install` puts there is unreachable.
|
# /go/bin must be on PATH or anything `go install` puts there is unreachable.
|
||||||
ENV PATH="/usr/local/go/bin:/go/bin:${PATH}"
|
ENV PATH="/usr/local/go/bin:/go/bin:${PATH}"
|
||||||
|
|
||||||
ARG GOLANGCI_LINT_VERSION=2.13.2
|
ARG GOLANGCI_LINT_VERSION=2.14.0
|
||||||
ARG GOFUMPT_VERSION=0.11.0
|
ARG GOFUMPT_VERSION=0.11.0
|
||||||
ARG BUF_VERSION=1.72.0
|
ARG BUF_VERSION=1.72.0
|
||||||
|
# Pinned to the versions tools/proto.sh installs; buf generate shells out to them.
|
||||||
|
ARG PROTOC_GEN_GO_VERSION=1.36.11
|
||||||
|
ARG PROTOC_GEN_GO_GRPC_VERSION=1.6.2
|
||||||
|
# Repository gates run `task`; fetching it per run parks the task when the
|
||||||
|
# download fails.
|
||||||
|
ARG TASK_VERSION=3.54.0
|
||||||
|
|
||||||
RUN curl -fsSL "https://github.com/golangci/golangci-lint/releases/download/v${GOLANGCI_LINT_VERSION}/golangci-lint-${GOLANGCI_LINT_VERSION}-linux-amd64.tar.gz" \
|
RUN curl -fsSL "https://github.com/golangci/golangci-lint/releases/download/v${GOLANGCI_LINT_VERSION}/golangci-lint-${GOLANGCI_LINT_VERSION}-linux-amd64.tar.gz" \
|
||||||
| tar -xz -C /usr/local/bin --strip-components=1 \
|
| tar -xz -C /usr/local/bin --strip-components=1 \
|
||||||
@@ -65,7 +76,12 @@ RUN curl -fsSL "https://github.com/golangci/golangci-lint/releases/download/v${G
|
|||||||
"https://github.com/mvdan/gofumpt/releases/download/v${GOFUMPT_VERSION}/gofumpt_v${GOFUMPT_VERSION}_linux_amd64" && \
|
"https://github.com/mvdan/gofumpt/releases/download/v${GOFUMPT_VERSION}/gofumpt_v${GOFUMPT_VERSION}_linux_amd64" && \
|
||||||
curl -fsSL -o /usr/local/bin/buf \
|
curl -fsSL -o /usr/local/bin/buf \
|
||||||
"https://github.com/bufbuild/buf/releases/download/v${BUF_VERSION}/buf-Linux-x86_64" && \
|
"https://github.com/bufbuild/buf/releases/download/v${BUF_VERSION}/buf-Linux-x86_64" && \
|
||||||
chmod +x /usr/local/bin/gofumpt /usr/local/bin/buf
|
curl -fsSL "https://github.com/go-task/task/releases/download/v${TASK_VERSION}/task_linux_amd64.tar.gz" \
|
||||||
|
| tar -xz -C /usr/local/bin task && \
|
||||||
|
chmod +x /usr/local/bin/gofumpt /usr/local/bin/buf && \
|
||||||
|
GOBIN=/usr/local/bin go install "google.golang.org/protobuf/cmd/protoc-gen-go@v${PROTOC_GEN_GO_VERSION}" && \
|
||||||
|
GOBIN=/usr/local/bin go install "google.golang.org/grpc/cmd/protoc-gen-go-grpc@v${PROTOC_GEN_GO_GRPC_VERSION}" && \
|
||||||
|
go clean -cache -modcache
|
||||||
|
|
||||||
# ── Python via uv ─────────────────────────────────────────────────────
|
# ── Python via uv ─────────────────────────────────────────────────────
|
||||||
ARG PYTHON_VERSION=3.14
|
ARG PYTHON_VERSION=3.14
|
||||||
@@ -73,7 +89,19 @@ RUN curl -fsSL https://astral.sh/uv/install.sh | sh
|
|||||||
ENV PATH="/root/.local/bin:${PATH}"
|
ENV PATH="/root/.local/bin:${PATH}"
|
||||||
RUN uv python install --default "${PYTHON_VERSION}" && rm -rf /root/.cache/uv
|
RUN uv python install --default "${PYTHON_VERSION}" && rm -rf /root/.cache/uv
|
||||||
|
|
||||||
|
# Point each toolchain at its cache volume (internal/storage). Unset, pnpm puts
|
||||||
|
# its store on the worktree's filesystem, inside the repository the agent commits.
|
||||||
|
ENV GOMODCACHE=/data/cache/go/mod \
|
||||||
|
GOCACHE=/data/cache/go/build \
|
||||||
|
npm_config_cache=/data/cache/node \
|
||||||
|
npm_config_store_dir=/data/cache/pnpm \
|
||||||
|
DENO_DIR=/data/cache/deno \
|
||||||
|
BUN_INSTALL_CACHE_DIR=/data/cache/bun \
|
||||||
|
PIP_CACHE_DIR=/data/cache/pip \
|
||||||
|
UV_CACHE_DIR=/data/cache/pip \
|
||||||
|
CARGO_HOME=/data/cache/cargo
|
||||||
|
|
||||||
COPY --from=builder /usr/local/bin/archie-agent /usr/local/bin/archie-agent
|
COPY --from=builder /usr/local/bin/archie-agent /usr/local/bin/archie-agent
|
||||||
|
|
||||||
# The daemon injects NATS_URL and, when configured, NATS_TOKEN.
|
# The daemon injects NATS_URL.
|
||||||
ENTRYPOINT ["archie-agent"]
|
ENTRYPOINT ["archie-agent"]
|
||||||
@@ -0,0 +1,28 @@
|
|||||||
|
# Production single-binary image for cmd/archie.
|
||||||
|
# Build: docker build -f Dockerfile.archie --build-arg VERSION=v1.0.0 -t archie:v1.0.0 .
|
||||||
|
|
||||||
|
# ── builder ──
|
||||||
|
FROM golang:1.27-trixie AS builder
|
||||||
|
ARG VERSION=dev
|
||||||
|
WORKDIR /src
|
||||||
|
COPY go.mod go.sum ./
|
||||||
|
RUN --mount=type=cache,target=/go/pkg/mod go mod download
|
||||||
|
COPY . .
|
||||||
|
RUN --mount=type=cache,target=/go/pkg/mod \
|
||||||
|
--mount=type=cache,target=/root/.cache/go-build \
|
||||||
|
CGO_ENABLED=0 go build -trimpath \
|
||||||
|
-ldflags "-s -w -X github.com/samcharles93/archie-core/internal/buildinfo.Version=${VERSION}" \
|
||||||
|
-o /usr/local/bin/archie ./cmd/archie
|
||||||
|
|
||||||
|
# ── runtime ──
|
||||||
|
FROM gcr.io/distroless/static-debian12:nonroot
|
||||||
|
ARG VERSION=dev
|
||||||
|
ARG REVISION=unknown
|
||||||
|
LABEL org.opencontainers.image.title="archie" \
|
||||||
|
org.opencontainers.image.description="Event-driven agentic automation" \
|
||||||
|
org.opencontainers.image.version="${VERSION}" \
|
||||||
|
org.opencontainers.image.revision="${REVISION}"
|
||||||
|
|
||||||
|
COPY --from=builder /usr/local/bin/archie /archie
|
||||||
|
EXPOSE 8080
|
||||||
|
ENTRYPOINT ["/archie"]
|
||||||
+6
-3
@@ -4,11 +4,15 @@
|
|||||||
FROM golang:1.27-trixie AS builder
|
FROM golang:1.27-trixie AS builder
|
||||||
WORKDIR /src
|
WORKDIR /src
|
||||||
COPY go.mod go.sum ./
|
COPY go.mod go.sum ./
|
||||||
RUN go mod download
|
# Cache mounts keep modules and compiled packages on the build daemon; without
|
||||||
|
# them COPY . . makes every commit a cold compile.
|
||||||
|
RUN --mount=type=cache,target=/go/pkg/mod go mod download
|
||||||
COPY . .
|
COPY . .
|
||||||
ARG GATEWAY_VERSION=dev
|
ARG GATEWAY_VERSION=dev
|
||||||
ARG RUNTIME_VERSION=dev
|
ARG RUNTIME_VERSION=dev
|
||||||
RUN CGO_ENABLED=0 go build \
|
RUN --mount=type=cache,target=/go/pkg/mod \
|
||||||
|
--mount=type=cache,target=/root/.cache/go-build \
|
||||||
|
CGO_ENABLED=0 go build \
|
||||||
-ldflags "-X github.com/samcharles93/archie-core/internal/buildinfo.Version=${GATEWAY_VERSION} -X github.com/samcharles93/archie-core/internal/buildinfo.Runtime=${RUNTIME_VERSION} -X github.com/samcharles93/archie-core/internal/installtype.buildType=container" \
|
-ldflags "-X github.com/samcharles93/archie-core/internal/buildinfo.Version=${GATEWAY_VERSION} -X github.com/samcharles93/archie-core/internal/buildinfo.Runtime=${RUNTIME_VERSION} -X github.com/samcharles93/archie-core/internal/installtype.buildType=container" \
|
||||||
-o /usr/local/bin/archied ./cmd/archied/
|
-o /usr/local/bin/archied ./cmd/archied/
|
||||||
|
|
||||||
@@ -22,6 +26,5 @@ ARG RUNTIME_VERSION=dev
|
|||||||
LABEL org.opencontainers.image.version="${GATEWAY_VERSION}"
|
LABEL org.opencontainers.image.version="${GATEWAY_VERSION}"
|
||||||
LABEL cloud.catlow.archie.runtime-version="${RUNTIME_VERSION}"
|
LABEL cloud.catlow.archie.runtime-version="${RUNTIME_VERSION}"
|
||||||
|
|
||||||
COPY CHANGELOG.md /usr/share/archie/CHANGELOG.md
|
|
||||||
|
|
||||||
ENTRYPOINT ["archied"]
|
ENTRYPOINT ["archied"]
|
||||||
@@ -1,17 +1,5 @@
|
|||||||
NOTICE
|
NOTICE
|
||||||
|
|
||||||
This product includes software derived from PR-AF
|
|
||||||
(https://github.com/Agent-Field/pr-af), Copyright AgentField,
|
|
||||||
licensed under the Apache License, Version 2.0.
|
|
||||||
|
|
||||||
Derived portions: internal/domain/workflow/prreview -- the unified diff
|
|
||||||
parser, change clustering, blast radius, evidence extraction, scoring,
|
|
||||||
deduplication, line mapping and review-event selection.
|
|
||||||
|
|
||||||
PR-AF declares the Apache License, Version 2.0 in its pyproject.toml and
|
|
||||||
ships no license file. A copy of the License is available at
|
|
||||||
https://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
|
|
||||||
This product includes software from the Cedar project
|
This product includes software from the Cedar project
|
||||||
(https://github.com/cedar-policy/cedar), Copyright Amazon.com, Inc. or its
|
(https://github.com/cedar-policy/cedar), Copyright Amazon.com, Inc. or its
|
||||||
affiliates, licensed under the Apache License, Version 2.0, as implemented by
|
affiliates, licensed under the Apache License, Version 2.0, as implemented by
|
||||||
|
|||||||
+119
@@ -0,0 +1,119 @@
|
|||||||
|
# Product
|
||||||
|
|
||||||
|
<!-- impeccable:product-schema 1 -->
|
||||||
|
|
||||||
|
## Platform
|
||||||
|
|
||||||
|
web
|
||||||
|
|
||||||
|
## Users
|
||||||
|
|
||||||
|
Archie's audience comes in two stages.
|
||||||
|
|
||||||
|
1. **Now: the solo operator.** An infrastructure or IT operations engineer who
|
||||||
|
runs their own estate of VMs, containers and on-prem hosts and self-hosts
|
||||||
|
Archie. They want day-2 operations handled without babysitting: disks
|
||||||
|
filling up, alerts firing, routine maintenance. They use the dashboard on
|
||||||
|
desktop and phone, and talk to Archie through chat channels.
|
||||||
|
2. **Next: the IT operations team.** A team inside an organisation where an
|
||||||
|
application owner (recorded in the CMDB) approves production changes on the
|
||||||
|
servers that belong to their application. Governance, audit and risk
|
||||||
|
controls decide whether the team adopts it.
|
||||||
|
|
||||||
|
## Product Purpose
|
||||||
|
|
||||||
|
Archie is event-driven agentic automation. It hears an event (an alert, a
|
||||||
|
webhook, a schedule, a chat message, an issue), works out what it means, decides
|
||||||
|
what to do, and does the work through an agent. It judges every action before
|
||||||
|
the action runs, and delivers the result wherever it needs review or action.
|
||||||
|
|
||||||
|
Success: an operator connects a source and Archie notices events, acting without
|
||||||
|
being asked when allowed. It calls the operator in only when policy or risk
|
||||||
|
requires it, explaining what it found and did.
|
||||||
|
|
||||||
|
The loop is Hears, Understands, Decides, Defines, Does, Delivers. The platform
|
||||||
|
around it Governs, Reports, Assesses, Manages Risk and Invokes Policy.
|
||||||
|
|
||||||
|
## Positioning
|
||||||
|
|
||||||
|
In order of importance:
|
||||||
|
|
||||||
|
1. **Earned, explained autonomy.** Guards (policy, risk and others, each an
|
||||||
|
extension) score every action before it runs, and those scores set how much
|
||||||
|
the agent may do alone. Autonomy is graded per action, earned from approval
|
||||||
|
history, and always explained. Loosening a ceiling always needs approval from
|
||||||
|
someone with authority; it never happens automatically.
|
||||||
|
2. **Proposals from unhandled events.** The operator states intent rather than
|
||||||
|
wiring steps. Events that nothing handles become proposals, and workflows
|
||||||
|
learn from outcomes. Archie writes, runs and changes its own workflows; the
|
||||||
|
operator can view or edit them but should not need to.
|
||||||
|
3. **Self-hosted operations on VM and on-prem estates.** Archie runs in the
|
||||||
|
operator's own environment and acts directly, or through the automation a
|
||||||
|
team already has (AAP, Semaphore, ServiceNow).
|
||||||
|
|
||||||
|
Archie executes agentic work itself. It is not only a judgement layer, and not
|
||||||
|
another visual workflow builder in the n8n, Zapier or Make mould.
|
||||||
|
|
||||||
|
## Operating Context
|
||||||
|
|
||||||
|
- Events arrive from monitoring (for example Alertmanager on Prometheus),
|
||||||
|
webhooks, schedules, chat channels and forges. A forge is one source among
|
||||||
|
many; a repository is an optional input to a workflow, never the point.
|
||||||
|
- Results and approval requests go out as events to any channel (Telegram,
|
||||||
|
Slack, Discord, email, webhooks, the dashboard chat composer) and come back in.
|
||||||
|
- An approver can be an operator, a rule, a classifier or an automatic decision.
|
||||||
|
Never assume a human approver.
|
||||||
|
- Channels, forges, connectors, secret engines and guards ship as extensions,
|
||||||
|
not in-tree.
|
||||||
|
- The leading demonstration is proactive day-2 operations: a disk-filling alert
|
||||||
|
from Prometheus, investigated and remediated, with the operator told on both a
|
||||||
|
chat channel and the dashboard.
|
||||||
|
|
||||||
|
## Capabilities and Constraints
|
||||||
|
|
||||||
|
- One self-contained binary, `archie`, backed by PostgreSQL. Docker is never
|
||||||
|
the only mechanism for isolation or enforcement.
|
||||||
|
- The dashboard is a Vue single-page app embedded in the binary, used on
|
||||||
|
desktop and phone.
|
||||||
|
- The dashboard is the complete control plane: every configuration and mutable
|
||||||
|
setting is editable there. A setting reachable only through a file, flag or
|
||||||
|
API is a defect. Secrets are write-only.
|
||||||
|
- Every request and response of every judge, guard, action, model call,
|
||||||
|
delivery and evaluation is recorded for audit, never including credentials.
|
||||||
|
- Terminology: source, event, workflow, run, step, guard, approval, proposal,
|
||||||
|
connector, delivery. "Bindings" is a known-obscure name awaiting a
|
||||||
|
replacement.
|
||||||
|
- Undecided: the replacement for bindings and issue routing in the Decide step;
|
||||||
|
how guard scores combine into an autonomy mode; how Deliver works without
|
||||||
|
hard-coded outputs.
|
||||||
|
|
||||||
|
## Brand Commitments
|
||||||
|
|
||||||
|
- Name: Archie. Tagline: "Event-driven Agentic Automation".
|
||||||
|
- Assets in `assets/brand/`: wordmark (light, dark, mono), mark, app icon,
|
||||||
|
social card.
|
||||||
|
- Interface copy states the problem and the action only. It never explains the
|
||||||
|
interface, restates a title, or describes the mechanism behind it.
|
||||||
|
- Never frame the product around coding or a repository.
|
||||||
|
|
||||||
|
## Evidence on Hand
|
||||||
|
|
||||||
|
- Live staging deployment of the single binary, with real Prometheus alerts,
|
||||||
|
Telegram, Semaphore and host connectors.
|
||||||
|
- No customers, testimonials, benchmarks, pricing or press exist. Do not
|
||||||
|
fabricate any.
|
||||||
|
|
||||||
|
## Product Principles
|
||||||
|
|
||||||
|
1. **Governance is the product.** Judgement before every action, a full audit
|
||||||
|
record, and autonomy that is earned and explained are what make Archie worth
|
||||||
|
adopting. Keep them visible, not buried.
|
||||||
|
2. **Intent, not wiring.** The operator says what they want; Archie defines the
|
||||||
|
workflow. Editing is available, never required.
|
||||||
|
3. **Editor and observer are one live surface.** Workflows are defined,
|
||||||
|
connected and watched on the same interactive canvas, updating live as
|
||||||
|
events and runs flow through it. Nodes show what they do.
|
||||||
|
4. **Interrupt only when it matters.** Archie calls the operator in when policy
|
||||||
|
or risk requires it, with what it found and what it did, not to report
|
||||||
|
routine success.
|
||||||
|
5. **Everything operable from the dashboard.** No setting needs a server login.
|
||||||
@@ -1,6 +1,9 @@
|
|||||||
[](https://github.com/samcharles93/archie-core/actions/workflows/quality.yml)
|
<h1>
|
||||||
|
<picture>
|
||||||
# Archie
|
<source media="(prefers-color-scheme: dark)" srcset="assets/brand/archie-wordmark-dark.svg">
|
||||||
|
<img alt="Archie" src="assets/brand/archie-wordmark.svg" height="56">
|
||||||
|
</picture>
|
||||||
|
</h1>
|
||||||
|
|
||||||
**Event-driven Agentic Automation**
|
**Event-driven Agentic Automation**
|
||||||
|
|
||||||
@@ -14,8 +17,8 @@ network operations, service management, and software delivery. You define the
|
|||||||
process and the access it requires; agents work through its stages, using the
|
process and the access it requires; agents work through its stages, using the
|
||||||
context of each event to decide how to accomplish the task.
|
context of each event to decide how to accomplish the task.
|
||||||
|
|
||||||
Archie is under active development and not every capability below is
|
Archie is under active development and some capabilities below remain
|
||||||
finished.
|
unfinished.
|
||||||
|
|
||||||
## From an event to an outcome
|
## From an event to an outcome
|
||||||
|
|
||||||
@@ -103,7 +106,7 @@ or a hosted provider API key.
|
|||||||
1. **Install.**
|
1. **Install.**
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
curl -fsSL https://raw.githubusercontent.com/samcharles93/archie-core/main/install.sh | bash
|
curl -fsSL https://offloaded.dev/install.sh | bash
|
||||||
```
|
```
|
||||||
|
|
||||||
It downloads the latest release, verifies its checksum, installs the five
|
It downloads the latest release, verifies its checksum, installs the five
|
||||||
@@ -147,6 +150,10 @@ another [deployment template](deployments/README.md).
|
|||||||
<http://localhost:5173>, using [`deployments/dev.toml`](deployments/dev.toml).
|
<http://localhost:5173>, using [`deployments/dev.toml`](deployments/dev.toml).
|
||||||
`task check` is the quality gate; [AGENTS.md](AGENTS.md) lists its tools.
|
`task check` is the quality gate; [AGENTS.md](AGENTS.md) lists its tools.
|
||||||
|
|
||||||
|
| Project skill | Use |
|
||||||
|
| --- | --- |
|
||||||
|
| [`/technical-prose-cleanup`](.github/skills/technical-prose-cleanup/SKILL.md) | Review technical writing in one module without changing behaviour. |
|
||||||
|
|
||||||
## Documentation
|
## Documentation
|
||||||
|
|
||||||
- [Your first playbook](docs/guides/first-playbook.md)
|
- [Your first playbook](docs/guides/first-playbook.md)
|
||||||
|
|||||||
+43
-116
@@ -1,129 +1,56 @@
|
|||||||
# Releasing
|
# Releasing
|
||||||
|
|
||||||
One release stream. `CHANGELOG.md` carries every release section, one generated
|
One `v*` tag names a release. One version covers every process in the host
|
||||||
page per version describes it, and one tag names the release. A release is one
|
bundle (`archied`, `archie-gateway`, `archie-state-store`, `archie-ui`,
|
||||||
version covering whatever changed; the components' entries are labelled sections
|
`archie-messaging`) and the `archie-agent` image. No release comes from a
|
||||||
inside it (`### archied`, `### archie-agent`), not separate numbers or separate
|
laptop.
|
||||||
pages.
|
|
||||||
|
|
||||||
The host bundle ships five processes (`archied`, `archie-gateway`,
|
|
||||||
`archie-state-store`, `archie-ui`, `archie-messaging`), and
|
|
||||||
one version covers all of them. `archie-agent`, the per-task sandboxed runtime,
|
|
||||||
ships as a container image and its changes are the `## [version]` release's
|
|
||||||
`### archie-agent` section.
|
|
||||||
|
|
||||||
`tools/release.sh` decides which commits a release carries from the package
|
|
||||||
closure of **every shipped binary**, not from commit-message guessing: a change
|
|
||||||
to a package only the messaging service, state store, playbook runner or UI
|
|
||||||
links still lands in the changelog. Read its header comment for how it
|
|
||||||
partitions commits and enforces `main`-only, clean-tree releases.
|
|
||||||
|
|
||||||
## What justifies a version
|
|
||||||
|
|
||||||
`task release:preview VERSION=X.Y.Z` shows exactly what would land, before
|
|
||||||
anything is written. A commit set that justifies no version produces no version:
|
|
||||||
`release.sh` exits **3** with "nothing to release" rather than inventing one, so
|
|
||||||
a pipeline can finish green without tagging.
|
|
||||||
|
|
||||||
Most sessions touch the gateway side (daemon, gateway, web UI, chat, messaging)
|
|
||||||
and leave the agent runtime alone. That is no longer a per-component `skip`
|
|
||||||
decision — one version covers the release — but a runtime code change being
|
|
||||||
merged to `main` is still not the same as it being in production: the
|
|
||||||
`archie-agent` image is rebuilt by the release, and a host that runs the agent
|
|
||||||
must pull the new image (`docker compose pull agent`) to get it.
|
|
||||||
|
|
||||||
## What the notes are for
|
|
||||||
|
|
||||||
**Release notes describe the reader's experience of what shipped.** The test is
|
|
||||||
the reader, not whether a sentence is negative:
|
|
||||||
|
|
||||||
- A capability that **never existed** leaves no expectation to correct, so a
|
|
||||||
note about it reads as a feature to someone who never had the thing — out.
|
|
||||||
- **The implementation's journey** — what was rebuilt, what a guard finally
|
|
||||||
covers, what a browser API refuses to surface — is not the reader's experience
|
|
||||||
either — out.
|
|
||||||
- A capability that **shipped but is not yet wired** _is_ the reader's
|
|
||||||
experience, so it belongs, worded as a caveat on the capability and paired
|
|
||||||
with the behaviour that compensates for it.
|
|
||||||
|
|
||||||
Design constraints and withheld capabilities are not release news.
|
|
||||||
Do not apply this mechanically: deleting a caveat a reader needs misleads them,
|
|
||||||
which is the failure this rule exists to prevent.
|
|
||||||
|
|
||||||
## Cutting a release
|
## Cutting a release
|
||||||
|
|
||||||
```bash
|
Dispatch the **release** workflow (`.github/workflows/release.yml`) with
|
||||||
task release:preview VERSION=1.3.0 # preview what would land
|
`major`, `minor`, `patch` or an exact version. It runs `task release` on
|
||||||
task release:prepare VERSION=1.3.0 # write the section into CHANGELOG.md, uncommitted
|
`main`, which refuses a dirty tree or an existing tag and then tags `vx.y.z`,
|
||||||
# edit CHANGELOG.md -- generated notes are a starting point, not the release
|
and pushes the tag with `DEPLOY_TOKEN`. A push made with the job token
|
||||||
task release VERSION=1.3.0 # commit + annotated tag
|
wouldn't start other workflows, so the user token is what lets the tag start
|
||||||
git push --atomic origin main v1.3.0 # both refs or neither
|
the deploy.
|
||||||
```
|
|
||||||
|
|
||||||
`release:prepare` emits bare commit subjects; they are a starting point. Rewrite
|
|
||||||
them to say what a reader gets, per "What the notes are for" above.
|
|
||||||
|
|
||||||
Pushing is a separate, explicit step — never push without confirming first (see
|
|
||||||
the repo's general "check before doing anything hard to reverse" rule). The
|
|
||||||
deploy workflow reads tags pointing at `HEAD`; pushing the commit without its
|
|
||||||
tag gets images stamped `dev`, which is why the push names the tag and is
|
|
||||||
`--atomic`.
|
|
||||||
|
|
||||||
### After a release, `main` and the working branch have diverged
|
|
||||||
|
|
||||||
The release commit lands on `main` — `tools/release.sh` refuses to run anywhere
|
|
||||||
else — while the working branch keeps advancing. So after every release, `main`
|
|
||||||
is ahead by exactly that commit and the branch is ahead by however far it has
|
|
||||||
moved: **neither tip is an ancestor of the other**, and `--ff-only` fails in
|
|
||||||
both directions. That refusal reads as "the tree is not ready" when in fact the
|
|
||||||
tree is fine.
|
|
||||||
|
|
||||||
Merge the release commit into the branch first, so any conflict is resolved on
|
|
||||||
the branch, where it is reversible and nobody is reading the tip:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
git merge main # on the branch
|
|
||||||
git merge --ff-only <branch> # then, in whichever worktree holds main
|
|
||||||
```
|
|
||||||
|
|
||||||
Confirm which worktree holds `main` with `git worktree list` before the
|
|
||||||
`--ff-only`. A detached worktree sitting at the same commit will accept it and
|
|
||||||
move nothing, which looks like success.
|
|
||||||
|
|
||||||
## What a release publishes
|
## What a release publishes
|
||||||
|
|
||||||
Tagging one version produces, from a single `deploy` run:
|
The tag push runs `deploy.yml`:
|
||||||
|
|
||||||
- **Container images** — `ghcr.io/samcharles93/archied:latest` and
|
- **Gate.** `task check dist TEST_FLAGS=-count=1` and `govulncheck`. The
|
||||||
`ghcr.io/samcharles93/archie-agent:latest`. The runtime image is rebuilt by
|
same run builds the binaries the zip ships, so it compiles nothing again
|
||||||
the release, so runtime commits merged to `main` do not reach a running
|
after the gate.
|
||||||
sandbox until the host pulls the new image.
|
- **Images.** `archied:v<version>` and `archie-agent:v<version>`, plus
|
||||||
- **`:latest` names the newest release, not the newest commit.** A push to
|
`sha-<commit>` tags. `:latest` moves only on promotion.
|
||||||
`main` that is not a release publishes `archied:edge` (mutable, tracking
|
- **The signed release.** `archied release publish` signs a statement
|
||||||
`main`) and `archied:sha-<commit>` (immutable) instead, so a release's
|
(version, `issued_at`, zip digest, agent image by digest) with
|
||||||
`:latest` stamping is not overwritten minutes later by the next ordinary
|
`RELEASE_SIGNING_KEY` and pushes it with the distribution zip to
|
||||||
commit. A host that runs releases follows `:latest`; a host that tracks `main`
|
`git.catlow.cloud/sam/archie` as `v<version>` and `next`. It never moves
|
||||||
follows `:edge`.
|
`stable`.
|
||||||
- **A GitHub Release with a distribution zip** — `dist-zip` builds every process
|
- **The release page** on Gitea, listing the commit subjects since the
|
||||||
the reference deployment runs (`archied`, `archie-gateway`,
|
previous tag. The statement links to it.
|
||||||
`archie-state-store`, `archie-ui`, `archie-messaging`) for
|
|
||||||
linux/amd64, packs them with `deployments/INSTRUCTIONS.md` and `CHANGELOG.md`,
|
|
||||||
and attaches the zip to the Release. The Release body is that version's
|
|
||||||
`## [version]` section of `CHANGELOG.md`.
|
|
||||||
|
|
||||||
The zip is also uploaded as an Actions artifact, but that is a backup copy:
|
Actions run the workflow from the tagged commit, so a fix to `deploy.yml`
|
||||||
artifacts expire after 90 days and need an Actions login to download. The
|
reaches a release only if it is an ancestor of the tag. Cut a new release
|
||||||
Release asset is the durable, operator-reachable one.
|
rather than committing the fix on top of a tagged one.
|
||||||
|
|
||||||
## Gate
|
## Promote
|
||||||
|
|
||||||
CI (`deploy.yml`) runs `task check` before building images, then verifies any
|
Dispatch the **promote** workflow (`.github/workflows/promote.yml`) with a
|
||||||
release tag at `HEAD` has a matching `[version]` section in `CHANGELOG.md`. A
|
`version`. It retags `stable` to that release and moves the `archied` and
|
||||||
tag with no changelog entry is a hard failure. No tags at `HEAD` is a warning,
|
`archie-agent` images' `:latest` to it. Promotion refuses a prerelease and a
|
||||||
not a failure — images get stamped `dev`.
|
release issued before the one `stable` names, the same replay rule hosts
|
||||||
|
enforce. The same thing by hand:
|
||||||
|
|
||||||
One consequence worth knowing when a release commit needs amending: GitHub
|
```bash
|
||||||
Actions runs the workflow **from the commit that triggered it**, so a fix to
|
archied release promote -version 1.63.0 \
|
||||||
`deploy.yml` only takes effect for a release if it is an ancestor of the tagged
|
-latest git.catlow.cloud/sam/archied,git.catlow.cloud/sam/archie-agent
|
||||||
commit. Delete and re-cut the tag (`git tag -d`, `task release`) rather than
|
```
|
||||||
committing the fix on top of an already-tagged release.
|
|
||||||
|
## Secrets
|
||||||
|
|
||||||
|
| Name | Used by |
|
||||||
|
|---|---|
|
||||||
|
| `DEPLOY_TOKEN` | release, deploy, promote: the registry push, the tag push and the package links |
|
||||||
|
| `RELEASE_SIGNING_KEY` | deploy: signs the release statement |
|
||||||
+235
-175
@@ -2,13 +2,13 @@ version: "3"
|
|||||||
|
|
||||||
vars:
|
vars:
|
||||||
BIN_DIR: "bin"
|
BIN_DIR: "bin"
|
||||||
|
# The version a build reports: the nearest tag with the distance and commit,
|
||||||
|
# or a bare commit when the checkout has no tags (a shallow clone). A build
|
||||||
|
# should not answer "dev" only because the caller did not name a version.
|
||||||
|
VERSION:
|
||||||
|
sh: git describe --tags --always --dirty 2>/dev/null | sed 's/^v//' || echo dev
|
||||||
|
|
||||||
tasks:
|
tasks:
|
||||||
default:
|
|
||||||
desc: List available tasks
|
|
||||||
cmds:
|
|
||||||
- task --list
|
|
||||||
|
|
||||||
fmt:
|
fmt:
|
||||||
desc: Fix and format Go source with the gate's configured formatters
|
desc: Fix and format Go source with the gate's configured formatters
|
||||||
cmds:
|
cmds:
|
||||||
@@ -64,21 +64,23 @@ tasks:
|
|||||||
- task: db:generate
|
- task: db:generate
|
||||||
- git diff --exit-code -- internal/infrastructure/postgres/postgresdb
|
- git diff --exit-code -- internal/infrastructure/postgres/postgresdb
|
||||||
|
|
||||||
|
openapi:generate:
|
||||||
|
desc: Write the API's OpenAPI document to api/openapi.yaml
|
||||||
|
cmds:
|
||||||
|
- mkdir -p api
|
||||||
|
- go run ./cmd/archie openapi > api/openapi.yaml
|
||||||
|
|
||||||
|
openapi:check:
|
||||||
|
desc: Regenerate the OpenAPI document and reject uncommitted differences
|
||||||
|
cmds:
|
||||||
|
- task: openapi:generate
|
||||||
|
- git diff --exit-code -- api/openapi.yaml
|
||||||
|
|
||||||
proto:check:
|
proto:check:
|
||||||
desc: Regenerate contracts and reject uncommitted generated differences
|
desc: Regenerate contracts and reject uncommitted generated differences
|
||||||
cmds:
|
cmds:
|
||||||
- bash tools/proto.sh check
|
- bash tools/proto.sh check
|
||||||
|
|
||||||
news:
|
|
||||||
desc: Regenerate the release data artifacts from the changelog
|
|
||||||
cmds:
|
|
||||||
- go -C tools run -mod=readonly ./newsgen --repo-root ..
|
|
||||||
|
|
||||||
news:check:
|
|
||||||
desc: Verify the committed release notes match the changelog
|
|
||||||
cmds:
|
|
||||||
- go -C tools run -mod=readonly ./newsgen check --repo-root ..
|
|
||||||
|
|
||||||
vet:
|
vet:
|
||||||
desc: Run go vet
|
desc: Run go vet
|
||||||
cmds:
|
cmds:
|
||||||
@@ -88,70 +90,41 @@ tasks:
|
|||||||
desc: Run golangci-lint
|
desc: Run golangci-lint
|
||||||
cmds:
|
cmds:
|
||||||
- golangci-lint run ./...
|
- golangci-lint run ./...
|
||||||
- task: lint:tools
|
|
||||||
|
|
||||||
lint:tools:
|
bench:prreview:
|
||||||
desc: Run golangci-lint over the tools module
|
desc: Run the PR review benchmark on the configured models and write docs/benchmarks/pr-review-*.md (-- -model ALIAS -judge-model REF; --help for flags)
|
||||||
dir: tools
|
|
||||||
cmds:
|
cmds:
|
||||||
- golangci-lint run ./...
|
- go run ./cmd/archied prbench {{.CLI_ARGS}}
|
||||||
|
|
||||||
lint:playbooks:
|
|
||||||
desc: Validate playbook bindings
|
|
||||||
cmds:
|
|
||||||
- go run ./cmd/archied playbooks lint -dir ./playbooks
|
|
||||||
|
|
||||||
vuln:
|
|
||||||
desc: Scan for known vulnerabilities (requires network access)
|
|
||||||
cmds:
|
|
||||||
- govulncheck ./...
|
|
||||||
|
|
||||||
deadcode:
|
|
||||||
desc: Report unreachable production functions (advisory)
|
|
||||||
cmds:
|
|
||||||
- go run golang.org/x/tools/cmd/deadcode@latest -test=false ./cmd/...
|
|
||||||
|
|
||||||
ui:deps:
|
|
||||||
desc: Install dashboard dependencies
|
|
||||||
internal: true
|
|
||||||
# Parallel UI checks must share one dependency install.
|
|
||||||
run: once
|
|
||||||
dir: ui
|
|
||||||
cmds:
|
|
||||||
- npm install --no-audit --no-fund
|
|
||||||
|
|
||||||
ui:
|
|
||||||
desc: Build the dashboard into ui/dist (committed; the Go build embeds it)
|
|
||||||
dir: ui
|
|
||||||
deps: [ui:deps]
|
|
||||||
cmds:
|
|
||||||
- npm run build
|
|
||||||
|
|
||||||
ui:check:
|
|
||||||
desc: Rebuild the dashboard into a temporary directory and reject a stale ui/dist
|
|
||||||
deps: [ui:deps]
|
|
||||||
cmds:
|
|
||||||
- bash tools/uidist.sh check
|
|
||||||
|
|
||||||
test:ui:
|
|
||||||
desc: Test and type-check the dashboard
|
|
||||||
dir: ui
|
|
||||||
deps: [ui:deps]
|
|
||||||
cmds:
|
|
||||||
- npm test
|
|
||||||
- npm run typecheck
|
|
||||||
|
|
||||||
webhook:send:
|
|
||||||
desc: Send a test event to the dashboard's capture intake (--help for kinds)
|
|
||||||
cmds:
|
|
||||||
- bash tools/webhook-send.sh {{.CLI_ARGS}}
|
|
||||||
|
|
||||||
dev:
|
dev:
|
||||||
desc: Run development services and Vite at http://localhost:5173
|
desc: Run archie with live reload on 127.0.0.1:8484; run the dashboard from archie-frontend
|
||||||
deps: [dev:daemon, dev:gateway, dev:messaging, dev:state-store, dev:dashboard, dev:ui]
|
deps: [dev:archie]
|
||||||
|
|
||||||
|
dev:legacy:
|
||||||
|
desc: Run the legacy multi-service stack
|
||||||
|
deps: [dev:daemon, dev:gateway, dev:messaging, dev:state-store, dev:dashboard]
|
||||||
|
|
||||||
|
dev:tls:
|
||||||
|
desc: Issue the development CA and service certificates deployments/dev.toml names
|
||||||
|
status:
|
||||||
|
- test -f tmp/dev-tls/archie-ui.pem
|
||||||
|
cmds:
|
||||||
|
- |
|
||||||
|
# Task containers reach the State Store over the Docker bridge, which
|
||||||
|
# services may only do over TLS.
|
||||||
|
set -eu
|
||||||
|
d=tmp/dev-tls
|
||||||
|
mkdir -p "$d"
|
||||||
|
openssl req -x509 -newkey ec -pkeyopt ec_paramgen_curve:prime256v1 -nodes -days 3650 \
|
||||||
|
-subj /CN=archie-dev-ca -keyout "$d/ca-key.pem" -out "$d/ca.pem" 2>/dev/null
|
||||||
|
for s in archied archie-gateway archie-messaging archie-state-store archie-ui; do
|
||||||
|
openssl req -x509 -newkey ec -pkeyopt ec_paramgen_curve:prime256v1 -nodes -days 3650 \
|
||||||
|
-subj "/CN=$s" -addext "subjectAltName=DNS:$s" -addext extendedKeyUsage=serverAuth,clientAuth \
|
||||||
|
-CA "$d/ca.pem" -CAkey "$d/ca-key.pem" -keyout "$d/$s-key.pem" -out "$d/$s.pem" 2>/dev/null
|
||||||
|
done
|
||||||
|
|
||||||
dev:postgres:
|
dev:postgres:
|
||||||
desc: Start PostgreSQL and wait for readiness
|
desc: Start PostgreSQL, wait for readiness, provision the database roles
|
||||||
cmds:
|
cmds:
|
||||||
- docker compose up -d postgres
|
- docker compose up -d postgres
|
||||||
- |
|
- |
|
||||||
@@ -165,89 +138,138 @@ tasks:
|
|||||||
done
|
done
|
||||||
echo "postgres did not become healthy within 60s" >&2
|
echo "postgres did not become healthy within 60s" >&2
|
||||||
exit 1
|
exit 1
|
||||||
|
- |
|
||||||
|
# docker-compose.yml creates the dev database with a superuser named
|
||||||
|
# archie; provision the least-privilege runtime and migrator roles
|
||||||
|
# idempotently without depending on the legacy state-store binary.
|
||||||
|
# Single-binary archie uses its own database (archie_dev) so its goose
|
||||||
|
# migration history does not collide with the legacy archie database.
|
||||||
|
docker compose exec -T postgres psql -v ON_ERROR_STOP=1 -U archie -d postgres <<'SQL'
|
||||||
|
DO $$
|
||||||
|
BEGIN
|
||||||
|
IF NOT EXISTS (SELECT FROM pg_roles WHERE rolname = 'archie_migrator') THEN
|
||||||
|
CREATE ROLE archie_migrator LOGIN PASSWORD 'archie';
|
||||||
|
ELSE
|
||||||
|
ALTER ROLE archie_migrator WITH LOGIN PASSWORD 'archie';
|
||||||
|
END IF;
|
||||||
|
IF NOT EXISTS (SELECT FROM pg_roles WHERE rolname = 'archie_runtime') THEN
|
||||||
|
CREATE ROLE archie_runtime LOGIN PASSWORD 'archie';
|
||||||
|
ELSE
|
||||||
|
ALTER ROLE archie_runtime WITH LOGIN PASSWORD 'archie';
|
||||||
|
END IF;
|
||||||
|
END
|
||||||
|
$$;
|
||||||
|
SELECT 'CREATE DATABASE archie_dev OWNER archie_migrator'
|
||||||
|
WHERE NOT EXISTS (SELECT FROM pg_database WHERE datname = 'archie_dev')\gexec
|
||||||
|
GRANT CREATE, CONNECT ON DATABASE archie TO archie_migrator;
|
||||||
|
GRANT CONNECT ON DATABASE archie TO archie_runtime;
|
||||||
|
GRANT CREATE, CONNECT ON DATABASE archie_dev TO archie_migrator;
|
||||||
|
GRANT CONNECT ON DATABASE archie_dev TO archie_runtime;
|
||||||
|
SQL
|
||||||
|
docker compose exec -T postgres psql -v ON_ERROR_STOP=1 -U archie -d archie \
|
||||||
|
-c "GRANT CREATE, USAGE ON SCHEMA public TO archie_migrator; GRANT USAGE ON SCHEMA public TO archie_runtime;"
|
||||||
|
docker compose exec -T postgres psql -v ON_ERROR_STOP=1 -U archie -d archie_dev \
|
||||||
|
-c "GRANT CREATE, USAGE ON SCHEMA public TO archie_migrator; GRANT USAGE ON SCHEMA public TO archie_runtime;"
|
||||||
|
|
||||||
dev:daemon:
|
dev:wait-state:
|
||||||
desc: Run archied with live reload
|
internal: true
|
||||||
cmds:
|
cmds:
|
||||||
- |
|
- |
|
||||||
# The daemon and Gateway read their settings from the State Store at
|
# Services read their settings from the State Store at boot and exit
|
||||||
# boot and exit if it is not up yet; it starts only once PostgreSQL
|
# if it is not up yet, so wait for its port ([services.state] in
|
||||||
# is healthy, so wait for its port ([services.state] in
|
# deployments/dev.toml).
|
||||||
# deployments/dev.toml) first.
|
|
||||||
for _ in $(seq 1 120); do nc -z 127.0.0.1 9091 && exit 0; sleep 1; done
|
for _ in $(seq 1 120); do nc -z 127.0.0.1 9091 && exit 0; sleep 1; done
|
||||||
echo "state store did not come up on 127.0.0.1:9091 within 120s" >&2
|
echo "state store did not come up on 127.0.0.1:9091 within 120s" >&2
|
||||||
exit 1
|
exit 1
|
||||||
- air -build.args_bin="-config-overlay,deployments/dev.toml"
|
|
||||||
|
dev:daemon:
|
||||||
|
desc: Run legacy archied
|
||||||
|
cmds:
|
||||||
|
- task: dev:wait-state
|
||||||
|
- go run ./cmd/archied -config-overlay deployments/dev.toml
|
||||||
|
|
||||||
dev:dashboard:
|
dev:dashboard:
|
||||||
desc: Run the dashboard backend
|
desc: Run the legacy dashboard backend
|
||||||
cmds:
|
cmds:
|
||||||
- go run ./cmd/archie-ui -config-overlay deployments/dev.toml
|
- go run ./cmd/archie-ui -config-overlay deployments/dev.toml
|
||||||
|
|
||||||
dev:state-store:
|
dev:state-store:
|
||||||
desc: Run the State Store with development PostgreSQL
|
desc: Run the legacy State Store with development PostgreSQL
|
||||||
deps: [dev:postgres]
|
deps: [dev:postgres, dev:tls]
|
||||||
cmds:
|
cmds:
|
||||||
- go run ./cmd/archie-state-store -config-overlay deployments/dev.toml
|
- go run ./cmd/archie-state-store -config-overlay deployments/dev.toml
|
||||||
|
|
||||||
dev:gateway:
|
dev:gateway:
|
||||||
desc: Run the development Gateway
|
desc: Run the legacy development Gateway
|
||||||
cmds:
|
cmds:
|
||||||
- |
|
- task: dev:wait-state
|
||||||
# The daemon and Gateway read their settings from the State Store at
|
|
||||||
# boot and exit if it is not up yet; it starts only once PostgreSQL
|
|
||||||
# is healthy, so wait for its port ([services.state] in
|
|
||||||
# deployments/dev.toml) first.
|
|
||||||
for _ in $(seq 1 120); do nc -z 127.0.0.1 9091 && exit 0; sleep 1; done
|
|
||||||
echo "state store did not come up on 127.0.0.1:9091 within 120s" >&2
|
|
||||||
exit 1
|
|
||||||
- go run ./cmd/archie-gateway -config-overlay deployments/dev.toml
|
- go run ./cmd/archie-gateway -config-overlay deployments/dev.toml
|
||||||
|
|
||||||
dev:messaging:
|
dev:messaging:
|
||||||
desc: Run the development Messaging Service
|
desc: Run the legacy development Messaging Service
|
||||||
cmds:
|
cmds:
|
||||||
- for _ in $(seq 1 120); do nc -z 127.0.0.1 9091 && exit 0; sleep 1; done; echo "state store did not come up on 127.0.0.1:9091 within 120s" >&2; exit 1
|
- task: dev:wait-state
|
||||||
- go run ./cmd/archie-messaging -config-overlay deployments/dev.toml
|
- go run ./cmd/archie-messaging -config-overlay deployments/dev.toml
|
||||||
|
|
||||||
dev:ui:
|
dev:archie:
|
||||||
desc: Run Vite (requires the dashboard backend)
|
desc: Run the single archie binary against the development PostgreSQL (admin token "dev", live reload via air if installed)
|
||||||
dir: ui
|
deps: [dev:postgres]
|
||||||
|
vars:
|
||||||
|
DIR: tmp/dev-archie
|
||||||
cmds:
|
cmds:
|
||||||
- npm install --no-audit --no-fund
|
- |
|
||||||
- npm run dev
|
set -eu
|
||||||
|
mkdir -p {{.DIR}}/state
|
||||||
dev:mobile:
|
# Generated once: the age identity seals the dev credentials, so keep
|
||||||
desc: Serve the dashboard on your LAN (token-protected) for phone viewing
|
# it across runs. Roles come from dev:postgres.
|
||||||
deps:
|
if [ ! -f {{.DIR}}/config.toml ]; then
|
||||||
- ui
|
install -m 0600 /dev/null {{.DIR}}/config.toml
|
||||||
cmds:
|
{
|
||||||
- cmd: |
|
echo 'listen = "127.0.0.1:8484"'
|
||||||
IP=$(hostname -I | awk '{print $1}')
|
echo 'state_dir = "{{.ROOT_DIR}}/{{.DIR}}/state"'
|
||||||
TOKEN_FILE="${XDG_DATA_HOME:-$HOME/.local/share}/archie/web-token"
|
echo "admin_token_sha256 = \"$(printf dev | sha256sum | cut -d' ' -f1)\""
|
||||||
go run ./cmd/archie-ui -listen 0.0.0.0:8484 -token-file "$TOKEN_FILE" &
|
echo "age_identity = \"$(go run ./cmd/archie -new-age-identity)\""
|
||||||
UI_PID=$!
|
echo '[database]'
|
||||||
sleep 2
|
echo 'url = "postgres://archie_runtime:archie@127.0.0.1:5432/archie_dev?sslmode=disable"'
|
||||||
TOKEN=$(cat "$TOKEN_FILE" 2>/dev/null)
|
echo 'owner_url = "postgres://archie_migrator:archie@127.0.0.1:5432/archie_dev?sslmode=disable"'
|
||||||
URL="http://$IP:8484/?t=$TOKEN"
|
} > {{.DIR}}/config.toml
|
||||||
echo "Phone URL: $URL"
|
elif ! grep -q '^state_dir' {{.DIR}}/config.toml; then
|
||||||
echo "$URL" | qrencode -t ANSIUTF8
|
sed -i '1i state_dir = "{{.ROOT_DIR}}/{{.DIR}}/state"' {{.DIR}}/config.toml
|
||||||
trap "kill $UI_PID 2>/dev/null" EXIT
|
fi
|
||||||
wait $UI_PID
|
- |
|
||||||
|
if command -v air >/dev/null 2>&1; then
|
||||||
|
exec air -build.args_bin="-config,{{.DIR}}/config.toml"
|
||||||
|
fi
|
||||||
|
exec go run ./cmd/archie -config {{.DIR}}/config.toml
|
||||||
|
|
||||||
build:
|
build:
|
||||||
desc: Build archie services and agent binaries
|
desc: Build archie services and agent binaries
|
||||||
|
# Static, like the binaries a release ships, so `dist` reuses these
|
||||||
|
# compiled packages and only links again.
|
||||||
|
env:
|
||||||
|
CGO_ENABLED: "0"
|
||||||
vars:
|
vars:
|
||||||
GATEWAY_VERSION: '{{.GATEWAY_VERSION | default "dev"}}'
|
GATEWAY_VERSION: '{{.GATEWAY_VERSION | default .VERSION}}'
|
||||||
RUNTIME_VERSION: '{{.RUNTIME_VERSION | default "dev"}}'
|
RUNTIME_VERSION: '{{.RUNTIME_VERSION | default .VERSION}}'
|
||||||
SERVICE_LDFLAGS: >-
|
SERVICE_LDFLAGS: >-
|
||||||
-X github.com/samcharles93/archie-core/internal/installtype.buildType=binary
|
-X github.com/samcharles93/archie-core/internal/installtype.buildType=binary
|
||||||
-X github.com/samcharles93/archie-core/internal/buildinfo.Version={{.GATEWAY_VERSION}}
|
-X github.com/samcharles93/archie-core/internal/buildinfo.Version={{.GATEWAY_VERSION}}
|
||||||
-X github.com/samcharles93/archie-core/internal/buildinfo.Runtime={{.RUNTIME_VERSION}}
|
-X github.com/samcharles93/archie-core/internal/buildinfo.Runtime={{.RUNTIME_VERSION}}
|
||||||
sources:
|
sources:
|
||||||
|
- Taskfile.yml
|
||||||
- "**/*.go"
|
- "**/*.go"
|
||||||
|
# Files the binaries embed.
|
||||||
|
- config.example.toml
|
||||||
|
- "internal/**/*.sql"
|
||||||
|
- "internal/**/*.yaml"
|
||||||
|
- "internal/**/*.json"
|
||||||
|
- "internal/**/*.tpl"
|
||||||
|
- "internal/**/*.tmpl"
|
||||||
|
- "internal/**/*.md"
|
||||||
|
- "modules/**/*.cedar"
|
||||||
|
- "modules/**/*.yaml"
|
||||||
- go.mod
|
- go.mod
|
||||||
- go.sum
|
- go.sum
|
||||||
- "ui/dist/**"
|
|
||||||
generates:
|
generates:
|
||||||
- "{{.BIN_DIR}}/archied"
|
- "{{.BIN_DIR}}/archied"
|
||||||
- "{{.BIN_DIR}}/archie-gateway"
|
- "{{.BIN_DIR}}/archie-gateway"
|
||||||
@@ -255,22 +277,48 @@ tasks:
|
|||||||
- "{{.BIN_DIR}}/archie-ui"
|
- "{{.BIN_DIR}}/archie-ui"
|
||||||
- "{{.BIN_DIR}}/archie-messaging"
|
- "{{.BIN_DIR}}/archie-messaging"
|
||||||
- "{{.BIN_DIR}}/archie-agent"
|
- "{{.BIN_DIR}}/archie-agent"
|
||||||
|
- "{{.BIN_DIR}}/archie"
|
||||||
cmds:
|
cmds:
|
||||||
# One flag set for every service, matching scripts/archie-update-install
|
# One flag set for every service, matching the release workflow, so each
|
||||||
# and the release workflow, so each binary reports the same version.
|
# binary reports the same version.
|
||||||
- for: [archied, archie-gateway, archie-state-store, archie-ui, archie-messaging]
|
- for: [archie, archied, archie-gateway, archie-state-store, archie-ui, archie-messaging]
|
||||||
cmd: go build -ldflags "{{.SERVICE_LDFLAGS}}" -o {{.BIN_DIR}}/{{.ITEM}} ./cmd/{{.ITEM}}
|
cmd: go build -trimpath -ldflags "{{.SERVICE_LDFLAGS}}" -o {{.BIN_DIR}}/{{.ITEM}} ./cmd/{{.ITEM}}
|
||||||
- go build -ldflags "-X github.com/samcharles93/archie-core/internal/app/agentworker.version={{.RUNTIME_VERSION}} -X github.com/samcharles93/archie-core/internal/installtype.buildType=binary" -o {{.BIN_DIR}}/archie-agent ./cmd/archie-agent
|
- go build -trimpath -ldflags "-X github.com/samcharles93/archie-core/internal/app/agentworker.version={{.RUNTIME_VERSION}} -X github.com/samcharles93/archie-core/internal/installtype.buildType=binary" -o {{.BIN_DIR}}/archie-agent ./cmd/archie-agent
|
||||||
|
|
||||||
|
dist:
|
||||||
|
desc: Build the linux/amd64 binaries a release ships into dist/ (VERSION=1.2.3; needs jq)
|
||||||
|
env:
|
||||||
|
GOOS: linux
|
||||||
|
GOARCH: amd64
|
||||||
|
CGO_ENABLED: "0"
|
||||||
|
vars:
|
||||||
|
DIST_LDFLAGS: >-
|
||||||
|
-X github.com/samcharles93/archie-core/internal/installtype.buildType=binary
|
||||||
|
-X github.com/samcharles93/archie-core/internal/buildinfo.Version={{.VERSION}}
|
||||||
|
-X github.com/samcharles93/archie-core/internal/buildinfo.Runtime={{.VERSION}}
|
||||||
|
-X github.com/samcharles93/archie-core/internal/app/agentworker.version={{.VERSION}}
|
||||||
|
cmds:
|
||||||
|
# release.json names what a release ships, so the zip and this build
|
||||||
|
# cannot disagree. The compiler flags match `build`, so after the gate
|
||||||
|
# has built bin/ this only links.
|
||||||
|
- |
|
||||||
|
set -eu
|
||||||
|
mkdir -p dist
|
||||||
|
for cmd in $(jq -r '.required_topology.units[], .required_topology.binaries[]?' release.json); do
|
||||||
|
go build -trimpath -ldflags "{{.DIST_LDFLAGS}}" -o "dist/$cmd" "./cmd/$cmd"
|
||||||
|
done
|
||||||
|
|
||||||
test:
|
test:
|
||||||
desc: Run short Go tests with caching
|
desc: Run Go tests; the release gate passes TEST_FLAGS=-count=1
|
||||||
cmds:
|
cmds:
|
||||||
- go test -short ./...
|
- go test {{.TEST_FLAGS | default "-short"}} ./...
|
||||||
|
|
||||||
test:full:
|
image:agent:
|
||||||
desc: Run the whole Go test suite uncached, including the wall-clock-bound tests
|
desc: Build the agent image stamped with this checkout's version
|
||||||
|
# Compose owns the image build; this only supplies the version, which a
|
||||||
|
# plain `docker build` has no way to learn from a context that excludes .git.
|
||||||
cmds:
|
cmds:
|
||||||
- go test ./... -count=1
|
- RUNTIME_VERSION={{.VERSION}} docker compose build agent
|
||||||
|
|
||||||
check:
|
check:
|
||||||
desc: Run the full quality gate
|
desc: Run the full quality gate
|
||||||
@@ -279,62 +327,74 @@ tasks:
|
|||||||
- task: fmt
|
- task: fmt
|
||||||
- task: proto:check
|
- task: proto:check
|
||||||
- task: db:check
|
- task: db:check
|
||||||
|
- task: openapi:check
|
||||||
- task: check:readonly
|
- task: check:readonly
|
||||||
|
|
||||||
|
wt:check:
|
||||||
|
desc: "Fix, format and check a worktree's Go packages (-- ./pkg/... to name packages; default: those changed since main)"
|
||||||
|
# The full gate still runs once, on the merged tree.
|
||||||
|
cmds:
|
||||||
|
- |
|
||||||
|
set -eu
|
||||||
|
base="$(git merge-base HEAD main)"
|
||||||
|
changed="$( { git diff --name-only "$base"; git ls-files --others --exclude-standard; } | sort -u)"
|
||||||
|
pkgs="{{.CLI_ARGS}}"
|
||||||
|
if [ -z "$pkgs" ]; then
|
||||||
|
pkgs="$(printf '%s\n' "$changed" | grep '\.go$' | xargs -r -n1 dirname | sort -u | while read -r d; do [ -d "$d" ] && echo "./$d"; done | tr '\n' ' ')"
|
||||||
|
fi
|
||||||
|
if [ -n "$pkgs" ]; then
|
||||||
|
echo "packages: $pkgs"
|
||||||
|
# The same fixes and formatters as task fmt, applied to these
|
||||||
|
# packages only; see fmt for why go fix runs until it converges.
|
||||||
|
converged=false
|
||||||
|
for pass in 1 2 3 4 5 6 7 8 9 10; do
|
||||||
|
go fix $pkgs
|
||||||
|
if go fix -diff $pkgs >/dev/null; then
|
||||||
|
converged=true
|
||||||
|
break
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
if [ "$converged" != true ]; then
|
||||||
|
echo "go fix still rewrites these packages after 10 passes" >&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
golangci-lint fmt $pkgs
|
||||||
|
go vet $pkgs
|
||||||
|
go test -short $pkgs
|
||||||
|
golangci-lint run $pkgs
|
||||||
|
fi
|
||||||
|
if [ -z "$pkgs" ]; then
|
||||||
|
echo "nothing changed since main"
|
||||||
|
fi
|
||||||
|
|
||||||
check:readonly:
|
check:readonly:
|
||||||
internal: true
|
internal: true
|
||||||
deps:
|
deps:
|
||||||
- task: proto:lint
|
- task: proto:lint
|
||||||
- task: news:check
|
|
||||||
- task: vet
|
- task: vet
|
||||||
- task: lint
|
- task: lint
|
||||||
- task: build
|
- task: build
|
||||||
- task: test
|
- task: test
|
||||||
- task: test:ui
|
|
||||||
- task: ui:check
|
|
||||||
|
|
||||||
release:preview:
|
|
||||||
desc: "Show the release notes that would be generated (VERSION=1.2.0)"
|
|
||||||
cmds:
|
|
||||||
- tools/release.sh --version {{.VERSION}} --dry-run
|
|
||||||
requires:
|
|
||||||
vars: [VERSION]
|
|
||||||
|
|
||||||
release:prepare:
|
|
||||||
desc: Prepare changelog notes for editing (VERSION=1.2.0)
|
|
||||||
cmds:
|
|
||||||
- tools/release.sh --version {{.VERSION}} --prepare
|
|
||||||
requires:
|
|
||||||
vars: [VERSION]
|
|
||||||
|
|
||||||
release:
|
release:
|
||||||
desc: Commit and tag the prepared release (VERSION=1.2.0)
|
desc: "Tag main as a release (RELEASE=major|minor|patch|1.2.3)"
|
||||||
cmds:
|
|
||||||
- tools/release.sh --version {{.VERSION}} --tag
|
|
||||||
requires:
|
requires:
|
||||||
vars: [VERSION]
|
vars: [RELEASE]
|
||||||
|
|
||||||
clean:
|
|
||||||
desc: Remove build artifacts
|
|
||||||
cmds:
|
cmds:
|
||||||
- rm -rf {{.BIN_DIR}}
|
- |
|
||||||
|
set -euo pipefail
|
||||||
docker-build:
|
die() { echo "release: $*" >&2; exit 1; }
|
||||||
desc: Build the archie-agent sandbox image
|
[ "$(git rev-parse --abbrev-ref HEAD)" = main ] || die "releases are cut from main"
|
||||||
cmds:
|
[ -z "$(git status --porcelain)" ] || die "the working tree is dirty"
|
||||||
- docker compose build agent
|
last="$(git tag --list 'v*' --sort=-v:refname | grep -E '^v[0-9]+\.[0-9]+\.[0-9]+$' | head -1 || true)"
|
||||||
|
IFS=. read -r major minor patch <<<"${last#v}"
|
||||||
docker-up:
|
case "{{.RELEASE}}" in
|
||||||
desc: Start the optional external NATS service via docker compose
|
major) version="$((major + 1)).0.0" ;;
|
||||||
cmds:
|
minor) version="$major.$((minor + 1)).0" ;;
|
||||||
- docker compose up -d nats
|
patch) version="$major.$minor.$((patch + 1))" ;;
|
||||||
|
*) version="$(echo "{{.RELEASE}}" | sed 's/^v//')" ;;
|
||||||
docker-down:
|
esac
|
||||||
desc: Stop the docker compose stack
|
echo "$version" | grep -Eq '^[0-9]+\.[0-9]+\.[0-9]+(-[0-9A-Za-z.]+)?$' || die "$version is not a version"
|
||||||
cmds:
|
! git rev-parse -q --verify "refs/tags/v$version" >/dev/null || die "v$version already exists"
|
||||||
- docker compose down
|
git tag -a "v$version" -m "v$version"
|
||||||
|
echo "tagged v$version"
|
||||||
docker-logs:
|
|
||||||
desc: Follow the NATS container logs
|
|
||||||
cmds:
|
|
||||||
- docker compose logs -f nats
|
|
||||||
+86
-46
@@ -1,15 +1,15 @@
|
|||||||
# Workflow definitions
|
# Workflow definitions
|
||||||
|
|
||||||
A workflow is a YAML document: an id, what it declares to whatever starts it,
|
A workflow is a YAML document: an id, what it declares to whatever starts it,
|
||||||
and an ordered list of steps. Definitions are stored in the control plane's
|
and an ordered list of steps. Definitions live in the control plane's
|
||||||
`workflow-definitions` resource and edited on the dashboard's Workflows page
|
`workflow-definitions` resource, and operators edit them on the dashboard's
|
||||||
(the Canvas and YAML tabs edit the same document). The shipped workflows are in
|
Workflows page (the Canvas and YAML tabs edit the same document). The shipped
|
||||||
`internal/domain/workflow/shipped/`.
|
workflows are in `internal/domain/workflow/shipped/`.
|
||||||
|
|
||||||
The server is the authority. It serves the step vocabulary, including each step
|
The server is the authority. It serves the step vocabulary, including each step
|
||||||
type's settings schema, in the `workflow-definitions` catalog entry
|
type's settings schema, in the `workflow-definitions` catalogue entry
|
||||||
(`x-step-types`), and validates every definition when it is saved. This file
|
(`x-step-types`), and validates every definition on save. This file
|
||||||
describes that vocabulary; when they disagree, the catalog wins.
|
describes that vocabulary; when they disagree, the catalogue wins.
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
id: implement
|
id: implement
|
||||||
@@ -21,7 +21,6 @@ steps:
|
|||||||
- id: plan
|
- id: plan
|
||||||
type: agent.run
|
type: agent.run
|
||||||
settings:
|
settings:
|
||||||
role: planner
|
|
||||||
read_only: true
|
read_only: true
|
||||||
mission: |
|
mission: |
|
||||||
Plan this change: {{ task.prompt }}
|
Plan this change: {{ task.prompt }}
|
||||||
@@ -42,12 +41,11 @@ steps:
|
|||||||
|---|---|---|
|
|---|---|---|
|
||||||
| `id` | text | The workflow's name. Required, unique. |
|
| `id` | text | The workflow's name. Required, unique. |
|
||||||
| `steps` | list | The steps, run in order. At least one. |
|
| `steps` | list | The steps, run in order. At least one. |
|
||||||
| `repository` | `required` \| `optional` \| `none` | `required` (the default) clones the task's repository into a worktree. `optional` clones one when the run names a repository and uses a scratch workspace otherwise. `none` never clones; only steps that run without a repository may be used. |
|
| `repository` | `required` \| `optional` \| `none` | `required` (the default) clones the task's repository into a worktree. `optional` clones one when the run names a repository and uses a scratch workspace otherwise. `none` never clones; the workflow may use only steps that run without a repository. |
|
||||||
| `inputs` | mapping | Named, typed values whatever starts the run must supply: `{type, required}`, where type is `string`, `number`, `bool`, `object`, `array` or `any`. Steps read them as `{{ inputs.<name> }}`. |
|
| `inputs` | mapping | Named, typed values whatever starts the run must supply: `{type, required}`, where type is `string`, `number`, `bool`, `object`, `array` or `any`. Steps read them as `{{ inputs.<name> }}`. |
|
||||||
| `outputs` | mapping | Named, typed results the run writes once each (same shape as inputs). A required output the run never writes parks it. A calling workflow reads them. |
|
| `outputs` | mapping | Named, typed results the run writes once each (same shape as inputs). A required output the run never writes parks it. A calling workflow reads them. |
|
||||||
| `profile` | text | The container profile (`[containers.profiles]`) the run's agents use. Resolved when the task is dispatched. |
|
| `profile` | text | The container profile (`[containers.profiles]`) the run's agents use. Resolution happens at dispatch. |
|
||||||
| `identity` | text | The identity every run acts as, whatever started it. Empty runs as the starter. |
|
| `identity` | text | The identity every run acts as, whatever started it. Empty runs as the starter. |
|
||||||
| `needs` | mapping | Harness capabilities the run requires: `captures` (bool), `gate_retries` (number). Declared outputs imply `captures`. |
|
|
||||||
|
|
||||||
## A step
|
## A step
|
||||||
|
|
||||||
@@ -72,15 +70,15 @@ Any string setting may contain `{{ path }}`, replaced when the step runs:
|
|||||||
| `task.repository` | `owner/name`. |
|
| `task.repository` | `owner/name`. |
|
||||||
| `task.kind` | What the task came from, as prose: `GitHub issue` or `chat-originated task`. |
|
| `task.kind` | What the task came from, as prose: `GitHub issue` or `chat-originated task`. |
|
||||||
| `task.issue`, `task.pr` | Issue and pull request numbers. |
|
| `task.issue`, `task.pr` | Issue and pull request numbers. |
|
||||||
| `task.plan` | The plan a `human.approve` step handed over (an approved PRD). |
|
| `task.plan` | The plan a `workflow.approve` step handed over (an approved PRD). |
|
||||||
| `task.review` | The review comments a remediation round addresses. |
|
| `task.review` | The review comments a remediation round addresses. |
|
||||||
| `inputs.<name>` | A declared input; an undeclared one is refused at save. |
|
| `inputs.<name>` | A declared input; the server refuses an undeclared one at save. |
|
||||||
| `steps.<id>.summary` | What an earlier step reported, e.g. an agent's finish summary or a gate's output. |
|
| `steps.<id>.summary` | What an earlier step reported, e.g. an agent's finish summary or a gate's output. |
|
||||||
| `steps.<id>.result.<field>` | A field of an earlier agent's structured result, or an output of an earlier `workflow.call` that waits. A field the agent's `result` schema or the callee's `outputs` does not declare is refused at save. |
|
| `steps.<id>.result.<field>` | A field of an earlier agent's structured result, or an output of an earlier `workflow.call` that waits. At save, the server refuses a field that the agent's `result` schema or the callee's `outputs` does not declare. |
|
||||||
|
|
||||||
Only earlier steps may be referenced; a reference to a later or unknown step is
|
Reference only earlier steps; the server refuses a reference to a later or
|
||||||
refused when the definition is saved. A value that does not exist at run time
|
unknown step on save. A value that does not exist at run time (for instance, a
|
||||||
(for instance, a step that was skipped) renders empty.
|
step the run skipped) renders empty.
|
||||||
|
|
||||||
### Conditions
|
### Conditions
|
||||||
|
|
||||||
@@ -109,17 +107,16 @@ it. Parallel steps do not nest, and need at least two branches.
|
|||||||
### How a run ends
|
### How a run ends
|
||||||
|
|
||||||
A run ends at the first step that sets an outcome: `workflow.finish`,
|
A run ends at the first step that sets an outcome: `workflow.finish`,
|
||||||
`workflow.handoff`, `human.approve`, `repo.open-pr`, `repo.commit` with
|
`workflow.handoff`, `workflow.approve`, `repo.open-pr`, `repo.commit` with
|
||||||
`if_empty: complete`, or `review.reply`. A run that reaches the end of its steps
|
`if_empty: complete`, or `review.reply`. A run that reaches the end of its steps
|
||||||
completes, with the last step's summary as its detail. A step that fails parks
|
completes, with the last step's summary as its detail. A step that fails parks
|
||||||
the run unless it continues on failure.
|
the run unless it continues on failure.
|
||||||
|
|
||||||
A parked run can be retried from a top-level step instead of from the start.
|
An operator can retry a parked run from a top-level step instead of from the
|
||||||
The steps before it are skipped and their results stay available to
|
start. The run skips the steps before it and keeps their results available to
|
||||||
references. The resume point is named by the step's id (else its type), so
|
references. The step's id (else its type) names the resume point, so give an id
|
||||||
give an id to any step whose type appears twice. A run with a repository
|
to any step whose type appears twice. A run with a repository resumes only on
|
||||||
resumes only on its pushed branch: work an earlier step did not push is not
|
its pushed branch: work an earlier step did not push is not there.
|
||||||
there.
|
|
||||||
|
|
||||||
## Step types
|
## Step types
|
||||||
|
|
||||||
@@ -131,11 +128,11 @@ _runs without a repository._
|
|||||||
|---|---|---|
|
|---|---|---|
|
||||||
| `extra_rules` | text | Appended to the agent system prompt. |
|
| `extra_rules` | text | Appended to the agent system prompt. |
|
||||||
| `gate` | `repository` \| `test-failure` | Hold the agent to the repository gate before it may finish; test-failure requires the tests to fail. |
|
| `gate` | `repository` \| `test-failure` | Hold the agent to the repository gate before it may finish; test-failure requires the tests to fail. |
|
||||||
| `mission` | text | What the agent is asked to do. May reference {{ task.* }}, {{ inputs.* }} and {{ steps.<id>.* }}. |
|
| `mission` | text | What the step asks the agent to do. May reference {{ task.* }}, {{ inputs.* }} and {{ steps.<id>.* }}. |
|
||||||
| `protect_tests` | bool | Write-block the repository test files. |
|
| `protect_tests` | bool | Write-block the repository test files. |
|
||||||
| `read_only` | bool | Restrict the agent to read-only tools. |
|
| `read_only` | bool | Restrict the agent to read-only tools. |
|
||||||
| `result` | mapping | A JSON Schema object the agent must return; later steps read it as steps.<id>.result. |
|
| `result` | mapping | A JSON Schema object the agent must return; later steps read it as steps.<id>.result. |
|
||||||
| `role` | text | Which configured model role runs the agent, e.g. builder or planner. Empty means builder. |
|
| `model` | text | A model alias configured under Settings > Agent models, such as `fast`. Omit it or use `default` to select the organisation's default agent model. |
|
||||||
|
|
||||||
### `command.run`
|
### `command.run`
|
||||||
|
|
||||||
@@ -157,6 +154,15 @@ _needs a repository._
|
|||||||
| `push` | bool | Push the branch after committing. |
|
| `push` | bool | Push the branch after committing. |
|
||||||
| `reference` | `Fixes` \| `Implements` \| `Refs` | How the commit links to the task issue. |
|
| `reference` | `Fixes` \| `Implements` \| `Refs` | How the commit links to the task issue. |
|
||||||
|
|
||||||
|
Hooks never run. go-git creates the commit, and it ignores `.git/hooks` and
|
||||||
|
`core.hooksPath`; the agent never runs git, so `pre-commit`, `commit-msg` and
|
||||||
|
`prepare-commit-msg` in the checkout are inert files. A
|
||||||
|
repository whose rules live only in a hook (a formatter, a secret scanner,
|
||||||
|
commitlint, a DCO trailer) gets a commit that does not satisfy them. The run
|
||||||
|
reports success, but the pull request fails the check afterwards. Put the same
|
||||||
|
commands in `command.run` or the repository gate, which both run in the task
|
||||||
|
container before this step.
|
||||||
|
|
||||||
### `repo.open-pr`
|
### `repo.open-pr`
|
||||||
|
|
||||||
_needs a repository._
|
_needs a repository._
|
||||||
@@ -174,6 +180,18 @@ _needs a repository._
|
|||||||
|---|---|---|
|
|---|---|---|
|
||||||
| `branch` | `fresh` \| `task` | fresh starts a new branch from the base; task resumes the branch this task pushed. |
|
| `branch` | `fresh` \| `task` | fresh starts a new branch from the base; task resumes the branch this task pushed. |
|
||||||
|
|
||||||
|
### `repo.tooling`
|
||||||
|
|
||||||
|
_needs a repository._
|
||||||
|
|
||||||
|
No settings. It runs the repository policy's `tooling` commands, in order, in
|
||||||
|
the task worktree: the installs a gate needs and the container does not ship
|
||||||
|
(protoc plugins, linters, generators). A repository that declares none installs
|
||||||
|
nothing and the step succeeds. Place it after `repo.prepare` and before any
|
||||||
|
`gate.*` step. A failing install fails the step with the command and its output,
|
||||||
|
and says the gate did not run, so a missing toolchain is not read as a red
|
||||||
|
repository.
|
||||||
|
|
||||||
### `gate.diff-rules`
|
### `gate.diff-rules`
|
||||||
|
|
||||||
_needs a repository._
|
_needs a repository._
|
||||||
@@ -182,12 +200,6 @@ _needs a repository._
|
|||||||
|---|---|---|
|
|---|---|---|
|
||||||
| `rules` | list of mapping | Patterns the change must not match. |
|
| `rules` | list of mapping | Patterns the change must not match. |
|
||||||
|
|
||||||
### `gate.diff-size`
|
|
||||||
|
|
||||||
_needs a repository._
|
|
||||||
|
|
||||||
No settings.
|
|
||||||
|
|
||||||
### `gate.repository`
|
### `gate.repository`
|
||||||
|
|
||||||
_needs a repository._
|
_needs a repository._
|
||||||
@@ -212,13 +224,30 @@ _runs without a repository._
|
|||||||
| `body` | text | The comment text. |
|
| `body` | text | The comment text. |
|
||||||
| `on` | `issue` \| `pr` | Comment on the issue or the pull request. Empty means issue. |
|
| `on` | `issue` \| `pr` | Comment on the issue or the pull request. Empty means issue. |
|
||||||
|
|
||||||
### `human.approve`
|
### `message.send`
|
||||||
|
|
||||||
|
_runs without a repository._
|
||||||
|
|
||||||
|
Sends text to one chat on a messaging channel the workflow's organisation owns,
|
||||||
|
and a package's workflow may not send. A test run records the message instead
|
||||||
|
of sending it.
|
||||||
|
|
||||||
|
| Setting | Type | Meaning |
|
||||||
|
|---|---|---|
|
||||||
|
| `channel` | text | The messaging channel to send through. |
|
||||||
|
| `chat_id` | text | The channel's identifier for the chat. |
|
||||||
|
| `text` | text | The message. The run fills in references. |
|
||||||
|
|
||||||
|
A scheduled message is a schedule bound to a workflow whose only step is
|
||||||
|
`message.send`.
|
||||||
|
|
||||||
|
### `workflow.approve`
|
||||||
|
|
||||||
_runs without a repository._
|
_runs without a repository._
|
||||||
|
|
||||||
| Setting | Type | Meaning |
|
| Setting | Type | Meaning |
|
||||||
|---|---|---|
|
|---|---|---|
|
||||||
| `plan` | text | What the human decides on; the next workflow reads it as task.plan. |
|
| `plan` | text | What the operator decides on; the next workflow reads it as task.plan. |
|
||||||
| `then` | text | The workflow the task runs once approved. |
|
| `then` | text | The workflow the task runs once approved. |
|
||||||
|
|
||||||
### `review.pr`
|
### `review.pr`
|
||||||
@@ -247,11 +276,15 @@ _runs without a repository._
|
|||||||
|
|
||||||
| Setting | Type | Meaning |
|
| Setting | Type | Meaning |
|
||||||
|---|---|---|
|
|---|---|---|
|
||||||
| `inputs` | mapping | |
|
| `inputs` | mapping | Callee input names mapped to scalar literals or `inputs.<name>` references to caller inputs. |
|
||||||
| `outputs` | mapping | |
|
| `outputs` | mapping | Callee output names mapped to `outputs.<name>` references to caller outputs; requires `wait: true`. |
|
||||||
| `wait` | bool | Wait for the child run to finish before continuing. |
|
| `wait` | bool | Wait for the child run to finish before continuing. |
|
||||||
| `workflow` | text | The workflow to start as a child run. |
|
| `workflow` | text | The workflow to start as a child run. |
|
||||||
|
|
||||||
|
The step must declare an `id`: the step's id is the key of the call it starts,
|
||||||
|
so a retry of that call site returns the child already started instead of
|
||||||
|
starting a second one.
|
||||||
|
|
||||||
### `workflow.finish`
|
### `workflow.finish`
|
||||||
|
|
||||||
_runs without a repository._
|
_runs without a repository._
|
||||||
@@ -259,7 +292,7 @@ _runs without a repository._
|
|||||||
| Setting | Type | Meaning |
|
| Setting | Type | Meaning |
|
||||||
|---|---|---|
|
|---|---|---|
|
||||||
| `detail` | text | What the operator reads about the outcome. |
|
| `detail` | text | What the operator reads about the outcome. |
|
||||||
| `status` | `completed` \| `parked` \| `waiting_human` \| `declined` | How the run ends. Empty means completed. |
|
| `status` | `completed` \| `parked` \| `waiting_approval` \| `declined` | How the run ends. Empty means completed. |
|
||||||
|
|
||||||
### `workflow.handoff`
|
### `workflow.handoff`
|
||||||
|
|
||||||
@@ -267,27 +300,34 @@ _runs without a repository._
|
|||||||
|
|
||||||
| Setting | Type | Meaning |
|
| Setting | Type | Meaning |
|
||||||
|---|---|---|
|
|---|---|---|
|
||||||
| `detail` | text | Why the task was handed off. |
|
| `detail` | text | Why the workflow handed off the task. |
|
||||||
| `workflow` | text | The workflow the task is requeued under. |
|
| `workflow` | text | The workflow the handoff requeues the task under. |
|
||||||
|
|
||||||
`command.run` commands are `{name, argv, expect_failure}`: `argv` is the
|
`command.run` commands are `{name, argv, expect_failure}`: `argv` is the
|
||||||
program and its arguments, and `expect_failure` requires a non-zero exit.
|
program and its arguments, and `expect_failure` requires a non-zero exit.
|
||||||
|
|
||||||
`gate.diff-rules` rules are `{id, level, pattern, path, exclude_path, message}`:
|
`gate.diff-rules` rules are `{id, level, pattern, path, exclude_path, message}`:
|
||||||
`level` (`error` blocks, `warn` reports) and `pattern` (an RE2 expression matched
|
the step requires `level` (`error` blocks, `warn` reports) and `pattern` (an RE2
|
||||||
against each added line) are required; `path` and `exclude_path` are RE2
|
expression the gate matches against each added line); `path` and `exclude_path`
|
||||||
expressions that limit which files the rule applies to.
|
are RE2 expressions that limit which files the rule applies to.
|
||||||
|
|
||||||
## What starts a workflow
|
## What starts a workflow
|
||||||
|
|
||||||
- **Issues**, by label: `bug` runs `tdd`, `feature` runs `feasibility`, anything
|
- **Issues**, by label: the Issue routing setting lists label to workflow rules
|
||||||
else runs `triage`, which classifies it and hands off.
|
(first match wins) and a default for the rest. It starts as `bug` runs
|
||||||
|
`tdd`, `feature` runs `feasibility`, anything else runs `triage`, which
|
||||||
|
classifies it and hands off.
|
||||||
- **Event bindings**: a webhook source mapped onto a workflow and its inputs
|
- **Event bindings**: a webhook source mapped onto a workflow and its inputs
|
||||||
(Events page).
|
(Events page).
|
||||||
- **Playbooks**: a trigger (issue kind and labels) and actions that dispatch
|
- **Schedules**: the scheduler captures each firing on the reserved `schedule`
|
||||||
|
source as a `Schedule fired` event (`schedule_id`, `name`, `scheduled_for`,
|
||||||
|
`fired_at`). A schedule trigger is a binding on that source using the
|
||||||
|
`schedule-fired` mapping, filtered to one `schedule_id`. A firing starts at
|
||||||
|
most one task per binding.
|
||||||
|
- **Playbooks**: a trigger (issue labels) and actions that dispatch
|
||||||
workflows.
|
workflows.
|
||||||
- **Other workflows**: `workflow.call` (a child run), `workflow.handoff` (the
|
- **Other workflows**: `workflow.call` (a child run), `workflow.handoff` (the
|
||||||
same task, requeued), `human.approve` (once approved).
|
same task, requeued), `workflow.approve` (once approved).
|
||||||
- **By hand**: the New task form, or Run on the Workflows page.
|
- **By hand**: the New task form, or Run on the Workflows page.
|
||||||
|
|
||||||
The canvas Start node lists the triggers of each workflow.
|
The canvas Start node lists the triggers of each workflow.
|
||||||
+10827
File diff suppressed because it is too large.
Load diff
@@ -0,0 +1 @@
|
|||||||
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><rect width="512" height="512" rx="112" fill="#0e0f10"/><g fill="#51a580" transform="translate(96 96) scale(13.333) translate(-0 -0)"><path d="M2 21h4l8-18h-4z"/><path d="M14.9 5.03 22 21h-4l-5.1-11.47z"/><path d="M10.47 15h3.06l1.11 2.5H9.36z"/></g></svg>
|
||||||
|
After Width: | Height: | Size: 319 B |
@@ -0,0 +1 @@
|
|||||||
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="#51a580"><path d="M2 21h4l8-18h-4z"/><path d="M14.9 5.03 22 21h-4l-5.1-11.47z"/><path d="M10.47 15h3.06l1.11 2.5H9.36z"/></svg>
|
||||||
|
After Width: | Height: | Size: 194 B |
@@ -0,0 +1 @@
|
|||||||
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 630"><rect width="1200" height="630" fill="#0e0f10"/><svg x="320" y="209.6153846153846" width="560" height="150.76923076923077" viewBox="-4 21.4 312 84"><g fill="#51a580" transform="translate(-7.7555555555555555 18.56666666666667) scale(3.8777777777777778)"><path d="M2 21h4l8-18h-4z"/><path d="M14.9 5.03 22 21h-4l-5.1-11.47z"/><path d="M10.47 15h3.06l1.11 2.5H9.36z"/></g><path fill="#e8e6e1" d="M99.76 68L99.76 100L86.96 100L86.96 47.80L99.76 47.80L99.76 58.60L100.26 58.60Q100.96 55.80 102.61 53.35Q104.26 50.90 107.11 49.35Q109.96 47.80 114.06 47.80L116.86 47.80L116.86 59.90L112.86 59.90Q108.56 59.90 105.61 60.75Q102.66 61.60 101.21 63.35Q99.76 65.10 99.76 68M145.86 101.20Q134.26 101.20 128.01 93.80Q121.76 86.40 121.76 73.80Q121.76 61.30 128.01 53.95Q134.26 46.60 145.86 46.60Q153.76 46.60 158.91 50.10Q164.06 53.60 166.36 59.80L155.86 64.50Q154.96 61.20 152.46 59.05Q149.96 56.90 145.86 56.90Q140.56 56.90 137.86 60.25Q135.16 63.60 135.16 69.20L135.16 78.70Q135.16 84.10 137.86 87.50Q140.56 90.90 145.86 90.90Q150.36 90.90 152.91 88.55Q155.46 86.20 156.86 82.70L166.66 87.40Q164.16 94.30 158.81 97.75Q153.46 101.20 145.86 101.20M188.36 100L175.56 100L175.56 26L188.36 26L188.36 56.50L188.86 56.50Q190.46 52.30 193.91 49.45Q197.36 46.60 203.46 46.60Q211.46 46.60 215.81 51.95Q220.16 57.30 220.16 67L220.16 100L207.36 100L207.36 68.30Q207.36 62.80 205.36 59.95Q203.36 57.10 198.76 57.10Q196.16 57.10 193.76 58.05Q191.36 59 189.86 60.85Q188.36 62.70 188.36 65.50M239.76 40.20Q235.86 40.20 234.06 38.35Q232.26 36.50 232.26 33.80L232.26 31.80Q232.26 29 234.06 27.20Q235.86 25.40 239.76 25.40Q243.66 25.40 245.46 27.20Q247.26 29 247.26 31.80L247.26 33.80Q247.26 36.50 245.46 38.35Q243.66 40.20 239.76 40.20M246.16 100L233.36 100L233.36 47.80L246.16 47.80M280.96 101.20Q273.26 101.20 267.76 97.85Q262.26 94.50 259.31 88.35Q256.36 82.20 256.36 73.80Q256.36 65.60 259.26 59.45Q262.16 53.30 267.56 49.95Q272.96 46.60 280.56 46.60Q288.76 46.60 294.01 50.20Q299.26 53.80 301.81 59.75Q304.36 65.70 304.36 72.90L304.36 77.10L269.66 77.10L269.66 78.40Q269.66 84 272.86 87.50Q276.06 91 282.36 91Q287.06 91 290.16 88.95Q293.26 86.90 295.66 83.90L302.56 91.60Q299.36 95.90 293.81 98.55Q288.26 101.20 280.96 101.20M280.76 56.20Q277.36 56.20 274.86 57.75Q272.36 59.30 271.01 62.05Q269.66 64.80 269.66 68.40L269.66 69.20L291.06 69.20L291.06 68.30Q291.06 64.60 289.86 61.95Q288.66 59.30 286.36 57.75Q284.06 56.20 280.76 56.20"/></svg><g fill="#a8a59f" transform="translate(224.91199999999998 460.38461538461536)"><path transform="translate(0.00 0)" d="M18.70-23.73L18.70-21.22L11.15-21.22L11.15 0L8.30 0L8.30-21.22L0.75-21.22L0.75-23.73"/><path transform="translate(19.45 0)" d="M5.61 0L2.89 0L2.89-25.16L5.61-25.16L5.61-14.69L5.75-14.69Q6.39-16.18 7.57-17.07Q8.74-17.95 10.71-17.95Q13.43-17.95 15.01-16.20Q16.59-14.45 16.59-11.25L16.59 0L13.87 0L13.87-10.78Q13.87-13.12 12.87-14.31Q11.87-15.50 9.89-15.50Q8.81-15.50 7.82-15.15Q6.83-14.79 6.22-14.04Q5.61-13.29 5.61-12.17"/><path transform="translate(38.76 0)" d="M9.49 0.41Q7.11 0.41 5.34-0.73Q3.57-1.87 2.58-3.93Q1.60-5.98 1.60-8.77Q1.60-11.56 2.58-13.62Q3.57-15.67 5.34-16.81Q7.11-17.95 9.49-17.95Q11.83-17.95 13.53-16.85Q15.23-15.74 16.15-13.80Q17.07-11.87 17.07-9.38L17.07-8.09L4.45-8.09L4.45-7.28Q4.45-5 5.83-3.49Q7.21-1.97 9.66-1.97Q11.32-1.97 12.56-2.75Q13.80-3.54 14.48-5L16.42-3.60Q15.57-1.84 13.77-0.71Q11.97 0.41 9.49 0.41M9.49-15.67Q8.02-15.67 6.89-14.99Q5.75-14.31 5.10-13.11Q4.45-11.90 4.45-10.37L4.45-10.13L14.14-10.13L14.14-10.51Q14.14-12.07 13.57-13.23Q12.99-14.38 11.93-15.03Q10.88-15.67 9.49-15.67"/><path transform="translate(57.43 0)" d=""/><path transform="translate(65.45 0)" d="M17.17-2.38L17.17 0L15.64 0Q14.55 0 13.87-0.46Q13.19-0.92 12.89-1.73Q12.68-2.24 12.61-2.86L12.44-2.86Q11.90-1.26 10.56-0.42Q9.21 0.41 7.38 0.41Q4.59 0.41 3.04-1.02Q1.50-2.45 1.50-4.90Q1.50-6.56 2.31-7.70Q3.13-8.84 4.78-9.44Q6.43-10.03 8.98-10.03L12.44-10.03L12.44-11.76Q12.44-13.63 11.42-14.62Q10.40-15.61 8.30-15.61Q6.73-15.61 5.64-14.89Q4.56-14.18 3.84-12.99L2.21-14.52Q2.92-15.91 4.49-16.93Q6.05-17.95 8.43-17.95Q11.59-17.95 13.38-16.39Q15.16-14.82 15.16-12.04L15.16-2.38L17.17-2.38M12.44-5.10L12.44-7.99L8.84-7.99Q6.53-7.99 5.44-7.31Q4.35-6.63 4.35-5.34L4.35-4.62Q4.35-3.33 5.30-2.62Q6.26-1.90 7.82-1.90Q9.18-1.90 10.22-2.33Q11.25-2.75 11.85-3.49Q12.44-4.22 12.44-5.10"/><path transform="translate(83.61 0)" d="M17.68 1.94Q17.68 3.74 16.73 4.91Q15.78 6.09 13.89 6.65Q12 7.21 9.18 7.21Q6.46 7.21 4.74 6.70Q3.03 6.19 2.24 5.22Q1.46 4.25 1.46 2.89Q1.46 1.46 2.21 0.65Q2.96-0.17 4.25-0.51L4.25-0.88Q3.50-1.26 3.09-1.85Q2.69-2.45 2.69-3.33Q2.69-4.66 3.54-5.36Q4.39-6.05 5.71-6.39L5.71-6.53Q4.15-7.28 3.28-8.67Q2.41-10.06 2.41-11.90Q2.41-13.70 3.23-15.06Q4.05-16.42 5.54-17.19Q7.04-17.95 9.01-17.95Q9.96-17.95 10.79-17.78Q11.63-17.61 12.34-17.27L12.34-17.58Q12.34-18.60 12.82-19.26Q13.29-19.92 14.38-19.92L17-19.92L17-17.54L13.67-17.54L13.67-16.42Q14.62-15.61 15.15-14.45Q15.67-13.29 15.67-11.90Q15.67-Line truncated
|
||||||
|
After Width: | Height: | Size: 20 KiB |
@@ -0,0 +1 @@
|
|||||||
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="-4 21.40 312 84" role="img" aria-label="Archie"><title>Archie</title><g fill="#51a580" transform="translate(-7.7555555555555555 18.56666666666667) scale(3.8777777777777778)"><path d="M2 21h4l8-18h-4z"/><path d="M14.9 5.03 22 21h-4l-5.1-11.47z"/><path d="M10.47 15h3.06l1.11 2.5H9.36z"/></g><path fill="#e8e6e1" d="M99.76 68L99.76 100L86.96 100L86.96 47.80L99.76 47.80L99.76 58.60L100.26 58.60Q100.96 55.80 102.61 53.35Q104.26 50.90 107.11 49.35Q109.96 47.80 114.06 47.80L116.86 47.80L116.86 59.90L112.86 59.90Q108.56 59.90 105.61 60.75Q102.66 61.60 101.21 63.35Q99.76 65.10 99.76 68M145.86 101.20Q134.26 101.20 128.01 93.80Q121.76 86.40 121.76 73.80Q121.76 61.30 128.01 53.95Q134.26 46.60 145.86 46.60Q153.76 46.60 158.91 50.10Q164.06 53.60 166.36 59.80L155.86 64.50Q154.96 61.20 152.46 59.05Q149.96 56.90 145.86 56.90Q140.56 56.90 137.86 60.25Q135.16 63.60 135.16 69.20L135.16 78.70Q135.16 84.10 137.86 87.50Q140.56 90.90 145.86 90.90Q150.36 90.90 152.91 88.55Q155.46 86.20 156.86 82.70L166.66 87.40Q164.16 94.30 158.81 97.75Q153.46 101.20 145.86 101.20M188.36 100L175.56 100L175.56 26L188.36 26L188.36 56.50L188.86 56.50Q190.46 52.30 193.91 49.45Q197.36 46.60 203.46 46.60Q211.46 46.60 215.81 51.95Q220.16 57.30 220.16 67L220.16 100L207.36 100L207.36 68.30Q207.36 62.80 205.36 59.95Q203.36 57.10 198.76 57.10Q196.16 57.10 193.76 58.05Q191.36 59 189.86 60.85Q188.36 62.70 188.36 65.50M239.76 40.20Q235.86 40.20 234.06 38.35Q232.26 36.50 232.26 33.80L232.26 31.80Q232.26 29 234.06 27.20Q235.86 25.40 239.76 25.40Q243.66 25.40 245.46 27.20Q247.26 29 247.26 31.80L247.26 33.80Q247.26 36.50 245.46 38.35Q243.66 40.20 239.76 40.20M246.16 100L233.36 100L233.36 47.80L246.16 47.80M280.96 101.20Q273.26 101.20 267.76 97.85Q262.26 94.50 259.31 88.35Q256.36 82.20 256.36 73.80Q256.36 65.60 259.26 59.45Q262.16 53.30 267.56 49.95Q272.96 46.60 280.56 46.60Q288.76 46.60 294.01 50.20Q299.26 53.80 301.81 59.75Q304.36 65.70 304.36 72.90L304.36 77.10L269.66 77.10L269.66 78.40Q269.66 84 272.86 87.50Q276.06 91 282.36 91Q287.06 91 290.16 88.95Q293.26 86.90 295.66 83.90L302.56 91.60Q299.36 95.90 293.81 98.55Q288.26 101.20 280.96 101.20M280.76 56.20Q277.36 56.20 274.86 57.75Q272.36 59.30 271.01 62.05Q269.66 64.80 269.66 68.40L269.66 69.20L291.06 69.20L291.06 68.30Q291.06 64.60 289.86 61.95Q288.66 59.30 286.36 57.75Q284.06 56.20 280.76 56.20"/></svg>
|
||||||
|
After Width: | Height: | Size: 2.3 KiB |
@@ -0,0 +1 @@
|
|||||||
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="-4 21.40 312 84" role="img" aria-label="Archie"><title>Archie</title><g fill="currentColor" transform="translate(-7.7555555555555555 18.56666666666667) scale(3.8777777777777778)"><path d="M2 21h4l8-18h-4z"/><path d="M14.9 5.03 22 21h-4l-5.1-11.47z"/><path d="M10.47 15h3.06l1.11 2.5H9.36z"/></g><path fill="currentColor" d="M99.76 68L99.76 100L86.96 100L86.96 47.80L99.76 47.80L99.76 58.60L100.26 58.60Q100.96 55.80 102.61 53.35Q104.26 50.90 107.11 49.35Q109.96 47.80 114.06 47.80L116.86 47.80L116.86 59.90L112.86 59.90Q108.56 59.90 105.61 60.75Q102.66 61.60 101.21 63.35Q99.76 65.10 99.76 68M145.86 101.20Q134.26 101.20 128.01 93.80Q121.76 86.40 121.76 73.80Q121.76 61.30 128.01 53.95Q134.26 46.60 145.86 46.60Q153.76 46.60 158.91 50.10Q164.06 53.60 166.36 59.80L155.86 64.50Q154.96 61.20 152.46 59.05Q149.96 56.90 145.86 56.90Q140.56 56.90 137.86 60.25Q135.16 63.60 135.16 69.20L135.16 78.70Q135.16 84.10 137.86 87.50Q140.56 90.90 145.86 90.90Q150.36 90.90 152.91 88.55Q155.46 86.20 156.86 82.70L166.66 87.40Q164.16 94.30 158.81 97.75Q153.46 101.20 145.86 101.20M188.36 100L175.56 100L175.56 26L188.36 26L188.36 56.50L188.86 56.50Q190.46 52.30 193.91 49.45Q197.36 46.60 203.46 46.60Q211.46 46.60 215.81 51.95Q220.16 57.30 220.16 67L220.16 100L207.36 100L207.36 68.30Q207.36 62.80 205.36 59.95Q203.36 57.10 198.76 57.10Q196.16 57.10 193.76 58.05Q191.36 59 189.86 60.85Q188.36 62.70 188.36 65.50M239.76 40.20Q235.86 40.20 234.06 38.35Q232.26 36.50 232.26 33.80L232.26 31.80Q232.26 29 234.06 27.20Q235.86 25.40 239.76 25.40Q243.66 25.40 245.46 27.20Q247.26 29 247.26 31.80L247.26 33.80Q247.26 36.50 245.46 38.35Q243.66 40.20 239.76 40.20M246.16 100L233.36 100L233.36 47.80L246.16 47.80M280.96 101.20Q273.26 101.20 267.76 97.85Q262.26 94.50 259.31 88.35Q256.36 82.20 256.36 73.80Q256.36 65.60 259.26 59.45Q262.16 53.30 267.56 49.95Q272.96 46.60 280.56 46.60Q288.76 46.60 294.01 50.20Q299.26 53.80 301.81 59.75Q304.36 65.70 304.36 72.90L304.36 77.10L269.66 77.10L269.66 78.40Q269.66 84 272.86 87.50Q276.06 91 282.36 91Q287.06 91 290.16 88.95Q293.26 86.90 295.66 83.90L302.56 91.60Q299.36 95.90 293.81 98.55Q288.26 101.20 280.96 101.20M280.76 56.20Q277.36 56.20 274.86 57.75Q272.36 59.30 271.01 62.05Q269.66 64.80 269.66 68.40L269.66 69.20L291.06 69.20L291.06 68.30Q291.06 64.60 289.86 61.95Q288.66 59.30 286.36 57.75Q284.06 56.20 280.76 56.20"/></svg>
|
||||||
|
After Width: | Height: | Size: 2.3 KiB |
@@ -0,0 +1 @@
|
|||||||
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="-4 21.40 312 84" role="img" aria-label="Archie"><title>Archie</title><g fill="#51a580" transform="translate(-7.7555555555555555 18.56666666666667) scale(3.8777777777777778)"><path d="M2 21h4l8-18h-4z"/><path d="M14.9 5.03 22 21h-4l-5.1-11.47z"/><path d="M10.47 15h3.06l1.11 2.5H9.36z"/></g><path fill="#1f1f1d" d="M99.76 68L99.76 100L86.96 100L86.96 47.80L99.76 47.80L99.76 58.60L100.26 58.60Q100.96 55.80 102.61 53.35Q104.26 50.90 107.11 49.35Q109.96 47.80 114.06 47.80L116.86 47.80L116.86 59.90L112.86 59.90Q108.56 59.90 105.61 60.75Q102.66 61.60 101.21 63.35Q99.76 65.10 99.76 68M145.86 101.20Q134.26 101.20 128.01 93.80Q121.76 86.40 121.76 73.80Q121.76 61.30 128.01 53.95Q134.26 46.60 145.86 46.60Q153.76 46.60 158.91 50.10Q164.06 53.60 166.36 59.80L155.86 64.50Q154.96 61.20 152.46 59.05Q149.96 56.90 145.86 56.90Q140.56 56.90 137.86 60.25Q135.16 63.60 135.16 69.20L135.16 78.70Q135.16 84.10 137.86 87.50Q140.56 90.90 145.86 90.90Q150.36 90.90 152.91 88.55Q155.46 86.20 156.86 82.70L166.66 87.40Q164.16 94.30 158.81 97.75Q153.46 101.20 145.86 101.20M188.36 100L175.56 100L175.56 26L188.36 26L188.36 56.50L188.86 56.50Q190.46 52.30 193.91 49.45Q197.36 46.60 203.46 46.60Q211.46 46.60 215.81 51.95Q220.16 57.30 220.16 67L220.16 100L207.36 100L207.36 68.30Q207.36 62.80 205.36 59.95Q203.36 57.10 198.76 57.10Q196.16 57.10 193.76 58.05Q191.36 59 189.86 60.85Q188.36 62.70 188.36 65.50M239.76 40.20Q235.86 40.20 234.06 38.35Q232.26 36.50 232.26 33.80L232.26 31.80Q232.26 29 234.06 27.20Q235.86 25.40 239.76 25.40Q243.66 25.40 245.46 27.20Q247.26 29 247.26 31.80L247.26 33.80Q247.26 36.50 245.46 38.35Q243.66 40.20 239.76 40.20M246.16 100L233.36 100L233.36 47.80L246.16 47.80M280.96 101.20Q273.26 101.20 267.76 97.85Q262.26 94.50 259.31 88.35Q256.36 82.20 256.36 73.80Q256.36 65.60 259.26 59.45Q262.16 53.30 267.56 49.95Q272.96 46.60 280.56 46.60Q288.76 46.60 294.01 50.20Q299.26 53.80 301.81 59.75Q304.36 65.70 304.36 72.90L304.36 77.10L269.66 77.10L269.66 78.40Q269.66 84 272.86 87.50Q276.06 91 282.36 91Q287.06 91 290.16 88.95Q293.26 86.90 295.66 83.90L302.56 91.60Q299.36 95.90 293.81 98.55Q288.26 101.20 280.96 101.20M280.76 56.20Q277.36 56.20 274.86 57.75Q272.36 59.30 271.01 62.05Q269.66 64.80 269.66 68.40L269.66 69.20L291.06 69.20L291.06 68.30Q291.06 64.60 289.86 61.95Q288.66 59.30 286.36 57.75Q284.06 56.20 280.76 56.20"/></svg>
|
||||||
|
After Width: | Height: | Size: 2.3 KiB |
@@ -1,9 +0,0 @@
|
|||||||
package configtemplate
|
|
||||||
|
|
||||||
import _ "embed"
|
|
||||||
|
|
||||||
// Changelog is the verbatim contents of CHANGELOG.md, so a binary carries the
|
|
||||||
// release notes for the version it was built as.
|
|
||||||
//
|
|
||||||
//go:embed CHANGELOG.md
|
|
||||||
var Changelog string
|
|
||||||
+29
-47
@@ -3,6 +3,7 @@ package main
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
|
"encoding/base64"
|
||||||
"errors"
|
"errors"
|
||||||
"flag"
|
"flag"
|
||||||
"fmt"
|
"fmt"
|
||||||
@@ -15,6 +16,8 @@ import (
|
|||||||
"syscall"
|
"syscall"
|
||||||
|
|
||||||
"github.com/samcharles93/archie-core/internal/app/agentworker"
|
"github.com/samcharles93/archie-core/internal/app/agentworker"
|
||||||
|
"github.com/samcharles93/archie-core/internal/infrastructure/egress"
|
||||||
|
"github.com/samcharles93/archie-core/internal/logging"
|
||||||
)
|
)
|
||||||
|
|
||||||
type workerRunner func(context.Context, agentworker.Settings, *slog.Logger) error
|
type workerRunner func(context.Context, agentworker.Settings, *slog.Logger) error
|
||||||
@@ -31,29 +34,36 @@ func runCommand(args []string, getenv func(string) string, stderr io.Writer, run
|
|||||||
if len(args) > 0 && args[0] == "relay" {
|
if len(args) > 0 && args[0] == "relay" {
|
||||||
return runRelay(args[1:], stderr, agentworker.RunRelay)
|
return runRelay(args[1:], stderr, agentworker.RunRelay)
|
||||||
}
|
}
|
||||||
if len(args) > 0 && args[0] == "mcp" {
|
|
||||||
return runMCP(args[1:], stderr, agentworker.RunCaptureMCP)
|
|
||||||
}
|
|
||||||
flags := flag.NewFlagSet("archie-agent", flag.ContinueOnError)
|
flags := flag.NewFlagSet("archie-agent", flag.ContinueOnError)
|
||||||
flags.SetOutput(stderr)
|
flags.SetOutput(stderr)
|
||||||
natsURLFlag := flags.String("nats-url", "", "NATS server URL (defaults to NATS_URL)")
|
natsURLFlag := flags.String("nats-url", "", "NATS server URL (defaults to NATS_URL)")
|
||||||
stateStoreURLFlag := flags.String("state-store-url", "", "State Store gRPC target (defaults to STATE_STORE_URL; required -- the legacy NATS storerpc path is deleted)")
|
stateStoreURLFlag := flags.String("state-store-url", "", "State Store gRPC target (defaults to STATE_STORE_URL; required -- the legacy NATS storerpc path is deleted)")
|
||||||
stateStoreTokenFlag := flags.String("state-store-token", "", "State Store bearer token (defaults to STATE_STORE_TOKEN)")
|
stateStoreTokenFlag := flags.String("state-store-token", "", "State Store bearer token (defaults to STATE_STORE_TOKEN)")
|
||||||
|
showVersion := flags.Bool("version", false, "print the version and exit")
|
||||||
if err := flags.Parse(args); err != nil {
|
if err := flags.Parse(args); err != nil {
|
||||||
if errors.Is(err, flag.ErrHelp) {
|
if errors.Is(err, flag.ErrHelp) {
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
return 2
|
return 2
|
||||||
}
|
}
|
||||||
|
// The release and its updater read this line to prove a shipped
|
||||||
|
// archie-agent belongs to the release being installed.
|
||||||
|
if *showVersion {
|
||||||
|
fmt.Printf("archie-agent %s\n", agentworker.Version())
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
natsURL, natsToken := natsConnectionSettings(*natsURLFlag, getenv)
|
natsURL := *natsURLFlag
|
||||||
if natsURL == "" {
|
if natsURL == "" {
|
||||||
fmt.Fprintln(stderr, "error: -nats-url or NATS_URL is required")
|
natsURL = getenv("NATS_URL")
|
||||||
|
}
|
||||||
|
if natsURL == "" {
|
||||||
|
_, _ = fmt.Fprintln(stderr, "error: -nats-url or NATS_URL is required")
|
||||||
flags.Usage()
|
flags.Usage()
|
||||||
return 1
|
return 1
|
||||||
}
|
}
|
||||||
|
|
||||||
log := slog.New(slog.NewJSONHandler(stderr, nil))
|
log := slog.New(logging.WithTrace(slog.NewJSONHandler(stderr, nil)))
|
||||||
ctx, stop := signal.NotifyContext(context.Background(), os.Interrupt, syscall.SIGTERM)
|
ctx, stop := signal.NotifyContext(context.Background(), os.Interrupt, syscall.SIGTERM)
|
||||||
defer stop()
|
defer stop()
|
||||||
|
|
||||||
@@ -62,7 +72,7 @@ func runCommand(args []string, getenv func(string) string, stderr io.Writer, run
|
|||||||
stateStoreURL = getenv("STATE_STORE_URL")
|
stateStoreURL = getenv("STATE_STORE_URL")
|
||||||
}
|
}
|
||||||
if stateStoreURL == "" {
|
if stateStoreURL == "" {
|
||||||
fmt.Fprintln(stderr, "error: -state-store-url or STATE_STORE_URL is required (the legacy NATS storerpc path is deleted)")
|
_, _ = fmt.Fprintln(stderr, "error: -state-store-url or STATE_STORE_URL is required (the legacy NATS storerpc path is deleted)")
|
||||||
flags.Usage()
|
flags.Usage()
|
||||||
return 1
|
return 1
|
||||||
}
|
}
|
||||||
@@ -71,25 +81,26 @@ func runCommand(args []string, getenv func(string) string, stderr io.Writer, run
|
|||||||
stateStoreToken = getenv("STATE_STORE_TOKEN")
|
stateStoreToken = getenv("STATE_STORE_TOKEN")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
stateStoreCA, err := base64.StdEncoding.DecodeString(getenv("STATE_STORE_CA_BASE64"))
|
||||||
|
if err != nil {
|
||||||
|
_, _ = fmt.Fprintf(stderr, "error: STATE_STORE_CA_BASE64: %v\n", err)
|
||||||
|
return 1
|
||||||
|
}
|
||||||
|
|
||||||
if err := runWorker(ctx, agentworker.Settings{
|
if err := runWorker(ctx, agentworker.Settings{
|
||||||
NATSURL: natsURL,
|
NATSURL: natsURL,
|
||||||
NATSToken: natsToken,
|
|
||||||
StateStoreTarget: stateStoreURL,
|
StateStoreTarget: stateStoreURL,
|
||||||
StateStoreToken: stateStoreToken,
|
StateStoreToken: stateStoreToken,
|
||||||
|
StateStoreCA: stateStoreCA,
|
||||||
|
ModelProxy: getenv(egress.ModelProxyEnv),
|
||||||
|
ModelProxyHosts: egress.ParseHosts(getenv(egress.ModelProxyHostsEnv)),
|
||||||
|
ModelProxyCA: getenv(egress.ModelProxyCAEnv),
|
||||||
}, log); err != nil {
|
}, log); err != nil {
|
||||||
return 1
|
return 1
|
||||||
}
|
}
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
func natsConnectionSettings(flagURL string, getenv func(string) string) (url, token string) {
|
|
||||||
url = flagURL
|
|
||||||
if url == "" {
|
|
||||||
url = getenv("NATS_URL")
|
|
||||||
}
|
|
||||||
return url, getenv("NATS_TOKEN")
|
|
||||||
}
|
|
||||||
|
|
||||||
type relayServer func(ctx context.Context, forwards map[string]string) error
|
type relayServer func(ctx context.Context, forwards map[string]string) error
|
||||||
|
|
||||||
// runRelay is the sandbox egress relay: the container on both a sandbox's
|
// runRelay is the sandbox egress relay: the container on both a sandbox's
|
||||||
@@ -123,43 +134,14 @@ func runRelay(args []string, stderr io.Writer, serve relayServer) int {
|
|||||||
return 2
|
return 2
|
||||||
}
|
}
|
||||||
if len(forwards) == 0 {
|
if len(forwards) == 0 {
|
||||||
fmt.Fprintln(stderr, "error: at least one -forward is required")
|
_, _ = fmt.Fprintln(stderr, "error: at least one -forward is required")
|
||||||
flags.Usage()
|
flags.Usage()
|
||||||
return 1
|
return 1
|
||||||
}
|
}
|
||||||
ctx, stop := signal.NotifyContext(context.Background(), os.Interrupt, syscall.SIGTERM)
|
ctx, stop := signal.NotifyContext(context.Background(), os.Interrupt, syscall.SIGTERM)
|
||||||
defer stop()
|
defer stop()
|
||||||
if err := serve(ctx, forwards); err != nil {
|
if err := serve(ctx, forwards); err != nil {
|
||||||
fmt.Fprintln(stderr, "error:", err)
|
_, _ = fmt.Fprintln(stderr, "error:", err)
|
||||||
return 1
|
|
||||||
}
|
|
||||||
return 0
|
|
||||||
}
|
|
||||||
|
|
||||||
type mcpServer func(ctx context.Context, specPath, capturesPath string) error
|
|
||||||
|
|
||||||
// runMCP serves a stage's capture tools to a harness over stdio. The
|
|
||||||
// harness starts it, so it runs as the harness user and holds no secrets.
|
|
||||||
func runMCP(args []string, stderr io.Writer, serve mcpServer) int {
|
|
||||||
flags := flag.NewFlagSet("archie-agent mcp", flag.ContinueOnError)
|
|
||||||
flags.SetOutput(stderr)
|
|
||||||
spec := flags.String("spec", "", "JSON file listing the stage's capture tools")
|
|
||||||
captures := flags.String("captures", "", "file accepted capture calls are appended to")
|
|
||||||
if err := flags.Parse(args); err != nil {
|
|
||||||
if errors.Is(err, flag.ErrHelp) {
|
|
||||||
return 0
|
|
||||||
}
|
|
||||||
return 2
|
|
||||||
}
|
|
||||||
if *spec == "" || *captures == "" {
|
|
||||||
fmt.Fprintln(stderr, "error: -spec and -captures are required")
|
|
||||||
flags.Usage()
|
|
||||||
return 1
|
|
||||||
}
|
|
||||||
ctx, stop := signal.NotifyContext(context.Background(), os.Interrupt, syscall.SIGTERM)
|
|
||||||
defer stop()
|
|
||||||
if err := serve(ctx, *spec, *captures); err != nil {
|
|
||||||
fmt.Fprintln(stderr, "error:", err)
|
|
||||||
return 1
|
return 1
|
||||||
}
|
}
|
||||||
return 0
|
return 0
|
||||||
|
|||||||
@@ -22,7 +22,6 @@ func run() int {
|
|||||||
flag.StringVar(&options.Config, "config", configuration.DefaultConfigPath(), "configuration file or directory")
|
flag.StringVar(&options.Config, "config", configuration.DefaultConfigPath(), "configuration file or directory")
|
||||||
flag.StringVar(&options.Overlay, "config-overlay", "", "configuration overlay file or directory")
|
flag.StringVar(&options.Overlay, "config-overlay", "", "configuration overlay file or directory")
|
||||||
flag.StringVar(&options.Listen, "listen", "", "gateway gRPC listen address (defaults to [services.gateway].listen, else 127.0.0.1:8585)")
|
flag.StringVar(&options.Listen, "listen", "", "gateway gRPC listen address (defaults to [services.gateway].listen, else 127.0.0.1:8585)")
|
||||||
flag.StringVar(&options.Token, "token", "", "Bearer [REDACTED] required for a non-loopback listener (defaults to [services.gateway].target_token)")
|
|
||||||
flag.Parse()
|
flag.Parse()
|
||||||
showVersion()
|
showVersion()
|
||||||
ctx, stop := signal.NotifyContext(context.Background(), os.Interrupt, syscall.SIGTERM)
|
ctx, stop := signal.NotifyContext(context.Background(), os.Interrupt, syscall.SIGTERM)
|
||||||
|
|||||||
@@ -23,11 +23,8 @@ func run() int {
|
|||||||
flag.StringVar(&options.Config, "config", configuration.DefaultConfigPath(), "configuration file or directory")
|
flag.StringVar(&options.Config, "config", configuration.DefaultConfigPath(), "configuration file or directory")
|
||||||
flag.StringVar(&options.Overlay, "config-overlay", "", "configuration overlay file or directory")
|
flag.StringVar(&options.Overlay, "config-overlay", "", "configuration overlay file or directory")
|
||||||
flag.StringVar(&options.Gateway.Target, "gateway-target", "", "archie-gateway gRPC address (defaults to [services.gateway].target, else 127.0.0.1:8585)")
|
flag.StringVar(&options.Gateway.Target, "gateway-target", "", "archie-gateway gRPC address (defaults to [services.gateway].target, else 127.0.0.1:8585)")
|
||||||
flag.StringVar(&options.Gateway.Token, "gateway-token", "", "bearer token presented to archie-gateway")
|
|
||||||
flag.StringVar(&options.StateStore.Target, "state-store-target", "", "archie-state-store gRPC address (defaults to [services.state].target)")
|
flag.StringVar(&options.StateStore.Target, "state-store-target", "", "archie-state-store gRPC address (defaults to [services.state].target)")
|
||||||
flag.StringVar(&options.StateStore.Token, "state-store-token", "", "bearer token presented to archie-state-store")
|
|
||||||
flag.StringVar(&options.Listen, "listen", "", "MessagingService gRPC listen address (defaults to [services.messaging].listen)")
|
flag.StringVar(&options.Listen, "listen", "", "MessagingService gRPC listen address (defaults to [services.messaging].listen)")
|
||||||
flag.StringVar(&options.Token, "token", "", "bearer token required from MessagingService callers on a non-loopback listener")
|
|
||||||
flag.DurationVar(&options.DependencyTimeout, "dependency-timeout", 0, "readiness probe timeout (default 5s)")
|
flag.DurationVar(&options.DependencyTimeout, "dependency-timeout", 0, "readiness probe timeout (default 5s)")
|
||||||
flag.DurationVar(&options.ShutdownTimeout, "shutdown-timeout", 0, "shutdown timeout (default 5s)")
|
flag.DurationVar(&options.ShutdownTimeout, "shutdown-timeout", 0, "shutdown timeout (default 5s)")
|
||||||
flag.Parse()
|
flag.Parse()
|
||||||
|
|||||||
@@ -19,10 +19,13 @@ import (
|
|||||||
func main() { os.Exit(run()) }
|
func main() { os.Exit(run()) }
|
||||||
|
|
||||||
func run() int {
|
func run() int {
|
||||||
// A leading non-flag argument selects a recovery subcommand; anything else,
|
// A leading non-flag argument selects a subcommand; anything else,
|
||||||
// including no arguments at all, serves the State Store contract. An
|
// including no arguments at all, serves the State Store contract. An
|
||||||
// unrecognised word is refused rather than ignored, so a mistyped recovery
|
// unrecognised word is refused rather than ignored, so a mistyped command
|
||||||
// command never leaves an operator watching a server start instead.
|
// never leaves an operator watching a server start instead.
|
||||||
|
if args := os.Args[1:]; statestore.IsProvisionArgs(args) {
|
||||||
|
return statestore.RunProvision(context.Background(), args[1:], os.Stdout, os.Stderr)
|
||||||
|
}
|
||||||
if args := os.Args[1:]; statestore.IsAccessResetArgs(args) {
|
if args := os.Args[1:]; statestore.IsAccessResetArgs(args) {
|
||||||
return statestore.RunAccessReset(context.Background(), args[2:], os.Stderr)
|
return statestore.RunAccessReset(context.Background(), args[2:], os.Stderr)
|
||||||
}
|
}
|
||||||
@@ -34,10 +37,9 @@ func run() int {
|
|||||||
flag.StringVar(&options.Config, "config", configuration.DefaultConfigPath(), "configuration file or directory")
|
flag.StringVar(&options.Config, "config", configuration.DefaultConfigPath(), "configuration file or directory")
|
||||||
flag.StringVar(&options.Overlay, "config-overlay", "", "configuration overlay file or directory")
|
flag.StringVar(&options.Overlay, "config-overlay", "", "configuration overlay file or directory")
|
||||||
flag.StringVar(&options.Listen, "listen", "", "state store gRPC listen address (defaults to [services.state].listen, else 127.0.0.1:9090)")
|
flag.StringVar(&options.Listen, "listen", "", "state store gRPC listen address (defaults to [services.state].listen, else 127.0.0.1:9090)")
|
||||||
flag.StringVar(&options.Token, "token", "", "bearer token required for a non-loopback listener (defaults to [services.state].target_token)")
|
|
||||||
flag.StringVar(&options.ReadyAddr, "ready-addr", "", "optional readiness HTTP listen address (e.g. 127.0.0.1:9091)")
|
flag.StringVar(&options.ReadyAddr, "ready-addr", "", "optional readiness HTTP listen address (e.g. 127.0.0.1:9091)")
|
||||||
flag.Usage = func() {
|
flag.Usage = func() {
|
||||||
fmt.Fprintf(flag.CommandLine.Output(), "usage: archie-state-store [flags] # serve the State Store gRPC contract\n\noffline recovery: archie-state-store <backup|restore|validate|rollback> -h | access reset -h\n\n")
|
_, _ = fmt.Fprintf(flag.CommandLine.Output(), "usage: archie-state-store [flags] # serve the State Store gRPC contract\n\ndatabase roles: archie-state-store provision -h\noffline recovery: archie-state-store <backup|restore|validate|rollback> -h | access reset -h\n\n")
|
||||||
flag.PrintDefaults()
|
flag.PrintDefaults()
|
||||||
}
|
}
|
||||||
flag.Parse()
|
flag.Parse()
|
||||||
|
|||||||
@@ -19,20 +19,31 @@ const recoveryUsage = `usage: archie-state-store <command> [flags]
|
|||||||
|
|
||||||
With no command, archie-state-store serves the State Store gRPC contract.
|
With no command, archie-state-store serves the State Store gRPC contract.
|
||||||
|
|
||||||
The recovery commands are how an operator recovers a database the control
|
The recovery commands operate on the PostgreSQL database configured by
|
||||||
plane will not start on. They operate on the PostgreSQL database the
|
database_url. Install the PostgreSQL client tools (pg_dump, pg_restore and
|
||||||
configuration's database_url names, through pg_dump and pg_restore (which
|
psql) and make sure they're on PATH.
|
||||||
must be on PATH).
|
|
||||||
|
|
||||||
backup takes a consistent snapshot of a serving database. restore is
|
backup takes a consistent snapshot of a serving database. restore is
|
||||||
destructive and offline: stop every archie service first, since it refuses
|
destructive and offline: stop every archie service first, since it refuses
|
||||||
while any of them holds its ownership claim, and every write made after the
|
while any of them holds its serving claim or the exclusive restore lock, and
|
||||||
snapshot is lost. rollback refuses while the State Store serves. There is no
|
every write made after the snapshot is lost. rollback refuses while the State
|
||||||
automatic schema rollback: the way back from a migration is restoring the
|
Store serves. There is no automatic schema rollback: the way back from a
|
||||||
snapshot taken before it.
|
migration is restoring the snapshot taken before it.
|
||||||
|
|
||||||
|
restore re-applies the deletions recorded outside the database, and refuses when
|
||||||
|
the record cannot account for them. Keep that record with your snapshots: a
|
||||||
|
snapshot restored without the current record cannot show which notes were
|
||||||
|
forgotten after it was taken. Nothing about a snapshot and a record can prove the
|
||||||
|
record is the newest one; that is the operator's responsibility, and this is why
|
||||||
|
a restore that cannot account for the data needs -accept-unrecorded-deletions,
|
||||||
|
which means forgotten notes may return.
|
||||||
|
|
||||||
backup -out FILE write a snapshot of the database
|
backup -out FILE write a snapshot of the database
|
||||||
restore -from FILE replace the database with a snapshot
|
restore -from FILE replace the database with a snapshot
|
||||||
|
[-accept-unrecorded-deletions]
|
||||||
|
proceed although the record of deletions
|
||||||
|
cannot account for this data, so forgotten
|
||||||
|
notes may return
|
||||||
validate check the database, its stored settings and
|
validate check the database, its stored settings and
|
||||||
the configuration the daemon would boot with
|
the configuration the daemon would boot with
|
||||||
rollback -kind KIND replay an earlier revision of a stored
|
rollback -kind KIND replay an earlier revision of a stored
|
||||||
@@ -47,7 +58,7 @@ the daemon boots with, which names the database.
|
|||||||
// 1 the operation failed, 2 the command line was wrong.
|
// 1 the operation failed, 2 the command line was wrong.
|
||||||
func runRecovery(args []string, stdout, stderr io.Writer) int {
|
func runRecovery(args []string, stdout, stderr io.Writer) int {
|
||||||
if len(args) == 0 {
|
if len(args) == 0 {
|
||||||
fmt.Fprint(stderr, recoveryUsage)
|
_, _ = fmt.Fprint(stderr, recoveryUsage)
|
||||||
return 2
|
return 2
|
||||||
}
|
}
|
||||||
command := args[0]
|
command := args[0]
|
||||||
@@ -55,18 +66,20 @@ func runRecovery(args []string, stdout, stderr io.Writer) int {
|
|||||||
switch command {
|
switch command {
|
||||||
case statestore.RecoveryBackup, statestore.RecoveryRestore, statestore.RecoveryValidate, statestore.RecoveryRollback:
|
case statestore.RecoveryBackup, statestore.RecoveryRestore, statestore.RecoveryValidate, statestore.RecoveryRollback:
|
||||||
default:
|
default:
|
||||||
fmt.Fprintf(stderr, "archie-state-store: unknown command %q\n\n", command)
|
_, _ = fmt.Fprintf(stderr, "archie-state-store: unknown command %q\n\n", command)
|
||||||
fmt.Fprint(stderr, recoveryUsage)
|
_, _ = fmt.Fprint(stderr, recoveryUsage)
|
||||||
return 2
|
return 2
|
||||||
}
|
}
|
||||||
|
|
||||||
flags := flag.NewFlagSet("archie-state-store "+command, flag.ContinueOnError)
|
flags := flag.NewFlagSet("archie-state-store "+command, flag.ContinueOnError)
|
||||||
flags.SetOutput(stderr)
|
flags.SetOutput(stderr)
|
||||||
flags.Usage = func() { fmt.Fprint(stderr, recoveryUsage) }
|
flags.Usage = func() { _, _ = fmt.Fprint(stderr, recoveryUsage) }
|
||||||
flags.StringVar(&options.Out, "out", "", "snapshot file backup writes")
|
flags.StringVar(&options.Out, "out", "", "snapshot file backup writes")
|
||||||
flags.StringVar(&options.From, "from", "", "snapshot file restore reads")
|
flags.StringVar(&options.From, "from", "", "snapshot file restore reads")
|
||||||
flags.StringVar(&options.Kind, "kind", "", "control-plane resource kind rollback replays")
|
flags.StringVar(&options.Kind, "kind", "", "control-plane resource kind rollback replays")
|
||||||
flags.Int64Var(&options.Revision, "revision", 0, "revision rollback replays (default: the newest one older than the current value)")
|
flags.Int64Var(&options.Revision, "revision", 0, "revision rollback replays (default: the newest one older than the current value)")
|
||||||
|
flags.BoolVar(&options.AcceptUnrecordedDeletions, "accept-unrecorded-deletions", false,
|
||||||
|
"restore although the record of deletions cannot account for this data: forgotten notes may return")
|
||||||
// The configuration names the PostgreSQL database, and validate also checks
|
// The configuration names the PostgreSQL database, and validate also checks
|
||||||
// the stored settings against it.
|
// the stored settings against it.
|
||||||
flags.StringVar(&options.Config, "config", configuration.DefaultConfigPath(), "configuration file or directory the daemon boots with")
|
flags.StringVar(&options.Config, "config", configuration.DefaultConfigPath(), "configuration file or directory the daemon boots with")
|
||||||
@@ -80,15 +93,15 @@ func runRecovery(args []string, stdout, stderr io.Writer) int {
|
|||||||
return 2
|
return 2
|
||||||
}
|
}
|
||||||
if flags.NArg() > 0 {
|
if flags.NArg() > 0 {
|
||||||
fmt.Fprintf(stderr, "archie-state-store %s: unexpected argument %q\n", command, flags.Arg(0))
|
_, _ = fmt.Fprintf(stderr, "archie-state-store %s: unexpected argument %q\n", command, flags.Arg(0))
|
||||||
return 2
|
return 2
|
||||||
}
|
}
|
||||||
|
|
||||||
summary, err := statestore.RunRecovery(context.Background(), options)
|
summary, err := statestore.RunRecovery(context.Background(), options)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
fmt.Fprintf(stderr, "archie-state-store %s: %v\n", command, err)
|
_, _ = fmt.Fprintf(stderr, "archie-state-store %s: %v\n", command, err)
|
||||||
return 1
|
return 1
|
||||||
}
|
}
|
||||||
fmt.Fprintln(stdout, summary)
|
_, _ = fmt.Fprintln(stdout, summary)
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
@@ -27,17 +27,13 @@ func run() int {
|
|||||||
flag.StringVar(&options.Config, "config", configuration.DefaultConfigPath(), "configuration file or directory (only [services.*] targets and [web] are read)")
|
flag.StringVar(&options.Config, "config", configuration.DefaultConfigPath(), "configuration file or directory (only [services.*] targets and [web] are read)")
|
||||||
flag.StringVar(&options.Overlay, "config-overlay", "", "configuration overlay file or directory")
|
flag.StringVar(&options.Overlay, "config-overlay", "", "configuration overlay file or directory")
|
||||||
flag.StringVar(&options.Listen, "listen", "", "dashboard HTTP listen address (defaults to [web].listen, else 127.0.0.1:8484)")
|
flag.StringVar(&options.Listen, "listen", "", "dashboard HTTP listen address (defaults to [web].listen, else 127.0.0.1:8484)")
|
||||||
flag.StringVar(&options.Token, "token", "", "dashboard token; required for a non-loopback listener")
|
|
||||||
flag.StringVar(&options.TokenFile, "token-file", "", "file holding the dashboard token, minted on first use")
|
|
||||||
flag.StringVar(&options.OidcIssuer, "oidc-issuer", "", "identity provider issuer URL; requests must then carry a token it signed")
|
flag.StringVar(&options.OidcIssuer, "oidc-issuer", "", "identity provider issuer URL; requests must then carry a token it signed")
|
||||||
flag.StringVar(&options.OidcAudience, "oidc-audience", "", "audience (resource identifier) this dashboard accepts tokens for; required with -oidc-issuer")
|
flag.StringVar(&options.OidcAudience, "oidc-audience", "", "audience (resource identifier) this dashboard accepts tokens for; required with -oidc-issuer")
|
||||||
flag.StringVar(&options.OidcClientID, "oidc-client-id", "", "provider client id for browser sign-in; omitted means no sign-in flow")
|
flag.StringVar(&options.OidcClientID, "oidc-client-id", "", "provider client id for browser sign-in; omitted means no sign-in flow")
|
||||||
flag.StringVar(&options.OidcClientSecretEnv, "oidc-client-secret-env", "", "name of the environment variable holding the sign-in client secret")
|
flag.StringVar(&options.OidcClientSecretEnv, "oidc-client-secret-env", "", "name of the environment variable holding the sign-in client secret")
|
||||||
flag.StringVar(&options.OidcRedirectURL, "oidc-redirect-url", "", "callback URL registered at the provider (path must be /oauth2/callback)")
|
flag.StringVar(&options.OidcRedirectURL, "oidc-redirect-url", "", "callback URL registered at the provider (path must be /oauth2/callback)")
|
||||||
flag.StringVar(&options.Gateway.Target, "gateway-target", "", "archie-gateway gRPC address (defaults to [services.gateway].target)")
|
flag.StringVar(&options.Gateway.Target, "gateway-target", "", "archie-gateway gRPC address (defaults to [services.gateway].target)")
|
||||||
flag.StringVar(&options.Gateway.Token, "gateway-token", "", "bearer token presented to archie-gateway")
|
|
||||||
flag.StringVar(&options.State.Target, "state-target", "", "archie-state-store gRPC address (defaults to [services.state].target)")
|
flag.StringVar(&options.State.Target, "state-target", "", "archie-state-store gRPC address (defaults to [services.state].target)")
|
||||||
flag.StringVar(&options.State.Token, "state-token", "", "bearer token presented to archie-state-store")
|
|
||||||
flag.DurationVar(&options.DependencyTimeout, "dependency-timeout", 0, "per-dependency readiness probe timeout (default 5s)")
|
flag.DurationVar(&options.DependencyTimeout, "dependency-timeout", 0, "per-dependency readiness probe timeout (default 5s)")
|
||||||
flag.DurationVar(&options.EventPollInterval, "event-poll-interval", 0, "how often the activity feed polls the State Store for new events (default 1s)")
|
flag.DurationVar(&options.EventPollInterval, "event-poll-interval", 0, "how often the activity feed polls the State Store for new events (default 1s)")
|
||||||
// BoolFunc rather than BoolVar so an unset flag stays distinguishable
|
// BoolFunc rather than BoolVar so an unset flag stays distinguishable
|
||||||
|
|||||||
@@ -0,0 +1,134 @@
|
|||||||
|
// Command archie is the single Archie binary. It parses flags and hands over to
|
||||||
|
// the composition root.
|
||||||
|
package main
|
||||||
|
|
||||||
|
import (
|
||||||
|
"context"
|
||||||
|
"errors"
|
||||||
|
"flag"
|
||||||
|
"fmt"
|
||||||
|
"os"
|
||||||
|
"os/signal"
|
||||||
|
"strings"
|
||||||
|
"syscall"
|
||||||
|
|
||||||
|
"github.com/samcharles93/archie-core/internal/app/archie"
|
||||||
|
"github.com/samcharles93/archie-core/internal/buildinfo"
|
||||||
|
)
|
||||||
|
|
||||||
|
type exitCodeError int
|
||||||
|
|
||||||
|
func (e exitCodeError) Error() string { return fmt.Sprintf("exit %d", int(e)) }
|
||||||
|
|
||||||
|
func main() {
|
||||||
|
if err := run(); err != nil {
|
||||||
|
if code, ok := errors.AsType[exitCodeError](err); ok {
|
||||||
|
os.Exit(int(code))
|
||||||
|
}
|
||||||
|
fmt.Fprintln(os.Stderr, "archie:", err)
|
||||||
|
os.Exit(1)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func run() error {
|
||||||
|
configPath := flag.String("config", archie.DefaultConfigPath(), "path to the bootstrap config file")
|
||||||
|
specPath := flag.String("spec", "", "path to the bootstrap spec file (used by 'archie bootstrap')")
|
||||||
|
newIdentity := flag.Bool("new-age-identity", false, "print a new age identity for age_identity and exit")
|
||||||
|
showVersion := buildinfo.RegisterVersionFlag("archie")
|
||||||
|
flag.Usage = func() {
|
||||||
|
_, _ = fmt.Fprintln(flag.CommandLine.Output(), "usage: archie [flags]\n archie migrate apply database migrations and runtime grants\n archie bootstrap idempotently provision initial owner and SSO settings\n archie rekey rotate age sealing identities in one transaction\n archie bundle validate, export, diff, or apply promotion bundles\n archie catalogue generate keys or mirror extension catalogues offline\n archie openapi print the API's OpenAPI document")
|
||||||
|
flag.PrintDefaults()
|
||||||
|
}
|
||||||
|
flag.Parse()
|
||||||
|
showVersion()
|
||||||
|
if *newIdentity {
|
||||||
|
return archie.NewAgeIdentity(os.Stdout)
|
||||||
|
}
|
||||||
|
switch flag.Arg(0) {
|
||||||
|
case "":
|
||||||
|
case "migrate":
|
||||||
|
return runMigrate(*configPath, flag.Args()[1:])
|
||||||
|
case "bootstrap":
|
||||||
|
return runBootstrap(*configPath, *specPath, flag.Args()[1:])
|
||||||
|
case "rekey":
|
||||||
|
return runRekey(*configPath, flag.Args()[1:])
|
||||||
|
case "bundle":
|
||||||
|
code, err := runBundle(*configPath, flag.Args()[1:])
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
if code != 0 {
|
||||||
|
return exitCodeError(code)
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
case "catalogue":
|
||||||
|
ctx, stop := signal.NotifyContext(context.Background(), os.Interrupt, syscall.SIGTERM)
|
||||||
|
defer stop()
|
||||||
|
return archie.RunCatalogueCLI(ctx, flag.Args()[1:], os.Stdout)
|
||||||
|
case "openapi":
|
||||||
|
doc, err := archie.Document()
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
_, err = os.Stdout.Write(doc)
|
||||||
|
return err
|
||||||
|
default:
|
||||||
|
return fmt.Errorf("unknown command %q", flag.Arg(0))
|
||||||
|
}
|
||||||
|
|
||||||
|
ctx, stop := signal.NotifyContext(context.Background(), os.Interrupt, syscall.SIGTERM)
|
||||||
|
defer stop()
|
||||||
|
return archie.Run(ctx, *configPath)
|
||||||
|
}
|
||||||
|
|
||||||
|
func runRekey(configPath string, args []string) error {
|
||||||
|
fs := flag.NewFlagSet("rekey", flag.ContinueOnError)
|
||||||
|
oldIdentity := fs.String("old-identity", "", "current age identity (or ARCHIE_OLD_AGE_IDENTITY[_FILE])")
|
||||||
|
newIdentity := fs.String("new-identity", "", "replacement age identity (or ARCHIE_NEW_AGE_IDENTITY[_FILE])")
|
||||||
|
newBackupsRaw := fs.String("new-backups", "", "comma-separated age backup recipients for re-sealed values")
|
||||||
|
if err := fs.Parse(args); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
var newBackups []string
|
||||||
|
for r := range strings.SplitSeq(*newBackupsRaw, ",") {
|
||||||
|
if r = strings.TrimSpace(r); r != "" {
|
||||||
|
newBackups = append(newBackups, r)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
rcfg, err := archie.LoadRekeyConfig(*oldIdentity, *newIdentity, newBackups)
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
ctx, stop := signal.NotifyContext(context.Background(), os.Interrupt, syscall.SIGTERM)
|
||||||
|
defer stop()
|
||||||
|
return archie.Rekey(ctx, configPath, rcfg)
|
||||||
|
}
|
||||||
|
|
||||||
|
func runMigrate(defaultConfig string, args []string) error {
|
||||||
|
fs := flag.NewFlagSet("migrate", flag.ContinueOnError)
|
||||||
|
configPath := fs.String("config", defaultConfig, "path to the bootstrap config file")
|
||||||
|
if err := fs.Parse(args); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
ctx, stop := signal.NotifyContext(context.Background(), os.Interrupt, syscall.SIGTERM)
|
||||||
|
defer stop()
|
||||||
|
return archie.Migrate(ctx, *configPath)
|
||||||
|
}
|
||||||
|
|
||||||
|
func runBootstrap(defaultConfig, defaultSpec string, args []string) error {
|
||||||
|
fs := flag.NewFlagSet("bootstrap", flag.ContinueOnError)
|
||||||
|
configPath := fs.String("config", defaultConfig, "path to the bootstrap config file")
|
||||||
|
specPath := fs.String("spec", defaultSpec, "path to the bootstrap spec file")
|
||||||
|
if err := fs.Parse(args); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
ctx, stop := signal.NotifyContext(context.Background(), os.Interrupt, syscall.SIGTERM)
|
||||||
|
defer stop()
|
||||||
|
return archie.Bootstrap(ctx, *configPath, *specPath)
|
||||||
|
}
|
||||||
|
|
||||||
|
func runBundle(configPath string, args []string) (int, error) {
|
||||||
|
ctx, stop := signal.NotifyContext(context.Background(), os.Interrupt, syscall.SIGTERM)
|
||||||
|
defer stop()
|
||||||
|
return archie.RunBundleCLI(ctx, configPath, args, os.Stdout)
|
||||||
|
}
|
||||||
+28
-16
@@ -2,34 +2,46 @@
|
|||||||
package main
|
package main
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"fmt"
|
||||||
"os"
|
"os"
|
||||||
|
"strings"
|
||||||
|
|
||||||
"github.com/samcharles93/archie-core/internal/app/archied"
|
"github.com/samcharles93/archie-core/internal/app/archied"
|
||||||
"github.com/samcharles93/archie-core/internal/app/archieplaybooks"
|
"github.com/samcharles93/archie-core/internal/app/prbench"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
const commandUsage = "usage: archied [flags] # run the daemon; archied -h lists the flags\n" +
|
||||||
|
"subcommands: setup, update, release, status, prbench"
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
args := os.Args[1:]
|
os.Exit(run(os.Args[1:]))
|
||||||
|
}
|
||||||
|
|
||||||
|
func run(args []string) int {
|
||||||
// The setup generator is dispatched before the daemon's flags are
|
// The setup generator is dispatched before the daemon's flags are
|
||||||
// parsed: it writes a first-run config.toml and must not touch the
|
// parsed: it writes a first-run config.toml and must not touch the
|
||||||
// store, NATS, or the running daemon's configuration.
|
// store, NATS, or the running daemon's configuration.
|
||||||
if archied.IsSetupArgs(args) {
|
if archied.IsSetupArgs(args) {
|
||||||
os.Exit(archied.RunSetup(args[1:], os.Stdin, os.Stdout, os.Stderr))
|
return archied.RunSetup(args[1:], os.Stdin, os.Stdout, os.Stderr)
|
||||||
}
|
}
|
||||||
if len(args) > 0 && args[0] == "update" {
|
if len(args) > 0 {
|
||||||
os.Exit(archied.RunUpdate(args[1:], os.Stdout, os.Stderr))
|
switch args[0] {
|
||||||
|
case "update":
|
||||||
|
return archied.RunUpdate(args[1:], os.Stdout, os.Stderr)
|
||||||
|
case "release":
|
||||||
|
return archied.RunRelease(args[1:], os.Stdout, os.Stderr)
|
||||||
|
case "status":
|
||||||
|
return archied.RunStatus(args[1:], os.Stdout, os.Stderr)
|
||||||
|
case "prbench":
|
||||||
|
return prbench.Main(args[1:], os.Stdout, os.Stderr)
|
||||||
}
|
}
|
||||||
if len(args) > 0 && args[0] == "update-image" {
|
// A word that is not a subcommand is refused rather than ignored: a
|
||||||
os.Exit(archied.RunUpdateImage(args[1:], os.Stderr))
|
// stale `archied update-topology` would otherwise start a second
|
||||||
|
// daemon under the running one's feet.
|
||||||
|
if !strings.HasPrefix(args[0], "-") {
|
||||||
|
fmt.Fprintf(os.Stderr, "archied: unknown command %q\n%s\n", args[0], commandUsage)
|
||||||
|
return 2
|
||||||
}
|
}
|
||||||
if len(args) > 0 && args[0] == "update-topology" {
|
|
||||||
os.Exit(archied.RunUpdateTopology(args[1:], os.Stdout, os.Stderr))
|
|
||||||
}
|
}
|
||||||
if len(args) > 0 && args[0] == "status" {
|
return archied.Run()
|
||||||
os.Exit(archied.RunStatus(args[1:], os.Stdout, os.Stderr))
|
|
||||||
}
|
|
||||||
if len(args) > 0 && args[0] == "playbooks" {
|
|
||||||
os.Exit(archieplaybooks.Run(args[1:], os.Stderr))
|
|
||||||
}
|
|
||||||
os.Exit(archied.Run())
|
|
||||||
}
|
}
|
||||||
+86
-456
@@ -1,495 +1,125 @@
|
|||||||
|
# archie configuration
|
||||||
#
|
#
|
||||||
# archied configuration
|
# This file starts the services. Everything else (forge connections, models,
|
||||||
|
# providers, chat, tools, containers, repositories, policies) is edited in the
|
||||||
|
# dashboard, and a saved value there overrides the same setting here.
|
||||||
#
|
#
|
||||||
# Secrets are NOT stored here: each one is a {engine, key}
|
# Secrets are never written here: each is a {engine, key} reference. The
|
||||||
# reference resolved through a secrets engine at startup.
|
# built-in "env" engine reads key as an environment variable.
|
||||||
# The built-in "env" engine reads key as an environment variable name.
|
|
||||||
# Every other engine (bws, sops, vault, age) is an extension installed from
|
|
||||||
# the archipelago marketplace and enabled through the control plane.
|
|
||||||
|
|
||||||
# work_dir = "~/.local/share/archie/work" # default
|
# The URL the services connect as: a least-privilege role, created by
|
||||||
# state_dir = "~/.local/share/archie" # default; embedded NATS store, task logs, disk probe
|
# `archie-state-store provision`. migration_database_url is the role that owns
|
||||||
|
# the schema and runs migrations; when it is absent, database_url does both,
|
||||||
# The PostgreSQL connection archie-state-store, archied and archie-gateway
|
# which is what a single-role install does.
|
||||||
# serve from. Required: each fails closed without it.
|
# database_url = "postgres://archie_runtime:secret@localhost:5432/archie?sslmode=disable"
|
||||||
# `docker compose up -d postgres` starts a matching local postgres:18 with this
|
# migration_database_url = "postgres://archie_migrator:secret@localhost:5432/archie?sslmode=disable"
|
||||||
# default URL.
|
# work_dir = "~/.local/share/archie/work"
|
||||||
# database_url = "postgres://archie:archie@127.0.0.1:5432/archie?sslmode=disable"
|
# state_dir = "~/.local/share/archie"
|
||||||
|
|
||||||
# skills_dir = "~/.local/share/archie/skills" # SKILL.md search path; defaults under work_dir when unset
|
|
||||||
# workflow_routing_file = "~/.local/share/archie/workflow-routing.yaml" # kind->workflow rebinding (bug/feature)
|
|
||||||
# workflow_labels_file = "~/.local/share/archie/workflow-labels.yaml" # arbitrary forge label -> workflow (EDA playbook slice 2)
|
|
||||||
# playbook_dirs = ["~/.local/share/archie/workflows"] # list of dirs of *.yaml binding files, merged with the two above (slice 3); a key bound twice across sources is a load failure
|
|
||||||
|
|
||||||
poll_interval = "60s"
|
poll_interval = "60s"
|
||||||
label = "archie"
|
label = "archie"
|
||||||
bot_user = "vectis-labs-archie"
|
bot_user = "vectis-labs-archie"
|
||||||
# 0 switches the cap off; omit the key to take the built-in default (400).
|
|
||||||
diff_cap_lines = 400
|
|
||||||
# org = "acme" # empty means the default org (a single-operator install's one identity)
|
|
||||||
# granted_credentials = ["openai"] # credential@1 services the root identity may resolve (see [containers.credentials])
|
|
||||||
|
|
||||||
# how many operator-triggered retries a parked task gets
|
|
||||||
# before it moves to dead (global default; set per-repo to
|
|
||||||
# override). Enforced by the dashboard's retry action.
|
|
||||||
# max_retries = 3
|
|
||||||
|
|
||||||
[forge]
|
[forge]
|
||||||
# The name of an installed, enabled forge package (archipelago: forge/github, forge/gitea), or "none".
|
|
||||||
# Install and enable it from the Extensions page, then restart archied.
|
|
||||||
type = "github"
|
type = "github"
|
||||||
host = "https://github.com"
|
host = "https://github.com"
|
||||||
token = { engine = "env", key = "ARCHIE_GITHUB_TOKEN" }
|
token = { engine = "env", key = "ARCHIE_GITHUB_TOKEN" }
|
||||||
# How forge issues become work:
|
|
||||||
# "poll" – re-discover issues each poll_interval (default)
|
|
||||||
# "webhook" – react to GitHub webhook events the moment they arrive
|
|
||||||
# "both" – webhook plus the poll as a backstop
|
|
||||||
# intake = "poll"
|
|
||||||
# Required when intake is "webhook" or "both": the shared secret configured
|
|
||||||
# on the GitHub webhook, and the host:port the receiver listens on. On
|
|
||||||
# GitHub, set the webhook's Content type to application/json (the UI
|
|
||||||
# default) -- the alternate form-encoded delivery is not supported.
|
|
||||||
# Webhook intake is single-identity, and that is enforced: with [[identities]]
|
|
||||||
# configured this combination is REJECTED at startup rather than silently
|
|
||||||
# downgraded to polling. The receiver binds one secret and one dispatch
|
|
||||||
# predicate, so it could only judge another identity's events by the wrong
|
|
||||||
# rules. Either drop the [[identities]] blocks, or keep intake = "poll" and
|
|
||||||
# let each identity poll.
|
|
||||||
# webhook_secret = { engine = "env", key = "ARCHIE_WEBHOOK_SECRET" }
|
|
||||||
# webhook_addr = "0.0.0.0:8645"
|
|
||||||
# intake, webhook_secret and webhook_addr exist only here. Set on a
|
|
||||||
# [identities.forge] entry they are REJECTED for the same reason: nothing
|
|
||||||
# reads them, so the identity would silently keep polling. Serving webhook
|
|
||||||
# intake per identity is a pending migration, not a setting.
|
|
||||||
|
|
||||||
# [[identities]] runs more than one bot identity from a single daemon, each
|
|
||||||
# with its own forge/dispatch/models/providers/budgets/notify. Intake
|
|
||||||
# settings are rejected per identity, and [forge].intake = "webhook"/"both"
|
|
||||||
# is rejected alongside [[identities]]. Minimal shape:
|
|
||||||
# [[identities]]
|
|
||||||
# name = "personal" # required; namespaces logs/events/NATS subjects
|
|
||||||
# bot_user = "your-bot" # required
|
|
||||||
# forge = { type = "github", host = "https://github.com", token = { engine = "env", key = "ARCHIE_GITHUB_TOKEN_PERSONAL" } }
|
|
||||||
# org = "acme" # empty inherits the shared org (empty = default)
|
|
||||||
# granted_credentials = ["openai"] # credential@1 services this identity may resolve (see [containers.credentials])
|
|
||||||
|
|
||||||
[dispatch]
|
[dispatch]
|
||||||
# Can be of "assignee", "label", or "either"
|
trigger = "assignee" # "assignee", "label" or "either"
|
||||||
# this sets the method archie uses to pick up tasks.
|
ack_reaction = "eyes" # "off" for none
|
||||||
trigger = "assignee"
|
|
||||||
|
|
||||||
# Optionally set a reaction to show that archie has picked up a task.
|
[models]
|
||||||
# setting this to "off" disables the pickup reactions.
|
|
||||||
ack_reaction = "eyes"
|
|
||||||
|
|
||||||
[models] # role -> ai-sdk runtime ref (used by agent workflows)
|
|
||||||
triage = "openai/gpt-5.4"
|
triage = "openai/gpt-5.4"
|
||||||
planner = "openai/gpt-5.4"
|
planner = "openai/gpt-5.4"
|
||||||
builder = "openai/gpt-5.4"
|
builder = "openai/gpt-5.4"
|
||||||
# `reviewer` runs the adversarial self-review stage and operator-triggered PR
|
|
||||||
# reviews. Omitted, it falls back to `builder`.
|
|
||||||
# reviewer = "openai/gpt-5.4"
|
|
||||||
# `embedding` is optional: it powers in-process embedding consumers
|
|
||||||
# (curators first). Unset, or a credential that fails to resolve, degrades
|
|
||||||
# to the capability reporting unavailable -- archied still starts.
|
|
||||||
# embedding = "openai/text-embedding-3-small"
|
|
||||||
# `transcription` is optional: it turns Telegram voice notes into text before
|
|
||||||
# the turn is dispatched, behind a "[voice transcription]" marker. Read by
|
|
||||||
# archie-messaging. Unset, or a provider that does not resolve, leaves the
|
|
||||||
# voice note as its media placeholder -- the turn still runs.
|
|
||||||
# transcription = "openai/whisper-1"
|
|
||||||
|
|
||||||
# [providers.openai]
|
|
||||||
# class = "openai"
|
|
||||||
# api_key = { engine = "env", key = "OPENAI_API_KEY" }
|
|
||||||
|
|
||||||
[providers.ollama]
|
[providers.ollama]
|
||||||
class = "ollama"
|
class = "ollama"
|
||||||
|
|
||||||
# [chat]
|
|
||||||
# `operator` is the display name of user. It is
|
|
||||||
# passed to the chat agent as runtime metadata, which means it is sent to the
|
|
||||||
# configured model provider on every turn -- leave it unset to tell the agent
|
|
||||||
# nothing about who is running it.
|
|
||||||
# operator = "John Smith"
|
|
||||||
|
|
||||||
# `workspace` roots the chat agent's file and shell tools (read, write, edit,
|
|
||||||
# shell, grep, find). If unser, the tools aren't registered.
|
|
||||||
# Set it to let the agent read, modify and execute inside that directory
|
|
||||||
# choose it deliberately
|
|
||||||
# workspace = "~/.local/share/archie/workspace"
|
|
||||||
|
|
||||||
# `max_steps` caps the model/tool round-trips in a single chat turn
|
|
||||||
# (default 100). This is a task budget, not a safety limit.
|
|
||||||
# max_steps = 100
|
|
||||||
|
|
||||||
# Let read/write/edit/find/grep tools reach absolute paths outside the
|
|
||||||
# workspace jail. Relative paths still resolve against workspace.
|
|
||||||
# The shell tool is never confined, so a jail only pushes the agent into
|
|
||||||
# using shell for everything, losing truncation, line numbering, and
|
|
||||||
# read-before-write protection. Enable when the agent needs to work
|
|
||||||
# cross-filesystem (disk ops, system edits, etc.). Grant deliberately.
|
|
||||||
# unrestricted_filesystem = true
|
|
||||||
|
|
||||||
# Render each completed tool call inline in the reply, naming the tool and one
|
|
||||||
# line of its result, before the answer built from them. Off by default: it is
|
|
||||||
# there to make a wrong tool choice visible from the chat, at the cost of
|
|
||||||
# narrating every internal step. Applies to every chat channel -- Telegram
|
|
||||||
# and the web dashboard both read this one setting.
|
|
||||||
# show_tool_calls = true
|
|
||||||
|
|
||||||
# Optional interactive-chat catalog. /provider groups these references by
|
|
||||||
# their first path segment, and /model shows only the selected provider's
|
|
||||||
# entries. When omitted, Archie uses the distinct refs in [models].
|
|
||||||
# models = [
|
|
||||||
# "openai/gpt-5.6-sol",
|
|
||||||
# "openrouter/openai/gpt-5.6-sol",
|
|
||||||
# ]
|
|
||||||
|
|
||||||
# [chat.telegram]
|
|
||||||
# The bot token from @BotFather, resolved through a configured secret engine.
|
|
||||||
# token = { engine = "bws", key = "TELEGRAM_BOT_TOKEN" }
|
|
||||||
|
|
||||||
# Email and the generic inbound webhook are archipelago channel extensions
|
|
||||||
# (channels/email, channels/webhook): install, accept and enable them from the
|
|
||||||
# Extensions page, with their settings there.
|
|
||||||
|
|
||||||
# Per-(channel, sender) inbound rate limiting, shared by every chat channel:
|
|
||||||
# Telegram keys by numeric user ID, email by SMTP from address, webhook by
|
|
||||||
# its configured route path -- a source, not a person, so it reaches the
|
|
||||||
# limiter as a transport-only budget key rather than as an identity. Off by
|
|
||||||
# default -- both fields must be set to a positive value.
|
|
||||||
#
|
|
||||||
# This section is the seed for the Channel settings resource. The Web UI owns
|
|
||||||
# the value a running deployment limits with (restart-required), so edit it
|
|
||||||
# there rather than here; a stored value is not overwritten by this file.
|
|
||||||
# [chat.rate_limit]
|
|
||||||
# window = "1m"
|
|
||||||
# max_requests = 20
|
|
||||||
|
|
||||||
# External MCP tools are launched and managed by Archie's MCP client. A
|
|
||||||
# command of "npx" gets a persistent package cache under work_dir
|
|
||||||
# (top of this file) automatically, so a daemon restart reuses it instead
|
|
||||||
# of re-resolving and re-downloading the package from the npm registry
|
|
||||||
# every time. This does not cover a package's own separate downloads (e.g.
|
|
||||||
# a Playwright/Puppeteer-based server fetching a browser binary from a CDN
|
|
||||||
# via its postinstall script) -- consult that package's own env vars for
|
|
||||||
# those.
|
|
||||||
# Most MCP servers are single-threaded and get one tools/call at a time.
|
|
||||||
# parallel_tool_calls = true (default false) drops that serialization for
|
|
||||||
# this server only, for a server whose own implementation handles
|
|
||||||
# concurrent requests. It never affects another configured server.
|
|
||||||
# [[tools.mcp_servers]]
|
|
||||||
# name = "desktop-commander"
|
|
||||||
# transport = "stdio"
|
|
||||||
# command = "npx"
|
|
||||||
# args = ["-y", "@wonderwhy-er/desktop-commander@0.2.46", "--no-onboarding"]
|
|
||||||
# work_dir = "/path/to/workspace"
|
|
||||||
# parallel_tool_calls = false
|
|
||||||
|
|
||||||
# archied's own liveness surface, always on. GET /healthz and /health answer
|
|
||||||
# 200 once the daemon is serving (503 while it is still booting), and
|
|
||||||
# /health/detailed reports the readiness probes. This is what the update
|
|
||||||
# watchdog polls after restarting archied to decide whether the release came
|
|
||||||
# up or has to be rolled back, so it stays separate from the dashboard's
|
|
||||||
# /healthz: the dashboard can be switched off, and it runs as its own process
|
|
||||||
# in the extracted UI topology.
|
|
||||||
[health]
|
|
||||||
listen = "127.0.0.1:8485"
|
|
||||||
# Bounds one readiness probe's call into a service the daemon depends on but
|
|
||||||
# does not own (the Gateway), so a hung dependency degrades that probe instead
|
|
||||||
# of stalling the whole report. Omit for the default; a negative value leaves
|
|
||||||
# only the caller's own deadline in force.
|
|
||||||
# dependency_timeout = "5s"
|
|
||||||
|
|
||||||
# Web dashboard and API: task board, activity stream, chat, config,
|
|
||||||
# memory, SSE events. Served as an embedded SPA with a full REST
|
|
||||||
# and streaming API. Auth is token-based for non-loopback addresses;
|
|
||||||
# loopback binds (127.0.0.1, ::1, localhost) skip auth automatically.
|
|
||||||
#
|
|
||||||
# The dashboard is served by the
|
|
||||||
# standalone archie-ui process, not by archied: this listen address is what
|
|
||||||
# archie-ui binds, and archied runs no dashboard listener at all. Run
|
|
||||||
# `archie-ui -config <same config.toml>` alongside the other services.
|
|
||||||
[web]
|
|
||||||
listen = "127.0.0.1:8484"
|
|
||||||
# Trust X-Forwarded-Proto and X-Forwarded-Host headers when validating Origin
|
|
||||||
# on mutating requests (CSRF protection).
|
|
||||||
#
|
|
||||||
# Off by default. When false, the expected Origin scheme is derived directly
|
|
||||||
# from the daemon's own network connection (http unless TLS is terminated by
|
|
||||||
# archied directly). Setting this to true causes archied to respect the
|
|
||||||
# X-Forwarded-Proto header sent by a reverse proxy (e.g. Traefik, Caddy, Nginx).
|
|
||||||
#
|
|
||||||
# SECURITY WARNING: Enable ONLY when archied is deployed behind a trusted
|
|
||||||
# reverse proxy that strips or overwrites any client-supplied X-Forwarded-*
|
|
||||||
# headers. Enabling this on a directly exposed daemon allows untrusted
|
|
||||||
# clients to spoof the Origin scheme and bypass CSRF protection.
|
|
||||||
# trust_forwarded_headers = false
|
|
||||||
|
|
||||||
# Where archied writes its logs. Without file set, output goes only to
|
|
||||||
# stderr -- which under systemd means journald holds the sole copy, and
|
|
||||||
# running by hand leaves no record at all. Setting file gives a durable
|
|
||||||
# copy independent of the supervisor, and is what lets the dashboard show
|
|
||||||
# history from before it connected. Both stderr and the file get output
|
|
||||||
# unless quiet is set.
|
|
||||||
# [log]
|
|
||||||
# file = "~/.local/share/archie/logs/archied.log"
|
|
||||||
# max_size_mb = 20 # rotate once the file exceeds this; 0 uses the default (20)
|
|
||||||
# keep = 5 # rotated files to retain; 0 uses the default (5)
|
|
||||||
# level = "info" # "debug" | "info" | "warn" | "error"
|
|
||||||
# quiet = false # true suppresses stderr once a file is configured
|
|
||||||
|
|
||||||
# The built-in file-backed memory engine (internal/domain/memory +
|
|
||||||
# internal/infrastructure/memory) is always on -- nothing here is required
|
|
||||||
# to get memory at all. engine selects among the domain/memory engine
|
|
||||||
# family; "builtin" (the default, same as leaving it unset) is the only
|
|
||||||
# one implemented so far.
|
|
||||||
# [memory]
|
|
||||||
# engine = "builtin" # "builtin" is the only engine implemented so far
|
|
||||||
|
|
||||||
# Notifications for human-in-the-loop moments
|
|
||||||
# (approval requests, gate failures, parked tasks).
|
|
||||||
# Archie POSTs a JSON payload to the webhook
|
|
||||||
# wire it to n8n, email, Slack, or any HTTP endpoint.
|
|
||||||
[notify]
|
|
||||||
# webhook = "https://n8n.example.com/webhook/archie"
|
|
||||||
|
|
||||||
[budgets]
|
[budgets]
|
||||||
max_steps = 60
|
max_steps = 60
|
||||||
wall_clock = "30m" # one agent call
|
wall_clock = "30m" # one agent call
|
||||||
gate_max_failures = 5
|
gate_max_failures = 5
|
||||||
task_wall_clock = "4h" # a whole task run; keep containers.max_uptime at or above it
|
task_wall_clock = "4h" # a whole task run
|
||||||
|
|
||||||
|
[health]
|
||||||
|
listen = "127.0.0.1:8485"
|
||||||
|
# dependency_timeout = "5s"
|
||||||
|
|
||||||
|
# Trace export. Without an endpoint nothing is exported.
|
||||||
|
# [telemetry]
|
||||||
|
# endpoint = "127.0.0.1:4317" # OTLP/gRPC collector
|
||||||
|
# insecure = false # plaintext to the collector
|
||||||
|
# ca_file = "" # PEM bundle verifying the collector
|
||||||
|
# sample_ratio = 1.0 # share of new traces recorded
|
||||||
|
# headers = { authorization = "Bearer ..." }
|
||||||
|
|
||||||
|
[web]
|
||||||
|
listen = "127.0.0.1:8484" # "off" disables the dashboard
|
||||||
|
# trust_forwarded_headers = false # only behind a proxy you control
|
||||||
|
|
||||||
# Services selects contract adapters at composition time.
|
|
||||||
[services.gateway]
|
[services.gateway]
|
||||||
target = "127.0.0.1:8585" # archie-gateway's gRPC address (always remote once set)
|
target = "127.0.0.1:8585"
|
||||||
# listen = "127.0.0.1:8585" # The address archie-gateway BINDS. Read only by the
|
# listen = "127.0.0.1:8585"
|
||||||
# # archie-gateway process; every client ignores it. Defaults
|
|
||||||
# # to the target above, so a default deployment's client and
|
|
||||||
# # server cannot drift onto different ports. Set it when the
|
|
||||||
# # host already owns that port.
|
|
||||||
# target_token = "..." # Bearer [REDACTED] for a NON-loopback listener. A loopback listener
|
|
||||||
# # (127.0.0.1/::1/localhost) needs no token. A non-loopback
|
|
||||||
# # listener without a token fails closed, as does a
|
|
||||||
# # non-loopback dial without one. The same token is
|
|
||||||
# # presented as GATEWAY_TOKEN by remote consumers.
|
|
||||||
|
|
||||||
[services.state]
|
[services.state]
|
||||||
target = "127.0.0.1:9090" # REQUIRED. The State Store gRPC address archied and
|
target = "127.0.0.1:9090"
|
||||||
# # archie-gateway dial. They own no task data
|
# listen = "127.0.0.1:9090"
|
||||||
# # in-process: the standalone archie-state-store process
|
|
||||||
# # owns it in PostgreSQL. An empty target is a startup error.
|
# [tls]
|
||||||
# listen = "127.0.0.1:9090" # The address archie-state-store BINDS. Read only by that
|
# ca_file = "/etc/archie/tls/ca.pem"
|
||||||
# # process; every client ignores it. Defaults to the target
|
# cert_dir = "/etc/archie/tls"
|
||||||
# # above, so a default deployment's client and server cannot
|
|
||||||
# # drift onto different ports. Move it when a port is already
|
|
||||||
# # taken on the host.
|
|
||||||
# target_token = "..." # bearer token for a NON-loopback target. A loopback target
|
|
||||||
# # (127.0.0.1/::1/localhost) needs no token. A non-loopback
|
|
||||||
# # target without a token fails closed. The same token is injected as STATE_STORE_TOKEN into
|
|
||||||
# # archie-agent containers so the agent authenticates to the
|
|
||||||
# # same remote store. See deployments/README.md for how to
|
|
||||||
# # start archie-state-store.
|
|
||||||
|
|
||||||
# NATS is the sole autonomous workflow handoff. mode changes only where the
|
|
||||||
# broker runs; every workflow still runs in a managed task container:
|
|
||||||
# "embedded" – in-process nats-server (the default; no external server)
|
|
||||||
# "external" – connect to url
|
|
||||||
# Leave the section absent to run embedded.
|
|
||||||
# [nats]
|
# [nats]
|
||||||
# mode = "embedded" # "embedded" | "external"
|
# mode = "embedded" # or "external" with url
|
||||||
# url = "nats://localhost:4222" # required when mode = "external"
|
# url = "nats://localhost:4222"
|
||||||
# token_env = "NATS_TOKEN" # optional external-server credential; embedded generates one per start
|
# token_env = "NATS_TOKEN" # external: the archie-callout user's password
|
||||||
|
# callout_issuer_seed_env = "NATS_CALLOUT_SEED" # external: account nkey seed; the broker's auth_callout issuer is its public key
|
||||||
|
|
||||||
# Unbound webhook capture: POST /webhooks/capture/{source} accepts and
|
# [log]
|
||||||
# stores any inbound payload archie doesn't yet have a binding for, so it can
|
# file = "~/.local/share/archie/logs/archied.log"
|
||||||
# be inspected and mapped later.
|
# level = "info"
|
||||||
# Stored in the same PostgreSQL database as tasks, not NATS -- capture has one
|
|
||||||
# writer and one (human, dashboard) reader, so it doesn't need JetStream's
|
|
||||||
# fan-out/replay machinery. All fields default when the section is absent;
|
|
||||||
# capture is on by default.
|
|
||||||
#
|
|
||||||
# The receiver is mounted by the
|
|
||||||
# archie-ui process, which projects these same values from this file; the
|
|
||||||
# daemon's binding-dispatch loop consumes captures from the shared State
|
|
||||||
# Store. Leave this section here even if you do not edit it: both processes
|
|
||||||
# read it.
|
|
||||||
# [capture]
|
|
||||||
# retention = "168h" # 7 days; prune-on-write deletes anything older
|
|
||||||
# max_events = 5000 # row cap, pruned on every insert regardless of age
|
|
||||||
# max_body_bytes = 262144 # 256 KiB; larger POSTs are rejected with 413
|
|
||||||
# rate_per_second = 1.0 # per-remote-address token bucket
|
|
||||||
# rate_burst = 5
|
|
||||||
|
|
||||||
# The cron/scheduling ticker engine: how often scheduled jobs are checked,
|
|
||||||
# how many may run at once, and how long one may run. The engine polls a job
|
|
||||||
# store for what is due and dispatches each due job to the delivery it names
|
|
||||||
# -- so nothing here schedules anything by itself, it only tunes the timing.
|
|
||||||
# Absent is valid: every field defaults independently, and a section naming
|
|
||||||
# only one of them still gets the defaults for the other two.
|
|
||||||
#
|
|
||||||
# Zero (or absent) takes the default named below. A NEGATIVE value is a
|
|
||||||
# startup error, not a clamp: running something other than what was written
|
|
||||||
# is how a misconfiguration stays invisible. Zero cannot mean "off" here for
|
|
||||||
# the same reason it cannot in [tools.tool_policy] -- it is indistinguishable
|
|
||||||
# from an unset key.
|
|
||||||
# [scheduling]
|
|
||||||
# interval = "60s" # tick cadence: how often due jobs are checked.
|
|
||||||
# # Absent/zero means 1m. The finest granularity a
|
|
||||||
# # cron-style schedule needs, and polling a local
|
|
||||||
# # job store that often costs nothing.
|
|
||||||
# max_parallel = 4 # caps simultaneous parallel-pool runs, so a store
|
|
||||||
# # reporting many jobs due at once (the first tick
|
|
||||||
# # after long downtime, typically) cannot launch an
|
|
||||||
# # unbounded fan-out. Absent/zero means 4. It does
|
|
||||||
# # not bound the sequential pool, which is one by
|
|
||||||
# # definition.
|
|
||||||
# job_timeout = "1h" # bounds one run. Absent/zero means 1h. A job that
|
|
||||||
# # has not finished in an hour is stuck, and leaving
|
|
||||||
# # it in flight would suppress every later run of the
|
|
||||||
# # same job forever.
|
|
||||||
# events_sink = "none" # "bus" publishes each run and failure on the event
|
|
||||||
# # stream, which is what the dashboard timeline reads;
|
|
||||||
# # "none" (the default, same as leaving it unset)
|
|
||||||
# # leaves the engine unobservable -- a scheduled run
|
|
||||||
# # has no task or chat turn behind it, so with no
|
|
||||||
# # sink nothing anywhere records that it fired.
|
|
||||||
# # Any other value is a startup error, so a typo
|
|
||||||
# # cannot silently turn observability off.
|
|
||||||
|
|
||||||
# Playbook-binding at-rest encryption: [bindings].encryption_key resolves a
|
|
||||||
# 32-byte high-entropy key through the secret registry (engine + key) and seals
|
|
||||||
# each binding's HMAC secret in the bindings.secret column with AES-256-
|
|
||||||
# GCM. When the key is absent,
|
|
||||||
# binding secrets are stored as plaintext (the pre-t2db.7 behaviour) -- enabling
|
|
||||||
# encryption does not retroactively encrypt existing rows, which stay plaintext
|
|
||||||
# until they are edited. Rotation: after changing encryption_key, retain the
|
|
||||||
# previous material in previous_encryption_keys so rows sealed under the old
|
|
||||||
# key still decrypt, then drop it once no row references it. A reload that
|
|
||||||
# changes these keys requires a daemon restart.
|
|
||||||
# [bindings]
|
# [bindings]
|
||||||
# encryption_key = { engine = "env", key = "ARCHIE_BINDING_KEY" }
|
# encryption_key = { engine = "env", key = "ARCHIE_BINDING_KEY" }
|
||||||
# previous_encryption_keys = [ { engine = "env", key = "ARCHIE_BINDING_KEY_OLD" } ]
|
|
||||||
|
|
||||||
# Docker sandbox execution of archie-agent is mandatory for autonomous
|
# Access records: how long a recorded access denial is kept before the State
|
||||||
# workflows. Omit this section to use the default image, lifetimes, and pull
|
# Store's sweep deletes it. Zero means 90 days.
|
||||||
# policy; the options below show the available overrides. If Docker or
|
# [access]
|
||||||
# the image is unavailable, chat and the dashboard still start while tasks
|
# denial_retention = "2160h"
|
||||||
# park explicitly; archied never falls back to a host agent loop.
|
|
||||||
|
# Where releases and the extension catalogue come from on a new instance: an
|
||||||
|
# OCI repository and the base64 ed25519 key it signs with. Blank is the
|
||||||
|
# official source. Once stored, change them in the dashboard settings.
|
||||||
|
# [distribution]
|
||||||
|
# releases = "registry.example/owner/archie"
|
||||||
|
# releases_key = "base64 public key"
|
||||||
|
# catalogue = "registry.example/owner/archipelago/catalogue"
|
||||||
|
# catalogue_key = "base64 public key"
|
||||||
|
|
||||||
|
# The image task containers run. There is no default: the daemon reports a
|
||||||
|
# missing containers.image at startup instead of guessing a registry, so set
|
||||||
|
# your own pinned reference -- see
|
||||||
|
# deployments/systemd-user-service.md#6-pinning-the-archie-agent-image.
|
||||||
# [containers]
|
# [containers]
|
||||||
# image = "ghcr.io/samcharles93/archie-agent:latest"
|
# image = "registry.example.com/archie/archie-agent@sha256:<digest>"
|
||||||
# max_concurrency = 4 # optional cap; 0/absent means no global cap
|
# pull_policy = "missing"
|
||||||
# max_uptime = "60m" # container lifetime cap
|
# registry_auth = { engine = "env", key = "ARCHIE_REGISTRY_AUTH" } # when the registry needs a login
|
||||||
# volume_ttl = "72h" # max age for persistent repo volumes and Git clone caches
|
|
||||||
# pull_policy = "missing" # "missing" or "always"
|
|
||||||
#
|
|
||||||
# A private registry needs a credential the daemon sends on pull (an
|
|
||||||
# anonymous pull always answers 401 there, whatever the policy). The value is
|
|
||||||
# a Docker registry.AuthConfig JSON document -- {"username":"bot","password":"..."}
|
|
||||||
# ("identitytoken"/"registrytoken" are alternatives; "serveraddress" is
|
|
||||||
# optional and defaults to the image's registry). Unset means anonymous pulls,
|
|
||||||
# exactly as before this key existed; a reference that cannot be resolved
|
|
||||||
# warns and pulls anonymously rather than failing the daemon.
|
|
||||||
# registry_auth = { engine = "env", key = "ARCHIE_REGISTRY_AUTH" }
|
|
||||||
#
|
|
||||||
# Agent profiles a workflow selects with `profile: <name>`. A workflow that
|
|
||||||
# names none runs under [containers].image with every tool.
|
|
||||||
# Once the State Store holds container policies, edit profiles in the
|
|
||||||
# dashboard (Settings, Advanced); a stored set replaces the file's.
|
|
||||||
# [containers.profiles.network-investigator]
|
|
||||||
# image = "archie-agent-net:local" # docker compose build agent-net; empty uses [containers].image
|
|
||||||
# tools = [] # allowlist over MCP, script and plugin tools; empty allows all
|
|
||||||
# A Kit profile runs every agent stage on an external CLI packaged as a Kit v3
|
|
||||||
# image: one workload Kit or published Kit set (which merges a workload with
|
|
||||||
# its mixins), pinned by digest.
|
|
||||||
# [containers.profiles.claude]
|
|
||||||
# kit = "docker/claude-code-kit@sha256:<digest>"
|
|
||||||
# adapter = "claude-code" # claude-code, codex, pi, omp or copilot; empty runs without capture tools or usage
|
|
||||||
#
|
|
||||||
# Credential bindings map a Kit's credential@1 service name to a secret. A
|
|
||||||
# binding alone grants nothing -- an identity resolves it only when its own
|
|
||||||
# org matches and the service is in its granted_credentials
|
|
||||||
# ([[identities]] above). Once the State Store holds it, edit bindings in the
|
|
||||||
# dashboard (Settings, Advanced); a stored set replaces the file's.
|
|
||||||
# [[containers.credentials]]
|
|
||||||
# service = "openai"
|
|
||||||
# org = "acme" # empty means the default org
|
|
||||||
# secret = {engine = "env", key = "OPENAI_API_KEY"}
|
|
||||||
|
|
||||||
# At least one [[repos]] entry is required before archied will poll
|
# Long-running agent loops that maintain memory, skills and — in dry run —
|
||||||
# anything -- it is deliberately left commented rather than shipped active:
|
# file follow-up issues from recent runs. Definitions are data: the server
|
||||||
# an active example here validates as a normal, working repo (owner/name are
|
# validates them and the gateway applies them live.
|
||||||
# only checked for non-empty), so archied would silently start polling a
|
# [[curators]]
|
||||||
# repository that doesn't exist. archied setup does not write this section
|
# name = "self-intake"
|
||||||
# ([[repos]] is an array of tables, which the text-patching setup uses
|
# interval = "1h"
|
||||||
# cannot target) -- add at least one entry by hand.
|
# tools = ["run_list", "run_events", "issue_list"]
|
||||||
#
|
# instructions = """
|
||||||
# [[repos]]
|
# You are archie's self-intake curator, in dry run. Each pass: list recent
|
||||||
# owner = "your-github-username"
|
# task runs with run_list, inspect anything parked or failed with run_events,
|
||||||
# name = "todo"
|
# check issue_list for each repo so nothing already open is repeated, then
|
||||||
# base = "main"
|
# report candidate follow-up issues, each tied to the run that produced it.
|
||||||
# ecosystem = "go" # "go", "python", "node", "rust", or "custom"
|
# Do not create issues.
|
||||||
# # Override the ecosystem defaults when needed:
|
# """
|
||||||
# # preflight = [["go", "version"]]
|
# To let it file: add "issue_create" to tools and tell it to file each
|
||||||
# # test_glob = "*_test.go"
|
# candidate (citing the run) instead of only reporting it.
|
||||||
# protect = ["_templ.go"]
|
|
||||||
# gate = [
|
|
||||||
# ["templ", "generate", "./components/"],
|
|
||||||
# ["go", "vet", "./..."],
|
|
||||||
# ["go", "build", "./..."],
|
|
||||||
# ["golangci-lint", "run"],
|
|
||||||
# ["go", "test", "./...", "-count=1"],
|
|
||||||
# ]
|
|
||||||
# # allow_concurrent = true # let the daemon run multiple tasks for this repo at once instead of
|
|
||||||
# # FIFO-serializing them; only safe when concurrent worktrees won't collide
|
|
||||||
# # (e.g. different base branches or packages per task). Still bounded by
|
|
||||||
# # [containers].max_concurrency globally.
|
|
||||||
# # persistent_storage = true # reuse a per-repo Docker volume and Git object cache until volume_ttl
|
|
||||||
# # max_retries = 5 # per-repo override of the global max_retries above
|
|
||||||
|
|
||||||
# ── Tools ───────────────────────────────────────────────────────────────────
|
|
||||||
# Limits on what a tool may return. These bound how much of the context window
|
|
||||||
# one tool call can spend: the workspace file tools truncate themselves, but
|
|
||||||
# skill bodies and MCP server results otherwise arrive whole.
|
|
||||||
#
|
|
||||||
# Zero (or absent) takes the default. A NEGATIVE value disables the limit --
|
|
||||||
# zero cannot mean "off" because it is indistinguishable from an unset key.
|
|
||||||
# [tools.tool_policy]
|
|
||||||
# max_result_chars = 50000 # cap on one tool result; -1 for no cap
|
|
||||||
# spill_dir = "" # unset by default, which truncates oversized results
|
|
||||||
# # inline. When set, a result over the cap is written
|
|
||||||
# # here in full and the model is handed the path.
|
|
||||||
# # It MUST be inside chat.workspace: the read tool
|
|
||||||
# # refuses paths outside it, so a spill anywhere else
|
|
||||||
# # is a reference the model cannot open -- worse than
|
|
||||||
# # truncating. Startup warns if it is outside.
|
|
||||||
# # Task agents work in their own worktree and cannot
|
|
||||||
# # read it at all; they always truncate.
|
|
||||||
|
|
||||||
# The web_fetch tool: retrieve a URL and return readable text.
|
|
||||||
# [tools.web_fetch]
|
|
||||||
# enabled = true # set false to withdraw the tool entirely
|
|
||||||
# timeout = "30s"
|
|
||||||
# max_bytes = 2000000
|
|
||||||
# allow_private_networks = false
|
|
||||||
# # Off by default, and worth leaving off. archied's own dashboard, NATS and
|
|
||||||
# # the Docker API answer on loopback and private addresses, and the URL to
|
|
||||||
# # fetch arrives through chat -- an untrusted path, since a forge issue body
|
|
||||||
# # or an inbound email can be quoted into a turn. The address is checked at
|
|
||||||
# # dial time rather than on the URL string, so a public name that resolves to
|
|
||||||
# # a private address is refused too. Turn this on only for a homelab endpoint
|
|
||||||
# # you intend Archie to reach.
|
|
||||||
|
|
||||||
# The generate_video tool: text-to-video via MiniMax's API. Off by default,
|
|
||||||
# unlike web_fetch -- this spends real API credits per call, so it needs an
|
|
||||||
# explicit opt-in and a working key before it is registered at all.
|
|
||||||
# [tools.minimax]
|
|
||||||
# enabled = true
|
|
||||||
# api_key = { engine = "env", key = "MINIMAX_API_KEY" }
|
|
||||||
# base_url = "" # override the API host; leave unset in normal operation
|
|
||||||
# # Generation is synchronous from the model's point of view: the tool call
|
|
||||||
# # blocks until MiniMax reports the video ready or failed, which can take
|
|
||||||
# # several minutes. The result is a hosted URL delivered through whatever
|
|
||||||
# # channel supports gateway.MediaSender (Telegram today); channels without
|
|
||||||
# # that support get the URL as a plain link in the reply text instead.
|
|
||||||
+57
-59
@@ -1,8 +1,6 @@
|
|||||||
# Running this distribution
|
# Running this distribution
|
||||||
|
|
||||||
This archive contains five linux/amd64 binaries:
|
This archive holds the linux/amd64 binary for each service. Each service owns its data and reaches the others only through their gRPC
|
||||||
|
|
||||||
Each service owns its data and reaches the others only through their gRPC
|
|
||||||
contracts (or NATS, for task actions):
|
contracts (or NATS, for task actions):
|
||||||
|
|
||||||
| Service | Owns | Reaches |
|
| Service | Owns | Reaches |
|
||||||
@@ -13,25 +11,30 @@ contracts (or NATS, for task actions):
|
|||||||
| `archie-messaging` | the Telegram, email and webhook channel connections | Gateway; State Store for channel settings |
|
| `archie-messaging` | the Telegram, email and webhook channel connections | Gateway; State Store for channel settings |
|
||||||
| `archie-ui` | the dashboard and the webhook capture receiver | Gateway; State Store |
|
| `archie-ui` | the dashboard and the webhook capture receiver | Gateway; State Store |
|
||||||
|
|
||||||
`archied playbooks lint` checks playbook binding YAML before it reaches the
|
|
||||||
daemon, and `archied playbooks serve` is its language server for editors.
|
|
||||||
|
|
||||||
Without `archie-messaging` the channels are simply absent, so it needs a unit
|
Without `archie-messaging` the channels are simply absent, so it needs a unit
|
||||||
of its own (`deployments/systemd-user-service.md`).
|
of its own (`deployments/systemd-user-service.md`).
|
||||||
|
|
||||||
`archie-agent` (the per-task sandboxed runtime) is **not** in this archive —
|
`archie-agent` (the per-task sandboxed runtime) has no unit of its own. The
|
||||||
it only ever runs inside the Docker container `archied` spawns per task, never
|
agent image is a separate thing, pulled for the containers `archied` spawns
|
||||||
as a host binary. Pull it from GHCR: `ghcr.io/samcharles93/archie-agent`.
|
per task: `[containers].image` has no default, and the daemon reports it as
|
||||||
|
missing at startup. This archive's `release.json` pins the digest the release
|
||||||
|
published, and the deploy step passes it to the install, so a release install
|
||||||
|
needs nothing by hand; a from-source install sets the image itself. Set
|
||||||
|
`[containers].registry_auth` when the reference is on a registry that needs a
|
||||||
|
login -- see
|
||||||
|
`deployments/systemd-user-service.md#6-pinning-the-archie-agent-image`.
|
||||||
|
|
||||||
## Quickstart
|
## Quickstart
|
||||||
|
|
||||||
1. Pick a starting configuration. The full set of annotated templates lives
|
1. Pick a starting configuration. The full set of annotated templates lives
|
||||||
in this repository's `deployments/` directory on GitHub
|
in this repository's `deployments/` directory on GitHub
|
||||||
(<https://github.com/samcharles93/archie-core/tree/main/deployments>) —
|
(<https://offloaded.dev>):
|
||||||
`standalone.toml` (no forge, the simplest start),
|
`standalone.toml` (no forge, the simplest start),
|
||||||
`single-forge-github.toml`, `multi-forge-github-gitea.toml` and
|
`single-forge-github.toml` and `docker-nats-stack.toml` cover the common cases. Every one needs
|
||||||
`docker-nats-stack.toml` cover the common cases. Every one needs
|
PostgreSQL 18 with the `archie_migrator` and `archie_runtime` roles created
|
||||||
PostgreSQL 18 at `database_url`. Copy whichever fits to:
|
once by `archie-state-store provision` (see `deployments/README.md`);
|
||||||
|
`docker compose up -d postgres` plus that command gives the local default.
|
||||||
|
Copy whichever fits to:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
mkdir -p ~/.config/archie
|
mkdir -p ~/.config/archie
|
||||||
@@ -44,8 +47,8 @@ as a host binary. Pull it from GHCR: `ghcr.io/samcharles93/archie-agent`.
|
|||||||
|
|
||||||
3. Start the five processes. Order does not matter: a service whose peer is
|
3. Start the five processes. Order does not matter: a service whose peer is
|
||||||
not up yet waits for it and reports it as degraded on its health surface
|
not up yet waits for it and reports it as degraded on its health surface
|
||||||
meanwhile. The Gateway waits for the daemon's NATS endpoint when the broker
|
meanwhile. The Gateway waits for the daemon's NATS endpoint when the daemon
|
||||||
is embedded.
|
runs the embedded broker.
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
./archie-state-store -config ~/.config/archie/config.toml -listen 127.0.0.1:9090 &
|
./archie-state-store -config ~/.config/archie/config.toml -listen 127.0.0.1:9090 &
|
||||||
@@ -55,47 +58,39 @@ as a host binary. Pull it from GHCR: `ghcr.io/samcharles93/archie-agent`.
|
|||||||
./archied -config ~/.config/archie/config.toml
|
./archied -config ~/.config/archie/config.toml
|
||||||
```
|
```
|
||||||
|
|
||||||
Dashboard reachability comes from `[web].listen` (default
|
Open `[web].listen` (default `127.0.0.1:8484`) to configure the organisation,
|
||||||
`127.0.0.1:8484`, which needs no dashboard token). For a non-loopback
|
workspace and first administrator account. Remote access requires an HTTPS
|
||||||
bind pass `-listen` with `-token` or `-token-file` to mint and persist
|
reverse proxy. Complete setup before exposing the dashboard publicly.
|
||||||
one. `archie-ui` reads `GATEWAY_TOKEN` / `STATE_STORE_TOKEN` from its
|
|
||||||
process environment only — it has no secret registry, so when those
|
|
||||||
tokens live in a secret manager, whatever starts `archie-ui` must export
|
|
||||||
them into its environment (the `[services.*].target_token` values in
|
|
||||||
`config.toml` are the other supported source).
|
|
||||||
|
|
||||||
4. For a persistent, 24/7 deployment instead of a foreground run, follow the
|
4. For a persistent, 24/7 deployment instead of a foreground run, follow the
|
||||||
systemd user-unit runbook:
|
systemd user-unit runbook:
|
||||||
<https://github.com/samcharles93/archie-core/blob/main/deployments/systemd-user-service.md>.
|
<https://offloaded.dev>.
|
||||||
|
|
||||||
## Verifying an install
|
|
||||||
|
|
||||||
`archied playbooks lint -dir <playbooks-dir>` validates playbook binding YAML
|
|
||||||
against the same schema `archied` loads at startup — run it against your
|
|
||||||
playbooks directory before pointing `archied` at it.
|
|
||||||
|
|
||||||
## Version
|
## Version
|
||||||
|
|
||||||
This archive's binaries are built from the `archied` release tag in its
|
The release pipeline builds this archive's binaries from the `archied` release
|
||||||
filename; `archie-ui`, `archie-gateway`, `archie-state-store` and
|
tag in its filename. `archie-ui`, `archie-gateway`, `archie-state-store` and
|
||||||
`archie-messaging` ship at that same version rather than
|
`archie-messaging` ship at that same version rather than
|
||||||
being independently tagged (see `RELEASING.md` in the source repository for why
|
being independently tagged (see `RELEASING.md` in the source repository for why
|
||||||
only `archied` and `archie-agent` are independently versioned).
|
only `archied` and `archie-agent` are independently versioned).
|
||||||
|
|
||||||
`archie-state-store`, `archie-gateway`, `archie-messaging`, `archie-ui` and
|
`archie-state-store`, `archie-gateway`, `archie-messaging`, `archie-ui` and
|
||||||
`archied` are services that must be running and addressable; `archie-messaging`
|
`archied` are services that must be running and addressable. `archie-messaging`
|
||||||
carries the Telegram, email and webhook channels since the v1.30.0 extraction, so
|
carries the Telegram, email and webhook channels since the v1.30.0 extraction, so
|
||||||
an install (or an upgrade across v1.30.0) needs its unit as well -- see
|
an install (or an upgrade across v1.30.0) needs its unit as well. See
|
||||||
`deployments/systemd-user-service.md`.
|
`deployments/systemd-user-service.md`.
|
||||||
|
|
||||||
### Native self-update
|
### Native self-update
|
||||||
|
|
||||||
`archie-update-install` downloads the approved release's Linux/amd64 archive
|
Install on Settings → Status runs `archied update install -version X` against
|
||||||
and verifies its `SHA256SUMS` entry before executing or installing it. Releases
|
the release source in the update settings. It fetches release `vX`, refuses it
|
||||||
must include `release.json`, all host binaries, and the two updater scripts.
|
unless the source's key signed its statement, and downloads the Linux/amd64 zip
|
||||||
Older releases without this contract cannot be installed through the artifact
|
only if it hashes to the digest that statement names. Every host binary in the
|
||||||
path. `--from-source` (or `ARCHIE_UPDATE_SOURCE_BUILD=1`) explicitly clones and
|
zip must report `X`. It then pulls the agent image the statement pins by digest and backs up the database to
|
||||||
builds the selected release instead.
|
`db.pre-update.dump` in the state directory. It stages the new binaries beside the
|
||||||
|
live ones and hands the transaction to `archied update watchdog` in a process of
|
||||||
|
its own (a transient systemd user unit). Nothing that runs changes until the
|
||||||
|
watchdog takes over.
|
||||||
|
|
||||||
`archied update check` finds the newest GitHub release with a linux-amd64 zip on
|
`archied update check` finds the newest GitHub release with a linux-amd64 zip on
|
||||||
the channel chosen under Settings → Status → Updates: stable, next (includes
|
the channel chosen under Settings → Status → Updates: stable, next (includes
|
||||||
@@ -103,30 +98,33 @@ prereleases) or a pinned version. From a shell it reads
|
|||||||
`ARCHIE_UPDATE_RELEASE_CHANNEL` and `ARCHIE_UPDATE_PIN`, or `-channel` and `-pin`.
|
`ARCHIE_UPDATE_RELEASE_CHANNEL` and `ARCHIE_UPDATE_PIN`, or `-channel` and `-pin`.
|
||||||
The notification destination remains separate from the release channel.
|
The notification destination remains separate from the release channel.
|
||||||
|
|
||||||
For scheduled, unattended runs, `archie-update-install --auto` discovers the
|
|
||||||
selected release and refuses if the daemon reports work in flight. It checks
|
|
||||||
again immediately before promotion. A scheduler can set
|
|
||||||
`ARCHIE_UPDATE_RELEASE_CHANNEL` and `ARCHIE_UPDATE_PIN`; nothing schedules updates
|
|
||||||
by default. All services stop through their ordinary graceful shutdown path.
|
|
||||||
|
|
||||||
`release.json` supplies the service order and required config sections to both
|
`release.json` supplies the service order and required config sections to both
|
||||||
first-install and self-update. A missing unit or config section produces an
|
first-install and self-update. A missing unit or config section produces an
|
||||||
ordered migration plan and refuses installation. Apply that plan before retrying.
|
ordered migration plan and refuses installation. Apply that plan before retrying.
|
||||||
Automatic topology edits are intentionally unsupported.
|
Automatic topology edits are intentionally unsupported.
|
||||||
|
|
||||||
The watchdog switches staged executables by rename, restarts services, and
|
The watchdog stops the units in reverse `release.json` order, switches the
|
||||||
requires the candidate daemon's existing readiness registry to remain healthy
|
staged executables by rename, switches the control-plane image policy (only the
|
||||||
for 120 seconds. Agent images come from the release manifest by digest. The
|
image field, with conflict detection), and restarts the units in order through
|
||||||
image switch updates the control-plane policy, preserving other settings;
|
`systemctl --user`. archied must report the new version and stay healthy for
|
||||||
rollback restores the prior image policy with conflict detection. Source builds
|
120 seconds. Otherwise the watchdog restores the previous binaries and image
|
||||||
use the built image's immutable image ID.
|
policy. Data is not rolled back unless the new release migrated the database.
|
||||||
|
Then the previous binaries cannot serve it, so the watchdog restores the
|
||||||
|
pre-update backup, and the outcome report says that the restore discarded every
|
||||||
|
write since the update began.
|
||||||
|
Without a systemd user manager the watchdog switches binaries and image policy
|
||||||
|
but restarts nothing, and the install reports that the services need a manual
|
||||||
|
restart.
|
||||||
|
|
||||||
Transactions live in `${XDG_STATE_HOME:-~/.local/state}/archie/update`, outside
|
Transactions live in `${XDG_STATE_HOME:-~/.local/state}/archie/update`, outside
|
||||||
the binary directory. `phase`, `environment`, `image.json` (when applicable),
|
the binary directory: `transaction/journal.json`, `transaction/previous/`, and
|
||||||
and `previous/` describe the transaction. A lock reports the owning process.
|
`transaction/archied`, the frozen copy of the archied that wrote the journal. On
|
||||||
On daemon boot, an interrupted transaction schedules independent recovery before
|
daemon boot, archied hands an interrupted transaction to that frozen watchdog
|
||||||
normal startup. To recover manually, run `transaction/watchdog --recover` from
|
with `-recover` before normal startup. The watchdog discards a transaction that
|
||||||
that state directory. A failed recovery keeps the journal for another attempt.
|
never started, rolls back one that was switching or observing, and finishes a
|
||||||
|
decided one. To recover manually, run
|
||||||
|
`transaction/archied update watchdog -recover -bin-dir ~/.local/bin` from that
|
||||||
|
state directory. A failed recovery keeps the journal for another attempt.
|
||||||
|
|
||||||
Database snapshots remain available for manual recovery. Schema migrations and
|
The database backup stays in the state directory after a committed update for
|
||||||
PostgreSQL data are never automatically reversed.
|
manual recovery with `archie-state-store restore`.
|
||||||
+59
-27
@@ -7,9 +7,6 @@ This directory contains configuration templates and guides for different deploym
|
|||||||
- **[`single-forge-github.toml`](./single-forge-github.toml)**:
|
- **[`single-forge-github.toml`](./single-forge-github.toml)**:
|
||||||
Standard single-forge deployment managing multiple GitHub repositories under a single bot account and GitHub token.
|
Standard single-forge deployment managing multiple GitHub repositories under a single bot account and GitHub token.
|
||||||
|
|
||||||
- **[`multi-forge-github-gitea.toml`](./multi-forge-github-gitea.toml)**:
|
|
||||||
Multi-identity deployment running GitHub and a self-hosted Gitea instance simultaneously with distinct bot accounts, tokens, and repository sets.
|
|
||||||
|
|
||||||
- **[`standalone.toml`](./standalone.toml)**: start here. Event-driven
|
- **[`standalone.toml`](./standalone.toml)**: start here. Event-driven
|
||||||
automation with no forge or repositories, local Ollama models, loopback
|
automation with no forge or repositories, local Ollama models, loopback
|
||||||
services and no tokens.
|
services and no tokens.
|
||||||
@@ -45,22 +42,53 @@ systemctl --user start archied
|
|||||||
|
|
||||||
Start order does not matter: a service waits for its peers and reports them as
|
Start order does not matter: a service waits for its peers and reports them as
|
||||||
degraded meanwhile. Every template needs PostgreSQL 18 at `database_url`;
|
degraded meanwhile. Every template needs PostgreSQL 18 at `database_url`;
|
||||||
`docker compose up -d postgres` provides the default one.
|
`docker compose up -d postgres` provides the default server.
|
||||||
|
`archie-state-store provision` creates its two login roles once per database --
|
||||||
|
see [Database roles](#database-roles).
|
||||||
|
|
||||||
The State Store service (`archie-state-store`) owns the task data in the
|
The State Store service (`archie-state-store`) owns the task data in the
|
||||||
PostgreSQL database `database_url` names and serves the `StateStore` gRPC
|
PostgreSQL database `database_url` names and serves the `StateStore` gRPC
|
||||||
contract. BOTH `archied` and `archie-gateway` dial it via
|
contract. BOTH `archied` and `archie-gateway` dial it via
|
||||||
`[services.state].target` and never open the task tables themselves. The templates set
|
`[services.state].target` and never open the task tables themselves. The templates set
|
||||||
`[services.state]` accordingly: a host-only agent reaches a loopback bind
|
`[services.state]` accordingly: a host-only agent reaches a loopback bind
|
||||||
(`127.0.0.1:9090`) with no token, while a container-mode agent needs the
|
(`127.0.0.1:9090`), while a container-mode agent needs the Docker bridge
|
||||||
Docker bridge gateway address plus a matching bearer token (`target_token` /
|
gateway address, because a container cannot reach the host's loopback. A
|
||||||
`--token` / `STATE_STORE_TOKEN`), because a container cannot reach the host's
|
non-loopback address needs `[tls]` certificates from your own CA; see
|
||||||
loopback.
|
`config.example.toml`.
|
||||||
|
|
||||||
|
## Database roles
|
||||||
|
|
||||||
|
The services do not connect as the database owner. `archie-state-store
|
||||||
|
provision` creates, or reconciles, two login roles in an existing PostgreSQL
|
||||||
|
database and hands the schema to one of them:
|
||||||
|
|
||||||
|
- `archie_migrator` owns the schema and its objects and runs the goose
|
||||||
|
migrations;
|
||||||
|
- `archie_runtime` may read and write rows (SELECT, INSERT, UPDATE, DELETE,
|
||||||
|
sequence USAGE, function EXECUTE) and has no CREATE privilege, so it cannot
|
||||||
|
change the schema.
|
||||||
|
|
||||||
|
Run it once per database with a role allowed to create roles and take ownership
|
||||||
|
of the schema (the database owner or a superuser). Then point the templates at
|
||||||
|
the two roles: `database_url` is the runtime URL and `migration_database_url`
|
||||||
|
the migration one. The command is idempotent, so re-running it after an upgrade
|
||||||
|
reconciles objects a migration added.
|
||||||
|
|
||||||
|
```bash
|
||||||
|
archie-state-store provision \
|
||||||
|
-admin-url "postgres://owner:secret@db:5432/archie" \
|
||||||
|
-runtime-url "postgres://archie_runtime:secret@db:5432/archie" \
|
||||||
|
-migration-url "postgres://archie_migrator:secret@db:5432/archie"
|
||||||
|
```
|
||||||
|
|
||||||
|
The bundled installer and `task dev` run this for you. A configuration with only
|
||||||
|
`database_url` keeps working exactly as before: that one role applies the
|
||||||
|
schema and serves, which is what an install that has not split the roles does.
|
||||||
|
|
||||||
## Running the dashboard
|
## Running the dashboard
|
||||||
|
|
||||||
The dashboard is served by the standalone UI Service (`archie-ui`), not by
|
The standalone UI Service (`archie-ui`) serves the dashboard's API, not
|
||||||
`archied`.
|
`archied`. The dashboard itself ships from archie-frontend as its own image.
|
||||||
It reads the same `config.toml`, dials the Gateway and State Store targets
|
It reads the same `config.toml`, dials the Gateway and State Store targets
|
||||||
already configured there, and binds `[web].listen` (`127.0.0.1:8484` by
|
already configured there, and binds `[web].listen` (`127.0.0.1:8484` by
|
||||||
default). Start it after the Gateway and the State Store:
|
default). Start it after the Gateway and the State Store:
|
||||||
@@ -69,24 +97,28 @@ default). Start it after the Gateway and the State Store:
|
|||||||
archie-ui -config ~/.config/archie/config.toml
|
archie-ui -config ~/.config/archie/config.toml
|
||||||
```
|
```
|
||||||
|
|
||||||
A non-loopback `[web].listen` requires a dashboard token (`-token`, or
|
Open the dashboard to configure the organisation, workspace and first administrator account.
|
||||||
`-token-file` to mint and persist one); a loopback bind needs none.
|
Use HTTPS through a reverse proxy for remote access, and complete setup before exposing it publicly.
|
||||||
`archied` runs no dashboard listener at all, so webhook capture
|
`archied` runs no dashboard listener at all, so archie-ui receives webhook
|
||||||
(`POST /webhooks/capture/{source}`) is received by archie-ui and the
|
capture (`POST /webhooks/capture/{source}`) and the binding-dispatch loop in
|
||||||
binding-dispatch loop in `archied` consumes what arrives from the shared
|
`archied` consumes what arrives from the shared State Store.
|
||||||
State Store.
|
|
||||||
|
|
||||||
Auth note: unlike `archied`, archie-ui has no secret registry --
|
The dashboard speaks plain HTTP. A non-loopback bind therefore carries the
|
||||||
`GATEWAY_TOKEN`/`STATE_STORE_TOKEN` resolve from its process environment
|
session cookie and the provider token in clear over the network, and
|
||||||
only (or from `[services.*].target_token` in `config.toml`), so whatever
|
archie-ui warns about exactly that at startup. Terminate TLS in front of it
|
||||||
starts archie-ui must export those tokens into its environment. See the UI
|
(a reverse proxy or the tunnel itself) and set
|
||||||
Service unit in `systemd-user-service.md` for the worked example.
|
`[web].trust_forwarded_headers = true` to declare the proxy and silence the
|
||||||
|
warning. Leaving it off while exposing the port directly is the case the
|
||||||
|
warning names.
|
||||||
|
|
||||||
|
Auth note: archie-ui authenticates to its dependencies with its `[tls]`
|
||||||
|
certificate (`archie-ui.pem`).
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
# loopback (host-only agent)
|
# loopback (host-only agent)
|
||||||
archie-state-store -config ~/.config/archie/config.toml -listen 127.0.0.1:9090
|
archie-state-store -config ~/.config/archie/config.toml -listen 127.0.0.1:9090
|
||||||
# or container-mode: bind the bridge gateway with a token
|
# or container-mode: bind the bridge gateway ([tls] required)
|
||||||
archie-state-store -config ~/.config/archie/config.toml -listen 172.17.0.1:9090 -token <token>
|
archie-state-store -config ~/.config/archie/config.toml -listen 172.17.0.1:9090
|
||||||
```
|
```
|
||||||
|
|
||||||
## Verifying the daemon
|
## Verifying the daemon
|
||||||
@@ -117,10 +149,10 @@ curl -s -o /dev/null -w '%{http_code}\n' http://127.0.0.1:9091/healthz #
|
|||||||
curl -s http://127.0.0.1:9091/health/detailed # state_db component -> 200, or 503 when degraded
|
curl -s http://127.0.0.1:9091/health/detailed # state_db component -> 200, or 503 when degraded
|
||||||
```
|
```
|
||||||
|
|
||||||
A running State Store holds the `state-store` ownership lock on its database;
|
A running State Store holds the `state-store` ownership lock on its database.
|
||||||
`archied` and `archie-gateway` never open the task tables directly, so a second
|
`archied` and `archie-gateway` never open the task tables directly, so a second
|
||||||
store process on the same `database_url` refuses to start, and a consumer that
|
store process on the same `database_url` refuses to start. A consumer that
|
||||||
opens the task tables indicates dual-store ownership.
|
opens the task tables indicates dual-store ownership.
|
||||||
The readiness probe is the single-writer check the runbook has against a
|
The readiness probe is the single-writer check the runbook has against a
|
||||||
degraded store: a `503` from `/health/detailed` means `archied` should be
|
degraded store: a `503` from `/health/detailed` means the operator should
|
||||||
started only after the store is healthy.
|
start `archied` only after the store is healthy.
|
||||||
@@ -0,0 +1,80 @@
|
|||||||
|
# Hardened enterprise overlay for deployments/archie/compose.yml.
|
||||||
|
# Usage: docker compose -f compose.yml -f compose.enterprise.yml up -d
|
||||||
|
#
|
||||||
|
# Ensure ./config.toml omits database.owner_url and ./secrets/* holds:
|
||||||
|
# - db_runtime_url (DML-only archie_app connection string)
|
||||||
|
# - db_owner_url (DDL archie_owner connection string, mounted only in archie-migrate)
|
||||||
|
# - age_identity (AGE-SECRET-KEY-1...)
|
||||||
|
# - admin_token_sha256 (hex SHA-256)
|
||||||
|
|
||||||
|
services:
|
||||||
|
archie-migrate:
|
||||||
|
image: ${ARCHIE_IMAGE:-gcr.io/distroless/static-debian12:nonroot}
|
||||||
|
restart: "no"
|
||||||
|
user: "65532:65532"
|
||||||
|
read_only: true
|
||||||
|
tmpfs:
|
||||||
|
- /tmp:rw,noexec,nosuid,nodev,size=64m
|
||||||
|
cap_drop:
|
||||||
|
- ALL
|
||||||
|
security_opt:
|
||||||
|
- no-new-privileges:true
|
||||||
|
entrypoint: ["/archie/archie"]
|
||||||
|
command: ["-config", "", "migrate"]
|
||||||
|
environment:
|
||||||
|
HOME: /tmp
|
||||||
|
SSL_CERT_FILE: /etc/ssl/certs/enterprise-ca.crt
|
||||||
|
ARCHIE_DATABASE_URL_FILE: /run/secrets/db_runtime_url
|
||||||
|
ARCHIE_DATABASE_OWNER_URL_FILE: /run/secrets/db_owner_url
|
||||||
|
secrets:
|
||||||
|
- db_runtime_url
|
||||||
|
- db_owner_url
|
||||||
|
volumes:
|
||||||
|
- ./bin/archie:/archie/archie:ro
|
||||||
|
- ${ARCHIE_CA_BUNDLE:-./certs/enterprise-ca.crt}:/etc/ssl/certs/enterprise-ca.crt:ro
|
||||||
|
networks: [internal]
|
||||||
|
depends_on:
|
||||||
|
archie-db:
|
||||||
|
condition: service_healthy
|
||||||
|
|
||||||
|
archie:
|
||||||
|
image: ${ARCHIE_IMAGE:-gcr.io/distroless/static-debian12:nonroot}
|
||||||
|
user: "65532:65532"
|
||||||
|
read_only: true
|
||||||
|
tmpfs:
|
||||||
|
- /tmp:rw,noexec,nosuid,nodev,size=128m
|
||||||
|
cap_drop:
|
||||||
|
- ALL
|
||||||
|
security_opt:
|
||||||
|
- no-new-privileges:true
|
||||||
|
- seccomp=./seccomp.json
|
||||||
|
environment:
|
||||||
|
HOME: /tmp
|
||||||
|
SSL_CERT_FILE: /etc/ssl/certs/enterprise-ca.crt
|
||||||
|
HTTPS_PROXY: ${HTTPS_PROXY:-}
|
||||||
|
HTTP_PROXY: ${HTTP_PROXY:-}
|
||||||
|
NO_PROXY: ${NO_PROXY:-localhost,127.0.0.1,archie-db}
|
||||||
|
ARCHIE_DATABASE_URL_FILE: /run/secrets/db_runtime_url
|
||||||
|
ARCHIE_AGE_IDENTITY_FILE: /run/secrets/age_identity
|
||||||
|
ARCHIE_ADMIN_TOKEN_SHA256_FILE: /run/secrets/admin_token_sha256
|
||||||
|
secrets:
|
||||||
|
- db_runtime_url
|
||||||
|
- age_identity
|
||||||
|
- admin_token_sha256
|
||||||
|
volumes:
|
||||||
|
- ${ARCHIE_CA_BUNDLE:-./certs/enterprise-ca.crt}:/etc/ssl/certs/enterprise-ca.crt:ro
|
||||||
|
depends_on:
|
||||||
|
archie-db:
|
||||||
|
condition: service_healthy
|
||||||
|
archie-migrate:
|
||||||
|
condition: service_completed_successfully
|
||||||
|
|
||||||
|
secrets:
|
||||||
|
db_runtime_url:
|
||||||
|
file: ./secrets/db_runtime_url
|
||||||
|
db_owner_url:
|
||||||
|
file: ./secrets/db_owner_url
|
||||||
|
age_identity:
|
||||||
|
file: ./secrets/age_identity
|
||||||
|
admin_token_sha256:
|
||||||
|
file: ./secrets/admin_token_sha256
|
||||||
@@ -0,0 +1,76 @@
|
|||||||
|
name: archie
|
||||||
|
|
||||||
|
services:
|
||||||
|
archie-db:
|
||||||
|
image: postgres:18-alpine
|
||||||
|
restart: unless-stopped
|
||||||
|
environment:
|
||||||
|
POSTGRES_DB: archie
|
||||||
|
POSTGRES_USER: archie_owner
|
||||||
|
POSTGRES_PASSWORD: ${ARCHIE_OWNER_PASSWORD:?}
|
||||||
|
ARCHIE_APP_PASSWORD: ${ARCHIE_APP_PASSWORD:?}
|
||||||
|
volumes:
|
||||||
|
- ./postgres:/var/lib/postgresql
|
||||||
|
- ./initdb:/docker-entrypoint-initdb.d:ro
|
||||||
|
networks: [internal]
|
||||||
|
healthcheck:
|
||||||
|
test: ["CMD-SHELL", "pg_isready -U archie_owner -d archie"]
|
||||||
|
interval: 5s
|
||||||
|
timeout: 3s
|
||||||
|
retries: 20
|
||||||
|
|
||||||
|
archie:
|
||||||
|
image: gcr.io/distroless/static-debian12:nonroot
|
||||||
|
restart: unless-stopped
|
||||||
|
command: ["/archie/archie", "-config", "/archie/config.toml"]
|
||||||
|
environment:
|
||||||
|
# The age secret engine resolves secret:// references from this file with
|
||||||
|
# this identity. Both are paths the state mount already holds, so no key
|
||||||
|
# is in this file.
|
||||||
|
AGE_FILE: /archie/state/age/secrets.age
|
||||||
|
AGE_IDENTITY: /archie/state/age/identity.txt
|
||||||
|
# Docker's default seccomp profile plus the one clone the extension host
|
||||||
|
# needs to confine an extension in its own user and network namespace.
|
||||||
|
security_opt:
|
||||||
|
- seccomp=./seccomp.json
|
||||||
|
volumes:
|
||||||
|
- ./bin/archie:/archie/archie:ro
|
||||||
|
- ./config.toml:/archie/config.toml:ro
|
||||||
|
- ./extensions:/archie/extensions:ro
|
||||||
|
- ./state:/archie/state
|
||||||
|
- ./catalogue:/archie/catalogue:ro
|
||||||
|
networks: [internal]
|
||||||
|
depends_on:
|
||||||
|
archie-db:
|
||||||
|
condition: service_healthy
|
||||||
|
|
||||||
|
archie-frontend:
|
||||||
|
image: ${ARCHIE_FRONTEND_IMAGE:-ghcr.io/archie-platform/archie-frontend:v0.1.0}
|
||||||
|
restart: unless-stopped
|
||||||
|
read_only: true
|
||||||
|
tmpfs:
|
||||||
|
- /tmp
|
||||||
|
cap_drop: [ALL]
|
||||||
|
security_opt:
|
||||||
|
- no-new-privileges:true
|
||||||
|
networks: [internal]
|
||||||
|
|
||||||
|
# The ingress: one host, routed by path to the backend or the dashboard.
|
||||||
|
edge:
|
||||||
|
image: nginxinc/nginx-unprivileged:1.29-alpine
|
||||||
|
restart: unless-stopped
|
||||||
|
read_only: true
|
||||||
|
tmpfs:
|
||||||
|
- /tmp
|
||||||
|
cap_drop: [ALL]
|
||||||
|
security_opt:
|
||||||
|
- no-new-privileges:true
|
||||||
|
volumes:
|
||||||
|
- ./edge.conf:/etc/nginx/conf.d/default.conf:ro
|
||||||
|
ports:
|
||||||
|
- "${ARCHIE_BIND:?}:8080"
|
||||||
|
networks: [internal]
|
||||||
|
depends_on: [archie, archie-frontend]
|
||||||
|
|
||||||
|
networks:
|
||||||
|
internal: {}
|
||||||
Executable
+95
@@ -0,0 +1,95 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
# Deploys the single binary's stack to a host over ssh: deploy.sh root@staging-host.
|
||||||
|
# The first run creates the secrets on the host; they never leave it. The
|
||||||
|
# dashboard image is built from an archie-frontend checkout beside this one, or
|
||||||
|
# from ARCHIE_FRONTEND.
|
||||||
|
set -euo pipefail
|
||||||
|
|
||||||
|
target=${1:?usage: deploy.sh user@host [bind-address:port]}
|
||||||
|
bind=${2:-}
|
||||||
|
here=$(cd "$(dirname "$0")" && pwd)
|
||||||
|
repo=$(cd "$here/../.." && pwd)
|
||||||
|
frontend=${ARCHIE_FRONTEND:-"$(cd "$repo/.." && pwd)/archie-frontend"}
|
||||||
|
dir=/root/archie
|
||||||
|
|
||||||
|
version=$(git -C "$repo" describe --tags --always --dirty)
|
||||||
|
frontend_version=$(git -C "$frontend" describe --tags --always --dirty)
|
||||||
|
frontend_image="archie-frontend:$frontend_version"
|
||||||
|
docker build -q --build-arg VERSION="$frontend_version" \
|
||||||
|
--build-arg REVISION="$(git -C "$frontend" rev-parse HEAD)" \
|
||||||
|
-t "$frontend_image" "$frontend" >/dev/null
|
||||||
|
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -C "$repo" -trimpath \
|
||||||
|
-ldflags "-X github.com/samcharles93/archie-core/internal/buildinfo.Version=$version" \
|
||||||
|
-o "$here/.build/archie" ./cmd/archie
|
||||||
|
|
||||||
|
ssh "$target" "mkdir -p $dir/bin $dir/initdb $dir/extensions $dir/catalogue $dir/state && chown 65532:65532 $dir/state"
|
||||||
|
scp -q "$here/compose.yml" "$target:$dir/compose.yml"
|
||||||
|
scp -q "$here/edge.conf" "$target:$dir/edge.conf"
|
||||||
|
docker save "$frontend_image" | ssh "$target" docker load -q
|
||||||
|
scp -q "$here/seccomp.json" "$target:$dir/seccomp.json"
|
||||||
|
scp -q "$here/initdb/01-roles.sh" "$target:$dir/initdb/01-roles.sh"
|
||||||
|
scp -q "$here/.build/archie" "$target:$dir/bin/archie.new"
|
||||||
|
|
||||||
|
ssh "$target" BIND="$bind" DIR="$dir" FRONTEND_IMAGE="$frontend_image" bash -s <<'REMOTE'
|
||||||
|
set -euo pipefail
|
||||||
|
cd "$DIR"
|
||||||
|
chmod 755 initdb/01-roles.sh
|
||||||
|
mv bin/archie.new bin/archie && chmod 755 bin/archie
|
||||||
|
if [ ! -f .env ]; then
|
||||||
|
[ -n "$BIND" ] || { echo "first deploy needs a bind address, e.g. 10.0.0.1:8099" >&2; exit 1; }
|
||||||
|
umask 077
|
||||||
|
printf 'ARCHIE_OWNER_PASSWORD=%s\nARCHIE_APP_PASSWORD=%s\nARCHIE_BIND=%s\n' \
|
||||||
|
"$(openssl rand -hex 24)" "$(openssl rand -hex 24)" "$BIND" > .env
|
||||||
|
fi
|
||||||
|
if [ ! -f config.toml ]; then
|
||||||
|
set -a; . ./.env; set +a
|
||||||
|
umask 077
|
||||||
|
cat > config.toml <<CONFIG
|
||||||
|
listen = "0.0.0.0:8080"
|
||||||
|
[database]
|
||||||
|
url = "postgres://archie_app:${ARCHIE_APP_PASSWORD}@archie-db:5432/archie?sslmode=disable"
|
||||||
|
owner_url = "postgres://archie_owner:${ARCHIE_OWNER_PASSWORD}@archie-db:5432/archie?sslmode=disable"
|
||||||
|
CONFIG
|
||||||
|
chown 65532:65532 config.toml
|
||||||
|
fi
|
||||||
|
# The admin token guards /api/. Only its hash goes in the config, as a
|
||||||
|
# top-level key, so it must come before the [database] table.
|
||||||
|
if ! grep -q '^admin_token_sha256' config.toml; then
|
||||||
|
umask 077
|
||||||
|
openssl rand -hex 32 | tr -d '\n' > admin-token
|
||||||
|
hash=$(sha256sum admin-token | cut -d' ' -f1)
|
||||||
|
sed -i "1i admin_token_sha256 = \"$hash\"" config.toml
|
||||||
|
chown 65532:65532 config.toml
|
||||||
|
fi
|
||||||
|
# Fetched extension binaries and other state outside the database live in
|
||||||
|
# the mounted state directory, so they survive the container being recreated.
|
||||||
|
if ! grep -q '^state_dir' config.toml; then
|
||||||
|
sed -i '1i state_dir = "/archie/state"' config.toml
|
||||||
|
fi
|
||||||
|
# The age identity seals the credentials Archie keeps. It is made here and
|
||||||
|
# never leaves the host; back it up, or credentials die with it.
|
||||||
|
if ! grep -q '^age_identity' config.toml; then
|
||||||
|
umask 077
|
||||||
|
identity=$(bin/archie -new-age-identity)
|
||||||
|
sed -i "1i age_identity = \"$identity\"" config.toml
|
||||||
|
unset identity
|
||||||
|
chown 65532:65532 config.toml
|
||||||
|
fi
|
||||||
|
# The age secret engine resolves secret:// references from this key and the
|
||||||
|
# file sealed to it. Skipped, not fatal, where age isn't installed: the engine
|
||||||
|
# simply has nothing to read.
|
||||||
|
if [ ! -f state/age/identity.txt ] && command -v age-keygen >/dev/null; then
|
||||||
|
umask 077
|
||||||
|
mkdir -p state/age
|
||||||
|
age-keygen -o state/age/identity.txt 2>/dev/null
|
||||||
|
chown -R 65532:65532 state/age
|
||||||
|
echo "age secret engine recipient: $(age-keygen -y state/age/identity.txt)"
|
||||||
|
fi
|
||||||
|
sed -i '/^ARCHIE_FRONTEND_IMAGE=/d' .env
|
||||||
|
echo "ARCHIE_FRONTEND_IMAGE=$FRONTEND_IMAGE" >> .env
|
||||||
|
docker compose up -d --remove-orphans
|
||||||
|
docker compose up -d --force-recreate archie
|
||||||
|
# edge.conf is a bind mount, so a changed route table needs a restart.
|
||||||
|
docker compose restart edge
|
||||||
|
REMOTE
|
||||||
|
echo "deployed $version and dashboard $frontend_version to $target"
|
||||||
@@ -0,0 +1,33 @@
|
|||||||
|
# The Compose stack's ingress: API, sign-in and webhook paths go to the
|
||||||
|
# backend, every other path to the dashboard, all on one host.
|
||||||
|
map $http_upgrade $connection_upgrade {
|
||||||
|
default upgrade;
|
||||||
|
'' close;
|
||||||
|
}
|
||||||
|
|
||||||
|
server {
|
||||||
|
listen 8080;
|
||||||
|
server_name _;
|
||||||
|
server_tokens off;
|
||||||
|
client_max_body_size 64m;
|
||||||
|
|
||||||
|
proxy_http_version 1.1;
|
||||||
|
proxy_set_header Host $http_host;
|
||||||
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||||
|
# TLS ends at the proxy in front of this one, so keep the scheme it saw.
|
||||||
|
proxy_set_header X-Forwarded-Proto $http_x_forwarded_proto;
|
||||||
|
proxy_set_header Upgrade $http_upgrade;
|
||||||
|
proxy_set_header Connection $connection_upgrade;
|
||||||
|
|
||||||
|
location ~ ^/(api|oauth2|hooks)(/|$) {
|
||||||
|
# The dashboard's live stream is a long-lived response; buffering it
|
||||||
|
# would hold every update back.
|
||||||
|
proxy_buffering off;
|
||||||
|
proxy_read_timeout 1h;
|
||||||
|
proxy_pass http://archie:8080;
|
||||||
|
}
|
||||||
|
|
||||||
|
location / {
|
||||||
|
proxy_pass http://archie-frontend:8080;
|
||||||
|
}
|
||||||
|
}
|
||||||
Executable
+9
@@ -0,0 +1,9 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
# Runs once, on an empty data directory. The owner (POSTGRES_USER) runs
|
||||||
|
# migrations; archie_app is the runtime role and holds no DDL rights.
|
||||||
|
set -eu
|
||||||
|
psql -v ON_ERROR_STOP=1 --username "$POSTGRES_USER" --dbname "$POSTGRES_DB" \
|
||||||
|
-v app_password="$ARCHIE_APP_PASSWORD" <<'SQL'
|
||||||
|
CREATE ROLE archie_app LOGIN PASSWORD :'app_password';
|
||||||
|
GRANT CONNECT ON DATABASE archie TO archie_app;
|
||||||
|
SQL
|
||||||
File diff suppressed because it is too large.
Load diff
+46
-5
@@ -9,25 +9,52 @@
|
|||||||
# [web] entirely.
|
# [web] entirely.
|
||||||
|
|
||||||
# `task dev` runs archie-state-store against this overlay, and the State Store
|
# `task dev` runs archie-state-store against this overlay, and the State Store
|
||||||
# fails closed without a PostgreSQL URL. This must reach the `postgres`
|
# fails closed without a PostgreSQL URL. These must reach the `postgres`
|
||||||
# service in docker-compose.yml, which `task dev` brings up first via
|
# service in docker-compose.yml, which `task dev` brings up first via
|
||||||
# dev:postgres -- keep the URL and that service in agreement.
|
# dev:postgres -- keep them and that service in agreement. dev:postgres also
|
||||||
|
# provisions the two roles: the services serve as archie_runtime and migrate
|
||||||
|
# as archie_migrator, while the Compose-created archie role is only the
|
||||||
|
# admin that created them.
|
||||||
bot_user = "archie-dev"
|
bot_user = "archie-dev"
|
||||||
|
|
||||||
database_url = "postgres://archie:archie@127.0.0.1:5432/archie?sslmode=disable"
|
database_url = "postgres://archie_runtime:archie@127.0.0.1:5432/archie?sslmode=disable"
|
||||||
|
migration_database_url = "postgres://archie_migrator:archie@127.0.0.1:5432/archie?sslmode=disable"
|
||||||
|
|
||||||
[web]
|
[web]
|
||||||
listen = "127.0.0.1:8484"
|
listen = "127.0.0.1:8484"
|
||||||
|
|
||||||
|
# The installed config may point [nats] at the optional external broker, which
|
||||||
|
# `task dev` never starts. An explicit empty url overrides it, so the daemon
|
||||||
|
# runs the embedded broker as in the e2e stack; the broker binds the host
|
||||||
|
# gateway, which task containers reach.
|
||||||
|
[nats]
|
||||||
|
mode = "embedded"
|
||||||
|
url = ""
|
||||||
|
|
||||||
|
# Task containers run the agent image `task image:agent` builds locally
|
||||||
|
# (docker-compose.yml tags it git.catlow.cloud/sam/archie-agent:latest), and
|
||||||
|
# the "missing" pull policy never pulls over the local build. There is no
|
||||||
|
# code-level default image: an unset containers.image fails validation at
|
||||||
|
# startup.
|
||||||
|
[containers]
|
||||||
|
image = "git.catlow.cloud/sam/archie-agent:latest"
|
||||||
|
|
||||||
# `task dev` runs archie-state-store via dev:state-store, which passes no
|
# `task dev` runs archie-state-store via dev:state-store, which passes no
|
||||||
# -listen, so the listen below is the port the store binds. It must agree with
|
# -listen, so the listen below is the port the store binds. It must agree with
|
||||||
# the target: these two lines are the only place that pair is stated. Move them
|
# the target: these two lines are the only place that pair is stated. Move them
|
||||||
# when a port is already taken on the host -- before the
|
# when a port is already taken on the host -- before the
|
||||||
# listen key existed the collision could only be worked around by hand-writing
|
# listen key existed the collision could only be worked around by hand-writing
|
||||||
# a matching target and passing -listen, and it read as a code fault.
|
# a matching target and passing -listen, and it read as a code fault.
|
||||||
|
#
|
||||||
|
# Task containers dial the target over the Docker bridge gateway, so the store
|
||||||
|
# listens on every interface and [tls] (issued by `task dev:tls`) is required.
|
||||||
[services.state]
|
[services.state]
|
||||||
target = "127.0.0.1:9091"
|
target = "172.17.0.1:9091"
|
||||||
listen = "127.0.0.1:9091"
|
listen = "0.0.0.0:9091"
|
||||||
|
|
||||||
|
[tls]
|
||||||
|
ca_file = "tmp/dev-tls/ca.pem"
|
||||||
|
cert_dir = "tmp/dev-tls"
|
||||||
|
|
||||||
# `task dev` runs archie-gateway via dev:gateway, which also passes no -listen:
|
# `task dev` runs archie-gateway via dev:gateway, which also passes no -listen:
|
||||||
# the listen below is what it binds. Stated explicitly so the value archie-ui
|
# the listen below is what it binds. Stated explicitly so the value archie-ui
|
||||||
@@ -35,3 +62,17 @@ listen = "127.0.0.1:9091"
|
|||||||
[services.gateway]
|
[services.gateway]
|
||||||
target = "127.0.0.1:8585"
|
target = "127.0.0.1:8585"
|
||||||
listen = "127.0.0.1:8585"
|
listen = "127.0.0.1:8585"
|
||||||
|
[services.daemon]
|
||||||
|
target = "127.0.0.1:8587"
|
||||||
|
listen = "127.0.0.1:8587"
|
||||||
|
|
||||||
|
# Dry-run self-intake curator (#1770): surveys recent runs and reports
|
||||||
|
# candidate follow-up issues as pass summaries; declares no issue-creating
|
||||||
|
# tool, so it cannot file. Needs a chat model configured to run at all.
|
||||||
|
[[curators]]
|
||||||
|
name = "self-intake"
|
||||||
|
interval = "1h"
|
||||||
|
tools = ["run_list", "run_events", "issue_list"]
|
||||||
|
instructions = """
|
||||||
|
You are archie's self-intake curator, in dry run. Each pass: list recent task runs with run_list, inspect anything parked or failed with run_events, check issue_list for each repo so nothing already open is repeated, then report candidate follow-up issues — concrete, each tied to the run that produced it. Do not create issues; this pass reports only (no issue-creating tool is declared, so it cannot). End your reply with the report.
|
||||||
|
"""
|
||||||
@@ -13,26 +13,30 @@
|
|||||||
|
|
||||||
poll_interval = "60s"
|
poll_interval = "60s"
|
||||||
bot_user = "archie"
|
bot_user = "archie"
|
||||||
diff_cap_lines = 0
|
|
||||||
work_dir = "~/.local/share/archie/work"
|
work_dir = "~/.local/share/archie/work"
|
||||||
state_dir = "~/.local/share/archie" # NATS store, task logs
|
state_dir = "~/.local/share/archie" # NATS store, task logs
|
||||||
# The State Store's PostgreSQL connection (PostgreSQL 18, required).
|
# The State Store's PostgreSQL connection (PostgreSQL 18, required).
|
||||||
# `docker compose up -d postgres` provides this local default; point it at
|
# `docker compose up -d postgres` provides the local default; point it at
|
||||||
# your own Postgres 18 server otherwise.
|
# your own Postgres 18 server otherwise. The services serve as archie_runtime
|
||||||
database_url = "postgres://archie:archie@127.0.0.1:5432/archie?sslmode=disable"
|
# and migrations run as archie_migrator; create both once with
|
||||||
|
# `archie-state-store provision -h` (deployments/README.md).
|
||||||
|
database_url = "postgres://archie_runtime:archie@127.0.0.1:5432/archie?sslmode=disable"
|
||||||
|
migration_database_url = "postgres://archie_migrator:archie@127.0.0.1:5432/archie?sslmode=disable"
|
||||||
|
|
||||||
[services.gateway]
|
[services.gateway]
|
||||||
target = "127.0.0.1:8585"
|
target = "127.0.0.1:8585"
|
||||||
|
|
||||||
# The State Store gRPC service owns the PostgreSQL task data; archied and
|
# The State Store gRPC service owns the PostgreSQL task data; archied and
|
||||||
# archie-gateway dial it and never open those tables themselves.
|
# archie-gateway dial it and never open those tables themselves.
|
||||||
# This deployment runs the agent in containers, so target is the Docker bridge
|
# This deployment runs the agent in containers, so the target is the Docker
|
||||||
# gateway (172.17.0.1) the container can reach, with a matching target_token
|
# bridge gateway (172.17.0.1) the container can reach. A non-loopback address
|
||||||
# that archie-state-store validates. Host-only agent: use 127.0.0.1:9090 with
|
# needs [tls]; see config.example.toml.
|
||||||
# no token.
|
|
||||||
[services.state]
|
[services.state]
|
||||||
target = "172.17.0.1:9090"
|
target = "172.17.0.1:9090"
|
||||||
target_token = "change-me-state-store-token"
|
|
||||||
|
[tls]
|
||||||
|
ca_file = "/etc/archie/tls/ca.pem"
|
||||||
|
cert_dir = "/etc/archie/tls"
|
||||||
|
|
||||||
[forge]
|
[forge]
|
||||||
type = "gitea"
|
type = "gitea"
|
||||||
@@ -55,16 +59,20 @@ mode = "external"
|
|||||||
# The pinned Compose-network gateway is reachable from both the host daemon
|
# The pinned Compose-network gateway is reachable from both the host daemon
|
||||||
# and the task containers it launches on archie-core_default.
|
# and the task containers it launches on archie-core_default.
|
||||||
url = "nats://172.19.0.1:4222"
|
url = "nats://172.19.0.1:4222"
|
||||||
|
token_env = "NATS_TOKEN"
|
||||||
|
callout_issuer_seed_env = "NATS_CALLOUT_SEED"
|
||||||
|
|
||||||
[containers]
|
[containers]
|
||||||
network = "archie-core_default"
|
network = "archie-core_default"
|
||||||
# Pin your own registry's tag/digest -- never deploy against a bare
|
# Pin your own registry's tag/digest -- never deploy against a bare
|
||||||
# ":latest" reference, which can change under a running deployment with no
|
# ":latest" reference, which can change under a running deployment with no
|
||||||
# warning. See deployments/systemd-user-service.md#pinning-the-archie-agent-image
|
# warning. See deployments/systemd-user-service.md#6-pinning-the-archie-agent-image
|
||||||
# for the pinning convention this repo follows for its own GHCR image.
|
# for the pinning convention this repo follows for its own agent image.
|
||||||
image = "git.example.com/you/archie-agent:v1.21.0" # or "@sha256:..." for a production digest pin
|
image = "git.example.com/you/archie-agent:v1.21.0" # or "@sha256:..." for a production digest pin
|
||||||
max_concurrency = 4
|
max_concurrency = 4
|
||||||
max_uptime = "60m"
|
# Must outlast the whole-task limit (default 4h), or the reaper ends a run the
|
||||||
|
# task budget would have parked.
|
||||||
|
max_uptime = "5h"
|
||||||
# "missing": pull only when the image is absent locally. "always" against a
|
# "missing": pull only when the image is absent locally. "always" against a
|
||||||
# private registry answers 401 because the daemon sends no credentials, so
|
# private registry answers 401 because the daemon sends no credentials, so
|
||||||
# refresh the agent by hand: docker compose pull agent
|
# refresh the agent by hand: docker compose pull agent
|
||||||
|
|||||||
@@ -0,0 +1,13 @@
|
|||||||
|
apiVersion: v2
|
||||||
|
name: archie
|
||||||
|
description: Event-driven agentic automation platform with pre-action governance and isolated extension execution.
|
||||||
|
type: application
|
||||||
|
version: 0.1.0
|
||||||
|
appVersion: "1.0.0"
|
||||||
|
keywords:
|
||||||
|
- archie
|
||||||
|
- automation
|
||||||
|
- governance
|
||||||
|
- enterprise
|
||||||
|
maintainers:
|
||||||
|
- name: Archie Platform Team
|
||||||
@@ -0,0 +1,129 @@
|
|||||||
|
{{/*
|
||||||
|
Expand the name of the chart.
|
||||||
|
*/}}
|
||||||
|
{{- define "archie.name" -}}
|
||||||
|
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }}
|
||||||
|
{{- end }}
|
||||||
|
|
||||||
|
{{/*
|
||||||
|
Create a default fully qualified app name.
|
||||||
|
*/}}
|
||||||
|
{{- define "archie.fullname" -}}
|
||||||
|
{{- if .Values.fullnameOverride }}
|
||||||
|
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }}
|
||||||
|
{{- else }}
|
||||||
|
{{- $name := default .Chart.Name .Values.nameOverride }}
|
||||||
|
{{- if contains $name .Release.Name }}
|
||||||
|
{{- .Release.Name | trunc 63 | trimSuffix "-" }}
|
||||||
|
{{- else }}
|
||||||
|
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
|
|
||||||
|
{{/*
|
||||||
|
Create chart name and version as used by the chart label.
|
||||||
|
*/}}
|
||||||
|
{{- define "archie.chart" -}}
|
||||||
|
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }}
|
||||||
|
{{- end }}
|
||||||
|
|
||||||
|
{{/*
|
||||||
|
Common labels.
|
||||||
|
*/}}
|
||||||
|
{{- define "archie.labels" -}}
|
||||||
|
helm.sh/chart: {{ include "archie.chart" . }}
|
||||||
|
{{ include "archie.selectorLabels" . }}
|
||||||
|
{{- if .Chart.AppVersion }}
|
||||||
|
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
|
||||||
|
{{- end }}
|
||||||
|
app.kubernetes.io/managed-by: {{ .Release.Service }}
|
||||||
|
{{- end }}
|
||||||
|
|
||||||
|
{{/*
|
||||||
|
Selector labels.
|
||||||
|
*/}}
|
||||||
|
{{- define "archie.selectorLabels" -}}
|
||||||
|
app.kubernetes.io/name: {{ include "archie.name" . }}
|
||||||
|
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||||
|
{{- end }}
|
||||||
|
|
||||||
|
{{/*
|
||||||
|
ServiceAccount name.
|
||||||
|
*/}}
|
||||||
|
{{- define "archie.serviceAccountName" -}}
|
||||||
|
{{- if .Values.serviceAccount.create }}
|
||||||
|
{{- default (include "archie.fullname" .) .Values.serviceAccount.name }}
|
||||||
|
{{- else }}
|
||||||
|
{{- default "default" .Values.serviceAccount.name }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
|
|
||||||
|
{{/*
|
||||||
|
Container image reference, preferring digest pinning when configured.
|
||||||
|
*/}}
|
||||||
|
{{- define "archie.image" -}}
|
||||||
|
{{- if .Values.image.digest }}
|
||||||
|
{{- printf "%s@%s" .Values.image.repository .Values.image.digest }}
|
||||||
|
{{- else }}
|
||||||
|
{{- printf "%s:%s" .Values.image.repository (default .Chart.AppVersion .Values.image.tag) }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
|
|
||||||
|
{{/*
|
||||||
|
Migration secret name.
|
||||||
|
*/}}
|
||||||
|
{{- define "archie.migrateSecretName" -}}
|
||||||
|
{{- default .Values.secrets.existingSecret .Values.migrate.existingSecret }}
|
||||||
|
{{- end }}
|
||||||
|
|
||||||
|
{{/*
|
||||||
|
Render a map to YAML while omitting keys whose value is null (used so OpenShift
|
||||||
|
restricted-v2 overlays can unset runAsUser, runAsGroup, and fsGroup cleanly).
|
||||||
|
*/}}
|
||||||
|
{{- define "archie.compactYaml" -}}
|
||||||
|
{{- $out := dict -}}
|
||||||
|
{{- range $k, $v := . -}}
|
||||||
|
{{- if not (kindIs "invalid" $v) -}}
|
||||||
|
{{- if kindIs "map" $v -}}
|
||||||
|
{{- $sub := include "archie.compactYaml" $v -}}
|
||||||
|
{{- if $sub -}}
|
||||||
|
{{- $_ := set $out $k (fromYaml $sub) -}}
|
||||||
|
{{- end -}}
|
||||||
|
{{- else -}}
|
||||||
|
{{- $_ := set $out $k $v -}}
|
||||||
|
{{- end -}}
|
||||||
|
{{- end -}}
|
||||||
|
{{- end -}}
|
||||||
|
{{- if $out -}}
|
||||||
|
{{- toYaml $out -}}
|
||||||
|
{{- end -}}
|
||||||
|
{{- end }}
|
||||||
|
|
||||||
|
{{/*
|
||||||
|
Dashboard name and selector labels. The name differs from the API's, so the
|
||||||
|
API's Service and NetworkPolicy never select dashboard pods.
|
||||||
|
*/}}
|
||||||
|
{{- define "archie.frontendFullname" -}}
|
||||||
|
{{- printf "%s-frontend" (include "archie.fullname" .) | trunc 63 | trimSuffix "-" }}
|
||||||
|
{{- end }}
|
||||||
|
|
||||||
|
{{- define "archie.frontendSelectorLabels" -}}
|
||||||
|
app.kubernetes.io/name: {{ printf "%s-frontend" (include "archie.name" .) | trunc 63 | trimSuffix "-" }}
|
||||||
|
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||||
|
{{- end }}
|
||||||
|
|
||||||
|
{{- define "archie.frontendLabels" -}}
|
||||||
|
helm.sh/chart: {{ include "archie.chart" . }}
|
||||||
|
{{ include "archie.frontendSelectorLabels" . }}
|
||||||
|
app.kubernetes.io/component: frontend
|
||||||
|
app.kubernetes.io/managed-by: {{ .Release.Service }}
|
||||||
|
{{- end }}
|
||||||
|
|
||||||
|
{{- define "archie.frontendImage" -}}
|
||||||
|
{{- if .Values.frontend.image.digest }}
|
||||||
|
{{- printf "%s@%s" .Values.frontend.image.repository .Values.frontend.image.digest }}
|
||||||
|
{{- else }}
|
||||||
|
{{- printf "%s:%s" .Values.frontend.image.repository .Values.frontend.image.tag }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
@@ -0,0 +1,71 @@
|
|||||||
|
apiVersion: v1
|
||||||
|
kind: ConfigMap
|
||||||
|
metadata:
|
||||||
|
name: {{ include "archie.fullname" . }}-config
|
||||||
|
labels:
|
||||||
|
{{- include "archie.labels" . | nindent 4 }}
|
||||||
|
data:
|
||||||
|
config.toml: |
|
||||||
|
listen = {{ .Values.config.listen | quote }}
|
||||||
|
{{- if .Values.metrics.enabled }}
|
||||||
|
metrics_listen = {{ printf "0.0.0.0:%v" .Values.metrics.port | quote }}
|
||||||
|
{{- end }}
|
||||||
|
state_dir = {{ .Values.config.stateDir | quote }}
|
||||||
|
shutdown_grace = {{ .Values.config.shutdownGrace | quote }}
|
||||||
|
{{- if .Values.config.ageBackupRecipients }}
|
||||||
|
age_backup_recipients = [
|
||||||
|
{{- range $i, $r := .Values.config.ageBackupRecipients }}
|
||||||
|
{{ $r | quote }}{{ if lt $i (sub (len $.Values.config.ageBackupRecipients) 1) }},{{ end }}
|
||||||
|
{{- end }}
|
||||||
|
]
|
||||||
|
{{- end }}
|
||||||
|
|
||||||
|
[catalogue]
|
||||||
|
disable_auto_update = {{ .Values.config.catalogue.disableAutoUpdate }}
|
||||||
|
{{- if .Values.config.catalogue.location }}
|
||||||
|
location = {{ .Values.config.catalogue.location | quote }}
|
||||||
|
{{- end }}
|
||||||
|
{{- if .Values.config.catalogue.publicKey }}
|
||||||
|
public_key = {{ .Values.config.catalogue.publicKey | quote }}
|
||||||
|
{{- end }}
|
||||||
|
{{- if .Values.config.catalogue.authSecret }}
|
||||||
|
auth_file = "/run/secrets/archie-catalogue/config.json"
|
||||||
|
{{- end }}
|
||||||
|
|
||||||
|
[extensions]
|
||||||
|
require_remote = {{ .Values.config.extensions.requireRemote }}
|
||||||
|
{{- if .Values.config.extensions.tls.existingSecret }}
|
||||||
|
ca_file = {{ printf "%s/ca.crt" .Values.config.extensions.tls.mountPath | quote }}
|
||||||
|
cert_file = {{ printf "%s/tls.crt" .Values.config.extensions.tls.mountPath | quote }}
|
||||||
|
key_file = {{ printf "%s/tls.key" .Values.config.extensions.tls.mountPath | quote }}
|
||||||
|
{{- end }}
|
||||||
|
{{- range $name, $ep := .Values.config.extensions.remote }}
|
||||||
|
|
||||||
|
[extensions.remote.{{ $name }}]
|
||||||
|
address = {{ $ep.address | quote }}
|
||||||
|
{{- if $ep.serverName }}
|
||||||
|
server_name = {{ $ep.serverName | quote }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
|
{{- if and .Values.bootstrap.enabled .Values.bootstrap.publicUrl }}
|
||||||
|
bootstrap.toml: |
|
||||||
|
public_url = {{ .Values.bootstrap.publicUrl | quote }}
|
||||||
|
{{- if .Values.bootstrap.trustedProxies }}
|
||||||
|
trusted_proxies = [
|
||||||
|
{{- range $i, $p := .Values.bootstrap.trustedProxies }}
|
||||||
|
{{ $p | quote }}{{ if lt $i (sub (len $.Values.bootstrap.trustedProxies) 1) }},{{ end }}
|
||||||
|
{{- end }}
|
||||||
|
]
|
||||||
|
{{- end }}
|
||||||
|
|
||||||
|
[owner]
|
||||||
|
email = {{ .Values.bootstrap.owner.email | quote }}
|
||||||
|
display_name = {{ .Values.bootstrap.owner.displayName | quote }}
|
||||||
|
|
||||||
|
{{- if .Values.bootstrap.oidc.issuer }}
|
||||||
|
[oidc]
|
||||||
|
issuer = {{ .Values.bootstrap.oidc.issuer | quote }}
|
||||||
|
audience = {{ .Values.bootstrap.oidc.audience | quote }}
|
||||||
|
client_id = {{ .Values.bootstrap.oidc.clientId | quote }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
@@ -0,0 +1,31 @@
|
|||||||
|
{{- if .Values.externalSecret.enabled -}}
|
||||||
|
# Example ExternalSecret for External Secrets Operator (Vault / OpenBao / KMS).
|
||||||
|
# Enable with externalSecret.enabled=true or copy into your GitOps manifest repo.
|
||||||
|
apiVersion: external-secrets.io/v1beta1
|
||||||
|
kind: ExternalSecret
|
||||||
|
metadata:
|
||||||
|
name: {{ .Values.secrets.existingSecret }}
|
||||||
|
labels:
|
||||||
|
{{- include "archie.labels" . | nindent 4 }}
|
||||||
|
spec:
|
||||||
|
refreshInterval: {{ .Values.externalSecret.refreshInterval }}
|
||||||
|
secretStoreRef:
|
||||||
|
name: {{ .Values.externalSecret.secretStoreRef.name }}
|
||||||
|
kind: {{ .Values.externalSecret.secretStoreRef.kind }}
|
||||||
|
target:
|
||||||
|
name: {{ .Values.secrets.existingSecret }}
|
||||||
|
creationPolicy: Owner
|
||||||
|
data:
|
||||||
|
- secretKey: {{ .Values.secrets.keys.databaseUrl }}
|
||||||
|
remoteRef:
|
||||||
|
key: {{ .Values.externalSecret.remoteRefs.databaseUrlKey }}
|
||||||
|
property: {{ .Values.externalSecret.remoteRefs.databaseUrlProperty }}
|
||||||
|
- secretKey: {{ .Values.secrets.keys.ageIdentity }}
|
||||||
|
remoteRef:
|
||||||
|
key: {{ .Values.externalSecret.remoteRefs.ageIdentityKey }}
|
||||||
|
property: {{ .Values.externalSecret.remoteRefs.ageIdentityProperty }}
|
||||||
|
- secretKey: {{ .Values.secrets.keys.adminTokenSha256 }}
|
||||||
|
remoteRef:
|
||||||
|
key: {{ .Values.externalSecret.remoteRefs.adminTokenSha256Key }}
|
||||||
|
property: {{ .Values.externalSecret.remoteRefs.adminTokenSha256Property }}
|
||||||
|
{{- end }}
|
||||||
@@ -0,0 +1,128 @@
|
|||||||
|
{{- if .Values.frontend.enabled }}
|
||||||
|
apiVersion: apps/v1
|
||||||
|
kind: Deployment
|
||||||
|
metadata:
|
||||||
|
name: {{ include "archie.frontendFullname" . }}
|
||||||
|
labels:
|
||||||
|
{{- include "archie.frontendLabels" . | nindent 4 }}
|
||||||
|
spec:
|
||||||
|
{{- if not .Values.frontend.autoscaling.enabled }}
|
||||||
|
replicas: {{ .Values.frontend.replicaCount }}
|
||||||
|
{{- end }}
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
{{- include "archie.frontendSelectorLabels" . | nindent 6 }}
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
{{- include "archie.frontendLabels" . | nindent 8 }}
|
||||||
|
spec:
|
||||||
|
automountServiceAccountToken: false
|
||||||
|
{{- with .Values.imagePullSecrets }}
|
||||||
|
imagePullSecrets:
|
||||||
|
{{- toYaml . | nindent 8 }}
|
||||||
|
{{- end }}
|
||||||
|
securityContext:
|
||||||
|
{{- include "archie.compactYaml" .Values.frontend.podSecurityContext | nindent 8 }}
|
||||||
|
containers:
|
||||||
|
- name: frontend
|
||||||
|
image: {{ include "archie.frontendImage" . }}
|
||||||
|
imagePullPolicy: {{ .Values.frontend.image.pullPolicy }}
|
||||||
|
securityContext:
|
||||||
|
{{- include "archie.compactYaml" .Values.frontend.securityContext | nindent 12 }}
|
||||||
|
ports:
|
||||||
|
- name: http
|
||||||
|
containerPort: 8080
|
||||||
|
protocol: TCP
|
||||||
|
livenessProbe:
|
||||||
|
httpGet:
|
||||||
|
path: /healthz
|
||||||
|
port: http
|
||||||
|
readinessProbe:
|
||||||
|
httpGet:
|
||||||
|
path: /healthz
|
||||||
|
port: http
|
||||||
|
resources:
|
||||||
|
{{- toYaml .Values.frontend.resources | nindent 12 }}
|
||||||
|
volumeMounts:
|
||||||
|
# nginx keeps its pid file and temporary files here; the root
|
||||||
|
# filesystem is read-only.
|
||||||
|
- name: tmp
|
||||||
|
mountPath: /tmp
|
||||||
|
volumes:
|
||||||
|
- name: tmp
|
||||||
|
emptyDir:
|
||||||
|
sizeLimit: 64Mi
|
||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
name: {{ include "archie.frontendFullname" . }}
|
||||||
|
labels:
|
||||||
|
{{- include "archie.frontendLabels" . | nindent 4 }}
|
||||||
|
spec:
|
||||||
|
type: ClusterIP
|
||||||
|
ports:
|
||||||
|
- name: http
|
||||||
|
port: {{ .Values.frontend.service.port }}
|
||||||
|
targetPort: http
|
||||||
|
protocol: TCP
|
||||||
|
selector:
|
||||||
|
{{- include "archie.frontendSelectorLabels" . | nindent 4 }}
|
||||||
|
{{- if .Values.frontend.autoscaling.enabled }}
|
||||||
|
---
|
||||||
|
apiVersion: autoscaling/v2
|
||||||
|
kind: HorizontalPodAutoscaler
|
||||||
|
metadata:
|
||||||
|
name: {{ include "archie.frontendFullname" . }}
|
||||||
|
labels:
|
||||||
|
{{- include "archie.frontendLabels" . | nindent 4 }}
|
||||||
|
spec:
|
||||||
|
scaleTargetRef:
|
||||||
|
apiVersion: apps/v1
|
||||||
|
kind: Deployment
|
||||||
|
name: {{ include "archie.frontendFullname" . }}
|
||||||
|
minReplicas: {{ .Values.frontend.autoscaling.minReplicas }}
|
||||||
|
maxReplicas: {{ .Values.frontend.autoscaling.maxReplicas }}
|
||||||
|
metrics:
|
||||||
|
- type: Resource
|
||||||
|
resource:
|
||||||
|
name: cpu
|
||||||
|
target:
|
||||||
|
type: Utilization
|
||||||
|
averageUtilization: {{ .Values.frontend.autoscaling.targetCPUUtilizationPercentage }}
|
||||||
|
{{- end }}
|
||||||
|
{{- if .Values.networkPolicy.enabled }}
|
||||||
|
---
|
||||||
|
# The dashboard only answers the internal ingress and calls nothing.
|
||||||
|
apiVersion: networking.k8s.io/v1
|
||||||
|
kind: NetworkPolicy
|
||||||
|
metadata:
|
||||||
|
name: {{ include "archie.frontendFullname" . }}
|
||||||
|
labels:
|
||||||
|
{{- include "archie.frontendLabels" . | nindent 4 }}
|
||||||
|
spec:
|
||||||
|
podSelector:
|
||||||
|
matchLabels:
|
||||||
|
{{- include "archie.frontendSelectorLabels" . | nindent 6 }}
|
||||||
|
policyTypes:
|
||||||
|
- Ingress
|
||||||
|
- Egress
|
||||||
|
ingress:
|
||||||
|
- ports:
|
||||||
|
- protocol: TCP
|
||||||
|
port: 8080
|
||||||
|
{{- if or .Values.networkPolicy.ingress.internal.namespaceSelector .Values.networkPolicy.ingress.internal.podSelector }}
|
||||||
|
from:
|
||||||
|
- {{- if .Values.networkPolicy.ingress.internal.namespaceSelector }}
|
||||||
|
namespaceSelector:
|
||||||
|
{{- toYaml .Values.networkPolicy.ingress.internal.namespaceSelector | nindent 12 }}
|
||||||
|
{{- end }}
|
||||||
|
{{- if .Values.networkPolicy.ingress.internal.podSelector }}
|
||||||
|
podSelector:
|
||||||
|
{{- toYaml .Values.networkPolicy.ingress.internal.podSelector | nindent 12 }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
|
egress: []
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
@@ -0,0 +1,82 @@
|
|||||||
|
{{- if .Values.ingress.perimeter.enabled }}
|
||||||
|
apiVersion: networking.k8s.io/v1
|
||||||
|
kind: Ingress
|
||||||
|
metadata:
|
||||||
|
name: {{ include "archie.fullname" . }}-perimeter
|
||||||
|
labels:
|
||||||
|
{{- include "archie.labels" . | nindent 4 }}
|
||||||
|
app.kubernetes.io/component: perimeter-ingress
|
||||||
|
{{- with .Values.ingress.perimeter.annotations }}
|
||||||
|
annotations:
|
||||||
|
{{- toYaml . | nindent 4 }}
|
||||||
|
{{- end }}
|
||||||
|
spec:
|
||||||
|
{{- if .Values.ingress.perimeter.className }}
|
||||||
|
ingressClassName: {{ .Values.ingress.perimeter.className }}
|
||||||
|
{{- end }}
|
||||||
|
{{- with .Values.ingress.perimeter.tls }}
|
||||||
|
tls:
|
||||||
|
{{- toYaml . | nindent 4 }}
|
||||||
|
{{- end }}
|
||||||
|
rules:
|
||||||
|
{{- range .Values.ingress.perimeter.hosts }}
|
||||||
|
- host: {{ .host | quote }}
|
||||||
|
http:
|
||||||
|
paths:
|
||||||
|
{{- range .paths }}
|
||||||
|
- path: {{ . }}
|
||||||
|
pathType: Prefix
|
||||||
|
backend:
|
||||||
|
service:
|
||||||
|
name: {{ include "archie.fullname" $ }}
|
||||||
|
port:
|
||||||
|
name: http
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
|
{{- if .Values.ingress.internal.enabled }}
|
||||||
|
---
|
||||||
|
apiVersion: networking.k8s.io/v1
|
||||||
|
kind: Ingress
|
||||||
|
metadata:
|
||||||
|
name: {{ include "archie.fullname" . }}-internal
|
||||||
|
labels:
|
||||||
|
{{- include "archie.labels" . | nindent 4 }}
|
||||||
|
app.kubernetes.io/component: internal-ingress
|
||||||
|
{{- with .Values.ingress.internal.annotations }}
|
||||||
|
annotations:
|
||||||
|
{{- toYaml . | nindent 4 }}
|
||||||
|
{{- end }}
|
||||||
|
spec:
|
||||||
|
{{- if .Values.ingress.internal.className }}
|
||||||
|
ingressClassName: {{ .Values.ingress.internal.className }}
|
||||||
|
{{- end }}
|
||||||
|
{{- with .Values.ingress.internal.tls }}
|
||||||
|
tls:
|
||||||
|
{{- toYaml . | nindent 4 }}
|
||||||
|
{{- end }}
|
||||||
|
rules:
|
||||||
|
{{- range .Values.ingress.internal.hosts }}
|
||||||
|
- host: {{ .host | quote }}
|
||||||
|
http:
|
||||||
|
paths:
|
||||||
|
{{- range $.Values.ingress.internal.backendPaths }}
|
||||||
|
- path: {{ . }}
|
||||||
|
pathType: Prefix
|
||||||
|
backend:
|
||||||
|
service:
|
||||||
|
name: {{ include "archie.fullname" $ }}
|
||||||
|
port:
|
||||||
|
name: http
|
||||||
|
{{- end }}
|
||||||
|
{{- if $.Values.frontend.enabled }}
|
||||||
|
- path: /
|
||||||
|
pathType: Prefix
|
||||||
|
backend:
|
||||||
|
service:
|
||||||
|
name: {{ include "archie.frontendFullname" $ }}
|
||||||
|
port:
|
||||||
|
name: http
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
@@ -0,0 +1,109 @@
|
|||||||
|
{{- if .Values.bootstrap.enabled -}}
|
||||||
|
apiVersion: batch/v1
|
||||||
|
kind: Job
|
||||||
|
metadata:
|
||||||
|
name: {{ include "archie.fullname" . }}-bootstrap
|
||||||
|
labels:
|
||||||
|
{{- include "archie.labels" . | nindent 4 }}
|
||||||
|
annotations:
|
||||||
|
"helm.sh/hook": post-install,post-upgrade
|
||||||
|
"helm.sh/hook-weight": {{ .Values.bootstrap.hookWeight | quote }}
|
||||||
|
"helm.sh/hook-delete-policy": {{ .Values.bootstrap.hookDeletePolicy | quote }}
|
||||||
|
spec:
|
||||||
|
backoffLimit: {{ .Values.bootstrap.backoffLimit }}
|
||||||
|
activeDeadlineSeconds: {{ .Values.bootstrap.activeDeadlineSeconds }}
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
{{- include "archie.labels" . | nindent 8 }}
|
||||||
|
app.kubernetes.io/component: bootstrap
|
||||||
|
spec:
|
||||||
|
restartPolicy: OnFailure
|
||||||
|
serviceAccountName: {{ include "archie.serviceAccountName" . }}
|
||||||
|
automountServiceAccountToken: {{ .Values.serviceAccount.automountServiceAccountToken }}
|
||||||
|
{{- with .Values.imagePullSecrets }}
|
||||||
|
imagePullSecrets:
|
||||||
|
{{- toYaml . | nindent 8 }}
|
||||||
|
{{- end }}
|
||||||
|
{{- with (include "archie.compactYaml" .Values.podSecurityContext) }}
|
||||||
|
securityContext:
|
||||||
|
{{- . | nindent 8 }}
|
||||||
|
{{- end }}
|
||||||
|
containers:
|
||||||
|
- name: bootstrap
|
||||||
|
image: {{ include "archie.image" . }}
|
||||||
|
imagePullPolicy: {{ .Values.image.pullPolicy }}
|
||||||
|
args:
|
||||||
|
- "-config"
|
||||||
|
- ""
|
||||||
|
- "-spec"
|
||||||
|
- "/etc/archie/bootstrap.toml"
|
||||||
|
- "bootstrap"
|
||||||
|
{{- with (include "archie.compactYaml" .Values.securityContext) }}
|
||||||
|
securityContext:
|
||||||
|
{{- . | nindent 12 }}
|
||||||
|
{{- end }}
|
||||||
|
env:
|
||||||
|
- name: HOME
|
||||||
|
value: "/tmp"
|
||||||
|
- name: ARCHIE_DATABASE_URL_FILE
|
||||||
|
value: /run/secrets/archie/{{ .Values.secrets.keys.databaseUrl }}
|
||||||
|
- name: ARCHIE_BOOTSTRAP_OWNER_PASSWORD_FILE
|
||||||
|
value: /run/secrets/archie-bootstrap/{{ .Values.bootstrap.owner.passwordSecretKey }}
|
||||||
|
{{- if .Values.caBundle.enabled }}
|
||||||
|
- name: SSL_CERT_FILE
|
||||||
|
value: {{ .Values.caBundle.mountPath | quote }}
|
||||||
|
{{- end }}
|
||||||
|
resources:
|
||||||
|
{{- toYaml .Values.bootstrap.resources | nindent 12 }}
|
||||||
|
volumeMounts:
|
||||||
|
- name: config
|
||||||
|
mountPath: /etc/archie/bootstrap.toml
|
||||||
|
subPath: bootstrap.toml
|
||||||
|
readOnly: true
|
||||||
|
- name: runtime-secrets
|
||||||
|
mountPath: /run/secrets/archie
|
||||||
|
readOnly: true
|
||||||
|
- name: bootstrap-secrets
|
||||||
|
mountPath: /run/secrets/archie-bootstrap
|
||||||
|
readOnly: true
|
||||||
|
- name: tmp
|
||||||
|
mountPath: /tmp
|
||||||
|
{{- if .Values.caBundle.enabled }}
|
||||||
|
- name: ca-bundle
|
||||||
|
mountPath: {{ .Values.caBundle.mountPath }}
|
||||||
|
subPath: {{ .Values.caBundle.key }}
|
||||||
|
readOnly: true
|
||||||
|
{{- end }}
|
||||||
|
volumes:
|
||||||
|
- name: config
|
||||||
|
configMap:
|
||||||
|
name: {{ include "archie.fullname" . }}-config
|
||||||
|
- name: runtime-secrets
|
||||||
|
secret:
|
||||||
|
secretName: {{ .Values.secrets.existingSecret }}
|
||||||
|
defaultMode: 0400
|
||||||
|
items:
|
||||||
|
- key: {{ .Values.secrets.keys.databaseUrl }}
|
||||||
|
path: {{ .Values.secrets.keys.databaseUrl }}
|
||||||
|
- name: bootstrap-secrets
|
||||||
|
secret:
|
||||||
|
secretName: {{ .Values.bootstrap.owner.passwordSecretName }}
|
||||||
|
defaultMode: 0400
|
||||||
|
items:
|
||||||
|
- key: {{ .Values.bootstrap.owner.passwordSecretKey }}
|
||||||
|
path: {{ .Values.bootstrap.owner.passwordSecretKey }}
|
||||||
|
- name: tmp
|
||||||
|
emptyDir: {}
|
||||||
|
{{- if .Values.caBundle.enabled }}
|
||||||
|
- name: ca-bundle
|
||||||
|
{{- if .Values.caBundle.existingSecret }}
|
||||||
|
secret:
|
||||||
|
secretName: {{ .Values.caBundle.existingSecret }}
|
||||||
|
defaultMode: 0444
|
||||||
|
{{- else }}
|
||||||
|
configMap:
|
||||||
|
name: {{ .Values.caBundle.existingConfigMap }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
@@ -0,0 +1,127 @@
|
|||||||
|
{{- if .Values.bundleSync.enabled -}}
|
||||||
|
apiVersion: batch/v1
|
||||||
|
kind: Job
|
||||||
|
metadata:
|
||||||
|
name: {{ include "archie.fullname" . }}-bundle-sync
|
||||||
|
labels:
|
||||||
|
{{- include "archie.labels" . | nindent 4 }}
|
||||||
|
annotations:
|
||||||
|
{{- if .Values.bundleSync.hooks.helm }}
|
||||||
|
"helm.sh/hook": post-install,post-upgrade
|
||||||
|
"helm.sh/hook-weight": {{ .Values.bundleSync.hookWeight | quote }}
|
||||||
|
"helm.sh/hook-delete-policy": {{ .Values.bundleSync.hookDeletePolicy | quote }}
|
||||||
|
{{- end }}
|
||||||
|
{{- if .Values.bundleSync.hooks.argocd }}
|
||||||
|
"argocd.argoproj.io/hook": PostSync
|
||||||
|
"argocd.argoproj.io/hook-delete-policy": BeforeHookCreation
|
||||||
|
{{- end }}
|
||||||
|
spec:
|
||||||
|
backoffLimit: {{ .Values.bundleSync.backoffLimit }}
|
||||||
|
activeDeadlineSeconds: {{ .Values.bundleSync.activeDeadlineSeconds }}
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
{{- include "archie.labels" . | nindent 8 }}
|
||||||
|
app.kubernetes.io/component: bundle-sync
|
||||||
|
spec:
|
||||||
|
restartPolicy: OnFailure
|
||||||
|
serviceAccountName: {{ include "archie.serviceAccountName" . }}
|
||||||
|
automountServiceAccountToken: {{ .Values.serviceAccount.automountServiceAccountToken }}
|
||||||
|
{{- with .Values.imagePullSecrets }}
|
||||||
|
imagePullSecrets:
|
||||||
|
{{- toYaml . | nindent 8 }}
|
||||||
|
{{- end }}
|
||||||
|
{{- with (include "archie.compactYaml" .Values.podSecurityContext) }}
|
||||||
|
securityContext:
|
||||||
|
{{- . | nindent 8 }}
|
||||||
|
{{- end }}
|
||||||
|
containers:
|
||||||
|
- name: bundle-sync
|
||||||
|
image: {{ include "archie.image" . }}
|
||||||
|
imagePullPolicy: {{ .Values.image.pullPolicy }}
|
||||||
|
args:
|
||||||
|
- "-config"
|
||||||
|
- ""
|
||||||
|
- "bundle"
|
||||||
|
- "apply"
|
||||||
|
- "--bundle"
|
||||||
|
- "/etc/archie/bundle/bundle.yaml"
|
||||||
|
{{- if .Values.bundleSync.bindings.enabled }}
|
||||||
|
- "--bindings"
|
||||||
|
- "/etc/archie/bindings/bindings.yaml"
|
||||||
|
{{- end }}
|
||||||
|
{{- if .Values.bundleSync.expectDigest }}
|
||||||
|
- "--expect-digest"
|
||||||
|
- {{ .Values.bundleSync.expectDigest | quote }}
|
||||||
|
{{- end }}
|
||||||
|
{{- if .Values.bundleSync.dryRun }}
|
||||||
|
- "--dry-run"
|
||||||
|
{{- end }}
|
||||||
|
{{- with (include "archie.compactYaml" .Values.securityContext) }}
|
||||||
|
securityContext:
|
||||||
|
{{- . | nindent 12 }}
|
||||||
|
{{- end }}
|
||||||
|
env:
|
||||||
|
- name: HOME
|
||||||
|
value: "/tmp"
|
||||||
|
# Uses only the DML runtime role (archie_app), never owner_url.
|
||||||
|
- name: ARCHIE_DATABASE_URL_FILE
|
||||||
|
value: /run/secrets/archie/{{ .Values.secrets.keys.databaseUrl }}
|
||||||
|
{{- if .Values.caBundle.enabled }}
|
||||||
|
- name: SSL_CERT_FILE
|
||||||
|
value: {{ .Values.caBundle.mountPath | quote }}
|
||||||
|
{{- end }}
|
||||||
|
resources:
|
||||||
|
{{- toYaml .Values.bundleSync.resources | nindent 12 }}
|
||||||
|
volumeMounts:
|
||||||
|
- name: bundle
|
||||||
|
mountPath: /etc/archie/bundle/bundle.yaml
|
||||||
|
subPath: {{ .Values.bundleSync.bundleKey }}
|
||||||
|
readOnly: true
|
||||||
|
{{- if .Values.bundleSync.bindings.enabled }}
|
||||||
|
- name: bindings
|
||||||
|
mountPath: /etc/archie/bindings/bindings.yaml
|
||||||
|
subPath: {{ .Values.bundleSync.bindings.key }}
|
||||||
|
readOnly: true
|
||||||
|
{{- end }}
|
||||||
|
- name: runtime-secrets
|
||||||
|
mountPath: /run/secrets/archie
|
||||||
|
readOnly: true
|
||||||
|
- name: tmp
|
||||||
|
mountPath: /tmp
|
||||||
|
{{- if .Values.caBundle.enabled }}
|
||||||
|
- name: ca-bundle
|
||||||
|
mountPath: {{ .Values.caBundle.mountPath }}
|
||||||
|
subPath: {{ .Values.caBundle.key }}
|
||||||
|
readOnly: true
|
||||||
|
{{- end }}
|
||||||
|
volumes:
|
||||||
|
- name: bundle
|
||||||
|
configMap:
|
||||||
|
name: {{ default (printf "%s-bundle" (include "archie.fullname" .)) .Values.bundleSync.existingConfigMap }}
|
||||||
|
{{- if .Values.bundleSync.bindings.enabled }}
|
||||||
|
- name: bindings
|
||||||
|
configMap:
|
||||||
|
name: {{ default (default (printf "%s-bundle" (include "archie.fullname" .)) .Values.bundleSync.existingConfigMap) .Values.bundleSync.bindings.existingConfigMap }}
|
||||||
|
{{- end }}
|
||||||
|
- name: runtime-secrets
|
||||||
|
secret:
|
||||||
|
secretName: {{ .Values.secrets.existingSecret }}
|
||||||
|
defaultMode: 0400
|
||||||
|
items:
|
||||||
|
- key: {{ .Values.secrets.keys.databaseUrl }}
|
||||||
|
path: {{ .Values.secrets.keys.databaseUrl }}
|
||||||
|
- name: tmp
|
||||||
|
emptyDir: {}
|
||||||
|
{{- if .Values.caBundle.enabled }}
|
||||||
|
- name: ca-bundle
|
||||||
|
{{- if .Values.caBundle.existingSecret }}
|
||||||
|
secret:
|
||||||
|
secretName: {{ .Values.caBundle.existingSecret }}
|
||||||
|
defaultMode: 0444
|
||||||
|
{{- else }}
|
||||||
|
configMap:
|
||||||
|
name: {{ .Values.caBundle.existingConfigMap }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
@@ -0,0 +1,92 @@
|
|||||||
|
{{- if .Values.migrate.enabled -}}
|
||||||
|
apiVersion: batch/v1
|
||||||
|
kind: Job
|
||||||
|
metadata:
|
||||||
|
name: {{ include "archie.fullname" . }}-migrate
|
||||||
|
labels:
|
||||||
|
{{- include "archie.labels" . | nindent 4 }}
|
||||||
|
annotations:
|
||||||
|
"helm.sh/hook": pre-install,pre-upgrade
|
||||||
|
"helm.sh/hook-weight": {{ .Values.migrate.hookWeight | quote }}
|
||||||
|
"helm.sh/hook-delete-policy": {{ .Values.migrate.hookDeletePolicy | quote }}
|
||||||
|
spec:
|
||||||
|
backoffLimit: {{ .Values.migrate.backoffLimit }}
|
||||||
|
activeDeadlineSeconds: {{ .Values.migrate.activeDeadlineSeconds }}
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
{{- include "archie.labels" . | nindent 8 }}
|
||||||
|
app.kubernetes.io/component: migrate
|
||||||
|
spec:
|
||||||
|
restartPolicy: OnFailure
|
||||||
|
serviceAccountName: {{ include "archie.serviceAccountName" . }}
|
||||||
|
automountServiceAccountToken: {{ .Values.serviceAccount.automountServiceAccountToken }}
|
||||||
|
{{- with .Values.imagePullSecrets }}
|
||||||
|
imagePullSecrets:
|
||||||
|
{{- toYaml . | nindent 8 }}
|
||||||
|
{{- end }}
|
||||||
|
{{- with (include "archie.compactYaml" .Values.podSecurityContext) }}
|
||||||
|
securityContext:
|
||||||
|
{{- . | nindent 8 }}
|
||||||
|
{{- end }}
|
||||||
|
containers:
|
||||||
|
- name: migrate
|
||||||
|
image: {{ include "archie.image" . }}
|
||||||
|
imagePullPolicy: {{ .Values.image.pullPolicy }}
|
||||||
|
args:
|
||||||
|
- "-config"
|
||||||
|
- ""
|
||||||
|
- "migrate"
|
||||||
|
{{- with (include "archie.compactYaml" .Values.securityContext) }}
|
||||||
|
securityContext:
|
||||||
|
{{- . | nindent 12 }}
|
||||||
|
{{- end }}
|
||||||
|
env:
|
||||||
|
- name: HOME
|
||||||
|
value: "/tmp"
|
||||||
|
- name: ARCHIE_DATABASE_URL_FILE
|
||||||
|
value: /run/secrets/archie-migrate/{{ .Values.secrets.keys.databaseUrl }}
|
||||||
|
- name: ARCHIE_DATABASE_OWNER_URL_FILE
|
||||||
|
value: /run/secrets/archie-migrate/{{ .Values.secrets.keys.databaseOwnerUrl }}
|
||||||
|
{{- if .Values.caBundle.enabled }}
|
||||||
|
- name: SSL_CERT_FILE
|
||||||
|
value: {{ .Values.caBundle.mountPath | quote }}
|
||||||
|
{{- end }}
|
||||||
|
resources:
|
||||||
|
{{- toYaml .Values.migrate.resources | nindent 12 }}
|
||||||
|
volumeMounts:
|
||||||
|
- name: migrate-secrets
|
||||||
|
mountPath: /run/secrets/archie-migrate
|
||||||
|
readOnly: true
|
||||||
|
- name: tmp
|
||||||
|
mountPath: /tmp
|
||||||
|
{{- if .Values.caBundle.enabled }}
|
||||||
|
- name: ca-bundle
|
||||||
|
mountPath: {{ .Values.caBundle.mountPath }}
|
||||||
|
subPath: {{ .Values.caBundle.key }}
|
||||||
|
readOnly: true
|
||||||
|
{{- end }}
|
||||||
|
volumes:
|
||||||
|
- name: migrate-secrets
|
||||||
|
secret:
|
||||||
|
secretName: {{ include "archie.migrateSecretName" . }}
|
||||||
|
defaultMode: 0400
|
||||||
|
items:
|
||||||
|
- key: {{ .Values.secrets.keys.databaseUrl }}
|
||||||
|
path: {{ .Values.secrets.keys.databaseUrl }}
|
||||||
|
- key: {{ .Values.secrets.keys.databaseOwnerUrl }}
|
||||||
|
path: {{ .Values.secrets.keys.databaseOwnerUrl }}
|
||||||
|
- name: tmp
|
||||||
|
emptyDir: {}
|
||||||
|
{{- if .Values.caBundle.enabled }}
|
||||||
|
- name: ca-bundle
|
||||||
|
{{- if .Values.caBundle.existingSecret }}
|
||||||
|
secret:
|
||||||
|
secretName: {{ .Values.caBundle.existingSecret }}
|
||||||
|
defaultMode: 0444
|
||||||
|
{{- else }}
|
||||||
|
configMap:
|
||||||
|
name: {{ .Values.caBundle.existingConfigMap }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
@@ -0,0 +1,189 @@
|
|||||||
|
{{- if .Values.networkPolicy.enabled -}}
|
||||||
|
apiVersion: networking.k8s.io/v1
|
||||||
|
kind: NetworkPolicy
|
||||||
|
metadata:
|
||||||
|
name: {{ include "archie.fullname" . }}-default-deny
|
||||||
|
labels:
|
||||||
|
{{- include "archie.labels" . | nindent 4 }}
|
||||||
|
spec:
|
||||||
|
podSelector:
|
||||||
|
matchLabels:
|
||||||
|
{{- include "archie.selectorLabels" . | nindent 6 }}
|
||||||
|
policyTypes:
|
||||||
|
- Ingress
|
||||||
|
- Egress
|
||||||
|
---
|
||||||
|
apiVersion: networking.k8s.io/v1
|
||||||
|
kind: NetworkPolicy
|
||||||
|
metadata:
|
||||||
|
name: {{ include "archie.fullname" . }}-allow
|
||||||
|
labels:
|
||||||
|
{{- include "archie.labels" . | nindent 4 }}
|
||||||
|
spec:
|
||||||
|
podSelector:
|
||||||
|
matchLabels:
|
||||||
|
{{- include "archie.selectorLabels" . | nindent 6 }}
|
||||||
|
policyTypes:
|
||||||
|
- Ingress
|
||||||
|
- Egress
|
||||||
|
ingress:
|
||||||
|
{{- if .Values.ingress.perimeter.enabled }}
|
||||||
|
- ports:
|
||||||
|
- protocol: TCP
|
||||||
|
port: 8080
|
||||||
|
{{- if or .Values.networkPolicy.ingress.perimeter.namespaceSelector .Values.networkPolicy.ingress.perimeter.podSelector }}
|
||||||
|
from:
|
||||||
|
- {{- if .Values.networkPolicy.ingress.perimeter.namespaceSelector }}
|
||||||
|
namespaceSelector:
|
||||||
|
{{- toYaml .Values.networkPolicy.ingress.perimeter.namespaceSelector | nindent 12 }}
|
||||||
|
{{- end }}
|
||||||
|
{{- if .Values.networkPolicy.ingress.perimeter.podSelector }}
|
||||||
|
podSelector:
|
||||||
|
{{- toYaml .Values.networkPolicy.ingress.perimeter.podSelector | nindent 12 }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
|
{{- if .Values.ingress.internal.enabled }}
|
||||||
|
- ports:
|
||||||
|
- protocol: TCP
|
||||||
|
port: 8080
|
||||||
|
{{- if or .Values.networkPolicy.ingress.internal.namespaceSelector .Values.networkPolicy.ingress.internal.podSelector }}
|
||||||
|
from:
|
||||||
|
- {{- if .Values.networkPolicy.ingress.internal.namespaceSelector }}
|
||||||
|
namespaceSelector:
|
||||||
|
{{- toYaml .Values.networkPolicy.ingress.internal.namespaceSelector | nindent 12 }}
|
||||||
|
{{- end }}
|
||||||
|
{{- if .Values.networkPolicy.ingress.internal.podSelector }}
|
||||||
|
podSelector:
|
||||||
|
{{- toYaml .Values.networkPolicy.ingress.internal.podSelector | nindent 12 }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
|
{{- if .Values.metrics.serviceMonitor.enabled }}
|
||||||
|
- ports:
|
||||||
|
- protocol: TCP
|
||||||
|
port: {{ .Values.metrics.port }}
|
||||||
|
{{- if or .Values.networkPolicy.ingress.metrics.namespaceSelector .Values.networkPolicy.ingress.metrics.podSelector }}
|
||||||
|
from:
|
||||||
|
- {{- if .Values.networkPolicy.ingress.metrics.namespaceSelector }}
|
||||||
|
namespaceSelector:
|
||||||
|
{{- toYaml .Values.networkPolicy.ingress.metrics.namespaceSelector | nindent 12 }}
|
||||||
|
{{- end }}
|
||||||
|
{{- if .Values.networkPolicy.ingress.metrics.podSelector }}
|
||||||
|
podSelector:
|
||||||
|
{{- toYaml .Values.networkPolicy.ingress.metrics.podSelector | nindent 12 }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
|
egress:
|
||||||
|
# DNS resolution
|
||||||
|
- ports:
|
||||||
|
- protocol: UDP
|
||||||
|
port: 53
|
||||||
|
- protocol: TCP
|
||||||
|
port: 53
|
||||||
|
{{- if or .Values.networkPolicy.egress.dns.namespaceSelector .Values.networkPolicy.egress.dns.podSelector }}
|
||||||
|
to:
|
||||||
|
- {{- if .Values.networkPolicy.egress.dns.namespaceSelector }}
|
||||||
|
namespaceSelector:
|
||||||
|
{{- toYaml .Values.networkPolicy.egress.dns.namespaceSelector | nindent 12 }}
|
||||||
|
{{- end }}
|
||||||
|
{{- if .Values.networkPolicy.egress.dns.podSelector }}
|
||||||
|
podSelector:
|
||||||
|
{{- toYaml .Values.networkPolicy.egress.dns.podSelector | nindent 12 }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
|
# PostgreSQL / PgBouncer session pool
|
||||||
|
- ports:
|
||||||
|
- protocol: TCP
|
||||||
|
port: {{ .Values.networkPolicy.egress.postgres.port }}
|
||||||
|
{{- if or .Values.networkPolicy.egress.postgres.cidrs .Values.networkPolicy.egress.postgres.namespaceSelector .Values.networkPolicy.egress.postgres.podSelector }}
|
||||||
|
to:
|
||||||
|
{{- range .Values.networkPolicy.egress.postgres.cidrs }}
|
||||||
|
- ipBlock:
|
||||||
|
cidr: {{ . | quote }}
|
||||||
|
{{- end }}
|
||||||
|
{{- if or .Values.networkPolicy.egress.postgres.namespaceSelector .Values.networkPolicy.egress.postgres.podSelector }}
|
||||||
|
- {{- if .Values.networkPolicy.egress.postgres.namespaceSelector }}
|
||||||
|
namespaceSelector:
|
||||||
|
{{- toYaml .Values.networkPolicy.egress.postgres.namespaceSelector | nindent 12 }}
|
||||||
|
{{- end }}
|
||||||
|
{{- if .Values.networkPolicy.egress.postgres.podSelector }}
|
||||||
|
podSelector:
|
||||||
|
{{- toYaml .Values.networkPolicy.egress.postgres.podSelector | nindent 12 }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
|
# OIDC Identity Provider
|
||||||
|
- ports:
|
||||||
|
- protocol: TCP
|
||||||
|
port: {{ .Values.networkPolicy.egress.oidc.port }}
|
||||||
|
{{- if .Values.networkPolicy.egress.oidc.cidrs }}
|
||||||
|
to:
|
||||||
|
{{- range .Values.networkPolicy.egress.oidc.cidrs }}
|
||||||
|
- ipBlock:
|
||||||
|
cidr: {{ . | quote }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
|
{{- if or .Values.proxy.httpsProxy .Values.proxy.httpProxy .Values.networkPolicy.egress.proxy.cidrs }}
|
||||||
|
# Corporate egress proxy
|
||||||
|
- ports:
|
||||||
|
- protocol: TCP
|
||||||
|
port: {{ .Values.networkPolicy.egress.proxy.port }}
|
||||||
|
{{- if .Values.networkPolicy.egress.proxy.cidrs }}
|
||||||
|
to:
|
||||||
|
{{- range .Values.networkPolicy.egress.proxy.cidrs }}
|
||||||
|
- ipBlock:
|
||||||
|
cidr: {{ . | quote }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
|
{{- if or .Values.config.extensions.remote .Values.networkPolicy.egress.extensions.cidrs .Values.networkPolicy.egress.extensions.namespaceSelector .Values.networkPolicy.egress.extensions.podSelector }}
|
||||||
|
# Remote gRPC+mTLS extension endpoints
|
||||||
|
- ports:
|
||||||
|
{{- range .Values.networkPolicy.egress.extensions.ports }}
|
||||||
|
- protocol: TCP
|
||||||
|
port: {{ . }}
|
||||||
|
{{- end }}
|
||||||
|
{{- if or .Values.networkPolicy.egress.extensions.cidrs .Values.networkPolicy.egress.extensions.namespaceSelector .Values.networkPolicy.egress.extensions.podSelector }}
|
||||||
|
to:
|
||||||
|
{{- range .Values.networkPolicy.egress.extensions.cidrs }}
|
||||||
|
- ipBlock:
|
||||||
|
cidr: {{ . | quote }}
|
||||||
|
{{- end }}
|
||||||
|
{{- if or .Values.networkPolicy.egress.extensions.namespaceSelector .Values.networkPolicy.egress.extensions.podSelector }}
|
||||||
|
- {{- if .Values.networkPolicy.egress.extensions.namespaceSelector }}
|
||||||
|
namespaceSelector:
|
||||||
|
{{- toYaml .Values.networkPolicy.egress.extensions.namespaceSelector | nindent 12 }}
|
||||||
|
{{- end }}
|
||||||
|
{{- if .Values.networkPolicy.egress.extensions.podSelector }}
|
||||||
|
podSelector:
|
||||||
|
{{- toYaml .Values.networkPolicy.egress.extensions.podSelector | nindent 12 }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
|
{{- if or .Values.telemetry.otlpEndpoint .Values.networkPolicy.egress.otlp.cidrs .Values.networkPolicy.egress.otlp.namespaceSelector .Values.networkPolicy.egress.otlp.podSelector }}
|
||||||
|
# OpenTelemetry collector
|
||||||
|
- ports:
|
||||||
|
- protocol: TCP
|
||||||
|
port: {{ .Values.networkPolicy.egress.otlp.port }}
|
||||||
|
{{- if or .Values.networkPolicy.egress.otlp.cidrs .Values.networkPolicy.egress.otlp.namespaceSelector .Values.networkPolicy.egress.otlp.podSelector }}
|
||||||
|
to:
|
||||||
|
{{- range .Values.networkPolicy.egress.otlp.cidrs }}
|
||||||
|
- ipBlock:
|
||||||
|
cidr: {{ . | quote }}
|
||||||
|
{{- end }}
|
||||||
|
{{- if or .Values.networkPolicy.egress.otlp.namespaceSelector .Values.networkPolicy.egress.otlp.podSelector }}
|
||||||
|
- {{- if .Values.networkPolicy.egress.otlp.namespaceSelector }}
|
||||||
|
namespaceSelector:
|
||||||
|
{{- toYaml .Values.networkPolicy.egress.otlp.namespaceSelector | nindent 12 }}
|
||||||
|
{{- end }}
|
||||||
|
{{- if .Values.networkPolicy.egress.otlp.podSelector }}
|
||||||
|
podSelector:
|
||||||
|
{{- toYaml .Values.networkPolicy.egress.otlp.podSelector | nindent 12 }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
@@ -0,0 +1,17 @@
|
|||||||
|
{{- if .Values.podDisruptionBudget.enabled -}}
|
||||||
|
apiVersion: policy/v1
|
||||||
|
kind: PodDisruptionBudget
|
||||||
|
metadata:
|
||||||
|
name: {{ include "archie.fullname" . }}
|
||||||
|
labels:
|
||||||
|
{{- include "archie.labels" . | nindent 4 }}
|
||||||
|
spec:
|
||||||
|
{{- if not (kindIs "invalid" .Values.podDisruptionBudget.minAvailable) }}
|
||||||
|
minAvailable: {{ .Values.podDisruptionBudget.minAvailable }}
|
||||||
|
{{- else }}
|
||||||
|
maxUnavailable: {{ .Values.podDisruptionBudget.maxUnavailable }}
|
||||||
|
{{- end }}
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
{{- include "archie.selectorLabels" . | nindent 6 }}
|
||||||
|
{{- end }}
|
||||||
@@ -0,0 +1,23 @@
|
|||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
name: {{ include "archie.fullname" . }}
|
||||||
|
labels:
|
||||||
|
{{- include "archie.labels" . | nindent 4 }}
|
||||||
|
{{- with .Values.service.annotations }}
|
||||||
|
annotations:
|
||||||
|
{{- toYaml . | nindent 4 }}
|
||||||
|
{{- end }}
|
||||||
|
spec:
|
||||||
|
type: {{ .Values.service.type }}
|
||||||
|
ports:
|
||||||
|
- name: http
|
||||||
|
port: {{ .Values.service.port }}
|
||||||
|
targetPort: http
|
||||||
|
protocol: TCP
|
||||||
|
- name: metrics
|
||||||
|
port: {{ .Values.service.metricsPort }}
|
||||||
|
targetPort: metrics
|
||||||
|
protocol: TCP
|
||||||
|
selector:
|
||||||
|
{{- include "archie.selectorLabels" . | nindent 4 }}
|
||||||
@@ -0,0 +1,13 @@
|
|||||||
|
{{- if .Values.serviceAccount.create -}}
|
||||||
|
apiVersion: v1
|
||||||
|
kind: ServiceAccount
|
||||||
|
metadata:
|
||||||
|
name: {{ include "archie.serviceAccountName" . }}
|
||||||
|
labels:
|
||||||
|
{{- include "archie.labels" . | nindent 4 }}
|
||||||
|
{{- with .Values.serviceAccount.annotations }}
|
||||||
|
annotations:
|
||||||
|
{{- toYaml . | nindent 4 }}
|
||||||
|
{{- end }}
|
||||||
|
automountServiceAccountToken: {{ .Values.serviceAccount.automountServiceAccountToken }}
|
||||||
|
{{- end }}
|
||||||
@@ -0,0 +1,20 @@
|
|||||||
|
{{- if .Values.metrics.serviceMonitor.enabled -}}
|
||||||
|
apiVersion: monitoring.coreos.com/v1
|
||||||
|
kind: ServiceMonitor
|
||||||
|
metadata:
|
||||||
|
name: {{ include "archie.fullname" . }}
|
||||||
|
labels:
|
||||||
|
{{- include "archie.labels" . | nindent 4 }}
|
||||||
|
{{- with .Values.metrics.serviceMonitor.labels }}
|
||||||
|
{{- toYaml . | nindent 4 }}
|
||||||
|
{{- end }}
|
||||||
|
spec:
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
{{- include "archie.selectorLabels" . | nindent 6 }}
|
||||||
|
endpoints:
|
||||||
|
- port: metrics
|
||||||
|
path: {{ .Values.metrics.path }}
|
||||||
|
interval: {{ .Values.metrics.serviceMonitor.interval }}
|
||||||
|
scrapeTimeout: {{ .Values.metrics.serviceMonitor.scrapeTimeout }}
|
||||||
|
{{- end }}
|
||||||
@@ -0,0 +1,208 @@
|
|||||||
|
apiVersion: apps/v1
|
||||||
|
kind: StatefulSet
|
||||||
|
metadata:
|
||||||
|
name: {{ include "archie.fullname" . }}
|
||||||
|
labels:
|
||||||
|
{{- include "archie.labels" . | nindent 4 }}
|
||||||
|
spec:
|
||||||
|
serviceName: {{ include "archie.fullname" . }}
|
||||||
|
# Active-Passive HA in Enterprise v1 requires a single active replica.
|
||||||
|
replicas: {{ .Values.replicaCount }}
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
{{- include "archie.selectorLabels" . | nindent 6 }}
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
annotations:
|
||||||
|
checksum/config: {{ include (print $.Template.BasePath "/configmap.yaml") . | sha256sum }}
|
||||||
|
{{- with .Values.podAnnotations }}
|
||||||
|
{{- toYaml . | nindent 8 }}
|
||||||
|
{{- end }}
|
||||||
|
labels:
|
||||||
|
{{- include "archie.labels" . | nindent 8 }}
|
||||||
|
{{- with .Values.podLabels }}
|
||||||
|
{{- toYaml . | nindent 8 }}
|
||||||
|
{{- end }}
|
||||||
|
spec:
|
||||||
|
serviceAccountName: {{ include "archie.serviceAccountName" . }}
|
||||||
|
automountServiceAccountToken: {{ .Values.serviceAccount.automountServiceAccountToken }}
|
||||||
|
terminationGracePeriodSeconds: {{ .Values.terminationGracePeriodSeconds }}
|
||||||
|
{{- with .Values.imagePullSecrets }}
|
||||||
|
imagePullSecrets:
|
||||||
|
{{- toYaml . | nindent 8 }}
|
||||||
|
{{- end }}
|
||||||
|
{{- with (include "archie.compactYaml" .Values.podSecurityContext) }}
|
||||||
|
securityContext:
|
||||||
|
{{- . | nindent 8 }}
|
||||||
|
{{- end }}
|
||||||
|
containers:
|
||||||
|
- name: archie
|
||||||
|
image: {{ include "archie.image" . }}
|
||||||
|
imagePullPolicy: {{ .Values.image.pullPolicy }}
|
||||||
|
args:
|
||||||
|
- "-config"
|
||||||
|
- "/etc/archie/config.toml"
|
||||||
|
{{- with (include "archie.compactYaml" .Values.securityContext) }}
|
||||||
|
securityContext:
|
||||||
|
{{- . | nindent 12 }}
|
||||||
|
{{- end }}
|
||||||
|
ports:
|
||||||
|
- name: http
|
||||||
|
containerPort: 8080
|
||||||
|
protocol: TCP
|
||||||
|
- name: metrics
|
||||||
|
containerPort: {{ .Values.metrics.port }}
|
||||||
|
protocol: TCP
|
||||||
|
env:
|
||||||
|
- name: HOME
|
||||||
|
value: "/tmp"
|
||||||
|
- name: ARCHIE_DATABASE_URL_FILE
|
||||||
|
value: /run/secrets/archie/{{ .Values.secrets.keys.databaseUrl }}
|
||||||
|
- name: ARCHIE_AGE_IDENTITY_FILE
|
||||||
|
value: /run/secrets/archie/{{ .Values.secrets.keys.ageIdentity }}
|
||||||
|
- name: ARCHIE_ADMIN_TOKEN_SHA256_FILE
|
||||||
|
value: /run/secrets/archie/{{ .Values.secrets.keys.adminTokenSha256 }}
|
||||||
|
{{- if .Values.caBundle.enabled }}
|
||||||
|
- name: SSL_CERT_FILE
|
||||||
|
value: {{ .Values.caBundle.mountPath | quote }}
|
||||||
|
{{- end }}
|
||||||
|
{{- if .Values.proxy.httpsProxy }}
|
||||||
|
- name: HTTPS_PROXY
|
||||||
|
value: {{ .Values.proxy.httpsProxy | quote }}
|
||||||
|
{{- end }}
|
||||||
|
{{- if .Values.proxy.httpProxy }}
|
||||||
|
- name: HTTP_PROXY
|
||||||
|
value: {{ .Values.proxy.httpProxy | quote }}
|
||||||
|
{{- end }}
|
||||||
|
{{- if or .Values.proxy.httpsProxy .Values.proxy.httpProxy }}
|
||||||
|
- name: NO_PROXY
|
||||||
|
value: {{ .Values.proxy.noProxy | quote }}
|
||||||
|
{{- end }}
|
||||||
|
{{- if .Values.telemetry.otlpEndpoint }}
|
||||||
|
- name: OTEL_EXPORTER_OTLP_ENDPOINT
|
||||||
|
value: {{ .Values.telemetry.otlpEndpoint | quote }}
|
||||||
|
{{- end }}
|
||||||
|
{{- with .Values.extraEnv }}
|
||||||
|
{{- toYaml . | nindent 12 }}
|
||||||
|
{{- end }}
|
||||||
|
startupProbe:
|
||||||
|
httpGet:
|
||||||
|
path: /startupz
|
||||||
|
port: http
|
||||||
|
initialDelaySeconds: {{ .Values.probes.startup.initialDelaySeconds }}
|
||||||
|
periodSeconds: {{ .Values.probes.startup.periodSeconds }}
|
||||||
|
timeoutSeconds: {{ .Values.probes.startup.timeoutSeconds }}
|
||||||
|
failureThreshold: {{ .Values.probes.startup.failureThreshold }}
|
||||||
|
livenessProbe:
|
||||||
|
httpGet:
|
||||||
|
path: /healthz
|
||||||
|
port: http
|
||||||
|
initialDelaySeconds: {{ .Values.probes.liveness.initialDelaySeconds }}
|
||||||
|
periodSeconds: {{ .Values.probes.liveness.periodSeconds }}
|
||||||
|
timeoutSeconds: {{ .Values.probes.liveness.timeoutSeconds }}
|
||||||
|
failureThreshold: {{ .Values.probes.liveness.failureThreshold }}
|
||||||
|
readinessProbe:
|
||||||
|
httpGet:
|
||||||
|
path: /readyz
|
||||||
|
port: http
|
||||||
|
initialDelaySeconds: {{ .Values.probes.readiness.initialDelaySeconds }}
|
||||||
|
periodSeconds: {{ .Values.probes.readiness.periodSeconds }}
|
||||||
|
timeoutSeconds: {{ .Values.probes.readiness.timeoutSeconds }}
|
||||||
|
failureThreshold: {{ .Values.probes.readiness.failureThreshold }}
|
||||||
|
resources:
|
||||||
|
{{- toYaml .Values.resources | nindent 12 }}
|
||||||
|
volumeMounts:
|
||||||
|
- name: config
|
||||||
|
mountPath: /etc/archie/config.toml
|
||||||
|
subPath: config.toml
|
||||||
|
readOnly: true
|
||||||
|
- name: runtime-secrets
|
||||||
|
mountPath: /run/secrets/archie
|
||||||
|
readOnly: true
|
||||||
|
- name: tmp
|
||||||
|
mountPath: /tmp
|
||||||
|
- name: state
|
||||||
|
mountPath: {{ .Values.config.stateDir }}
|
||||||
|
{{- if .Values.caBundle.enabled }}
|
||||||
|
- name: ca-bundle
|
||||||
|
mountPath: {{ .Values.caBundle.mountPath }}
|
||||||
|
subPath: {{ .Values.caBundle.key }}
|
||||||
|
readOnly: true
|
||||||
|
{{- end }}
|
||||||
|
{{- if .Values.config.extensions.tls.existingSecret }}
|
||||||
|
- name: extensions-tls
|
||||||
|
mountPath: {{ .Values.config.extensions.tls.mountPath }}
|
||||||
|
readOnly: true
|
||||||
|
{{- end }}
|
||||||
|
{{- if .Values.config.catalogue.authSecret }}
|
||||||
|
- name: catalogue-auth
|
||||||
|
mountPath: /run/secrets/archie-catalogue
|
||||||
|
readOnly: true
|
||||||
|
{{- end }}
|
||||||
|
volumes:
|
||||||
|
- name: config
|
||||||
|
configMap:
|
||||||
|
name: {{ include "archie.fullname" . }}-config
|
||||||
|
- name: runtime-secrets
|
||||||
|
secret:
|
||||||
|
secretName: {{ .Values.secrets.existingSecret }}
|
||||||
|
defaultMode: 0400
|
||||||
|
items:
|
||||||
|
- key: {{ .Values.secrets.keys.databaseUrl }}
|
||||||
|
path: {{ .Values.secrets.keys.databaseUrl }}
|
||||||
|
- key: {{ .Values.secrets.keys.ageIdentity }}
|
||||||
|
path: {{ .Values.secrets.keys.ageIdentity }}
|
||||||
|
- key: {{ .Values.secrets.keys.adminTokenSha256 }}
|
||||||
|
path: {{ .Values.secrets.keys.adminTokenSha256 }}
|
||||||
|
- name: tmp
|
||||||
|
emptyDir: {}
|
||||||
|
{{- if not .Values.persistence.enabled }}
|
||||||
|
- name: state
|
||||||
|
emptyDir: {}
|
||||||
|
{{- else if .Values.persistence.existingClaim }}
|
||||||
|
- name: state
|
||||||
|
persistentVolumeClaim:
|
||||||
|
claimName: {{ .Values.persistence.existingClaim }}
|
||||||
|
{{- end }}
|
||||||
|
{{- if .Values.caBundle.enabled }}
|
||||||
|
- name: ca-bundle
|
||||||
|
{{- if .Values.caBundle.existingSecret }}
|
||||||
|
secret:
|
||||||
|
secretName: {{ .Values.caBundle.existingSecret }}
|
||||||
|
defaultMode: 0444
|
||||||
|
{{- else }}
|
||||||
|
configMap:
|
||||||
|
name: {{ .Values.caBundle.existingConfigMap }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
|
{{- if .Values.config.extensions.tls.existingSecret }}
|
||||||
|
- name: extensions-tls
|
||||||
|
secret:
|
||||||
|
secretName: {{ .Values.config.extensions.tls.existingSecret }}
|
||||||
|
defaultMode: 0400
|
||||||
|
{{- end }}
|
||||||
|
{{- if .Values.config.catalogue.authSecret }}
|
||||||
|
- name: catalogue-auth
|
||||||
|
secret:
|
||||||
|
secretName: {{ .Values.config.catalogue.authSecret }}
|
||||||
|
defaultMode: 0400
|
||||||
|
items:
|
||||||
|
- key: {{ .Values.config.catalogue.authSecretKey }}
|
||||||
|
path: config.json
|
||||||
|
{{- end }}
|
||||||
|
{{- if and .Values.persistence.enabled (not .Values.persistence.existingClaim) }}
|
||||||
|
volumeClaimTemplates:
|
||||||
|
- metadata:
|
||||||
|
name: state
|
||||||
|
labels:
|
||||||
|
{{- include "archie.labels" . | nindent 10 }}
|
||||||
|
spec:
|
||||||
|
accessModes:
|
||||||
|
{{- toYaml .Values.persistence.accessModes | nindent 10 }}
|
||||||
|
{{- if .Values.persistence.storageClass }}
|
||||||
|
storageClassName: {{ .Values.persistence.storageClass | quote }}
|
||||||
|
{{- end }}
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
storage: {{ .Values.persistence.size | quote }}
|
||||||
|
{{- end }}
|
||||||
@@ -0,0 +1,32 @@
|
|||||||
|
# Development stage overlay: isolated non-prod database, key, and relaxed egress for local testing.
|
||||||
|
|
||||||
|
image:
|
||||||
|
tag: "dev"
|
||||||
|
pullPolicy: IfNotPresent
|
||||||
|
|
||||||
|
config:
|
||||||
|
catalogue:
|
||||||
|
disableAutoUpdate: false
|
||||||
|
extensions:
|
||||||
|
requireRemote: true
|
||||||
|
|
||||||
|
persistence:
|
||||||
|
size: "2Gi"
|
||||||
|
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
cpu: "100m"
|
||||||
|
memory: "128Mi"
|
||||||
|
limits:
|
||||||
|
cpu: "500m"
|
||||||
|
memory: "512Mi"
|
||||||
|
|
||||||
|
networkPolicy:
|
||||||
|
enabled: false
|
||||||
|
|
||||||
|
podDisruptionBudget:
|
||||||
|
enabled: false
|
||||||
|
|
||||||
|
metrics:
|
||||||
|
serviceMonitor:
|
||||||
|
enabled: false
|
||||||
@@ -0,0 +1,32 @@
|
|||||||
|
# OpenShift restricted-v2 SCC overlay: let OpenShift allocate namespace UIDs
|
||||||
|
# and GID 0 rather than pinning UID/GID 65532.
|
||||||
|
# Example:
|
||||||
|
# helm upgrade --install archie deployments/helm/archie \
|
||||||
|
# -f deployments/helm/archie/values-prod.yaml \
|
||||||
|
# -f deployments/helm/archie/values-openshift.yaml
|
||||||
|
|
||||||
|
podSecurityContext:
|
||||||
|
runAsNonRoot: true
|
||||||
|
runAsUser: null
|
||||||
|
runAsGroup: null
|
||||||
|
fsGroup: null
|
||||||
|
fsGroupChangePolicy: OnRootMismatch
|
||||||
|
seccompProfile:
|
||||||
|
type: RuntimeDefault
|
||||||
|
|
||||||
|
securityContext:
|
||||||
|
allowPrivilegeEscalation: false
|
||||||
|
readOnlyRootFilesystem: true
|
||||||
|
runAsNonRoot: true
|
||||||
|
runAsUser: null
|
||||||
|
capabilities:
|
||||||
|
drop:
|
||||||
|
- ALL
|
||||||
|
|
||||||
|
frontend:
|
||||||
|
podSecurityContext:
|
||||||
|
runAsNonRoot: true
|
||||||
|
runAsUser: null
|
||||||
|
runAsGroup: null
|
||||||
|
seccompProfile:
|
||||||
|
type: RuntimeDefault
|
||||||
@@ -0,0 +1,68 @@
|
|||||||
|
# Production stage overlay: full restricted hardening, split ingress, remote mTLS extensions, and PDB.
|
||||||
|
|
||||||
|
replicaCount: 1
|
||||||
|
|
||||||
|
image:
|
||||||
|
# Always pin an immutable cosign-verified digest in production (for example "sha256:...").
|
||||||
|
digest: ""
|
||||||
|
pullPolicy: IfNotPresent
|
||||||
|
|
||||||
|
terminationGracePeriodSeconds: 45
|
||||||
|
|
||||||
|
config:
|
||||||
|
shutdownGrace: "30s"
|
||||||
|
catalogue:
|
||||||
|
disableAutoUpdate: true
|
||||||
|
extensions:
|
||||||
|
requireRemote: true
|
||||||
|
|
||||||
|
persistence:
|
||||||
|
enabled: true
|
||||||
|
size: "20Gi"
|
||||||
|
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
cpu: "500m"
|
||||||
|
memory: "512Mi"
|
||||||
|
limits:
|
||||||
|
cpu: "2000m"
|
||||||
|
memory: "2Gi"
|
||||||
|
|
||||||
|
ingress:
|
||||||
|
perimeter:
|
||||||
|
enabled: true
|
||||||
|
className: "external-nginx"
|
||||||
|
annotations:
|
||||||
|
nginx.ingress.kubernetes.io/ssl-redirect: "true"
|
||||||
|
nginx.ingress.kubernetes.io/limit-rps: "25"
|
||||||
|
hosts:
|
||||||
|
- host: hooks.archie.example.com
|
||||||
|
paths:
|
||||||
|
- /hooks
|
||||||
|
- /webhooks
|
||||||
|
tls:
|
||||||
|
- secretName: archie-prod-perimeter-tls
|
||||||
|
hosts:
|
||||||
|
- hooks.archie.example.com
|
||||||
|
internal:
|
||||||
|
enabled: true
|
||||||
|
className: "internal-nginx"
|
||||||
|
annotations:
|
||||||
|
nginx.ingress.kubernetes.io/ssl-redirect: "true"
|
||||||
|
hosts:
|
||||||
|
- host: archie.internal.example.com
|
||||||
|
tls:
|
||||||
|
- secretName: archie-prod-internal-tls
|
||||||
|
hosts:
|
||||||
|
- archie.internal.example.com
|
||||||
|
|
||||||
|
networkPolicy:
|
||||||
|
enabled: true
|
||||||
|
|
||||||
|
metrics:
|
||||||
|
serviceMonitor:
|
||||||
|
enabled: true
|
||||||
|
|
||||||
|
podDisruptionBudget:
|
||||||
|
enabled: true
|
||||||
|
maxUnavailable: 1
|
||||||
@@ -0,0 +1,55 @@
|
|||||||
|
# Staging stage overlay: mirrors production hardening and ingress isolation with its own DB and keys.
|
||||||
|
|
||||||
|
image:
|
||||||
|
# Pin digest before promoting from dev to staging.
|
||||||
|
digest: ""
|
||||||
|
|
||||||
|
config:
|
||||||
|
catalogue:
|
||||||
|
disableAutoUpdate: true
|
||||||
|
extensions:
|
||||||
|
requireRemote: true
|
||||||
|
|
||||||
|
persistence:
|
||||||
|
size: "5Gi"
|
||||||
|
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
cpu: "250m"
|
||||||
|
memory: "256Mi"
|
||||||
|
limits:
|
||||||
|
cpu: "1000m"
|
||||||
|
memory: "1Gi"
|
||||||
|
|
||||||
|
ingress:
|
||||||
|
perimeter:
|
||||||
|
enabled: true
|
||||||
|
className: "external-nginx"
|
||||||
|
hosts:
|
||||||
|
- host: hooks.staging.archie.example.com
|
||||||
|
paths:
|
||||||
|
- /hooks
|
||||||
|
- /webhooks
|
||||||
|
tls:
|
||||||
|
- secretName: archie-staging-perimeter-tls
|
||||||
|
hosts:
|
||||||
|
- hooks.staging.archie.example.com
|
||||||
|
internal:
|
||||||
|
enabled: true
|
||||||
|
className: "internal-nginx"
|
||||||
|
hosts:
|
||||||
|
- host: archie.staging.internal.example.com
|
||||||
|
tls:
|
||||||
|
- secretName: archie-staging-internal-tls
|
||||||
|
hosts:
|
||||||
|
- archie.staging.internal.example.com
|
||||||
|
|
||||||
|
networkPolicy:
|
||||||
|
enabled: true
|
||||||
|
|
||||||
|
metrics:
|
||||||
|
serviceMonitor:
|
||||||
|
enabled: true
|
||||||
|
|
||||||
|
podDisruptionBudget:
|
||||||
|
enabled: false
|
||||||
@@ -0,0 +1,332 @@
|
|||||||
|
# Default production-oriented values for Archie Enterprise (Active-Passive v1).
|
||||||
|
# Pair with values-dev.yaml, values-staging.yaml, or values-prod.yaml.
|
||||||
|
|
||||||
|
replicaCount: 1
|
||||||
|
|
||||||
|
image:
|
||||||
|
repository: ghcr.io/samcharles93/archie
|
||||||
|
tag: "v1.0.0"
|
||||||
|
# Set digest (e.g. "sha256:...") to pin the exact immutable artifact in staging and prod.
|
||||||
|
digest: ""
|
||||||
|
pullPolicy: IfNotPresent
|
||||||
|
|
||||||
|
imagePullSecrets: []
|
||||||
|
nameOverride: ""
|
||||||
|
fullnameOverride: ""
|
||||||
|
|
||||||
|
serviceAccount:
|
||||||
|
create: true
|
||||||
|
name: ""
|
||||||
|
annotations: {}
|
||||||
|
automountServiceAccountToken: false
|
||||||
|
|
||||||
|
# Exceeds config.shutdownGrace (30s) so active requests and run checkpoints drain on SIGTERM.
|
||||||
|
terminationGracePeriodSeconds: 45
|
||||||
|
|
||||||
|
podAnnotations: {}
|
||||||
|
podLabels: {}
|
||||||
|
|
||||||
|
podSecurityContext:
|
||||||
|
runAsNonRoot: true
|
||||||
|
runAsUser: 65532
|
||||||
|
runAsGroup: 65532
|
||||||
|
fsGroup: 65532
|
||||||
|
fsGroupChangePolicy: OnRootMismatch
|
||||||
|
seccompProfile:
|
||||||
|
type: RuntimeDefault
|
||||||
|
|
||||||
|
securityContext:
|
||||||
|
allowPrivilegeEscalation: false
|
||||||
|
readOnlyRootFilesystem: true
|
||||||
|
runAsNonRoot: true
|
||||||
|
runAsUser: 65532
|
||||||
|
capabilities:
|
||||||
|
drop:
|
||||||
|
- ALL
|
||||||
|
|
||||||
|
config:
|
||||||
|
listen: "0.0.0.0:8080"
|
||||||
|
stateDir: "/var/lib/archie"
|
||||||
|
shutdownGrace: "30s"
|
||||||
|
# Public age1... backup recipients used alongside the primary sealing identity.
|
||||||
|
ageBackupRecipients: []
|
||||||
|
catalogue:
|
||||||
|
# Must be set together with publicKey when overriding the default catalogue mirror.
|
||||||
|
location: ""
|
||||||
|
publicKey: ""
|
||||||
|
disableAutoUpdate: true
|
||||||
|
# Optional Secret containing Docker config.json for private OCI catalogue registries.
|
||||||
|
authSecret: ""
|
||||||
|
authSecretKey: "config.json"
|
||||||
|
extensions:
|
||||||
|
# Kubernetes restricted PSS forbids CLONE_NEWUSER namespaces; require remote gRPC+mTLS extensions.
|
||||||
|
requireRemote: true
|
||||||
|
tls:
|
||||||
|
# Secret holding ca.crt, tls.crt, and tls.key for mTLS client authentication to extensions.
|
||||||
|
existingSecret: ""
|
||||||
|
mountPath: "/etc/archie/extensions-tls"
|
||||||
|
# Map extension key or name to { address: "ext.ns.svc:50051", serverName: "ext.internal" }.
|
||||||
|
remote: {}
|
||||||
|
|
||||||
|
secrets:
|
||||||
|
# Secret holding database-url, age-identity, and admin-token-sha256 for runtime pods.
|
||||||
|
existingSecret: "archie-runtime-secrets"
|
||||||
|
keys:
|
||||||
|
databaseUrl: "database-url"
|
||||||
|
databaseOwnerUrl: "database-owner-url"
|
||||||
|
ageIdentity: "age-identity"
|
||||||
|
adminTokenSha256: "admin-token-sha256"
|
||||||
|
|
||||||
|
caBundle:
|
||||||
|
enabled: false
|
||||||
|
existingConfigMap: ""
|
||||||
|
existingSecret: ""
|
||||||
|
key: "ca-certificates.crt"
|
||||||
|
mountPath: "/etc/ssl/certs/archie-ca.crt"
|
||||||
|
|
||||||
|
proxy:
|
||||||
|
httpsProxy: ""
|
||||||
|
httpProxy: ""
|
||||||
|
noProxy: "localhost,127.0.0.1,.svc,.cluster.local"
|
||||||
|
|
||||||
|
telemetry:
|
||||||
|
otlpEndpoint: ""
|
||||||
|
|
||||||
|
extraEnv: []
|
||||||
|
|
||||||
|
persistence:
|
||||||
|
enabled: true
|
||||||
|
existingClaim: ""
|
||||||
|
storageClass: ""
|
||||||
|
accessModes:
|
||||||
|
- ReadWriteOnce
|
||||||
|
size: "10Gi"
|
||||||
|
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
cpu: "250m"
|
||||||
|
memory: "256Mi"
|
||||||
|
limits:
|
||||||
|
cpu: "1000m"
|
||||||
|
memory: "1Gi"
|
||||||
|
|
||||||
|
probes:
|
||||||
|
startup:
|
||||||
|
initialDelaySeconds: 2
|
||||||
|
periodSeconds: 5
|
||||||
|
timeoutSeconds: 3
|
||||||
|
failureThreshold: 30
|
||||||
|
liveness:
|
||||||
|
initialDelaySeconds: 10
|
||||||
|
periodSeconds: 10
|
||||||
|
timeoutSeconds: 3
|
||||||
|
failureThreshold: 3
|
||||||
|
readiness:
|
||||||
|
initialDelaySeconds: 2
|
||||||
|
periodSeconds: 5
|
||||||
|
timeoutSeconds: 3
|
||||||
|
failureThreshold: 3
|
||||||
|
|
||||||
|
migrate:
|
||||||
|
enabled: true
|
||||||
|
# Dedicated migration secret holding database-owner-url and database-url.
|
||||||
|
# Keeps DDL credentials completely out of the runtime StatefulSet.
|
||||||
|
existingSecret: "archie-migrate-secrets"
|
||||||
|
hookWeight: "-5"
|
||||||
|
hookDeletePolicy: "before-hook-creation,hook-succeeded"
|
||||||
|
backoffLimit: 3
|
||||||
|
activeDeadlineSeconds: 300
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
cpu: "100m"
|
||||||
|
memory: "128Mi"
|
||||||
|
limits:
|
||||||
|
cpu: "500m"
|
||||||
|
memory: "256Mi"
|
||||||
|
|
||||||
|
bootstrap:
|
||||||
|
enabled: false
|
||||||
|
hookWeight: "-1"
|
||||||
|
hookDeletePolicy: "before-hook-creation,hook-succeeded"
|
||||||
|
backoffLimit: 2
|
||||||
|
activeDeadlineSeconds: 180
|
||||||
|
publicUrl: ""
|
||||||
|
trustedProxies: []
|
||||||
|
owner:
|
||||||
|
email: ""
|
||||||
|
displayName: "Platform Owner"
|
||||||
|
passwordSecretName: "archie-bootstrap-secrets"
|
||||||
|
passwordSecretKey: "owner-password"
|
||||||
|
oidc:
|
||||||
|
issuer: ""
|
||||||
|
audience: ""
|
||||||
|
clientId: ""
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
cpu: "100m"
|
||||||
|
memory: "128Mi"
|
||||||
|
limits:
|
||||||
|
cpu: "500m"
|
||||||
|
memory: "256Mi"
|
||||||
|
|
||||||
|
bundleSync:
|
||||||
|
enabled: false
|
||||||
|
hooks:
|
||||||
|
helm: true
|
||||||
|
argocd: true
|
||||||
|
hookWeight: "5"
|
||||||
|
hookDeletePolicy: "before-hook-creation,hook-succeeded"
|
||||||
|
backoffLimit: 2
|
||||||
|
activeDeadlineSeconds: 180
|
||||||
|
# ConfigMap holding bundle.yaml (and optional bindings.yaml).
|
||||||
|
existingConfigMap: ""
|
||||||
|
bundleKey: "bundle.yaml"
|
||||||
|
bindings:
|
||||||
|
enabled: true
|
||||||
|
# Optional separate ConfigMap for stage-local bindings; falls back to bundleSync.existingConfigMap.
|
||||||
|
existingConfigMap: ""
|
||||||
|
key: "bindings.yaml"
|
||||||
|
expectDigest: ""
|
||||||
|
dryRun: false
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
cpu: "100m"
|
||||||
|
memory: "128Mi"
|
||||||
|
limits:
|
||||||
|
cpu: "500m"
|
||||||
|
memory: "256Mi"
|
||||||
|
|
||||||
|
service:
|
||||||
|
type: ClusterIP
|
||||||
|
port: 8080
|
||||||
|
metricsPort: 9090
|
||||||
|
annotations: {}
|
||||||
|
|
||||||
|
metrics:
|
||||||
|
enabled: true
|
||||||
|
port: 9090
|
||||||
|
path: "/metrics"
|
||||||
|
serviceMonitor:
|
||||||
|
enabled: false
|
||||||
|
interval: "30s"
|
||||||
|
scrapeTimeout: "10s"
|
||||||
|
labels: {}
|
||||||
|
|
||||||
|
# The dashboard: static files served by its own image, routed by the internal
|
||||||
|
# ingress on the same host as the API.
|
||||||
|
frontend:
|
||||||
|
enabled: true
|
||||||
|
replicaCount: 2
|
||||||
|
image:
|
||||||
|
repository: ghcr.io/archie-platform/archie-frontend
|
||||||
|
tag: "v0.1.0"
|
||||||
|
digest: ""
|
||||||
|
pullPolicy: IfNotPresent
|
||||||
|
podSecurityContext:
|
||||||
|
runAsNonRoot: true
|
||||||
|
runAsUser: 101
|
||||||
|
runAsGroup: 101
|
||||||
|
seccompProfile:
|
||||||
|
type: RuntimeDefault
|
||||||
|
securityContext:
|
||||||
|
allowPrivilegeEscalation: false
|
||||||
|
readOnlyRootFilesystem: true
|
||||||
|
runAsNonRoot: true
|
||||||
|
capabilities:
|
||||||
|
drop:
|
||||||
|
- ALL
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
cpu: "25m"
|
||||||
|
memory: "32Mi"
|
||||||
|
limits:
|
||||||
|
cpu: "250m"
|
||||||
|
memory: "128Mi"
|
||||||
|
autoscaling:
|
||||||
|
enabled: false
|
||||||
|
minReplicas: 2
|
||||||
|
maxReplicas: 6
|
||||||
|
targetCPUUtilizationPercentage: 70
|
||||||
|
service:
|
||||||
|
port: 8080
|
||||||
|
|
||||||
|
ingress:
|
||||||
|
# External edge ingress admitting webhook intake (/hooks/ and /webhooks/) only.
|
||||||
|
perimeter:
|
||||||
|
enabled: false
|
||||||
|
className: ""
|
||||||
|
annotations: {}
|
||||||
|
hosts: []
|
||||||
|
tls: []
|
||||||
|
# Internal corporate VPN / SSO ingress. On each host, backendPaths go to the
|
||||||
|
# API and every other path to the dashboard.
|
||||||
|
internal:
|
||||||
|
enabled: false
|
||||||
|
className: ""
|
||||||
|
annotations: {}
|
||||||
|
hosts: []
|
||||||
|
backendPaths:
|
||||||
|
- /api
|
||||||
|
- /oauth2
|
||||||
|
- /hooks
|
||||||
|
tls: []
|
||||||
|
|
||||||
|
networkPolicy:
|
||||||
|
enabled: true
|
||||||
|
ingress:
|
||||||
|
perimeter:
|
||||||
|
namespaceSelector: {}
|
||||||
|
podSelector: {}
|
||||||
|
internal:
|
||||||
|
namespaceSelector: {}
|
||||||
|
podSelector: {}
|
||||||
|
metrics:
|
||||||
|
namespaceSelector: {}
|
||||||
|
podSelector: {}
|
||||||
|
egress:
|
||||||
|
dns:
|
||||||
|
namespaceSelector:
|
||||||
|
kubernetes.io/metadata.name: kube-system
|
||||||
|
podSelector:
|
||||||
|
k8s-app: kube-dns
|
||||||
|
postgres:
|
||||||
|
port: 5432
|
||||||
|
cidrs: []
|
||||||
|
namespaceSelector: {}
|
||||||
|
podSelector: {}
|
||||||
|
oidc:
|
||||||
|
port: 443
|
||||||
|
cidrs: []
|
||||||
|
proxy:
|
||||||
|
port: 3128
|
||||||
|
cidrs: []
|
||||||
|
extensions:
|
||||||
|
ports:
|
||||||
|
- 50051
|
||||||
|
cidrs: []
|
||||||
|
namespaceSelector: {}
|
||||||
|
podSelector: {}
|
||||||
|
otlp:
|
||||||
|
port: 4317
|
||||||
|
cidrs: []
|
||||||
|
namespaceSelector: {}
|
||||||
|
podSelector: {}
|
||||||
|
|
||||||
|
podDisruptionBudget:
|
||||||
|
enabled: false
|
||||||
|
maxUnavailable: 1
|
||||||
|
minAvailable: null
|
||||||
|
|
||||||
|
externalSecret:
|
||||||
|
enabled: false
|
||||||
|
refreshInterval: "1h"
|
||||||
|
secretStoreRef:
|
||||||
|
name: "vault-backend"
|
||||||
|
kind: "ClusterSecretStore"
|
||||||
|
remoteRefs:
|
||||||
|
databaseUrlKey: "archie/prod/database"
|
||||||
|
databaseUrlProperty: "runtime_url"
|
||||||
|
ageIdentityKey: "archie/prod/age"
|
||||||
|
ageIdentityProperty: "identity"
|
||||||
|
adminTokenSha256Key: "archie/prod/admin"
|
||||||
|
adminTokenSha256Property: "token_sha256"
|
||||||
@@ -1,104 +0,0 @@
|
|||||||
# ==============================================================================
|
|
||||||
# Multi-Forge (GitHub + Gitea) Deployment Example
|
|
||||||
#
|
|
||||||
# Runs GitHub and a self-hosted Gitea instance simultaneously.
|
|
||||||
# Each [[identities]] entry defines its own forge, token, and repository list.
|
|
||||||
# Each identity runs in an isolated background goroutine and worktree directory.
|
|
||||||
# ==============================================================================
|
|
||||||
|
|
||||||
work_dir = "~/.local/share/archie/work"
|
|
||||||
state_dir = "~/.local/share/archie" # NATS store, task logs
|
|
||||||
# The State Store's PostgreSQL connection (PostgreSQL 18, required).
|
|
||||||
# `docker compose up -d postgres` provides this local default; point it at
|
|
||||||
# your own Postgres 18 server otherwise.
|
|
||||||
database_url = "postgres://archie:archie@127.0.0.1:5432/archie?sslmode=disable"
|
|
||||||
|
|
||||||
[services.gateway]
|
|
||||||
target = "127.0.0.1:8585"
|
|
||||||
|
|
||||||
# The State Store gRPC service owns the PostgreSQL task data; archied and
|
|
||||||
# archie-gateway dial it and never open those tables themselves.
|
|
||||||
# This deployment runs the agent in containers, so target is the Docker bridge
|
|
||||||
# gateway (172.17.0.1) the container can reach, with a matching target_token
|
|
||||||
# that archie-state-store validates. Host-only agent: use 127.0.0.1:9090 with
|
|
||||||
# no token.
|
|
||||||
[services.state]
|
|
||||||
target = "172.17.0.1:9090"
|
|
||||||
target_token = "change-me-state-store-token"
|
|
||||||
|
|
||||||
[models]
|
|
||||||
triage = "openai/gpt-6-luna"
|
|
||||||
planner = "openai/gpt-6-luna"
|
|
||||||
builder = "openai/gpt-6-luna"
|
|
||||||
|
|
||||||
[providers.openai]
|
|
||||||
class = "openai"
|
|
||||||
api_key_env = "OPENAI_API_KEY"
|
|
||||||
|
|
||||||
[nats]
|
|
||||||
mode = "embedded"
|
|
||||||
|
|
||||||
[containers]
|
|
||||||
# Pinned to a verified digest -- archie-agent has no published semver tag
|
|
||||||
# yet (CI only pushes :latest). See
|
|
||||||
# deployments/systemd-user-service.md#pinning-the-archie-agent-image.
|
|
||||||
image = "ghcr.io/samcharles93/archie-agent@sha256:870f1b1357979cfea23fccacb24166ebeb9ab321708ef2c2b218a763ed99b090"
|
|
||||||
pull_policy = "missing"
|
|
||||||
|
|
||||||
[budgets]
|
|
||||||
max_steps = 60
|
|
||||||
wall_clock = "30m"
|
|
||||||
|
|
||||||
# ------------------------------------------------------------------------------
|
|
||||||
# Identity 1: GitHub Bot
|
|
||||||
# ------------------------------------------------------------------------------
|
|
||||||
[[identities]]
|
|
||||||
name = "github-bot"
|
|
||||||
bot_user = "archie-github"
|
|
||||||
bot_email = "archie-github@users.noreply.github.com"
|
|
||||||
|
|
||||||
[identities.forge]
|
|
||||||
type = "github"
|
|
||||||
host = "https://github.com"
|
|
||||||
token = { engine = "env", key = "ARCHIE_GITHUB_TOKEN" }
|
|
||||||
|
|
||||||
[identities.dispatch]
|
|
||||||
trigger = "assignee"
|
|
||||||
ack_reaction = "eyes"
|
|
||||||
|
|
||||||
[[identities.repos]]
|
|
||||||
owner = "my-org"
|
|
||||||
name = "github-repo-one"
|
|
||||||
ecosystem = "go"
|
|
||||||
|
|
||||||
[[identities.repos]]
|
|
||||||
owner = "my-org"
|
|
||||||
name = "github-repo-two"
|
|
||||||
ecosystem = "node"
|
|
||||||
|
|
||||||
# ------------------------------------------------------------------------------
|
|
||||||
# Identity 2: Self-Hosted Gitea Bot
|
|
||||||
# ------------------------------------------------------------------------------
|
|
||||||
[[identities]]
|
|
||||||
name = "gitea-bot"
|
|
||||||
bot_user = "archie-gitea"
|
|
||||||
bot_email = "archie-gitea@example.com"
|
|
||||||
|
|
||||||
[identities.forge]
|
|
||||||
type = "gitea"
|
|
||||||
host = "https://gitea.example.com"
|
|
||||||
token = { engine = "env", key = "ARCHIE_GITEA_TOKEN" }
|
|
||||||
|
|
||||||
[identities.dispatch]
|
|
||||||
trigger = "label"
|
|
||||||
ack_reaction = "eyes"
|
|
||||||
|
|
||||||
[[identities.repos]]
|
|
||||||
owner = "internal-team"
|
|
||||||
name = "gitea-repo-alpha"
|
|
||||||
ecosystem = "go"
|
|
||||||
|
|
||||||
[[identities.repos]]
|
|
||||||
owner = "internal-team"
|
|
||||||
name = "gitea-repo-beta"
|
|
||||||
ecosystem = "python"
|
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
jetstream { store_dir: /data }
|
||||||
|
http_port: 8222
|
||||||
|
|
||||||
|
authorization {
|
||||||
|
users: [{ user: "archie-callout", password: $NATS_TOKEN }]
|
||||||
|
auth_callout {
|
||||||
|
issuer: $NATS_CALLOUT_ISSUER
|
||||||
|
auth_users: ["archie-callout"]
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -8,14 +8,16 @@
|
|||||||
work_dir = "~/.local/share/archie/work"
|
work_dir = "~/.local/share/archie/work"
|
||||||
state_dir = "~/.local/share/archie" # NATS store, task logs
|
state_dir = "~/.local/share/archie" # NATS store, task logs
|
||||||
# The State Store's PostgreSQL connection (PostgreSQL 18, required).
|
# The State Store's PostgreSQL connection (PostgreSQL 18, required).
|
||||||
# `docker compose up -d postgres` provides this local default; point it at
|
# `docker compose up -d postgres` provides the local default; point it at
|
||||||
# your own Postgres 18 server otherwise.
|
# your own Postgres 18 server otherwise. The services serve as archie_runtime
|
||||||
database_url = "postgres://archie:archie@127.0.0.1:5432/archie?sslmode=disable"
|
# and migrations run as archie_migrator; create both once with
|
||||||
|
# `archie-state-store provision -h` (deployments/README.md).
|
||||||
|
database_url = "postgres://archie_runtime:archie@127.0.0.1:5432/archie?sslmode=disable"
|
||||||
|
migration_database_url = "postgres://archie_migrator:archie@127.0.0.1:5432/archie?sslmode=disable"
|
||||||
poll_interval = "60s"
|
poll_interval = "60s"
|
||||||
label = "archie"
|
label = "archie"
|
||||||
bot_user = "archie-bot"
|
bot_user = "archie-bot"
|
||||||
bot_email = "archie-bot@users.noreply.github.com"
|
bot_email = "archie-bot@users.noreply.github.com"
|
||||||
diff_cap_lines = 400
|
|
||||||
|
|
||||||
# The Gateway Service owns conversational state and serves ChatContract over
|
# The Gateway Service owns conversational state and serves ChatContract over
|
||||||
# gRPC. Run archie-gateway alongside archied and archie-ui (the dashboard
|
# gRPC. Run archie-gateway alongside archied and archie-ui (the dashboard
|
||||||
@@ -25,16 +27,11 @@ target = "127.0.0.1:8585"
|
|||||||
|
|
||||||
# The State Store gRPC service owns the PostgreSQL task data. archied and
|
# The State Store gRPC service owns the PostgreSQL task data. archied and
|
||||||
# archie-gateway dial it here and never open those tables themselves.
|
# archie-gateway dial it here and never open those tables themselves.
|
||||||
# This deployment runs the
|
# This deployment runs the agent in containers, so the target is the Docker
|
||||||
# agent in containers, so the target must be the Docker bridge gateway address
|
# bridge gateway (172.17.0.1) the container can reach. A non-loopback address
|
||||||
# (172.17.0.1) that the container can reach, and a non-loopback target requires
|
# needs [tls]; see config.example.toml.
|
||||||
# a matching target_token that archie-state-store validates -- start it with the
|
|
||||||
# same token (e.g. `archie-state-store ... -listen 172.17.0.1:9090 -token
|
|
||||||
# change-me-state-store-token`). For a host-only agent (no [containers]) use the
|
|
||||||
# loopback target 127.0.0.1:9090 with no token.
|
|
||||||
[services.state]
|
[services.state]
|
||||||
target = "172.17.0.1:9090"
|
target = "172.17.0.1:9090"
|
||||||
target_token = "change-me-state-store-token"
|
|
||||||
|
|
||||||
[forge]
|
[forge]
|
||||||
type = "github"
|
type = "github"
|
||||||
@@ -59,9 +56,9 @@ mode = "embedded"
|
|||||||
|
|
||||||
[containers]
|
[containers]
|
||||||
# Pinned to a verified digest -- archie-agent has no published semver tag
|
# Pinned to a verified digest -- archie-agent has no published semver tag
|
||||||
# yet (CI only pushes :latest). See
|
# yet (a release publishes :latest and :sha-<commit>). See
|
||||||
# deployments/systemd-user-service.md#pinning-the-archie-agent-image.
|
# deployments/systemd-user-service.md#6-pinning-the-archie-agent-image.
|
||||||
image = "ghcr.io/samcharles93/archie-agent@sha256:870f1b1357979cfea23fccacb24166ebeb9ab321708ef2c2b218a763ed99b090"
|
image = "git.catlow.cloud/sam/archie-agent@sha256:<digest>"
|
||||||
pull_policy = "missing"
|
pull_policy = "missing"
|
||||||
|
|
||||||
[budgets]
|
[budgets]
|
||||||
|
|||||||
@@ -15,9 +15,12 @@ bot_user = "archie"
|
|||||||
work_dir = "~/.local/share/archie/work"
|
work_dir = "~/.local/share/archie/work"
|
||||||
state_dir = "~/.local/share/archie" # NATS store, task logs
|
state_dir = "~/.local/share/archie" # NATS store, task logs
|
||||||
# PostgreSQL 18 connection (required).
|
# PostgreSQL 18 connection (required).
|
||||||
# `docker compose up -d postgres` provides this local default; point it at
|
# `docker compose up -d postgres` provides the local default; point it at
|
||||||
# your own Postgres 18 server otherwise.
|
# your own Postgres 18 server otherwise. The services serve as archie_runtime
|
||||||
database_url = "postgres://archie:archie@127.0.0.1:5432/archie?sslmode=disable"
|
# and migrations run as archie_migrator; create both once with
|
||||||
|
# `archie-state-store provision -h` (deployments/README.md).
|
||||||
|
database_url = "postgres://archie_runtime:archie@127.0.0.1:5432/archie?sslmode=disable"
|
||||||
|
migration_database_url = "postgres://archie_migrator:archie@127.0.0.1:5432/archie?sslmode=disable"
|
||||||
|
|
||||||
[services.gateway]
|
[services.gateway]
|
||||||
target = "127.0.0.1:8585"
|
target = "127.0.0.1:8585"
|
||||||
@@ -55,3 +58,11 @@ models = [
|
|||||||
[budgets]
|
[budgets]
|
||||||
max_steps = 60
|
max_steps = 60
|
||||||
wall_clock = "30m"
|
wall_clock = "30m"
|
||||||
|
|
||||||
|
# The image task containers run. There is no default: the daemon refuses to
|
||||||
|
# start without it and names the key, so set your own pinned reference here --
|
||||||
|
# see deployments/systemd-user-service.md#6-pinning-the-archie-agent-image.
|
||||||
|
# [containers]
|
||||||
|
# image = "registry.example.com/archie/archie-agent@sha256:<digest>"
|
||||||
|
# pull_policy = "missing"
|
||||||
|
# registry_auth = { engine = "env", key = "ARCHIE_REGISTRY_AUTH" } # when the registry needs a login
|
||||||
@@ -11,7 +11,7 @@ This runbook describes how to manage `archied` as a background user service on L
|
|||||||
with the contents it
|
with the contents it
|
||||||
ships. This page describes what runs and why; the installer owns the contents,
|
ships. This page describes what runs and why; the installer owns the contents,
|
||||||
so inspect a unit with `systemctl --user cat <unit>` rather than copying it from
|
so inspect a unit with `systemctl --user cat <unit>` rather than copying it from
|
||||||
here, where it would drift from what is written.
|
here, where it would drift from what `install.sh` writes.
|
||||||
|
|
||||||
The Gateway unit is `archie-gateway.service`, written by `install.sh` beside
|
The Gateway unit is `archie-gateway.service`, written by `install.sh` beside
|
||||||
`archied.service`.
|
`archied.service`.
|
||||||
@@ -20,10 +20,9 @@ The State Store unit is `archie-state-store.service`. It owns the task data in
|
|||||||
PostgreSQL and serves the `StateStore` gRPC contract. BOTH `archied` and
|
PostgreSQL and serves the `StateStore` gRPC contract. BOTH `archied` and
|
||||||
`archie-gateway` dial it via `[services.state].target` (see the `archied`
|
`archie-gateway` dial it via `[services.state].target` (see the `archied`
|
||||||
config below) and never open the task tables themselves. A
|
config below) and never open the task tables themselves. A
|
||||||
host-only agent uses the loopback bind with no token below; a container-mode
|
host-only agent uses the loopback bind below; a container-mode agent needs the
|
||||||
agent needs the Docker bridge gateway address plus a bearer token via
|
Docker bridge gateway address, and a non-loopback bind needs `[tls]` (see
|
||||||
`--token`/`STATE_STORE_TOKEN` or `[services.state].target_token`, and a
|
`config.example.toml`):
|
||||||
non-loopback bind fails closed without one:
|
|
||||||
|
|
||||||
`install.sh` writes `archie-state-store.service` with that loopback bind.
|
`install.sh` writes `archie-state-store.service` with that loopback bind.
|
||||||
|
|
||||||
@@ -31,19 +30,17 @@ non-loopback bind fails closed without one:
|
|||||||
|
|
||||||
### Messaging Service Unit (`~/.config/systemd/user/archie-messaging.service`)
|
### Messaging Service Unit (`~/.config/systemd/user/archie-messaging.service`)
|
||||||
|
|
||||||
The Telegram, email and webhook channels are served by `archie-messaging`, not
|
`archie-messaging` serves the Telegram, email and webhook channels, not
|
||||||
by `archied`, since the v1.30.0 extraction. `archied` starts no gateway for them
|
`archied`, since the v1.30.0 extraction. `archied` starts no gateway for them
|
||||||
and logs nothing when one is absent, so a host that updates across v1.30.0
|
and logs nothing when one is absent. A host that updates across v1.30.0
|
||||||
without this unit runs on with dead channels and a daemon that looks perfectly
|
without this unit runs on with dead channels and a daemon that looks perfectly
|
||||||
healthy. `install.sh` writes this unit on a fresh install;
|
healthy. `install.sh` writes this unit on a fresh install.
|
||||||
`scripts/archie-update-install` refuses an
|
`archied update install` refuses an update when a host is missing a unit and
|
||||||
update when a host is missing a unit and names what is missing, which now fires
|
names what is missing. That now fires for a host that drifted or predates this
|
||||||
for a host that drifted or predates this release rather than the normal path.
|
release rather than the normal path.
|
||||||
|
|
||||||
It dials the Gateway for the chat contract and the State Store for the stored
|
It dials the Gateway for the chat contract and the State Store for the stored
|
||||||
channel settings, and reads the same `config.toml`. Like `archie-ui` it resolves
|
channel settings, and reads the same `config.toml`, including `[tls]`.
|
||||||
`GATEWAY_TOKEN` and `STATE_STORE_TOKEN` from its process environment, hence the
|
|
||||||
`EnvironmentFile`:
|
|
||||||
|
|
||||||
`install.sh` writes `archie-messaging.service`. Its `After=` and `Wants=`
|
`install.sh` writes `archie-messaging.service`. Its `After=` and `Wants=`
|
||||||
lines only tidy the start sequence: nothing depends on that order, because
|
lines only tidy the start sequence: nothing depends on that order, because
|
||||||
@@ -51,48 +48,28 @@ each service waits for the peers it needs.
|
|||||||
|
|
||||||
## 2. UI Service Unit (`~/.config/systemd/user/archie-ui.service`)
|
## 2. UI Service Unit (`~/.config/systemd/user/archie-ui.service`)
|
||||||
|
|
||||||
The dashboard is served by the standalone UI Service, not by `archied`. It reads the same `config.toml`, dials
|
The standalone UI Service serves the dashboard, not `archied`. It reads the same `config.toml`, dials
|
||||||
the Gateway and State Store targets already in it, and binds `[web].listen`.
|
the Gateway and State Store targets already in it, and binds `[web].listen`.
|
||||||
A non-loopback bind requires a dashboard token (`-token`, or `-token-file` to
|
Open the dashboard to configure the organisation, workspace and first administrator account.
|
||||||
mint and persist one);
|
Complete setup before exposing it publicly; remote access requires an HTTPS reverse proxy.
|
||||||
|
|
||||||
**Auth note:** unlike `archied`,
|
**Auth note:** `archie-ui` authenticates to the Gateway, State Store and
|
||||||
`archie-ui` has no secret registry — it resolves `GATEWAY_TOKEN` and
|
daemon with its `[tls]` certificate (`archie-ui.pem`) from `config.toml`.
|
||||||
`STATE_STORE_TOKEN` from its **process environment only** (or from the
|
|
||||||
`target_token` values in `config.toml`). Whatever starts `archie-ui` is
|
|
||||||
therefore responsible for exporting those tokens into its environment: keep
|
|
||||||
them in `~/.config/archie/env` (loaded by the `EnvironmentFile` line below),
|
|
||||||
not only in a secret manager. A deployment that authenticates `archied`
|
|
||||||
through bws/Vault but exports nothing for `archie-ui` leaves the dashboard
|
|
||||||
unable to dial its dependencies.
|
|
||||||
|
|
||||||
For supervision, `GET /healthz` on `[web].listen` is the process's liveness
|
For supervision, `GET /healthz` on `[web].listen` is the process's liveness
|
||||||
probe (token-free by design); the authenticated readiness surface lives at
|
probe (token-free by design); the authenticated readiness surface lives at
|
||||||
the dashboard's health endpoint behind the token. A watchdog can curl
|
the dashboard's health endpoint behind account authentication. A watchdog can curl
|
||||||
`/healthz` without credentials.
|
`/healthz` without credentials.
|
||||||
|
|
||||||
`install.sh` writes `archie-ui.service`. It has no secret registry of its own,
|
`install.sh` writes `archie-ui.service`. Operators configure browser accounts through the dashboard.
|
||||||
so its token handling is the `EnvironmentFile` note above.
|
|
||||||
|
|
||||||
Concretely, for a deployment whose dependency tokens live outside
|
|
||||||
`config.toml`, `~/.config/archie/env` carries the two names and the unit
|
|
||||||
loads it; the dashboard token itself comes from `-token-file` (there is no
|
|
||||||
environment variable for it):
|
|
||||||
|
|
||||||
```bash
|
|
||||||
# ~/.config/archie/env
|
|
||||||
GATEWAY_TOKEN=... # presented to archie-gateway
|
|
||||||
STATE_STORE_TOKEN=... # presented to archie-state-store
|
|
||||||
```
|
|
||||||
|
|
||||||
`After=` orders the start, it does not wait for the store to bind. The UI
|
`After=` orders the start, it does not wait for the store to bind. The UI
|
||||||
process closes that gap itself: its event pump retries priming with backoff
|
process closes that gap itself. Its event pump retries priming with backoff
|
||||||
until the State Store answers, so the activity feed goes live once the store
|
until the State Store answers, so the activity feed goes live once the store
|
||||||
is up rather than staying history-only until the next restart.
|
is up rather than staying history-only until the next restart.
|
||||||
|
|
||||||
For a non-loopback bind, override the installed unit's `ExecStart` with
|
For remote access, configure a TLS reverse proxy and the instance public URL in
|
||||||
`-token-file %h/.local/share/archie/web-token` (or `-token`) in a drop-in rather
|
Access → Authentication. Enrol passkeys from Your account on HTTPS or localhost.
|
||||||
than editing the installer's copy in place.
|
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
@@ -152,22 +129,25 @@ systemctl --user stop archied
|
|||||||
|
|
||||||
Embedded NATS is the default. The systemd service runs `archied` natively, so
|
Embedded NATS is the default. The systemd service runs `archied` natively, so
|
||||||
interactive chat keeps the host access the operator configured, while every
|
interactive chat keeps the host access the operator configured, while every
|
||||||
autonomous repository workflow runs in a task-scoped Docker container. No
|
autonomous repository workflow runs in a task-scoped Docker container. The
|
||||||
Compose service or host `archie-agent` binary is required.
|
deployment needs no Compose service or host `archie-agent` binary.
|
||||||
|
|
||||||
Docker must be installed and reachable by the service user. With no explicit
|
The operator must install Docker and make it reachable to the service user.
|
||||||
broker or container settings, Archie defaults `containers.image` to
|
`containers.image` has no default: with it unset the daemon refuses to start and
|
||||||
`ghcr.io/samcharles93/archie-agent:latest`. Every profile shipped in
|
names the key, so a fresh install learns about it at startup, not at the first
|
||||||
`deployments/` overrides that default with a pinned reference -- see
|
failed pull.
|
||||||
[Pinning the archie-agent image](#pinning-the-archie-agent-image) below. An
|
`single-forge-github.toml` and `docker-nats-stack.toml` set a pinned
|
||||||
explicit equivalent, pinned the same way, is:
|
reference; `standalone.toml` and `dev.toml` leave it for the operator to set
|
||||||
|
-- see
|
||||||
|
[Pinning the archie-agent image](#6-pinning-the-archie-agent-image) below. An
|
||||||
|
explicit reference, pinned the same way, is:
|
||||||
|
|
||||||
```toml
|
```toml
|
||||||
[nats]
|
[nats]
|
||||||
mode = "embedded"
|
mode = "embedded"
|
||||||
|
|
||||||
[containers]
|
[containers]
|
||||||
image = "ghcr.io/samcharles93/archie-agent@sha256:870f1b1357979cfea23fccacb24166ebeb9ab321708ef2c2b218a763ed99b090"
|
image = "git.catlow.cloud/sam/archie-agent@sha256:<digest>"
|
||||||
pull_policy = "missing"
|
pull_policy = "missing"
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -177,9 +157,9 @@ and passes the resulting endpoint to each worker. There is no port to publish
|
|||||||
and no broker URL to maintain.
|
and no broker URL to maintain.
|
||||||
|
|
||||||
The State Store is a separate process and, with a container-mode agent, must
|
The State Store is a separate process and, with a container-mode agent, must
|
||||||
be reachable from the container, so bind it to the same bridge gateway with a
|
be reachable from the container. Bind it to the same bridge gateway with a
|
||||||
token and point `[services.state].target` at it (start
|
token and point `[services.state].target` at it (start
|
||||||
`archie-state-store` with `-listen <bridge>:9090 -token <token>`); without a
|
`archie-state-store` with `-listen <bridge>:9090 -token <token>`). Without a
|
||||||
token a non-loopback bind fails closed. For a host-only agent, `127.0.0.1:9090`
|
token a non-loopback bind fails closed. For a host-only agent, `127.0.0.1:9090`
|
||||||
with no token is correct.
|
with no token is correct.
|
||||||
|
|
||||||
@@ -191,36 +171,43 @@ fall back to a host model loop.
|
|||||||
|
|
||||||
## 6. Pinning the archie-agent Image
|
## 6. Pinning the archie-agent Image
|
||||||
|
|
||||||
`ghcr.io/samcharles93/archie-agent:latest` is a moving target: every push to
|
The release pipeline publishes
|
||||||
`main` that touches the runtime's package closure re-publishes it
|
`git.catlow.cloud/sam/archie-agent` as `:v<version>` and `:sha-<commit>` when
|
||||||
(`.github/workflows/deploy.yml`), so `latest` can change under a running
|
the commit carries a release tag; an ordinary push to `main` publishes nothing
|
||||||
deployment with no warning and no way to reproduce a prior build.
|
for the agent image, and `:latest` moves only when the release pipeline promotes
|
||||||
|
a release. A distribution zip pins the image its own release
|
||||||
|
published, by digest, in `release.json`, and `archied update install` pulls
|
||||||
|
exactly that.
|
||||||
|
|
||||||
As of this writing, `archie-agent` has **no published semantic-version tag**
|
To pin by hand, prefer the version tag for readability, or a digest where you
|
||||||
-- CI only pushes `:latest` to GHCR (`archied` is versioned independently per
|
need byte-for-byte reproducibility (a tag can be overwritten, a digest cannot):
|
||||||
`RELEASING.md`, but that versioning is not yet reflected as a registry tag for
|
|
||||||
the agent image). Until CI publishes one, the only reproducible reference is
|
|
||||||
a content digest, resolved once and pinned explicitly:
|
|
||||||
|
|
||||||
```toml
|
```toml
|
||||||
[containers]
|
[containers]
|
||||||
image = "ghcr.io/samcharles93/archie-agent@sha256:870f1b1357979cfea23fccacb24166ebeb9ab321708ef2c2b218a763ed99b090"
|
image = "git.catlow.cloud/sam/archie-agent:v<version>"
|
||||||
|
# or
|
||||||
|
image = "git.catlow.cloud/sam/archie-agent@sha256:<digest>"
|
||||||
```
|
```
|
||||||
|
|
||||||
This is the digest `latest` resolved to on 2026-09-05. Digest pinning is the
|
A reference on a registry that needs a login needs the credential in
|
||||||
strongest option for production: it is immutable and independently
|
`[containers].registry_auth` -- the release's own
|
||||||
verifiable (`docker manifest inspect ghcr.io/samcharles93/archie-agent@sha256:...`),
|
`git.catlow.cloud/sam/archie-agent` digest is one, since an anonymous pull
|
||||||
at the cost of being opaque in a config file a human is meant to edit --
|
cannot reach it:
|
||||||
resolve a fresh digest deliberately (`docker pull ...:latest` followed by
|
|
||||||
`docker inspect --format '{{index .RepoDigests 0}}'`) rather than editing this
|
|
||||||
one in place expecting it to track new releases.
|
|
||||||
|
|
||||||
If/when CI starts publishing a semantic-version tag for `archie-agent`
|
```toml
|
||||||
(e.g. `ghcr.io/samcharles93/archie-agent:v1.21.0`), prefer that tag for
|
[containers]
|
||||||
day-to-day config readability, and reserve digest pinning for deployments
|
registry_auth = {engine = "env", key = "ARCHIE_REGISTRY_AUTH"}
|
||||||
that need byte-for-byte reproducibility guarantees a tag alone cannot give
|
```
|
||||||
(tags are mutable pointers; a compromised or accidentally-overwritten tag
|
|
||||||
still resolves, a digest cannot).
|
The secret resolves to a Docker `AuthConfig` JSON document: the object
|
||||||
|
`docker login` stores under `auths`, without the surrounding map, and with a
|
||||||
|
personal access token that can read the package as the password --
|
||||||
|
`{"username":"<user>","password":"<token>"}`. Put it in
|
||||||
|
`~/.config/archie/env` as `ARCHIE_REGISTRY_AUTH` so it stays out of
|
||||||
|
`config.toml`. The field is file-owned and settled at boot, so a change takes
|
||||||
|
effect on restart. When the daemon cannot read a value, it logs a warning
|
||||||
|
and pulls anonymously, which is the failure the task reports as a capability
|
||||||
|
error.
|
||||||
|
|
||||||
The bundled update adapter snapshots the configured `[containers].image` before
|
The bundled update adapter snapshots the configured `[containers].image` before
|
||||||
rebuilding it and restores that image if the restarted daemon fails its health
|
rebuilding it and restores that image if the restarted daemon fails its health
|
||||||
@@ -241,11 +228,19 @@ docker compose up -d nats
|
|||||||
[nats]
|
[nats]
|
||||||
mode = "external"
|
mode = "external"
|
||||||
url = "nats://172.19.0.1:4222"
|
url = "nats://172.19.0.1:4222"
|
||||||
|
token_env = "NATS_TOKEN"
|
||||||
|
callout_issuer_seed_env = "NATS_CALLOUT_SEED"
|
||||||
|
|
||||||
[containers]
|
[containers]
|
||||||
network = "archie-core_default"
|
network = "archie-core_default"
|
||||||
```
|
```
|
||||||
|
|
||||||
|
The broker defers every login to archied (NATS auth callout), so a worker logs
|
||||||
|
in with its run credential and reaches only its own task's subjects. Generate
|
||||||
|
an account nKey (`nk -gen account -pubout`), export its seed as
|
||||||
|
`NATS_CALLOUT_SEED` for archied and its public key as `NATS_CALLOUT_ISSUER` for
|
||||||
|
Compose, and set `NATS_TOKEN` to the same value in both.
|
||||||
|
|
||||||
The daemon hands workers the URL its own client connected to. The Compose
|
The daemon hands workers the URL its own client connected to. The Compose
|
||||||
service name is not resolvable from the native host, and localhost inside a
|
service name is not resolvable from the native host, and localhost inside a
|
||||||
worker is the worker itself; the pinned network gateway is reachable from both.
|
worker is the worker itself; the pinned network gateway is reachable from both.
|
||||||
|
|||||||
+26
-10
@@ -8,7 +8,7 @@
|
|||||||
# Embedded NATS is the normal deployment and needs no Compose service.
|
# Embedded NATS is the normal deployment and needs no Compose service.
|
||||||
# State Store DB: docker compose up -d postgres
|
# State Store DB: docker compose up -d postgres
|
||||||
# External broker: docker compose up -d nats
|
# External broker: docker compose up -d nats
|
||||||
# Build worker: docker compose build agent
|
# Build worker: task image:agent (stamps this checkout's version)
|
||||||
# Profile image: docker compose build agent-net
|
# Profile image: docker compose build agent-net
|
||||||
# Stop external: docker compose down
|
# Stop external: docker compose down
|
||||||
# Logs: journalctl --user -u archied -f (the daemon)
|
# Logs: journalctl --user -u archied -f (the daemon)
|
||||||
@@ -19,8 +19,9 @@ services:
|
|||||||
# The standalone archie-state-store process's database. PostgreSQL 18 is
|
# The standalone archie-state-store process's database. PostgreSQL 18 is
|
||||||
# the required minimum and target; `postgres.Open` refuses anything older.
|
# the required minimum and target; `postgres.Open` refuses anything older.
|
||||||
# `task dev` brings this up before the State Store via dev:postgres. The
|
# `task dev` brings this up before the State Store via dev:postgres. The
|
||||||
# credentials and database name below are the dev default mirrored by
|
# This superuser is the dev database's admin: `task dev` runs archie-state-store
|
||||||
# deployments/dev.toml's database_url -- change both together.
|
# provision after first start to create the least-privilege roles the
|
||||||
|
# mirroring deployments/dev.toml URLs name -- change them together.
|
||||||
postgres:
|
postgres:
|
||||||
image: postgres:18
|
image: postgres:18
|
||||||
environment:
|
environment:
|
||||||
@@ -43,13 +44,22 @@ services:
|
|||||||
|
|
||||||
# ── NATS JetStream ────────────────────────────────────────────────
|
# ── NATS JetStream ────────────────────────────────────────────────
|
||||||
nats:
|
nats:
|
||||||
|
profiles: ["nats"]
|
||||||
image: nats:2.14-alpine3.22
|
image: nats:2.14-alpine3.22
|
||||||
command: -js -m 8222
|
# The client port is published on every interface (agent containers reach
|
||||||
|
# it over the bridge), so it defers every login to archied. Set NATS_TOKEN
|
||||||
|
# (name it in [nats] token_env) and NATS_CALLOUT_ISSUER, the public key of
|
||||||
|
# the account nkey seed named in [nats] callout_issuer_seed_env.
|
||||||
|
command: ["-c", "/etc/nats/nats.conf"]
|
||||||
|
environment:
|
||||||
|
- NATS_TOKEN
|
||||||
|
- NATS_CALLOUT_ISSUER
|
||||||
ports:
|
ports:
|
||||||
- "4222:4222" # client
|
- "4222:4222" # client
|
||||||
- "8222:8222" # monitoring (http://localhost:8222)
|
- "127.0.0.1:8222:8222" # monitoring (http://localhost:8222)
|
||||||
volumes:
|
volumes:
|
||||||
- nats_data:/data
|
- nats_data:/data
|
||||||
|
- ./deployments/nats-callout.conf:/etc/nats/nats.conf:ro
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
healthcheck:
|
healthcheck:
|
||||||
test: ["CMD", "wget", "-q", "-O", "-", "http://localhost:8222/healthz"]
|
test: ["CMD", "wget", "-q", "-O", "-", "http://localhost:8222/healthz"]
|
||||||
@@ -67,7 +77,7 @@ services:
|
|||||||
# "Started", which reads like a crash loop. Naming the service explicitly
|
# "Started", which reads like a crash loop. Naming the service explicitly
|
||||||
# still works without activating the profile:
|
# still works without activating the profile:
|
||||||
#
|
#
|
||||||
# docker compose build agent (also: task docker-build)
|
# docker compose build agent
|
||||||
# docker compose pull agent -- plain `pull` skips profiled services
|
# docker compose pull agent -- plain `pull` skips profiled services
|
||||||
#
|
#
|
||||||
# Routine freshness is handled by the daemon, which pulls this image per
|
# Routine freshness is handled by the daemon, which pulls this image per
|
||||||
@@ -78,10 +88,16 @@ services:
|
|||||||
build:
|
build:
|
||||||
context: .
|
context: .
|
||||||
dockerfile: Dockerfile
|
dockerfile: Dockerfile
|
||||||
# Pinned to a verified digest -- archie-agent has no published semver
|
# Stamped into the agent so the version it reports is the one the rest of
|
||||||
# tag yet (CI only pushes :latest). See
|
# the install reports. `task image:agent` passes this checkout's version;
|
||||||
# deployments/systemd-user-service.md#pinning-the-archie-agent-image.
|
# a bare `docker build` passes nothing and the agent answers dev.
|
||||||
image: ghcr.io/samcharles93/archie-agent@sha256:870f1b1357979cfea23fccacb24166ebeb9ab321708ef2c2b218a763ed99b090
|
args:
|
||||||
|
RUNTIME_VERSION: ${RUNTIME_VERSION:-dev}
|
||||||
|
# A tag, not the digest: Compose refuses to build an image it is told to
|
||||||
|
# name by digest. The digest a task container actually runs is pinned in
|
||||||
|
# the daemon's own [containers] image, so nothing here decides it. See
|
||||||
|
# deployments/systemd-user-service.md#6-pinning-the-archie-agent-image.
|
||||||
|
image: git.catlow.cloud/sam/archie-agent:latest
|
||||||
|
|
||||||
# ── example agent profile image ─────────────────────────────────────
|
# ── example agent profile image ─────────────────────────────────────
|
||||||
# The agent image plus network lookup tools, for a workflow that names
|
# The agent image plus network lookup tools, for a workflow that names
|
||||||
|
|||||||
@@ -0,0 +1,54 @@
|
|||||||
|
# Enterprise Compliance Control Mapping
|
||||||
|
|
||||||
|
Archie enforces preventive, detective, and corrective controls in code and deployment files. This guide maps each control to its source code, deployment files, `go test -short` tests, and compliance frameworks. It covers SOC 2 (CC6, CC7, CC8), ISO/IEC 27001:2022, SOX ITGC, and APRA CPS 234.
|
||||||
|
|
||||||
|
## Control Matrix
|
||||||
|
|
||||||
|
| Control area | Archie code | Deployment files | Automated test proof | Framework mapping |
|
||||||
|
| --- | --- | --- | --- | --- |
|
||||||
|
| Database role split | `pg.Migrate` (`owner_url`) vs DML-only `url` checked by `pg.VerifySchema` (`internal/platform/pg/pg.go`) | `job-migrate.yaml` mounts `owner_url`; `statefulset.yaml` and `compose.enterprise.yml` omit `owner_url` | `TestMissingMigrations` (`internal/platform/pg/pg_test.go`), `TestLoadMigrateConfigRequiresOnlyDatabaseRoles` (`internal/app/archie/config_test.go`) | SOC 2 CC6.1, CC6.3; ISO 27001 A.5.15, A.8.2; SOX ITGC Access; CPS 234 (15-17) |
|
||||||
|
| API and setup gate | Cedar policy checks on every route (`internal/app/archie/api.go`, `modules/governance/access.go`) and closed gate (`internal/app/archie/gate.go`) | Split internal vs perimeter ingress (`ingress.yaml`) | `TestEveryOperationIsAuthorized`, `TestUnwiredAuthorizerRefuses` (`internal/app/archie/access_test.go`), `TestClosedGateServesOnlySetup`, `TestGateIsNotBypassedByPathTricks` (`internal/app/archie/gate_test.go`), `TestEnforcementFailsClosedAndRecordsDecisions` (`modules/governance/enforce_test.go`) | SOC 2 CC6.1, CC6.2; ISO 27001 A.5.15, A.8.3; SOX ITGC Access; CPS 234 (15-18) |
|
||||||
|
| Identity and SSO | Confidential OIDC, role mapping, SSO-only mode, session limits, and back-channel logout (`modules/governance/oidc.go`, `identity.go`) | Headless `archie bootstrap` (`job-bootstrap.yaml`, `internal/app/archie/bootstrap.go`) | `TestAuthenticateRequest` (`modules/governance/auth_test.go`), `TestAuthenticationSettingsRejectUntrustedOrigins`, `TestPasswordVerification` (`modules/governance/identity_test.go`), `TestLoadBootstrapSpecAndEnvFiles` (`internal/app/archie/bootstrap_test.go`) | SOC 2 CC6.1, CC6.2; ISO 27001 A.5.17, A.8.5; SOX ITGC Access; CPS 234 (15-17) |
|
||||||
|
| Four-eyes SoD and step-up | Cedar judgement (`modules/judgement/`), passkey checks (`modules/approvals/`), and SoD rule blocking self-approval | Stage-local autonomy caps; prod approval gates | `TestDashboardAnswerComesFromAnAccountWhoseRoleMayApprove`, `TestIrreversibleActionsNeedFreshAuthentication` (`modules/approvals/dashboard_test.go`), `TestExecuteApprovedRunsOnlyWhatThePersonSaw` (`modules/judgement/judgement_test.go`), `TestChatProhibitsPrivilegedActions` (`modules/judgement/chat_test.go`) | SOC 2 CC6.3, CC8.1; ISO 27001 A.5.3; SOX ITGC Changes; CPS 234 (16-18) |
|
||||||
|
| Keys and secrets | Label-bound `age` X25519 sealing (`internal/platform/seal/seal.go`), `*_FILE` loading (`config.go`), `archie rekey`, and log redaction (`auditjson/`) | `*_FILE` mounts in `statefulset.yaml` and `compose.enterprise.yml`; `externalsecret.example.yaml` | `TestSealedValueOpensOnlyWhereItBelongs` (`internal/platform/seal/seal_test.go`), `TestCredentialRoutesNeverReturnASecret`, `TestBearerTokenByIDRespectsScope` (`modules/connectors/credentials_test.go`), `TestStoredPayloadKeepsCredentialsOut` (`internal/platform/auditjson/auditjson_test.go`), `TestLoadConfigRuntimeAndEnvFiles` (`internal/app/archie/config_test.go`) | SOC 2 CC6.1, CC6.7; ISO 27001 A.8.24; SOX ITGC Access; CPS 234 (15-20) |
|
||||||
|
| Pod and extension isolation | `RemoteGRPCRuntime` over mTLS (`modules/connectors/internal/host/remote.go`) and `LocalNamespaceRuntime` with egress tunnel (`egress/tunnel.go`) | `restricted` PSS in `statefulset.yaml`; `seccomp.json` in `compose.enterprise.yml`; `networkpolicy.yaml` | `TestRemoteGRPCRequiresMTLSAndEnforcesTrust` (`modules/connectors/internal/host/remote_test.go`), `TestCommandConfinesOnlyWithEgress`, `TestNamespaceLimitRefusesDisabledNamespaces` (`modules/connectors/internal/host/host_test.go`), `TestTunnelEnforcesAllowListBeforeCorporateProxy` (`modules/connectors/internal/egress/tunnel_test.go`) | SOC 2 CC6.6, CC6.7; ISO 27001 A.8.20, A.8.22; SOX ITGC Ops; CPS 234 (16-18) |
|
||||||
|
| Supply chain and webhooks | Ed25519-signed catalogues with SHA-256 checks (`catalogue/`) and pre-parse HMAC checks (`modules/events/verify.go`) | Digest-pinned images (`values-prod.yaml`); `[catalogue]` mirror; perimeter `/hooks/` ingress | `TestFetchRefusesAnArtifactWhoseDigestDoesNotMatch`, `TestAcceptRefusesGrantsTheExtensionNeverDeclared`, `TestVerifyRefusesAForgedOrMalformedCatalogue` (`modules/connectors/internal/catalogue/catalogue_test.go`), `TestReadOCIChecksSignatureAndPackagePin` (`oci_test.go`), `TestHMACSourceVerifiesBeforeParsing` (`modules/events/verify_test.go`) | SOC 2 CC7.1, CC8.1; ISO 27001 A.8.25, A.8.28; SOX ITGC Changes; CPS 234 (21-22) |
|
||||||
|
| Audit, tracing, and changes | Append-only `audit.events` (`SELECT`, `INSERT`), stdout JSON audit logs, OTel trace IDs, `archie bundle`, and change windows | `servicemonitor.yaml`; SIEM log shipping; `values-{dev,staging,prod}.yaml` | `TestEveryDecisionIsRecorded`, `TestAllowedDecisionNeedsItsRecord` (`modules/governance/decisions_test.go`), `TestReadAuditRoleBoundary` (`modules/governance/access_test.go`), `TestTimingHoldsChangingActionsOutsideTheSchedule` (`modules/governance/timing_test.go`), `TestAutonomyIsEarnedSlowlyAndLostAtOnce` (`modules/judgement/autonomy_test.go`) | SOC 2 CC7.2, CC7.3, CC8.1; ISO 27001 A.8.15, A.8.32; SOX ITGC Changes, Ops; CPS 234 (23-28) |
|
||||||
|
| Availability and deletion record | `/healthz`, `/startupz`, `/readyz` (`health/health.go`), `ClaimServe` lock (`pg/pg.go`), and deletion ledger (`deletions/deletions.go`) | RWO PVC in `statefulset.yaml`; `poddisruptionbudget.yaml`; `dr-and-backup.md` drill | `TestProbesSeparateStartupFromReadiness` (`internal/platform/health/health_test.go`), `TestLogRecordsEachDeletion` (`internal/platform/deletions/deletions_test.go`), `TestForgetCommitsThenRecords`, `TestReapplyDeletionsAppliesEveryRecordedNote` (`modules/memory/notes_test.go`) | SOC 2 CC7.4, A1.2; ISO 27001 A.5.30; SOX ITGC Ops; CPS 234 (19, 25) |
|
||||||
|
|
||||||
|
## Framework Alignment Summary
|
||||||
|
|
||||||
|
### SOC 2 (CC6, CC7, CC8)
|
||||||
|
|
||||||
|
- **CC6 (Access Controls):** Archie enforces OIDC SSO, Cedar checks on every route (`TestEveryOperationIsAuthorized`), DML-only database roles, `age` sealing, and default-deny `NetworkPolicy`.
|
||||||
|
- **CC7 (System Operations):** Archie checks webhook HMACs before parsing (`TestHMACSourceVerifiesBeforeParsing`), runs as UID `65532` with a read-only root filesystem, and exposes `/healthz`, `/startupz`, `/readyz`, stdout JSON audit logs, and `/metrics`.
|
||||||
|
- **CC8 (Change Management):** Archie splits `archie migrate` from serving pods, signs extension catalogues, promotes stages with `archie bundle`, checks change windows (`TestTimingHoldsChangingActionsOutsideTheSchedule`), and enforces SoD on approvals.
|
||||||
|
|
||||||
|
### ISO/IEC 27001:2022
|
||||||
|
|
||||||
|
- **Access Rights (A.5.15, A.5.17, A.8.2, A.8.5):** Separate `archie_owner` and `archie_app` roles limit schema rights. OIDC role mapping, SSO-only mode, and passkey checks gate high-risk actions.
|
||||||
|
- **Crypto and Networks (A.8.20, A.8.22, A.8.24):** Deployments use PostgreSQL `sslmode=verify-full`, TLS 1.3 mTLS for remote gRPC extensions, `age` keys with backup recipients, and `HTTPS_PROXY` allow-lists.
|
||||||
|
- **Logs, Supply Chain, and Continuity (A.8.15, A.8.25, A.8.32, A.5.30):** Append-only audit logs, Ed25519-signed catalogues, `task check` (`golangci-lint`, `gosec`, `go test -short`), and quarterly DR drills cover daily operations.
|
||||||
|
|
||||||
|
### SOX ITGC
|
||||||
|
|
||||||
|
- **Access to Programs and Data:** Only `archie migrate` holds DDL rights. Runtime pods cannot change schemas, edit audit rows, or return secrets (`TestCredentialRoutesNeverReturnASecret`).
|
||||||
|
- **Program Changes:** Stages stay isolated across `dev`, `staging`, and `prod`. Digest-pinned OCI images, `archie bundle diff` and `apply`, and four-eyes SoD gate all changes.
|
||||||
|
- **Computer Operations:** `ClaimServe` blocks serving pods during database restores. `shutdown_grace` drains active runs cleanly. `memory.ReapplyDeletions` keeps deleted notes removed after a snapshot restore.
|
||||||
|
|
||||||
|
### APRA CPS 234
|
||||||
|
|
||||||
|
- **Asset Controls and Testing (Paragraphs 15-22):** Controls scale with impact via Cedar guards, extension trust ceilings (`TestGuardExtensionsDecideAtTheLowestCeiling`), mTLS checks, and automated `task check` suites.
|
||||||
|
- **Detection and Recovery (Paragraphs 23-28):** Pre-parse webhook checks, stdout JSON audit streams to SIEM/WORM storage, OpenTelemetry trace IDs, and quarterly DR drills provide full audit trails.
|
||||||
|
|
||||||
|
## Continuous Gate
|
||||||
|
|
||||||
|
Run the repository gate, Helm lint, and prose checks before each release and audit:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
task check
|
||||||
|
helm lint deployments/helm/archie -f deployments/helm/archie/values-prod.yaml
|
||||||
|
vale docs/enterprise/*.md
|
||||||
|
```
|
||||||
|
|
||||||
|
`task check` runs `go test -short ./...`, `golangci-lint` (including `gosec`), and generated schema and OpenAPI checks.
|
||||||
@@ -0,0 +1,99 @@
|
|||||||
|
# Enterprise Deployment Architecture
|
||||||
|
|
||||||
|
Archie runs as a single static binary (`cmd/archie`) backed by PostgreSQL. Regulated deployments isolate each stage, separate DDL from DML credentials, split external webhook ingress from internal operator access, and enforce strict pod or container boundaries.
|
||||||
|
|
||||||
|
## Multi-Stage Isolation Zones
|
||||||
|
|
||||||
|
Deploy Archie into three independent stages: `dev`, `staging`, and `prod`. Each stage runs its own Archie instance and shares no runtime state with any other stage.
|
||||||
|
|
||||||
|
| Resource | `dev` | `staging` | `prod` |
|
||||||
|
| --- | --- | --- | --- |
|
||||||
|
| Kubernetes namespace or host | `archie-dev` | `archie-staging` | `archie-prod` |
|
||||||
|
| PostgreSQL database | Isolated dev instance | Isolated staging instance | Managed HA PostgreSQL (`sslmode=verify-full`) |
|
||||||
|
| `age` sealing key | Stage-local `age_identity` | Stage-local `age_identity` | Stage-local `age_identity` with offline `age_backup_recipients` |
|
||||||
|
| OIDC client | Non-prod IdP client | Staging IdP client | Production IdP confidential client |
|
||||||
|
| Earned autonomy | Local to `dev` | Local to `staging` | Built independently in `prod` |
|
||||||
|
| Helm overlay | `values-dev.yaml` | `values-staging.yaml` | `values-prod.yaml` |
|
||||||
|
|
||||||
|
Earned autonomy in `staging` never promotes to `prod`. Promote declarative configuration (workflows, Cedar policies, judgement rules, and action-type metadata) with `archie bundle`. Keep credentials, OIDC bindings, target hosts, and autonomy counters local to each stage.
|
||||||
|
|
||||||
|
Pin container images by immutable SHA-256 digest (`image.digest` in Helm) and verify cosign signatures before deploying to `staging` and `prod`. Set `[catalogue]` `disable_auto_update = true` and mirror signed extension catalogues internally in air-gapped stages.
|
||||||
|
|
||||||
|
### Stage Promotion Models
|
||||||
|
|
||||||
|
Choose one of two promotion workflows depending on your delivery pipeline:
|
||||||
|
|
||||||
|
1. **Push CI/CD (GitHub Actions, GitLab CI, or Jenkins):**
|
||||||
|
- On pull requests, run `archie bundle validate` offline to check workflow YAML, Cedar policy syntax, judgement rules, and stage `Bindings` without database access.
|
||||||
|
- Export the tested bundle from `staging` and record its canonical SHA-256 digest (`Bundle.Digest()`).
|
||||||
|
- After manual change approval, the `prod` pipeline runs `archie bundle apply --expect-digest <sha256>` over HTTPS using `ARCHIE_URL` and `ARCHIE_TOKEN_FILE`. The CI runner never touches PostgreSQL directly.
|
||||||
|
2. **Pull GitOps (Argo CD or Flux):**
|
||||||
|
- Store the stage Helm values (`values-staging.yaml`, `values-prod.yaml`), `bundle.yaml`, and stage-local `bindings.yaml` in Git.
|
||||||
|
- Enable `bundleSync.enabled: true` in `deployments/helm/archie` to run `templates/job-bundle-sync.yaml` as an Argo CD `PostSync` or Helm `post-install,post-upgrade` Job.
|
||||||
|
- The Job mounts the bundle `ConfigMap`, uses only the runtime `archie_app` database secret (`ARCHIE_DATABASE_URL_FILE`), and applies unchanged bundles idempotently with optional `expectDigest` verification.
|
||||||
|
|
||||||
|
## Split Ingress and Network Boundaries
|
||||||
|
|
||||||
|
Separate external webhook delivery from operator and administrator access using two ingress resources (`deployments/helm/archie/templates/ingress.yaml`):
|
||||||
|
|
||||||
|
1. **Perimeter webhook ingress (`ingress.perimeter`):** Expose only webhook intake paths (`/hooks/` for `cmd/archie` intake and `/webhooks/` where routed by a reverse proxy). Terminate TLS at the edge and apply rate limits. The `events` module verifies each payload's HMAC signature before parsing JSON (`modules/events/verify.go`).
|
||||||
|
2. **Internal operator ingress (`ingress.internal`):** Serve the Dashboard, `/api/`, and OIDC routes behind a corporate VPN or internal load balancer. Never expose `/api/` or the setup surface on the perimeter ingress.
|
||||||
|
|
||||||
|
Enforce default-deny `NetworkPolicy` rules (`deployments/helm/archie/templates/networkpolicy.yaml`) in `staging` and `prod`. Permit ingress only from the perimeter ingress controller (port `8080`), internal ingress controller (port `8080`), and Prometheus scraper (port `9090` on `/metrics`). Permit egress only to DNS (`53`), PostgreSQL or PgBouncer (`5432`), the OIDC issuer (`443`), configured remote extension endpoints, the corporate proxy (`HTTPS_PROXY`), and the OpenTelemetry collector (`4317`).
|
||||||
|
|
||||||
|
## Database Role Split and PgBouncer Session Pooling
|
||||||
|
|
||||||
|
Archie separates schema ownership from runtime operations across two PostgreSQL roles:
|
||||||
|
|
||||||
|
- **`archie_owner` (`ARCHIE_DATABASE_OWNER_URL_FILE`):** Holds DDL rights. Used only by `archie migrate` inside the Helm pre-install/pre-upgrade `Job` (`job-migrate.yaml`) or the Compose `archie-migrate` init service (`deployments/archie/compose.enterprise.yml`).
|
||||||
|
- **`archie_app` (`ARCHIE_DATABASE_URL_FILE`):** Holds only `USAGE` and DML privileges (`SELECT`, `INSERT`, `UPDATE`, `DELETE`, and `SELECT` on `public.goose_db_version`). The runtime `StatefulSet` and Compose `archie` service mount only this credential. At startup, `pg.VerifySchema` (`internal/platform/pg/pg.go`) checks that every embedded migration is applied and fails closed if the schema lags behind.
|
||||||
|
|
||||||
|
### PgBouncer Session-Pooling Requirement for `ClaimServe`
|
||||||
|
|
||||||
|
At boot, `cmd/archie` calls `pg.ClaimServe` (`internal/platform/pg/pg.go`). `ClaimServe` opens a dedicated connection via `db.Conn(ctx)` and acquires a shared PostgreSQL session advisory lock (`pg_try_advisory_lock_shared(hashtextextended('archie.serve.owner', 0))`). It holds that lock for the entire lifetime of the serving process. A database restore takes the same key exclusively so no serving pod can start or run during a restore window.
|
||||||
|
|
||||||
|
If you deploy PgBouncer in front of PostgreSQL, configure `pool_mode = session` for Archie's runtime pool. PgBouncer `transaction` and `statement` pooling modes share server backends across clients and release or drop session advisory locks between transactions. Direct connections to the HA PostgreSQL primary also satisfy this requirement.
|
||||||
|
|
||||||
|
## Pod Security and Extension Confinement
|
||||||
|
|
||||||
|
Extension execution differs between Kubernetes and Docker Compose because Kubernetes `restricted` Pod Security Standards forbid user namespaces.
|
||||||
|
|
||||||
|
| Control | Kubernetes (`deployments/helm/archie`) | Hardened Compose (`deployments/archie/compose.enterprise.yml`) |
|
||||||
|
| --- | --- | --- |
|
||||||
|
| User and root filesystem | `runAsNonRoot: true`, UID/GID `65532`, read-only root filesystem, `allowPrivilegeEscalation: false`, `capabilities.drop: [ALL]` | `user: "65532:65532"`, `read_only: true`, `tmpfs: /tmp`, `cap_drop: [ALL]`, `no-new-privileges:true` |
|
||||||
|
| Seccomp profile | `seccompProfile.type: RuntimeDefault` | `deployments/archie/seccomp.json` (Docker default plus `clone` for namespaces) |
|
||||||
|
| Extension runtime | `RemoteGRPCRuntime` over mTLS or Unix socket (`require_remote = true`) | `LocalNamespaceRuntime` (`CLONE_NEWUSER` and `CLONE_NEWNET`) |
|
||||||
|
| Egress proxy and PKI | `HTTPS_PROXY`, `NO_PROXY`, and `SSL_CERT_FILE` propagated to runtime and `NetworkPolicy` | `HTTPS_PROXY`, `NO_PROXY`, and `SSL_CERT_FILE` propagated into confined namespaces |
|
||||||
|
|
||||||
|
In Kubernetes, run extensions as separate Pods or sidecars under `restricted` Pod Security Standards and isolate them with `NetworkPolicy`. Configure `[extensions]` in `config.toml` (`templates/configmap.yaml`) with `require_remote = true`, TLS 1.3 mTLS certificates (`ca_file`, `cert_file`, `key_file`), and explicit `[extensions.remote.<name>]` targets. If neither `RemoteGRPCRuntime` nor `LocalNamespaceRuntime` is available, `modules/connectors/internal/host/remote.go` fails closed.
|
||||||
|
|
||||||
|
In Docker Compose and VM hosts, `LocalNamespaceRuntime` confines each extension binary in its own user and network namespace behind an allow-list forward proxy (`modules/connectors/internal/egress/tunnel.go`). The tunnel enforces Archie's host allow-list and loopback checks before chaining allowed traffic through `HTTPS_PROXY`.
|
||||||
|
|
||||||
|
### OpenShift `restricted-v2` SCC
|
||||||
|
|
||||||
|
OpenShift's default `restricted-v2` security context rejects pinned `runAsUser`, `runAsGroup`, and `fsGroup` values because it assigns UIDs per namespace. Add [values-openshift.yaml](../../deployments/helm/archie/values-openshift.yaml) alongside `values-prod.yaml` to omit those numeric IDs while keeping `runAsNonRoot: true`, `allowPrivilegeEscalation: false`, and a read-only root filesystem.
|
||||||
|
|
||||||
|
## Private OCI and Air-Gapped Catalogues
|
||||||
|
|
||||||
|
Private OCI registries authenticate through `[catalogue]` in `config.toml` or container environment variables:
|
||||||
|
|
||||||
|
- **Docker config file:** Set `catalogue.auth_file` (`ARCHIE_CATALOGUE_AUTH_FILE`) or set `config.catalogue.authSecret` in Helm to mount a registry `config.json` Secret.
|
||||||
|
- **Direct credentials:** Set `catalogue.username` and `catalogue.password` via `ARCHIE_CATALOGUE_USERNAME` and `ARCHIE_CATALOGUE_PASSWORD_FILE`.
|
||||||
|
|
||||||
|
In air-gapped stages, mirror a verified catalogue to local storage and re-sign it with an internal Ed25519 key:
|
||||||
|
|
||||||
|
1. Generate an internal signing keypair with `archie catalogue keygen`.
|
||||||
|
2. Download, verify, and re-sign the catalogue and binaries with `archie catalogue mirror -to /var/lib/archie/mirror -sign-key-file /etc/archie/mirror.key`.
|
||||||
|
3. Transfer the mirror directory into the isolated environment and point `[catalogue]` `location` and `public_key` at the mirrored `catalogue.json` and internal public key.
|
||||||
|
|
||||||
|
## Probes, Graceful Drain, and High Availability
|
||||||
|
|
||||||
|
`cmd/archie` exposes three health endpoints (`internal/platform/health/health.go`):
|
||||||
|
|
||||||
|
- `/healthz`: Liveness probe. Returns `200` while the HTTP server process is alive.
|
||||||
|
- `/startupz`: Startup probe. Verifies database connectivity and confirms the deletion ledger is consistent before Kubernetes routes traffic or triggers liveness checks.
|
||||||
|
- `/readyz`: Readiness probe. Requires `/startupz` checks plus completion of owner setup (`gate.go`), and returns `503` as soon as `SIGTERM` begins draining.
|
||||||
|
|
||||||
|
Set `terminationGracePeriodSeconds` (`45` seconds in `values-prod.yaml`) higher than `shutdown_grace` (`30s`) so in-flight HTTP requests and run checkpoints finish before `SIGKILL`.
|
||||||
|
|
||||||
|
Enterprise v1 runs Active-Passive HA with `replicaCount: 1` on a `StatefulSet` backed by a `ReadWriteOnce` PVC for `state_dir`. Never scale `replicaCount` above `1` in v1 without shared `state_dir` storage and v2 Active-Active coordination (`LISTEN/NOTIFY` hub, lease election, and object-lock deletion ledger).
|
||||||
@@ -0,0 +1,65 @@
|
|||||||
|
# Disaster Recovery and Backup Runbook
|
||||||
|
|
||||||
|
Archie keeps durable state across three separate stores: PostgreSQL, the `age` sealing keys, and the external deletion ledger (`deletions.jsonl`). Back up and protect each store independently. Restoring PostgreSQL alone is never enough if `age` keys or the deletion ledger are lost.
|
||||||
|
|
||||||
|
## Recovery Objectives
|
||||||
|
|
||||||
|
| Store | What it holds | RPO target | RTO target | Backup mechanism |
|
||||||
|
| --- | --- | --- | --- | --- |
|
||||||
|
| PostgreSQL (`archie` database) | Workflows, runs, approvals, events, governance, sealed credentials, audit events | 5 minutes or less | 30 minutes | Automated base snapshots plus continuous WAL archiving (PITR) |
|
||||||
|
| `age` recovery keys (`age_backup_recipients`) | Ability to open sealed connector credentials and event HMAC secrets | Zero key loss | Immediate on restore | Offline escrow in enterprise secret manager or HSM vault |
|
||||||
|
| Deletion ledger (`state_dir/deletions.jsonl`) | Append-only record of deleted memory notes | Zero acknowledged deletion loss | 15 minutes | Independent PVC or host volume snapshots replicated off-cluster |
|
||||||
|
|
||||||
|
## Independent Backup Strategy
|
||||||
|
|
||||||
|
### 1. PostgreSQL Database
|
||||||
|
|
||||||
|
Back up the PostgreSQL cluster using continuous WAL archiving and scheduled base backups so you can restore to a point in time.
|
||||||
|
|
||||||
|
- Back up as the `postgres` or `archie_owner` administrative role, not `archie_app`.
|
||||||
|
- Include the `public.goose_db_version` table and every Archie module schema (`runs`, `connectors`, `events`, `governance`, `deliveries`, `judgement`, `approvals`, `memory`, `alerts`, `proposals`, `chat`, and `audit`).
|
||||||
|
- Exclude `state_dir` and `age` private keys from database backup media so a database dump alone cannot decrypt stored credentials.
|
||||||
|
|
||||||
|
### 2. `age` Sealing Keys and Key Rotation
|
||||||
|
|
||||||
|
`internal/platform/seal/seal.go` seals connector credentials (`connectors.credentials`) and webhook secrets (`events.sources.hmac_secret_sealed`) with `age` X25519 keys bound to record labels. If the active `age_identity` and all `age_backup_recipients` are lost, every sealed secret in the database is unrecoverable.
|
||||||
|
|
||||||
|
Protect sealing keys with two controls:
|
||||||
|
|
||||||
|
1. **Configure offline backup recipients:** Generate a recovery `age` keypair in your enterprise vault (`archie -new-age-identity` or `age-keygen`) and list its public `age1...` string under `age_backup_recipients` in `config.toml`. Keep the matching `AGE-SECRET-KEY-1...` offline in your secret manager.
|
||||||
|
2. **Rotate keys with `archie rekey`:** Rotate compromised or expiring `age` identities atomically using `archie rekey`. The command takes a PostgreSQL advisory lock (`archie.rekey.owner`). It opens every sealed credential and webhook secret with the old identity, re-seals and checks decryption with the new identity in one transaction, and writes a JSON audit log.
|
||||||
|
|
||||||
|
Never delete the old identity from your vault until the post-rotation database backup completes.
|
||||||
|
|
||||||
|
### 3. External Deletion Ledger (`deletions.jsonl`)
|
||||||
|
|
||||||
|
When a user deletes a memory note, `modules/memory` commits the deletion in PostgreSQL and appends an `Entry` (`table`, `org_id`, `id`, `at`) to `deletions.jsonl` inside `state_dir` (`internal/platform/deletions/deletions.go`). Each append uses `flock` and `fsync` on both the file and parent directories so the record outlives the database.
|
||||||
|
|
||||||
|
Keep `state_dir` on an independent `ReadWriteOnce` persistent volume (or dedicated host volume in Compose) and snapshot it separately from PostgreSQL. Never restore `state_dir` from a snapshot older than the database snapshot you are restoring. If `deletions.jsonl` is lost on an instance that previously recorded deletions, `memory.ReapplyDeletions` returns `deletions.ErrUnsafeRollback` and stops startup rather than exposing deleted notes.
|
||||||
|
|
||||||
|
## Restore Procedure
|
||||||
|
|
||||||
|
Follow these steps to recover a stage from backup:
|
||||||
|
|
||||||
|
1. **Stop active Archie pods or containers:** Scale the `StatefulSet` to `0` (`kubectl scale statefulset archie --replicas=0`) or run `docker compose stop archie`.
|
||||||
|
2. **Acquire the exclusive serve lock:** If restoring onto an active PostgreSQL instance, hold `pg_advisory_lock(hashtextextended('archie.serve.owner', 0))` in your restore session so no stray Archie process can pass `pg.ClaimServe` before recovery finishes.
|
||||||
|
3. **Restore PostgreSQL:** Restore the base snapshot and replay WAL logs to the target recovery timestamp. Verify `public.goose_db_version` is intact.
|
||||||
|
4. **Restore or preserve `state_dir`:** Keep the existing `state_dir` volume containing the latest `deletions.jsonl`, or restore the newest `state_dir` backup taken at or after the database restore timestamp.
|
||||||
|
5. **Restore `age` key material:** Ensure `ARCHIE_AGE_IDENTITY_FILE` mounts a valid `age_identity` (or the backup identity stored in your vault if the primary key was lost). If you recover with the backup identity, run `archie rekey` right after startup to rotate to a new runtime key.
|
||||||
|
6. **Run migrations and start Archie:** Run the `archie migrate` Job if the restored snapshot precedes the deployed binary schema version, then scale the `StatefulSet` back to `1`.
|
||||||
|
7. **Verify reconciliation and readiness:** Watch stdout JSON logs for `applied the record of deletions` (`memory.ReapplyDeletions`) and confirm `/startupz` and `/readyz` return `200`.
|
||||||
|
|
||||||
|
## Restore Verification Drill
|
||||||
|
|
||||||
|
Run this drill in `staging` each quarter and after any backup architecture change. Record the completion timestamp, operator, and measured RTO in your compliance log.
|
||||||
|
|
||||||
|
1. Sign in to the `staging` instance and create a test memory note. Record its note ID and confirm it appears in `GET /api/memory/notes`.
|
||||||
|
2. Take an on-demand PostgreSQL snapshot (`pre-deletion snapshot`).
|
||||||
|
3. Delete the test memory note through the UI or API. Verify `state_dir/deletions.jsonl` contains a new JSON line matching the deleted note ID.
|
||||||
|
4. Scale the `staging` Archie `StatefulSet` to `0`.
|
||||||
|
5. Restore the `staging` PostgreSQL database to the `pre-deletion snapshot` taken in step 2. Leave `state_dir` untouched.
|
||||||
|
6. Verify the deleted note row is temporarily present again in PostgreSQL before Archie starts.
|
||||||
|
7. Scale the `staging` Archie `StatefulSet` back to `1`.
|
||||||
|
8. Check pod logs for `applied the record of deletions` and wait for `/readyz` to return `200`.
|
||||||
|
9. Query `GET /api/memory/notes` and PostgreSQL to confirm the test note remains deleted.
|
||||||
|
10. Verify credential decryption works using the backup `age` recipient key (or perform a test `archie rekey` rotation and confirm an existing connector still passes health checks).
|
||||||
Loaded 100 of 2246 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user