arisa 5.1.4 → 5.1.8
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/AGENTS.md +12 -4
- package/ARISA-MASTER-SLAVE-SPEC.md +844 -0
- package/README.md +25 -0
- package/package.json +1 -1
- package/src/core/agent/agent-manager.js +55 -12
- package/src/core/config/config-defaults.js +3 -1
- package/src/core/tools/daemon-processes.js +48 -6
- package/src/core/tools/daemon-runtime.js +370 -138
- package/src/core/tools/ipc-client.js +3 -0
- package/src/core/tools/official-tool-catalog.js +32 -0
- package/src/core/tools/official-tool-installer.js +183 -0
- package/src/core/tools/tool-registry.js +203 -18
- package/src/core/tools/tool-resource-note-store.js +78 -0
- package/src/index.js +25 -2
- package/src/official-tools.lock.json +40 -0
- package/src/runtime/arisa-capabilities.js +43 -3
- package/src/runtime/create-app.js +9 -0
- package/src/runtime/create-headless-app.js +77 -0
- package/src/runtime/doctor.js +27 -2
- package/src/runtime/headless-tool-executor.js +45 -0
- package/src/runtime/paths.js +16 -4
- package/src/runtime/secure-request-file.js +21 -0
- package/src/runtime/slave-bootstrap-url.js +51 -0
- package/src/runtime/slave-cli.js +267 -0
- package/src/runtime/slave-service.js +225 -0
- package/src/transport/telegram/bot.js +37 -7
- package/test/capabilities-security.test.js +29 -0
- package/test/daemon-catalog-conformance.test.js +3 -1
- package/test/daemon-runtime.test.js +58 -2
- package/test/official-tool-installer.test.js +107 -0
- package/test/paths.test.js +6 -12
- package/test/slave-cli.test.js +282 -0
- package/test/telegram-text-artifact.test.js +24 -1
- package/test/tool-capability-search.test.js +55 -0
- package/test/tool-registry-run.test.js +70 -1
- package/test/tool-resource-note.test.js +50 -0
- package/test-fixtures/fake-daemon.js +12 -1
package/AGENTS.md
CHANGED
|
@@ -76,7 +76,12 @@ const result = await arisa.tools.run({
|
|
|
76
76
|
}, { timeoutMs: 120_000 });
|
|
77
77
|
```
|
|
78
78
|
|
|
79
|
-
The IPC channel is a local socket under `~/.arisa/state`. Every request must include `toolName`; chat-scoped capabilities also require `chatId`. Exposed capabilities are explicit: tools (`list`, `help`, `skills`, `setConfig`, `run`), artifacts (`createText`, `listRecent`, `get`, `deliver`), tasks (`add`, `list`, `cancel`, `cancelAll`), agent events (`enqueueEvent`), and runtime paths (`getChatToolStateDir`, `getToolStateDir`, `getChatToolTmpDir`, `getToolTmpDir`, `getChatArtifactsDir`). Do not expose raw `agentManager`, `taskStore`, `artifactStore`, or `toolRegistry` access.
|
|
79
|
+
The IPC channel is a local socket under `~/.arisa/state`. Every request must include `toolName`; chat-scoped capabilities also require `chatId`. Exposed capabilities are explicit: tools (`list`, `help`, `skills`, `setConfig`, `setResourceNote`, `getResourceNote`, `run`), artifacts (`createText`, `listRecent`, `get`, `deliver`), tasks (`add`, `list`, `cancel`, `cancelAll`), agent events (`enqueueEvent`), and runtime paths (`getChatToolStateDir`, `getToolStateDir`, `getChatToolTmpDir`, `getToolTmpDir`, `getChatArtifactsDir`). Do not expose raw `agentManager`, `taskStore`, `artifactStore`, or `toolRegistry` access.
|
|
80
|
+
|
|
81
|
+
## Tool resource notes
|
|
82
|
+
A tool resource may have one deterministic chat-scoped operational note of at most 200 characters, keyed by the exact pair `toolName:resourceId`. Notes live in the chat state file returned by `getChatToolResourceNotesFile(chatId)`. They are separate from semantic memory and contain no credentials.
|
|
83
|
+
|
|
84
|
+
Use `set_tool_resource_note` to set or clear a note. Tool events must put the exact resource identifier in `task.source.resourceId` or pass `resourceId` to `agent.enqueueEvent`; Arisa injects the matching note into the prompt before reasoning. Tool executions may pass `resourceId` to `run_tool`, which injects the note as `request.resourceNote`. Never infer resource identifiers from free-form prompt text.
|
|
80
85
|
|
|
81
86
|
## Conceptual pipe model
|
|
82
87
|
There are two different moments where pipes can happen:
|
|
@@ -188,9 +193,12 @@ Reason in terms of capabilities, not tool names. Do not stop at "I cannot do tha
|
|
|
188
193
|
Before asking the user for recurrent context, inspect available tools by `category` and `keywords`, especially `memory`, `context`, `contacts`, and `essential`.
|
|
189
194
|
|
|
190
195
|
When the user asks for something new:
|
|
191
|
-
1.
|
|
192
|
-
2.
|
|
193
|
-
3.
|
|
196
|
+
1. call `list_tools` with a concise capability query; it searches registered tool names, descriptions, categories, keywords, inputs, and outputs, and automatically falls back to official catalog manifests when no installed tool matches
|
|
197
|
+
2. call `tool_help` for every plausible installed match before concluding the capability is missing
|
|
198
|
+
3. if the search returned no installed or official match, inspect the official catalog at `https://github.com/clasen/Arisa/tree/main/tools` before offering to build anything
|
|
199
|
+
4. install from the catalog when it fits, or create a new tool only when the needed capability is truly missing
|
|
200
|
+
|
|
201
|
+
Never offer to create or extend a tool after inspecting only a few familiar tool names. A negative capability claim requires both a complete registered-tool scan and an official-catalog scan. For example, a request to read X bookmarks must match the `bookmarks` keyword on `x-session-reader`, even if `x-reader` and `x-dm` do not expose that action.
|
|
194
202
|
|
|
195
203
|
To evaluate the official catalog:
|
|
196
204
|
1. List it: `curl -s https://api.github.com/repos/clasen/Arisa/contents/tools`.
|