@canonmsg/agent-sdk 13.3.1 → 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-B6AOBWNZ.js → chunk-LYQEHXPD.js} +6 -6
- 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-SS22I6HM.js → chunk-ZM2DAXA7.js} +3 -3
- 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 +12 -7
- 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,16 +32,16 @@ import {
|
|
|
32
32
|
splitTextWithinBytes,
|
|
33
33
|
utf8ByteLength,
|
|
34
34
|
verifyCanonRuntimeConnection
|
|
35
|
-
} from "./chunk-
|
|
35
|
+
} from "./chunk-ZM2DAXA7.js";
|
|
36
36
|
import {
|
|
37
37
|
EndpointError,
|
|
38
38
|
NodeMlsDevCustodyError,
|
|
39
39
|
createNodeMlsDevCustody,
|
|
40
40
|
createPortableNodeMlsDevCustody
|
|
41
|
-
} from "./chunk-
|
|
41
|
+
} from "./chunk-S65ADM24.js";
|
|
42
42
|
import {
|
|
43
43
|
parseMlsDevClientConfiguration
|
|
44
|
-
} from "./chunk-
|
|
44
|
+
} from "./chunk-4JUTT225.js";
|
|
45
45
|
import {
|
|
46
46
|
AGENT_HOME_ELSEWHERE,
|
|
47
47
|
CONNECTOR_RELAY_ANSWER_WITHIN_MS,
|
|
@@ -76,7 +76,7 @@ import {
|
|
|
76
76
|
parseMlsDevGroupRoster,
|
|
77
77
|
resolveAllowedUploadMimeType,
|
|
78
78
|
resolveConversationPolicyScope
|
|
79
|
-
} from "./chunk-
|
|
79
|
+
} from "./chunk-ONICI23G.js";
|
|
80
80
|
|
|
81
81
|
// src/runner/types.ts
|
|
82
82
|
var DriverSessionError = class extends Error {
|
|
@@ -2687,7 +2687,7 @@ function relayRunnerHome(home, installationId) {
|
|
|
2687
2687
|
__name(relayRunnerHome, "relayRunnerHome");
|
|
2688
2688
|
|
|
2689
2689
|
// src/version.ts
|
|
2690
|
-
var AGENT_SDK_VERSION = true ? "13.3.
|
|
2690
|
+
var AGENT_SDK_VERSION = true ? "13.3.2" : void 0;
|
|
2691
2691
|
var RUNNER_CLIENT = isCanonClientVersion(AGENT_SDK_VERSION) ? Object.freeze({ kind: "runner", version: AGENT_SDK_VERSION }) : void 0;
|
|
2692
2692
|
|
|
2693
2693
|
// src/runner/runner.ts
|
|
@@ -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";
|
|
@@ -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";
|
|
@@ -60,7 +61,7 @@ import { parseArgs } from "node:util";
|
|
|
60
61
|
var OWNER_DECLINED = "OWNER_DECLINED";
|
|
61
62
|
function exitCodeFor(error) {
|
|
62
63
|
const code = error?.code;
|
|
63
|
-
return code === AGENT_HOME_ELSEWHERE || code === OWNER_DECLINED ? 0 : 1;
|
|
64
|
+
return code === AGENT_HOME_ELSEWHERE || code === OWNER_DECLINED || code === AGENT_DELETED ? 0 : 1;
|
|
64
65
|
}
|
|
65
66
|
__name(exitCodeFor, "exitCodeFor");
|
|
66
67
|
function stopThenExit(stop, code, exit = process.exit, boundMs = 15e3) {
|
|
@@ -608,6 +609,10 @@ async function ensureRegistered(values, driver) {
|
|
|
608
609
|
clientType: REGISTRATION_CLIENT_TYPES[driver] ?? "generic",
|
|
609
610
|
developerInfo: `canon-agent run --driver ${driver}`
|
|
610
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 });
|
|
611
616
|
});
|
|
612
617
|
switch (progress.status) {
|
|
613
618
|
case "approved":
|
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";
|