arisa 5.2.7 → 5.2.17
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 +21 -2
- package/package.json +1 -1
- package/src/core/agent/agent-manager.js +79 -4
- package/src/core/agent/agent-session-lifecycle.js +29 -6
- package/src/core/agent/agent-turn-coordinator.js +143 -0
- package/src/core/agent/pi-capability-tools.js +7 -4
- package/src/core/agent/session-history-reader.js +168 -0
- package/src/core/agent/session-preload-migration.js +162 -0
- package/src/core/agent/session-rotation.js +29 -0
- package/src/core/agent/worker-tool-fanout.js +117 -0
- package/src/core/capabilities/capability-service.js +3 -2
- package/src/core/config/config-defaults.js +29 -0
- package/src/core/tasks/task-runner.js +8 -4
- package/src/core/tasks/task-store.js +47 -4
- package/src/core/tools/daemon-processes.js +7 -0
- package/src/core/tools/memory-pressure.js +2 -2
- package/src/core/tools/tool-registry.js +35 -7
- package/src/core/tools/weighted-resource-governor.js +7 -6
- package/src/official-tools.lock.json +121 -47
- package/src/runtime/doctor.js +20 -73
- package/src/runtime/obsolete-daemon-reaper.js +43 -0
- package/src/runtime/process-inspection.js +78 -0
- package/src/runtime/tool-process-supervisor.js +35 -8
- package/src/runtime/tui.js +1 -1
- package/src/transport/telegram/bot.js +3 -1
- package/src/transport/telegram/chat-queue.js +6 -2
- package/src/transport/telegram/task-dispatcher.js +36 -11
- package/src/transport/telegram/telegram-prompt-controller.js +17 -4
- package/test/agent-turn-coordinator.test.js +45 -0
- package/test/context-and-task-bounds.test.js +2 -1
- package/test/daemon-runtime.test.js +2 -4
- package/test/doctor.test.js +19 -0
- package/test/memory-pressure.test.js +7 -2
- package/test/obsolete-daemon-reaper.test.js +61 -0
- package/test/official-tool-dependencies.test.js +7 -2
- package/test/pi-compaction.test.js +21 -0
- package/test/session-history-reader.test.js +84 -0
- package/test/session-preload-migration.test.js +120 -0
- package/test/session-rotation.test.js +110 -0
- package/test/task-store.test.js +32 -0
- package/test/telegram-prompt-controller.test.js +2 -1
- package/test/telegram-task-dispatcher.test.js +66 -5
- package/test/tool-registry-run.test.js +10 -1
- package/test/weighted-resource-governor.test.js +28 -0
- package/test/worker-tool-fanout.test.js +79 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 1,
|
|
3
3
|
"repository": "https://github.com/clasen/Arisa.git",
|
|
4
|
-
"commit": "
|
|
4
|
+
"commit": "84b8728dea97871bccc5f9f3c96bbdd876e3766e",
|
|
5
5
|
"tools": {
|
|
6
6
|
"audio-extractor": {
|
|
7
7
|
"version": null,
|
|
@@ -13,40 +13,52 @@
|
|
|
13
13
|
}
|
|
14
14
|
},
|
|
15
15
|
"browser-session-bridge": {
|
|
16
|
-
"version": "0.
|
|
16
|
+
"version": "0.2.3",
|
|
17
17
|
"files": {
|
|
18
|
-
"
|
|
19
|
-
"
|
|
20
|
-
"chrome-web-store.js": "a6bd9553f1490d5ccda3fe3044c30ee6fe243f422e69a5000bc844884e6d1e95",
|
|
18
|
+
"bridge-server.js": "7fb628cba4d68fad99ae4dfdc5fab1afa904656a15f336878611ce504e0b89bf",
|
|
19
|
+
"chrome-web-store.js": "f7a58df8c3a68335e78f965ebbd6d64ed60d7c78dab255cc9200735b9a2722e7",
|
|
21
20
|
"config.js": "45c8e9e9a159b9125d6ea3458c616926c2ba2b5327fdfd750aa05316d3ce5af8",
|
|
22
21
|
"extension/icons/icon-128.png": "a55af49bb570bd5471fc0a2e15a6bcaf3f76a2c5e7439f16bb1829682b343380",
|
|
23
22
|
"extension/icons/icon-16.png": "a4aedb49e2227222a68dc56455812a9e17938fd197b1f30268f02d6c9f7bf95e",
|
|
24
23
|
"extension/icons/icon-32.png": "2dfc9e6e7ec6b4e9feb9c1326d65116cda8e53306c65c84074c818c9e7f6a2a2",
|
|
25
24
|
"extension/icons/icon-48.png": "2f316f1f2fbc72227e7e1f14cf1ff1553a12fc9aab139799f1ee2970c0303deb",
|
|
26
|
-
"extension/manifest.json": "
|
|
27
|
-
"extension/
|
|
28
|
-
"extension/popup.
|
|
29
|
-
"extension/popup.
|
|
30
|
-
"
|
|
31
|
-
"
|
|
32
|
-
"
|
|
33
|
-
"
|
|
34
|
-
"session
|
|
35
|
-
"
|
|
36
|
-
"
|
|
37
|
-
"
|
|
38
|
-
"
|
|
39
|
-
"
|
|
25
|
+
"extension/manifest.json": "fbf3dd9fcb119eaaa2a0e43720096c19eb2d3ceca45ea5a893a00bfaa5b44452",
|
|
26
|
+
"extension/onboarding-state.js": "79f5601ac66686b0d371bbfa8c9e38e12fd23213f3ad309f8c9c6d55c1f856cb",
|
|
27
|
+
"extension/popup.css": "8044a298f91790d38c8e84823d10951baffcf823bee5c330f3f297db125a5726",
|
|
28
|
+
"extension/popup.html": "2f8590991f9941b50ad61d0a7563a0a073eae5a5e980251fe16e19fe86c7a94f",
|
|
29
|
+
"extension/popup.js": "cf4bb363403381590b872991642f38b98c0964fdd9c3df00b6ec3b40b90c9be9",
|
|
30
|
+
"extension/session-send-state.js": "ec574454825679d8d3eb1fc5692d9a9fcbf133f3d9ac3621648ad09e76ff4abc",
|
|
31
|
+
"extension/site-permissions.js": "83f9aa4d0295318fc730bd561c2db9d1aacf36152319090e99d12f62deea11ad",
|
|
32
|
+
"index.js": "c01a6b825da4587a550ecec560a558cc6736200e73b6831f5919000c7b81679d",
|
|
33
|
+
"lightpanda-session.js": "57c713dafac531617d7285122b2098c1e0b2f334e43144632f2b1fc79405f789",
|
|
34
|
+
"package-lock.json": "db39f00e7849631f93050d93670c47797e5d0732330cc0f496c3014c426a94ed",
|
|
35
|
+
"package.json": "7ea065a7ace16cc51ffd18a07924e42d4cf92be01e43c37f1620bff756f43283",
|
|
36
|
+
"README.md": "79cb347ead539309429eca19ba6e9c472e4790ec1ab39a20bba71a4149f61f15",
|
|
37
|
+
"session-browser.js": "7af716a1c0d6793b82ebbaaf64ec3e8f73dfc52b3c9aceef2179d2d859e32a9c",
|
|
38
|
+
"session-redaction.js": "c2393023c1d3b7634432606ad82a96d79c1f093d9b0a6440d955d0ae419c8393",
|
|
39
|
+
"session-selection.js": "da5a4f55ccc8ba22791840943288e7aecacd730425c03f05c2bc10fd6a14341f",
|
|
40
|
+
"session-store.js": "82562ab625f2e72d1b33ea6e59f0e71f3de10fbfedb42b7099e9b1f2e23086be",
|
|
41
|
+
"test/device-enrollment.test.js": "53f9da425e506de265199a467ff16834fce9441b5482a0c99c7a5170cfd3e91d",
|
|
42
|
+
"test/lightpanda-session.test.js": "1fa6c1693a5008c173ec6c5c97effe001b68c535c7a3d4530500c0c4b691c532",
|
|
43
|
+
"test/onboarding-state.test.js": "889f7746bbdb51320e68447560459d2a5d812e4b135de08a7b6e94ef5a142250",
|
|
44
|
+
"test/session-redaction.test.js": "e45b5cbd19eea7996d57141b5185c3a6e4c79989e4cb7253272fc66cd2cbd719",
|
|
45
|
+
"test/session-refresh.test.js": "c619a3790d0f1ba9c6fcbd4509d96c43ee0d8c5a292382ffaf744defdc9c5cac",
|
|
46
|
+
"test/session-selection.test.js": "ee1a15d42b156403d46d789a3ecf0a9c8f0019a00ab908276297d031243a89f5",
|
|
47
|
+
"test/session-send-state.test.js": "c8ccbdf0863c5de85f784e7e32436591fe2db16a2ef4c554f671c6352736d5b6",
|
|
48
|
+
"test/site-permissions.test.js": "27c297475c38ee1cbe7c7df210c767c157e03ecd379cde99a1b502268bda56ab",
|
|
49
|
+
"tool.manifest.json": "286bfce2e0770bf1f51decedcf974664cd184e1c146c4fdeb40500e346aa7856",
|
|
50
|
+
"web-store/listing.md": "3e6d7aab1f60142984c3f8c18d92bf23646dc901644c6b71bdb979802bcf320c",
|
|
51
|
+
"web-store/privacy-policy.md": "3e92198fbf80196a044c1d58d83577d959e91136302f994e3ffe1327013ebda8"
|
|
40
52
|
}
|
|
41
53
|
},
|
|
42
54
|
"campaign-draft-runner": {
|
|
43
|
-
"version": "0.
|
|
55
|
+
"version": "0.8.1",
|
|
44
56
|
"files": {
|
|
45
|
-
"README.md": "
|
|
57
|
+
"README.md": "9d8c9d87edc66375b5f059bd5abb06a8b8ee743e979d77ffc4f5312f3ec7b57f",
|
|
46
58
|
"batch-skip.js": "ad428464b739e7355e00ac7cf399247ce611fcef0470d97a73893701e5b07627",
|
|
47
59
|
"config.js": "9b9c2d9686cebf17c3ba2630088c7028281883608f61054e733283aeb8d383cb",
|
|
48
60
|
"discovery-operations.js": "a5e9f046358938a07ffba039085c5c48f829c6a2e05362d0d0230a37a3c47f60",
|
|
49
|
-
"index.js": "
|
|
61
|
+
"index.js": "3ee8ab5f2cc041ddcbeeeda7225f744b13a1ce843c25aabe693c0269a1aa681e",
|
|
50
62
|
"operation-timeout.js": "9b1ced30ec9ed710bb9118b91f6f3feded5111a08e1e21abf163e4cfb91d7ad2",
|
|
51
63
|
"package.json": "a25b7ed1dd2c30cd68c3c10feb8ee1752cac8cd55cd4344690ffad649e231ec1",
|
|
52
64
|
"pitch-experiment.js": "3da9350dc862cab36a630f628d3b3c06974375facd999b8bdbeed8ebf15e63a3",
|
|
@@ -58,15 +70,18 @@
|
|
|
58
70
|
"telemetry.js": "b3ededa1277d5028f7a8299926e16bb4dc06d70c470d3b97352c29080cfc0974",
|
|
59
71
|
"test/batch-skip.test.js": "638d185dc0b38900afe6ee9058e733ae36583d0762a0ff0347fdf245df064abc",
|
|
60
72
|
"test/discovery-operations.test.js": "bc3e7c877911278bf87ef2a5844990721570a4957b78478e2e916be869bc2159",
|
|
73
|
+
"test/orchestrator-fanout.test.js": "e882f2c22418d4d3bdc66223c8bf37ed2ca0fbb94ae99f0d828c9257ca551f6b",
|
|
61
74
|
"test/pitch-experiment.test.js": "5c43901a9986b666f1094a7dc298adf2072dcb167ea023bb24fb5c9f13c152b0",
|
|
62
75
|
"test/prospect-pool.test.js": "d0a81f21899b0055c210747008db2ed12afe11b3a57d3e80d1aae797732982d3",
|
|
63
|
-
"test/selection-policy.test.js": "
|
|
76
|
+
"test/selection-policy.test.js": "33967a965b47c50febb3533ab8cc7080b378f8e4dbed363f6c0304eb90da4277",
|
|
64
77
|
"test/telemetry.test.js": "8e52a43fa9eb08fa0f3be124b72b7cd39258666cb88311b1df6978037372c257",
|
|
65
|
-
"tool.
|
|
78
|
+
"test/web-tool-default.test.js": "bafd71c48fc922d449b40b2603900c08a45ba3701ffa9a48e3e533219f1bd1a5",
|
|
79
|
+
"tool.manifest.json": "acd3a902aa0e52e4ea9429def5bc76808d0a33ead4fd3c670b8a737a2afb2c7b"
|
|
66
80
|
},
|
|
67
81
|
"toolDependencies": {
|
|
68
82
|
"pr-campaign": "^0.1.0",
|
|
69
|
-
"gmail-workspace": "^0.1.0"
|
|
83
|
+
"gmail-workspace": "^0.1.0",
|
|
84
|
+
"lightpanda-browser": "^0.10.0"
|
|
70
85
|
}
|
|
71
86
|
},
|
|
72
87
|
"change-plan-runner": {
|
|
@@ -98,16 +113,22 @@
|
|
|
98
113
|
}
|
|
99
114
|
},
|
|
100
115
|
"creator-scout": {
|
|
101
|
-
"version": "1.0
|
|
116
|
+
"version": "1.4.0",
|
|
102
117
|
"files": {
|
|
103
|
-
"README.md": "4f50850317c0875ad7ddea767c7dda112669112bec107a98e67a31a42787b82c",
|
|
104
118
|
"config.js": "bab728665650b986c0eaef8e1be1c259ec42b1f83df4217c9780f5468d3c7666",
|
|
105
|
-
"index.js": "
|
|
106
|
-
"
|
|
107
|
-
"package.json": "
|
|
108
|
-
"
|
|
109
|
-
"
|
|
110
|
-
"
|
|
119
|
+
"index.js": "a544e5dbac9cb92e996c2b07690a18481a20b8b10c13c397412581ec9ac6bb04",
|
|
120
|
+
"outcome-contract.js": "5685bd8fbe4fcb608ee43a0148201206283013c1a60855c974a928c1d312480a",
|
|
121
|
+
"package-lock.json": "a2e847954e9d6682b8fd435c46d7ecbf38568147fc3d336e10f6d806f6be620a",
|
|
122
|
+
"package.json": "19c61d77ec90fce64d1a3baa1acc5b29af23f7c0574964504bc69b19e38aa34f",
|
|
123
|
+
"panda-results.js": "24a31263b4a03e2c2719d9c54be7b5c022b17fb7dcb249eed33b93882518145b",
|
|
124
|
+
"panda-session.js": "69878ff01bfbf26afe4db0e2e6489b211e3aca100ba5353befefaea009636bb5",
|
|
125
|
+
"README.md": "6895b2c0cc3a230ddf3f59f1c4670b12070464f8e742bfdf40a04120a7fefaea",
|
|
126
|
+
"reference-match.js": "5ceb71bfe57763258d89c60936bb7e5b3166b6aa7127f9d2f8da49f01298f46b",
|
|
127
|
+
"test/outcome-contract.test.js": "dda85d1f56880b30d7fad3e8a27aacbb0808d91fc0addac6e0c38f9f0c4849bf",
|
|
128
|
+
"test/panda-results.test.js": "b918d6341251822292fe3e375ab66694a0f71f3c7a24e91be263ee36e5f3e92c",
|
|
129
|
+
"test/panda-session.test.js": "6cfa4e0543fab77c502c1103c60d8cb7d16040770e7aa5c034a47e0292de8521",
|
|
130
|
+
"test/reference-match.test.js": "38572ee3756f4ff0b0c61942dda0a19c9d06697826051cf0924dd3c47fc99b67",
|
|
131
|
+
"tool.manifest.json": "5368082b6808dc9b5966a46afcc6042cc82aabef0cd55ed65b4e783a4cb2579e"
|
|
111
132
|
}
|
|
112
133
|
},
|
|
113
134
|
"file-document": {
|
|
@@ -153,6 +174,52 @@
|
|
|
153
174
|
"tool.manifest.json": "e44f75443084d79df1846f19980af823a171f49a470196237ce802791328adc2"
|
|
154
175
|
}
|
|
155
176
|
},
|
|
177
|
+
"lightpanda-browser": {
|
|
178
|
+
"version": "0.11.5",
|
|
179
|
+
"files": {
|
|
180
|
+
"action-policy.js": "66c6ad39f65378ccf8ed54177f5a3665e23ef82818c30fb05d28cd58cba9b2ab",
|
|
181
|
+
"authenticated-profile.js": "2bbb96c4d25a108c44256514c1c9b4e61e1f125e470ab35c5e02515216cd1b33",
|
|
182
|
+
"benchmark-latest.json": "c5524e6d42479578579fd7db0e50857ff0831ca219e611b821ad1e0a4fade303",
|
|
183
|
+
"benchmark-policy.js": "2c3763d7f327293c9d54ca24da9e65b94dc304af44908c1e196a4af45ed49a89",
|
|
184
|
+
"BENCHMARK.md": "9c732c65f6d8bceb4e73c1a03d298d5140d919f50269f982bd0ec6c1b21fa8b6",
|
|
185
|
+
"binary.js": "accd3f1f536ae7ceee4dbfcee2de9ac56fc1ae343656238d62003233417257f1",
|
|
186
|
+
"browser-operation.js": "51384d146d45fda8c672d3d6672fa223b715ad40c3c5b5878719e9df38151592",
|
|
187
|
+
"capture.js": "b68b198d494c762822c6da079a556dd3463e681557f2abef1387d9cd41abaf4c",
|
|
188
|
+
"COMPATIBILITY-MIGRATION.md": "230e12e8ddac837b7772519693e530c43d2158b69c671036bf246fb3a9e35561",
|
|
189
|
+
"config.js": "d08eb436df15540a53b02cf72e117c7fc8ead80195dbd53764a17598c9e565c5",
|
|
190
|
+
"daemon-service.js": "10e70ed64f1fe8c7660044f6ce24e78d01da75a50322bfc08f42248c14ad5226",
|
|
191
|
+
"index.js": "5fc54aec13fb27c6b55e20aed132853b79c44041f45ea4b0f4b47b00c205da16",
|
|
192
|
+
"limit-suite-latest.json": "3d30f958d2d6c1e9dfcaf53e40a401ae288bf264a97ba6c3b64a25a08031feb0",
|
|
193
|
+
"limit-suite-policy.js": "61440ee2e7f557ab2f3c74f8ef4ec2ec85fd2fb7fc53a4121e1f0d066670ea17",
|
|
194
|
+
"LIMITS.md": "6c0ec9624c76de8ddf09b82a4da1dba1b89a48a1f0e71a083ffbcf7a3d5401fb",
|
|
195
|
+
"mcp-session.js": "cd4a1e6d3c9d80c399fda8f313d69e38fa22a9b24789d7919832a56df7dc90c2",
|
|
196
|
+
"output-bounds.js": "08ab730d0d8722c5e0e761911a509653dd23d8eb4d8c2abf2d9c5e8432870bdd",
|
|
197
|
+
"package-lock.json": "815dfdb89ce94b543e520955480e322438abd2b71fad4c4ddd699838b8622b65",
|
|
198
|
+
"package.json": "934ae0f55d1baea305c28f12c0c9faccdd864244d899663c96f9083d96442841",
|
|
199
|
+
"process-metrics.js": "e39d2980abb581ca0b917d0d33a1d71922ce49b679a7e96cf16a6a66b81d879a",
|
|
200
|
+
"README.md": "c79a9a24d2fe804a7ce3e160e8308b1ac0039461cbfd012347aaa61f841f5fed",
|
|
201
|
+
"recipe-store.js": "358ac391ae86e0bfb82fc5b55bd08cfe3fd4fa56ac12a5ad4ad5abfa43c9a6c6",
|
|
202
|
+
"scripts/benchmark.js": "f1bb939984460d84118317f9b4f811e0df80f590b0a441cd62a56eb97bb69b37",
|
|
203
|
+
"scripts/install-lightpanda.js": "ba4a2f9e5ffae80b9375578731d68eff25997333cb9e3e443b155f7834948205",
|
|
204
|
+
"scripts/limit-suite.js": "d314aa43cd3319135c9abe42dcd9e8bf744e17ae5f2c2b84bcd03c1ff51aeedb",
|
|
205
|
+
"session-manager.js": "3b1792687815bdcd3a0a5aa043798838aa6ff6fa788c38519300963ebf3794cd",
|
|
206
|
+
"test/action-policy.test.js": "9ac45bf10c353b5c0f94cd46436dc2cfc0f42ed958294e80f6417c805782c3fc",
|
|
207
|
+
"test/authenticated-profile.test.js": "95389180c0d644782fc4dc4833e6306305a01a8b1eadbdbc5102adc2646710b2",
|
|
208
|
+
"test/benchmark-policy.test.js": "02dbd3e7619aaa28f63df1de7ec3af5f206d8cf3d0f74afa8f14b69a0b084716",
|
|
209
|
+
"test/browser-operation.test.js": "283f074ef7ec499f70ba5db3450b792aacebdc2ef72b14727e7b3992cd6f173f",
|
|
210
|
+
"test/capture.test.js": "b4551640d008b73575919e33e5565f7eed2c766a154f8fbe6703ef826f4b9f76",
|
|
211
|
+
"test/daemon-contract.test.js": "8b50c7de83f87324f2b5f94e69ae6b4398b889ee3ab73c1f5b07e95fe9d986fb",
|
|
212
|
+
"test/limit-suite-policy.test.js": "3bc29952084d0febf617f22ffefeeec15ede245e778e7f00fa86fd4c8140cbd6",
|
|
213
|
+
"test/mcp-session.test.js": "cf2484ae14b647eaf66a17286383ff0c143c276b5b2c92b3bba4cf6643f5bc5f",
|
|
214
|
+
"test/recipe-store.test.js": "f249b33aa42bebc4f6e61150400f6bca7647feea13b0770e72016485e8d13b46",
|
|
215
|
+
"test/safety.test.js": "2842a7c2b05c1d3d340050deee969a1a8b7d2999262f2c636e5a5bae6a751899",
|
|
216
|
+
"test/session-manager.test.js": "bc1e2986d2e659066a770277ed4736b2fc3d250d16d4b987012f6adab0fad66e",
|
|
217
|
+
"test/web-search.test.js": "b6b42f82bb3cae516cf8ad40b55f467ab637d72cf4b04da3eb9e77391386397f",
|
|
218
|
+
"tool.manifest.json": "81428513d8677449046c204fa43ba074f4453afc7b929680fcf1737a71c05331",
|
|
219
|
+
"url-security.js": "e1f370b3d9b9a74c7ae435d073a8a069a1bc8adbf4e0caa65c817099a48a1c22",
|
|
220
|
+
"web-search.js": "18c1b9980b1724668e0aec9d354dcac236e0aa43fa58cbe652b1bcd3770d8d0e"
|
|
221
|
+
}
|
|
222
|
+
},
|
|
156
223
|
"magnific-mcp": {
|
|
157
224
|
"version": "0.4.1",
|
|
158
225
|
"files": {
|
|
@@ -508,12 +575,13 @@
|
|
|
508
575
|
}
|
|
509
576
|
},
|
|
510
577
|
"video-analyze": {
|
|
511
|
-
"version":
|
|
578
|
+
"version": "2.0.0",
|
|
512
579
|
"files": {
|
|
513
580
|
"config.js": "72f05ac42eda19de47e232c2a0778c6cd99cb468d5b1a25eb8187e29e3a329a1",
|
|
514
|
-
"index.js": "
|
|
515
|
-
"package.json": "
|
|
516
|
-
"
|
|
581
|
+
"index.js": "c622ca371d8c9864079bae40e4a9a944960055605c891f1d89589dacb95f5154",
|
|
582
|
+
"package.json": "1bd75c7fc49cfe4b46c573ff24b0c3c0c79951d71e161dcf482ee14f04462a43",
|
|
583
|
+
"test/video-analyze.test.js": "2c999d27b5542b0a1ce0515943a8c6802c953dd83ad5cd3de53e1079ef08d936",
|
|
584
|
+
"tool.manifest.json": "af861dd0c9f04ad82e7267e2e362a35111aa675e4bfaf61a9747df8ecd991493"
|
|
517
585
|
}
|
|
518
586
|
},
|
|
519
587
|
"video-downloader": {
|
|
@@ -570,14 +638,18 @@
|
|
|
570
638
|
}
|
|
571
639
|
},
|
|
572
640
|
"x-campaign-runner": {
|
|
573
|
-
"version": "0.
|
|
641
|
+
"version": "0.2.1",
|
|
574
642
|
"files": {
|
|
575
|
-
"README.md": "
|
|
643
|
+
"README.md": "081de53492143a499c8a74b7353e7ce4ea89ffb4632f13e93579094014ff9c7f",
|
|
576
644
|
"config.js": "5eb3c5667d01705d48504a4bf711347262b8a440605cb6b75ec519dd56cb1309",
|
|
577
|
-
"index.js": "
|
|
578
|
-
"package.json": "
|
|
579
|
-
"test/x-campaign-runner.test.mjs": "
|
|
580
|
-
"tool.manifest.json": "
|
|
645
|
+
"index.js": "d2cdc3c51fe130406f90db2cafd63783ff3d3ab7e4e09e699de4bed2a1e583c7",
|
|
646
|
+
"package.json": "afc17bc28241f1b3a9bd0d7a4952074fcc1b6e7e4ca9dd85e71a08e9fe185e55",
|
|
647
|
+
"test/x-campaign-runner.test.mjs": "e810f56acd107b56986967a860b8cdc159eca85b3dfb5a9d086898041175ec5f",
|
|
648
|
+
"tool.manifest.json": "7578ec336424501359d4a18be88ed4d067ef42322c047bfbb9f9c0173efaef47"
|
|
649
|
+
},
|
|
650
|
+
"toolDependencies": {
|
|
651
|
+
"x-dm": "^0.4.0",
|
|
652
|
+
"lightpanda-browser": "^0.11.0"
|
|
581
653
|
}
|
|
582
654
|
},
|
|
583
655
|
"x-dm": {
|
|
@@ -606,13 +678,15 @@
|
|
|
606
678
|
}
|
|
607
679
|
},
|
|
608
680
|
"x-session-reader": {
|
|
609
|
-
"version": "1.
|
|
681
|
+
"version": "1.2.0",
|
|
610
682
|
"files": {
|
|
611
683
|
"browser-cache.js": "f71c20f9ab5f04d9d46c5e2551b348d47baba89a10a07173070298098a6d5551",
|
|
612
684
|
"config.js": "b0929c48bcf9ecf1408f246703fde3a6eb14e73bc4b8e71084910a96e641a7cb",
|
|
613
|
-
"index.js": "
|
|
614
|
-
"package.json": "
|
|
615
|
-
"
|
|
685
|
+
"index.js": "c390dd9b89bd234103c88888981ea3882e955c3d1f4f5bb4642f8e48ef12d5bc",
|
|
686
|
+
"package.json": "968775d30b71fff684ec3541c781198db693bba5c46e723d51cbbab3f267b693",
|
|
687
|
+
"target-validation.js": "e085cffe5b44fab100d0456ad37554c71085ae2c04c368d6469c69b2e1fdf5b1",
|
|
688
|
+
"test/target-validation.test.js": "ee26b8e4f8d8db600e65eb8a189fbb05ba2623c581cd874bde5d8d41f043d491",
|
|
689
|
+
"tool.manifest.json": "d5a1affbc6f5abb17d186cdfe1068c359e08ecdc2380c695610193da0ce5c72d"
|
|
616
690
|
},
|
|
617
691
|
"toolDependencies": {
|
|
618
692
|
"browser-session-bridge": "^0.1.0"
|
package/src/runtime/doctor.js
CHANGED
|
@@ -1,86 +1,21 @@
|
|
|
1
|
-
import { execFile } from "node:child_process";
|
|
2
1
|
import { statfs } from "node:fs/promises";
|
|
3
2
|
import os from "node:os";
|
|
4
3
|
import process from "node:process";
|
|
5
|
-
import { promisify } from "node:util";
|
|
6
4
|
import { stopManagedDaemon, unregisterManagedDaemon } from "../core/tools/daemon-processes.js";
|
|
7
5
|
import { getServiceStatus, serviceEntryFile } from "./service-manager.js";
|
|
8
6
|
import { arisaHomeDir } from "../platform/paths.js";
|
|
9
7
|
import { renderTextReport, reportRow, wrapReportText } from "./report-format.js";
|
|
8
|
+
import {
|
|
9
|
+
isArisaServiceProcess as matchesArisaServiceProcess,
|
|
10
|
+
isDaemonProcess,
|
|
11
|
+
listSystemProcesses,
|
|
12
|
+
terminateProcess
|
|
13
|
+
} from "./process-inspection.js";
|
|
10
14
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
function parsePosixProcesses(output) {
|
|
14
|
-
return String(output || "")
|
|
15
|
-
.split("\n")
|
|
16
|
-
.map((line) => /^\s*(\d+)\s+(.+)$/.exec(line))
|
|
17
|
-
.filter(Boolean)
|
|
18
|
-
.map((match) => ({ pid: Number(match[1]), command: match[2] }));
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
function parseWindowsProcesses(output) {
|
|
22
|
-
const parsed = JSON.parse(output || "[]");
|
|
23
|
-
const records = Array.isArray(parsed) ? parsed : [parsed];
|
|
24
|
-
return records
|
|
25
|
-
.filter((record) => record?.ProcessId && record?.CommandLine)
|
|
26
|
-
.map((record) => ({ pid: Number(record.ProcessId), command: String(record.CommandLine) }));
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
export async function listSystemProcesses({ timeoutMs, platform = process.platform } = {}) {
|
|
30
|
-
if (!Number.isFinite(timeoutMs) || timeoutMs <= 0) {
|
|
31
|
-
throw new Error("Doctor process inspection requires a positive timeoutMs");
|
|
32
|
-
}
|
|
33
|
-
if (platform === "win32") {
|
|
34
|
-
const { stdout } = await execFileAsync("powershell.exe", [
|
|
35
|
-
"-NoProfile",
|
|
36
|
-
"-Command",
|
|
37
|
-
"Get-CimInstance Win32_Process | Select-Object ProcessId,CommandLine | ConvertTo-Json -Compress"
|
|
38
|
-
], { timeout: timeoutMs, windowsHide: true });
|
|
39
|
-
return parseWindowsProcesses(stdout);
|
|
40
|
-
}
|
|
41
|
-
const { stdout } = await execFileAsync("ps", ["-ww", "-axo", "pid=,command="], { timeout: timeoutMs });
|
|
42
|
-
return parsePosixProcesses(stdout);
|
|
43
|
-
}
|
|
15
|
+
export { listSystemProcesses, terminateProcess } from "./process-inspection.js";
|
|
44
16
|
|
|
45
17
|
function isArisaServiceProcess(record) {
|
|
46
|
-
return record
|
|
47
|
-
&& /(?:^|\s)--service-runner(?:\s|$)/.test(record.command);
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
function isDaemonProcess(record, daemon) {
|
|
51
|
-
return record.command.includes(daemon.entryPath)
|
|
52
|
-
&& /(?:^|\s)daemon(?:\s|$)/.test(record.command);
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
function sleep(ms) {
|
|
56
|
-
return new Promise((resolve) => setTimeout(resolve, ms));
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
function isAlive(pid) {
|
|
60
|
-
try {
|
|
61
|
-
process.kill(pid, 0);
|
|
62
|
-
return true;
|
|
63
|
-
} catch {
|
|
64
|
-
return false;
|
|
65
|
-
}
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
export async function terminateProcess(pid, { forceAfterMs } = {}) {
|
|
69
|
-
if (!Number.isSafeInteger(pid) || pid <= 0 || pid === process.pid) {
|
|
70
|
-
throw new Error(`Refusing to terminate invalid doctor target: ${pid}`);
|
|
71
|
-
}
|
|
72
|
-
if (!Number.isFinite(forceAfterMs) || forceAfterMs <= 0) {
|
|
73
|
-
throw new Error("Doctor process cleanup requires a positive forceAfterMs");
|
|
74
|
-
}
|
|
75
|
-
if (!isAlive(pid)) return false;
|
|
76
|
-
process.kill(pid, "SIGTERM");
|
|
77
|
-
const startedAt = Date.now();
|
|
78
|
-
while (Date.now() - startedAt < forceAfterMs) {
|
|
79
|
-
if (!isAlive(pid)) return true;
|
|
80
|
-
await sleep(Math.min(100, forceAfterMs));
|
|
81
|
-
}
|
|
82
|
-
if (isAlive(pid)) process.kill(pid, "SIGKILL");
|
|
83
|
-
return true;
|
|
18
|
+
return matchesArisaServiceProcess(record, serviceEntryFile);
|
|
84
19
|
}
|
|
85
20
|
|
|
86
21
|
function daemonLabel(record) {
|
|
@@ -386,6 +321,18 @@ export async function runDoctor({
|
|
|
386
321
|
}
|
|
387
322
|
for (const result of report.daemons) {
|
|
388
323
|
const label = daemonLabel(result.record);
|
|
324
|
+
if (result.outcome === "obsolete-removed") {
|
|
325
|
+
report.repairs.push(`Removed obsolete daemon ${label}: ${result.reason}.`);
|
|
326
|
+
continue;
|
|
327
|
+
}
|
|
328
|
+
if (result.outcome === "obsolete-unverified") {
|
|
329
|
+
report.attention.push(`${label} is obsolete, but its live process identity could not be verified.`);
|
|
330
|
+
continue;
|
|
331
|
+
}
|
|
332
|
+
if (result.outcome === "obsolete-cleanup-error") {
|
|
333
|
+
report.attention.push(`${label} obsolete daemon cleanup failed: ${result.error || "unknown error"}.`);
|
|
334
|
+
continue;
|
|
335
|
+
}
|
|
389
336
|
if (result.outcome === "stale-registration") {
|
|
390
337
|
const pid = result.diagnostic?.pid;
|
|
391
338
|
const registered = pid ? processByPid.get(pid) : null;
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { purgeManagedDaemon } from "../core/tools/daemon-processes.js";
|
|
2
|
+
import { isDaemonProcess, listSystemProcesses, terminateProcess } from "./process-inspection.js";
|
|
3
|
+
|
|
4
|
+
export async function reapObsoleteDaemon({
|
|
5
|
+
record,
|
|
6
|
+
diagnostic,
|
|
7
|
+
reason,
|
|
8
|
+
timeoutMs,
|
|
9
|
+
stopTimeoutMs,
|
|
10
|
+
inspectProcesses = listSystemProcesses,
|
|
11
|
+
stopProcess = terminateProcess,
|
|
12
|
+
purgeDaemon = purgeManagedDaemon
|
|
13
|
+
} = {}) {
|
|
14
|
+
const pid = diagnostic?.pid;
|
|
15
|
+
if (pid) {
|
|
16
|
+
let processes;
|
|
17
|
+
try {
|
|
18
|
+
processes = await inspectProcesses({ timeoutMs });
|
|
19
|
+
} catch (error) {
|
|
20
|
+
return {
|
|
21
|
+
record,
|
|
22
|
+
outcome: "obsolete-unverified",
|
|
23
|
+
reason,
|
|
24
|
+
diagnostic,
|
|
25
|
+
error: `process inspection failed: ${error instanceof Error ? error.message : String(error)}`
|
|
26
|
+
};
|
|
27
|
+
}
|
|
28
|
+
const processRecord = processes.find((item) => item.pid === pid);
|
|
29
|
+
if (!processRecord || !isDaemonProcess(processRecord, record)) {
|
|
30
|
+
return { record, outcome: "obsolete-unverified", reason, diagnostic };
|
|
31
|
+
}
|
|
32
|
+
await stopProcess(pid, { forceAfterMs: stopTimeoutMs });
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
await purgeDaemon({ toolName: record.toolName, scope: record.scope });
|
|
36
|
+
return {
|
|
37
|
+
record,
|
|
38
|
+
outcome: "obsolete-removed",
|
|
39
|
+
reason,
|
|
40
|
+
diagnostic,
|
|
41
|
+
stoppedPid: pid || null
|
|
42
|
+
};
|
|
43
|
+
}
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import { execFile } from "node:child_process";
|
|
2
|
+
import process from "node:process";
|
|
3
|
+
import { promisify } from "node:util";
|
|
4
|
+
|
|
5
|
+
const execFileAsync = promisify(execFile);
|
|
6
|
+
|
|
7
|
+
function parsePosixProcesses(output) {
|
|
8
|
+
return String(output || "")
|
|
9
|
+
.split("\n")
|
|
10
|
+
.map((line) => /^\s*(\d+)\s+(.+)$/.exec(line))
|
|
11
|
+
.filter(Boolean)
|
|
12
|
+
.map((match) => ({ pid: Number(match[1]), command: match[2] }));
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
function parseWindowsProcesses(output) {
|
|
16
|
+
const parsed = JSON.parse(output || "[]");
|
|
17
|
+
const records = Array.isArray(parsed) ? parsed : [parsed];
|
|
18
|
+
return records
|
|
19
|
+
.filter((record) => record?.ProcessId && record?.CommandLine)
|
|
20
|
+
.map((record) => ({ pid: Number(record.ProcessId), command: String(record.CommandLine) }));
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export async function listSystemProcesses({ timeoutMs, platform = process.platform } = {}) {
|
|
24
|
+
if (!Number.isFinite(timeoutMs) || timeoutMs <= 0) {
|
|
25
|
+
throw new Error("Process inspection requires a positive timeoutMs");
|
|
26
|
+
}
|
|
27
|
+
if (platform === "win32") {
|
|
28
|
+
const { stdout } = await execFileAsync("powershell.exe", [
|
|
29
|
+
"-NoProfile",
|
|
30
|
+
"-Command",
|
|
31
|
+
"Get-CimInstance Win32_Process | Select-Object ProcessId,CommandLine | ConvertTo-Json -Compress"
|
|
32
|
+
], { timeout: timeoutMs, windowsHide: true });
|
|
33
|
+
return parseWindowsProcesses(stdout);
|
|
34
|
+
}
|
|
35
|
+
const { stdout } = await execFileAsync("ps", ["-ww", "-axo", "pid=,command="], { timeout: timeoutMs });
|
|
36
|
+
return parsePosixProcesses(stdout);
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
export function isArisaServiceProcess(record, entryFile) {
|
|
40
|
+
return record.command.includes(entryFile)
|
|
41
|
+
&& /(?:^|\s)--service-runner(?:\s|$)/.test(record.command);
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
export function isDaemonProcess(record, daemon) {
|
|
45
|
+
return record.command.includes(daemon.entryPath)
|
|
46
|
+
&& /(?:^|\s)daemon(?:\s|$)/.test(record.command);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
function sleep(ms) {
|
|
50
|
+
return new Promise((resolve) => setTimeout(resolve, ms));
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
function isAlive(pid) {
|
|
54
|
+
try {
|
|
55
|
+
process.kill(pid, 0);
|
|
56
|
+
return true;
|
|
57
|
+
} catch {
|
|
58
|
+
return false;
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
export async function terminateProcess(pid, { forceAfterMs } = {}) {
|
|
63
|
+
if (!Number.isSafeInteger(pid) || pid <= 0 || pid === process.pid) {
|
|
64
|
+
throw new Error(`Refusing to terminate invalid process target: ${pid}`);
|
|
65
|
+
}
|
|
66
|
+
if (!Number.isFinite(forceAfterMs) || forceAfterMs <= 0) {
|
|
67
|
+
throw new Error("Process cleanup requires a positive forceAfterMs");
|
|
68
|
+
}
|
|
69
|
+
if (!isAlive(pid)) return false;
|
|
70
|
+
process.kill(pid, "SIGTERM");
|
|
71
|
+
const startedAt = Date.now();
|
|
72
|
+
while (Date.now() - startedAt < forceAfterMs) {
|
|
73
|
+
if (!isAlive(pid)) return true;
|
|
74
|
+
await sleep(Math.min(100, forceAfterMs));
|
|
75
|
+
}
|
|
76
|
+
if (isAlive(pid)) process.kill(pid, "SIGKILL");
|
|
77
|
+
return true;
|
|
78
|
+
}
|
|
@@ -9,6 +9,7 @@ import {
|
|
|
9
9
|
} from "../core/tools/daemon-processes.js";
|
|
10
10
|
import { loadDaemonPolicy } from "../core/tools/daemon-policy.js";
|
|
11
11
|
import { ensureArisaHome } from "../platform/paths.js";
|
|
12
|
+
import { reapObsoleteDaemon } from "./obsolete-daemon-reaper.js";
|
|
12
13
|
|
|
13
14
|
async function fileExists(file) {
|
|
14
15
|
try {
|
|
@@ -58,7 +59,12 @@ function validateRegistration(record, toolRegistry) {
|
|
|
58
59
|
};
|
|
59
60
|
}
|
|
60
61
|
|
|
61
|
-
export function createToolProcessSupervisor({
|
|
62
|
+
export function createToolProcessSupervisor({
|
|
63
|
+
logger,
|
|
64
|
+
policy,
|
|
65
|
+
toolRegistry,
|
|
66
|
+
obsoleteDaemonReaper = reapObsoleteDaemon
|
|
67
|
+
} = {}) {
|
|
62
68
|
let running = false;
|
|
63
69
|
let timer = null;
|
|
64
70
|
let reconciliation = null;
|
|
@@ -75,13 +81,34 @@ export function createToolProcessSupervisor({ logger, policy, toolRegistry } = {
|
|
|
75
81
|
for (const registeredRecord of await listRegisteredDaemons()) {
|
|
76
82
|
const validation = validateRegistration(registeredRecord, toolRegistry);
|
|
77
83
|
if (!validation.valid) {
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
84
|
+
const diagnostic = await readDaemonDiagnostic(registeredRecord);
|
|
85
|
+
try {
|
|
86
|
+
const result = await obsoleteDaemonReaper({
|
|
87
|
+
record: registeredRecord,
|
|
88
|
+
diagnostic,
|
|
89
|
+
reason: validation.reason,
|
|
90
|
+
timeoutMs: daemonPolicy.healthTimeoutMs,
|
|
91
|
+
stopTimeoutMs: daemonPolicy.stopTimeoutMs
|
|
92
|
+
});
|
|
93
|
+
results.push(result);
|
|
94
|
+
const key = `${registeredRecord.toolName}:${registeredRecord.instanceId || "global"}`;
|
|
95
|
+
const message = result.outcome === "obsolete-removed"
|
|
96
|
+
? `removed obsolete daemon ${registeredRecord.toolName} (${registeredRecord.instanceId || "global"}): ${validation.reason}`
|
|
97
|
+
: `left obsolete daemon ${registeredRecord.toolName} (${registeredRecord.instanceId || "global"}) untouched because process identity could not be verified`;
|
|
98
|
+
if (reportedDiagnostics.get(key) !== message) {
|
|
99
|
+
reportedDiagnostics.set(key, message);
|
|
100
|
+
logger?.log("tools", message);
|
|
101
|
+
}
|
|
102
|
+
} catch (error) {
|
|
103
|
+
logger?.error?.("tools", `obsolete daemon cleanup failed for ${registeredRecord.toolName}: ${error?.message || error}`);
|
|
104
|
+
results.push({
|
|
105
|
+
record: registeredRecord,
|
|
106
|
+
outcome: "obsolete-cleanup-error",
|
|
107
|
+
reason: validation.reason,
|
|
108
|
+
diagnostic,
|
|
109
|
+
error: error?.message || String(error)
|
|
110
|
+
});
|
|
111
|
+
}
|
|
85
112
|
continue;
|
|
86
113
|
}
|
|
87
114
|
const record = validation.record;
|
package/src/runtime/tui.js
CHANGED
|
@@ -106,7 +106,7 @@ export function createTuiCapabilityTools(client) {
|
|
|
106
106
|
defineTool({
|
|
107
107
|
name: "cancel_all_scheduled_tasks",
|
|
108
108
|
label: "Cancel all scheduled tasks",
|
|
109
|
-
description: "Cancel all
|
|
109
|
+
description: "Cancel all active owner-scoped Arisa tasks, including authentication-blocked tasks.",
|
|
110
110
|
parameters: Type.Object({}),
|
|
111
111
|
execute: async () => jsonResult(await client.tasks.cancelAll())
|
|
112
112
|
})
|
|
@@ -335,7 +335,7 @@ export async function createTelegramBot({ config, artifactStore, toolRegistry, t
|
|
|
335
335
|
timer.unref?.();
|
|
336
336
|
}
|
|
337
337
|
|
|
338
|
-
async function enqueueAsyncPrompt({ chatId, prompt, label, route: taskRoute, timeoutMs }) {
|
|
338
|
+
async function enqueueAsyncPrompt({ chatId, prompt, label, route: taskRoute, timeoutMs, priority = "background", queueTtlMs = undefined }) {
|
|
339
339
|
let ctx = { chat: { id: chatId }, api: bot.api };
|
|
340
340
|
const destination = taskRoute?.transport === "telegram" ? taskRoute.destination : null;
|
|
341
341
|
if (destination?.chatId && destination?.threadId) {
|
|
@@ -359,6 +359,8 @@ export async function createTelegramBot({ config, artifactStore, toolRegistry, t
|
|
|
359
359
|
label,
|
|
360
360
|
ctx,
|
|
361
361
|
waitForExecution: true,
|
|
362
|
+
turnPriority: priority,
|
|
363
|
+
turnQueueTtlMs: queueTtlMs,
|
|
362
364
|
onExecutionStart: ({ reject }) => {
|
|
363
365
|
if (!Number.isFinite(timeoutMs) || timeoutMs <= 0) return;
|
|
364
366
|
timer = setTimeout(() => {
|
|
@@ -31,7 +31,7 @@ export function createChatStateStore() {
|
|
|
31
31
|
};
|
|
32
32
|
}
|
|
33
33
|
|
|
34
|
-
export function createPromptExecutionReceipt(onStart = null) {
|
|
34
|
+
export function createPromptExecutionReceipt(onStart = null, metadata = {}) {
|
|
35
35
|
let resolve;
|
|
36
36
|
let reject;
|
|
37
37
|
let started = false;
|
|
@@ -43,6 +43,10 @@ export function createPromptExecutionReceipt(onStart = null) {
|
|
|
43
43
|
promise,
|
|
44
44
|
resolve,
|
|
45
45
|
reject,
|
|
46
|
+
priority: metadata.priority || "background",
|
|
47
|
+
label: String(metadata.label || "scheduled agent turn"),
|
|
48
|
+
queueTtlMs: metadata.queueTtlMs,
|
|
49
|
+
deferStart: metadata.deferStart === true,
|
|
46
50
|
start() {
|
|
47
51
|
if (started) return;
|
|
48
52
|
started = true;
|
|
@@ -179,7 +183,7 @@ export async function drainChatPromptQueue({
|
|
|
179
183
|
chatState.continueAfterClose = false;
|
|
180
184
|
}
|
|
181
185
|
try {
|
|
182
|
-
currentReceipt?.start?.();
|
|
186
|
+
if (!currentReceipt?.deferStart) currentReceipt?.start?.();
|
|
183
187
|
await processPrompt({ prompt: currentPrompt, ctx: currentCtx, receipt: currentReceipt });
|
|
184
188
|
currentReceipt?.resolve({ status: "completed" });
|
|
185
189
|
} catch (error) {
|