arkaos 4.13.2 → 4.14.0

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.
Files changed (130) hide show
  1. package/VERSION +1 -1
  2. package/arka/SKILL.md +16 -0
  3. package/bin/arka-doctor +20 -1
  4. package/config/cognition/schedules.yaml +16 -0
  5. package/config/hooks/_lib/fastpath/engine.cjs +337 -0
  6. package/config/hooks/gate-manifest.json +741 -0
  7. package/config/hooks/post-tool-use.cjs +113 -0
  8. package/config/hooks/pre-tool-use.cjs +109 -0
  9. package/config/hooks/session-end.ps1 +40 -0
  10. package/config/hooks/session-end.sh +55 -0
  11. package/config/hooks/session-start.sh +25 -189
  12. package/config/hooks/subagent-stop.ps1 +40 -0
  13. package/config/hooks/subagent-stop.sh +56 -0
  14. package/config/mcp-policy.yaml +8 -0
  15. package/config/skills-curated.yaml +39 -0
  16. package/config/statusline.sh +57 -1
  17. package/core/cognition/capture/__pycache__/store.cpython-313.pyc +0 -0
  18. package/core/cognition/capture/store.py +7 -2
  19. package/core/evals/__pycache__/__init__.cpython-314.pyc +0 -0
  20. package/core/evals/__pycache__/sanitizer.cpython-314.pyc +0 -0
  21. package/core/evals/__pycache__/schema.cpython-314.pyc +0 -0
  22. package/core/evals/__pycache__/verdict_labels.cpython-314.pyc +0 -0
  23. package/core/forge/__pycache__/complexity.cpython-314.pyc +0 -0
  24. package/core/governance/__pycache__/evidence_checks.cpython-313.pyc +0 -0
  25. package/core/governance/__pycache__/judge.cpython-314.pyc +0 -0
  26. package/core/governance/__pycache__/leak_scanner.cpython-314.pyc +0 -0
  27. package/core/governance/__pycache__/qg_verdict.cpython-314.pyc +0 -0
  28. package/core/governance/__pycache__/routing_feedback.cpython-313.pyc +0 -0
  29. package/core/governance/__pycache__/routing_feedback.cpython-314.pyc +0 -0
  30. package/core/governance/__pycache__/routing_feedback_cli.cpython-313.pyc +0 -0
  31. package/core/governance/evidence_checks.py +42 -7
  32. package/core/governance/routing_feedback.py +229 -0
  33. package/core/governance/routing_feedback_cli.py +49 -0
  34. package/core/hooks/__pycache__/_shared.cpython-312.pyc +0 -0
  35. package/core/hooks/__pycache__/gate_manifest.cpython-313.pyc +0 -0
  36. package/core/hooks/__pycache__/post_tool_use.cpython-312.pyc +0 -0
  37. package/core/hooks/__pycache__/post_tool_use.cpython-313.pyc +0 -0
  38. package/core/hooks/__pycache__/pre_tool_use.cpython-312.pyc +0 -0
  39. package/core/hooks/__pycache__/session_end.cpython-313.pyc +0 -0
  40. package/core/hooks/__pycache__/session_start.cpython-312.pyc +0 -0
  41. package/core/hooks/__pycache__/session_start.cpython-313.pyc +0 -0
  42. package/core/hooks/__pycache__/stop.cpython-313.pyc +0 -0
  43. package/core/hooks/__pycache__/stop.cpython-314.pyc +0 -0
  44. package/core/hooks/__pycache__/subagent_stop.cpython-313.pyc +0 -0
  45. package/core/hooks/__pycache__/subagent_stop.cpython-314.pyc +0 -0
  46. package/core/hooks/__pycache__/user_prompt_submit.cpython-313.pyc +0 -0
  47. package/core/hooks/__pycache__/user_prompt_submit.cpython-314.pyc +0 -0
  48. package/core/hooks/gate_manifest.py +366 -0
  49. package/core/hooks/post_tool_use.py +5 -2
  50. package/core/hooks/session_end.py +127 -0
  51. package/core/hooks/session_start.py +322 -0
  52. package/core/hooks/stop.py +69 -0
  53. package/core/hooks/subagent_stop.py +186 -0
  54. package/core/hooks/user_prompt_submit.py +10 -6
  55. package/core/knowledge/__pycache__/embedding_backends.cpython-313.pyc +0 -0
  56. package/core/knowledge/__pycache__/embedding_backends.cpython-314.pyc +0 -0
  57. package/core/knowledge/__pycache__/pattern_cards.cpython-313.pyc +0 -0
  58. package/core/knowledge/__pycache__/pattern_cards.cpython-314.pyc +0 -0
  59. package/core/knowledge/__pycache__/recipes.cpython-314.pyc +0 -0
  60. package/core/knowledge/__pycache__/vector_store.cpython-313.pyc +0 -0
  61. package/core/knowledge/__pycache__/vector_store.cpython-314.pyc +0 -0
  62. package/core/knowledge/embedding_backends.py +278 -0
  63. package/core/knowledge/pattern_cards.py +49 -1
  64. package/core/knowledge/vector_store.py +14 -2
  65. package/core/memory/__pycache__/semantic_store.cpython-312.pyc +0 -0
  66. package/core/memory/__pycache__/semantic_store.cpython-313.pyc +0 -0
  67. package/core/memory/__pycache__/semantic_store.cpython-314.pyc +0 -0
  68. package/core/memory/__pycache__/turn_capture.cpython-313.pyc +0 -0
  69. package/core/memory/__pycache__/turn_capture.cpython-314.pyc +0 -0
  70. package/core/memory/semantic_store.py +301 -0
  71. package/core/memory/turn_capture.py +277 -0
  72. package/core/registry/__pycache__/generator.cpython-312.pyc +0 -0
  73. package/core/runtime/__pycache__/claude_code.cpython-312.pyc +0 -0
  74. package/core/runtime/__pycache__/codex_cli.cpython-312.pyc +0 -0
  75. package/core/runtime/__pycache__/cost_governor.cpython-314.pyc +0 -0
  76. package/core/runtime/__pycache__/gemini_cli.cpython-312.pyc +0 -0
  77. package/core/runtime/__pycache__/llm_cost_telemetry.cpython-312.pyc +0 -0
  78. package/core/runtime/__pycache__/mcp_telemetry.cpython-312.pyc +0 -0
  79. package/core/shared/__pycache__/decay.cpython-313.pyc +0 -0
  80. package/core/shared/__pycache__/decay.cpython-314.pyc +0 -0
  81. package/core/shared/__pycache__/sqlite_recovery.cpython-312.pyc +0 -0
  82. package/core/shared/__pycache__/sqlite_recovery.cpython-313.pyc +0 -0
  83. package/core/shared/__pycache__/sqlite_recovery.cpython-314.pyc +0 -0
  84. package/core/shared/decay.py +94 -0
  85. package/core/shared/sqlite_recovery.py +266 -0
  86. package/core/synapse/__pycache__/agent_experiences_layer.cpython-313.pyc +0 -0
  87. package/core/synapse/__pycache__/agent_experiences_layer.cpython-314.pyc +0 -0
  88. package/core/synapse/__pycache__/engine.cpython-312.pyc +0 -0
  89. package/core/synapse/__pycache__/engine.cpython-313.pyc +0 -0
  90. package/core/synapse/__pycache__/engine.cpython-314.pyc +0 -0
  91. package/core/synapse/__pycache__/layers.cpython-312.pyc +0 -0
  92. package/core/synapse/__pycache__/pattern_library_layer.cpython-314.pyc +0 -0
  93. package/core/synapse/__pycache__/recipe_layer.cpython-313.pyc +0 -0
  94. package/core/synapse/__pycache__/recipe_layer.cpython-314.pyc +0 -0
  95. package/core/synapse/__pycache__/routing_feedback_layer.cpython-313.pyc +0 -0
  96. package/core/synapse/__pycache__/routing_feedback_layer.cpython-314.pyc +0 -0
  97. package/core/synapse/__pycache__/session_memory_layer.cpython-312.pyc +0 -0
  98. package/core/synapse/__pycache__/session_memory_layer.cpython-313.pyc +0 -0
  99. package/core/synapse/__pycache__/session_memory_layer.cpython-314.pyc +0 -0
  100. package/core/synapse/agent_experiences_layer.py +42 -3
  101. package/core/synapse/engine.py +13 -0
  102. package/core/synapse/recipe_layer.py +27 -4
  103. package/core/synapse/routing_feedback_layer.py +132 -0
  104. package/core/synapse/session_memory_layer.py +152 -0
  105. package/core/workflow/__pycache__/__init__.cpython-312.pyc +0 -0
  106. package/core/workflow/__pycache__/design_authorization.cpython-314.pyc +0 -0
  107. package/core/workflow/__pycache__/frontend_gate.cpython-314.pyc +0 -0
  108. package/core/workflow/__pycache__/specialist_enforcer.cpython-314.pyc +0 -0
  109. package/installer/adapters/claude-code.js +37 -0
  110. package/installer/claude-plugins.js +6 -0
  111. package/installer/cli.js +23 -2
  112. package/installer/config-seed.js +25 -16
  113. package/installer/doctor.js +116 -1
  114. package/installer/hook-lib.js +28 -0
  115. package/installer/index.js +48 -153
  116. package/installer/mcp-runner.js +108 -0
  117. package/installer/skill-deploy.js +189 -0
  118. package/installer/skills-mode.js +64 -0
  119. package/installer/update.js +55 -79
  120. package/knowledge/commands-registry.json.bak +171 -4
  121. package/knowledge/skills-manifest.json +2337 -0
  122. package/package.json +1 -1
  123. package/pyproject.toml +9 -1
  124. package/scripts/__pycache__/marketplace_gen.cpython-313.pyc +0 -0
  125. package/scripts/__pycache__/synapse-bridge.cpython-314.pyc +0 -0
  126. package/scripts/marketplace_gen.py +310 -0
  127. package/scripts/tools/__pycache__/docs_stats.cpython-313.pyc +0 -0
  128. package/scripts/tools/__pycache__/skill_budget.cpython-313.pyc +0 -0
  129. package/scripts/tools/docs_stats.py +6 -4
  130. package/scripts/tools/skill_budget.py +209 -0
