agent-comms 8.6.2 → 8.7.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/.claude-plugin/marketplace.json +1 -1
- package/.claude-plugin/plugin.json +1 -1
- package/README.md +27 -1
- package/dist/account-cli.d.ts +34 -0
- package/dist/account-cli.d.ts.map +1 -0
- package/dist/account-cli.js +140 -0
- package/dist/account-cli.js.map +1 -0
- package/dist/account-join-cli.d.ts +17 -0
- package/dist/account-join-cli.d.ts.map +1 -0
- package/dist/account-join-cli.js +140 -0
- package/dist/account-join-cli.js.map +1 -0
- package/dist/bridges/mcp/server.d.ts +1 -4
- package/dist/bridges/mcp/server.d.ts.map +1 -1
- package/dist/bridges/mcp/server.js +1 -1
- package/dist/bridges/mcp/server.js.map +1 -1
- package/dist/cli.d.ts +4 -0
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +24 -1
- package/dist/cli.js.map +1 -1
- package/dist/core/account-bundle.d.ts +22 -0
- package/dist/core/account-bundle.d.ts.map +1 -0
- package/dist/core/account-bundle.js +143 -0
- package/dist/core/account-bundle.js.map +1 -0
- package/dist/core/account-join.d.ts +62 -0
- package/dist/core/account-join.d.ts.map +1 -0
- package/dist/core/account-join.js +150 -0
- package/dist/core/account-join.js.map +1 -0
- package/dist/core/account-ledger-crypto.d.ts +28 -0
- package/dist/core/account-ledger-crypto.d.ts.map +1 -0
- package/dist/core/account-ledger-crypto.js +101 -0
- package/dist/core/account-ledger-crypto.js.map +1 -0
- package/dist/core/account-ledger-store.d.ts +21 -0
- package/dist/core/account-ledger-store.d.ts.map +1 -0
- package/dist/core/account-ledger-store.js +34 -0
- package/dist/core/account-ledger-store.js.map +1 -0
- package/dist/core/account-ledger.d.ts +80 -0
- package/dist/core/account-ledger.d.ts.map +1 -0
- package/dist/core/account-ledger.js +247 -0
- package/dist/core/account-ledger.js.map +1 -0
- package/dist/core/bridge-mesh.d.ts.map +1 -1
- package/dist/core/bridge-mesh.js +12 -1
- package/dist/core/bridge-mesh.js.map +1 -1
- package/dist/core/data-frame-routing.d.ts +50 -3
- package/dist/core/data-frame-routing.d.ts.map +1 -1
- package/dist/core/data-frame-routing.js +112 -5
- package/dist/core/data-frame-routing.js.map +1 -1
- package/dist/core/device-membership.d.ts +8 -8
- package/dist/core/device-membership.d.ts.map +1 -1
- package/dist/core/device-membership.js +17 -16
- package/dist/core/device-membership.js.map +1 -1
- package/dist/core/dm-send-delegation.d.ts +4 -4
- package/dist/core/dm-send-delegation.d.ts.map +1 -1
- package/dist/core/dm-send-delegation.js +2 -3
- package/dist/core/dm-send-delegation.js.map +1 -1
- package/dist/core/group-proofs.d.ts +5 -0
- package/dist/core/group-proofs.d.ts.map +1 -1
- package/dist/core/group-proofs.js +4 -0
- package/dist/core/group-proofs.js.map +1 -1
- package/dist/core/identity-store.d.ts.map +1 -1
- package/dist/core/identity-store.js +2 -62
- package/dist/core/identity-store.js.map +1 -1
- package/dist/core/issuer-identity-file.d.ts +4 -0
- package/dist/core/issuer-identity-file.d.ts.map +1 -1
- package/dist/core/issuer-identity-file.js +7 -5
- package/dist/core/issuer-identity-file.js.map +1 -1
- package/dist/core/ledger-lock.d.ts +12 -0
- package/dist/core/ledger-lock.d.ts.map +1 -0
- package/dist/core/ledger-lock.js +62 -0
- package/dist/core/ledger-lock.js.map +1 -0
- package/dist/core/membership-proofs.d.ts +7 -0
- package/dist/core/membership-proofs.d.ts.map +1 -1
- package/dist/core/membership-proofs.js +26 -1
- package/dist/core/membership-proofs.js.map +1 -1
- package/dist/core/mesh-store-shared.d.ts +4 -1
- package/dist/core/mesh-store-shared.d.ts.map +1 -1
- package/dist/core/mesh-store-shared.js.map +1 -1
- package/dist/core/mesh-store.d.ts +17 -8
- package/dist/core/mesh-store.d.ts.map +1 -1
- package/dist/core/mesh-store.js +41 -41
- package/dist/core/mesh-store.js.map +1 -1
- package/dist/core/peer-versions.d.ts +11 -0
- package/dist/core/peer-versions.d.ts.map +1 -1
- package/dist/core/peer-versions.js +9 -0
- package/dist/core/peer-versions.js.map +1 -1
- package/dist/core/pid-lock-file.d.ts +20 -0
- package/dist/core/pid-lock-file.d.ts.map +1 -0
- package/dist/core/pid-lock-file.js +115 -0
- package/dist/core/pid-lock-file.js.map +1 -0
- package/dist/core/room-lifecycle.d.ts +2 -2
- package/dist/core/room-lifecycle.d.ts.map +1 -1
- package/dist/core/room-lifecycle.js +18 -19
- package/dist/core/room-lifecycle.js.map +1 -1
- package/dist/core/transport-queries.d.ts +11 -0
- package/dist/core/transport-queries.d.ts.map +1 -0
- package/dist/core/transport-queries.js +30 -0
- package/dist/core/transport-queries.js.map +1 -0
- package/dist/core/user-identity.d.ts +23 -18
- package/dist/core/user-identity.d.ts.map +1 -1
- package/dist/core/user-identity.js +99 -61
- package/dist/core/user-identity.js.map +1 -1
- package/dist/core/wire-mesh-transport-options.d.ts +11 -2
- package/dist/core/wire-mesh-transport-options.d.ts.map +1 -1
- package/dist/core/wire-mesh-transport-options.js.map +1 -1
- package/dist/core/wire-mesh-transport.d.ts +4 -6
- package/dist/core/wire-mesh-transport.d.ts.map +1 -1
- package/dist/core/wire-mesh-transport.js +16 -20
- package/dist/core/wire-mesh-transport.js.map +1 -1
- package/dist/test/account-join.integration.test.d.ts +5 -0
- package/dist/test/account-join.integration.test.d.ts.map +1 -0
- package/dist/test/account-join.integration.test.js +183 -0
- package/dist/test/account-join.integration.test.js.map +1 -0
- package/dist/test/account-ledger-lock-worker.d.ts +9 -0
- package/dist/test/account-ledger-lock-worker.d.ts.map +1 -0
- package/dist/test/account-ledger-lock-worker.js +34 -0
- package/dist/test/account-ledger-lock-worker.js.map +1 -0
- package/dist/test/account-ledger-lock.integration.test.d.ts +5 -0
- package/dist/test/account-ledger-lock.integration.test.d.ts.map +1 -0
- package/dist/test/account-ledger-lock.integration.test.js +71 -0
- package/dist/test/account-ledger-lock.integration.test.js.map +1 -0
- package/dist/test/account-ledger-replication.integration.test.d.ts +5 -0
- package/dist/test/account-ledger-replication.integration.test.d.ts.map +1 -0
- package/dist/test/account-ledger-replication.integration.test.js +145 -0
- package/dist/test/account-ledger-replication.integration.test.js.map +1 -0
- package/dist/test/account-ledger.unit.test.d.ts +5 -0
- package/dist/test/account-ledger.unit.test.d.ts.map +1 -0
- package/dist/test/account-ledger.unit.test.js +317 -0
- package/dist/test/account-ledger.unit.test.js.map +1 -0
- package/dist/test/account-transfer.unit.test.d.ts +5 -0
- package/dist/test/account-transfer.unit.test.d.ts.map +1 -0
- package/dist/test/account-transfer.unit.test.js +204 -0
- package/dist/test/account-transfer.unit.test.js.map +1 -0
- package/dist/test/delivery-engine-delivery.unit.test.js +1 -0
- package/dist/test/delivery-engine-delivery.unit.test.js.map +1 -1
- package/dist/test/delivery-engine-directed-notify.unit.test.js +1 -0
- package/dist/test/delivery-engine-directed-notify.unit.test.js.map +1 -1
- package/dist/test/delivery-engine-own-agent.unit.test.js +1 -0
- package/dist/test/delivery-engine-own-agent.unit.test.js.map +1 -1
- package/dist/test/delivery-engine.unit.test.js +1 -0
- package/dist/test/delivery-engine.unit.test.js.map +1 -1
- package/dist/test/device-membership.unit.test.js +81 -30
- package/dist/test/device-membership.unit.test.js.map +1 -1
- package/dist/test/dm-send-delegation.unit.test.js +25 -14
- package/dist/test/dm-send-delegation.unit.test.js.map +1 -1
- package/dist/test/dm-send-principal-delegation.integration.test.js +9 -2
- package/dist/test/dm-send-principal-delegation.integration.test.js.map +1 -1
- package/dist/test/hidden-line.unit.test.d.ts +5 -0
- package/dist/test/hidden-line.unit.test.d.ts.map +1 -0
- package/dist/test/hidden-line.unit.test.js +40 -0
- package/dist/test/hidden-line.unit.test.js.map +1 -0
- package/dist/test/identity-restart.integration.test.js +8 -1
- package/dist/test/identity-restart.integration.test.js.map +1 -1
- package/dist/test/mcp-stdout-channel.integration.test.js +2 -2
- package/dist/test/mcp-stdout-channel.integration.test.js.map +1 -1
- package/dist/test/mesh-smoke.runner.js +2 -1
- package/dist/test/mesh-smoke.runner.js.map +1 -1
- package/dist/test/room-join-admission.integration.test.js +8 -1
- package/dist/test/room-join-admission.integration.test.js.map +1 -1
- package/dist/test/room-lifecycle-bare-name.unit.test.js +1 -0
- package/dist/test/room-lifecycle-bare-name.unit.test.js.map +1 -1
- package/dist/test/room-lifecycle-membership.unit.test.js +1 -0
- package/dist/test/room-lifecycle-membership.unit.test.js.map +1 -1
- package/dist/test/room-lifecycle-remote.unit.test.js +1 -0
- package/dist/test/room-lifecycle-remote.unit.test.js.map +1 -1
- package/dist/test/room-lifecycle.unit.test.js +1 -0
- package/dist/test/room-lifecycle.unit.test.js.map +1 -1
- package/dist/test/room-messaging-durable-send.unit.test.js +1 -0
- package/dist/test/room-messaging-durable-send.unit.test.js.map +1 -1
- package/dist/test/room-messaging.unit.test.js +1 -0
- package/dist/test/room-messaging.unit.test.js.map +1 -1
- package/dist/test/room-protocol-notify.unit.test.js +1 -0
- package/dist/test/room-protocol-notify.unit.test.js.map +1 -1
- package/dist/test/room-protocol.helper.d.ts.map +1 -1
- package/dist/test/room-protocol.helper.js +1 -0
- package/dist/test/room-protocol.helper.js.map +1 -1
- package/dist/test/room-send-retry.integration.test.js +8 -1
- package/dist/test/room-send-retry.integration.test.js.map +1 -1
- package/dist/test/test-transport.d.ts +9 -0
- package/dist/test/test-transport.d.ts.map +1 -1
- package/dist/test/test-transport.js +14 -5
- package/dist/test/test-transport.js.map +1 -1
- package/dist/test/user-identity.unit.test.js +75 -106
- package/dist/test/user-identity.unit.test.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,14 +1,61 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
2
|
+
* WireMeshTransport's own core/data frame dispatch (data-have, data-request, data-entries), split out under the repo's max-lines cap the same way gossip-directory.ts and hub-forwarding.ts were each split from the same owning file.
|
|
3
3
|
*/
|
|
4
|
-
import type { Frame } from "wire-mesh-core/generated/protocol";
|
|
4
|
+
import type { DataHaveFrame, DataRequestFrame, Frame } from "wire-mesh-core/generated/protocol";
|
|
5
5
|
import type { Connection } from "wire-mesh-core/ports/transport";
|
|
6
6
|
import type { KeyValueStorage } from "wire-mesh-core/ports/storage";
|
|
7
|
-
|
|
7
|
+
import type { AccountLedgerReplica } from "./account-ledger.js";
|
|
8
|
+
import type { WireMeshTransportOptions } from "./wire-mesh-transport-options.js";
|
|
9
|
+
/** The most entries one data-entries reply carries, for every log this side answers for, the account ledger's included: a longer log catches up over several rounds, so the bound only caps one frame's size. */
|
|
10
|
+
export declare const DATA_ENTRIES_RESPONSE_LIMIT = 100;
|
|
11
|
+
/** What the router needs to replicate the account's grant ledger (agent-comms#344). */
|
|
12
|
+
export interface AccountReplication {
|
|
13
|
+
/** The ledger, read on every frame and every announcement round because it opens after the transport is built and is replaced when the machine joins another account. Undefined until it has opened. */
|
|
14
|
+
ledger: () => AccountLedgerReplica | undefined;
|
|
15
|
+
/** Whether the peer whose session authenticated it as `deviceHex` holds the same account. Only such a peer is offered the ledger or answered for it, so a device of another account never stores the ciphertext or follows its head. */
|
|
16
|
+
isAccountPeer: (deviceHex: string) => Promise<boolean>;
|
|
17
|
+
}
|
|
18
|
+
/** Builds the router's account replication from the transport option: a peer is an account peer when the membership proof in its gossiped advert (looked up through `advertOf`) verifies against this machine's own principal. Undefined when the transport has no account ledger. */
|
|
19
|
+
export declare function accountReplicationFrom(options: Readonly<WireMeshTransportOptions>["accountReplication"], advertOf: (deviceHex: string) => Readonly<Record<string, unknown>> | undefined): AccountReplication | undefined;
|
|
20
|
+
/** Routes one frame received on a raw data connection, tracking the connection against its peer's device-id along the way (connectionsByPeer, mutated in place) so a later data-have, data-request or data-entries send addressed to that same peer reuses it. Nothing further happens until the sender is a tracked peer session. A frame naming one of the account's writer logs goes to the account ledger when the sender holds the same account and is dropped otherwise, without reaching dataStorage either way; any other data frame goes to wire-mesh-core's own core/data handlers over dataStorage, and is dropped when this side has no dataStorage. Any handler error is reported via onError and swallowed, never thrown, since this runs inside the transport's own onFrame callback with no caller awaiting it directly. */
|
|
8
21
|
export declare function routeDataFrame(deps: Readonly<{
|
|
9
22
|
connectionsByPeer: Map<string, Readonly<Connection>>;
|
|
10
23
|
dataStorage: KeyValueStorage | undefined;
|
|
24
|
+
account: Readonly<AccountReplication> | undefined;
|
|
11
25
|
peerSessions: ReadonlyMap<string, unknown>;
|
|
12
26
|
onError: ((error: Error) => void) | undefined;
|
|
13
27
|
}>, connection: Readonly<Connection>, frame: Frame): Promise<void>;
|
|
28
|
+
/** Offers every account writer log this machine holds to every peer it has a live, trusted data connection with that holds the same account (agent-comms#344): such a peer that is behind asks for what it is missing, which is the data-domain fan-out that carries each machine's grants and revocations to every other. Called on the gossip cadence, so a machine that was away when an entry was written still catches up the next time it is connected. A send that fails is reported and the rest carry on; the next round retries it. */
|
|
29
|
+
export declare function announceAccountLedger(deps: Readonly<{
|
|
30
|
+
connectionsByPeer: ReadonlyMap<string, Readonly<Connection>>;
|
|
31
|
+
account: Readonly<AccountReplication>;
|
|
32
|
+
peerSessions: ReadonlyMap<string, unknown>;
|
|
33
|
+
onError: ((error: Error) => void) | undefined;
|
|
34
|
+
}>): Promise<void>;
|
|
35
|
+
export interface DataFrameRouterDeps {
|
|
36
|
+
dataStorage: KeyValueStorage | undefined;
|
|
37
|
+
/** Absent for a transport with no account ledger. */
|
|
38
|
+
account: Readonly<AccountReplication> | undefined;
|
|
39
|
+
/** The transport's own trusted sessions, keyed by device-id hex: the gate every data frame and every announcement passes. */
|
|
40
|
+
peerSessions: ReadonlyMap<string, unknown>;
|
|
41
|
+
onError: ((error: Error) => void) | undefined;
|
|
42
|
+
/** How often the account ledger is offered to peers: the transport's own re-advertise cadence. */
|
|
43
|
+
announceIntervalMs: number;
|
|
44
|
+
}
|
|
45
|
+
/** WireMeshTransport's core/data state and dispatch, split out under the repo's max-lines cap: the connection each peer's frames arrive on, routing of every data frame received, the mechanical send primitive, and the periodic offer of the account ledger's writer logs. */
|
|
46
|
+
export declare class DataFrameRouter {
|
|
47
|
+
private readonly deps;
|
|
48
|
+
/** Backs this side's own responder for an incoming data-have, data-request or data-entries frame about any log other than the account ledger's (agent-comms#50's P5 integration). When undefined, such frames are dropped; the account ledger's are routed either way. For those logs, deciding when to proactively call sendDataFrame at all (the catch-up policy: which peers' logs to track, when to send an initial data-have) stays the caller's business and this field only backs the mechanical parts (answering a have or request, storing entries); the account ledger's own offers are the router's, sent every announceIntervalMs. */
|
|
49
|
+
private readonly dataStorage;
|
|
50
|
+
/** Every peer this side has ever received a frame from, keyed by device-id hex, tracking the raw wire-mesh-core Connection each frame arrived on: what sendDataFrame needs, since neither AcceptedMeshSession nor MeshSession exposes a generic "send an arbitrary frame" method the way the raw Connection itself does. Registered eagerly on the very first frame from a connection (including one still in quarantine, e.g. before connect_request approval) so a later sendDataFrame call can reach it; routeDataFrame's own trust gate (peerSessions.has) is what actually decides whether to act on anything received this way, not this map. */
|
|
51
|
+
private readonly connectionsByPeer;
|
|
52
|
+
private announceInterval;
|
|
53
|
+
constructor(deps: Readonly<DataFrameRouterDeps>);
|
|
54
|
+
/** See routeDataFrame. */
|
|
55
|
+
route(connection: Readonly<Connection>, frame: Frame): Promise<void>;
|
|
56
|
+
/** Sends one frame on the connection peerDeviceHex's frames last arrived on. Throws if none has arrived from it yet. */
|
|
57
|
+
send(peerDeviceHex: string, frame: Readonly<DataHaveFrame> | Readonly<DataRequestFrame>): Promise<void>;
|
|
58
|
+
/** Stops offering the account ledger. A router that never started offering it has no timer to clear. */
|
|
59
|
+
stop(): void;
|
|
60
|
+
}
|
|
14
61
|
//# sourceMappingURL=data-frame-routing.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"data-frame-routing.d.ts","sourceRoot":"","sources":["../../src/core/data-frame-routing.ts"],"names":[],"mappings":"AAAA;;GAEG;
|
|
1
|
+
{"version":3,"file":"data-frame-routing.d.ts","sourceRoot":"","sources":["../../src/core/data-frame-routing.ts"],"names":[],"mappings":"AAAA;;GAEG;AASH,OAAO,KAAK,EACV,aAAa,EACb,gBAAgB,EACh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HAAwH;IAClH,IAAI,CACR,aAAa,EAAE,MAAM,EACrB,KAAK,EAAE,QAAQ,CAAC,aAAa,CAAC,GAAG,QAAQ,CAAC,gBAAgB,CAAC,GAC1D,OAAO,CAAC,IAAI,CAAC;IAUhB,wGAAwG;IACxG,IAAI,IAAI,IAAI;CAKb"}
|
|
@@ -1,21 +1,53 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
2
|
+
* WireMeshTransport's own core/data frame dispatch (data-have, data-request, data-entries), split out under the repo's max-lines cap the same way gossip-directory.ts and hub-forwarding.ts were each split from the same owning file.
|
|
3
3
|
*/
|
|
4
4
|
import { handleDataEntries, handleDataHave, handleDataRequest, } from "wire-mesh-core/domain/data-sync";
|
|
5
5
|
import { deviceIdToHex } from "wire-mesh-core/domain/device-id";
|
|
6
|
-
|
|
7
|
-
|
|
6
|
+
import { isDataFrame } from "wire-mesh-core/domain/hub-mailbox";
|
|
7
|
+
import { readMembershipProof } from "./gossip-directory.js";
|
|
8
|
+
/** The most entries one data-entries reply carries, for every log this side answers for, the account ledger's included: a longer log catches up over several rounds, so the bound only caps one frame's size. */
|
|
9
|
+
export const DATA_ENTRIES_RESPONSE_LIMIT = 100;
|
|
10
|
+
/** Builds the router's account replication from the transport option: a peer is an account peer when the membership proof in its gossiped advert (looked up through `advertOf`) verifies against this machine's own principal. Undefined when the transport has no account ledger. */
|
|
11
|
+
export function accountReplicationFrom(options, advertOf) {
|
|
12
|
+
if (options === undefined)
|
|
13
|
+
return undefined;
|
|
14
|
+
return {
|
|
15
|
+
ledger: options.getLedger,
|
|
16
|
+
isAccountPeer: async (deviceHex) => {
|
|
17
|
+
const advert = advertOf(deviceHex);
|
|
18
|
+
const proof = advert === undefined
|
|
19
|
+
? undefined
|
|
20
|
+
: readMembershipProof(advert, "membership");
|
|
21
|
+
return proof === undefined
|
|
22
|
+
? false
|
|
23
|
+
: options.isAccountMember({ proof, deviceHex });
|
|
24
|
+
},
|
|
25
|
+
};
|
|
26
|
+
}
|
|
27
|
+
/** Routes one frame received on a raw data connection, tracking the connection against its peer's device-id along the way (connectionsByPeer, mutated in place) so a later data-have, data-request or data-entries send addressed to that same peer reuses it. Nothing further happens until the sender is a tracked peer session. A frame naming one of the account's writer logs goes to the account ledger when the sender holds the same account and is dropped otherwise, without reaching dataStorage either way; any other data frame goes to wire-mesh-core's own core/data handlers over dataStorage, and is dropped when this side has no dataStorage. Any handler error is reported via onError and swallowed, never thrown, since this runs inside the transport's own onFrame callback with no caller awaiting it directly. */
|
|
8
28
|
export async function routeDataFrame(deps, connection, frame) {
|
|
9
29
|
const peerDeviceId = connection.peerDeviceId;
|
|
10
30
|
if (peerDeviceId === undefined)
|
|
11
31
|
return;
|
|
12
32
|
const deviceIdHex = deviceIdToHex(peerDeviceId);
|
|
13
33
|
deps.connectionsByPeer.set(deviceIdHex, connection);
|
|
14
|
-
if (deps.dataStorage === undefined)
|
|
15
|
-
return;
|
|
16
34
|
if (!deps.peerSessions.has(deviceIdHex))
|
|
17
35
|
return;
|
|
18
36
|
try {
|
|
37
|
+
const ledger = deps.account?.ledger();
|
|
38
|
+
if (isDataFrame(frame) &&
|
|
39
|
+
ledger !== undefined &&
|
|
40
|
+
deps.account !== undefined &&
|
|
41
|
+
ledger.ownsLog(frame.peer)) {
|
|
42
|
+
if (!(await deps.account.isAccountPeer(deviceIdHex)))
|
|
43
|
+
return;
|
|
44
|
+
const reply = await ledger.handleDataFrame(frame);
|
|
45
|
+
if (reply !== null)
|
|
46
|
+
await connection.send(reply);
|
|
47
|
+
return;
|
|
48
|
+
}
|
|
49
|
+
if (deps.dataStorage === undefined)
|
|
50
|
+
return;
|
|
19
51
|
if (frame.type === "data-have") {
|
|
20
52
|
const request = await handleDataHave(deps.dataStorage, frame);
|
|
21
53
|
if (request !== null)
|
|
@@ -34,4 +66,79 @@ export async function routeDataFrame(deps, connection, frame) {
|
|
|
34
66
|
deps.onError?.(error instanceof Error ? error : new Error(String(error)));
|
|
35
67
|
}
|
|
36
68
|
}
|
|
69
|
+
/** Offers every account writer log this machine holds to every peer it has a live, trusted data connection with that holds the same account (agent-comms#344): such a peer that is behind asks for what it is missing, which is the data-domain fan-out that carries each machine's grants and revocations to every other. Called on the gossip cadence, so a machine that was away when an entry was written still catches up the next time it is connected. A send that fails is reported and the rest carry on; the next round retries it. */
|
|
70
|
+
export async function announceAccountLedger(deps) {
|
|
71
|
+
const ledger = deps.account.ledger();
|
|
72
|
+
if (ledger === undefined)
|
|
73
|
+
return;
|
|
74
|
+
const frames = await ledger.announcements();
|
|
75
|
+
if (frames.length === 0)
|
|
76
|
+
return;
|
|
77
|
+
for (const [deviceHex, connection] of deps.connectionsByPeer) {
|
|
78
|
+
if (!deps.peerSessions.has(deviceHex))
|
|
79
|
+
continue;
|
|
80
|
+
if (!(await deps.account.isAccountPeer(deviceHex)))
|
|
81
|
+
continue;
|
|
82
|
+
for (const frame of frames) {
|
|
83
|
+
try {
|
|
84
|
+
await connection.send(frame);
|
|
85
|
+
}
|
|
86
|
+
catch (error) {
|
|
87
|
+
deps.onError?.(error instanceof Error ? error : new Error(String(error)));
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
/** WireMeshTransport's core/data state and dispatch, split out under the repo's max-lines cap: the connection each peer's frames arrive on, routing of every data frame received, the mechanical send primitive, and the periodic offer of the account ledger's writer logs. */
|
|
93
|
+
export class DataFrameRouter {
|
|
94
|
+
deps;
|
|
95
|
+
/** Backs this side's own responder for an incoming data-have, data-request or data-entries frame about any log other than the account ledger's (agent-comms#50's P5 integration). When undefined, such frames are dropped; the account ledger's are routed either way. For those logs, deciding when to proactively call sendDataFrame at all (the catch-up policy: which peers' logs to track, when to send an initial data-have) stays the caller's business and this field only backs the mechanical parts (answering a have or request, storing entries); the account ledger's own offers are the router's, sent every announceIntervalMs. */
|
|
96
|
+
dataStorage;
|
|
97
|
+
/** Every peer this side has ever received a frame from, keyed by device-id hex, tracking the raw wire-mesh-core Connection each frame arrived on: what sendDataFrame needs, since neither AcceptedMeshSession nor MeshSession exposes a generic "send an arbitrary frame" method the way the raw Connection itself does. Registered eagerly on the very first frame from a connection (including one still in quarantine, e.g. before connect_request approval) so a later sendDataFrame call can reach it; routeDataFrame's own trust gate (peerSessions.has) is what actually decides whether to act on anything received this way, not this map. */
|
|
98
|
+
connectionsByPeer = new Map();
|
|
99
|
+
announceInterval;
|
|
100
|
+
constructor(deps) {
|
|
101
|
+
this.deps = deps;
|
|
102
|
+
this.dataStorage = deps.dataStorage;
|
|
103
|
+
const { account } = deps;
|
|
104
|
+
if (account === undefined)
|
|
105
|
+
return;
|
|
106
|
+
this.announceInterval = setInterval(() => {
|
|
107
|
+
announceAccountLedger({
|
|
108
|
+
connectionsByPeer: this.connectionsByPeer,
|
|
109
|
+
account,
|
|
110
|
+
peerSessions: deps.peerSessions,
|
|
111
|
+
onError: deps.onError,
|
|
112
|
+
}).catch((error) => {
|
|
113
|
+
deps.onError?.(error instanceof Error ? error : new Error(String(error)));
|
|
114
|
+
});
|
|
115
|
+
}, deps.announceIntervalMs);
|
|
116
|
+
this.announceInterval.unref();
|
|
117
|
+
}
|
|
118
|
+
/** See routeDataFrame. */
|
|
119
|
+
async route(connection, frame) {
|
|
120
|
+
await routeDataFrame({
|
|
121
|
+
connectionsByPeer: this.connectionsByPeer,
|
|
122
|
+
dataStorage: this.dataStorage,
|
|
123
|
+
account: this.deps.account,
|
|
124
|
+
peerSessions: this.deps.peerSessions,
|
|
125
|
+
onError: this.deps.onError,
|
|
126
|
+
}, connection, frame);
|
|
127
|
+
}
|
|
128
|
+
/** Sends one frame on the connection peerDeviceHex's frames last arrived on. Throws if none has arrived from it yet. */
|
|
129
|
+
async send(peerDeviceHex, frame) {
|
|
130
|
+
const connection = this.connectionsByPeer.get(peerDeviceHex);
|
|
131
|
+
if (connection === undefined) {
|
|
132
|
+
throw new Error(`WireMeshTransport: no live connection for peer ${peerDeviceHex}`);
|
|
133
|
+
}
|
|
134
|
+
await connection.send(frame);
|
|
135
|
+
}
|
|
136
|
+
/** Stops offering the account ledger. A router that never started offering it has no timer to clear. */
|
|
137
|
+
stop() {
|
|
138
|
+
if (this.announceInterval === undefined)
|
|
139
|
+
return;
|
|
140
|
+
clearInterval(this.announceInterval);
|
|
141
|
+
this.announceInterval = undefined;
|
|
142
|
+
}
|
|
143
|
+
}
|
|
37
144
|
//# sourceMappingURL=data-frame-routing.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"data-frame-routing.js","sourceRoot":"","sources":["../../src/core/data-frame-routing.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EACL,iBAAiB,EACjB,cAAc,EACd,iBAAiB,GAClB,MAAM,iCAAiC,CAAC;AACzC,OAAO,EAAE,aAAa,EAAE,MAAM,iCAAiC,CAAC;
|
|
1
|
+
{"version":3,"file":"data-frame-routing.js","sourceRoot":"","sources":["../../src/core/data-frame-routing.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EACL,iBAAiB,EACjB,cAAc,EACd,iBAAiB,GAClB,MAAM,iCAAiC,CAAC;AACzC,OAAO,EAAE,aAAa,EAAE,MAAM,iCAAiC,CAAC;AAChE,OAAO,EAAE,WAAW,EAAE,MAAM,mCAAmC,CAAC;AAShE,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAG5D,iNAAiN;AACjN,MAAM,CAAC,MAAM,2BAA2B,GAAG,GAAG,CAAC;AAU/C,sRAAsR;AACtR,MAAM,UAAU,sBAAsB,CACpC,OAAiE,EACjE,QAEkD;IAElD,IAAI,OAAO,KAAK,SAAS;QAAE,OAAO,SAAS,CAAC;IAC5C,OAAO;QACL,MAAM,EAAE,OAAO,CAAC,SAAS;QACzB,aAAa,EAAE,KAAK,EAAE,SAAS,EAAE,EAAE;YACjC,MAAM,MAAM,GAAG,QAAQ,CAAC,SAAS,CAAC,CAAC;YACnC,MAAM,KAAK,GACT,MAAM,KAAK,SAAS;gBAClB,C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AAC,CAAC,CAAC,IAAI,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAC1D,CAAC;YACJ,CAAC,CAAC,CAAC;QACL,CAAC,EAAE,IAAI,CAAC,kBAAkB,CAAC,CAAC;QAC5B,IAAI,CAAC,gBAAgB,CAAC,KAAK,EAAE,CAAC;IAChC,CAAC;IAED,0BAA0B;IAC1B,KAAK,CAAC,KAAK,CAAC,UAAgC,EAAE,KAAY;QACxD,MAAM,cAAc,CAClB;YACE,iBAAiB,EAAE,IAAI,CAAC,iBAAiB;YACzC,WAAW,EAAE,IAAI,CAAC,WAAW;YAC7B,OAAO,EAAE,IAAI,CAAC,IAAI,CAAC,OAAO;YAC1B,YAAY,EAAE,IAAI,CAAC,IAAI,CAAC,YAAY;YACpC,OAAO,EAAE,IAAI,CAAC,IAAI,CAAC,OAAO;SAC3B,EACD,UAAU,EACV,KAAK,CACN,CAAC;IACJ,CAAC;IAED,wHAAwH;IACxH,KAAK,CAAC,IAAI,CACR,aAAqB,EACrB,KAA2D;QAE3D,MAAM,UAAU,GAAG,IAAI,CAAC,iBAAiB,CAAC,GAAG,CAAC,aAAa,CAAC,CAAC;QAC7D,IAAI,UAAU,KAAK,SAAS,EAAE,CAAC;YAC7B,MAAM,IAAI,KAAK,CACb,kDAAkD,aAAa,EAAE,CAClE,CAAC;QACJ,CAAC;QACD,MAAM,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IAC/B,CAAC;IAED,wGAAwG;IACxG,IAAI;QACF,IAAI,IAAI,CAAC,gBAAgB,KAAK,SAAS;YAAE,OAAO;QAChD,aAAa,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAC;QACrC,IAAI,CAAC,gBAAgB,GAAG,SAAS,CAAC;IACpC,CAAC;CACF"}
|
|
@@ -8,12 +8,12 @@ import type { RevocationView } from "wire-mesh-core/domain/revocation-view";
|
|
|
8
8
|
import type { IdentityPort } from "wire-mesh-core/ports/identity";
|
|
9
9
|
import type { Clock } from "wire-mesh-core/ports/clock";
|
|
10
10
|
import type { DeviceId, RevocationEntry } from "wire-mesh-core/generated/protocol";
|
|
11
|
-
import {
|
|
11
|
+
import type { AccountLedger } from "./account-ledger.js";
|
|
12
12
|
export interface AdmitDeviceOptions {
|
|
13
13
|
/** The user principal's own identity -- signs the membership grant. */
|
|
14
14
|
userIdentity: IdentityPort;
|
|
15
|
-
/**
|
|
16
|
-
|
|
15
|
+
/** The account's replicated grant ledger, which records the admission so any machine holding the account key can revoke it. */
|
|
16
|
+
accountLedger: AccountLedger;
|
|
17
17
|
clock: Clock;
|
|
18
18
|
tokenId: Uint8Array<ArrayBuffer>;
|
|
19
19
|
/** The device being admitted. */
|
|
@@ -32,22 +32,22 @@ export interface MintGroupMembershipOptions {
|
|
|
32
32
|
/** The group:member token itself, with no record kept of having issued it: a root-level, non-delegable grant bearing options.deviceId and scoped to the issuer's own group (groupPath). admitDevice adds the issued-grant bookkeeping a later removeDevice needs; a caller that only needs a short-lived proof (membership-proof.ts) uses this directly, so the shared identity file is not rewritten every time one of its many bridges refreshes its proof. */
|
|
33
33
|
export declare function mintGroupMembership(options: Readonly<MintGroupMembershipOptions>): Promise<MintVerdict>;
|
|
34
34
|
/**
|
|
35
|
-
* Mints deviceId's own group:member grant from the user principal: a root-level, non-delegable token scoped to the principal's own group (groupPath). On success, records the grant's token-id
|
|
35
|
+
* Mints deviceId's own group:member grant from the user principal: a root-level, non-delegable token scoped to the principal's own group (groupPath). On success, records the grant's token-id in the account's replicated ledger so a later removeDevice, on this machine or any other holding the account key, can find it to revoke. An admission without that record would leave removal permanently unable to find what to revoke, so it is what makes revocation possible at all.
|
|
36
36
|
*/
|
|
37
37
|
export declare function admitDevice(options: Readonly<AdmitDeviceOptions>): Promise<MintVerdict>;
|
|
38
38
|
export interface RemoveDeviceOptions {
|
|
39
39
|
/** The user principal's own identity -- only the principal that issued a device's membership may revoke it. */
|
|
40
40
|
userIdentity: IdentityPort;
|
|
41
|
-
|
|
41
|
+
accountLedger: AccountLedger;
|
|
42
42
|
clock: Clock;
|
|
43
43
|
/** Recorded locally immediately, so this principal's own future verifications see the removal without waiting on gossip -- mirrors room-lifecycle.ts's own revokeMemberGrant ordering (record before broadcast). */
|
|
44
44
|
revocation: RevocationView;
|
|
45
45
|
deviceId: DeviceId;
|
|
46
46
|
}
|
|
47
47
|
/**
|
|
48
|
-
* Revokes
|
|
48
|
+
* Revokes every group:member grant for deviceId that the account's ledger holds as outstanding, whichever machine of the account minted it: mints a revocation-entry for each token-id, records it in the given RevocationView immediately, and appends it to the ledger, so every other machine of the account sees the grant as revoked and a later re-admission starts from nothing outstanding. Returns no entries for a device the account never admitted.
|
|
49
49
|
*
|
|
50
|
-
* Returns the minted
|
|
50
|
+
* Returns the minted entries so the caller can broadcast them to the mesh (this module has no MeshTransport dependency to do so itself, mirroring the module-level "no assumption about locality" boundary documented above): every other device that might hold one of this device's grants needs the entry to independently start refusing it.
|
|
51
51
|
*/
|
|
52
|
-
export declare function removeDevice(options: Readonly<RemoveDeviceOptions>): Promise<RevocationEntry
|
|
52
|
+
export declare function removeDevice(options: Readonly<RemoveDeviceOptions>): Promise<RevocationEntry[]>;
|
|
53
53
|
//# sourceMappingURL=device-membership.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"device-membership.d.ts","sourceRoot":"","sources":["../../src/core/device-membership.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAGL,KAAK,WAAW,EACjB,MAAM,8BAA8B,CAAC;AAEtC,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,uCAAuC,CAAC;AAC5E,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;AAClE,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,4BAA4B,CAAC;AACxD,OAAO,KAAK,EACV,QAAQ,EACR,eAAe,EAChB,MAAM,mCAAmC,CAAC;AAK3C,OAAO,
|
|
1
|
+
{"version":3,"file":"device-membership.d.ts","sourceRo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a,EAAE,aAAa,CAAC;IAC7B,KAAK,EAAE,KAAK,CAAC;IACb,oNAAoN;IACpN,UAAU,EAAE,cAAc,CAAC;IAC3B,QAAQ,EAAE,QAAQ,CAAC;CACpB;AAED;;;;GAIG;AACH,wBAAsB,YAAY,CAChC,OAAO,EAAE,QAAQ,CAAC,mBAAmB,CAAC,GACrC,OAAO,CAAC,eAAe,EAAE,CAAC,CAuB5B"}
|
|
@@ -6,7 +6,6 @@
|
|
|
6
6
|
import { mintCapabilityToken, mintRevocationEntry, } from "wire-mesh-core/domain/tokens";
|
|
7
7
|
import { deviceIdToHex } from "wire-mesh-core/domain/device-id";
|
|
8
8
|
import { DEVICE_MEMBER_CAPABILITY, groupPath, } from "./device-membership-verification.js";
|
|
9
|
-
import { deleteIssuedDeviceGrant, loadIssuedDeviceGrant, saveIssuedDeviceGrant, } from "./user-identity.js";
|
|
10
9
|
/** delegationsRemaining for every device-membership grant -- deliberately non-delegable: a device that could re-mint membership for another device would let any admitted device silently admit others, defeating the point of the principal being the one place admission is decided (the same reasoning room-lifecycle.ts's own mintOwnerRootGrant already documents for a room owner's self-grant). */
|
|
11
10
|
const NOT_DELEGABLE = 0;
|
|
12
11
|
/** The group:member token itself, with no record kept of having issued it: a root-level, non-delegable grant bearing options.deviceId and scoped to the issuer's own group (groupPath). admitDevice adds the issued-grant bookkeeping a later removeDevice needs; a caller that only needs a short-lived proof (membership-proof.ts) uses this directly, so the shared identity file is not rewritten every time one of its many bridges refreshes its proof. */
|
|
@@ -26,7 +25,7 @@ export async function mintGroupMembership(options) {
|
|
|
26
25
|
});
|
|
27
26
|
}
|
|
28
27
|
/**
|
|
29
|
-
* Mints deviceId's own group:member grant from the user principal: a root-level, non-delegable token scoped to the principal's own group (groupPath). On success, records the grant's token-id
|
|
28
|
+
* Mints deviceId's own group:member grant from the user principal: a root-level, non-delegable token scoped to the principal's own group (groupPath). On success, records the grant's token-id in the account's replicated ledger so a later removeDevice, on this machine or any other holding the account key, can find it to revoke. An admission without that record would leave removal permanently unable to find what to revoke, so it is what makes revocation possible at all.
|
|
30
29
|
*/
|
|
31
30
|
export async function admitDevice(options) {
|
|
32
31
|
const verdict = await mintGroupMembership({
|
|
@@ -35,26 +34,28 @@ export async function admitDevice(options) {
|
|
|
35
34
|
});
|
|
36
35
|
if (!verdict.ok)
|
|
37
36
|
return verdict;
|
|
38
|
-
|
|
37
|
+
await options.accountLedger.recordGrant("device", deviceIdToHex(options.deviceId), options.tokenId);
|
|
39
38
|
return verdict;
|
|
40
39
|
}
|
|
41
40
|
/**
|
|
42
|
-
* Revokes
|
|
41
|
+
* Revokes every group:member grant for deviceId that the account's ledger holds as outstanding, whichever machine of the account minted it: mints a revocation-entry for each token-id, records it in the given RevocationView immediately, and appends it to the ledger, so every other machine of the account sees the grant as revoked and a later re-admission starts from nothing outstanding. Returns no entries for a device the account never admitted.
|
|
43
42
|
*
|
|
44
|
-
* Returns the minted
|
|
43
|
+
* Returns the minted entries so the caller can broadcast them to the mesh (this module has no MeshTransport dependency to do so itself, mirroring the module-level "no assumption about locality" boundary documented above): every other device that might hold one of this device's grants needs the entry to independently start refusing it.
|
|
45
44
|
*/
|
|
46
45
|
export async function removeDevice(options) {
|
|
47
46
|
const deviceHex = deviceIdToHex(options.deviceId);
|
|
48
|
-
const
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
47
|
+
const outstanding = await options.accountLedger.outstandingGrants("device", deviceHex);
|
|
48
|
+
const entries = [];
|
|
49
|
+
for (const { tokenId } of outstanding) {
|
|
50
|
+
const entry = await mintRevocationEntry({
|
|
51
|
+
identity: options.userIdentity,
|
|
52
|
+
tokenId,
|
|
53
|
+
revokedAt: options.clock.now(),
|
|
54
|
+
});
|
|
55
|
+
await options.revocation.record(entry, { identity: options.userIdentity });
|
|
56
|
+
await options.accountLedger.recordRevocation("device", deviceHex, tokenId, entry);
|
|
57
|
+
entries.push(entry);
|
|
58
|
+
}
|
|
59
|
+
return entries;
|
|
59
60
|
}
|
|
60
61
|
//# sourceMappingURL=device-membership.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"device-membership.js","sourceRoot":"","sources":["../../src/core/device-membership.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EACL,mBAAmB,EACnB,mBAAmB,GAEpB,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAAE,aAAa,EAAE,MAAM,iCAAiC,CAAC;AAQhE,OAAO,EACL,wBAAwB,EACxB,SAAS,GACV,MAAM,qCAAqC,CAAC;
|
|
1
|
+
{"version":3,"file":"device-membership.js","sourceRoot":"","sources":["../../src/core/device-membership.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EACL,mBAAmB,EACnB,mBAAmB,GAEpB,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAAE,aAAa,EAAE,MAAM,iCAAiC,CAAC;AAQhE,OAAO,EACL,wBAAwB,EACxB,SAAS,GACV,MAAM,qCAAqC,CAAC;AAG7C,0YAA0Y;AAC1Y,MAAM,aAAa,GAAG,CAAC,CAAC;AAwBxB,icAAic;AACjc,MAAM,CAAC,KAAK,UAAU,mBAAmB,CACvC,OAA6C;IAE7C,OAAO,mBAAmB,CAAC;QACzB,QAAQ,EAAE,OAAO,CAAC,MAAM;QACxB,KAAK,EAAE,OAAO,CAAC,KAAK;QACpB,OAAO,EAAE,OAAO,CAAC,OAAO;QACxB,MAAM,EAAE,OAAO,CAAC,QAAQ;QACxB,UAAU,EAAE,wBAAwB;QACpC,KAAK,EAAE;YACL,IAAI,EAAE,OAAO;YACb,IAAI,EAAE,SAAS,CAAC,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC;SACzC;QACD,OAAO,EAAE,OAAO,CAAC,OAAO;QACxB,oBAAoB,EAAE,aAAa;KACpC,CAAC,CAAC;AACL,CAAC;AAED;;GAEG;AACH,M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ict } from "wire-mesh-core/domain/tokens";
|
|
|
7
7
|
import type { IdentityPort } from "wire-mesh-core/ports/identity";
|
|
8
8
|
import type { Clock } from "wire-mesh-core/ports/clock";
|
|
9
9
|
import type { CapabilityToken, DeviceId } from "wire-mesh-core/generated/protocol";
|
|
10
|
-
import {
|
|
10
|
+
import type { AccountLedger } from "./account-ledger.js";
|
|
11
11
|
export interface DelegateDmSendToDeviceOptions {
|
|
12
12
|
/** The principal doing the sub-delegating -- must be the same identity the parent grant's own bearer names, or mintCapabilityToken's own parent-bearer-matches-issuer narrowing check refuses the mint outright (`parent_bearer_mismatch`). */
|
|
13
13
|
userIdentity: IdentityPort;
|
|
14
|
-
/**
|
|
15
|
-
|
|
14
|
+
/** The account's replicated grant ledger, which records the delegation so any machine holding the account key can revoke it. */
|
|
15
|
+
accountLedger: AccountLedger;
|
|
16
16
|
clock: Clock;
|
|
17
17
|
tokenId: Uint8Array<ArrayBuffer>;
|
|
18
18
|
/** The grant this principal itself was admitted with (room-lifecycle.ts's admitAgentForDm, minted with delegationsRemaining \> 0) -- every one of tokens.cddl's own narrowing obligations is checked against it at mint time. */
|
|
@@ -26,7 +26,7 @@ export interface DelegateDmSendToDeviceOptions {
|
|
|
26
26
|
delegationsRemaining?: number;
|
|
27
27
|
}
|
|
28
28
|
/**
|
|
29
|
-
* Mints deviceId's own dm:send delegation from a received grant: bearer = deviceId, parent = the grant this principal itself was admitted with, scope unchanged (still the REMOTE admitting principal's own "user" scope, never this principal's own device-id)
|
|
29
|
+
* Mints deviceId's own dm:send delegation from a received grant: bearer = deviceId, parent = the grant this principal itself was admitted with, scope unchanged (still the REMOTE admitting principal's own "user" scope, never this principal's own device-id); mintCapabilityToken's own narrowing refuses this outright if parent's own delegationsRemaining was 0 (nothing left to sub-delegate) or if userIdentity does not match parent's own bearer. On success, records the token-id in THIS principal's own replicated grant ledger as a dm grant keyed by deviceId's hex, so a later revocation on any of the account's machines can find it; admitAgentForDm's own root-level self-grants are recorded the same way, since both are simply grants this identity has issued, keyed by bearer, whether root-level or a delegation.
|
|
30
30
|
*/
|
|
31
31
|
export declare function delegateDmSendToDevice(options: Readonly<DelegateDmSendToDeviceOptions>): Promise<MintVerdict>;
|
|
32
32
|
//# sourceMappingURL=dm-send-delegation.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dm-send-delegation.d.ts","sourceRoot":"","sources":["../../src/core/dm-send-delegation.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAEL,KAAK,WAAW,EACjB,MAAM,8BAA8B,CAAC;AAEtC,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;AAClE,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,4BAA4B,CAAC;AACxD,OAAO,KAAK,EACV,eAAe,EACf,QAAQ,EACT,MAAM,mCAAmC,CAAC;AAK3C,OAAO,
|
|
1
|
+
{"version":3,"file":"dm-send-delegation.d.ts","sourceRoot":"","sources":["../../src/core/dm-send-delegation.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAEL,KAAK,WAAW,EACjB,MAAM,8BAA8B,CAAC;AAEtC,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;AAClE,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,4BAA4B,CAAC;AACxD,OAAO,KAAK,EACV,eAAe,EACf,QAAQ,EACT,MAAM,mCAAmC,CAAC;AAK3C,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAKzD,MAAM,WAAW,6BAA6B;IAC5C,+OAA+O;IAC/O,YAAY,EAAE,YAAY,CAAC;IAC3B,gIAAgI;IAChI,aAAa,EAAE,aAAa,CAAC;IAC7B,KAAK,EAAE,KAAK,CAAC;IACb,OAAO,EAAE,UAAU,CAAC,WAAW,CAAC,CAAC;IACjC,iOAAiO;IACjO,MAAM,EAAE,eAAe,CAAC;IACxB,4EAA4E;IAC5E,QAAQ,EAAE,QAAQ,CAAC;IACnB,yPAAyP;IACzP,2BAA2B,EAAE,QAAQ,CAAC;IACtC,OAAO,EAAE,MAAM,CAAC;IAChB,sNAAsN;IACtN,oBAAoB,CAAC,EAAE,MAAM,CAAC;CAC/B;AAED;;GAEG;AACH,wBAAsB,sBAAsB,CAC1C,OAAO,EAAE,QAAQ,CAAC,6BAA6B,CAAC,GAC/C,OAAO,CAAC,WAAW,CAAC,CAuBtB"}
|
|
@@ -6,11 +6,10 @@
|
|
|
6
6
|
import { mintCapabilityToken, } from "wire-mesh-core/domain/tokens";
|
|
7
7
|
import { deviceIdToHex } from "wire-mesh-core/domain/device-id";
|
|
8
8
|
import { DM_SEND_CAPABILITY, DM_SEND_SCOPE_KIND, } from "./dm-token-verification.js";
|
|
9
|
-
import { saveIssuedDmGrant, } from "./user-identity.js";
|
|
10
9
|
/** delegationsRemaining a delegated device's own token permits below it, when the caller doesn't ask for more -- 0, matching every other non-delegable grant this codebase already mints by default (device-membership.ts's own NOT_DELEGABLE): an ordinary device is a leaf of the chain, not a further delegator. */
|
|
11
10
|
const LEAF_NOT_DELEGABLE = 0;
|
|
12
11
|
/**
|
|
13
|
-
* Mints deviceId's own dm:send delegation from a received grant: bearer = deviceId, parent = the grant this principal itself was admitted with, scope unchanged (still the REMOTE admitting principal's own "user" scope, never this principal's own device-id)
|
|
12
|
+
* Mints deviceId's own dm:send delegation from a received grant: bearer = deviceId, parent = the grant this principal itself was admitted with, scope unchanged (still the REMOTE admitting principal's own "user" scope, never this principal's own device-id); mintCapabilityToken's own narrowing refuses this outright if parent's own delegationsRemaining was 0 (nothing left to sub-delegate) or if userIdentity does not match parent's own bearer. On success, records the token-id in THIS principal's own replicated grant ledger as a dm grant keyed by deviceId's hex, so a later revocation on any of the account's machines can find it; admitAgentForDm's own root-level self-grants are recorded the same way, since both are simply grants this identity has issued, keyed by bearer, whether root-level or a delegation.
|
|
14
13
|
*/
|
|
15
14
|
export async function delegateDmSendToDevice(options) {
|
|
16
15
|
const verdict = await mintCapabilityToken({
|
|
@@ -29,7 +28,7 @@ export async function delegateDmSendToDevice(options) {
|
|
|
29
28
|
});
|
|
30
29
|
if (!verdict.ok)
|
|
31
30
|
return verdict;
|
|
32
|
-
|
|
31
|
+
await options.accountLedger.recordGrant("dm", deviceIdToHex(options.deviceId), options.tokenId);
|
|
33
32
|
return verdict;
|
|
34
33
|
}
|
|
35
34
|
//# sourceMappingURL=dm-send-delegation.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dm-send-delegation.js","sourceRoot":"","sources":["../../src/core/dm-send-delegation.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EACL,mBAAmB,GAEpB,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAAE,aAAa,EAAE,MAAM,iCAAiC,CAAC;AAOhE,OAAO,EACL,kBAAkB,EAClB,kBAAkB,GACnB,MAAM,4BAA4B,CAAC;
|
|
1
|
+
{"version":3,"file":"dm-send-delegation.js","sourceRoot":"","sources":["../../src/core/dm-send-delegation.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EACL,mBAAmB,GAEpB,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAAE,aAAa,EAAE,MAAM,iCAAiC,CAAC;AAOhE,OAAO,EACL,kBAAkB,EAClB,kBAAkB,GACnB,MAAM,4BAA4B,CAAC;AAGpC,uTAAuT;AACvT,MAAM,kBAAkB,GAAG,CAAC,CAAC;AAoB7B;;GAEG;AACH,MAAM,CAAC,KAAK,UAAU,sBAAsB,CAC1C,OAAgD;IAEhD,MAAM,OAAO,GAAG,MAAM,mBAAmB,CAAC;QACxC,QAAQ,EAAE,OAAO,CAAC,YAAY;QAC9B,KAAK,EAAE,OAAO,CAAC,KAAK;QACpB,OAAO,EAAE,OAAO,CAAC,OAAO;QACxB,MAAM,EAAE,OAAO,CAAC,QAAQ;QACxB,UAAU,EAAE,kBAAkB;QAC9B,KAAK,EAAE;YACL,IAAI,EAAE,kBAAkB;YACxB,IAAI,EAAE,aAAa,CAAC,OAAO,CAAC,2BAA2B,CAAC;SACzD;QACD,OAAO,EAAE,OAAO,CAAC,OAAO;QACxB,oBAAoB,EAAE,OAAO,CAAC,oBAAoB,IAAI,kBAAkB;QACxE,MAAM,EAAE,OAAO,CAAC,MAAM;KACvB,CAAC,CAAC;IACH,IAAI,CAAC,OAAO,CAAC,EAAE;QAAE,OAAO,OAAO,CAAC;IAEhC,MAAM,OAAO,CAAC,aAAa,CAAC,WAAW,CACrC,IAAI,EACJ,aAAa,CAAC,OAAO,CAAC,QAAQ,CAAC,EAC/B,OAAO,CAAC,OAAO,CAChB,CAAC;IACF,OAAO,OAAO,CAAC;AACjB,CAAC"}
|
|
@@ -23,6 +23,11 @@ export declare class GroupProofs {
|
|
|
23
23
|
private readonly machineName;
|
|
24
24
|
private readonly getIdentity;
|
|
25
25
|
constructor(deps: Readonly<GroupProofsDeps>);
|
|
26
|
+
/** Whether a gossiped proof shows that deviceHex belongs to the account this store holds, judged against the user principal's own proofs (MembershipProofs.isAccountMember). */
|
|
27
|
+
isAccountMember(claim: Readonly<{
|
|
28
|
+
proof: string;
|
|
29
|
+
deviceHex: string;
|
|
30
|
+
}>): Promise<boolean>;
|
|
26
31
|
/** The agent/self advert fields carrying this device's current proofs, each absent until it has first been minted. */
|
|
27
32
|
advertFields(): Pick<AgentSelfSummary, "membership" | "machine" | "machineName">;
|
|
28
33
|
/** Starts keeping both proofs fresh; called once the store's identity is attached. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"group-proofs.d.ts","sourceRoot":"","sources":["../../src/core/group-proofs.ts"],"names":[],"mappings":"AAAA;;GAEG;AAGH,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAChE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AASpD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAC/D,OAAO,KAA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E,QAAQ,CAAC;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,SAAS,EAAE,MAAM,CAAA;KAAE,CAAC,GACpD,OAAO,CAAC,OAAO,CAAC;IAInB,sHAAsH;IACtH,YAAY,IAAI,IAAI,CAClB,gBAAgB,EAChB,YAAY,GAAG,SAAS,GAAG,aAAa,CACzC;IAWD,sFAAsF;IACtF,KAAK,IAAI,IAAI;IAMb,IAAI,IAAI,IAAI;IAMZ,+KAA+K;IACzK,eAAe,CAAC,IAAI,EAAE,MAAM,GAAG,SAAS,GAAG,OAAO,CAAC,IAAI,CAAC;IAK9D,sGAAsG;IAChG,MAAM,CACV,KAAK,EAAE,QAAQ,CAAC;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,SAAS,EAAE,MAAM,CAAC;QAAC,SAAS,EAAE,MAAM,CAAA;KAAE,CAAC,GACvE,OAAO,CAAC,sBAAsB,CAAC;IAIlC,qLAAqL;IAC/K,QAAQ,CACZ,KAAK,EAAE,QAAQ,CAAC;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,SAAS,EAAE,MAAM,CAAA;KAAE,CAAC,GACpD,OAAO,CAAC,yBAAyB,CAAC;IAIrC,uFAAuF;IACjF,gBAAgB,IAAI,OAAO,CAAC,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAItD,kGAAkG;IAC5F,YAAY,IAAI,OAAO,CAAC,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CAGnD"}
|
|
@@ -55,6 +55,10 @@ export class GroupProofs {
|
|
|
55
55
|
onError: deps.onError,
|
|
56
56
|
});
|
|
57
57
|
}
|
|
58
|
+
/** Whether a gossiped proof shows that deviceHex belongs to the account this store holds, judged against the user principal's own proofs (MembershipProofs.isAccountMember). */
|
|
59
|
+
async isAccountMember(claim) {
|
|
60
|
+
return this.principal.isAccountMember(claim);
|
|
61
|
+
}
|
|
58
62
|
/** The agent/self advert fields carrying this device's current proofs, each absent until it has first been minted. */
|
|
59
63
|
advertFields() {
|
|
60
64
|
const membership = this.principal.current();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"group-proofs.js","sourceRoot":"","sources":["../../src/core/group-proofs.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,aAAa,EAAE,MAAM,iCAAiC,CAAC;AAGhE,OAAO,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAC1D,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AACxD,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAC3D,OAAO,EACL,sBAAsB,EACtB,sBAAsB,GACvB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAmBlD,MAAM,OAAO,WAAW;IACL,SAAS,CAAmB;IAC5B,OAAO,CAAmB;IAC1B,QAAQ,CAAkB;IAC1B,WAAW,CAAmB;IAC9B,WAAW,CAA0B;IAEtD,YAAY,IAA+B;QACzC,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC,WAAW,CAAC;QACpC,MAAM,MAAM,GAAG;YACb,WAAW,EAAE,IAAI,CAAC,WAAW;YAC7B,SAAS,EAAE,IAAI,CAAC,SAAS;YACzB,OAAO,EAAE,IAAI,CAAC,OAAO;SACtB,CAAC;QACF,IAAI,CAAC,SAAS,GAAG,IAAI,gBAAgB,CAAC;YACpC,GAAG,MAAM;YACT,QAAQ,EAAE,CAAC,QAAQ,EAAE,EAAE,CAAC,QAAQ,CAAC,YAAY;SAC9C,CAAC,CAAC;QACH,IAAI,CAAC,OAAO,GAAG,IAAI,gBAAgB,CAAC;YAClC,GAAG,MAAM;YACT,QAAQ,EAAE,CAAC,QAAQ,EAAE,EAAE,CAAC,QAAQ,CAAC,eAAe;SACjD,CAAC,CAAC;QACH,IAAI,CAAC,QAAQ,GAAG,IAAI,eAAe,CAAC;YAClC,gBAAgB,EAAE,GAAG,EAAE,CACrB,IAAI,CA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AI,CAAC,CAAC;QACxE,OAAO,IAAI,CAAC,WAAW,CAAC,OAAO,EAAE,CAAC;IACpC,CAAC;IAED,sGAAsG;IACtG,KAAK,CAAC,MAAM,CACV,KAAwE;QAExE,OAAO,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;IACtC,CAAC;IAED,qLAAqL;IACrL,KAAK,CAAC,QAAQ,CACZ,KAAqD;QAErD,OAAO,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;IACxC,CAAC;IAED,uFAAuF;IACvF,KAAK,CAAC,gBAAgB;QACpB,OAAO,IAAI,CAAC,QAAQ,CAAC,gBAAgB,EAAE,CAAC;IAC1C,CAAC;IAED,kGAAkG;IAClG,KAAK,CAAC,YAAY;QAChB,OAAO,IAAI,CAAC,QAAQ,CAAC,YAAY,EAAE,CAAC;IACtC,CAAC;CACF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"identity-store.d.ts","sourceRoot":"","sources":["../../src/core/identity-store.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAKH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,mCAAmC,CAAC;AAQzE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"identity-store.d.ts","sourceRoot":"","sources":["../../src/core/identity-store.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAKH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,mCAAmC,CAAC;AAQzE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AASlD,4EAA4E;AAC5E,MAAM,WAAW,YAAY;IAC3B,OAAO,EAAE,MAAM,CAAC;IAChB,GAAG,EAAE,MAAM,CAAC;IACZ,oCAAoC;IACpC,GAAG,CAAC,EAAE,MAAM,CAAC;CACd;AAYD,wgBAAwgB;AACxgB,MAAM,MAAM,yBAAyB,GAAG;IACtC,MAAM;I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