@camstack/system 1.2.432 → 1.2.434
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{tls-CpcGkeJV.mjs → agent-https-B8lKYVtU.mjs} +123 -617
- package/dist/{tls-C5IYg3V5.js → agent-https-BZIwS4xF.js} +157 -765
- package/dist/auth/device-ca.d.ts +0 -10
- package/dist/builtins/addon-pages-aggregator/addon-pages-aggregator.addon.js +1 -1
- package/dist/builtins/addon-pages-aggregator/addon-pages-aggregator.addon.mjs +1 -1
- package/dist/builtins/addon-widgets-aggregator/addon-widgets-aggregator.addon.js +1 -1
- package/dist/builtins/addon-widgets-aggregator/addon-widgets-aggregator.addon.mjs +1 -1
- package/dist/builtins/alerts/alerts.addon.js +1 -1
- package/dist/builtins/alerts/alerts.addon.mjs +1 -1
- package/dist/builtins/autotrack/index.js +1 -1
- package/dist/builtins/autotrack/index.mjs +1 -1
- package/dist/builtins/backup-orchestrator/backup-orchestrator.addon.js +2 -2
- package/dist/builtins/backup-orchestrator/backup-orchestrator.addon.mjs +2 -2
- package/dist/builtins/calendars/calendars.addon.js +1 -1
- package/dist/builtins/calendars/calendars.addon.mjs +1 -1
- package/dist/builtins/camera-grid/index.js +1 -1
- package/dist/builtins/camera-grid/index.mjs +1 -1
- package/dist/builtins/composer/composer.addon.js +2 -2
- package/dist/builtins/composer/composer.addon.mjs +2 -2
- package/dist/builtins/console-logging/index.js +1 -1
- package/dist/builtins/console-logging/index.mjs +1 -1
- package/dist/builtins/core-blocks/core-blocks.addon.js +2 -2
- package/dist/builtins/core-blocks/core-blocks.addon.mjs +2 -2
- package/dist/builtins/device-manager/device-manager.addon.js +2 -2
- package/dist/builtins/device-manager/device-manager.addon.mjs +2 -2
- package/dist/builtins/hub-forwarder/index.js +1 -1
- package/dist/builtins/hub-forwarder/index.mjs +1 -1
- package/dist/builtins/keychain/index.js +3 -3
- package/dist/builtins/keychain/index.mjs +3 -3
- package/dist/builtins/liveness-monitor/liveness-monitor.addon.js +1 -1
- package/dist/builtins/liveness-monitor/liveness-monitor.addon.mjs +1 -1
- package/dist/builtins/local-auth/local-auth.addon.js +9 -4
- package/dist/builtins/local-auth/local-auth.addon.mjs +9 -4
- package/dist/builtins/local-network/address-book.d.ts +13 -0
- package/dist/builtins/local-network/agent-mdns.d.ts +51 -0
- package/dist/builtins/local-network/local-network.addon.js +74 -53
- package/dist/builtins/local-network/local-network.addon.mjs +56 -36
- package/dist/builtins/loki-logging/index.js +1 -1
- package/dist/builtins/loki-logging/index.mjs +1 -1
- package/dist/builtins/native-metrics/native-metrics.addon.js +1 -1
- package/dist/builtins/native-metrics/native-metrics.addon.mjs +1 -1
- package/dist/builtins/platform-probe/index.js +1 -1
- package/dist/builtins/platform-probe/index.mjs +1 -1
- package/dist/builtins/remote-access-orchestrator/remote-access-orchestrator.addon.js +1 -1
- package/dist/builtins/remote-access-orchestrator/remote-access-orchestrator.addon.mjs +1 -1
- package/dist/builtins/snapshot/index.js +1 -1
- package/dist/builtins/snapshot/index.mjs +1 -1
- package/dist/builtins/sqlite-storage/filesystem-storage.addon.js +1 -1
- package/dist/builtins/sqlite-storage/filesystem-storage.addon.mjs +1 -1
- package/dist/builtins/sqlite-storage/index.js +1 -1
- package/dist/builtins/sqlite-storage/index.mjs +1 -1
- package/dist/builtins/sqlite-storage/sqlite-settings.addon.js +3 -3
- package/dist/builtins/sqlite-storage/sqlite-settings.addon.mjs +3 -3
- package/dist/builtins/storage-orchestrator/storage-orchestrator.addon.js +1 -1
- package/dist/builtins/storage-orchestrator/storage-orchestrator.addon.mjs +1 -1
- package/dist/builtins/system-config/system-config.addon.js +1388 -31
- package/dist/builtins/system-config/system-config.addon.mjs +1362 -28
- package/dist/builtins/winston-logging/index.js +1 -1
- package/dist/builtins/winston-logging/index.mjs +1 -1
- package/dist/{composition-sources-CFlUdpO7.js → composition-sources-B7R1oQnY.js} +1 -1
- package/dist/{composition-sources-DpbL38z3.mjs → composition-sources-CqrDyHM1.mjs} +1 -1
- package/dist/{constants-B89vjrSm.mjs → constants-CrMPWOug.mjs} +2 -2
- package/dist/{constants-DfP8V3eX.js → constants-CuOfMdYe.js} +2 -2
- package/dist/{device-ca-4IY98a_-.mjs → device-ca-CDjGQQPd.mjs} +17 -6
- package/dist/{device-ca-BCyAPmIj.js → device-ca-D21ZP00q.js} +17 -6
- package/dist/{dist-BCKOeWu_.js → dist-CCH3XPqO.js} +86 -6
- package/dist/{dist-Bt8GTRHB.mjs → dist-CYcBqnXk.mjs} +69 -7
- package/dist/file-host-worker.js +1 -1
- package/dist/file-host-worker.mjs +1 -1
- package/dist/hub-mdns-ciao-CBLvq2oj.js +821 -0
- package/dist/hub-mdns-ciao-DJRwtlA8.mjs +648 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.js +176 -67
- package/dist/index.mjs +96 -13
- package/dist/kernel/index.d.ts +5 -4
- package/dist/kernel/moleculer/agent-mesh-authenticator.d.ts +12 -1
- package/dist/kernel/moleculer/agent-ui-unlock.d.ts +40 -0
- package/dist/kernel/moleculer/mesh-authenticator.d.ts +6 -0
- package/dist/kernel/moleculer/mesh-mtls/constants.d.ts +1 -1
- package/dist/kernel/moleculer/mesh-mtls/index.d.ts +3 -2
- package/dist/kernel/moleculer/mesh-mtls/mesh-ca.d.ts +4 -9
- package/dist/kernel/moleculer/mesh-mtls/mesh-certificate-registry.d.ts +2 -2
- package/dist/kernel/moleculer/mesh-mtls/mesh-join-token.d.ts +3 -2
- package/dist/kernel/moleculer/mesh-mtls/mesh-peer-transport.d.ts +7 -0
- package/dist/kernel/moleculer/mesh-mtls/pairing/agent-pairing.d.ts +204 -0
- package/dist/kernel/moleculer/mesh-mtls/pairing/hub-pairing.d.ts +115 -0
- package/dist/kernel/moleculer/mesh-mtls/pairing/index.d.ts +3 -0
- package/dist/kernel/moleculer/mesh-mtls/pairing/pairing-protocol.d.ts +107 -0
- package/dist/kernel/moleculer/mesh-mtls/tls-tcp-transporter.d.ts +18 -0
- package/dist/{lib-B_R6sPC3.mjs → lib-BeGzVQcd.mjs} +1 -1
- package/dist/{lib-DOJ5yyWA.js → lib-NNxHSOIE.js} +1 -1
- package/dist/{restore-archive-Bh34W8J8.mjs → restore-archive-5ml7uYMf.mjs} +1 -1
- package/dist/{restore-archive-DhHH7VQp.js → restore-archive-Do0QwAik.js} +1 -1
- package/dist/{retired-settings-keys-u3Wwkdrq.js → retired-settings-keys-CEiCaI_j.js} +1 -1
- package/dist/{retired-settings-keys-CmcEitC2.mjs → retired-settings-keys-CyDdyjLP.mjs} +1 -1
- package/dist/tls/agent-https-names.d.ts +2 -0
- package/dist/tls/cert-backdate.d.ts +10 -0
- package/dist/tls/cert-issue.d.ts +0 -20
- package/dist/{wal-maintenance-uQGuStFW.mjs → wal-maintenance-DgLLPK14.mjs} +0 -0
- package/dist/{wal-maintenance-ChzCPUi2.js → wal-maintenance-LZYd8iT-.js} +0 -0
- package/dist/{x509.es-CAjSsrkk.mjs → x509.es-CDvj67p1.mjs} +14 -1
- package/dist/{x509.es-Dzl0BbmG.js → x509.es-r7Ht1thA.js} +19 -0
- package/package.json +1 -1
- package/dist/agent-https-names-CpUSuP4w.js +0 -120
- package/dist/agent-https-names-uetr4OQl.mjs +0 -91
|
@@ -1,120 +0,0 @@
|
|
|
1
|
-
//#region src/tls/agent-https-names.ts
|
|
2
|
-
/**
|
|
3
|
-
* @durable class=config owner=system-config
|
|
4
|
-
* write="the hub records the names it signed into an agent's HTTPS leaf, replacing that
|
|
5
|
-
* node's previous row"
|
|
6
|
-
* retention="one row per node, replaced on every issue; a forgotten node's row stays until
|
|
7
|
-
* the node is issued again or an operator clears it (it only blocks reuse of its names)"
|
|
8
|
-
*/
|
|
9
|
-
var AGENT_HTTPS_NAMES_COLLECTION = "agent_https_names";
|
|
10
|
-
var AGENT_HTTPS_NAMES_COLUMNS = [
|
|
11
|
-
{
|
|
12
|
-
name: "id",
|
|
13
|
-
type: "TEXT",
|
|
14
|
-
primaryKey: true,
|
|
15
|
-
notNull: true
|
|
16
|
-
},
|
|
17
|
-
{
|
|
18
|
-
name: "names",
|
|
19
|
-
type: "JSON",
|
|
20
|
-
notNull: true
|
|
21
|
-
},
|
|
22
|
-
{
|
|
23
|
-
name: "issuedAt",
|
|
24
|
-
type: "INTEGER",
|
|
25
|
-
notNull: true
|
|
26
|
-
}
|
|
27
|
-
];
|
|
28
|
-
var AgentHttpsNames = class {
|
|
29
|
-
store;
|
|
30
|
-
byNode = /* @__PURE__ */ new Map();
|
|
31
|
-
constructor(store) {
|
|
32
|
-
this.store = store;
|
|
33
|
-
}
|
|
34
|
-
async load() {
|
|
35
|
-
const rows = await this.store.query.query({ collection: AGENT_HTTPS_NAMES_COLLECTION });
|
|
36
|
-
for (const row of rows) {
|
|
37
|
-
const names = row.data["names"];
|
|
38
|
-
if (Array.isArray(names)) this.byNode.set(row.id, names.filter((n) => typeof n === "string").map((n) => n.toLowerCase()));
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
/** Every name certified to a node other than `nodeId`. */
|
|
42
|
-
takenByOthers(nodeId) {
|
|
43
|
-
const out = /* @__PURE__ */ new Set();
|
|
44
|
-
for (const [id, names] of this.byNode) {
|
|
45
|
-
if (id === nodeId) continue;
|
|
46
|
-
for (const n of names) out.add(n);
|
|
47
|
-
}
|
|
48
|
-
return out;
|
|
49
|
-
}
|
|
50
|
-
/** Free every name certified to a node that was forgotten. */
|
|
51
|
-
async release(nodeId) {
|
|
52
|
-
if (!this.byNode.delete(nodeId)) return false;
|
|
53
|
-
await this.store.delete.mutate({
|
|
54
|
-
collection: AGENT_HTTPS_NAMES_COLLECTION,
|
|
55
|
-
key: nodeId
|
|
56
|
-
});
|
|
57
|
-
return true;
|
|
58
|
-
}
|
|
59
|
-
async record(nodeId, names) {
|
|
60
|
-
const lowered = names.map((n) => n.toLowerCase());
|
|
61
|
-
const existed = this.byNode.has(nodeId);
|
|
62
|
-
this.byNode.set(nodeId, lowered);
|
|
63
|
-
const data = {
|
|
64
|
-
names: lowered,
|
|
65
|
-
issuedAt: Date.now()
|
|
66
|
-
};
|
|
67
|
-
if (existed) await this.store.update.mutate({
|
|
68
|
-
collection: AGENT_HTTPS_NAMES_COLLECTION,
|
|
69
|
-
id: nodeId,
|
|
70
|
-
data
|
|
71
|
-
});
|
|
72
|
-
else await this.store.insert.mutate({
|
|
73
|
-
collection: AGENT_HTTPS_NAMES_COLLECTION,
|
|
74
|
-
record: {
|
|
75
|
-
id: nodeId,
|
|
76
|
-
data
|
|
77
|
-
}
|
|
78
|
-
});
|
|
79
|
-
}
|
|
80
|
-
};
|
|
81
|
-
var SLOT = Symbol.for("camstack.agent-https.names");
|
|
82
|
-
function setProcessAgentHttpsNames(names) {
|
|
83
|
-
if (names === null) Reflect.deleteProperty(globalThis, SLOT);
|
|
84
|
-
else Reflect.set(globalThis, SLOT, names);
|
|
85
|
-
}
|
|
86
|
-
function getProcessAgentHttpsNames() {
|
|
87
|
-
const value = Reflect.get(globalThis, SLOT);
|
|
88
|
-
return value !== null && typeof value === "object" && typeof Reflect.get(value, "takenByOthers") === "function" ? value : null;
|
|
89
|
-
}
|
|
90
|
-
//#endregion
|
|
91
|
-
Object.defineProperty(exports, "AGENT_HTTPS_NAMES_COLLECTION", {
|
|
92
|
-
enumerable: true,
|
|
93
|
-
get: function() {
|
|
94
|
-
return AGENT_HTTPS_NAMES_COLLECTION;
|
|
95
|
-
}
|
|
96
|
-
});
|
|
97
|
-
Object.defineProperty(exports, "AGENT_HTTPS_NAMES_COLUMNS", {
|
|
98
|
-
enumerable: true,
|
|
99
|
-
get: function() {
|
|
100
|
-
return AGENT_HTTPS_NAMES_COLUMNS;
|
|
101
|
-
}
|
|
102
|
-
});
|
|
103
|
-
Object.defineProperty(exports, "AgentHttpsNames", {
|
|
104
|
-
enumerable: true,
|
|
105
|
-
get: function() {
|
|
106
|
-
return AgentHttpsNames;
|
|
107
|
-
}
|
|
108
|
-
});
|
|
109
|
-
Object.defineProperty(exports, "getProcessAgentHttpsNames", {
|
|
110
|
-
enumerable: true,
|
|
111
|
-
get: function() {
|
|
112
|
-
return getProcessAgentHttpsNames;
|
|
113
|
-
}
|
|
114
|
-
});
|
|
115
|
-
Object.defineProperty(exports, "setProcessAgentHttpsNames", {
|
|
116
|
-
enumerable: true,
|
|
117
|
-
get: function() {
|
|
118
|
-
return setProcessAgentHttpsNames;
|
|
119
|
-
}
|
|
120
|
-
});
|
|
@@ -1,91 +0,0 @@
|
|
|
1
|
-
//#region src/tls/agent-https-names.ts
|
|
2
|
-
/**
|
|
3
|
-
* @durable class=config owner=system-config
|
|
4
|
-
* write="the hub records the names it signed into an agent's HTTPS leaf, replacing that
|
|
5
|
-
* node's previous row"
|
|
6
|
-
* retention="one row per node, replaced on every issue; a forgotten node's row stays until
|
|
7
|
-
* the node is issued again or an operator clears it (it only blocks reuse of its names)"
|
|
8
|
-
*/
|
|
9
|
-
var AGENT_HTTPS_NAMES_COLLECTION = "agent_https_names";
|
|
10
|
-
var AGENT_HTTPS_NAMES_COLUMNS = [
|
|
11
|
-
{
|
|
12
|
-
name: "id",
|
|
13
|
-
type: "TEXT",
|
|
14
|
-
primaryKey: true,
|
|
15
|
-
notNull: true
|
|
16
|
-
},
|
|
17
|
-
{
|
|
18
|
-
name: "names",
|
|
19
|
-
type: "JSON",
|
|
20
|
-
notNull: true
|
|
21
|
-
},
|
|
22
|
-
{
|
|
23
|
-
name: "issuedAt",
|
|
24
|
-
type: "INTEGER",
|
|
25
|
-
notNull: true
|
|
26
|
-
}
|
|
27
|
-
];
|
|
28
|
-
var AgentHttpsNames = class {
|
|
29
|
-
store;
|
|
30
|
-
byNode = /* @__PURE__ */ new Map();
|
|
31
|
-
constructor(store) {
|
|
32
|
-
this.store = store;
|
|
33
|
-
}
|
|
34
|
-
async load() {
|
|
35
|
-
const rows = await this.store.query.query({ collection: AGENT_HTTPS_NAMES_COLLECTION });
|
|
36
|
-
for (const row of rows) {
|
|
37
|
-
const names = row.data["names"];
|
|
38
|
-
if (Array.isArray(names)) this.byNode.set(row.id, names.filter((n) => typeof n === "string").map((n) => n.toLowerCase()));
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
/** Every name certified to a node other than `nodeId`. */
|
|
42
|
-
takenByOthers(nodeId) {
|
|
43
|
-
const out = /* @__PURE__ */ new Set();
|
|
44
|
-
for (const [id, names] of this.byNode) {
|
|
45
|
-
if (id === nodeId) continue;
|
|
46
|
-
for (const n of names) out.add(n);
|
|
47
|
-
}
|
|
48
|
-
return out;
|
|
49
|
-
}
|
|
50
|
-
/** Free every name certified to a node that was forgotten. */
|
|
51
|
-
async release(nodeId) {
|
|
52
|
-
if (!this.byNode.delete(nodeId)) return false;
|
|
53
|
-
await this.store.delete.mutate({
|
|
54
|
-
collection: AGENT_HTTPS_NAMES_COLLECTION,
|
|
55
|
-
key: nodeId
|
|
56
|
-
});
|
|
57
|
-
return true;
|
|
58
|
-
}
|
|
59
|
-
async record(nodeId, names) {
|
|
60
|
-
const lowered = names.map((n) => n.toLowerCase());
|
|
61
|
-
const existed = this.byNode.has(nodeId);
|
|
62
|
-
this.byNode.set(nodeId, lowered);
|
|
63
|
-
const data = {
|
|
64
|
-
names: lowered,
|
|
65
|
-
issuedAt: Date.now()
|
|
66
|
-
};
|
|
67
|
-
if (existed) await this.store.update.mutate({
|
|
68
|
-
collection: AGENT_HTTPS_NAMES_COLLECTION,
|
|
69
|
-
id: nodeId,
|
|
70
|
-
data
|
|
71
|
-
});
|
|
72
|
-
else await this.store.insert.mutate({
|
|
73
|
-
collection: AGENT_HTTPS_NAMES_COLLECTION,
|
|
74
|
-
record: {
|
|
75
|
-
id: nodeId,
|
|
76
|
-
data
|
|
77
|
-
}
|
|
78
|
-
});
|
|
79
|
-
}
|
|
80
|
-
};
|
|
81
|
-
var SLOT = Symbol.for("camstack.agent-https.names");
|
|
82
|
-
function setProcessAgentHttpsNames(names) {
|
|
83
|
-
if (names === null) Reflect.deleteProperty(globalThis, SLOT);
|
|
84
|
-
else Reflect.set(globalThis, SLOT, names);
|
|
85
|
-
}
|
|
86
|
-
function getProcessAgentHttpsNames() {
|
|
87
|
-
const value = Reflect.get(globalThis, SLOT);
|
|
88
|
-
return value !== null && typeof value === "object" && typeof Reflect.get(value, "takenByOthers") === "function" ? value : null;
|
|
89
|
-
}
|
|
90
|
-
//#endregion
|
|
91
|
-
export { setProcessAgentHttpsNames as a, getProcessAgentHttpsNames as i, AGENT_HTTPS_NAMES_COLUMNS as n, AgentHttpsNames as r, AGENT_HTTPS_NAMES_COLLECTION as t };
|