agent-comms 9.0.11 → 9.0.12
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/.claude-plugin/marketplace.json +1 -1
- package/.claude-plugin/plugin.json +1 -1
- package/README.md +10 -6
- package/dist/account-cli.d.ts.map +1 -1
- package/dist/account-cli.js +4 -1
- package/dist/account-cli.js.map +1 -1
- package/dist/bridges/user/web/dist/mesh-worker.js +4 -4
- package/dist/bridges/user/web/dist/sw.js +1 -1
- package/dist/cli-main.d.ts.map +1 -1
- package/dist/cli-main.js +9 -12
- package/dist/cli-main.js.map +1 -1
- package/dist/core/account-bundle.d.ts +1 -1
- package/dist/core/account-bundle.d.ts.map +1 -1
- package/dist/core/account-bundle.js +26 -19
- package/dist/core/account-bundle.js.map +1 -1
- package/dist/core/account-join.d.ts.map +1 -1
- package/dist/core/account-join.js +5 -2
- package/dist/core/account-join.js.map +1 -1
- package/dist/core/account-ledger-crypto.d.ts.map +1 -1
- package/dist/core/account-ledger-crypto.js +4 -1
- package/dist/core/account-ledger-crypto.js.map +1 -1
- package/dist/core/account-ledger-store.d.ts +3 -1
- package/dist/core/account-ledger-store.d.ts.map +1 -1
- package/dist/core/account-ledger-store.js +6 -3
- package/dist/core/account-ledger-store.js.map +1 -1
- package/dist/core/account-ledger.d.ts +51 -4
- package/dist/core/account-ledger.d.ts.map +1 -1
- package/dist/core/account-ledger.js +102 -15
- package/dist/core/account-ledger.js.map +1 -1
- package/dist/core/bridge-mesh.d.ts.map +1 -1
- package/dist/core/bridge-mesh.js +3 -0
- package/dist/core/bridge-mesh.js.map +1 -1
- package/dist/core/bridge.d.ts.map +1 -1
- package/dist/core/bridge.js +16 -4
- package/dist/core/bridge.js.map +1 -1
- package/dist/core/capability-ask.d.ts.map +1 -1
- package/dist/core/capability-ask.js +10 -2
- package/dist/core/capability-ask.js.map +1 -1
- package/dist/core/connection-code-tool.d.ts +1 -1
- package/dist/core/connection-code-tool.js +2 -2
- package/dist/core/connection-code-tool.js.map +1 -1
- package/dist/core/connection-code.d.ts +5 -5
- package/dist/core/connection-code.d.ts.map +1 -1
- package/dist/core/connection-code.js +22 -6
- package/dist/core/connection-code.js.map +1 -1
- package/dist/core/device-membership.d.ts +8 -3
- package/dist/core/device-membership.d.ts.map +1 -1
- package/dist/core/device-membership.js +4 -4
- package/dist/core/device-membership.js.map +1 -1
- package/dist/core/dm-grant-actions.d.ts.map +1 -1
- package/dist/core/dm-grant-actions.js +7 -1
- package/dist/core/dm-grant-actions.js.map +1 -1
- package/dist/core/error-reporting.d.ts.map +1 -1
- package/dist/core/error-reporting.js +5 -0
- package/dist/core/error-reporting.js.map +1 -1
- package/dist/core/gateway-trust.d.ts +1 -1
- package/dist/core/gateway-trust.d.ts.map +1 -1
- package/dist/core/gateway-trust.js +4 -4
- package/dist/core/gateway-trust.js.map +1 -1
- package/dist/core/group-proofs.d.ts.map +1 -1
- package/dist/core/group-proofs.js +2 -2
- package/dist/core/group-proofs.js.map +1 -1
- package/dist/core/identity-store.d.ts +13 -9
- package/dist/core/identity-store.d.ts.map +1 -1
- package/dist/core/identity-store.js +122 -147
- package/dist/core/identity-store.js.map +1 -1
- package/dist/core/index.d.ts +1 -0
- package/dist/core/index.d.ts.map +1 -1
- package/dist/core/index.js +1 -0
- package/dist/core/index.js.map +1 -1
- package/dist/core/iso-timestamp.d.ts +10 -0
- package/dist/core/iso-timestamp.d.ts.map +1 -0
- package/dist/core/iso-timestamp.js +19 -0
- package/dist/core/iso-timestamp.js.map +1 -0
- package/dist/core/issuer-identity-file.d.ts +15 -0
- package/dist/core/issuer-identity-file.d.ts.map +1 -1
- package/dist/core/issuer-identity-file.js +69 -20
- package/dist/core/issuer-identity-file.js.map +1 -1
- package/dist/core/machine-identity.d.ts +1 -1
- package/dist/core/machine-identity.d.ts.map +1 -1
- package/dist/core/machine-identity.js +14 -11
- package/dist/core/machine-identity.js.map +1 -1
- package/dist/core/mesh-store.d.ts +2 -2
- package/dist/core/mesh-store.d.ts.map +1 -1
- package/dist/core/mesh-store.js.map +1 -1
- package/dist/core/peer-lifecycle.d.ts.map +1 -1
- package/dist/core/peer-lifecycle.js +8 -2
- package/dist/core/peer-lifecycle.js.map +1 -1
- package/dist/core/pid-lock-file.d.ts +27 -4
- package/dist/core/pid-lock-file.d.ts.map +1 -1
- package/dist/core/pid-lock-file.js +120 -11
- package/dist/core/pid-lock-file.js.map +1 -1
- package/dist/core/process-start.d.ts +10 -0
- package/dist/core/process-start.d.ts.map +1 -0
- package/dist/core/process-start.js +43 -0
- package/dist/core/process-start.js.map +1 -0
- package/dist/core/room-lifecycle.d.ts +3 -2
- package/dist/core/room-lifecycle.d.ts.map +1 -1
- package/dist/core/room-lifecycle.js +9 -8
- package/dist/core/room-lifecycle.js.map +1 -1
- package/dist/core/room-protocol.d.ts.map +1 -1
- package/dist/core/room-protocol.js +25 -3
- package/dist/core/room-protocol.js.map +1 -1
- package/dist/core/stale-agent-checker.d.ts.map +1 -1
- package/dist/core/stale-agent-checker.js +3 -1
- package/dist/core/stale-agent-checker.js.map +1 -1
- package/dist/core/store.d.ts +3 -0
- package/dist/core/store.d.ts.map +1 -1
- package/dist/core/store.js +42 -20
- package/dist/core/store.js.map +1 -1
- package/dist/core/tool.d.ts +5 -1
- package/dist/core/tool.d.ts.map +1 -1
- package/dist/core/tool.js +7 -1
- package/dist/core/tool.js.map +1 -1
- package/dist/core/types.d.ts +1 -1
- package/dist/core/types.d.ts.map +1 -1
- package/dist/core/types.js +8 -3
- package/dist/core/types.js.map +1 -1
- package/dist/core/user-identity.d.ts +5 -5
- package/dist/core/user-identity.d.ts.map +1 -1
- package/dist/core/user-identity.js +59 -45
- package/dist/core/user-identity.js.map +1 -1
- package/package.json +1 -1
- package/src/account-cli.ts +4 -1
- package/src/bridges/user/web/dist/mesh-worker.js +4 -4
- package/src/bridges/user/web/dist/sw.js +1 -1
- package/src/cli-main.ts +10 -12
- package/src/core/account-bundle.ts +36 -25
- package/src/core/account-join.ts +5 -2
- package/src/core/account-ledger-crypto.ts +4 -1
- package/src/core/account-ledger-store.ts +11 -3
- package/src/core/account-ledger.ts +142 -20
- package/src/core/bridge-mesh.ts +4 -0
- package/src/core/bridge.ts +24 -4
- package/src/core/capability-ask.ts +16 -1
- package/src/core/connection-code-tool.ts +2 -2
- package/src/core/connection-code.ts +34 -8
- package/src/core/device-membership.ts +12 -8
- package/src/core/dm-grant-actions.ts +7 -1
- package/src/core/error-reporting.ts +5 -0
- package/src/core/gateway-trust.ts +4 -4
- package/src/core/group-proofs.ts +5 -2
- package/src/core/identity-store.ts +182 -191
- package/src/core/index.ts +1 -0
- package/src/core/iso-timestamp.ts +21 -0
- package/src/core/issuer-identity-file.ts +87 -23
- package/src/core/machine-identity.ts +15 -12
- package/src/core/mesh-store.ts +2 -1
- package/src/core/peer-lifecycle.ts +9 -4
- package/src/core/pid-lock-file.ts +139 -11
- package/src/core/process-start.ts +45 -0
- package/src/core/room-lifecycle.ts +12 -9
- package/src/core/room-protocol.ts +23 -3
- package/src/core/stale-agent-checker.ts +3 -1
- package/src/core/store.ts +48 -23
- package/src/core/tool.ts +14 -1
- package/src/core/types.ts +9 -3
- package/src/core/user-identity.ts +65 -51
package/README.md
CHANGED
|
@@ -88,7 +88,7 @@ Beacons and probes go to a multicast group joined on the loopback interface (239
|
|
|
88
88
|
|
|
89
89
|
### Identity
|
|
90
90
|
|
|
91
|
-
Each bridge derives its peer ID from the device-id of its own keypair (SHA-256 of the raw public key): ECDSA P-256, self-signed, generated locally. The key material persists per bridge slot (`~/.agent-comms/identity-<harness>--<cwd>.json`, owner-only permissions), so the device-id
|
|
91
|
+
Each bridge derives its peer ID from the device-id of its own keypair (SHA-256 of the raw public key): ECDSA P-256, self-signed, generated locally. The key material persists per bridge slot (`~/.agent-comms/identity-<harness>--<cwd>.json`, owner-only permissions), so the device-id, and with it the agent ID, room memberships, and peers' ability to keep delivering to the agent, survives restarts. Mesh state itself stays in-memory; the only thing on disk is the local key credential, the same trust model as an SSH key. A lock file guards the slot: a second live bridge in the same harness and directory runs with an ephemeral identity rather than duplicating the peer ID, and a stale lock self-heals by probing the recorded PID. The tokens an ephemeral bridge holds are bound to its throw-away key, so it keeps them in memory for the life of the process and never reads or writes the slot file. A slot file that exists but cannot be used (damaged, unreadable, or holding a key that cannot be certified again) is never replaced: the bridge stops with an error naming the file and why, and leaves it untouched, since a new key would change the peer ID for everyone who knows it and discard its room and group tokens. Restore the file from a backup, or move it aside to start a new identity.
|
|
92
92
|
|
|
93
93
|
Two more keys sit beside the slot files, each generated locally on first use and never derived from anything about the hardware. `~/.agent-comms/user-identity.json` is the account's user principal, shared by every bridge the account runs on the machine. `~/.agent-comms/machine-identity.json` is the machine, shared by every bridge the account runs on the host. Because it lives in the account's home directory, another OS account on the same host mints a machine key of its own and shows up as a separate machine, and until the principal can span hosts ([#344](https://github.com/ExaDev/agent-comms/issues/344)) the two keys have the same scope; one machine key for every account on a host is tracked in [#367](https://github.com/ExaDev/agent-comms/issues/367). Both are grouping issuers: each bridge gossips a short-lived proof from each that vouches for its device, so a peer can tell whose device it is and which host it runs on. `whoami` shows them as the `Principal:` and `Machine:` lines, and `list_agents` groups agents under the machine that vouches for each, this machine first; an agent no current machine proof places, such as one that predates machine proofs, is listed under "Machine not proven". Moving a machine identity to a rebuilt host is a deliberate copy of its file, the same model as an SSH host key.
|
|
94
94
|
|
|
@@ -103,7 +103,11 @@ Environment and explicit directories must be absolute paths. Relative paths, lit
|
|
|
103
103
|
Library callers can set `dataDir` on `IdentitySlot`, which is also used by the identity loaders and lock helpers:
|
|
104
104
|
|
|
105
105
|
```ts
|
|
106
|
-
const slot = {
|
|
106
|
+
const slot = {
|
|
107
|
+
harness: "my-bridge",
|
|
108
|
+
cwd: process.cwd(),
|
|
109
|
+
dataDir: config.dataDir,
|
|
110
|
+
};
|
|
107
111
|
const { store, tool } = await createBridgeMesh(slot);
|
|
108
112
|
```
|
|
109
113
|
|
|
@@ -543,7 +547,7 @@ ConnectionCode {
|
|
|
543
547
|
}
|
|
544
548
|
```
|
|
545
549
|
|
|
546
|
-
`code`/`expiresAt` are the always-checked half: proof that whoever redeems this was on the other end of this exact exchange, recently. `signature` is optional and answers a different question
|
|
550
|
+
`code`/`expiresAt` are the always-checked half: proof that whoever redeems this was on the other end of this exact exchange, recently. `expiresAt` must be an ISO 8601 timestamp, and a code whose expiry does not parse is refused. `signature` is optional and answers a different question: this claim was made by whoever holds a specific long-lived PGP key. A device with no PGP identity still generates and redeems a bare code, but a bare code is a bearer hint, not authentication: redeeming it trusts whatever device-id its text names, whoever wrote it, so it is no way to establish trust in a stranger. A redeemer who supplies a public key or a fingerprint is asking for the issuer to be authenticated, so a code without a signature is then refused.
|
|
547
551
|
|
|
548
552
|
```
|
|
549
553
|
# Generate a code vouching for this device, unsigned
|
|
@@ -566,7 +570,7 @@ agent_comms({
|
|
|
566
570
|
})
|
|
567
571
|
```
|
|
568
572
|
|
|
569
|
-
The fingerprint is never a trust anchor supplied by the keyserver
|
|
573
|
+
Supplying `publicKey` or `fingerprint` also requires `signature`: an unsigned code, or a signed one whose signature has been removed, is refused rather than redeemed without the check. The fingerprint is never a trust anchor supplied by the keyserver: it's the thing the redeemer already independently trusts (from a business card, a prior verification, wherever), and the redeemer's own check is that the key actually fetched or pasted verifies to that exact fingerprint, not merely that _some_ key was found. Redemption never calls back to whoever generated the code: the whole point is bootstrapping trust before any connection between the two devices exists.
|
|
570
574
|
|
|
571
575
|
### One account on several machines
|
|
572
576
|
|
|
@@ -583,7 +587,7 @@ npx agent-comms account join # on the new machine; paste the invite at the p
|
|
|
583
587
|
|
|
584
588
|
Both are commands you run, not `agent_comms` tool actions: an invite is the account key to whoever redeems it first, and a join replaces the account the machine holds, so nothing an agent is told can do either, and the invite is printed only to your terminal, never into an agent's transcript. `join` reads the invite at a prompt that does not echo, so it stays out of shell history.
|
|
585
589
|
|
|
586
|
-
`account invite` runs a store of its own and keeps it up until the invite is redeemed or expires, since the issuing device keeps invites only in memory and answers each one once and never after it expires. An invite is valid for as long as a connection code, and can be made shorter with `--ttl-minutes <n>` but not longer. Redeeming it trusts the issuing device, exactly as `gateway_redeem_connection_code` does, then asks that device for the account key over the mesh's end-to-end authenticated request path, directly or relayed by the hub; the key comes back sealed under a key derived from the invite, which only its holder can open. A join the issuing device refuses or never answers withdraws that trust again, so a failed join leaves the new machine trusting no one it did not trust before. An invite can be PGP-signed with `--sign-key <armored private key file>`, and a signed one is checked on `join` against `--public-key <file>`, pinned to `--fingerprint <hex>` when you give one. Issuing an invite also trusts your own principal on the issuing machine, and joining trusts it on the new one, so the two list each other's devices from then on. The account the new machine held before is kept beside it as `user-identity.replaced-<id>.json`, since its key is still the only one that can revoke what it issued, and the machine's running bridges pick up the account when they restart.
|
|
590
|
+
`account invite` runs a store of its own and keeps it up until the invite is redeemed or expires, since the issuing device keeps invites only in memory and answers each one once and never after it expires. An invite is valid for as long as a connection code, and can be made shorter with `--ttl-minutes <n>` but not longer. Redeeming it trusts the issuing device, exactly as `gateway_redeem_connection_code` does, then asks that device for the account key over the mesh's end-to-end authenticated request path, directly or relayed by the hub; the key comes back sealed under a key derived from the invite, which only its holder can open. A join the issuing device refuses or never answers withdraws that trust again, so a failed join leaves the new machine trusting no one it did not trust before. An invite can be PGP-signed with `--sign-key <armored private key file>`, and a signed one is checked on `join` against `--public-key <file>`, pinned to `--fingerprint <hex>` when you give one. Giving either on `join` refuses an unsigned invite. An unsigned invite is a bearer hint: the joining machine trusts whatever device it names, so carry it only over a channel you trust. Issuing an invite also trusts your own principal on the issuing machine, and joining trusts it on the new one, so the two list each other's devices from then on. The account the new machine held before is kept beside it as `user-identity.replaced-<id>.json`, since its key is still the only one that can revoke what it issued, and the machine's running bridges pick up the account when they restart.
|
|
587
591
|
|
|
588
592
|
To copy the account without the mesh, export it to a passphrase-sealed file and import that on the other machine. The key is never printed; the passphrase is read from `AGENT_COMMS_ACCOUNT_PASSPHRASE` or asked for without echo, and the file is written owner-only and never over an existing one:
|
|
589
593
|
|
|
@@ -594,4 +598,4 @@ npx agent-comms account import ~/account.bundle # on the other machine, then d
|
|
|
594
598
|
|
|
595
599
|
Copy the account this way or by joining, never by copying `~/.agent-comms` between machines: each machine keeps a writer id of its own for the grant ledger below, and two machines sharing one would corrupt it.
|
|
596
600
|
|
|
597
|
-
Every grant your account issues, and every revocation of one, is recorded in a replicated ledger rather than on the machine that minted it: each machine appends to a data-domain log of its own (wire-mesh's replicated issuer grant ledger pattern, `spec/PATTERNS.md`), and the logs replicate to every machine holding the account, so `dm_revoke` on any of them finds and revokes a grant another one issued. Entries are sealed under a key derived from the account key, so a device that stores or relays them without holding the account sees only ciphertext, and writing to the ledger still needs the account's private key. The ledger replicates over direct peer connections (the local mesh, or machines that reach each other directly) and between machines that meet only through the relay hub, over a relay pairing sealed end to end between the two devices so the hub carries ciphertext; either way a log is offered only to a device whose membership proof names this account, and a hub-reachable device of any other account is never offered it. A revocation itself is also announced to every connected peer the moment it is made. Grants a build before the ledger recorded in `user-identity.json` are moved into it the first time a bridge starts, with nothing to do by hand.
|
|
601
|
+
Every grant your account issues, and every revocation of one, is recorded in a replicated ledger rather than on the machine that minted it: each machine appends to a data-domain log of its own (wire-mesh's replicated issuer grant ledger pattern, `spec/PATTERNS.md`), and the logs replicate to every machine holding the account, so `dm_revoke` on any of them finds and revokes a grant another one issued. Entries are sealed under a key derived from the account key, so a device that stores or relays them without holding the account sees only ciphertext, and writing to the ledger still needs the account's private key. The ledger replicates over direct peer connections (the local mesh, or machines that reach each other directly) and between machines that meet only through the relay hub, over a relay pairing sealed end to end between the two devices so the hub carries ciphertext; either way a log is offered only to a device whose membership proof names this account, and a hub-reachable device of any other account is never offered it. A revocation itself is also announced to every connected peer the moment it is made. Grants a build before the ledger recorded in `user-identity.json` are moved into it the first time a bridge starts, with nothing to do by hand. A ledger entry that cannot be read does not stop the rest of it being read, so listing and revoking a device's grants still work. Each unreadable entry is reported once, naming its log and position, and is listed by `whoami`. It may hold a grant or a revocation: a grant recorded only in it is not revoked, and a revocation recorded only in it is not applied on this machine, until the entry is repaired or replaced from another machine's replica of the account. A removal or a `dm_revoke` that skipped one says so and is reported as incomplete, never as a clean success, and a bridge that starts with one reports that revocations may be missing.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"account-cli.d.ts","sourceRoot":"","sources":["../src/account-cli.ts"],"names":[],"mappings":"AAAA;;GAEG;AAIH,OAAO,EAGL,KAAK,eAAe,EACrB,MAAM,uBAAuB,CAAC;AAE/B,OAAO,EAIL,KAAK,mBAAmB,EACzB,MAAM,yBAAyB,CAAC;AAEjC,mEAAmE;AACnE,eAAO,MAAM,sBAAsB,mCAAmC,CAAC;AAKvE,eAAO,MAAM,aAAa,
|
|
1
|
+
{"version":3,"file":"account-cli.d.ts","sourceRoot":"","sources":["../src/account-cli.ts"],"names":[],"mappings":"AAAA;;GAEG;AAIH,OAAO,EAGL,KAAK,eAAe,EACrB,MAAM,uBAAuB,CAAC;AAE/B,OAAO,EAIL,KAAK,mBAAmB,EACzB,MAAM,yBAAyB,CAAC;AAEjC,mEAAmE;AACnE,eAAO,MAAM,sBAAsB,mCAAmC,CAAC;AAKvE,eAAO,MAAM,aAAa,QAQd,CAAC;AAEb,MAAM,WAAW,YAAY;IAC3B,mEAAmE;IACnE,UAAU,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,OAAO,CAAC,MAAM,CAAC,CAAC;IAChD,GAAG,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IAC5B,GAAG,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC,CAAC,CAAC;IAClD,4GAA4G;IAC5G,SAAS,EAAE,MAAM,OAAO,CAAC,eAAe,CAAC,CAAC;CAC3C;AAmBD,gSAAgS;AAChS,wBAAsB,iBAAiB,CACrC,IAAI,EAAE,SAAS,MAAM,EAAE,EACvB,EAAE,EAAE,QAAQ,CAAC,YAAY,CAAC,EAC1B,mBAAmB,GAAE,QAAQ,CAAC,mBAAmB,CAAM,GACtD,OAAO,CAAC,IAAI,CAAC,CA+Cf;AAED,2DAA2D;AAC3D,MAAM,MAAM,cAAc,GACtB;IAAE,IAAI,EAAE,QAAQ,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,GACjC;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,GAC/B;IAAE,IAAI,EAAE,QAAQ,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,CAAC;AASxC,6aAA6a;AAC7a,wBAAgB,cAAc,CAC5B,KAAK,EAAE,MAAM,EACb,SAAS,EAAE,MAAM,GAChB,cAAc,CA0BhB;AAED,sPAAsP;AACtP,wBAAsB,cAAc,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAoCpE"}
|
package/dist/account-cli.js
CHANGED
|
@@ -15,6 +15,9 @@ export const ACCOUNT_USAGE = [
|
|
|
15
15
|
" agent-comms account import <file>",
|
|
16
16
|
" agent-comms account invite [--ttl-minutes <n>] [--sign-key <file>]",
|
|
17
17
|
" agent-comms account join [--public-key <file>] [--fingerprint <hex>] [--label <name>]",
|
|
18
|
+
"",
|
|
19
|
+
"An invite without --sign-key is a bearer hint, not authentication: the machine that joins with it trusts whatever device the invite names, whoever wrote it, so carry it only over a channel you trust.",
|
|
20
|
+
"--public-key and --fingerprint on join require a signed invite and refuse an unsigned one.",
|
|
18
21
|
].join("\n");
|
|
19
22
|
async function passphrase(io, confirm) {
|
|
20
23
|
const fromEnv = io.env[ACCOUNT_PASSPHRASE_ENV];
|
|
@@ -58,7 +61,7 @@ export async function runAccountCommand(args, io, userIdentityOptions = {}) {
|
|
|
58
61
|
}
|
|
59
62
|
if (subcommand === "import") {
|
|
60
63
|
const contents = openAccountBundle(fs.readFileSync(file, "utf-8"), await passphrase(io, false));
|
|
61
|
-
const { identity, replacedFile } = importAccountKey(userIdentityOptions, contents);
|
|
64
|
+
const { identity, replacedFile } = await importAccountKey(userIdentityOptions, contents);
|
|
62
65
|
io.log(`This machine now holds account ${principalOf(identity)}.`);
|
|
63
66
|
if (replacedFile !== undefined) {
|
|
64
67
|
io.log(`The account it held before was moved to ${replacedFile}; it is still the only key that can revoke what that account issued.`);
|
package/dist/account-cli.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"account-cli.js","sourceRoot":"","sources":["../src/account-cli.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,MAAM,SAAS,CAAC;AAC9B,OAAO,EAAE,aAAa,EAAE,MAAM,iCAAiC,CAAC;AAChE,OAAO,EACL,eAAe,EACf,WAAW,GAEZ,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAChF,OAAO,EACL,gBAAgB,EAChB,wBAAwB,EACxB,mBAAmB,GAEpB,MAAM,yBAAyB,CAAC;AAEjC,mEAAmE;AACnE,MAAM,CAAC,MAAM,sBAAsB,GAAG,gCAAgC,CAAC;AAEvE,kFAAkF;AAClF,MAAM,gBAAgB,GAAG,KAAK,CAAC;AAE/B,MAAM,CAAC,MAAM,aAAa,GAAG;IAC3B,0CAA0C;IAC1C,0CAA0C;IAC1C,2EAA2E;IAC3E,8FAA8F;
|
|
1
|
+
{"version":3,"file":"account-cli.js","sourceRoot":"","sources":["../src/account-cli.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,MAAM,SAAS,CAAC;AAC9B,OAAO,EAAE,aAAa,EAAE,MAAM,iCAAiC,CAAC;AAChE,OAAO,EACL,eAAe,EACf,WAAW,GAEZ,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAChF,OAAO,EACL,gBAAgB,EAChB,wBAAwB,EACxB,mBAAmB,GAEpB,MAAM,yBAAyB,CAAC;AAEjC,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