sneakoscope 4.8.6 → 4.8.7
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/README.md +14 -14
- 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/cli/command-registry.js +63 -41
- package/dist/cli/install-helpers.js +115 -47
- package/dist/cli/router.js +58 -2
- package/dist/commands/codex-lb.js +4 -4
- package/dist/commands/doctor.js +85 -3
- package/dist/commands/zellij-monitor-pane.js +25 -0
- package/dist/commands/zellij-slot-pane.js +39 -2
- package/dist/commands/zellij-viewport-pane.js +56 -0
- package/dist/commands/zellij.js +55 -2
- package/dist/config/skills-manifest.json +465 -0
- package/dist/core/agents/agent-lifecycle.js +86 -35
- package/dist/core/agents/agent-orchestrator.js +19 -10
- package/dist/core/agents/agent-patch-queue-store.js +14 -3
- package/dist/core/agents/agent-patch-queue.js +4 -0
- package/dist/core/agents/agent-scheduler.js +2 -3
- package/dist/core/agents/native-cli-session-swarm.js +30 -13
- package/dist/core/agents/native-cli-worker.js +2 -1
- package/dist/core/auto-review.js +25 -4
- package/dist/core/codex/agent-config-file-repair.js +15 -2
- package/dist/core/codex/codex-config-eperm-repair.js +8 -2
- package/dist/core/codex/codex-config-guard.js +289 -0
- package/dist/core/codex/codex-config-toml.js +122 -0
- package/dist/core/codex/codex-project-config-policy.js +59 -7
- package/dist/core/codex-app/sks-menubar.js +767 -122
- package/dist/core/codex-control/codex-fake-sdk-adapter.js +6 -4
- package/dist/core/codex-control/codex-task-runner.js +32 -14
- package/dist/core/codex-control/python-codex-sdk-adapter.js +4 -1
- package/dist/core/codex-lb/codex-lb-setup.js +2 -5
- package/dist/core/codex-native/skill-registry-ledger.js +24 -5
- package/dist/core/commands/command-utils.js +22 -2
- package/dist/core/commands/fast-mode-command.js +36 -11
- package/dist/core/commands/mad-sks-command.js +18 -5
- package/dist/core/commands/menubar-command.js +125 -0
- package/dist/core/commands/pipeline-command.js +21 -2
- package/dist/core/commands/route-command.js +62 -0
- package/dist/core/commands/status-command.js +21 -1
- package/dist/core/commands/team-legacy-observe-command.js +221 -3
- package/dist/core/commands/uninstall-command.js +298 -0
- package/dist/core/db-safety.js +5 -1
- package/dist/core/doctor/codex-startup-config-repair.js +14 -3
- package/dist/core/doctor/confirm-repair.js +27 -0
- package/dist/core/doctor/context7-mcp-repair.js +35 -7
- package/dist/core/doctor/doctor-codex-startup-repair.js +10 -3
- package/dist/core/doctor/doctor-context7-repair.js +17 -4
- package/dist/core/doctor/doctor-dirty-planner.js +27 -9
- package/dist/core/doctor/doctor-native-capability-repair.js +12 -2
- package/dist/core/doctor/doctor-readiness-matrix.js +27 -2
- package/dist/core/doctor/doctor-repair-postcheck.js +4 -0
- package/dist/core/doctor/doctor-transaction.js +13 -5
- package/dist/core/doctor/supabase-mcp-repair.js +23 -5
- package/dist/core/feature-fixtures.js +10 -3
- package/dist/core/feature-registry.js +4 -1
- package/dist/core/fsx.js +58 -2
- package/dist/core/hooks-runtime/skill-reconcile-preflight.js +43 -0
- package/dist/core/hooks-runtime.js +86 -46
- package/dist/core/init/skills.js +261 -9
- package/dist/core/init.js +13 -10
- package/dist/core/mad-db/mad-db-coordinator.js +3 -3
- package/dist/core/mission.js +138 -5
- package/dist/core/naruto/naruto-active-pool.js +69 -26
- package/dist/core/naruto/naruto-backpressure.js +5 -1
- package/dist/core/naruto/naruto-real-worker-runtime.js +9 -7
- package/dist/core/naruto/resource-pressure-monitor.js +33 -15
- package/dist/core/pipeline-internals/runtime-core.js +62 -220
- package/dist/core/pipeline-internals/runtime-gates.js +113 -24
- package/dist/core/questions.js +1 -1
- package/dist/core/recallpulse.js +1 -1
- package/dist/core/release/gate-manifest.js +2 -2
- package/dist/core/release/release-gate-affected-selector.js +3 -10
- package/dist/core/release/release-gate-batch-runner.js +4 -2
- package/dist/core/release/release-gate-cache-v2.js +27 -14
- package/dist/core/release/release-gate-dag.js +6 -1
- package/dist/core/release/release-gate-hermetic-env.js +10 -0
- package/dist/core/retention.js +89 -4
- package/dist/core/routes/diagnostic-allowlist.js +55 -0
- package/dist/core/routes.js +18 -15
- package/dist/core/skill-forge.js +9 -4
- package/dist/core/stop-gate/stop-gate-check.js +10 -3
- package/dist/core/stop-gate/stop-gate-resolver.js +19 -3
- package/dist/core/stop-gate/stop-gate-writer.js +16 -1
- package/dist/core/team-dag.js +12 -465
- package/dist/core/team-dashboard-renderer.js +13 -94
- package/dist/core/team-live.js +68 -804
- package/dist/core/update/update-migration-state.js +20 -30
- package/dist/core/update-check.js +28 -2
- package/dist/core/version.js +1 -1
- package/dist/core/zellij/zellij-layout-builder.js +44 -16
- package/dist/core/zellij/zellij-monitor-renderer.js +53 -0
- package/dist/core/zellij/zellij-self-heal.js +18 -26
- package/dist/core/zellij/zellij-slot-pane-renderer.js +162 -153
- package/dist/core/zellij/zellij-slot-telemetry.js +2 -0
- package/dist/core/zellij/zellij-theme.js +67 -0
- package/dist/core/zellij/zellij-ui-mode.js +16 -0
- package/dist/core/zellij/zellij-viewport-binder.js +59 -0
- package/dist/core/zellij/zellij-worker-pane-manager.js +53 -5
- package/dist/scripts/agent-patch-swarm-gate-lib.js +2 -2
- package/dist/scripts/build-dist.js +8 -0
- package/dist/scripts/codex-lb-fast-ui-preservation-check.js +106 -0
- package/dist/scripts/codex-lb-gpt55-fast-profile-check.js +105 -0
- package/dist/scripts/codex-lb-missing-env-regression.js +2 -3
- package/dist/scripts/codex-project-config-policy-merge-regression.js +3 -3
- package/dist/scripts/concurrent-session-collision-check.js +67 -0
- package/dist/scripts/core-skill-integrity-blackbox.js +3 -4
- package/dist/scripts/docs-truthfulness-check.js +1 -1
- package/dist/scripts/gate-policy-audit-check.js +130 -0
- package/dist/scripts/hook-latency-budget-check.js +45 -0
- package/dist/scripts/lib/codex-sdk-gate-lib.js +2 -2
- package/dist/scripts/lib/real-codex-parallel-gate.js +2 -2
- package/dist/scripts/loop-directive-check-lib.js +1 -1
- package/dist/scripts/mad-db-real-supabase-e2e.js +2 -2
- package/dist/scripts/mad-sks-zellij-default-pane-worker-check.js +3 -2
- package/dist/scripts/mad-sks-zellij-launch-check.js +1 -1
- package/dist/scripts/naruto-zellij-dynamic-right-column-check.js +7 -7
- package/dist/scripts/parallel-claim-enforcement-check.js +14 -5
- package/dist/scripts/project-skill-dedupe-check.js +23 -5
- package/dist/scripts/release-affected-selector-check.js +2 -2
- package/dist/scripts/release-cache-glob-hashing-check.js +1 -0
- package/dist/scripts/release-gate-dag-runner-check.js +10 -2
- package/dist/scripts/release-gate-dag-runner.js +8 -0
- package/dist/scripts/release-readiness-report.js +38 -7
- package/dist/scripts/release-stability-report-check.js +12 -8
- package/dist/scripts/search-visibility-gate-lib.js +2 -2
- package/dist/scripts/skills-manifest-continuity-check.js +46 -0
- package/dist/scripts/sks-menubar-install-check.js +87 -21
- package/dist/scripts/sks-uninstall-regression-check.js +54 -0
- package/dist/scripts/uninstall-inventory-check.js +3 -0
- package/dist/scripts/zellij-initial-main-only-blackbox.js +4 -4
- package/dist/scripts/zellij-layout-valid-check.js +18 -11
- package/dist/scripts/zellij-right-column-geometry-proof.js +2 -4
- package/dist/scripts/zellij-slot-pane-renderer-check.js +9 -9
- package/dist/scripts/zellij-slot-pane-stale-detection-check.js +3 -4
- package/dist/scripts/zellij-slot-pane-telemetry-renderer-check.js +3 -2
- package/dist/scripts/zellij-slot-telemetry-renderer-check.js +4 -2
- package/dist/scripts/zellij-spawn-on-demand-layout-check.js +8 -2
- package/dist/scripts/zellij-viewport-binder-check.js +9 -0
- package/package.json +4 -1
|
@@ -0,0 +1,465 @@
|
|
|
1
|
+
{
|
|
2
|
+
"schema": "sks.skills-manifest.v1",
|
|
3
|
+
"package_version": "4.8.7",
|
|
4
|
+
"skills": [
|
|
5
|
+
{
|
|
6
|
+
"canonical_name": "answer",
|
|
7
|
+
"type": "official",
|
|
8
|
+
"content_sha256": "eb501fbc70c0ba8fd6df6abcbe5cda0bc39693e0f0abc6c8867f4ef441fa793d",
|
|
9
|
+
"hash_history": [],
|
|
10
|
+
"deprecated_aliases": []
|
|
11
|
+
},
|
|
12
|
+
{
|
|
13
|
+
"canonical_name": "autoresearch",
|
|
14
|
+
"type": "official",
|
|
15
|
+
"content_sha256": "1250cf46bc3fa1c66c4b5a44315631848a4ef5c326ad194aca0f964d274ffcf8",
|
|
16
|
+
"hash_history": [],
|
|
17
|
+
"deprecated_aliases": []
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
"canonical_name": "autoresearch-loop",
|
|
21
|
+
"type": "official",
|
|
22
|
+
"content_sha256": "2baab5c1b25d265494981303ae4c33715dc27154f64662badf447a7d88f1117f",
|
|
23
|
+
"hash_history": [],
|
|
24
|
+
"deprecated_aliases": []
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
"canonical_name": "commit",
|
|
28
|
+
"type": "official",
|
|
29
|
+
"content_sha256": "aa6a9593461eba7abd11b8c9bc035d9a1d496f1798fb013ec09288777d1f3c43",
|
|
30
|
+
"hash_history": [],
|
|
31
|
+
"deprecated_aliases": []
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
"canonical_name": "commit-and-push",
|
|
35
|
+
"type": "official",
|
|
36
|
+
"content_sha256": "7866ccc825979a7a501f905485c91b10d73f646292b5d5fd07111928afe324fa",
|
|
37
|
+
"hash_history": [],
|
|
38
|
+
"deprecated_aliases": []
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
"canonical_name": "computer-use",
|
|
42
|
+
"type": "core",
|
|
43
|
+
"content_sha256": "e48807f0d69c4499ca93d22314207030150950d0ffa033f448681257d9db45de",
|
|
44
|
+
"hash_history": [],
|
|
45
|
+
"deprecated_aliases": []
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
"canonical_name": "computer-use-fast",
|
|
49
|
+
"type": "official",
|
|
50
|
+
"content_sha256": "7d7dd5da1b4e7e673183f736dc0b9adf1b3235d18dfa17dc616e2e5a3f77429f",
|
|
51
|
+
"hash_history": [],
|
|
52
|
+
"deprecated_aliases": []
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
"canonical_name": "context7-docs",
|
|
56
|
+
"type": "official",
|
|
57
|
+
"content_sha256": "bac43a8e4c8fd76b994e7af28b0ce2d56306dcaac72136328ebb3514b988bbbd",
|
|
58
|
+
"hash_history": [],
|
|
59
|
+
"deprecated_aliases": []
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
"canonical_name": "cu",
|
|
63
|
+
"type": "official",
|
|
64
|
+
"content_sha256": "96bb1df88ff15a94e91d903d2eac5bf0ffd49d8f6365d71818cd4ffa8c936b3f",
|
|
65
|
+
"hash_history": [],
|
|
66
|
+
"deprecated_aliases": []
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
"canonical_name": "db",
|
|
70
|
+
"type": "official",
|
|
71
|
+
"content_sha256": "b3e208167c5a01b4e88f8ac2026dbdf3d8a9f7976fe5bb1aabc60b5035da8278",
|
|
72
|
+
"hash_history": [],
|
|
73
|
+
"deprecated_aliases": []
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
"canonical_name": "db-safety-guard",
|
|
77
|
+
"type": "official",
|
|
78
|
+
"content_sha256": "49eef27e8c37732660a5ebe26b47a84e7e7cc685917b0acbdf7eb3a94e366887",
|
|
79
|
+
"hash_history": [],
|
|
80
|
+
"deprecated_aliases": []
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
"canonical_name": "design-artifact-expert",
|
|
84
|
+
"type": "official",
|
|
85
|
+
"content_sha256": "5c023adcb40a555b4698179945c3b79322719d6dc3369a0947a261d31b751db0",
|
|
86
|
+
"hash_history": [],
|
|
87
|
+
"deprecated_aliases": []
|
|
88
|
+
},
|
|
89
|
+
{
|
|
90
|
+
"canonical_name": "design-system-builder",
|
|
91
|
+
"type": "official",
|
|
92
|
+
"content_sha256": "bec2bddc9009a670de33df3787103c8f8206f5a17070b8cb64bbab184fba2053",
|
|
93
|
+
"hash_history": [],
|
|
94
|
+
"deprecated_aliases": []
|
|
95
|
+
},
|
|
96
|
+
{
|
|
97
|
+
"canonical_name": "design-ui-editor",
|
|
98
|
+
"type": "official",
|
|
99
|
+
"content_sha256": "6c3fe7738cd62378ab33aeac103f372d8e0726288e42a9ce1d2cf2caa0ace1f3",
|
|
100
|
+
"hash_history": [],
|
|
101
|
+
"deprecated_aliases": []
|
|
102
|
+
},
|
|
103
|
+
{
|
|
104
|
+
"canonical_name": "dfix",
|
|
105
|
+
"type": "core",
|
|
106
|
+
"content_sha256": "16a1985bce1bd358fa3be80fbf7016c253e5360b8fc2b9f182a4ba09b63d4745",
|
|
107
|
+
"hash_history": [],
|
|
108
|
+
"deprecated_aliases": []
|
|
109
|
+
},
|
|
110
|
+
{
|
|
111
|
+
"canonical_name": "fast-mode",
|
|
112
|
+
"type": "official",
|
|
113
|
+
"content_sha256": "97f152b5575d7b0e24d321d79ec6fe498e60abce562d388ccd45d31732746be5",
|
|
114
|
+
"hash_history": [],
|
|
115
|
+
"deprecated_aliases": []
|
|
116
|
+
},
|
|
117
|
+
{
|
|
118
|
+
"canonical_name": "fast-off",
|
|
119
|
+
"type": "official",
|
|
120
|
+
"content_sha256": "509362aa713498cf0d8c10c8b5c7b7a70b29d78da5dc2fa265d66071e7478115",
|
|
121
|
+
"hash_history": [],
|
|
122
|
+
"deprecated_aliases": []
|
|
123
|
+
},
|
|
124
|
+
{
|
|
125
|
+
"canonical_name": "fast-on",
|
|
126
|
+
"type": "official",
|
|
127
|
+
"content_sha256": "f02f7c8fe1e766ed6c341d059e1ce469a8e5032438bd8381affcdbe4d6d90dde",
|
|
128
|
+
"hash_history": [],
|
|
129
|
+
"deprecated_aliases": []
|
|
130
|
+
},
|
|
131
|
+
{
|
|
132
|
+
"canonical_name": "from-chat-img",
|
|
133
|
+
"type": "official",
|
|
134
|
+
"content_sha256": "8cef38c9f7c97b31378cd626d8fa43a05cfc29cdb62ec6a0bcd77595f7ca8015",
|
|
135
|
+
"hash_history": [],
|
|
136
|
+
"deprecated_aliases": []
|
|
137
|
+
},
|
|
138
|
+
{
|
|
139
|
+
"canonical_name": "getdesign-reference",
|
|
140
|
+
"type": "official",
|
|
141
|
+
"content_sha256": "a86adcfbe2e031b7dd438506efba4ebccd98fba4b9a70392fccdfcb118d19116",
|
|
142
|
+
"hash_history": [],
|
|
143
|
+
"deprecated_aliases": []
|
|
144
|
+
},
|
|
145
|
+
{
|
|
146
|
+
"canonical_name": "goal",
|
|
147
|
+
"type": "official",
|
|
148
|
+
"content_sha256": "35456da6a929270f9df8c54a351bf0a2a867a9b903cc3918cb2e40a040d60ca6",
|
|
149
|
+
"hash_history": [],
|
|
150
|
+
"deprecated_aliases": []
|
|
151
|
+
},
|
|
152
|
+
{
|
|
153
|
+
"canonical_name": "gx",
|
|
154
|
+
"type": "official",
|
|
155
|
+
"content_sha256": "f5e16f2e0c8000ed9672af28090608688a72e983304451f2f13a4c70a4a21d53",
|
|
156
|
+
"hash_history": [],
|
|
157
|
+
"deprecated_aliases": []
|
|
158
|
+
},
|
|
159
|
+
{
|
|
160
|
+
"canonical_name": "gx-visual-generate",
|
|
161
|
+
"type": "official",
|
|
162
|
+
"content_sha256": "15d184b6b1fe61706764568868709b912024ab8ad0e416fbaeaa480e3182c1f9",
|
|
163
|
+
"hash_history": [],
|
|
164
|
+
"deprecated_aliases": []
|
|
165
|
+
},
|
|
166
|
+
{
|
|
167
|
+
"canonical_name": "gx-visual-read",
|
|
168
|
+
"type": "official",
|
|
169
|
+
"content_sha256": "99878b9fa667228676dc2d3b0f53ecdda8c62df94684697ad53f96699d95d5bc",
|
|
170
|
+
"hash_history": [],
|
|
171
|
+
"deprecated_aliases": []
|
|
172
|
+
},
|
|
173
|
+
{
|
|
174
|
+
"canonical_name": "gx-visual-validate",
|
|
175
|
+
"type": "official",
|
|
176
|
+
"content_sha256": "8a095b1d2212ac197a7912ebc64653d5f8cb3872d9bb4b5e525814ba7158ee96",
|
|
177
|
+
"hash_history": [],
|
|
178
|
+
"deprecated_aliases": []
|
|
179
|
+
},
|
|
180
|
+
{
|
|
181
|
+
"canonical_name": "help",
|
|
182
|
+
"type": "official",
|
|
183
|
+
"content_sha256": "5bb21aef1078642511505a5cdc02f6a631767201255eaba3c721ca3530c47e54",
|
|
184
|
+
"hash_history": [],
|
|
185
|
+
"deprecated_aliases": []
|
|
186
|
+
},
|
|
187
|
+
{
|
|
188
|
+
"canonical_name": "honest-mode",
|
|
189
|
+
"type": "official",
|
|
190
|
+
"content_sha256": "506335fe70355dfe1b045ab13e4fb746f49fc7169433ce18fec74b0c04eb987d",
|
|
191
|
+
"hash_history": [],
|
|
192
|
+
"deprecated_aliases": []
|
|
193
|
+
},
|
|
194
|
+
{
|
|
195
|
+
"canonical_name": "hproof-claim-ledger",
|
|
196
|
+
"type": "official",
|
|
197
|
+
"content_sha256": "837743afc2f559fbd294cf916b73f68d907f3bcc275c9d340342c9e876da238d",
|
|
198
|
+
"hash_history": [],
|
|
199
|
+
"deprecated_aliases": []
|
|
200
|
+
},
|
|
201
|
+
{
|
|
202
|
+
"canonical_name": "hproof-evidence-bind",
|
|
203
|
+
"type": "official",
|
|
204
|
+
"content_sha256": "0ad34819b743ba3644d851c37b0a964b7aa19b3b8f79107f271f0a75b37f69a2",
|
|
205
|
+
"hash_history": [],
|
|
206
|
+
"deprecated_aliases": []
|
|
207
|
+
},
|
|
208
|
+
{
|
|
209
|
+
"canonical_name": "image-ux-review",
|
|
210
|
+
"type": "core",
|
|
211
|
+
"content_sha256": "ee7b79b4088ec236cfeb3957286970f63ae635f7c00b3d7cb7ee45c2deabb9b1",
|
|
212
|
+
"hash_history": [],
|
|
213
|
+
"deprecated_aliases": []
|
|
214
|
+
},
|
|
215
|
+
{
|
|
216
|
+
"canonical_name": "imagegen",
|
|
217
|
+
"type": "official",
|
|
218
|
+
"content_sha256": "e8bdd4695a6e716ccfe19ed591d03710aaf0c8e1529196d3fd6c2fd2b84c8de1",
|
|
219
|
+
"hash_history": [],
|
|
220
|
+
"deprecated_aliases": []
|
|
221
|
+
},
|
|
222
|
+
{
|
|
223
|
+
"canonical_name": "imagegen-source-scout",
|
|
224
|
+
"type": "official",
|
|
225
|
+
"content_sha256": "9b7b42e64de3c731ed42c85c8188cea0d6b2a074b87e653c953459b13c777a4f",
|
|
226
|
+
"hash_history": [],
|
|
227
|
+
"deprecated_aliases": []
|
|
228
|
+
},
|
|
229
|
+
{
|
|
230
|
+
"canonical_name": "init-deep",
|
|
231
|
+
"type": "core",
|
|
232
|
+
"content_sha256": "45a0381245a7d2bb0305a269d9feda6abc3bdc569c1e8492f6059c22928e941f",
|
|
233
|
+
"hash_history": [],
|
|
234
|
+
"deprecated_aliases": []
|
|
235
|
+
},
|
|
236
|
+
{
|
|
237
|
+
"canonical_name": "insane-search",
|
|
238
|
+
"type": "official",
|
|
239
|
+
"content_sha256": "3589b5961e7683740c4c397e66a9a31222a5ddbfbd52eb85b2036c4892f14347",
|
|
240
|
+
"hash_history": [],
|
|
241
|
+
"deprecated_aliases": []
|
|
242
|
+
},
|
|
243
|
+
{
|
|
244
|
+
"canonical_name": "kage-bunshin",
|
|
245
|
+
"type": "official",
|
|
246
|
+
"content_sha256": "d5c41416021ef9b77752a576a0e7c583b44274abe4d5bb22d3fc0705b5b1ec19",
|
|
247
|
+
"hash_history": [],
|
|
248
|
+
"deprecated_aliases": []
|
|
249
|
+
},
|
|
250
|
+
{
|
|
251
|
+
"canonical_name": "loop",
|
|
252
|
+
"type": "core",
|
|
253
|
+
"content_sha256": "68e60308a1944c5d7b1207c28ab10490155e04192915b3e7923d95088c45a33a",
|
|
254
|
+
"hash_history": [],
|
|
255
|
+
"deprecated_aliases": []
|
|
256
|
+
},
|
|
257
|
+
{
|
|
258
|
+
"canonical_name": "mad-db",
|
|
259
|
+
"type": "official",
|
|
260
|
+
"content_sha256": "1f57f8f133688de485d7f1739d19fdf611a7a73d353c58c7f1e402e15b233076",
|
|
261
|
+
"hash_history": [],
|
|
262
|
+
"deprecated_aliases": []
|
|
263
|
+
},
|
|
264
|
+
{
|
|
265
|
+
"canonical_name": "mad-sks",
|
|
266
|
+
"type": "official",
|
|
267
|
+
"content_sha256": "26334cc7286c8f289a8a605786231d076d969a0d3e339da5a8ead9a63791694e",
|
|
268
|
+
"hash_history": [],
|
|
269
|
+
"deprecated_aliases": []
|
|
270
|
+
},
|
|
271
|
+
{
|
|
272
|
+
"canonical_name": "naruto",
|
|
273
|
+
"type": "core",
|
|
274
|
+
"content_sha256": "3d523d19e7886ab0ef9b62572df6da4fd837245bd75e4a2dfef40170c08712b0",
|
|
275
|
+
"hash_history": [],
|
|
276
|
+
"deprecated_aliases": [
|
|
277
|
+
"shadow-clone-legacy"
|
|
278
|
+
]
|
|
279
|
+
},
|
|
280
|
+
{
|
|
281
|
+
"canonical_name": "performance-evaluator",
|
|
282
|
+
"type": "official",
|
|
283
|
+
"content_sha256": "d722992ec4d0660f22e489a90da2810a7830c30f493f0fee0e2d4979252e6f5a",
|
|
284
|
+
"hash_history": [],
|
|
285
|
+
"deprecated_aliases": []
|
|
286
|
+
},
|
|
287
|
+
{
|
|
288
|
+
"canonical_name": "pipeline-runner",
|
|
289
|
+
"type": "official",
|
|
290
|
+
"content_sha256": "d7d4ceaceabe0903a04a376954747ee9b6c315a73052c951f5470f488c1d6d1d",
|
|
291
|
+
"hash_history": [],
|
|
292
|
+
"deprecated_aliases": []
|
|
293
|
+
},
|
|
294
|
+
{
|
|
295
|
+
"canonical_name": "ppt",
|
|
296
|
+
"type": "official",
|
|
297
|
+
"content_sha256": "e4c21f41d533f5fc7920a9833e99b9b6e51d62ca682a6d4186a5d5e3b7c88a98",
|
|
298
|
+
"hash_history": [],
|
|
299
|
+
"deprecated_aliases": []
|
|
300
|
+
},
|
|
301
|
+
{
|
|
302
|
+
"canonical_name": "prompt-pipeline",
|
|
303
|
+
"type": "official",
|
|
304
|
+
"content_sha256": "498e88ed0ca59e10db7a2e8835f985254b17a80ae6cfb623a5e747f07a59e1d6",
|
|
305
|
+
"hash_history": [],
|
|
306
|
+
"deprecated_aliases": []
|
|
307
|
+
},
|
|
308
|
+
{
|
|
309
|
+
"canonical_name": "qa-loop",
|
|
310
|
+
"type": "core",
|
|
311
|
+
"content_sha256": "96187a82e955d3c71aff7e27d2d68e4c11954ccad3069ef5b62069a1ec8d78c1",
|
|
312
|
+
"hash_history": [],
|
|
313
|
+
"deprecated_aliases": [
|
|
314
|
+
"qaloop"
|
|
315
|
+
]
|
|
316
|
+
},
|
|
317
|
+
{
|
|
318
|
+
"canonical_name": "reasoning-router",
|
|
319
|
+
"type": "official",
|
|
320
|
+
"content_sha256": "c41ce62468fcccdcc3c2decbf33aed0c524dfe27c31a394064497719aa9b2afa",
|
|
321
|
+
"hash_history": [],
|
|
322
|
+
"deprecated_aliases": []
|
|
323
|
+
},
|
|
324
|
+
{
|
|
325
|
+
"canonical_name": "reflection",
|
|
326
|
+
"type": "official",
|
|
327
|
+
"content_sha256": "4939f70f7378666934c390b421f799eadaa47961654733fbd421a4b4707742a3",
|
|
328
|
+
"hash_history": [],
|
|
329
|
+
"deprecated_aliases": []
|
|
330
|
+
},
|
|
331
|
+
{
|
|
332
|
+
"canonical_name": "release-review",
|
|
333
|
+
"type": "official",
|
|
334
|
+
"content_sha256": "3d8b36cc9013d29ca2435812f32fa7a3ac1e28170252f0d97d46b7f7a84334b5",
|
|
335
|
+
"hash_history": [],
|
|
336
|
+
"deprecated_aliases": []
|
|
337
|
+
},
|
|
338
|
+
{
|
|
339
|
+
"canonical_name": "research",
|
|
340
|
+
"type": "core",
|
|
341
|
+
"content_sha256": "fd0ede8f92775e17249825f53445980af9317bc1d4c786016d08a711695795ff",
|
|
342
|
+
"hash_history": [],
|
|
343
|
+
"deprecated_aliases": []
|
|
344
|
+
},
|
|
345
|
+
{
|
|
346
|
+
"canonical_name": "research-discovery",
|
|
347
|
+
"type": "official",
|
|
348
|
+
"content_sha256": "6a37e3acaf1801e24ce6b70736993502396cff6e4de99c2182020468a3744850",
|
|
349
|
+
"hash_history": [],
|
|
350
|
+
"deprecated_aliases": []
|
|
351
|
+
},
|
|
352
|
+
{
|
|
353
|
+
"canonical_name": "search-visibility-core",
|
|
354
|
+
"type": "core",
|
|
355
|
+
"content_sha256": "0f145feb5908552ec5867e52b410f567b2dc5db66c57969d786d1f23be15b588",
|
|
356
|
+
"hash_history": [],
|
|
357
|
+
"deprecated_aliases": []
|
|
358
|
+
},
|
|
359
|
+
{
|
|
360
|
+
"canonical_name": "seo-geo-optimizer",
|
|
361
|
+
"type": "core",
|
|
362
|
+
"content_sha256": "9bb38a7d7791670402793492e4cebec3e5742fa07a24d377a282556f3ca71802",
|
|
363
|
+
"hash_history": [],
|
|
364
|
+
"deprecated_aliases": []
|
|
365
|
+
},
|
|
366
|
+
{
|
|
367
|
+
"canonical_name": "shadow-clone",
|
|
368
|
+
"type": "official",
|
|
369
|
+
"content_sha256": "013cac960cbf627e04b5c50ff45e15ed824a2863ed8d2a40bca46f8c688b3f8b",
|
|
370
|
+
"hash_history": [],
|
|
371
|
+
"deprecated_aliases": []
|
|
372
|
+
},
|
|
373
|
+
{
|
|
374
|
+
"canonical_name": "sks",
|
|
375
|
+
"type": "official",
|
|
376
|
+
"content_sha256": "ba939b92845092f0f79a749b964cb54c8514a78305731de633f0aae1594464ff",
|
|
377
|
+
"hash_history": [],
|
|
378
|
+
"deprecated_aliases": [
|
|
379
|
+
"ralph",
|
|
380
|
+
"Ralph",
|
|
381
|
+
"ralph-supervisor",
|
|
382
|
+
"ralph-resolver"
|
|
383
|
+
]
|
|
384
|
+
},
|
|
385
|
+
{
|
|
386
|
+
"canonical_name": "solution-scout",
|
|
387
|
+
"type": "official",
|
|
388
|
+
"content_sha256": "35fc6b90f2dae5f07ba9978121a9847c2e6221f6c9f2fa50d9214185a850939f",
|
|
389
|
+
"hash_history": [],
|
|
390
|
+
"deprecated_aliases": []
|
|
391
|
+
},
|
|
392
|
+
{
|
|
393
|
+
"canonical_name": "team",
|
|
394
|
+
"type": "official",
|
|
395
|
+
"content_sha256": "fafb2e51ae9b0f555edb2a940b995162c0b58d0c1ca40998ddce1b9ef3fd5ee2",
|
|
396
|
+
"hash_history": [],
|
|
397
|
+
"deprecated_aliases": [
|
|
398
|
+
"agent-team"
|
|
399
|
+
]
|
|
400
|
+
},
|
|
401
|
+
{
|
|
402
|
+
"canonical_name": "turbo-context-pack",
|
|
403
|
+
"type": "official",
|
|
404
|
+
"content_sha256": "681a9917622120e63e50f13f9f15ea9b1ee24bcda53b56b2995d0670e5a46379",
|
|
405
|
+
"hash_history": [],
|
|
406
|
+
"deprecated_aliases": []
|
|
407
|
+
},
|
|
408
|
+
{
|
|
409
|
+
"canonical_name": "ui-ux-review",
|
|
410
|
+
"type": "official",
|
|
411
|
+
"content_sha256": "dcf08b18a2154ddcbec47142454bf0ce2c2585c1d36fc6b8a00d8b5302420eb4",
|
|
412
|
+
"hash_history": [],
|
|
413
|
+
"deprecated_aliases": []
|
|
414
|
+
},
|
|
415
|
+
{
|
|
416
|
+
"canonical_name": "ultra-search",
|
|
417
|
+
"type": "official",
|
|
418
|
+
"content_sha256": "119a8f2dfcab262a94f95fd3ce5f1d6cc87717052ca3799611df903bd4d14fdf",
|
|
419
|
+
"hash_history": [],
|
|
420
|
+
"deprecated_aliases": []
|
|
421
|
+
},
|
|
422
|
+
{
|
|
423
|
+
"canonical_name": "ux-review",
|
|
424
|
+
"type": "official",
|
|
425
|
+
"content_sha256": "3cb20729475d9466becde13c10785deb104c743898e6d66536edf15e21022447",
|
|
426
|
+
"hash_history": [],
|
|
427
|
+
"deprecated_aliases": []
|
|
428
|
+
},
|
|
429
|
+
{
|
|
430
|
+
"canonical_name": "visual-review",
|
|
431
|
+
"type": "official",
|
|
432
|
+
"content_sha256": "d7bf165e9d04fc4a19b9bac29e158d0f0b6ee2781061d10860ecec9720c5463b",
|
|
433
|
+
"hash_history": [],
|
|
434
|
+
"deprecated_aliases": []
|
|
435
|
+
},
|
|
436
|
+
{
|
|
437
|
+
"canonical_name": "wiki",
|
|
438
|
+
"type": "official",
|
|
439
|
+
"content_sha256": "8257bd01a5439d1ba4518ed62aec06a0b116208774c209913fc82b25208c7c1e",
|
|
440
|
+
"hash_history": [],
|
|
441
|
+
"deprecated_aliases": [
|
|
442
|
+
"wiki-refresh",
|
|
443
|
+
"wikirefresh"
|
|
444
|
+
]
|
|
445
|
+
},
|
|
446
|
+
{
|
|
447
|
+
"canonical_name": "with-local-llm-off",
|
|
448
|
+
"type": "official",
|
|
449
|
+
"content_sha256": "f124a2ce9dca73ee39852ae9356ece2734f157e502bfbd4b5ce64fcdfd0410a5",
|
|
450
|
+
"hash_history": [],
|
|
451
|
+
"deprecated_aliases": []
|
|
452
|
+
},
|
|
453
|
+
{
|
|
454
|
+
"canonical_name": "with-local-llm-on",
|
|
455
|
+
"type": "official",
|
|
456
|
+
"content_sha256": "e81f97104d432081430d664e1e8ce3ff39ff22639c05a18b054f2b16e7f18d64",
|
|
457
|
+
"hash_history": [],
|
|
458
|
+
"deprecated_aliases": []
|
|
459
|
+
}
|
|
460
|
+
],
|
|
461
|
+
"removed_skills": [
|
|
462
|
+
"old-workflow",
|
|
463
|
+
"team-legacy"
|
|
464
|
+
]
|
|
465
|
+
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import path from 'node:path';
|
|
2
|
+
import fsp from 'node:fs/promises';
|
|
2
3
|
import { nowIso, readJson, writeJsonAtomic } from '../fsx.js';
|
|
3
4
|
import { appendAgentLedgerEvent } from './agent-central-ledger.js';
|
|
4
5
|
export const AGENT_LIFECYCLE_STATES = Object.freeze(['planned', 'launching', 'running', 'heartbeat_missing', 'collecting', 'completed', 'failed', 'timed_out', 'closing', 'closed', 'killed']);
|
|
@@ -6,10 +7,12 @@ export const AGENT_HEARTBEAT_INTERVAL_MS = 5000;
|
|
|
6
7
|
export const AGENT_HEARTBEAT_TIMEOUT_MS = 60000;
|
|
7
8
|
export const AGENT_HARD_TIMEOUT_MS = 30 * 60 * 1000;
|
|
8
9
|
const SESSION_LOCKS = new Map();
|
|
9
|
-
|
|
10
|
-
|
|
10
|
+
const AGGREGATE_FLUSH_TIMERS = new Map();
|
|
11
|
+
async function withSessionLock(root, sessionId, fn) {
|
|
12
|
+
const key = `${path.resolve(root)}:${sessionId || 'aggregate'}`;
|
|
13
|
+
const previous = SESSION_LOCKS.get(key) || Promise.resolve();
|
|
11
14
|
const next = previous.catch(() => undefined).then(fn);
|
|
12
|
-
SESSION_LOCKS.set(
|
|
15
|
+
SESSION_LOCKS.set(key, next.catch(() => undefined));
|
|
13
16
|
return next;
|
|
14
17
|
}
|
|
15
18
|
export async function openAgentSession(root, agent) {
|
|
@@ -30,8 +33,7 @@ export async function closeAgentSession(root, agent, status = 'closed') {
|
|
|
30
33
|
return updateSession(root, agent, { status, closed_at: nowIso(), heartbeat_at: nowIso() }, 'session_closed', agent.session_id);
|
|
31
34
|
}
|
|
32
35
|
export async function assertAllAgentSessionsClosed(root) {
|
|
33
|
-
const
|
|
34
|
-
const rows = Object.values(sessions.sessions || {});
|
|
36
|
+
const rows = await readAllSessionRows(root);
|
|
35
37
|
const open = rows.filter((session) => !['closed', 'blocked', 'failed', 'killed', 'timed_out'].includes(String(session.status)));
|
|
36
38
|
const closed = rows.filter((session) => String(session.status) === 'closed');
|
|
37
39
|
return {
|
|
@@ -55,8 +57,7 @@ export async function writeAgentLifecyclePolicy(root) {
|
|
|
55
57
|
return policy;
|
|
56
58
|
}
|
|
57
59
|
export async function writeAgentLifecycleAggregate(root) {
|
|
58
|
-
const
|
|
59
|
-
const rows = Object.values(sessions.sessions || {});
|
|
60
|
+
const rows = await readAllSessionRows(root);
|
|
60
61
|
const aggregate = {
|
|
61
62
|
schema: 'sks.agent-lifecycle-aggregate.v1',
|
|
62
63
|
updated_at: nowIso(),
|
|
@@ -64,6 +65,10 @@ export async function writeAgentLifecycleAggregate(root) {
|
|
|
64
65
|
total_sessions: rows.length,
|
|
65
66
|
closed_session_count: rows.filter((session) => String(session.status) === 'closed').length
|
|
66
67
|
};
|
|
68
|
+
await writeJsonAtomic(path.join(root, 'agent-sessions.json'), {
|
|
69
|
+
schema: 'sks.agent-sessions.v1',
|
|
70
|
+
sessions: Object.fromEntries(rows.map((session) => [String(session.session_key || session.session_id || session.agent_id || ''), session]))
|
|
71
|
+
});
|
|
67
72
|
await writeJsonAtomic(path.join(root, 'agent-lifecycle-aggregate.json'), aggregate);
|
|
68
73
|
await writeJsonAtomic(path.join(root, 'agent-lifecycle.json'), {
|
|
69
74
|
schema: 'sks.agent-lifecycle.v1',
|
|
@@ -73,8 +78,8 @@ export async function writeAgentLifecycleAggregate(root) {
|
|
|
73
78
|
return aggregate;
|
|
74
79
|
}
|
|
75
80
|
export async function detectStaleAgentSessions(root, now = Date.now()) {
|
|
76
|
-
const
|
|
77
|
-
const stale =
|
|
81
|
+
const rows = await readAllSessionRows(root);
|
|
82
|
+
const stale = rows.filter((session) => {
|
|
78
83
|
if (['closed', 'blocked', 'failed', 'killed', 'timed_out'].includes(String(session.status)))
|
|
79
84
|
return false;
|
|
80
85
|
const heartbeat = Date.parse(String(session.heartbeat_at || session.opened_at || ''));
|
|
@@ -89,12 +94,11 @@ export function agentHardTimeoutMs(env = process.env) {
|
|
|
89
94
|
return Math.max(1000, Math.min(raw, 24 * 60 * 60 * 1000));
|
|
90
95
|
}
|
|
91
96
|
export async function killTimedOutAgentSessions(root, now = Date.now(), opts = {}) {
|
|
92
|
-
return withSessionLock(root, async () => {
|
|
97
|
+
return withSessionLock(root, 'timeout-reaper', async () => {
|
|
93
98
|
const hardTimeoutMs = opts.hardTimeoutMs || agentHardTimeoutMs(opts.env);
|
|
94
|
-
const
|
|
95
|
-
const data = await readJson(file, { schema: 'sks.agent-sessions.v1', sessions: {} });
|
|
99
|
+
const rows = await readAllSessionRows(root);
|
|
96
100
|
const killed = [];
|
|
97
|
-
for (const
|
|
101
|
+
for (const session of rows) {
|
|
98
102
|
if (['closed', 'blocked', 'failed', 'killed', 'timed_out'].includes(String(session.status)))
|
|
99
103
|
continue;
|
|
100
104
|
const opened = Date.parse(String(session.opened_at || ''));
|
|
@@ -103,8 +107,8 @@ export async function killTimedOutAgentSessions(root, now = Date.now(), opts = {
|
|
|
103
107
|
const heartbeatTimedOut = Number.isFinite(heartbeat) && now - heartbeat > AGENT_HEARTBEAT_TIMEOUT_MS;
|
|
104
108
|
if (!hardTimedOut && !heartbeatTimedOut)
|
|
105
109
|
continue;
|
|
106
|
-
const sessionId = session.session_id ||
|
|
107
|
-
|
|
110
|
+
const sessionId = session.session_id || session.session_key || session.agent_id;
|
|
111
|
+
const next = {
|
|
108
112
|
...session,
|
|
109
113
|
status: 'killed',
|
|
110
114
|
killed_at: new Date(now).toISOString(),
|
|
@@ -112,11 +116,10 @@ export async function killTimedOutAgentSessions(root, now = Date.now(), opts = {
|
|
|
112
116
|
heartbeat_at: new Date(now).toISOString(),
|
|
113
117
|
kill_reason: hardTimedOut ? 'hard_timeout' : 'heartbeat_timeout'
|
|
114
118
|
};
|
|
115
|
-
await writeSessionRecord(root,
|
|
116
|
-
await appendAgentLedgerEvent(root, { agent_id: String(session.agent_id ||
|
|
119
|
+
await writeSessionRecord(root, next);
|
|
120
|
+
await appendAgentLedgerEvent(root, { agent_id: String(session.agent_id || sessionId), session_id: sessionId, event_type: 'session_killed_timeout', payload: { kill_reason: next.kill_reason } });
|
|
117
121
|
killed.push(sessionId);
|
|
118
122
|
}
|
|
119
|
-
await writeJsonAtomic(file, data);
|
|
120
123
|
await writeAgentLifecycleAggregate(root);
|
|
121
124
|
const report = {
|
|
122
125
|
schema: 'sks.agent-timeout-kill-report.v1',
|
|
@@ -130,40 +133,88 @@ export async function killTimedOutAgentSessions(root, now = Date.now(), opts = {
|
|
|
130
133
|
});
|
|
131
134
|
}
|
|
132
135
|
async function updateSession(root, agent, patch, eventType, sessionId) {
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
const
|
|
138
|
-
|
|
139
|
-
data.sessions[sessionKey] = {
|
|
140
|
-
...(data.sessions[sessionKey] || {
|
|
136
|
+
const agentId = String(agent.id || agent.agent_id || sessionId);
|
|
137
|
+
const sessionKey = String(agent.session_generation_id || agent.session_id || agentId);
|
|
138
|
+
return withSessionLock(root, sessionKey, async () => {
|
|
139
|
+
const current = await readSessionRow(root, sessionKey);
|
|
140
|
+
const next = {
|
|
141
|
+
...(current || {
|
|
141
142
|
agent_id: agentId,
|
|
142
143
|
slot_id: agent.slot_id || agent.worker_slot_id || null,
|
|
143
144
|
generation_index: Number.isFinite(Number(agent.generation_index)) ? Number(agent.generation_index) : null,
|
|
144
145
|
session_artifact_dir: agent.session_artifact_dir || null,
|
|
145
|
-
session_id: sessionId
|
|
146
|
+
session_id: sessionId,
|
|
147
|
+
session_key: sessionKey
|
|
146
148
|
}),
|
|
147
149
|
agent_id: agentId,
|
|
148
|
-
slot_id: agent.slot_id || agent.worker_slot_id ||
|
|
149
|
-
generation_index: Number.isFinite(Number(agent.generation_index)) ? Number(agent.generation_index) :
|
|
150
|
-
session_artifact_dir: agent.session_artifact_dir ||
|
|
150
|
+
slot_id: agent.slot_id || agent.worker_slot_id || current?.slot_id || null,
|
|
151
|
+
generation_index: Number.isFinite(Number(agent.generation_index)) ? Number(agent.generation_index) : current?.generation_index ?? null,
|
|
152
|
+
session_artifact_dir: agent.session_artifact_dir || current?.session_artifact_dir || null,
|
|
151
153
|
session_id: sessionId,
|
|
154
|
+
session_key: sessionKey,
|
|
152
155
|
...patch
|
|
153
156
|
};
|
|
154
|
-
await
|
|
155
|
-
|
|
156
|
-
|
|
157
|
+
await writeSessionRecord(root, next);
|
|
158
|
+
if (eventType === 'heartbeat')
|
|
159
|
+
scheduleAgentLifecycleAggregate(root);
|
|
160
|
+
else
|
|
161
|
+
await writeAgentLifecycleAggregate(root);
|
|
157
162
|
await appendAgentLedgerEvent(root, { agent_id: agentId, session_id: sessionId, event_type: eventType, payload: patch });
|
|
158
|
-
return
|
|
163
|
+
return next;
|
|
159
164
|
});
|
|
160
165
|
}
|
|
161
166
|
async function writeSessionRecord(root, session) {
|
|
167
|
+
const sessionKey = sanitizeSessionFileName(session.session_key || session.session_id || session.agent_id || 'session');
|
|
168
|
+
await writeJsonAtomic(path.join(sessionShardDir(root), `${sessionKey}.json`), { schema: 'sks.agent-session-record.v1', ...session, session_key: sessionKey });
|
|
162
169
|
const artifactDir = session.session_artifact_dir;
|
|
163
170
|
if (artifactDir) {
|
|
164
171
|
await writeJsonAtomic(path.join(root, artifactDir, 'agent-session-record.json'), { schema: 'sks.agent-session-record.v1', ...session });
|
|
165
172
|
return;
|
|
166
173
|
}
|
|
167
|
-
|
|
174
|
+
}
|
|
175
|
+
async function readSessionRow(root, sessionKey) {
|
|
176
|
+
const shard = await readJson(path.join(sessionShardDir(root), `${sanitizeSessionFileName(sessionKey)}.json`), null).catch(() => null);
|
|
177
|
+
if (shard)
|
|
178
|
+
return shard;
|
|
179
|
+
const aggregate = await readJson(path.join(root, 'agent-sessions.json'), { sessions: {} }).catch(() => ({ sessions: {} }));
|
|
180
|
+
const sessions = Array.isArray(aggregate?.sessions)
|
|
181
|
+
? Object.fromEntries(aggregate.sessions.map((row) => [String(row.session_key || row.session_id || row.agent_id || ''), row]))
|
|
182
|
+
: aggregate?.sessions || {};
|
|
183
|
+
return sessions[sessionKey] || null;
|
|
184
|
+
}
|
|
185
|
+
async function readAllSessionRows(root) {
|
|
186
|
+
const rows = [];
|
|
187
|
+
const dir = sessionShardDir(root);
|
|
188
|
+
const names = await fsp.readdir(dir).catch(() => []);
|
|
189
|
+
for (const name of names.sort()) {
|
|
190
|
+
if (!name.endsWith('.json'))
|
|
191
|
+
continue;
|
|
192
|
+
const row = await readJson(path.join(dir, name), null).catch(() => null);
|
|
193
|
+
if (row && row.schema === 'sks.agent-session-record.v1')
|
|
194
|
+
rows.push(row);
|
|
195
|
+
}
|
|
196
|
+
if (rows.length)
|
|
197
|
+
return rows;
|
|
198
|
+
const aggregate = await readJson(path.join(root, 'agent-sessions.json'), { sessions: {} }).catch(() => ({ sessions: {} }));
|
|
199
|
+
if (Array.isArray(aggregate?.sessions))
|
|
200
|
+
return aggregate.sessions;
|
|
201
|
+
return Object.values(aggregate?.sessions || {});
|
|
202
|
+
}
|
|
203
|
+
function scheduleAgentLifecycleAggregate(root) {
|
|
204
|
+
const key = path.resolve(root);
|
|
205
|
+
if (AGGREGATE_FLUSH_TIMERS.has(key))
|
|
206
|
+
return;
|
|
207
|
+
const timer = setTimeout(() => {
|
|
208
|
+
AGGREGATE_FLUSH_TIMERS.delete(key);
|
|
209
|
+
writeAgentLifecycleAggregate(root).catch(() => undefined);
|
|
210
|
+
}, 5000);
|
|
211
|
+
timer.unref?.();
|
|
212
|
+
AGGREGATE_FLUSH_TIMERS.set(key, timer);
|
|
213
|
+
}
|
|
214
|
+
function sessionShardDir(root) {
|
|
215
|
+
return path.join(root, 'sessions');
|
|
216
|
+
}
|
|
217
|
+
function sanitizeSessionFileName(value) {
|
|
218
|
+
return String(value || 'session').replace(/[^A-Za-z0-9._-]+/g, '_');
|
|
168
219
|
}
|
|
169
220
|
//# sourceMappingURL=agent-lifecycle.js.map
|