Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
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 | ||
|
|
30419532ba | ||
|
|
fff67838e0 | ||
|
|
15ebe24927 | ||
|
|
b2c1629925 |
No files matched your search
@@ -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/
|
||||
dist/
|
||||
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: ui/node_modules alone is 200MB and the
|
||||
# agent image compiles Go, which needs none of it.
|
||||
**/node_modules/
|
||||
|
||||
# Stray host-built binaries committed at the repo root.
|
||||
/archied
|
||||
|
||||
@@ -0,0 +1,61 @@
|
||||
# Every 15 minutes, checks how the release installed on the canary host is
|
||||
# running, judged over the window counted from its install (-window, default
|
||||
# 24h; CANARY_WINDOW overrides it). If a hard check fails, the canary goes
|
||||
# back to the stable release straight away. If the release stays healthy for
|
||||
# the window, it's promoted to stable. A rollback fails the run, so it shows
|
||||
# up red.
|
||||
name: canary
|
||||
|
||||
on:
|
||||
schedule:
|
||||
- cron: "*/15 * * * *"
|
||||
workflow_dispatch:
|
||||
|
||||
concurrency:
|
||||
group: canary
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
packages: write
|
||||
|
||||
jobs:
|
||||
judge:
|
||||
if: vars.CANARY_URL != ''
|
||||
runs-on: self-hosted
|
||||
steps:
|
||||
# Full history with tags: a rollback compares the migrations between
|
||||
# the stable and failed release tags.
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
ref: main
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Set up Go
|
||||
uses: actions/setup-go@v5
|
||||
with:
|
||||
go-version-file: go.mod
|
||||
# The self-hosted runner keeps the Go caches on disk between jobs, and
|
||||
# archiving them for the Actions cache takes minutes.
|
||||
cache: false
|
||||
|
||||
- name: Build archied
|
||||
# The check never serves the dashboard, so the build leaves it out.
|
||||
run: go build -tags no_ui -o "$RUNNER_TEMP/archied" ./cmd/archied
|
||||
|
||||
# Promotion retags stable and the images' latest in the registry.
|
||||
- name: Log in to the Gitea registry
|
||||
run: echo "${{ secrets.DEPLOY_TOKEN }}" | docker login git.catlow.cloud -u "${{ github.actor }}" --password-stdin
|
||||
|
||||
- name: Judge the canary
|
||||
env:
|
||||
ARCHIE_CANARY_TOKEN: ${{ secrets.CANARY_TOKEN }}
|
||||
CANARY_WINDOW: ${{ vars.CANARY_WINDOW }}
|
||||
run: |
|
||||
window_args=()
|
||||
if [ -n "$CANARY_WINDOW" ]; then
|
||||
window_args=(-window "$CANARY_WINDOW")
|
||||
fi
|
||||
"$RUNNER_TEMP/archied" release canary check -dashboard "${{ vars.CANARY_URL }}" \
|
||||
"${window_args[@]}" \
|
||||
-latest git.catlow.cloud/sam/archied,git.catlow.cloud/sam/archie-agent
|
||||
+147
-156
@@ -1,12 +1,13 @@
|
||||
# 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.
|
||||
# Builds and pushes the archied and archie-agent images to the Gitea
|
||||
# registry on every merge to main, and publishes the distribution zip as a
|
||||
# release on this repository. Gitea Actions reads this .github/workflows/
|
||||
# directory.
|
||||
name: deploy
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [main]
|
||||
tags: ["archied/v*", "archie/v*", "v*"]
|
||||
tags: ["v*"]
|
||||
|
||||
# Rapid successive pushes to main (a release commit right after its
|
||||
# preceding fix, say) previously queued a full gate+build for each one,
|
||||
@@ -30,7 +31,7 @@ permissions:
|
||||
|
||||
jobs:
|
||||
gate:
|
||||
runs-on: ubuntu-latest
|
||||
runs-on: self-hosted
|
||||
outputs:
|
||||
archied_version: ${{ steps.release_tag.outputs.archied_version }}
|
||||
steps:
|
||||
@@ -46,7 +47,7 @@ jobs:
|
||||
- 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)"
|
||||
version="$(git tag --points-at HEAD --list 'v*' | sed -e 's|^v||' | sort -V | tail -1)"
|
||||
echo "archied_version=$version" >> "$GITHUB_OUTPUT"
|
||||
if [ -n "$version" ]; then
|
||||
echo "archied release at HEAD: $version"
|
||||
@@ -58,6 +59,13 @@ jobs:
|
||||
uses: actions/setup-go@v5
|
||||
with:
|
||||
go-version-file: go.mod
|
||||
# The self-hosted runner keeps the Go caches on disk between jobs, and
|
||||
# archiving them for the Actions cache takes minutes.
|
||||
cache: false
|
||||
|
||||
- uses: pnpm/action-setup@v4
|
||||
with:
|
||||
package_json_file: ui/package.json
|
||||
|
||||
- name: Set up Node
|
||||
uses: actions/setup-node@v4
|
||||
@@ -66,72 +74,45 @@ jobs:
|
||||
|
||||
- name: Install quality tools
|
||||
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 github.com/go-task/task/v3/cmd/task@v3.48.0
|
||||
|
||||
- name: Install protobuf tools
|
||||
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
|
||||
run: |
|
||||
if ! git show-ref --verify --quiet refs/heads/main; then
|
||||
git branch main origin/main
|
||||
fi
|
||||
|
||||
- name: Install ripgrep
|
||||
run: sudo apt-get update && sudo apt-get install -y --no-install-recommends ripgrep
|
||||
# ripgrep and the unprivileged-userns sysctl are provisioned on the host.
|
||||
# A self-hosted runner should not need sudo, and installing a package on
|
||||
# every run is not the gate's job.
|
||||
- name: Verify unprivileged user namespaces
|
||||
run: unshare --user --map-root-user --net true
|
||||
|
||||
# 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
|
||||
# The gate's uncached `go test ./...` runs the Docker-backed tests that
|
||||
# -short skips, and those start a container from alpine:3. A fresh runner
|
||||
# has no such image, so the suite failed on "No such image: alpine:3".
|
||||
- name: Pull test container images
|
||||
run: docker pull alpine:3
|
||||
|
||||
# One definition of the gate, in the Taskfile. TEST_FLAGS is the one
|
||||
# difference: the release runs the whole suite, uncached and including
|
||||
# the Docker-backed tests -short skips. The diff after it asserts
|
||||
# `task fmt` changed nothing.
|
||||
- name: Quality gate
|
||||
run: |
|
||||
# The formatter sequence has one owner: task fmt, which drives go fix
|
||||
# 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
|
||||
task check TEST_FLAGS=-count=1
|
||||
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
|
||||
run: |
|
||||
go install golang.org/x/vuln/cmd/govulncheck@latest
|
||||
govulncheck ./...
|
||||
|
||||
# The dashboard suite runs in CI too, or it only ever runs when
|
||||
# someone remembers to; the Go steps above never touch it.
|
||||
- name: Dashboard tests
|
||||
run: |
|
||||
npm ci --prefix ui || npm install --prefix ui
|
||||
npm test --prefix ui
|
||||
|
||||
- name: Release tags must match changelogs
|
||||
run: |
|
||||
set -e
|
||||
@@ -146,33 +127,21 @@ jobs:
|
||||
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>"
|
||||
echo "describe that version. Cut releases with the release workflow."
|
||||
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."
|
||||
if ! git tag --points-at HEAD | grep -qE '^v[0-9]' ; then
|
||||
echo "This commit isn't a release, so the images are published as :edge and sha-<sha>; :latest keeps naming the newest promoted release."
|
||||
fi
|
||||
|
||||
archied-image:
|
||||
needs: gate
|
||||
runs-on: ubuntu-latest
|
||||
runs-on: self-hosted
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
@@ -180,11 +149,8 @@ jobs:
|
||||
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.
|
||||
# and every release tag in this repo is annotated, so it names a tag object
|
||||
# that cannot be checked out. Dereference it to the commit.
|
||||
- name: Resolve the commit this ref points at
|
||||
id: commit
|
||||
run: |
|
||||
@@ -195,22 +161,16 @@ jobs:
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v3
|
||||
|
||||
- name: Log in to GHCR
|
||||
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u "${{ github.actor }}" --password-stdin
|
||||
- name: Log in to the Gitea registry
|
||||
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.
|
||||
# One release stream: a `v*` tag names both components' versions.
|
||||
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}"
|
||||
GATEWAY_VERSION="${RELEASE_TAG#v}"
|
||||
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
|
||||
@@ -220,32 +180,24 @@ jobs:
|
||||
# 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).
|
||||
# :latest names the newest PROMOTED release, so a release publishes
|
||||
# :v<version> and canary promotion moves :latest to it. A push to
|
||||
# main publishes :edge (mutable, newest main) and sha-<sha>
|
||||
# (immutable), so an ordinary commit never overwrites a release's
|
||||
# stamping.
|
||||
#
|
||||
# `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"
|
||||
echo "git.catlow.cloud/sam/archied:$RELEASE_TAG"
|
||||
fi
|
||||
echo "ghcr.io/samcharles93/archied:edge"
|
||||
echo "ghcr.io/samcharles93/archied:sha-${{ steps.commit.outputs.sha }}"
|
||||
echo "git.catlow.cloud/sam/archied:edge"
|
||||
echo "git.catlow.cloud/sam/archied:sha-${{ steps.commit.outputs.sha }}"
|
||||
echo "EOF"
|
||||
} >> "$GITHUB_OUTPUT"
|
||||
|
||||
@@ -267,7 +219,7 @@ jobs:
|
||||
outputs:
|
||||
agent_digest: ${{ steps.agent.outputs.digest }}
|
||||
needs: gate
|
||||
runs-on: ubuntu-latest
|
||||
runs-on: self-hosted
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
@@ -285,31 +237,28 @@ jobs:
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v3
|
||||
|
||||
- name: Log in to GHCR
|
||||
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u "${{ github.actor }}" --password-stdin
|
||||
- name: Log in to the Gitea registry
|
||||
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"
|
||||
RUNTIME_VERSION="${RELEASE_TAG#v}"
|
||||
echo "release_tag=$RELEASE_TAG" >> "$GITHUB_OUTPUT"
|
||||
echo "runtime=$RUNTIME_VERSION" >> "$GITHUB_OUTPUT"
|
||||
|
||||
- name: Build and push archie-agent
|
||||
id: agent
|
||||
if: steps.versions.outputs.runtime_tag != '' || steps.versions.outputs.release_tag != ''
|
||||
if: steps.versions.outputs.release_tag != ''
|
||||
uses: docker/build-push-action@v6
|
||||
with:
|
||||
context: .
|
||||
file: Dockerfile
|
||||
push: true
|
||||
tags: |
|
||||
ghcr.io/samcharles93/archie-agent:latest
|
||||
ghcr.io/samcharles93/archie-agent:sha-${{ steps.commit.outputs.sha }}
|
||||
git.catlow.cloud/sam/archie-agent:${{ steps.versions.outputs.release_tag }}
|
||||
git.catlow.cloud/sam/archie-agent:sha-${{ steps.commit.outputs.sha }}
|
||||
build-args: |
|
||||
RUNTIME_VERSION=${{ steps.versions.outputs.runtime }}
|
||||
cache-from: type=gha,scope=archie-agent
|
||||
@@ -318,8 +267,10 @@ jobs:
|
||||
# Packages every host-run binary (archied, archie-gateway,
|
||||
# archie-state-store, archie-ui, archie-messaging) as a
|
||||
# linux/amd64 zip for a
|
||||
# non-Docker install. It waits only for the agent image, whose digest
|
||||
# release.json pins; archie-agent itself never ships as a host binary.
|
||||
# non-Docker install, plus archie-agent: it has no unit, but a Kit run
|
||||
# mounts it from archied's directory, so a host without it parks them.
|
||||
# It waits only for the agent image, whose digest
|
||||
# release.json pins.
|
||||
dist-zip:
|
||||
needs: [gate, agent-image]
|
||||
# Not gated on github.ref. A release is pushed as main plus both tags at
|
||||
@@ -330,11 +281,7 @@ jobs:
|
||||
# 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
|
||||
runs-on: self-hosted
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
@@ -343,6 +290,25 @@ jobs:
|
||||
uses: actions/setup-go@v5
|
||||
with:
|
||||
go-version-file: go.mod
|
||||
# The self-hosted runner keeps the Go caches on disk between jobs, and
|
||||
# archiving them for the Actions cache takes minutes.
|
||||
cache: false
|
||||
|
||||
- uses: pnpm/action-setup@v4
|
||||
with:
|
||||
package_json_file: ui/package.json
|
||||
|
||||
- name: Set up Node
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: "24"
|
||||
|
||||
# archied and archie-ui embed the dashboard.
|
||||
- name: Build the dashboard
|
||||
working-directory: ui
|
||||
run: |
|
||||
pnpm install --frozen-lockfile
|
||||
pnpm run build
|
||||
|
||||
- name: Resolve archied version
|
||||
id: version
|
||||
@@ -366,9 +332,12 @@ jobs:
|
||||
# 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 }}"
|
||||
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 }} -X github.com/samcharles93/archie-core/internal/app/agentworker.version=${{ steps.version.outputs.version }}"
|
||||
mkdir -p dist
|
||||
for cmd in $(jq -r '.required_topology.units[]' release.json); do
|
||||
# Units first, then the binaries that run beside them without one.
|
||||
# The agentworker stamp only lands in archie-agent; the linker
|
||||
# ignores -X for a symbol a binary does not import.
|
||||
for cmd in $(jq -r '.required_topology.units[], .required_topology.binaries[]?' release.json); do
|
||||
go build -ldflags "$ldflags" -o "dist/$cmd" "./cmd/$cmd"
|
||||
done
|
||||
|
||||
@@ -378,56 +347,56 @@ jobs:
|
||||
set -e
|
||||
name="archie-core-archied-v${{ steps.version.outputs.version }}-linux-amd64"
|
||||
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/"
|
||||
done
|
||||
cp deployments/INSTRUCTIONS.md CHANGELOG.md "$name/"
|
||||
cp scripts/archie-update-* "$name/"
|
||||
digest='${{ needs.agent-image.outputs.agent_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/"
|
||||
zip -r "$name.zip" "$name"
|
||||
sha256sum "$name.zip" > SHA256SUMS
|
||||
echo "name=$name" >> "$GITHUB_OUTPUT"
|
||||
|
||||
- name: Upload distribution zip
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: ${{ steps.zip.outputs.name }}
|
||||
path: |
|
||||
${{ steps.zip.outputs.name }}.zip
|
||||
SHA256SUMS
|
||||
path: ${{ steps.zip.outputs.name }}.zip
|
||||
retention-days: 90
|
||||
|
||||
# A Release is what an operator can actually download from; the
|
||||
# artifact above is reachable only from the run's page, behind an
|
||||
# Actions login, and expires after 90 days. Until this step existed the
|
||||
# zip was produced and then stranded -- the only Release on this repo
|
||||
# (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
|
||||
# Installs and updates take a release from the signed artifact in the
|
||||
# registry, so this is what publishes it: the statement signed with
|
||||
# RELEASE_SIGNING_KEY and the zip, tagged v<version> and next. stable
|
||||
# moves only when canary.yml promotes it.
|
||||
- name: Log in to the Gitea registry
|
||||
run: echo "${{ secrets.DEPLOY_TOKEN }}" | docker login git.catlow.cloud -u "${{ github.actor }}" --password-stdin
|
||||
|
||||
- name: Publish the signed release
|
||||
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"
|
||||
|
||||
# The release page carries this version's changelog section, the
|
||||
# release's own reviewed prose; the signed statement links to it.
|
||||
- name: Publish the Gitea release notes
|
||||
env:
|
||||
DEPLOY_TOKEN: ${{ secrets.DEPLOY_TOKEN }}
|
||||
run: |
|
||||
set -e
|
||||
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 }}"
|
||||
# The release body is this version's changelog section, not the whole
|
||||
# file: from its "## [x.y.z]" heading to the next "## [" heading.
|
||||
# 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)"
|
||||
awk -v hdr="## [$version]" '
|
||||
index($0, hdr) == 1 { printing = 1 }
|
||||
@@ -438,15 +407,37 @@ jobs:
|
||||
echo "no [$version] section extracted from CHANGELOG.md" >&2
|
||||
exit 1
|
||||
fi
|
||||
# Idempotent: --clobber replaces the asset and leaves the notes
|
||||
# alone, so a re-run of this job (a retried or superseded deploy)
|
||||
# cannot fail on an existing Release or duplicate the zip.
|
||||
if gh release view "$tag" >/dev/null 2>&1; then
|
||||
gh release upload "$tag" "${{ steps.zip.outputs.name }}.zip" SHA256SUMS --clobber
|
||||
else
|
||||
gh release create "$tag" \
|
||||
--title "archied v$version" \
|
||||
--notes-file "$notes" \
|
||||
"${{ steps.zip.outputs.name }}.zip" SHA256SUMS
|
||||
fi
|
||||
echo "published $tag with ${{ steps.zip.outputs.name }}.zip"
|
||||
api="https://git.catlow.cloud/api/v1"
|
||||
repo="sam/archie"
|
||||
auth="Authorization: token $DEPLOY_TOKEN"
|
||||
# Idempotent: a re-run replaces the release on the tag.
|
||||
curl -sf -X DELETE -H "$auth" "$api/repos/$repo/releases/tags/$tag" >/dev/null || true
|
||||
curl -sf -X POST -H "$auth" -H "Content-Type: application/json" \
|
||||
-d "$(jq -n --arg tag "$tag" --arg name "Archie v$version" --arg body "$(cat "$notes")" \
|
||||
'{tag_name: $tag, name: $name, body: $body, draft: false, prerelease: false}')" \
|
||||
"$api/repos/$repo/releases" >/dev/null
|
||||
echo "published release notes for $tag"
|
||||
|
||||
# The canary host follows the `next` channel. canary.yml then judges the
|
||||
# release installed on the canary and decides whether it is promoted to
|
||||
# stable or the canary is rolled back. The start is queue-safe: a release
|
||||
# published while the canary still judges a newer one is queued behind
|
||||
# it and picked up by the next check, so the running window isn't
|
||||
# restarted under a different release.
|
||||
- name: Install the release on the canary
|
||||
if: vars.CANARY_URL != ''
|
||||
env:
|
||||
ARCHIE_CANARY_TOKEN: ${{ secrets.CANARY_TOKEN }}
|
||||
run: ./dist/archied release canary start -dashboard "${{ vars.CANARY_URL }}" -version "${{ steps.version.outputs.version }}"
|
||||
|
||||
# A Gitea package belongs to its owner, not a repository, so the ones this
|
||||
# workflow publishes are linked here. Linking is per package and a no-op
|
||||
# once done, so an already linked package is not an error.
|
||||
- name: Link the packages to this repository
|
||||
env:
|
||||
DEPLOY_TOKEN: ${{ secrets.DEPLOY_TOKEN }}
|
||||
run: |
|
||||
for name in archied archie-agent archie; do
|
||||
curl -sS -o /dev/null -X POST -H "Authorization: token $DEPLOY_TOKEN" \
|
||||
"https://git.catlow.cloud/api/v1/packages/sam/container/$name/-/link/archie" || true
|
||||
done
|
||||
@@ -0,0 +1,55 @@
|
||||
# Promotes the release the canary is running right now, without waiting out
|
||||
# the judging window: the canary's signals must show no hard failure and no
|
||||
# relative breach, otherwise the run refuses and fails. Dispatch it with the
|
||||
# version the canary runs (`archied release canary status` shows it).
|
||||
name: promote
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
version:
|
||||
description: "release the canary is expected to run; must match what it runs"
|
||||
required: true
|
||||
type: string
|
||||
|
||||
concurrency:
|
||||
group: promote
|
||||
cancel-in-progress: true
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
packages: write
|
||||
|
||||
jobs:
|
||||
promote:
|
||||
if: vars.CANARY_URL != ''
|
||||
runs-on: self-hosted
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
ref: main
|
||||
|
||||
- name: Set up Go
|
||||
uses: actions/setup-go@v5
|
||||
with:
|
||||
go-version-file: go.mod
|
||||
# The self-hosted runner keeps the Go caches on disk between jobs, and
|
||||
# archiving them for the Actions cache takes minutes.
|
||||
cache: false
|
||||
|
||||
- name: Build archied
|
||||
# The promote never serves the dashboard, so the build leaves it out.
|
||||
run: go build -tags no_ui -o "$RUNNER_TEMP/archied" ./cmd/archied
|
||||
|
||||
# Promotion retags stable and the images' latest in the registry.
|
||||
- name: Log in to the Gitea registry
|
||||
run: echo "${{ secrets.DEPLOY_TOKEN }}" | docker login git.catlow.cloud -u "${{ github.actor }}" --password-stdin
|
||||
|
||||
- name: Promote the canary's release
|
||||
env:
|
||||
ARCHIE_CANARY_TOKEN: ${{ secrets.CANARY_TOKEN }}
|
||||
run: |
|
||||
"$RUNNER_TEMP/archied" release canary promote -dashboard "${{ vars.CANARY_URL }}" \
|
||||
-version "${{ inputs.version }}" \
|
||||
-latest git.catlow.cloud/sam/archied,git.catlow.cloud/sam/archie-agent
|
||||
@@ -14,60 +14,44 @@ concurrency:
|
||||
|
||||
jobs:
|
||||
check:
|
||||
runs-on: ubuntu-latest
|
||||
runs-on: archie-quality
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
# ripgrep and the unprivileged-userns sysctl are provisioned on the host.
|
||||
# A self-hosted runner should not need sudo, and installing a package on
|
||||
# every run is not the gate's job.
|
||||
- name: Verify unprivileged user namespaces
|
||||
run: unshare --user --map-root-user --net true
|
||||
|
||||
- uses: actions/setup-go@v5
|
||||
with:
|
||||
go-version-file: go.mod
|
||||
|
||||
- uses: pnpm/action-setup@v4
|
||||
with:
|
||||
package_json_file: ui/package.json
|
||||
|
||||
- uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: "24"
|
||||
cache: npm
|
||||
cache-dependency-path: ui/package-lock.json
|
||||
|
||||
- name: Install quality tools
|
||||
run: |
|
||||
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
|
||||
bash tools/proto.sh install
|
||||
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y --no-install-recommends ripgrep
|
||||
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
|
||||
|
||||
pg_dump --version
|
||||
pg_restore --version
|
||||
|
||||
- name: Ensure contract baseline ref
|
||||
run: |
|
||||
if ! git show-ref --verify --quiet refs/heads/main; then
|
||||
git branch main origin/main
|
||||
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
|
||||
run: |
|
||||
task check
|
||||
task --concurrency 1 check
|
||||
git diff --exit-code
|
||||
@@ -0,0 +1,65 @@
|
||||
# Cuts a release from main: [Unreleased] in CHANGELOG.md becomes the version's
|
||||
# section, then the commit and its tag are pushed together. The tag push starts
|
||||
# deploy.yml, which publishes the release to `next` for the canary.
|
||||
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:
|
||||
# A mirror carries its own Actions secrets. An empty token checks out
|
||||
# fine and fails at the push instead, which reads as a broken release.
|
||||
- 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 commit and tag. Set the secret here, or dispatch the release from the Gitea primary."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# DEPLOY_TOKEN rather than the job token: a push made with the job token
|
||||
# doesn't start workflows, and the tag push must start deploy.yml.
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
ref: main
|
||||
fetch-depth: 0
|
||||
token: ${{ secrets.DEPLOY_TOKEN }}
|
||||
|
||||
- name: Set up Go
|
||||
uses: actions/setup-go@v5
|
||||
with:
|
||||
go-version-file: go.mod
|
||||
# The self-hosted runner keeps the Go caches on disk between jobs, and
|
||||
# archiving them for the Actions cache takes minutes.
|
||||
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"
|
||||
|
||||
# Atomic: a commit without its tag would build images stamped dev.
|
||||
- name: Push the release
|
||||
run: git push --atomic origin main "$(git describe --exact-match --match 'v*' HEAD)"
|
||||
+2
-6
@@ -25,19 +25,14 @@ config.production.toml
|
||||
/ui/node_modules/
|
||||
/ui/.vite/
|
||||
/ui/*.tsbuildinfo
|
||||
# ui/dist IS committed: the Go build must not need a Node toolchain.
|
||||
/ui/dist/
|
||||
|
||||
# air live-reload
|
||||
/.air/
|
||||
/tmp/
|
||||
|
||||
# Beads / Dolt files (added by bd init)
|
||||
.dolt/
|
||||
.beads-credential-key
|
||||
.beads/proxieddb/
|
||||
*.gate.lock*
|
||||
.beads/issues.jsonl
|
||||
.beads/interactions.jsonl
|
||||
.mcp.json
|
||||
|
||||
# gh CLI state (~/.local/state/gh) mistakenly created inside the tree
|
||||
@@ -52,3 +47,4 @@ __pycache__/
|
||||
|
||||
# Local symlink to the archipelago marketplace repo
|
||||
/archipelago
|
||||
.agents-run/
|
||||
@@ -0,0 +1 @@
|
||||
v2.14.0
|
||||
@@ -120,6 +120,7 @@ linters:
|
||||
sloglint:
|
||||
no-mixed-args: true
|
||||
key-naming-case: snake
|
||||
context: scope
|
||||
|
||||
exclusions:
|
||||
generated: lax
|
||||
|
||||
+256
@@ -5,6 +5,262 @@ release's per-component sections are labelled beneath its heading.
|
||||
|
||||
## [Unreleased]
|
||||
|
||||
## [1.61.1] - 2026-11-07
|
||||
|
||||
### archie-gateway
|
||||
|
||||
- An image or voice attachment that arrives as a link is now checked against what the link serves, the same as an uploaded one. A link whose content is not the declared type, or that cannot be read, is refused.
|
||||
|
||||
### archie-ui
|
||||
|
||||
- A workflow created on the canvas now saves the agent it runs as, so it runs instead of parking with "declares no identity to run as".
|
||||
|
||||
### archie-state-store
|
||||
|
||||
- A workflow that no longer validates after an upgrade (for example it names a step type that was removed) is repaired at startup instead of breaking every workflow. A shipped workflow is restored from this release's copy; a workflow you created is removed and logged, and its earlier revision stays in the resource history. Valid workflows you created or edited are kept.
|
||||
|
||||
## [1.61.0] - 2026-11-07
|
||||
|
||||
### archied
|
||||
|
||||
- A `workflow.handoff` now finishes its run and starts a separate, linked run of the next workflow on the same issue, instead of continuing as another attempt. The task page links each run to the one before and after it; attempts count only retries of one run.
|
||||
|
||||
- A task no longer fails to prepare its worktree with "some refs were not updated" after a tag or branch moves on the forge.
|
||||
|
||||
### archie-ui
|
||||
|
||||
- The task page no longer flashes its loading state on every live update while a task runs.
|
||||
|
||||
### archie-state-store
|
||||
|
||||
- The extension catalogue lists and installs again. Its default signing key has changed; an instance that set its own catalogue signing key in Extension settings keeps using that key.
|
||||
|
||||
## [1.60.0] - 2026-11-02
|
||||
|
||||
### archied
|
||||
|
||||
- Curators can list a repository's open issues and file new ones with the `issue_list` and `issue_create` tools, which reach the forge through the daemon. A curator files only when its definition declares `issue_create`; the shipped self-intake example runs in dry run with `issue_list` for deduplication. Listing every open issue needs the forge extensions from the archipelago release after 1.2.0.
|
||||
|
||||
## [1.59.0] - 2026-11-02
|
||||
|
||||
### archied
|
||||
|
||||
- Forge extensions can open issues: the forge surface gains `CreateIssue` alongside list, comment and close, and the bundled Gitea and GitHub extensions implement it.
|
||||
|
||||
## [1.58.1] - 2026-11-01
|
||||
|
||||
### archied
|
||||
|
||||
- The systemd watchdog now also watches the task intake loop, and its warning names the loop that stalled.
|
||||
- archied no longer restarts about a minute after it starts. Under systemd, the watchdog never saw a poll pass and killed it on every start since 1.56.0.
|
||||
|
||||
## [1.58.0] - 2026-11-01
|
||||
|
||||
### archied
|
||||
|
||||
- Running `install.sh` over an install whose services are already running now restarts them, so they run the new binaries.
|
||||
|
||||
## [1.57.0] - 2026-10-31
|
||||
|
||||
### archied
|
||||
|
||||
- A release reaches `stable` only after it has run on a canary for a day and passed: `archied release publish` now publishes to `next` alone, `archied release canary start|check` installs a release on a canary and judges it from the canary's dashboard, promoting it or rolling the canary back, and `archied release promote` moves `stable` by hand. Promotion refuses a prerelease and a release older than the one `stable` names. The `archied` and `archie-agent` images are published as `:v<version>`, and `:latest` moves only when a release is promoted.
|
||||
|
||||
## [1.56.0] - 2026-10-31
|
||||
|
||||
### archied
|
||||
|
||||
- **Install once by hand.** Releases are now signed and published to `git.catlow.cloud/sam/archie`. A host on 1.55.0 or earlier still looks for releases on GitHub, so it finds this one only by running the new installer once: `curl -fsSL https://offloaded.dev/install.sh | bash`. Updates after that come from Settings → Status as before.
|
||||
- Releases are signed. Updates and `install.sh` refuse a release the release key did not sign, a zip that is not the one signed, and a channel moved back to an older release. Where releases and the extension catalogue come from is a setting (update settings and extension settings, or `[distribution]` in `config.toml` for a new instance), and `archied release keygen` and `archied release publish` publish signed releases to your own registry.
|
||||
- Organisations: forge connections, schedules, alerts, chat channels and audit are per organisation. A member acts in the organisation they select, the setup checklist follows it, and the instance's own forge is its root connection.
|
||||
- Workflows are edited as a draft and reach the running workflow only when published. Build a workflow with Archie from the canvas: chat writes the draft into the editor for review, and the editor locks while it does.
|
||||
- Schedules run from the State Store with run history, fire into their own organisation, and can trigger workflows. Daemon maintenance runs as built-in schedules.
|
||||
- A parked task links to the page that fixes its blocker (repository, credential, model or forge extension), and a parked task can be retried on the current workflow definition.
|
||||
- Shipped workflows run as a seeded agent identity with narrow grants instead of the root identity. Credential services are granted to dashboard identities from pickers, and personal API tokens have a name, a lifetime and a last-used time.
|
||||
- An org-scoped audit page with filters, a live tail, export and a retention setting; recorded access denials are kept for a set time and listed on their own page.
|
||||
- Instructions replace SOUL: instance, organisation, workflow and repository instructions are layered into every agent stage.
|
||||
- Chat docks at the bottom of every page and stays open across navigation. Tool calls show where they happened in a reply, with arguments (secrets masked) and durations, and `ask_questions` asks several questions at once.
|
||||
- Run more than one instance side by side: `ARCHIE_INSTANCE` names an instance, and the installer installs and updates a named one.
|
||||
- Pull request reviews submit REQUEST_CHANGES on blocking findings, list findings outside the diff in the review body, and repost without inline comments when the forge refuses their placement.
|
||||
- A workflow installs a repository's declared tooling before its gate, and tasks clone from a shared per-repository mirror.
|
||||
- Traces: services, model and tool calls and task containers export OpenTelemetry spans, and log lines carry the trace id.
|
||||
- Telegram runs as an archipelago channel extension, enabled from the Extensions page.
|
||||
- The Extensions page groups the marketplace by surface, is searchable, shows install state, and offers an update only when the catalogue has one.
|
||||
- The dashboard is rebuilt on shared components: a new Archie mark, a theme that follows the OS, task logs as a table, and layouts that fit a phone.
|
||||
|
||||
### archie-agent
|
||||
|
||||
- Released with archied 1.56.0; task containers export trace spans and install a repository's declared tooling before its gate.
|
||||
|
||||
## [1.55.0] - 2026-10-16
|
||||
|
||||
### archied
|
||||
|
||||
- Personas are gone: the Personas settings page, the chat Personality selector and `/personality`. A selected persona never changed what the model was told; SOUL (Settings → SOUL) is the one place to set Archie's identity and style. Stored persona settings are deleted on upgrade.
|
||||
- The shipped SOUL describes Archie as the assistant for an event-driven automation system rather than a coding assistant. A SOUL you have saved is kept as it is.
|
||||
|
||||
## [1.54.3] - 2026-10-16
|
||||
|
||||
### archied
|
||||
|
||||
- Chat can help write a workflow: it reads your workflows and the step catalog, writes a definition, and checks it the same way saving does, fixing what the check reports. It does not save; paste the YAML it gives you into the editor's YAML view and save there.
|
||||
|
||||
## [1.54.2] - 2026-10-16
|
||||
|
||||
### archied
|
||||
|
||||
- Tool calls from Gemini models (Interactions API) receive their arguments intact. Any tool that takes arguments, such as `dashboard_navigate` in chat, failed with "invalid character '{' after top-level value".
|
||||
|
||||
### archie-agent
|
||||
|
||||
- Agent steps on Gemini models (Interactions API) pass tools their arguments intact instead of failing to decode them.
|
||||
|
||||
## [1.54.1] - 2026-10-16
|
||||
|
||||
### archied
|
||||
|
||||
- Update checks, `archied update install` and `install.sh` find releases at `github.com/samcharles93/archie-releases`, so a host can update again. A host on 1.54.0 or earlier still looks in the old place and has to be upgraded to 1.54.1 by hand once.
|
||||
|
||||
## [1.54.0] - 2026-10-16
|
||||
|
||||
**Upgrade note:** services now authenticate each other with TLS certificates from your own CA instead of shared tokens. Before upgrading a host whose services listen on anything but loopback (any host running agent containers), issue a certificate per service (`archied`, `archie-gateway`, `archie-messaging`, `archie-state-store`, `archie-ui`, each with its name as the DNS SAN and both server and client auth), add `[tls] ca_file` and `cert_dir` to `config.toml`, and remove every `target_token`, the `*_TOKEN` service variables and the `--token`/`--*-token` flags, including archie-ui's `-token` and `-token-file`. A unit that still passes a removed flag fails to start. See `config.example.toml`.
|
||||
|
||||
### archied
|
||||
|
||||
- Services authenticate each other with mutual TLS. Each process presents `<cert_dir>/<service>.pem`, peers must chain to `ca_file`, and a caller is identified by its certificate rather than by what it claims. Renewed certificates are picked up without a restart. Without `[tls]`, services listen on and dial loopback only. The harness setup terminal requires `[tls]`.
|
||||
- Every gRPC service caps the streams a connection holds, times out stalled handshakes, releases a dead client's streams, and drains for at most 10 seconds on shutdown. Messaging exits when its listener fails instead of staying up without delivering.
|
||||
- The dashboard has user accounts. First run opens browser setup for the organisation, workspace and first administrator; people then sign in with a password, a passkey or your identity provider, and account administration lives under Access. The shared dashboard token is gone; reach the dashboard remotely through an HTTPS reverse proxy.
|
||||
- `archied update install` updates a host in one transaction: it verifies the release, stages every binary, pulls the agent image by digest and backs up the database, then restarts the services in order and rolls everything back if archied is not healthy for two minutes.
|
||||
- Each workflow runs as the identity it declares, checked on every attempt along with the identity that started it. A workflow that declares none is refused, a called workflow runs as its caller's declared identity, and shipped workflows run as the instance root.
|
||||
- Test-run a workflow draft before saving it, with forge and push writes suppressed and recorded per step. The History tab lists a workflow's revisions, diffs them as YAML and on the canvas, restores one into the editor, and shows which revision each run used.
|
||||
- Start a task from the dashboard. The dashboard home shows activity and setup, and a running task has a read-only Sandbox tab that follows its container.
|
||||
- The topbar's Jump to is a command palette, settings lists open as accordions that wait for a new item to be saved, and history restores land as a draft applied from the save bar.
|
||||
- Labels, hints, alerts and empty states say what is wrong and what to do, without tutorial or marketing prose.
|
||||
- Org isolation is tighter: harness secrets, identity writes, principals, playbook dispatch and model selections in chat stay in the caller's org, instance settings are written by the system org only, and creating a source or reloading a channel is authorized against the target.
|
||||
- Binding dispatch claims its capture and enqueues the task atomically, so a capture cannot start two runs, and the run-time workflow check sees the binding event's signature and address.
|
||||
- Service-unhealthy alerts count their grace from the last report and also cover a service that went silent, and a restart no longer clears an alert still inside its grace. An invalid stored access policy raises an alert until it validates.
|
||||
- A failed cancel of a called workflow no longer leaves the caller running, retention spares captures still waiting to be dispatched, and EDA playbooks load and report at start instead of on first dispatch.
|
||||
- Chat model selection works again for provider models.
|
||||
|
||||
### archie-agent
|
||||
|
||||
- Each run acts as its workflow's declared identity.
|
||||
- A task snapshot carries only the model limits its aliases resolve to.
|
||||
- A build step's "no changes" result comes from its writable stages and clears once a commit lands.
|
||||
- Test runs suppress forge and push writes and record what they would have done.
|
||||
- The default persona is a reporting-focused identity prompt, without the one-question limit in chat.
|
||||
|
||||
## [1.53.0] - 2026-10-11
|
||||
|
||||
### archied
|
||||
|
||||
- Every organisation's data is its own. Chats, tasks, events, transitions, steps, tool calls, run statistics, event sources, event types, mappings, bindings and agent memory are read and written in the org that owns them, and a request can no longer write into another org. Rows written before orgs existed move to their owner's org on upgrade.
|
||||
- An instance admin decides what each org may reach: the models it can use, and whether it may register providers under its own credentials. Org Settings gains a Models tab and instance Models gains Org access. The system org is never restricted; another org uses nothing until it is granted.
|
||||
- Models are addressed by alias. Aliases replace model roles, one resolver serves every purpose (agent steps, implement, PR review, MCP sampling, chat, embedding, transcription), and an unknown alias fails instead of falling back to a default. The step editor and the chat picker offer aliases, and a workflow naming one that does not exist is refused when saved.
|
||||
- Chat sessions belong to one org; a chat resolves its models in the caller's org and is billed to it, and a task run from chat posts its outcome back to that chat.
|
||||
- Add a member by provider subject, or by email as a placeholder that the first sign-in the provider vouches for claims.
|
||||
- The workflow canvas authors parallel branches as lanes, adds a switch step that runs the case matching a reference, and edits a call's interface. A step shows its role, its number and its run trace.
|
||||
- The workflows list shows each workflow's running count and latest run result, the canvas reveals its data-edge handles on hover, and restoring a version asks for confirmation.
|
||||
- Store packages can auto-update: a package given the policy is moved to the catalogue's newest digest by a State Store ticker. An update asking for more authority than was accepted waits as a pending update with the running version untouched; approving it accepts the new authority, and a rollback restores the previous version with the authority accepted against it.
|
||||
- Model provider keys never enter an agent container: the runtime reaches its providers through the egress proxy, which holds the keys. A task's own credential can no longer replace the workflow definition its run is pinned to, and a package workflow's triggers, tools and forge calls are bounded by the authority accepted for the package.
|
||||
- The dashboard warns when it is reachable from off-host over plain HTTP, and the wildcard listen address counts as off-host rather than loopback. Instance health, logs, config and identities, the setup checklist and the skill catalogue are system-org only, and API requests are refused until the access chain has loaded.
|
||||
- `/approve` reaches Telegram; the router served it but nothing published it.
|
||||
- A worktree a killed container left root-owned is taken back by the daemon, and a PR review's benchmark runner works again on configured models and public PRs.
|
||||
- An unserved `/api` path returns 404 instead of the dashboard page, and an input group's select no longer loses clicks to its addon.
|
||||
|
||||
### archie-agent
|
||||
|
||||
- The runtime reaches model providers through the egress proxy, so provider keys stay out of the container.
|
||||
- Agent steps resolve model aliases and their own org's models and credentials, failing on an unknown alias instead of falling back.
|
||||
- A switch step runs the case matching its reference.
|
||||
- A call waiting on another step is reconciled from durable steps, so it resumes after a daemon restart rather than stranding.
|
||||
|
||||
## [1.52.0] - 2026-10-09
|
||||
|
||||
### archied
|
||||
|
||||
- The harness page's setup terminal opens a real session: it starts an ephemeral container from a Kit profile, runs the CLI's own login and captures the OAuth tokens at the provider's token endpoint. Point the dashboard at the daemon with `[services.harness].target` and a `HARNESS_TOKEN` and it stops answering 503; the terminal is created at your browser's size. Takeover of a live task is not in this release.
|
||||
- A credential's token endpoint is refused when the run is not granted that service, instead of proxy-ing the provider's real tokens into the container.
|
||||
- Settings → Profiles, Credential bindings and Playbooks are editable from the dashboard, and curator definitions can be changed and applied without a restart.
|
||||
- Settings say whether each one applies live or needs a restart, show what is consuming resources, and report whether an apply landed.
|
||||
- Status shows each service's dependency checks, the agent workers and the broker.
|
||||
- The Logs page reads recent logs from every service, not just the daemon.
|
||||
- Captures and webhook sources are scoped to the org that owns them: the list, retention and delivery authorization all act in the right org, and a workflow definition resolves in its own org.
|
||||
- Chat settings are attributed to the signed-in user, and Settings → Tokens explains when a personal token cannot be created.
|
||||
- A channel enabled after Archie started works immediately; a channel that fails on its own recovers; a failed channel is no longer reported as enabled, and stored channel settings no longer save duplicate or unnormalized values.
|
||||
- The task table sorts, the command palette no longer scrolls sideways or loses its highlight, unknown routes render a not-found page, and configuration reload failures are shown instead of passing silently.
|
||||
- A scheduled job whose payload names a dangerous command is refused.
|
||||
- A disabled model provider is never served from the ambient API key.
|
||||
- `generate_video` is backed by ai-sdk's MiniMax video provider.
|
||||
- A dashboard token is no longer written to the startup log.
|
||||
|
||||
### archie-agent
|
||||
|
||||
- `workflow.call`: a call is keyed on its declared step path, its key is freed once the callee reaches a terminal state, and a caller waiting on a callee releases its capacity instead of holding it.
|
||||
- `command.run` honours step retry and `on_failure`.
|
||||
- A value passed between steps keeps its declared type, and optional result booleans are enforced only when the workflow declares them.
|
||||
- Capture tools have their results checked against the declared schema.
|
||||
- A single-cycle run waits for its in-flight tasks before exiting, and identity tasks inherit live settings.
|
||||
- Kit containers run Docker's init as PID 1, so orphaned processes are reaped instead of accumulating inside a long task.
|
||||
|
||||
## [1.51.1] - 2026-10-08
|
||||
|
||||
### archied
|
||||
|
||||
- Chat with OpenAI's gpt-6 models (gpt-6-luna and the rest) works with tools; a turn failed with "Function tools with reasoning_effort are not supported".
|
||||
|
||||
## [1.51.0] - 2026-10-08
|
||||
|
||||
### archied
|
||||
|
||||
- A secret engine enabled after Archie started (Bitwarden, for example) now supplies its keys straight away; providers that depended on it no longer stay disabled until a restart.
|
||||
- The dashboard chat has a microphone button: record a voice message and it is transcribed like a Telegram voice note. It shows only when a `transcription` model role is set under Settings → Models.
|
||||
- A file Archie sends in the dashboard chat is a download link for an hour, instead of a note that it can't be delivered.
|
||||
- Typing `/model` or `/personality` on its own in the dashboard chat offers the choices as buttons.
|
||||
|
||||
## [1.50.1] - 2026-10-08
|
||||
|
||||
### archied
|
||||
|
||||
- When an update is rolled back, the log names the health check that failed instead of only "unhealthy".
|
||||
|
||||
## [1.50.0] - 2026-10-08
|
||||
|
||||
### archied
|
||||
|
||||
- Tools that need your approval ask for it again, and Archie can ask you a question or offer choices mid-reply. Since the services were split these never reached Telegram or the dashboard: approval-gated tools failed and questions were never asked.
|
||||
- The dashboard chat shows approvals as Approve / Always this session / Deny, choices as buttons, and questions with a reply field.
|
||||
- `/update` in the dashboard chat lists what's available with Install and Not now.
|
||||
- Settings → Status → Versions installs the update it shows; its Install button sent an empty request.
|
||||
|
||||
## [1.49.4] - 2026-10-07
|
||||
|
||||
### archied
|
||||
|
||||
- Settings → Status and Settings → Extensions are split into tabs instead of one long page; the Versions table's status column ends at the card's edge.
|
||||
- Tools & MCP has one "Add MCP server" button; the transport is chosen in the form, and an unnamed new server is not an unsaved change.
|
||||
- Settings → Repositories shows the add field when no repositories are configured, instead of a blank page.
|
||||
- The unsaved-changes bar always rests at the bottom of the window.
|
||||
|
||||
## [1.49.3] - 2026-10-07
|
||||
|
||||
### archied
|
||||
|
||||
- Settings → Status → Versions shows the Gateway as "Update available" with an Install button when a newer release exists; it read "Unknown" with no way to install. The Runtime row stays "Unknown" until an agent task has run.
|
||||
- The release channel buttons sit at the Updates card's right edge instead of mid-row.
|
||||
|
||||
## [1.49.2] - 2026-10-07
|
||||
|
||||
### archied
|
||||
|
||||
- Carries the 1.49.0 and 1.49.1 changes, whose builds were never published. The update check reads GitHub releases directly and still offers only releases with a verifiable linux-amd64 zip.
|
||||
|
||||
## [1.49.1] - 2026-10-07
|
||||
|
||||
### archied
|
||||
|
||||
- When the dashboard session expires, the page returns to the sign-in screen instead of showing errors on every page until a manual refresh.
|
||||
|
||||
## [1.49.0] - 2026-10-07
|
||||
|
||||
### archied
|
||||
|
||||
@@ -9,12 +9,34 @@ here changes a decision. If a rule stops changing decisions, delete it.
|
||||
webhook, schedule, chat message) is matched to a workflow, the workflow runs an
|
||||
agent or tool in an isolated container, and the result lands somewhere for
|
||||
review or action. A repository is an optional input to a workflow, not the point
|
||||
of the product.
|
||||
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
|
||||
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
|
||||
finish features and shrink the codebase, not to extend it. </temporary>
|
||||
<temporary - remove on 2026-12-01> The goal until 1 December is a
|
||||
production-ready archie-core, including the features the maintainer is still
|
||||
adding. Speak up when a request competes with something more urgent: a bug that
|
||||
loses work, a failure that shows nothing, a security gap, a broken setup path.
|
||||
Give the trade-off in a sentence or two and suggest whether the request belongs
|
||||
in the backlog. Don't hold work back on your own judgement. </temporary>
|
||||
|
||||
## Services and layout
|
||||
|
||||
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 PostgreSQL tables | PostgreSQL |
|
||||
| `archie-gateway` | Chat, conversation state, task tools | State Store |
|
||||
| `archied` | Scheduling, workflow runs, harness, Daemon contract | State Store, Gateway, Messaging |
|
||||
| `archie-messaging` | External channel frontends | Gateway |
|
||||
| `archie-ui` | Dashboard HTTP API (`internal/webui`) and the embedded SPA | State Store, Gateway, daemon, harness |
|
||||
| `archie-agent` | The worker inside each task container | NATS |
|
||||
|
||||
`internal/domain` holds behaviour and interfaces; `internal/infrastructure`
|
||||
implements them. Dashboard work follows `ui/CLAUDE.md`. Workflow YAML and its
|
||||
step vocabulary are in `WORKFLOWS.md`; the server catalogue is authoritative.
|
||||
|
||||
## Authority
|
||||
|
||||
@@ -23,10 +45,24 @@ When sources disagree, the higher one wins:
|
||||
1. The maintainer's instruction in this session.
|
||||
2. This file.
|
||||
3. The code as it is in the tree.
|
||||
4. Beads issues (`bd show <id>`): the plan for a piece of work.
|
||||
4. Gitea issues (`tea issues view <n>`): the plan for a piece of work.
|
||||
5. Everything else (memories, comments, old docs) is a hint. Verify it against
|
||||
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).
|
||||
- **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 was 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
|
||||
|
||||
- **Broken beats new.** A bug that blocks work gets fixed now, with the smallest
|
||||
@@ -64,10 +100,12 @@ When sources disagree, the higher one wins:
|
||||
`infrastructure` implements `domain` interfaces, `domain` imports neither.
|
||||
`cmd/` parses flags and calls `app`, nothing else.
|
||||
- Fix invalid state where it is produced, not with checks where it is consumed.
|
||||
- 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.
|
||||
- Comments say why, briefly. No migration history, phase names or issue
|
||||
narration in code.
|
||||
- Generated files (`ui/dist/`, protobuf, sqlc) are regenerated and committed
|
||||
- Generated files (protobuf, sqlc) are regenerated and committed
|
||||
with the change that caused them, never hand-edited.
|
||||
|
||||
## Tests
|
||||
@@ -83,7 +121,8 @@ 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,
|
||||
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. No test opens a real database or needs Docker; test
|
||||
SQL semantics at the interceptor or domain level with fakes. One table-driven test per behaviour; extend the table
|
||||
instead of adding a second test. Prefer making an invalid state unrepresentable
|
||||
to testing that it is rejected. Test helpers live in `_test.go` files only.
|
||||
|
||||
@@ -112,9 +151,18 @@ task build # binaries into bin/
|
||||
task test # go test -short ./...
|
||||
task ui # dashboard into ui/dist
|
||||
task check # the gate
|
||||
|
||||
go test -short ./internal/domain/workflow -run TestName # one test
|
||||
task dev # every service + Vite at http://localhost:5173, from deployments/dev.toml
|
||||
task e2e:up # seeded local stack; task e2e:check -- all runs the browser checks
|
||||
```
|
||||
|
||||
Requires Go 1.27, Task, golangci-lint, Node/npm and Docker. Adopt `task fmt` and
|
||||
`task proto:generate` and `task db:generate` write the committed generated
|
||||
output for `proto/` and `internal/infrastructure/postgres/`; `task check` runs
|
||||
their check variants and rejects stale output. The e2e stack is not part of the
|
||||
gate.
|
||||
|
||||
Requires Go 1.27, Task, golangci-lint, Node, pnpm and Docker. Adopt `task fmt` and
|
||||
`go fix` output as-is.
|
||||
|
||||
- `task check` gates the commit: `task check && git commit ...`. Never claim a
|
||||
@@ -129,21 +177,32 @@ Requires Go 1.27, Task, golangci-lint, Node/npm and Docker. Adopt `task fmt` and
|
||||
Nothing in the working tree is read at runtime. Systemd is optional.
|
||||
- Releases: `RELEASING.md`.
|
||||
|
||||
## Issues (beads)
|
||||
## Issues (Gitea)
|
||||
|
||||
Work is tracked in `bd`, never in Markdown TODO files.
|
||||
Work is tracked as issues on the primary remote, never in Markdown TODO files.
|
||||
GitHub is a read-only mirror; do not open, close or comment there.
|
||||
|
||||
```bash
|
||||
bd ready | bd show <id> | bd update <id> --claim | bd close <id>
|
||||
tea issues list -r sam/archie --state open --labels priority::critical
|
||||
tea issues list -r sam/archie --labels epic/<slug> --state open
|
||||
tea issues view 497
|
||||
tea issues edit 497 --add-labels status::in_progress --add-assignees sam
|
||||
tea comment 497 "what changed, and what was run"
|
||||
tea issues close 497
|
||||
```
|
||||
|
||||
- An issue is the plan: what is wrong or wanted, and how you know it is done.
|
||||
Keep it to that.
|
||||
- Bead state syncs through Dolt (`bd dolt push/pull`, only when told), not git.
|
||||
Never commit `.beads/` exports.
|
||||
- No host names, IPs, paths, PIDs or credentials in any bead: they are
|
||||
published.
|
||||
- File follow-up work you find as a bead. Do not fix it in passing.
|
||||
- Labels carry state: `type::`, `priority::`, `status::in_progress` and
|
||||
`status::deferred`. Open/closed is the issue state, not a label.
|
||||
`epic/<slug>` says which epic an issue belongs to.
|
||||
- Cite the issue number in commits and comments.
|
||||
- `tea issues list --labels` silently ignores an unknown name and returns every
|
||||
issue. Check the count is plausible before trusting a filtered list.
|
||||
- The API caps `limit` at 50 regardless of what you pass.
|
||||
- No host names, IPs, paths, PIDs or credentials in an issue: the text outlives
|
||||
the change that wrote it.
|
||||
- File follow-up work you find as an issue. Do not fix it in passing.
|
||||
|
||||
## Changing this file
|
||||
|
||||
|
||||
+3
-2
@@ -2,7 +2,8 @@
|
||||
# Pre-installs system tools agents can't install themselves (no apt, no sudo).
|
||||
# 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 ──
|
||||
FROM golang:1.27-trixie AS builder
|
||||
@@ -54,7 +55,7 @@ ENV GOPATH="/go"
|
||||
# /go/bin must be on PATH or anything `go install` puts there is unreachable.
|
||||
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 BUF_VERSION=1.72.0
|
||||
|
||||
|
||||
@@ -1,11 +1,20 @@
|
||||
# archied — the archie daemon
|
||||
# Run via docker compose alongside NATS.
|
||||
|
||||
FROM node:24-trixie-slim AS dashboard
|
||||
WORKDIR /src/ui
|
||||
RUN corepack enable
|
||||
COPY ui/package.json ui/pnpm-lock.yaml ui/pnpm-workspace.yaml ./
|
||||
RUN pnpm install --frozen-lockfile
|
||||
COPY ui/ ./
|
||||
RUN pnpm run build
|
||||
|
||||
FROM golang:1.27-trixie AS builder
|
||||
WORKDIR /src
|
||||
COPY go.mod go.sum ./
|
||||
RUN go mod download
|
||||
COPY . .
|
||||
COPY --from=dashboard /src/ui/dist ./ui/dist
|
||||
ARG GATEWAY_VERSION=dev
|
||||
ARG RUNTIME_VERSION=dev
|
||||
RUN CGO_ENABLED=0 go build \
|
||||
|
||||
@@ -1,17 +1,5 @@
|
||||
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
|
||||
(https://github.com/cedar-policy/cedar), Copyright Amazon.com, Inc. or its
|
||||
affiliates, licensed under the Apache License, Version 2.0, as implemented by
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
[](https://github.com/samcharles93/archie-core/actions/workflows/quality.yml)
|
||||
|
||||
# Archie
|
||||
|
||||
**Event-driven Agentic Automation**
|
||||
@@ -103,7 +101,7 @@ or a hosted provider API key.
|
||||
1. **Install.**
|
||||
|
||||
```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
|
||||
|
||||
+227
-98
@@ -1,129 +1,258 @@
|
||||
# Releasing
|
||||
|
||||
One release stream. `CHANGELOG.md` carries every release section, one generated
|
||||
page per version describes it, and one tag names the release. A release is one
|
||||
version covering whatever changed; the components' entries are labelled sections
|
||||
inside it (`### archied`, `### archie-agent`), not separate numbers or separate
|
||||
pages.
|
||||
page per version describes it, and one `v*` tag names the release. One version
|
||||
covers every process in the host bundle (`archied`, `archie-gateway`,
|
||||
`archie-state-store`, `archie-ui`, `archie-messaging`) and the `archie-agent`
|
||||
image; per-component detail is a labelled section inside the version
|
||||
(`### archied`, `### archie-agent`).
|
||||
|
||||
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.
|
||||
A release is cut by CI, published to `next`, run on the canary for a day, and
|
||||
promoted to `stable` only if the canary's signals pass. Nothing is run locally.
|
||||
|
||||
`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.
|
||||
## Notes are written with the change
|
||||
|
||||
## 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
|
||||
A commit that changes what a reader experiences adds its bullet under
|
||||
`## [Unreleased]` in `CHANGELOG.md`, in the same commit. The release takes that
|
||||
section as it stands, so write the bullet as the release note, not as a commit
|
||||
subject.
|
||||
|
||||
**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
|
||||
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) isn't the reader's experience
|
||||
either: out.
|
||||
- A capability that **shipped but isn't 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.
|
||||
Design constraints and withheld capabilities are not release news. Deleting a
|
||||
caveat a reader needs misleads them, which is the failure this rule exists to
|
||||
prevent.
|
||||
|
||||
## Cutting a release
|
||||
|
||||
```bash
|
||||
task release:preview VERSION=1.3.0 # preview what would land
|
||||
task release:prepare VERSION=1.3.0 # write the section into CHANGELOG.md, uncommitted
|
||||
# edit CHANGELOG.md -- generated notes are a starting point, not the release
|
||||
task release VERSION=1.3.0 # commit + annotated tag
|
||||
git push --atomic origin main v1.3.0 # both refs or neither
|
||||
```
|
||||
Dispatch the **release** workflow (`.github/workflows/release.yml`) with
|
||||
`major`, `minor`, `patch` or an exact version. It runs `task release` on `main`:
|
||||
|
||||
`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.
|
||||
1. refuses a dirty tree, an existing tag, or an `[Unreleased]` with no entries;
|
||||
2. turns `[Unreleased]` into `## [x.y.z] - date` under a new empty
|
||||
`[Unreleased]`, and runs `task news`;
|
||||
3. commits `chore(release): vx.y.z` and tags `vx.y.z`;
|
||||
|
||||
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`.
|
||||
then pushes `main` and the tag atomically with `DEPLOY_TOKEN`. A push made with
|
||||
the job token wouldn't start other workflows, so the user token is what lets
|
||||
the tag start the deploy.
|
||||
|
||||
### After a release, `main` and the working branch have diverged
|
||||
Every workflow that reaches the registry or the canary reads its credentials
|
||||
from Actions secrets, so a mirror of this repository carries its own set:
|
||||
|
||||
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.
|
||||
| Name | Kind | Used by |
|
||||
|---|---|---|
|
||||
| `DEPLOY_TOKEN` | secret | release, deploy, canary, promote — the registry push, the tag push, and the package links |
|
||||
| `RELEASE_SIGNING_KEY` | secret | deploy — signs the release statement |
|
||||
| `CANARY_TOKEN` | secret | deploy, canary, promote — the canary's dashboard API |
|
||||
| `CANARY_URL` | variable | deploy, canary, promote — where that dashboard is |
|
||||
| `CANARY_WINDOW` | variable | canary — the judged window; empty means the default |
|
||||
|
||||
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:
|
||||
A mirror missing them fails at its first login or push; `release.yml` names the
|
||||
missing `DEPLOY_TOKEN` before it checks out, so the run doesn't read as a broken
|
||||
release.
|
||||
|
||||
```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.
|
||||
After a release, pull `main` before committing on it again: CI has added the
|
||||
release commit.
|
||||
|
||||
## 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
|
||||
`ghcr.io/samcharles93/archie-agent:latest`. The runtime image is rebuilt by
|
||||
the release, so runtime commits merged to `main` do not reach a running
|
||||
sandbox until the host pulls the new image.
|
||||
- **`:latest` names the newest release, not the newest commit.** A push to
|
||||
`main` that is not a release publishes `archied:edge` (mutable, tracking
|
||||
`main`) and `archied:sha-<commit>` (immutable) instead, so a release's
|
||||
`:latest` stamping is not overwritten minutes later by the next ordinary
|
||||
commit. A host that runs releases follows `:latest`; a host that tracks `main`
|
||||
follows `:edge`.
|
||||
- **A GitHub Release with a distribution zip** — `dist-zip` builds every process
|
||||
the reference deployment runs (`archied`, `archie-gateway`,
|
||||
`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`.
|
||||
- **Gate.** `task check TEST_FLAGS=-count=1` (uncached, including the
|
||||
Docker-backed tests `-short` skips) and `govulncheck`, then a check that the
|
||||
tag has a `[version]` section in `CHANGELOG.md`.
|
||||
- **Images.** `archied:v<version>` and `archie-agent:v<version>` on a release
|
||||
tag; `archied:edge` and `archied:sha-<commit>` on any other push to `main`.
|
||||
`:latest` moves only on promotion, so it names the newest promoted release.
|
||||
- **The signed release.** `archied release publish` signs a statement
|
||||
(version, issued_at, zip digest, agent image by digest) with
|
||||
`RELEASE_SIGNING_KEY` and pushes it with the distribution zip to
|
||||
`git.catlow.cloud/sam/archie` as `v<version>` and `next`. It never moves
|
||||
`stable`.
|
||||
- **The release-notes page** on Gitea, from that version's `CHANGELOG.md`
|
||||
section, which the statement links to.
|
||||
- **The canary install**: `archied release canary start` points the canary at
|
||||
`next` and installs the release through its dashboard.
|
||||
|
||||
The zip is also uploaded as an Actions artifact, but that is a backup copy:
|
||||
artifacts expire after 90 days and need an Actions login to download. The
|
||||
Release asset is the durable, operator-reachable one.
|
||||
GitHub-style Actions run the workflow from the tagged commit, so a fix to
|
||||
`deploy.yml` reaches a release only if it is an ancestor of the tag. Re-cut the
|
||||
release rather than committing the fix on top of a tagged one.
|
||||
|
||||
## Gate
|
||||
## The canary
|
||||
|
||||
CI (`deploy.yml`) runs `task check` before building images, then verifies any
|
||||
release tag at `HEAD` has a matching `[version]` section in `CHANGELOG.md`. A
|
||||
tag with no changelog entry is a hard failure. No tags at `HEAD` is a warning,
|
||||
not a failure — images get stamped `dev`.
|
||||
The canary is the production host, following `next`. Every quarter hour
|
||||
`canary.yml` runs `archied release canary check`, which reads the canary
|
||||
through its dashboard API and judges **the release the canary actually runs**,
|
||||
not the moving `next` tag:
|
||||
|
||||
One consequence worth knowing when a release commit needs amending: GitHub
|
||||
Actions runs the workflow **from the commit that triggered it**, so a fix to
|
||||
`deploy.yml` only takes effect for a release if it is an ancestor of the tagged
|
||||
commit. Delete and re-cut the tag (`git tag -d`, `task release`) rather than
|
||||
committing the fix on top of an already-tagged release.
|
||||
| Signal | Source | Fails when |
|
||||
| --- | --- | --- |
|
||||
| Install outcome | `GET /api/chat/update` | the canary doesn't run the judged release (the watchdog rolled it back) |
|
||||
| Readiness | `GET /health/detailed` | the rollup isn't `ok` |
|
||||
| Alerts | `GET /api/alerts` | an open `action` alert was first raised after the release was installed |
|
||||
| Error log | `GET /api/logs?level=error` | error lines per window exceed `2 × baseline + 10` |
|
||||
| Task outcomes | `GET /api/tasks` | the share of finished tasks that parked or died rose more than 10 points |
|
||||
|
||||
- **Control.** The canary's own window before the release was installed. With
|
||||
one production host there's no simultaneous control.
|
||||
- **Window.** 24 hours counted from the **install** on the canary, not from
|
||||
the release's issue time: the host records it in `installed.json`
|
||||
(`committed_at`) and reports it as `installed_at` in `GET /api/chat/update`.
|
||||
One cycle of schedules and traffic. The first 30 minutes are for the install
|
||||
and restart. `canary.yml` passes `-window` when the `CANARY_WINDOW` Actions
|
||||
variable is set; the flag defaults to 24h. A host that doesn't report an
|
||||
install time degrades to the release statement's issue time.
|
||||
- **Hard signals** (install, readiness, alerts) roll back at any check after
|
||||
that. **Relative signals** (errors, tasks) are judged against the baseline
|
||||
whenever both windows carry enough data, so a breach rolls the release back
|
||||
even mid-window; a full window with no failure promotes it.
|
||||
- **Too little data skips a signal** rather than failing it: fewer than 5
|
||||
finished tasks in the window, or an error log that reaches back less than an
|
||||
hour into the baseline. A log read that stops short of a window is scaled to
|
||||
a full window from what it covers.
|
||||
|
||||
### Queueing
|
||||
|
||||
`deploy.yml` installs each new release on the canary with
|
||||
`archied release canary start -version V`, which first points the canary back
|
||||
at `next` (clearing any rollback pin) and then installs `V` — unless the
|
||||
canary is already judging a release newer than stable that isn't `V`, in which
|
||||
case `V` is **queued** behind it and the canary keeps running what it judges.
|
||||
`-force` installs regardless. A `check` that promotes (or finds nothing to
|
||||
judge) installs the newer `next` in the same run, so a queue drains one
|
||||
release per promotion.
|
||||
|
||||
### Subcommands
|
||||
|
||||
```
|
||||
archied release canary status read-only: channel/pin, installed release and
|
||||
installed_at, stable/next, window progress, and
|
||||
the verdict the current signals would give
|
||||
archied release canary start point the canary at next and install -version,
|
||||
queued behind a release being judged (-force to
|
||||
override)
|
||||
archied release canary check judge the installed release over -window
|
||||
(default 24h): promote, pick up a newer next,
|
||||
or roll back; a held canary is reported, and a
|
||||
held pin that is no longer installable fails
|
||||
the run red
|
||||
archied release canary promote promote the installed release now if its
|
||||
signals pass; refuses with exit 1 otherwise
|
||||
archied release canary unpin return the canary to next from any pin
|
||||
```
|
||||
|
||||
### Promote
|
||||
|
||||
A release that passes the window is promoted: `stable` is retagged to the
|
||||
`v<version>` manifest. The signature covers the statement, not the tag, so the
|
||||
retag needs no signing key. The `archied` and `archie-agent` images' `:latest`
|
||||
move to their `:v<version>` first, and the agent image must be the digest the
|
||||
statement pins. Promotion refuses a prerelease and a release issued before the
|
||||
one `stable` names, the same replay rule hosts enforce. The decision and its
|
||||
reasons are in the `canary` run log.
|
||||
|
||||
Early promotion is a dispatch away: the **promote** workflow
|
||||
(`.github/workflows/promote.yml`) takes a `version` input and runs
|
||||
`archied release canary promote -version V` on the canary. It judges the
|
||||
release the canary runs — the window doesn't matter for the decision — and
|
||||
refuses (red run) on any hard failure or relative breach with enough data.
|
||||
|
||||
### Roll back
|
||||
|
||||
`stable` stays put, and the run turns red. Before the canary is pinned to
|
||||
`stable`, `check` verifies `stable` is actually installable — its statement's
|
||||
zip blob must still be in the release repository and its pinned agent image
|
||||
must still resolve (`releaseupdate.Installable`). If it isn't, the run fails
|
||||
loudly and the canary stays on `next` rather than being stranded on a pin.
|
||||
Otherwise the canary is pinned to the `stable` version through its update
|
||||
settings and reinstalled through its dashboard.
|
||||
|
||||
A release whose migrations differ from `stable`'s can't go back without
|
||||
restoring the pre-update database snapshot, which loses every write since. The
|
||||
canary is held on the failed release instead (pinned to it) and the fix goes
|
||||
forward in the next release. The next release's deploy points the canary back
|
||||
at `next`.
|
||||
|
||||
A pinned canary isn't judged, so a rollback is decided once — but `check`
|
||||
verifies the pin is still installable every run, so a stranded pin shows red
|
||||
instead of green. `archied release canary unpin` returns the canary to `next`
|
||||
by hand.
|
||||
|
||||
### Configuration
|
||||
|
||||
| Name | Kind | Holds |
|
||||
| --- | --- | --- |
|
||||
| `CANARY_URL` | Actions variable | the canary's dashboard URL; unset disables the canary steps |
|
||||
| `CANARY_TOKEN` | Actions secret | an API token bound to a dedicated `service_account` identity on the canary, carrying only the canary grant policy (see below) — never instance admin |
|
||||
| `CANARY_WINDOW` | Actions variable | optional `-window` override for `canary check`; unset is 24h |
|
||||
| `DEPLOY_TOKEN` | Actions secret | registry and repository write, for publishing, promoting and the release push; stays CI-only, promotion runs in CI and never on the host |
|
||||
| `RELEASE_SIGNING_KEY` | Actions secret | the release signing seed |
|
||||
|
||||
#### Setting up `CANARY_TOKEN` once
|
||||
|
||||
`CANARY_TOKEN` is a bearer token for a dedicated service-account identity in
|
||||
the system org whose only grant is the canary policy
|
||||
(`access.CanaryGrantPolicy`): read the signal endpoints (`GET /api/chat/update`,
|
||||
`GET /api/alerts`, `GET /api/logs`, `GET /api/tasks`), read and write the
|
||||
`update-settings` resource, and trigger an update install
|
||||
(`POST /api/chat/update/install`). It carries no other rights, and instance
|
||||
admin is never needed. With an instance-admin token (for example the operator
|
||||
session), run against the canary host:
|
||||
|
||||
```bash
|
||||
# 1. Create the service-account identity in the system org.
|
||||
curl -X POST "$CANARY_URL/api/identities" -H "Authorization: Bearer $ADMIN" \
|
||||
-H 'Content-Type: application/json' \
|
||||
-d '{"kind":"service_account","display_name":"ci-canary"}'
|
||||
# -> {"id":"<canary-identity-id>", ...}
|
||||
|
||||
# 2. Issue its token (shown exactly once).
|
||||
curl -X POST "$CANARY_URL/api/identities/<canary-identity-id>/tokens" \
|
||||
-H "Authorization: Bearer $ADMIN" -H 'Content-Type: application/json' \
|
||||
-d '{"name":"ci-canary","days":90}'
|
||||
# -> {"id":"<token-hash>","token":"archie_pat_..."} -- store the token value as the CANARY_TOKEN secret
|
||||
|
||||
# 3. Install the grant pair, scoped to that identity. The policies' org is
|
||||
# pinned to the caller's org (org-sys for the instance admin), so the
|
||||
# bodies need no org field. The permit alone is not enough: service
|
||||
# accounts created through the API are assigned the developer role, so a
|
||||
# matching forbid (installed second) negates everything outside the
|
||||
# permit's surface for that identity.
|
||||
curl -X PUT "$CANARY_URL/api/access/policies" -H "Authorization: Bearer $ADMIN" \
|
||||
-H 'Content-Type: application/json' \
|
||||
-d '{"id":"org-canary-grant","level":"org","text":"permit(principal, action, resource) when {\n resource.org == principal.org &&\n principal == Archie::Identity::\"<canary-identity-id>\" &&\n (\n (action == Archie::Action::\"read\" && [\"dashboard\", \"task\"].contains(resource.kind)) ||\n (action == Archie::Action::\"read\" && resource == Archie::Object::\"update-settings\") ||\n (action == Archie::Action::\"update\" && resource == Archie::Object::\"update\") ||\n (action == Archie::Action::\"manage_identities\" && resource == Archie::Object::\"update-settings\")\n )\n};"}'
|
||||
```
|
||||
|
||||
The second policy forbids the canary identity from everything the permit does
|
||||
not name, so its developer role cannot widen the grant:
|
||||
|
||||
```bash
|
||||
curl -X PUT "$CANARY_URL/api/access/policies" -H "Authorization: Bearer $ADMIN" \
|
||||
-H 'Content-Type: application/json' \
|
||||
-d '{"id":"org-canary-grant-forbid","level":"org","text":"forbid(principal, action, resource) when {\\n resource.org == principal.org &&\\n principal == Archie::Identity::\\\"<canary-identity-id>\\\" &&\\n !(\\n (action == Archie::Action::\\\"read\\\" && [\\\"dashboard\\\", \\\"task\\\"].contains(resource.kind)) ||\\n (action == Archie::Action::\\\"read\\\" && resource == Archie::Object::\\\"update-settings\\\") ||\\n (action == Archie::Action::\\\"update\\\" && resource == Archie::Object::\\\"update\\\") ||\\n (action == Archie::Action::\\\"manage_identities\\\" && resource == Archie::Object::\\\"update-settings\\\")\\n )\\n};"}'
|
||||
```
|
||||
|
||||
The policy texts are exactly `access.CanaryGrantPolicy` and
|
||||
`access.CanaryGrantForbidPolicy` from `internal/domain/access/canary.go` with
|
||||
the identity id filled in. The canary needs no other rights: `GET
|
||||
/health/detailed` is unauthenticated, and every other call it makes is covered
|
||||
by the grant pair.
|
||||
|
||||
The runner must reach `CANARY_URL`. Without a canary a release stays on `next`
|
||||
until promoted by hand, under the same refusals:
|
||||
|
||||
```bash
|
||||
archied release promote -version 1.57.0 \
|
||||
-latest git.catlow.cloud/sam/archied,git.catlow.cloud/sam/archie-agent
|
||||
```
|
||||
+121
-129
@@ -2,13 +2,13 @@ version: "3"
|
||||
|
||||
vars:
|
||||
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:
|
||||
default:
|
||||
desc: List available tasks
|
||||
cmds:
|
||||
- task --list
|
||||
|
||||
fmt:
|
||||
desc: Fix and format Go source with the gate's configured formatters
|
||||
cmds:
|
||||
@@ -88,28 +88,7 @@ tasks:
|
||||
desc: Run golangci-lint
|
||||
cmds:
|
||||
- golangci-lint run ./...
|
||||
- task: lint:tools
|
||||
|
||||
lint:tools:
|
||||
desc: Run golangci-lint over the tools module
|
||||
dir: tools
|
||||
cmds:
|
||||
- golangci-lint run ./...
|
||||
|
||||
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/...
|
||||
- cd tools && golangci-lint run ./...
|
||||
|
||||
ui:deps:
|
||||
desc: Install dashboard dependencies
|
||||
@@ -118,38 +97,51 @@ tasks:
|
||||
run: once
|
||||
dir: ui
|
||||
cmds:
|
||||
- npm install --no-audit --no-fund
|
||||
- pnpm install --frozen-lockfile
|
||||
|
||||
ui:
|
||||
desc: Build the dashboard into ui/dist (committed; the Go build embeds it)
|
||||
desc: Build the dashboard into ui/dist, which the Go build embeds
|
||||
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
|
||||
- pnpm run build
|
||||
|
||||
test:ui:
|
||||
desc: Test and type-check the dashboard
|
||||
dir: ui
|
||||
deps: [ui:deps]
|
||||
cmds:
|
||||
- npm test
|
||||
- npm run typecheck
|
||||
- pnpm test
|
||||
- pnpm run typecheck
|
||||
|
||||
webhook:send:
|
||||
desc: Send a test event to the dashboard's capture intake (--help for kinds)
|
||||
bench:prreview:
|
||||
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)
|
||||
cmds:
|
||||
- bash tools/webhook-send.sh {{.CLI_ARGS}}
|
||||
- go run ./cmd/archied prbench {{.CLI_ARGS}}
|
||||
|
||||
dev:
|
||||
desc: Run development services and Vite at http://localhost:5173
|
||||
deps: [dev:daemon, dev:gateway, dev:messaging, dev:state-store, dev:dashboard, dev:ui]
|
||||
|
||||
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:
|
||||
desc: Start PostgreSQL and wait for readiness
|
||||
cmds:
|
||||
@@ -166,17 +158,21 @@ tasks:
|
||||
echo "postgres did not become healthy within 60s" >&2
|
||||
exit 1
|
||||
|
||||
dev:daemon:
|
||||
desc: Run archied with live reload
|
||||
dev:wait-state:
|
||||
internal: true
|
||||
cmds:
|
||||
- |
|
||||
# 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.
|
||||
# Services read their settings from the State Store at boot and exit
|
||||
# if it is not up yet, so wait for its port ([services.state] in
|
||||
# deployments/dev.toml).
|
||||
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
|
||||
|
||||
dev:daemon:
|
||||
desc: Run archied with live reload
|
||||
cmds:
|
||||
- task: dev:wait-state
|
||||
- air -build.args_bin="-config-overlay,deployments/dev.toml"
|
||||
|
||||
dev:dashboard:
|
||||
@@ -186,65 +182,71 @@ tasks:
|
||||
|
||||
dev:state-store:
|
||||
desc: Run the State Store with development PostgreSQL
|
||||
deps: [dev:postgres]
|
||||
deps: [dev:postgres, dev:tls]
|
||||
cmds:
|
||||
- go run ./cmd/archie-state-store -config-overlay deployments/dev.toml
|
||||
|
||||
dev:gateway:
|
||||
desc: Run the development Gateway
|
||||
cmds:
|
||||
- |
|
||||
# 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
|
||||
- task: dev:wait-state
|
||||
- go run ./cmd/archie-gateway -config-overlay deployments/dev.toml
|
||||
|
||||
dev:messaging:
|
||||
desc: Run the development Messaging Service
|
||||
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
|
||||
|
||||
dev:ui:
|
||||
desc: Run Vite (requires the dashboard backend)
|
||||
dir: ui
|
||||
cmds:
|
||||
- npm install --no-audit --no-fund
|
||||
- npm run dev
|
||||
- pnpm install
|
||||
- pnpm run dev
|
||||
|
||||
dev:mobile:
|
||||
desc: Serve the dashboard on your LAN (token-protected) for phone viewing
|
||||
deps:
|
||||
- ui
|
||||
e2e:up:
|
||||
desc: Start the local stack without Docker (PostgreSQL 18, services, Vite) and seed it
|
||||
cmds:
|
||||
- cmd: |
|
||||
IP=$(hostname -I | awk '{print $1}')
|
||||
TOKEN_FILE="${XDG_DATA_HOME:-$HOME/.local/share}/archie/web-token"
|
||||
go run ./cmd/archie-ui -listen 0.0.0.0:8484 -token-file "$TOKEN_FILE" &
|
||||
UI_PID=$!
|
||||
sleep 2
|
||||
TOKEN=$(cat "$TOKEN_FILE" 2>/dev/null)
|
||||
URL="http://$IP:8484/?t=$TOKEN"
|
||||
echo "Phone URL: $URL"
|
||||
echo "$URL" | qrencode -t ANSIUTF8
|
||||
trap "kill $UI_PID 2>/dev/null" EXIT
|
||||
wait $UI_PID
|
||||
- bash e2e/stack.sh start
|
||||
- bash e2e/seed.sh
|
||||
|
||||
e2e:down:
|
||||
desc: Stop the local e2e stack
|
||||
cmds:
|
||||
- bash e2e/stack.sh stop
|
||||
|
||||
e2e:check:
|
||||
desc: List browser checks; use -- all or -- CHECK to run, add --headed to watch
|
||||
cmds:
|
||||
- node e2e/run.cjs {{.CLI_ARGS}}
|
||||
|
||||
canary:rehearse:
|
||||
# Local rehearsal only: spins up its own registry, database and host, and
|
||||
# is deliberately absent from check and CI.
|
||||
desc: Rehearse the release-canary loop on a throwaway local host (needs docker; never part of the gate)
|
||||
cmds:
|
||||
- sh tools/canary-rehearse.sh
|
||||
|
||||
build:
|
||||
desc: Build archie services and agent binaries
|
||||
deps: [ui]
|
||||
vars:
|
||||
GATEWAY_VERSION: '{{.GATEWAY_VERSION | default "dev"}}'
|
||||
RUNTIME_VERSION: '{{.RUNTIME_VERSION | default "dev"}}'
|
||||
GATEWAY_VERSION: '{{.GATEWAY_VERSION | default .VERSION}}'
|
||||
RUNTIME_VERSION: '{{.RUNTIME_VERSION | default .VERSION}}'
|
||||
SERVICE_LDFLAGS: >-
|
||||
-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.Runtime={{.RUNTIME_VERSION}}
|
||||
sources:
|
||||
- Taskfile.yml
|
||||
- "**/*.go"
|
||||
# Files the binaries embed.
|
||||
- "internal/**/*.sql"
|
||||
- "internal/**/*.yaml"
|
||||
- "internal/**/*.json"
|
||||
- "internal/**/*.tpl"
|
||||
- "internal/**/*.md"
|
||||
- go.mod
|
||||
- go.sum
|
||||
- "ui/dist/**"
|
||||
@@ -256,26 +258,33 @@ tasks:
|
||||
- "{{.BIN_DIR}}/archie-messaging"
|
||||
- "{{.BIN_DIR}}/archie-agent"
|
||||
cmds:
|
||||
# One flag set for every service, matching scripts/archie-update-install
|
||||
# and the release workflow, so each binary reports the same version.
|
||||
# One flag set for every service, matching the release workflow, so each
|
||||
# binary reports the same version.
|
||||
- for: [archied, archie-gateway, archie-state-store, archie-ui, archie-messaging]
|
||||
cmd: go build -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
|
||||
cmd: go build -trimpath -ldflags "{{.SERVICE_LDFLAGS}}" -o {{.BIN_DIR}}/{{.ITEM}} ./cmd/{{.ITEM}}
|
||||
- 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
|
||||
|
||||
test:
|
||||
desc: Run short Go tests with caching
|
||||
desc: Run Go tests; the release gate passes TEST_FLAGS=-count=1
|
||||
cmds:
|
||||
- go test -short ./...
|
||||
- go test {{.TEST_FLAGS | default "-short"}} ./...
|
||||
|
||||
test:full:
|
||||
desc: Run the whole Go test suite uncached, including the wall-clock-bound tests
|
||||
image:agent:
|
||||
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:
|
||||
- go test ./... -count=1
|
||||
- RUNTIME_VERSION={{.VERSION}} docker compose build agent
|
||||
|
||||
check:
|
||||
desc: Run the full quality gate
|
||||
# Finish mutations before starting parallel checks.
|
||||
cmds:
|
||||
# Node packages land under ui/, which `go test ./...` walks: installing
|
||||
# them while the parallel checks scan the tree makes a lockfile update
|
||||
# delete Go sources mid-walk. Install first, then fan out. Every Go step
|
||||
# embeds ui/dist, so the dashboard is built before any of them.
|
||||
- task: ui
|
||||
- task: fmt
|
||||
- task: proto:check
|
||||
- task: db:check
|
||||
@@ -291,50 +300,33 @@ tasks:
|
||||
- task: build
|
||||
- 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:
|
||||
desc: Commit and tag the prepared release (VERSION=1.2.0)
|
||||
cmds:
|
||||
- tools/release.sh --version {{.VERSION}} --tag
|
||||
desc: "Turn [Unreleased] into a release, then commit and tag it (RELEASE=major|minor|patch|1.2.3)"
|
||||
requires:
|
||||
vars: [VERSION]
|
||||
|
||||
clean:
|
||||
desc: Remove build artifacts
|
||||
vars: [RELEASE]
|
||||
cmds:
|
||||
- rm -rf {{.BIN_DIR}}
|
||||
|
||||
docker-build:
|
||||
desc: Build the archie-agent sandbox image
|
||||
cmds:
|
||||
- docker compose build agent
|
||||
|
||||
docker-up:
|
||||
desc: Start the optional external NATS service via docker compose
|
||||
cmds:
|
||||
- docker compose up -d nats
|
||||
|
||||
docker-down:
|
||||
desc: Stop the docker compose stack
|
||||
cmds:
|
||||
- docker compose down
|
||||
|
||||
docker-logs:
|
||||
desc: Follow the NATS container logs
|
||||
cmds:
|
||||
- docker compose logs -f nats
|
||||
- |
|
||||
set -euo pipefail
|
||||
die() { echo "release: $*" >&2; exit 1; }
|
||||
[ "$(git rev-parse --abbrev-ref HEAD)" = main ] || die "releases are cut from main"
|
||||
[ -z "$(git status --porcelain)" ] || die "the working tree is dirty"
|
||||
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}"
|
||||
case "{{.RELEASE}}" in
|
||||
major) version="$((major + 1)).0.0" ;;
|
||||
minor) version="$major.$((minor + 1)).0" ;;
|
||||
patch) version="$major.$minor.$((patch + 1))" ;;
|
||||
*) version="$(echo "{{.RELEASE}}" | sed 's/^v//')" ;;
|
||||
esac
|
||||
echo "$version" | grep -Eq '^[0-9]+\.[0-9]+\.[0-9]+(-[0-9A-Za-z.]+)?$' || die "$version is not a version"
|
||||
! git rev-parse -q --verify "refs/tags/v$version" >/dev/null || die "v$version already exists"
|
||||
awk '/^## \[Unreleased\]/ { u = 1; next } u && /^## \[/ { exit } u && /^- / { found = 1 } END { exit !found }' CHANGELOG.md ||
|
||||
die "[Unreleased] in CHANGELOG.md has no entries"
|
||||
awk -v hdr="## [$version] - $(date -u +%F)" '{ print } /^## \[Unreleased\]/ { print ""; print hdr }' CHANGELOG.md >CHANGELOG.md.tmp
|
||||
mv CHANGELOG.md.tmp CHANGELOG.md
|
||||
go -C tools run -mod=readonly ./newsgen --repo-root ..
|
||||
git add CHANGELOG.md docs/news
|
||||
git commit -q -m "chore(release): v$version"
|
||||
git tag -a "v$version" -m "v$version"
|
||||
echo "tagged v$version"
|
||||
+56
-16
@@ -21,7 +21,6 @@ steps:
|
||||
- id: plan
|
||||
type: agent.run
|
||||
settings:
|
||||
role: planner
|
||||
read_only: true
|
||||
mission: |
|
||||
Plan this change: {{ task.prompt }}
|
||||
@@ -72,7 +71,7 @@ Any string setting may contain `{{ path }}`, replaced when the step runs:
|
||||
| `task.repository` | `owner/name`. |
|
||||
| `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.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. |
|
||||
| `inputs.<name>` | A declared input; an undeclared one is refused at save. |
|
||||
| `steps.<id>.summary` | What an earlier step reported, e.g. an agent's finish summary or a gate's output. |
|
||||
@@ -109,7 +108,7 @@ it. Parallel steps do not nest, and need at least two branches.
|
||||
### How a run ends
|
||||
|
||||
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
|
||||
completes, with the last step's summary as its detail. A step that fails parks
|
||||
the run unless it continues on failure.
|
||||
@@ -135,7 +134,7 @@ _runs without a repository._
|
||||
| `protect_tests` | bool | Write-block the repository test files. |
|
||||
| `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. |
|
||||
| `role` | text | Which configured model role runs the agent, e.g. builder or planner. Empty means builder. |
|
||||
| `model` | text | The model alias that runs the agent, e.g. default or fast. Empty means default. |
|
||||
|
||||
### `command.run`
|
||||
|
||||
@@ -157,6 +156,15 @@ _needs a repository._
|
||||
| `push` | bool | Push the branch after committing. |
|
||||
| `reference` | `Fixes` \| `Implements` \| `Refs` | How the commit links to the task issue. |
|
||||
|
||||
Hooks never run. The commit is created by go-git, which ignores `.git/hooks`
|
||||
and `core.hooksPath`, and 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 and 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`
|
||||
|
||||
_needs a repository._
|
||||
@@ -174,6 +182,18 @@ _needs a repository._
|
||||
|---|---|---|
|
||||
| `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`
|
||||
|
||||
_needs a repository._
|
||||
@@ -182,12 +202,6 @@ _needs a repository._
|
||||
|---|---|---|
|
||||
| `rules` | list of mapping | Patterns the change must not match. |
|
||||
|
||||
### `gate.diff-size`
|
||||
|
||||
_needs a repository._
|
||||
|
||||
No settings.
|
||||
|
||||
### `gate.repository`
|
||||
|
||||
_needs a repository._
|
||||
@@ -212,13 +226,30 @@ _runs without a repository._
|
||||
| `body` | text | The comment text. |
|
||||
| `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. References are filled in. |
|
||||
|
||||
A scheduled message is a schedule bound to a workflow whose only step is
|
||||
`message.send`.
|
||||
|
||||
### `workflow.approve`
|
||||
|
||||
_runs without a repository._
|
||||
|
||||
| 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. |
|
||||
|
||||
### `review.pr`
|
||||
@@ -247,11 +278,15 @@ _runs without a repository._
|
||||
|
||||
| Setting | Type | Meaning |
|
||||
|---|---|---|
|
||||
| `inputs` | mapping | |
|
||||
| `outputs` | mapping | |
|
||||
| `inputs` | mapping | Callee input names mapped to scalar literals or `inputs.<name>` references to caller inputs. |
|
||||
| `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. |
|
||||
| `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`
|
||||
|
||||
_runs without a repository._
|
||||
@@ -259,7 +294,7 @@ _runs without a repository._
|
||||
| Setting | Type | Meaning |
|
||||
|---|---|---|
|
||||
| `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`
|
||||
|
||||
@@ -284,10 +319,15 @@ expressions that limit which files the rule applies to.
|
||||
else runs `triage`, which classifies it and hands off.
|
||||
- **Event bindings**: a webhook source mapped onto a workflow and its inputs
|
||||
(Events page).
|
||||
- **Schedules**: each firing is captured 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 kind and labels) and actions that dispatch
|
||||
workflows.
|
||||
- **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.
|
||||
|
||||
The canvas Start node lists the triggers of each workflow.
|
||||
@@ -15,10 +15,23 @@ import (
|
||||
"syscall"
|
||||
|
||||
"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
|
||||
|
||||
// runHold blocks until signalled and exits 0. It is the keepalive for a Kit
|
||||
// container that runs no worker: the agent binary is archie's own and is
|
||||
// mounted into every Kit, so the container needs no binary the image may not
|
||||
// ship, and holds no environment of its own.
|
||||
func runHold() int {
|
||||
ctx, stop := signal.NotifyContext(context.Background(), os.Interrupt, syscall.SIGTERM)
|
||||
defer stop()
|
||||
<-ctx.Done()
|
||||
return 0
|
||||
}
|
||||
|
||||
func main() {
|
||||
os.Exit(run())
|
||||
}
|
||||
@@ -28,6 +41,9 @@ func run() int {
|
||||
}
|
||||
|
||||
func runCommand(args []string, getenv func(string) string, stderr io.Writer, runWorker workerRunner) int {
|
||||
if len(args) > 0 && args[0] == "hold" {
|
||||
return runHold()
|
||||
}
|
||||
if len(args) > 0 && args[0] == "relay" {
|
||||
return runRelay(args[1:], stderr, agentworker.RunRelay)
|
||||
}
|
||||
@@ -39,12 +55,19 @@ func runCommand(args []string, getenv func(string) string, stderr io.Writer, run
|
||||
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)")
|
||||
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 errors.Is(err, flag.ErrHelp) {
|
||||
return 0
|
||||
}
|
||||
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)
|
||||
if natsURL == "" {
|
||||
@@ -53,7 +76,7 @@ func runCommand(args []string, getenv func(string) string, stderr io.Writer, run
|
||||
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)
|
||||
defer stop()
|
||||
|
||||
@@ -76,6 +99,10 @@ func runCommand(args []string, getenv func(string) string, stderr io.Writer, run
|
||||
NATSToken: natsToken,
|
||||
StateStoreTarget: stateStoreURL,
|
||||
StateStoreToken: stateStoreToken,
|
||||
StateStoreCA: []byte(getenv("STATE_STORE_CA")),
|
||||
ModelProxy: getenv(egress.ModelProxyEnv),
|
||||
ModelProxyHosts: egress.ParseHosts(getenv(egress.ModelProxyHostsEnv)),
|
||||
ModelProxyCA: getenv(egress.ModelProxyCAEnv),
|
||||
}, log); err != nil {
|
||||
return 1
|
||||
}
|
||||
|
||||
@@ -22,7 +22,6 @@ func run() int {
|
||||
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.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()
|
||||
showVersion()
|
||||
ctx, stop := signal.NotifyContext(context.Background(), os.Interrupt, syscall.SIGTERM)
|
||||
|
||||
@@ -0,0 +1,39 @@
|
||||
// The Messaging Service reaches the State Store and the workflow engine only
|
||||
// through their contracts. Go imports are atomic, so one reference relinks a
|
||||
// runtime, and the boundary holds only while something re-measures it.
|
||||
|
||||
package main
|
||||
|
||||
import (
|
||||
"context"
|
||||
"os/exec"
|
||||
"strings"
|
||||
"testing"
|
||||
"time"
|
||||
)
|
||||
|
||||
func TestMessagingDoesNotLinkStoreOrWorkflowRuntime(t *testing.T) {
|
||||
ctx, cancel := context.WithTimeout(context.Background(), 30*time.Second)
|
||||
defer cancel()
|
||||
out, err := exec.CommandContext(ctx, "go", "list", "-deps", ".").Output()
|
||||
if err != nil {
|
||||
t.Fatalf("go list -deps .: %v", err)
|
||||
}
|
||||
linked := map[string]bool{}
|
||||
for line := range strings.SplitSeq(strings.TrimSpace(string(out)), "\n") {
|
||||
linked[line] = true
|
||||
}
|
||||
for _, pkg := range []string{
|
||||
"github.com/jackc/pgx/v5/pgxpool",
|
||||
"github.com/samcharles93/archie-core/internal/infrastructure/postgres",
|
||||
"github.com/samcharles93/archie-core/internal/infrastructure/controlplanestore",
|
||||
"github.com/samcharles93/archie-core/internal/domain/workflow",
|
||||
"github.com/samcharles93/archie-core/internal/agentexec",
|
||||
} {
|
||||
t.Run(pkg, func(t *testing.T) {
|
||||
if linked[pkg] {
|
||||
t.Errorf("cmd/archie-messaging links %s: services reach each other only through contracts", pkg)
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
@@ -23,11 +23,8 @@ func run() int {
|
||||
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.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.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.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.ShutdownTimeout, "shutdown-timeout", 0, "shutdown timeout (default 5s)")
|
||||
flag.Parse()
|
||||
|
||||
@@ -34,7 +34,6 @@ func run() int {
|
||||
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.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.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")
|
||||
|
||||
@@ -0,0 +1,41 @@
|
||||
// This file enforces the dashboard's process boundary
|
||||
// (docs/prds/external-agent-harness.md, "Session contract", Transport): the
|
||||
// dashboard must not link the container or daemon internals, because only the
|
||||
// daemon owns containers. Go imports are atomic, so a single reference
|
||||
// relinks a runtime, and the boundary holds only while something re-measures
|
||||
// it. archie-core-h3s0 names this check; it was purged with the test suite and
|
||||
// is restored here.
|
||||
|
||||
package main
|
||||
|
||||
import (
|
||||
"context"
|
||||
"os/exec"
|
||||
"strings"
|
||||
"testing"
|
||||
"time"
|
||||
)
|
||||
|
||||
func TestDashboardDoesNotLinkContainerRuntime(t *testing.T) {
|
||||
ctx, cancel := context.WithTimeout(context.Background(), 30*time.Second)
|
||||
defer cancel()
|
||||
out, err := exec.CommandContext(ctx, "go", "list", "-deps", ".").Output()
|
||||
if err != nil {
|
||||
t.Fatalf("go list -deps .: %v", err)
|
||||
}
|
||||
linked := map[string]bool{}
|
||||
for line := range strings.SplitSeq(strings.TrimSpace(string(out)), "\n") {
|
||||
linked[line] = true
|
||||
}
|
||||
for _, pkg := range []string{
|
||||
"github.com/samcharles93/archie-core/internal/container",
|
||||
"github.com/samcharles93/archie-core/internal/app/archied",
|
||||
"github.com/samcharles93/archie-core/internal/agentexec",
|
||||
} {
|
||||
t.Run(pkg, func(t *testing.T) {
|
||||
if linked[pkg] {
|
||||
t.Errorf("cmd/archie-ui links %s: only the daemon owns containers", pkg)
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
@@ -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.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.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.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.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.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.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.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
|
||||
|
||||
+32
-17
@@ -2,34 +2,49 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"os"
|
||||
"strings"
|
||||
|
||||
"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, playbooks"
|
||||
|
||||
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
|
||||
// parsed: it writes a first-run config.toml and must not touch the
|
||||
// store, NATS, or the running daemon's configuration.
|
||||
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" {
|
||||
os.Exit(archied.RunUpdate(args[1:], os.Stdout, os.Stderr))
|
||||
if len(args) > 0 {
|
||||
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)
|
||||
case "playbooks":
|
||||
return archieplaybooks.Run(args[1:], os.Stderr)
|
||||
}
|
||||
// A word that is not a subcommand is refused rather than ignored: a
|
||||
// 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-image" {
|
||||
os.Exit(archied.RunUpdateImage(args[1:], os.Stderr))
|
||||
}
|
||||
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" {
|
||||
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())
|
||||
return archied.Run()
|
||||
}
|
||||
+74
-456
@@ -1,495 +1,113 @@
|
||||
# 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}
|
||||
# reference resolved through a secrets engine at startup.
|
||||
# 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.
|
||||
# Secrets are never written here: each is a {engine, key} reference. The
|
||||
# built-in "env" engine reads key as an environment variable.
|
||||
|
||||
# work_dir = "~/.local/share/archie/work" # default
|
||||
# state_dir = "~/.local/share/archie" # default; embedded NATS store, task logs, disk probe
|
||||
|
||||
# The PostgreSQL connection archie-state-store, archied and archie-gateway
|
||||
# serve from. Required: each fails closed without it.
|
||||
# `docker compose up -d postgres` starts a matching local postgres:18 with this
|
||||
# default URL.
|
||||
# database_url = "postgres://archie:archie@127.0.0.1:5432/archie?sslmode=disable"
|
||||
|
||||
# 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
|
||||
# database_url = "postgres://archie:archie@localhost:5432/archie?sslmode=disable"
|
||||
# work_dir = "~/.local/share/archie/work"
|
||||
# state_dir = "~/.local/share/archie"
|
||||
|
||||
poll_interval = "60s"
|
||||
label = "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]
|
||||
# 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"
|
||||
host = "https://github.com"
|
||||
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.
|
||||
# intake = "poll" # "poll", "webhook" or "both"
|
||||
# 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]
|
||||
# Can be of "assignee", "label", or "either"
|
||||
# this sets the method archie uses to pick up tasks.
|
||||
trigger = "assignee"
|
||||
trigger = "assignee" # "assignee", "label" or "either"
|
||||
ack_reaction = "eyes" # "off" for none
|
||||
|
||||
# Optionally set a reaction to show that archie has picked up a task.
|
||||
# setting this to "off" disables the pickup reactions.
|
||||
ack_reaction = "eyes"
|
||||
|
||||
[models] # role -> ai-sdk runtime ref (used by agent workflows)
|
||||
[models]
|
||||
triage = "openai/gpt-5.4"
|
||||
planner = "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]
|
||||
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]
|
||||
max_steps = 60
|
||||
wall_clock = "30m" # one agent call
|
||||
wall_clock = "30m" # one agent call
|
||||
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]
|
||||
target = "127.0.0.1:8585" # archie-gateway's gRPC address (always remote once set)
|
||||
# listen = "127.0.0.1:8585" # The address archie-gateway BINDS. Read only by the
|
||||
# # 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.
|
||||
target = "127.0.0.1:8585"
|
||||
# listen = "127.0.0.1:8585"
|
||||
|
||||
[services.state]
|
||||
target = "127.0.0.1:9090" # REQUIRED. The State Store gRPC address archied and
|
||||
# # archie-gateway dial. They own no task data
|
||||
# # in-process: the standalone archie-state-store process
|
||||
# # owns it in PostgreSQL. An empty target is a startup error.
|
||||
# listen = "127.0.0.1:9090" # The address archie-state-store BINDS. Read only by that
|
||||
# # process; every client ignores it. Defaults to the target
|
||||
# # 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.
|
||||
target = "127.0.0.1:9090"
|
||||
# listen = "127.0.0.1:9090"
|
||||
|
||||
# [tls]
|
||||
# ca_file = "/etc/archie/tls/ca.pem"
|
||||
# cert_dir = "/etc/archie/tls"
|
||||
|
||||
# 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]
|
||||
# mode = "embedded" # "embedded" | "external"
|
||||
# url = "nats://localhost:4222" # required when mode = "external"
|
||||
# token_env = "NATS_TOKEN" # optional external-server credential; embedded generates one per start
|
||||
# mode = "embedded" # or "external" with url
|
||||
# url = "nats://localhost:4222"
|
||||
# token_env = "NATS_TOKEN"
|
||||
|
||||
# Unbound webhook capture: POST /webhooks/capture/{source} accepts and
|
||||
# stores any inbound payload archie doesn't yet have a binding for, so it can
|
||||
# be inspected and mapped later.
|
||||
# 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
|
||||
# [log]
|
||||
# file = "~/.local/share/archie/logs/archied.log"
|
||||
# level = "info"
|
||||
|
||||
# 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]
|
||||
# encryption_key = { engine = "env", key = "ARCHIE_BINDING_KEY" }
|
||||
# previous_encryption_keys = [ { engine = "env", key = "ARCHIE_BINDING_KEY_OLD" } ]
|
||||
# encryption_key = { engine = "env", key = "ARCHIE_BINDING_KEY" }
|
||||
|
||||
# Docker sandbox execution of archie-agent is mandatory for autonomous
|
||||
# workflows. Omit this section to use the default image, lifetimes, and pull
|
||||
# policy; the options below show the available overrides. If Docker or
|
||||
# the image is unavailable, chat and the dashboard still start while tasks
|
||||
# park explicitly; archied never falls back to a host agent loop.
|
||||
# [containers]
|
||||
# image = "ghcr.io/samcharles93/archie-agent:latest"
|
||||
# max_concurrency = 4 # optional cap; 0/absent means no global cap
|
||||
# max_uptime = "60m" # container lifetime cap
|
||||
# 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"}
|
||||
# Access records: how long a recorded access denial is kept before the State
|
||||
# Store's sweep deletes it. Zero means 90 days.
|
||||
# [access]
|
||||
# denial_retention = "2160h"
|
||||
|
||||
# At least one [[repos]] entry is required before archied will poll
|
||||
# anything -- it is deliberately left commented rather than shipped active:
|
||||
# an active example here validates as a normal, working repo (owner/name are
|
||||
# only checked for non-empty), so archied would silently start polling a
|
||||
# repository that doesn't exist. archied setup does not write this section
|
||||
# ([[repos]] is an array of tables, which the text-patching setup uses
|
||||
# cannot target) -- add at least one entry by hand.
|
||||
#
|
||||
# [[repos]]
|
||||
# owner = "your-github-username"
|
||||
# name = "todo"
|
||||
# base = "main"
|
||||
# ecosystem = "go" # "go", "python", "node", "rust", or "custom"
|
||||
# # Override the ecosystem defaults when needed:
|
||||
# # preflight = [["go", "version"]]
|
||||
# # test_glob = "*_test.go"
|
||||
# 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
|
||||
# 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"
|
||||
|
||||
# ── 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.
|
||||
# Long-running agent loops that maintain memory, skills and — in dry run —
|
||||
# file follow-up issues from recent runs. Definitions are data: the server
|
||||
# validates them and the gateway applies them live.
|
||||
# [[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, each tied to the run that produced it.
|
||||
# Do not create issues.
|
||||
# """
|
||||
# To let it file: add "issue_create" to tools and tell it to file each
|
||||
# candidate (citing the run) instead of only reporting it.
|
||||
+44
-40
@@ -19,18 +19,22 @@ daemon, and `archied playbooks serve` is its language server for editors.
|
||||
Without `archie-messaging` the channels are simply absent, so it needs a unit
|
||||
of its own (`deployments/systemd-user-service.md`).
|
||||
|
||||
`archie-agent` (the per-task sandboxed runtime) is **not** in this archive —
|
||||
it only ever runs inside the Docker container `archied` spawns per task, never
|
||||
as a host binary. Pull it from GHCR: `ghcr.io/samcharles93/archie-agent`.
|
||||
`archie-agent` (the per-task sandboxed runtime) has no unit of its own: it
|
||||
ships beside `archied` because a Kit run mounts it from that directory. The
|
||||
agent image is a separate thing, pulled for the containers `archied` spawns
|
||||
per task: `[containers].image` defaults to
|
||||
`git.catlow.cloud/sam/archie-agent:latest`, while this archive's `release.json`
|
||||
pins the digest the release published. Set `[containers].registry_auth` when
|
||||
that reference is on a registry that needs a login -- see
|
||||
`deployments/systemd-user-service.md#6-pinning-the-archie-agent-image`.
|
||||
|
||||
## Quickstart
|
||||
|
||||
1. Pick a starting configuration. The full set of annotated templates lives
|
||||
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),
|
||||
`single-forge-github.toml`, `multi-forge-github-gitea.toml` and
|
||||
`docker-nats-stack.toml` cover the common cases. Every one needs
|
||||
`single-forge-github.toml` and `docker-nats-stack.toml` cover the common cases. Every one needs
|
||||
PostgreSQL 18 at `database_url`. Copy whichever fits to:
|
||||
|
||||
```bash
|
||||
@@ -55,18 +59,13 @@ as a host binary. Pull it from GHCR: `ghcr.io/samcharles93/archie-agent`.
|
||||
./archied -config ~/.config/archie/config.toml
|
||||
```
|
||||
|
||||
Dashboard reachability comes from `[web].listen` (default
|
||||
`127.0.0.1:8484`, which needs no dashboard token). For a non-loopback
|
||||
bind pass `-listen` with `-token` or `-token-file` to mint and persist
|
||||
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).
|
||||
Open `[web].listen` (default `127.0.0.1:8484`) to configure the organisation,
|
||||
workspace and first administrator account. Remote access requires an HTTPS
|
||||
reverse proxy. Complete setup before exposing the dashboard publicly.
|
||||
|
||||
4. For a persistent, 24/7 deployment instead of a foreground run, follow the
|
||||
systemd user-unit runbook:
|
||||
<https://github.com/samcharles93/archie-core/blob/main/deployments/systemd-user-service.md>.
|
||||
<https://offloaded.dev>.
|
||||
|
||||
## Verifying an install
|
||||
|
||||
@@ -90,12 +89,15 @@ an install (or an upgrade across v1.30.0) needs its unit as well -- see
|
||||
|
||||
### Native self-update
|
||||
|
||||
`archie-update-install` downloads the approved release's Linux/amd64 archive
|
||||
and verifies its `SHA256SUMS` entry before executing or installing it. Releases
|
||||
must include `release.json`, all host binaries, and the two updater scripts.
|
||||
Older releases without this contract cannot be installed through the artifact
|
||||
path. `--from-source` (or `ARCHIE_UPDATE_SOURCE_BUILD=1`) explicitly clones and
|
||||
builds the selected release instead.
|
||||
Install on Settings → Status runs `archied update install -version X` against
|
||||
the release source in the update settings. It fetches release `vX`, refuses it
|
||||
unless the source's key signed its statement, and downloads the Linux/amd64 zip
|
||||
only if it hashes to the digest that statement names. Every host binary in the
|
||||
zip must report `X`. It then pulls the agent image the statement pins by digest, backs up the database to
|
||||
`db.pre-update.dump` in the state directory, 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
|
||||
the channel chosen under Settings → Status → Updates: stable, next (includes
|
||||
@@ -103,30 +105,32 @@ prereleases) or a pinned version. From a shell it reads
|
||||
`ARCHIE_UPDATE_RELEASE_CHANNEL` and `ARCHIE_UPDATE_PIN`, or `-channel` and `-pin`.
|
||||
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
|
||||
first-install and self-update. A missing unit or config section produces an
|
||||
ordered migration plan and refuses installation. Apply that plan before retrying.
|
||||
Automatic topology edits are intentionally unsupported.
|
||||
|
||||
The watchdog switches staged executables by rename, restarts services, and
|
||||
requires the candidate daemon's existing readiness registry to remain healthy
|
||||
for 120 seconds. Agent images come from the release manifest by digest. The
|
||||
image switch updates the control-plane policy, preserving other settings;
|
||||
rollback restores the prior image policy with conflict detection. Source builds
|
||||
use the built image's immutable image ID.
|
||||
The watchdog stops the units in reverse `release.json` order, switches the
|
||||
staged executables by rename, switches the control-plane image policy (only the
|
||||
image field, with conflict detection), and restarts the units in order through
|
||||
`systemctl --user`. archied must report the new version and stay healthy for
|
||||
120 seconds. Otherwise the watchdog restores the previous binaries and image
|
||||
policy. Data is not rolled back unless the new release migrated the database:
|
||||
then the previous binaries cannot serve it, so the pre-update backup is restored
|
||||
and the outcome report says that every write since the update began is gone.
|
||||
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
|
||||
the binary directory. `phase`, `environment`, `image.json` (when applicable),
|
||||
and `previous/` describe the transaction. A lock reports the owning process.
|
||||
On daemon boot, an interrupted transaction schedules independent recovery before
|
||||
normal startup. To recover manually, run `transaction/watchdog --recover` from
|
||||
that state directory. A failed recovery keeps the journal for another attempt.
|
||||
the binary directory: `transaction/journal.json`, `transaction/previous/`, and
|
||||
`transaction/archied`, the frozen copy of the archied that wrote the journal. On
|
||||
daemon boot, an interrupted transaction is
|
||||
handed to that frozen watchdog with `-recover` before normal startup: a
|
||||
transaction that never started is discarded, one that was switching or observing
|
||||
is rolled back, and a decided one is finished. 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
|
||||
PostgreSQL data are never automatically reversed.
|
||||
The database backup stays in the state directory after a committed update for
|
||||
manual recovery with `archie-state-store restore`.
|
||||
+18
-16
@@ -7,9 +7,6 @@ This directory contains configuration templates and guides for different deploym
|
||||
- **[`single-forge-github.toml`](./single-forge-github.toml)**:
|
||||
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
|
||||
automation with no forge or repositories, local Ollama models, loopback
|
||||
services and no tokens.
|
||||
@@ -52,10 +49,10 @@ PostgreSQL database `database_url` names and serves the `StateStore` gRPC
|
||||
contract. BOTH `archied` and `archie-gateway` dial it via
|
||||
`[services.state].target` and never open the task tables themselves. The templates set
|
||||
`[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
|
||||
Docker bridge gateway address plus a matching bearer token (`target_token` /
|
||||
`--token` / `STATE_STORE_TOKEN`), because a container cannot reach the host's
|
||||
loopback.
|
||||
(`127.0.0.1:9090`), while a container-mode agent needs the Docker bridge
|
||||
gateway address, because a container cannot reach the host's loopback. A
|
||||
non-loopback address needs `[tls]` certificates from your own CA; see
|
||||
`config.example.toml`.
|
||||
|
||||
## Running the dashboard
|
||||
|
||||
@@ -69,24 +66,29 @@ default). Start it after the Gateway and the State Store:
|
||||
archie-ui -config ~/.config/archie/config.toml
|
||||
```
|
||||
|
||||
A non-loopback `[web].listen` requires a dashboard token (`-token`, or
|
||||
`-token-file` to mint and persist one); a loopback bind needs none.
|
||||
Open the dashboard to configure the organisation, workspace and first administrator account.
|
||||
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
|
||||
(`POST /webhooks/capture/{source}`) is received by archie-ui and the
|
||||
binding-dispatch loop in `archied` consumes what arrives from the shared
|
||||
State Store.
|
||||
|
||||
Auth note: unlike `archied`, archie-ui has no secret registry --
|
||||
`GATEWAY_TOKEN`/`STATE_STORE_TOKEN` resolve from its process environment
|
||||
only (or from `[services.*].target_token` in `config.toml`), so whatever
|
||||
starts archie-ui must export those tokens into its environment. See the UI
|
||||
Service unit in `systemd-user-service.md` for the worked example.
|
||||
The dashboard speaks plain HTTP. A non-loopback bind therefore carries the
|
||||
session cookie and the provider token in clear over the network, and
|
||||
archie-ui warns about exactly that at startup. Terminate TLS in front of it
|
||||
(a reverse proxy or the tunnel itself) and set
|
||||
`[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
|
||||
# loopback (host-only agent)
|
||||
archie-state-store -config ~/.config/archie/config.toml -listen 127.0.0.1:9090
|
||||
# or container-mode: bind the bridge gateway with a token
|
||||
archie-state-store -config ~/.config/archie/config.toml -listen 172.17.0.1:9090 -token <token>
|
||||
# or container-mode: bind the bridge gateway ([tls] required)
|
||||
archie-state-store -config ~/.config/archie/config.toml -listen 172.17.0.1:9090
|
||||
```
|
||||
|
||||
## Verifying the daemon
|
||||
|
||||
+24
-3
@@ -25,13 +25,34 @@ listen = "127.0.0.1:8484"
|
||||
# when a port is already taken on the host -- before the
|
||||
# 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.
|
||||
#
|
||||
# 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]
|
||||
target = "127.0.0.1:9091"
|
||||
listen = "127.0.0.1:9091"
|
||||
target = "172.17.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:
|
||||
# the listen below is what it binds. Stated explicitly so the value archie-ui
|
||||
# dials is visible next to the State Store one.
|
||||
[services.gateway]
|
||||
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,7 +13,6 @@
|
||||
|
||||
poll_interval = "60s"
|
||||
bot_user = "archie"
|
||||
diff_cap_lines = 0
|
||||
work_dir = "~/.local/share/archie/work"
|
||||
state_dir = "~/.local/share/archie" # NATS store, task logs
|
||||
# The State Store's PostgreSQL connection (PostgreSQL 18, required).
|
||||
@@ -26,13 +25,15 @@ 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.
|
||||
# This deployment runs the agent in containers, so the target is the Docker
|
||||
# bridge gateway (172.17.0.1) the container can reach. A non-loopback address
|
||||
# needs [tls]; see config.example.toml.
|
||||
[services.state]
|
||||
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]
|
||||
type = "gitea"
|
||||
@@ -60,11 +61,13 @@ url = "nats://172.19.0.1:4222"
|
||||
network = "archie-core_default"
|
||||
# Pin your own registry's tag/digest -- never deploy against a bare
|
||||
# ":latest" reference, which can change under a running deployment with no
|
||||
# warning. See deployments/systemd-user-service.md#pinning-the-archie-agent-image
|
||||
# for the pinning convention this repo follows for its own GHCR image.
|
||||
# warning. See deployments/systemd-user-service.md#6-pinning-the-archie-agent-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
|
||||
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
|
||||
# private registry answers 401 because the daemon sends no credentials, so
|
||||
# refresh the agent by hand: docker compose pull agent
|
||||
|
||||
@@ -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"
|
||||
@@ -15,7 +15,6 @@ poll_interval = "60s"
|
||||
label = "archie"
|
||||
bot_user = "archie-bot"
|
||||
bot_email = "archie-bot@users.noreply.github.com"
|
||||
diff_cap_lines = 400
|
||||
|
||||
# The Gateway Service owns conversational state and serves ChatContract over
|
||||
# gRPC. Run archie-gateway alongside archied and archie-ui (the dashboard
|
||||
@@ -25,16 +24,11 @@ target = "127.0.0.1:8585"
|
||||
|
||||
# The State Store gRPC service owns the PostgreSQL task data. archied and
|
||||
# archie-gateway dial it here and never open those tables themselves.
|
||||
# This deployment runs the
|
||||
# agent in containers, so the target must be the Docker bridge gateway address
|
||||
# (172.17.0.1) that the container can reach, and a non-loopback target requires
|
||||
# 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.
|
||||
# This deployment runs the agent in containers, so the target is the Docker
|
||||
# bridge gateway (172.17.0.1) the container can reach. A non-loopback address
|
||||
# needs [tls]; see config.example.toml.
|
||||
[services.state]
|
||||
target = "172.17.0.1:9090"
|
||||
target_token = "change-me-state-store-token"
|
||||
|
||||
[forge]
|
||||
type = "github"
|
||||
@@ -59,9 +53,9 @@ 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"
|
||||
# yet (a release publishes :latest and :sha-<commit>). See
|
||||
# deployments/systemd-user-service.md#6-pinning-the-archie-agent-image.
|
||||
image = "git.catlow.cloud/sam/archie-agent@sha256:<digest>"
|
||||
pull_policy = "missing"
|
||||
|
||||
[budgets]
|
||||
|
||||
@@ -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
|
||||
`archie-gateway` dial it via `[services.state].target` (see the `archied`
|
||||
config below) and never open the task tables themselves. A
|
||||
host-only agent uses the loopback bind with no token below; a container-mode
|
||||
agent needs the Docker bridge gateway address plus a bearer token via
|
||||
`--token`/`STATE_STORE_TOKEN` or `[services.state].target_token`, and a
|
||||
non-loopback bind fails closed without one:
|
||||
host-only agent uses the loopback bind below; a container-mode agent needs the
|
||||
Docker bridge gateway address, and a non-loopback bind needs `[tls]` (see
|
||||
`config.example.toml`):
|
||||
|
||||
`install.sh` writes `archie-state-store.service` with that loopback bind.
|
||||
|
||||
@@ -36,14 +35,12 @@ by `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
|
||||
without this unit runs on with dead channels and a daemon that looks perfectly
|
||||
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 names what is missing, which now fires
|
||||
for a host that drifted or predates this release rather than the normal path.
|
||||
|
||||
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
|
||||
`GATEWAY_TOKEN` and `STATE_STORE_TOKEN` from its process environment, hence the
|
||||
`EnvironmentFile`:
|
||||
channel settings, and reads the same `config.toml`, including `[tls]`.
|
||||
|
||||
`install.sh` writes `archie-messaging.service`. Its `After=` and `Wants=`
|
||||
lines only tidy the start sequence: nothing depends on that order, because
|
||||
@@ -53,46 +50,26 @@ each service waits for the peers it needs.
|
||||
|
||||
The dashboard is served by the standalone UI Service, not by `archied`. It reads the same `config.toml`, dials
|
||||
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
|
||||
mint and persist one);
|
||||
Open the dashboard to configure the organisation, workspace and first administrator account.
|
||||
Complete setup before exposing it publicly; remote access requires an HTTPS reverse proxy.
|
||||
|
||||
**Auth note:** unlike `archied`,
|
||||
`archie-ui` has no secret registry — it resolves `GATEWAY_TOKEN` and
|
||||
`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.
|
||||
**Auth note:** `archie-ui` authenticates to the Gateway, State Store and
|
||||
harness with its `[tls]` certificate (`archie-ui.pem`) from `config.toml`.
|
||||
|
||||
For supervision, `GET /healthz` on `[web].listen` is the process's liveness
|
||||
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.
|
||||
|
||||
`install.sh` writes `archie-ui.service`. It has no secret registry of its own,
|
||||
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
|
||||
```
|
||||
`install.sh` writes `archie-ui.service`. Browser accounts are configured through the dashboard.
|
||||
|
||||
`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
|
||||
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.
|
||||
|
||||
For a non-loopback bind, override the installed unit's `ExecStart` with
|
||||
`-token-file %h/.local/share/archie/web-token` (or `-token`) in a drop-in rather
|
||||
than editing the installer's copy in place.
|
||||
For remote access, configure a TLS reverse proxy and the instance public URL in
|
||||
Access → Authentication. Enrol passkeys from Your account on HTTPS or localhost.
|
||||
|
||||
---
|
||||
|
||||
@@ -157,9 +134,10 @@ Compose service or host `archie-agent` binary is required.
|
||||
|
||||
Docker must be installed and reachable by the service user. With no explicit
|
||||
broker or container settings, Archie defaults `containers.image` to
|
||||
`ghcr.io/samcharles93/archie-agent:latest`. Every profile shipped in
|
||||
`deployments/` overrides that default with a pinned reference -- see
|
||||
[Pinning the archie-agent image](#pinning-the-archie-agent-image) below. An
|
||||
`git.catlow.cloud/sam/archie-agent:latest`. `single-forge-github.toml` and
|
||||
`docker-nats-stack.toml` override that default with a pinned reference
|
||||
(`standalone.toml` and `dev.toml` leave it) -- see
|
||||
[Pinning the archie-agent image](#6-pinning-the-archie-agent-image) below. An
|
||||
explicit equivalent, pinned the same way, is:
|
||||
|
||||
```toml
|
||||
@@ -167,7 +145,7 @@ explicit equivalent, pinned the same way, is:
|
||||
mode = "embedded"
|
||||
|
||||
[containers]
|
||||
image = "ghcr.io/samcharles93/archie-agent@sha256:870f1b1357979cfea23fccacb24166ebeb9ab321708ef2c2b218a763ed99b090"
|
||||
image = "git.catlow.cloud/sam/archie-agent@sha256:<digest>"
|
||||
pull_policy = "missing"
|
||||
```
|
||||
|
||||
@@ -191,37 +169,66 @@ fall back to a host model loop.
|
||||
|
||||
## 6. Pinning the archie-agent Image
|
||||
|
||||
`ghcr.io/samcharles93/archie-agent:latest` is a moving target: every push to
|
||||
`main` that touches the runtime's package closure re-publishes it
|
||||
(`.github/workflows/deploy.yml`), so `latest` can change under a running
|
||||
deployment with no warning and no way to reproduce a prior build.
|
||||
`archie-agent:latest` is a moving target: every release re-publishes it, so it
|
||||
can change under a running deployment with no warning and no way to reproduce a
|
||||
prior build. Two paths publish it, to different references:
|
||||
|
||||
As of this writing, `archie-agent` has **no published semantic-version tag**
|
||||
-- CI only pushes `:latest` to GHCR (`archied` is versioned independently per
|
||||
`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:
|
||||
- `.github/workflows/deploy.yml` publishes `git.catlow.cloud/sam/archie-agent`
|
||||
as `:latest` and `:sha-<commit>` when the commit carries a release tag; an
|
||||
ordinary push to `main` publishes nothing for the agent image.
|
||||
- `tools/publish.sh`, run by hand for a release, publishes
|
||||
`git.catlow.cloud/sam/archie-agent` as `:latest` and `:sha-<commit>`, which is
|
||||
the registry the shipped default above names.
|
||||
|
||||
A distribution zip pins whichever one its own release published, by digest, in
|
||||
`release.json`; `archied update install` then pulls exactly that.
|
||||
|
||||
As of this writing, `archie-agent` has **no published semantic-version tag** --
|
||||
both paths publish only `:latest` and an immutable `:sha-<commit>` (`archied`
|
||||
is versioned independently per `RELEASING.md`, but that versioning is not yet
|
||||
reflected as a registry tag for the agent image). Until one publishes it, the
|
||||
only reproducible reference is a content digest, resolved once and pinned
|
||||
explicitly:
|
||||
|
||||
```toml
|
||||
[containers]
|
||||
image = "ghcr.io/samcharles93/archie-agent@sha256:870f1b1357979cfea23fccacb24166ebeb9ab321708ef2c2b218a763ed99b090"
|
||||
image = "git.catlow.cloud/sam/archie-agent@sha256:<digest>"
|
||||
```
|
||||
|
||||
This is the digest `latest` resolved to on 2026-09-05. Digest pinning is the
|
||||
strongest option for production: it is immutable and independently
|
||||
verifiable (`docker manifest inspect ghcr.io/samcharles93/archie-agent@sha256:...`),
|
||||
verifiable (`docker manifest inspect git.catlow.cloud/sam/archie-agent@sha256:...`),
|
||||
at the cost of being opaque in a config file a human is meant to edit --
|
||||
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`
|
||||
(e.g. `ghcr.io/samcharles93/archie-agent:v1.21.0`), prefer that tag for
|
||||
(e.g. `git.catlow.cloud/sam/archie-agent:v1.21.0`), prefer that tag for
|
||||
day-to-day config readability, and reserve digest pinning for deployments
|
||||
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).
|
||||
|
||||
A reference on a registry that needs a login needs the credential in
|
||||
`[containers].registry_auth` -- the release's own
|
||||
`git.catlow.cloud/sam/archie-agent` digest is one, since an anonymous pull
|
||||
cannot reach it:
|
||||
|
||||
```toml
|
||||
[containers]
|
||||
registry_auth = {engine = "env", key = "ARCHIE_REGISTRY_AUTH"}
|
||||
```
|
||||
|
||||
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; a value that cannot be read 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
|
||||
rebuilding it and restores that image if the restarted daemon fails its health
|
||||
check. A custom image reference is therefore supported directly in
|
||||
|
||||
+22
-8
@@ -8,7 +8,7 @@
|
||||
# Embedded NATS is the normal deployment and needs no Compose service.
|
||||
# State Store DB: docker compose up -d postgres
|
||||
# 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
|
||||
# Stop external: docker compose down
|
||||
# Logs: journalctl --user -u archied -f (the daemon)
|
||||
@@ -44,10 +44,18 @@ services:
|
||||
# ── NATS JetStream ────────────────────────────────────────────────
|
||||
nats:
|
||||
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 refuses to start without a token. Set
|
||||
# NATS_TOKEN here and name the same value in [nats] token_env.
|
||||
entrypoint:
|
||||
- sh
|
||||
- -c
|
||||
- '[ -n "$$NATS_TOKEN" ] || { echo "NATS_TOKEN is required" >&2; exit 1; }; exec nats-server -js -m 8222 --auth "$$NATS_TOKEN"'
|
||||
environment:
|
||||
NATS_TOKEN: ${NATS_TOKEN:-}
|
||||
ports:
|
||||
- "4222:4222" # client
|
||||
- "8222:8222" # monitoring (http://localhost:8222)
|
||||
- "127.0.0.1:8222:8222" # monitoring (http://localhost:8222)
|
||||
volumes:
|
||||
- nats_data:/data
|
||||
restart: unless-stopped
|
||||
@@ -67,7 +75,7 @@ services:
|
||||
# "Started", which reads like a crash loop. Naming the service explicitly
|
||||
# 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
|
||||
#
|
||||
# Routine freshness is handled by the daemon, which pulls this image per
|
||||
@@ -78,10 +86,16 @@ services:
|
||||
build:
|
||||
context: .
|
||||
dockerfile: Dockerfile
|
||||
# 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
|
||||
# Stamped into the agent so the version it reports is the one the rest of
|
||||
# the install reports. `task image:agent` passes this checkout's version;
|
||||
# a bare `docker build` passes nothing and the agent answers dev.
|
||||
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 ─────────────────────────────────────
|
||||
# The agent image plus network lookup tools, for a workflow that names
|
||||
|
||||
+19
-9
@@ -1,8 +1,12 @@
|
||||
# Generating a GitHub Token for Archie Core
|
||||
|
||||
This guide walks you through creating a GitHub Personal Access Token (PAT) for Archie Core.
|
||||
This guide walks you through creating a GitHub Personal Access Token (PAT) for
|
||||
Archie Core.
|
||||
|
||||
> **Important**: Archie Core requires a **Classic Personal Access Token** (starts with `ghp_...`). Fine-grained PATs currently lack necessary scope permissions for Git HTTP push operations, repository invitation acceptance, and cross-repository operations needed by the orchestrator.
|
||||
> **Important**: Archie Core requires a **Classic Personal Access Token**
|
||||
> (starts with `ghp_...`). Fine-grained PATs currently lack necessary scope
|
||||
> permissions for Git HTTP push operations, repository invitation acceptance,
|
||||
> and cross-repository operations needed by the orchestrator.
|
||||
|
||||
---
|
||||
|
||||
@@ -11,23 +15,29 @@ This guide walks you through creating a GitHub Personal Access Token (PAT) for A
|
||||
Archie Core uses the GitHub API to:
|
||||
|
||||
1. Poll assigned or labelled issues (`archie:queued`).
|
||||
2. Update issue labels as tasks transition (`archie:working`, `archie:pr`, `archie:parked`).
|
||||
2. Update issue labels as tasks transition (`archie:working`, `archie:pr`,
|
||||
`archie:parked`).
|
||||
3. Post status comments and emoji reactions.
|
||||
4. Create branches, commit code changes, and open Pull Requests for human review.
|
||||
4. Create branches, commit code changes, and open Pull Requests for review.
|
||||
|
||||
---
|
||||
|
||||
## Step-by-Step Instructions: Creating a Classic Token
|
||||
|
||||
1. Navigate to [GitHub Settings → Developer Settings → Tokens (classic)](https://github.com/settings/tokens).
|
||||
1. Navigate to
|
||||
[GitHub Settings → Developer Settings → Tokens (classic)](https://github.com/settings/tokens).
|
||||
2. Click **Generate new token** → **Generate new token (classic)**.
|
||||
3. Set the **Note**: `Archie Core` (or your bot's name).
|
||||
4. Choose an **Expiration** (e.g. 90 days, 1 year, or No expiration for dedicated bot accounts).
|
||||
4. Choose an **Expiration** (e.g. 90 days, 1 year, or No expiration for
|
||||
dedicated bot accounts).
|
||||
5. Select the required scope:
|
||||
- **`repo`** (Full control of private repositories — required for polling, commenting, pushing branches, and opening PRs).
|
||||
- **`workflow`** (Optional — required if Archie needs to update GitHub Actions workflows).
|
||||
- **`repo`** (Full control of private repositories — required for polling,
|
||||
commenting, pushing branches, and opening PRs).
|
||||
- **`workflow`** (Optional — required if Archie needs to update GitHub
|
||||
Actions workflows).
|
||||
6. Scroll to the bottom and click **Generate token**.
|
||||
7. **Copy your token immediately** (starts with `ghp_...`). You won't be able to see it again!
|
||||
7. **Copy your token immediately** (starts with `ghp_...`). You won't be able to
|
||||
see it again!
|
||||
|
||||
---
|
||||
|
||||
|
||||
@@ -1,16 +1,15 @@
|
||||
# Building your first playbook binding
|
||||
|
||||
This walks through the whole no-code path the event-capture epic promises:
|
||||
point an external app's webhook at archie, see the real payload it sends,
|
||||
map the fields you care about, bind them to a workflow, and watch the next
|
||||
matching event turn into a task -- no code, no redeploy, no restart.
|
||||
This walks through the whole no-code path the event-capture epic promises: point
|
||||
an external app's webhook at archie, see the real payload it sends, map the
|
||||
fields you care about, bind them to a workflow, and watch the next matching
|
||||
event turn into a task -- no code, no redeploy, no restart.
|
||||
|
||||
## 1. Create a source and send a test event
|
||||
|
||||
Open **Events → Inspector** and click **New source**. Archie shows the
|
||||
source's URL and signing secret once; copy both. Point the external app's
|
||||
webhook at that URL. Send one real
|
||||
event however is easiest for a first test, e.g.:
|
||||
Open **Events → Inspector** and click **New source**. Archie shows the source's
|
||||
URL and signing secret once; copy both. Point the external app's webhook at that
|
||||
URL. Send one real event however is easiest for a first test, e.g.:
|
||||
|
||||
```bash
|
||||
curl -X POST http://localhost:8484/webhooks/capture/sentry \
|
||||
@@ -18,25 +17,25 @@ curl -X POST http://localhost:8484/webhooks/capture/sentry \
|
||||
-d '{"issue": {"title": "NullPointerException in checkout"}, "level": "error"}'
|
||||
```
|
||||
|
||||
This event isn't signed yet, so it's captured but marked **unauthenticated**
|
||||
-- visible for you to design against, but incapable of triggering anything: an unauthenticated event can never match a binding.
|
||||
This event isn't signed yet, so it's captured but marked **unauthenticated** --
|
||||
visible for you to design against, but incapable of triggering anything: an
|
||||
unauthenticated event can never match a binding.
|
||||
|
||||
## 2. Inspect the captured payload
|
||||
|
||||
Open the dashboard's **Event inspector** (`/captures`). Your test event
|
||||
appears there with its real body -- this is schema-by-example: you're
|
||||
looking at an actual payload from the actual sender, not guessing at a
|
||||
schema in advance.
|
||||
Open the dashboard's **Event inspector** (`/captures`). Your test event appears
|
||||
there with its real body -- this is schema-by-example: you're looking at an
|
||||
actual payload from the actual sender, not guessing at a schema in advance.
|
||||
|
||||
## 3. Map the fields you care about
|
||||
|
||||
Open **Field mappings** (`/mappings`) → **New mapping**. Pick your captured
|
||||
event from the dropdown, then click through its payload tree on the right --
|
||||
every key and value is clickable. Clicking a value binds it as a field
|
||||
(name, JSON path, and an inferred type you can change). Add whichever fields
|
||||
your workflow needs (e.g. the issue title), mark the ones that must be
|
||||
present as **Required**, hit **Preview** to confirm they resolve correctly
|
||||
against the real payload, then **Save**.
|
||||
every key and value is clickable. Clicking a value binds it as a field (name,
|
||||
JSON path, and an inferred type you can change). Add whichever fields your
|
||||
workflow needs (e.g. the issue title), mark the ones that must be present as
|
||||
**Required**, hit **Preview** to confirm they resolve correctly against the real
|
||||
payload, then **Save**.
|
||||
|
||||
## 4. Create the binding
|
||||
|
||||
@@ -46,20 +45,20 @@ Open **Playbook bindings** (`/bindings`) → **New binding**:
|
||||
- **Source** -- the same `<source>` segment from step 1 (e.g. `sentry`).
|
||||
- **Field mapping** -- the one you just saved.
|
||||
- **Workflow** -- which registered workflow should run on a match.
|
||||
- **Repo pin** (optional) -- leave both blank to use the single configured
|
||||
repo; set owner/repo explicitly if you run a multi-repo deployment.
|
||||
- **Shared secret** -- a real secret (16+ bytes), never `test1234`. The
|
||||
sender signs every request body with this via HMAC-SHA256 so archie can
|
||||
tell a genuine event from anyone who finds the URL.
|
||||
- **Repo pin** (optional) -- leave both blank to use the single configured repo;
|
||||
set owner/repo explicitly if you run a multi-repo deployment.
|
||||
- **Shared secret** -- a real secret (16+ bytes), never `test1234`. The sender
|
||||
signs every request body with this via HMAC-SHA256 so archie can tell a
|
||||
genuine event from anyone who finds the URL.
|
||||
|
||||
Save. The binding starts in **draft** -- nothing fires yet.
|
||||
|
||||
## 5. Approve it
|
||||
|
||||
A **draft** or freshly-**edited** binding needs an explicit human approval
|
||||
before it can ever match a live event -- this is deliberate, not a missing
|
||||
step: an operator authoring a binding is a considered act, an event arriving
|
||||
is not, and nothing should self-arm. Click **Approve**. Status becomes **armed**.
|
||||
A **draft** or freshly-**edited** binding needs explicit approval
|
||||
before it can ever match a live event -- this is deliberate, not a missing step:
|
||||
an operator authoring a binding is a considered act, an event arriving is not,
|
||||
and nothing should self-arm. Click **Approve**. Status becomes **armed**.
|
||||
|
||||
## 6. Fire it for real
|
||||
|
||||
@@ -77,16 +76,14 @@ curl -X POST http://localhost:8484/webhooks/capture/sentry \
|
||||
-d "$BODY"
|
||||
```
|
||||
|
||||
This event is captured as **authenticated**, matched against your armed
|
||||
binding, and dispatched into a new task through the exact same
|
||||
gate/worktree/sandbox pipeline every other task goes through. Check
|
||||
the **Tasks** page; a new task should appear, its body built from the fields
|
||||
your mapping resolved.
|
||||
This event is captured as **authenticated**, matched against your armed binding,
|
||||
and dispatched into a new task through the exact same gate/worktree/sandbox
|
||||
pipeline every other task goes through. Check the **Tasks** page; a new task
|
||||
should appear, its body built from the fields your mapping resolved.
|
||||
|
||||
## Editing a live binding
|
||||
|
||||
Any edit to an armed binding -- even a typo fix -- drops it back to
|
||||
**pending_approval** automatically. This can't be bypassed by editing; it
|
||||
has to be re-approved. When editing, leave the **Shared secret** field blank
|
||||
to keep the existing secret; only fill it in if you're deliberately
|
||||
rotating it.
|
||||
**pending_approval** automatically. This can't be bypassed by editing; it has to
|
||||
be re-approved. When editing, leave the **Shared secret** field blank to keep
|
||||
the existing secret; only fill it in if you're deliberately rotating it.
|
||||
@@ -0,0 +1,24 @@
|
||||
# PR review benchmark
|
||||
|
||||
```
|
||||
task bench:prreview
|
||||
```
|
||||
|
||||
Reviews the 38 runnable Martian pull requests once each at `deep` depth with the
|
||||
production pipeline, judges the posted comments against the golden comments in
|
||||
`internal/app/prbench/martian.json`, and writes
|
||||
`docs/benchmarks/pr-review-<timestamp>.md` (recall per PR, overall recall,
|
||||
precision, models, archie version). Commit that file with the run.
|
||||
|
||||
- Models come from the config at `~/.config/archie/config.toml`: the reviewer
|
||||
and judge both default to its `default` alias. Override with
|
||||
`task bench:prreview -- -model ALIAS_OR_PROVIDER/MODEL -judge-model ALIAS_OR_PROVIDER/MODEL`.
|
||||
Pick a judge other than the reviewer's model for an independent judgement.
|
||||
Aliases set only in the dashboard are not in the file; pass a `provider/model`
|
||||
ref instead.
|
||||
- Pull requests are public, so no credential is needed. `GH_TOKEN` or
|
||||
`GITHUB_TOKEN`, if set, only raises the GitHub API rate limit.
|
||||
- `-problems ID,ID` runs a partial smoke run; its report says it is not the
|
||||
acceptance run. A full run reports PASS when nothing failed and golden
|
||||
micro-recall is at least 0.70.
|
||||
- It is not part of `task test` and posts nothing to any pull request.
|
||||
@@ -68,8 +68,31 @@
|
||||
"/news/archie/1.48.0/": "/news/1.48.0/",
|
||||
"/news/archie/1.48.1/": "/news/1.48.1/",
|
||||
"/news/archie/1.49.0/": "/news/1.49.0/",
|
||||
"/news/archie/1.49.1/": "/news/1.49.1/",
|
||||
"/news/archie/1.49.2/": "/news/1.49.2/",
|
||||
"/news/archie/1.49.3/": "/news/1.49.3/",
|
||||
"/news/archie/1.49.4/": "/news/1.49.4/",
|
||||
"/news/archie/1.5.0/": "/news/1.5.0/",
|
||||
"/news/archie/1.50.0/": "/news/1.50.0/",
|
||||
"/news/archie/1.50.1/": "/news/1.50.1/",
|
||||
"/news/archie/1.51.0/": "/news/1.51.0/",
|
||||
"/news/archie/1.51.1/": "/news/1.51.1/",
|
||||
"/news/archie/1.52.0/": "/news/1.52.0/",
|
||||
"/news/archie/1.53.0/": "/news/1.53.0/",
|
||||
"/news/archie/1.54.0/": "/news/1.54.0/",
|
||||
"/news/archie/1.54.1/": "/news/1.54.1/",
|
||||
"/news/archie/1.54.2/": "/news/1.54.2/",
|
||||
"/news/archie/1.54.3/": "/news/1.54.3/",
|
||||
"/news/archie/1.55.0/": "/news/1.55.0/",
|
||||
"/news/archie/1.56.0/": "/news/1.56.0/",
|
||||
"/news/archie/1.57.0/": "/news/1.57.0/",
|
||||
"/news/archie/1.58.0/": "/news/1.58.0/",
|
||||
"/news/archie/1.58.1/": "/news/1.58.1/",
|
||||
"/news/archie/1.59.0/": "/news/1.59.0/",
|
||||
"/news/archie/1.6.0/": "/news/1.6.0/",
|
||||
"/news/archie/1.60.0/": "/news/1.60.0/",
|
||||
"/news/archie/1.61.0/": "/news/1.61.0/",
|
||||
"/news/archie/1.61.1/": "/news/1.61.1/",
|
||||
"/news/archie/1.7.0/": "/news/1.7.0/",
|
||||
"/news/archie/1.8.0/": "/news/1.8.0/",
|
||||
"/news/archie/1.9.0/": "/news/1.9.0/",
|
||||
@@ -153,8 +176,31 @@
|
||||
"/news/archied/1.48.0/": "/news/1.48.0/",
|
||||
"/news/archied/1.48.1/": "/news/1.48.1/",
|
||||
"/news/archied/1.49.0/": "/news/1.49.0/",
|
||||
"/news/archied/1.49.1/": "/news/1.49.1/",
|
||||
"/news/archied/1.49.2/": "/news/1.49.2/",
|
||||
"/news/archied/1.49.3/": "/news/1.49.3/",
|
||||
"/news/archied/1.49.4/": "/news/1.49.4/",
|
||||
"/news/archied/1.5.0/": "/news/1.5.0/",
|
||||
"/news/archied/1.50.0/": "/news/1.50.0/",
|
||||
"/news/archied/1.50.1/": "/news/1.50.1/",
|
||||
"/news/archied/1.51.0/": "/news/1.51.0/",
|
||||
"/news/archied/1.51.1/": "/news/1.51.1/",
|
||||
"/news/archied/1.52.0/": "/news/1.52.0/",
|
||||
"/news/archied/1.53.0/": "/news/1.53.0/",
|
||||
"/news/archied/1.54.0/": "/news/1.54.0/",
|
||||
"/news/archied/1.54.1/": "/news/1.54.1/",
|
||||
"/news/archied/1.54.2/": "/news/1.54.2/",
|
||||
"/news/archied/1.54.3/": "/news/1.54.3/",
|
||||
"/news/archied/1.55.0/": "/news/1.55.0/",
|
||||
"/news/archied/1.56.0/": "/news/1.56.0/",
|
||||
"/news/archied/1.57.0/": "/news/1.57.0/",
|
||||
"/news/archied/1.58.0/": "/news/1.58.0/",
|
||||
"/news/archied/1.58.1/": "/news/1.58.1/",
|
||||
"/news/archied/1.59.0/": "/news/1.59.0/",
|
||||
"/news/archied/1.6.0/": "/news/1.6.0/",
|
||||
"/news/archied/1.60.0/": "/news/1.60.0/",
|
||||
"/news/archied/1.61.0/": "/news/1.61.0/",
|
||||
"/news/archied/1.61.1/": "/news/1.61.1/",
|
||||
"/news/archied/1.7.0/": "/news/1.7.0/",
|
||||
"/news/archied/1.8.0/": "/news/1.8.0/",
|
||||
"/news/archied/1.9.0/": "/news/1.9.0/",
|
||||
|
||||
@@ -1,4 +1,119 @@
|
||||
[
|
||||
{
|
||||
"version": "1.61.1",
|
||||
"date": "2026-11-07",
|
||||
"body": "### archie-gateway\n\n- An image or voice attachment that arrives as a link is now checked against what the link serves, the same as an uploaded one. A link whose content is not the declared type, or that cannot be read, is refused.\n\n### archie-ui\n\n- A workflow created on the canvas now saves the agent it runs as, so it runs instead of parking with \"declares no identity to run as\".\n\n### archie-state-store\n\n- A workflow that no longer validates after an upgrade (for example it names a step type that was removed) is repaired at startup instead of breaking every workflow. A shipped workflow is restored from this release's copy; a workflow you created is removed and logged, and its earlier revision stays in the resource history. Valid workflows you created or edited are kept."
|
||||
},
|
||||
{
|
||||
"version": "1.61.0",
|
||||
"date": "2026-11-07",
|
||||
"body": "### archied\n\n- A `workflow.handoff` now finishes its run and starts a separate, linked run of the next workflow on the same issue, instead of continuing as another attempt. The task page links each run to the one before and after it; attempts count only retries of one run.\n\n- A task no longer fails to prepare its worktree with \"some refs were not updated\" after a tag or branch moves on the forge.\n\n### archie-ui\n\n- The task page no longer flashes its loading state on every live update while a task runs.\n\n### archie-state-store\n\n- The extension catalogue lists and installs again. Its default signing key has changed; an instance that set its own catalogue signing key in Extension settings keeps using that key."
|
||||
},
|
||||
{
|
||||
"version": "1.60.0",
|
||||
"date": "2026-11-02",
|
||||
"body": "### archied\n\n- Curators can list a repository's open issues and file new ones with the `issue_list` and `issue_create` tools, which reach the forge through the daemon. A curator files only when its definition declares `issue_create`; the shipped self-intake example runs in dry run with `issue_list` for deduplication. Listing every open issue needs the forge extensions from the archipelago release after 1.2.0."
|
||||
},
|
||||
{
|
||||
"version": "1.59.0",
|
||||
"date": "2026-11-02",
|
||||
"body": "### archied\n\n- Forge extensions can open issues: the forge surface gains `CreateIssue` alongside list, comment and close, and the bundled Gitea and GitHub extensions implement it."
|
||||
},
|
||||
{
|
||||
"version": "1.58.1",
|
||||
"date": "2026-11-01",
|
||||
"body": "### archied\n\n- The systemd watchdog now also watches the task intake loop, and its warning names the loop that stalled.\n- archied no longer restarts about a minute after it starts. Under systemd, the watchdog never saw a poll pass and killed it on every start since 1.56.0."
|
||||
},
|
||||
{
|
||||
"version": "1.58.0",
|
||||
"date": "2026-11-01",
|
||||
"body": "### archied\n\n- Running `install.sh` over an install whose services are already running now restarts them, so they run the new binaries."
|
||||
},
|
||||
{
|
||||
"version": "1.57.0",
|
||||
"date": "2026-10-31",
|
||||
"body": "### archied\n\n- A release reaches `stable` only after it has run on a canary for a day and passed: `archied release publish` now publishes to `next` alone, `archied release canary start|check` installs a release on a canary and judges it from the canary's dashboard, promoting it or rolling the canary back, and `archied release promote` moves `stable` by hand. Promotion refuses a prerelease and a release older than the one `stable` names. The `archied` and `archie-agent` images are published as `:v<version>`, and `:latest` moves only when a release is promoted."
|
||||
},
|
||||
{
|
||||
"version": "1.56.0",
|
||||
"date": "2026-10-31",
|
||||
"body": "### archied\n\n- **Install once by hand.** Releases are now signed and published to `git.catlow.cloud/sam/archie`. A host on 1.55.0 or earlier still looks for releases on GitHub, so it finds this one only by running the new installer once: `curl -fsSL https://offloaded.dev/install.sh | bash`. Updates after that come from Settings → Status as before.\n- Releases are signed. Updates and `install.sh` refuse a release the release key did not sign, a zip that is not the one signed, and a channel moved back to an older release. Where releases and the extension catalogue come from is a setting (update settings and extension settings, or `[distribution]` in `config.toml` for a new instance), and `archied release keygen` and `archied release publish` publish signed releases to your own registry.\n- Organisations: forge connections, schedules, alerts, chat channels and audit are per organisation. A member acts in the organisation they select, the setup checklist follows it, and the instance's own forge is its root connection.\n- Workflows are edited as a draft and reach the running workflow only when published. Build a workflow with Archie from the canvas: chat writes the draft into the editor for review, and the editor locks while it does.\n- Schedules run from the State Store with run history, fire into their own organisation, and can trigger workflows. Daemon maintenance runs as built-in schedules.\n- A parked task links to the page that fixes its blocker (repository, credential, model or forge extension), and a parked task can be retried on the current workflow definition.\n- Shipped workflows run as a seeded agent identity with narrow grants instead of the root identity. Credential services are granted to dashboard identities from pickers, and personal API tokens have a name, a lifetime and a last-used time.\n- An org-scoped audit page with filters, a live tail, export and a retention setting; recorded access denials are kept for a set time and listed on their own page.\n- Instructions replace SOUL: instance, organisation, workflow and repository instructions are layered into every agent stage.\n- Chat docks at the bottom of every page and stays open across navigation. Tool calls show where they happened in a reply, with arguments (secrets masked) and durations, and `ask_questions` asks several questions at once.\n- Run more than one instance side by side: `ARCHIE_INSTANCE` names an instance, and the installer installs and updates a named one.\n- Pull request reviews submit REQUEST_CHANGES on blocking findings, list findings outside the diff in the review body, and repost without inline comments when the forge refuses their placement.\n- A workflow installs a repository's declared tooling before its gate, and tasks clone from a shared per-repository mirror.\n- Traces: services, model and tool calls and task containers export OpenTelemetry spans, and log lines carry the trace id.\n- Telegram runs as an archipelago channel extension, enabled from the Extensions page.\n- The Extensions page groups the marketplace by surface, is searchable, shows install state, and offers an update only when the catalogue has one.\n- The dashboard is rebuilt on shared components: a new Archie mark, a theme that follows the OS, task logs as a table, and layouts that fit a phone.\n\n### archie-agent\n\n- Released with archied 1.56.0; task containers export trace spans and install a repository's declared tooling before its gate."
|
||||
},
|
||||
{
|
||||
"version": "1.55.0",
|
||||
"date": "2026-10-16",
|
||||
"body": "### archied\n\n- Personas are gone: the Personas settings page, the chat Personality selector and `/personality`. A selected persona never changed what the model was told; SOUL (Settings → SOUL) is the one place to set Archie's identity and style. Stored persona settings are deleted on upgrade.\n- The shipped SOUL describes Archie as the assistant for an event-driven automation system rather than a coding assistant. A SOUL you have saved is kept as it is."
|
||||
},
|
||||
{
|
||||
"version": "1.54.3",
|
||||
"date": "2026-10-16",
|
||||
"body": "### archied\n\n- Chat can help write a workflow: it reads your workflows and the step catalog, writes a definition, and checks it the same way saving does, fixing what the check reports. It does not save; paste the YAML it gives you into the editor's YAML view and save there."
|
||||
},
|
||||
{
|
||||
"version": "1.54.2",
|
||||
"date": "2026-10-16",
|
||||
"body": "### archied\n\n- Tool calls from Gemini models (Interactions API) receive their arguments intact. Any tool that takes arguments, such as `dashboard_navigate` in chat, failed with \"invalid character '{' after top-level value\".\n\n### archie-agent\n\n- Agent steps on Gemini models (Interactions API) pass tools their arguments intact instead of failing to decode them."
|
||||
},
|
||||
{
|
||||
"version": "1.54.1",
|
||||
"date": "2026-10-16",
|
||||
"body": "### archied\n\n- Update checks, `archied update install` and `install.sh` find releases at `github.com/samcharles93/archie-releases`, so a host can update again. A host on 1.54.0 or earlier still looks in the old place and has to be upgraded to 1.54.1 by hand once."
|
||||
},
|
||||
{
|
||||
"version": "1.54.0",
|
||||
"date": "2026-10-16",
|
||||
"body": "**Upgrade note:** services now authenticate each other with TLS certificates from your own CA instead of shared tokens. Before upgrading a host whose services listen on anything but loopback (any host running agent containers), issue a certificate per service (`archied`, `archie-gateway`, `archie-messaging`, `archie-state-store`, `archie-ui`, each with its name as the DNS SAN and both server and client auth), add `[tls] ca_file` and `cert_dir` to `config.toml`, and remove every `target_token`, the `*_TOKEN` service variables and the `--token`/`--*-token` flags, including archie-ui's `-token` and `-token-file`. A unit that still passes a removed flag fails to start. See `config.example.toml`.\n\n### archied\n\n- Services authenticate each other with mutual TLS. Each process presents `<cert_dir>/<service>.pem`, peers must chain to `ca_file`, and a caller is identified by its certificate rather than by what it claims. Renewed certificates are picked up without a restart. Without `[tls]`, services listen on and dial loopback only. The harness setup terminal requires `[tls]`.\n- Every gRPC service caps the streams a connection holds, times out stalled handshakes, releases a dead client's streams, and drains for at most 10 seconds on shutdown. Messaging exits when its listener fails instead of staying up without delivering.\n- The dashboard has user accounts. First run opens browser setup for the organisation, workspace and first administrator; people then sign in with a password, a passkey or your identity provider, and account administration lives under Access. The shared dashboard token is gone; reach the dashboard remotely through an HTTPS reverse proxy.\n- `archied update install` updates a host in one transaction: it verifies the release, stages every binary, pulls the agent image by digest and backs up the database, then restarts the services in order and rolls everything back if archied is not healthy for two minutes.\n- Each workflow runs as the identity it declares, checked on every attempt along with the identity that started it. A workflow that declares none is refused, a called workflow runs as its caller's declared identity, and shipped workflows run as the instance root.\n- Test-run a workflow draft before saving it, with forge and push writes suppressed and recorded per step. The History tab lists a workflow's revisions, diffs them as YAML and on the canvas, restores one into the editor, and shows which revision each run used.\n- Start a task from the dashboard. The dashboard home shows activity and setup, and a running task has a read-only Sandbox tab that follows its container.\n- The topbar's Jump to is a command palette, settings lists open as accordions that wait for a new item to be saved, and history restores land as a draft applied from the save bar.\n- Labels, hints, alerts and empty states say what is wrong and what to do, without tutorial or marketing prose.\n- Org isolation is tighter: harness secrets, identity writes, principals, playbook dispatch and model selections in chat stay in the caller's org, instance settings are written by the system org only, and creating a source or reloading a channel is authorized against the target.\n- Binding dispatch claims its capture and enqueues the task atomically, so a capture cannot start two runs, and the run-time workflow check sees the binding event's signature and address.\n- Service-unhealthy alerts count their grace from the last report and also cover a service that went silent, and a restart no longer clears an alert still inside its grace. An invalid stored access policy raises an alert until it validates.\n- A failed cancel of a called workflow no longer leaves the caller running, retention spares captures still waiting to be dispatched, and EDA playbooks load and report at start instead of on first dispatch.\n- Chat model selection works again for provider models.\n\n### archie-agent\n\n- Each run acts as its workflow's declared identity.\n- A task snapshot carries only the model limits its aliases resolve to.\n- A build step's \"no changes\" result comes from its writable stages and clears once a commit lands.\n- Test runs suppress forge and push writes and record what they would have done.\n- The default persona is a reporting-focused identity prompt, without the one-question limit in chat."
|
||||
},
|
||||
{
|
||||
"version": "1.53.0",
|
||||
"date": "2026-10-11",
|
||||
"body": "### archied\n\n- Every organisation's data is its own. Chats, tasks, events, transitions, steps, tool calls, run statistics, event sources, event types, mappings, bindings and agent memory are read and written in the org that owns them, and a request can no longer write into another org. Rows written before orgs existed move to their owner's org on upgrade.\n- An instance admin decides what each org may reach: the models it can use, and whether it may register providers under its own credentials. Org Settings gains a Models tab and instance Models gains Org access. The system org is never restricted; another org uses nothing until it is granted.\n- Models are addressed by alias. Aliases replace model roles, one resolver serves every purpose (agent steps, implement, PR review, MCP sampling, chat, embedding, transcription), and an unknown alias fails instead of falling back to a default. The step editor and the chat picker offer aliases, and a workflow naming one that does not exist is refused when saved.\n- Chat sessions belong to one org; a chat resolves its models in the caller's org and is billed to it, and a task run from chat posts its outcome back to that chat.\n- Add a member by provider subject, or by email as a placeholder that the first sign-in the provider vouches for claims.\n- The workflow canvas authors parallel branches as lanes, adds a switch step that runs the case matching a reference, and edits a call's interface. A step shows its role, its number and its run trace.\n- The workflows list shows each workflow's running count and latest run result, the canvas reveals its data-edge handles on hover, and restoring a version asks for confirmation.\n- Store packages can auto-update: a package given the policy is moved to the catalogue's newest digest by a State Store ticker. An update asking for more authority than was accepted waits as a pending update with the running version untouched; approving it accepts the new authority, and a rollback restores the previous version with the authority accepted against it.\n- Model provider keys never enter an agent container: the runtime reaches its providers through the egress proxy, which holds the keys. A task's own credential can no longer replace the workflow definition its run is pinned to, and a package workflow's triggers, tools and forge calls are bounded by the authority accepted for the package.\n- The dashboard warns when it is reachable from off-host over plain HTTP, and the wildcard listen address counts as off-host rather than loopback. Instance health, logs, config and identities, the setup checklist and the skill catalogue are system-org only, and API requests are refused until the access chain has loaded.\n- `/approve` reaches Telegram; the router served it but nothing published it.\n- A worktree a killed container left root-owned is taken back by the daemon, and a PR review's benchmark runner works again on configured models and public PRs.\n- An unserved `/api` path returns 404 instead of the dashboard page, and an input group's select no longer loses clicks to its addon.\n\n### archie-agent\n\n- The runtime reaches model providers through the egress proxy, so provider keys stay out of the container.\n- Agent steps resolve model aliases and their own org's models and credentials, failing on an unknown alias instead of falling back.\n- A switch step runs the case matching its reference.\n- A call waiting on another step is reconciled from durable steps, so it resumes after a daemon restart rather than stranding."
|
||||
},
|
||||
{
|
||||
"version": "1.52.0",
|
||||
"date": "2026-10-09",
|
||||
"body": "### archied\n\n- The harness page's setup terminal opens a real session: it starts an ephemeral container from a Kit profile, runs the CLI's own login and captures the OAuth tokens at the provider's token endpoint. Point the dashboard at the daemon with `[services.harness].target` and a `HARNESS_TOKEN` and it stops answering 503; the terminal is created at your browser's size. Takeover of a live task is not in this release.\n- A credential's token endpoint is refused when the run is not granted that service, instead of proxy-ing the provider's real tokens into the container.\n- Settings → Profiles, Credential bindings and Playbooks are editable from the dashboard, and curator definitions can be changed and applied without a restart.\n- Settings say whether each one applies live or needs a restart, show what is consuming resources, and report whether an apply landed.\n- Status shows each service's dependency checks, the agent workers and the broker.\n- The Logs page reads recent logs from every service, not just the daemon.\n- Captures and webhook sources are scoped to the org that owns them: the list, retention and delivery authorization all act in the right org, and a workflow definition resolves in its own org.\n- Chat settings are attributed to the signed-in user, and Settings → Tokens explains when a personal token cannot be created.\n- A channel enabled after Archie started works immediately; a channel that fails on its own recovers; a failed channel is no longer reported as enabled, and stored channel settings no longer save duplicate or unnormalized values.\n- The task table sorts, the command palette no longer scrolls sideways or loses its highlight, unknown routes render a not-found page, and configuration reload failures are shown instead of passing silently.\n- A scheduled job whose payload names a dangerous command is refused.\n- A disabled model provider is never served from the ambient API key.\n- `generate_video` is backed by ai-sdk's MiniMax video provider.\n- A dashboard token is no longer written to the startup log.\n\n### archie-agent\n\n- `workflow.call`: a call is keyed on its declared step path, its key is freed once the callee reaches a terminal state, and a caller waiting on a callee releases its capacity instead of holding it.\n- `command.run` honours step retry and `on_failure`.\n- A value passed between steps keeps its declared type, and optional result booleans are enforced only when the workflow declares them.\n- Capture tools have their results checked against the declared schema.\n- A single-cycle run waits for its in-flight tasks before exiting, and identity tasks inherit live settings.\n- Kit containers run Docker's init as PID 1, so orphaned processes are reaped instead of accumulating inside a long task."
|
||||
},
|
||||
{
|
||||
"version": "1.51.1",
|
||||
"date": "2026-10-08",
|
||||
"body": "### archied\n\n- Chat with OpenAI's gpt-6 models (gpt-6-luna and the rest) works with tools; a turn failed with \"Function tools with reasoning_effort are not supported\"."
|
||||
},
|
||||
{
|
||||
"version": "1.51.0",
|
||||
"date": "2026-10-08",
|
||||
"body": "### archied\n\n- A secret engine enabled after Archie started (Bitwarden, for example) now supplies its keys straight away; providers that depended on it no longer stay disabled until a restart.\n- The dashboard chat has a microphone button: record a voice message and it is transcribed like a Telegram voice note. It shows only when a `transcription` model role is set under Settings → Models.\n- A file Archie sends in the dashboard chat is a download link for an hour, instead of a note that it can't be delivered.\n- Typing `/model` or `/personality` on its own in the dashboard chat offers the choices as buttons."
|
||||
},
|
||||
{
|
||||
"version": "1.50.1",
|
||||
"date": "2026-10-08",
|
||||
"body": "### archied\n\n- When an update is rolled back, the log names the health check that failed instead of only \"unhealthy\"."
|
||||
},
|
||||
{
|
||||
"version": "1.50.0",
|
||||
"date": "2026-10-08",
|
||||
"body": "### archied\n\n- Tools that need your approval ask for it again, and Archie can ask you a question or offer choices mid-reply. Since the services were split these never reached Telegram or the dashboard: approval-gated tools failed and questions were never asked.\n- The dashboard chat shows approvals as Approve / Always this session / Deny, choices as buttons, and questions with a reply field.\n- `/update` in the dashboard chat lists what's available with Install and Not now.\n- Settings → Status → Versions installs the update it shows; its Install button sent an empty request."
|
||||
},
|
||||
{
|
||||
"version": "1.49.4",
|
||||
"date": "2026-10-07",
|
||||
"body": "### archied\n\n- Settings → Status and Settings → Extensions are split into tabs instead of one long page; the Versions table's status column ends at the card's edge.\n- Tools & MCP has one \"Add MCP server\" button; the transport is chosen in the form, and an unnamed new server is not an unsaved change.\n- Settings → Repositories shows the add field when no repositories are configured, instead of a blank page.\n- The unsaved-changes bar always rests at the bottom of the window."
|
||||
},
|
||||
{
|
||||
"version": "1.49.3",
|
||||
"date": "2026-10-07",
|
||||
"body": "### archied\n\n- Settings → Status → Versions shows the Gateway as \"Update available\" with an Install button when a newer release exists; it read \"Unknown\" with no way to install. The Runtime row stays \"Unknown\" until an agent task has run.\n- The release channel buttons sit at the Updates card's right edge instead of mid-row."
|
||||
},
|
||||
{
|
||||
"version": "1.49.2",
|
||||
"date": "2026-10-07",
|
||||
"body": "### archied\n\n- Carries the 1.49.0 and 1.49.1 changes, whose builds were never published. The update check reads GitHub releases directly and still offers only releases with a verifiable linux-amd64 zip."
|
||||
},
|
||||
{
|
||||
"version": "1.49.1",
|
||||
"date": "2026-10-07",
|
||||
"body": "### archied\n\n- When the dashboard session expires, the page returns to the sign-in screen instead of showing errors on every page until a manual refresh."
|
||||
},
|
||||
{
|
||||
"version": "1.49.0",
|
||||
"date": "2026-10-07",
|
||||
|
||||
@@ -0,0 +1,414 @@
|
||||
# External agent harnesses
|
||||
|
||||
**Status:** Approved **Scope:** the harness model and, in "Session contract",
|
||||
the duplex session that the setup terminal and the run-scoped live view both
|
||||
use. Code cites this file for both (`ui/src/harness/SetupTerminal.vue`,
|
||||
`internal/infrastructure/postgres/queries/harness_secrets.sql`).
|
||||
|
||||
## Decision
|
||||
|
||||
A workflow stage can run on an external coding-agent CLI instead of the built-in
|
||||
agent loop: Claude Code, Codex, Pi, OMP, GitHub Copilot CLI, or any other CLI
|
||||
packaged as a Docker Sandbox Kit v3. Each authenticates with an API key or the
|
||||
operator's subscription login, and can carry the operator's own skills, plugins,
|
||||
subagents and instructions.
|
||||
|
||||
Two boundaries hold regardless of what the harness does:
|
||||
|
||||
- **The real credential never enters the container.** The container sees
|
||||
sentinel values; archie's egress proxy substitutes the real credential on
|
||||
outbound requests and performs OAuth refresh on the host.
|
||||
- **Archie's workflow guarantees are enforced outside the harness.** Git,
|
||||
protected paths, read-only stages, gates and budgets are checked by archie
|
||||
around the process and against the worktree afterwards.
|
||||
|
||||
## Kits
|
||||
|
||||
A harness is packaged as a Kit v3 image: an OCI image whose
|
||||
`vnd.docker.sandbox.kit.descriptor` manifest annotation declares what the
|
||||
harness needs. Archie reads descriptors with the published
|
||||
`github.com/docker/sandbox-kit-spec/v3/spec` package and does not maintain its
|
||||
own descriptor format. Published Kits run unmodified.
|
||||
|
||||
Archie is a partial Kit runtime. It implements these capability types:
|
||||
|
||||
| Type | Archie behaviour |
|
||||
| ------------------ | ------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `credential@1` | Proxy-managed only, described below. |
|
||||
| `network-policy@1` | Enforced by the egress proxy. |
|
||||
| `volume@1` | A Docker volume keyed by WorkflowExecution, deleted with it. |
|
||||
| `lifecycle@1` | Install and startup hooks run on container create. |
|
||||
| `agent-sessions@1` | The headless `prompt` and `resume` invocations for the stage. |
|
||||
| `agent-skills@1` | Discovery paths for bundled skills and optional shared skills; host access is always read-only. |
|
||||
| `agent-skill@1` | Selected image-bundled skills copied into the declared discovery paths. |
|
||||
| `agent-context@1` | The resolved discovery directory, defaulting beside the workspace; preserve instructions outside Archie-managed sections. |
|
||||
| `resources@1` | Container CPU and memory limits. |
|
||||
|
||||
Every other type fails closed: a required entry refuses the launch, an optional
|
||||
one is skipped and recorded on the step. `credential@1` with `passthrough: true`
|
||||
and any credential for a forge service are refused.
|
||||
|
||||
The operator's own setup (plugins, subagents, instructions, settings) is a mixin
|
||||
Kit, published with the harness Kit as a Kit set: the set merges their layers
|
||||
into one image. It is versioned image content, rewritten on every create, never
|
||||
state a run can modify.
|
||||
|
||||
## Contract
|
||||
|
||||
A harness run is a second implementation of `agentexec.Runner`. It takes the
|
||||
same `Request` and returns the same `Result`, so workflows, the daemon and the
|
||||
State Store do not know which runner ran a stage.
|
||||
|
||||
`agent-sessions@1` supplies the invocation. Archie supplies, per CLI, an output
|
||||
adapter that translates the CLI's JSON output stream into `ToolCallReporter`
|
||||
calls, `Usage` and a session ID. A CLI with no adapter can run stages with no
|
||||
capture tools, reporting no usage; its token budget falls back to wall clock.
|
||||
|
||||
Workflow definition validation rejects, at load time, a stage whose needs the
|
||||
selected harness cannot meet: capture tools without an adapter, or a gate retry
|
||||
without a `resume` verb.
|
||||
|
||||
## Selection
|
||||
|
||||
A harness is an agent profile. `docs/prds/event-automation.md` defines a profile
|
||||
as the execution environment a workflow selects; a harness profile names one Kit
|
||||
pinned by digest, a workload Kit or a published Kit set, in place of a container
|
||||
image. Archie runs that Kit's image and composes no Kits itself; a bare mixin is
|
||||
refused. Everything else about profiles holds: a workflow names its profile, a
|
||||
stage may name a different one, and a profile holds no secrets.
|
||||
|
||||
`archie-agent` builds the stage's runner from the stage's profile: the ai-sdk
|
||||
agent loop for an image profile, the harness runner for a Kit profile. Image
|
||||
profiles, and every workflow already written against them, are unchanged. A Kit
|
||||
profile named by no workflow is a validation error.
|
||||
|
||||
A stage naming a different profile than its workflow's is a separate run, not a
|
||||
mid-container runner switch: a Kit task runs in one container provisioned for
|
||||
one profile (Container layout), so a stage that needs a different one is its own
|
||||
callee, started the way `workflow.call` already starts one
|
||||
(`docs/prds/event-automation.md` "Workflows call workflows"), with its own agent
|
||||
profile resolved off its own task row. This needs no mechanism beyond
|
||||
`workflow.call` plus per-task profile resolution (`daemon.pinTaskProfile`), both
|
||||
of which already treat every task's profile independently of any caller's -- see
|
||||
`TestWorkflowCallerConformance` (staterpc) for the callee's independent
|
||||
`Workflow` field and `TestWorkflowCallGivesACalleeItsOwnProfile` (daemon) for
|
||||
the Kit-vs-image runner selection that independence produces.
|
||||
|
||||
Profiles are org resources in the State Store, so a Kit profile belongs to one
|
||||
org, is granted to its workspaces like any profile, and applies without a
|
||||
restart.
|
||||
|
||||
## Organisations
|
||||
|
||||
`docs/prds/orgs-and-access.md` is the boundary; a harness adds nothing that
|
||||
crosses it.
|
||||
|
||||
- A Kit profile, its credential bindings and its OAuth tokens belong to one org.
|
||||
No record is shared between orgs.
|
||||
- A harness run is a run like any other: it acts as the workflow's identity,
|
||||
under the run credential issued at dispatch.
|
||||
- The egress proxy injects a credential only when the run credential carries the
|
||||
secret the binding names. A Kit that declares a service the identity is not
|
||||
granted gets no credential: a required one refuses the launch, an optional one
|
||||
is skipped.
|
||||
- A Kit's network policy is what the Kit asks for; the identity's network grants
|
||||
are what the org allows. The proxy enforces the intersection.
|
||||
- Concurrency slots are counted per binding within its org.
|
||||
|
||||
## Credentials
|
||||
|
||||
A credential binding maps a Kit's `credential@1` `service` name to an org
|
||||
secret, which the org grants to identities like any secret. The secret holds one
|
||||
of:
|
||||
|
||||
- **API key:** a value in the org's secret store.
|
||||
- **OAuth:** tokens captured by the setup terminal, stored in the State Store
|
||||
under the at-rest envelope of `binding-secret-encryption.md` with its own
|
||||
domain separator.
|
||||
|
||||
The egress proxy resolves the binding for each request against the run
|
||||
credential. The container gets the Kit's sentinel in the named variable or
|
||||
credential file. OAuth refresh happens at the proxy, which intercepts the Kit's
|
||||
`tokenEndpoint`, so a refreshed token is written to the State Store and never
|
||||
returned to the container.
|
||||
|
||||
Runs sharing an OAuth binding share its subscription's rate limit.
|
||||
`max_concurrent` on the binding (default 1) caps its simultaneous runs. A stage
|
||||
waiting for a slot is `pending`, not `running`.
|
||||
|
||||
## Session contract
|
||||
|
||||
A **session** is a duplex PTY into a Kit container the daemon owns. One concept
|
||||
covers both targets; only the address, the lifetime and the established egress
|
||||
phase differ.
|
||||
|
||||
| | Setup session | Run session (deferred) |
|
||||
| --------- | ------------------------------------------------------------- | ------------------------------ |
|
||||
| Address | `{org, profile}` | `{org, task, attempt}` |
|
||||
| Container | ephemeral, from the profile's Kit | the task's running container |
|
||||
| Purpose | run the CLI's own login so the proxy captures the tokens | watch and optionally take over |
|
||||
| Lifetime | bounded by the session TTL; the container is removed on close | bounded by the task |
|
||||
|
||||
- **Transport.** The daemon serves `harness.v1.HarnessService`, a bidi gRPC
|
||||
stream, and the dashboard implements its `HarnessTerminal` interface
|
||||
(`internal/webui`) over that client; the browser's WebSocket route is
|
||||
unchanged. The contract lives on the daemon because the daemon owns
|
||||
containers: the dashboard process must not link `internal/container`,
|
||||
`internal/app/archied` or `internal/agentexec`.
|
||||
- **Authorisation.** Opening a session is the `update` action on the secret,
|
||||
decided by the dashboard's authorizer before the route runs
|
||||
(`internal/webui/authorize.go`). The dashboard then dials the daemon with the
|
||||
harness service token. The daemon does not re-authorise an operator; it trusts the
|
||||
asserted `{org, profile}` exactly as the task-action RPC trusts an asserted
|
||||
actor. Because that authority is a shell in a container holding an org's
|
||||
credential, the harness listener requires `HARNESS_TOKEN` even on loopback,
|
||||
unlike the State Store's loopback convention.
|
||||
- **Egress phase.** Token interception is filtered by phase (`oauth.go`'s
|
||||
`rule.runtime == atRun`), and `EnterRuntime` is one-way. A setup session
|
||||
therefore follows a run's lifecycle exactly: install hooks at the install
|
||||
phase, `EnterRuntime` before the shell. A credential whose token endpoint must
|
||||
be captured declares `phase: runtime`; a credential capturing at install phase
|
||||
is captured by the install hooks that run before the switch.
|
||||
- **Credentials.** Capture is gated: the proxy intercepts a token endpoint only
|
||||
for a service the session is granted (`Proxy.granted`). A setup session has no
|
||||
task, so the daemon registers a session grant: its proxy token resolves to
|
||||
`{org, the Kit's declared credential services the org binds}`. That is the
|
||||
intersection the `update`-on-secret authorisation covers. The real token never
|
||||
enters the container: the response is sentinelized and stored as the org's
|
||||
harness secret.
|
||||
- **Container discipline.** The setup container runs a keepalive entrypoint with
|
||||
an empty `Config.Env`; the PTY is an exec as the Kit's harness user with the
|
||||
harness env and nothing inherited from any worker. No worktree is mounted. It
|
||||
is acquired through the container pool, so it carries the `archie-daemon`
|
||||
label, the concurrency cap and the max-uptime reaper; the session TTL is the
|
||||
smaller bound. Closing revokes the egress session, removes the sandbox network
|
||||
and the Kit volumes, then releases the container.
|
||||
- **Kit unavailable.** The daemon serves the contract only when it has a
|
||||
container pool and a Kit launcher; otherwise there is no listener, and a
|
||||
client's refused connection is gRPC's `Unavailable`. The dashboard's existing
|
||||
failure surface is the honest degrade; `/api/harness`'s `terminal` field means
|
||||
"a client is configured", not "the daemon can run a Kit".
|
||||
- **Run target.** `RunTarget{task_id, attempt}` opens a read-only view of a
|
||||
running task's sandbox; it ships as the peek. The daemon resolves the pair
|
||||
itself, so the dashboard never learns a container name: the task store says
|
||||
whether the task is `running` and which attempt is current, and the Kit
|
||||
launcher names the container `kitrun.TaskContainer(task_id, attempt)` (one
|
||||
container per attempt, removed when the run ends; volumes remain task-scoped
|
||||
for retries). A finished or unknown task, a task that is not running, an
|
||||
attempt other than the running one, or a container that is gone is `NotFound`
|
||||
with the reason in the message; an unreachable task store or container engine
|
||||
is `Unavailable`. The view follows the container's stdout and stderr,
|
||||
including the harness output forwarded by the worker, carries no stdin and no
|
||||
exec, and ends when the task's container ends or the client leaves, so it
|
||||
confers no authority over the container. A read-only tail of the existing
|
||||
per-attempt logs was rejected: those refresh only on task state changes and
|
||||
are the daemon's account, not the sandbox's. Mid-stream failures are shown as
|
||||
a reason in the terminal before it closes.
|
||||
- **Authorisation.** The dashboard route `GET /api/tasks/{id}/sandbox` is
|
||||
decided as `read-logs` on the task before the handler runs, so a caller sees
|
||||
a sandbox exactly when they may read that task's log. The daemon checks that
|
||||
the task belongs to the asserted org before following output.
|
||||
- **Grants.** The view takes no grant of its own. The run's egress session
|
||||
(its proxy token, install then `EnterRuntime`) already belongs to the run
|
||||
and is revoked by `Launcher.Release` when the task ends; the view reads
|
||||
after that phase switch and dies with the container.
|
||||
- **Credentials.** The sandbox holds sentinels, never real credentials: API
|
||||
keys are `egress.Sentinel` (`credentials.go`), and an OAuth token set is
|
||||
sentinelised in the response and swapped back by the proxy only on a granted
|
||||
service's resource host in the matching phase (`oauth.go`, `injectOAuth`).
|
||||
The proxy runs in the daemon outside the container, so a shell in the
|
||||
container sees only sentinels.
|
||||
- **Takeover (interactive PTY into a running task) is out of scope for this
|
||||
issue.** It needs the dangerous-command authority (#1574) to
|
||||
gate it, and that authority is not wired for it: the harness listener has no
|
||||
approval step; `ToolSetOptions.Approval` in `internal/agentexec/modelloop`
|
||||
is never set by a caller, so task runs never build approval-required tools;
|
||||
approvals reach an operator only on the chat paths (dashboard ask, Telegram,
|
||||
Gateway). Takeover would also need an audit record naming the actor, task,
|
||||
attempt and open/close times, and revocation tied to task end (the exec is
|
||||
closed with the container). Those follow the setup session's shape
|
||||
(`harnesssession.Session`, `container.ExecPTY`) once the authority exists.
|
||||
- **Audit.** Opening and closing a session and a successful capture are recorded
|
||||
with the asserted org and profile. A run view's open and close are logged with
|
||||
the task and attempt; it reads output only, so it has no takeover record.
|
||||
|
||||
Each session is the only interactive path into a harness container.
|
||||
|
||||
## Egress
|
||||
|
||||
Only Kit profiles run on the egress path. An image profile keeps the network
|
||||
access its identity is granted, because workflows such as a network investigator
|
||||
need raw DNS, ICMP and arbitrary TCP that no HTTP proxy carries.
|
||||
|
||||
- **Sandbox network.** Each Kit run gets its own internal Docker bridge on which
|
||||
the host holds no address. Host services, including those listening on every
|
||||
interface, are unreachable from it by any address.
|
||||
- **Relay.** One relay container, `archie-agent relay`, sits on the sandbox
|
||||
networks under a fixed alias and on the host-reachable network. It forwards
|
||||
three fixed ports, to the proxy, NATS and the State Store, and can reach
|
||||
nothing else. It holds no secrets.
|
||||
- **Proxy.** The proxy runs inside `archied`, listening on the host gateway of
|
||||
the host-reachable network. It terminates TLS with a per-daemon CA installed
|
||||
into the container at create, identifies the container by a per-run proxy
|
||||
password distinct from the worker's run grant, and applies that run's network
|
||||
policy and credential inject rules. Upstream dials refuse loopback, and refuse
|
||||
internal addresses unless the policy names the exact IP, so an allowed name
|
||||
cannot resolve back into the host.
|
||||
|
||||
## Container layout
|
||||
|
||||
A Kit task runs in one container, from the Kit composition's image, on the
|
||||
task's sandbox network. The worker and every harness invocation share it; they
|
||||
are separated by user, not by container, so a run's cost scales with the run and
|
||||
not with how many agents it fans out to.
|
||||
|
||||
- **Worker.** Archie mounts its own `archie-agent` binary read-only and runs it
|
||||
as the container's entrypoint, as root. It holds the task's NATS and State
|
||||
Store credentials in its own environment and in root-only files, runs the
|
||||
workflow, and serves `archie-agent mcp`. The Kit image's entrypoint is not
|
||||
PID 1.
|
||||
- **Harness.** Every invocation runs as the Kit's user (the image's `User`,
|
||||
default uid 1000) with an explicit environment: the Kit's variables, the proxy
|
||||
environment and the credential sentinels, and nothing inherited from the
|
||||
worker. That user cannot read the worker's environment or files, or trace it.
|
||||
Sibling invocations in one run share the user and the worktree.
|
||||
- **Hooks.** `lifecycle@1` install and startup hooks run as the user each
|
||||
declares, before the worker accepts work.
|
||||
- **Mounts.** The task worktree at the Kit's workspace directory, owned by the
|
||||
Kit's user, and the read-only skills store. Nothing else from the host.
|
||||
- **Network.** The relay forwards three fixed ports on the sandbox network: the
|
||||
egress proxy, NATS and the State Store. The worker reaches NATS and the State
|
||||
Store with its credentials; a harness can open those ports but holds no
|
||||
credential either accepts.
|
||||
- **Volumes.** `volume@1` paths persist for the life of the WorkflowExecution,
|
||||
which covers session resume across gate iterations and retries. They are not
|
||||
shared between executions.
|
||||
|
||||
## Archie tools inside the harness
|
||||
|
||||
Capture tools return a stage's structured results through `archie-agent mcp`, a
|
||||
stdio MCP server. The same command forwards central-tool discovery and calls
|
||||
over Streamable HTTP to `http://archie.tools/mcp` through the egress proxy.
|
||||
Claude Code, Codex, Pi, OMP and GitHub Copilot CLI register it using their
|
||||
native MCP configuration. Registration files are per-stage and outside the
|
||||
worktree; the Kit's bundled settings remain intact. A CLI that exits without
|
||||
initializing the required MCP server fails the stage.
|
||||
|
||||
`archied` handles that exact endpoint inside the authenticated task proxy; it is
|
||||
not a listener or an upstream network destination. It is available only during
|
||||
task runtime, never during install or a setup session. The harness supplies a
|
||||
sentinel, and the proxy injects a separate random gateway token held only on the
|
||||
host. Ending the proxy session revokes that token and cancels active calls.
|
||||
|
||||
The proxy reaches `archie-gateway` through its authenticated gRPC contract. The
|
||||
Gateway derives the task, execution principal and org from a live run grant on
|
||||
every request. Its tool list is bounded by the profile in that org and the
|
||||
package's accepted tool authority, checked again at invocation. Workspace tools,
|
||||
chat file delivery, conversation-only tools and tools that require an
|
||||
unavailable approver are not served. Tool result limits apply without exposing
|
||||
host spill paths; media is returned as MCP content.
|
||||
|
||||
Task MCP providers run in the Gateway with task-bound sessions and sampling.
|
||||
Sampling uses the task's model and credentials, records task usage and refuses
|
||||
revoked grants. It does not use the chat identity or chat model. The worker does
|
||||
not start another copy of those providers for Kit tasks. The harness's own
|
||||
built-in tools remain outside Archie's tool-result limits.
|
||||
|
||||
## Enforcement around the harness
|
||||
|
||||
| Property | Enforcement |
|
||||
| -------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| Model never runs git | No forge credential can be bound. Archie records `HEAD` and every ref before the run; any change fails the step (`failed`, policy class). The workflow commits the stage's changes. |
|
||||
| Protected paths | A diff touching a `Protection` path fails the step. |
|
||||
| Read-only stage | Any worktree diff fails the step. |
|
||||
| Gate | Archie runs the stage's gate after the harness exits. On failure it resumes the session with the gate output, up to the stage's iteration budget. |
|
||||
| Budget | Archie kills the process on wall-clock timeout, or when streamed usage passes the token budget. |
|
||||
| Cancellation | Cancelling the step kills the process group, then the container. |
|
||||
| Egress | Only the proxy is reachable; the Kit's network policy decides the rest. |
|
||||
|
||||
Harness settings that deny git or protected paths are added where the CLI
|
||||
supports them, to save wasted turns. They are never the enforcement.
|
||||
|
||||
## Execution tree
|
||||
|
||||
A harness run is one `agent` StepExecution. Subagents the harness spawns
|
||||
internally are not recorded as children. Their usage is included in the step's
|
||||
`tokens_used` when the adapter reports it.
|
||||
|
||||
## Agents never hold a harness
|
||||
|
||||
An Agent reaches a harness only by invoking a Workflow whose stage names it. No
|
||||
Agent tool, chat tool or capability exposes a harness, its setup terminal or its
|
||||
credential. The stage boundary is what carries the container, the git and path
|
||||
checks, the gate and the budget; a harness outside a stage has none of them.
|
||||
|
||||
## Out of scope
|
||||
|
||||
- Chat through a harness. The gateway chat loop stays on the built-in runtime.
|
||||
- `network-policy@2` HTTP method and path rules; a Kit requiring it is refused.
|
||||
- Recording the harness's internal subagents as StepExecutions.
|
||||
- Cost in currency.
|
||||
- Choosing a harness automatically per task.
|
||||
|
||||
## Plan
|
||||
|
||||
1. Descriptor resolution with the Kit spec package; capability support table and
|
||||
fail-closed refusal.
|
||||
2. Egress proxy: internal network, per-daemon CA, per-container token,
|
||||
`network-policy@1`.
|
||||
3. `credential@1`: API-key bindings, sentinel rendering, inject rules.
|
||||
4. Harness `Runner`: container create with worktree, volumes, lifecycle hooks
|
||||
and the mounted `archie-agent`; `agent-sessions@1` invocation; worktree
|
||||
checks for git, protected paths and read-only; budget and cancellation.
|
||||
5. Claude Code output adapter; `archie-agent mcp`; gate-and-resume loop.
|
||||
6. Kit profiles, runner selection from the stage's profile, and definition
|
||||
validation.
|
||||
7. OAuth bindings as org secrets: token-endpoint interception, encrypted
|
||||
storage, per-binding concurrency; dashboard setup terminal.
|
||||
8. Output adapters for Codex, Pi, OMP and GitHub Copilot CLI.
|
||||
|
||||
## Verification
|
||||
|
||||
- Every named adapter discovers and calls a permitted central tool through the
|
||||
proxy and records a local capture. A guessed tool outside the profile or
|
||||
accepted package authority is refused.
|
||||
- The gateway token never appears in the container, generated MCP files,
|
||||
worktree, logs or events. It is not the container's proxy password.
|
||||
- A permission change after discovery takes effect at the next call; ending the
|
||||
proxy session cancels active calls, and a revoked grant cannot execute tools
|
||||
or sample a model.
|
||||
- Bundled skills remain visible with shared skills missing or disabled; shared
|
||||
mounts are per-skill and read-only. Explicit context directories preserve
|
||||
non-managed instructions and refuse symlinked staging paths.
|
||||
- The same workflow definition completes on `builtin` and on the Claude Code Kit
|
||||
with the same `Result` shape and captures.
|
||||
- After `/login` in the setup terminal, the container's credential file holds
|
||||
only sentinels, the State Store holds the encrypted token, and a task run
|
||||
authenticates.
|
||||
- A real API key or OAuth token never appears in the container environment,
|
||||
filesystem, worktree, task log or event stream.
|
||||
- A request to a host outside the Kit's runtime allow list fails, including a
|
||||
direct connection that bypasses the proxy settings.
|
||||
- A harness instructed to `git commit` fails its step, and the task branch is
|
||||
unchanged.
|
||||
- A harness edit to a protected test file fails the step in a TDD fix stage.
|
||||
- A read-only feasibility stage that writes a file fails.
|
||||
- A file a run writes into a Kit-managed path such as the CLI's settings file is
|
||||
gone on the next execution.
|
||||
- A Kit requiring an unsupported capability is refused at launch with the
|
||||
capability named.
|
||||
- A stage with a failing gate resumes the same session with the gate output,
|
||||
then succeeds or exhausts its iterations.
|
||||
- Two tasks sharing an OAuth binding with `max_concurrent = 1` run one at a
|
||||
time; the second waits as `pending`.
|
||||
- Stopping a run kills the harness process and removes the container.
|
||||
- A harness invocation cannot read the worker's NATS or State Store credential
|
||||
from its environment, its files or `/proc`.
|
||||
- A run fanning out to many agent invocations uses one container.
|
||||
- A Kit profile in org A cannot be selected, and its binding cannot be resolved,
|
||||
by a workflow in org B.
|
||||
- A harness run whose identity is not granted a Kit's required credential is
|
||||
refused at launch; the proxy never injects a secret outside the run
|
||||
credential.
|
||||
- The firewall investigation example runs unchanged on an image profile with
|
||||
direct network access.
|
||||
@@ -0,0 +1,68 @@
|
||||
# Self-development loop: archie develops its own codebase
|
||||
|
||||
**Status:** Decided, not yet built (2026-11-03, sam) **Scope:** how archie
|
||||
persistently takes on development of archie-core itself. This file records a
|
||||
desired state, not an implementation or a product: nothing below exists unless
|
||||
the "Built today" section says so. The plan is tracked as epic #1769 with child
|
||||
issues #1770–#1775. This file is a record, not a mechanism: agents only see
|
||||
what is in their context, so verify every claim here against the code before
|
||||
acting on it — where they disagree, the code wins. The boundary below is
|
||||
load-bearing only where it is enforced (the gate, access control, the daemon's
|
||||
git monopoly) and stated in `AGENTS.md`; everywhere else this file is a pointer.
|
||||
|
||||
## Built today
|
||||
|
||||
The machinery the loop will reuse exists: shipped triage/implement/pr-review
|
||||
workflows, the adversarial self-review stage before a PR opens (epic #1348,
|
||||
closed), the prbench judge for review quality with its acceptance bar, canary
|
||||
releases judged on the installed release (releaseupdate), and the curator
|
||||
engine. What does not exist is the loop itself: no self-intake curator, no
|
||||
approved-issue auto-run, no judge for diffs, no outcome distillation, no
|
||||
canary routing specific to self-directed changes.
|
||||
|
||||
## Decision
|
||||
|
||||
Archie improves its own codebase through a closed loop, built in stages:
|
||||
|
||||
1. **Self-intake** (#1770): a curator pass reads run outcomes, step transcripts,
|
||||
gate failures and alerts, dedupes against open issues, and files new issues.
|
||||
Archie files its own work; the maintainer approves priority.
|
||||
2. **Approved-issue loop** (#1771): an approved issue runs the shipped
|
||||
triage/implement workflows end to end — read-only plan, gated build,
|
||||
adversarial self-review, daemon commits and opens a green PR. The maintainer
|
||||
still merges at this stage.
|
||||
3. **Implementation judge** (#1772): the prbench judge pattern scores diffs,
|
||||
calibrated against the maintainer's merge decisions; auto-merge applies only
|
||||
when the gate is green, the review stage is clean, and the judge is above the
|
||||
calibrated bar.
|
||||
4. **Outcome distillation** (#1773): a curator turns merged-run postmortems into
|
||||
proposals for the repo's agent instructions, each added only because it
|
||||
changes a decision; rules that stop changing decisions are removed.
|
||||
5. **Canary** (#1774): self-directed changes ship through the canary release
|
||||
window and are judged on the installed release before promotion. Rollback is
|
||||
a plain revert, because every self-directed change is one gated commit.
|
||||
|
||||
## Boundary
|
||||
|
||||
Enforcement lives in the harness, never in the prompt (#1775). Changes to the
|
||||
commit gate, the invariants in `AGENTS.md`, access control and grant scoping,
|
||||
the daemon-only git path, and webhook HMAC verification may be proposed by
|
||||
archie but are never merged by archie — they require a maintainer merge.
|
||||
Everything else (workflows, curators, memory, docs, the dashboard) is fair game
|
||||
for the loop.
|
||||
|
||||
## Why
|
||||
|
||||
Self-improvement degrades when it relies on the model choosing to follow rules.
|
||||
Gates, scoped grants and the daemon's monopoly on git cannot be argued with; a
|
||||
prompt can. Keeping quality measurable — a judge bar and a canary verdict as
|
||||
numbers, tests guarding the protected seams — is what lets the loop widen
|
||||
without turning the codebase to garbage.
|
||||
|
||||
## Consequences
|
||||
|
||||
- One issue → one small PR applies doubly to self-directed work: past about 100
|
||||
lines or any new mechanism, the change stops and reassesses.
|
||||
- Every self-directed commit cites the issue that authorized it.
|
||||
- Rule proposals from the distillation curator must name the run that triggered
|
||||
them, and `AGENTS.md` stays short enough to read in full every session.
|
||||
@@ -0,0 +1,248 @@
|
||||
# User authorization boundaries
|
||||
|
||||
Archie separates authentication (which person or service is calling) from
|
||||
permission to act on a resource. This inventory follows the
|
||||
[OWASP Authentication Cheat Sheet](https://cheatsheetseries.owasp.org/cheatsheets/Authentication_Cheat_Sheet.html)
|
||||
and
|
||||
[Authorization Cheat Sheet](https://cheatsheetseries.owasp.org/cheatsheets/Authorization_Cheat_Sheet.html),
|
||||
including its guidance on attributes and relationships. It describes concrete
|
||||
enforcement points and their regression tests; it is not a compliance
|
||||
certification.
|
||||
|
||||
## Transport and authority
|
||||
|
||||
The browser uses HTTP/JSON and SSE to the UI service. The UI service calls State
|
||||
Store, Gateway, Messaging and Harness through their gRPC contracts. Only the
|
||||
State Store opens the task/control-plane/account database; Gateway owns
|
||||
conversation storage. Browser HTTP handlers never open either database.
|
||||
|
||||
Instance service credentials are administrative authority. They are not user
|
||||
sessions and must never reach a browser, model, or agent container. A service
|
||||
forwarding a principal preserves attribution and tenant scope; forwarding alone
|
||||
does not mean every internal RPC evaluates Cedar. Most internal RPCs trust the
|
||||
authenticated service and enforce their own resource scope. The public HTTP
|
||||
boundary evaluates Cedar before invoking them. Task credentials have a separate,
|
||||
explicit RPC allowlist and cannot call account or identity administration.
|
||||
|
||||
Local service listeners are trusted process boundaries. Loopback is not a
|
||||
substitute for authentication on a remotely reachable listener. OIDC
|
||||
credentials, local browser sessions, personal API tokens, service credentials,
|
||||
and task grants must remain distinct.
|
||||
|
||||
## Policy and relationship model
|
||||
|
||||
`internal/domain/access` defines actions, resources, principals and memberships.
|
||||
`internal/infrastructure/access` assembles Cedar entities and evaluates the
|
||||
instance → organization → workspace → object chain. A forbid wins; each
|
||||
applicable level must permit the operation. Missing or invalid policy chains
|
||||
fail closed.
|
||||
|
||||
The default policies grant actions through scoped roles. Policies can also
|
||||
restrict a named identity, workspace environment, owner, state, source address,
|
||||
signature, run or step. HTTP task decisions now include the stored initiating
|
||||
identity and task state; binding decisions include the stored binding state. The
|
||||
HTTP source address is the actual connection peer, not an unverified forwarded
|
||||
header. Membership and resource attributes must come from stored records or
|
||||
authenticated context, never a request's assertion about itself.
|
||||
|
||||
Cedar permission is not ownership of another person's private data. Conversation
|
||||
history, passkeys, recovery codes and personal tokens are bound to the person.
|
||||
An organization or instance admin role does not override those relationships.
|
||||
Account creation uses `manage_members` policy rather than a hard-coded admin
|
||||
role. Authenticating through OIDC does not automatically grant membership, link
|
||||
accounts by unverified email, or create an administrator.
|
||||
|
||||
## Enforcement inventory
|
||||
|
||||
| Location | Enforcement | Regression evidence |
|
||||
| ----------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
||||
| Browser credential gate: `webui/auth.go`, `accounts.go` | Account session or verified provider identity; shared dashboard token is not a person when accounts are enabled. No API data before authentication. | `TestAccountBoundary`, `TestAccountSessionFailureIsClosed` |
|
||||
| Browser policy gate: `webui/authorize.go` | Resolve principal from stored identity; evaluate action against stored org/workspace and resource kind before handler. Missing chain refuses. | `TestHTTPPolicyCannotBeBypassed`, `TestAuthorizeRefusesWithoutAChain`, `TestAuthorizeRecord`, `TestTaskAuthorizationUsesStoredAttributes`, `TestAuthorizeCreateIn` |
|
||||
| Instance-only HTTP surfaces: `webui/instance_only.go`, server route registration | Hide instance-owned configuration and diagnostics from another org; policy still applies first. | `TestInstanceOnlyHidesTheInstanceFromOtherOrgs`, `TestInstanceAdminOrgs` |
|
||||
| First setup: `webui/accounts.go`, `postgres/accounts.go` | Initial organization, workspace, instance URL, admin identity and password commit together. Transaction lock closes bootstrap after first account; later requests require `manage_members`. | Disposable PostgreSQL smoke verification for bootstrap race and rollback; account policy tests below |
|
||||
| Account creation: `webui/accounts.go`, `staterpc/accounts.go`, `postgres/accounts.go` | Cedar `manage_members` at HTTP and RPC; target org is authenticated context. New local accounts cannot request owner role. | `TestAccountManagementUsesPolicy`, `TestAccountBoundary` |
|
||||
| Local passwords and sessions: `identity/password.go`, `postgres/accounts.go` | Argon2id, independent salts, length/common-password checks, generic login refusal, account throttling, session hashes and expiry, revocation on logout/password change/suspension. | `TestPasswordVerification`, `TestAccountBoundary`; disposable PostgreSQL session verification |
|
||||
| Transport and CSRF: `webui/accounts.go`, `api_tasks.go` | Password/account mutations require HTTPS or localhost development, JSON, custom CSRF header and same-origin requests. Forwarded headers require explicit trusted-proxy configuration. | `TestAuthenticationTransport`, existing mutation security tests |
|
||||
| Personal account routes: `webui/accounts.go` | Active signed-in person; principal supplied by server. Password change verifies current password. Sensitive authenticator changes require recent sign-in. No caller-supplied target identity. | `TestAccountBoundary` |
|
||||
| Recovery: `postgres/account_security.go`, `webui/accounts.go` | Fresh authenticated owner generates a hashed, one-use recovery secret. Redemption replaces password and revokes all sessions atomically. No email-existence disclosure. | Disposable PostgreSQL recovery verification |
|
||||
| Passkeys: `postgres/passkeys.go`, `webui/passkeys.go` | Configured RP origin, browser-bound one-use expiring challenge, verified credential signature and user verification. Enrollment/management belong to caller. Credential counters persist under a row lock. | Disposable browser virtual-authenticator verification; task-grant denial tests |
|
||||
| OIDC: `infrastructure/oidc`, `archieui/account_oidc.go`, `webui/auth.go` | Discovery and signed ID token with issuer/client audience/expiry, PKCE, state and nonce. Verified subject resolves to active identity. Browser-local session cannot outlive provider token, and provider credential remains checked. | `TestBrowserFlowVerifiesIDToken`, `TestProviderOutageIsUnavailableThenRecovers`, subject-claim tests; no external provider acceptance implied |
|
||||
| OIDC settings: `webui/accounts.go`, `postgres/authentication.go` | Instance ownership plus policy; recent sign-in for changes. Public URL cannot change while enrolled passkeys would be orphaned. | `TestAccountBoundary`, `TestAuthenticationSettingsRejectUntrustedOrigins` |
|
||||
| Org membership/workspaces/agent assignment: `webui/api_orgs.go`, `staterpc/orgs.go`, `postgres/orgs.go` | Own org or instance-owner relationship, allowed role vocabulary, membership escalation/last-owner guards, tenant-scoped SQL. | `TestOrgRPCsActInTheCallersOrg`, `TestSetMembershipRefusesUnknownRole`, org HTTP tests |
|
||||
| Personal API tokens: `webui/api_personal_tokens.go`, `staterpc/personal_tokens.go`, `postgres/personal_tokens.go` | Token owner comes from principal; store only token hash; revoke only caller's binding. | `TestPersonalTokensWithoutPerson`, `TestPersonalTokenOwner` |
|
||||
| gRPC caller attribution: `rpcidentity/identity.go` | Authenticated service may forward a principal; State Store resolves memberships/org itself. Task grant metadata is stripped. | `TestCallerAttribution` |
|
||||
| Agent/task gRPC: `staterpc/task_grants.go` | Durable task-scoped grant, explicit allowed RPC and target task, no definition-pin replacement, no account RPCs. | `TestTaskCredentialsCannotManageAccounts`, `TestTaskCredentialCannotReplaceItsPin`, `TestRecordUsageAuthority`, `TestWorkerPresenceAuthority` |
|
||||
| Chat HTTP: `webui/api_chat.go` | Server stamps sender and person thread; lists/read/turns/cancel/persona verify session ownership. Browser cannot submit another sender identity. | `TestWebChatOwnership`, `TestWebChatSenderCannotBeSuppliedByBrowser`; HTTP deny matrix |
|
||||
| Chat history, slash commands and model session tools: `gateway/session_store_postgres.go` | Store filters `Get`, `List`, `GetByChannel`; shared read/write guards check person ownership as well as org. A saved session cannot change its conversation source to claim another person's history. Service curation runs without a person principal. | `TestSessionVisibility`; PostgreSQL smoke for history isolation |
|
||||
| Chat questions/approvals: `webui/api_chat_ask.go` | Waiting question is bound to the initiating person, in addition to its unguessable ID. | `TestChatQuestionBelongsToInitiatingPerson` |
|
||||
| Chat downloads: `webui/api_chat_files.go` | Offered file token expires and is bound to the initiating person; requests cannot supply a filesystem path. | `TestChatFileDownload` |
|
||||
| Per-person memory: `archiegateway/chat_identity.go`, gateway memory tools, `sessioncurator` | Verified web sender identity scopes reads/writes. Curator refuses unidentified or mixed participants instead of guessing a person. | Gateway memory and session-curator tests |
|
||||
| Workflow/task actions: `webui/api_tasks.go`, `domain/taskactions`, `staterpc` | Policy and stored workspace before action; domain transition, authority and durable dispatch guards remain in force. | HTTP deny matrix, task action/domain tests, task grant tests |
|
||||
| Incoming webhooks: `forge/webhook`, `captureintake`, access delivery engine | Verify HMAC before parsing; derive source/org from stored source; evaluate source delivery policies and egress rules. No browser-user credential is inferred. | Webhook/capture tests, `TestAuthorizeDelivery` |
|
||||
| Control-plane configuration, secrets, harness and extensions | Browser policy and instance-only restrictions where registered; service contracts carry principal/org; task grants cannot invoke administrative RPCs. | HTTP deny matrix, `TestAdministrationRoutes`, `TestChannelReloadRoute`, `TestConfineHarnessOrg` |
|
||||
| Audit feed: `webui/api_audit.go`, `domain/audit` | `read_audit` on the `audit` resource; org scope and the instance-wide exception come from the authenticated principal, never the query string. Export carries the same grant, needs an explicit range of at most a year, and is rate-limited per identity, one at a time. Redaction runs in the State Store adapter before an entry crosses gRPC. | `TestReadAuditRoleBoundary`, `TestAuditRoutesFollowTheReadAuditRole`, `TestHTTPPolicyCannotBeBypassed`, `TestAuditErrorMapping`, `TestAuditCSVCellNeutralisesFormulas` |
|
||||
| Live HTTP/SSE and diagnostics | Authenticated policy gate applies before stream creation; org-scoped event reads; instance logs require administrative visibility. | HTTP deny matrix, instance-only tests, `TestServiceLogsRequireInstanceCredential` |
|
||||
| Background schedules, dispatch, curation | Service/agent authority, not an implicit browser user. Task-scoped grants and org scopes remain distinct from initiating operator attribution. | Existing dispatch, grant, memory and org-scope tests |
|
||||
|
||||
The policy HTTP matrix enumerates each registered protected route. It checks
|
||||
both anonymous refusal and refusal by an explicit Cedar forbid, using the real
|
||||
handler stack. Separate tests exercise allowed requests and personal ownership;
|
||||
a denied-request matrix alone is not proof that a workflow works end to end.
|
||||
|
||||
## Public and personal routes
|
||||
|
||||
Public protocol entry points are `GET /api/auth/status`, `POST /api/auth/setup`,
|
||||
`POST /api/auth/login`, `POST /api/auth/logout`, `POST /api/auth/recover`,
|
||||
`POST /api/auth/passkey/begin`, `POST /api/auth/passkey/finish`,
|
||||
`GET /oauth2/login`, `GET /oauth2/callback`, health probes and signed webhook
|
||||
intake. Each has its own protocol checks. Static embedded app assets are public;
|
||||
they do not contain user data. `/health/detailed` remains protected.
|
||||
|
||||
Personal routes under `/api/account/` require an active signed-in person and
|
||||
server-derived ownership: password change, recovery-secret generation, passkey
|
||||
begin/finish/list/delete. They do not require an organization administrator
|
||||
role. `POST /api/accounts` and `/api/authentication` are administrative policy
|
||||
routes.
|
||||
|
||||
## HTTP route inventory
|
||||
|
||||
The following routes are covered by `TestHTTPPolicyCannotBeBypassed` in
|
||||
`internal/webui/authorization_surfaces_test.go`. `authorize.go` maps each to its
|
||||
action/resource; the handler may impose a stricter record or instance boundary.
|
||||
|
||||
| Method | Route example |
|
||||
| ------ | ----------------------------------------------------- |
|
||||
| DELETE | `/api/access/policies` |
|
||||
| DELETE | `/api/bindings/7` |
|
||||
| DELETE | `/api/event-types/7` |
|
||||
| DELETE | `/api/extensions/sample` |
|
||||
| DELETE | `/api/mappings/7` |
|
||||
| DELETE | `/api/orgs/7/members/sample` |
|
||||
| DELETE | `/api/sources/sample` |
|
||||
| DELETE | `/api/tokens/7` |
|
||||
| GET | `/api/access/policies` |
|
||||
| GET | `/api/alerts` |
|
||||
| GET | `/api/audit` |
|
||||
| GET | `/api/audit/export` |
|
||||
| GET | `/api/authentication` |
|
||||
| GET | `/api/bindings` |
|
||||
| GET | `/api/bindings/7` |
|
||||
| GET | `/api/bindings/7/dispatches` |
|
||||
| GET | `/api/capabilities` |
|
||||
| GET | `/api/captures` |
|
||||
| GET | `/api/captures/7/dispatches` |
|
||||
| GET | `/api/channels` |
|
||||
| GET | `/api/chat/file/sample` |
|
||||
| GET | `/api/chat/sessions` |
|
||||
| GET | `/api/chat/sessions/7/messages` |
|
||||
| GET | `/api/chat/sessions/7/turns` |
|
||||
| GET | `/api/chat/update` |
|
||||
| GET | `/api/config` |
|
||||
| GET | `/api/control-plane/apply-status` |
|
||||
| GET | `/api/control-plane/catalog` |
|
||||
| GET | `/api/control-plane/resources/sample` |
|
||||
| GET | `/api/control-plane/resources/sample/history` |
|
||||
| GET | `/api/curators` |
|
||||
| GET | `/api/event-types` |
|
||||
| GET | `/api/extensions` |
|
||||
| GET | `/api/extensions/catalogue` |
|
||||
| GET | `/api/harness/bindings` |
|
||||
| GET | `/api/harness/terminal` |
|
||||
| GET | `/api/identities` |
|
||||
| GET | `/api/logs` |
|
||||
| GET | `/api/mappings` |
|
||||
| GET | `/api/mappings/7` |
|
||||
| GET | `/api/orgs` |
|
||||
| GET | `/api/orgs/7` |
|
||||
| GET | `/api/orgs/7/members` |
|
||||
| GET | `/api/orgs/7/workspaces` |
|
||||
| GET | `/api/secret-engines` |
|
||||
| GET | `/api/services` |
|
||||
| GET | `/api/setup` |
|
||||
| GET | `/api/skills` |
|
||||
| GET | `/api/sources` |
|
||||
| GET | `/api/stream` |
|
||||
| GET | `/api/summary` |
|
||||
| GET | `/api/task-meta` |
|
||||
| GET | `/api/tasks` |
|
||||
| GET | `/api/tasks/7` |
|
||||
| GET | `/api/tasks/7/attempts` |
|
||||
| GET | `/api/tasks/7/changes` |
|
||||
| GET | `/api/tasks/7/debug` |
|
||||
| GET | `/api/tasks/7/dispatches` |
|
||||
| GET | `/api/tasks/7/logs` |
|
||||
| GET | `/api/tasks/7/logs/download` |
|
||||
| GET | `/api/tasks/7/sandbox` |
|
||||
| GET | `/api/tokens` |
|
||||
| GET | `/api/version` |
|
||||
| GET | `/api/workflows` |
|
||||
| PATCH | `/api/bindings/7` |
|
||||
| PATCH | `/api/mappings/7` |
|
||||
| POST | `/api/accounts` |
|
||||
| POST | `/api/alerts/7/dismiss` |
|
||||
| POST | `/api/bindings` |
|
||||
| POST | `/api/bindings/7/approve` |
|
||||
| POST | `/api/bindings/7/pause` |
|
||||
| POST | `/api/bindings/7/resume` |
|
||||
| POST | `/api/channels/7/reload` |
|
||||
| POST | `/api/chat/answer` |
|
||||
| POST | `/api/chat/cancel` |
|
||||
| POST | `/api/chat/message` |
|
||||
| POST | `/api/chat/persona` |
|
||||
| POST | `/api/chat/stream` |
|
||||
| POST | `/api/chat/update/defer` |
|
||||
| POST | `/api/chat/update/install` |
|
||||
| POST | `/api/control-plane/resources/sample/commands/sample` |
|
||||
| POST | `/api/event-types` |
|
||||
| POST | `/api/extensions` |
|
||||
| POST | `/api/extensions/catalogue/sample/install` |
|
||||
| POST | `/api/extensions/sample/accept` |
|
||||
| POST | `/api/extensions/sample/approve-update` |
|
||||
| POST | `/api/extensions/sample/rollback` |
|
||||
| POST | `/api/extensions/sample/update` |
|
||||
| POST | `/api/identities` |
|
||||
| POST | `/api/identities/7/sample` |
|
||||
| POST | `/api/mappings` |
|
||||
| POST | `/api/mappings/preview` |
|
||||
| POST | `/api/orgs` |
|
||||
| POST | `/api/orgs/7/members` |
|
||||
| POST | `/api/orgs/7/workspaces` |
|
||||
| POST | `/api/secret-references/check` |
|
||||
| POST | `/api/sources` |
|
||||
| POST | `/api/sources/sample/approve-unsigned` |
|
||||
| POST | `/api/sources/sample/secret` |
|
||||
| POST | `/api/sources/sample/signing` |
|
||||
| POST | `/api/tasks/7/action` |
|
||||
| POST | `/api/tokens` |
|
||||
| POST | `/api/work-requests` |
|
||||
| PUT | `/api/access/policies` |
|
||||
| PUT | `/api/authentication` |
|
||||
| PUT | `/api/event-types/7` |
|
||||
| PUT | `/api/extensions/sample/enabled` |
|
||||
| PUT | `/api/extensions/sample/update-policy` |
|
||||
| PUT | `/api/orgs/7/agents/sample` |
|
||||
| PUT | `/api/orgs/7/members/sample` |
|
||||
| PUT | `/api/sources/sample/delivery-header` |
|
||||
| PUT | `/api/sources/sample/name` |
|
||||
| PUT | `/api/workflows/7/enabled` |
|
||||
|
||||
## Verification limits
|
||||
|
||||
A synthetic browser authenticator verifies protocol behavior, not a physical
|
||||
security key or every operating system. An OIDC unit test is not acceptance
|
||||
against a deployed provider. Disposable PostgreSQL smoke checks verify real SQL
|
||||
without putting database-dependent tests in the fast unit suite.
|
||||
|
||||
Existing anonymous conversations are retained but are not silently assigned to a
|
||||
new person. Existing service credentials remain privileged; this inventory does
|
||||
not claim that all internal gRPC methods have independent Cedar gates.
|
||||
|
||||
When changing a user-facing operation, update its inventory entry and its
|
||||
allow/deny behavior cases. Include another user in the same organization, a
|
||||
caller in another organization, a missing principal, unavailable policy storage,
|
||||
and the applicable owner/workspace/instance restrictions.
|
||||
|
||||
Bootstrap is unauthenticated until the first administrator is created. Complete
|
||||
setup before exposing a new installation to untrusted users. Last-active-owner
|
||||
protection for identity suspension/retirement is tracked separately as
|
||||
`archie-core-d7avc`; membership-policy guards are not that lifecycle guard.
|
||||
@@ -0,0 +1,2 @@
|
||||
node_modules/
|
||||
out/
|
||||
+115
@@ -0,0 +1,115 @@
|
||||
# e2e
|
||||
|
||||
Validation of the whole stack, run by hand or by an agent, never by
|
||||
`task check` or CI. It needs PostgreSQL 18, five services, Vite and a browser,
|
||||
which the gate must not. Docker is not needed: without it tasks queue and
|
||||
park, which is useful data for the dashboard.
|
||||
|
||||
| File | What it does |
|
||||
| --- | --- |
|
||||
| `stack.sh` | Starts PostgreSQL 18 (port 55432) and the five services as local processes, then Vite on 5173 |
|
||||
| `seed.sh` | Seeds the stack through the dashboard API; safe to rerun |
|
||||
| `run.cjs` | Runs `checks/*.cjs` in Chromium; screenshots, manifest and `report.html` to `out/<stamp>/` |
|
||||
| `checks/` | One module per behaviour |
|
||||
| `results/` | One committed report per release |
|
||||
|
||||
## Run
|
||||
|
||||
```bash
|
||||
task e2e:up # build, start everything, seed
|
||||
task e2e:check # list available checks (no stack needed)
|
||||
task e2e:check -- list # explicitly list checks
|
||||
task e2e:check -- audit-redirect # one check
|
||||
task e2e:check -- all # all checks
|
||||
task e2e:check -- --headed accessibility # watch a check in Chromium
|
||||
task e2e:check -- --headed all # watch every check
|
||||
task e2e:down # stop; e2e/stack.sh reset also deletes the data
|
||||
```
|
||||
|
||||
Headless is the default. `--headed` opens visible Chromium and slows browser
|
||||
actions to 150ms so you can follow them; assertions and saved evidence are the
|
||||
same in both modes. The terminal prints each check before it starts. Headed mode
|
||||
requires a graphical desktop.
|
||||
|
||||
Nothing reads the installed config: `stack.sh` points the XDG directories at
|
||||
`${ARCHIE_DEV_DIR:-~/.local/state/archie-dev}` and writes its overlay from
|
||||
`deployments/dev.toml`. Logs are in its `logs/`. `e2e/stack.sh restart archied`
|
||||
restarts one service. Run `task e2e:down` before starting again: startup refuses
|
||||
occupied service ports and checks that each launched process stays alive.
|
||||
|
||||
The seed creates a local test administrator: `operator@example.test`, password
|
||||
`archie-local-e2e-password`. Use it at `http://localhost:5173`; the browser
|
||||
checks sign in with the same account. These are test fixtures for this
|
||||
loopback-only stack. To use an existing test account, set `ARCHIE_E2E_EMAIL`
|
||||
and `ARCHIE_E2E_PASSWORD` for both seeding and browser checks. Seeding never
|
||||
resets an existing account or deletes test data.
|
||||
|
||||
The first run needs `pnpm install --dir e2e` and `pnpm --dir e2e exec playwright
|
||||
install chromium`. In the cloud environment, Chromium and Playwright are
|
||||
preinstalled; run with `NODE_PATH=$(pnpm root -g)`.
|
||||
|
||||
## Release evidence
|
||||
|
||||
```bash
|
||||
node e2e/run.cjs --record v1.54.0 all
|
||||
```
|
||||
|
||||
writes `results/v1.54.0.md`, the pass, fail or skip of every check for
|
||||
that release. Commit it with the release. Screenshots stay in `out/`.
|
||||
|
||||
## Writing a check
|
||||
|
||||
A module in `checks/` exports `async ({ page, go, shot, fail, skip, settled, attach, tolerate })`.
|
||||
|
||||
- `go(path)` loads a dashboard route: `waitUntil: 'load'` plus 1200ms.
|
||||
Wait for elements, never for `networkidle`: the event stream never goes idle.
|
||||
- `shot(label)` saves `<check>-<kebab>[-<w>x<h>].png` after a short settle,
|
||||
and records `{file, w, h, check}` in the manifest. The label is slugified,
|
||||
so `shot('/')` becomes `routes-home.png`; a viewport other than the
|
||||
1440x900 default adds a suffix (`-390x844`). Repeated labels get `-2`,
|
||||
`-3`, so every capture is kept.
|
||||
- `fail(msg)` records a problem without stopping.
|
||||
- `skip(reason)` stops the check and records a skip: a missing
|
||||
precondition, never a failure.
|
||||
- `tolerate(re)` ignores console errors matching `re`, for a response the page is designed to survive.
|
||||
- `attach(name, data)` saves a non-image artifact as `<check>-<name>`.
|
||||
- `settled(sel?)` waits for a selector or URL, then settles briefly.
|
||||
It is the harness-owned wait; checks need no capture wrapper or
|
||||
ad-hoc sleeps around screenshots.
|
||||
|
||||
Each check gets a fresh page at 1440x900 with the login `storageState`;
|
||||
a check that needs a phone viewport resizes it itself to 390x844.
|
||||
Those are the only two viewports in use. A throw, a `fail`, or any
|
||||
console or page error fails the check. One module covers one behaviour;
|
||||
families share a prefix: `audit-*` for the audit page (redirect,
|
||||
filters, revert, runtime, views-export, retention-live, phone),
|
||||
`workflow-*` for the canvas (loading, validation, phone-layout, logic),
|
||||
`chat-composer` for chat input.
|
||||
|
||||
`routes` loads every static route and flags text with stray leading,
|
||||
trailing or doubled spaces. `seeded` checks the seed is visible.
|
||||
`/logs` is visited but skipped by the whitespace lint: log lines are
|
||||
data, not copy.
|
||||
|
||||
## Output
|
||||
|
||||
Every run writes `out/<stamp>/` with the screenshots,
|
||||
`results.json` (the manifest: `{check, ok, ms, problems, artifacts[]}`,
|
||||
plus `skipped`/`skipReason` for skips) and `report.html`: a self-contained
|
||||
test record with the commit, totals and one row per check (status, time,
|
||||
message and that check's artifacts, screenshots inline). `attach(name, data)`
|
||||
adds a non-image artifact to the current check; a failed check also gets a
|
||||
`failure` screenshot.
|
||||
|
||||
Exits: 0 when every check passes or skips, 1 when any check fails,
|
||||
2 when the harness itself errors. `ARCHIE_E2E_URL` points the run at
|
||||
a dashboard other than `http://localhost:5173`.
|
||||
|
||||
## Pitfalls
|
||||
|
||||
| Symptom | Cause | Fix |
|
||||
| --- | --- | --- |
|
||||
| State Store exits: server is older than PostgreSQL 18 | another server answered | `stack.sh` uses port 55432; set `ARCHIE_DEV_PGPORT` if that is taken |
|
||||
| Startup says a port is in use | a stack or another process already owns it | Run `task e2e:down`, then `task e2e:up`; inspect any remaining listener with `ss -ltnp` |
|
||||
| Your own shell is killed (exit 144) | `pkill -f` matched its own command line | `stack.sh stop` or `restart`, which kill by PID |
|
||||
| Postgres aborts in the cloud | `/tmp/claude-0` is reset to mode 700 | `stack.sh` keeps the root cluster in `/var/lib/archie-dev` |
|
||||
@@ -0,0 +1,176 @@
|
||||
// Keyboard and phone access: the task dialog fits and tabs in order, pages
|
||||
// title correctly, the skip link and palette focus main content, and
|
||||
// query-only tab switches keep focus where it is. Then the audit's two
|
||||
// static sweeps (#1767): no unnamed controls on any route, and every keyboard
|
||||
// focus stop's indicator clears 3:1 against the background behind it.
|
||||
const assert = require('node:assert/strict');
|
||||
const { staticRoutes } = require('./helpers/routes.cjs');
|
||||
|
||||
module.exports = async ({ page, go, shot, fail, settled, tolerate }) => {
|
||||
// The extension catalogue 502 is a stack-environment issue, not this check.
|
||||
tolerate(/extensions\/catalogue/);
|
||||
await page.setViewportSize({ width: 390, height: 844 });
|
||||
await go('/tasks');
|
||||
await page.getByRole('button', { name: 'Jump to', exact: true }).click();
|
||||
await page.getByRole('option', { name: 'New task', exact: true }).click();
|
||||
const dialog = page.getByRole('dialog');
|
||||
await dialog.waitFor();
|
||||
await settled();
|
||||
const bounds = await dialog.boundingBox();
|
||||
assert.ok(bounds.y >= 0 && bounds.y + bounds.height <= 844, 'New task dialog extends outside viewport');
|
||||
await shot('phone-task-dialog-top');
|
||||
const start = dialog.getByRole('button', { name: 'Start task', exact: true });
|
||||
await start.scrollIntoViewIfNeeded();
|
||||
const button = await start.boundingBox();
|
||||
assert.ok(button.y >= 0 && button.y + button.height <= 844, 'Start task cannot be reached by scrolling');
|
||||
await shot('phone-task-dialog');
|
||||
const close = dialog.getByRole('button', { name: 'Close', exact: true });
|
||||
await dialog.getByRole('button', { name: 'Cancel', exact: true }).focus();
|
||||
await page.keyboard.press('Tab');
|
||||
assert.ok(await close.evaluate(el => el === document.activeElement), 'Close is missing from keyboard tab order');
|
||||
const closeBounds = await close.boundingBox();
|
||||
assert.ok(closeBounds.y >= 0 && closeBounds.y + closeBounds.height <= 844, 'Close cannot be reached by keyboard');
|
||||
await page.keyboard.press('Escape');
|
||||
for (const [path, title] of [['/tasks', 'Tasks'], ['/events', 'Events'], ['/account', 'Your account'], ['/settings/models', 'Models | Instance'], ['/org/models', 'Models | Organisation']]) {
|
||||
await go(path);
|
||||
assert.equal(await page.title(), `${title} | Archie`);
|
||||
}
|
||||
await page.keyboard.press('Tab');
|
||||
const skip = page.getByRole('link', { name: 'Skip to main content', exact: true });
|
||||
assert.ok(await skip.evaluate(el => el === document.activeElement), 'Skip link is not the first keyboard stop');
|
||||
await page.keyboard.press('Enter');
|
||||
assert.equal(await page.evaluate(() => document.activeElement?.id), 'main-content');
|
||||
await page.getByRole('button', { name: 'Toggle Sidebar', exact: true }).click();
|
||||
await page.getByRole('navigation', { name: 'Sections', exact: true }).getByRole('link', { name: 'Tasks', exact: true }).click();
|
||||
await page.waitForFunction(() => document.activeElement?.id === 'main-content', null, { timeout: 5000 }).catch(() => {});
|
||||
assert.equal(await page.evaluate(() => document.activeElement?.id), 'main-content', 'route navigation did not focus main');
|
||||
await page.getByRole('button', { name: 'Jump to', exact: true }).click();
|
||||
await page.getByRole('option', { name: 'Events', exact: true }).click();
|
||||
await page.waitForFunction(() => document.activeElement?.id === 'main-content', null, { timeout: 5000 }).catch(() => {});
|
||||
assert.equal(await page.evaluate(() => document.activeElement?.id), 'main-content', 'palette navigation did not focus main');
|
||||
// The conversation panel is only open on some entries to this page; the
|
||||
// focus check below needs it closed either way.
|
||||
const hide = page.getByRole('button', { name: 'Hide conversation', exact: true });
|
||||
if (await hide.count()) await hide.click();
|
||||
const tab = page.getByRole('tab', { name: /^Map/ });
|
||||
await tab.click();
|
||||
assert.ok(await tab.evaluate(el => el === document.activeElement), 'query-only navigation stole focus');
|
||||
|
||||
await page.setViewportSize({ width: 1440, height: 900 });
|
||||
|
||||
// Unnamed controls: every visible input, textarea, select, button or
|
||||
// widget role on each static route needs an accessible name (accname
|
||||
// order: labelledby, label, content, value, placeholder, title).
|
||||
for (const r of staticRoutes()) {
|
||||
await go(r);
|
||||
const unnamed = await page.evaluate(() => {
|
||||
const name = (el) => {
|
||||
const by = el.getAttribute('aria-labelledby');
|
||||
if (by) {
|
||||
const t = by.split(/\s+/).map((id) => (document.getElementById(id)?.textContent || '')).join(' ').trim();
|
||||
if (t) return t;
|
||||
}
|
||||
const al = el.getAttribute('aria-label');
|
||||
if (al && al.trim()) return al.trim();
|
||||
if (el.id) {
|
||||
const l = document.querySelector(`label[for="${CSS.escape(el.id)}"]`);
|
||||
if (l && l.textContent.trim()) return l.textContent.trim();
|
||||
}
|
||||
const wrap = el.closest('label');
|
||||
if (wrap && wrap.textContent.trim()) return wrap.textContent.trim();
|
||||
if (el.tagName === 'BUTTON' || el.getAttribute('role') === 'button' || el.getAttribute('role') === 'tab' || el.getAttribute('role') === 'switch') return el.textContent.trim();
|
||||
if (el.tagName === 'INPUT') {
|
||||
const t = (el.getAttribute('type') || 'text').toLowerCase();
|
||||
if (t === 'submit' || t === 'button' || t === 'reset') return el.value.trim();
|
||||
if (t === 'image') return (el.getAttribute('alt') || '').trim();
|
||||
}
|
||||
return (el.getAttribute('placeholder') || el.getAttribute('title') || '').trim();
|
||||
};
|
||||
return [...document.querySelectorAll('button, input, textarea, select, [role="button"], [role="tab"], [role="switch"], [role="checkbox"]')]
|
||||
.filter((el) => el.type !== 'hidden' && el.getClientRects().length)
|
||||
.filter((el) => !name(el))
|
||||
.map((el) => `${el.tagName.toLowerCase()}${el.id ? '#' + el.id : ''}: ${el.outerHTML.slice(0, 120)}`);
|
||||
});
|
||||
for (const u of unnamed) fail(`unnamed control on ${r}: ${u}`);
|
||||
}
|
||||
|
||||
// Focus contrast: Tab through each static route; the focused element's
|
||||
// outline or ring must clear 3:1 against the effective background behind it.
|
||||
const focusProbe = () => page.evaluate(() => {
|
||||
const el = document.activeElement;
|
||||
if (!el || el === document.body || el === document.documentElement) return null;
|
||||
const cs = getComputedStyle(el);
|
||||
const parse = (c) => {
|
||||
c = String(c).trim();
|
||||
let m = c.match(/rgba?\(([^)]+)\)/);
|
||||
if (m) {
|
||||
const p = m[1].split(',').map(Number);
|
||||
return { r: p[0], g: p[1], b: p[2], a: p.length > 3 ? p[3] : 1 };
|
||||
}
|
||||
m = c.match(/^#([0-9a-f]{3,8})$/i);
|
||||
if (m) {
|
||||
let h = m[1];
|
||||
if (h.length === 3 || h.length === 4) h = [...h].map((x) => x + x).join('');
|
||||
const n = parseInt(h.slice(0, 6), 16);
|
||||
return { r: (n >> 16) & 255, g: (n >> 8) & 255, b: n & 255, a: h.length === 8 ? parseInt(h.slice(6, 8), 16) / 255 : 1 };
|
||||
}
|
||||
return null;
|
||||
};
|
||||
const bgBehind = (start) => {
|
||||
for (let n = start; n; n = n.parentElement) {
|
||||
const c = parse(getComputedStyle(n).backgroundColor);
|
||||
if (c && c.a > 0) return c;
|
||||
}
|
||||
return { r: 255, g: 255, b: 255, a: 1 };
|
||||
};
|
||||
// An outer ring or outline is painted over the parent's background; an
|
||||
// inset one over the element's own. Score against whichever is higher.
|
||||
const bgSelf = bgBehind(el);
|
||||
const bgParent = bgBehind(el.parentElement);
|
||||
const over = (fg, bg) => {
|
||||
const a = fg.a + bg.a * (1 - fg.a);
|
||||
if (a === 0) return { r: 0, g: 0, b: 0 };
|
||||
return { r: (fg.r * fg.a + bg.r * bg.a * (1 - fg.a)) / a, g: (fg.g * fg.a + bg.g * bg.a * (1 - fg.a)) / a, b: (fg.b * fg.a + bg.b * bg.a * (1 - fg.a)) / a };
|
||||
};
|
||||
const lum = (c) => {
|
||||
const f = (v) => { v /= 255; return v <= 0.03928 ? v / 12.92 : Math.pow((v + 0.055) / 1.055, 2.4); };
|
||||
return 0.2126 * f(c.r) + 0.7152 * f(c.g) + 0.0722 * f(c.b);
|
||||
};
|
||||
const ratio = (c1, c2) => {
|
||||
const l1 = lum(c1), l2 = lum(c2);
|
||||
return (Math.max(l1, l2) + 0.05) / (Math.min(l1, l2) + 0.05);
|
||||
};
|
||||
let fg = null;
|
||||
// The ring lives in --tw-ring-shadow on :focus-visible; read the var
|
||||
// directly, then fall back to outline, any shadow layer, focus border.
|
||||
if (el.matches(':focus-visible')) {
|
||||
const m = cs.getPropertyValue('--tw-ring-shadow').match(/rgba?\([^)]+\)|#[0-9a-f]{3,8}\b/i);
|
||||
if (m) { const c = parse(m[0]); if (c && c.a > 0) fg = c; }
|
||||
}
|
||||
if (!fg && cs.outlineStyle !== 'none' && parseFloat(cs.outlineWidth) > 0) fg = parse(cs.outlineColor === 'currentcolor' ? cs.color : cs.outlineColor);
|
||||
if (!fg && cs.boxShadow && cs.boxShadow !== 'none') {
|
||||
for (const m of cs.boxShadow.matchAll(/rgba?\([^)]+\)|#[0-9a-f]{3,8}\b/gi)) {
|
||||
const c = parse(m[0]);
|
||||
if (c && c.a > 0) { fg = c; break; }
|
||||
}
|
||||
}
|
||||
if (!fg && el.matches(':focus-visible') && parseFloat(cs.borderTopWidth) > 0) {
|
||||
const c = parse(cs.borderTopColor);
|
||||
if (c && c.a > 0) fg = c;
|
||||
}
|
||||
const sig = `${el.tagName}#${el.id}:${(el.textContent || '').trim().slice(0, 30)}`;
|
||||
if (!fg) return { sig, ratio: 0 };
|
||||
return { sig, ratio: Math.max(ratio(over(fg, bgSelf), bgSelf), ratio(over(fg, bgParent), bgParent)) };
|
||||
});
|
||||
for (const r of staticRoutes()) {
|
||||
await go(r);
|
||||
let prev = '';
|
||||
for (let i = 0; i < 40; i++) {
|
||||
await page.keyboard.press('Tab');
|
||||
const info = await focusProbe();
|
||||
if (!info || info.sig === prev) break;
|
||||
prev = info.sig;
|
||||
if (info.ratio < 3) fail(`focus indicator under 3:1 on ${r} at ${info.sig} (ratio ${info.ratio.toFixed(2)})`);
|
||||
}
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,113 @@
|
||||
// Audit filters are server-evaluated through the URL contract: search,
|
||||
// category, time range, back/forward restore, denied, and the actor filter.
|
||||
const assert = require('node:assert/strict');
|
||||
const { trackAudit } = require('./helpers/audit-helpers.cjs');
|
||||
|
||||
module.exports = async ({ page, go, shot, fail }) => {
|
||||
const { requestMatching, waitForUrl } = trackAudit(page);
|
||||
|
||||
await go('/org/audit');
|
||||
const status = await page.evaluate(async () => (await fetch('/api/auth/status')).json());
|
||||
const actor = status?.user?.id;
|
||||
assert.ok(actor, 'signed-in identity has no id');
|
||||
|
||||
const search = page.getByLabel('Search events', { exact: true });
|
||||
let request = await requestMatching(
|
||||
() => search.fill('repository'),
|
||||
(u) => u.searchParams.get('q') === 'repository',
|
||||
);
|
||||
assert.ok(request, 'search issued no matching /api/audit request');
|
||||
await waitForUrl((u) => u.searchParams.get('q') === 'repository');
|
||||
assert.equal((await search.inputValue()), 'repository');
|
||||
|
||||
await go('/org/audit');
|
||||
request = await requestMatching(
|
||||
() => page.getByRole('button', { name: 'Runtime', exact: true }).click(),
|
||||
(u) => u.searchParams.get('categories') === 'runtime',
|
||||
);
|
||||
assert.ok(request, 'category filter issued no matching /api/audit request');
|
||||
await waitForUrl((u) => u.searchParams.get('categories') === 'runtime');
|
||||
assert.equal(
|
||||
await page.getByRole('button', { name: 'Runtime', exact: true }).getAttribute('aria-pressed'),
|
||||
'true',
|
||||
);
|
||||
|
||||
// Time: Any time drops the window from the request rather than guessing one.
|
||||
await page.getByRole('combobox', { name: 'Time range', exact: true }).click();
|
||||
request = await requestMatching(
|
||||
() => page.getByRole('option', { name: 'Any time', exact: true }).click(),
|
||||
(u) => u.searchParams.get('from') === null && u.searchParams.get('categories') === 'runtime',
|
||||
);
|
||||
assert.ok(request, 'Any time issued no matching /api/audit request');
|
||||
await waitForUrl((u) => u.searchParams.get('since') === 'any');
|
||||
assert.equal(await page.getByRole('combobox', { name: 'Time range', exact: true }).innerText(), 'Any time');
|
||||
|
||||
// Back/forward restore the controls the URL describes.
|
||||
const backRequest = page.waitForRequest(
|
||||
(r) => {
|
||||
const u = new URL(r.url());
|
||||
return u.pathname === '/api/audit' && u.searchParams.get('categories') === 'runtime' && !!u.searchParams.get('from');
|
||||
},
|
||||
{ timeout: 8000 },
|
||||
);
|
||||
await page.goBack();
|
||||
await backRequest;
|
||||
await waitForUrl((u) => u.searchParams.get('categories') === 'runtime' && u.searchParams.get('since') === null);
|
||||
assert.equal(await page.getByRole('combobox', { name: 'Time range', exact: true }).innerText(), 'Last 30 days');
|
||||
assert.equal(
|
||||
await page.getByRole('button', { name: 'Runtime', exact: true }).getAttribute('aria-pressed'),
|
||||
'true',
|
||||
'back did not restore the category toggle',
|
||||
);
|
||||
const forwardRequest = page.waitForRequest(
|
||||
(r) => {
|
||||
const u = new URL(r.url());
|
||||
return u.pathname === '/api/audit' && u.searchParams.get('categories') === 'runtime' && u.searchParams.get('from') === null;
|
||||
},
|
||||
{ timeout: 8000 },
|
||||
);
|
||||
await page.goForward();
|
||||
await forwardRequest;
|
||||
await waitForUrl((u) => u.searchParams.get('since') === 'any');
|
||||
assert.equal(await page.getByRole('combobox', { name: 'Time range', exact: true }).innerText(), 'Any time');
|
||||
|
||||
// Denied reaches the server through the same URL contract as the other
|
||||
// filters. It must both update the URL and issue a request.
|
||||
await go('/org/audit');
|
||||
const denied = page.getByRole('button', { name: 'Denied', exact: true });
|
||||
request = await requestMatching(
|
||||
() => denied.click(),
|
||||
(u) => u.searchParams.get('outcome') === 'denied',
|
||||
3000,
|
||||
);
|
||||
const deniedUrl = new URL(page.url());
|
||||
if (!request || deniedUrl.searchParams.get('outcome') !== 'denied') {
|
||||
await shot('denied');
|
||||
fail(
|
||||
`Denied filter did not reach the server: URL ${page.url()} has outcome=${deniedUrl.searchParams.get('outcome') ?? 'absent'}, ` +
|
||||
`aria-pressed=${await denied.getAttribute('aria-pressed')}, no /api/audit request with outcome=denied`,
|
||||
);
|
||||
} else {
|
||||
assert.equal(await denied.getAttribute('aria-pressed'), 'true');
|
||||
}
|
||||
|
||||
// Advanced actor filter: server-evaluated, in the URL, shown as a chip.
|
||||
await go('/org/audit');
|
||||
await page.getByRole('button', { name: 'Filters', exact: true }).click();
|
||||
const actorInput = page.getByLabel('Actor', { exact: true });
|
||||
request = await requestMatching(
|
||||
async () => {
|
||||
await actorInput.fill(actor);
|
||||
await actorInput.press('Enter');
|
||||
},
|
||||
(u) => u.searchParams.get('actor') === actor,
|
||||
);
|
||||
assert.ok(request, 'advanced actor filter issued no matching /api/audit request');
|
||||
await waitForUrl((u) => u.searchParams.get('actor') === actor);
|
||||
assert.match(
|
||||
await page.locator('ul[aria-label="Active filters"] li', { hasText: 'Actor:' }).first().innerText(),
|
||||
new RegExp(actor),
|
||||
);
|
||||
await shot('filters');
|
||||
await page.keyboard.press('Escape');
|
||||
};
|
||||
@@ -0,0 +1,42 @@
|
||||
// The audit page at phone width: secondary columns collapse, and the list,
|
||||
// an expanded row and the filters dialog fit without horizontal overflow.
|
||||
const assert = require('node:assert/strict');
|
||||
const { trackAudit } = require('./helpers/audit-helpers.cjs');
|
||||
|
||||
module.exports = async ({ page, go, shot, fail, settled }) => {
|
||||
trackAudit(page);
|
||||
|
||||
await page.setViewportSize({ width: 390, height: 844 });
|
||||
await go('/org/audit');
|
||||
const assertNoOverflow = async (label) => {
|
||||
const { scrollWidth, innerWidth } = await page.evaluate(() => ({
|
||||
scrollWidth: document.documentElement.scrollWidth,
|
||||
innerWidth,
|
||||
}));
|
||||
if (scrollWidth > innerWidth) {
|
||||
fail(`${label} overflows 390px: documentElement.scrollWidth=${scrollWidth} > innerWidth=${innerWidth}`);
|
||||
}
|
||||
};
|
||||
await page.locator('[data-row-key]').first().waitFor();
|
||||
await assertNoOverflow('audit list');
|
||||
assert.equal(
|
||||
await page.locator('thead th', { hasText: 'Target' }).first().evaluate((el) => getComputedStyle(el).display),
|
||||
'none',
|
||||
'secondary columns are still rendered on the phone',
|
||||
);
|
||||
await shot('list');
|
||||
|
||||
const phoneRow = page.locator('[data-row-key]').first();
|
||||
await phoneRow.focus();
|
||||
await page.keyboard.press('Enter');
|
||||
await settled();
|
||||
assert.equal(await phoneRow.getAttribute('aria-expanded'), 'true', 'phone row did not expand');
|
||||
await assertNoOverflow('expanded change set');
|
||||
await shot('expanded');
|
||||
|
||||
await page.getByRole('button', { name: 'Filters', exact: true }).click();
|
||||
await page.getByRole('dialog').first().waitFor();
|
||||
await settled();
|
||||
await assertNoOverflow('advanced filters');
|
||||
await shot('filters');
|
||||
};
|
||||
@@ -0,0 +1,50 @@
|
||||
// A deep link to the old history route redirects to the audit page keeping
|
||||
// section, actor, since and the hash, and the feed loads with filter chips.
|
||||
const assert = require('node:assert/strict');
|
||||
const { trackAudit } = require('./helpers/audit-helpers.cjs');
|
||||
|
||||
module.exports = async ({ page, go, shot, fail }) => {
|
||||
const { lastRequest } = trackAudit(page);
|
||||
|
||||
await go('/org/audit');
|
||||
const status = await page.evaluate(async () => (await fetch('/api/auth/status')).json());
|
||||
const actor = status?.user?.id;
|
||||
assert.ok(actor, 'signed-in identity has no id');
|
||||
|
||||
const deepLink = `/settings/history?section=container-runtime-policies&actor=${encodeURIComponent(actor)}&since=30d#deep`;
|
||||
await go(deepLink);
|
||||
assert.match(page.url(), /\/org\/audit\?/, 'history did not redirect to the audit route');
|
||||
assert.match(page.url(), /section=container-runtime-policies/, 'redirect dropped section');
|
||||
assert.match(page.url(), new RegExp(`actor=${encodeURIComponent(actor)}`), 'redirect dropped actor');
|
||||
assert.match(page.url(), /since=30d/, 'redirect dropped since');
|
||||
assert.match(page.url(), /#deep$/, 'redirect dropped the hash');
|
||||
const redirected = lastRequest();
|
||||
assert.ok(redirected, 'the redirect issued no /api/audit request');
|
||||
assert.equal(redirected.searchParams.get('kind'), 'container-runtime-policies');
|
||||
assert.equal(redirected.searchParams.get('actor'), actor);
|
||||
|
||||
// The feed must be readable before anything below can mean anything. A 500
|
||||
// here is the whole page: say what the server answered instead of timing out.
|
||||
const probe = await page.evaluate(async () => {
|
||||
const response = await fetch('/api/audit?limit=1');
|
||||
return { status: response.status, body: await response.text() };
|
||||
});
|
||||
if (probe.status !== 200) {
|
||||
await shot('unavailable');
|
||||
fail(`GET /api/audit returned ${probe.status}: ${probe.body.slice(0, 200)}`);
|
||||
return;
|
||||
}
|
||||
|
||||
const kindChip = page.locator('ul[aria-label="Active filters"] li', { hasText: 'Kind:' });
|
||||
await kindChip.first().waitFor({ timeout: 8000 });
|
||||
assert.match(await kindChip.first().innerText(), /Container runtime policies/, 'kind chip missing its catalog title');
|
||||
assert.match(
|
||||
await page.locator('ul[aria-label="Active filters"] li', { hasText: 'Actor:' }).first().innerText(),
|
||||
new RegExp(actor),
|
||||
'actor chip missing',
|
||||
);
|
||||
await shot('redirect');
|
||||
await go('/org/audit');
|
||||
await page.locator('[data-row-key]').first().waitFor();
|
||||
await shot('desktop');
|
||||
};
|
||||
@@ -0,0 +1,148 @@
|
||||
// Audit retention reads the stored resource, the live tail prepends new rows
|
||||
// without a reload and holds them behind a button while scrolled away, and a
|
||||
// retention save persists. The save stays last: it must not stop the rest.
|
||||
const assert = require('node:assert/strict');
|
||||
const { trackAudit } = require('./helpers/audit-helpers.cjs');
|
||||
|
||||
module.exports = async ({ page, go, shot, fail, settled }) => {
|
||||
const { loadCount } = trackAudit(page);
|
||||
|
||||
await go('/org/audit');
|
||||
const resourceResponse = await page.request.get(`${new URL(page.url()).origin}/api/control-plane/resources/audit-retention`);
|
||||
assert.equal(resourceResponse.status(), 200, 'audit-retention resource is unreadable');
|
||||
const retentionResource = await resourceResponse.json();
|
||||
const retentionHours = (value) => {
|
||||
const match = String(value || '').match(/^(\d+)h$/);
|
||||
return match ? Number(match[1]) : 0;
|
||||
};
|
||||
const originalHours = retentionHours(retentionResource.resource.value.runtime_event_retention);
|
||||
|
||||
const openRetention = async () => {
|
||||
await page.getByRole('button', { name: 'Audit actions', exact: true }).click();
|
||||
await page.getByRole('menuitem', { name: 'Retention', exact: true }).click();
|
||||
const dialog = page.getByRole('dialog');
|
||||
await dialog.waitFor();
|
||||
await dialog.getByLabel('Runtime event retention (hours)', { exact: true }).waitFor();
|
||||
return dialog;
|
||||
};
|
||||
|
||||
let retentionDialog = await openRetention();
|
||||
assert.match(await retentionDialog.innerText(), /Audit retention/);
|
||||
assert.equal(
|
||||
await retentionDialog.getByLabel('Runtime event retention (hours)', { exact: true }).inputValue(),
|
||||
String(originalHours),
|
||||
'retention dialog did not read the stored resource',
|
||||
);
|
||||
await retentionDialog.getByRole('button', { name: 'Cancel', exact: true }).click();
|
||||
await retentionDialog.waitFor({ state: 'hidden', timeout: 5000 }).catch(() => {});
|
||||
assert.ok(!(await retentionDialog.isVisible().catch(() => false)), 'Cancel left the retention dialog open');
|
||||
|
||||
// ---- live tail -----------------------------------------------------------
|
||||
await go('/org/audit');
|
||||
await page.evaluate(() => window.scrollTo(0, 0));
|
||||
await settled();
|
||||
const topKey = await page.locator('[data-row-key]').first().getAttribute('data-row-key');
|
||||
const loadsBeforeWrite = loadCount();
|
||||
let resource = await (await page.request.get(`${new URL(page.url()).origin}/api/control-plane/resources/audit-retention`)).json();
|
||||
const toggleRetention = async () => {
|
||||
const current = retentionHours(resource.resource.value.runtime_event_retention);
|
||||
const next = current === 2160 ? 2161 : 2160;
|
||||
const written = await page.request.post(
|
||||
`${new URL(page.url()).origin}/api/control-plane/resources/audit-retention/commands/replace`,
|
||||
{
|
||||
headers: { 'X-Archie-CSRF': '1', Origin: new URL(page.url()).origin },
|
||||
data: { value: { runtime_event_retention: `${next}h` }, expected_version: resource.resource.version },
|
||||
},
|
||||
);
|
||||
const body = await written.text();
|
||||
assert.equal(written.status(), 200, `retention write answered ${written.status()}: ${body.slice(0, 200)}`);
|
||||
resource = JSON.parse(body);
|
||||
};
|
||||
|
||||
await toggleRetention();
|
||||
let liveKey = null;
|
||||
for (let attempt = 0; attempt < 40; attempt += 1) {
|
||||
const key = await page.locator('[data-row-key]').first().getAttribute('data-row-key');
|
||||
if (key !== topKey) {
|
||||
liveKey = key;
|
||||
break;
|
||||
}
|
||||
await page.waitForTimeout(300);
|
||||
}
|
||||
if (!liveKey) {
|
||||
fail('live tail did not show a new row within 12s of a write');
|
||||
await shot('live');
|
||||
} else {
|
||||
assert.equal(loadCount(), loadsBeforeWrite, 'the live row required a page reload');
|
||||
assert.match(
|
||||
await page.locator(`[data-row-key="${liveKey}"]`).innerText(),
|
||||
/audit-retention/i,
|
||||
'the live row is not the write that caused it',
|
||||
);
|
||||
await shot('live');
|
||||
}
|
||||
|
||||
// Scrolled away, a new event is held behind a button instead of jumping the
|
||||
// list under the operator.
|
||||
await page.evaluate(() => window.scrollTo(0, 900));
|
||||
await settled();
|
||||
const scrolledTo = await page.evaluate(() => window.scrollY);
|
||||
assert.ok(scrolledTo > 80, 'the feed is too short to test held new events');
|
||||
const heldTop = await page.locator('[data-row-key]').first().getAttribute('data-row-key');
|
||||
await toggleRetention();
|
||||
const heldButton = page.getByRole('button', { name: /^\d+ new events?$/ }).first();
|
||||
let held = false;
|
||||
for (let attempt = 0; attempt < 40; attempt += 1) {
|
||||
if ((await heldButton.count()) && (await heldButton.isVisible().catch(() => false))) {
|
||||
held = true;
|
||||
break;
|
||||
}
|
||||
await page.waitForTimeout(300);
|
||||
}
|
||||
if (!held) {
|
||||
fail('held new events did not appear while scrolled away');
|
||||
await shot('held');
|
||||
} else {
|
||||
assert.equal(
|
||||
await page.locator('[data-row-key]').first().getAttribute('data-row-key'),
|
||||
heldTop,
|
||||
'a new row was prepended while the operator was scrolled away',
|
||||
);
|
||||
await shot('held');
|
||||
await heldButton.click();
|
||||
await page.waitForFunction(
|
||||
(top) => document.querySelector('[data-row-key]')?.getAttribute('data-row-key') !== top,
|
||||
heldTop,
|
||||
{ timeout: 8000 },
|
||||
).catch(() => {});
|
||||
await settled();
|
||||
assert.notEqual(
|
||||
await page.locator('[data-row-key]').first().getAttribute('data-row-key'),
|
||||
heldTop,
|
||||
'showing held events did not prepend the new row',
|
||||
);
|
||||
assert.ok((await page.evaluate(() => window.scrollY)) < 10, 'showing held events did not return to the top');
|
||||
}
|
||||
|
||||
// ---- retention: save -----------------------------------------------------
|
||||
// Kept last: the page error this currently raises must not stop the rest.
|
||||
await go('/org/audit');
|
||||
retentionDialog = await openRetention();
|
||||
const hoursField = retentionDialog.getByLabel('Runtime event retention (hours)', { exact: true });
|
||||
const beforeSave = await (await page.request.get(`${new URL(page.url()).origin}/api/control-plane/resources/audit-retention`)).json();
|
||||
const beforeHours = retentionHours(beforeSave.resource.value.runtime_event_retention);
|
||||
const wanted = beforeHours === 2160 ? 2161 : 2160;
|
||||
await hoursField.fill(String(wanted));
|
||||
await retentionDialog.getByRole('button', { name: 'Save', exact: true }).click();
|
||||
await retentionDialog.waitFor({ state: 'hidden', timeout: 5000 }).catch(() => {});
|
||||
const stillOpen = await retentionDialog.isVisible().catch(() => false);
|
||||
const afterSave = await (await page.request.get(`${new URL(page.url()).origin}/api/control-plane/resources/audit-retention`)).json();
|
||||
const afterHours = retentionHours(afterSave.resource.value.runtime_event_retention);
|
||||
if (stillOpen || afterHours !== wanted) {
|
||||
await shot('retention-save');
|
||||
fail(
|
||||
`retention save did not complete: dialog ${stillOpen ? 'stayed open' : 'closed'}, ` +
|
||||
`stored retention is ${afterHours}h (wanted ${wanted}h), URL ${page.url()}`,
|
||||
);
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,69 @@
|
||||
// A revertable change set expands to its Before/After diff, offers one Revert
|
||||
// action whose dialog cancels cleanly, and toggles from the keyboard.
|
||||
const assert = require('node:assert/strict');
|
||||
const { DEFAULT_WINDOW_MS, trackAudit } = require('./helpers/audit-helpers.cjs');
|
||||
|
||||
module.exports = async ({ page, go, shot, fail, settled }) => {
|
||||
trackAudit(page);
|
||||
|
||||
await go('/org/audit');
|
||||
await page.locator('[data-row-key]').first().waitFor();
|
||||
const from = new Date(Date.now() - DEFAULT_WINDOW_MS).toISOString();
|
||||
// The feed page size is 100: only rows in this response are rendered.
|
||||
const feed = await page.evaluate(
|
||||
async (iso) => (await fetch(`/api/audit?limit=100&from=${encodeURIComponent(iso)}`)).json(),
|
||||
from,
|
||||
);
|
||||
const records = feed.records || [];
|
||||
assert.ok(records.length, 'the seeded feed is empty');
|
||||
|
||||
const changeSet = records.find(
|
||||
(row) =>
|
||||
row.target?.kind === 'resource' &&
|
||||
(row.detail?.fields || []).length > 0 &&
|
||||
(row.detail?.version ?? 0) > 1,
|
||||
);
|
||||
if (!changeSet) {
|
||||
fail('no revertable settings change set in the feed; cannot exercise the diff or Revert');
|
||||
return;
|
||||
}
|
||||
|
||||
const row = page.locator(`[data-row-key="${changeSet.id}"]`);
|
||||
await row.waitFor();
|
||||
await row.scrollIntoViewIfNeeded();
|
||||
await row.locator('td').first().click();
|
||||
assert.equal(await row.getAttribute('aria-expanded'), 'true', 'click did not expand the change set');
|
||||
const detail = row.locator('xpath=following-sibling::tr[1]');
|
||||
await detail.getByText('Before:', { exact: false }).first().waitFor();
|
||||
assert.match(await detail.innerText(), /After:/, 'expanded change set has no after value');
|
||||
assert.equal(
|
||||
await detail.getByRole('button', { name: /^Revert \S/ }).count(),
|
||||
0,
|
||||
'the audit diff offers a per-field revert',
|
||||
);
|
||||
const revertAll = page.getByRole('button', { name: 'Revert', exact: true });
|
||||
assert.ok((await revertAll.count()) > 0, 'no Revert action on a revertable change set');
|
||||
await shot('change-set');
|
||||
|
||||
await revertAll.first().click();
|
||||
const dialog = page.getByRole('alertdialog');
|
||||
await dialog.waitFor();
|
||||
assert.match(await dialog.innerText(), /Revert this change\?/);
|
||||
assert.match(await dialog.innerText(), /previous version opens for review/i);
|
||||
await dialog.getByRole('button', { name: 'Cancel', exact: true }).click();
|
||||
await dialog.waitFor({ state: 'hidden', timeout: 5000 }).catch(() => {});
|
||||
assert.ok(!(await dialog.isVisible().catch(() => false)), 'Cancel left the revert dialog open');
|
||||
assert.equal(
|
||||
await page.getByRole('region', { name: 'Unsaved changes' }).count(),
|
||||
0,
|
||||
'Cancel touched the save bar',
|
||||
);
|
||||
|
||||
// Enter is the keyboard equivalent of clicking the row.
|
||||
await row.click();
|
||||
assert.equal(await row.getAttribute('aria-expanded'), 'false', 'the row did not collapse');
|
||||
await row.focus();
|
||||
await page.keyboard.press('Enter');
|
||||
await settled();
|
||||
assert.equal(await row.getAttribute('aria-expanded'), 'true', 'Enter did not expand the change set');
|
||||
};
|
||||
@@ -0,0 +1,36 @@
|
||||
// A runtime event with a task target expands to its metadata and links to
|
||||
// the task. The seed's work requests park and record the event; the feed is
|
||||
// filtered to it so settings noise cannot push it off the page. Without it
|
||||
// there is nothing to exercise, so the check skips instead of failing.
|
||||
const assert = require('node:assert/strict');
|
||||
const { DEFAULT_WINDOW_MS, trackAudit } = require('./helpers/audit-helpers.cjs');
|
||||
|
||||
module.exports = async ({ page, go, skip }) => {
|
||||
trackAudit(page);
|
||||
|
||||
await go('/org/audit?kind=parked');
|
||||
await page.locator('[data-row-key]').first().waitFor();
|
||||
const from = new Date(Date.now() - DEFAULT_WINDOW_MS).toISOString();
|
||||
// The feed page size is 100: only rows in this response are rendered.
|
||||
const feed = await page.evaluate(
|
||||
async (iso) => (await fetch(`/api/audit?limit=100&kind=parked&from=${encodeURIComponent(iso)}`)).json(),
|
||||
from,
|
||||
);
|
||||
const records = feed.records || [];
|
||||
const runtime = records.find((row) => row.category === 'runtime' && row.target?.kind === 'task' && row.target?.id);
|
||||
if (!runtime) {
|
||||
skip('no runtime event with a task target in the feed');
|
||||
}
|
||||
|
||||
const row = page.locator(`[data-row-key="${runtime.id}"]`);
|
||||
await row.waitFor();
|
||||
await row.scrollIntoViewIfNeeded();
|
||||
await row.locator('td').first().click();
|
||||
assert.equal(await row.getAttribute('aria-expanded'), 'true', 'runtime row did not expand');
|
||||
const detail = row.locator('xpath=following-sibling::tr[1]');
|
||||
await detail.locator('dl dt', { hasText: 'Target' }).first().waitFor();
|
||||
assert.match(await detail.innerText(), /Table/, 'runtime metadata has no table row');
|
||||
const link = detail.getByRole('link', { name: runtime.target.label || runtime.target.id, exact: true });
|
||||
assert.equal(await link.count(), 1, 'runtime target is not a link');
|
||||
assert.equal(await link.getAttribute('href'), `/tasks/${runtime.target.id}`);
|
||||
};
|
||||
@@ -0,0 +1,50 @@
|
||||
// Audit saved views round-trip through the URL, and CSV/JSON exports carry
|
||||
// the resolved window and arrive as attachments.
|
||||
const assert = require('node:assert/strict');
|
||||
const { trackAudit, exportOnce } = require('./helpers/audit-helpers.cjs');
|
||||
|
||||
module.exports = async ({ page, go, shot, fail, settled }) => {
|
||||
const { waitForUrl } = trackAudit(page);
|
||||
|
||||
await go('/org/audit');
|
||||
await page.getByRole('button', { name: 'Runtime', exact: true }).click();
|
||||
await waitForUrl((u) => u.searchParams.get('categories') === 'runtime');
|
||||
|
||||
const viewName = `e2e-view-${Date.now()}`;
|
||||
await page.getByRole('button', { name: 'Audit actions', exact: true }).click();
|
||||
await page.getByRole('menuitem', { name: 'Save view…', exact: true }).click();
|
||||
const saveDialog = page.getByRole('dialog');
|
||||
await saveDialog.waitFor();
|
||||
await saveDialog.getByLabel('Name', { exact: true }).fill(viewName);
|
||||
await saveDialog.getByRole('button', { name: 'Save', exact: true }).click();
|
||||
await settled();
|
||||
await saveDialog.waitFor({ state: 'hidden', timeout: 5000 }).catch(() => {});
|
||||
|
||||
const savedView = page.getByRole('combobox', { name: 'Saved view', exact: true });
|
||||
await savedView.waitFor();
|
||||
assert.equal((await savedView.innerText()).trim(), viewName);
|
||||
await shot('saved-view');
|
||||
|
||||
await page.getByRole('button', { name: 'Runtime', exact: true }).click();
|
||||
await waitForUrl((u) => u.searchParams.get('categories') === null);
|
||||
await savedView.click();
|
||||
await page.getByRole('option', { name: viewName, exact: true }).click();
|
||||
await waitForUrl((u) => u.searchParams.get('categories') === 'runtime');
|
||||
assert.equal((await savedView.innerText()).trim(), viewName, 'applying the saved view did not restore it');
|
||||
|
||||
await page.getByRole('button', { name: 'Audit actions', exact: true }).click();
|
||||
await page.getByRole('menuitem', { name: 'Delete view', exact: true }).click();
|
||||
await savedView.waitFor({ state: 'detached', timeout: 5000 }).catch(() => {});
|
||||
assert.equal(await savedView.count(), 0, 'deleting the saved view left it in the picker');
|
||||
|
||||
await go('/org/audit');
|
||||
await page.getByRole('button', { name: 'Export', exact: true }).click();
|
||||
await page.getByRole('menuitem', { name: 'CSV', exact: true }).waitFor();
|
||||
await shot('export');
|
||||
await page.keyboard.press('Escape');
|
||||
|
||||
const csvBody = await exportOnce(page, fail, 'CSV', 'csv');
|
||||
if (csvBody !== null) assert.ok(csvBody.split('\n')[0].trim().length > 0, 'CSV export is empty');
|
||||
const jsonBody = await exportOnce(page, fail, 'JSON', 'json');
|
||||
if (jsonBody !== null) assert.ok(jsonBody.trimStart().startsWith('['), 'JSON export is not an array');
|
||||
};
|
||||
@@ -0,0 +1,28 @@
|
||||
// The chat composer: IME confirmation never submits the draft, Shift+Enter
|
||||
// inserts a newline, and ordinary Enter submits and clears.
|
||||
const assert = require('node:assert/strict');
|
||||
|
||||
module.exports = async ({ page, go, shot }) => {
|
||||
await go('/events');
|
||||
const composer = page.getByRole('textbox', { name: 'Message Archie', exact: true });
|
||||
await composer.waitFor();
|
||||
await composer.fill('Composition in progress');
|
||||
const sent = [];
|
||||
await page.route('**/api/chat/stream', async route => {
|
||||
sent.push(route.request().postDataJSON().text);
|
||||
await route.fulfill({ contentType: 'text/event-stream', body: 'data: {"type":"done","text":"Test response"}\n\n' });
|
||||
});
|
||||
for (const event of [{ isComposing: true }, { keyCode: 229 }]) {
|
||||
await composer.dispatchEvent('keydown', { key: 'Enter', bubbles: true, cancelable: true, ...event });
|
||||
assert.equal(await composer.inputValue(), 'Composition in progress', 'IME confirmation submitted the draft');
|
||||
}
|
||||
assert.equal(sent.length, 0);
|
||||
await composer.press('Shift+Enter');
|
||||
assert.ok((await composer.inputValue()).includes('\n'), 'Shift+Enter no longer inserts a newline');
|
||||
await composer.fill('Ordinary Enter submits');
|
||||
const request = page.waitForRequest('**/api/chat/stream');
|
||||
await composer.press('Enter');
|
||||
assert.equal((await request).postDataJSON().text, 'Ordinary Enter submits');
|
||||
assert.equal(await composer.inputValue(), '');
|
||||
await shot('chat-composition');
|
||||
};
|
||||
@@ -0,0 +1,50 @@
|
||||
// Real local API records; workflow edits stay unsaved and the test agent retires.
|
||||
const assert = require('node:assert/strict');
|
||||
module.exports = async ({ page, go, shot }) => {
|
||||
const base = process.env.ARCHIE_E2E_URL || 'http://localhost:5173';
|
||||
const headers = { 'X-Archie-CSRF': '1', Origin: base };
|
||||
let agent;
|
||||
const command = async (name, display_name = '') => {
|
||||
const response = await page.request.post(`${base}/api/identities/${agent.id}/${name}`, {
|
||||
headers, data: { expected_version: agent.version, display_name },
|
||||
});
|
||||
assert.equal(response.ok(), true, await response.text());
|
||||
agent = await response.json();
|
||||
};
|
||||
const openSettings = async () => {
|
||||
await go('/workflows');
|
||||
await page.getByRole('button', { name: /^implement/ }).click();
|
||||
const runPicker = page.getByRole('combobox', { name: 'Run shown on the canvas' });
|
||||
if (await runPicker.count()) { await runPicker.click(); await page.getByRole('option', { name: 'Definition', exact: true }).click(); }
|
||||
await page.locator('.vue-flow__node').filter({ hasText: 'Workflow' }).first().click();
|
||||
return page.getByRole('combobox', { name: 'Execution identity', exact: true });
|
||||
};
|
||||
try {
|
||||
const created = await page.request.post(`${base}/api/identities`, {
|
||||
headers, data: { display_name: `E2E execution agent ${Date.now()}`, kind: 'bot' },
|
||||
});
|
||||
assert.equal(created.ok(), true, await created.text());
|
||||
agent = await created.json();
|
||||
const trigger = await openSettings();
|
||||
await page.waitForFunction(() => !document.querySelector('[aria-label="Execution identity"]')?.hasAttribute('disabled'));
|
||||
await trigger.click();
|
||||
await page.getByRole('option', { name: agent.display_name, exact: true }).click();
|
||||
assert.match(await trigger.innerText(), new RegExp(agent.display_name));
|
||||
await shot('named-execution-identity');
|
||||
await command('rename', agent.display_name + ' renamed');
|
||||
await page.reload();
|
||||
const renamed = await openSettings();
|
||||
await page.waitForFunction(() => !document.querySelector('[aria-label="Execution identity"]')?.hasAttribute('disabled'));
|
||||
await renamed.click();
|
||||
await page.getByRole('option', { name: agent.display_name, exact: true }).waitFor();
|
||||
await page.keyboard.press('Escape');
|
||||
await command('suspend');
|
||||
await page.reload();
|
||||
const suspended = await openSettings();
|
||||
await page.waitForFunction(() => !document.querySelector('[aria-label="Execution identity"]')?.hasAttribute('disabled'));
|
||||
await suspended.click();
|
||||
assert.equal(await page.getByRole('option', { name: agent.display_name, exact: true }).and(page.locator(':not([data-disabled])')).count(), 0);
|
||||
} finally {
|
||||
if (agent && agent.lifecycle !== 'retired') await command('retire');
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,103 @@
|
||||
// Shared setup for the audit-* checks: feed request tracking, URL waits,
|
||||
// and the export download-or-popup accept. One behaviour per check module;
|
||||
// this file holds only what several of them need.
|
||||
const assert = require('node:assert/strict');
|
||||
const fs = require('node:fs');
|
||||
|
||||
const DEFAULT_WINDOW_MS = 30 * 24 * 60 * 60 * 1000;
|
||||
|
||||
function isAudit(u) {
|
||||
return u.pathname === '/api/audit';
|
||||
}
|
||||
|
||||
// Installs request tracking on a fresh check page. Returns the helpers the
|
||||
// audit checks share; a check destructures only what it uses.
|
||||
function trackAudit(page) {
|
||||
page.setDefaultTimeout(10000);
|
||||
const auditRequests = [];
|
||||
page.on('request', (request) => {
|
||||
try {
|
||||
const url = new URL(request.url());
|
||||
if (isAudit(url) || url.pathname === '/api/audit/export') auditRequests.push(url);
|
||||
} catch {
|
||||
// A non-URL request cannot be an audit call.
|
||||
}
|
||||
});
|
||||
let loads = 0;
|
||||
page.on('load', () => (loads += 1));
|
||||
|
||||
const requestMatching = async (action, predicate, timeout = 6000) => {
|
||||
const waiter = page
|
||||
.waitForRequest(
|
||||
(request) => {
|
||||
try {
|
||||
const url = new URL(request.url());
|
||||
return (isAudit(url) || url.pathname === '/api/audit/export') && predicate(url);
|
||||
} catch {
|
||||
return false;
|
||||
}
|
||||
},
|
||||
{ timeout },
|
||||
)
|
||||
.catch(() => null);
|
||||
await action();
|
||||
return waiter;
|
||||
};
|
||||
|
||||
const waitForUrl = (predicate, timeout = 8000) =>
|
||||
page.waitForURL((url) => predicate(new URL(url)), { timeout });
|
||||
|
||||
const lastRequest = () => auditRequests[auditRequests.length - 1] || null;
|
||||
const loadCount = () => loads;
|
||||
|
||||
return { requestMatching, waitForUrl, lastRequest, loadCount };
|
||||
}
|
||||
|
||||
// Export resolves its window at click time and opens a tab. A successful
|
||||
// export arrives as an attachment download; a failed one stays visible in
|
||||
// that tab, so the check accepts either and reads the response from it.
|
||||
async function exportOnce(page, fail, label, extension) {
|
||||
await page.getByRole('button', { name: 'Export', exact: true }).click();
|
||||
const item = page.getByRole('menuitem', { name: label, exact: true });
|
||||
await item.waitFor();
|
||||
const downloadP = page.waitForEvent('download', { timeout: 15000 }).then((download) => ({ download })).catch(() => null);
|
||||
const popupP = page.waitForEvent('popup', { timeout: 15000 }).then((popup) => ({ popup })).catch(() => null);
|
||||
await item.click();
|
||||
const settled = await Promise.race([downloadP, popupP]);
|
||||
if (!settled) {
|
||||
fail(`${label} export neither downloaded nor opened a tab`);
|
||||
return null;
|
||||
}
|
||||
if (settled.popup) {
|
||||
await settled.popup.waitForLoadState('load').catch(() => {});
|
||||
const url = new URL(settled.popup.url());
|
||||
assert.equal(url.pathname, '/api/audit/export', `${label} opened ${url.href}`);
|
||||
assert.equal(url.searchParams.get('format'), extension);
|
||||
assert.ok(url.searchParams.get('from'), `${label} export has no explicit start`);
|
||||
assert.ok(url.searchParams.get('to'), `${label} export has no explicit end`);
|
||||
const response = await page.request.get(url.href);
|
||||
const body = await response.text();
|
||||
if (response.status() !== 200) {
|
||||
fail(`${label} export failed (${response.status()}): ${body.slice(0, 200)}`);
|
||||
return null;
|
||||
}
|
||||
if (!new RegExp(`attachment;.*\\.${extension}`).test(response.headers()['content-disposition'] || '')) {
|
||||
fail(`${label} export opened a tab without an attachment filename`);
|
||||
return null;
|
||||
}
|
||||
return body;
|
||||
}
|
||||
if (!new RegExp(`\\.${extension}$`).test(settled.download.suggestedFilename())) {
|
||||
fail(`${label} export did not download a .${extension} file`);
|
||||
return null;
|
||||
}
|
||||
const failure = await settled.download.failure();
|
||||
if (failure) {
|
||||
fail(`${label} download failed: ${failure}`);
|
||||
return null;
|
||||
}
|
||||
const saved = await settled.download.path();
|
||||
return saved ? fs.readFileSync(saved, 'utf8') : '';
|
||||
}
|
||||
|
||||
module.exports = { DEFAULT_WINDOW_MS, isAudit, trackAudit, exportOnce };
|
||||
@@ -0,0 +1,18 @@
|
||||
// Shared by the org-* and setup checks: acting in a seeded org and the 404s a
|
||||
// fresh org's pages are built to survive.
|
||||
const ORG = { home: 'org-sys', beta: 'org-beta', outsider: 'org-gamma' };
|
||||
|
||||
// A new org has written no documents, and the instance-only reads answer
|
||||
// not found outside the system org.
|
||||
const ABSENT = /status of 404.*\/api\/(control-plane|schedules|identities)/;
|
||||
|
||||
// Selects an org the way the topbar does, over the page's own session.
|
||||
async function selectOrg(page, id) {
|
||||
const origin = new URL(page.url() === 'about:blank' ? 'http://localhost:5173' : page.url()).origin;
|
||||
return page.request.put(`${origin}/api/orgs/current`, {
|
||||
headers: { 'X-Archie-CSRF': '1', Origin: origin },
|
||||
data: { id },
|
||||
});
|
||||
}
|
||||
|
||||
module.exports = { ORG, ABSENT, selectOrg };
|
||||
@@ -0,0 +1,19 @@
|
||||
// The dashboard's static routes, read from the router source so a new page is
|
||||
// swept automatically. Parameterised and redirect routes are skipped.
|
||||
const fs = require('fs');
|
||||
const path = require('path');
|
||||
|
||||
function staticRoutes() {
|
||||
const src = fs.readFileSync(path.join(__dirname, '../../../ui/src/router/index.ts'), 'utf8');
|
||||
const out = [];
|
||||
for (const line of src.split('\n')) {
|
||||
if (/redirect:/.test(line)) continue;
|
||||
const m = line.match(/path: "([^"]*)"/);
|
||||
if (!m || m[1].includes(':')) continue;
|
||||
if (m[1].startsWith('/')) out.push(m[1]);
|
||||
else if (m[1]) out.push('/org/' + m[1]);
|
||||
}
|
||||
return [...new Set(out)];
|
||||
}
|
||||
|
||||
module.exports = { staticRoutes };
|
||||
@@ -0,0 +1,36 @@
|
||||
const assert=require('node:assert/strict');
|
||||
module.exports=async({page,go,shot,tolerate})=>{
|
||||
// The extension catalogue 502 is a stack-environment issue, not this check.
|
||||
tolerate(/extensions\/catalogue/);
|
||||
await page.route('**/api/access/policies',async route=>{await new Promise(r=>setTimeout(r,2200));await route.continue()});
|
||||
await go('/access/policies');
|
||||
assert.equal(await page.getByText('No policies yet.',{exact:true}).count(),0);
|
||||
await page.getByText('Loading policies…',{exact:true}).waitFor({state:'hidden'});
|
||||
await page.route('**/api/tasks?**',async route=>{
|
||||
if(new URL(route.request().url()).searchParams.has('workflow')) await route.fulfill({status:200,contentType:'application/json',body:'unreadable response'});
|
||||
else await route.continue();
|
||||
});
|
||||
await go('/workflows');
|
||||
await page.getByRole('alert').filter({hasText:'Could not load recent runs'}).waitFor();
|
||||
await page.getByRole('tab',{name:/^Runs/}).click();
|
||||
assert.equal(await page.getByText('No runs yet',{exact:true}).count(),0);
|
||||
await page.unroute('**/api/tasks?**');
|
||||
await page.getByRole('button',{name:'Retry runs',exact:true}).click();
|
||||
await page.getByRole('alert').filter({hasText:'Could not load recent runs'}).waitFor({state:'hidden'});
|
||||
await shot('recovered');
|
||||
// A failed list read is an error, never the empty state (#1767): force each
|
||||
// page's list API to 500 and check its empty-state copy stays hidden.
|
||||
const failList = async (pattern,path,emptyTexts,errorSel='[role=alert]')=>{
|
||||
await page.route(pattern,route=>route.fulfill({status:200,contentType:'application/json',body:'unreadable response'}));
|
||||
await go(path);
|
||||
await page.locator(errorSel).first().waitFor();
|
||||
for(const text of emptyTexts) assert.equal(await page.getByText(text,{exact:true}).count(),0,`${path} shows its empty state ("${text}") while the list read fails`);
|
||||
await page.unroute(pattern);
|
||||
};
|
||||
await failList('**/api/tasks*','/tasks',['No tasks yet'],'text=Archie is not responding');
|
||||
await failList('**/api/captures*','/events',['No captures yet']);
|
||||
await failList('**/api/event-types*','/events',['No event types yet']);
|
||||
await failList('**/api/tokens*','/account',['No tokens yet']);
|
||||
await failList('**/api/access/policies*','/org/policies',['No policies yet']);
|
||||
await shot('failed-reads-show-errors');
|
||||
};
|
||||
@@ -0,0 +1,18 @@
|
||||
// The save response is mocked; this checks the page's save path without changing models.
|
||||
const assert=require('node:assert/strict');
|
||||
module.exports=async({page,go,shot})=>{
|
||||
let submitted;
|
||||
await page.route('**/api/control-plane/resources/model-aliases/commands/replace',async route=>{
|
||||
submitted=route.request().postDataJSON();
|
||||
await route.fulfill({json:{resource:{kind:'model-aliases',version:submitted.expected_version+1,value:submitted.value}}});
|
||||
});
|
||||
await go('/access/models');
|
||||
await page.getByLabel('New alias',{exact:true}).fill('e2e-test');
|
||||
await page.getByRole('button',{name:'Add alias',exact:true}).click();
|
||||
await page.getByLabel('e2e-test',{exact:true}).fill('test/model');
|
||||
await page.getByRole('button',{name:'Review and save',exact:true}).click();
|
||||
await page.getByRole('button',{name:'Save',exact:true}).click();
|
||||
await page.getByRole('heading',{name:/^Review \d/}).waitFor({state:'hidden'});
|
||||
assert.equal(submitted?.value['e2e-test'],'test/model');
|
||||
await shot('saved');
|
||||
};
|
||||
@@ -0,0 +1,30 @@
|
||||
// The organisation pages: each loads its form in the selected org, and the old
|
||||
// settings audit route lands on the organisation's audit page.
|
||||
const assert = require('node:assert/strict');
|
||||
const { trackAudit } = require('./helpers/audit-helpers.cjs');
|
||||
|
||||
const PAGES = [
|
||||
{ path: '/org/channels', heading: 'Channels', text: 'Chat session defaults' },
|
||||
{ path: '/org/scheduling-policy', heading: 'Scheduling policy', text: 'Retries and polling' },
|
||||
{ path: '/org/alerts', heading: 'Alert webhook', text: 'Webhook severity' },
|
||||
];
|
||||
|
||||
module.exports = async ({ page, go, shot }) => {
|
||||
for (const { path, heading, text } of PAGES) {
|
||||
await go(path);
|
||||
await page.getByRole('heading', { name: heading, exact: true }).waitFor();
|
||||
await page.getByText(text, { exact: true }).first().waitFor();
|
||||
assert.equal(new URL(page.url()).pathname, path);
|
||||
await shot(path);
|
||||
}
|
||||
|
||||
trackAudit(page);
|
||||
await go('/org/audit');
|
||||
await page.getByRole('heading', { name: 'Audit', exact: true }).first().waitFor();
|
||||
await page.locator('[data-row-key]').first().waitFor();
|
||||
await shot('/org/audit');
|
||||
await go('/settings/audit?since=7d');
|
||||
assert.equal(new URL(page.url()).pathname, '/org/audit', '/settings/audit did not redirect');
|
||||
assert.equal(new URL(page.url()).searchParams.get('since'), '7d', 'redirect dropped the query');
|
||||
await page.locator('[data-row-key]').first().waitFor();
|
||||
};
|
||||
@@ -0,0 +1,31 @@
|
||||
// A non-system org can arm a schedule trigger: the schedule source's built-in
|
||||
// mapping is readable there, so a binding on it is accepted. The editor's own
|
||||
// schedule list is instance-only, so the binding is written over the API.
|
||||
const assert = require('node:assert/strict');
|
||||
const { ORG, ABSENT, selectOrg } = require('./helpers/org-helpers.cjs');
|
||||
|
||||
module.exports = async ({ page, go, shot, tolerate }) => {
|
||||
tolerate(ABSENT);
|
||||
await go('/');
|
||||
assert.equal((await selectOrg(page, ORG.beta)).status(), 204);
|
||||
await go('/workflows?workflow=feasibility');
|
||||
const origin = new URL(page.url()).origin;
|
||||
const headers = { 'X-Archie-CSRF': '1', Origin: origin };
|
||||
const created = await page.request.post(`${origin}/api/bindings`, {
|
||||
headers,
|
||||
data: {
|
||||
name: 'e2e schedule trigger', matcher: { source: 'schedule' }, mapping_id: 'schedule-fired',
|
||||
filter: 'schedule_id == "issue-discovery"', workflow: 'feasibility', repo_param: '', owner: '', repo: '', inputs: {},
|
||||
},
|
||||
});
|
||||
try {
|
||||
assert.equal(created.status(), 201, `binding on the built-in schedule mapping refused: ${await created.text()}`);
|
||||
const binding = await created.json();
|
||||
assert.equal(binding.org_id, ORG.beta);
|
||||
await go('/workflows?workflow=feasibility');
|
||||
await page.getByText('Starts when').first().waitFor();
|
||||
await shot('beta-trigger');
|
||||
} finally {
|
||||
if (created.ok()) await page.request.delete(`${origin}/api/bindings/${(await created.json()).id}`, { headers });
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,44 @@
|
||||
// The sidebar org switcher: choosing a member org reloads the dashboard into it,
|
||||
// Tasks and Workflows then show only that org's work, and the API refuses an
|
||||
// org the caller is not a member of.
|
||||
const assert = require('node:assert/strict');
|
||||
const { ORG, ABSENT, selectOrg } = require('./helpers/org-helpers.cjs');
|
||||
|
||||
module.exports = async ({ page, go, shot, settled, tolerate }) => {
|
||||
tolerate(ABSENT);
|
||||
await go('/tasks');
|
||||
await page.getByText('Fix flaky login test').first().waitFor();
|
||||
const picker = page.getByRole('button', { name: /^Organisation: / });
|
||||
await picker.waitFor();
|
||||
const offered = await (async () => {
|
||||
await picker.click();
|
||||
await page.getByRole('menuitem').first().waitFor();
|
||||
const names = (await page.getByRole('menuitem').allInnerTexts()).map(t => t.trim().split('\n').pop().trim());
|
||||
await page.keyboard.press('Escape');
|
||||
return names;
|
||||
})();
|
||||
assert.deepEqual(offered.sort(), ['Beta', 'E2E'], 'selector must offer exactly the orgs the caller belongs to');
|
||||
await go('/workflows');
|
||||
await page.getByText('Parked', { exact: true }).first().waitFor();
|
||||
await shot('home-org-workflows');
|
||||
|
||||
await picker.click();
|
||||
await Promise.all([page.waitForEvent('load'), page.getByRole('menuitem', { name: 'Beta' }).click()]);
|
||||
await settled('/workflows');
|
||||
await page.getByRole('button', { name: /^Organisation: / }).waitFor();
|
||||
assert.equal(await page.getByText('Parked', { exact: true }).count(), 0, 'workflow run counts leaked across orgs');
|
||||
await shot('beta-workflows');
|
||||
await go('/tasks');
|
||||
await page.getByText('No tasks yet').waitFor();
|
||||
assert.equal(await page.getByText('Fix flaky login test').count(), 0, 'tasks leaked across orgs');
|
||||
await shot('beta-tasks');
|
||||
|
||||
// The selector never writes an org the caller is outside of; the server decides.
|
||||
const refused = await selectOrg(page, ORG.outsider);
|
||||
assert.equal(refused.status(), 403, 'selecting a non-member org must be forbidden');
|
||||
await go('/tasks');
|
||||
await page.getByText('No tasks yet').waitFor();
|
||||
assert.equal((await selectOrg(page, ORG.home)).status(), 204);
|
||||
await go('/tasks');
|
||||
await page.getByText('Fix flaky login test').first().waitFor();
|
||||
};
|
||||
@@ -0,0 +1,69 @@
|
||||
// Phone-width sweep of the views the November audit flagged (#1757): at
|
||||
// 390x844 each must fit without horizontal scroll or clipped controls. The
|
||||
// topbar (with its instance badge) is on every page; /account holds the
|
||||
// token form, /org/agents the agent rows and the grants card, /events the
|
||||
// sources table, the event-type rule editor and the mapping editor dialog.
|
||||
const assert = require('node:assert/strict');
|
||||
const { staticRoutes } = require('./helpers/routes.cjs');
|
||||
|
||||
module.exports = async ({ page, go, shot, fail, settled, tolerate }) => {
|
||||
// The extension catalogue 502 is a stack-environment issue, not this check.
|
||||
tolerate(/extensions\/catalogue/);
|
||||
await page.setViewportSize({ width: 390, height: 844 });
|
||||
|
||||
const assertNoOverflow = async (label) => {
|
||||
const { scrollWidth, innerWidth } = await page.evaluate(() => ({
|
||||
scrollWidth: document.documentElement.scrollWidth,
|
||||
innerWidth: window.innerWidth,
|
||||
}));
|
||||
if (scrollWidth > innerWidth) {
|
||||
fail(`${label} overflows 390px: scrollWidth=${scrollWidth} > innerWidth=${innerWidth}`);
|
||||
}
|
||||
};
|
||||
|
||||
const visit = async (path, label, waitFor) => {
|
||||
await go(path);
|
||||
if (waitFor) await settled(waitFor);
|
||||
await assertNoOverflow(label);
|
||||
await shot(label);
|
||||
};
|
||||
|
||||
await visit('/account', 'account-tokens', 'text=API tokens');
|
||||
await visit('/org/agents', 'org-agents', 'text=Credential grants');
|
||||
|
||||
await go('/events');
|
||||
await settled('[role=tab]');
|
||||
await assertNoOverflow('events');
|
||||
await shot('events');
|
||||
|
||||
// The seeded event type's rule editor (RuleEditor's condition row) opens
|
||||
// from the Edit button on its row.
|
||||
const editType = page.locator('button[aria-label^="Edit "]').first();
|
||||
if (await editType.count()) {
|
||||
await editType.click();
|
||||
await page.getByRole('dialog').first().waitFor();
|
||||
await settled();
|
||||
await assertNoOverflow('event-type rule editor');
|
||||
await shot('rule-editor');
|
||||
await page.keyboard.press('Escape');
|
||||
await settled();
|
||||
}
|
||||
|
||||
// The mappings tab's editor dialog carries the payload tree.
|
||||
await page.getByRole('tab', { name: 'Map' }).click();
|
||||
await settled('text=New mapping');
|
||||
await assertNoOverflow('mappings list');
|
||||
const editMapping = page.locator('button', { hasText: 'Edit' }).first();
|
||||
if (await editMapping.count()) {
|
||||
await editMapping.click();
|
||||
await page.getByRole('dialog').first().waitFor();
|
||||
await settled();
|
||||
await assertNoOverflow('mapping editor dialog');
|
||||
await shot('mapping-editor');
|
||||
}
|
||||
|
||||
// Every static route fits 390px (#1767): horizontal scroll fails.
|
||||
for (const r of staticRoutes()) {
|
||||
await visit(r, `route ${r}`, null);
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,13 @@
|
||||
// Repositories and connections say what stops them serving work: the seeded
|
||||
// repository has no connection, and the seeded connection's forge is not enabled.
|
||||
module.exports = async ({ page, go, shot }) => {
|
||||
await go('/org/repositories');
|
||||
await page.getByText('acme/widgets', { exact: true }).first().waitFor();
|
||||
await page.getByText('No connection', { exact: true }).waitFor();
|
||||
await shot('repositories');
|
||||
|
||||
await go('/org/connections');
|
||||
await page.getByText('github.com', { exact: true }).first().waitFor();
|
||||
await page.getByText('Forge not enabled', { exact: true }).waitFor();
|
||||
await shot('connections');
|
||||
};
|
||||
@@ -0,0 +1,22 @@
|
||||
// Every static route loads without errors, renders, and shows no text with
|
||||
// stray leading, trailing or doubled spaces.
|
||||
const { staticRoutes } = require('./helpers/routes.cjs');
|
||||
|
||||
module.exports = async ({ page, go, shot, fail }) => {
|
||||
const stray = new Map();
|
||||
for (const r of staticRoutes()) {
|
||||
await go(r);
|
||||
await shot(r);
|
||||
// Log lines are data, not copy.
|
||||
if (r === '/logs') continue;
|
||||
const bad = await page.evaluate(() => [...document.querySelectorAll('body *')]
|
||||
.filter((el) => !el.children.length && !el.closest('pre,code,textarea,.xterm') && el.getClientRects().length && !getComputedStyle(el).whiteSpace.startsWith('pre'))
|
||||
.map((el) => el.textContent)
|
||||
.filter((t) => t.trim() && (t !== t.trim() || / /.test(t.trim()))));
|
||||
for (const t of bad) {
|
||||
const key = JSON.stringify(t.length > 60 ? t.slice(0, 60) + '…' : t);
|
||||
stray.set(key, (stray.get(key) || new Set()).add(r));
|
||||
}
|
||||
}
|
||||
for (const [text, where] of stray) fail(`stray whitespace ${text} on ${[...where].join(', ')}`);
|
||||
};
|
||||
@@ -0,0 +1,9 @@
|
||||
// The seed (e2e/seed.sh) is visible where an operator would look for it.
|
||||
module.exports = async ({ page, go, shot }) => {
|
||||
await go('/tasks');
|
||||
await page.getByText('Fix flaky login test').first().waitFor({ timeout: 10000 });
|
||||
await shot('tasks');
|
||||
await go('/events');
|
||||
await page.getByText('e2e-hook').first().waitFor({ timeout: 10000 });
|
||||
await shot('events');
|
||||
};
|
||||
@@ -0,0 +1,32 @@
|
||||
// Draft edits only: no saved configuration is changed.
|
||||
const assert = require('node:assert/strict');
|
||||
module.exports = async ({ page, go, shot }) => {
|
||||
await go('/settings/channels');
|
||||
const workspace = page.getByLabel('Workspace', { exact: true });
|
||||
assert.equal(await page.getByRole('region', { name: 'Unsaved changes' }).count(), 0, 'unsaved bar before any edit');
|
||||
await workspace.fill('/srv/e2e-workspace');
|
||||
await page.getByRole('link', { name: 'Models', exact: true }).click();
|
||||
await page.getByRole('heading', { name: 'Models' }).waitFor();
|
||||
await page.getByRole('link', { name: 'Channels', exact: true }).click();
|
||||
assert.equal(await page.getByLabel('Workspace', { exact: true }).inputValue(), '/srv/e2e-workspace', 'edit lost on navigation');
|
||||
const form = await page.getByText('Chat session defaults', { exact: true }).evaluate(el => el.closest('[data-slot="card"]').getBoundingClientRect().width);
|
||||
assert.ok(form <= 850, `settings form stretched to ${form}px`);
|
||||
const review = page.getByRole('button', { name: 'Review and save', exact: true });
|
||||
await review.scrollIntoViewIfNeeded();
|
||||
const unobscured = await review.evaluate(el => { const r=el.getBoundingClientRect(); const hit=document.elementFromPoint(r.x+r.width/2,r.y+r.height/2); return hit && el.contains(hit); });
|
||||
assert.ok(unobscured, 'Review and save is covered');
|
||||
await review.click();
|
||||
await page.getByRole('heading', { name: /^Review \d/ }).waitFor();
|
||||
await page.getByText('/srv/e2e-workspace', { exact: false }).last().waitFor();
|
||||
await shot('review');
|
||||
await page.getByRole('button', { name: 'Discard all', exact: true }).click();
|
||||
assert.equal(await page.getByRole('region', { name: 'Unsaved changes' }).count(), 0);
|
||||
assert.equal(await page.getByLabel('Workspace', { exact: true }).inputValue(), '', 'discard kept the edit');
|
||||
await page.setViewportSize({width:390,height:844});
|
||||
await page.getByLabel('Workspace', { exact: true }).fill('/srv/e2e-workspace');
|
||||
const mobileReview=page.getByRole('button',{name:'Review and save',exact:true});
|
||||
await mobileReview.scrollIntoViewIfNeeded();
|
||||
assert.ok(await mobileReview.evaluate(el=>{const r=el.getBoundingClientRect();return el.contains(document.elementFromPoint(r.x+r.width/2,r.y+r.height/2))}), 'mobile save action covered');
|
||||
await shot('mobile');
|
||||
await page.getByRole('button',{name:'Discard',exact:true}).click();
|
||||
};
|
||||
@@ -0,0 +1,21 @@
|
||||
// The setup checklist reads the selected org: an org with no model to run gets a
|
||||
// Model step that leads to the page that fixes it.
|
||||
const assert = require('node:assert/strict');
|
||||
const { ORG, ABSENT, selectOrg } = require('./helpers/org-helpers.cjs');
|
||||
|
||||
module.exports = async ({ page, go, shot, settled, tolerate }) => {
|
||||
tolerate(ABSENT);
|
||||
await go('/');
|
||||
await page.getByPlaceholder('Describe a task').waitFor();
|
||||
assert.equal(await page.getByRole('link', { name: 'Model', exact: true }).count(), 0, 'an org with a model got a Model step');
|
||||
assert.equal((await selectOrg(page, ORG.beta)).status(), 204);
|
||||
await go('/');
|
||||
await page.getByText('Setup', { exact: true }).waitFor();
|
||||
const model = page.getByRole('link', { name: 'Model', exact: true });
|
||||
await model.waitFor();
|
||||
assert.equal(await model.getAttribute('href'), '/org/models');
|
||||
await shot('beta-dashboard');
|
||||
await model.click();
|
||||
await settled('/org/models');
|
||||
await shot('model-page');
|
||||
};
|
||||
@@ -0,0 +1,21 @@
|
||||
const assert=require('node:assert/strict');
|
||||
module.exports=async({page,go,shot})=>{
|
||||
await go('/tasks');
|
||||
const base=new URL(page.url()).origin;
|
||||
const tasks=await (await page.request.get(base+'/api/tasks')).json();
|
||||
const task=tasks.find(t=>t.status==='parked' && t.attempt>0);
|
||||
assert.ok(task,'seeded stack has no parked attempt to inspect');
|
||||
const state=await (await page.request.get(`${base}/api/tasks/${task.id}/attempts`)).json();
|
||||
assert.ok(state.attempts.some(a=>a.attempt===state.current_attempt),'claimed current attempt missing');
|
||||
await go(`/tasks/${task.id}`);
|
||||
assert.equal(await page.getByText(`Attempt ${state.current_attempt} is not recorded`,{exact:true}).count(),0);
|
||||
const logs=await (await page.request.get(`${base}/api/tasks/${task.id}/logs?attempt=${state.current_attempt}&level=ERROR&limit=1`)).json();
|
||||
await page.getByRole('button',{name:'Jump to log line',exact:true}).click();
|
||||
if(logs.entries?.[0]?.id){
|
||||
await page.locator(`[data-row-key="${logs.entries[0].id}"]`).waitFor();
|
||||
await page.waitForFunction(id=>document.activeElement?.getAttribute('data-row-key')===String(id),logs.entries[0].id);
|
||||
}else{
|
||||
await page.getByText('No error log line was recorded for this attempt.',{exact:true}).waitFor();
|
||||
}
|
||||
await shot('attempt');
|
||||
};
|
||||
@@ -0,0 +1,29 @@
|
||||
// A parked task whose blocker has a fix links to the page that supplies it, from
|
||||
// Needs attention on the dashboard and from the Stage Rail on the task page.
|
||||
// The seed's work requests park for want of a repository connection.
|
||||
const assert = require('node:assert/strict');
|
||||
|
||||
module.exports = async ({ page, go, shot, settled, skip }) => {
|
||||
await go('/');
|
||||
const tasks = await page.evaluate(async () => (await fetch('/api/tasks?limit=100')).json());
|
||||
if (!tasks.some((task) => task.status === 'parked')) skip('no parked task');
|
||||
const parked = tasks.find((task) => task.status === 'parked' && task.recovery);
|
||||
assert.ok(parked, 'no parked task in the list carries a recovery link');
|
||||
const { label, link } = parked.recovery;
|
||||
|
||||
const row = page.getByRole('link', { name: parked.title, exact: true }).locator('xpath=ancestor::*[.//a[normalize-space()="' + label + '"]][1]');
|
||||
const fromDashboard = row.getByRole('link', { name: label, exact: true });
|
||||
await fromDashboard.waitFor();
|
||||
assert.equal(await fromDashboard.getAttribute('href'), link);
|
||||
await shot('needs-attention');
|
||||
await fromDashboard.click();
|
||||
await settled(link);
|
||||
|
||||
await go(`/tasks/${parked.id}`);
|
||||
const fromRail = page.getByRole('complementary', { name: 'Task details' }).getByRole('link', { name: label, exact: true });
|
||||
await fromRail.waitFor();
|
||||
assert.equal(await fromRail.getAttribute('href'), link);
|
||||
await shot('stage-rail');
|
||||
await fromRail.click();
|
||||
await settled(link);
|
||||
};
|
||||
@@ -0,0 +1,14 @@
|
||||
const assert = require('node:assert/strict');
|
||||
module.exports = async ({ page, go, shot }) => {
|
||||
await page.route('**/api/control-plane/resources/workflow-definitions', async route => {
|
||||
await new Promise(resolve => setTimeout(resolve, 2200));
|
||||
await route.continue();
|
||||
});
|
||||
await go('/workflows');
|
||||
assert.equal(await page.getByText('No workflows', { exact: true }).count(), 0, 'loading presented as empty');
|
||||
await page.getByText('Loading workflows…', { exact: true }).waitFor({ state: 'hidden' });
|
||||
await page.getByRole('button', { name: /^implement/ }).click();
|
||||
assert.equal(await page.getByText(/workflow implement has no steps/).count(), 0, 'late definition left an empty canvas');
|
||||
await page.locator('.vue-flow__node').filter({ hasText: 'Repository' }).first().waitFor();
|
||||
await shot('loaded');
|
||||
};
|
||||
@@ -0,0 +1,118 @@
|
||||
// Workflow definition behaviour at desktop width: legacy title IDs migrate
|
||||
// to slugs, invalid expressions flag the node and toolbar alike, a pinned
|
||||
// historical run keeps its original step IDs inspectable, and handoff
|
||||
// targets round-trip between the step form and YAML.
|
||||
const assert = require('node:assert/strict');
|
||||
|
||||
module.exports = async ({ page, go, shot, settled }) => {
|
||||
await page.route('**/api/control-plane/resources/workflow-drafts', async route => {
|
||||
const response = await route.fetch();
|
||||
const data = await response.json();
|
||||
data.resource.value = { drafts: [] };
|
||||
await route.fulfill({ json: data });
|
||||
});
|
||||
const panTo = async node => {
|
||||
const flow = page.locator('.vue-flow');
|
||||
await flow.hover();
|
||||
for (let adjustment = 0; adjustment < 3; adjustment++) {
|
||||
const target = await node.boundingBox(), viewport = await flow.boundingBox();
|
||||
const delta = target.y + target.height / 2 - viewport.y - viewport.height / 2;
|
||||
if (Math.abs(delta) < 30) break;
|
||||
await page.mouse.wheel(0, delta * 2);
|
||||
await settled();
|
||||
}
|
||||
};
|
||||
// Reproduce a previously stored title ID without changing the test server.
|
||||
await go('/workflows');
|
||||
const response = await page.request.get(new URL('/api/control-plane/resources/workflow-definitions', page.url()).href);
|
||||
const resource = await response.json();
|
||||
const definition = resource.resource.value.definitions.find(entry => entry.id === 'feasibility');
|
||||
definition.yaml = definition.yaml.replace(/\bid: assess\b/, 'id: Write a Product Requirement Document').replaceAll('steps.assess.', 'steps.Write a Product Requirement Document.');
|
||||
await page.route('**/api/control-plane/resources/workflow-definitions', route => route.fulfill({ json: resource }));
|
||||
await go('/workflows?workflow=feasibility');
|
||||
await page.getByRole('tab', { name: 'YAML', exact: true }).click();
|
||||
const yaml = await page.getByLabel('Workflow YAML', { exact: true }).inputValue();
|
||||
assert.ok(yaml.includes('id: write-a-product-requirement-document'));
|
||||
assert.ok(yaml.includes('steps.write-a-product-requirement-document.result'));
|
||||
assert.ok(!yaml.includes('steps.Write a Product Requirement Document'));
|
||||
await page.getByRole('tab', { name: 'Canvas', exact: true }).click();
|
||||
const approval = page.locator('.vue-flow__node').filter({ hasText: 'Approval' }).first();
|
||||
await panTo(approval);
|
||||
await approval.click();
|
||||
const chip = approval.getByRole('button', { name: 'write-a-product-requirement-document', exact: true });
|
||||
await chip.waitFor();
|
||||
await chip.click();
|
||||
await shot('legacy-reference');
|
||||
await page.keyboard.press('Escape');
|
||||
await page.getByRole('tab', { name: 'YAML', exact: true }).click();
|
||||
const field = page.getByLabel('Workflow YAML', { exact: true });
|
||||
await field.fill((await field.inputValue()).replace('type: repo.prepare', 'type: repo.prepare\n when: not-a-valid-expression'));
|
||||
await page.getByRole('tab', { name: 'Canvas', exact: true }).click();
|
||||
const problem = page.locator('.vue-flow__node').filter({ hasText: 'Prepare worktree' }).first().locator('svg.text-danger');
|
||||
await problem.waitFor();
|
||||
const toolbarProblem = page.getByRole('status').filter({ has: page.locator('svg') });
|
||||
assert.equal(await problem.evaluate(el => getComputedStyle(el).color), await toolbarProblem.evaluate(el => getComputedStyle(el).color));
|
||||
const invalidPage = await page.evaluate(() => ({
|
||||
scrollWidth: document.documentElement.scrollWidth, width: innerWidth,
|
||||
}));
|
||||
assert.equal(invalidPage.scrollWidth, invalidPage.width, 'invalid toolbar overflows');
|
||||
await shot('validation');
|
||||
// A pinned historical run keeps its original step IDs and remains inspectable.
|
||||
const snapshot = definition.yaml;
|
||||
await page.route('**/api/tasks?*', route => {
|
||||
const workflow = new URL(route.request().url()).searchParams.get('workflow');
|
||||
return workflow === 'feasibility'
|
||||
? route.fulfill({ json: [{ id: 999999, workflow, title: 'Historical run', status: 'failed', workflow_definition_yaml: snapshot }] })
|
||||
: route.continue();
|
||||
});
|
||||
await page.route('**/api/tasks/999999/*?*', route => route.fulfill({ json: {} }));
|
||||
await page.route('**/api/tasks/999999/debug', route => route.fulfill({ json: {} }));
|
||||
await page.route('**/api/tasks/999999/attempts', route => route.fulfill({ json: { attempts: [{ attempt: 1, stages: [{ name: 'Write a Product Requirement Document', status: 'failed', error: 'Historical failure' }] }] } }));
|
||||
await go('/workflows?workflow=feasibility');
|
||||
const picker = page.getByRole('combobox', { name: 'Run shown on the canvas' });
|
||||
await picker.waitFor();
|
||||
assert.match(await picker.innerText(), /Run #999999/);
|
||||
const root = await page.locator('.vue-flow__node[data-id="workflow"]').boundingBox();
|
||||
const pinnedCanvas = await page.locator('.workflow-canvas').boundingBox();
|
||||
assert.ok(root.y >= pinnedCanvas.y, 'historical workflow header clipped above canvas');
|
||||
await shot('run-picker');
|
||||
await page.locator('.vue-flow').hover();
|
||||
await page.mouse.wheel(0, 550);
|
||||
await settled();
|
||||
const historicalStep = page.locator('.vue-flow__node').filter({ hasText: 'Write a Product Requirement Document' }).first();
|
||||
await panTo(historicalStep);
|
||||
await historicalStep.click();
|
||||
await page.getByText('Historical failure', { exact: true }).first().waitFor();
|
||||
await shot('historical-run');
|
||||
await page.keyboard.press('Escape');
|
||||
await picker.click();
|
||||
await page.getByRole('option', { name: 'Definition', exact: true }).click();
|
||||
assert.equal(await picker.innerText(), 'Definition');
|
||||
await shot('definition-picker');
|
||||
await go('/workflows?workflow=triage');
|
||||
const runPicker = page.getByRole('combobox', { name: 'Run shown on the canvas' });
|
||||
if (await runPicker.count()) { await runPicker.click(); await page.getByRole('option', { name: 'Definition', exact: true }).click(); }
|
||||
await page.locator('.vue-flow').hover();
|
||||
await page.mouse.wheel(0, 650);
|
||||
await settled();
|
||||
const handoff = page.locator('.vue-flow__node').filter({ hasText: 'Hand off' }).first();
|
||||
await panTo(handoff);
|
||||
await handoff.click();
|
||||
const target = handoff.getByLabel('Workflow', { exact: true });
|
||||
await target.waitFor();
|
||||
assert.equal(await target.inputValue(), '{{ steps.classify.result.workflow }}');
|
||||
await target.fill('{{ steps.classify.result.alternative }}');
|
||||
await target.press('Home');
|
||||
await shot('dynamic-handoff');
|
||||
await page.keyboard.press('Escape');
|
||||
await page.getByRole('tab', { name: 'YAML', exact: true }).click();
|
||||
assert.ok((await page.getByLabel('Workflow YAML', { exact: true }).inputValue()).includes('steps.classify.result.alternative'));
|
||||
await page.getByRole('tab', { name: 'Canvas', exact: true }).click();
|
||||
await panTo(handoff);
|
||||
await handoff.click();
|
||||
await target.fill('implement');
|
||||
await page.keyboard.press('Escape');
|
||||
await page.keyboard.press('Escape');
|
||||
await page.getByRole('tab', { name: 'YAML', exact: true }).click();
|
||||
assert.ok((await page.getByLabel('Workflow YAML', { exact: true }).inputValue()).includes('workflow: implement'));
|
||||
};
|
||||
@@ -0,0 +1,83 @@
|
||||
// The workflow canvas at phone width: no page scroll, a clean topbar, lanes
|
||||
// inside the canvas, zoom controls below the graph, step and run dialogs
|
||||
// that fit, YAML without page scroll, and a pinned run header that stays
|
||||
// visible.
|
||||
const assert = require('node:assert/strict');
|
||||
|
||||
module.exports = async ({ page, go, shot, settled }) => {
|
||||
await page.setViewportSize({ width: 390, height: 844 });
|
||||
for (const workflow of ['implement', 'feasibility']) {
|
||||
await go(`/workflows?workflow=${workflow}`);
|
||||
const canvas = page.locator('.workflow-canvas');
|
||||
await canvas.waitFor();
|
||||
const dimensions = await page.evaluate(() => ({
|
||||
height: innerHeight, width: innerWidth,
|
||||
scrollHeight: document.documentElement.scrollHeight,
|
||||
scrollWidth: document.documentElement.scrollWidth,
|
||||
}));
|
||||
assert.equal(dimensions.scrollHeight, dimensions.height, 'workflow page scrolls vertically');
|
||||
assert.equal(dimensions.scrollWidth, dimensions.width, 'workflow page scrolls horizontally');
|
||||
const topbar = page.locator('header').first();
|
||||
const bar = await topbar.boundingBox();
|
||||
assert.equal(bar.y, 0, 'blank band above topbar');
|
||||
assert.equal(await topbar.evaluate(el => getComputedStyle(el).backdropFilter), 'none');
|
||||
assert.ok(!await canvas.getByText('Works on a repository', { exact: true }).count());
|
||||
const run = page.getByRole('button', { name: new RegExp(`^(Run|Test) ${workflow}$`) });
|
||||
assert.ok(await run.isVisible(), 'Run hidden on phone');
|
||||
const box = await canvas.boundingBox();
|
||||
const start = await page.locator('.vue-flow__node[data-id="start"]').boundingBox();
|
||||
assert.ok(start.y >= box.y && start.y < box.y + box.height, 'start is outside initial viewport');
|
||||
const nodes = await page.locator('.vue-flow__node').evaluateAll(elements => elements.map(el => ({
|
||||
left: el.getBoundingClientRect().left, right: el.getBoundingClientRect().right,
|
||||
})));
|
||||
assert.ok(nodes.every(node => node.left >= box.x && node.right <= box.x + box.width), 'branch lanes clipped horizontally');
|
||||
const controls = await page.getByRole('button', { name: 'Zoom in', exact: true }).boundingBox();
|
||||
const flow = await canvas.locator('.vue-flow').boundingBox();
|
||||
assert.ok(controls.y >= flow.y + flow.height, 'zoom control overlays graph');
|
||||
await shot(workflow);
|
||||
const step = page.locator('.vue-flow__node').filter({ hasText: 'Prepare worktree' }).first();
|
||||
assert.equal(await step.locator('[data-slot="badge"]').innerText(), 'Prepare worktree');
|
||||
await step.click();
|
||||
const dialog = page.getByRole('dialog');
|
||||
await dialog.waitFor();
|
||||
const dialogBox = await dialog.boundingBox();
|
||||
assert.ok(dialogBox.x >= 0 && dialogBox.x + dialogBox.width <= 390, 'step editor exceeds phone width');
|
||||
const input = dialog.getByRole('textbox').first();
|
||||
if (await input.count()) assert.ok(await input.evaluate(el => el.getBoundingClientRect().height) >= 24, 'step form scaled down');
|
||||
await shot(`${workflow}-step`);
|
||||
await page.keyboard.press('Escape');
|
||||
await run.click();
|
||||
await page.getByRole('dialog').waitFor();
|
||||
await shot(`${workflow}-run`);
|
||||
await page.keyboard.press('Escape');
|
||||
}
|
||||
// YAML must not make the page scroll at phone width.
|
||||
await go('/workflows?workflow=feasibility');
|
||||
await page.getByRole('tab', { name: 'YAML', exact: true }).click();
|
||||
await settled();
|
||||
const yamlPage = await page.evaluate(() => ({
|
||||
scrollHeight: document.documentElement.scrollHeight, height: innerHeight,
|
||||
}));
|
||||
assert.equal(yamlPage.scrollHeight, yamlPage.height, 'YAML causes page scroll');
|
||||
await page.getByRole('tab', { name: 'Canvas', exact: true }).click();
|
||||
// A pinned historical run keeps its header visible on the canvas.
|
||||
const response = await page.request.get(new URL('/api/control-plane/resources/workflow-definitions', page.url()).href);
|
||||
const resource = await response.json();
|
||||
const snapshot = resource.resource.value.definitions.find(entry => entry.id === 'feasibility').yaml;
|
||||
await page.route('**/api/tasks?*', route => {
|
||||
const workflow = new URL(route.request().url()).searchParams.get('workflow');
|
||||
return workflow === 'feasibility'
|
||||
? route.fulfill({ json: [{ id: 999999, workflow, title: 'Historical run', status: 'failed', workflow_definition_yaml: snapshot }] })
|
||||
: route.continue();
|
||||
});
|
||||
await page.route('**/api/tasks/999999/*?*', route => route.fulfill({ json: {} }));
|
||||
await page.route('**/api/tasks/999999/debug', route => route.fulfill({ json: {} }));
|
||||
await page.route('**/api/tasks/999999/attempts', route => route.fulfill({ json: { attempts: [{ attempt: 1, stages: [] }] } }));
|
||||
await go('/workflows?workflow=feasibility');
|
||||
const picker = page.getByRole('combobox', { name: 'Run shown on the canvas' });
|
||||
await picker.waitFor();
|
||||
assert.match(await picker.innerText(), /Run #999999/);
|
||||
const root = await page.locator('.vue-flow__node[data-id="workflow"]').boundingBox();
|
||||
const pinnedCanvas = await page.locator('.workflow-canvas').boundingBox();
|
||||
assert.ok(root.y >= pinnedCanvas.y, 'historical workflow header clipped above canvas');
|
||||
};
|
||||
@@ -0,0 +1,23 @@
|
||||
const assert = require('node:assert/strict');
|
||||
module.exports = async ({ page, go, shot }) => {
|
||||
await go('/workflows');
|
||||
await page.getByRole('button', {name:/^implement/}).click();
|
||||
const runPicker = page.getByRole('combobox', { name: 'Run shown on the canvas' });
|
||||
if (await runPicker.count()) { await runPicker.click(); await page.getByRole('option', { name: 'Definition', exact: true }).click(); }
|
||||
await page.locator('.vue-flow__node').filter({hasText:'Prepare worktree'}).first().click();
|
||||
const condition=page.getByLabel('Run only when', {exact:true});
|
||||
await condition.fill('what');
|
||||
await page.getByRole('alert').filter({hasText:'when must name'}).first().waitFor();
|
||||
await condition.fill('task.title');
|
||||
await page.getByRole('alert').filter({hasText:'when must name'}).first().waitFor({state:'hidden'});
|
||||
const backoff=page.getByLabel('Retry backoff',{exact:true});
|
||||
await backoff.fill('yes');
|
||||
await page.getByText('Enter a number zero or greater.',{exact:true}).waitFor();
|
||||
await backoff.fill('0.5');
|
||||
await page.getByLabel('Run only when',{exact:true}).focus();
|
||||
await page.getByText('Enter a number zero or greater.',{exact:true}).waitFor({state:'hidden'});
|
||||
await page.getByRole('combobox',{name:'Unit',exact:true}).selectOption('m');
|
||||
await page.getByRole('tab',{name:'YAML',exact:true}).click();
|
||||
assert.match(await page.getByLabel('Workflow YAML',{exact:true}).inputValue(), /backoff: 30s/);
|
||||
await shot('validated');
|
||||
};
|
||||
@@ -0,0 +1,12 @@
|
||||
{
|
||||
"name": "archie-e2e",
|
||||
"private": true,
|
||||
"description": "Validation of a running local stack; never part of the gate",
|
||||
"scripts": {
|
||||
"check": "node run.cjs"
|
||||
},
|
||||
"devDependencies": {
|
||||
"playwright": "1.64.0"
|
||||
},
|
||||
"packageManager": "pnpm@12.10.1"
|
||||
}
|
||||
Generated
+191
@@ -0,0 +1,191 @@
|
||||
---
|
||||
lockfileVersion: '9.0'
|
||||
|
||||
importers:
|
||||
|
||||
.:
|
||||
configDependencies: {}
|
||||
packageManagerDependencies:
|
||||
pnpm:
|
||||
specifier: 12.10.1
|
||||
version: 12.10.1
|
||||
|
||||
packages:
|
||||
|
||||
'@pnpm/exe.android-arm64@12.10.1':
|
||||
resolution: {integrity: sha512-CVTlHPwNvadQCJD9bGSMzWIhFX8QpjtqC2c27dhdnn/9iKzEjZ3qL62o3gHpKbIuo6qn4WxTKRoaokgNdReBig==}
|
||||
cpu: [arm64]
|
||||
os: [android]
|
||||
|
||||
'@pnpm/exe.android-x64@12.10.1':
|
||||
resolution: {integrity: sha512-NFiYLIaodY7da0XIebwcU3JoP7IK/lzF7zgKSSP+9H+QcFnQ1GDfBkuBKCYJzZ+Xu0WH54neIPLBBCaOjaaauA==}
|
||||
cpu: [x64]
|
||||
os: [android]
|
||||
|
||||
'@pnpm/exe.darwin-arm64@12.10.1':
|
||||
resolution: {integrity: sha512-0O8tdQ8ijlPJudXspLMTcitMkdBEz6uUflazL5uQE0WMs85oQIp0U+5hfEktMFB64QqEhjqlvvujTwbzdr9oMg==}
|
||||
cpu: [arm64]
|
||||
os: [darwin]
|
||||
|
||||
'@pnpm/exe.darwin-x64@12.10.1':
|
||||
resolution: {integrity: sha512-ud+1/uZOKEo8P/AsPynOJc/LNwfI0j6WwCElibj71rU9l4nIBnsSn+wWTIPZPkZ4BBSH5+82azSnAARMyJ1lNA==}
|
||||
cpu: [x64]
|
||||
os: [darwin]
|
||||
|
||||
'@pnpm/exe.freebsd-x64@12.10.1':
|
||||
resolution: {integrity: sha512-mj9PE5rf8uAfQQ2K66HSATMSut+lNiB4eSqFd5+azFVCMnxNSy/32xpZQJT21PhnN3Y4qbK+iKHe5nWAxSuRhw==}
|
||||
cpu: [x64]
|
||||
os: [freebsd]
|
||||
|
||||
'@pnpm/exe.linux-arm64-musl@12.10.1':
|
||||
resolution: {integrity: sha512-xba+00wZJ8Um6rBJJjWl88uJj0tydB8dtomvjlCLvi0uL32vpa9CRP8Vv26FIXvbiZ1bo2RCzYt/eChxJVV52w==}
|
||||
cpu: [arm64]
|
||||
os: [linux]
|
||||
libc: [musl]
|
||||
|
||||
'@pnpm/exe.linux-arm64@12.10.1':
|
||||
resolution: {integrity: sha512-oBdMp69ScC9UnniG4qZAQVr2fBDSXjm4yk/72vkEVyrlwS23yMxcRQl7Qdo3sgXPAygY6TWnPRKm4rXzjoyW7w==}
|
||||
cpu: [arm64]
|
||||
os: [linux]
|
||||
libc: [glibc]
|
||||
|
||||
'@pnpm/exe.linux-ppc64@12.10.1':
|
||||
resolution: {integrity: sha512-Yyb3wu09h3c7mLme270uHFiVaAIUHC411Ru9LIU2BKUIstrGlXa9OqqVWoXaRgYRdFdOFknkwG7GNn6ygwLbnw==}
|
||||
cpu: [ppc64]
|
||||
os: [linux]
|
||||
libc: [glibc]
|
||||
|
||||
'@pnpm/exe.linux-riscv64@12.10.1':
|
||||
resolution: {integrity: sha512-PdkeUFFkybknnGkWP0H22eMpIiS4OZXL5BcQzF4lh+vmrW3IaC2HOkbANKgot/PKO0Kl77pzA/6PKFxgbgfXIQ==}
|
||||
cpu: [riscv64]
|
||||
os: [linux]
|
||||
libc: [glibc]
|
||||
|
||||
'@pnpm/exe.linux-s390x@12.10.1':
|
||||
resolution: {integrity: sha512-1okKuHKJwJPAbofDxfhZWAUxEWtee4ZSf7Pah8kcvocaJkf2WxFJ5KVTiNIvDml5GLidDQsgf7Pcf/WHbCak7Q==}
|
||||
cpu: [s390x]
|
||||
os: [linux]
|
||||
libc: [glibc]
|
||||
|
||||
'@pnpm/exe.linux-x64-musl@12.10.1':
|
||||
resolution: {integrity: sha512-e6IqzVNkPa7srFKJKnY23uWJ+qz0LaRWiTUo/sHfFXRRMRzB5uNOr6qWWip/jqhdGwU91n9J7LrEYZ6e0tRczw==}
|
||||
cpu: [x64]
|
||||
os: [linux]
|
||||
libc: [musl]
|
||||
|
||||
'@pnpm/exe.linux-x64@12.10.1':
|
||||
resolution: {integrity: sha512-ZByV0DRgWzGaDSjT5ddRBASdwz+r/qPMYh7o6RGmPQjtRGNFbSl94xY2DcAM8mqCOZJUUDtAXQ+wpBXcdpKlkg==}
|
||||
cpu: [x64]
|
||||
os: [linux]
|
||||
libc: [glibc]
|
||||
|
||||
'@pnpm/exe.win32-arm64@12.10.1':
|
||||
resolution: {integrity: sha512-I7QZHcjioG7orFeCRUFUHByJ1G0zFPnAlaGGyrUvb6MGkv5oeNwNPl7t+Gp+7zHfnMcgLGJ1a+Wfim0IDw3lOw==}
|
||||
cpu: [arm64]
|
||||
os: [win32]
|
||||
|
||||
'@pnpm/exe.win32-x64@12.10.1':
|
||||
resolution: {integrity: sha512-4WJFdp58EKlCj0zLobrXU0vpszSZIr4X/3y/uNbAQqGW0zE+VdruZB0gFc3L2kzsUzVwTYbaCn+XEhnCYSAlTg==}
|
||||
cpu: [x64]
|
||||
os: [win32]
|
||||
|
||||
pnpm@12.10.1:
|
||||
resolution: {integrity: sha512-ukCjfrGjcNYP6oxM8dNkwTvMzvUY6YrSvO6VT1OdONo3RY5YJho/pV4GUjRQ6g//+fSXsTW+QfLBXBZCusrObA==}
|
||||
engines: {node: '>=18.*'}
|
||||
hasBin: true
|
||||
|
||||
snapshots:
|
||||
|
||||
'@pnpm/exe.android-arm64@12.10.1':
|
||||
optional: true
|
||||
|
||||
'@pnpm/exe.android-x64@12.10.1':
|
||||
optional: true
|
||||
|
||||
'@pnpm/exe.darwin-arm64@12.10.1':
|
||||
optional: true
|
||||
|
||||
'@pnpm/exe.darwin-x64@12.10.1':
|
||||
optional: true
|
||||
|
||||
'@pnpm/exe.freebsd-x64@12.10.1':
|
||||
optional: true
|
||||
|
||||
'@pnpm/exe.linux-arm64-musl@12.10.1':
|
||||
optional: true
|
||||
|
||||
'@pnpm/exe.linux-arm64@12.10.1':
|
||||
optional: true
|
||||
|
||||
'@pnpm/exe.linux-ppc64@12.10.1':
|
||||
optional: true
|
||||
|
||||
'@pnpm/exe.linux-riscv64@12.10.1':
|
||||
optional: true
|
||||
|
||||
'@pnpm/exe.linux-s390x@12.10.1':
|
||||
optional: true
|
||||
|
||||
'@pnpm/exe.linux-x64-musl@12.10.1':
|
||||
optional: true
|
||||
|
||||
'@pnpm/exe.linux-x64@12.10.1':
|
||||
optional: true
|
||||
|
||||
'@pnpm/exe.win32-arm64@12.10.1':
|
||||
optional: true
|
||||
|
||||
'@pnpm/exe.win32-x64@12.10.1':
|
||||
optional: true
|
||||
|
||||
pnpm@12.10.1:
|
||||
optionalDependencies:
|
||||
'@pnpm/exe.android-arm64': 12.10.1
|
||||
'@pnpm/exe.android-x64': 12.10.1
|
||||
'@pnpm/exe.darwin-arm64': 12.10.1
|
||||
'@pnpm/exe.darwin-x64': 12.10.1
|
||||
'@pnpm/exe.freebsd-x64': 12.10.1
|
||||
'@pnpm/exe.linux-arm64': 12.10.1
|
||||
'@pnpm/exe.linux-arm64-musl': 12.10.1
|
||||
'@pnpm/exe.linux-ppc64': 12.10.1
|
||||
'@pnpm/exe.linux-riscv64': 12.10.1
|
||||
'@pnpm/exe.linux-s390x': 12.10.1
|
||||
'@pnpm/exe.linux-x64': 12.10.1
|
||||
'@pnpm/exe.linux-x64-musl': 12.10.1
|
||||
'@pnpm/exe.win32-arm64': 12.10.1
|
||||
'@pnpm/exe.win32-x64': 12.10.1
|
||||
|
||||
---
|
||||
lockfileVersion: '9.0'
|
||||
|
||||
settings:
|
||||
autoInstallPeers: true
|
||||
excludeLinksFromLockfile: false
|
||||
|
||||
importers:
|
||||
|
||||
.:
|
||||
devDependencies:
|
||||
playwright:
|
||||
specifier: 1.64.0
|
||||
version: 1.64.0
|
||||
|
||||
packages:
|
||||
|
||||
playwright-core@1.64.0:
|
||||
resolution: {integrity: sha512-T9r+MZkTECl2+oUcZ26YgZzTrYidTsIhYYkJix+6iDOymOb1FB2RLLSOxRGnZGv5DStt+aduIVbt+E8WygXYpg==}
|
||||
engines: {node: '>=20'}
|
||||
hasBin: true
|
||||
|
||||
playwright@1.64.0:
|
||||
resolution: {integrity: sha512-kVzTnYFYEyQ9RGzBjNCd2+yEqWmVbxl3AHPynv3qQ6JTjv4a+kwRcnqQwIpuP3NnrnIrE/Q6wWAIAvMfIE2/Yg==}
|
||||
engines: {node: '>=20'}
|
||||
hasBin: true
|
||||
|
||||
snapshots:
|
||||
|
||||
playwright-core@1.64.0: {}
|
||||
|
||||
playwright@1.64.0:
|
||||
dependencies:
|
||||
playwright-core: 1.64.0
|
||||
+186
@@ -0,0 +1,186 @@
|
||||
// Drive the dashboard of a running local stack (e2e/stack.sh) in Chromium. Each module in checks/ exports async ({ page, go, shot, fail, skip, settled }).
|
||||
// A check fails on a thrown error or any console or page error. skip(reason)
|
||||
// records a skip for a missing precondition and never fails.
|
||||
//
|
||||
// node e2e/run.cjs [--headed] [--record VERSION] [list | all | check ...]
|
||||
//
|
||||
// Screenshots, results.json (the manifest) and report.html (the run report) go to
|
||||
// e2e/out/<stamp>/. --record also writes e2e/results/VERSION.md, the committed
|
||||
// evidence for a release.
|
||||
const fs = require('fs');
|
||||
const path = require('path');
|
||||
|
||||
const DESKTOP = { width: 1440, height: 900 };
|
||||
|
||||
// Stable label naming: kebab-case, so a route like /org/members becomes
|
||||
// org-members and / becomes home.
|
||||
function slug(label) {
|
||||
return String(label).toLowerCase().replace(/[^a-z0-9]+/g, '-').replace(/^-+|-+$/g, '') || 'home';
|
||||
}
|
||||
|
||||
class SkipCheck extends Error {}
|
||||
|
||||
const base = process.env.ARCHIE_E2E_URL || 'http://localhost:5173';
|
||||
const args = process.argv.slice(2);
|
||||
const headed = args.includes('--headed');
|
||||
if (headed) args.splice(args.indexOf('--headed'), 1);
|
||||
let record = '';
|
||||
if (args[0] === '--record') {
|
||||
record = args[1];
|
||||
if (!record || record.startsWith('-')) {
|
||||
console.error('Usage: --record VERSION all|check ...');
|
||||
process.exit(1);
|
||||
}
|
||||
args.splice(0, 2);
|
||||
}
|
||||
const available = fs.readdirSync(path.join(__dirname, 'checks')).filter((f) => f.endsWith('.cjs')).map((f) => f.slice(0, -4)).sort();
|
||||
if (!args.length || (args.length === 1 && args[0] === 'list')) {
|
||||
console.log(`Available browser checks:\n${available.map(name => ` ${name}`).join('\n')}\n\nRun: task e2e:check -- <check ...>\nAll: task e2e:check -- all\nWatch: task e2e:check -- --headed <check ...>`);
|
||||
process.exit(0);
|
||||
}
|
||||
const names = args.length === 1 && args[0] === 'all' ? available : args;
|
||||
const unknown = names.filter(name => !available.includes(name));
|
||||
if (unknown.length) {
|
||||
console.error(`Unknown checks: ${unknown.join(', ')}. Run task e2e:check to list available checks.`);
|
||||
process.exit(1);
|
||||
}
|
||||
const { chromium } = require('playwright');
|
||||
const stamp = new Date().toISOString().replace(/[:.]/g, '-');
|
||||
const out = path.join(__dirname, 'out', stamp);
|
||||
fs.mkdirSync(out, { recursive: true });
|
||||
|
||||
(async () => {
|
||||
const browser = await chromium.launch({ headless: !headed, slowMo: headed ? 150 : 0 });
|
||||
const context = await browser.newContext({ viewport: { width: 1440, height: 900 } });
|
||||
const login = await context.request.post(base + '/api/auth/login', {
|
||||
headers: { 'X-Archie-CSRF': '1', Origin: base },
|
||||
data: { email: process.env.ARCHIE_E2E_EMAIL || 'operator@example.test', password: process.env.ARCHIE_E2E_PASSWORD || 'archie-local-e2e-password' },
|
||||
});
|
||||
if (!login.ok()) {
|
||||
const error = `Test account sign-in failed (${login.status()}): ${await login.text()}`;
|
||||
await browser.close();
|
||||
throw new Error(error);
|
||||
}
|
||||
const storageState = await context.storageState();
|
||||
await context.close();
|
||||
const results = [];
|
||||
for (const name of names) {
|
||||
console.log(`run ${name}`);
|
||||
const check = require(path.join(__dirname, 'checks', name + '.cjs'));
|
||||
// A fresh page per check: open event streams pile up across navigations.
|
||||
const page = await browser.newPage({ viewport: { width: 1440, height: 900 }, storageState });
|
||||
const errors = [];
|
||||
const notes = [];
|
||||
page.on('pageerror', (e) => errors.push(String(e)));
|
||||
page.on('console', (m) => {
|
||||
if (m.type() !== 'error') return;
|
||||
const url = m.location().url;
|
||||
errors.push(url ? `${m.text()} (${url})` : m.text());
|
||||
});
|
||||
// Wait for load, never networkidle: the event stream never goes idle.
|
||||
const go = async (p) => { await page.goto(base + p, { waitUntil: 'load' }); await page.waitForTimeout(1200); };
|
||||
// Harness-owned wait: wait for a selector or URL, then settle briefly.
|
||||
const settled = async (sel, timeout = 10000) => {
|
||||
if (sel) {
|
||||
if (/^https?:/.test(sel)) await page.waitForURL(sel, { timeout });
|
||||
else if (sel.startsWith('/')) await page.waitForURL('**' + sel, { timeout });
|
||||
else await page.locator(sel).first().waitFor({ timeout });
|
||||
}
|
||||
await page.waitForTimeout(150);
|
||||
};
|
||||
const artifacts = [];
|
||||
// <check>-<kebab>[-<w>x<h>].png; the viewport suffix marks non-desktop
|
||||
// shots. A short settle precedes every capture so checks need no capture
|
||||
// wrapper of their own. Every capture is kept: a repeated label gets -2, -3...
|
||||
const shot = async (label) => {
|
||||
await page.waitForTimeout(150);
|
||||
const vp = page.viewportSize() || DESKTOP;
|
||||
const suffix = (vp.width === DESKTOP.width && vp.height === DESKTOP.height) ? '' : `-${vp.width}x${vp.height}`;
|
||||
const stem = `${name}-${slug(label)}${suffix}`;
|
||||
let file = `${stem}.png`;
|
||||
for (let n = 2; fs.existsSync(path.join(out, file)); n++) file = `${stem}-${n}.png`;
|
||||
await page.screenshot({ path: path.join(out, file) });
|
||||
artifacts.push({ file });
|
||||
return file;
|
||||
};
|
||||
// Keep a non-image artifact for this case: written as <check>-<name>.
|
||||
const attach = (fileName, data) => {
|
||||
const file = `${name}-${fileName}`;
|
||||
fs.writeFileSync(path.join(out, file), data);
|
||||
artifacts.push({ file });
|
||||
};
|
||||
const fail = (msg) => notes.push(msg);
|
||||
// Drop console errors matching re: a response the page is designed to survive.
|
||||
const tolerated = [];
|
||||
const tolerate = (re) => tolerated.push(re);
|
||||
const skip = (reason) => { throw new SkipCheck(reason || 'precondition missing'); };
|
||||
const started = Date.now();
|
||||
let error = '';
|
||||
let skipped = '';
|
||||
try { await check({ page, go, shot, fail, skip, settled, attach, tolerate }); } catch (e) {
|
||||
if (e instanceof SkipCheck) skipped = e.message;
|
||||
else error = String(e && e.message || e);
|
||||
}
|
||||
if (error || notes.length) await shot('failure').catch(() => {});
|
||||
await page.close();
|
||||
const problems = skipped ? [] : [error, ...notes, ...errors.filter((e) => !tolerated.some((re) => re.test(e)))].filter(Boolean);
|
||||
const result = { check: name, ok: problems.length === 0, ms: Date.now() - started, problems, artifacts };
|
||||
if (skipped) { result.skipped = true; result.skipReason = skipped; }
|
||||
results.push(result);
|
||||
console.log(`${skipped ? 'SKIP' : problems.length ? 'FAIL' : 'ok '} ${name}${skipped ? ` (${skipped})` : problems.length ? '\n ' + problems.join('\n ') : ''}`);
|
||||
}
|
||||
await browser.close();
|
||||
fs.writeFileSync(path.join(out, 'results.json'), JSON.stringify(results, null, 2));
|
||||
const commit = require('child_process').execFileSync('git', ['rev-parse', '--short', 'HEAD'], { cwd: __dirname, encoding: 'utf8' }).trim();
|
||||
fs.writeFileSync(path.join(out, 'report.html'), report(results, { time: new Date().toISOString(), commit }));
|
||||
if (record) writeRecord(record, results);
|
||||
console.log(`evidence: ${out}`);
|
||||
process.exit(results.every((r) => r.ok) ? 0 : 1);
|
||||
})().catch((e) => { console.error(e); process.exit(2); });
|
||||
|
||||
function esc(s) {
|
||||
return String(s).replace(/&/g, '&').replace(/</g, '<').replace(/>/g, '>').replace(/"/g, '"');
|
||||
}
|
||||
|
||||
// One self-contained page per run: a test plan and verification record. Each
|
||||
// case carries the artifacts its own run produced; images are inlined.
|
||||
function report(results, meta) {
|
||||
const status = (r) => (r.skipped ? 'SKIP' : r.ok ? 'ok' : 'FAIL');
|
||||
const count = (s) => results.filter((r) => status(r) === s).length;
|
||||
const artifact = (a) => {
|
||||
const data = fs.readFileSync(path.join(out, a.file));
|
||||
if (!a.file.endsWith('.png')) return `<a href="${esc(a.file)}">${esc(a.file)}</a>`;
|
||||
const src = `data:image/png;base64,${data.toString('base64')}`;
|
||||
return `<figure><img src="${src}" alt="${esc(a.file)}" title="${esc(a.file)}"></figure>`;
|
||||
};
|
||||
const rows = results.map((r) => {
|
||||
const s = status(r);
|
||||
const msg = r.skipped ? [r.skipReason] : r.problems;
|
||||
return `<tr class="${s}"><td>${esc(r.check)}</td><td class="st">${s}</td><td>${r.ms}ms</td>`
|
||||
+ `<td>${msg.map((m) => `<pre>${esc(m)}</pre>`).join('')}</td>`
|
||||
+ `<td class="art">${r.artifacts.map(artifact).join('')}</td></tr>`;
|
||||
}).join('\n');
|
||||
return `<!doctype html>
|
||||
<html><head><meta charset="utf-8"><title>e2e ${esc(meta.time)}</title>
|
||||
<style>body{font:14px system-ui,sans-serif;margin:1em}table{border-collapse:collapse;width:100%}td,th{border-top:1px solid #ccc;padding:.4em;vertical-align:top;text-align:left}pre{margin:0 0 .3em;white-space:pre-wrap;font-size:12px}.st{font-weight:600}.ok .st{color:#060}.FAIL .st{color:#a00}.SKIP .st{color:#668}.FAIL{background:#fff3f3}.art{display:flex;flex-wrap:wrap;gap:.5em;border:0}figure{margin:0}.art img{width:150px;border:1px solid #ccc;cursor:zoom-in}.art img.big{position:fixed;inset:2vh 2vw;width:96vw;height:96vh;object-fit:contain;background:#fff;z-index:9;cursor:zoom-out}</style>
|
||||
</head><body><h1>e2e ${esc(meta.time)}</h1>
|
||||
<p>commit ${esc(meta.commit)} against ${esc(base)}: ${results.length} cases, ${count('ok')} ok, ${count('FAIL')} FAIL, ${count('SKIP')} SKIP</p>
|
||||
<table><tr><th>Case</th><th>Status</th><th>Time</th><th>Message</th><th>Artifacts</th></tr>
|
||||
${rows}
|
||||
</table>
|
||||
<script>document.addEventListener('click',e=>{if(e.target.matches('.art img'))e.target.classList.toggle('big')})</script>
|
||||
</body></html>
|
||||
`;
|
||||
}
|
||||
|
||||
function writeRecord(version, results) {
|
||||
const dir = path.join(__dirname, 'results');
|
||||
fs.mkdirSync(dir, { recursive: true });
|
||||
const rows = results.map((r) => `| ${r.check} | ${r.skipped ? 'skip' : r.ok ? 'pass' : 'fail'} | ${r.problems.join('<br>').replace(/\|/g, '\\|') || ''} |`);
|
||||
const passed = results.filter((r) => r.ok).length;
|
||||
fs.writeFileSync(path.join(dir, `${version}.md`), [
|
||||
`# ${version}`, '',
|
||||
`Run ${new Date().toISOString()} against ${base}: ${passed} of ${results.length} checks passed.`, '',
|
||||
'| Check | Result | Problems |', '| --- | --- | --- |', ...rows, '',
|
||||
].join('\n'));
|
||||
}
|
||||
Executable
+77
@@ -0,0 +1,77 @@
|
||||
#!/usr/bin/env bash
|
||||
# Seed a running local stack (e2e/stack.sh) through the dashboard's own HTTP
|
||||
# API, so the seed exercises real validation. Safe to run again: each step
|
||||
# skips what already exists.
|
||||
set -euo pipefail
|
||||
|
||||
base=${ARCHIE_E2E_API:-http://localhost:8484}
|
||||
here=$(cd "$(dirname "$0")" && pwd)
|
||||
cookie=$(mktemp)
|
||||
trap 'rm -f "$cookie"' EXIT
|
||||
H=(-b "$cookie" -c "$cookie" -H 'Content-Type: application/json' -H 'X-Archie-CSRF: 1' -H "Origin: $base")
|
||||
|
||||
get() { curl -fsS -b "$cookie" "$base$1"; }
|
||||
post() { curl -fsS -X POST "$base$1" "${H[@]}" -d "$2"; }
|
||||
# jq-free JSON reads: py EXPR, with the parsed body as d.
|
||||
py() { python3 -c "import sys, json; d = json.load(sys.stdin); print($1)"; }
|
||||
|
||||
# This account belongs only to the isolated local test stack.
|
||||
email=${ARCHIE_E2E_EMAIL:-operator@example.test}
|
||||
password=${ARCHIE_E2E_PASSWORD:-archie-local-e2e-password}
|
||||
account=$(python3 -c 'import json,sys; print(json.dumps(dict(email=sys.argv[1], password=sys.argv[2], display_name="E2E operator", organisation_name="E2E", workspace_name="Local test", public_url=sys.argv[3])))' "$email" "$password" "${ARCHIE_E2E_URL:-http://localhost:5173}")
|
||||
if [ "$(get /api/auth/status | py 'd["setup_required"]')" = "True" ]; then
|
||||
post /api/auth/setup "$account" >/dev/null
|
||||
else
|
||||
if ! post /api/auth/login "$account" >/dev/null; then
|
||||
echo "Test account sign-in failed. Set ARCHIE_E2E_EMAIL and ARCHIE_E2E_PASSWORD to this test stack's account credentials." >&2
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
# Repository policy. archied applies it live; the pause lets the watch publish it.
|
||||
if ! get /api/control-plane/resources/repository-policies | grep -q '"widgets"'; then
|
||||
version=$(get /api/control-plane/resources/repository-policies | py 'd["resource"]["version"]')
|
||||
post /api/control-plane/resources/repository-policies/commands/replace \
|
||||
"{\"value\":[{\"owner\":\"acme\",\"name\":\"widgets\",\"base\":\"main\"}],\"expected_version\":$version}" >/dev/null
|
||||
sleep 5
|
||||
fi
|
||||
|
||||
# Work requests. Without Docker they park within a minute, which fills
|
||||
# Needs you, Quality gates and the task pages.
|
||||
tasks=$(get /api/tasks)
|
||||
for t in "Fix flaky login test" "Add retry to webhook sender" "Document the gate" "Speed up the CI cache" "Recovery probe"; do
|
||||
grep -qF "\"$t\"" <<<"$tasks" && continue
|
||||
post /api/work-requests "{\"repository\":\"acme/widgets\",\"workflow\":\"triage\",\"title\":\"$t\",\"instructions\":\"Do it.\"}" >/dev/null
|
||||
done
|
||||
|
||||
# An unsigned capture source with one delivery, an event type, a mapping and
|
||||
# a binding left pending approval.
|
||||
src=e2e-hook
|
||||
if ! get /api/sources | grep -q "\"$src\""; then
|
||||
post /api/sources "{\"path\":\"$src\"}" >/dev/null
|
||||
post "/api/sources/$src/signing" '{"signed":false}' >/dev/null
|
||||
post "/api/sources/$src/approve-unsigned" '{}' >/dev/null
|
||||
bash "$here/../tools/webhook-send.sh" --url "$base" --source "$src" --kind github-issue --quiet >/dev/null
|
||||
fi
|
||||
et=$(get /api/event-types | py '"".join(t["id"] for t in (d.get("event_types", []) if isinstance(d, dict) else d) if t["name"] == "issue-opened")')
|
||||
if [ -z "$et" ]; then
|
||||
et=$(post /api/event-types "{\"source\":\"$src\",\"name\":\"issue-opened\",\"rule\":{\"headers\":[],\"payload\":[{\"path\":\"action\",\"op\":\"equals\",\"value\":\"opened\"}]},\"example\":{\"headers\":{},\"body\":\"{\\\"action\\\":\\\"opened\\\",\\\"issue\\\":{\\\"title\\\":\\\"x\\\"}}\"}}" | py 'd["id"]')
|
||||
fi
|
||||
if ! get /api/bindings | grep -q '"e2e-binding"'; then
|
||||
mapping=$(post /api/mappings "{\"name\":\"e2e-issue\",\"source_hint\":\"$src\",\"event_type_id\":\"$et\",\"fields\":[{\"name\":\"title\",\"path\":\"issue.title\",\"type\":\"string\",\"required\":true}]}" | py 'd["id"]')
|
||||
post /api/bindings "{\"name\":\"e2e-binding\",\"matcher\":{\"source\":\"$src\"},\"mapping_id\":\"$mapping\",\"workflow\":\"feasibility\",\"owner\":\"acme\",\"repo\":\"widgets\"}" >/dev/null
|
||||
fi
|
||||
|
||||
# Two more orgs: the operator owns Beta, so the org selector offers it; Gamma
|
||||
# belongs to an identity the operator is not a member of, so selecting it is refused.
|
||||
orgs=$(get /api/orgs)
|
||||
if ! grep -q '"org-beta"' <<<"$orgs"; then
|
||||
operator=$(get /api/identities | py '"".join(i["id"] for i in d["identities"] if i["display_name"] == "E2E operator")')
|
||||
post /api/orgs "{\"id\":\"org-beta\",\"name\":\"Beta\",\"owner_identity\":\"$operator\"}" >/dev/null
|
||||
fi
|
||||
if ! grep -q '"org-gamma"' <<<"$orgs"; then
|
||||
outsider=$(post /api/identities '{"display_name":"E2E outsider","kind":"user"}' | py 'd["id"]')
|
||||
post /api/orgs "{\"id\":\"org-gamma\",\"name\":\"Gamma\",\"owner_identity\":\"$outsider\"}" >/dev/null
|
||||
fi
|
||||
|
||||
echo "seeded: $(get /api/tasks | py 'len(d.get("tasks", d) if isinstance(d, dict) else d)') tasks"
|
||||
Executable
+176
@@ -0,0 +1,176 @@
|
||||
#!/usr/bin/env bash
|
||||
# Run the whole stack as local processes against a throwaway PostgreSQL 18,
|
||||
# for manual and scripted checks. Never part of the gate. Nothing here reads
|
||||
# the installed config: XDG paths point into the dev directory.
|
||||
#
|
||||
# e2e/stack.sh start | stop | restart <service> | status | reset
|
||||
set -Eeuo pipefail
|
||||
|
||||
repo=$(cd "$(dirname "$0")/.." && pwd)
|
||||
dir=${ARCHIE_DEV_DIR:-${XDG_STATE_HOME:-$HOME/.local/state}/archie-dev}
|
||||
pgport=${ARCHIE_DEV_PGPORT:-55432}
|
||||
services=(archie-state-store archie-gateway archied archie-messaging archie-ui)
|
||||
|
||||
# initdb refuses root, and postgres cannot traverse root's home.
|
||||
if [ "$(id -u)" -eq 0 ]; then
|
||||
pgdata=/var/lib/archie-dev/pg
|
||||
as_pg() { runuser -u postgres -- "$@"; }
|
||||
else
|
||||
pgdata=$dir/pg
|
||||
as_pg() { "$@"; }
|
||||
fi
|
||||
|
||||
export XDG_CONFIG_HOME=$dir/config XDG_DATA_HOME=$dir/data XDG_STATE_HOME=$dir/state
|
||||
|
||||
pgbin() {
|
||||
local d
|
||||
for d in /usr/lib/postgresql/18/bin "$(dirname "$(command -v postgres 2>/dev/null || echo /x/x)")"; do
|
||||
if [ -x "$d/postgres" ] && "$d/postgres" --version | grep -q ' 18\.'; then
|
||||
echo "$d"
|
||||
return
|
||||
fi
|
||||
done
|
||||
echo "PostgreSQL 18 server not found" >&2
|
||||
exit 1
|
||||
}
|
||||
|
||||
check_process() {
|
||||
local pid
|
||||
if [ ! -f "$dir/pids/$1" ] || ! pid=$(cat "$dir/pids/$1") || ! kill -0 "$pid" 2>/dev/null; then
|
||||
echo "$1 exited; see $dir/logs/$1.log" >&2
|
||||
return 1
|
||||
fi
|
||||
}
|
||||
|
||||
wait_port() {
|
||||
for _ in $(seq 1 "${3:-60}"); do
|
||||
check_process "$2" || return 1
|
||||
(echo >"/dev/tcp/127.0.0.1/$1") 2>/dev/null && return 0
|
||||
sleep 1
|
||||
done
|
||||
echo "$2 did not listen on $1; see $dir/logs/$2.log" >&2
|
||||
return 1
|
||||
}
|
||||
|
||||
start_pg() {
|
||||
local bin
|
||||
bin=$(pgbin)
|
||||
if [ ! -f "$pgdata/PG_VERSION" ]; then
|
||||
mkdir -p "$pgdata"
|
||||
[ "$(id -u)" -ne 0 ] || chown postgres "$pgdata"
|
||||
as_pg "$bin/initdb" -D "$pgdata" -U archie --auth=trust >/dev/null
|
||||
fi
|
||||
if ! as_pg "$bin/pg_ctl" -D "$pgdata" status >/dev/null 2>&1; then
|
||||
as_pg "$bin/pg_ctl" -D "$pgdata" -w -l "$pgdata/server.log" \
|
||||
-o "-p $pgport -k $pgdata -c listen_addresses=127.0.0.1" start >/dev/null
|
||||
fi
|
||||
"$bin/psql" -h 127.0.0.1 -p "$pgport" -U archie -d postgres -qtAc \
|
||||
"SELECT 1 FROM pg_database WHERE datname = 'archie'" | grep -q 1 ||
|
||||
"$bin/createdb" -h 127.0.0.1 -p "$pgport" -U archie archie
|
||||
}
|
||||
|
||||
prepare() {
|
||||
mkdir -p "$dir"/{bin,logs,pids} "$XDG_CONFIG_HOME/archie" "$XDG_DATA_HOME" "$XDG_STATE_HOME"
|
||||
[ -f "$XDG_CONFIG_HOME/archie/config.toml" ] || cp "$repo/config.example.toml" "$XDG_CONFIG_HOME/archie/config.toml"
|
||||
sed "s#^database_url = .*#database_url = \"postgres://archie@127.0.0.1:$pgport/archie?sslmode=disable\"#" \
|
||||
"$repo/deployments/dev.toml" >"$dir/dev.toml"
|
||||
local version
|
||||
version=$(git -C "$repo" describe --tags --exact-match --match 'v[0-9]*' 2>/dev/null || true)
|
||||
version=${version#v}
|
||||
[ -n "$version" ] || version="dev+$(git -C "$repo" rev-parse --short=12 HEAD)"
|
||||
task --dir "$repo" dev:tls
|
||||
task --dir "$repo" --force build BIN_DIR="$dir/bin" GATEWAY_VERSION="$version" RUNTIME_VERSION="$version"
|
||||
}
|
||||
|
||||
# spawn NAME DIR CMD...: a detached session leader, so stop takes its children.
|
||||
spawn() {
|
||||
local name=$1 cwd=$2
|
||||
shift 2
|
||||
rm -f "$dir/pids/$name"
|
||||
setsid -f bash -c 'cd "$1" && echo $$ >"$2" && shift 2 && exec "$@"' _ "$cwd" "$dir/pids/$name" "$@" \
|
||||
</dev/null >"$dir/logs/$name.log" 2>&1 9>&-
|
||||
for _ in $(seq 1 50); do
|
||||
[ ! -f "$dir/pids/$name" ] || { check_process "$name"; return; }
|
||||
sleep 0.1
|
||||
done
|
||||
echo "$name did not start; see $dir/logs/$name.log" >&2
|
||||
return 1
|
||||
}
|
||||
|
||||
start_service() {
|
||||
spawn "$1" "$repo" "$dir/bin/$1" -config-overlay "$dir/dev.toml"
|
||||
}
|
||||
|
||||
stop_pid() {
|
||||
local f=$1 pid
|
||||
[ -f "$f" ] || return 0
|
||||
pid=$(cat "$f")
|
||||
if kill -- "-$pid" 2>/dev/null; then
|
||||
for _ in $(seq 1 20); do kill -0 "$pid" 2>/dev/null || break; sleep 0.5; done
|
||||
kill -9 -- "-$pid" 2>/dev/null || true
|
||||
fi
|
||||
rm -f "$f"
|
||||
}
|
||||
|
||||
start() {
|
||||
local port
|
||||
for port in 9091 8585 8586 8587 8485 8484 5173; do
|
||||
if (echo >"/dev/tcp/127.0.0.1/$port") 2>/dev/null; then
|
||||
echo "Port $port is already in use. Run task e2e:down before task e2e:up; if it stays occupied, inspect its owner with ss -ltnp." >&2
|
||||
return 1
|
||||
fi
|
||||
done
|
||||
trap 'trap - ERR; stop' ERR
|
||||
prepare
|
||||
start_pg 9>&-
|
||||
start_service archie-state-store
|
||||
wait_port 9091 archie-state-store 90
|
||||
local s
|
||||
for s in archie-gateway archied archie-messaging archie-ui; do start_service "$s"; done
|
||||
wait_port 8585 archie-gateway
|
||||
wait_port 8586 archie-messaging
|
||||
wait_port 8485 archied
|
||||
wait_port 8484 archie-ui
|
||||
[ -d "$repo/ui/node_modules" ] || (cd "$repo/ui" && pnpm install --frozen-lockfile >/dev/null)
|
||||
spawn vite "$repo/ui" pnpm exec vite --host 127.0.0.1 --port 5173 --strictPort
|
||||
wait_port 5173 vite
|
||||
for s in "${services[@]}" vite; do check_process "$s"; done
|
||||
trap - ERR
|
||||
echo "dashboard: http://localhost:5173 logs: $dir/logs"
|
||||
}
|
||||
|
||||
stop() {
|
||||
local f
|
||||
for f in "$dir"/pids/*; do stop_pid "$f"; done
|
||||
if [ -f "$pgdata/PG_VERSION" ]; then
|
||||
as_pg "$(pgbin)/pg_ctl" -D "$pgdata" -m fast stop >/dev/null 2>&1 || true
|
||||
fi
|
||||
}
|
||||
|
||||
# Keep concurrent invocations from replacing each other's process records.
|
||||
mkdir -p "$dir"
|
||||
exec 9>"$dir/stack.lock"
|
||||
flock -n 9 || { echo "Another e2e stack command is running" >&2; exit 1; }
|
||||
|
||||
case ${1:-} in
|
||||
start) start ;;
|
||||
stop) stop ;;
|
||||
restart)
|
||||
stop_pid "$dir/pids/${2:?service}"
|
||||
start_service "$2"
|
||||
;;
|
||||
status)
|
||||
for f in "$dir"/pids/*; do
|
||||
[ -f "$f" ] || continue
|
||||
if kill -0 "$(cat "$f")" 2>/dev/null; then echo "up $(basename "$f")"; else echo "down $(basename "$f")"; fi
|
||||
done
|
||||
;;
|
||||
reset)
|
||||
stop
|
||||
rm -rf "$dir" "$pgdata"
|
||||
;;
|
||||
*)
|
||||
echo "usage: $0 start | stop | restart <service> | status | reset" >&2
|
||||
exit 2
|
||||
;;
|
||||
esac
|
||||
@@ -3,7 +3,7 @@
|
||||
# the network-investigator profile package (archipelago: profiles/network-investigator).
|
||||
#
|
||||
# Build: docker compose build agent-net
|
||||
ARG AGENT_IMAGE=ghcr.io/samcharles93/archie-agent:latest
|
||||
ARG AGENT_IMAGE=git.catlow.cloud/sam/archie-agent:latest
|
||||
FROM ${AGENT_IMAGE}
|
||||
|
||||
RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||
|
||||
@@ -1,143 +1,120 @@
|
||||
module github.com/samcharles93/archie-core
|
||||
|
||||
go 1.27.0
|
||||
go 1.27.3
|
||||
|
||||
require (
|
||||
cel.dev/expr v0.25.3 // indirect
|
||||
code.gitea.io/sdk/gitea v0.23.2 // indirect
|
||||
dario.cat/mergo v1.0.2 // indirect
|
||||
github.com/42wim/httpsig v1.2.4 // indirect
|
||||
github.com/Azure/go-ansiterm v0.0.0-20260917205352-e937bb47801a // indirect
|
||||
github.com/Masterminds/semver/v3 v3.5.0 // indirect
|
||||
github.com/Microsoft/go-winio v0.6.2 // indirect
|
||||
github.com/ProtonMail/go-crypto v1.5.1 // indirect
|
||||
github.com/Microsoft/go-winio v0.6.4 // indirect
|
||||
github.com/ProtonMail/go-crypto v1.5.2 // indirect
|
||||
github.com/antithesishq/antithesis-sdk-go v0.8.0 // indirect
|
||||
github.com/antlr4-go/antlr/v4 v4.13.1 // indirect
|
||||
github.com/cenkalti/backoff/v4 v4.3.0 // indirect
|
||||
github.com/cenkalti/backoff/v5 v5.0.3 // indirect
|
||||
github.com/cespare/xxhash/v2 v2.3.0 // indirect
|
||||
github.com/cloudflare/circl v1.6.5 // indirect
|
||||
github.com/containerd/errdefs v1.0.0 // indirect
|
||||
github.com/containerd/errdefs/pkg v0.3.0 // indirect
|
||||
github.com/containerd/log v0.2.0 // indirect
|
||||
github.com/containerd/platforms v1.0.0-rc.5 // indirect
|
||||
github.com/cpuguy83/dockercfg v0.3.2 // indirect
|
||||
github.com/davidmz/go-pageant v1.0.2 // indirect
|
||||
github.com/distribution/reference v0.6.0 // indirect
|
||||
github.com/docker/go-connections v0.8.1 // indirect
|
||||
github.com/docker/go-connections v0.8.2 // indirect
|
||||
github.com/docker/go-units v0.5.0 // indirect
|
||||
github.com/dustin/go-humanize v1.1.0 // indirect
|
||||
github.com/ebitengine/purego v0.11.1 // indirect
|
||||
github.com/emirpasic/gods v1.18.1 // indirect
|
||||
github.com/fatih/color v1.19.0 // indirect
|
||||
github.com/felixge/httpsnoop v1.1.0 // indirect
|
||||
github.com/go-fed/httpsig v1.1.0 // indirect
|
||||
github.com/fxamacker/cbor/v2 v2.9.6 // indirect
|
||||
github.com/go-git/gcfg/v2 v2.0.2 // indirect
|
||||
github.com/go-jose/go-jose/v4 v4.1.5 // indirect
|
||||
github.com/go-json-experiment/json v0.0.0-20260820222146-c27c302e5fc3 // indirect
|
||||
github.com/go-logr/logr v1.4.4 // indirect
|
||||
github.com/go-logr/stdr v1.2.2 // indirect
|
||||
github.com/go-ole/go-ole v1.3.0 // indirect
|
||||
github.com/go-viper/mapstructure/v2 v2.5.0 // indirect
|
||||
github.com/go-webauthn/x v0.3.1 // indirect
|
||||
github.com/golang/protobuf v1.5.4 // indirect
|
||||
github.com/google/go-github/v86 v86.0.0 // indirect
|
||||
github.com/google/go-querystring v1.2.0 // indirect
|
||||
github.com/google/go-tpm v0.9.8 // indirect
|
||||
github.com/google/jsonschema-go v0.4.3 // indirect
|
||||
github.com/hashicorp/go-cleanhttp v0.5.2 // indirect
|
||||
github.com/hashicorp/go-retryablehttp v0.7.8 // indirect
|
||||
github.com/hashicorp/go-version v1.9.0 // indirect
|
||||
github.com/grpc-ecosystem/grpc-gateway/v2 v2.32.0 // indirect
|
||||
github.com/hashicorp/yamux v0.1.2 // indirect
|
||||
github.com/jackc/pgpassfile v1.0.0 // indirect
|
||||
github.com/jackc/pgservicefile v0.0.0-20240606120523-5a60cdf6a761 // indirect
|
||||
github.com/jackc/puddle/v2 v2.2.2 // indirect
|
||||
github.com/jackc/puddle/v2 v2.2.3 // indirect
|
||||
github.com/kevinburke/ssh_config v1.6.0 // indirect
|
||||
github.com/klauspost/compress v1.20.0 // indirect
|
||||
github.com/klauspost/cpuid/v2 v2.4.0 // indirect
|
||||
github.com/lufia/plan9stats v0.0.0-20260802145828-341c2f0c90b5 // indirect
|
||||
github.com/magiconair/properties v1.18.12 // indirect
|
||||
github.com/mattn/go-colorable v0.1.14 // indirect
|
||||
github.com/klauspost/compress v1.20.3 // indirect
|
||||
github.com/mattn/go-colorable v0.1.16 // indirect
|
||||
github.com/mattn/go-isatty v0.0.24 // indirect
|
||||
github.com/mfridman/interpolate v0.0.2 // indirect
|
||||
github.com/minio/highwayhash v1.0.4 // indirect
|
||||
github.com/moby/docker-image-spec v1.3.1 // indirect
|
||||
github.com/moby/go-archive v0.3.3 // indirect
|
||||
github.com/moby/patternmatcher v0.6.1 // indirect
|
||||
github.com/moby/sys/sequential v0.7.0 // indirect
|
||||
github.com/moby/sys/user v0.4.1 // indirect
|
||||
github.com/moby/sys/userns v0.2.1 // indirect
|
||||
github.com/moby/term v0.5.2 // indirect
|
||||
github.com/nats-io/jwt/v2 v2.8.2 // indirect
|
||||
github.com/nats-io/nkeys v0.4.16 // indirect
|
||||
github.com/nats-io/nuid v1.0.1 // indirect
|
||||
github.com/oklog/run v1.1.0 // indirect
|
||||
github.com/pjbgf/sha1cd v0.6.0 // indirect
|
||||
github.com/oklog/run v1.2.0 // indirect
|
||||
github.com/philhofer/fwd v1.2.1 // indirect
|
||||
github.com/pjbgf/sha1cd v0.7.0 // indirect
|
||||
github.com/pkg/browser v0.0.0-20240102092130-5ac0b6a4141c // indirect
|
||||
github.com/power-devops/perfstat v0.0.0-20260916203055-22a1a467d9f0 // indirect
|
||||
github.com/segmentio/asm v1.2.1 // indirect
|
||||
github.com/segmentio/encoding v0.5.4 // indirect
|
||||
github.com/sergi/go-diff v1.4.0 // indirect
|
||||
github.com/sethvargo/go-retry v0.4.0 // indirect
|
||||
github.com/shirou/gopsutil/v4 v4.26.8 // indirect
|
||||
github.com/sethvargo/go-retry v0.5.0 // indirect
|
||||
github.com/sirupsen/logrus v1.10.2 // indirect
|
||||
github.com/stretchr/testify v1.12.1 // indirect
|
||||
github.com/tklauser/go-sysconf v0.4.0 // indirect
|
||||
github.com/tklauser/numcpus v0.12.0 // indirect
|
||||
github.com/ulikunitz/xz v0.5.15 // indirect
|
||||
github.com/tinylib/msgp v1.6.5 // indirect
|
||||
github.com/x448/float16 v0.8.4 // indirect
|
||||
github.com/yosida95/uritemplate/v3 v3.0.2 // indirect
|
||||
github.com/yusufpapurcu/wmi v1.2.4 // indirect
|
||||
gitlab.com/gitlab-org/api/client-go v1.46.0 // indirect
|
||||
go.opentelemetry.io/auto/sdk v1.2.1 // indirect
|
||||
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.71.0 // indirect
|
||||
go.opentelemetry.io/otel v1.46.0 // indirect
|
||||
go.opentelemetry.io/otel/metric v1.46.0 // indirect
|
||||
go.opentelemetry.io/otel/trace v1.46.0 // indirect
|
||||
go.opentelemetry.io/otel/log v1.47.0 // indirect
|
||||
go.opentelemetry.io/otel/metric v1.47.0 // indirect
|
||||
go.uber.org/multierr v1.11.0 // indirect
|
||||
go.yaml.in/yaml/v3 v3.0.5 // indirect
|
||||
golang.org/x/crypto v0.57.0 // indirect
|
||||
golang.org/x/exp v0.0.0-20260908205506-85c1c2202aba // indirect
|
||||
golang.org/x/sync v0.23.0 // indirect
|
||||
golang.org/x/text v0.42.0 // indirect
|
||||
golang.org/x/exp v0.0.0-20261014143641-f0251eb4aa3e // indirect
|
||||
golang.org/x/sync v0.24.0 // indirect
|
||||
golang.org/x/text v0.43.0 // indirect
|
||||
golang.org/x/time v0.16.0 // indirect
|
||||
google.golang.org/genproto/googleapis/api v0.0.0-20260921155816-b14227669459 // indirect
|
||||
google.golang.org/genproto/googleapis/rpc v0.0.0-20260921155816-b14227669459 // indirect
|
||||
modernc.org/libc v1.77.1 // indirect
|
||||
modernc.org/sqlite v1.59.0 // indirect
|
||||
google.golang.org/genproto/googleapis/api v0.0.0-20261019180522-ce908d29299b // indirect
|
||||
google.golang.org/genproto/googleapis/rpc v0.0.0-20261019180522-ce908d29299b // indirect
|
||||
)
|
||||
|
||||
require (
|
||||
cel.dev/cel-go v0.32.0
|
||||
github.com/BurntSushi/toml v1.6.0
|
||||
github.com/cedar-policy/cedar-go v1.8.0
|
||||
github.com/containerd/errdefs v1.0.0
|
||||
github.com/coreos/go-oidc/v3 v3.21.0
|
||||
github.com/creativeprojects/go-selfupdate v1.6.0
|
||||
github.com/docker/sandbox-kit-spec/v3 v3.0.0-m.6
|
||||
github.com/go-git/go-billy/v6 v6.0.0-alpha.2
|
||||
github.com/go-git/go-git/v6 v6.0.0-alpha.5
|
||||
github.com/docker/sandbox-kit-spec/v3 v3.0.0-m.8
|
||||
github.com/go-git/go-billy/v6 v6.0.0-beta.1
|
||||
github.com/go-git/go-git/v6 v6.0.0-beta.1
|
||||
github.com/go-jose/go-jose/v4 v4.1.6
|
||||
github.com/go-telegram/bot v1.27.0
|
||||
github.com/go-webauthn/webauthn v0.18.2
|
||||
github.com/golang-jwt/jwt/v5 v5.3.1
|
||||
github.com/google/jsonschema-go v0.4.3
|
||||
github.com/google/uuid v1.6.0
|
||||
github.com/hashicorp/go-hclog v1.6.3
|
||||
github.com/hashicorp/go-plugin v1.8.0
|
||||
github.com/jackc/pgx/v5 v5.11.0
|
||||
github.com/moby/moby/api v1.56.0
|
||||
github.com/moby/moby/client v0.6.0
|
||||
github.com/moby/moby/api v1.56.1
|
||||
github.com/moby/moby/client v0.6.2
|
||||
github.com/modelcontextprotocol/go-sdk v1.8.0
|
||||
github.com/nats-io/nats-server/v2 v2.15.0
|
||||
github.com/nats-io/nats.go v1.54.0
|
||||
github.com/nats-io/nats-server/v2 v2.15.1
|
||||
github.com/nats-io/nats.go v1.55.0
|
||||
github.com/opencontainers/go-digest v1.0.0
|
||||
github.com/opencontainers/image-spec v1.1.1
|
||||
github.com/pressly/goose/v3 v3.28.0
|
||||
github.com/samcharles93/ai-sdk v0.1.42
|
||||
github.com/testcontainers/testcontainers-go v0.44.0
|
||||
github.com/testcontainers/testcontainers-go/modules/postgres v0.44.0
|
||||
github.com/pressly/goose/v3 v3.29.0
|
||||
github.com/samcharles93/ai-sdk v0.6.0
|
||||
go.lsp.dev/jsonrpc2 v1.0.1
|
||||
go.lsp.dev/protocol v1.0.1
|
||||
go.lsp.dev/uri v1.0.1
|
||||
golang.org/x/mod v0.41.0
|
||||
golang.org/x/net v0.59.0
|
||||
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.72.0
|
||||
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.72.0
|
||||
go.opentelemetry.io/otel v1.47.0
|
||||
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.47.0
|
||||
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.47.0
|
||||
go.opentelemetry.io/otel/sdk v1.47.0
|
||||
go.opentelemetry.io/otel/trace v1.47.0
|
||||
go.opentelemetry.io/proto/otlp v1.11.1
|
||||
golang.org/x/crypto v0.58.0
|
||||
golang.org/x/mod v0.42.0
|
||||
golang.org/x/net v0.62.0
|
||||
golang.org/x/oauth2 v0.37.0
|
||||
golang.org/x/sys v0.48.0
|
||||
golang.org/x/term v0.46.0
|
||||
google.golang.org/grpc v1.85.0-dev.0.20260825072537-93e31b48545e
|
||||
golang.org/x/sys v0.49.0
|
||||
golang.org/x/term v0.47.0
|
||||
google.golang.org/grpc v1.86.0-dev
|
||||
google.golang.org/protobuf v1.36.12
|
||||
gopkg.in/yaml.v3 v3.0.1
|
||||
oras.land/oras-go/v2 v2.6.2
|
||||
oras.land/oras-go/v2 v2.7.0
|
||||
)
|
||||
@@ -2,24 +2,12 @@ cel.dev/cel-go v0.32.0 h1:irvpFKr5EuGPyxeME03ERh0rii1TX+BDAnB9eL3IvNk=
|
||||
cel.dev/cel-go v0.32.0/go.mod h1:DnVip7tpJSsgZymwfT+m1tnEVy3ivAjSMXPx12YrMkU=
|
||||
cel.dev/expr v0.25.3 h1:A2jO8jwOugrrovveCWfj0KEZOfqiLgAcwjpHPhzIGw0=
|
||||
cel.dev/expr v0.25.3/go.mod h1:hrXvqGP6G6gyx8UAHSHJ5RGk//1Oj5nXQ2NI02Nrsg4=
|
||||
code.gitea.io/sdk/gitea v0.23.2 h1:iJB1FDmLegwfwjX8gotBDHdPSbk/ZR8V9VmEJaVsJYg=
|
||||
code.gitea.io/sdk/gitea v0.23.2/go.mod h1:yyF5+GhljqvA30sRDreoyHILruNiy4ASufugzYg0VHM=
|
||||
dario.cat/mergo v1.0.2 h1:85+piFYR1tMbRrLcDwR18y4UKJ3aH1Tbzi24VRW1TK8=
|
||||
dario.cat/mergo v1.0.2/go.mod h1:E/hbnu0NxMFBjpMIE34DRGLWqDy0g5FuKDhCb31ngxA=
|
||||
github.com/42wim/httpsig v1.2.4 h1:mI5bH0nm4xn7K18fo1K3okNDRq8CCJ0KbBYWyA6r8lU=
|
||||
github.com/42wim/httpsig v1.2.4/go.mod h1:yKsYfSyTBEohkPik224QPFylmzEBtda/kjyIAJjh3ps=
|
||||
github.com/AdaLogics/go-fuzz-headers v0.0.0-20240806141605-e8a1dd7889d6 h1:He8afgbRMd7mFxO99hRNu+6tazq8nFF9lIwo9JFroBk=
|
||||
github.com/AdaLogics/go-fuzz-headers v0.0.0-20240806141605-e8a1dd7889d6/go.mod h1:8o94RPi1/7XTJvwPpRSzSUedZrtlirdB3r9Z20bi2f8=
|
||||
github.com/Azure/go-ansiterm v0.0.0-20260917205352-e937bb47801a h1:4hxax9ktNjSDoFn1tZSeL6gXMTRMpO0FzjdKfT01jgY=
|
||||
github.com/Azure/go-ansiterm v0.0.0-20260917205352-e937bb47801a/go.mod h1:3EWSSOZ50kb+arhww0qIaEXHToib/3FjBj9Jj5lcP5g=
|
||||
github.com/BurntSushi/toml v1.6.0 h1:dRaEfpa2VI55EwlIW72hMRHdWouJeRF7TPYhI+AUQjk=
|
||||
github.com/BurntSushi/toml v1.6.0/go.mod h1:ukJfTF/6rtPPRCnwkur4qwRxa8vTRFBF0uk2lLoLwho=
|
||||
github.com/Masterminds/semver/v3 v3.5.0 h1:kQceYJfbupGfZOKZQg0kou0DgAKhzDg2NZPAwZ/2OOE=
|
||||
github.com/Masterminds/semver/v3 v3.5.0/go.mod h1:4V+yj/TJE1HU9XfppCwVMZq3I84lprf4nC11bSS5beM=
|
||||
github.com/Microsoft/go-winio v0.6.2 h1:F2VQgta7ecxGYO8k3ZZz3RS8fVIXVxONVUPlNERoyfY=
|
||||
github.com/Microsoft/go-winio v0.6.2/go.mod h1:yd8OoFMLzJbo9gZq8j5qaps8bJ9aShtEA8Ipt1oGCvU=
|
||||
github.com/ProtonMail/go-crypto v1.5.1 h1:pTrLDQHyOT8y3DFYIpijgPBTw/7E2GLMimutvOlceuE=
|
||||
github.com/ProtonMail/go-crypto v1.5.1/go.mod h1:/RaSu30DaKO4RY+XdV/ACcCcZkGr7AhUIduq5sjzzCo=
|
||||
github.com/Microsoft/go-winio v0.6.4 h1:kJF2pamtYCWXf0xAT8sAkwKC0pMl2HYBrRPHAqyUc+g=
|
||||
github.com/Microsoft/go-winio v0.6.4/go.mod h1:1xl5JXG4ze/m74GH6Dc4Mwxfc3VL5siRVQjIAlHH07U=
|
||||
github.com/ProtonMail/go-crypto v1.5.2 h1:cucYnvqcY7UOXVD//mSyjeaPY0SSN3v5cDkYPxumINk=
|
||||
github.com/ProtonMail/go-crypto v1.5.2/go.mod h1:/RaSu30DaKO4RY+XdV/ACcCcZkGr7AhUIduq5sjzzCo=
|
||||
github.com/anmitsu/go-shlex v0.0.0-20200514113438-38f4b401e2be h1:9AeTilPcZAjCFIImctFaOjnTIavg87rW78vTPkQqLI8=
|
||||
github.com/anmitsu/go-shlex v0.0.0-20200514113438-38f4b401e2be/go.mod h1:ySMOLuWl6zY27l47sB3qLNK6tF2fkHG55UZxx8oIVo4=
|
||||
github.com/antithesishq/antithesis-sdk-go v0.8.0 h1:bVV5ZAuwaREn4klRSJusYaA+A7NXq8Qi9C/knCaQ2N4=
|
||||
@@ -32,8 +20,8 @@ github.com/bufbuild/protocompile v0.14.1 h1:iA73zAf/fyljNjQKwYzUHD6AD4R8KMasmwa/
|
||||
github.com/bufbuild/protocompile v0.14.1/go.mod h1:ppVdAIhbr2H8asPk6k4pY7t9zB1OU5DoEw9xY/FUi1c=
|
||||
github.com/cedar-policy/cedar-go v1.8.0 h1:9gcU7EHXwHC2RMdpph68yTAkdB3behTTssC+kt4GoS8=
|
||||
github.com/cedar-policy/cedar-go v1.8.0/go.mod h1:h5+3CVW1oI5LXVskJG+my9TFCYI5yjh/+Ul3EJie6MI=
|
||||
github.com/cenkalti/backoff/v4 v4.3.0 h1:MyRJ/UdXutAwSAT+s3wNd7MfTIcy71VQueUuFK343L8=
|
||||
github.com/cenkalti/backoff/v4 v4.3.0/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE=
|
||||
github.com/cenkalti/backoff/v5 v5.0.3 h1:ZN+IMa753KfX5hd8vVaMixjnqRZ3y8CuJKRKj1xcsSM=
|
||||
github.com/cenkalti/backoff/v5 v5.0.3/go.mod h1:rkhZdG3JZukswDf7f0cwqPNk4K0sa+F97BxZthm/crw=
|
||||
github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs=
|
||||
github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs=
|
||||
github.com/cloudflare/circl v1.6.5 h1:O64F26HEqNhznd/hrC5KZXVKYuKM2rx4deZDTc4ihQA=
|
||||
@@ -48,28 +36,18 @@ github.com/containerd/platforms v1.0.0-rc.5 h1:vXd569rDrz8LeMXzAnBsy6LADV5YtsD8o
|
||||
github.com/containerd/platforms v1.0.0-rc.5/go.mod h1:lKlMXyLybmBedS/JJm11uDofzI8L2v0J2ZbYvNsbq1A=
|
||||
github.com/coreos/go-oidc/v3 v3.21.0 h1:wZo4Q9Pum8dYEj0eMUPrqR+kvuGkeUplbLpNCkBqoWM=
|
||||
github.com/coreos/go-oidc/v3 v3.21.0/go.mod h1:DYCf24+ncYi+XkIH97GY1+dqoRlbaSI26KVTCI9SrY4=
|
||||
github.com/cpuguy83/dockercfg v0.3.2 h1:DlJTyZGBDlXqUZ2Dk2Q3xHs/FtnooJJVaad2S9GKorA=
|
||||
github.com/cpuguy83/dockercfg v0.3.2/go.mod h1:sugsbF4//dDlL/i+S+rtpIWp+5h0BHJHfjj5/jFyUJc=
|
||||
github.com/creack/pty v1.1.24 h1:bJrF4RRfyJnbTJqzRLHzcGaZK1NeM5kTC9jGgovnR1s=
|
||||
github.com/creack/pty v1.1.24/go.mod h1:08sCNb52WyoAwi2QDyzUCTgcvVFhUzewun7wtTfvcwE=
|
||||
github.com/creativeprojects/go-selfupdate v1.6.0 h1:Bu3cIgdyfI1Pg8XsL8nbaT2uMjfZ8HIoxnBmPJbN0sw=
|
||||
github.com/creativeprojects/go-selfupdate v1.6.0/go.mod h1:Ids8O474XGQG0jZ5vpBIhWffcGYjUP6ccOI0mMcvQbI=
|
||||
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
||||
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
||||
github.com/davidmz/go-pageant v1.0.2 h1:bPblRCh5jGU+Uptpz6LgMZGD5hJoOt7otgT454WvHn0=
|
||||
github.com/davidmz/go-pageant v1.0.2/go.mod h1:P2EDDnMqIwG5Rrp05dTRITj9z2zpGcD9efWSkTNKLIE=
|
||||
github.com/distribution/reference v0.6.0 h1:0IXCQ5g4/QMHHkarYzh5l+u8T3t73zM5QvfrDyIgxBk=
|
||||
github.com/distribution/reference v0.6.0/go.mod h1:BbU0aIcezP1/5jX/8MP0YiH4SdvB5Y4f/wlDRiLyi3E=
|
||||
github.com/docker/go-connections v0.8.1 h1:JibmG5hULs5qXSr/cp/w3Pw5fZuStt4MOHMUExb29/M=
|
||||
github.com/docker/go-connections v0.8.1/go.mod h1:no1qkHdjq7kLMGUXYAduOhYPSJxxvgWBh7ogVvptn3Q=
|
||||
github.com/docker/go-connections v0.8.2 h1:9d9DEokx5W7qlr0shkFXIxEA7+TTD+llwzcykSlxMNc=
|
||||
github.com/docker/go-connections v0.8.2/go.mod h1:no1qkHdjq7kLMGUXYAduOhYPSJxxvgWBh7ogVvptn3Q=
|
||||
github.com/docker/go-units v0.5.0 h1:69rxXcBk27SvSaaxTtLh/8llcHD8vYHT7WSdRZ/jvr4=
|
||||
github.com/docker/go-units v0.5.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk=
|
||||
github.com/docker/sandbox-kit-spec/v3 v3.0.0-m.6 h1:co7vn6GgImYEGO/KPlhPRJT9i5EPWgOKcB9q7bNJlFQ=
|
||||
github.com/docker/sandbox-kit-spec/v3 v3.0.0-m.6/go.mod h1:MrWO4PN3/VYC5xF8eyI8U82Nv/agTHcN4IUzheqA90c=
|
||||
github.com/docker/sandbox-kit-spec/v3 v3.0.0-m.8 h1:ay2XEj0yW3uzsNwN3KXS/c4nlneHONFKaHlrVhu2WCQ=
|
||||
github.com/docker/sandbox-kit-spec/v3 v3.0.0-m.8/go.mod h1:4G6VgFAp9eaQkwy7DbZbOfWRD/Mjvc/TnEtQBRRMEsA=
|
||||
github.com/dustin/go-humanize v1.1.0 h1:dbKTrvD0klcbBV/h4AWJdMuZogJACoMlvWIWZ5b2xWg=
|
||||
github.com/dustin/go-humanize v1.1.0/go.mod h1:hc1CvRkJMsgxqjmjMQF3QNRAZBwY8AXBAzKYoSX9sFI=
|
||||
github.com/ebitengine/purego v0.11.1 h1:2zpWRSQNVKN4eKsKO9eM1ILDgWfYMY9GwqRmK6XeQ/0=
|
||||
github.com/ebitengine/purego v0.11.1/go.mod h1:DCHPP08djqhNSoTfImcnHYQRZmd0qhakvrozqaEYhGQ=
|
||||
github.com/emirpasic/gods v1.18.1 h1:FXtiHYKDGKCW2KzwZKx0iC0PQmdlorYgdFG9jPXJ1Bc=
|
||||
github.com/emirpasic/gods v1.18.1/go.mod h1:8tpGGwCnJ5H4r6BWwaV6OrWmMoPhUl5jm/FMNAnJvWQ=
|
||||
github.com/fatih/color v1.13.0/go.mod h1:kLAiJbzzSOZDVNGyDpeOxJ47H46qBXwg5ILebYFFOfk=
|
||||
@@ -77,20 +55,20 @@ github.com/fatih/color v1.19.0 h1:Zp3PiM21/9Ld6FzSKyL5c/BULoe/ONr9KlbYVOfG8+w=
|
||||
github.com/fatih/color v1.19.0/go.mod h1:zNk67I0ZUT1bEGsSGyCZYZNrHuTkJJB+r6Q9VuMi0LE=
|
||||
github.com/felixge/httpsnoop v1.1.0 h1:3YtUj32ZZkqZtt3sZZsClsymw/QDuVfpNhoA31zeORc=
|
||||
github.com/felixge/httpsnoop v1.1.0/go.mod h1:Zqxgdd+1Rkcz8euOqdr7lqgCRJztwr5hp9vDSi5UZCE=
|
||||
github.com/fxamacker/cbor/v2 v2.9.6 h1:NHZPxuUjJXQjX9itA785y/5NKSlI4HQ+S7noZsmI7hs=
|
||||
github.com/fxamacker/cbor/v2 v2.9.6/go.mod h1:4EaZp6ClVunETjQ4GHmGNzysDK91Lr+r6Yz6tJqzVCw=
|
||||
github.com/gliderlabs/ssh v0.3.8 h1:a4YXD1V7xMF9g5nTkdfnja3Sxy1PVDCj1Zg4Wb8vY6c=
|
||||
github.com/gliderlabs/ssh v0.3.8/go.mod h1:xYoytBv1sV0aL3CavoDuJIQNURXkkfPA/wxQ1pL1fAU=
|
||||
github.com/go-fed/httpsig v1.1.0 h1:9M+hb0jkEICD8/cAiNqEB66R87tTINszBRTjwjQzWcI=
|
||||
github.com/go-fed/httpsig v1.1.0/go.mod h1:RCMrTZvN1bJYtofsG4rd5NaO5obxQ5xBkdiS7xsT7bM=
|
||||
github.com/go-git/gcfg/v2 v2.0.2 h1:MY5SIIfTGGEMhdA7d7JePuVVxtKL7Hp+ApGDJAJ7dpo=
|
||||
github.com/go-git/gcfg/v2 v2.0.2/go.mod h1:/lv2NsxvhepuMrldsFilrgct6pxzpGdSRC13ydTLSLs=
|
||||
github.com/go-git/go-billy/v6 v6.0.0-alpha.2 h1:1Sv5WemXL8CxKrAx1gioJ+uHNb2bZJhiQLfwSZ4Et8c=
|
||||
github.com/go-git/go-billy/v6 v6.0.0-alpha.2/go.mod h1:r/bsv9i/iDyyEU8/Z6mjC+YraOVwie1ddfUqBCElKXQ=
|
||||
github.com/go-git/go-billy/v6 v6.0.0-beta.1 h1:OJ4r207zcEbeq/DJNajQUOMd+pph3r9A7hRq1Sjl1bA=
|
||||
github.com/go-git/go-billy/v6 v6.0.0-beta.1/go.mod h1:QGOWN4CzmtRfpFeCw5paG3RJyKdTwsfGASkxBVkIaAU=
|
||||
github.com/go-git/go-git-fixtures/v6 v6.0.0-alpha.1 h1:gmqi2jvsreu0s8JMLylYDFq4sbjHwwlhktMw0DUg3mA=
|
||||
github.com/go-git/go-git-fixtures/v6 v6.0.0-alpha.1/go.mod h1:ECf1MqJlBdYpKggBrOXjo/0EnvRZx6D++I86UYjPgAQ=
|
||||
github.com/go-git/go-git/v6 v6.0.0-alpha.5 h1:sE+OlkHgYWNMVmN1s9sR7uyFgsWLtxcNWse/vBYKxRE=
|
||||
github.com/go-git/go-git/v6 v6.0.0-alpha.5/go.mod h1:3IjhiZnM+uBmUrOGSeqrJpsmi4Vd0H2NZO/uK2a7d0s=
|
||||
github.com/go-jose/go-jose/v4 v4.1.5 h1:RjgjO2LOtWOJKUC5wpwY9LR3B3vwVAz6JS2YHfYU6eA=
|
||||
github.com/go-jose/go-jose/v4 v4.1.5/go.mod h1:x4oUasVrzR7071A4TnHLGSPpNOm2a21K9Kf04k1rs08=
|
||||
github.com/go-git/go-git/v6 v6.0.0-beta.1 h1:1t+vJYGDBN6f9GRWskgWx5UjXPFUa7wfffZZZ2C5GtA=
|
||||
github.com/go-git/go-git/v6 v6.0.0-beta.1/go.mod h1:ugDlr38Wwc+fOw85J+Oluh5TNXQtJgYMcriOljg3l4s=
|
||||
github.com/go-jose/go-jose/v4 v4.1.6 h1:sNRkftxFJxwsILiQukqp5z83QBSmntVwmgRY7AqBDO4=
|
||||
github.com/go-jose/go-jose/v4 v4.1.6/go.mod h1:x4oUasVrzR7071A4TnHLGSPpNOm2a21K9Kf04k1rs08=
|
||||
github.com/go-json-experiment/json v0.0.0-20260820222146-c27c302e5fc3 h1:UADEEmDKgfXbtnGJZ97beY5XLo9ZechG1nlU4KnRrkE=
|
||||
github.com/go-json-experiment/json v0.0.0-20260820222146-c27c302e5fc3/go.mod h1:tphK2c80bpPhMOI4v6bIc2xWywPfbqi1Z06+RcrMkDg=
|
||||
github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A=
|
||||
@@ -98,40 +76,34 @@ github.com/go-logr/logr v1.4.4 h1:tG4xh9yMsRCAiodLVTxyrkzSZ9+o0L1Kg/+cPVcbP/8=
|
||||
github.com/go-logr/logr v1.4.4/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY=
|
||||
github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag=
|
||||
github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE=
|
||||
github.com/go-ole/go-ole v1.2.6/go.mod h1:pprOEPIfldk/42T2oK7lQ4v4JSDwmV0As9GaiUsvbm0=
|
||||
github.com/go-ole/go-ole v1.3.0 h1:Dt6ye7+vXGIKZ7Xtk4s6/xVdGDQynvom7xCFEdWr6uE=
|
||||
github.com/go-ole/go-ole v1.3.0/go.mod h1:5LS6F96DhAwUc7C+1HLexzMXY1xGRSryjyPPKW6zv78=
|
||||
github.com/go-telegram/bot v1.27.0 h1:PG9yBDzM8O26oUerE9SZwWlHon4RpH8WcNslZ7CEZmE=
|
||||
github.com/go-telegram/bot v1.27.0/go.mod h1:i2TRs7fXWIeaceF3z7KzsMt/he0TwkVC680mvdTFYeM=
|
||||
github.com/go-viper/mapstructure/v2 v2.5.0 h1:vM5IJoUAy3d7zRSVtIwQgBj7BiWtMPfmPEgAXnvj1Ro=
|
||||
github.com/go-viper/mapstructure/v2 v2.5.0/go.mod h1:oJDH3BJKyqBA2TXFhDsKDGDTlndYOZ6rGS0BRZIxGhM=
|
||||
github.com/go-webauthn/webauthn v0.18.2 h1:0BeftmEHU7i3Dv0VFwBtidy/ba37Vcdjvqst9EYu8Sk=
|
||||
github.com/go-webauthn/webauthn v0.18.2/go.mod h1:hEXaOuLxvZ3zG9miZe3ehlyeVso9AtklXG+kTn36k+A=
|
||||
github.com/go-webauthn/x v0.3.1 h1:1ff37z3XfmTTomkhlURgGizLIDyOvPgTt2t9nlzKLRo=
|
||||
github.com/go-webauthn/x v0.3.1/go.mod h1:ZInxAynYXfBPvvm5gzKZ7geBlL23K71xASMgohHl/Rg=
|
||||
github.com/golang-jwt/jwt/v5 v5.3.1 h1:kYf81DTWFe7t+1VvL7eS+jKFVWaUnK9cB1qbwn63YCY=
|
||||
github.com/golang-jwt/jwt/v5 v5.3.1/go.mod h1:fxCRLWMO43lRc8nhHWY6LGqRcf+1gQWArsqaEUEa5bE=
|
||||
github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek=
|
||||
github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps=
|
||||
github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
|
||||
github.com/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8=
|
||||
github.com/google/go-cmp v0.7.0/go.mod h1:pXiqmnSA92OHEEa9HXL2W4E7lf9JzCmGVUdgjX3N/iU=
|
||||
github.com/google/go-github/v86 v86.0.0 h1:S/6aANJhwRm8EQmGKVML3j41yq0h2BsTP8FnDkO7kcA=
|
||||
github.com/google/go-github/v86 v86.0.0/go.mod h1:zKv1l4SwDXNFMGByi2FWkq71KwSXqj/eQRZuqtmcot8=
|
||||
github.com/google/go-querystring v1.2.0 h1:yhqkPbu2/OH+V9BfpCVPZkNmUXhb2gBxJArfhIxNtP0=
|
||||
github.com/google/go-querystring v1.2.0/go.mod h1:8IFJqpSRITyJ8QhQ13bmbeMBDfmeEJZD5A0egEOmkqU=
|
||||
github.com/google/go-tpm v0.9.8 h1:slArAR9Ft+1ybZu0lBwpSmpwhRXaa85hWtMinMyRAWo=
|
||||
github.com/google/go-tpm v0.9.8/go.mod h1:h9jEsEECg7gtLis0upRBQU+GhYVH6jMjrFxI8u6bVUY=
|
||||
github.com/google/go-tpm-tools v0.3.13-0.20230620182252-4639ecce2aba h1:qJEJcuLzH5KDR0gKc0zcktin6KSAwL7+jWKBYceddTc=
|
||||
github.com/google/go-tpm-tools v0.3.13-0.20230620182252-4639ecce2aba/go.mod h1:EFYHy8/1y2KfgTAsx7Luu7NGhoxtuVHnNo8jE7FikKc=
|
||||
github.com/google/jsonschema-go v0.4.3 h1:/DBOLZTfDow7pe2GmaJNhltueGTtDKICi8V8p+DQPd0=
|
||||
github.com/google/jsonschema-go v0.4.3/go.mod h1:r5quNTdLOYEz95Ru18zA0ydNbBuYoo9tgaYcxEYhJVE=
|
||||
github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0=
|
||||
github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
|
||||
github.com/graph-gophers/graphql-go v1.9.0 h1:yu0ucKHLc5qGpRwLYKIWtr9bOoxovkWasuBrPQwlHls=
|
||||
github.com/graph-gophers/graphql-go v1.9.0/go.mod h1:23olKZ7duEvHlF/2ELEoSZaY1aNPfShjP782SOoNTyM=
|
||||
github.com/hashicorp/go-cleanhttp v0.5.2 h1:035FKYIWjmULyFRBKPs8TBQoi0x6d9G4xc9neXJWAZQ=
|
||||
github.com/hashicorp/go-cleanhttp v0.5.2/go.mod h1:kO/YDlP8L1346E6Sodw+PrpBSV4/SoxCXGY6BqNFT48=
|
||||
github.com/grpc-ecosystem/grpc-gateway/v2 v2.32.0 h1:QMILzF8BA7xftE4zVORkRrlv08m12St3csK4RsyRgRs=
|
||||
github.com/grpc-ecosystem/grpc-gateway/v2 v2.32.0/go.mod h1:+ZQ6iUL8+ATyxGDQNuRKpNwJFdGDUi0e7E1QL9MvI7U=
|
||||
github.com/hashicorp/go-hclog v1.6.3 h1:Qr2kF+eVWjTiYmU7Y31tYlP1h0q/X3Nl3tPGdaB11/k=
|
||||
github.com/hashicorp/go-hclog v1.6.3/go.mod h1:W4Qnvbt70Wk/zYJryRzDRU/4r0kIg0PVHBcfoyhpF5M=
|
||||
github.com/hashicorp/go-plugin v1.8.0 h1:ie8S6RRY8RvB2usYZv+AAZ/wBvx2AU5p5QeP5j/FORs=
|
||||
github.com/hashicorp/go-plugin v1.8.0/go.mod h1:BExt6KEaIYx804z8k4gRzRLEvxKVb+kn0NMcihqOqb8=
|
||||
github.com/hashicorp/go-retryablehttp v0.7.8 h1:ylXZWnqa7Lhqpk0L1P1LzDtGcCR0rPVUrx/c8Unxc48=
|
||||
github.com/hashicorp/go-retryablehttp v0.7.8/go.mod h1:rjiScheydd+CxvumBsIrFKlx3iS0jrZ7LvzFGFmuKbw=
|
||||
github.com/hashicorp/go-version v1.9.0 h1:CeOIz6k+LoN3qX9Z0tyQrPtiB1DFYRPfCIBtaXPSCnA=
|
||||
github.com/hashicorp/go-version v1.9.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA=
|
||||
github.com/hashicorp/yamux v0.1.2 h1:XtB8kyFOyHXYVFnwT5C3+Bdo8gArse7j2AQ0DA0Uey8=
|
||||
github.com/hashicorp/yamux v0.1.2/go.mod h1:C+zze2n6e/7wshOZep2A70/aQU6QBRWJO/G6FT1wIns=
|
||||
github.com/jackc/pgpassfile v1.0.0 h1:/6Hmqy13Ss2zCq62VdNG8tM1wchn8zjSGOBJ6icpsIM=
|
||||
@@ -140,16 +112,14 @@ github.com/jackc/pgservicefile v0.0.0-20240606120523-5a60cdf6a761 h1:iCEnooe7Ulw
|
||||
github.com/jackc/pgservicefile v0.0.0-20240606120523-5a60cdf6a761/go.mod h1:5TJZWKEWniPve33vlWYSoGYefn3gLQRzjfDlhSJ9ZKM=
|
||||
github.com/jackc/pgx/v5 v5.11.0 h1:IzBBtyK9AHqf98cctWFifYSci2hgQR/cd56wB4p+ogg=
|
||||
github.com/jackc/pgx/v5 v5.11.0/go.mod h1:mal1tBGAFfLHvZzaYh77YS/eC6IX9OWbRV1QIIM0Jn4=
|
||||
github.com/jackc/puddle/v2 v2.2.2 h1:PR8nw+E/1w0GLuRFSmiioY6UooMp6KJv0/61nB7icHo=
|
||||
github.com/jackc/puddle/v2 v2.2.2/go.mod h1:vriiEXHvEE654aYKXXjOvZM39qJ0q+azkZFrfEOc3H4=
|
||||
github.com/jackc/puddle/v2 v2.2.3 h1:f8HoREISb3l5eO9coPgK7U3hKLhWGokOFVcThl5jrao=
|
||||
github.com/jackc/puddle/v2 v2.2.3/go.mod h1:vriiEXHvEE654aYKXXjOvZM39qJ0q+azkZFrfEOc3H4=
|
||||
github.com/jhump/protoreflect v1.17.0 h1:qOEr613fac2lOuTgWN4tPAtLL7fUSbuJL5X5XumQh94=
|
||||
github.com/jhump/protoreflect v1.17.0/go.mod h1:h9+vUUL38jiBzck8ck+6G/aeMX8Z4QUY/NiJPwPNi+8=
|
||||
github.com/kevinburke/ssh_config v1.6.0 h1:J1FBfmuVosPHf5GRdltRLhPJtJpTlMdKTBjRgTaQBFY=
|
||||
github.com/kevinburke/ssh_config v1.6.0/go.mod h1:q2RIzfka+BXARoNexmF9gkxEX7DmvbW9P4hIVx2Kg4M=
|
||||
github.com/klauspost/compress v1.20.0 h1:a3C1ke2ohxFymNlb2HWAHjDeKCI90scRskErZkR0ezA=
|
||||
github.com/klauspost/compress v1.20.0/go.mod h1:LUdAzn7YLVvxLpc7y3V1m40wESHTgc1422pwwBSKYuI=
|
||||
github.com/klauspost/cpuid/v2 v2.4.0 h1:S6Hrbc7+ywsr0r+RLapfGBHfyefhCTwEh3A0tV913Dw=
|
||||
github.com/klauspost/cpuid/v2 v2.4.0/go.mod h1:19jmZ9mjzoF//ddRSUsv0zfBTJWh3QJh9FNxZTMrGxU=
|
||||
github.com/klauspost/compress v1.20.3 h1:zWNoFqq/lSuYQRim3dUXlXeA0IqwuZGicdG5ZTfY5j4=
|
||||
github.com/klauspost/compress v1.20.3/go.mod h1:LUdAzn7YLVvxLpc7y3V1m40wESHTgc1422pwwBSKYuI=
|
||||
github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo=
|
||||
github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE=
|
||||
github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk=
|
||||
@@ -157,120 +127,82 @@ github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=
|
||||
github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=
|
||||
github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY=
|
||||
github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE=
|
||||
github.com/lib/pq v1.10.9 h1:YXG7RB+JIjhP29X+OtkiDnYaXQwpS4JEWq7dtCCRUEw=
|
||||
github.com/lib/pq v1.10.9/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o=
|
||||
github.com/lufia/plan9stats v0.0.0-20260802145828-341c2f0c90b5 h1:eveIIGn4BGM3qknO74omf6HYr30/exH+eVUTuAgwjZ0=
|
||||
github.com/lufia/plan9stats v0.0.0-20260802145828-341c2f0c90b5/go.mod h1:autxFIvghDt3jPTLoqZ9OZ7s9qTGNAWmYCjVFWPX/zg=
|
||||
github.com/magiconair/properties v1.18.12 h1:sT9zQpvTB3B4gzrX0tmZNTEaGyg8Zw55MFYRE32Mr9I=
|
||||
github.com/magiconair/properties v1.18.12/go.mod h1:Dhd985XPs7jluiymwWYZ0G4Z61jb3vdS329zhj2hYo0=
|
||||
github.com/mattn/go-colorable v0.1.9/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc=
|
||||
github.com/mattn/go-colorable v0.1.12/go.mod h1:u5H1YNBxpqRaxsYJYSkiCWKzEfiAb1Gb520KVy5xxl4=
|
||||
github.com/mattn/go-colorable v0.1.14 h1:9A9LHSqF/7dyVVX6g0U9cwm9pG3kP9gSzcuIPHPsaIE=
|
||||
github.com/mattn/go-colorable v0.1.14/go.mod h1:6LmQG8QLFO4G5z1gPvYEzlUgJ2wF+stgPZH1UqBm1s8=
|
||||
github.com/mattn/go-colorable v0.1.16 h1:+2YjeAe7xP1OQbZW1jERPWWCDLlNqFNCvjiqGiAt84A=
|
||||
github.com/mattn/go-colorable v0.1.16/go.mod h1:6LmQG8QLFO4G5z1gPvYEzlUgJ2wF+stgPZH1UqBm1s8=
|
||||
github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU=
|
||||
github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94=
|
||||
github.com/mattn/go-isatty v0.0.24 h1:tGZZoVgT/KiqK1c8ocVLeDS8BSWMRd47J3Lbz7vsReI=
|
||||
github.com/mattn/go-isatty v0.0.24/go.mod h1:nMCL3Zebbrt45jsMDgnfIwz6ydEQApk5oEI3HqDio6A=
|
||||
github.com/mdelapenya/tlscert v0.2.0 h1:7H81W6Z/4weDvZBNOfQte5GpIMo0lGYEeWbkGp5LJHI=
|
||||
github.com/mdelapenya/tlscert v0.2.0/go.mod h1:O4njj3ELLnJjGdkN7M/vIVCpZ+Cf0L6muqOG4tLSl8o=
|
||||
github.com/mfridman/interpolate v0.0.2 h1:pnuTK7MQIxxFz1Gr+rjSIx9u7qVjf5VOoM/u6BbAxPY=
|
||||
github.com/mfridman/interpolate v0.0.2/go.mod h1:p+7uk6oE07mpE/Ik1b8EckO0O4ZXiGAfshKBWLUM9Xg=
|
||||
github.com/minio/highwayhash v1.0.4 h1:asJizugGgchQod2ja9NJlGOWq4s7KsAWr5XUc9Clgl4=
|
||||
github.com/minio/highwayhash v1.0.4/go.mod h1:GGYsuwP/fPD6Y9hMiXuapVvlIUEhFhMTh0rxU3ik1LQ=
|
||||
github.com/moby/docker-image-spec v1.3.1 h1:jMKff3w6PgbfSa69GfNg+zN/XLhfXJGnEx3Nl2EsFP0=
|
||||
github.com/moby/docker-image-spec v1.3.1/go.mod h1:eKmb5VW8vQEh/BAr2yvVNvuiJuY6UIocYsFu/DxxRpo=
|
||||
github.com/moby/go-archive v0.3.3 h1:OxxR9paxsluYi+zDUEXTTaIxtkK3viymW+Ka7vRhhME=
|
||||
github.com/moby/go-archive v0.3.3/go.mod h1:Npdv43fFqlhZW7Xo8fbm3ZMYFvAGNviUPqX21VERbcE=
|
||||
github.com/moby/moby/api v1.56.0 h1:GQzua3NA599ASSIICx0iFgiJeO9YkdDARvQsm23ZZuQ=
|
||||
github.com/moby/moby/api v1.56.0/go.mod h1:sZ+THbVWkjOmBPPfbnzdD/G1LuIexWhqlSHHPTDQ1Uk=
|
||||
github.com/moby/moby/client v0.6.0 h1:AJjEB21QPbXSXjDsZorFBoDZPhMrfbpaPLgSMAW9Bgs=
|
||||
github.com/moby/moby/client v0.6.0/go.mod h1:OCo00wNRyA3m4lmJ228W3JbyCN4ZNNYjpOXiJydBdcQ=
|
||||
github.com/moby/patternmatcher v0.6.1 h1:qlhtafmr6kgMIJjKJMDmMWq7WLkKIo23hsrpR3x084U=
|
||||
github.com/moby/patternmatcher v0.6.1/go.mod h1:hDPoyOpDY7OrrMDLaYoY3hf52gNCR/YOUYxkhApJIxc=
|
||||
github.com/moby/sys/mount v0.3.5 h1:eS3fsZTjHaBihwjp4/+5Z3jxqLXYsbwxqpVSfFv3M00=
|
||||
github.com/moby/sys/mount v0.3.5/go.mod h1:WUQDO+/uCiCIkIztx8SrwIDVn2dtMFRBebRhpDFT71M=
|
||||
github.com/moby/sys/mountinfo v0.7.2 h1:1shs6aH5s4o5H2zQLn796ADW1wMrIwHsyJ2v9KouLrg=
|
||||
github.com/moby/sys/mountinfo v0.7.2/go.mod h1:1YOa8w8Ih7uW0wALDUgT1dTTSBrZ+HiBLGws92L2RU4=
|
||||
github.com/moby/sys/sequential v0.7.0 h1:ASQNGNROJSuOO6LL6bPHbKvuZu6NU8P4ldPWk31zj/8=
|
||||
github.com/moby/sys/sequential v0.7.0/go.mod h1:NfSTAp6V3fw4tmkD62PEcOKeZKquXT8VKCkf7aVR79o=
|
||||
github.com/moby/sys/user v0.4.1 h1:RgjRlaDKi/Xmyrz4t8lyzXT6v2ooFeO/7xtchmhVWE0=
|
||||
github.com/moby/sys/user v0.4.1/go.mod h1:E9QsW5WRe1kUAf7kW8hXKwu1uhsZEAdPLYHYSDudF4Y=
|
||||
github.com/moby/sys/userns v0.2.1 h1:4OvdM7BcPkASbuouHsbW3aeMJSFlYDldBRnXVZhaRk8=
|
||||
github.com/moby/sys/userns v0.2.1/go.mod h1:IHUYgu/kao6N8YZlp9Cf444ySSvCmDlmzUcYfDHOl28=
|
||||
github.com/moby/term v0.5.2 h1:6qk3FJAFDs6i/q3W/pQ97SX192qKfZgGjCQqfCJkgzQ=
|
||||
github.com/moby/term v0.5.2/go.mod h1:d3djjFCrjnB+fl8NJux+EJzu0msscUP+f8it8hPkFLc=
|
||||
github.com/moby/moby/api v1.56.1 h1:PpWkvVPB7Fr/No8w+TfyJ/I6rWZ2YPZhT3JorIg+06c=
|
||||
github.com/moby/moby/api v1.56.1/go.mod h1:sZ+THbVWkjOmBPPfbnzdD/G1LuIexWhqlSHHPTDQ1Uk=
|
||||
github.com/moby/moby/client v0.6.2 h1:ekSPlMccrZGcw6Scb8T9D39qE0mB+XupU/yS0zNw9N4=
|
||||
github.com/moby/moby/client v0.6.2/go.mod h1:DGcnO7qmPJrqobx/ggQgQ/AUk+2wgVdQv7uxB0/mEsc=
|
||||
github.com/modelcontextprotocol/go-sdk v1.8.0 h1:KIvahhYqwtbeniWVPs3TcXEA7b8jEtwfBpOTAI+Urx4=
|
||||
github.com/modelcontextprotocol/go-sdk v1.8.0/go.mod h1:dL7u98E/zjJTGzEq+j30jQ8K2k1mb6LeAH4inEcSGts=
|
||||
github.com/nats-io/jwt/v2 v2.8.2 h1:XXRgB60MSTnqsRwejQurVDs/hcv2dkt+86GjI+I/bMc=
|
||||
github.com/nats-io/jwt/v2 v2.8.2/go.mod h1:Ag/56sq9OblL4JgdYufDd16Egb17Kr/8WwwuO/forVc=
|
||||
github.com/nats-io/nats-server/v2 v2.15.0 h1:M99yf0y05rTr46/qc/Is6ZAowI58Ryp2SjufLCUeVJc=
|
||||
github.com/nats-io/nats-server/v2 v2.15.0/go.mod h1:5qLF4CDGzZVFt//3fUrY1ePpwbi05r7QHPNroSUtolk=
|
||||
github.com/nats-io/nats.go v1.54.0 h1:vsXoOxjHp/GmPUN+EcI7uOf/uB+iAP+kEsAFNQN0yzA=
|
||||
github.com/nats-io/nats.go v1.54.0/go.mod h1:y+DZoD1oBOYfZTU681eTUiUjI0vbqYGixNVFHcjHJ0k=
|
||||
github.com/nats-io/nats-server/v2 v2.15.1 h1:fK3AeYFIji1Smng60jB0hVoAPZezA/UzsaI3BqXFNEI=
|
||||
github.com/nats-io/nats-server/v2 v2.15.1/go.mod h1:yeuYRtKVKIFtmMz2/YPk+6hvmNBnk+WwTUzErBdH6IE=
|
||||
github.com/nats-io/nats.go v1.55.0 h1:Ng8QKHdvdHIWoaiq0+d/aH1BWkxvcJxWJ0Y/9BPKx3M=
|
||||
github.com/nats-io/nats.go v1.55.0/go.mod h1:y+DZoD1oBOYfZTU681eTUiUjI0vbqYGixNVFHcjHJ0k=
|
||||
github.com/nats-io/nkeys v0.4.16 h1:rd5oAuLOb8mnAycB0xleuEBNS1pVVnN0fv/FF34Eypg=
|
||||
github.com/nats-io/nkeys v0.4.16/go.mod h1:llLgWoI0o4z/Q57q2R1kHfmocyhGV6VG/U18Glg1Afs=
|
||||
github.com/nats-io/nuid v1.0.1 h1:5iA8DT8V7q8WK2EScv2padNa/rTESc1KdnPw4TC2paw=
|
||||
github.com/nats-io/nuid v1.0.1/go.mod h1:19wcPz3Ph3q0Jbyiqsd0kePYG7A95tJPxeL+1OSON2c=
|
||||
github.com/ncruces/go-strftime v1.0.0 h1:HMFp8mLCTPp341M/ZnA4qaf7ZlsbTc+miZjCLOFAw7w=
|
||||
github.com/ncruces/go-strftime v1.0.0/go.mod h1:Fwc5htZGVVkseilnfgOVb9mKy6w1naJmn9CehxcKcls=
|
||||
github.com/oklog/run v1.1.0 h1:GEenZ1cK0+q0+wsJew9qUg/DyD8k3JzYsZAi5gYi2mA=
|
||||
github.com/oklog/run v1.1.0/go.mod h1:sVPdnTZT1zYwAJeCMu2Th4T21pA3FPOQRfWjQlk7DVU=
|
||||
github.com/ncruces/go-strftime v1.1.0 h1:vtPmPWMkb539RGV9WpWT9EwJGvrOCKvMNI4obWL47Hk=
|
||||
github.com/ncruces/go-strftime v1.1.0/go.mod h1:yVaq7iwCN09vHRrKBrrflXT0M9tTMG2KmZ9Fj7xeG/g=
|
||||
github.com/oklog/run v1.2.0 h1:O8x3yXwah4A73hJdlrwo/2X6J62gE5qTMusH0dvz60E=
|
||||
github.com/oklog/run v1.2.0/go.mod h1:mgDbKRSwPhJfesJ4PntqFUbKQRZ50NgmZTSPlFA0YFk=
|
||||
github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U=
|
||||
github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM=
|
||||
github.com/opencontainers/image-spec v1.1.1 h1:y0fUlFfIZhPF1W537XOLg0/fcx6zcHCJwooC2xJA040=
|
||||
github.com/opencontainers/image-spec v1.1.1/go.mod h1:qpqAh3Dmcf36wStyyWU+kCeDgrGnAve2nCC8+7h8Q0M=
|
||||
github.com/pjbgf/sha1cd v0.6.0 h1:3WJ8Wz8gvDz29quX1OcEmkAlUg9diU4GxJHqs0/XiwU=
|
||||
github.com/pjbgf/sha1cd v0.6.0/go.mod h1:lhpGlyHLpQZoxMv8HcgXvZEhcGs0PG/vsZnEJ7H0iCM=
|
||||
github.com/philhofer/fwd v1.2.1 h1:UtpS73q8bFgy/yH3gCq8LSNvj5gv/FowNOiWZa7uKwQ=
|
||||
github.com/philhofer/fwd v1.2.1/go.mod h1:RqIHx9QI14HlwKwm98g9Re5prTQ6LdeRQn+gXJFxsJM=
|
||||
github.com/pjbgf/sha1cd v0.7.0 h1:ZRNPKHj+gfkLBf0KJv/p1Hmz+7bqCT5o311YX0nq+DA=
|
||||
github.com/pjbgf/sha1cd v0.7.0/go.mod h1:pKR5Li+qTCo+ebqITZfwPlJGoCFCvSO00qxjbNtTUFQ=
|
||||
github.com/pkg/browser v0.0.0-20240102092130-5ac0b6a4141c h1:+mdjkGKdHQG3305AYmdv1U2eRNDiU2ErMBj1gwrq8eQ=
|
||||
github.com/pkg/browser v0.0.0-20240102092130-5ac0b6a4141c/go.mod h1:7rwL4CYBLnjLxUqIJNnCWiEdr3bn6IUYi15bNlnbCCU=
|
||||
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
|
||||
github.com/power-devops/perfstat v0.0.0-20260916203055-22a1a467d9f0 h1:XA01Vk/wv9YikCi1V51yRzIHPMT5of9+cMpZoZvDn/M=
|
||||
github.com/power-devops/perfstat v0.0.0-20260916203055-22a1a467d9f0/go.mod h1:OmDBASR4679mdNQnz2pUhc2G8CO2JrUAVFDRBDP/hJE=
|
||||
github.com/pressly/goose/v3 v3.28.0 h1:D2M+iL31GmpZxSHOhX8mqyqAT3CXnokUmm0eKoSP+Vc=
|
||||
github.com/pressly/goose/v3 v3.28.0/go.mod h1:v26MOuB8bL3kzzrt3Vqhb3R0PRVsl8hFQKdrht/L6Rk=
|
||||
github.com/pressly/goose/v3 v3.29.0 h1:dtEnBCT7CqkHIUCdgrXsrmeisaN8gFkRU4Y5OEwif4o=
|
||||
github.com/pressly/goose/v3 v3.29.0/go.mod h1:plA4aP4+u+Q3FMTgbFbhF8TuAWpAdfWpoFGkJsIFWh0=
|
||||
github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec h1:W09IVJc94icq4NjY3clb7Lk8O1qJ8BdBEF8z0ibU0rE=
|
||||
github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec/go.mod h1:qqbHyh8v60DhA7CoWK5oRCqLrMHRGoxYCSS9EjAz6Eo=
|
||||
github.com/rogpeppe/go-internal v1.14.1 h1:UQB4HGPB6osV0SQTLymcB4TgvyWu6ZyliaW0tI/otEQ=
|
||||
github.com/rogpeppe/go-internal v1.14.1/go.mod h1:MaRKkUm5W0goXpeCfT7UZI6fk/L7L7so1lCWt35ZSgc=
|
||||
github.com/samcharles93/ai-sdk v0.1.42 h1:YV4O6oV0OLIqDAnEWAotPyw19K1VH2YoAT0He7aW+Lg=
|
||||
github.com/samcharles93/ai-sdk v0.1.42/go.mod h1:u4zrQ9/Q58L5mNEut4bNQ1ks+RCKq71LN5EDz2N/0Zk=
|
||||
github.com/samcharles93/ai-sdk v0.6.0 h1:ANHutwvl/K233Dkflc2vKT48qsXRT1iRwjL5S1Dm+jY=
|
||||
github.com/samcharles93/ai-sdk v0.6.0/go.mod h1:NNkiUZ2qfezDHhmF8zHibKsPgpU8b5jphDQ0n2t1KL0=
|
||||
github.com/segmentio/asm v1.2.1 h1:DTNbBqs57ioxAD4PrArqftgypG4/qNpXoJx8TVXxPR0=
|
||||
github.com/segmentio/asm v1.2.1/go.mod h1:BqMnlJP91P8d+4ibuonYZw9mfnzI9HfxselHZr5aAcs=
|
||||
github.com/segmentio/encoding v0.5.4 h1:OW1VRern8Nw6ITAtwSZ7Idrl3MXCFwXHPgqESYfvNt0=
|
||||
github.com/segmentio/encoding v0.5.4/go.mod h1:HS1ZKa3kSN32ZHVZ7ZLPLXWvOVIiZtyJnO1gPH1sKt0=
|
||||
github.com/sergi/go-diff v1.4.0 h1:n/SP9D5ad1fORl+llWyN+D6qoUETXNZARKjyY2/KVCw=
|
||||
github.com/sergi/go-diff v1.4.0/go.mod h1:A0bzQcvG0E7Rwjx0REVgAGH58e96+X0MeOfepqsbeW4=
|
||||
github.com/sethvargo/go-retry v0.4.0 h1:9qy1OoIAxBL+gBYnkTnTnWle5wlfsXQlwRzIbbpdqPw=
|
||||
github.com/sethvargo/go-retry v0.4.0/go.mod h1:tvsjdKG6xfiCx4LSiUZ06kcv38xvdVQwv8R6/VnnVWg=
|
||||
github.com/shirou/gopsutil/v4 v4.26.8 h1:YQMTF/1J50B5+Y0vlo1eDRf5DoR7Gk69hY+8wjYkQeo=
|
||||
github.com/shirou/gopsutil/v4 v4.26.8/go.mod h1:5O9FjBiXoTDFatIWjZZosqj4pV0DRtLx598xGbBehzM=
|
||||
github.com/sethvargo/go-retry v0.5.0 h1:JYfFKmVJ8ER06GReN1efzc5cm52BrVsFVzmcHiKJwfY=
|
||||
github.com/sethvargo/go-retry v0.5.0/go.mod h1:tvsjdKG6xfiCx4LSiUZ06kcv38xvdVQwv8R6/VnnVWg=
|
||||
github.com/sirupsen/logrus v1.10.2 h1:G2SED73/qrAu6YwbdxOD6peLkCBI3z7L+ykJFTXJBBo=
|
||||
github.com/sirupsen/logrus v1.10.2/go.mod h1:SLEg8TqYulVKKfIGHldVp2K2aYz2DKSVBq4g/H5bR7Q=
|
||||
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
|
||||
github.com/stretchr/objx v0.5.3 h1:jmXUvGomnU1o3W/V5h2VEradbpJDwGrzugQQvL0POH4=
|
||||
github.com/stretchr/objx v0.5.3/go.mod h1:rDQraq+vQZU7Fde9LOZLr8Tax6zZvy4kuNKF+QYS+U0=
|
||||
github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
|
||||
github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4=
|
||||
github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
|
||||
github.com/stretchr/testify v1.7.2/go.mod h1:R6va5+xMeoiuVRoj+gSkQ7d3FALtqAAGI1FQKckRals=
|
||||
github.com/stretchr/testify v1.12.1 h1:EuwCh5fleGS7H32xRwO3wRGT7DxrDhLAT6FF8MpWDWE=
|
||||
github.com/stretchr/testify v1.12.1/go.mod h1:MDEgiDPPsNp5cuIrHPPCyornHKgEVbtFUmoNlxoYthg=
|
||||
github.com/testcontainers/testcontainers-go v0.44.0 h1:/Fwh6HY1mIikhnm9e7HwoxGycx0lzRAE0f5VQpjFxzI=
|
||||
github.com/testcontainers/testcontainers-go v0.44.0/go.mod h1:IcnwQrYTO86xHXu5bvMaBH7ATlbS3Qn1M1QWW3c66rE=
|
||||
github.com/testcontainers/testcontainers-go/modules/postgres v0.44.0 h1:8fdv/9y3JMxjQ+ULAcOG8RtgeNu5t9XF9LolSXDuTwM=
|
||||
github.com/testcontainers/testcontainers-go/modules/postgres v0.44.0/go.mod h1:CFr2LncGYokw+OKjXcr8ARCKG1SaC2UEnGxFBovE86g=
|
||||
github.com/tklauser/go-sysconf v0.4.0 h1:7H0uAN+7RkwWRaxhYXDLqa5V3LPrJeV8wmD9dRUgPQU=
|
||||
github.com/tklauser/go-sysconf v0.4.0/go.mod h1:8mTNWyog7H+MpKijp4VmKJAd2bbYQ2zuUwkYRbUArPI=
|
||||
github.com/tklauser/numcpus v0.12.0 h1:NR85qdvHA9pFse3x3weVZ0r0ST8R6l5RHbZrlRaqob4=
|
||||
github.com/tklauser/numcpus v0.12.0/go.mod h1:ABHeXzJnr/qqwguhClkZKT1/8VABcYrsyUiUGobwWJg=
|
||||
github.com/ulikunitz/xz v0.5.15 h1:9DNdB5s+SgV3bQ2ApL10xRc35ck0DuIX/isZvIk+ubY=
|
||||
github.com/ulikunitz/xz v0.5.15/go.mod h1:nbz6k7qbPmH4IRqmfOplQw/tblSgqTqBwxkY0oWt/14=
|
||||
github.com/tinylib/msgp v1.6.5 h1:iAH6XTP7BpzErjBZlujJQXxA+GmRi2YWs6M4KdLtNbE=
|
||||
github.com/tinylib/msgp v1.6.5/go.mod h1:RSp0LW9oSxFut3KzESt5Voq4GVWyS+PSulT77roAqEA=
|
||||
github.com/x448/float16 v0.8.4 h1:qLwI1I70+NjRFUR3zs1JPUCgaCXSh3SW62uAKT1mSBM=
|
||||
github.com/x448/float16 v0.8.4/go.mod h1:14CWIYCyZA/cWjXOioeEpHeN/83MdbZDRQHoFcYsOfg=
|
||||
github.com/yosida95/uritemplate/v3 v3.0.2 h1:Ed3Oyj9yrmi9087+NczuL5BwkIc4wvTb5zIM+UJPGz4=
|
||||
github.com/yosida95/uritemplate/v3 v3.0.2/go.mod h1:ILOh0sOhIJR3+L/8afwt/kE++YT040gmv5BQTMR2HP4=
|
||||
github.com/yusufpapurcu/wmi v1.2.4 h1:zFUKzehAFReQwLys1b/iSMl+JQGSCSjtVqQn9bBrPo0=
|
||||
github.com/yusufpapurcu/wmi v1.2.4/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQmPyzfmi0=
|
||||
gitlab.com/gitlab-org/api/client-go v1.46.0 h1:YxBWFZIFYKcGESCb9fpkwzouo+apyB9pr/XTWzNoL24=
|
||||
gitlab.com/gitlab-org/api/client-go v1.46.0/go.mod h1:FtgyU6g2HS5+fMhw6nLK96GBEEBx5MzntOiJWfIaiN8=
|
||||
go.lsp.dev/jsonrpc2 v1.0.1 h1:JZAchpm6RcOuwEOnZ7kF3kA1EpEjdJZ/6rMSfOF3+F4=
|
||||
go.lsp.dev/jsonrpc2 v1.0.1/go.mod h1:WN+TesqrPumBmUdsuWyn9DHq3zl4i85L/qG0NLdj8qg=
|
||||
go.lsp.dev/protocol v1.0.1 h1:kLWUIk1v/deXxo1D0VO4avjZnfeuZ82mouJgJd/NbdU=
|
||||
@@ -279,74 +211,73 @@ go.lsp.dev/uri v1.0.1 h1:ywxJN1UXoQ+v0I9lkoQNMmsm7lub5G9ZG7KXT8YTx30=
|
||||
go.lsp.dev/uri v1.0.1/go.mod h1:06a0ghafs4PuqkLsJGUmlgPHw6+kH79edRXjOT/rA8s=
|
||||
go.opentelemetry.io/auto/sdk v1.2.1 h1:jXsnJ4Lmnqd11kwkBV2LgLoFMZKizbCi5fNZ/ipaZ64=
|
||||
go.opentelemetry.io/auto/sdk v1.2.1/go.mod h1:KRTj+aOaElaLi+wW1kO/DZRXwkF4C5xPbEe3ZiIhN7Y=
|
||||
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.71.0 h1:3g7B90UzBltIDKq1/5mrTGxTnOFDV0ICOhLoxiZ8jlg=
|
||||
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.71.0/go.mod h1:Ef8SuTh59BT7+ofpDxN9z+yOlc4t2GjLmKDgYNJL/NU=
|
||||
go.opentelemetry.io/otel v1.46.0 h1:FHt5/CDyVxi/8IM1CH7VE/rRgq3kLHa2mSTVMO8AWyc=
|
||||
go.opentelemetry.io/otel v1.46.0/go.mod h1:Gj3SEScelsNC45tp4nSxRYlS+f5iez7W8XPMCt905kE=
|
||||
go.opentelemetry.io/otel/metric v1.46.0 h1:yBnkXvgV7AXFILZc5K6IZe/CBFF3OS7BJ8ov6/lj0K8=
|
||||
go.opentelemetry.io/otel/metric v1.46.0/go.mod h1:iPmdWqifKUdzziPkvvzIJXITl56fQx2mGM/DHLB3/2o=
|
||||
go.opentelemetry.io/otel/sdk v1.46.0 h1:h5CNQQjEbuQXY/JfZtgt3i7HVFV3aHPO2OAwO2eTYPI=
|
||||
go.opentelemetry.io/otel/sdk v1.46.0/go.mod h1:GAERFXFt5SYCEB+YiKUbMBeza6UaDH7GmGOZEfh2gSM=
|
||||
go.opentelemetry.io/otel/sdk/metric v1.46.0 h1:0piZ26EG4RBfebb2jhDH6ERCYHoVWduc3kLgPCwSnSE=
|
||||
go.opentelemetry.io/otel/sdk/metric v1.46.0/go.mod h1:I1PbKrdVc8Qu8HYVDNtqVIwLwjNrhsV/uFuxfwg8mO4=
|
||||
go.opentelemetry.io/otel/trace v1.46.0 h1:OULy7ccdJnZtJ0UDYFOIGaCmiWzJ8Vi2G/Rsu60qs1c=
|
||||
go.opentelemetry.io/otel/trace v1.46.0/go.mod h1:J7GAXweO77XSFkB/rmAqk9D6ihszhFjLU+d9WuUxDLI=
|
||||
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.72.0 h1:Tq+E65HaNbZTeqcLw6QUhsV+/EIWdkfUH2CQzcrlE5M=
|
||||
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.72.0/go.mod h1:A+EVhDakAj1waJBPhmTszZaSr08ww8MRRKy1nB1rqck=
|
||||
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.72.0 h1:LxwW/9ctSCv+QkE/cLR7M91ZIkXNMqJtEMi1vCw9U8s=
|
||||
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.72.0/go.mod h1:tOsftB4SslBwwErVEPaenU2RpThXWPIU8DoJHEC4dyw=
|
||||
go.opentelemetry.io/otel v1.47.0 h1:j7ALJ/zgkS7Z6aeJW09p8VC9804bC+PpeTfCD4XPnOM=
|
||||
go.opentelemetry.io/otel v1.47.0/go.mod h1:8wS9O2qfXrYrzp6hIF/HOYJJf/wIhFPhR2xLuP+iXQU=
|
||||
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.47.0 h1:julhjPeUH/q/7hinbSdDdqt5h7Zw9YWmRlWRhI0jd54=
|
||||
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.47.0/go.mod h1:Ao2mz688LH/tFf0yMAenidq6k2YNSx6SIY2q6jDACck=
|
||||
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.47.0 h1:UFpxOpYPmMNUtOWhdb+nC1WELIgVf8z9higURrbzYU4=
|
||||
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.47.0/go.mod h1:YBGjxe3lt0jtXoEXxGrGhv/jM7oUBUDVK7zhAvNyEjc=
|
||||
go.opentelemetry.io/otel/log v1.47.0 h1:cOTS1CcLbSQeZKanGJ+0JpF/+t4PELi3O3bbl2lqCcI=
|
||||
go.opentelemetry.io/otel/log v1.47.0/go.mod h1:9byitSQ5pLC6PpqwGXjqdMKya6ZTswHRZh2vvXT33nw=
|
||||
go.opentelemetry.io/otel/metric v1.47.0 h1:4PptaldXx3Eat1XjMZ68pPJEs5wrhlemctZE9a3UdWY=
|
||||
go.opentelemetry.io/otel/metric v1.47.0/go.mod h1:ADGSXxRrXM6bjbvLo535EstVFlPpPYZm4LBKixjDHwU=
|
||||
go.opentelemetry.io/otel/sdk v1.47.0 h1:zWXEr4j2lFefG87TU6Yg8a7ngfohIKFZHKp0Hf5hC6I=
|
||||
go.opentelemetry.io/otel/sdk v1.47.0/go.mod h1:VUc24kiOeoGsxG8G9ULx3fWKvB7jMhnGE8Oi607lgR0=
|
||||
go.opentelemetry.io/otel/sdk/metric v1.47.0 h1:lfISg2j93VT6yqdk9OfUaZmw/GfcZqCCV3jdXtsPnKw=
|
||||
go.opentelemetry.io/otel/sdk/metric v1.47.0/go.mod h1:ypLp+mW1Nt2x+Szt3b5/i1syodyts49lMOwxpDI3VGw=
|
||||
go.opentelemetry.io/otel/trace v1.47.0 h1:JOjX/Oci8K94QHddo+bbfya/Ai/nf6/dt9ZfrFNWSrM=
|
||||
go.opentelemetry.io/otel/trace v1.47.0/go.mod h1:jNaSLa2PZEYFG6fRjJABAu+bw4FS08uDmPg28lTghu0=
|
||||
go.opentelemetry.io/proto/otlp v1.11.1 h1:SCrPqH9NE5CmBrOqpjNCiT0X5mGwMyGERXdogfR7Yjw=
|
||||
go.opentelemetry.io/proto/otlp v1.11.1/go.mod h1:wq8W4aSf6bOy8RZyESOeQFr9Pu7wydWX/TY4sgvrTPg=
|
||||
go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto=
|
||||
go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE=
|
||||
go.uber.org/mock v0.6.0 h1:hyF9dfmbgIX5EfOdasqLsWD6xqpNZlXblLB/Dbnwv3Y=
|
||||
go.uber.org/mock v0.6.0/go.mod h1:KiVJ4BqZJaMj4svdfmHM0AUx4NJYO8ZNpPnZn1Z+BBU=
|
||||
go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0=
|
||||
go.uber.org/multierr v1.11.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y=
|
||||
go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw=
|
||||
go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg=
|
||||
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
|
||||
golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
|
||||
golang.org/x/crypto v0.0.0-20210513164829-c07d793c2f9a/go.mod h1:P+XmwS30IXTQdn5tA2iutPOUgjI07+tq3H3K9MVA1s8=
|
||||
golang.org/x/crypto v0.57.0 h1:3ZVCjf8Ggz7zneR/EHRVx68Ctf+2pmIMP2UFhh9cC6M=
|
||||
golang.org/x/crypto v0.57.0/go.mod h1:Fdz0i5U6CoizGwLda9DttjSk6qlZo25zYNtR+ycvuZA=
|
||||
golang.org/x/exp v0.0.0-20260908205506-85c1c2202aba h1:Ck8QetSgk912qxWLMCKxd0in+aiyBQyDSMae6e/xmpU=
|
||||
golang.org/x/exp v0.0.0-20260908205506-85c1c2202aba/go.mod h1:50RgIsmK7OwqzTTeqcSXQW8SswW0o8fRcDxmqGluJ8E=
|
||||
golang.org/x/mod v0.41.0 h1:qJmnOUb4YB+FsEuM3HcWucdZASCPGhsX6uljO6pog0c=
|
||||
golang.org/x/mod v0.41.0/go.mod h1:Ek9pY8RKWXwsWvd3rQiHYtMqkjSUV+s1Rj7j4H5Ur6o=
|
||||
golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
|
||||
golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=
|
||||
golang.org/x/net v0.59.0 h1:5zfYln+w5XCxwrnMMJPufRgNoXEaGxl0wo5GqPXyues=
|
||||
golang.org/x/net v0.59.0/go.mod h1:2DA/G1UfVbCpQPeWTmMPGY7Cs2PkBkwu743bVX5PIVg=
|
||||
golang.org/x/crypto v0.58.0 h1:COkYLr4k7nDI4r6QtMML2AfzeIswWHAJthLS6K/M/54=
|
||||
golang.org/x/crypto v0.58.0/go.mod h1:Xh+kl5A+M0gMiWDytH2Hhr5Z7WbNCpv/eB/EFgfSk+w=
|
||||
golang.org/x/exp v0.0.0-20261014143641-f0251eb4aa3e h1:HgI6W1OolKK6tcV74is+rl9SMT0njsHlp0TbQiGXI/A=
|
||||
golang.org/x/exp v0.0.0-20261014143641-f0251eb4aa3e/go.mod h1:DBoxwWhjaW8DJJw/YeM4zpeOKMC1FMXSblsYy+1mFSw=
|
||||
golang.org/x/mod v0.42.0 h1:ICeL3t2L30ljSPHHxDnR4fqVcBt/zR2zJAb9juavmQg=
|
||||
golang.org/x/mod v0.42.0/go.mod h1:u5fzIrRInkL8MaO1cbRkUHT64v303YIT5KEqpNr7jRs=
|
||||
golang.org/x/net v0.62.0 h1:18ELalfM5+XNRwzM2nYqXsZQ9ByS1uhj2O/U7+5jqRY=
|
||||
golang.org/x/net v0.62.0/go.mod h1:WgDCOTH8iwtB66T4/GfI94AHo/hhdb7Hah9NDseQfiI=
|
||||
golang.org/x/oauth2 v0.37.0 h1:JUlcxA8oAtauLfiH8FX2/FkAWHAdi0QtGCGc+hofE98=
|
||||
golang.org/x/oauth2 v0.37.0/go.mod h1:IxwZNxUULJmpBFf9K/9NTMSIfZZuvuTy1gGxhigP/58=
|
||||
golang.org/x/sync v0.23.0 h1:KameEIfc1IkluZyXWLn39Wd4tURc6GbCiISGiZm2bQk=
|
||||
golang.org/x/sync v0.23.0/go.mod h1:sUUOizhqBxiL6pEWpqNLUiaJn1ShEbZ6BBqskPbjZm0=
|
||||
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20190916202348-b4ddaad3f8a3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sync v0.24.0 h1:iqiDrGoDgyuvAKrhLQthUEzU/R378N78gXbBjxed7oA=
|
||||
golang.org/x/sync v0.24.0/go.mod h1:sUUOizhqBxiL6pEWpqNLUiaJn1ShEbZ6BBqskPbjZm0=
|
||||
golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20201204225414-ed752295db88/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20220412211240-33da011f77ad/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20220503163025-988cb79eb6c6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.21.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
|
||||
golang.org/x/sys v0.48.0 h1:bbX/i/6MgT9BVLM9RT1thmxL04yeTAhbEz4SyadbXoo=
|
||||
golang.org/x/sys v0.48.0/go.mod h1:hNLxWAXmnKAxqDtdwIYC4bM9oQPEecfsnNMuSxOs3og=
|
||||
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
|
||||
golang.org/x/term v0.46.0 h1:3+OXuTbaKDgwk8jTi3aSLHRlmWqHEUDUtxnbFigO4YE=
|
||||
golang.org/x/term v0.46.0/go.mod h1:+K02xbkittuwc0Am4abfA3Fc+XRGXkvBXNO88NCXPoc=
|
||||
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
|
||||
golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
|
||||
golang.org/x/text v0.42.0 h1:JbOZXgfeCPU9gacVtYliJqOhD+zhrEqK4LfdpmlUZqI=
|
||||
golang.org/x/text v0.42.0/go.mod h1:ojzP1Z+2QtioaF8DTtO8K5q7JWVVYwZKenzujK0Zd0E=
|
||||
golang.org/x/sys v0.49.0 h1:XbzkgYJHdqh/8m2Uu0W/dQv8nktxx4BFHp1M0gROTXA=
|
||||
golang.org/x/sys v0.49.0/go.mod h1:hNLxWAXmnKAxqDtdwIYC4bM9oQPEecfsnNMuSxOs3og=
|
||||
golang.org/x/term v0.47.0 h1:cpyOwQkr2Nzxe2p6KnrTG7Ei2wtzjsuSjhpXXepZ/BM=
|
||||
golang.org/x/term v0.47.0/go.mod h1:efAfAuG6RKABvg1ArGebRkvX6LXul14SM67o2e4mUCY=
|
||||
golang.org/x/text v0.43.0 h1:1QivrlhwAsnMOcqgOdl9my7s9OyZl8O5/UGUTJVXoWc=
|
||||
golang.org/x/text v0.43.0/go.mod h1:hbSIYA/amXcRXTFSZqh8tWHEoqRvvbKPJ2uz/KU+a+s=
|
||||
golang.org/x/time v0.16.0 h1:vMb6ptszcQMkcwiRTAuNNU50gom6++Q/6gY2hDM6VDE=
|
||||
golang.org/x/time v0.16.0/go.mod h1:rVKOqvZeKvrDKTQiAHJ7wmwP0RzleSphoEA9RcdLA0s=
|
||||
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
|
||||
golang.org/x/tools v0.50.0 h1:c2ifzfcuY7L90lZ2aKd8S4K2NpASF08SZx9ZuJkHmSU=
|
||||
golang.org/x/tools v0.50.0/go.mod h1:7ulVMw3831Mwi5EZD6RomGyffr4VFjuNYXf2BbCEAV0=
|
||||
golang.org/x/tools v0.52.0 h1:ryxg4U63oaUYk7uOLTF37n43f4qgtGvqV4Ioit1BaEs=
|
||||
golang.org/x/tools v0.52.0/go.mod h1:ItcP5UNaVGG+Yc4eIYmaFLNJ4soEopkx5Y2d4lcEurs=
|
||||
gonum.org/v1/gonum v0.17.0 h1:VbpOemQlsSMrYmn7T2OUvQ4dqxQXU+ouZFQsZOx50z4=
|
||||
gonum.org/v1/gonum v0.17.0/go.mod h1:El3tOrEuMpv2UdMrbNlKEh9vd86bmQ6vqIcDwxEOc1E=
|
||||
google.golang.org/genproto/googleapis/api v0.0.0-20260921155816-b14227669459 h1:GS9OIt/j7c8bvBjYNgnKQysVfmV7e4jM0H8ZK95G4t8=
|
||||
google.golang.org/genproto/googleapis/api v0.0.0-20260921155816-b14227669459/go.mod h1:PX5/4vemwVoXtwEcRDWwcR1/r0qrosfx3qoVADMwnVE=
|
||||
google.golang.org/genproto/googleapis/rpc v0.0.0-20260921155816-b14227669459 h1:b0xCahf3FK2m2Cv0p4vTozGPWncCvLfwV86UNg8xWU8=
|
||||
google.golang.org/genproto/googleapis/rpc v0.0.0-20260921155816-b14227669459/go.mod h1:OaIUM3+LpYcK2GXM4FTmhWoIq371Owdr+Cc7/BsYHHc=
|
||||
google.golang.org/grpc v1.85.0-dev.0.20260825072537-93e31b48545e h1:ar+feAPij1Znzug45m6AoShUCc5AaR8FLA3I6LZd94k=
|
||||
google.golang.org/grpc v1.85.0-dev.0.20260825072537-93e31b48545e/go.mod h1:7aY/KlAHanMAVIWHnk8wloQsdlfwzDz/PP9vCbJG6CU=
|
||||
google.golang.org/genproto/googleapis/api v0.0.0-20261019180522-ce908d29299b h1:nB3spRIaSPtxJpxb0k41yljROvm2Jrwfs2pSNdKS5y8=
|
||||
google.golang.org/genproto/googleapis/api v0.0.0-20261019180522-ce908d29299b/go.mod h1:9N4vtjEwvgQKEdlFVQO0M44ErhecQ9DCSQfGoZ51M6w=
|
||||
google.golang.org/genproto/googleapis/rpc v0.0.0-20261019180522-ce908d29299b h1:6WNWHZk91dp4gZ25642OALkuG1UVNZbwENJD19DnB8k=
|
||||
google.golang.org/genproto/googleapis/rpc v0.0.0-20261019180522-ce908d29299b/go.mod h1:OaIUM3+LpYcK2GXM4FTmhWoIq371Owdr+Cc7/BsYHHc=
|
||||
google.golang.org/grpc v1.86.0-dev h1:FLq7hcApuJeJ70J9+k0FvmXsNCwS8B2/MeAfYdy3GHY=
|
||||
google.golang.org/grpc v1.86.0-dev/go.mod h1:Ovl0ECo4xx5r4kn/6d4BPSNB7OIFuu6EAjOzjtVAKaM=
|
||||
google.golang.org/protobuf v1.36.12 h1:pJOKDDOyeXErUroCihFAd5LQuwXBSpVnKGrj5o/fwxc=
|
||||
google.golang.org/protobuf v1.36.12/go.mod h1:HTf+CrKn2C3g5S8VImy6tdcUvCska2kB7j23XfzDpco=
|
||||
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
||||
@@ -360,15 +291,15 @@ gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
|
||||
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
|
||||
gotest.tools/v3 v3.5.2 h1:7koQfIKdy+I8UTetycgUqXWSDwpgv193Ka+qRsmBY8Q=
|
||||
gotest.tools/v3 v3.5.2/go.mod h1:LtdLGcnqToBH83WByAAi/wiwSFCArdFIUV/xxN4pcjA=
|
||||
modernc.org/libc v1.77.1 h1:Ct8j47QtiZ1Enj2DtFXQtUqrPCAjdCmPjtCuvrYQ0Hs=
|
||||
modernc.org/libc v1.77.1/go.mod h1:87/pZ4L6nD1zqW4nItuS12YO7hN1igAah34xjnQo/W0=
|
||||
modernc.org/libc v1.78.0 h1:Lpm+e9K6ruVYEGwWfuBO1xXtYEaXDouFOG1SuWjFDP4=
|
||||
modernc.org/libc v1.78.0/go.mod h1:wvxR55nOF2/66NkJoNV7/coXBTCvT3HR22rcqW6lOuA=
|
||||
modernc.org/mathutil v1.7.1 h1:GCZVGXdaN8gTqB1Mf/usp1Y/hSqgI2vAGGP4jZMCxOU=
|
||||
modernc.org/mathutil v1.7.1/go.mod h1:4p5IwJITfppl0G4sUEDtCr4DthTaT47/N3aT6MhfgJg=
|
||||
modernc.org/memory v1.12.1 h1:nFMiWrpStgZczNl6XI9GnIk/rWhYIyHGUaR04pGbp9g=
|
||||
modernc.org/memory v1.12.1/go.mod h1:/JP4VbVC+K5sU2wZi9bHoq2MAkCnrt2r98UGeSK7Mjw=
|
||||
modernc.org/sqlite v1.59.0 h1:X1es1GpqBlS/5T+vbM4HLUdaa8OtQx468DF2vrx+38A=
|
||||
modernc.org/sqlite v1.59.0/go.mod h1:+paeT2A3iPRHkQDwG7oA6Tk0zQd5woMEI8q7orfry8k=
|
||||
oras.land/oras-go/v2 v2.6.2 h1:N04RXngAp1LJKTG6ifz3xHPipasEkWr+hFmInja5YKo=
|
||||
oras.land/oras-go/v2 v2.6.2/go.mod h1:PlTtg4JTDJkDe8yVHpM2wz7/YDc00GVas+i4jAW2TZ4=
|
||||
modernc.org/sqlite v1.60.1 h1:/blz53O951KWFOso4QQvEs/Fq6cDBKLtMVrYNSeJVKw=
|
||||
modernc.org/sqlite v1.60.1/go.mod h1:1dIoEagfDE72QytD5scH1lxARtaUgKgHC/NuApA27r0=
|
||||
oras.land/oras-go/v2 v2.7.0 h1:0bXRBBSqYgPSjZRrhJbT71Rb465c+rdlft2xdQPxLtQ=
|
||||
oras.land/oras-go/v2 v2.7.0/go.mod h1:imXEFiYkTZUVVYkfv/r5GVmWeiLkGtNQA8FU4F/sjKs=
|
||||
pgregory.net/rapid v1.2.0 h1:keKAYRcjm+e1F0oAuU5F5+YPAWcyxNNRK2wud503Gnk=
|
||||
pgregory.net/rapid v1.2.0/go.mod h1:PY5XlDGj0+V1FCq0o192FdRhpKHGTRIWBgqjDBTrq04=
|
||||
+188
-64
@@ -1,25 +1,33 @@
|
||||
#!/usr/bin/env bash
|
||||
# install.sh - installs Archie Core for the current user.
|
||||
#
|
||||
# curl -fsSL https://raw.githubusercontent.com/samcharles93/archie-core/main/install.sh | bash
|
||||
# curl -fsSL https://offloaded.dev/install.sh | bash
|
||||
#
|
||||
# Downloads the latest release, verifies it against SHA256SUMS, installs the
|
||||
# Downloads a release from its OCI registry, verifies the release key signed
|
||||
# it and that the zip is the one signed, installs the
|
||||
# five services to ${XDG_BIN_HOME:-~/.local/bin}, runs `archied setup`, starts
|
||||
# the bundled PostgreSQL and installs systemd user units.
|
||||
# Config: ${XDG_CONFIG_HOME:-~/.config}/archie Data: ${XDG_DATA_HOME:-~/.local/share}/archie
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
REPO="samcharles93/archie-core"
|
||||
MODULE="github.com/samcharles93/archie-core"
|
||||
SOURCE_GIT="https://git.catlow.cloud/sam/archie.git"
|
||||
# Where releases come from: an OCI repository and the base64 ed25519 key that
|
||||
# must have signed them. A self-hosted source sets both.
|
||||
DEFAULT_RELEASES="git.catlow.cloud/sam/archie"
|
||||
DEFAULT_RELEASE_KEY="gIBqoQMwy+8WXmGfiuHtnUa50W0IqfzkTR6iF5q3dSM="
|
||||
ARCHIE_RELEASES="${ARCHIE_RELEASES:-${DEFAULT_RELEASES}}"
|
||||
ARCHIE_RELEASE_KEY="${ARCHIE_RELEASE_KEY:-${DEFAULT_RELEASE_KEY}}"
|
||||
ARCHIE_CHANNEL="${ARCHIE_CHANNEL:-stable}"
|
||||
|
||||
XDG_CONFIG_HOME="${XDG_CONFIG_HOME:-${HOME}/.config}"
|
||||
XDG_DATA_HOME="${XDG_DATA_HOME:-${HOME}/.local/share}"
|
||||
XDG_BIN_HOME="${XDG_BIN_HOME:-${HOME}/.local/bin}"
|
||||
|
||||
ARCHIE_CONFIG_DIR="${XDG_CONFIG_HOME}/archie"
|
||||
ARCHIE_DATA_DIR="${XDG_DATA_HOME}/archie"
|
||||
ARCHIE_BIN_DIR="${XDG_BIN_HOME}"
|
||||
ENV_FILE="${ARCHIE_CONFIG_DIR}/env"
|
||||
INSTANCE=archie
|
||||
PORT_BASE=""
|
||||
|
||||
INSTALL_SYSTEMD=true
|
||||
ENABLE_LINGER=true
|
||||
@@ -33,12 +41,21 @@ if (: </dev/tty) 2>/dev/null; then INTERACTIVE=true; fi
|
||||
usage() {
|
||||
cat <<EOF
|
||||
Usage: install.sh [options]
|
||||
or: curl -fsSL https://raw.githubusercontent.com/${REPO}/main/install.sh | bash -s -- [options]
|
||||
or: curl -fsSL https://offloaded.dev/install.sh | bash -s -- [options]
|
||||
|
||||
Environment:
|
||||
ARCHIE_RELEASES OCI repository to install from (default ${DEFAULT_RELEASES})
|
||||
ARCHIE_RELEASE_KEY base64 ed25519 key that source signs with
|
||||
ARCHIE_CHANNEL stable (default) or next
|
||||
|
||||
Options:
|
||||
--version X.Y.Z Install this release instead of the latest
|
||||
--from-source Build from a checkout (this one, or a fresh clone) instead
|
||||
of a release; needs Go, git and jq
|
||||
--instance NAME Install a named instance beside others: archie (default)
|
||||
or archie-X; its dirs are <xdg>/NAME and its units end in -X
|
||||
--port-base N Use ports N..N+6 for web, health, gateway, state store,
|
||||
state store readiness, messaging and daemon
|
||||
--no-systemd Skip systemd user units
|
||||
--no-linger Skip loginctl enable-linger
|
||||
--no-start Install the units but do not start them
|
||||
@@ -51,6 +68,8 @@ VERSION=""
|
||||
while [ $# -gt 0 ]; do
|
||||
case "$1" in
|
||||
--version) VERSION="${2:?--version needs a value}"; shift ;;
|
||||
--instance) INSTANCE="${2:?--instance needs a value}"; shift ;;
|
||||
--port-base) PORT_BASE="${2:?--port-base needs a value}"; shift ;;
|
||||
--from-source) FROM_SOURCE=true ;;
|
||||
--no-systemd) INSTALL_SYSTEMD=false; AUTO_START=false ;;
|
||||
--no-linger) ENABLE_LINGER=false ;;
|
||||
@@ -62,12 +81,86 @@ while [ $# -gt 0 ]; do
|
||||
shift
|
||||
done
|
||||
|
||||
if ! [[ "${INSTANCE}" =~ ^archie(-[a-z0-9][a-z0-9-]{0,23})?$ ]]; then
|
||||
echo "Error: --instance '${INSTANCE}' must be archie or archie-<name>, e.g. archie-dev" >&2; exit 1
|
||||
fi
|
||||
if [ -n "${PORT_BASE}" ] && ! { [[ "${PORT_BASE}" =~ ^[0-9]+$ ]] && [ "${PORT_BASE}" -ge 1024 ] && [ "${PORT_BASE}" -le 65529 ]; }; then
|
||||
echo "Error: --port-base must be a number from 1024 to 65529" >&2; exit 1
|
||||
fi
|
||||
export ARCHIE_INSTANCE="${INSTANCE}"
|
||||
ARCHIE_CONFIG_DIR="${XDG_CONFIG_HOME}/${INSTANCE}"
|
||||
ARCHIE_DATA_DIR="${XDG_DATA_HOME}/${INSTANCE}"
|
||||
ENV_FILE="${ARCHIE_CONFIG_DIR}/env"
|
||||
|
||||
# unit maps a base unit name to this instance's: unchanged for the default
|
||||
# instance, suffixed with the name after archie- otherwise.
|
||||
unit() {
|
||||
if [ "${INSTANCE}" = archie ]; then echo "$1"; else echo "$1-${INSTANCE#archie-}"; fi
|
||||
}
|
||||
U_DAEMON="$(unit archied)"
|
||||
U_STATE="$(unit archie-state-store)"
|
||||
U_GATEWAY="$(unit archie-gateway)"
|
||||
U_UI="$(unit archie-ui)"
|
||||
U_MESSAGING="$(unit archie-messaging)"
|
||||
|
||||
# Ports in --port-base order; without it, today's defaults.
|
||||
if [ -n "${PORT_BASE}" ]; then
|
||||
P_WEB=${PORT_BASE}; P_HEALTH=$((PORT_BASE + 1)); P_GATEWAY=$((PORT_BASE + 2))
|
||||
P_STATE=$((PORT_BASE + 3)); P_READY=$((PORT_BASE + 4)); P_MESSAGING=$((PORT_BASE + 5)); P_DAEMON=$((PORT_BASE + 6))
|
||||
else
|
||||
P_WEB=8484; P_HEALTH=8485; P_GATEWAY=8585; P_STATE=9090; P_READY=9091; P_MESSAGING=8586; P_DAEMON=8587
|
||||
fi
|
||||
|
||||
need() {
|
||||
for cmd in "$@"; do
|
||||
command -v "$cmd" &>/dev/null || { echo "Error: '$cmd' is required but not installed." >&2; exit 1; }
|
||||
done
|
||||
}
|
||||
|
||||
# install_release fetches the release on ARCHIE_CHANNEL (or VERSION) from
|
||||
# ARCHIE_RELEASES and unpacks it into TMP: the statement must verify against
|
||||
# ARCHIE_RELEASE_KEY and the zip must hash to the digest the statement names.
|
||||
install_release() {
|
||||
local registry="${ARCHIE_RELEASES%%/*}" repo="${ARCHIE_RELEASES#*/}" scheme=https tag="${ARCHIE_CHANNEL}"
|
||||
case "${registry}" in localhost | localhost:* | 127.* | "[::1]"*) scheme=http ;; esac
|
||||
[ -n "${VERSION}" ] && tag="v${VERSION#v}"
|
||||
local base="${scheme}://${registry}/v2/${repo}" auth=()
|
||||
# Registries hand anonymous readers a pull token named by the challenge.
|
||||
local challenge
|
||||
challenge="$(curl -fsS -o /dev/null -D - "${base}/manifests/${tag}" 2>/dev/null | tr -d '\r' | sed -n 's/^[Ww][Ww][Ww]-[Aa]uthenticate: *Bearer *//p')" || true
|
||||
if [ -n "${challenge}" ]; then
|
||||
local realm service token
|
||||
realm="$(sed -n 's/.*realm="\([^"]*\)".*/\1/p' <<<"${challenge}")"
|
||||
service="$(sed -n 's/.*service="\([^"]*\)".*/\1/p' <<<"${challenge}")"
|
||||
token="$(curl -fsSL -G "${realm}" --data-urlencode "service=${service}" --data-urlencode "scope=repository:${repo}:pull" | jq -r '.token // .access_token')"
|
||||
auth=(-H "Authorization: Bearer ${token}")
|
||||
fi
|
||||
echo "==> Fetching ${ARCHIE_RELEASES}:${tag}..."
|
||||
curl -fsSL "${auth[@]}" -H "Accept: application/vnd.oci.image.manifest.v1+json" "${base}/manifests/${tag}" -o "${TMP}/manifest.json"
|
||||
blob() { curl -fsSL "${auth[@]}" "${base}/blobs/$1" -o "$2" && [ "sha256:$(sha256sum "$2" | cut -d' ' -f1)" = "$1" ]; }
|
||||
local statement_digest
|
||||
statement_digest="$(jq -er '.layers[0].digest' "${TMP}/manifest.json")"
|
||||
blob "${statement_digest}" "${TMP}/statement.json" || { echo "Error: the release statement does not match its digest." >&2; exit 1; }
|
||||
jq -er '.annotations["dev.archie.release.signature.v1"]' "${TMP}/manifest.json" | base64 -d >"${TMP}/statement.sig"
|
||||
# An ed25519 public key is its 32 bytes behind a fixed SubjectPublicKeyInfo header.
|
||||
{ printf '\x30\x2a\x30\x05\x06\x03\x2b\x65\x70\x03\x21\x00'; base64 -d <<<"${ARCHIE_RELEASE_KEY}"; } >"${TMP}/key.der"
|
||||
openssl pkeyutl -verify -pubin -inkey "${TMP}/key.der" -keyform DER -rawin \
|
||||
-in "${TMP}/statement.json" -sigfile "${TMP}/statement.sig" >/dev/null 2>&1 ||
|
||||
{ echo "Error: ${ARCHIE_RELEASES}:${tag} is not signed by the release key." >&2; exit 1; }
|
||||
local zip_name zip_digest
|
||||
VERSION="$(jq -er .version "${TMP}/statement.json")"
|
||||
[ "$(jq -r .platform "${TMP}/statement.json")" = linux-amd64 ] || { echo "Error: the release is not built for linux-amd64." >&2; exit 1; }
|
||||
[ -z "${VERSION}" ] || [ "${tag}" = "${ARCHIE_CHANNEL}" ] || [ "v${VERSION}" = "${tag}" ] ||
|
||||
{ echo "Error: ${tag} carries the statement for ${VERSION}." >&2; exit 1; }
|
||||
zip_name="$(jq -er .zip.name "${TMP}/statement.json")"
|
||||
zip_digest="$(jq -er .zip.digest "${TMP}/statement.json")"
|
||||
RELEASE_NAME="${zip_name%.zip}"
|
||||
case "${RELEASE_NAME}" in archie-core-archied-v*-linux-amd64) ;; *) echo "Error: unexpected release zip ${zip_name}." >&2; exit 1 ;; esac
|
||||
echo "==> Downloading Archie ${VERSION}..."
|
||||
blob "${zip_digest}" "${TMP}/${zip_name}" || { echo "Error: ${zip_name} does not match the signed digest." >&2; exit 1; }
|
||||
unzip -q "${TMP}/${zip_name}" -d "${TMP}"
|
||||
}
|
||||
|
||||
# 1. Prerequisites
|
||||
echo "==> Checking prerequisites..."
|
||||
# The installer depends on systemd user units and GNU tools.
|
||||
@@ -79,7 +172,7 @@ if [ "${FROM_SOURCE}" = true ]; then
|
||||
need git go jq
|
||||
else
|
||||
[ "$(uname -m)" = x86_64 ] || { echo "Error: releases are built for x86_64 only; use --from-source." >&2; exit 1; }
|
||||
need curl unzip sha256sum
|
||||
need curl unzip sha256sum openssl jq base64
|
||||
fi
|
||||
if command -v docker &>/dev/null; then
|
||||
echo " [OK] $(docker --version)"
|
||||
@@ -89,56 +182,51 @@ fi
|
||||
|
||||
mkdir -p "${ARCHIE_CONFIG_DIR}" "${ARCHIE_DATA_DIR}" "${ARCHIE_BIN_DIR}"
|
||||
|
||||
# 2. Binaries. STAGE ends up holding the binaries, release.json and the
|
||||
# updater scripts, whichever way they were obtained.
|
||||
# 2. Binaries. STAGE ends up holding the binaries and release.json, whichever
|
||||
# way they were obtained.
|
||||
TMP="$(mktemp -d)"
|
||||
trap 'rm -rf "${TMP}"' EXIT
|
||||
|
||||
if [ "${FROM_SOURCE}" = true ]; then
|
||||
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]:-$0}")" && pwd)"
|
||||
if [ -f "${SCRIPT_DIR}/go.mod" ] && grep -q "github.com/${REPO}" "${SCRIPT_DIR}/go.mod"; then
|
||||
if [ -f "${SCRIPT_DIR}/go.mod" ] && grep -q "${MODULE}" "${SCRIPT_DIR}/go.mod"; then
|
||||
SRC_DIR="${SCRIPT_DIR}"
|
||||
else
|
||||
SRC_DIR="${TMP}/src"
|
||||
git clone --quiet --depth=1 "https://github.com/${REPO}.git" "${SRC_DIR}"
|
||||
git clone --quiet --depth=1 "${SOURCE_GIT}" "${SRC_DIR}"
|
||||
fi
|
||||
echo "==> Building from ${SRC_DIR}..."
|
||||
# Selects (and under the default GOTOOLCHAIN=auto, downloads) the toolchain
|
||||
# go.mod requires, so a missing one fails here rather than mid-build.
|
||||
required="$(sed -n 's/^go //p' "${SRC_DIR}/go.mod")"
|
||||
if ! out="$(cd "${SRC_DIR}" && go list -m 2>&1)"; then
|
||||
echo "Error: Archie needs Go ${required}, which is not available: ${out}" >&2
|
||||
echo "Install Go ${required} from https://go.dev/dl, or allow the download with GOTOOLCHAIN=auto and network access to proxy.golang.org." >&2
|
||||
exit 1
|
||||
fi
|
||||
STAGE="${TMP}/stage"
|
||||
mkdir -p "${STAGE}"
|
||||
# A source build is not a release: it says `dev`, and buildType=binary lets
|
||||
# it self-update.
|
||||
LDFLAGS="-X github.com/${REPO}/internal/buildinfo.Version=dev -X github.com/${REPO}/internal/buildinfo.Runtime=dev -X github.com/${REPO}/internal/installtype.buildType=binary"
|
||||
for cmd in $(jq -er '.required_topology.units | join(" ")' "${SRC_DIR}/release.json"); do
|
||||
# it self-update. The agentworker stamp only lands in archie-agent.
|
||||
LDFLAGS="-X ${MODULE}/internal/buildinfo.Version=dev -X ${MODULE}/internal/buildinfo.Runtime=dev -X ${MODULE}/internal/installtype.buildType=binary -X ${MODULE}/internal/app/agentworker.version=dev"
|
||||
for cmd in $(jq -er '[.required_topology.units[], .required_topology.binaries[]?] | join(" ")' "${SRC_DIR}/release.json"); do
|
||||
(cd "${SRC_DIR}" && go build -ldflags "${LDFLAGS}" -o "${STAGE}/${cmd}" "./cmd/${cmd}")
|
||||
done
|
||||
cp "${SRC_DIR}/release.json" "${SRC_DIR}"/scripts/archie-update-* "${STAGE}/"
|
||||
cp "${SRC_DIR}/release.json" "${STAGE}/"
|
||||
else
|
||||
if [ -z "${VERSION}" ]; then
|
||||
tag="$(curl -fsSL "https://api.github.com/repos/${REPO}/releases/latest" | sed -n 's/.*"tag_name": *"\([^"]*\)".*/\1/p')"
|
||||
[ -n "${tag}" ] || { echo "Error: could not find the latest release." >&2; exit 1; }
|
||||
else
|
||||
tag="v${VERSION}"
|
||||
fi
|
||||
VERSION="${tag##*v}"
|
||||
name="archie-core-archied-v${VERSION}-linux-amd64"
|
||||
echo "==> Downloading Archie ${VERSION}..."
|
||||
base="https://github.com/${REPO}/releases/download/${tag}"
|
||||
curl -fsSL "${base}/${name}.zip" -o "${TMP}/${name}.zip"
|
||||
curl -fsSL "${base}/SHA256SUMS" -o "${TMP}/SHA256SUMS"
|
||||
expected="$(awk -v n="${name}.zip" '$2 == n {print $1}' "${TMP}/SHA256SUMS")"
|
||||
[[ "${expected}" =~ ^[a-f0-9]{64}$ ]] || { echo "Error: ${name}.zip is not in SHA256SUMS." >&2; exit 1; }
|
||||
printf '%s %s\n' "${expected}" "${TMP}/${name}.zip" | sha256sum --check --status ||
|
||||
{ echo "Error: checksum mismatch for ${name}.zip." >&2; exit 1; }
|
||||
unzip -q "${TMP}/${name}.zip" -d "${TMP}"
|
||||
STAGE="${TMP}/${name}"
|
||||
install_release
|
||||
STAGE="${TMP}/${RELEASE_NAME}"
|
||||
fi
|
||||
|
||||
TOPOLOGY_UNITS="$(tr -d '\n' <"${STAGE}/release.json" | sed -n 's/.*"units": *\[\([^]]*\)\].*/\1/p' | tr -d '" ' | tr , ' ')"
|
||||
for cmd in ${TOPOLOGY_UNITS}; do
|
||||
# Binaries that run beside the units without a service of their own: a Kit run
|
||||
# mounts archie-agent from archied's directory, so it must be installed with
|
||||
# them and replaced with them.
|
||||
TOPOLOGY_BINARIES="$(tr -d '\n' <"${STAGE}/release.json" | sed -n 's/.*"binaries": *\[\([^]]*\)\].*/\1/p' | tr -d '" ' | tr , ' ')"
|
||||
for cmd in ${TOPOLOGY_UNITS} ${TOPOLOGY_BINARIES}; do
|
||||
install -m755 "${STAGE}/${cmd}" "${ARCHIE_BIN_DIR}/${cmd}"
|
||||
done
|
||||
install -m755 "${STAGE}"/archie-update-* "${ARCHIE_BIN_DIR}/"
|
||||
echo " Installed ${TOPOLOGY_UNITS} and the updater to ${ARCHIE_BIN_DIR}/"
|
||||
echo " Installed ${TOPOLOGY_UNITS} ${TOPOLOGY_BINARIES} to ${ARCHIE_BIN_DIR}/"
|
||||
|
||||
# 3. Configuration. archied setup asks every question and writes config.toml
|
||||
# plus any secrets to the env file beside it; this script asks nothing itself.
|
||||
@@ -156,7 +244,25 @@ if [ ! -f "${ARCHIE_CONFIG_DIR}/config.toml" ]; then
|
||||
echo "ERROR: archied setup could not generate ${ARCHIE_CONFIG_DIR}/config.toml" >&2
|
||||
exit 1
|
||||
fi
|
||||
if [ "${ARCHIE_RELEASES}" != "${DEFAULT_RELEASES}" ] || [ "${ARCHIE_RELEASE_KEY}" != "${DEFAULT_RELEASE_KEY}" ]; then
|
||||
# The instance keeps updating from the source it was installed from.
|
||||
printf '\n[distribution]\nreleases = "%s"\nreleases_key = "%s"\n' "${ARCHIE_RELEASES}" "${ARCHIE_RELEASE_KEY}" >>"${ARCHIE_CONFIG_DIR}/config.toml"
|
||||
fi
|
||||
if [ -n "${PORT_BASE}" ]; then
|
||||
# The generated config names the default addresses; move them to this
|
||||
# instance's ports and pin the services the template leaves commented.
|
||||
sed -i -e "s/127\.0\.0\.1:8484/127.0.0.1:${P_WEB}/g" -e "s/127\.0\.0\.1:8485/127.0.0.1:${P_HEALTH}/g" \
|
||||
-e "s/127\.0\.0\.1:8585/127.0.0.1:${P_GATEWAY}/g" -e "s/127\.0\.0\.1:9090/127.0.0.1:${P_STATE}/g" \
|
||||
-e "s/127\.0\.0\.1:8586/127.0.0.1:${P_MESSAGING}/g" -e "s/127\.0\.0\.1:8587/127.0.0.1:${P_DAEMON}/g" \
|
||||
"${ARCHIE_CONFIG_DIR}/config.toml"
|
||||
for section in messaging:${P_MESSAGING} daemon:${P_DAEMON}; do
|
||||
name="${section%%:*}" port="${section#*:}"
|
||||
grep -q "^\[services\.${name}\]" "${ARCHIE_CONFIG_DIR}/config.toml" ||
|
||||
printf '\n[services.%s]\ntarget = "127.0.0.1:%s"\nlisten = "127.0.0.1:%s"\n' "${name}" "${port}" "${port}" >>"${ARCHIE_CONFIG_DIR}/config.toml"
|
||||
done
|
||||
fi
|
||||
else
|
||||
[ -n "${PORT_BASE}" ] && echo " [WARN] --port-base only applies to a new config; ${ARCHIE_CONFIG_DIR}/config.toml keeps its addresses." >&2
|
||||
echo " [SKIP] ${ARCHIE_CONFIG_DIR}/config.toml already exists. Re-run 'archied setup' to change it."
|
||||
fi
|
||||
|
||||
@@ -198,9 +304,9 @@ services:
|
||||
volumes:
|
||||
pg_data:
|
||||
EOF
|
||||
if ! docker compose -p archie --env-file "${ENV_FILE}" -f "${PG_COMPOSE}" up -d --wait; then
|
||||
if ! docker compose -p "${INSTANCE}" --env-file "${ENV_FILE}" -f "${PG_COMPOSE}" up -d --wait; then
|
||||
echo " [WARN] The bundled PostgreSQL did not start, so the services are installed but not started." >&2
|
||||
echo " Check: docker compose -p archie -f ${PG_COMPOSE} logs" >&2
|
||||
echo " Check: docker compose -p "${INSTANCE}" -f ${PG_COMPOSE} logs" >&2
|
||||
AUTO_START=false
|
||||
fi
|
||||
fi
|
||||
@@ -234,7 +340,7 @@ if [ "${INSTALL_SYSTEMD}" = true ] && command -v systemctl &>/dev/null && [ -d "
|
||||
# description now, not the mechanism: a fresh install must not need four
|
||||
# hand-written units before its own updater will run, and
|
||||
# the contents must not live in two places to drift apart.
|
||||
cat <<EOF > "${SYSTEMD_USER_DIR}/archied.service"
|
||||
cat <<EOF > "${SYSTEMD_USER_DIR}/${U_DAEMON}.service"
|
||||
[Unit]
|
||||
Description=Archie Core Orchestrator Daemon
|
||||
After=network.target
|
||||
@@ -245,9 +351,13 @@ StartLimitIntervalSec=300
|
||||
StartLimitBurst=5
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
Type=notify
|
||||
NotifyAccess=main
|
||||
# Beats only while the run loop is polling, so a wedged loop is restarted.
|
||||
WatchdogSec=30s
|
||||
ExecStart=${ARCHIE_BIN_DIR}/archied -config ${ARCHIE_CONFIG_DIR}/config.toml
|
||||
EnvironmentFile=-${ENV_FILE}
|
||||
Environment=ARCHIE_INSTANCE=${INSTANCE}
|
||||
# archied reloads its configuration on SIGHUP. Without ExecReload,
|
||||
# 'systemctl --user reload archied' fails and the operator has to know
|
||||
# to run 'systemctl --user kill -s HUP' instead.
|
||||
@@ -261,15 +371,17 @@ EOF
|
||||
|
||||
# The State Store owns the task data and is the process everything else dials, so
|
||||
# its unit is the first dependency the others name.
|
||||
cat <<EOF > "${SYSTEMD_USER_DIR}/archie-state-store.service"
|
||||
cat <<EOF > "${SYSTEMD_USER_DIR}/${U_STATE}.service"
|
||||
[Unit]
|
||||
Description=Archie State Store Service
|
||||
After=network.target
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
ExecStart=${ARCHIE_BIN_DIR}/archie-state-store -config ${ARCHIE_CONFIG_DIR}/config.toml -listen 127.0.0.1:9090 -ready-addr 127.0.0.1:9091
|
||||
Type=notify
|
||||
NotifyAccess=main
|
||||
ExecStart=${ARCHIE_BIN_DIR}/archie-state-store -config ${ARCHIE_CONFIG_DIR}/config.toml -listen 127.0.0.1:${P_STATE} -ready-addr 127.0.0.1:${P_READY}
|
||||
EnvironmentFile=-${ENV_FILE}
|
||||
Environment=ARCHIE_INSTANCE=${INSTANCE}
|
||||
Restart=on-failure
|
||||
RestartSec=5s
|
||||
|
||||
@@ -277,15 +389,17 @@ RestartSec=5s
|
||||
WantedBy=default.target
|
||||
EOF
|
||||
|
||||
cat <<EOF > "${SYSTEMD_USER_DIR}/archie-gateway.service"
|
||||
cat <<EOF > "${SYSTEMD_USER_DIR}/${U_GATEWAY}.service"
|
||||
[Unit]
|
||||
Description=Archie Gateway Service
|
||||
After=network.target
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
ExecStart=${ARCHIE_BIN_DIR}/archie-gateway -config ${ARCHIE_CONFIG_DIR}/config.toml -listen 127.0.0.1:8585
|
||||
Type=notify
|
||||
NotifyAccess=main
|
||||
ExecStart=${ARCHIE_BIN_DIR}/archie-gateway -config ${ARCHIE_CONFIG_DIR}/config.toml -listen 127.0.0.1:${P_GATEWAY}
|
||||
EnvironmentFile=-${ENV_FILE}
|
||||
Environment=ARCHIE_INSTANCE=${INSTANCE}
|
||||
Restart=on-failure
|
||||
RestartSec=5s
|
||||
|
||||
@@ -293,16 +407,17 @@ RestartSec=5s
|
||||
WantedBy=default.target
|
||||
EOF
|
||||
|
||||
cat <<EOF > "${SYSTEMD_USER_DIR}/archie-ui.service"
|
||||
cat <<EOF > "${SYSTEMD_USER_DIR}/${U_UI}.service"
|
||||
[Unit]
|
||||
Description=Archie UI Service
|
||||
After=network.target archie-state-store.service
|
||||
Wants=archie-state-store.service
|
||||
After=network.target ${U_STATE}.service
|
||||
Wants=${U_STATE}.service
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
ExecStart=${ARCHIE_BIN_DIR}/archie-ui -config ${ARCHIE_CONFIG_DIR}/config.toml
|
||||
EnvironmentFile=-${ENV_FILE}
|
||||
Environment=ARCHIE_INSTANCE=${INSTANCE}
|
||||
Restart=on-failure
|
||||
RestartSec=5s
|
||||
|
||||
@@ -312,16 +427,18 @@ EOF
|
||||
|
||||
# The Telegram, email and webhook channels run here, not in archied: without
|
||||
# this unit a host looks healthy while its channels are dead.
|
||||
cat <<EOF > "${SYSTEMD_USER_DIR}/archie-messaging.service"
|
||||
cat <<EOF > "${SYSTEMD_USER_DIR}/${U_MESSAGING}.service"
|
||||
[Unit]
|
||||
Description=Archie Messaging Service
|
||||
After=network.target archie-gateway.service archie-state-store.service
|
||||
Wants=archie-gateway.service archie-state-store.service
|
||||
After=network.target ${U_GATEWAY}.service ${U_STATE}.service
|
||||
Wants=${U_GATEWAY}.service ${U_STATE}.service
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
Type=notify
|
||||
NotifyAccess=main
|
||||
ExecStart=${ARCHIE_BIN_DIR}/archie-messaging -config ${ARCHIE_CONFIG_DIR}/config.toml
|
||||
EnvironmentFile=-${ENV_FILE}
|
||||
Environment=ARCHIE_INSTANCE=${INSTANCE}
|
||||
Restart=on-failure
|
||||
RestartSec=5s
|
||||
|
||||
@@ -329,9 +446,12 @@ RestartSec=5s
|
||||
WantedBy=default.target
|
||||
EOF
|
||||
|
||||
INSTANCE_UNITS=""
|
||||
for base in $TOPOLOGY_UNITS; do INSTANCE_UNITS="${INSTANCE_UNITS:+${INSTANCE_UNITS} }$(unit "${base}")"; done
|
||||
|
||||
systemctl --user daemon-reload || true
|
||||
SERVICE_INSTALLED=true
|
||||
for unit in $TOPOLOGY_UNITS; do
|
||||
for unit in $INSTANCE_UNITS; do
|
||||
test -f "${SYSTEMD_USER_DIR}/${unit}.service" || { echo "missing required unit: $unit" >&2; exit 1; }
|
||||
echo " Installed ${SYSTEMD_USER_DIR}/${unit}.service"
|
||||
done
|
||||
@@ -355,11 +475,13 @@ EOF
|
||||
fi
|
||||
|
||||
# Auto-enable and start the services, the store first so a fresh boot does
|
||||
# not race a dial it depends on.
|
||||
# not race a dial it depends on. Restart rather than start, because a
|
||||
# reinstall over running services would otherwise leave the old binaries
|
||||
# running.
|
||||
if [ "${AUTO_START}" = true ]; then
|
||||
echo "==> Enabling and starting Archie services..."
|
||||
systemctl --user enable --now $TOPOLOGY_UNITS ||
|
||||
echo " Notice: Could not start every service automatically. Check: systemctl --user status archied archie-state-store archie-gateway archie-ui archie-messaging"
|
||||
{ systemctl --user enable $INSTANCE_UNITS && systemctl --user restart $INSTANCE_UNITS; } ||
|
||||
echo " Notice: Could not start every service automatically. Check: systemctl --user status ${INSTANCE_UNITS}"
|
||||
fi
|
||||
fi
|
||||
|
||||
@@ -386,13 +508,15 @@ fi
|
||||
|
||||
if [ "${SERVICE_INSTALLED}" = true ] && [ "${AUTO_START}" = true ]; then
|
||||
echo "Service Management:"
|
||||
echo " - Units installed : archied archie-state-store archie-gateway archie-ui archie-messaging"
|
||||
echo " - View live logs : journalctl --user -u archied -f"
|
||||
echo " - Service status : systemctl --user status archied archie-state-store archie-gateway archie-ui archie-messaging"
|
||||
echo " - Restart daemon : systemctl --user restart archied"
|
||||
echo " - Units installed : ${INSTANCE_UNITS}"
|
||||
echo " - View live logs : journalctl --user -u ${U_DAEMON} -f"
|
||||
echo " - Service status : systemctl --user status ${INSTANCE_UNITS}"
|
||||
echo " - Restart daemon : systemctl --user restart ${U_DAEMON}"
|
||||
else
|
||||
echo "Manual Startup: start the five services as in https://github.com/${REPO}/blob/main/deployments/README.md"
|
||||
echo "Manual Startup: start the five services as in https://offloaded.dev"
|
||||
fi
|
||||
echo ""
|
||||
echo "Dashboard: http://127.0.0.1:8484 Change the config: archied setup"
|
||||
SETUP_HINT="archied setup"
|
||||
[ "${INSTANCE}" = archie ] || SETUP_HINT="ARCHIE_INSTANCE=${INSTANCE} archied setup"
|
||||
echo "Dashboard: http://127.0.0.1:${P_WEB} Change the config: ${SETUP_HINT}"
|
||||
echo ""
|
||||
@@ -46,6 +46,17 @@ func AcceptCapture(spec agentrun.CaptureTool, accepted int, value json.RawMessag
|
||||
// its rejection, so the agent can correct it, and is not recorded.
|
||||
func ServeCaptureMCP(ctx context.Context, specs []agentrun.CaptureTool, sink io.Writer, t mcp.Transport) error {
|
||||
server := mcp.NewServer(&mcp.Implementation{Name: "archie", Version: "1"}, nil)
|
||||
return serveHarnessMCP(ctx, specs, sink, t, server, false)
|
||||
}
|
||||
|
||||
func serveHarnessMCP(ctx context.Context, specs []agentrun.CaptureTool, sink io.Writer, t mcp.Transport, server *mcp.Server, central bool) error {
|
||||
if central {
|
||||
cleanup, err := addCentralTools(ctx, server, specs)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
defer cleanup()
|
||||
}
|
||||
var mu sync.Mutex
|
||||
accepted := map[string]int{}
|
||||
for _, spec := range specs {
|
||||
@@ -121,8 +132,8 @@ func ServeCaptureFiles(ctx context.Context, specPath, capturesPath string, t mcp
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
var specs []agentrun.CaptureTool
|
||||
if err := json.Unmarshal(raw, &specs); err != nil {
|
||||
var spec harnessMCPSpec
|
||||
if err := json.Unmarshal(raw, &spec); err != nil {
|
||||
return fmt.Errorf("capture tool spec: %w", err)
|
||||
}
|
||||
sink, err := os.OpenFile(capturesPath, os.O_WRONLY|os.O_APPEND, 0)
|
||||
@@ -130,5 +141,17 @@ func ServeCaptureFiles(ctx context.Context, specPath, capturesPath string, t mcp
|
||||
return err
|
||||
}
|
||||
defer sink.Close()
|
||||
return ServeCaptureMCP(ctx, specs, sink, t)
|
||||
server := mcp.NewServer(&mcp.Implementation{Name: "archie", Version: "1"}, nil)
|
||||
server.AddReceivingMiddleware(func(next mcp.MethodHandler) mcp.MethodHandler {
|
||||
return func(ctx context.Context, method string, req mcp.Request) (mcp.Result, error) {
|
||||
result, err := next(ctx, method, req)
|
||||
if err == nil && (method == "tools/list" || method == "tools/call") {
|
||||
if err := os.WriteFile(capturesPath+".ready", nil, 0o600); err != nil {
|
||||
return nil, fmt.Errorf("record MCP initialization: %w", err)
|
||||
}
|
||||
}
|
||||
return result, err
|
||||
}
|
||||
})
|
||||
return serveHarnessMCP(ctx, spec.Captures, sink, t, server, spec.CentralTools)
|
||||
}
|
||||
@@ -29,12 +29,9 @@ var harnessAdapters = map[string]HarnessAdapter{
|
||||
NewOutput: func() HarnessOutput { return newClaudeCodeHarnessOutput() },
|
||||
MCPConfig: []string{"--mcp-config", mcpConfigPlaceholder},
|
||||
},
|
||||
// Codex takes MCP servers only as inline -c overrides, and Pi and OMP
|
||||
// read no MCP config file of this shape, so their stages serve no
|
||||
// capture tools.
|
||||
AdapterCodex: {NewOutput: func() HarnessOutput { return &codexHarnessOutput{} }},
|
||||
AdapterPi: {NewOutput: func() HarnessOutput { return &piHarnessOutput{} }},
|
||||
AdapterOMP: {NewOutput: func() HarnessOutput { return &piHarnessOutput{} }},
|
||||
AdapterCodex: {NewOutput: func() HarnessOutput { return &codexHarnessOutput{} }, MCPConfig: []string{"-c", mcpConfigPlaceholder}},
|
||||
AdapterPi: {NewOutput: func() HarnessOutput { return &piHarnessOutput{} }, MCPConfig: []string{"--extension", mcpConfigPlaceholder}},
|
||||
AdapterOMP: {NewOutput: func() HarnessOutput { return &piHarnessOutput{} }, MCPConfig: []string{"--extension", mcpConfigPlaceholder}},
|
||||
AdapterCopilot: {
|
||||
NewOutput: func() HarnessOutput { return newCopilotHarnessOutput() },
|
||||
MCPConfig: []string{"--additional-mcp-config", "@" + mcpConfigPlaceholder},
|
||||
@@ -55,7 +52,7 @@ type HarnessStages struct {
|
||||
Spec agentrun.HarnessSpec
|
||||
}
|
||||
|
||||
func (r HarnessStages) Run(ctx context.Context, workspace string, req agentrun.Request, report agentrun.ToolCallReporter) (agentrun.Result, error) {
|
||||
func (r HarnessStages) Run(ctx context.Context, workspace string, req agentrun.Request, report agentrun.Reporter) (agentrun.Result, error) {
|
||||
spec := r.Spec
|
||||
req.Harness = &spec
|
||||
return r.Runner.Run(ctx, workspace, req, report)
|
||||
|
||||
@@ -0,0 +1,127 @@
|
||||
package agentexec
|
||||
|
||||
import (
|
||||
"context"
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"net/http"
|
||||
"net/url"
|
||||
"os"
|
||||
"path/filepath"
|
||||
"strconv"
|
||||
"strings"
|
||||
|
||||
"github.com/modelcontextprotocol/go-sdk/mcp"
|
||||
|
||||
"github.com/samcharles93/archie-core/internal/domain/agentrun"
|
||||
"github.com/samcharles93/archie-core/internal/infrastructure/tasktools"
|
||||
)
|
||||
|
||||
type harnessMCPSpec struct {
|
||||
Captures []agentrun.CaptureTool `json:"captures"`
|
||||
CentralTools bool `json:"central_tools"`
|
||||
}
|
||||
|
||||
// Each adapter registers one stdio bridge; it holds only proxy credentials
|
||||
// and sentinels, and never writes invocation configuration into the worktree.
|
||||
func harnessMCPRegistration(adapter, dir, configPath string, server map[string]any) (string, error) {
|
||||
switch adapter {
|
||||
case AdapterCodex:
|
||||
args, err := json.Marshal(server["args"])
|
||||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
command, ok := server["command"].(string)
|
||||
if !ok {
|
||||
return "", fmt.Errorf("MCP command is missing")
|
||||
}
|
||||
return "mcp_servers.archie={command=" + strconv.Quote(command) + ",args=" + string(args) + ",env={HTTP_PROXY=" + strconv.Quote(harnessMCPEnvironmentValue(server)) + "},required=true}", nil
|
||||
case AdapterPi:
|
||||
server["exposure"] = "direct"
|
||||
definition, err := json.Marshal(server)
|
||||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
path := filepath.Join(dir, "archie-mcp.ts")
|
||||
script := "export default function(pi) { if (typeof pi.registerMcpServer !== 'function') throw new Error('This Pi version does not support native MCP registration'); pi.registerMcpServer('archie', " + string(definition) + "); }\n"
|
||||
if err := os.WriteFile(path, []byte(script), 0o644); err != nil {
|
||||
return "", err
|
||||
}
|
||||
return path, nil
|
||||
case AdapterOMP:
|
||||
// OMP discovers .mcp.json in an explicitly loaded extension package.
|
||||
path := filepath.Join(dir, "index.ts")
|
||||
if err := os.WriteFile(path, []byte("export default function() {}\n"), 0o644); err != nil {
|
||||
return "", err
|
||||
}
|
||||
data, err := os.ReadFile(configPath)
|
||||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
if err := os.WriteFile(filepath.Join(dir, ".mcp.json"), data, 0o644); err != nil {
|
||||
return "", err
|
||||
}
|
||||
return dir, nil
|
||||
default:
|
||||
return configPath, nil
|
||||
}
|
||||
}
|
||||
|
||||
type centralTransport struct{ base http.RoundTripper }
|
||||
|
||||
func (t centralTransport) RoundTrip(r *http.Request) (*http.Response, error) {
|
||||
if r.URL.String() != tasktools.Endpoint {
|
||||
return nil, fmt.Errorf("central tool request names an unexpected endpoint")
|
||||
}
|
||||
r = r.Clone(r.Context())
|
||||
r.Header.Set("Authorization", "Bearer "+tasktools.Sentinel)
|
||||
return t.base.RoundTrip(r)
|
||||
}
|
||||
|
||||
func addCentralTools(ctx context.Context, server *mcp.Server, captures []agentrun.CaptureTool) (func(), error) {
|
||||
proxy, err := url.Parse(os.Getenv("HTTP_PROXY"))
|
||||
if err != nil || proxy.Host == "" {
|
||||
return nil, fmt.Errorf("central tools require the task egress proxy")
|
||||
}
|
||||
transport := &http.Transport{Proxy: http.ProxyURL(proxy)}
|
||||
client := mcp.NewClient(&mcp.Implementation{Name: "archie-harness", Version: "1"}, nil)
|
||||
session, err := client.Connect(ctx, &mcp.StreamableClientTransport{Endpoint: tasktools.Endpoint, HTTPClient: &http.Client{Transport: centralTransport{base: transport}, CheckRedirect: func(*http.Request, []*http.Request) error { return http.ErrUseLastResponse }}, DisableStandaloneSSE: true, MaxRetries: -1, MaxEventSize: -1}, nil)
|
||||
if err != nil {
|
||||
transport.CloseIdleConnections()
|
||||
return nil, fmt.Errorf("connect central tools: %w", err)
|
||||
}
|
||||
closeSession := func() { _ = session.Close(); transport.CloseIdleConnections() }
|
||||
names := map[string]bool{}
|
||||
for _, spec := range captures {
|
||||
names[spec.Name] = true
|
||||
}
|
||||
for tool, err := range session.Tools(ctx, nil) {
|
||||
if err != nil {
|
||||
closeSession()
|
||||
return nil, fmt.Errorf("list central tools: %w", err)
|
||||
}
|
||||
if names[tool.Name] {
|
||||
closeSession()
|
||||
return nil, fmt.Errorf("central tool %q collides with a capture tool", tool.Name)
|
||||
}
|
||||
server.AddTool(tool, func(ctx context.Context, req *mcp.CallToolRequest) (*mcp.CallToolResult, error) {
|
||||
return session.CallTool(ctx, &mcp.CallToolParams{Name: req.Params.Name, Arguments: req.Params.Arguments})
|
||||
})
|
||||
}
|
||||
return closeSession, nil
|
||||
}
|
||||
|
||||
func harnessMCPEnvironment(env []string) map[string]string {
|
||||
out := map[string]string{}
|
||||
for _, entry := range env {
|
||||
if value, ok := strings.CutPrefix(entry, "HTTP_PROXY="); ok {
|
||||
out["HTTP_PROXY"] = value
|
||||
}
|
||||
}
|
||||
return out
|
||||
}
|
||||
|
||||
func harnessMCPEnvironmentValue(server map[string]any) string {
|
||||
env, _ := server["env"].(map[string]string)
|
||||
return env["HTTP_PROXY"]
|
||||
}
|
||||
@@ -0,0 +1,46 @@
|
||||
//go:build unix
|
||||
|
||||
package agentexec
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"os"
|
||||
"os/exec"
|
||||
"testing"
|
||||
|
||||
"github.com/samcharles93/archie-core/internal/domain/agentrun"
|
||||
)
|
||||
|
||||
// Some CLIs log an unsupported MCP configuration but still exit successfully.
|
||||
func TestHarnessRequiresMCPInitialization(t *testing.T) {
|
||||
for _, central := range []bool{false, true} {
|
||||
t.Run(map[bool]string{false: "captures", true: "central tools"}[central], func(t *testing.T) {
|
||||
workspace, err := os.MkdirTemp("", "archie-mcp-regression-") //nolint:usetesting // The harness user cannot traverse testing's private parent directory.
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
defer os.RemoveAll(workspace)
|
||||
for _, args := range [][]string{{"init", "-q"}, {"-c", "user.name=fixture", "-c", "user.email=fixture@example.invalid", "commit", "--allow-empty", "-q", "-m", "fixture"}} {
|
||||
cmd := exec.CommandContext(t.Context(), "git", append([]string{"-C", workspace}, args...)...)
|
||||
if raw, err := cmd.CombinedOutput(); err != nil {
|
||||
t.Fatalf("git fixture %v: %s", err, raw)
|
||||
}
|
||||
}
|
||||
h := &agentrun.HarnessSpec{Launch: []string{"sh", "-c", "exit 0", "harness"}, Prompt: []string{"{{.Prompt}}"}, MCPConfig: []string{"{{.MCPConfig}}"}, Env: []string{"PATH=/usr/bin:/bin"}, CentralTools: central}
|
||||
if os.Geteuid() == 0 {
|
||||
h.User = "65534"
|
||||
}
|
||||
req := agentrun.Request{Version: agentrun.ProtocolVersion, TaskID: 7, Attempt: 1, Stage: "test", Mission: "return a result", Model: "fixture/model", Harness: h}
|
||||
if !central {
|
||||
req.CaptureTools = []agentrun.CaptureTool{{Name: "capture_result", Parameters: json.RawMessage(`{"type":"object"}`)}}
|
||||
}
|
||||
result, err := NewHarnessRunner(nil).Run(t.Context(), workspace, req, agentrun.Reporter{})
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
if result.Status == agentrun.StatusPassed || result.StopReason != StopExited {
|
||||
t.Fatalf("unsupported MCP silently passed: %+v", result)
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
@@ -28,7 +28,7 @@ func newClaudeCodeHarnessOutput() *claudeCodeHarnessOutput {
|
||||
}
|
||||
}
|
||||
|
||||
func (o *claudeCodeHarnessOutput) Line(line []byte, report agentrun.ToolCallReporter) {
|
||||
func (o *claudeCodeHarnessOutput) Line(line []byte, report agentrun.Reporter) {
|
||||
var event struct {
|
||||
Type string `json:"type"`
|
||||
SessionID string `json:"session_id"`
|
||||
@@ -55,7 +55,7 @@ func (o *claudeCodeHarnessOutput) Line(line []byte, report agentrun.ToolCallRepo
|
||||
}
|
||||
}
|
||||
|
||||
func (o *claudeCodeHarnessOutput) assistant(raw json.RawMessage, _ agentrun.ToolCallReporter) {
|
||||
func (o *claudeCodeHarnessOutput) assistant(raw json.RawMessage, _ agentrun.Reporter) {
|
||||
var message struct {
|
||||
ID string `json:"id"`
|
||||
Usage json.RawMessage `json:"usage"`
|
||||
@@ -79,7 +79,7 @@ func (o *claudeCodeHarnessOutput) assistant(raw json.RawMessage, _ agentrun.Tool
|
||||
}
|
||||
}
|
||||
|
||||
func (o *claudeCodeHarnessOutput) user(raw json.RawMessage, report agentrun.ToolCallReporter) {
|
||||
func (o *claudeCodeHarnessOutput) user(raw json.RawMessage, report agentrun.Reporter) {
|
||||
var message struct {
|
||||
Content []struct {
|
||||
Type string `json:"type"`
|
||||
@@ -100,12 +100,10 @@ func (o *claudeCodeHarnessOutput) user(raw json.RawMessage, report agentrun.Tool
|
||||
continue
|
||||
}
|
||||
delete(o.pending, block.ToolUseID)
|
||||
if report != nil {
|
||||
report(agentrun.ToolCallReport{
|
||||
Tool: tool, Detail: ClipToolCallDetail(claudeResultContent(block.Content)),
|
||||
Failed: block.IsError,
|
||||
})
|
||||
}
|
||||
report.ReportToolCall(agentrun.ToolCallReport{
|
||||
Tool: tool, Detail: ClipToolCallDetail(claudeResultContent(block.Content)),
|
||||
Failed: block.IsError,
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@ type codexHarnessOutput struct {
|
||||
usage agentrun.Usage
|
||||
}
|
||||
|
||||
func (o *codexHarnessOutput) Line(line []byte, report agentrun.ToolCallReporter) {
|
||||
func (o *codexHarnessOutput) Line(line []byte, report agentrun.Reporter) {
|
||||
var event struct {
|
||||
Type string `json:"type"`
|
||||
ThreadID string `json:"thread_id"`
|
||||
@@ -43,8 +43,8 @@ func (o *codexHarnessOutput) Line(line []byte, report agentrun.ToolCallReporter)
|
||||
})
|
||||
}
|
||||
case "item.completed":
|
||||
if call, ok := event.Item.report(); ok && report != nil {
|
||||
report(call)
|
||||
if call, ok := event.Item.report(); ok {
|
||||
report.ReportToolCall(call)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -18,7 +18,7 @@ func newCopilotHarnessOutput() *copilotHarnessOutput {
|
||||
return &copilotHarnessOutput{pending: make(map[string]string)}
|
||||
}
|
||||
|
||||
func (o *copilotHarnessOutput) Line(line []byte, report agentrun.ToolCallReporter) {
|
||||
func (o *copilotHarnessOutput) Line(line []byte, report agentrun.Reporter) {
|
||||
var event struct {
|
||||
Type string `json:"type"`
|
||||
SessionID string `json:"sessionId"`
|
||||
@@ -52,9 +52,7 @@ func (o *copilotHarnessOutput) Line(line []byte, report agentrun.ToolCallReporte
|
||||
return
|
||||
}
|
||||
delete(o.pending, event.Data.ToolCallID)
|
||||
if report != nil {
|
||||
report(agentrun.ToolCallReport{Tool: tool, Detail: ClipToolCallDetail(event.Data.Result.Content), Failed: !event.Data.Success})
|
||||
}
|
||||
report.ReportToolCall(agentrun.ToolCallReport{Tool: tool, Detail: ClipToolCallDetail(event.Data.Result.Content), Failed: !event.Data.Success})
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loaded 100 of 1771 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user