@canonmsg/agent-sdk 13.2.1 → 13.3.0

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/dist/media.js CHANGED
@@ -18,10 +18,10 @@ import {
18
18
  toAnthropicImageBlock,
19
19
  toAnthropicImageBlocksWithinBudget,
20
20
  uploadMediaFile
21
- } from "./chunks/chunk-HTLKCUQG.js";
22
- import "./chunks/chunk-BPSFHEAA.js";
23
- import "./chunks/chunk-2NVLVPSG.js";
24
- import "./chunks/chunk-VIS5WXNH.js";
21
+ } from "./chunks/chunk-AVR7QCHK.js";
22
+ import "./chunks/chunk-HFT75BNB.js";
23
+ import "./chunks/chunk-NIORQKUI.js";
24
+ import "./chunks/chunk-CUPSYLBV.js";
25
25
  export {
26
26
  DEFAULT_ANTHROPIC_REQUEST_HEADROOM_BYTES,
27
27
  DEFAULT_MEDIA_CACHE_DIR,
@@ -2,20 +2,20 @@ import {
2
2
  WASM_HOST_CONFIGURE,
3
3
  WASM_HOST_PROVISION,
4
4
  keyFile
5
- } from "./chunks/chunk-POBMFS2K.js";
5
+ } from "./chunks/chunk-BQGXOAIW.js";
6
6
  import {
7
7
  MAX_INPUT,
8
8
  NodeMlsDevCustodyError,
9
9
  parseFrame,
10
10
  rejected,
11
11
  requireValue
12
- } from "./chunks/chunk-BPSFHEAA.js";
12
+ } from "./chunks/chunk-HFT75BNB.js";
13
13
  import {
14
14
  __name,
15
15
  canonicalEndpointJson,
16
16
  isMlsDevReceiptClockSkew,
17
17
  parseMlsDevDeviceContext
18
- } from "./chunks/chunk-VIS5WXNH.js";
18
+ } from "./chunks/chunk-CUPSYLBV.js";
19
19
 
20
20
  // src/mls-wasm-host.ts
21
21
  import { createHash } from "node:crypto";
@@ -1,5 +1,6 @@
1
1
  import { type CanonEndpoint, type CanonMlsDevOptions, type MlsDevCurrentAudience } from '../internal/core/index.js';
2
2
  import { type MlsDevDeviceContext } from '../internal/backend-contracts/index.js';
3
+ import { type CommunicateShape } from '../internal/agent-tools/index.js';
3
4
  import type { ToolDefinition } from './types.js';
4
5
  /**
5
6
  * What `createRunner({ mls })` takes: issuer pins and custody, plus the custody's own shutdown. With `provisioned`
@@ -59,8 +60,17 @@ export declare function requireMlsSupport(input: {
59
60
  * digit, mark or `_` (`@Cipher A` does not mention `Cipher AB`).
60
61
  */
61
62
  export declare function mentionsAgent(text: string, names: ReadonlyArray<string | undefined>): boolean;
62
- /** An encrypted turn's `communicate`: listing, and text to its own room, which the runner encrypts. */
63
+ /** What an encrypted turn's `communicate` offers: listing, and text to its own room, which the runner encrypts. */
64
+ export declare const ENCRYPTED_COMMUNICATE_SHAPE: {
65
+ readonly list_conversations: readonly ["limit"];
66
+ readonly discover_agents: readonly ["limit"];
67
+ readonly message_existing: readonly ["conversationId", "text"];
68
+ };
69
+ /** An encrypted turn's `communicate`, as one flat schema (`communicateInputSchema`). */
63
70
  export declare const ENCRYPTED_COMMUNICATE: ToolDefinition;
71
+ /** What an errand turn's `communicate` offers (§12.6): listing, its recipient and its origin, and for a person or agent, a new conversation. */
72
+ export declare const errandShape: (contact: boolean) => CommunicateShape;
73
+ export declare const errandCommunicate: (contact: boolean) => ToolDefinition;
64
74
  /**
65
75
  * The operator's MLS configuration file: public issuer pins and the custody helper's identity, never credentials or
66
76
  * private keys. A canonical, current-user-owned regular file, not group- or other-writable, at most 64 KiB, read once.
@@ -101,7 +111,7 @@ export declare function runMlsDevSetup(endpoint: CanonEndpoint, action: MlsSetup
101
111
  principalId: string;
102
112
  installationId: string;
103
113
  ownershipVersion: number | undefined;
104
- status: "absent" | "identity_committed" | "registered" | "credential_committed" | "revoked";
114
+ status: "revoked" | "absent" | "identity_committed" | "registered" | "credential_committed";
105
115
  deviceId: string | null;
106
116
  credentialGeneration: number;
107
117
  }>;
@@ -4,9 +4,12 @@ import { type CanonEndpoint, type CanonRuntimeDescriptor, type CommunicateInput,
4
4
  import { type RunnerMlsOptions } from './mls.js';
5
5
  import { type RuntimeDriver } from './types.js';
6
6
  export interface RunnerOptions {
7
- /** Canon refused this runner for good (its client floor, mls-cutover-operator.md §2 15b); the CLI stops and exits. */
7
+ /** Canon refused this runner for good (its client floor, mls-cutover-operator.md §2 15b, or the agent's home moved to
8
+ * another installation or Canon's relay); the CLI stops and exits. */
8
9
  onFatal?(error: Error): void;
9
- /** How the runner names itself to Canon's client floor (`X-Canon-Client`); the CLI passes agent-sdk's version. */
10
+ /** Move the agent's home back to this installation after another one took it (`canon-agent run --take-over`). */
11
+ takeOver?: boolean;
12
+ /** How the runner names itself to Canon's client floor (`X-Canon-Client`); by default agent-sdk's own version (RUNNER_CLIENT). */
10
13
  client?: {
11
14
  kind: 'runner';
12
15
  version: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@canonmsg/agent-sdk",
3
- "version": "13.2.1",
3
+ "version": "13.3.0",
4
4
  "description": "Canon Agent SDK — build AI agents that participate in Canon conversations",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",