@@ -0,0 +1,741 @@
1
+ {
2
+ "bash": {
3
+ "discovery_first_tokens": [
4
+ ".",
5
+ "[",
6
+ "ag",
7
+ "alias",
8
+ "apt",
9
+ "awk",
10
+ "brew",
11
+ "cargo",
12
+ "case",
13
+ "cat",
14
+ "choco",
15
+ "command",
16
+ "curl",
17
+ "cut",
18
+ "date",
19
+ "df",
20
+ "docker",
21
+ "du",
22
+ "echo",
23
+ "eval",
24
+ "exec",
25
+ "exit",
26
+ "export",
27
+ "false",
28
+ "file",
29
+ "find",
30
+ "fmt",
31
+ "for",
32
+ "free",
33
+ "function",
34
+ "git",
35
+ "go",
36
+ "grep",
37
+ "head",
38
+ "hostname",
39
+ "id",
40
+ "if",
41
+ "jest",
42
+ "jobs",
43
+ "less",
44
+ "locate",
45
+ "ls",
46
+ "mocha",
47
+ "more",
48
+ "node",
49
+ "npm",
50
+ "ollama",
51
+ "pest",
52
+ "pgrep",
53
+ "php",
54
+ "phpunit",
55
+ "pip",
56
+ "pip3",
57
+ "pnpm",
58
+ "poetry",
59
+ "printf",
60
+ "ps",
61
+ "pwd",
62
+ "pytest",
63
+ "python",
64
+ "python3",
65
+ "return",
66
+ "rg",
67
+ "rspec",
68
+ "ruby",
69
+ "rustc",
70
+ "set",
71
+ "shopt",
72
+ "snap",
73
+ "sort",
74
+ "source",
75
+ "stat",
76
+ "tail",
77
+ "tee",
78
+ "test",
79
+ "tr",
80
+ "trap",
81
+ "tree",
82
+ "true",
83
+ "type",
84
+ "unalias",
85
+ "uname",
86
+ "uniq",
87
+ "uptime",
88
+ "uv",
89
+ "vitest",
90
+ "wait",
91
+ "wc",
92
+ "wget",
93
+ "where",
94
+ "which",
95
+ "while",
96
+ "whoami",
97
+ "winget",
98
+ "yarn"
99
+ ],
100
+ "effect_patterns": [
101
+ {
102
+ "flags": "",
103
+ "js": "(^|[\\s|;&])rm\\s",
104
+ "py": "(^|[\\s|;&])rm\\s"
105
+ },
106
+ {
107
+ "flags": "",
108
+ "js": "(^|[\\s|;&])mv\\s",
109
+ "py": "(^|[\\s|;&])mv\\s"
110
+ },
111
+ {
112
+ "flags": "",
113
+ "js": "(^|[\\s|;&])cp\\s+-[rRf]",
114
+ "py": "(^|[\\s|;&])cp\\s+-[rRf]"
115
+ },
116
+ {
117
+ "flags": "",
118
+ "js": "(^|[\\s|;&])dd\\s",
119
+ "py": "(^|[\\s|;&])dd\\s"
120
+ },
121
+ {
122
+ "flags": "",
123
+ "js": "(^|[\\s|;&])truncate\\s",
124
+ "py": "(^|[\\s|;&])truncate\\s"
125
+ },
126
+ {
127
+ "flags": "",
128
+ "js": "(^|[\\s|;&])touch\\s",
129
+ "py": "(^|[\\s|;&])touch\\s"
130
+ },
131
+ {
132
+ "flags": "",
133
+ "js": "(^|[\\s|;&])mkdir\\s",
134
+ "py": "(^|[\\s|;&])mkdir\\s"
135
+ },
136
+ {
137
+ "flags": "",
138
+ "js": "(^|[\\s|;&])rmdir\\s",
139
+ "py": "(^|[\\s|;&])rmdir\\s"
140
+ },
141
+ {
142
+ "flags": "",
143
+ "js": "(^|[\\s|;&])ln\\s+-s",
144
+ "py": "(^|[\\s|;&])ln\\s+-s"
145
+ },
146
+ {
147
+ "flags": "",
148
+ "js": "(^|[\\s|;&])chmod\\s",
149
+ "py": "(^|[\\s|;&])chmod\\s"
150
+ },
151
+ {
152
+ "flags": "",
153
+ "js": "(^|[\\s|;&])chown\\s",
154
+ "py": "(^|[\\s|;&])chown\\s"
155
+ },
156
+ {
157
+ "flags": "",
158
+ "js": "sed\\s+-i",
159
+ "py": "sed\\s+-i"
160
+ },
161
+ {
162
+ "flags": "",
163
+ "js": "perl\\s+-i",
164
+ "py": "perl\\s+-i"
165
+ },
166
+ {
167
+ "flags": "",
168
+ "js": "awk\\s+-i\\s",
169
+ "py": "awk\\s+-i\\s"
170
+ },
171
+ {
172
+ "flags": "",
173
+ "js": "(^|[\\s|;&])kill\\s",
174
+ "py": "(^|[\\s|;&])kill\\s"
175
+ },
176
+ {
177
+ "flags": "",
178
+ "js": "(^|[\\s|;&])killall\\s",
179
+ "py": "(^|[\\s|;&])killall\\s"
180
+ },
181
+ {
182
+ "flags": "",
183
+ "js": "(^|[\\s|;&])pkill\\s",
184
+ "py": "(^|[\\s|;&])pkill\\s"
185
+ },
186
+ {
187
+ "flags": "",
188
+ "js": "(^|[\\s|;&])sudo\\s",
189
+ "py": "(^|[\\s|;&])sudo\\s"
190
+ },
191
+ {
192
+ "flags": "",
193
+ "js": "(^|[\\s|;&])su\\s+-",
194
+ "py": "(^|[\\s|;&])su\\s+-"
195
+ },
196
+ {
197
+ "flags": "",
198
+ "js": "git\\s+(commit|push|merge|rebase|reset\\s+--hard|checkout\\s+-[Bb]|tag\\s|stash|cherry-pick|revert|branch\\s+-[dD])",
199
+ "py": "git\\s+(commit|push|merge|rebase|reset\\s+--hard|checkout\\s+-[Bb]|tag\\s|stash|cherry-pick|revert|branch\\s+-[dD])"
200
+ },
201
+ {
202
+ "flags": "",
203
+ "js": "npm\\s+(install|i|publish|uninstall|update|run\\s+publish)",
204
+ "py": "npm\\s+(install|i|publish|uninstall|update|run\\s+publish)"
205
+ },
206
+ {
207
+ "flags": "",
208
+ "js": "yarn\\s+(add|remove|install|publish|upgrade)",
209
+ "py": "yarn\\s+(add|remove|install|publish|upgrade)"
210
+ },
211
+ {
212
+ "flags": "",
213
+ "js": "pnpm\\s+(add|remove|install|publish|update)",
214
+ "py": "pnpm\\s+(add|remove|install|publish|update)"
215
+ },
216
+ {
217
+ "flags": "",
218
+ "js": "pip3?\\s+install",
219
+ "py": "pip3?\\s+install"
220
+ },
221
+ {
222
+ "flags": "",
223
+ "js": "pip3?\\s+uninstall",
224
+ "py": "pip3?\\s+uninstall"
225
+ },
226
+ {
227
+ "flags": "",
228
+ "js": "uv\\s+pip\\s+install",
229
+ "py": "uv\\s+pip\\s+install"
230
+ },
231
+ {
232
+ "flags": "",
233
+ "js": "poetry\\s+(add|remove|install|publish)",
234
+ "py": "poetry\\s+(add|remove|install|publish)"
235
+ },
236
+ {
237
+ "flags": "",
238
+ "js": "brew\\s+(install|uninstall|upgrade|cleanup)",
239
+ "py": "brew\\s+(install|uninstall|upgrade|cleanup)"
240
+ },
241
+ {
242
+ "flags": "",
243
+ "js": "apt(-get)?\\s+(install|remove|purge|upgrade)",
244
+ "py": "apt(-get)?\\s+(install|remove|purge|upgrade)"
245
+ },
246
+ {
247
+ "flags": "",
248
+ "js": "snap\\s+(install|remove|refresh)",
249
+ "py": "snap\\s+(install|remove|refresh)"
250
+ },
251
+ {
252
+ "flags": "",
253
+ "js": "winget\\s+(install|uninstall|upgrade)",
254
+ "py": "winget\\s+(install|uninstall|upgrade)"
255
+ },
256
+ {
257
+ "flags": "",
258
+ "js": "choco\\s+(install|uninstall|upgrade)",
259
+ "py": "choco\\s+(install|uninstall|upgrade)"
260
+ },
261
+ {
262
+ "flags": "",
263
+ "js": "gh\\s+(pr\\s+create|release\\s+create|issue\\s+create|repo\\s+create|secret\\s+set)",
264
+ "py": "gh\\s+(pr\\s+create|release\\s+create|issue\\s+create|repo\\s+create|secret\\s+set)"
265
+ },
266
+ {
267
+ "flags": "",
268
+ "js": "gh\\s+pr\\s+merge",
269
+ "py": "gh\\s+pr\\s+merge"
270
+ },
271
+ {
272
+ "flags": "",
273
+ "js": "gh\\s+pr\\s+close",
274
+ "py": "gh\\s+pr\\s+close"
275
+ },
276
+ {
277
+ "flags": "",
278
+ "js": "gh\\s+repo\\s+delete",
279
+ "py": "gh\\s+repo\\s+delete"
280
+ },
281
+ {
282
+ "flags": "",
283
+ "js": "docker\\s+(build|push|run|create|rm|kill|stop|start|restart|exec)",
284
+ "py": "docker\\s+(build|push|run|create|rm|kill|stop|start|restart|exec)"
285
+ },
286
+ {
287
+ "flags": "",
288
+ "js": "(^|[\\s|;&])scp\\s",
289
+ "py": "(^|[\\s|;&])scp\\s"
290
+ },
291
+ {
292
+ "flags": "",
293
+ "js": ">\\s*[^&\\s]",
294
+ "py": ">\\s*[^&\\s]"
295
+ },
296
+ {
297
+ "flags": "",
298
+ "js": ">>\\s*[^&\\s]",
299
+ "py": ">>\\s*[^&\\s]"
300
+ }
301
+ ],
302
+ "eval_order": "blacklist-then-whitelist",
303
+ "strip_var_prefix": true,
304
+ "unknown_first_token": "effect"
305
+ },
306
+ "corpora": {
307
+ "bash": [
308
+ {
309
+ "cmd": "git status",
310
+ "expect": "discovery"
311
+ },
312
+ {
313
+ "cmd": "git log --oneline -5",
314
+ "expect": "discovery"
315
+ },
316
+ {
317
+ "cmd": "git commit -m 'x'",
318
+ "expect": "effect"
319
+ },
320
+ {
321
+ "cmd": "git push origin master",
322
+ "expect": "effect"
323
+ },
324
+ {
325
+ "cmd": "ls -la /tmp",
326
+ "expect": "discovery"
327
+ },
328
+ {
329
+ "cmd": "echo hello",
330
+ "expect": "discovery"
331
+ },
332
+ {
333
+ "cmd": "echo hello > out.txt",
334
+ "expect": "effect"
335
+ },
336
+ {
337
+ "cmd": "cat f.txt | grep needle",
338
+ "expect": "discovery"
339
+ },
340
+ {
341
+ "cmd": "FOO=1 BAR=2 grep -r needle .",
342
+ "expect": "discovery"
343
+ },
344
+ {
345
+ "cmd": "FOO=1 rm -rf /tmp/x",
346
+ "expect": "effect"
347
+ },
348
+ {
349
+ "cmd": "rsync -av --dry-run a/ b/",
350
+ "expect": "effect"
351
+ },
352
+ {
353
+ "cmd": "unknowncmd --version",
354
+ "expect": "effect"
355
+ },
356
+ {
357
+ "cmd": "python3 -m pytest tests/",
358
+ "expect": "discovery"
359
+ },
360
+ {
361
+ "cmd": "npm run build",
362
+ "expect": "discovery"
363
+ },
364
+ {
365
+ "cmd": "npm install lodash",
366
+ "expect": "effect"
367
+ },
368
+ {
369
+ "cmd": "docker ps",
370
+ "expect": "discovery"
371
+ },
372
+ {
373
+ "cmd": "docker build -t x .",
374
+ "expect": "effect"
375
+ },
376
+ {
377
+ "cmd": "kill -9 12345",
378
+ "expect": "effect"
379
+ },
380
+ {
381
+ "cmd": "sed -i '' -e s/a/b/ f",
382
+ "expect": "effect"
383
+ },
384
+ {
385
+ "cmd": "curl -s https://example.com",
386
+ "expect": "discovery"
387
+ },
388
+ {
389
+ "cmd": "grep 'a > b' file.txt",
390
+ "expect": "effect"
391
+ },
392
+ {
393
+ "cmd": "",
394
+ "expect": "discovery"
395
+ },
396
+ {
397
+ "cmd": " ",
398
+ "expect": "discovery"
399
+ },
400
+ {
401
+ "cmd": "touch marker",
402
+ "expect": "effect"
403
+ },
404
+ {
405
+ "cmd": "mkdir -p build",
406
+ "expect": "effect"
407
+ },
408
+ {
409
+ "cmd": "FOO=1\ufeffgrep needle file",
410
+ "expect": "effect"
411
+ },
412
+ {
413
+ "cmd": "FOO=1\ufeffFOO=2\ufeffgrep x",
414
+ "expect": "effect"
415
+ },
416
+ {
417
+ "cmd": "FOO=1 \ufeff grep x",
418
+ "expect": "effect"
419
+ },
420
+ {
421
+ "cmd": "FOO=1\u00a0grep x",
422
+ "engine_expect": "effect",
423
+ "expect": "discovery"
424
+ }
425
+ ],
426
+ "error_trigger": [
427
+ {
428
+ "expect": true,
429
+ "output": "Error: something broke"
430
+ },
431
+ {
432
+ "expect": true,
433
+ "output": "fatal: not a git repository"
434
+ },
435
+ {
436
+ "expect": true,
437
+ "output": "2 tests failed"
438
+ },
439
+ {
440
+ "expect": true,
441
+ "output": "ENOENT: no such file"
442
+ },
443
+ {
444
+ "expect": true,
445
+ "output": "panic: runtime error"
446
+ },
447
+ {
448
+ "expect": false,
449
+ "output": "all 14 tests passed"
450
+ },
451
+ {
452
+ "expect": false,
453
+ "output": "ok"
454
+ },
455
+ {
456
+ "expect": false,
457
+ "output": ""
458
+ }
459
+ ],
460
+ "pre_tools": [
461
+ {
462
+ "expect": "fast_allow",
463
+ "tool": "Read"
464
+ },
465
+ {
466
+ "expect": "fast_allow",
467
+ "tool": "Grep"
468
+ },
469
+ {
470
+ "expect": "fast_allow",
471
+ "tool": "Glob"
472
+ },
473
+ {
474
+ "expect": "fast_allow",
475
+ "tool": "TodoWrite"
476
+ },
477
+ {
478
+ "expect": "fast_allow",
479
+ "tool": "ExitPlanMode"
480
+ },
481
+ {
482
+ "expect": "fast_allow",
483
+ "tool": "Agent"
484
+ },
485
+ {
486
+ "expect": "fast_allow",
487
+ "tool": "mcp__obsidian__search_notes"
488
+ },
489
+ {
490
+ "expect": "fast_allow",
491
+ "tool": "mcp__supabase__list_tables"
492
+ },
493
+ {
494
+ "expect": "fast_allow",
495
+ "tool": ""
496
+ },
497
+ {
498
+ "expect": "delegate",
499
+ "tool": "WebSearch"
500
+ },
501
+ {
502
+ "expect": "delegate",
503
+ "tool": "WebFetch"
504
+ },
505
+ {
506
+ "expect": "delegate",
507
+ "tool": "mcp__context7__query-docs"
508
+ },
509
+ {
510
+ "expect": "delegate",
511
+ "tool": "mcp__firecrawl__firecrawl_scrape"
512
+ },
513
+ {
514
+ "expect": "delegate",
515
+ "tool": "Write"
516
+ },
517
+ {
518
+ "expect": "delegate",
519
+ "tool": "Edit"
520
+ },
521
+ {
522
+ "expect": "delegate",
523
+ "tool": "MultiEdit"
524
+ },
525
+ {
526
+ "expect": "delegate",
527
+ "tool": "NotebookEdit"
528
+ },
529
+ {
530
+ "expect": "delegate",
531
+ "tool": "Task"
532
+ },
533
+ {
534
+ "expect": "delegate",
535
+ "tool": "Skill"
536
+ }
537
+ ],
538
+ "session_ids": [
539
+ {
540
+ "expect": true,
541
+ "sid": "abc-123"
542
+ },
543
+ {
544
+ "expect": true,
545
+ "sid": "a.b_c-D9"
546
+ },
547
+ {
548
+ "expect": true,
549
+ "sid": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
550
+ },
551
+ {
552
+ "expect": false,
553
+ "sid": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
554
+ },
555
+ {
556
+ "expect": false,
557
+ "sid": "."
558
+ },
559
+ {
560
+ "expect": false,
561
+ "sid": ".."
562
+ },
563
+ {
564
+ "expect": false,
565
+ "sid": "..."
566
+ },
567
+ {
568
+ "expect": false,
569
+ "sid": "a/../b"
570
+ },
571
+ {
572
+ "expect": false,
573
+ "sid": "a b"
574
+ },
575
+ {
576
+ "expect": false,
577
+ "sid": ""
578
+ },
579
+ {
580
+ "expect": false,
581
+ "sid": "sess\u00e3o"
582
+ }
583
+ ]
584
+ },
585
+ "env": {
586
+ "kill_switch": "ARKA_HOOK_FASTPATH",
587
+ "kill_switch_off_value": "0"
588
+ },
589
+ "flags": {
590
+ "budget": {
591
+ "active_when": "float(value) > 0",
592
+ "cap_keys": [
593
+ "hardCapUsd",
594
+ "dailyCapUsd"
595
+ ],
596
+ "on_corrupt": "no-cap",
597
+ "on_missing_file": "no-cap",
598
+ "section": "budget"
599
+ },
600
+ "hardEnforcement": {
601
+ "coercion": "python-truthy",
602
+ "on_corrupt": false,
603
+ "on_missing_file": false,
604
+ "path": [
605
+ "hooks",
606
+ "hardEnforcement"
607
+ ]
608
+ }
609
+ },
610
+ "home_paths": {
611
+ "config": ".arkaos/config.json",
612
+ "telemetry_enforcement": ".arkaos/telemetry/enforcement.jsonl",
613
+ "telemetry_kb_first": ".arkaos/telemetry/kb_first.jsonl",
614
+ "telemetry_mcp": ".arkaos/telemetry/mcp-usage.jsonl"
615
+ },
616
+ "io_contract": {
617
+ "post": {
618
+ "fail_open_exit": 0,
619
+ "fail_open_stdout": "{}",
620
+ "success_stdout": "{}"
621
+ },
622
+ "pre": {
623
+ "allow_stdout": "",
624
+ "fail_open_exit": 0
625
+ }
626
+ },
627
+ "numbers": {
628
+ "assistant_window": 20,
629
+ "auth_ttl_seconds": 43200,
630
+ "grace_cap": 3
631
+ },
632
+ "platform": "posix",
633
+ "post": {
634
+ "error_trigger": {
635
+ "flags": "i",
636
+ "js": "(error:|fatal:|exception:|failed|ENOENT|EACCES|EPERM|panic:)",
637
+ "py": "(error:|fatal:|exception:|failed|ENOENT|EACCES|EPERM|panic:)"
638
+ },
639
+ "success_exit_codes": [
640
+ "0",
641
+ ""
642
+ ]
643
+ },
644
+ "schema_version": 1,
645
+ "session_id": {
646
+ "flags": "",
647
+ "js": "^[A-Za-z0-9._-]{1,128}$",
648
+ "py": "^[A-Za-z0-9._-]{1,128}$",
649
+ "reject_dot_only": true
650
+ },
651
+ "source_modules": [
652
+ "core.hooks.post_tool_use",
653
+ "core.hooks.pre_tool_use",
654
+ "core.runtime.cost_governor",
655
+ "core.runtime.mcp_telemetry",
656
+ "core.shared.safe_session_id",
657
+ "core.shared.temp_paths",
658
+ "core.workflow.flow_authorization",
659
+ "core.workflow.flow_enforcer",
660
+ "core.workflow.research_gate"
661
+ ],
662
+ "state_dirs": {
663
+ "flow_auth_dirname": "arkaos-flow-auth",
664
+ "flow_auth_env_override": "ARKA_FLOW_AUTH_DIR",
665
+ "flow_auth_file": "{sid}.json",
666
+ "tmp_base_posix": "/tmp"
667
+ },
668
+ "telemetry": {
669
+ "enforcement_prefix_keys": [
670
+ "ts",
671
+ "session_id",
672
+ "tool",
673
+ "cwd"
674
+ ],
675
+ "enforcement_template": {
676
+ "allow": true,
677
+ "approval_state": "",
678
+ "bypass_used": false,
679
+ "marker_found": null,
680
+ "phase_observed": null,
681
+ "reason": "tool-not-gated",
682
+ "warning": ""
683
+ },
684
+ "kb_first_prefix_keys": [
685
+ "ts",
686
+ "session_id",
687
+ "tool"
688
+ ],
689
+ "kb_first_template": {
690
+ "allow": true,
691
+ "bypass_used": false,
692
+ "kb_hits_hint": [],
693
+ "nudge": false,
694
+ "reason": "tool-not-gated",
695
+ "stderr_msg": ""
696
+ },
697
+ "mcp_keys": [
698
+ "ts",
699
+ "server",
700
+ "tool",
701
+ "session"
702
+ ],
703
+ "mcp_prefix": "mcp__",
704
+ "ts_format": "python-utc-isoformat"
705
+ },
706
+ "tools": {
707
+ "effect_always": [
708
+ "Edit",
709
+ "MultiEdit",
710
+ "NotebookEdit",
711
+ "Skill",
712
+ "Task",
713
+ "Write"
714
+ ],
715
+ "flow_gated": [
716
+ "Bash",
717
+ "Edit",
718
+ "MultiEdit",
719
+ "NotebookEdit",
720
+ "Skill",
721
+ "Task",
722
+ "Write"
723
+ ],
724
+ "post_delegate_always": [
725
+ "Agent",
726
+ "ExitPlanMode",
727
+ "Task"
728
+ ],
729
+ "research_external": [
730
+ "WebFetch",
731
+ "WebSearch",
732
+ "mcp__context7__query-docs",
733
+ "mcp__context7__resolve-library-id",
734
+ "mcp__firecrawl__firecrawl_crawl",
735
+ "mcp__firecrawl__firecrawl_extract",
736
+ "mcp__firecrawl__firecrawl_map",
737
+ "mcp__firecrawl__firecrawl_scrape",
738
+ "mcp__firecrawl__firecrawl_search"
739
+ ]
740
+ }
741
+ }