@canonmsg/agent-sdk 13.3.0 → 13.3.2
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/chunks/{chunk-NIORQKUI.js → chunk-4JUTT225.js} +1 -1
- package/dist/chunks/{chunk-ZT3TJZAV.js → chunk-LYQEHXPD.js} +74 -16
- package/dist/chunks/{chunk-CUPSYLBV.js → chunk-ONICI23G.js} +4 -0
- package/dist/chunks/{chunk-HFT75BNB.js → chunk-S65ADM24.js} +1 -1
- package/dist/chunks/{chunk-AVR7QCHK.js → chunk-ZM2DAXA7.js} +4 -4
- package/dist/chunks/{chunk-BQGXOAIW.js → chunk-ZP7MZKXI.js} +2 -2
- package/dist/chunks/{mls-crypto-AW7TY744.js → mls-crypto-G2TVX25P.js} +2 -2
- package/dist/cli.js +15 -8
- package/dist/index.js +6 -6
- package/dist/internal/backend-contracts/apiErrors.d.ts +4 -0
- package/dist/media.js +4 -4
- package/dist/mls-wasm-host.js +3 -3
- package/package.json +1 -1
|
@@ -9,7 +9,7 @@ import {
|
|
|
9
9
|
parseMlsDevEnrollmentPrincipal,
|
|
10
10
|
parseMlsDevIssuerKeyVersion,
|
|
11
11
|
parseMlsDevReceiptKeyVersion
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-ONICI23G.js";
|
|
13
13
|
|
|
14
14
|
// ../endpoint/src/mls-crypto.ts
|
|
15
15
|
import { ed25519 } from "@noble/curves/ed25519.js";
|
|
@@ -8,7 +8,7 @@ import {
|
|
|
8
8
|
wasmMlsCustody,
|
|
9
9
|
windowsAclProblems,
|
|
10
10
|
writeDurable
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-ZP7MZKXI.js";
|
|
12
12
|
import {
|
|
13
13
|
BoundedFileReadError,
|
|
14
14
|
CanonApiError,
|
|
@@ -32,15 +32,16 @@ import {
|
|
|
32
32
|
splitTextWithinBytes,
|
|
33
33
|
utf8ByteLength,
|
|
34
34
|
verifyCanonRuntimeConnection
|
|
35
|
-
} from "./chunk-
|
|
35
|
+
} from "./chunk-ZM2DAXA7.js";
|
|
36
36
|
import {
|
|
37
|
+
EndpointError,
|
|
37
38
|
NodeMlsDevCustodyError,
|
|
38
39
|
createNodeMlsDevCustody,
|
|
39
40
|
createPortableNodeMlsDevCustody
|
|
40
|
-
} from "./chunk-
|
|
41
|
+
} from "./chunk-S65ADM24.js";
|
|
41
42
|
import {
|
|
42
43
|
parseMlsDevClientConfiguration
|
|
43
|
-
} from "./chunk-
|
|
44
|
+
} from "./chunk-4JUTT225.js";
|
|
44
45
|
import {
|
|
45
46
|
AGENT_HOME_ELSEWHERE,
|
|
46
47
|
CONNECTOR_RELAY_ANSWER_WITHIN_MS,
|
|
@@ -75,7 +76,7 @@ import {
|
|
|
75
76
|
parseMlsDevGroupRoster,
|
|
76
77
|
resolveAllowedUploadMimeType,
|
|
77
78
|
resolveConversationPolicyScope
|
|
78
|
-
} from "./chunk-
|
|
79
|
+
} from "./chunk-ONICI23G.js";
|
|
79
80
|
|
|
80
81
|
// src/runner/types.ts
|
|
81
82
|
var DriverSessionError = class extends Error {
|
|
@@ -2686,7 +2687,7 @@ function relayRunnerHome(home, installationId) {
|
|
|
2686
2687
|
__name(relayRunnerHome, "relayRunnerHome");
|
|
2687
2688
|
|
|
2688
2689
|
// src/version.ts
|
|
2689
|
-
var AGENT_SDK_VERSION = true ? "13.3.
|
|
2690
|
+
var AGENT_SDK_VERSION = true ? "13.3.2" : void 0;
|
|
2690
2691
|
var RUNNER_CLIENT = isCanonClientVersion(AGENT_SDK_VERSION) ? Object.freeze({ kind: "runner", version: AGENT_SDK_VERSION }) : void 0;
|
|
2691
2692
|
|
|
2692
2693
|
// src/runner/runner.ts
|
|
@@ -3383,6 +3384,7 @@ function answerText(answer) {
|
|
|
3383
3384
|
return answer.text?.trim() ? answer.text : "They answered with an empty message.";
|
|
3384
3385
|
}
|
|
3385
3386
|
__name(answerText, "answerText");
|
|
3387
|
+
var AGENT_KEY_REFUSED = "AGENT_KEY_REFUSED";
|
|
3386
3388
|
var sha2564 = /* @__PURE__ */ __name((value) => createHash9("sha256").update(value).digest("hex"), "sha256");
|
|
3387
3389
|
var toolText = /* @__PURE__ */ __name((text3, isError = false) => ({ content: [{ type: "text", text: text3 }], ...isError ? { isError } : {} }), "toolText");
|
|
3388
3390
|
var turnEnded2 = /* @__PURE__ */ __name(() => new DOMException("This turn has ended", "AbortError"), "turnEnded");
|
|
@@ -3570,7 +3572,10 @@ async function createRunner(options) {
|
|
|
3570
3572
|
await assertPrivateHome(home);
|
|
3571
3573
|
const mls = options.mls === false ? void 0 : options.mls ?? (options.endpoint ? void 0 : defaultMlsDevice(home, options.environmentId));
|
|
3572
3574
|
const log = options.log ?? ((line) => console.error(`[canon-runner] ${line}`));
|
|
3573
|
-
const warn = /* @__PURE__ */ __name((what) => (error) =>
|
|
3575
|
+
const warn = /* @__PURE__ */ __name((what) => (error) => {
|
|
3576
|
+
if (mayEnd(error)) void recheck();
|
|
3577
|
+
log(`${what}: ${error instanceof Error ? error.message : String(error)}`);
|
|
3578
|
+
}, "warn");
|
|
3574
3579
|
const abortGraceMs = options.abortGraceMs ?? 1e4;
|
|
3575
3580
|
const noProgressMs = options.noProgressMs ?? 30 * 6e4;
|
|
3576
3581
|
const askExpiryMs = options.askExpiryMs ?? 60 * 6e4;
|
|
@@ -3751,16 +3756,50 @@ async function createRunner(options) {
|
|
|
3751
3756
|
}
|
|
3752
3757
|
__name(refuse, "refuse");
|
|
3753
3758
|
let homeSince = 0;
|
|
3759
|
+
let refusedBy;
|
|
3760
|
+
async function readAgent() {
|
|
3761
|
+
const refuse2 = /* @__PURE__ */ __name((error) => {
|
|
3762
|
+
refusedBy = error;
|
|
3763
|
+
options.onFatal?.(error);
|
|
3764
|
+
return error;
|
|
3765
|
+
}, "refuse");
|
|
3766
|
+
let me;
|
|
3767
|
+
try {
|
|
3768
|
+
me = await client.getAgentMe();
|
|
3769
|
+
} catch (error) {
|
|
3770
|
+
if (options.relay || !(error instanceof CanonApiError && error.status === 401)) throw error;
|
|
3771
|
+
throw refuse2(Object.assign(
|
|
3772
|
+
new Error(`Canon no longer accepts ${displayName ?? "this agent"}'s key: a new key replaced it, or the agent was deleted.`),
|
|
3773
|
+
{ code: AGENT_KEY_REFUSED, cause: error }
|
|
3774
|
+
));
|
|
3775
|
+
}
|
|
3776
|
+
if (!options.relay && me.home && (me.home.kind === "connector" || me.home.installationId !== void 0 && me.home.installationId !== installationId)) {
|
|
3777
|
+
throw refuse2(Object.assign(new Error(agentHomeElsewhereMessage(me.displayName, me.home)), { code: AGENT_HOME_ELSEWHERE }));
|
|
3778
|
+
}
|
|
3779
|
+
refusedBy = void 0;
|
|
3780
|
+
return me;
|
|
3781
|
+
}
|
|
3782
|
+
__name(readAgent, "readAgent");
|
|
3783
|
+
function mayEnd(error) {
|
|
3784
|
+
return (error instanceof EndpointError || error instanceof CanonApiError) && (error.code === AGENT_HOME_ELSEWHERE || error.status === 401 && error.code !== "CONNECTOR_ACCESS_TOKEN_EXPIRED");
|
|
3785
|
+
}
|
|
3786
|
+
__name(mayEnd, "mayEnd");
|
|
3787
|
+
let rechecking;
|
|
3788
|
+
function recheck() {
|
|
3789
|
+
if (options.relay || !client) return Promise.resolve();
|
|
3790
|
+
rechecking ??= readAgent().then(() => void 0, (error) => {
|
|
3791
|
+
if (error !== refusedBy) log(`home check: ${error instanceof Error ? error.message : String(error)}`);
|
|
3792
|
+
}).finally(() => {
|
|
3793
|
+
rechecking = void 0;
|
|
3794
|
+
});
|
|
3795
|
+
return within(rechecking, 1e4).then(() => void 0);
|
|
3796
|
+
}
|
|
3797
|
+
__name(recheck, "recheck");
|
|
3754
3798
|
async function authorize() {
|
|
3755
3799
|
await endpoint.mlsDevDevice.ensureReady();
|
|
3756
|
-
const me = await
|
|
3800
|
+
const me = await readAgent();
|
|
3757
3801
|
requireMlsSupport({ environmentId: options.environmentId });
|
|
3758
3802
|
if (me.agentId !== agentId || me.ownershipVersion !== ownershipVersion) throw new Error("MLS_AUTHORITY_REQUIRED");
|
|
3759
|
-
if (!options.relay && me.home && (me.home.kind === "connector" || me.home.installationId !== void 0 && me.home.installationId !== installationId)) {
|
|
3760
|
-
const error = Object.assign(new Error(agentHomeElsewhereMessage(me.displayName, me.home)), { code: AGENT_HOME_ELSEWHERE });
|
|
3761
|
-
options.onFatal?.(error);
|
|
3762
|
-
throw error;
|
|
3763
|
-
}
|
|
3764
3803
|
homeSince = !options.relay && me.home?.kind === "runner" ? me.home.since ?? 0 : 0;
|
|
3765
3804
|
outboundClosed = me.outboundPolicy === "closed";
|
|
3766
3805
|
if (outboundClosed && options.relay) throw new Error("MLS_AUTHORITY_REQUIRED");
|
|
@@ -5529,6 +5568,7 @@ ${JSON.stringify(result, null, 2)}`);
|
|
|
5529
5568
|
...options.fetch ? { fetch: options.fetch } : {}
|
|
5530
5569
|
});
|
|
5531
5570
|
const me = await client.getAgentMe();
|
|
5571
|
+
displayName = me.displayName;
|
|
5532
5572
|
lock = acquireLock(runnerLockName(connection.environmentId, me.agentId), home);
|
|
5533
5573
|
endpoint = await client.getEndpoint();
|
|
5534
5574
|
const identity = await endpoint.ready();
|
|
@@ -5607,15 +5647,30 @@ ${JSON.stringify(result, null, 2)}`);
|
|
|
5607
5647
|
roots = outbound ? (await Promise.all(outbound.roots.map((root) => realpath4(root).catch(() => "")))).filter(Boolean) : [];
|
|
5608
5648
|
if (driver.capabilities.tools) tools = await startToolServer();
|
|
5609
5649
|
await recover();
|
|
5610
|
-
const
|
|
5650
|
+
const runtimeState = createRuntimeStatePublisher({ agentId, clientType: CLIENT_TYPES[driver.name], hostMode: true, rtdb: initRTDBAuth(client) });
|
|
5651
|
+
const publisher = {
|
|
5652
|
+
publishAgentRuntime: /* @__PURE__ */ __name((runtime) => refusedBy ? Promise.resolve() : runtimeState.publishAgentRuntime(runtime), "publishAgentRuntime"),
|
|
5653
|
+
clearAgentRuntime: /* @__PURE__ */ __name(() => refusedBy ? Promise.resolve() : runtimeState.clearAgentRuntime(), "clearAgentRuntime")
|
|
5654
|
+
};
|
|
5611
5655
|
heartbeat = createRuntimeHeartbeat({ publisher, getRuntime: /* @__PURE__ */ __name(() => ({ runtimeDescriptor: descriptor }), "getRuntime"), onError: warn("runtime heartbeat") });
|
|
5612
5656
|
inbound = endpoint.acceptInbound({ kind: "message.created", offer, onError: warn("inbox"), ...mlsOn ? { intervalMs: 1e3 } : {} });
|
|
5613
5657
|
inbound.start();
|
|
5614
5658
|
let reconnect = false;
|
|
5659
|
+
let streamUp = false;
|
|
5660
|
+
let following = Promise.resolve();
|
|
5661
|
+
const follow = /* @__PURE__ */ __name(() => {
|
|
5662
|
+
const check = reconnect;
|
|
5663
|
+
following = following.then(async () => {
|
|
5664
|
+
if (check) await recheck();
|
|
5665
|
+
if (streamUp) heartbeat?.connect();
|
|
5666
|
+
else void heartbeat?.disconnect();
|
|
5667
|
+
}).catch(warn("runtime heartbeat"));
|
|
5668
|
+
}, "follow");
|
|
5615
5669
|
detach.push(endpoint.observeEvents(onEvent, {
|
|
5616
5670
|
families: ["messages", "contacts", "runtime_turn"],
|
|
5617
5671
|
onConnected: /* @__PURE__ */ __name(() => {
|
|
5618
|
-
|
|
5672
|
+
streamUp = true;
|
|
5673
|
+
follow();
|
|
5619
5674
|
if (mlsOn) void noteAdmissions().catch(warn("room admission"));
|
|
5620
5675
|
if (reconnect) {
|
|
5621
5676
|
for (const target of rooms.values()) if (target.turn) scheduleControl(target);
|
|
@@ -5628,7 +5683,10 @@ ${JSON.stringify(result, null, 2)}`);
|
|
|
5628
5683
|
}
|
|
5629
5684
|
reconnect = true;
|
|
5630
5685
|
}, "onConnected"),
|
|
5631
|
-
onDisconnected: /* @__PURE__ */ __name(() =>
|
|
5686
|
+
onDisconnected: /* @__PURE__ */ __name(() => {
|
|
5687
|
+
streamUp = false;
|
|
5688
|
+
follow();
|
|
5689
|
+
}, "onDisconnected"),
|
|
5632
5690
|
onError: warn("event stream")
|
|
5633
5691
|
}));
|
|
5634
5692
|
if (errands) {
|
|
@@ -2082,6 +2082,9 @@ function isMlsDevReceiptClockSkew(value) {
|
|
|
2082
2082
|
}
|
|
2083
2083
|
__name(isMlsDevReceiptClockSkew, "isMlsDevReceiptClockSkew");
|
|
2084
2084
|
|
|
2085
|
+
// ../backend-contracts/src/apiErrors.ts
|
|
2086
|
+
var AGENT_DELETED = "AGENT_DELETED";
|
|
2087
|
+
|
|
2085
2088
|
// ../backend-contracts/src/verbContract.ts
|
|
2086
2089
|
var CANON_VERBS_SCHEMA_ID = "https://canonmsg.com/schemas/canon.verbs.v1.json";
|
|
2087
2090
|
var VERB_ID_PATTERNS = {
|
|
@@ -5580,6 +5583,7 @@ export {
|
|
|
5580
5583
|
CANON_VERB_WIRE_SCHEMA_VERSION,
|
|
5581
5584
|
projectVerbIntentToWire,
|
|
5582
5585
|
parseDirectConversationSelection,
|
|
5586
|
+
AGENT_DELETED,
|
|
5583
5587
|
normalizeRuntimeCommandAlias,
|
|
5584
5588
|
normalizeRuntimeCommandAliases,
|
|
5585
5589
|
MAX_PUBLIC_RUNTIME_COMMANDS,
|
|
@@ -43,7 +43,7 @@ import {
|
|
|
43
43
|
parseMlsDevKeyPackagePreparation,
|
|
44
44
|
parseMlsDevKeyPackagePublicationReceipt,
|
|
45
45
|
parseMlsDevKeyPackagePublish
|
|
46
|
-
} from "./chunk-
|
|
46
|
+
} from "./chunk-ONICI23G.js";
|
|
47
47
|
|
|
48
48
|
// ../endpoint/src/events.ts
|
|
49
49
|
function createEndpointEventHub(input) {
|
|
@@ -5,7 +5,7 @@ import {
|
|
|
5
5
|
createHttpEndpointTransport,
|
|
6
6
|
createNodeEndpointStore,
|
|
7
7
|
validateEndpointContentBoundary
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-S65ADM24.js";
|
|
9
9
|
import {
|
|
10
10
|
AGENT_HOME_ELSEWHERE,
|
|
11
11
|
CANON_ENDPOINT_PROTOCOL,
|
|
@@ -108,7 +108,7 @@ import {
|
|
|
108
108
|
readMembershipChangeMetadata,
|
|
109
109
|
resolveAllowedUploadMimeType,
|
|
110
110
|
sanitizeDownloadFileName
|
|
111
|
-
} from "./chunk-
|
|
111
|
+
} from "./chunk-ONICI23G.js";
|
|
112
112
|
|
|
113
113
|
// src/media.ts
|
|
114
114
|
import { createWriteStream as createWriteStream2 } from "node:fs";
|
|
@@ -7410,7 +7410,7 @@ function createEndpoint(options) {
|
|
|
7410
7410
|
}
|
|
7411
7411
|
__name(joinInvitedRoom, "joinInvitedRoom");
|
|
7412
7412
|
async function discoverInviteeRooms() {
|
|
7413
|
-
if (!mlsDevGroups || closed) return;
|
|
7413
|
+
if (!mlsDevGroups || closed || options.mlsDevDevice?.principal.type !== "human") return;
|
|
7414
7414
|
const { requests } = await endpoint.query(
|
|
7415
7415
|
"list_contact_requests",
|
|
7416
7416
|
{ direction: "inbound" }
|
|
@@ -9089,7 +9089,7 @@ async function acquireAgentEndpoint(input) {
|
|
|
9089
9089
|
}
|
|
9090
9090
|
const requestedMls = input.options.mlsDev;
|
|
9091
9091
|
const mls = requestedMls ? await (async () => {
|
|
9092
|
-
const crypto2 = await import("./mls-crypto-
|
|
9092
|
+
const crypto2 = await import("./mls-crypto-G2TVX25P.js");
|
|
9093
9093
|
const configuration = crypto2.parseMlsDevClientConfiguration(requestedMls.configuration);
|
|
9094
9094
|
if (configuration.environmentId !== environmentId || baseUrl !== CANON_RUNTIME_ENDPOINT_DEFAULTS[configuration.environmentId]?.apiBaseUrl || configuration.principalIds && !configuration.principalIds.includes(input.principalId) || !Number.isSafeInteger(input.ownershipVersion) || input.ownershipVersion < 0) throw new Error("MLS_DEV_AGENT_CONFIGURATION_BINDING_MISMATCH");
|
|
9095
9095
|
const custody = requestedMls.custody;
|
|
@@ -6,11 +6,11 @@ import {
|
|
|
6
6
|
frame,
|
|
7
7
|
requireValue,
|
|
8
8
|
typedNodeMlsDevCustody
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-S65ADM24.js";
|
|
10
10
|
import {
|
|
11
11
|
__name,
|
|
12
12
|
parseMlsDevDeviceContext
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-ONICI23G.js";
|
|
14
14
|
|
|
15
15
|
// src/runner/home.ts
|
|
16
16
|
import { randomBytes } from "node:crypto";
|
|
@@ -2,8 +2,8 @@ import {
|
|
|
2
2
|
createMlsDevCredentialVerifier,
|
|
3
3
|
mlsDevDeviceHttpConfiguration,
|
|
4
4
|
parseMlsDevClientConfiguration
|
|
5
|
-
} from "./chunk-
|
|
6
|
-
import "./chunk-
|
|
5
|
+
} from "./chunk-4JUTT225.js";
|
|
6
|
+
import "./chunk-ONICI23G.js";
|
|
7
7
|
export {
|
|
8
8
|
createMlsDevCredentialVerifier,
|
|
9
9
|
mlsDevDeviceHttpConfiguration,
|
package/dist/cli.js
CHANGED
|
@@ -26,11 +26,11 @@ import {
|
|
|
26
26
|
runMlsDevSetup,
|
|
27
27
|
startRelayChannel,
|
|
28
28
|
writeRelayCredential
|
|
29
|
-
} from "./chunks/chunk-
|
|
29
|
+
} from "./chunks/chunk-LYQEHXPD.js";
|
|
30
30
|
import {
|
|
31
31
|
assertPrivateHome,
|
|
32
32
|
runnerLockName
|
|
33
|
-
} from "./chunks/chunk-
|
|
33
|
+
} from "./chunks/chunk-ZP7MZKXI.js";
|
|
34
34
|
import {
|
|
35
35
|
CanonApiError,
|
|
36
36
|
CanonClient,
|
|
@@ -43,13 +43,14 @@ import {
|
|
|
43
43
|
resolveCanonRuntimeConnection,
|
|
44
44
|
runCli,
|
|
45
45
|
verifyCanonRuntimeConnection
|
|
46
|
-
} from "./chunks/chunk-
|
|
47
|
-
import "./chunks/chunk-
|
|
48
|
-
import "./chunks/chunk-
|
|
46
|
+
} from "./chunks/chunk-ZM2DAXA7.js";
|
|
47
|
+
import "./chunks/chunk-S65ADM24.js";
|
|
48
|
+
import "./chunks/chunk-4JUTT225.js";
|
|
49
49
|
import {
|
|
50
|
+
AGENT_DELETED,
|
|
50
51
|
AGENT_HOME_ELSEWHERE,
|
|
51
52
|
__name
|
|
52
|
-
} from "./chunks/chunk-
|
|
53
|
+
} from "./chunks/chunk-ONICI23G.js";
|
|
53
54
|
|
|
54
55
|
// src/cli.ts
|
|
55
56
|
import { realpathSync } from "node:fs";
|
|
@@ -57,8 +58,10 @@ import { homedir, tmpdir } from "node:os";
|
|
|
57
58
|
import { dirname, join, resolve } from "node:path";
|
|
58
59
|
import { pathToFileURL } from "node:url";
|
|
59
60
|
import { parseArgs } from "node:util";
|
|
61
|
+
var OWNER_DECLINED = "OWNER_DECLINED";
|
|
60
62
|
function exitCodeFor(error) {
|
|
61
|
-
|
|
63
|
+
const code = error?.code;
|
|
64
|
+
return code === AGENT_HOME_ELSEWHERE || code === OWNER_DECLINED || code === AGENT_DELETED ? 0 : 1;
|
|
62
65
|
}
|
|
63
66
|
__name(exitCodeFor, "exitCodeFor");
|
|
64
67
|
function stopThenExit(stop, code, exit = process.exit, boundMs = 15e3) {
|
|
@@ -606,6 +609,10 @@ async function ensureRegistered(values, driver) {
|
|
|
606
609
|
clientType: REGISTRATION_CLIENT_TYPES[driver] ?? "generic",
|
|
607
610
|
developerInfo: `canon-agent run --driver ${driver}`
|
|
608
611
|
}
|
|
612
|
+
}).catch((error) => {
|
|
613
|
+
if (!(error instanceof CanonApiError && error.code === AGENT_DELETED)) throw error;
|
|
614
|
+
clearPendingRegistration(profile);
|
|
615
|
+
throw Object.assign(new Error(`${agentName} was deleted by its owner, so Canon gives it no new key. To start over as a new agent, run this command again with a new --profile, or with another --name.`), { code: AGENT_DELETED });
|
|
609
616
|
});
|
|
610
617
|
switch (progress.status) {
|
|
611
618
|
case "approved":
|
|
@@ -615,7 +622,7 @@ async function ensureRegistered(values, driver) {
|
|
|
615
622
|
throw new Error(`Nobody has answered the request for ${ask} yet. It stays open: run this command again to keep waiting.`);
|
|
616
623
|
case "rejected":
|
|
617
624
|
clearPendingRegistration(profile);
|
|
618
|
-
throw new Error(`The owner declined ${ask}. Nothing was saved; run this command again to ask again.`);
|
|
625
|
+
throw Object.assign(new Error(`The owner declined ${ask}. Nothing was saved; run this command again to ask again.`), { code: OWNER_DECLINED });
|
|
619
626
|
case "credential-expired":
|
|
620
627
|
clearPendingRegistration(profile);
|
|
621
628
|
throw new Error(`The owner approved ${ask}, but its key was not collected within 48 hours and Canon removed it. Run this command again to ask again.`);
|
package/dist/index.js
CHANGED
|
@@ -26,8 +26,8 @@ import {
|
|
|
26
26
|
runMlsDevSetup,
|
|
27
27
|
runtimeDescriptor,
|
|
28
28
|
startRelayChannel
|
|
29
|
-
} from "./chunks/chunk-
|
|
30
|
-
import "./chunks/chunk-
|
|
29
|
+
} from "./chunks/chunk-LYQEHXPD.js";
|
|
30
|
+
import "./chunks/chunk-ZP7MZKXI.js";
|
|
31
31
|
import {
|
|
32
32
|
CanonApiError,
|
|
33
33
|
DEFAULT_ANTHROPIC_REQUEST_HEADROOM_BYTES,
|
|
@@ -52,10 +52,10 @@ import {
|
|
|
52
52
|
toAnthropicImageBlock,
|
|
53
53
|
toAnthropicImageBlocksWithinBudget,
|
|
54
54
|
uploadMediaFile
|
|
55
|
-
} from "./chunks/chunk-
|
|
56
|
-
import "./chunks/chunk-
|
|
57
|
-
import "./chunks/chunk-
|
|
58
|
-
import "./chunks/chunk-
|
|
55
|
+
} from "./chunks/chunk-ZM2DAXA7.js";
|
|
56
|
+
import "./chunks/chunk-S65ADM24.js";
|
|
57
|
+
import "./chunks/chunk-4JUTT225.js";
|
|
58
|
+
import "./chunks/chunk-ONICI23G.js";
|
|
59
59
|
export {
|
|
60
60
|
CanonApiError,
|
|
61
61
|
ConnectorRelayError,
|
|
@@ -1 +1,5 @@
|
|
|
1
1
|
export declare const MESSAGE_ADMISSION_REQUIRED_CODE: "MESSAGE_ADMISSION_REQUIRED";
|
|
2
|
+
/** A request for a new key named an agent its owner deleted (`POST /agents/register`, 410): a deleted agent never comes
|
|
3
|
+
* back, so Canon refuses it before the owner hears of it. */
|
|
4
|
+
export declare const AGENT_DELETED: "AGENT_DELETED";
|
|
5
|
+
export declare const AGENT_DELETED_MESSAGE = "This agent was deleted by its owner, so it cannot get a new key; register a new agent instead.";
|
package/dist/media.js
CHANGED
|
@@ -18,10 +18,10 @@ import {
|
|
|
18
18
|
toAnthropicImageBlock,
|
|
19
19
|
toAnthropicImageBlocksWithinBudget,
|
|
20
20
|
uploadMediaFile
|
|
21
|
-
} from "./chunks/chunk-
|
|
22
|
-
import "./chunks/chunk-
|
|
23
|
-
import "./chunks/chunk-
|
|
24
|
-
import "./chunks/chunk-
|
|
21
|
+
} from "./chunks/chunk-ZM2DAXA7.js";
|
|
22
|
+
import "./chunks/chunk-S65ADM24.js";
|
|
23
|
+
import "./chunks/chunk-4JUTT225.js";
|
|
24
|
+
import "./chunks/chunk-ONICI23G.js";
|
|
25
25
|
export {
|
|
26
26
|
DEFAULT_ANTHROPIC_REQUEST_HEADROOM_BYTES,
|
|
27
27
|
DEFAULT_MEDIA_CACHE_DIR,
|
package/dist/mls-wasm-host.js
CHANGED
|
@@ -2,20 +2,20 @@ import {
|
|
|
2
2
|
WASM_HOST_CONFIGURE,
|
|
3
3
|
WASM_HOST_PROVISION,
|
|
4
4
|
keyFile
|
|
5
|
-
} from "./chunks/chunk-
|
|
5
|
+
} from "./chunks/chunk-ZP7MZKXI.js";
|
|
6
6
|
import {
|
|
7
7
|
MAX_INPUT,
|
|
8
8
|
NodeMlsDevCustodyError,
|
|
9
9
|
parseFrame,
|
|
10
10
|
rejected,
|
|
11
11
|
requireValue
|
|
12
|
-
} from "./chunks/chunk-
|
|
12
|
+
} from "./chunks/chunk-S65ADM24.js";
|
|
13
13
|
import {
|
|
14
14
|
__name,
|
|
15
15
|
canonicalEndpointJson,
|
|
16
16
|
isMlsDevReceiptClockSkew,
|
|
17
17
|
parseMlsDevDeviceContext
|
|
18
|
-
} from "./chunks/chunk-
|
|
18
|
+
} from "./chunks/chunk-ONICI23G.js";
|
|
19
19
|
|
|
20
20
|
// src/mls-wasm-host.ts
|
|
21
21
|
import { createHash } from "node:crypto";
|