@camstack/addon-ai 0.4.14 → 0.4.16
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/addon.js +76 -6
- package/dist/addon.mjs +76 -6
- package/package.json +1 -1
package/dist/addon.js
CHANGED
|
@@ -15,7 +15,7 @@ let node_zlib = require("node:zlib");
|
|
|
15
15
|
let node_fs_promises = require("node:fs/promises");
|
|
16
16
|
node_fs_promises = require_chunk.__toESM(node_fs_promises);
|
|
17
17
|
let node_child_process = require("node:child_process");
|
|
18
|
-
//#region ../types/dist/event-category-
|
|
18
|
+
//#region ../types/dist/event-category-CIa_iT6b.mjs
|
|
19
19
|
var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
20
20
|
EventCategory["SystemBoot"] = "system.boot";
|
|
21
21
|
EventCategory["SystemAddonsReady"] = "system.addons-ready";
|
|
@@ -31,6 +31,15 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
|
31
31
|
*/
|
|
32
32
|
EventCategory["SystemRestartCompleted"] = "system.restart-completed";
|
|
33
33
|
/**
|
|
34
|
+
* The hub reissued its own TLS certificate at boot (`ensureTlsCert`).
|
|
35
|
+
* Emitted only when the material on disk actually changed, so an
|
|
36
|
+
* operator who trusted the old certificate by hand is told rather than
|
|
37
|
+
* discovering it as a browser error. Payload `TlsCertChangedPayload`.
|
|
38
|
+
*
|
|
39
|
+
* Rule: docs/decisions/adr-0227-*.md
|
|
40
|
+
*/
|
|
41
|
+
EventCategory["SystemTlsCertChanged"] = "system.tls-cert-changed";
|
|
42
|
+
/**
|
|
34
43
|
* A newer addon or server-root package version was found by the
|
|
35
44
|
* authoritative registry check. Emitted once when any observed
|
|
36
45
|
* `latestVersion` changes (or a package/node first appears behind);
|
|
@@ -18926,6 +18935,12 @@ var CameraStatusSchema = object({
|
|
|
18926
18935
|
/** Unix timestamp (ms) when this snapshot was composed server-side. */
|
|
18927
18936
|
fetchedAt: number$1()
|
|
18928
18937
|
});
|
|
18938
|
+
var InferenceDeviceExclusionReasonSchema = _enum([
|
|
18939
|
+
"disabled",
|
|
18940
|
+
"unavailable",
|
|
18941
|
+
"cannot-host-camera-root",
|
|
18942
|
+
"accelerator-preferred"
|
|
18943
|
+
]);
|
|
18929
18944
|
var NodeInferenceDeviceSchema = object({
|
|
18930
18945
|
/** Stable per-node device key, e.g. `openvino:npu`, `edgetpu:usb`, `cpu`. */
|
|
18931
18946
|
key: string(),
|
|
@@ -18956,7 +18971,17 @@ var NodeInferenceDeviceSchema = object({
|
|
|
18956
18971
|
* available per format; this is the stored selection that becomes the
|
|
18957
18972
|
* default for EVERY camera landing on this accelerator.
|
|
18958
18973
|
*/
|
|
18959
|
-
steps: record(string(), DeviceStepConfigSchema).optional()
|
|
18974
|
+
steps: record(string(), DeviceStepConfigSchema).optional(),
|
|
18975
|
+
/**
|
|
18976
|
+
* `null` when the device IS a camera-root candidate on this node; otherwise
|
|
18977
|
+
* the reason the dispatcher drops it. Computed by the SAME
|
|
18978
|
+
* `resolveInferenceDeviceEligibility` the dispatcher runs, so this view can
|
|
18979
|
+
* never disagree with the election — deriving it in the UI from
|
|
18980
|
+
* `enabled`/`available` would silently miss `cannot-host-camera-root` (needs
|
|
18981
|
+
* the node's model catalog) and `accelerator-preferred` (needs the node-wide
|
|
18982
|
+
* "an accelerator is serving" predicate).
|
|
18983
|
+
*/
|
|
18984
|
+
exclusion: InferenceDeviceExclusionReasonSchema.nullable()
|
|
18960
18985
|
});
|
|
18961
18986
|
var NodeInferenceDevicesSchema = object({
|
|
18962
18987
|
nodeId: string(),
|
|
@@ -22714,7 +22739,12 @@ var ListResultSchema = object({
|
|
|
22714
22739
|
probedAt: number$1()
|
|
22715
22740
|
});
|
|
22716
22741
|
var PreferredSchema = LocalInterfaceSchema.nullable();
|
|
22717
|
-
|
|
22742
|
+
/**
|
|
22743
|
+
* Candidate base URL for the SDK to race on connect. Order matters —
|
|
22744
|
+
* the SDK should attempt these top-to-bottom with a short per-candidate
|
|
22745
|
+
* timeout (e.g. 1500ms) and cache the winner for the session.
|
|
22746
|
+
*/
|
|
22747
|
+
var ConnectionEndpointSchema = object({
|
|
22718
22748
|
/** Operator-facing label (e.g. "LAN — en0", "Public tunnel"). */
|
|
22719
22749
|
label: string(),
|
|
22720
22750
|
/** Fully-formed base URL with scheme + host + port. */
|
|
@@ -22757,7 +22787,42 @@ var GetConnectionEndpointsResultSchema = object({ endpoints: array(object({
|
|
|
22757
22787
|
* ordering between polls.
|
|
22758
22788
|
*/
|
|
22759
22789
|
priority: number$1()
|
|
22760
|
-
})
|
|
22790
|
+
});
|
|
22791
|
+
/**
|
|
22792
|
+
* Where the advertised local port came from. Ordered most → least
|
|
22793
|
+
* authoritative, and the whole point of returning it: a client must be able to
|
|
22794
|
+
* tell a FACT about the hub's socket from an echo of its own guess.
|
|
22795
|
+
*/
|
|
22796
|
+
var LocalPortSourceEnum = _enum([
|
|
22797
|
+
"server-config",
|
|
22798
|
+
"server-env",
|
|
22799
|
+
"caller-hint",
|
|
22800
|
+
"default"
|
|
22801
|
+
]);
|
|
22802
|
+
/** The port every LAN/loopback `baseUrl` in the same result was built with. */
|
|
22803
|
+
var AdvertisedLocalPortSchema = object({
|
|
22804
|
+
port: number$1().int().min(1).max(65535),
|
|
22805
|
+
source: LocalPortSourceEnum
|
|
22806
|
+
});
|
|
22807
|
+
var GetConnectionEndpointsResultSchema = object({
|
|
22808
|
+
endpoints: array(ConnectionEndpointSchema).readonly(),
|
|
22809
|
+
/**
|
|
22810
|
+
* The port the hub built the LAN/loopback URLs with, and where that number
|
|
22811
|
+
* came from.
|
|
22812
|
+
*
|
|
22813
|
+
* Returned rather than merely applied, because "the URL is right" and "the
|
|
22814
|
+
* client can KNOW the URL is right" are different properties. A client that
|
|
22815
|
+
* only sees a corrected URL cannot distinguish a hub that fixed the port from
|
|
22816
|
+
* a hub that echoed the port the client sent, so it cannot decide whether to
|
|
22817
|
+
* race the candidate or discard it. With `source` it can: anything but
|
|
22818
|
+
* `caller-hint` is the hub's own socket.
|
|
22819
|
+
*
|
|
22820
|
+
* Absent on hubs predating this field — a client that finds it missing is
|
|
22821
|
+
* talking to an echoing hub and must degrade exactly as it does for
|
|
22822
|
+
* `caller-hint`.
|
|
22823
|
+
*/
|
|
22824
|
+
localPort: AdvertisedLocalPortSchema
|
|
22825
|
+
});
|
|
22761
22826
|
/**
|
|
22762
22827
|
* The chosen outbound endpoint for notification artifacts. `baseUrl: null` =
|
|
22763
22828
|
* AUTO (resolved from the candidate ranking at send time); `resolved` reports
|
|
@@ -22778,8 +22843,13 @@ var AllowedAddressesSchema = object({
|
|
|
22778
22843
|
*/
|
|
22779
22844
|
addresses: array(string()).readonly() });
|
|
22780
22845
|
method(_void(), ListResultSchema), method(_void(), PreferredSchema), method(object({
|
|
22781
|
-
/**
|
|
22782
|
-
|
|
22846
|
+
/**
|
|
22847
|
+
* LEGACY HINT — do not send from new code. Kept optional so clients
|
|
22848
|
+
* written against the echoing contract keep working; the hub uses it
|
|
22849
|
+
* only when it cannot read its own port, and says so via
|
|
22850
|
+
* `localPort.source === 'caller-hint'`.
|
|
22851
|
+
*/
|
|
22852
|
+
port: number$1().int().min(1).max(65535).optional(),
|
|
22783
22853
|
/** Include `http(s)://127.0.0.1:<port>` as the lowest-priority
|
|
22784
22854
|
* candidate. Default `true`. */
|
|
22785
22855
|
includeLoopback: boolean().optional(),
|
package/dist/addon.mjs
CHANGED
|
@@ -41,7 +41,7 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
41
41
|
}) : target, mod));
|
|
42
42
|
var __require = /* @__PURE__ */ createRequire(import.meta.url);
|
|
43
43
|
//#endregion
|
|
44
|
-
//#region ../types/dist/event-category-
|
|
44
|
+
//#region ../types/dist/event-category-CIa_iT6b.mjs
|
|
45
45
|
var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
46
46
|
EventCategory["SystemBoot"] = "system.boot";
|
|
47
47
|
EventCategory["SystemAddonsReady"] = "system.addons-ready";
|
|
@@ -57,6 +57,15 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
|
57
57
|
*/
|
|
58
58
|
EventCategory["SystemRestartCompleted"] = "system.restart-completed";
|
|
59
59
|
/**
|
|
60
|
+
* The hub reissued its own TLS certificate at boot (`ensureTlsCert`).
|
|
61
|
+
* Emitted only when the material on disk actually changed, so an
|
|
62
|
+
* operator who trusted the old certificate by hand is told rather than
|
|
63
|
+
* discovering it as a browser error. Payload `TlsCertChangedPayload`.
|
|
64
|
+
*
|
|
65
|
+
* Rule: docs/decisions/adr-0227-*.md
|
|
66
|
+
*/
|
|
67
|
+
EventCategory["SystemTlsCertChanged"] = "system.tls-cert-changed";
|
|
68
|
+
/**
|
|
60
69
|
* A newer addon or server-root package version was found by the
|
|
61
70
|
* authoritative registry check. Emitted once when any observed
|
|
62
71
|
* `latestVersion` changes (or a package/node first appears behind);
|
|
@@ -18952,6 +18961,12 @@ var CameraStatusSchema = object({
|
|
|
18952
18961
|
/** Unix timestamp (ms) when this snapshot was composed server-side. */
|
|
18953
18962
|
fetchedAt: number$1()
|
|
18954
18963
|
});
|
|
18964
|
+
var InferenceDeviceExclusionReasonSchema = _enum([
|
|
18965
|
+
"disabled",
|
|
18966
|
+
"unavailable",
|
|
18967
|
+
"cannot-host-camera-root",
|
|
18968
|
+
"accelerator-preferred"
|
|
18969
|
+
]);
|
|
18955
18970
|
var NodeInferenceDeviceSchema = object({
|
|
18956
18971
|
/** Stable per-node device key, e.g. `openvino:npu`, `edgetpu:usb`, `cpu`. */
|
|
18957
18972
|
key: string(),
|
|
@@ -18982,7 +18997,17 @@ var NodeInferenceDeviceSchema = object({
|
|
|
18982
18997
|
* available per format; this is the stored selection that becomes the
|
|
18983
18998
|
* default for EVERY camera landing on this accelerator.
|
|
18984
18999
|
*/
|
|
18985
|
-
steps: record(string(), DeviceStepConfigSchema).optional()
|
|
19000
|
+
steps: record(string(), DeviceStepConfigSchema).optional(),
|
|
19001
|
+
/**
|
|
19002
|
+
* `null` when the device IS a camera-root candidate on this node; otherwise
|
|
19003
|
+
* the reason the dispatcher drops it. Computed by the SAME
|
|
19004
|
+
* `resolveInferenceDeviceEligibility` the dispatcher runs, so this view can
|
|
19005
|
+
* never disagree with the election — deriving it in the UI from
|
|
19006
|
+
* `enabled`/`available` would silently miss `cannot-host-camera-root` (needs
|
|
19007
|
+
* the node's model catalog) and `accelerator-preferred` (needs the node-wide
|
|
19008
|
+
* "an accelerator is serving" predicate).
|
|
19009
|
+
*/
|
|
19010
|
+
exclusion: InferenceDeviceExclusionReasonSchema.nullable()
|
|
18986
19011
|
});
|
|
18987
19012
|
var NodeInferenceDevicesSchema = object({
|
|
18988
19013
|
nodeId: string(),
|
|
@@ -22740,7 +22765,12 @@ var ListResultSchema = object({
|
|
|
22740
22765
|
probedAt: number$1()
|
|
22741
22766
|
});
|
|
22742
22767
|
var PreferredSchema = LocalInterfaceSchema.nullable();
|
|
22743
|
-
|
|
22768
|
+
/**
|
|
22769
|
+
* Candidate base URL for the SDK to race on connect. Order matters —
|
|
22770
|
+
* the SDK should attempt these top-to-bottom with a short per-candidate
|
|
22771
|
+
* timeout (e.g. 1500ms) and cache the winner for the session.
|
|
22772
|
+
*/
|
|
22773
|
+
var ConnectionEndpointSchema = object({
|
|
22744
22774
|
/** Operator-facing label (e.g. "LAN — en0", "Public tunnel"). */
|
|
22745
22775
|
label: string(),
|
|
22746
22776
|
/** Fully-formed base URL with scheme + host + port. */
|
|
@@ -22783,7 +22813,42 @@ var GetConnectionEndpointsResultSchema = object({ endpoints: array(object({
|
|
|
22783
22813
|
* ordering between polls.
|
|
22784
22814
|
*/
|
|
22785
22815
|
priority: number$1()
|
|
22786
|
-
})
|
|
22816
|
+
});
|
|
22817
|
+
/**
|
|
22818
|
+
* Where the advertised local port came from. Ordered most → least
|
|
22819
|
+
* authoritative, and the whole point of returning it: a client must be able to
|
|
22820
|
+
* tell a FACT about the hub's socket from an echo of its own guess.
|
|
22821
|
+
*/
|
|
22822
|
+
var LocalPortSourceEnum = _enum([
|
|
22823
|
+
"server-config",
|
|
22824
|
+
"server-env",
|
|
22825
|
+
"caller-hint",
|
|
22826
|
+
"default"
|
|
22827
|
+
]);
|
|
22828
|
+
/** The port every LAN/loopback `baseUrl` in the same result was built with. */
|
|
22829
|
+
var AdvertisedLocalPortSchema = object({
|
|
22830
|
+
port: number$1().int().min(1).max(65535),
|
|
22831
|
+
source: LocalPortSourceEnum
|
|
22832
|
+
});
|
|
22833
|
+
var GetConnectionEndpointsResultSchema = object({
|
|
22834
|
+
endpoints: array(ConnectionEndpointSchema).readonly(),
|
|
22835
|
+
/**
|
|
22836
|
+
* The port the hub built the LAN/loopback URLs with, and where that number
|
|
22837
|
+
* came from.
|
|
22838
|
+
*
|
|
22839
|
+
* Returned rather than merely applied, because "the URL is right" and "the
|
|
22840
|
+
* client can KNOW the URL is right" are different properties. A client that
|
|
22841
|
+
* only sees a corrected URL cannot distinguish a hub that fixed the port from
|
|
22842
|
+
* a hub that echoed the port the client sent, so it cannot decide whether to
|
|
22843
|
+
* race the candidate or discard it. With `source` it can: anything but
|
|
22844
|
+
* `caller-hint` is the hub's own socket.
|
|
22845
|
+
*
|
|
22846
|
+
* Absent on hubs predating this field — a client that finds it missing is
|
|
22847
|
+
* talking to an echoing hub and must degrade exactly as it does for
|
|
22848
|
+
* `caller-hint`.
|
|
22849
|
+
*/
|
|
22850
|
+
localPort: AdvertisedLocalPortSchema
|
|
22851
|
+
});
|
|
22787
22852
|
/**
|
|
22788
22853
|
* The chosen outbound endpoint for notification artifacts. `baseUrl: null` =
|
|
22789
22854
|
* AUTO (resolved from the candidate ranking at send time); `resolved` reports
|
|
@@ -22804,8 +22869,13 @@ var AllowedAddressesSchema = object({
|
|
|
22804
22869
|
*/
|
|
22805
22870
|
addresses: array(string()).readonly() });
|
|
22806
22871
|
method(_void(), ListResultSchema), method(_void(), PreferredSchema), method(object({
|
|
22807
|
-
/**
|
|
22808
|
-
|
|
22872
|
+
/**
|
|
22873
|
+
* LEGACY HINT — do not send from new code. Kept optional so clients
|
|
22874
|
+
* written against the echoing contract keep working; the hub uses it
|
|
22875
|
+
* only when it cannot read its own port, and says so via
|
|
22876
|
+
* `localPort.source === 'caller-hint'`.
|
|
22877
|
+
*/
|
|
22878
|
+
port: number$1().int().min(1).max(65535).optional(),
|
|
22809
22879
|
/** Include `http(s)://127.0.0.1:<port>` as the lowest-priority
|
|
22810
22880
|
* candidate. Default `true`. */
|
|
22811
22881
|
includeLoopback: boolean().optional(),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@camstack/addon-ai",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.16",
|
|
4
4
|
"description": "AI addon for CamStack — the `llm` collection provider (cloud, LAN, and camstack-managed local llama.cpp profiles) plus the per-node `llm-runtime` managed executor.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"camstack",
|