@camstack/system 1.1.35 → 1.1.36
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-runner.js +87 -35
- package/dist/addon-runner.mjs +87 -35
- 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/backup-orchestrator/backup-orchestrator.addon.js +1 -1
- package/dist/builtins/backup-orchestrator/backup-orchestrator.addon.mjs +1 -1
- package/dist/builtins/console-logging/index.js +1 -1
- package/dist/builtins/console-logging/index.mjs +1 -1
- package/dist/builtins/device-manager/device-manager.addon.js +1 -1
- package/dist/builtins/device-manager/device-manager.addon.mjs +1 -1
- package/dist/builtins/hub-forwarder/index.js +1 -1
- package/dist/builtins/hub-forwarder/index.mjs +1 -1
- package/dist/builtins/local-auth/local-auth.addon.js +1 -1
- package/dist/builtins/local-auth/local-auth.addon.mjs +1 -1
- package/dist/builtins/local-network/local-network.addon.js +1 -1
- package/dist/builtins/local-network/local-network.addon.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/sqlite-settings.addon.js +1 -1
- package/dist/builtins/sqlite-storage/sqlite-settings.addon.mjs +1 -1
- 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 +1 -1
- package/dist/builtins/system-config/system-config.addon.mjs +1 -1
- package/dist/builtins/winston-logging/index.js +1 -1
- package/dist/builtins/winston-logging/index.mjs +1 -1
- package/dist/{dist-DlGZpWo8.mjs → dist-C7oOY4iL.mjs} +80 -118
- package/dist/{dist-DriXJoVg.js → dist-COIhbSao.js} +80 -118
- package/dist/index.js +2 -2
- package/dist/index.mjs +2 -2
- package/dist/kernel/moleculer/child-cap-descriptors.d.ts +34 -0
- package/dist/kernel/moleculer/child-cap-dispatch.d.ts +10 -2
- package/dist/kernel/transport/child-cap-protocol.d.ts +20 -0
- package/dist/{manifest-python-deps-MUu1e33G.mjs → manifest-python-deps-BYIV8-rc.mjs} +5 -3
- package/dist/{manifest-python-deps-jZA_Qorz.js → manifest-python-deps-CZFqI4wp.js} +5 -3
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
let zod = require("zod");
|
|
2
|
-
//#region ../types/dist/sleep-
|
|
2
|
+
//#region ../types/dist/sleep-DiQ8xW1M.mjs
|
|
3
3
|
var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
4
4
|
EventCategory["SystemBoot"] = "system.boot";
|
|
5
5
|
EventCategory["SystemAddonsReady"] = "system.addons-ready";
|
|
@@ -7707,7 +7707,7 @@ var BoundingBoxSchema = zod.z.object({
|
|
|
7707
7707
|
w: zod.z.number(),
|
|
7708
7708
|
h: zod.z.number()
|
|
7709
7709
|
});
|
|
7710
|
-
|
|
7710
|
+
zod.z.object({
|
|
7711
7711
|
class: zod.z.string(),
|
|
7712
7712
|
originalClass: zod.z.string(),
|
|
7713
7713
|
score: zod.z.number(),
|
|
@@ -7912,11 +7912,6 @@ var PipelineSchemaSchema = zod.z.object({
|
|
|
7912
7912
|
selectedEngine: PipelineEngineChoiceSchema,
|
|
7913
7913
|
slots: zod.z.array(PipelineSlotSchemaSchema).readonly()
|
|
7914
7914
|
});
|
|
7915
|
-
var DetectorOutputSchema = zod.z.object({
|
|
7916
|
-
detections: zod.z.array(SpatialDetectionSchema).readonly(),
|
|
7917
|
-
inferenceMs: zod.z.number(),
|
|
7918
|
-
modelId: zod.z.string()
|
|
7919
|
-
});
|
|
7920
7915
|
var EngineProvisioningSchema = zod.z.object({
|
|
7921
7916
|
runtimeId: zod.z.enum([
|
|
7922
7917
|
"onnx",
|
|
@@ -8082,23 +8077,23 @@ var pipelineExecutorCapability = {
|
|
|
8082
8077
|
auth: "admin"
|
|
8083
8078
|
}),
|
|
8084
8079
|
/**
|
|
8085
|
-
*
|
|
8086
|
-
*
|
|
8087
|
-
*
|
|
8088
|
-
* it (default `nodeIdMode: 'routing'
|
|
8089
|
-
*
|
|
8090
|
-
*
|
|
8080
|
+
* Clear THIS node's executor-side PER-DEVICE settings stores (the
|
|
8081
|
+
* per-camera step overrides the object-detection root reads via
|
|
8082
|
+
* `applyDeviceOverridesToTree`). `nodeId` is the ROUTING key — the
|
|
8083
|
+
* generated cap-router strips it (default `nodeIdMode: 'routing'`) and
|
|
8084
|
+
* dispatches to that node, so the provider method runs ON the target
|
|
8085
|
+
* node and receives no `nodeId`.
|
|
8091
8086
|
*
|
|
8092
|
-
*
|
|
8093
|
-
*
|
|
8094
|
-
*
|
|
8095
|
-
*
|
|
8096
|
-
*
|
|
8097
|
-
*
|
|
8087
|
+
* This is the slimmed executor leg of the orchestrator's
|
|
8088
|
+
* `resetNodePipelineDefaults` flow (which owns the real reset: node
|
|
8089
|
+
* addonDefaults pins + per-camera orchestrator overrides). The legacy
|
|
8090
|
+
* `resetToDefault` — which reset a persisted global step-tree seed
|
|
8091
|
+
* nothing in the live per-camera path read — was removed together with
|
|
8092
|
+
* that seed.
|
|
8098
8093
|
*/
|
|
8099
|
-
|
|
8094
|
+
clearDeviceOverrides: method(zod.z.object({ nodeId: zod.z.string() }), zod.z.object({
|
|
8100
8095
|
success: zod.z.literal(true),
|
|
8101
|
-
|
|
8096
|
+
clearedDevices: zod.z.number()
|
|
8102
8097
|
}), {
|
|
8103
8098
|
kind: "mutation",
|
|
8104
8099
|
auth: "admin"
|
|
@@ -8144,11 +8139,6 @@ var pipelineExecutorCapability = {
|
|
|
8144
8139
|
modelId: zod.z.string(),
|
|
8145
8140
|
format: ModelFormatSchema$1
|
|
8146
8141
|
}), zod.z.object({ success: zod.z.literal(true) }), { kind: "mutation" }),
|
|
8147
|
-
detect: method(zod.z.object({
|
|
8148
|
-
addonId: zod.z.string(),
|
|
8149
|
-
frame: FrameInputSchema,
|
|
8150
|
-
config: zod.z.record(zod.z.string(), zod.z.unknown()).optional()
|
|
8151
|
-
}), DetectorOutputSchema),
|
|
8152
8142
|
/**
|
|
8153
8143
|
* Stateless single-frame execution. Callers (runner, benchmark) pass
|
|
8154
8144
|
* the complete `engine` + `steps` tree; the executor holds no state
|
|
@@ -11041,7 +11031,9 @@ var AddonPageDeclarationSchema$1 = zod.z.object({
|
|
|
11041
11031
|
icon: zod.z.string(),
|
|
11042
11032
|
path: zod.z.string(),
|
|
11043
11033
|
remoteName: zod.z.string(),
|
|
11044
|
-
bundle: zod.z.string()
|
|
11034
|
+
bundle: zod.z.string(),
|
|
11035
|
+
section: zod.z.string().optional(),
|
|
11036
|
+
sectionLabel: zod.z.string().optional()
|
|
11045
11037
|
});
|
|
11046
11038
|
var AddonPageInfoSchema = zod.z.object({
|
|
11047
11039
|
addonId: zod.z.string(),
|
|
@@ -11086,7 +11078,18 @@ var AddonPageDeclarationSchema = zod.z.object({
|
|
|
11086
11078
|
* the static-file route can compute an mtime-based cache-buster URL
|
|
11087
11079
|
* without a separate filesystem stat.
|
|
11088
11080
|
*/
|
|
11089
|
-
bundle: zod.z.string()
|
|
11081
|
+
bundle: zod.z.string(),
|
|
11082
|
+
/**
|
|
11083
|
+
* Sidebar section this page docks into. Well-known ids: `'detection'`,
|
|
11084
|
+
* `'cluster'`, `'administration'` — the page renders inside that group.
|
|
11085
|
+
* Any OTHER string creates (or joins) a custom section rendered after
|
|
11086
|
+
* the built-in groups; its label comes from `sectionLabel` (first
|
|
11087
|
+
* declaration wins), falling back to the id. Absent → the legacy
|
|
11088
|
+
* "Addon Pages" group.
|
|
11089
|
+
*/
|
|
11090
|
+
section: zod.z.string().optional(),
|
|
11091
|
+
/** Display label for a CUSTOM `section` id (ignored for well-known ids). */
|
|
11092
|
+
sectionLabel: zod.z.string().optional()
|
|
11090
11093
|
});
|
|
11091
11094
|
var addonPagesSourceCapability = {
|
|
11092
11095
|
name: "addon-pages-source",
|
|
@@ -15034,7 +15037,12 @@ var AgentPipelineSettingsSchema = zod.z.object({
|
|
|
15034
15037
|
detectWeight: zod.z.number().positive().optional(),
|
|
15035
15038
|
/** Node is eligible to run the detection pipeline (decode + inference). */
|
|
15036
15039
|
detect: zod.z.boolean().optional(),
|
|
15037
|
-
/**
|
|
15040
|
+
/**
|
|
15041
|
+
* DEPRECATED AND IGNORED. Decode is always co-located with its frame
|
|
15042
|
+
* consumer, so decode eligibility IS detect eligibility. Kept optional in
|
|
15043
|
+
* the schema ONLY so persisted stores written before the removal still
|
|
15044
|
+
* parse — no code reads it and no write path emits it.
|
|
15045
|
+
*/
|
|
15038
15046
|
decode: zod.z.boolean().optional(),
|
|
15039
15047
|
/** Node is eligible to run audio-analyzer sessions. */
|
|
15040
15048
|
audio: zod.z.boolean().optional(),
|
|
@@ -15095,25 +15103,6 @@ var PipelineAssignmentSchema = zod.z.object({
|
|
|
15095
15103
|
assignedAt: zod.z.number()
|
|
15096
15104
|
});
|
|
15097
15105
|
/**
|
|
15098
|
-
* Decoder placement record. Symmetric to `PipelineAssignmentSchema` but for
|
|
15099
|
-
* the decoder-node placement domain (`balanceDecoder` decision: manual pin
|
|
15100
|
-
* → co-located with pipeline → capacity).
|
|
15101
|
-
*/
|
|
15102
|
-
var DecoderAssignmentSchema = zod.z.object({
|
|
15103
|
-
deviceId: zod.z.number(),
|
|
15104
|
-
/** Moleculer node id of the decoder provider currently responsible for this camera. */
|
|
15105
|
-
decoderNodeId: zod.z.string(),
|
|
15106
|
-
/** True when the assignment was set manually via `assignDecoder`, false when chosen by the balancer. */
|
|
15107
|
-
pinned: zod.z.boolean(),
|
|
15108
|
-
/** Why this assignment was made — useful for debugging the decoder balancer. */
|
|
15109
|
-
reason: zod.z.enum([
|
|
15110
|
-
"manual",
|
|
15111
|
-
"co-located",
|
|
15112
|
-
"capacity",
|
|
15113
|
-
"hardware-affinity"
|
|
15114
|
-
])
|
|
15115
|
-
});
|
|
15116
|
-
/**
|
|
15117
15106
|
* Per-agent load summary surfaced to the load balancer + dashboards.
|
|
15118
15107
|
* Aggregated from each runner's `getLocalLoad` cap call.
|
|
15119
15108
|
*/
|
|
@@ -15400,21 +15389,6 @@ var pipelineOrchestratorCapability = {
|
|
|
15400
15389
|
* present. Defaults to `{ ownerNodeId: 'hub' }`.
|
|
15401
15390
|
*/
|
|
15402
15391
|
getIngestOwner: method(zod.z.void(), IngestOwnerSchema),
|
|
15403
|
-
/** Pin a device's decoder to a specific node. */
|
|
15404
|
-
assignDecoder: method(zod.z.object({
|
|
15405
|
-
deviceId: zod.z.number(),
|
|
15406
|
-
nodeId: zod.z.string()
|
|
15407
|
-
}), zod.z.void(), {
|
|
15408
|
-
kind: "mutation",
|
|
15409
|
-
auth: "admin"
|
|
15410
|
-
}),
|
|
15411
|
-
/** Clear a device's decoder pin (revert to auto). */
|
|
15412
|
-
unassignDecoder: method(zod.z.object({ deviceId: zod.z.number() }), zod.z.void(), {
|
|
15413
|
-
kind: "mutation",
|
|
15414
|
-
auth: "admin"
|
|
15415
|
-
}),
|
|
15416
|
-
/** Get every camera's decoder placement. */
|
|
15417
|
-
getDecoderAssignments: method(zod.z.void(), zod.z.array(DecoderAssignmentSchema).readonly()),
|
|
15418
15392
|
/** Pin a device's audio analysis to a specific cluster node. */
|
|
15419
15393
|
assignAudio: method(zod.z.object({
|
|
15420
15394
|
deviceId: zod.z.number(),
|
|
@@ -15446,23 +15420,6 @@ var pipelineOrchestratorCapability = {
|
|
|
15446
15420
|
pinned: zod.z.boolean(),
|
|
15447
15421
|
assignedAt: zod.z.number()
|
|
15448
15422
|
}))),
|
|
15449
|
-
/**
|
|
15450
|
-
* Get one camera's decoder placement (computed if not yet pinned).
|
|
15451
|
-
*
|
|
15452
|
-
* ADVISORY today: reports the orchestrator's decoder preference only.
|
|
15453
|
-
* Actual decode placement is broker-owned (local-node pin + frame-plane
|
|
15454
|
-
* co-location guard). Reserved to become the binding source/decoder-owner
|
|
15455
|
-
* control in the stream-LB epic (Phase 2).
|
|
15456
|
-
*
|
|
15457
|
-
* `pipelineNodeId` is the node already chosen to run inference for
|
|
15458
|
-
* this camera. When provided, the balancer prefers co-location with
|
|
15459
|
-
* it; omitted → falls back to the last known assignment in the
|
|
15460
|
-
* `assignments` map and finally to 'hub'.
|
|
15461
|
-
*/
|
|
15462
|
-
getDecoderAssignment: method(zod.z.object({
|
|
15463
|
-
deviceId: zod.z.number(),
|
|
15464
|
-
pipelineNodeId: zod.z.string().optional()
|
|
15465
|
-
}), DecoderAssignmentSchema),
|
|
15466
15423
|
/** Read one agent's settings. Null when not yet seeded. */
|
|
15467
15424
|
getAgentSettings: method(zod.z.object({ agentNodeId: zod.z.string() }), AgentPipelineSettingsSchema.nullable()),
|
|
15468
15425
|
/** Enumerate every agent's settings (hub + remote runners). */
|
|
@@ -15532,14 +15489,15 @@ var pipelineOrchestratorCapability = {
|
|
|
15532
15489
|
* `enabledDecoderNodes`, `enabledAudioNodes`, `remoteSourcingNodes`).
|
|
15533
15490
|
* Each flag is optional in the patch: omit a flag to leave it unchanged,
|
|
15534
15491
|
* pass `null` to reset it to the node default (`hub` → capable, every
|
|
15535
|
-
* other node → not). Detection/
|
|
15536
|
-
*
|
|
15537
|
-
*
|
|
15492
|
+
* other node → not). Detection/audio eligibility is derived from these
|
|
15493
|
+
* flags across the cluster; changing them re-derives the enabled sets
|
|
15494
|
+
* and reconciles dispatch immediately. There is NO separate decode flag:
|
|
15495
|
+
* decode is always co-located with its frame consumer, so decode
|
|
15496
|
+
* eligibility IS detect eligibility.
|
|
15538
15497
|
*/
|
|
15539
15498
|
setAgentCapabilities: method(zod.z.object({
|
|
15540
15499
|
agentNodeId: zod.z.string(),
|
|
15541
15500
|
detect: zod.z.boolean().nullable().optional(),
|
|
15542
|
-
decode: zod.z.boolean().nullable().optional(),
|
|
15543
15501
|
audio: zod.z.boolean().nullable().optional(),
|
|
15544
15502
|
ingest: zod.z.boolean().nullable().optional()
|
|
15545
15503
|
}), zod.z.object({ success: zod.z.literal(true) }), {
|
|
@@ -15562,6 +15520,34 @@ var pipelineOrchestratorCapability = {
|
|
|
15562
15520
|
kind: "mutation",
|
|
15563
15521
|
auth: "admin"
|
|
15564
15522
|
}),
|
|
15523
|
+
/**
|
|
15524
|
+
* Reset one node's pipeline to its hardware-aware defaults — the HONEST
|
|
15525
|
+
* reset (replaces the executor's legacy `resetToDefault`, which cleared a
|
|
15526
|
+
* dead persisted step-tree seed nothing in the live path read):
|
|
15527
|
+
* (a) strips every `modelId` pin from that node's
|
|
15528
|
+
* `agentSettings.addonDefaults` (cells revert to Auto — the node
|
|
15529
|
+
* resolves its own hardware-aware format default at runtime);
|
|
15530
|
+
* (b) clears per-camera step overrides scoped to that node
|
|
15531
|
+
* (`stepOverridesByAgent[node]` + the wholesale
|
|
15532
|
+
* `pipelineByAgent[node]` escape hatch);
|
|
15533
|
+
* (c) clears the executor-side per-device settings stores on that node
|
|
15534
|
+
* (`pipelineExecutor.clearDeviceOverrides`);
|
|
15535
|
+
* (d) hot-reloads every camera assigned to the node.
|
|
15536
|
+
*
|
|
15537
|
+
* Returns the EFFECTIVE post-reset object-detection model for the node
|
|
15538
|
+
* (the executor's pure hardware-aware default) so the UI can report what
|
|
15539
|
+
* will actually run — not a value that never reaches the live path.
|
|
15540
|
+
*/
|
|
15541
|
+
resetNodePipelineDefaults: method(zod.z.object({ agentNodeId: zod.z.string() }), zod.z.object({
|
|
15542
|
+
success: zod.z.literal(true),
|
|
15543
|
+
/** Hardware-aware default detection model now in effect on the node (null when unresolvable). */
|
|
15544
|
+
effectiveModelId: zod.z.string().nullable(),
|
|
15545
|
+
/** Number of cameras whose node-scoped overrides were cleared. */
|
|
15546
|
+
clearedCameraOverrides: zod.z.number()
|
|
15547
|
+
}), {
|
|
15548
|
+
kind: "mutation",
|
|
15549
|
+
auth: "admin"
|
|
15550
|
+
}),
|
|
15565
15551
|
/** Read one camera's settings. Null when never touched (inherits agent defaults fully). */
|
|
15566
15552
|
getCameraSettings: method(zod.z.object({ deviceId: zod.z.number() }), CameraPipelineSettingsSchema.nullable()),
|
|
15567
15553
|
/** Set or clear the 3-state toggle for one (camera, addonId). Pass `enabled: null` to clear and revert to agent default. */
|
|
@@ -22750,23 +22736,23 @@ var METHOD_ACCESS_MAP = Object.freeze({
|
|
|
22750
22736
|
addonId: null,
|
|
22751
22737
|
access: "create"
|
|
22752
22738
|
},
|
|
22753
|
-
"pipelineExecutor.
|
|
22739
|
+
"pipelineExecutor.clearDeviceOverrides": {
|
|
22754
22740
|
capName: "pipeline-executor",
|
|
22755
22741
|
capScope: "system",
|
|
22756
22742
|
addonId: null,
|
|
22757
22743
|
access: "delete"
|
|
22758
22744
|
},
|
|
22759
|
-
"pipelineExecutor.
|
|
22745
|
+
"pipelineExecutor.deleteModel": {
|
|
22760
22746
|
capName: "pipeline-executor",
|
|
22761
22747
|
capScope: "system",
|
|
22762
22748
|
addonId: null,
|
|
22763
22749
|
access: "delete"
|
|
22764
22750
|
},
|
|
22765
|
-
"pipelineExecutor.
|
|
22751
|
+
"pipelineExecutor.deleteTemplate": {
|
|
22766
22752
|
capName: "pipeline-executor",
|
|
22767
22753
|
capScope: "system",
|
|
22768
22754
|
addonId: null,
|
|
22769
|
-
access: "
|
|
22755
|
+
access: "delete"
|
|
22770
22756
|
},
|
|
22771
22757
|
"pipelineExecutor.downloadModel": {
|
|
22772
22758
|
capName: "pipeline-executor",
|
|
@@ -22912,12 +22898,6 @@ var METHOD_ACCESS_MAP = Object.freeze({
|
|
|
22912
22898
|
addonId: null,
|
|
22913
22899
|
access: "create"
|
|
22914
22900
|
},
|
|
22915
|
-
"pipelineExecutor.resetToDefault": {
|
|
22916
|
-
capName: "pipeline-executor",
|
|
22917
|
-
capScope: "system",
|
|
22918
|
-
addonId: null,
|
|
22919
|
-
access: "delete"
|
|
22920
|
-
},
|
|
22921
22901
|
"pipelineExecutor.runAudioTest": {
|
|
22922
22902
|
capName: "pipeline-executor",
|
|
22923
22903
|
capScope: "system",
|
|
@@ -22978,12 +22958,6 @@ var METHOD_ACCESS_MAP = Object.freeze({
|
|
|
22978
22958
|
addonId: null,
|
|
22979
22959
|
access: "create"
|
|
22980
22960
|
},
|
|
22981
|
-
"pipelineOrchestrator.assignDecoder": {
|
|
22982
|
-
capName: "pipeline-orchestrator",
|
|
22983
|
-
capScope: "system",
|
|
22984
|
-
addonId: null,
|
|
22985
|
-
access: "create"
|
|
22986
|
-
},
|
|
22987
22961
|
"pipelineOrchestrator.assignPipeline": {
|
|
22988
22962
|
capName: "pipeline-orchestrator",
|
|
22989
22963
|
capScope: "system",
|
|
@@ -23062,18 +23036,6 @@ var METHOD_ACCESS_MAP = Object.freeze({
|
|
|
23062
23036
|
addonId: null,
|
|
23063
23037
|
access: "view"
|
|
23064
23038
|
},
|
|
23065
|
-
"pipelineOrchestrator.getDecoderAssignment": {
|
|
23066
|
-
capName: "pipeline-orchestrator",
|
|
23067
|
-
capScope: "system",
|
|
23068
|
-
addonId: null,
|
|
23069
|
-
access: "view"
|
|
23070
|
-
},
|
|
23071
|
-
"pipelineOrchestrator.getDecoderAssignments": {
|
|
23072
|
-
capName: "pipeline-orchestrator",
|
|
23073
|
-
capScope: "system",
|
|
23074
|
-
addonId: null,
|
|
23075
|
-
access: "view"
|
|
23076
|
-
},
|
|
23077
23039
|
"pipelineOrchestrator.getGlobalMetrics": {
|
|
23078
23040
|
capName: "pipeline-orchestrator",
|
|
23079
23041
|
capScope: "system",
|
|
@@ -23122,6 +23084,12 @@ var METHOD_ACCESS_MAP = Object.freeze({
|
|
|
23122
23084
|
addonId: null,
|
|
23123
23085
|
access: "delete"
|
|
23124
23086
|
},
|
|
23087
|
+
"pipelineOrchestrator.resetNodePipelineDefaults": {
|
|
23088
|
+
capName: "pipeline-orchestrator",
|
|
23089
|
+
capScope: "system",
|
|
23090
|
+
addonId: null,
|
|
23091
|
+
access: "delete"
|
|
23092
|
+
},
|
|
23125
23093
|
"pipelineOrchestrator.resolvePipeline": {
|
|
23126
23094
|
capName: "pipeline-orchestrator",
|
|
23127
23095
|
capScope: "system",
|
|
@@ -23194,12 +23162,6 @@ var METHOD_ACCESS_MAP = Object.freeze({
|
|
|
23194
23162
|
addonId: null,
|
|
23195
23163
|
access: "create"
|
|
23196
23164
|
},
|
|
23197
|
-
"pipelineOrchestrator.unassignDecoder": {
|
|
23198
|
-
capName: "pipeline-orchestrator",
|
|
23199
|
-
capScope: "system",
|
|
23200
|
-
addonId: null,
|
|
23201
|
-
access: "create"
|
|
23202
|
-
},
|
|
23203
23165
|
"pipelineOrchestrator.unassignPipeline": {
|
|
23204
23166
|
capName: "pipeline-orchestrator",
|
|
23205
23167
|
capScope: "system",
|
package/dist/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
2
|
const require_chunk = require("./chunk-Cek0wNdY.js");
|
|
3
|
-
const require_dist = require("./dist-
|
|
3
|
+
const require_dist = require("./dist-COIhbSao.js");
|
|
4
4
|
const require_model_download_service = require("./model-download-service-D-Umz4-L.js");
|
|
5
5
|
const require_resource_monitor = require("./resource-monitor-DNNomR-i.js");
|
|
6
6
|
const require_builtins_sqlite_storage_filesystem_storage_addon = require("./builtins/sqlite-storage/filesystem-storage.addon.js");
|
|
@@ -21,7 +21,7 @@ const require_builtins_local_auth_local_auth_addon = require("./builtins/local-a
|
|
|
21
21
|
require("./builtins/local-auth/index.js");
|
|
22
22
|
const require_builtins_device_manager_device_manager_addon = require("./builtins/device-manager/device-manager.addon.js");
|
|
23
23
|
require("./builtins/device-manager/index.js");
|
|
24
|
-
const require_manifest_python_deps = require("./manifest-python-deps-
|
|
24
|
+
const require_manifest_python_deps = require("./manifest-python-deps-CZFqI4wp.js");
|
|
25
25
|
const require_custom_action_registry = require("./custom-action-registry-vLYEFTtv.js");
|
|
26
26
|
let _camstack_types_node = require("@camstack/types/node");
|
|
27
27
|
let zod = require("zod");
|
package/dist/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { $ as errMsg$1, A as isVoidInput, Ct as resolveCapMount, F as looseSchema, M as lifecycleJobSchema, O as isArrayOutputSchema, St as readinessKey, V as procedureAuthKey, _t as expandCapMethods, bt as parseJsonObject, ct as ReadinessRegistry, dt as asJsonObject$1, ft as asNumber, ht as emitDownForOwnedCaps, j as kebabToCamel, k as isObjectInput, lt as ReadinessTimeoutError, mt as createEvent, nt as DEVICE_SETTINGS_CONTRIBUTION_METHODS, o as METHOD_ACCESS_MAP, p as addonSettingsCapability, pt as asString$1, rt as DEVICE_STATUS_METHOD, s as RUNTIME_DEFAULTS, st as EventCategory$1, t as ALL_CAPABILITY_DEFINITIONS, tt as DATAPLANE_SECRET_HEADER$1, wt as scopeKey, xt as parseJsonUnknown$1 } from "./dist-
|
|
1
|
+
import { $ as errMsg$1, A as isVoidInput, Ct as resolveCapMount, F as looseSchema, M as lifecycleJobSchema, O as isArrayOutputSchema, St as readinessKey, V as procedureAuthKey, _t as expandCapMethods, bt as parseJsonObject, ct as ReadinessRegistry, dt as asJsonObject$1, ft as asNumber, ht as emitDownForOwnedCaps, j as kebabToCamel, k as isObjectInput, lt as ReadinessTimeoutError, mt as createEvent, nt as DEVICE_SETTINGS_CONTRIBUTION_METHODS, o as METHOD_ACCESS_MAP, p as addonSettingsCapability, pt as asString$1, rt as DEVICE_STATUS_METHOD, s as RUNTIME_DEFAULTS, st as EventCategory$1, t as ALL_CAPABILITY_DEFINITIONS, tt as DATAPLANE_SECRET_HEADER$1, wt as scopeKey, xt as parseJsonUnknown$1 } from "./dist-C7oOY4iL.mjs";
|
|
2
2
|
import { a as downloadModel, c as getModelFilePath, d as contentTypeFor, f as createAuthenticatedFileServer, h as resolveFilePath, i as downloadFile, l as isModelDownloaded, m as parseTokenizedUrl, n as collectModelFiles, o as ensureModel, p as parseRangeHeader, r as deleteModelFromDisk, s as fetchJson, t as ModelDownloadService, u as createFileDataPlaneHandler } from "./model-download-service-C-IHWnXx.mjs";
|
|
3
3
|
import { n as getSinglePidStats, t as getPidStats } from "./resource-monitor-Le3l0qS2.mjs";
|
|
4
4
|
import { FilesystemStorageAddon, t as FilesystemStorageProvider } from "./builtins/sqlite-storage/filesystem-storage.addon.mjs";
|
|
@@ -19,7 +19,7 @@ import { LocalAuthAddon, a as require_ms, c as __esmMin, d as __toCommonJS, f as
|
|
|
19
19
|
import "./builtins/local-auth/index.mjs";
|
|
20
20
|
import { DeviceManagerAddon } from "./builtins/device-manager/device-manager.addon.mjs";
|
|
21
21
|
import "./builtins/device-manager/index.mjs";
|
|
22
|
-
import { $ as buildUdsNativeCapProxy, A as createParentUnownedCallHandler, B as AGENT_CAP_FWD_SERVICE, C as buildLinkChain, D as HUB_CAP_FWD_ACTION, E as localProviderLink, F as createUdsLoggerWithControl, G as createLocalTransport, H as CapRouteError, I as LocalChildClient, J as SocketChannel, K as UdsLocalTransportClient, L as LocalChildRegistry, M as createUdsEventBus, N as udsChildLogToWorkerEntry, O as HUB_CAP_FWD_SERVICE, P as createUdsLogger, Q as buildNativeCapProxy, R as UDS_NO_ROUTE_PREFIX, S as brokerTransportLink, T as ipcParentLink, U as classifyCapRoute, V as CapRouteResolver, W as callWithServiceDiscovery, X as FrameDecoder, Y as localEndpointPath, Z as encodeFrame, _ as resolveHwAccel, _t as CapabilityUnavailableError, a as getWorkerDeviceRegistry, at as createAddonService, b as getCapUsageRegistry, c as setHubConnected, ct as capActionName, d as getMoleculerEventStats, dt as capServiceName, et as createBrokerDeviceManagerApi, f as registerEventBusService, ft as parseCapAction, g as createKernelHwAccel, gt as CapabilityHandle, h as AddonDepsManager, ht as DeviceRegistry, i as createUdsAddonContext, j as createUdsEventBridge, k as createHubCapForwardService, l as EVENT_TOPIC_PREFIX, lt as capActionSuffix, m as subscribePassthrough, mt as serializeTypedArrays, n as adaptBrokerToCluster, o as getOrInitReadinessRegistry, ot as validateProviderRegistrations, p as setNodeEventInterest, pt as deserializeTypedArrays, q as UdsLocalTransportServer, r as createAddonContext, rt as mountNativeCapService, s as getOrInitReadinessRegistryForClient, st as NATIVE_PROVIDER_SERVICE_INFIX, t as installManifestPythonDeps, u as getBrokerEventBus, ut as capBareAction, v as CapUsageRegistry, vt as installManifestNativeDeps, w as ipcChildLink, x as brokerCallForCap, y as __resetCapUsageRegistryForTests, yt as resolveAddonClass, z as AGENT_CAP_FWD_ACTION } from "./manifest-python-deps-
|
|
22
|
+
import { $ as buildUdsNativeCapProxy, A as createParentUnownedCallHandler, B as AGENT_CAP_FWD_SERVICE, C as buildLinkChain, D as HUB_CAP_FWD_ACTION, E as localProviderLink, F as createUdsLoggerWithControl, G as createLocalTransport, H as CapRouteError, I as LocalChildClient, J as SocketChannel, K as UdsLocalTransportClient, L as LocalChildRegistry, M as createUdsEventBus, N as udsChildLogToWorkerEntry, O as HUB_CAP_FWD_SERVICE, P as createUdsLogger, Q as buildNativeCapProxy, R as UDS_NO_ROUTE_PREFIX, S as brokerTransportLink, T as ipcParentLink, U as classifyCapRoute, V as CapRouteResolver, W as callWithServiceDiscovery, X as FrameDecoder, Y as localEndpointPath, Z as encodeFrame, _ as resolveHwAccel, _t as CapabilityUnavailableError, a as getWorkerDeviceRegistry, at as createAddonService, b as getCapUsageRegistry, c as setHubConnected, ct as capActionName, d as getMoleculerEventStats, dt as capServiceName, et as createBrokerDeviceManagerApi, f as registerEventBusService, ft as parseCapAction, g as createKernelHwAccel, gt as CapabilityHandle, h as AddonDepsManager, ht as DeviceRegistry, i as createUdsAddonContext, j as createUdsEventBridge, k as createHubCapForwardService, l as EVENT_TOPIC_PREFIX, lt as capActionSuffix, m as subscribePassthrough, mt as serializeTypedArrays, n as adaptBrokerToCluster, o as getOrInitReadinessRegistry, ot as validateProviderRegistrations, p as setNodeEventInterest, pt as deserializeTypedArrays, q as UdsLocalTransportServer, r as createAddonContext, rt as mountNativeCapService, s as getOrInitReadinessRegistryForClient, st as NATIVE_PROVIDER_SERVICE_INFIX, t as installManifestPythonDeps, u as getBrokerEventBus, ut as capBareAction, v as CapUsageRegistry, vt as installManifestNativeDeps, w as ipcChildLink, x as brokerCallForCap, y as __resetCapUsageRegistryForTests, yt as resolveAddonClass, z as AGENT_CAP_FWD_ACTION } from "./manifest-python-deps-BYIV8-rc.mjs";
|
|
23
23
|
import { t as CustomActionRegistry } from "./custom-action-registry-BEXwC-oo.mjs";
|
|
24
24
|
import { PYTHON_VERSION, buildBinaryPath, downloadBinary, ensureBinary, ensureFfmpeg, ensurePython, findInPath, getFfmpegDownloadUrl, getPlatformInfo, getPythonDownloadUrl, installPythonPackages, installPythonRequirements } from "@camstack/types/node";
|
|
25
25
|
import { z } from "zod";
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { ChildCapDescriptor } from '../transport/child-cap-protocol.js';
|
|
2
|
+
/** One hosted addon's contribution to the runner UNION manifest. */
|
|
3
|
+
export interface RunnerManifestEntry {
|
|
4
|
+
readonly addonId: string;
|
|
5
|
+
readonly capabilities: readonly string[];
|
|
6
|
+
}
|
|
7
|
+
/** One native-cap snapshot row — a device-scoped cap and the devices it covers. */
|
|
8
|
+
export interface NativeCapSnapshotEntry {
|
|
9
|
+
readonly capName: string;
|
|
10
|
+
readonly addonId: string;
|
|
11
|
+
readonly deviceIds: readonly number[];
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Builds the {@link ChildCapDescriptor} array that the UDS child transport
|
|
15
|
+
* sends to the parent on registration.
|
|
16
|
+
*
|
|
17
|
+
* - Singleton caps come from the runner UNION manifest (all caps registered by
|
|
18
|
+
* every addon in this runner). One descriptor per unique (addonId, capName)
|
|
19
|
+
* pair, mode `'singleton'` and no `deviceId`. The `addonId` stamp lets the
|
|
20
|
+
* parent's manifest builder register each hosted addon's caps under the
|
|
21
|
+
* REAL addon id — a GROUPED runner (`execution.group`) hosts several addons,
|
|
22
|
+
* and deduplicating by capName alone would collapse two co-located providers
|
|
23
|
+
* of the same collection cap (e.g. `network-access` from cloudflare-tunnel
|
|
24
|
+
* AND tailscale-ingress) into one descriptor registered under a synthetic
|
|
25
|
+
* `addonId = childId` (the group name) — the "@camstack/addon-net-access"
|
|
26
|
+
* admin-UI bug.
|
|
27
|
+
* - Device-scoped caps come from the native-cap snapshot — one descriptor per
|
|
28
|
+
* (capName, deviceId) pair, mode `'collection'`, stamped with the owning
|
|
29
|
+
* addon's id.
|
|
30
|
+
*
|
|
31
|
+
* Pure module — extracted from `addon-runner.ts` (whose `main()` runs at
|
|
32
|
+
* import time) so it is unit-testable.
|
|
33
|
+
*/
|
|
34
|
+
export declare function buildChildCapDescriptors(manifest: readonly RunnerManifestEntry[], nativeCapSnapshot: readonly NativeCapSnapshotEntry[]): ChildCapDescriptor[];
|
|
@@ -6,8 +6,16 @@ import { CapCallInput } from '../transport/child-cap-protocol.js';
|
|
|
6
6
|
* registered".
|
|
7
7
|
*/
|
|
8
8
|
export interface ChildCapDispatchDeps {
|
|
9
|
-
/**
|
|
10
|
-
|
|
9
|
+
/**
|
|
10
|
+
* Resolve a singleton/system-scoped provider by cap name. `addonId` is a
|
|
11
|
+
* PROVIDER-SELECTION hint for grouped runners where multiple co-located
|
|
12
|
+
* addons register the SAME cap (e.g. two `network-access` providers in the
|
|
13
|
+
* `net-access` group): when it matches a hosted addon's provider, return
|
|
14
|
+
* that one; otherwise fall back to the cap's sole/first provider (an
|
|
15
|
+
* `addonId` that names no hosted provider is method DATA, not routing —
|
|
16
|
+
* e.g. `addons.restartAddon({ addonId })`).
|
|
17
|
+
*/
|
|
18
|
+
getSingletonProvider(capName: string, addonId?: string): object | null | undefined;
|
|
11
19
|
/** Resolve a device-scoped provider by cap name and device id. */
|
|
12
20
|
getDeviceProvider(capName: string, deviceId: number): object | null | undefined;
|
|
13
21
|
}
|
|
@@ -9,6 +9,16 @@ export interface ChildCapDescriptor {
|
|
|
9
9
|
readonly mode: 'singleton' | 'collection';
|
|
10
10
|
/** Present for device-scoped caps; absent for singleton/system caps. */
|
|
11
11
|
readonly deviceId?: number;
|
|
12
|
+
/**
|
|
13
|
+
* The addon that registered this cap. A GROUPED runner (`execution.group`)
|
|
14
|
+
* hosts multiple addons in one child, so the parent can no longer assume
|
|
15
|
+
* `addonId === childId` — this field lets the parent's manifest builder
|
|
16
|
+
* split the descriptor set into one `RegisteredAddonManifest` entry per
|
|
17
|
+
* hosted addon (real provider registryKeys, per-addon settings/logs/UI).
|
|
18
|
+
* OPTIONAL for wire compat: a legacy child omits it and the parent falls
|
|
19
|
+
* back to the childId (identical to the historical single-addon behaviour).
|
|
20
|
+
*/
|
|
21
|
+
readonly addonId?: string;
|
|
12
22
|
}
|
|
13
23
|
/** First message a child sends after connecting — its complete cap manifest. */
|
|
14
24
|
export interface RegisterMessage {
|
|
@@ -90,6 +100,16 @@ export interface CapCallMessage {
|
|
|
90
100
|
readonly deviceId?: number;
|
|
91
101
|
/** Optional per-call node pin (out-of-band routing hint; see {@link CapCallOutMessage.nodeId}). */
|
|
92
102
|
readonly nodeId?: string;
|
|
103
|
+
/**
|
|
104
|
+
* Out-of-band PROVIDER-selection hint: the addonId of the provider the hub
|
|
105
|
+
* resolved for this call. Needed for GROUPED runners where two co-located
|
|
106
|
+
* addons register the SAME collection cap (e.g. `network-access` from both
|
|
107
|
+
* cloudflare-tunnel and tailscale-ingress) — the hub's collection mount
|
|
108
|
+
* strips `addonId` from the method args after resolving the provider, so
|
|
109
|
+
* without this hint the child could only pick one-per-capName. Absent →
|
|
110
|
+
* the child dispatch falls back to its sole provider for the cap.
|
|
111
|
+
*/
|
|
112
|
+
readonly addonId?: string;
|
|
93
113
|
}
|
|
94
114
|
/** Parent → child: a system event delivered by the hub for the child to handle locally. */
|
|
95
115
|
export interface ParentEventMessage {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { H as readNodePin } from "./dist-
|
|
1
|
+
import { H as readNodePin } from "./dist-C7oOY4iL.mjs";
|
|
2
2
|
import { ensureBinary, ensureFfmpeg, ensurePython, installPythonPackages, installPythonRequirements } from "@camstack/types/node";
|
|
3
3
|
import { createServer } from "node:http";
|
|
4
4
|
import * as fs from "node:fs";
|
|
@@ -4192,7 +4192,8 @@ var LocalChildRegistry = class {
|
|
|
4192
4192
|
capName: input.capName,
|
|
4193
4193
|
method: input.method,
|
|
4194
4194
|
args: input.args,
|
|
4195
|
-
...input.deviceId !== void 0 ? { deviceId: input.deviceId } : {}
|
|
4195
|
+
...input.deviceId !== void 0 ? { deviceId: input.deviceId } : {},
|
|
4196
|
+
...input.addonId !== void 0 ? { addonId: input.addonId } : {}
|
|
4196
4197
|
};
|
|
4197
4198
|
}
|
|
4198
4199
|
listChildren() {
|
|
@@ -4890,6 +4891,7 @@ function createParentUnownedCallHandler(deps) {
|
|
|
4890
4891
|
return async (input) => {
|
|
4891
4892
|
const deviceId = input.deviceId ?? extractDeviceId(input.args);
|
|
4892
4893
|
const nodeId = deps.isDataNodeIdCap?.(input.capName) === true ? void 0 : input.nodeId ?? extractNodeId(input.args);
|
|
4894
|
+
const pinnedToOtherNode = nodeId !== void 0 && nodeId !== deps.broker.nodeID;
|
|
4893
4895
|
if (nodeId === void 0) {
|
|
4894
4896
|
const empty = deps.resolveEmptyCollection?.(input.capName, input.method);
|
|
4895
4897
|
if (empty != null) return empty;
|
|
@@ -4906,7 +4908,7 @@ function createParentUnownedCallHandler(deps) {
|
|
|
4906
4908
|
}
|
|
4907
4909
|
else deps.logger?.debug?.(`onUnownedCall: resolver not ready, routing ${input.capName}.${input.method} via broker fallback`);
|
|
4908
4910
|
try {
|
|
4909
|
-
if (deviceId !== void 0) {
|
|
4911
|
+
if (deviceId !== void 0 && !pinnedToOtherNode) {
|
|
4910
4912
|
const localDispatcher = deps.getLocalDispatcher?.() ?? null;
|
|
4911
4913
|
if (localDispatcher !== null) {
|
|
4912
4914
|
let childId = localDispatcher.resolveChildId(input.capName, deviceId);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
const require_chunk = require("./chunk-Cek0wNdY.js");
|
|
2
|
-
const require_dist = require("./dist-
|
|
2
|
+
const require_dist = require("./dist-COIhbSao.js");
|
|
3
3
|
let _camstack_types_node = require("@camstack/types/node");
|
|
4
4
|
let node_http = require("node:http");
|
|
5
5
|
let node_fs = require("node:fs");
|
|
@@ -4194,7 +4194,8 @@ var LocalChildRegistry = class {
|
|
|
4194
4194
|
capName: input.capName,
|
|
4195
4195
|
method: input.method,
|
|
4196
4196
|
args: input.args,
|
|
4197
|
-
...input.deviceId !== void 0 ? { deviceId: input.deviceId } : {}
|
|
4197
|
+
...input.deviceId !== void 0 ? { deviceId: input.deviceId } : {},
|
|
4198
|
+
...input.addonId !== void 0 ? { addonId: input.addonId } : {}
|
|
4198
4199
|
};
|
|
4199
4200
|
}
|
|
4200
4201
|
listChildren() {
|
|
@@ -4892,6 +4893,7 @@ function createParentUnownedCallHandler(deps) {
|
|
|
4892
4893
|
return async (input) => {
|
|
4893
4894
|
const deviceId = input.deviceId ?? extractDeviceId(input.args);
|
|
4894
4895
|
const nodeId = deps.isDataNodeIdCap?.(input.capName) === true ? void 0 : input.nodeId ?? extractNodeId(input.args);
|
|
4896
|
+
const pinnedToOtherNode = nodeId !== void 0 && nodeId !== deps.broker.nodeID;
|
|
4895
4897
|
if (nodeId === void 0) {
|
|
4896
4898
|
const empty = deps.resolveEmptyCollection?.(input.capName, input.method);
|
|
4897
4899
|
if (empty != null) return empty;
|
|
@@ -4908,7 +4910,7 @@ function createParentUnownedCallHandler(deps) {
|
|
|
4908
4910
|
}
|
|
4909
4911
|
else deps.logger?.debug?.(`onUnownedCall: resolver not ready, routing ${input.capName}.${input.method} via broker fallback`);
|
|
4910
4912
|
try {
|
|
4911
|
-
if (deviceId !== void 0) {
|
|
4913
|
+
if (deviceId !== void 0 && !pinnedToOtherNode) {
|
|
4912
4914
|
const localDispatcher = deps.getLocalDispatcher?.() ?? null;
|
|
4913
4915
|
if (localDispatcher !== null) {
|
|
4914
4916
|
let childId = localDispatcher.resolveChildId(input.capName, deviceId);
|