arisa 5.1.24 → 5.1.60

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 (63) hide show
  1. package/AGENTS.md +0 -2
  2. package/package.json +2 -3
  3. package/src/core/agent/agent-manager.js +91 -479
  4. package/src/core/agent/agent-session-lifecycle.js +181 -0
  5. package/src/core/agent/pi-capability-tools.js +183 -0
  6. package/src/core/agent/pi-runtime.js +0 -8
  7. package/src/core/agent/system-shell-tool.js +13 -2
  8. package/src/core/artifacts/artifact-store.js +90 -35
  9. package/src/core/capabilities/capability-service.js +340 -0
  10. package/src/core/config/config-defaults.js +2 -2
  11. package/src/core/conversation/session-seed-store.js +85 -0
  12. package/src/core/tasks/task-routing.js +7 -0
  13. package/src/core/tasks/task-runner.js +53 -0
  14. package/src/core/tasks/task-store.js +316 -92
  15. package/src/core/tools/ipc-client.js +0 -2
  16. package/src/core/tools/tool-output-materializer.js +41 -0
  17. package/src/core/tools/tool-registry.js +96 -23
  18. package/src/official-tools.lock.json +151 -96
  19. package/src/runtime/arisa-capabilities.js +51 -242
  20. package/src/runtime/create-app.js +10 -1
  21. package/src/runtime/create-headless-app.js +5 -2
  22. package/src/runtime/doctor.js +1 -4
  23. package/src/runtime/headless-tool-executor.js +2 -32
  24. package/src/runtime/paths.js +7 -1
  25. package/src/runtime/restart-receipt.js +90 -0
  26. package/src/transport/telegram/bot.js +373 -1273
  27. package/src/transport/telegram/chat-queue.js +198 -0
  28. package/src/transport/telegram/media.js +2 -2
  29. package/src/transport/telegram/model-callback.js +211 -0
  30. package/src/transport/telegram/model-controls.js +164 -0
  31. package/src/transport/telegram/prompt-builders.js +381 -0
  32. package/src/transport/telegram/task-dispatcher.js +131 -0
  33. package/src/transport/telegram/telegram-auth-controller.js +180 -0
  34. package/src/transport/telegram/telegram-session-bridge.js +170 -0
  35. package/src/transport/telegram/telegram-tools-command.js +28 -0
  36. package/src/transport/telegram/telegram-workspace-controller.js +66 -0
  37. package/src/transport/telegram/update-command.js +1 -1
  38. package/src/transport/telegram/workspace-group.js +83 -0
  39. package/test/agent-session-lifecycle.test.js +58 -0
  40. package/test/agent-tool-policy.test.js +7 -1
  41. package/test/artifact-store.test.js +38 -2
  42. package/test/capabilities-security.test.js +58 -0
  43. package/test/context-and-task-bounds.test.js +85 -8
  44. package/test/device-code-message.test.js +9 -0
  45. package/test/doctor.test.js +2 -4
  46. package/test/media-caption.test.js +1 -1
  47. package/test/model-selection.test.js +47 -1
  48. package/test/official-tool-dependencies.test.js +2 -0
  49. package/test/paths.test.js +4 -4
  50. package/test/pi-capability-tools.test.js +65 -0
  51. package/test/restart-receipt.test.js +39 -0
  52. package/test/session-start-operational-notes.test.js +47 -0
  53. package/test/task-idempotency.test.js +40 -0
  54. package/test/task-routing.test.js +62 -0
  55. package/test/task-store.test.js +178 -6
  56. package/test/telegram-prompt-builders.test.js +33 -0
  57. package/test/telegram-task-dispatcher.test.js +178 -0
  58. package/test/telegram-text-artifact.test.js +13 -2
  59. package/test/telegram-tools-command.test.js +47 -0
  60. package/test/telegram-workspace-group.test.js +76 -0
  61. package/test/tool-registry-run.test.js +62 -0
  62. package/test/topic-initialization.test.js +66 -0
  63. package/src/core/conversation/conversation-history-store.js +0 -142
package/AGENTS.md CHANGED
@@ -169,8 +169,6 @@ Beyond time-based scheduling, tools can drive an event queue that wakes the agen
169
169
  - `poll_tool`: a recurring checker the poller **runs directly as a tool** (no agent turn spent). The poller materializes its output with the same logic as `run_tool`, so any `agent_event` the checker emits is enqueued for the next tick. Its `recurrence` reschedules the next poll.
170
170
  - `agent_event`: an incoming event. The poller delivers it as a prompt so the active runtime evaluates it and decides the next action (it may stay silent).
171
171
 
172
- Tasks without a `runAt` fire immediately, so `agent_event` and the first `poll_tool` run on the next tick.
173
-
174
172
  The poller dispatches all three kinds, but only `agent_task` is exercised by a catalog tool today (`schedule-agent-task`). The following is the pattern to follow when a checker tool is built:
175
173
 
176
174
  How a tool wires its own polling:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "arisa",
3
- "version": "5.1.24",
3
+ "version": "5.1.60",
4
4
  "description": "Telegram + Pi Agent modular assistant",
5
5
  "type": "module",
6
6
  "main": "src/index.js",
@@ -42,8 +42,7 @@
42
42
  "dependencies": {
43
43
  "@earendil-works/pi-coding-agent": "0.80.6",
44
44
  "@sinclair/typebox": "^0.34.41",
45
- "grammy": "^1.42.0",
46
- "typebox": "1.1.38"
45
+ "grammy": "^1.42.0"
47
46
  },
48
47
  "scripts": {
49
48
  "start": "node src/index.js",