sneakoscope 5.6.0 → 5.6.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/crates/sks-core/Cargo.lock +1 -1
- package/crates/sks-core/Cargo.toml +1 -1
- package/crates/sks-core/src/main.rs +1 -1
- package/dist/bin/sks.js +1 -1
- package/dist/config/skills-manifest.json +58 -58
- package/dist/core/codex-app/sks-menubar.js +47 -2
- package/dist/core/commands/wiki-command.js +19 -1
- package/dist/core/feature-fixtures.js +11 -11
- package/dist/core/fsx.js +1 -1
- package/dist/core/hooks-runtime/code-pack-freshness-preflight.js +48 -0
- package/dist/core/hooks-runtime.js +4 -0
- package/dist/core/triwiki-attention.js +16 -8
- package/dist/core/triwiki-wrongness/wrongness-schema.js +18 -1
- package/dist/core/version.js +1 -1
- package/package.json +1 -1
|
@@ -4,7 +4,7 @@ use std::io::{self, Read, Seek, SeekFrom};
|
|
|
4
4
|
fn main() {
|
|
5
5
|
let mut args = std::env::args().skip(1);
|
|
6
6
|
match args.next().as_deref() {
|
|
7
|
-
Some("--version") => println!("sks-rs 5.6.
|
|
7
|
+
Some("--version") => println!("sks-rs 5.6.1"),
|
|
8
8
|
Some("compact-info") => {
|
|
9
9
|
let mut input = String::new();
|
|
10
10
|
let _ = io::stdin().read_to_string(&mut input);
|
package/dist/bin/sks.js
CHANGED
|
@@ -1,39 +1,39 @@
|
|
|
1
1
|
{
|
|
2
2
|
"schema": "sks.skills-manifest.v1",
|
|
3
|
-
"package_version": "5.6.
|
|
3
|
+
"package_version": "5.6.1",
|
|
4
4
|
"skills": [
|
|
5
5
|
{
|
|
6
6
|
"canonical_name": "answer",
|
|
7
7
|
"type": "official",
|
|
8
|
-
"content_sha256": "
|
|
8
|
+
"content_sha256": "a9438e441f9e8712be80fb4944263fb6df86a1ae0a95c469b809236ca3e5b94e",
|
|
9
9
|
"hash_history": [],
|
|
10
10
|
"deprecated_aliases": []
|
|
11
11
|
},
|
|
12
12
|
{
|
|
13
13
|
"canonical_name": "autoresearch",
|
|
14
14
|
"type": "official",
|
|
15
|
-
"content_sha256": "
|
|
15
|
+
"content_sha256": "bf321ce0908dfc7fe42bff239cfb039246adb042dea094dfaec841a4b6d9efc1",
|
|
16
16
|
"hash_history": [],
|
|
17
17
|
"deprecated_aliases": []
|
|
18
18
|
},
|
|
19
19
|
{
|
|
20
20
|
"canonical_name": "autoresearch-loop",
|
|
21
21
|
"type": "official",
|
|
22
|
-
"content_sha256": "
|
|
22
|
+
"content_sha256": "3abfea32a7da820c8b1dea54a7aed03e333b30ae2ab71eb1ee4e74f096de8e39",
|
|
23
23
|
"hash_history": [],
|
|
24
24
|
"deprecated_aliases": []
|
|
25
25
|
},
|
|
26
26
|
{
|
|
27
27
|
"canonical_name": "commit",
|
|
28
28
|
"type": "official",
|
|
29
|
-
"content_sha256": "
|
|
29
|
+
"content_sha256": "59ac19c1536a13b0b9eb7a7e0a979677977c8d8c1572064c6b7c3ec190acdb71",
|
|
30
30
|
"hash_history": [],
|
|
31
31
|
"deprecated_aliases": []
|
|
32
32
|
},
|
|
33
33
|
{
|
|
34
34
|
"canonical_name": "commit-and-push",
|
|
35
35
|
"type": "official",
|
|
36
|
-
"content_sha256": "
|
|
36
|
+
"content_sha256": "48287131d164beb514f57d1c5d83f3a342526b676b9a03e60379f30fcbd5fe49",
|
|
37
37
|
"hash_history": [],
|
|
38
38
|
"deprecated_aliases": []
|
|
39
39
|
},
|
|
@@ -47,56 +47,56 @@
|
|
|
47
47
|
{
|
|
48
48
|
"canonical_name": "computer-use-fast",
|
|
49
49
|
"type": "official",
|
|
50
|
-
"content_sha256": "
|
|
50
|
+
"content_sha256": "6d1e240295802ece7e476f4b134ef21818eff86015fd5f14259fa9b2cdacfbb3",
|
|
51
51
|
"hash_history": [],
|
|
52
52
|
"deprecated_aliases": []
|
|
53
53
|
},
|
|
54
54
|
{
|
|
55
55
|
"canonical_name": "context7-docs",
|
|
56
56
|
"type": "official",
|
|
57
|
-
"content_sha256": "
|
|
57
|
+
"content_sha256": "962a5ca121d75f4946499a5a0492058d408c8fb50d2a2c2d75282949a6328c25",
|
|
58
58
|
"hash_history": [],
|
|
59
59
|
"deprecated_aliases": []
|
|
60
60
|
},
|
|
61
61
|
{
|
|
62
62
|
"canonical_name": "cu",
|
|
63
63
|
"type": "official",
|
|
64
|
-
"content_sha256": "
|
|
64
|
+
"content_sha256": "49cbb5f6c392d645ef63a21d67e40fad48c3265a7039aa3c7afca6d1fa447515",
|
|
65
65
|
"hash_history": [],
|
|
66
66
|
"deprecated_aliases": []
|
|
67
67
|
},
|
|
68
68
|
{
|
|
69
69
|
"canonical_name": "db",
|
|
70
70
|
"type": "official",
|
|
71
|
-
"content_sha256": "
|
|
71
|
+
"content_sha256": "bd76c7d20453b748aa5674bc8d47303fd42856cb2e0c58a9cbb8406564b645c4",
|
|
72
72
|
"hash_history": [],
|
|
73
73
|
"deprecated_aliases": []
|
|
74
74
|
},
|
|
75
75
|
{
|
|
76
76
|
"canonical_name": "db-safety-guard",
|
|
77
77
|
"type": "official",
|
|
78
|
-
"content_sha256": "
|
|
78
|
+
"content_sha256": "813e895094e5da7f4cd9e73da39a26fd409b676b00c2331008ea28f56817b8a1",
|
|
79
79
|
"hash_history": [],
|
|
80
80
|
"deprecated_aliases": []
|
|
81
81
|
},
|
|
82
82
|
{
|
|
83
83
|
"canonical_name": "design-artifact-expert",
|
|
84
84
|
"type": "official",
|
|
85
|
-
"content_sha256": "
|
|
85
|
+
"content_sha256": "c3768fcca475d2c85fe4da6fab0b91640632902356ee47fdf82a35965837c7c6",
|
|
86
86
|
"hash_history": [],
|
|
87
87
|
"deprecated_aliases": []
|
|
88
88
|
},
|
|
89
89
|
{
|
|
90
90
|
"canonical_name": "design-system-builder",
|
|
91
91
|
"type": "official",
|
|
92
|
-
"content_sha256": "
|
|
92
|
+
"content_sha256": "101336edb08ec1f6bf2ddca42d4b8e30edc81aa5208ee94ee1d021fc51ccde92",
|
|
93
93
|
"hash_history": [],
|
|
94
94
|
"deprecated_aliases": []
|
|
95
95
|
},
|
|
96
96
|
{
|
|
97
97
|
"canonical_name": "design-ui-editor",
|
|
98
98
|
"type": "official",
|
|
99
|
-
"content_sha256": "
|
|
99
|
+
"content_sha256": "79658b85e4c3a05752eca771c9e8e703e3492e84d4d0d8ba1897adbe3ac1caa1",
|
|
100
100
|
"hash_history": [],
|
|
101
101
|
"deprecated_aliases": []
|
|
102
102
|
},
|
|
@@ -110,98 +110,98 @@
|
|
|
110
110
|
{
|
|
111
111
|
"canonical_name": "fast-mode",
|
|
112
112
|
"type": "official",
|
|
113
|
-
"content_sha256": "
|
|
113
|
+
"content_sha256": "609197646a1ed3c75579c0bff1cfbab5924e65118804c4a3ee54965efb9fa81d",
|
|
114
114
|
"hash_history": [],
|
|
115
115
|
"deprecated_aliases": []
|
|
116
116
|
},
|
|
117
117
|
{
|
|
118
118
|
"canonical_name": "fast-off",
|
|
119
119
|
"type": "official",
|
|
120
|
-
"content_sha256": "
|
|
120
|
+
"content_sha256": "c2a15c56840a6d801ce89cb1f055b281e61435929fb02f36c444d396cbdc188f",
|
|
121
121
|
"hash_history": [],
|
|
122
122
|
"deprecated_aliases": []
|
|
123
123
|
},
|
|
124
124
|
{
|
|
125
125
|
"canonical_name": "fast-on",
|
|
126
126
|
"type": "official",
|
|
127
|
-
"content_sha256": "
|
|
127
|
+
"content_sha256": "5ef3fcf8d37a836e22775a682e4b95271aa383fae5533eb2ba1f113dcff7c14a",
|
|
128
128
|
"hash_history": [],
|
|
129
129
|
"deprecated_aliases": []
|
|
130
130
|
},
|
|
131
131
|
{
|
|
132
132
|
"canonical_name": "from-chat-img",
|
|
133
133
|
"type": "official",
|
|
134
|
-
"content_sha256": "
|
|
134
|
+
"content_sha256": "1417c67034eafd12459e811643bb70cf64fe922236d25ac56dad74afc137f87c",
|
|
135
135
|
"hash_history": [],
|
|
136
136
|
"deprecated_aliases": []
|
|
137
137
|
},
|
|
138
138
|
{
|
|
139
139
|
"canonical_name": "getdesign-reference",
|
|
140
140
|
"type": "official",
|
|
141
|
-
"content_sha256": "
|
|
141
|
+
"content_sha256": "a768bd818c2034cb26d72a7206ac813a153dad6095a85c7be0c0c5ee9af998bf",
|
|
142
142
|
"hash_history": [],
|
|
143
143
|
"deprecated_aliases": []
|
|
144
144
|
},
|
|
145
145
|
{
|
|
146
146
|
"canonical_name": "goal",
|
|
147
147
|
"type": "official",
|
|
148
|
-
"content_sha256": "
|
|
148
|
+
"content_sha256": "e29b26eacc6e971765c6fde14d17af3037fa0c4c3ec687748f76bba1441dfbb9",
|
|
149
149
|
"hash_history": [],
|
|
150
150
|
"deprecated_aliases": []
|
|
151
151
|
},
|
|
152
152
|
{
|
|
153
153
|
"canonical_name": "gx",
|
|
154
154
|
"type": "official",
|
|
155
|
-
"content_sha256": "
|
|
155
|
+
"content_sha256": "f816edc3d2e47ad927683f32547f0bf229dca5794672cda3b4b8b6775c63e407",
|
|
156
156
|
"hash_history": [],
|
|
157
157
|
"deprecated_aliases": []
|
|
158
158
|
},
|
|
159
159
|
{
|
|
160
160
|
"canonical_name": "gx-visual-generate",
|
|
161
161
|
"type": "official",
|
|
162
|
-
"content_sha256": "
|
|
162
|
+
"content_sha256": "77ebd655dd0d35b01b094b2416a715d3e7936393df681b3bf609ef3b0634b653",
|
|
163
163
|
"hash_history": [],
|
|
164
164
|
"deprecated_aliases": []
|
|
165
165
|
},
|
|
166
166
|
{
|
|
167
167
|
"canonical_name": "gx-visual-read",
|
|
168
168
|
"type": "official",
|
|
169
|
-
"content_sha256": "
|
|
169
|
+
"content_sha256": "4c78ba33cb4b81695328d29ff2f10efbd8f2a3bede448a700fce95eed4c9234c",
|
|
170
170
|
"hash_history": [],
|
|
171
171
|
"deprecated_aliases": []
|
|
172
172
|
},
|
|
173
173
|
{
|
|
174
174
|
"canonical_name": "gx-visual-validate",
|
|
175
175
|
"type": "official",
|
|
176
|
-
"content_sha256": "
|
|
176
|
+
"content_sha256": "7a500cc1516240653bc5c51e63c6c944e705793a8630a54cc061bf4e0ef136bc",
|
|
177
177
|
"hash_history": [],
|
|
178
178
|
"deprecated_aliases": []
|
|
179
179
|
},
|
|
180
180
|
{
|
|
181
181
|
"canonical_name": "help",
|
|
182
182
|
"type": "official",
|
|
183
|
-
"content_sha256": "
|
|
183
|
+
"content_sha256": "a55a5345a267e53fbf4c457f5292be05ff18c0aa22094d8074f1db58f89cfc85",
|
|
184
184
|
"hash_history": [],
|
|
185
185
|
"deprecated_aliases": []
|
|
186
186
|
},
|
|
187
187
|
{
|
|
188
188
|
"canonical_name": "honest-mode",
|
|
189
189
|
"type": "official",
|
|
190
|
-
"content_sha256": "
|
|
190
|
+
"content_sha256": "5f2bb3fc7d577938d7f0625f540abe4566fb75edfdeb0011513bc9f69d59462b",
|
|
191
191
|
"hash_history": [],
|
|
192
192
|
"deprecated_aliases": []
|
|
193
193
|
},
|
|
194
194
|
{
|
|
195
195
|
"canonical_name": "hproof-claim-ledger",
|
|
196
196
|
"type": "official",
|
|
197
|
-
"content_sha256": "
|
|
197
|
+
"content_sha256": "3dc20afb9c3812177913d02ecfb629d4235d74efa13b1076e0cffb0faaf02a4b",
|
|
198
198
|
"hash_history": [],
|
|
199
199
|
"deprecated_aliases": []
|
|
200
200
|
},
|
|
201
201
|
{
|
|
202
202
|
"canonical_name": "hproof-evidence-bind",
|
|
203
203
|
"type": "official",
|
|
204
|
-
"content_sha256": "
|
|
204
|
+
"content_sha256": "452c3abacd8e34ded7f8ddf7743fb89b9880ea34c2900e7f05317280c95376e4",
|
|
205
205
|
"hash_history": [],
|
|
206
206
|
"deprecated_aliases": []
|
|
207
207
|
},
|
|
@@ -215,14 +215,14 @@
|
|
|
215
215
|
{
|
|
216
216
|
"canonical_name": "imagegen",
|
|
217
217
|
"type": "official",
|
|
218
|
-
"content_sha256": "
|
|
218
|
+
"content_sha256": "29da586a7011162fec287a2ef8caec6815c49c6e57b6eb421118cd1c0997a96a",
|
|
219
219
|
"hash_history": [],
|
|
220
220
|
"deprecated_aliases": []
|
|
221
221
|
},
|
|
222
222
|
{
|
|
223
223
|
"canonical_name": "imagegen-source-scout",
|
|
224
224
|
"type": "official",
|
|
225
|
-
"content_sha256": "
|
|
225
|
+
"content_sha256": "b2dee2532b88299297a948177bccaa3c77e167f71a4a5656aa75704ab0e6934a",
|
|
226
226
|
"hash_history": [],
|
|
227
227
|
"deprecated_aliases": []
|
|
228
228
|
},
|
|
@@ -236,14 +236,14 @@
|
|
|
236
236
|
{
|
|
237
237
|
"canonical_name": "insane-search",
|
|
238
238
|
"type": "official",
|
|
239
|
-
"content_sha256": "
|
|
239
|
+
"content_sha256": "1f6dd17de304a8f9e5ce88fb110cfb9b169d4cb6c44cd649886e10af9939fe62",
|
|
240
240
|
"hash_history": [],
|
|
241
241
|
"deprecated_aliases": []
|
|
242
242
|
},
|
|
243
243
|
{
|
|
244
244
|
"canonical_name": "kage-bunshin",
|
|
245
245
|
"type": "official",
|
|
246
|
-
"content_sha256": "
|
|
246
|
+
"content_sha256": "f1ce549cdc9cae6cd97dcec11e863d4e49e0ea284cc323042abd5e0357a6380f",
|
|
247
247
|
"hash_history": [],
|
|
248
248
|
"deprecated_aliases": []
|
|
249
249
|
},
|
|
@@ -257,14 +257,14 @@
|
|
|
257
257
|
{
|
|
258
258
|
"canonical_name": "mad-db",
|
|
259
259
|
"type": "official",
|
|
260
|
-
"content_sha256": "
|
|
260
|
+
"content_sha256": "968b0af4bddd5e42f14f4b218b9618d7acfb7d7789b0d7d2b1042ae8a84b6913",
|
|
261
261
|
"hash_history": [],
|
|
262
262
|
"deprecated_aliases": []
|
|
263
263
|
},
|
|
264
264
|
{
|
|
265
265
|
"canonical_name": "mad-sks",
|
|
266
266
|
"type": "official",
|
|
267
|
-
"content_sha256": "
|
|
267
|
+
"content_sha256": "521c8568ea15185bceee7c8d85b7524525b93f4b33d30dae75dc27eff03eb0aa",
|
|
268
268
|
"hash_history": [],
|
|
269
269
|
"deprecated_aliases": []
|
|
270
270
|
},
|
|
@@ -280,35 +280,35 @@
|
|
|
280
280
|
{
|
|
281
281
|
"canonical_name": "performance-evaluator",
|
|
282
282
|
"type": "official",
|
|
283
|
-
"content_sha256": "
|
|
283
|
+
"content_sha256": "0a6ff7b4ec29ba921b2c15ea6913595703b18d3a2a6f732ca019f6a1359ebb04",
|
|
284
284
|
"hash_history": [],
|
|
285
285
|
"deprecated_aliases": []
|
|
286
286
|
},
|
|
287
287
|
{
|
|
288
288
|
"canonical_name": "pipeline-runner",
|
|
289
289
|
"type": "official",
|
|
290
|
-
"content_sha256": "
|
|
290
|
+
"content_sha256": "c6a00924cba641bf19380aa61ae4e26cc8ed64d1ad4e866a4e95ec489ee6dd9f",
|
|
291
291
|
"hash_history": [],
|
|
292
292
|
"deprecated_aliases": []
|
|
293
293
|
},
|
|
294
294
|
{
|
|
295
295
|
"canonical_name": "plan",
|
|
296
296
|
"type": "official",
|
|
297
|
-
"content_sha256": "
|
|
297
|
+
"content_sha256": "f415b47e08cf25ec980182ef7badcaf50f6506a0fbd7edd2a2e9fd51729d7815",
|
|
298
298
|
"hash_history": [],
|
|
299
299
|
"deprecated_aliases": []
|
|
300
300
|
},
|
|
301
301
|
{
|
|
302
302
|
"canonical_name": "ppt",
|
|
303
303
|
"type": "official",
|
|
304
|
-
"content_sha256": "
|
|
304
|
+
"content_sha256": "dba300be1e31ee8b50d634ccdc0096b753320b85ee827f312f0136d4287dd8be",
|
|
305
305
|
"hash_history": [],
|
|
306
306
|
"deprecated_aliases": []
|
|
307
307
|
},
|
|
308
308
|
{
|
|
309
309
|
"canonical_name": "prompt-pipeline",
|
|
310
310
|
"type": "official",
|
|
311
|
-
"content_sha256": "
|
|
311
|
+
"content_sha256": "86c130cad13a8e7d4b7a7a7ee7474c517b705c4f834598b2cdb44602af06d0c1",
|
|
312
312
|
"hash_history": [],
|
|
313
313
|
"deprecated_aliases": []
|
|
314
314
|
},
|
|
@@ -324,21 +324,21 @@
|
|
|
324
324
|
{
|
|
325
325
|
"canonical_name": "reasoning-router",
|
|
326
326
|
"type": "official",
|
|
327
|
-
"content_sha256": "
|
|
327
|
+
"content_sha256": "719ec55847e6eea7fabf088c4c068e8cfc688a2fc3298be8d1edc93fbe6eb48f",
|
|
328
328
|
"hash_history": [],
|
|
329
329
|
"deprecated_aliases": []
|
|
330
330
|
},
|
|
331
331
|
{
|
|
332
332
|
"canonical_name": "reflection",
|
|
333
333
|
"type": "official",
|
|
334
|
-
"content_sha256": "
|
|
334
|
+
"content_sha256": "6315dec228c5f6350b8a5569605c8b3f62700b9a5b1b5c101c533c47365602a5",
|
|
335
335
|
"hash_history": [],
|
|
336
336
|
"deprecated_aliases": []
|
|
337
337
|
},
|
|
338
338
|
{
|
|
339
339
|
"canonical_name": "release-review",
|
|
340
340
|
"type": "official",
|
|
341
|
-
"content_sha256": "
|
|
341
|
+
"content_sha256": "df3b3dc676103a71f872079d050f4a95e5208f85d6910833a5cf83b6434029f4",
|
|
342
342
|
"hash_history": [],
|
|
343
343
|
"deprecated_aliases": []
|
|
344
344
|
},
|
|
@@ -352,14 +352,14 @@
|
|
|
352
352
|
{
|
|
353
353
|
"canonical_name": "research-discovery",
|
|
354
354
|
"type": "official",
|
|
355
|
-
"content_sha256": "
|
|
355
|
+
"content_sha256": "5e4589085fc14c27cc24e4afbfc3666c78801b7ef5b013f1fb32a3ea081df7b0",
|
|
356
356
|
"hash_history": [],
|
|
357
357
|
"deprecated_aliases": []
|
|
358
358
|
},
|
|
359
359
|
{
|
|
360
360
|
"canonical_name": "review",
|
|
361
361
|
"type": "official",
|
|
362
|
-
"content_sha256": "
|
|
362
|
+
"content_sha256": "f360c1a70676d1ae4a123c482b2dd2819b7b4d1a13843df3b920ef8b150ca4b5",
|
|
363
363
|
"hash_history": [],
|
|
364
364
|
"deprecated_aliases": []
|
|
365
365
|
},
|
|
@@ -380,14 +380,14 @@
|
|
|
380
380
|
{
|
|
381
381
|
"canonical_name": "shadow-clone",
|
|
382
382
|
"type": "official",
|
|
383
|
-
"content_sha256": "
|
|
383
|
+
"content_sha256": "546b6a8c5f68dc8270fde061bfcd0e9d8cf6e3f86a39bae65b068c9c61a248fe",
|
|
384
384
|
"hash_history": [],
|
|
385
385
|
"deprecated_aliases": []
|
|
386
386
|
},
|
|
387
387
|
{
|
|
388
388
|
"canonical_name": "sks",
|
|
389
389
|
"type": "official",
|
|
390
|
-
"content_sha256": "
|
|
390
|
+
"content_sha256": "34a2c8181e7ececa09af714ea01c8f7ee6ca37cf38cee89d65bc59c52263b76d",
|
|
391
391
|
"hash_history": [],
|
|
392
392
|
"deprecated_aliases": [
|
|
393
393
|
"ralph",
|
|
@@ -399,21 +399,21 @@
|
|
|
399
399
|
{
|
|
400
400
|
"canonical_name": "solution-scout",
|
|
401
401
|
"type": "official",
|
|
402
|
-
"content_sha256": "
|
|
402
|
+
"content_sha256": "67f1f1aea3a0d46d5c77b823dea935519559693dc173d68668f015015d46e305",
|
|
403
403
|
"hash_history": [],
|
|
404
404
|
"deprecated_aliases": []
|
|
405
405
|
},
|
|
406
406
|
{
|
|
407
407
|
"canonical_name": "swarm",
|
|
408
408
|
"type": "official",
|
|
409
|
-
"content_sha256": "
|
|
409
|
+
"content_sha256": "88633d29d184a88c56dc6421356467a8c72c7a0a8cd4002fed3b988109eaa7f7",
|
|
410
410
|
"hash_history": [],
|
|
411
411
|
"deprecated_aliases": []
|
|
412
412
|
},
|
|
413
413
|
{
|
|
414
414
|
"canonical_name": "team",
|
|
415
415
|
"type": "official",
|
|
416
|
-
"content_sha256": "
|
|
416
|
+
"content_sha256": "db177921687585bc98ff9cc13c5ec70b9f37d7cd993df4ae8b1e94df4b087073",
|
|
417
417
|
"hash_history": [],
|
|
418
418
|
"deprecated_aliases": [
|
|
419
419
|
"agent-team"
|
|
@@ -422,42 +422,42 @@
|
|
|
422
422
|
{
|
|
423
423
|
"canonical_name": "turbo-context-pack",
|
|
424
424
|
"type": "official",
|
|
425
|
-
"content_sha256": "
|
|
425
|
+
"content_sha256": "ac5de382728f451fd41e1a840cb10e3e945506f839c8b6866d22aefc452db3d1",
|
|
426
426
|
"hash_history": [],
|
|
427
427
|
"deprecated_aliases": []
|
|
428
428
|
},
|
|
429
429
|
{
|
|
430
430
|
"canonical_name": "ui-ux-review",
|
|
431
431
|
"type": "official",
|
|
432
|
-
"content_sha256": "
|
|
432
|
+
"content_sha256": "62550c9d9099bb42a4b739d089c24c3677bb7549a59729a5a73861321e0dca9d",
|
|
433
433
|
"hash_history": [],
|
|
434
434
|
"deprecated_aliases": []
|
|
435
435
|
},
|
|
436
436
|
{
|
|
437
437
|
"canonical_name": "ultra-search",
|
|
438
438
|
"type": "official",
|
|
439
|
-
"content_sha256": "
|
|
439
|
+
"content_sha256": "4ac0cbc5d14a355591193da3b9f2897d6adfdd969adca10309475dd2fda67d78",
|
|
440
440
|
"hash_history": [],
|
|
441
441
|
"deprecated_aliases": []
|
|
442
442
|
},
|
|
443
443
|
{
|
|
444
444
|
"canonical_name": "ux-review",
|
|
445
445
|
"type": "official",
|
|
446
|
-
"content_sha256": "
|
|
446
|
+
"content_sha256": "47234af087692589857e114f71b994482d9b1017310868d39a46ecf7e96d22f4",
|
|
447
447
|
"hash_history": [],
|
|
448
448
|
"deprecated_aliases": []
|
|
449
449
|
},
|
|
450
450
|
{
|
|
451
451
|
"canonical_name": "visual-review",
|
|
452
452
|
"type": "official",
|
|
453
|
-
"content_sha256": "
|
|
453
|
+
"content_sha256": "42c082f9093a7ce7a788570b93b7cde285d82daa37471364118a0c9c49407314",
|
|
454
454
|
"hash_history": [],
|
|
455
455
|
"deprecated_aliases": []
|
|
456
456
|
},
|
|
457
457
|
{
|
|
458
458
|
"canonical_name": "wiki",
|
|
459
459
|
"type": "official",
|
|
460
|
-
"content_sha256": "
|
|
460
|
+
"content_sha256": "a12c5f5e8b701efd423269e4d7067c73dc67987c60de982bf6f2969d808d86c9",
|
|
461
461
|
"hash_history": [],
|
|
462
462
|
"deprecated_aliases": [
|
|
463
463
|
"wiki-refresh",
|
|
@@ -467,21 +467,21 @@
|
|
|
467
467
|
{
|
|
468
468
|
"canonical_name": "with-local-llm-off",
|
|
469
469
|
"type": "official",
|
|
470
|
-
"content_sha256": "
|
|
470
|
+
"content_sha256": "52683242008800a0e81317402d16e4685772b2237dbe83193c46bca63fe22683",
|
|
471
471
|
"hash_history": [],
|
|
472
472
|
"deprecated_aliases": []
|
|
473
473
|
},
|
|
474
474
|
{
|
|
475
475
|
"canonical_name": "with-local-llm-on",
|
|
476
476
|
"type": "official",
|
|
477
|
-
"content_sha256": "
|
|
477
|
+
"content_sha256": "236ed87e556c26b10837fc11966efbc5738165fc3fe63153f3e9adcdb1c820a9",
|
|
478
478
|
"hash_history": [],
|
|
479
479
|
"deprecated_aliases": []
|
|
480
480
|
},
|
|
481
481
|
{
|
|
482
482
|
"canonical_name": "work",
|
|
483
483
|
"type": "official",
|
|
484
|
-
"content_sha256": "
|
|
484
|
+
"content_sha256": "55a19da1bf184f6d867bae2b121e975213124fdb8c113793029a5e04731fa616",
|
|
485
485
|
"hash_history": [],
|
|
486
486
|
"deprecated_aliases": []
|
|
487
487
|
}
|
|
@@ -873,6 +873,51 @@ func clipped(_ value: String, limit: Int = 700) -> String {
|
|
|
873
873
|
return String(value.prefix(limit))
|
|
874
874
|
}
|
|
875
875
|
|
|
876
|
+
// sks commands report failures as JSON ({reason|status|error|blockers[]|guidance[]}
|
|
877
|
+
// as short snake_case codes), which read as opaque "error codes" if dumped raw into
|
|
878
|
+
// an alert. Extract the readable parts and translate known codes into plain English;
|
|
879
|
+
// unknown codes fall back to "snake_case -> Words" rather than staying cryptic, and
|
|
880
|
+
// genuinely non-JSON output (already plain text) passes through unchanged.
|
|
881
|
+
func humanizeSksFailure(_ text: String) -> String {
|
|
882
|
+
let trimmed = text.trimmingCharacters(in: .whitespacesAndNewlines)
|
|
883
|
+
guard let data = trimmed.data(using: .utf8),
|
|
884
|
+
let obj = try? JSONSerialization.jsonObject(with: data, options: []) as? [String: Any] else {
|
|
885
|
+
return text
|
|
886
|
+
}
|
|
887
|
+
var lines: [String] = []
|
|
888
|
+
if let reason = obj["reason"] as? String {
|
|
889
|
+
lines.append(humanizeSksCode(reason))
|
|
890
|
+
} else if let status = obj["status"] as? String, !["ok", "pass", "verified", "verified_partial"].contains(status) {
|
|
891
|
+
lines.append(humanizeSksCode(status))
|
|
892
|
+
}
|
|
893
|
+
if let errorMessage = obj["error"] as? String, !errorMessage.isEmpty {
|
|
894
|
+
lines.append(errorMessage)
|
|
895
|
+
}
|
|
896
|
+
if let blockers = obj["blockers"] as? [String], !blockers.isEmpty {
|
|
897
|
+
lines.append(contentsOf: blockers.map { "- " + humanizeSksCode($0) })
|
|
898
|
+
}
|
|
899
|
+
if let guidance = obj["guidance"] as? [String], !guidance.isEmpty {
|
|
900
|
+
lines.append("")
|
|
901
|
+
lines.append(contentsOf: guidance)
|
|
902
|
+
}
|
|
903
|
+
return lines.isEmpty ? text : lines.joined(separator: "\\n")
|
|
904
|
+
}
|
|
905
|
+
|
|
906
|
+
func humanizeSksCode(_ code: String) -> String {
|
|
907
|
+
let known: [String: String] = [
|
|
908
|
+
"missing_host_or_base_url": "No domain or base URL was entered.",
|
|
909
|
+
"missing_api_key": "No API key was entered.",
|
|
910
|
+
"setup_needed": "codex-lb is not configured yet.",
|
|
911
|
+
"cancelled": "Setup was cancelled.",
|
|
912
|
+
"process_only_cancelled": "Setup was cancelled (process-only mode was not confirmed).",
|
|
913
|
+
"process_only_requires_yes": "This setup would only be kept for the current session — nothing durable was saved."
|
|
914
|
+
]
|
|
915
|
+
if let mapped = known[code] { return mapped }
|
|
916
|
+
let words = code.split(separator: "_").joined(separator: " ")
|
|
917
|
+
guard let first = words.first else { return code }
|
|
918
|
+
return String(first).uppercased() + words.dropFirst()
|
|
919
|
+
}
|
|
920
|
+
|
|
876
921
|
func showAlert(_ message: String, informative: String = "") {
|
|
877
922
|
DispatchQueue.main.async {
|
|
878
923
|
NSApp.activate(ignoringOtherApps: true)
|
|
@@ -1140,7 +1185,7 @@ ${codexLifecycleSource}
|
|
|
1140
1185
|
if code == 0 {
|
|
1141
1186
|
showNotification(title, "OK\\n" + redacted)
|
|
1142
1187
|
} else {
|
|
1143
|
-
showAlert(title + " failed", informative: redacted)
|
|
1188
|
+
showAlert(title + " failed", informative: humanizeSksFailure(redacted))
|
|
1144
1189
|
}
|
|
1145
1190
|
}
|
|
1146
1191
|
completion?(code, redacted)
|
|
@@ -1192,7 +1237,7 @@ ${codexLifecycleSource}
|
|
|
1192
1237
|
}
|
|
1193
1238
|
|
|
1194
1239
|
@objc func setCodexLbDomainAndKey() {
|
|
1195
|
-
guard let domain = promptText(title: "Set codex-lb Domain", message: "Enter your codex-lb domain or base URL.", placeholder: "
|
|
1240
|
+
guard let domain = promptText(title: "Set codex-lb Domain", message: "Enter just your codex-lb domain or base URL — the /backend-api/codex path is added automatically.", placeholder: "lb.example.com") else { return }
|
|
1196
1241
|
guard let key = promptText(title: "Set codex-lb Key", message: "Enter your codex-lb API key.", placeholder: "sk-clb-...", secure: true) else { return }
|
|
1197
1242
|
runSksBackground(["codex-lb", "setup", "--host", domain, "--api-key-stdin", "--yes", "--json"], title: "Set codex-lb", stdinText: key + "\\n") { [weak self] code, _ in
|
|
1198
1243
|
if code == 0 { self?.updateAuthModeChecks() }
|
|
@@ -17,6 +17,7 @@ import { validateImageVoxelLedger } from '../wiki-image/validation.js';
|
|
|
17
17
|
import { maybeFinalizeRoute } from '../proof/auto-finalize.js';
|
|
18
18
|
import { wikiWrongnessCommand } from '../triwiki-wrongness/wrongness-cli.js';
|
|
19
19
|
import { wrongnessContextForRoute } from '../triwiki-wrongness/wrongness-retrieval.js';
|
|
20
|
+
import { readCombinedWrongnessRecords } from '../triwiki-wrongness/wrongness-ledger.js';
|
|
20
21
|
import { recordImageWrongnessFromValidation } from '../triwiki-wrongness/image-wrongness.js';
|
|
21
22
|
import { publishSharedMemory, rebuildSharedIndexes, sharedMemorySummary, validateSharedMemory } from '../git-hygiene/shared-memory-publish.js';
|
|
22
23
|
import { scanCodebaseIndex } from '../triwiki/code-index-scanner.js';
|
|
@@ -249,6 +250,21 @@ async function wikiRefreshCode(args = []) {
|
|
|
249
250
|
/** Cheap freshness check: compares the code pack's recorded git HEAD sha (at
|
|
250
251
|
* generation time) against the current HEAD. Any uncertainty (no pack, no git,
|
|
251
252
|
* spawn failure) resolves to 'stale' rather than 'fresh', never overclaiming. */
|
|
253
|
+
/** Active-wrongness counts per TriWiki module id (from wrongness records' module_ids),
|
|
254
|
+
* so attention can hydrate frequently-wrong modules' code entries first. */
|
|
255
|
+
async function buildWrongnessByModule(root) {
|
|
256
|
+
const records = await readCombinedWrongnessRecords(root, null).catch(() => []);
|
|
257
|
+
const counts = {};
|
|
258
|
+
for (const record of records) {
|
|
259
|
+
if (record?.status && record.status !== 'active')
|
|
260
|
+
continue;
|
|
261
|
+
for (const moduleId of Array.isArray(record?.module_ids) ? record.module_ids : []) {
|
|
262
|
+
if (moduleId)
|
|
263
|
+
counts[moduleId] = (counts[moduleId] || 0) + 1;
|
|
264
|
+
}
|
|
265
|
+
}
|
|
266
|
+
return counts;
|
|
267
|
+
}
|
|
252
268
|
async function codePackFreshness(root) {
|
|
253
269
|
const packPath = path.join(root, '.sneakoscope', 'wiki', 'code-pack.json');
|
|
254
270
|
if (!(await exists(packPath)))
|
|
@@ -383,6 +399,7 @@ export async function writeWikiContextPack(root, args = [], opts = {}) {
|
|
|
383
399
|
const maxAnchors = Number(readFlagValue(args, '--max-anchors', role.includes('verifier') ? 48 : 32));
|
|
384
400
|
const codePackData = await readJson(path.join(root, '.sneakoscope', 'wiki', 'code-pack.json'), null).catch(() => null);
|
|
385
401
|
const codePackEntries = Array.isArray(codePackData?.entries) ? codePackData.entries : [];
|
|
402
|
+
const wrongnessByModule = await buildWrongnessByModule(root);
|
|
386
403
|
const pack = contextCapsule({
|
|
387
404
|
mission: { id: 'project-wiki', coord: { rgba: { r: 48, g: 132, b: 212, a: 240 } } },
|
|
388
405
|
role,
|
|
@@ -391,7 +408,8 @@ export async function writeWikiContextPack(root, args = [], opts = {}) {
|
|
|
391
408
|
q4: { mode: 'project-continuity', package: PACKAGE_VERSION, hydrate: 'anchor-first' },
|
|
392
409
|
q3: ['sks', 'llm-wiki', 'wiki-coordinate', 'gx', 'skills'],
|
|
393
410
|
budget: { maxWikiAnchors: maxAnchors, includeTrustSummary: true },
|
|
394
|
-
codePackEntries
|
|
411
|
+
codePackEntries,
|
|
412
|
+
wrongnessByModule
|
|
395
413
|
});
|
|
396
414
|
const wrongnessContext = await wrongnessContextForRoute(root, { route: '$Wiki', limit: 12 });
|
|
397
415
|
// buildTriWikiAttention's use_first/hydrate_first can reference code: ids that were
|
|
@@ -141,10 +141,10 @@ const FIXTURES = Object.freeze({
|
|
|
141
141
|
'route-swarm': fixture('execute_and_validate_artifacts', 'sks naruto run "fixture" --backend fake --work-items 4 --json', ['naruto-gate.json', 'work-order-ledger.json'], 'pass', { timeout_ms: 285000, reason: 'Same as route-work: naruto-command.ts never invokes the completion-proof pipeline.' }),
|
|
142
142
|
'route-plan': fixture('execute', 'sks plan "fixture" --json', [], 'pass'),
|
|
143
143
|
'route-review': fixture('execute', 'sks review --diff HEAD --json', [], 'pass'),
|
|
144
|
-
'route-shadowclone': fixture('
|
|
144
|
+
'route-shadowclone': fixture('static', '$ShadowClone alias of $Naruto shadow-clone swarm route', [], 'pass', {
|
|
145
145
|
reason: 'Pure alias of $Naruto; no independent behavior to verify beyond route-naruto\'s own execute_and_validate_artifacts fixture.'
|
|
146
146
|
}),
|
|
147
|
-
'route-kagebunshin': fixture('
|
|
147
|
+
'route-kagebunshin': fixture('static', '$Kagebunshin alias of $Naruto shadow-clone swarm route', [], 'pass', {
|
|
148
148
|
reason: 'Pure alias of $Naruto; no independent behavior to verify beyond route-naruto\'s own execute_and_validate_artifacts fixture.'
|
|
149
149
|
}),
|
|
150
150
|
'route-qa-loop': fixture('execute_and_validate_artifacts', 'sks qa-loop run latest --mock --json', ['completion-proof.json', 'qa-gate.json'], 'blocked', { timeout_ms: 180000, reason: 'qaLoopRun() resolves "latest" via the same globally-unscoped findLatestMission used everywhere else and qa-loop is a two-step prepare-then-run workflow gated between steps by an active-route-not-closed check a single fixture command cannot express.' }),
|
|
@@ -152,11 +152,11 @@ const FIXTURES = Object.freeze({
|
|
|
152
152
|
'route-ppt': fixture('mock', 'sks ppt fixture --mock --json', ['completion-proof.json', { path: 'image-voxel-ledger.json', schema: 'sks.image-voxel-ledger.v1' }, 'ppt-imagegen-review-gate.json', 'ppt-slide-issue-ledger.json'], 'pass', { reason: 'Underlying command intentionally exits non-zero and reports ok:false by honest design (mockPptFixtureGate() hardcodes a blocked mock PPT gate); it does write all four declared artifacts.' }),
|
|
153
153
|
'route-image-ux-review': fixture('mock', 'sks image-ux-review fixture --mock --json', ['completion-proof.json', { path: 'image-voxel-ledger.json', schema: 'sks.image-voxel-ledger.v1' }, 'image-ux-generated-review-ledger.json'], 'pass', { reason: 'imageUxFixture() intentionally overrides the gate to passed:false/execution_class:mock_fixture and always exits non-zero for mock fixture runs so they can never claim a real pass; it does write the declared artifacts.' }),
|
|
154
154
|
'route-computer-use': fixture('execute_and_validate_artifacts', 'sks computer-use import-fixture --mock --json', ['computer-use-evidence-ledger.json', { path: 'image-voxel-ledger.json', schema: 'sks.image-voxel-ledger.v1' }, 'completion-proof.json'], 'blocked', { reason: 'importFixture() unconditionally sets process.exitCode=1 by design (execution_class: mock_fixture) so a mock Computer Use import can never claim a real pass.' }),
|
|
155
|
-
'route-cu': fixture('
|
|
156
|
-
reason: '
|
|
155
|
+
'route-cu': fixture('execute_and_validate_artifacts', 'sks computer-use import-fixture --mock --json', ['computer-use-evidence-ledger.json', { path: 'image-voxel-ledger.json', schema: 'sks.image-voxel-ledger.v1' }, 'completion-proof.json'], 'blocked', {
|
|
156
|
+
reason: 'Same handler as route-computer-use: importFixture() unconditionally sets process.exitCode=1 by design (execution_class: mock_fixture) so a mock Computer Use import can never claim a real pass. execute_and_validate_artifacts already treats a matching claimed_status:\'blocked\' as ok (see feature-fixture-executor.ts\'s statusMatches check), so no special-casing is needed - upgraded from the previous mock registration to get real command-exit and artifact-schema verification.'
|
|
157
157
|
}),
|
|
158
158
|
'route-dfix': fixture('execute_and_validate_artifacts', 'sks dfix fixture --json', ['completion-proof.json', 'dfix-gate.json', 'dfix-verification.json'], 'pass'),
|
|
159
|
-
'route-answer': fixture('
|
|
159
|
+
'route-answer': fixture('static', '$Answer answer-only route policy', [], 'pass', {
|
|
160
160
|
reason: 'Policy-only route (answer-only conversational mode with no writes); nothing executable to run beyond static contract text.'
|
|
161
161
|
}),
|
|
162
162
|
'route-goal': fixture('mock', '$Goal bridge route', ['goal-workflow.json', 'completion-proof.json'], 'pass', {
|
|
@@ -183,24 +183,24 @@ const FIXTURES = Object.freeze({
|
|
|
183
183
|
}),
|
|
184
184
|
'route-wiki': fixture('execute_and_validate_artifacts', 'sks wiki image-ingest test/fixtures/images/one-by-one.png --json', [{ path: 'completion-proof.json', schema: 'sks.completion-proof.v1' }, { path: 'image-voxel-ledger.json', schema: 'sks.image-voxel-ledger.v1' }], 'pass'),
|
|
185
185
|
'route-gx': fixture('execute_and_validate_artifacts', 'sks gx validate fixture --mock --json', ['completion-proof.json', { path: 'image-voxel-ledger.json', schema: 'sks.image-voxel-ledger.v1' }, 'gx-validation.json'], 'blocked', { reason: 'gxValidateFixture() intentionally exits non-zero (execution_class: mock_fixture) for an honest mock/blocked result; it does write all three declared artifacts.' }),
|
|
186
|
-
'route-sks': fixture('
|
|
186
|
+
'route-sks': fixture('static', '$SKS control-surface route', ['completion-proof.json'], 'pass', {
|
|
187
187
|
reason: 'Pure control-surface alias route with no independent behavior beyond the underlying CLI command fixtures it dispatches to.'
|
|
188
188
|
}),
|
|
189
189
|
'route-fast-mode': fixture('execute', 'sks fast-mode status --json', [], 'pass'),
|
|
190
|
-
'route-fast-on': fixture('
|
|
190
|
+
'route-fast-on': fixture('static', '$Fast-On covered by hermetic fast-mode blackbox toggle test', [], 'pass', {
|
|
191
191
|
reason: 'Toggle-only dollar-command alias; behavior is covered by the hermetic fast-mode blackbox toggle test suite, not a standalone CLI invocation.'
|
|
192
192
|
}),
|
|
193
|
-
'route-fast-off': fixture('
|
|
193
|
+
'route-fast-off': fixture('static', '$Fast-Off covered by hermetic fast-mode blackbox toggle test', [], 'pass', {
|
|
194
194
|
reason: 'Toggle-only dollar-command alias; behavior is covered by the hermetic fast-mode blackbox toggle test suite, not a standalone CLI invocation.'
|
|
195
195
|
}),
|
|
196
196
|
'route-local-model': fixture('execute', 'sks with-local-llm status --json', [], 'pass'),
|
|
197
|
-
'route-with-local-llm-on': fixture('
|
|
197
|
+
'route-with-local-llm-on': fixture('static', '$with-local-llm-on covered by hermetic local-model dollar-command blackbox toggle test', [], 'pass', {
|
|
198
198
|
reason: 'Toggle-only dollar-command alias; behavior is covered by the hermetic local-model dollar-command blackbox toggle test suite, not a standalone CLI invocation.'
|
|
199
199
|
}),
|
|
200
|
-
'route-with-local-llm-off': fixture('
|
|
200
|
+
'route-with-local-llm-off': fixture('static', '$with-local-llm-off covered by hermetic local-model dollar-command blackbox toggle test', [], 'pass', {
|
|
201
201
|
reason: 'Toggle-only dollar-command alias; behavior is covered by the hermetic local-model dollar-command blackbox toggle test suite, not a standalone CLI invocation.'
|
|
202
202
|
}),
|
|
203
|
-
'route-help': fixture('
|
|
203
|
+
'route-help': fixture('static', '$Help lightweight route', [], 'pass', {
|
|
204
204
|
reason: 'Pure alias of the cli-help command; no independent behavior to verify beyond cli-help\'s own execute fixture.'
|
|
205
205
|
}),
|
|
206
206
|
'route-commit': fixture('mock', '$Commit git route', ['completion-proof.json'], 'pass', {
|
package/dist/core/fsx.js
CHANGED
|
@@ -5,7 +5,7 @@ import os from 'node:os';
|
|
|
5
5
|
import crypto from 'node:crypto';
|
|
6
6
|
import { spawn } from 'node:child_process';
|
|
7
7
|
import { fileURLToPath } from 'node:url';
|
|
8
|
-
export const PACKAGE_VERSION = '5.6.
|
|
8
|
+
export const PACKAGE_VERSION = '5.6.1';
|
|
9
9
|
export const DEFAULT_PROCESS_TAIL_BYTES = 256 * 1024;
|
|
10
10
|
export const DEFAULT_PROCESS_TIMEOUT_MS = 30 * 60 * 1000;
|
|
11
11
|
export function nowIso() {
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import path from 'node:path';
|
|
2
|
+
import { exists, readJson, runProcess } from '../fsx.js';
|
|
3
|
+
/** Bounded, non-blocking code-pack staleness nudge for the user-prompt-submit hook.
|
|
4
|
+
*
|
|
5
|
+
* Returns a one-line context note when a published code pack
|
|
6
|
+
* (.sneakoscope/wiki/code-pack.json) exists but was generated against a different
|
|
7
|
+
* git HEAD than the current one — i.e. the codebase moved and the LLM-facing code
|
|
8
|
+
* summaries are now out of date. Returns null (silent) when there is no pack at all
|
|
9
|
+
* (repos that never opted into `sks wiki refresh --code` must not be nagged) or when
|
|
10
|
+
* the check can't complete cheaply. It NEVER regenerates the pack and NEVER blocks:
|
|
11
|
+
* the whole check is one JSON read plus one `git rev-parse HEAD`, wrapped in a hard
|
|
12
|
+
* timeout so it cannot blow the hook latency budget. Any failure resolves to null. */
|
|
13
|
+
export async function codePackFreshnessNote(root, opts = {}) {
|
|
14
|
+
const budgetMs = opts.budgetMs ?? 250;
|
|
15
|
+
return raceWithTimeout(computeNote(root), budgetMs).catch(() => null);
|
|
16
|
+
}
|
|
17
|
+
async function computeNote(root) {
|
|
18
|
+
const packPath = path.join(root, '.sneakoscope', 'wiki', 'code-pack.json');
|
|
19
|
+
if (!(await exists(packPath)))
|
|
20
|
+
return null;
|
|
21
|
+
const pack = await readJson(packPath, null).catch(() => null);
|
|
22
|
+
const packSha = pack?.git_head_sha || null;
|
|
23
|
+
// A pack with no recorded sha (non-git build) can't be compared; stay silent
|
|
24
|
+
// rather than nag with a comparison we can't actually make.
|
|
25
|
+
if (!packSha)
|
|
26
|
+
return null;
|
|
27
|
+
const head = await runProcess('git', ['rev-parse', 'HEAD'], { cwd: root, timeoutMs: 200 }).catch(() => null);
|
|
28
|
+
const currentSha = head && head.code === 0 ? String(head.stdout || '').trim() : null;
|
|
29
|
+
if (!currentSha || currentSha === packSha)
|
|
30
|
+
return null;
|
|
31
|
+
return 'SKS note: the codebase code pack is stale (HEAD moved since it was built). Run `sks wiki refresh --code` to refresh source-cited code context.';
|
|
32
|
+
}
|
|
33
|
+
async function raceWithTimeout(work, ms) {
|
|
34
|
+
let timer = null;
|
|
35
|
+
const timeout = new Promise((resolve) => {
|
|
36
|
+
timer = setTimeout(() => resolve(null), ms);
|
|
37
|
+
if (timer.unref)
|
|
38
|
+
timer.unref();
|
|
39
|
+
});
|
|
40
|
+
try {
|
|
41
|
+
return await Promise.race([work, timeout]);
|
|
42
|
+
}
|
|
43
|
+
finally {
|
|
44
|
+
if (timer)
|
|
45
|
+
clearTimeout(timer);
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
//# sourceMappingURL=code-pack-freshness-preflight.js.map
|
|
@@ -18,6 +18,7 @@ import { scanAgentTextForRecursion } from './agents/agent-recursion-guard.js';
|
|
|
18
18
|
import { evaluateLoopContinuation } from './loops/loop-continuation-enforcer.js';
|
|
19
19
|
import { diagnosticPromptAllowedDuringNoQuestions } from './routes/diagnostic-allowlist.js';
|
|
20
20
|
import { maybeReconcileProjectSkillsPreflight } from './hooks-runtime/skill-reconcile-preflight.js';
|
|
21
|
+
import { codePackFreshnessNote } from './hooks-runtime/code-pack-freshness-preflight.js';
|
|
21
22
|
import { buildCompactContinue, buildPermissionRequestAllow, buildPermissionRequestDeny, buildPostToolUseBlock, buildPostToolUseContinue, buildPreToolUseContinue, buildPreToolUseDeny, buildSessionStartContinue, buildStopBlock, buildStopContinue, buildSubagentStartContinue, buildSubagentStopBlock, buildSubagentStopContinue, buildUserPromptSubmitBlock, buildUserPromptSubmitContinue } from './codex-compat/codex-hook-output-builders.js';
|
|
22
23
|
import { joinSystemMessages, teamLiveDigest } from './hooks-runtime/team-digest.js';
|
|
23
24
|
const STOP_REPEAT_GUARD_ARTIFACT = 'stop-hook-repeat-guard.json';
|
|
@@ -340,6 +341,9 @@ async function hookUserPrompt(root, state, payload, noQuestion, sessionKey = nul
|
|
|
340
341
|
contexts.push(goalOverlay);
|
|
341
342
|
if (teamDigest?.context)
|
|
342
343
|
contexts.push(teamDigest.context);
|
|
344
|
+
const codePackNote = await codePackFreshnessNote(root);
|
|
345
|
+
if (codePackNote)
|
|
346
|
+
contexts.push(codePackNote);
|
|
343
347
|
const additionalContext = contexts.filter(Boolean).join('\n\n');
|
|
344
348
|
return { continue: true, additionalContext, systemMessage: joinSystemMessages(visibleHookMessage('user-prompt-submit', additionalContext), teamDigest?.system) };
|
|
345
349
|
}
|
|
@@ -231,10 +231,12 @@ function uniqueAttentionRows(rows = [], max = 4) {
|
|
|
231
231
|
* for the same fixed slot budget would make their appearance arbitrary. Each surviving
|
|
232
232
|
* entry becomes a use_first row (bare id, no fabricated RGBA) plus a hydrate_first row
|
|
233
233
|
* pointing at its source citations, so a consumer knows which real files back it. */
|
|
234
|
-
function codePackAttentionRows(codePackEntries = [], tokenBudget = 2000) {
|
|
234
|
+
function codePackAttentionRows(codePackEntries = [], tokenBudget = 2000, wrongnessByModule = {}) {
|
|
235
|
+
const moduleWrongness = (entryId) => Number(wrongnessByModule[String(entryId || '').replace(/^code:/, '')] || 0);
|
|
235
236
|
const sorted = [...(codePackEntries || [])]
|
|
236
237
|
.filter((entry) => entry && typeof entry.id === 'string')
|
|
237
|
-
|
|
238
|
+
// Modules SKS has been wrong about before are worth re-reading first, then rank by trust.
|
|
239
|
+
.sort((a, b) => (moduleWrongness(b.id) - moduleWrongness(a.id)) || (Number(b.trust_score || 0) - Number(a.trust_score || 0)));
|
|
238
240
|
const useFirst = [];
|
|
239
241
|
const hydrateFirst = [];
|
|
240
242
|
let tokens = 0;
|
|
@@ -245,12 +247,17 @@ function codePackAttentionRows(codePackEntries = [], tokenBudget = 2000) {
|
|
|
245
247
|
tokens += cost;
|
|
246
248
|
useFirst.push([entry.id, null, null]);
|
|
247
249
|
const citationPaths = Array.isArray(entry.citations) ? entry.citations.map((c) => c?.path).filter(Boolean) : [];
|
|
248
|
-
|
|
249
|
-
|
|
250
|
+
const citationReason = citationPaths.length ? `code_citations:${citationPaths.join(',')}` : null;
|
|
251
|
+
const wrongCount = moduleWrongness(entry.id);
|
|
252
|
+
// A module with past wrongness earns a hydrate row even without citations, tagged
|
|
253
|
+
// with a wrongness:<count> signal so a consumer re-reads it before trusting recall.
|
|
254
|
+
const reason = wrongCount > 0 ? `wrongness:${wrongCount}${citationReason ? `;${citationReason}` : ''}` : citationReason;
|
|
255
|
+
if (reason)
|
|
256
|
+
hydrateFirst.push([entry.id, reason]);
|
|
250
257
|
}
|
|
251
258
|
return { useFirst, hydrateFirst };
|
|
252
259
|
}
|
|
253
|
-
export function buildTriWikiAttention({ selected = [], wiki = {}, role = 'worker', maxUse = 4, maxHydrate = 4, codePackEntries = [], codePackTokenBudget = 2000 } = {}) {
|
|
260
|
+
export function buildTriWikiAttention({ selected = [], wiki = {}, role = 'worker', maxUse = 4, maxHydrate = 4, codePackEntries = [], codePackTokenBudget = 2000, wrongnessByModule = {} } = {}) {
|
|
254
261
|
const anchors = attentionAnchorMap(wiki);
|
|
255
262
|
const ranked = [...(selected || [])]
|
|
256
263
|
.map((claim, index) => ({ claim, index }))
|
|
@@ -276,7 +283,7 @@ export function buildTriWikiAttention({ selected = [], wiki = {}, role = 'worker
|
|
|
276
283
|
...voxelRows,
|
|
277
284
|
...selectedHydrateRows
|
|
278
285
|
], maxHydrate);
|
|
279
|
-
const codeRows = codePackAttentionRows(codePackEntries, codePackTokenBudget);
|
|
286
|
+
const codeRows = codePackAttentionRows(codePackEntries, codePackTokenBudget, wrongnessByModule);
|
|
280
287
|
return {
|
|
281
288
|
mode: 'aggressive_triwiki_active_recall',
|
|
282
289
|
use_first: uniqueAttentionRows([...useFirst, ...codeRows.useFirst], maxUse + codeRows.useFirst.length),
|
|
@@ -309,7 +316,7 @@ export function geometricOffsets(max = 65536) {
|
|
|
309
316
|
out.push(x);
|
|
310
317
|
return out;
|
|
311
318
|
}
|
|
312
|
-
export function contextCapsule({ mission, role = 'worker', contractHash = null, claims = [], q4 = {}, q3 = [], budget = {}, codePackEntries = [] }) {
|
|
319
|
+
export function contextCapsule({ mission, role = 'worker', contractHash = null, claims = [], q4 = {}, q3 = [], budget = {}, codePackEntries = [], wrongnessByModule = {} }) {
|
|
313
320
|
const trustPolicy = budget.trustPolicy || DEFAULT_TRUST_POLICY;
|
|
314
321
|
const claimsWithTrust = (claims || []).map((claim) => withTrust(claim, trustPolicy));
|
|
315
322
|
const selected = selectClaims(mission, claims, { maxClaims: budget.maxClaims ?? (role.includes('verifier') ? 16 : 9), trustPolicy });
|
|
@@ -342,7 +349,8 @@ export function contextCapsule({ mission, role = 'worker', contractHash = null,
|
|
|
342
349
|
maxUse: budget.maxAttentionUse ?? (role.includes('verifier') ? 7 : 4),
|
|
343
350
|
maxHydrate: budget.maxAttentionHydrate ?? (role.includes('verifier') ? 7 : 4),
|
|
344
351
|
codePackEntries,
|
|
345
|
-
codePackTokenBudget: budget.codePackTokenBudget ?? 2000
|
|
352
|
+
codePackTokenBudget: budget.codePackTokenBudget ?? 2000,
|
|
353
|
+
wrongnessByModule
|
|
346
354
|
}),
|
|
347
355
|
claims: selected.map((c) => {
|
|
348
356
|
const anchor = anchorsById.get(c.id);
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { nowIso, randomId, sha256 } from '../fsx.js';
|
|
2
|
+
import { moduleIdsForPath } from '../triwiki/triwiki-module-card.js';
|
|
2
3
|
export const WRONGNESS_RECORD_SCHEMA = 'sks.triwiki-wrongness.v1';
|
|
3
4
|
export const WRONGNESS_LEDGER_SCHEMA = 'sks.triwiki-wrongness-ledger.v1';
|
|
4
5
|
export const WRONGNESS_INDEX_SCHEMA = 'sks.triwiki-wrongness-index.v1';
|
|
@@ -122,6 +123,8 @@ export function createWrongnessRecord(input = {}) {
|
|
|
122
123
|
const avoidanceText = stringOrNull(asRecord(row.avoidance_rule).text)
|
|
123
124
|
|| stringOrNull(row.avoidance_rule)
|
|
124
125
|
|| defaultAvoidanceRule(kind, claim.text);
|
|
126
|
+
const links = normalizeLinks(row.links);
|
|
127
|
+
const moduleIds = moduleIdsForWrongness(links.files);
|
|
125
128
|
return {
|
|
126
129
|
schema: WRONGNESS_RECORD_SCHEMA,
|
|
127
130
|
id: stringOrNull(row.id) || wrongnessId(kind),
|
|
@@ -140,11 +143,25 @@ export function createWrongnessRecord(input = {}) {
|
|
|
140
143
|
corrective_action: normalizeCorrectiveAction(row.corrective_action),
|
|
141
144
|
avoidance_rule: normalizeAvoidanceRule(row.avoidance_rule, kind, avoidanceText, severity),
|
|
142
145
|
correction: normalizeCorrection(row.correction ?? row.corrected_anchor),
|
|
143
|
-
links
|
|
146
|
+
links,
|
|
147
|
+
...(moduleIds.length ? { module_ids: moduleIds } : (Array.isArray(row.module_ids) ? { module_ids: stringList(row.module_ids) } : {})),
|
|
144
148
|
...(row.rule_compiled === undefined ? {} : { rule_compiled: Boolean(row.rule_compiled) }),
|
|
145
149
|
...(row.compiled_rule_id === undefined ? {} : { compiled_rule_id: stringOrNull(row.compiled_rule_id) })
|
|
146
150
|
};
|
|
147
151
|
}
|
|
152
|
+
/** Best-effort module attribution from the wrongness's linked files. Excludes the
|
|
153
|
+
* 'unknown' sentinel moduleIdsForPath returns for unmapped paths, so a record only
|
|
154
|
+
* carries module_ids when at least one file maps to a real TriWiki module. */
|
|
155
|
+
function moduleIdsForWrongness(files) {
|
|
156
|
+
const ids = new Set();
|
|
157
|
+
for (const file of files) {
|
|
158
|
+
for (const id of moduleIdsForPath(String(file || ''))) {
|
|
159
|
+
if (id && id !== 'unknown')
|
|
160
|
+
ids.add(id);
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
return [...ids];
|
|
164
|
+
}
|
|
148
165
|
export function emptyWrongnessLedger(scope = 'project', missionId = null) {
|
|
149
166
|
return {
|
|
150
167
|
schema: WRONGNESS_LEDGER_SCHEMA,
|
package/dist/core/version.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export const PACKAGE_VERSION = '5.6.
|
|
1
|
+
export const PACKAGE_VERSION = '5.6.1';
|
|
2
2
|
//# sourceMappingURL=version.js.map
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "sneakoscope",
|
|
3
3
|
"displayName": "ㅅㅋㅅ",
|
|
4
|
-
"version": "5.6.
|
|
4
|
+
"version": "5.6.1",
|
|
5
5
|
"description": "Sneakoscope Codex: fast proof-first Codex trust layer with image-based Voxel TriWiki.",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"homepage": "https://github.com/mandarange/Sneakoscope-Codex#readme",
|