@canonmsg/agent-sdk 13.1.0 → 13.2.1
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 +1 -1
- package/dist/chunks/{chunk-YHDDOADK.js → chunk-2NVLVPSG.js} +1 -1
- package/dist/chunks/{chunk-YJUPKU47.js → chunk-BPSFHEAA.js} +2 -2
- package/dist/chunks/{chunk-ZPBOGOAD.js → chunk-HTLKCUQG.js} +353 -720
- package/dist/chunks/{chunk-DTAWEQCM.js → chunk-POBMFS2K.js} +2 -2
- package/dist/chunks/{chunk-IEKVS7AN.js → chunk-TJBG6NKF.js} +261 -97
- package/dist/chunks/{chunk-5WPAB5MB.js → chunk-VIS5WXNH.js} +0 -24
- package/dist/chunks/{mls-crypto-NZVMSUFU.js → mls-crypto-ZBEC26B5.js} +2 -2
- package/dist/cli.js +6 -6
- package/dist/index.js +6 -6
- package/dist/internal/core/client.d.ts +1 -215
- package/dist/internal/core/index.d.ts +0 -1
- package/dist/internal/endpoint/completions.d.ts +45 -0
- package/dist/internal/endpoint/engine.d.ts +17 -6
- package/dist/internal/endpoint/events.d.ts +1 -2
- package/dist/internal/endpoint/index.d.ts +1 -5
- package/dist/internal/endpoint/media.d.ts +2 -61
- package/dist/internal/endpoint/queue.d.ts +1 -3
- package/dist/media.js +4 -4
- package/dist/mls-wasm-host.js +3 -3
- package/dist/runner/errands.d.ts +2 -2
- package/dist/runner/runner.d.ts +6 -1
- package/package.json +2 -3
- package/dist/internal/core/completed-output-journal.d.ts +0 -34
- package/dist/internal/endpoint/artifact-images.d.ts +0 -60
- package/dist/internal/endpoint/artifact-reducer.d.ts +0 -35
- package/dist/internal/endpoint/artifact-views.d.ts +0 -113
- package/dist/internal/endpoint/artifacts.d.ts +0 -75
package/README.md
CHANGED
|
@@ -55,7 +55,7 @@ process.on('SIGTERM', () => runner.stop().then(() => process.exit(0)));
|
|
|
55
55
|
|
|
56
56
|
`createRunner` checks `home` before anything else. `start()` connects and starts taking input. `stop()` stops intake, returns messages no turn has taken to the inbox, and lets running turns finish within the shutdown grace. The runner reads no environment variables.
|
|
57
57
|
|
|
58
|
-
`runner.communicate(input)` sends outside any turn, for example from a cron job. It takes the `communicate` tool's input (the exported `CommunicateInput` type), acts under the agent's identity, and needs `start()` first:
|
|
58
|
+
`runner.communicate(input)` sends outside any turn, for example from a cron job. It takes the `communicate` tool's input (the exported `CommunicateInput` type), acts under the agent's identity, and needs `start()` first. Text to a conversation is encrypted for the members it has then, journaled in `CANON_HOME` and sent once, even across a restart, as a reply is; `start_conversation` has the agent's device found the conversation encrypted and send the opening line. The same `messageId` is the same message or start, and other text under it is refused (`MESSAGE_ID_CONFLICT`). A send Canon cannot take yet fails with `OPERATION_PENDING`: it is saved and goes on its own, and calling again with the same `messageId` says how it went. One Canon refused stays refused (`MESSAGE_REFUSED`). An agent whose outbound policy is closed writes unprompted only to its owner, in a conversation of just the two of them; anywhere else it is refused (`OUTBOUND_NOT_ALLOWED`). Listing, creating, inviting and leaving go to Canon as they are:
|
|
59
59
|
|
|
60
60
|
```js
|
|
61
61
|
await runner.communicate({
|
|
@@ -9,7 +9,7 @@ import {
|
|
|
9
9
|
parseMlsDevEnrollmentPrincipal,
|
|
10
10
|
parseMlsDevIssuerKeyVersion,
|
|
11
11
|
parseMlsDevReceiptKeyVersion
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-VIS5WXNH.js";
|
|
13
13
|
|
|
14
14
|
// ../endpoint/src/mls-crypto.ts
|
|
15
15
|
import { ed25519 } from "@noble/curves/ed25519.js";
|
|
@@ -43,7 +43,7 @@ import {
|
|
|
43
43
|
parseMlsDevKeyPackagePreparation,
|
|
44
44
|
parseMlsDevKeyPackagePublicationReceipt,
|
|
45
45
|
parseMlsDevKeyPackagePublish
|
|
46
|
-
} from "./chunk-
|
|
46
|
+
} from "./chunk-VIS5WXNH.js";
|
|
47
47
|
|
|
48
48
|
// ../endpoint/src/events.ts
|
|
49
49
|
function createEndpointEventHub(input) {
|
|
@@ -86,7 +86,7 @@ function createEndpointEventHub(input) {
|
|
|
86
86
|
if (event.kind === "replay.expired") lastEventId = void 0;
|
|
87
87
|
else if (event.id) lastEventId = event.id;
|
|
88
88
|
for (const observer of observers) safe(() => observer.listener(event));
|
|
89
|
-
if (/^(
|
|
89
|
+
if (/^(message\.|conversations?\.|contacts?\.|agent\.context$|replay\.|voice\.session\.)/.test(event.kind)) input.invalidate(event);
|
|
90
90
|
}
|
|
91
91
|
} catch (error) {
|
|
92
92
|
if (!signal.aborted) {
|