agent-comms 8.10.2 → 8.12.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/LICENSE +21 -0
- package/README.md +4 -2
- package/dist/bridges/user/web/dist/mesh-worker.js +1 -1
- package/dist/bridges/user/web/dist/sw.js +1 -1
- package/dist/core/account-join.d.ts +5 -0
- package/dist/core/account-join.d.ts.map +1 -1
- package/dist/core/account-join.js +3 -3
- package/dist/core/account-join.js.map +1 -1
- package/dist/core/agent-details.d.ts +67 -0
- package/dist/core/agent-details.d.ts.map +1 -0
- package/dist/core/agent-details.js +163 -0
- package/dist/core/agent-details.js.map +1 -0
- package/dist/core/agent-list-format.d.ts +22 -0
- package/dist/core/agent-list-format.d.ts.map +1 -0
- package/dist/core/agent-list-format.js +54 -0
- package/dist/core/agent-list-format.js.map +1 -0
- package/dist/core/first-contact.d.ts +7 -0
- package/dist/core/first-contact.d.ts.map +1 -1
- package/dist/core/first-contact.js +14 -0
- package/dist/core/first-contact.js.map +1 -1
- package/dist/core/lan-web-actions.d.ts +8 -0
- package/dist/core/lan-web-actions.d.ts.map +1 -0
- package/dist/core/lan-web-actions.js +23 -0
- package/dist/core/lan-web-actions.js.map +1 -0
- package/dist/core/lan-web-uis.d.ts +27 -0
- package/dist/core/lan-web-uis.d.ts.map +1 -0
- package/dist/core/lan-web-uis.js +40 -0
- package/dist/core/lan-web-uis.js.map +1 -0
- package/dist/core/mesh-store.d.ts +14 -10
- package/dist/core/mesh-store.d.ts.map +1 -1
- package/dist/core/mesh-store.js +24 -25
- package/dist/core/mesh-store.js.map +1 -1
- package/dist/core/peer-lifecycle.d.ts +6 -0
- package/dist/core/peer-lifecycle.d.ts.map +1 -1
- package/dist/core/peer-lifecycle.js +1 -0
- package/dist/core/peer-lifecycle.js.map +1 -1
- package/dist/core/tool.d.ts +8 -0
- package/dist/core/tool.d.ts.map +1 -1
- package/dist/core/tool.js +10 -42
- package/dist/core/tool.js.map +1 -1
- package/dist/core/types.d.ts +4 -0
- package/dist/core/types.d.ts.map +1 -1
- package/dist/core/types.js +1 -0
- package/dist/core/types.js.map +1 -1
- package/dist/core/web-beacon.d.ts +14 -0
- package/dist/core/web-beacon.d.ts.map +1 -0
- package/dist/core/web-beacon.js +22 -0
- package/dist/core/web-beacon.js.map +1 -0
- package/dist/test/agent-details-refresh.unit.test.d.ts +5 -0
- package/dist/test/agent-details-refresh.unit.test.d.ts.map +1 -0
- package/dist/test/agent-details-refresh.unit.test.js +108 -0
- package/dist/test/agent-details-refresh.unit.test.js.map +1 -0
- package/dist/test/agent-details.unit.test.d.ts +5 -0
- package/dist/test/agent-details.unit.test.d.ts.map +1 -0
- package/dist/test/agent-details.unit.test.js +86 -0
- package/dist/test/agent-details.unit.test.js.map +1 -0
- package/dist/test/first-contact.unit.test.js +39 -0
- package/dist/test/first-contact.unit.test.js.map +1 -1
- package/dist/test/lan-web-uis.unit.test.d.ts +5 -0
- package/dist/test/lan-web-uis.unit.test.d.ts.map +1 -0
- package/dist/test/lan-web-uis.unit.test.js +72 -0
- package/dist/test/lan-web-uis.unit.test.js.map +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1,163 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The details a trusted remote peer asks for over a session of its own (agent-comms#323): a hub session publishes only an agent's summary, so its working directory, rooms and tags list elsewhere as not shared. A bridge this machine has chosen to trust may ask for them with the agent-comms/agent-details verb, carried over the relay pairing the two already have so the hub relays bytes it cannot read; the answer is the same summary a direct peer reads from the advert.
|
|
3
|
+
*/
|
|
4
|
+
import { detailsShared } from "./agent-registry.js";
|
|
5
|
+
import { JOIN_ROUTE_RETRY_MS, JOIN_ROUTE_WAIT_MS, NO_ROUTE_CODES, } from "./account-join.js";
|
|
6
|
+
import { deviceIdToHex } from "wire-mesh-core/domain/device-id";
|
|
7
|
+
/** The params.verb a trusted peer's request is dispatched by, keyed per room-router's own convention like account-join's "account.join". */
|
|
8
|
+
export const AGENT_DETAILS_VERB = "agent.details";
|
|
9
|
+
/** The outer manage-command verb the request rides, which only satisfies manage-command.verb's own capability-verb grammar; the receiving side dispatches on AGENT_DETAILS_VERB, never this. */
|
|
10
|
+
export const AGENT_DETAILS_CAPABILITY_VERB = "agent:details";
|
|
11
|
+
/** Answers the agent.details verb: the full details for a requester this machine trusts by device id, an explicit refusal for anyone else, and no agent yet for a bridge that has not registered. The requester is whoever the transport actually authenticated: the device the end-to-end secure channel named for a relayed request (fromDevice, never an address a hub asserts), or the connection's own authenticated peer for a direct session (the handle's id, which every dispatch path builds from exactly that). */
|
|
12
|
+
export function agentDetailsVerbHandler(deps) {
|
|
13
|
+
return async (request, handle) => {
|
|
14
|
+
const requesterHex = request.fromDevice !== undefined
|
|
15
|
+
? deviceIdToHex(request.fromDevice)
|
|
16
|
+
: handle.id;
|
|
17
|
+
if (!deps.isTrusted(requesterHex)) {
|
|
18
|
+
return { result: "error", code: "untrusted_requester" };
|
|
19
|
+
}
|
|
20
|
+
const details = deps.details();
|
|
21
|
+
if (details === undefined) {
|
|
22
|
+
return { result: "error", code: "no_agent" };
|
|
23
|
+
}
|
|
24
|
+
return {
|
|
25
|
+
result: "ok",
|
|
26
|
+
cwd: details.cwd,
|
|
27
|
+
tags: details.tags,
|
|
28
|
+
rooms: details.rooms,
|
|
29
|
+
};
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
/** Narrows an untrusted value into one AgentDetailsRoom. */
|
|
33
|
+
function isAgentDetailsRoom(value) {
|
|
34
|
+
if (typeof value !== "object" || value === null)
|
|
35
|
+
return false;
|
|
36
|
+
if (!("path" in value) || typeof value.path !== "string")
|
|
37
|
+
return false;
|
|
38
|
+
if (!("name" in value) || typeof value.name !== "string")
|
|
39
|
+
return false;
|
|
40
|
+
if (!("description" in value) || typeof value.description !== "string") {
|
|
41
|
+
return false;
|
|
42
|
+
}
|
|
43
|
+
return true;
|
|
44
|
+
}
|
|
45
|
+
/** Narrows a manage outcome into the AgentDetails it carries: an ok outcome whose every field has the expected shape, and nothing else (a refusal, or an answer from a peer running something else). */
|
|
46
|
+
export function parseAgentDetails(outcome) {
|
|
47
|
+
if (outcome.result !== "ok")
|
|
48
|
+
return undefined;
|
|
49
|
+
if (typeof outcome.cwd !== "string")
|
|
50
|
+
return undefined;
|
|
51
|
+
if (!Array.isArray(outcome.tags))
|
|
52
|
+
return undefined;
|
|
53
|
+
if (outcome.tags.some((tag) => typeof tag !== "string"))
|
|
54
|
+
return undefined;
|
|
55
|
+
if (!Array.isArray(outcome.rooms))
|
|
56
|
+
return undefined;
|
|
57
|
+
const rooms = [];
|
|
58
|
+
for (const room of outcome.rooms) {
|
|
59
|
+
if (!isAgentDetailsRoom(room))
|
|
60
|
+
return undefined;
|
|
61
|
+
rooms.push(room);
|
|
62
|
+
}
|
|
63
|
+
return { cwd: outcome.cwd, tags: outcome.tags, rooms };
|
|
64
|
+
}
|
|
65
|
+
/** The cache of details this side has asked trusted peers for: refreshed whenever a listing triggers a new fetch, and trimmed to the agents the last listing actually showed so a departed agent's entry does not linger. */
|
|
66
|
+
export class AgentDetailsCache {
|
|
67
|
+
entries = new Map();
|
|
68
|
+
/** Records (or replaces) the details fetched for one agent. */
|
|
69
|
+
set(agentId, details) {
|
|
70
|
+
this.entries.set(agentId, { ...details, rooms: [...details.rooms] });
|
|
71
|
+
}
|
|
72
|
+
/** The cached details for one agent, if a fetch has completed. */
|
|
73
|
+
get(agentId) {
|
|
74
|
+
return this.entries.get(agentId);
|
|
75
|
+
}
|
|
76
|
+
/** Drops every entry whose agent the last listing did not include. */
|
|
77
|
+
retain(agentIds) {
|
|
78
|
+
for (const agentId of this.entries.keys()) {
|
|
79
|
+
if (!agentIds.has(agentId))
|
|
80
|
+
this.entries.delete(agentId);
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
/** This side's own details for a registered agent and its hosted rooms, the verb's answer body. */
|
|
85
|
+
export function ownAgentDetailsOf(agent, hostedRooms) {
|
|
86
|
+
return {
|
|
87
|
+
cwd: agent.cwd,
|
|
88
|
+
tags: agent.tags,
|
|
89
|
+
rooms: hostedRooms.map((room) => ({
|
|
90
|
+
path: room.path,
|
|
91
|
+
name: room.name,
|
|
92
|
+
description: room.description,
|
|
93
|
+
})),
|
|
94
|
+
};
|
|
95
|
+
}
|
|
96
|
+
/** Both halves of agent-comms#323 in one place: the verb a trusted peer's request is answered by, and the background fetch that fills this side's cache from peers this machine trusts. */
|
|
97
|
+
export class AgentDetailsExchange {
|
|
98
|
+
deps;
|
|
99
|
+
cache = new AgentDetailsCache();
|
|
100
|
+
/** The registered verb handler, answering from this side's own agent and hosted rooms. */
|
|
101
|
+
handler;
|
|
102
|
+
constructor(deps) {
|
|
103
|
+
this.deps = deps;
|
|
104
|
+
this.handler = agentDetailsVerbHandler({
|
|
105
|
+
details: () => {
|
|
106
|
+
const agent = deps.selfAgent();
|
|
107
|
+
return agent === undefined
|
|
108
|
+
? undefined
|
|
109
|
+
: ownAgentDetailsOf(agent, deps.hostedRooms());
|
|
110
|
+
},
|
|
111
|
+
isTrusted: deps.isTrusted,
|
|
112
|
+
});
|
|
113
|
+
}
|
|
114
|
+
/** Asks every trusted remote agent whose details a hub session withholds for them, without waiting: answers land in the cache and show on the next listing, and an unreachable peer simply keeps its not-shared listing. selfPeerId is the asking side's own agent, excluded from the fetches. */
|
|
115
|
+
refresh(agents, selfPeerId) {
|
|
116
|
+
const shown = new Set();
|
|
117
|
+
for (const agent of agents) {
|
|
118
|
+
shown.add(agent.id);
|
|
119
|
+
if (agent.id === selfPeerId)
|
|
120
|
+
continue;
|
|
121
|
+
if (detailsShared(agent))
|
|
122
|
+
continue;
|
|
123
|
+
if (!this.deps.isTrusted(agent.id))
|
|
124
|
+
continue;
|
|
125
|
+
void this.fetch(agent.id);
|
|
126
|
+
}
|
|
127
|
+
this.cache.retain(shown);
|
|
128
|
+
}
|
|
129
|
+
/** The cached details for one remote agent, once its trusted peer has answered. */
|
|
130
|
+
cached(agentId) {
|
|
131
|
+
return this.cache.get(agentId);
|
|
132
|
+
}
|
|
133
|
+
/** One agent's fetch, retried while no route to it exists yet (a relay pairing takes a moment to come up) and settled by the first real answer either way. */
|
|
134
|
+
async fetch(agentId) {
|
|
135
|
+
const deadline = Date.now() + JOIN_ROUTE_WAIT_MS;
|
|
136
|
+
for (;;) {
|
|
137
|
+
let outcome;
|
|
138
|
+
try {
|
|
139
|
+
outcome = await this.deps
|
|
140
|
+
.requireTransport()
|
|
141
|
+
.sendRoomRequest(agentId, { verb: AGENT_DETAILS_VERB, params: { verb: AGENT_DETAILS_VERB } }, { kind: "node" });
|
|
142
|
+
}
|
|
143
|
+
catch {
|
|
144
|
+
// An unreachable peer is routine (it is listed from its last advert); its details stay not shared.
|
|
145
|
+
return;
|
|
146
|
+
}
|
|
147
|
+
const details = parseAgentDetails(outcome);
|
|
148
|
+
if (details !== undefined) {
|
|
149
|
+
this.cache.set(agentId, details);
|
|
150
|
+
return;
|
|
151
|
+
}
|
|
152
|
+
// A pairing still warming answers "timeout" before it answers the verb, so that outcome is retried within the window too: the listing refreshes on every call, and a details fetch is never worth more than the wait.
|
|
153
|
+
const transient = outcome.result === "error" &&
|
|
154
|
+
(NO_ROUTE_CODES.has(outcome.code) || outcome.code === "timeout");
|
|
155
|
+
if (!transient || Date.now() >= deadline)
|
|
156
|
+
return;
|
|
157
|
+
await new Promise((resolve) => {
|
|
158
|
+
setTimeout(resolve, JOIN_ROUTE_RETRY_MS);
|
|
159
|
+
});
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
//# sourceMappingURL=agent-details.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"agent-details.js","sourceRoot":"","sources":["../../src/core/agent-details.ts"],"names":[],"mappings":"AAAA;;GAEG;AAKH,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACpD,OAAO,EACL,m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,CACd,OAAO,EACP,EAAE,IAAI,EAAE,kBAAkB,EAAE,MAAM,EAAE,EAAE,IAAI,EAAE,kBAAkB,EAAE,EAAE,EAClE,EAAE,IAAI,EAAE,MAAM,EAAE,CACjB,CAAC;YACN,CAAC;YAAC,MAAM,CAAC;gBACP,mGAAmG;gBACnG,OAAO;YACT,CAAC;YACD,MAAM,OAAO,GAAG,iBAAiB,CAAC,OAAO,CAAC,CAAC;YAC3C,IAAI,OAAO,KAAK,SAAS,EAAE,CAAC;gBAC1B,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;gBACjC,OAAO;YACT,CAAC;YACD,sNAAsN;YACtN,MAAM,SAAS,GACb,OAAO,CAAC,MAAM,KAAK,OAAO;gBAC1B,CAAC,cAAc,CAAC,GAAG,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,OAAO,CAAC,IAAI,KAAK,SAAS,CAAC,CAAC;YACnE,IAAI,CAAC,SAAS,IAAI,IAAI,CAAC,GAAG,EAAE,IAAI,QAAQ;gBAAE,OAAO;YACjD,MAAM,IAAI,OAAO,CAAO,CAAC,OAAO,EAAE,EAAE;gBAClC,UAAU,CAAC,OAAO,EAAE,mBAAmB,CAAC,CAAC;YAC3C,CAAC,CAAC,CAAC;QACL,CAAC;IACH,CAAC;CACF"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The list_agents listing's formatting, split out of tool.ts to keep that file under the repo's max-lines cap: the table, the per-agent describe block with rooms and versions, and the machine grouping.
|
|
3
|
+
*/
|
|
4
|
+
import type { Namer } from "./naming.js";
|
|
5
|
+
import { type VersionReportStore } from "./version-report-actions.js";
|
|
6
|
+
import type { CommsResult } from "./tool.js";
|
|
7
|
+
import type { AgentIdentity } from "./types.js";
|
|
8
|
+
import type { AgentDetailsExchange } from "./agent-details.js";
|
|
9
|
+
/** What the renderer needs beyond the agents themselves: who is asking, their namer, and the store's optional reads (versions, machines, and the agent-details exchange's cache). */
|
|
10
|
+
export interface AgentListFormatStore extends Readonly<Pick<VersionReportStore, "getPeerAgentCommsVersion" | "getPeerWireMeshCoreVersion" | "getPeerCcPeerVersion">> {
|
|
11
|
+
getCcPeerVersion?: (() => string | undefined) | undefined;
|
|
12
|
+
getMachineId?: (() => string | undefined) | undefined;
|
|
13
|
+
listAgentMachines?: (() => Promise<Map<string, string>>) | undefined;
|
|
14
|
+
agentDetailsExchange?: Readonly<Pick<AgentDetailsExchange, "cached">>;
|
|
15
|
+
}
|
|
16
|
+
/** Renders the whole listing. A trusted remote agent's fetched details (agent-comms#323) stand in for the ones a hub session withholds; a fetch that has not come back yet keeps its not-shared listing until the next call. */
|
|
17
|
+
export declare function renderAgentList(agents: readonly Readonly<AgentIdentity>[], opts: Readonly<{
|
|
18
|
+
selfId: string;
|
|
19
|
+
namer: Namer;
|
|
20
|
+
store: Readonly<AgentListFormatStore>;
|
|
21
|
+
}>): Promise<CommsResult>;
|
|
22
|
+
//# sourceMappingURL=agent-list-format.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"agent-list-format.d.ts","sourceRoot":"","sources":["../../src/core/agent-list-format.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AAIzC,OAAO,EAEL,KAAK,kBAAkB,EACxB,MAAM,6BAA6B,CAAC;AACrC,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AAC7C,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAChD,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAE/D,qLAAqL;AACrL,MAAM,WAAW,oBAAqB,SAAQ,QAAQ,CACpD,IAAI,CACF,kBAAkB,EAChB,0BAA0B,GAC1B,4BAA4B,GAC5B,sBAAsB,CACzB,CACF;IACC,gBAAgB,CAAC,EAAE,CAAC,MAAM,MAAM,GAAG,SAAS,CAAC,GAAG,SAAS,CAAC;IAC1D,YAAY,CAAC,EAAE,CAAC,MAAM,MAAM,GAAG,SAAS,CAAC,GAAG,SAAS,CAAC;IACtD,iBAAiB,CAAC,EAAE,CAAC,MAAM,OAAO,CAAC,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC,GAAG,SAAS,CAAC;IACrE,oBAAoB,CAAC,EAAE,QAAQ,CAAC,IAAI,CAAC,oBAAoB,EAAE,QAAQ,CAAC,CAAC,CAAC;CACvE;AAED,gOAAgO;AAChO,wBAAsB,eAAe,CACnC,MAAM,EAAE,SAAS,QAAQ,CAAC,aAAa,CAAC,EAAE,EAC1C,IAAI,EAAE,QAAQ,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,KAAK,CAAC;IACb,KAAK,EAAE,QAAQ,CAAC,oBAAoB,CAAC,CAAC;CACvC,CAAC,GACD,OAAO,CAAC,WAAW,CAAC,CAyDtB"}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The list_agents listing's formatting, split out of tool.ts to keep that file under the repo's max-lines cap: the table, the per-agent describe block with rooms and versions, and the machine grouping.
|
|
3
|
+
*/
|
|
4
|
+
import { detailsShared } from "./agent-registry.js";
|
|
5
|
+
import { groupAgentsByMachine } from "./machine-list-groups.js";
|
|
6
|
+
import { agentTable } from "./agent-table.js";
|
|
7
|
+
import { formatListedAgentVersions, } from "./version-report-actions.js";
|
|
8
|
+
/** Renders the whole listing. A trusted remote agent's fetched details (agent-comms#323) stand in for the ones a hub session withholds; a fetch that has not come back yet keeps its not-shared listing until the next call. */
|
|
9
|
+
export async function renderAgentList(agents, opts) {
|
|
10
|
+
const homedir = process.env.HOME ?? "";
|
|
11
|
+
const abbreviateCwd = (cwd) => homedir && cwd.startsWith(homedir) ? `~${cwd.slice(homedir.length)}` : cwd;
|
|
12
|
+
// The full id is printed in its own column, so the name column carries the names alone.
|
|
13
|
+
const rowOf = (a) => {
|
|
14
|
+
const asked = opts.store.agentDetailsExchange?.cached(a.id);
|
|
15
|
+
const shared = detailsShared(a) || asked !== undefined;
|
|
16
|
+
return {
|
|
17
|
+
id: a.id,
|
|
18
|
+
name: opts.namer(a.id, { selfName: a.name, besideFullId: true }),
|
|
19
|
+
harness: a.harness,
|
|
20
|
+
status: a.status,
|
|
21
|
+
visibility: a.visibility,
|
|
22
|
+
cwd: `${shared ? abbreviateCwd(asked?.cwd ?? a.cwd) : "(not shared)"}${a.id === opts.selfId ? " (you)" : ""}`,
|
|
23
|
+
};
|
|
24
|
+
};
|
|
25
|
+
const table = agentTable(agents.map(rowOf));
|
|
26
|
+
const describe = (a) => {
|
|
27
|
+
const isSelf = a.id === opts.selfId;
|
|
28
|
+
const asked = opts.store.agentDetailsExchange?.cached(a.id);
|
|
29
|
+
const shared = detailsShared(a) || asked !== undefined;
|
|
30
|
+
const roomPaths = asked === undefined ? a.subscribedRooms : asked.rooms.map((r) => r.path);
|
|
31
|
+
const rooms = !shared
|
|
32
|
+
? "not shared"
|
|
33
|
+
: roomPaths.length > 0
|
|
34
|
+
? roomPaths.join(", ")
|
|
35
|
+
: "none";
|
|
36
|
+
const versions = formatListedAgentVersions(opts.store, a.id, isSelf, opts.store.getCcPeerVersion);
|
|
37
|
+
return `${table.line(rowOf(a))}\n Rooms: ${rooms}\n Versions: ${versions}`;
|
|
38
|
+
};
|
|
39
|
+
const machines = await opts.store.listAgentMachines?.();
|
|
40
|
+
const groups = groupAgentsByMachine(agents, machines, opts.store.getMachineId?.(), opts.namer);
|
|
41
|
+
const body = groups
|
|
42
|
+
.map((group) => {
|
|
43
|
+
const rows = group.agents.map((a) => ` ${describe(a)}`);
|
|
44
|
+
return group.heading === undefined
|
|
45
|
+
? rows.join("\n")
|
|
46
|
+
: [` ${group.heading}`, ...rows].join("\n");
|
|
47
|
+
})
|
|
48
|
+
.join("\n");
|
|
49
|
+
return {
|
|
50
|
+
content: `Agents:\n ${table.header}\n${body}`,
|
|
51
|
+
isError: false,
|
|
52
|
+
};
|
|
53
|
+
}
|
|
54
|
+
//# sourceMappingURL=agent-list-format.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"agent-list-format.js","sourceRoot":"","sources":["../../src/core/agent-list-format.ts"],"names":[],"mappings":"AAAA;;GAEG;AAGH,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACpD,OAAO,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AAChE,OAAO,EAAE,UAAU,EAAsB,MAAM,kBAAkB,CAAC;AAClE,OAAO,EACL,yBAAyB,GAE1B,MAAM,6BAA6B,CAAC;AAoBrC,gOAAgO;AAChO,MAAM,CAAC,KAAK,UAAU,eAAe,CACnC,MAA0C,EAC1C,IAIE;IAEF,MAAM,OAAO,GAAG,OAAO,CAAC,GAAG,CAAC,IAAI,IAAI,EAAE,CAAC;IACvC,MAAM,aAAa,GAAG,CAAC,GAAW,EAAU,EAAE,CAC5C,OAAO,IAAI,GAAG,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,IAAI,GAAG,CAAC,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC;IAE7E,wFAAwF;IACxF,MAAM,KAAK,GAAG,CAAC,CAA0B,EAAiB,EAAE;QAC1D,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,oBAAoB,EAAE,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC;QAC5D,MAAM,MAAM,GAAG,aAAa,CAAC,CAAC,CAAC,IAAI,KAAK,KAAK,SAAS,CAAC;QACvD,OAAO;YACL,EAAE,EAAE,CAAC,CAAC,EAAE;YACR,IAAI,EAAE,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,EAAE,EAAE,QAAQ,EAAE,CAAC,CAAC,IAAI,EAAE,YAAY,EAAE,IAAI,EAAE,CAAC;YAChE,OAAO,EAAE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IAAI,CAAC,KAAK,CAAC,gBAAgB,CAC5B,CAAC;QACF,OAAO,GAAG,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,oBAAoB,KAAK,uBAAuB,QAAQ,EAAE,CAAC;IAC3F,CAAC,CAAC;IACF,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,KAAK,CAAC,iBAAiB,EAAE,EAAE,CAAC;IACxD,MAAM,MAAM,GAAG,oBAAoB,CACjC,MAAM,EACN,QAAQ,EACR,IAAI,CAAC,KAAK,CAAC,YAAY,EAAE,EAAE,EAC3B,IAAI,CAAC,KAAK,CACX,CAAC;IACF,MAAM,IAAI,GAAG,MAAM;SAChB,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE;QACb,MAAM,IAAI,GAAG,KAAK,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,KAAK,QAAQ,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC;QACzD,OAAO,KAAK,CAAC,OAAO,KAAK,SAAS;YAChC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC;YACjB,CAAC,CAAC,CAAC,KAAK,KAAK,CAAC,OAAO,EAAE,EAAE,GAAG,IAAI,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACjD,CAAC,CAAC;SACD,IAAI,CAAC,IAAI,CAAC,CAAC;IACd,OAAO;QACL,OAAO,EAAE,cAAc,KAAK,CAAC,MAAM,KAAK,IAAI,EAAE;QAC9C,OAAO,EAAE,KAAK;KACf,CAAC;AACJ,CAAC"}
|
|
@@ -33,6 +33,12 @@ export interface FirstContactOptions {
|
|
|
33
33
|
name: string;
|
|
34
34
|
/** Called once per discovered peer (deduplicated by peerId within this instance's lifetime). */
|
|
35
35
|
onPeerDiscovered: (peer: Readonly<DiscoveredPeer>) => void;
|
|
36
|
+
/** Called for every web UI beacon heard (agent-comms#353), with the host taken from the datagram's source address. Not deduplicated: a beacon repeats on the presence's own interval, and the receiver refreshes its entry each time. Absent means this presence ignores web beacons, today's behaviour before the receiving side existed. */
|
|
37
|
+
onWebBeacon?: (beacon: Readonly<{
|
|
38
|
+
peerId: string;
|
|
39
|
+
host: string;
|
|
40
|
+
webPort: number;
|
|
41
|
+
}>) => void;
|
|
36
42
|
/** The UDP port the presence binds, beacons, and probes on. Defaults to FIRST_CONTACT_PORT; overridable so tests take an OS-assigned free port rather than contending with a real machine presence. */
|
|
37
43
|
port?: number;
|
|
38
44
|
/** Reported, never fatal: a network where broadcast is unavailable (some cloud environments) simply yields no discovery. */
|
|
@@ -62,6 +68,7 @@ export declare function startFirstContact(input: Readonly<{
|
|
|
62
68
|
dataPort: number;
|
|
63
69
|
port: number;
|
|
64
70
|
onPeer: (peer: Readonly<PeerInfo>) => void;
|
|
71
|
+
onWebBeacon?: FirstContactOptions["onWebBeacon"];
|
|
65
72
|
onError: (error: Error) => void;
|
|
66
73
|
}>): FirstContact;
|
|
67
74
|
//# sourceMappingURL=first-contact.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"first-contact.d.ts","sourceRoot":"","sources":["../../src/core/first-contact.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAGH,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"first-contact.d.ts","sourceRoot":"","sources":["../../src/core/first-contact.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAGH,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAGnD,6IAA6I;AAC7I,eAAO,MAAM,kBAAkB,QAAQ,CAAC;AAExC,wOAAwO;AACxO,eAAO,MAAM,mBAAmB,kBAAkB,CAAC;AAKnD,kGAAkG;AAClG,eAAO,MAAM,iBAAiB,oBAAoB,CAAC;AAEnD,0IAA0I;AAC1I,eAAO,MAAM,yBAAyB,QAAS,CAAC;AAYhD,yDAAyD;AACzD,M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,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,CAAC,IAAI,EAAE,QAAQ,CAAC,QAAQ,CAAC,KAAK,IAAI,CAAC;IAC3C,WAAW,CAAC,EAAE,mBAAmB,CAAC,aAAa,CAAC,CAAC;IACjD,OAAO,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,CAAC;CACjC,CAAC,GACD,YAAY,CAqBd"}
|
|
@@ -10,6 +10,7 @@
|
|
|
10
10
|
* Deliberately independent of DiscoveryManager: that manager is the opt-in, tool-facing advertise/discover surface (mesh_advertise/mesh_discover) with its own visibility semantics, and default-on formation must not change what those actions mean. This module owns its socket lifecycle entirely (start/stop), keeps no state beyond it, and never blocks a caller: probe answers and discovery callbacks arrive asynchronously on the socket's own events.
|
|
11
11
|
*/
|
|
12
12
|
import * as dgram from "node:dgram";
|
|
13
|
+
import { isWebBeaconPayload } from "./web-beacon.js";
|
|
13
14
|
/** The shared beacon port, the same one discovery-mdns.ts's backend uses: one presence per machine-local network, interoperable payloads. */
|
|
14
15
|
export const FIRST_CONTACT_PORT = 19877;
|
|
15
16
|
/** The administratively scoped multicast group (239.255.0.0/16, organisation-local scope) joined on the loopback interface, so every same-host socket bound to the beacon port hears every packet whatever the state of the network. */
|
|
@@ -72,6 +73,16 @@ export class FirstContact {
|
|
|
72
73
|
}
|
|
73
74
|
handlePacket(msg, rinfo) {
|
|
74
75
|
const parsed = this.parseJson(msg);
|
|
76
|
+
if (isWebBeaconPayload(parsed)) {
|
|
77
|
+
if (parsed.peerId === this.opts.peerId)
|
|
78
|
+
return;
|
|
79
|
+
this.opts.onWebBeacon?.({
|
|
80
|
+
peerId: parsed.peerId,
|
|
81
|
+
host: rinfo.address,
|
|
82
|
+
webPort: parsed.webPort,
|
|
83
|
+
});
|
|
84
|
+
return;
|
|
85
|
+
}
|
|
75
86
|
if (!isBeaconPayload(parsed)) {
|
|
76
87
|
// A probe from another peer: answer at once with a fresh beacon on the same many-receiver destinations (see the header comment on why never a unicast reply), so the prober does not wait out our interval.
|
|
77
88
|
if (isProbePayload(parsed)) {
|
|
@@ -163,6 +174,9 @@ export function startFirstContact(input) {
|
|
|
163
174
|
dataPort: input.dataPort,
|
|
164
175
|
name: `agent-comms-${input.peerId.slice(0, BEACON_NAME_PEER_ID_CHARS)}`,
|
|
165
176
|
port: input.port,
|
|
177
|
+
...(input.onWebBeacon !== undefined
|
|
178
|
+
? { onWebBeacon: input.onWebBeacon }
|
|
179
|
+
: {}),
|
|
166
180
|
onPeerDiscovered: (peer) => {
|
|
167
181
|
input.onPeer({
|
|
168
182
|
id: peer.peerId,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"first-contact.js","sourceRoot":"","sources":["../../src/core/first-contact.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,KAAK,KAAK,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"first-contact.js","sourceRoot":"","sources":["../../src/core/first-contact.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,KAAK,KAAK,MAAM,YAAY,CAAC;AAEpC,OAAO,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AAErD,6IAA6I;AAC7I,MAAM,CAAC,MAAM,kBAAkB,GAAG,KAAK,CAAC;AAExC,wOAAwO;AACxO,MAAM,CAAC,MAAM,mBAAmB,GAAG,eAAe,CAAC;AAEnD,uHAAuH;AACvH,MAAM,kBAAkB,GAAG,WAAW,CAAC;AAEvC,kGAAkG;AAClG,MAAM,CAAC,MAAM,iBAAiB,GAAG,iBAAiB,CAAC;AAEnD,0IAA0I;AAC1I,MAAM,CAAC,MAAM,yBAAyB,GAAG,MAAM,CAAC;AAsChD,MAAM,OAAO,YAAY;IAKM;IAJrB,MAAM,CAA2B;IACjC,WAAW,CAA6C;IAC/C,WAAW,GAAG,IAAI,GAAG,EAAU,CAAC;IAEjD,YAA6B,IAAmC;QAAnC,SA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
2
|
+
* The lan_web_uis action's handler, split out of tool.ts to keep that file under the repo's max-lines cap.
|
|
3
|
+
*/
|
|
4
|
+
import { type CommsResult, type MeshOnlyFeatures } from "./tool.js";
|
|
5
|
+
import { type Namer } from "./naming.js";
|
|
6
|
+
/** Lists the LAN web UIs heard as web beacons (agent-comms#353): each as its ready-to-open URL beside the full peer id and its names, since the entry a user acts on is the peer id. */
|
|
7
|
+
export declare function lanWebUisAction(store: Readonly<MeshOnlyFeatures>, namer: Namer): CommsResult;
|
|
8
|
+
//# sourceMappingURL=lan-web-actions.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"lan-web-actions.d.ts","sourceRoot":"","sources":["../../src/core/lan-web-actions.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAEL,KAAK,WAAW,EAChB,KAAK,gBAAgB,EACtB,MAAM,WAAW,CAAC;AACnB,OAAO,EAAe,KAAK,KAAK,EAAE,MAAM,aAAa,CAAC;AAEtD,wLAAwL;AACxL,wBAAgB,eAAe,CAC7B,KAAK,EAAE,QAAQ,CAAC,gBAAgB,CAAC,EACjC,KAAK,EAAE,KAAK,GACX,WAAW,CAkBb"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The lan_web_uis action's handler, split out of tool.ts to keep that file under the repo's max-lines cap.
|
|
3
|
+
*/
|
|
4
|
+
import { notMeshBacked, } from "./tool.js";
|
|
5
|
+
import { idWithNames } from "./naming.js";
|
|
6
|
+
/** Lists the LAN web UIs heard as web beacons (agent-comms#353): each as its ready-to-open URL beside the full peer id and its names, since the entry a user acts on is the peer id. */
|
|
7
|
+
export function lanWebUisAction(store, namer) {
|
|
8
|
+
if (!store.lanWebUis)
|
|
9
|
+
return notMeshBacked("lan_web_uis");
|
|
10
|
+
const entries = store.lanWebUis.list();
|
|
11
|
+
if (entries.length === 0) {
|
|
12
|
+
return {
|
|
13
|
+
content: "No LAN web UIs heard. A bridge announces its web UI on the local network only while it is bound beyond loopback (AGENT_COMMS_WEB_HOST).",
|
|
14
|
+
isError: false,
|
|
15
|
+
};
|
|
16
|
+
}
|
|
17
|
+
const lines = entries.map((entry) => `http://${entry.host}:${entry.webPort.toString()} ${idWithNames(entry.peerId, namer)}`);
|
|
18
|
+
return {
|
|
19
|
+
content: `LAN web UIs:\n${lines.join("\n")}`,
|
|
20
|
+
isError: false,
|
|
21
|
+
};
|
|
22
|
+
}
|
|
23
|
+
//# sourceMappingURL=lan-web-actions.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"lan-web-actions.js","sourceRoot":"","sources":["../../src/core/lan-web-actions.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EACL,aAAa,GAGd,MAAM,WAAW,CAAC;AACnB,OAAO,EAAE,WAAW,EAAc,MAAM,aAAa,CAAC;AAEtD,wLAAwL;AACxL,MAAM,UAAU,eAAe,CAC7B,KAAiC,EACjC,KAAY;IAEZ,IAAI,CAAC,KAAK,CAAC,SAAS;QAAE,OAAO,aAAa,CAAC,aAAa,CAAC,CAAC;IAC1D,MAAM,OAAO,GAAG,KAAK,CAAC,SAAS,CAAC,IAAI,EAAE,CAAC;IACvC,IAAI,OAAO,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QACzB,OAAO;YACL,OAAO,EACL,yIAAyI;YAC3I,OAAO,EAAE,KAAK;SACf,CAAC;IACJ,CAAC;IACD,MAAM,KAAK,GAAG,OAAO,CAAC,GAAG,CACvB,CAAC,KAAK,EAAE,EAAE,CACR,UAAU,KAAK,CAAC,IAAI,IAAI,KAAK,CAAC,OAAO,CAAC,QAAQ,EAAE,KAAK,WAAW,CAAC,KAAK,CAAC,MAAM,EAAE,KAAK,CAAC,EAAE,CAC1F,CAAC;IACF,OAAO;QACL,OAAO,EAAE,iBAAiB,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE;QAC5C,OAAO,EAAE,KAAK;KACf,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The LAN web UIs this machine has heard web beacons for (agent-comms#353): the receiving half of the beacon bridges broadcast when their web server binds beyond loopback, kept as a bounded, expiring table so `lan_web_uis` can list neighbouring dashboards without anything accumulating.
|
|
3
|
+
*/
|
|
4
|
+
/** One neighbouring web UI as last heard: where it listens, and when. */
|
|
5
|
+
export interface LanWebUiEntry {
|
|
6
|
+
peerId: string;
|
|
7
|
+
host: string;
|
|
8
|
+
webPort: number;
|
|
9
|
+
heardAtMs: number;
|
|
10
|
+
}
|
|
11
|
+
/** The table of LAN web UIs heard on this machine's first-contact presence. An entry is refreshed by every beacon its bridge sends, and a bridge that stops beaconing drops out of `list()` once its entry is stale. */
|
|
12
|
+
export declare class LanWebUis {
|
|
13
|
+
private readonly now;
|
|
14
|
+
private readonly entries;
|
|
15
|
+
constructor(now?: () => number);
|
|
16
|
+
/** Records (or refreshes) the UI a beacon announced, keyed by peer id so a bridge that restarts on a new port replaces its own entry rather than accumulating one per restart. */
|
|
17
|
+
record(peerId: string, host: string, webPort: number): LanWebUiEntry;
|
|
18
|
+
/** record for a beacon as first contact hands it up, host already taken from the datagram's source address. */
|
|
19
|
+
recordBeacon(beacon: Readonly<{
|
|
20
|
+
peerId: string;
|
|
21
|
+
host: string;
|
|
22
|
+
webPort: number;
|
|
23
|
+
}>): LanWebUiEntry;
|
|
24
|
+
/** Every unexpired entry, ordered by peer id so the listing is stable between calls. */
|
|
25
|
+
list(): readonly Readonly<LanWebUiEntry>[];
|
|
26
|
+
}
|
|
27
|
+
//# sourceMappingURL=lan-web-uis.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"lan-web-uis.d.ts","sourceRoot":"","sources":["../../src/core/lan-web-uis.ts"],"names":[],"mappings":"AAAA;;GAEG;AASH,yEAAyE;AACzE,MAAM,WAAW,aAAa;IAC5B,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,wNAAwN;AACxN,qBAAa,SAAS;IAGR,OAAO,CAAC,QAAQ,CAAC,GAAG;IAFhC,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAoC;gBAE/B,GAAG,GAAE,MAAM,MAAiB;IAEzD,kLAAkL;IAClL,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,aAAa;IAWpE,+GAA+G;IAC/G,YAAY,CACV,MAAM,EAAE,QAAQ,CAAC;QAAE,MAAM,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,CAAA;KAAE,CAAC,GAClE,aAAa;IAIhB,wFAAwF;IACxF,IAAI,IAAI,SAAS,QAAQ,CAAC,aAAa,CAAC,EAAE;CAS3C"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The LAN web UIs this machine has heard web beacons for (agent-comms#353): the receiving half of the beacon bridges broadcast when their web server binds beyond loopback, kept as a bounded, expiring table so `lan_web_uis` can list neighbouring dashboards without anything accumulating.
|
|
3
|
+
*/
|
|
4
|
+
import { FIRST_CONTACT_INTERVAL_MS } from "./first-contact.js";
|
|
5
|
+
/** Missed beacon intervals tolerated before an entry expires: the same conventional missed-heartbeat threshold the gossip presence check uses (gossip-extensions.ts's PRESENCE_STALE_MISSED_TICKS), for the same reason -- one dropped and one slow beacon is absorbed, a genuinely departed bridge leaves the list. */
|
|
6
|
+
const BEACON_STALE_MISSED_TICKS = 3;
|
|
7
|
+
const STALE_AFTER_MS = FIRST_CONTACT_INTERVAL_MS * BEACON_STALE_MISSED_TICKS;
|
|
8
|
+
/** The table of LAN web UIs heard on this machine's first-contact presence. An entry is refreshed by every beacon its bridge sends, and a bridge that stops beaconing drops out of `list()` once its entry is stale. */
|
|
9
|
+
export class LanWebUis {
|
|
10
|
+
now;
|
|
11
|
+
entries = new Map();
|
|
12
|
+
constructor(now = Date.now) {
|
|
13
|
+
this.now = now;
|
|
14
|
+
}
|
|
15
|
+
/** Records (or refreshes) the UI a beacon announced, keyed by peer id so a bridge that restarts on a new port replaces its own entry rather than accumulating one per restart. */
|
|
16
|
+
record(peerId, host, webPort) {
|
|
17
|
+
const entry = {
|
|
18
|
+
peerId,
|
|
19
|
+
host,
|
|
20
|
+
webPort,
|
|
21
|
+
heardAtMs: this.now(),
|
|
22
|
+
};
|
|
23
|
+
this.entries.set(peerId, entry);
|
|
24
|
+
return entry;
|
|
25
|
+
}
|
|
26
|
+
/** record for a beacon as first contact hands it up, host already taken from the datagram's source address. */
|
|
27
|
+
recordBeacon(beacon) {
|
|
28
|
+
return this.record(beacon.peerId, beacon.host, beacon.webPort);
|
|
29
|
+
}
|
|
30
|
+
/** Every unexpired entry, ordered by peer id so the listing is stable between calls. */
|
|
31
|
+
list() {
|
|
32
|
+
const cutoff = this.now() - STALE_AFTER_MS;
|
|
33
|
+
for (const [peerId, entry] of this.entries) {
|
|
34
|
+
if (entry.heardAtMs < cutoff)
|
|
35
|
+
this.entries.delete(peerId);
|
|
36
|
+
}
|
|
37
|
+
return [...this.entries.values()].sort((a, b) => a.peerId < b.peerId ? -1 : a.peerId > b.peerId ? 1 : 0);
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
//# sourceMappingURL=lan-web-uis.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"lan-web-uis.js","sourceRoot":"","sources":["../../src/core/lan-web-uis.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,yBAAyB,EAAE,MAAM,oBAAoB,CAAC;AAE/D,wTAAwT;AACxT,MAAM,yBAAyB,GAAG,CAAC,CAAC;AAEpC,MAAM,cAAc,GAAG,yBAAyB,GAAG,yBAAyB,CAAC;AAU7E,wNAAwN;AACxN,MAAM,OAAO,SAAS;IAGS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@@ import { type CoordinatorClaimView } from "./coordinator-role.js";
|
|
|
21
21
|
import type { RoomVerbHandler } from "./room-router.js";
|
|
22
22
|
import { type AgentSelfAdvert, type HostedRoomAdvert } from "./gossip-extensions.js";
|
|
23
23
|
import { AccountJoin } from "./account-join.js";
|
|
24
|
+
import { LanWebUis } from "./lan-web-uis.js";
|
|
25
|
+
import { AgentDetailsExchange } from "./agent-details.js";
|
|
24
26
|
import type { MeshStatePatch, SerialisedState } from "./wire-protocol.js";
|
|
25
27
|
import type { ListenerInfo, MeshGraph, MeshTraceResult, MeshTransport, TransportEvents } from "./transport.js";
|
|
26
28
|
import type { CommsStore, SendRoomMessageOptions, SentDm, SentRoomMessage } from "./comms-store.js";
|
|
@@ -59,6 +61,8 @@ export declare class MeshStore implements CommsStore {
|
|
|
59
61
|
readonly naming: Naming;
|
|
60
62
|
/** The connection-code generate/redeem pair (agent-comms#188) bootstrapping gatewayTrust above between two devices with no existing mesh connection. Persists across restarts per slot, from the slot passed to this store's own constructor, whereas gatewayTrust is shared by every slot in the slot's identity directory. generateConnectionCode/redeemConnectionCode below are the methods CommsTool actually calls through MeshOnlyFeatures; redeemConnectionCode is also where a successful redemption's deviceId gets fed into gatewayTrust.add, the actual point of this whole bootstrap. */
|
|
61
63
|
private readonly connectionCodes;
|
|
64
|
+
/** The LAN web UIs this machine's first-contact presence has heard web beacons for (agent-comms#353), listed by the lan_web_uis action. */
|
|
65
|
+
readonly lanWebUis: LanWebUis;
|
|
62
66
|
/** Issues and answers account invites, and joins this machine to an account (agent-comms#344). Public so `agent-comms account invite` and `agent-comms account join` (account-cli.ts) reach it; deliberately not on CommsTool's surface (see account-join.ts). */
|
|
63
67
|
readonly account: AccountJoin;
|
|
64
68
|
private readonly deliveryEngine;
|
|
@@ -126,17 +130,17 @@ export declare class MeshStore implements CommsStore {
|
|
|
126
130
|
/** The account's replicated grant ledger (agent-comms#344) once an identity is attached, for the transport to replicate. */
|
|
127
131
|
get accountLedger(): AccountLedgerReplica | undefined;
|
|
128
132
|
/** Every device this side trusts only because a trusted principal or machine vouches for it, with that issuer. */
|
|
129
|
-
listVerifiedMembers()
|
|
133
|
+
readonly listVerifiedMembers: () => VerifiedMember[];
|
|
130
134
|
/** The machine (hex) of each device this side can place on one, keyed by device id (agent-comms#343): this device's own, and every gossiped device carrying a valid machine proof. Empty before this store's identity is attached. */
|
|
131
|
-
listAgentMachines()
|
|
135
|
+
readonly listAgentMachines: () => Promise<Map<string, string>>;
|
|
132
136
|
/** The set identity, or throws if setIdentity() hasn't been called yet -- the single place every identity-using method reads through, mirroring requireTransport() above. */
|
|
133
137
|
private requireIdentity;
|
|
134
138
|
init(): Promise<void>;
|
|
135
139
|
/** Returns the TransportEvents object that bridges should pass to the transport constructor. */
|
|
136
140
|
get events(): TransportEvents;
|
|
137
|
-
/**
|
|
138
|
-
|
|
139
|
-
|
|
141
|
+
/** Both halves of the agent-comms/agent-details exchange (agent-comms#323): the verb a trusted peer's request is answered by, and the background fetch filling this side's cache from peers this machine trusts. */
|
|
142
|
+
readonly agentDetailsExchange: AgentDetailsExchange;
|
|
143
|
+
/** Room verb handlers this store registers with its own WireMeshTransport, keyed by params.verb per room-router.ts's own dispatch discipline. */
|
|
140
144
|
get roomVerbHandlers(): Partial<Record<string, RoomVerbHandler>>;
|
|
141
145
|
readIdentity(harness: string, cwd: string): Promise<{
|
|
142
146
|
id: string;
|
|
@@ -247,31 +251,31 @@ export declare class MeshStore implements CommsStore {
|
|
|
247
251
|
/** Withdraws trust from a remote device-id (hex). A no-op if it was never trusted. */
|
|
248
252
|
removeTrustedGateway(deviceHex: string): void;
|
|
249
253
|
/** Every currently trusted remote device-id (hex). */
|
|
250
|
-
listTrustedGateways()
|
|
254
|
+
readonly listTrustedGateways: () => string[];
|
|
251
255
|
/** Trusts a remote user-principal device-id (hex, agent-comms#187): a peer presenting a token whose delegation chain roots at this principal is trusted via GatewayTrust.isTrustedFor, without its own bare device-id ever needing individual trust. Entirely independent of the bare-device allowlist addTrustedGateway manages. */
|
|
252
256
|
addTrustedGatewayPrincipal(deviceHex: string): void;
|
|
253
257
|
/** Withdraws trust from a remote user-principal device-id (hex). A no-op if it was never trusted. */
|
|
254
258
|
removeTrustedGatewayPrincipal(deviceHex: string): void;
|
|
255
259
|
/** Every currently trusted remote user-principal device-id (hex). */
|
|
256
|
-
listTrustedGatewayPrincipals()
|
|
260
|
+
readonly listTrustedGatewayPrincipals: () => string[];
|
|
257
261
|
/** Trusts a remote machine device-id (hex, agent-comms#343): every device whose gossiped proof that machine vouches for becomes reachable without being trusted individually. */
|
|
258
262
|
addTrustedGatewayMachine(deviceHex: string): void;
|
|
259
263
|
/** Withdraws trust from a remote machine device-id (hex), and with it every device reachable only through that machine: revoking every bridge that machine key vouches for in one act. A no-op if it was never trusted. */
|
|
260
264
|
removeTrustedGatewayMachine(deviceHex: string): void;
|
|
261
265
|
/** Every currently trusted remote machine device-id (hex). */
|
|
262
|
-
listTrustedGatewayMachines()
|
|
266
|
+
readonly listTrustedGatewayMachines: () => string[];
|
|
263
267
|
/** Generates a fresh single-use ConnectionCode vouching for this store's own device-id (peerId), for the operator to relay to a counterpart out of band. See ConnectionCodeLedger.generate's own doc comment for what options does. */
|
|
264
268
|
generateConnectionCode(options?: Readonly<GenerateConnectionCodeOptions>): Promise<ConnectionCode>;
|
|
265
269
|
/** Validates a candidate ConnectionCode (see ConnectionCodeLedger.redeem for the checks performed) and, only once it passes every check, trusts the device-id it vouches for via gatewayTrust.add -- the actual point of this whole bootstrap. A rejected candidate never reaches gatewayTrust at all. */
|
|
266
270
|
redeemConnectionCode(candidate: Readonly<ConnectionCode>, options?: Readonly<RedeemConnectionCodeOptions>): Promise<RedeemConnectionCodeResult>;
|
|
267
271
|
addListener(host: string, port: number, policy: string): Promise<string>;
|
|
268
272
|
removeListener(id: string): Promise<void>;
|
|
269
|
-
listListeners()
|
|
273
|
+
readonly listListeners: () => ListenerInfo[];
|
|
270
274
|
/** Delegates to the transport's own meshGraph, throwing if the current transport doesn't support it (agent-comms#199) -- CommsTool's own notMeshBacked distinguishes "no MeshStore at all" from this narrower "MeshStore, but a transport without this capability" case by catching the throw, the same way requireTransport's own "no transport set" throw is already handled. */
|
|
271
275
|
meshGraph(): MeshGraph;
|
|
272
276
|
/** Delegates to the transport's own meshTrace, same "throw if unsupported" contract as meshGraph above. */
|
|
273
277
|
meshTrace(target: string, timeoutMs?: number): Promise<MeshTraceResult>;
|
|
274
|
-
getNetworkInterfaces()
|
|
278
|
+
readonly getNetworkInterfaces: () => NetworkInterface[];
|
|
275
279
|
private readonly peerVersions;
|
|
276
280
|
/** deviceId's own gossiped agent-comms package version, if this side has heard it advertised. */
|
|
277
281
|
readonly getPeerAgentCommsVersion: (deviceId: string) => string | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mesh-store.d.ts","sourceRoot":"","sources":["../../src/core/mesh-store.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAGH,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAMrC,OAAO,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAGlD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAChE,OAAO,EAAE,YAAY,EAAE,KAAK,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAEvE,OAAO,EAEL,KAAK,6BAA6B,EAClC,KAAK,2BAA2B,EAChC,KAAK,0BAA0B,EAChC,MAAM,sBAAsB,CAAC;AAC9B,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAQhE,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,oCAAoC,CAAC;AAChF,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,mCAAmC,CAAC;AAClE,OAAO,EAEL,KAAK,oBAAoB,EAC1B,MAAM,qBAAqB,CAAC;AAG7B,OAAO,EAEL,KAAK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