@camstack/types 1.2.13 → 1.2.15
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.d.ts +2 -0
- package/dist/addon.js +59 -1
- package/dist/addon.mjs +56 -2
- package/dist/capabilities/index.d.ts +3 -1
- package/dist/capabilities/terminal-session.cap.d.ts +89 -0
- package/dist/generated/addon-api.d.ts +134 -0
- package/dist/generated/capability-router-map.d.ts +5 -2
- package/dist/generated/collection-array-methods.d.ts +19 -0
- package/dist/generated/method-access-map.d.ts +1 -1
- package/dist/generated/system-proxy.d.ts +2 -0
- package/dist/index.js +130 -45
- package/dist/index.mjs +125 -43
- package/dist/{sleep-DiOnzenz.mjs → sleep-C3ceNSsf.mjs} +42 -1
- package/dist/{sleep-BG8hQTA8.js → sleep-DRg9F6JJ.js} +59 -0
- package/package.json +1 -1
package/dist/addon.d.ts
CHANGED
|
@@ -26,6 +26,8 @@ export { DisposerChain } from './disposer-chain.js';
|
|
|
26
26
|
export { ReadinessRegistry, ReadinessTimeoutError, scopeKey, } from './readiness/readiness-registry.js';
|
|
27
27
|
export { DATAPLANE_SECRET_HEADER } from './interfaces/addon-data-plane.js';
|
|
28
28
|
export { expandCapMethods } from './capabilities/capability-definition.js';
|
|
29
|
+
export { nodePin, readNodePin } from './cap-call-context.js';
|
|
30
|
+
export { COLLECTION_ARRAY_METHODS, isCollectionArrayMethodName, } from './generated/collection-array-methods.js';
|
|
29
31
|
export { deviceOpsCapability } from './capabilities/device-ops.cap.js';
|
|
30
32
|
export { createDeviceProxy } from './generated/device-proxy.js';
|
|
31
33
|
export { BaseAddon, normalizeAddonInitResult } from './addon/base-addon.js';
|
package/dist/addon.js
CHANGED
|
@@ -1,8 +1,63 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_sleep = require("./sleep-
|
|
2
|
+
const require_sleep = require("./sleep-DRg9F6JJ.js");
|
|
3
3
|
const require_event_category = require("./event-category-Cdyife4p.js");
|
|
4
4
|
const require_err_msg = require("./err-msg-COpsHMw2.js");
|
|
5
|
+
//#region src/generated/collection-array-methods.ts
|
|
6
|
+
/**
|
|
7
|
+
* AUTO-GENERATED by scripts/generate-collection-array-methods.ts — DO NOT EDIT.
|
|
8
|
+
*
|
|
9
|
+
* For every COLLECTION-mode capability, the array-returning (non-subscription)
|
|
10
|
+
* method names the hub fans across providers. The addon-runner uses this to
|
|
11
|
+
* reproduce the hub's graceful "provider skips an unimplemented collection
|
|
12
|
+
* method" behaviour (see child-cap-dispatch) WITHOUT importing the schema
|
|
13
|
+
* barrel (`ALL_CAPABILITY_DEFINITIONS`), which would cost ~144MB RSS per
|
|
14
|
+
* forked runner. See docs/decisions/adr-0028.md.
|
|
15
|
+
*
|
|
16
|
+
* Coverage: 16 collection caps, 28 array methods.
|
|
17
|
+
*/
|
|
18
|
+
var COLLECTION_ARRAY_METHODS = Object.freeze({
|
|
19
|
+
"addon-pages-source": ["listPages"],
|
|
20
|
+
"addon-routes": ["getRoutes"],
|
|
21
|
+
"addon-widgets-source": ["listWidgets"],
|
|
22
|
+
"broker": ["list", "listProviders"],
|
|
23
|
+
"custom-model-registry": ["listModels"],
|
|
24
|
+
"device-export": ["listExposedDevices", "listSupportedDeviceKinds"],
|
|
25
|
+
"device-provider": ["discoverDevices", "getDevices"],
|
|
26
|
+
"llm": [
|
|
27
|
+
"getDefaults",
|
|
28
|
+
"getUsage",
|
|
29
|
+
"listModelCatalog",
|
|
30
|
+
"listModels",
|
|
31
|
+
"listNodeModels",
|
|
32
|
+
"listProfileKinds",
|
|
33
|
+
"listProfiles",
|
|
34
|
+
"listRuntimeNodes"
|
|
35
|
+
],
|
|
36
|
+
"log-destination": ["query"],
|
|
37
|
+
"login-method": ["getLoginMethods"],
|
|
38
|
+
"mqtt-broker": ["listBrokers"],
|
|
39
|
+
"network-access": ["listEndpoints"],
|
|
40
|
+
"notification-output": [
|
|
41
|
+
"discoverTargets",
|
|
42
|
+
"listTargetKinds",
|
|
43
|
+
"listTargets"
|
|
44
|
+
],
|
|
45
|
+
"storage-provider": ["list"],
|
|
46
|
+
"turn-provider": ["getTurnServers"],
|
|
47
|
+
"user-passkeys": ["listPasskeys"]
|
|
48
|
+
});
|
|
49
|
+
/**
|
|
50
|
+
* True when `method` on cap `capName` is a COLLECTION cap's array-returning
|
|
51
|
+
* (non-subscription) method — the schema-free runner-side equivalent of
|
|
52
|
+
* `isCollectionArrayMethod(capDefsByName.get(capName), method)`.
|
|
53
|
+
*/
|
|
54
|
+
function isCollectionArrayMethodName(capName, method) {
|
|
55
|
+
const methods = COLLECTION_ARRAY_METHODS[capName];
|
|
56
|
+
return methods !== void 0 && methods.includes(method);
|
|
57
|
+
}
|
|
58
|
+
//#endregion
|
|
5
59
|
exports.BaseAddon = require_sleep.BaseAddon;
|
|
60
|
+
exports.COLLECTION_ARRAY_METHODS = COLLECTION_ARRAY_METHODS;
|
|
6
61
|
exports.DATAPLANE_SECRET_HEADER = require_sleep.DATAPLANE_SECRET_HEADER;
|
|
7
62
|
exports.DeviceType = require_sleep.DeviceType;
|
|
8
63
|
exports.DisposerChain = require_sleep.DisposerChain;
|
|
@@ -17,8 +72,11 @@ exports.deviceOpsCapability = require_sleep.deviceOpsCapability;
|
|
|
17
72
|
exports.emitReadiness = require_sleep.emitReadiness;
|
|
18
73
|
exports.errMsg = require_err_msg.errMsg;
|
|
19
74
|
exports.expandCapMethods = require_sleep.expandCapMethods;
|
|
75
|
+
exports.isCollectionArrayMethodName = isCollectionArrayMethodName;
|
|
76
|
+
exports.nodePin = require_sleep.nodePin;
|
|
20
77
|
exports.normalizeAddonInitResult = require_sleep.normalizeAddonInitResult;
|
|
21
78
|
exports.parseJsonUnknown = require_sleep.parseJsonUnknown;
|
|
79
|
+
exports.readNodePin = require_sleep.readNodePin;
|
|
22
80
|
exports.scopeKey = require_sleep.scopeKey;
|
|
23
81
|
exports.sleep = require_sleep.sleep;
|
|
24
82
|
exports.viewerUiCapability = require_sleep.viewerUiCapability;
|
package/dist/addon.mjs
CHANGED
|
@@ -1,4 +1,58 @@
|
|
|
1
|
-
import { A as parseJsonUnknown, D as asString, I as
|
|
1
|
+
import { A as parseJsonUnknown, Ct as DisposerChain, D as asString, F as ReadinessRegistry, I as ReadinessTimeoutError, M as nodePin, N as readNodePin, P as DATAPLANE_SECRET_HEADER, S as DeviceType, T as asJsonObject, a as viewerUiCapability, dt as BaseAddon, ft as normalizeAddonInitResult, ht as emitReadiness, i as deviceOpsCapability, m as expandCapMethods, o as adminUiCapability, s as createDeviceProxy, t as sleep, z as scopeKey } from "./sleep-C3ceNSsf.mjs";
|
|
2
2
|
import { t as EventCategory } from "./event-category-BLcNejAE.mjs";
|
|
3
3
|
import { t as errMsg } from "./err-msg-IQTHeDzc.mjs";
|
|
4
|
-
|
|
4
|
+
//#region src/generated/collection-array-methods.ts
|
|
5
|
+
/**
|
|
6
|
+
* AUTO-GENERATED by scripts/generate-collection-array-methods.ts — DO NOT EDIT.
|
|
7
|
+
*
|
|
8
|
+
* For every COLLECTION-mode capability, the array-returning (non-subscription)
|
|
9
|
+
* method names the hub fans across providers. The addon-runner uses this to
|
|
10
|
+
* reproduce the hub's graceful "provider skips an unimplemented collection
|
|
11
|
+
* method" behaviour (see child-cap-dispatch) WITHOUT importing the schema
|
|
12
|
+
* barrel (`ALL_CAPABILITY_DEFINITIONS`), which would cost ~144MB RSS per
|
|
13
|
+
* forked runner. See docs/decisions/adr-0028.md.
|
|
14
|
+
*
|
|
15
|
+
* Coverage: 16 collection caps, 28 array methods.
|
|
16
|
+
*/
|
|
17
|
+
var COLLECTION_ARRAY_METHODS = Object.freeze({
|
|
18
|
+
"addon-pages-source": ["listPages"],
|
|
19
|
+
"addon-routes": ["getRoutes"],
|
|
20
|
+
"addon-widgets-source": ["listWidgets"],
|
|
21
|
+
"broker": ["list", "listProviders"],
|
|
22
|
+
"custom-model-registry": ["listModels"],
|
|
23
|
+
"device-export": ["listExposedDevices", "listSupportedDeviceKinds"],
|
|
24
|
+
"device-provider": ["discoverDevices", "getDevices"],
|
|
25
|
+
"llm": [
|
|
26
|
+
"getDefaults",
|
|
27
|
+
"getUsage",
|
|
28
|
+
"listModelCatalog",
|
|
29
|
+
"listModels",
|
|
30
|
+
"listNodeModels",
|
|
31
|
+
"listProfileKinds",
|
|
32
|
+
"listProfiles",
|
|
33
|
+
"listRuntimeNodes"
|
|
34
|
+
],
|
|
35
|
+
"log-destination": ["query"],
|
|
36
|
+
"login-method": ["getLoginMethods"],
|
|
37
|
+
"mqtt-broker": ["listBrokers"],
|
|
38
|
+
"network-access": ["listEndpoints"],
|
|
39
|
+
"notification-output": [
|
|
40
|
+
"discoverTargets",
|
|
41
|
+
"listTargetKinds",
|
|
42
|
+
"listTargets"
|
|
43
|
+
],
|
|
44
|
+
"storage-provider": ["list"],
|
|
45
|
+
"turn-provider": ["getTurnServers"],
|
|
46
|
+
"user-passkeys": ["listPasskeys"]
|
|
47
|
+
});
|
|
48
|
+
/**
|
|
49
|
+
* True when `method` on cap `capName` is a COLLECTION cap's array-returning
|
|
50
|
+
* (non-subscription) method — the schema-free runner-side equivalent of
|
|
51
|
+
* `isCollectionArrayMethod(capDefsByName.get(capName), method)`.
|
|
52
|
+
*/
|
|
53
|
+
function isCollectionArrayMethodName(capName, method) {
|
|
54
|
+
const methods = COLLECTION_ARRAY_METHODS[capName];
|
|
55
|
+
return methods !== void 0 && methods.includes(method);
|
|
56
|
+
}
|
|
57
|
+
//#endregion
|
|
58
|
+
export { BaseAddon, COLLECTION_ARRAY_METHODS, DATAPLANE_SECRET_HEADER, DeviceType, DisposerChain, EventCategory, ReadinessRegistry, ReadinessTimeoutError, adminUiCapability, asJsonObject, asString, createDeviceProxy, deviceOpsCapability, emitReadiness, errMsg, expandCapMethods, isCollectionArrayMethodName, nodePin, normalizeAddonInitResult, parseJsonUnknown, readNodePin, scopeKey, sleep, viewerUiCapability };
|
|
@@ -31,6 +31,7 @@ export type { AudioAnalyzerGlobalConfig, AudioBackendChoice, IAudioAnalyzerProvi
|
|
|
31
31
|
export { AUDIO_BACKEND_CHOICES, AudioAnalysisResultSchema, AudioAnalysisSettingsSchema, AudioClassificationResultSchema, audioAnalyzerCapability, DEFAULT_AUDIO_ANALYZER_CONFIG, } from './audio-analyzer.cap.js';
|
|
32
32
|
export { AudioCodecInfoSchema, AudioDecodeSessionConfigSchema, AudioEncodedChunkSchema, AudioEncodeSessionConfigSchema, AudioPcmChunkSchema, audioCodecCapability, type IAudioCodecCapProvider, PcmSampleFormatSchema, } from './audio-codec.cap.js';
|
|
33
33
|
export { AuthResultSchema, authProviderCapability } from './auth-provider.cap.js';
|
|
34
|
+
export { terminalSessionCapability, type ITerminalSessionProvider, type TerminalSessionInfo, type TerminalProfileInfo, TerminalSessionInfoSchema, TerminalProfileInfoSchema, } from './terminal-session.cap.js';
|
|
34
35
|
export { ArchiveEntrySchema, ArchiveManifestSchema, BackupDestinationInfoSchema, BackupEntrySchema, backupCapability, type IBackupProvider, LocationStatSchema, } from './backup.cap.js';
|
|
35
36
|
export { BrokerAddInputSchema, BrokerGetStateInputSchema, type BrokerInfo as UnifiedBrokerInfo, BrokerInfoSchema as UnifiedBrokerInfoSchema, type BrokerProviderInfo, BrokerProviderInfoSchema, BrokerPublishInputSchema, BrokerRegistryStatusSchema, type BrokerStatus as UnifiedBrokerStatus, BrokerStatusEnum, BrokerSubscribeInputSchema, BrokerSubscribeResultSchema, BrokerTestConnectionResultSchema, BrokerUnsubscribeInputSchema, brokerCapability, type IBrokerProvider, } from './broker.cap.js';
|
|
36
37
|
export { cameraPipelineConfigCapability, type ICameraPipelineConfigProvider, } from './camera-pipeline-config.cap.js';
|
|
@@ -316,12 +317,13 @@ import type { vacuumControlCapability } from './vacuum-control.cap.js';
|
|
|
316
317
|
import type { valveCapability } from './valve.cap.js';
|
|
317
318
|
import type { vibrationCapability } from './vibration.cap.js';
|
|
318
319
|
import type { viewerUiCapability } from './viewer-ui.cap.js';
|
|
320
|
+
import type { terminalSessionCapability } from './terminal-session.cap.js';
|
|
319
321
|
import type { waterHeaterCapability } from './water-heater.cap.js';
|
|
320
322
|
import type { weatherCapability } from './weather.cap.js';
|
|
321
323
|
import type { webrtcSessionCapability } from './webrtc-session.cap.js';
|
|
322
324
|
import type { zoneAnalyticsCapability } from './zone-analytics.cap.js';
|
|
323
325
|
import type { zoneRulesCapability } from './zone-rules.cap.js';
|
|
324
326
|
import type { zonesCapability } from './zones.cap.js';
|
|
325
|
-
type AnyCapability = typeof addonSettingsCapability | typeof alertsCapability | typeof storageCapability | typeof storageProviderCapability | typeof storageEvictableCapability | typeof filesystemBrowseCapability | typeof backupCapability | typeof settingsStoreCapability | typeof logDestinationCapability | typeof adminUiCapability | typeof viewerUiCapability | typeof ssoBridgeCapability | typeof userPasskeysCapability | typeof smtpProviderCapability | typeof mqttBrokerCapability | typeof brokerCapability | typeof deviceAdoptionCapability | typeof deviceExportCapability | typeof addonPagesCapability | typeof addonPagesSourceCapability | typeof addonWidgetsCapability | typeof addonWidgetsSourceCapability | typeof customModelRegistryCapability | typeof modelDistributorCapability | typeof modelConvertCapability | typeof addonRoutesCapability | typeof streamBrokerCapability | typeof decoderCapability | typeof webrtcSessionCapability | typeof cameraStreamsCapability | typeof motionDetectionCapability | typeof pipelineExecutorCapability | typeof detectionPipelineCapability | typeof cameraPipelineConfigCapability | typeof pipelineRunnerCapability | typeof pipelineOrchestratorCapability | typeof audioAnalyzerCapability | typeof audioAnalysisCapability | typeof audioCodecCapability | typeof embeddingEncoderCapability | typeof deviceProviderCapability | typeof deviceManagerCapability | typeof deviceStateCapability | typeof authProviderCapability | typeof loginMethodCapability | typeof networkAccessCapability | typeof turnProviderCapability | typeof snapshotCapability | typeof llmCapability | typeof llmRuntimeCapability | typeof notificationOutputCapability | typeof notificationRulesCapability | typeof pipelineAnalyticsCapability | typeof metricsProviderCapability | typeof ptzCapability | typeof ptzAutotrackCapability | typeof consumablesCapability | typeof rebootCapability | typeof deviceDiscoveryCapability | typeof brightnessCapability | typeof colorCapability | typeof climateControlCapability | typeof coverCapability | typeof valveCapability | typeof humidifierCapability | typeof waterHeaterCapability | typeof weatherCapability | typeof imageCapability | typeof lockControlCapability | typeof vacuumControlCapability | typeof petFeederCapability | typeof lawnMowerControlCapability | typeof fanControlCapability | typeof controlCapability | typeof notifierCapability | typeof mediaPlayerCapability | typeof alarmPanelCapability | typeof presenceCapability | typeof scriptRunnerCapability | typeof automationControlCapability | typeof motionTriggerCapability | typeof eventsCapability | typeof zonesCapability | typeof zoneRulesCapability | typeof zoneAnalyticsCapability | typeof audioMetricsCapability | typeof motionCapability | typeof contactCapability | typeof floodCapability | typeof smokeCapability | typeof carbonMonoxideCapability | typeof gasCapability | typeof tamperCapability | typeof vibrationCapability | typeof connectivityCapability | typeof binaryCapability | typeof temperatureSensorCapability | typeof humiditySensorCapability | typeof ambientLightSensorCapability | typeof pressureSensorCapability | typeof powerMeterCapability | typeof airQualitySensorCapability | typeof numericSensorCapability | typeof enumSensorCapability | typeof recordingCapability | typeof recordingExportCapability | typeof deviceOpsCapability | typeof platformProbeCapability | typeof localNetworkCapability | typeof meshNetworkCapability | typeof userManagementCapability | typeof systemCapability | typeof networkQualityCapability | typeof toastCapability | typeof nodesCapability | typeof serverManagementCapability | typeof integrationsCapability | typeof addonsCapability | typeof oauthIntegrationCapability | typeof streamParamsCapability | typeof streamCatalogCapability | typeof motionZonesCapability | typeof sceneMonitorCapability | typeof privacyMaskCapability | typeof dayNightCapability | typeof imageSettingsCapability;
|
|
327
|
+
type AnyCapability = typeof addonSettingsCapability | typeof alertsCapability | typeof storageCapability | typeof storageProviderCapability | typeof storageEvictableCapability | typeof filesystemBrowseCapability | typeof backupCapability | typeof terminalSessionCapability | typeof settingsStoreCapability | typeof logDestinationCapability | typeof adminUiCapability | typeof viewerUiCapability | typeof ssoBridgeCapability | typeof userPasskeysCapability | typeof smtpProviderCapability | typeof mqttBrokerCapability | typeof brokerCapability | typeof deviceAdoptionCapability | typeof deviceExportCapability | typeof addonPagesCapability | typeof addonPagesSourceCapability | typeof addonWidgetsCapability | typeof addonWidgetsSourceCapability | typeof customModelRegistryCapability | typeof modelDistributorCapability | typeof modelConvertCapability | typeof addonRoutesCapability | typeof streamBrokerCapability | typeof decoderCapability | typeof webrtcSessionCapability | typeof cameraStreamsCapability | typeof motionDetectionCapability | typeof pipelineExecutorCapability | typeof detectionPipelineCapability | typeof cameraPipelineConfigCapability | typeof pipelineRunnerCapability | typeof pipelineOrchestratorCapability | typeof audioAnalyzerCapability | typeof audioAnalysisCapability | typeof audioCodecCapability | typeof embeddingEncoderCapability | typeof deviceProviderCapability | typeof deviceManagerCapability | typeof deviceStateCapability | typeof authProviderCapability | typeof loginMethodCapability | typeof networkAccessCapability | typeof turnProviderCapability | typeof snapshotCapability | typeof llmCapability | typeof llmRuntimeCapability | typeof notificationOutputCapability | typeof notificationRulesCapability | typeof pipelineAnalyticsCapability | typeof metricsProviderCapability | typeof ptzCapability | typeof ptzAutotrackCapability | typeof consumablesCapability | typeof rebootCapability | typeof deviceDiscoveryCapability | typeof brightnessCapability | typeof colorCapability | typeof climateControlCapability | typeof coverCapability | typeof valveCapability | typeof humidifierCapability | typeof waterHeaterCapability | typeof weatherCapability | typeof imageCapability | typeof lockControlCapability | typeof vacuumControlCapability | typeof petFeederCapability | typeof lawnMowerControlCapability | typeof fanControlCapability | typeof controlCapability | typeof notifierCapability | typeof mediaPlayerCapability | typeof alarmPanelCapability | typeof presenceCapability | typeof scriptRunnerCapability | typeof automationControlCapability | typeof motionTriggerCapability | typeof eventsCapability | typeof zonesCapability | typeof zoneRulesCapability | typeof zoneAnalyticsCapability | typeof audioMetricsCapability | typeof motionCapability | typeof contactCapability | typeof floodCapability | typeof smokeCapability | typeof carbonMonoxideCapability | typeof gasCapability | typeof tamperCapability | typeof vibrationCapability | typeof connectivityCapability | typeof binaryCapability | typeof temperatureSensorCapability | typeof humiditySensorCapability | typeof ambientLightSensorCapability | typeof pressureSensorCapability | typeof powerMeterCapability | typeof airQualitySensorCapability | typeof numericSensorCapability | typeof enumSensorCapability | typeof recordingCapability | typeof recordingExportCapability | typeof deviceOpsCapability | typeof platformProbeCapability | typeof localNetworkCapability | typeof meshNetworkCapability | typeof userManagementCapability | typeof systemCapability | typeof networkQualityCapability | typeof toastCapability | typeof nodesCapability | typeof serverManagementCapability | typeof integrationsCapability | typeof addonsCapability | typeof oauthIntegrationCapability | typeof streamParamsCapability | typeof streamCatalogCapability | typeof motionZonesCapability | typeof sceneMonitorCapability | typeof privacyMaskCapability | typeof dayNightCapability | typeof imageSettingsCapability;
|
|
326
328
|
export type CapabilityName = AnyCapability['name'];
|
|
327
329
|
export type ITypedReadinessRegistry = IReadinessRegistry<CapabilityName>;
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { type InferProvider } from './capability-definition.js';
|
|
3
|
+
/**
|
|
4
|
+
* A live terminal session hosted by the provider addon. Output and input do
|
|
5
|
+
* NOT flow through the capability — they use the addon data plane
|
|
6
|
+
* (`GET /addon/terminal/<id>/out` SSE, `POST /addon/terminal/<id>/in`) because
|
|
7
|
+
* terminal output must be ordered and lossless. The event bus is telemetry and
|
|
8
|
+
* may drop chunks ([D8]), and a dropped chunk desynchronises the vt parser
|
|
9
|
+
* permanently until a full repaint. The capability owns only lifecycle.
|
|
10
|
+
*/
|
|
11
|
+
declare const TerminalSessionInfoSchema: z.ZodObject<{
|
|
12
|
+
sessionId: z.ZodString;
|
|
13
|
+
profileId: z.ZodString;
|
|
14
|
+
label: z.ZodString;
|
|
15
|
+
cols: z.ZodNumber;
|
|
16
|
+
rows: z.ZodNumber;
|
|
17
|
+
startedAt: z.ZodNumber;
|
|
18
|
+
}, z.core.$strip>;
|
|
19
|
+
/**
|
|
20
|
+
* A profile the operator may open — a pre-declared, allowlisted program
|
|
21
|
+
* (`monitor` → `btm`). The capability accepts only these ids; a free-form
|
|
22
|
+
* command string would be remote code execution as the server's user, so it is
|
|
23
|
+
* deliberately not part of the contract.
|
|
24
|
+
*/
|
|
25
|
+
declare const TerminalProfileInfoSchema: z.ZodObject<{
|
|
26
|
+
profileId: z.ZodString;
|
|
27
|
+
label: z.ZodString;
|
|
28
|
+
description: z.ZodOptional<z.ZodString>;
|
|
29
|
+
}, z.core.$strip>;
|
|
30
|
+
/**
|
|
31
|
+
* terminal-session — singleton system capability for interactive TTY sessions.
|
|
32
|
+
*
|
|
33
|
+
* Phase 1 (this cap): open/resize/close/list a pty running an allowlisted
|
|
34
|
+
* profile, streamed to xterm.js over the data plane. Phase 2 (streaming a
|
|
35
|
+
* session as a camera) is a separate device-provider concern and does not
|
|
36
|
+
* change this contract.
|
|
37
|
+
*/
|
|
38
|
+
export declare const terminalSessionCapability: {
|
|
39
|
+
readonly name: "terminal-session";
|
|
40
|
+
readonly scope: "system";
|
|
41
|
+
readonly mode: "singleton";
|
|
42
|
+
readonly methods: {
|
|
43
|
+
/** Pre-declared profiles the operator may open. */
|
|
44
|
+
readonly listProfiles: import("./capability-definition.js").CapabilityMethodSchema<z.ZodVoid, z.ZodReadonly<z.ZodArray<z.ZodObject<{
|
|
45
|
+
profileId: z.ZodString;
|
|
46
|
+
label: z.ZodString;
|
|
47
|
+
description: z.ZodOptional<z.ZodString>;
|
|
48
|
+
}, z.core.$strip>>>, import("./capability-definition.js").CapabilityMethodKind>;
|
|
49
|
+
/** Live sessions currently hosted by the provider. */
|
|
50
|
+
readonly listSessions: import("./capability-definition.js").CapabilityMethodSchema<z.ZodVoid, z.ZodReadonly<z.ZodArray<z.ZodObject<{
|
|
51
|
+
sessionId: z.ZodString;
|
|
52
|
+
profileId: z.ZodString;
|
|
53
|
+
label: z.ZodString;
|
|
54
|
+
cols: z.ZodNumber;
|
|
55
|
+
rows: z.ZodNumber;
|
|
56
|
+
startedAt: z.ZodNumber;
|
|
57
|
+
}, z.core.$strip>>>, import("./capability-definition.js").CapabilityMethodKind>;
|
|
58
|
+
/**
|
|
59
|
+
* Spawn a pty for an allowlisted profile at the given grid size and return
|
|
60
|
+
* its session id. Output/input then flow over the data plane by that id.
|
|
61
|
+
*/
|
|
62
|
+
readonly openSession: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
|
|
63
|
+
profileId: z.ZodString;
|
|
64
|
+
cols: z.ZodNumber;
|
|
65
|
+
rows: z.ZodNumber;
|
|
66
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
67
|
+
sessionId: z.ZodString;
|
|
68
|
+
profileId: z.ZodString;
|
|
69
|
+
label: z.ZodString;
|
|
70
|
+
cols: z.ZodNumber;
|
|
71
|
+
rows: z.ZodNumber;
|
|
72
|
+
startedAt: z.ZodNumber;
|
|
73
|
+
}, z.core.$strip>, "mutation">;
|
|
74
|
+
/** Resize a live session's pty (reflows the running program). */
|
|
75
|
+
readonly resize: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
|
|
76
|
+
sessionId: z.ZodString;
|
|
77
|
+
cols: z.ZodNumber;
|
|
78
|
+
rows: z.ZodNumber;
|
|
79
|
+
}, z.core.$strip>, z.ZodVoid, "mutation">;
|
|
80
|
+
/** Terminate a live session and release its pty. */
|
|
81
|
+
readonly close: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
|
|
82
|
+
sessionId: z.ZodString;
|
|
83
|
+
}, z.core.$strip>, z.ZodVoid, "mutation">;
|
|
84
|
+
};
|
|
85
|
+
};
|
|
86
|
+
export type ITerminalSessionProvider = InferProvider<typeof terminalSessionCapability>;
|
|
87
|
+
export type TerminalSessionInfo = z.infer<typeof TerminalSessionInfoSchema>;
|
|
88
|
+
export type TerminalProfileInfo = z.infer<typeof TerminalProfileInfoSchema>;
|
|
89
|
+
export { TerminalSessionInfoSchema, TerminalProfileInfoSchema };
|
|
@@ -15946,6 +15946,73 @@ export type AppRouter = import("@trpc/server/unstable-core-do-not-import").Route
|
|
|
15946
15946
|
meta: object;
|
|
15947
15947
|
}>;
|
|
15948
15948
|
}>>;
|
|
15949
|
+
terminalSession: import("@trpc/server").TRPCBuiltRouter<{
|
|
15950
|
+
ctx: TrpcContext;
|
|
15951
|
+
meta: object;
|
|
15952
|
+
errorShape: import("@camstack/types").AugmentedErrorShape;
|
|
15953
|
+
transformer: true;
|
|
15954
|
+
}, import("@trpc/server").TRPCDecorateCreateRouterOptions<{
|
|
15955
|
+
listProfiles: import("@trpc/server").TRPCQueryProcedure<{
|
|
15956
|
+
input: {
|
|
15957
|
+
nodeId?: string | undefined;
|
|
15958
|
+
} | undefined;
|
|
15959
|
+
output: readonly {
|
|
15960
|
+
profileId: string;
|
|
15961
|
+
label: string;
|
|
15962
|
+
description?: string | undefined;
|
|
15963
|
+
}[];
|
|
15964
|
+
meta: object;
|
|
15965
|
+
}>;
|
|
15966
|
+
listSessions: import("@trpc/server").TRPCQueryProcedure<{
|
|
15967
|
+
input: {
|
|
15968
|
+
nodeId?: string | undefined;
|
|
15969
|
+
} | undefined;
|
|
15970
|
+
output: readonly {
|
|
15971
|
+
sessionId: string;
|
|
15972
|
+
profileId: string;
|
|
15973
|
+
label: string;
|
|
15974
|
+
cols: number;
|
|
15975
|
+
rows: number;
|
|
15976
|
+
startedAt: number;
|
|
15977
|
+
}[];
|
|
15978
|
+
meta: object;
|
|
15979
|
+
}>;
|
|
15980
|
+
openSession: import("@trpc/server").TRPCMutationProcedure<{
|
|
15981
|
+
input: {
|
|
15982
|
+
[x: string]: unknown;
|
|
15983
|
+
profileId: string;
|
|
15984
|
+
cols: number;
|
|
15985
|
+
rows: number;
|
|
15986
|
+
};
|
|
15987
|
+
output: {
|
|
15988
|
+
sessionId: string;
|
|
15989
|
+
profileId: string;
|
|
15990
|
+
label: string;
|
|
15991
|
+
cols: number;
|
|
15992
|
+
rows: number;
|
|
15993
|
+
startedAt: number;
|
|
15994
|
+
};
|
|
15995
|
+
meta: object;
|
|
15996
|
+
}>;
|
|
15997
|
+
resize: import("@trpc/server").TRPCMutationProcedure<{
|
|
15998
|
+
input: {
|
|
15999
|
+
[x: string]: unknown;
|
|
16000
|
+
sessionId: string;
|
|
16001
|
+
cols: number;
|
|
16002
|
+
rows: number;
|
|
16003
|
+
};
|
|
16004
|
+
output: void;
|
|
16005
|
+
meta: object;
|
|
16006
|
+
}>;
|
|
16007
|
+
close: import("@trpc/server").TRPCMutationProcedure<{
|
|
16008
|
+
input: {
|
|
16009
|
+
[x: string]: unknown;
|
|
16010
|
+
sessionId: string;
|
|
16011
|
+
};
|
|
16012
|
+
output: void;
|
|
16013
|
+
meta: object;
|
|
16014
|
+
}>;
|
|
16015
|
+
}>>;
|
|
15949
16016
|
toast: import("@trpc/server").TRPCBuiltRouter<{
|
|
15950
16017
|
ctx: TrpcContext;
|
|
15951
16018
|
meta: object;
|
|
@@ -33304,6 +33371,73 @@ export type AppRouter = import("@trpc/server/unstable-core-do-not-import").Route
|
|
|
33304
33371
|
meta: object;
|
|
33305
33372
|
}>;
|
|
33306
33373
|
}>>;
|
|
33374
|
+
terminalSession: import("@trpc/server").TRPCBuiltRouter<{
|
|
33375
|
+
ctx: TrpcContext;
|
|
33376
|
+
meta: object;
|
|
33377
|
+
errorShape: import("@camstack/types").AugmentedErrorShape;
|
|
33378
|
+
transformer: true;
|
|
33379
|
+
}, import("@trpc/server").TRPCDecorateCreateRouterOptions<{
|
|
33380
|
+
listProfiles: import("@trpc/server").TRPCQueryProcedure<{
|
|
33381
|
+
input: {
|
|
33382
|
+
nodeId?: string | undefined;
|
|
33383
|
+
} | undefined;
|
|
33384
|
+
output: readonly {
|
|
33385
|
+
profileId: string;
|
|
33386
|
+
label: string;
|
|
33387
|
+
description?: string | undefined;
|
|
33388
|
+
}[];
|
|
33389
|
+
meta: object;
|
|
33390
|
+
}>;
|
|
33391
|
+
listSessions: import("@trpc/server").TRPCQueryProcedure<{
|
|
33392
|
+
input: {
|
|
33393
|
+
nodeId?: string | undefined;
|
|
33394
|
+
} | undefined;
|
|
33395
|
+
output: readonly {
|
|
33396
|
+
sessionId: string;
|
|
33397
|
+
profileId: string;
|
|
33398
|
+
label: string;
|
|
33399
|
+
cols: number;
|
|
33400
|
+
rows: number;
|
|
33401
|
+
startedAt: number;
|
|
33402
|
+
}[];
|
|
33403
|
+
meta: object;
|
|
33404
|
+
}>;
|
|
33405
|
+
openSession: import("@trpc/server").TRPCMutationProcedure<{
|
|
33406
|
+
input: {
|
|
33407
|
+
[x: string]: unknown;
|
|
33408
|
+
profileId: string;
|
|
33409
|
+
cols: number;
|
|
33410
|
+
rows: number;
|
|
33411
|
+
};
|
|
33412
|
+
output: {
|
|
33413
|
+
sessionId: string;
|
|
33414
|
+
profileId: string;
|
|
33415
|
+
label: string;
|
|
33416
|
+
cols: number;
|
|
33417
|
+
rows: number;
|
|
33418
|
+
startedAt: number;
|
|
33419
|
+
};
|
|
33420
|
+
meta: object;
|
|
33421
|
+
}>;
|
|
33422
|
+
resize: import("@trpc/server").TRPCMutationProcedure<{
|
|
33423
|
+
input: {
|
|
33424
|
+
[x: string]: unknown;
|
|
33425
|
+
sessionId: string;
|
|
33426
|
+
cols: number;
|
|
33427
|
+
rows: number;
|
|
33428
|
+
};
|
|
33429
|
+
output: void;
|
|
33430
|
+
meta: object;
|
|
33431
|
+
}>;
|
|
33432
|
+
close: import("@trpc/server").TRPCMutationProcedure<{
|
|
33433
|
+
input: {
|
|
33434
|
+
[x: string]: unknown;
|
|
33435
|
+
sessionId: string;
|
|
33436
|
+
};
|
|
33437
|
+
output: void;
|
|
33438
|
+
meta: object;
|
|
33439
|
+
}>;
|
|
33440
|
+
}>>;
|
|
33307
33441
|
toast: import("@trpc/server").TRPCBuiltRouter<{
|
|
33308
33442
|
ctx: TrpcContext;
|
|
33309
33443
|
meta: object;
|
|
@@ -124,6 +124,7 @@ export { switchCapability } from '../capabilities/switch.cap.js';
|
|
|
124
124
|
export { systemCapability } from '../capabilities/system.cap.js';
|
|
125
125
|
export { tamperCapability } from '../capabilities/tamper.cap.js';
|
|
126
126
|
export { temperatureSensorCapability } from '../capabilities/temperature-sensor.cap.js';
|
|
127
|
+
export { terminalSessionCapability } from '../capabilities/terminal-session.cap.js';
|
|
127
128
|
export { toastCapability } from '../capabilities/toast.cap.js';
|
|
128
129
|
export { turnProviderCapability } from '../capabilities/turn-provider.cap.js';
|
|
129
130
|
export { updateCapability } from '../capabilities/update.cap.js';
|
|
@@ -267,6 +268,7 @@ export declare const CAPABILITY_NAMES: {
|
|
|
267
268
|
readonly system: "system";
|
|
268
269
|
readonly tamper: "tamper";
|
|
269
270
|
readonly temperatureSensor: "temperature-sensor";
|
|
271
|
+
readonly terminalSession: "terminal-session";
|
|
270
272
|
readonly toast: "toast";
|
|
271
273
|
readonly turnProvider: "turn-provider";
|
|
272
274
|
readonly update: "update";
|
|
@@ -423,6 +425,7 @@ export interface CapabilityRouterMap<TRouter = unknown> {
|
|
|
423
425
|
readonly system: TRouter;
|
|
424
426
|
readonly tamper: TRouter;
|
|
425
427
|
readonly temperatureSensor: TRouter;
|
|
428
|
+
readonly terminalSession: TRouter;
|
|
426
429
|
readonly toast: TRouter;
|
|
427
430
|
readonly turnProvider: TRouter;
|
|
428
431
|
readonly update: TRouter;
|
|
@@ -440,8 +443,8 @@ export interface CapabilityRouterMap<TRouter = unknown> {
|
|
|
440
443
|
readonly zoneRules: TRouter;
|
|
441
444
|
readonly zones: TRouter;
|
|
442
445
|
}
|
|
443
|
-
/** Capability names whose mode is `singleton` (
|
|
444
|
-
export declare const SINGLETON_CAPABILITY_NAMES: readonly ["accessories", "addon-pages", "addon-settings", "addon-widgets", "addons", "admin-ui", "air-quality-sensor", "alarm-panel", "alerts", "ambient-light-sensor", "audio-analysis", "audio-analyzer", "audio-codec", "audio-metrics", "automation-control", "backup", "battery", "binary", "brightness", "button", "camera-credentials", "camera-pipeline-config", "camera-streams", "carbon-monoxide", "climate-control", "color", "connectivity", "consumables", "contact", "control", "cover", "day-night", "decoder", "detection-pipeline", "device-adoption", "device-discovery", "device-manager", "device-ops", "device-state", "device-status", "doorbell", "enum-sensor", "event-emitter", "events", "face-gallery", "fan-control", "feature-probe", "filesystem-browse", "flood", "gas", "humidifier", "humidity-sensor", "image", "image-settings", "integrations", "intercom", "lawn-mower-control", "llm-runtime", "local-network", "lock-control", "media-player", "metrics-provider", "model-convert", "model-distributor", "motion", "motion-detection", "motion-trigger", "motion-zones", "native-object-detection", "network-quality", "nodes", "notification-rules", "notifier", "numeric-sensor", "osd", "pet-feeder", "pipeline-analytics", "pipeline-executor", "pipeline-orchestrator", "pipeline-runner", "plate-gallery", "platform-probe", "power-meter", "presence", "pressure-sensor", "privacy-mask", "ptz", "ptz-autotrack", "reboot", "recording", "recordingExport", "scene-monitor", "script-runner", "server-management", "settings-store", "smoke", "snapshot", "sso-bridge", "storage", "stream-broker", "stream-catalog", "stream-params", "switch", "system", "tamper", "temperature-sensor", "toast", "update", "user-management", "vacuum-control", "valve", "vibration", "videoclips", "viewer-ui", "water-heater", "weather", "webrtc-session", "zone-analytics", "zone-rules", "zones"];
|
|
446
|
+
/** Capability names whose mode is `singleton` (121 caps). */
|
|
447
|
+
export declare const SINGLETON_CAPABILITY_NAMES: readonly ["accessories", "addon-pages", "addon-settings", "addon-widgets", "addons", "admin-ui", "air-quality-sensor", "alarm-panel", "alerts", "ambient-light-sensor", "audio-analysis", "audio-analyzer", "audio-codec", "audio-metrics", "automation-control", "backup", "battery", "binary", "brightness", "button", "camera-credentials", "camera-pipeline-config", "camera-streams", "carbon-monoxide", "climate-control", "color", "connectivity", "consumables", "contact", "control", "cover", "day-night", "decoder", "detection-pipeline", "device-adoption", "device-discovery", "device-manager", "device-ops", "device-state", "device-status", "doorbell", "enum-sensor", "event-emitter", "events", "face-gallery", "fan-control", "feature-probe", "filesystem-browse", "flood", "gas", "humidifier", "humidity-sensor", "image", "image-settings", "integrations", "intercom", "lawn-mower-control", "llm-runtime", "local-network", "lock-control", "media-player", "metrics-provider", "model-convert", "model-distributor", "motion", "motion-detection", "motion-trigger", "motion-zones", "native-object-detection", "network-quality", "nodes", "notification-rules", "notifier", "numeric-sensor", "osd", "pet-feeder", "pipeline-analytics", "pipeline-executor", "pipeline-orchestrator", "pipeline-runner", "plate-gallery", "platform-probe", "power-meter", "presence", "pressure-sensor", "privacy-mask", "ptz", "ptz-autotrack", "reboot", "recording", "recordingExport", "scene-monitor", "script-runner", "server-management", "settings-store", "smoke", "snapshot", "sso-bridge", "storage", "stream-broker", "stream-catalog", "stream-params", "switch", "system", "tamper", "temperature-sensor", "terminal-session", "toast", "update", "user-management", "vacuum-control", "valve", "vibration", "videoclips", "viewer-ui", "water-heater", "weather", "webrtc-session", "zone-analytics", "zone-rules", "zones"];
|
|
445
448
|
/** Union of singleton capability names (literal string union). */
|
|
446
449
|
export type SingletonCapabilityName = typeof SINGLETON_CAPABILITY_NAMES[number];
|
|
447
450
|
/** Capability names whose mode is `collection` (22 caps). */
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* AUTO-GENERATED by scripts/generate-collection-array-methods.ts — DO NOT EDIT.
|
|
3
|
+
*
|
|
4
|
+
* For every COLLECTION-mode capability, the array-returning (non-subscription)
|
|
5
|
+
* method names the hub fans across providers. The addon-runner uses this to
|
|
6
|
+
* reproduce the hub's graceful "provider skips an unimplemented collection
|
|
7
|
+
* method" behaviour (see child-cap-dispatch) WITHOUT importing the schema
|
|
8
|
+
* barrel (`ALL_CAPABILITY_DEFINITIONS`), which would cost ~144MB RSS per
|
|
9
|
+
* forked runner. See docs/decisions/adr-0028.md.
|
|
10
|
+
*
|
|
11
|
+
* Coverage: 16 collection caps, 28 array methods.
|
|
12
|
+
*/
|
|
13
|
+
export declare const COLLECTION_ARRAY_METHODS: Readonly<Record<string, readonly string[]>>;
|
|
14
|
+
/**
|
|
15
|
+
* True when `method` on cap `capName` is a COLLECTION cap's array-returning
|
|
16
|
+
* (non-subscription) method — the schema-free runner-side equivalent of
|
|
17
|
+
* `isCollectionArrayMethod(capDefsByName.get(capName), method)`.
|
|
18
|
+
*/
|
|
19
|
+
export declare function isCollectionArrayMethodName(capName: string, method: string): boolean;
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* scope+access check inside `protectedProcedure` (see
|
|
7
7
|
* `server/backend/src/api/trpc/trpc.middleware.ts`).
|
|
8
8
|
*
|
|
9
|
-
* Coverage:
|
|
9
|
+
* Coverage: 811 method paths across 117 capabilities.
|
|
10
10
|
*/
|
|
11
11
|
import type { CapabilityMethodAccess } from '../capabilities/capability-definition.js';
|
|
12
12
|
export interface MethodAccessRecord {
|
|
@@ -38,6 +38,7 @@ import type { settingsStoreCapability } from '../capabilities/settings-store.cap
|
|
|
38
38
|
import type { storageCapability } from '../capabilities/storage.cap.js';
|
|
39
39
|
import type { streamBrokerCapability } from '../capabilities/stream-broker.cap.js';
|
|
40
40
|
import type { systemCapability } from '../capabilities/system.cap.js';
|
|
41
|
+
import type { terminalSessionCapability } from '../capabilities/terminal-session.cap.js';
|
|
41
42
|
import type { toastCapability } from '../capabilities/toast.cap.js';
|
|
42
43
|
import type { turnProviderCapability } from '../capabilities/turn-provider.cap.js';
|
|
43
44
|
import type { userManagementCapability } from '../capabilities/user-management.cap.js';
|
|
@@ -88,6 +89,7 @@ export interface SystemProxy {
|
|
|
88
89
|
readonly storage: Pick<InferProvider<typeof storageCapability>, 'resolve' | 'write' | 'read' | 'exists' | 'list' | 'delete' | 'getAvailableSpace' | 'beginUpload' | 'writeChunk' | 'finalizeUpload' | 'abortUpload' | 'beginDownload' | 'readChunk' | 'endDownload' | 'listLocations' | 'getDefaultLocation' | 'listLocationDeclarations' | 'upsertLocation' | 'deleteLocation' | 'testLocation' | 'listProviders' | 'testConfig'>;
|
|
89
90
|
readonly streamBroker: Pick<InferProvider<typeof streamBrokerCapability>, 'listAllCameraStreams' | 'listAllProfileSlots' | 'getBrokerStats' | 'probeStream' | 'listClients' | 'killClient' | 'getStreamUrl' | 'getStreamWithCodec' | 'releaseStreamWithCodec' | 'subscribeAudioChunks' | 'pullAudioChunks' | 'unsubscribeAudioChunks' | 'subscribeFrames' | 'pullFrameHandles' | 'unsubscribeFrames' | 'setPreBufferDuration' | 'getPreBufferInfo' | 'getRtspPort' | 'getAllRtspEntries' | 'getRtspEntry' | 'regenerateRtspToken' | 'setRtspEnabled' | 'isRtspEnabled'>;
|
|
90
91
|
readonly system: Pick<InferProvider<typeof systemCapability>, 'info' | 'health' | 'featureFlags' | 'networkAddresses' | 'getRetentionConfig' | 'setRetentionConfig' | 'forceRetentionCleanup'>;
|
|
92
|
+
readonly terminalSession: Pick<InferProvider<typeof terminalSessionCapability>, 'listProfiles' | 'listSessions' | 'openSession' | 'resize' | 'close'>;
|
|
91
93
|
readonly toast: Pick<InferProvider<typeof toastCapability>, 'onToast'>;
|
|
92
94
|
readonly turnProvider: Pick<InferProvider<typeof turnProviderCapability>, 'getTurnServers'>;
|
|
93
95
|
readonly userManagement: Pick<InferProvider<typeof userManagementCapability>, 'listUsers' | 'createUser' | 'updateUser' | 'deleteUser' | 'resetPassword' | 'setUserScopes' | 'validateCredentials' | 'listApiKeys' | 'createApiKey' | 'revokeApiKey' | 'validateApiKey' | 'createScopedToken' | 'revokeScopedToken' | 'validateScopedToken' | 'listScopedTokens' | 'setupTotp' | 'confirmTotp' | 'disableTotp' | 'getTotpStatus' | 'verifyTotp' | 'oauthIssueCode' | 'oauthExchangeCode' | 'oauthRefresh' | 'oauthVerifyAccessToken' | 'listOauthSessions' | 'revokeOauthSession'>;
|
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_sleep = require("./sleep-
|
|
2
|
+
const require_sleep = require("./sleep-DRg9F6JJ.js");
|
|
3
3
|
const require_event_category = require("./event-category-Cdyife4p.js");
|
|
4
4
|
const require_enums = require("./enums.js");
|
|
5
5
|
const require_err_msg = require("./err-msg-COpsHMw2.js");
|
|
@@ -1704,47 +1704,6 @@ var RUNTIME_DEFAULTS = {
|
|
|
1704
1704
|
"auth.tokenExpiry": "7d"
|
|
1705
1705
|
};
|
|
1706
1706
|
//#endregion
|
|
1707
|
-
//#region src/cap-call-context.ts
|
|
1708
|
-
/**
|
|
1709
|
-
* Per-call node pinning for `ctx.api` capability calls.
|
|
1710
|
-
*
|
|
1711
|
-
* A capability call normally resolves to its DEFAULT provider — a `singleton`
|
|
1712
|
-
* cap resolves to the hub, a device-scoped cap to the device's owning node. To
|
|
1713
|
-
* query a SPECIFIC node's provider instead (e.g. a remote agent's own
|
|
1714
|
-
* in-process `platform-probe` hardware, which the hub cannot probe), pin the
|
|
1715
|
-
* call to that node.
|
|
1716
|
-
*
|
|
1717
|
-
* The nodeId rides OUT-OF-BAND in the tRPC call context (NOT in the validated
|
|
1718
|
-
* method args), so capability method signatures stay `nodeId`-free — node
|
|
1719
|
-
* targeting is a property of the CALL, not of the method. The transport lifts
|
|
1720
|
-
* it from `op.context` onto the `CapCallInput.nodeId` field (`ipcParentLink`),
|
|
1721
|
-
* and the hub parent's `onUnownedCall` passes it to the `CapRouteResolver`,
|
|
1722
|
-
* which classifies a pinned agent node as `agent-child-forward`
|
|
1723
|
-
* (`$agent-cap-fwd.forward` → the agent's in-process provider).
|
|
1724
|
-
*
|
|
1725
|
-
* Usage at a call site:
|
|
1726
|
-
*
|
|
1727
|
-
* await api.platformProbe.getCapabilities.query(undefined, nodePin(nodeId))
|
|
1728
|
-
*/
|
|
1729
|
-
/** tRPC `op.context` key carrying a per-call node pin. */
|
|
1730
|
-
var CAP_NODE_PIN_CONTEXT_KEY = "__camstackNodePin";
|
|
1731
|
-
/**
|
|
1732
|
-
* Build the tRPC request options that pin a single capability call to `nodeId`.
|
|
1733
|
-
* Pass as the second argument to `.query(input, …)` / `.mutate(input, …)`.
|
|
1734
|
-
*/
|
|
1735
|
-
function nodePin(nodeId) {
|
|
1736
|
-
return { context: { [CAP_NODE_PIN_CONTEXT_KEY]: nodeId } };
|
|
1737
|
-
}
|
|
1738
|
-
/**
|
|
1739
|
-
* Read a per-call node pin out of a tRPC `op.context` (transport side).
|
|
1740
|
-
* Returns the pinned nodeId, or `undefined` when no pin is present.
|
|
1741
|
-
*/
|
|
1742
|
-
function readNodePin(context) {
|
|
1743
|
-
if (context === null || typeof context !== "object") return void 0;
|
|
1744
|
-
const value = Reflect.get(context, CAP_NODE_PIN_CONTEXT_KEY);
|
|
1745
|
-
return typeof value === "string" ? value : void 0;
|
|
1746
|
-
}
|
|
1747
|
-
//#endregion
|
|
1748
1707
|
//#region src/utils/hf-url.ts
|
|
1749
1708
|
function hfModelUrl(repo, path) {
|
|
1750
1709
|
return `https://huggingface.co/${repo}/resolve/main/${path}`;
|
|
@@ -14719,6 +14678,13 @@ function createSystemProxy(api) {
|
|
|
14719
14678
|
setRetentionConfig: (input) => dispatch("system", "setRetentionConfig", "mutation", input),
|
|
14720
14679
|
forceRetentionCleanup: (input) => dispatch("system", "forceRetentionCleanup", "mutation", input)
|
|
14721
14680
|
},
|
|
14681
|
+
terminalSession: {
|
|
14682
|
+
listProfiles: (input) => dispatch("terminalSession", "listProfiles", "query", input),
|
|
14683
|
+
listSessions: (input) => dispatch("terminalSession", "listSessions", "query", input),
|
|
14684
|
+
openSession: (input) => dispatch("terminalSession", "openSession", "mutation", input),
|
|
14685
|
+
resize: (input) => dispatch("terminalSession", "resize", "mutation", input),
|
|
14686
|
+
close: (input) => dispatch("terminalSession", "close", "mutation", input)
|
|
14687
|
+
},
|
|
14722
14688
|
toast: { onToast: (input, push) => dispatch("toast", "onToast", "subscription", input, push) },
|
|
14723
14689
|
turnProvider: { getTurnServers: (input) => dispatch("turnProvider", "getTurnServers", "query", input) },
|
|
14724
14690
|
userManagement: {
|
|
@@ -16155,6 +16121,84 @@ var authProviderCapability = {
|
|
|
16155
16121
|
/** BIG PLAN 2: declarative mount hint — read by `@camstack/system` `buildCapRouters`. */
|
|
16156
16122
|
mount: { kind: "skip" }
|
|
16157
16123
|
};
|
|
16124
|
+
//#endregion
|
|
16125
|
+
//#region src/capabilities/terminal-session.cap.ts
|
|
16126
|
+
/**
|
|
16127
|
+
* A live terminal session hosted by the provider addon. Output and input do
|
|
16128
|
+
* NOT flow through the capability — they use the addon data plane
|
|
16129
|
+
* (`GET /addon/terminal/<id>/out` SSE, `POST /addon/terminal/<id>/in`) because
|
|
16130
|
+
* terminal output must be ordered and lossless. The event bus is telemetry and
|
|
16131
|
+
* may drop chunks ([D8]), and a dropped chunk desynchronises the vt parser
|
|
16132
|
+
* permanently until a full repaint. The capability owns only lifecycle.
|
|
16133
|
+
*/
|
|
16134
|
+
var TerminalSessionInfoSchema = zod.z.object({
|
|
16135
|
+
/** Opaque session id minted by the provider on `openSession`. */
|
|
16136
|
+
sessionId: zod.z.string(),
|
|
16137
|
+
/** The pre-declared profile this session runs (never a free-form command). */
|
|
16138
|
+
profileId: zod.z.string(),
|
|
16139
|
+
/** Human-readable profile label for the UI session list. */
|
|
16140
|
+
label: zod.z.string(),
|
|
16141
|
+
cols: zod.z.number().int().positive(),
|
|
16142
|
+
rows: zod.z.number().int().positive(),
|
|
16143
|
+
/** ms-epoch the session's pty was spawned. */
|
|
16144
|
+
startedAt: zod.z.number()
|
|
16145
|
+
});
|
|
16146
|
+
/**
|
|
16147
|
+
* A profile the operator may open — a pre-declared, allowlisted program
|
|
16148
|
+
* (`monitor` → `btm`). The capability accepts only these ids; a free-form
|
|
16149
|
+
* command string would be remote code execution as the server's user, so it is
|
|
16150
|
+
* deliberately not part of the contract.
|
|
16151
|
+
*/
|
|
16152
|
+
var TerminalProfileInfoSchema = zod.z.object({
|
|
16153
|
+
profileId: zod.z.string(),
|
|
16154
|
+
label: zod.z.string(),
|
|
16155
|
+
description: zod.z.string().optional()
|
|
16156
|
+
});
|
|
16157
|
+
/**
|
|
16158
|
+
* terminal-session — singleton system capability for interactive TTY sessions.
|
|
16159
|
+
*
|
|
16160
|
+
* Phase 1 (this cap): open/resize/close/list a pty running an allowlisted
|
|
16161
|
+
* profile, streamed to xterm.js over the data plane. Phase 2 (streaming a
|
|
16162
|
+
* session as a camera) is a separate device-provider concern and does not
|
|
16163
|
+
* change this contract.
|
|
16164
|
+
*/
|
|
16165
|
+
var terminalSessionCapability = {
|
|
16166
|
+
name: "terminal-session",
|
|
16167
|
+
scope: "system",
|
|
16168
|
+
mode: "singleton",
|
|
16169
|
+
methods: {
|
|
16170
|
+
/** Pre-declared profiles the operator may open. */
|
|
16171
|
+
listProfiles: require_sleep.method(zod.z.void(), zod.z.array(TerminalProfileInfoSchema).readonly(), { auth: "admin" }),
|
|
16172
|
+
/** Live sessions currently hosted by the provider. */
|
|
16173
|
+
listSessions: require_sleep.method(zod.z.void(), zod.z.array(TerminalSessionInfoSchema).readonly(), { auth: "admin" }),
|
|
16174
|
+
/**
|
|
16175
|
+
* Spawn a pty for an allowlisted profile at the given grid size and return
|
|
16176
|
+
* its session id. Output/input then flow over the data plane by that id.
|
|
16177
|
+
*/
|
|
16178
|
+
openSession: require_sleep.method(zod.z.object({
|
|
16179
|
+
profileId: zod.z.string(),
|
|
16180
|
+
cols: zod.z.number().int().positive(),
|
|
16181
|
+
rows: zod.z.number().int().positive()
|
|
16182
|
+
}), TerminalSessionInfoSchema, {
|
|
16183
|
+
kind: "mutation",
|
|
16184
|
+
auth: "admin"
|
|
16185
|
+
}),
|
|
16186
|
+
/** Resize a live session's pty (reflows the running program). */
|
|
16187
|
+
resize: require_sleep.method(zod.z.object({
|
|
16188
|
+
sessionId: zod.z.string(),
|
|
16189
|
+
cols: zod.z.number().int().positive(),
|
|
16190
|
+
rows: zod.z.number().int().positive()
|
|
16191
|
+
}), zod.z.void(), {
|
|
16192
|
+
kind: "mutation",
|
|
16193
|
+
auth: "admin"
|
|
16194
|
+
}),
|
|
16195
|
+
/** Terminate a live session and release its pty. */
|
|
16196
|
+
close: require_sleep.method(zod.z.object({ sessionId: zod.z.string() }), zod.z.void(), {
|
|
16197
|
+
kind: "mutation",
|
|
16198
|
+
auth: "admin"
|
|
16199
|
+
})
|
|
16200
|
+
}
|
|
16201
|
+
};
|
|
16158
16202
|
/**
|
|
16159
16203
|
* Orchestrator-side destination metadata. The orchestrator computes
|
|
16160
16204
|
* `id = <addonId>:<subId>` from its provider lookup so consumers
|
|
@@ -26288,6 +26332,7 @@ var CAPABILITY_NAMES = {
|
|
|
26288
26332
|
system: "system",
|
|
26289
26333
|
tamper: "tamper",
|
|
26290
26334
|
temperatureSensor: "temperature-sensor",
|
|
26335
|
+
terminalSession: "terminal-session",
|
|
26291
26336
|
toast: "toast",
|
|
26292
26337
|
turnProvider: "turn-provider",
|
|
26293
26338
|
update: "update",
|
|
@@ -26811,6 +26856,10 @@ var CAPABILITY_ROUTER_KEYS = [
|
|
|
26811
26856
|
key: "temperatureSensor",
|
|
26812
26857
|
name: "temperature-sensor"
|
|
26813
26858
|
},
|
|
26859
|
+
{
|
|
26860
|
+
key: "terminalSession",
|
|
26861
|
+
name: "terminal-session"
|
|
26862
|
+
},
|
|
26814
26863
|
{
|
|
26815
26864
|
key: "toast",
|
|
26816
26865
|
name: "toast"
|
|
@@ -27012,6 +27061,7 @@ var ALL_CAPABILITY_DEFINITIONS = [
|
|
|
27012
27061
|
systemCapability,
|
|
27013
27062
|
tamperCapability,
|
|
27014
27063
|
temperatureSensorCapability,
|
|
27064
|
+
terminalSessionCapability,
|
|
27015
27065
|
toastCapability,
|
|
27016
27066
|
turnProviderCapability,
|
|
27017
27067
|
updateCapability,
|
|
@@ -31495,6 +31545,36 @@ var METHOD_ACCESS_MAP = Object.freeze({
|
|
|
31495
31545
|
addonId: null,
|
|
31496
31546
|
access: "create"
|
|
31497
31547
|
},
|
|
31548
|
+
"terminalSession.close": {
|
|
31549
|
+
capName: "terminal-session",
|
|
31550
|
+
capScope: "system",
|
|
31551
|
+
addonId: null,
|
|
31552
|
+
access: "create"
|
|
31553
|
+
},
|
|
31554
|
+
"terminalSession.listProfiles": {
|
|
31555
|
+
capName: "terminal-session",
|
|
31556
|
+
capScope: "system",
|
|
31557
|
+
addonId: null,
|
|
31558
|
+
access: "view"
|
|
31559
|
+
},
|
|
31560
|
+
"terminalSession.listSessions": {
|
|
31561
|
+
capName: "terminal-session",
|
|
31562
|
+
capScope: "system",
|
|
31563
|
+
addonId: null,
|
|
31564
|
+
access: "view"
|
|
31565
|
+
},
|
|
31566
|
+
"terminalSession.openSession": {
|
|
31567
|
+
capName: "terminal-session",
|
|
31568
|
+
capScope: "system",
|
|
31569
|
+
addonId: null,
|
|
31570
|
+
access: "create"
|
|
31571
|
+
},
|
|
31572
|
+
"terminalSession.resize": {
|
|
31573
|
+
capName: "terminal-session",
|
|
31574
|
+
capScope: "system",
|
|
31575
|
+
addonId: null,
|
|
31576
|
+
access: "create"
|
|
31577
|
+
},
|
|
31498
31578
|
"toast.onToast": {
|
|
31499
31579
|
capName: "toast",
|
|
31500
31580
|
capScope: "system",
|
|
@@ -32050,6 +32130,7 @@ var KNOWN_CAP_NAMES = [
|
|
|
32050
32130
|
"stream-params",
|
|
32051
32131
|
"switch",
|
|
32052
32132
|
"system",
|
|
32133
|
+
"terminal-session",
|
|
32053
32134
|
"toast",
|
|
32054
32135
|
"turn-provider",
|
|
32055
32136
|
"update",
|
|
@@ -32181,6 +32262,7 @@ var SYSTEM_CAP_NAMES = [
|
|
|
32181
32262
|
"storage-provider",
|
|
32182
32263
|
"stream-broker",
|
|
32183
32264
|
"system",
|
|
32265
|
+
"terminal-session",
|
|
32184
32266
|
"toast",
|
|
32185
32267
|
"turn-provider",
|
|
32186
32268
|
"user-management",
|
|
@@ -32878,7 +32960,7 @@ exports.CAM_PROFILE_ORDER = require_sleep.CAM_PROFILE_ORDER;
|
|
|
32878
32960
|
exports.CAPABILITY_NAMES = CAPABILITY_NAMES;
|
|
32879
32961
|
exports.CAPABILITY_ROUTER_KEYS = CAPABILITY_ROUTER_KEYS;
|
|
32880
32962
|
exports.CAP_NAMES_WITH_STATUS = CAP_NAMES_WITH_STATUS;
|
|
32881
|
-
exports.CAP_NODE_PIN_CONTEXT_KEY = CAP_NODE_PIN_CONTEXT_KEY;
|
|
32963
|
+
exports.CAP_NODE_PIN_CONTEXT_KEY = require_sleep.CAP_NODE_PIN_CONTEXT_KEY;
|
|
32882
32964
|
exports.CAP_PROVIDER_KIND_MAP = CAP_PROVIDER_KIND_MAP;
|
|
32883
32965
|
exports.COCO_80_LABELS = COCO_80_LABELS;
|
|
32884
32966
|
exports.COCO_TO_MACRO = COCO_TO_MACRO;
|
|
@@ -33380,6 +33462,8 @@ exports.TargetKindLevelSchema = TargetKindLevelSchema;
|
|
|
33380
33462
|
exports.TargetKindSchema = TargetKindSchema;
|
|
33381
33463
|
exports.TargetSchema = TargetSchema;
|
|
33382
33464
|
exports.TemperatureSensorStatusSchema = TemperatureSensorStatusSchema;
|
|
33465
|
+
exports.TerminalProfileInfoSchema = TerminalProfileInfoSchema;
|
|
33466
|
+
exports.TerminalSessionInfoSchema = TerminalSessionInfoSchema;
|
|
33383
33467
|
exports.TestConnectionResultSchema = TestConnectionResultSchema$1;
|
|
33384
33468
|
exports.TestResultSchema = TestResultSchema;
|
|
33385
33469
|
exports.TimelapseRuleInputSchema = TimelapseRuleInputSchema;
|
|
@@ -33613,7 +33697,7 @@ exports.mqttBrokerCapability = mqttBrokerCapability;
|
|
|
33613
33697
|
exports.nativeObjectDetectionCapability = nativeObjectDetectionCapability;
|
|
33614
33698
|
exports.networkAccessCapability = networkAccessCapability;
|
|
33615
33699
|
exports.networkQualityCapability = networkQualityCapability;
|
|
33616
|
-
exports.nodePin = nodePin;
|
|
33700
|
+
exports.nodePin = require_sleep.nodePin;
|
|
33617
33701
|
exports.nodesCapability = nodesCapability;
|
|
33618
33702
|
exports.normalizeAddonInitResult = require_sleep.normalizeAddonInitResult;
|
|
33619
33703
|
exports.normalizeUnit = normalizeUnit;
|
|
@@ -33649,7 +33733,7 @@ exports.procedureAuthKey = procedureAuthKey;
|
|
|
33649
33733
|
exports.ptzAutotrackCapability = ptzAutotrackCapability;
|
|
33650
33734
|
exports.ptzCapability = ptzCapability;
|
|
33651
33735
|
exports.pythonScriptForBackend = pythonScriptForBackend;
|
|
33652
|
-
exports.readNodePin = readNodePin;
|
|
33736
|
+
exports.readNodePin = require_sleep.readNodePin;
|
|
33653
33737
|
exports.readinessKey = require_sleep.readinessKey;
|
|
33654
33738
|
exports.rebootCapability = rebootCapability;
|
|
33655
33739
|
exports.recordingCapability = recordingCapability;
|
|
@@ -33706,6 +33790,7 @@ exports.taskLogEntrySchema = taskLogEntrySchema;
|
|
|
33706
33790
|
exports.taskPhaseSchema = taskPhaseSchema;
|
|
33707
33791
|
exports.taskTargetSchema = taskTargetSchema;
|
|
33708
33792
|
exports.temperatureSensorCapability = temperatureSensorCapability;
|
|
33793
|
+
exports.terminalSessionCapability = terminalSessionCapability;
|
|
33709
33794
|
exports.textToHtml = textToHtml;
|
|
33710
33795
|
exports.toDeviceSummary = toDeviceSummary;
|
|
33711
33796
|
exports.toExpressionValue = toExpressionValue;
|
package/dist/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { $ as
|
|
1
|
+
import { $ as ProfileSlotSchema, A as parseJsonUnknown, B as BrokerStatsSchema, C as asBoolean, Ct as DisposerChain, D as asString, E as asNumber, F as ReadinessRegistry, G as CamStreamResolutionSchema, H as CAM_PROFILE_ORDER, I as ReadinessTimeoutError, J as DecodedFrameSchema, K as CameraStreamSchema, L as emitDownForOwnedCaps, M as nodePin, N as readNodePin, O as parseJsonArray, P as DATAPLANE_SECRET_HEADER, Q as ProfileRtspEntrySchema, R as readinessKey, S as DeviceType, St as resolveHydratedFieldValue, T as asJsonObject, U as CamProfileSchema, V as BrokerStatusSchema, W as CamStreamKindSchema, X as FrameHandleFormatSchema, Y as EncodedPacketSchema, Z as FrameHandleSchema, _ as resolveCapMount, _t as WELL_KNOWN_TABS, a as viewerUiCapability, at as SubscribeFramesInputSchema, b as DeviceFeature, bt as collectHydratedFieldValues, c as createLazyTrpcSource, ct as makeSourceBrokerId, d as DEVICE_SETTINGS_CONTRIBUTION_METHODS, dt as BaseAddon, et as ProfileSlotStatusSchema, f as DEVICE_STATUS_METHOD, ft as normalizeAddonInitResult, g as method, gt as isEvent, h as isDeviceConfigCap, ht as emitReadiness, i as deviceOpsCapability, it as SubscribeAudioChunksResultSchema, j as CAP_NODE_PIN_CONTEXT_KEY, k as parseJsonObject, l as createMirrorSource, lt as parseProfileBrokerId, m as expandCapMethods, mt as createEvent, n as sleepCancellable, nt as StreamSourceSchema, o as adminUiCapability, ot as SubscribeFramesResultSchema, p as event, pt as createDurableState, q as DecodedAudioChunkSchema, r as RawStateResultSchema, rt as SubscribeAudioChunksInputSchema, s as createDeviceProxy, st as makeProfileBrokerId, t as sleep, tt as StreamSourceEntrySchema, u as createSliceHandle, ut as selectAssignedProfileSlots, v as systemMethod, vt as WELL_KNOWN_TAB_MAP, w as asJsonArray, x as DeviceRole, xt as hydrateSchema, y as ChargingStatus, yt as collectHydratedFieldEntries, z as scopeKey } from "./sleep-C3ceNSsf.mjs";
|
|
2
2
|
import { t as EventCategory } from "./event-category-BLcNejAE.mjs";
|
|
3
3
|
import { EventSourceType } from "./enums.mjs";
|
|
4
4
|
import { t as errMsg } from "./err-msg-IQTHeDzc.mjs";
|
|
@@ -1703,47 +1703,6 @@ var RUNTIME_DEFAULTS = {
|
|
|
1703
1703
|
"auth.tokenExpiry": "7d"
|
|
1704
1704
|
};
|
|
1705
1705
|
//#endregion
|
|
1706
|
-
//#region src/cap-call-context.ts
|
|
1707
|
-
/**
|
|
1708
|
-
* Per-call node pinning for `ctx.api` capability calls.
|
|
1709
|
-
*
|
|
1710
|
-
* A capability call normally resolves to its DEFAULT provider — a `singleton`
|
|
1711
|
-
* cap resolves to the hub, a device-scoped cap to the device's owning node. To
|
|
1712
|
-
* query a SPECIFIC node's provider instead (e.g. a remote agent's own
|
|
1713
|
-
* in-process `platform-probe` hardware, which the hub cannot probe), pin the
|
|
1714
|
-
* call to that node.
|
|
1715
|
-
*
|
|
1716
|
-
* The nodeId rides OUT-OF-BAND in the tRPC call context (NOT in the validated
|
|
1717
|
-
* method args), so capability method signatures stay `nodeId`-free — node
|
|
1718
|
-
* targeting is a property of the CALL, not of the method. The transport lifts
|
|
1719
|
-
* it from `op.context` onto the `CapCallInput.nodeId` field (`ipcParentLink`),
|
|
1720
|
-
* and the hub parent's `onUnownedCall` passes it to the `CapRouteResolver`,
|
|
1721
|
-
* which classifies a pinned agent node as `agent-child-forward`
|
|
1722
|
-
* (`$agent-cap-fwd.forward` → the agent's in-process provider).
|
|
1723
|
-
*
|
|
1724
|
-
* Usage at a call site:
|
|
1725
|
-
*
|
|
1726
|
-
* await api.platformProbe.getCapabilities.query(undefined, nodePin(nodeId))
|
|
1727
|
-
*/
|
|
1728
|
-
/** tRPC `op.context` key carrying a per-call node pin. */
|
|
1729
|
-
var CAP_NODE_PIN_CONTEXT_KEY = "__camstackNodePin";
|
|
1730
|
-
/**
|
|
1731
|
-
* Build the tRPC request options that pin a single capability call to `nodeId`.
|
|
1732
|
-
* Pass as the second argument to `.query(input, …)` / `.mutate(input, …)`.
|
|
1733
|
-
*/
|
|
1734
|
-
function nodePin(nodeId) {
|
|
1735
|
-
return { context: { [CAP_NODE_PIN_CONTEXT_KEY]: nodeId } };
|
|
1736
|
-
}
|
|
1737
|
-
/**
|
|
1738
|
-
* Read a per-call node pin out of a tRPC `op.context` (transport side).
|
|
1739
|
-
* Returns the pinned nodeId, or `undefined` when no pin is present.
|
|
1740
|
-
*/
|
|
1741
|
-
function readNodePin(context) {
|
|
1742
|
-
if (context === null || typeof context !== "object") return void 0;
|
|
1743
|
-
const value = Reflect.get(context, CAP_NODE_PIN_CONTEXT_KEY);
|
|
1744
|
-
return typeof value === "string" ? value : void 0;
|
|
1745
|
-
}
|
|
1746
|
-
//#endregion
|
|
1747
1706
|
//#region src/utils/hf-url.ts
|
|
1748
1707
|
function hfModelUrl(repo, path) {
|
|
1749
1708
|
return `https://huggingface.co/${repo}/resolve/main/${path}`;
|
|
@@ -14718,6 +14677,13 @@ function createSystemProxy(api) {
|
|
|
14718
14677
|
setRetentionConfig: (input) => dispatch("system", "setRetentionConfig", "mutation", input),
|
|
14719
14678
|
forceRetentionCleanup: (input) => dispatch("system", "forceRetentionCleanup", "mutation", input)
|
|
14720
14679
|
},
|
|
14680
|
+
terminalSession: {
|
|
14681
|
+
listProfiles: (input) => dispatch("terminalSession", "listProfiles", "query", input),
|
|
14682
|
+
listSessions: (input) => dispatch("terminalSession", "listSessions", "query", input),
|
|
14683
|
+
openSession: (input) => dispatch("terminalSession", "openSession", "mutation", input),
|
|
14684
|
+
resize: (input) => dispatch("terminalSession", "resize", "mutation", input),
|
|
14685
|
+
close: (input) => dispatch("terminalSession", "close", "mutation", input)
|
|
14686
|
+
},
|
|
14721
14687
|
toast: { onToast: (input, push) => dispatch("toast", "onToast", "subscription", input, push) },
|
|
14722
14688
|
turnProvider: { getTurnServers: (input) => dispatch("turnProvider", "getTurnServers", "query", input) },
|
|
14723
14689
|
userManagement: {
|
|
@@ -16154,6 +16120,84 @@ var authProviderCapability = {
|
|
|
16154
16120
|
/** BIG PLAN 2: declarative mount hint — read by `@camstack/system` `buildCapRouters`. */
|
|
16155
16121
|
mount: { kind: "skip" }
|
|
16156
16122
|
};
|
|
16123
|
+
//#endregion
|
|
16124
|
+
//#region src/capabilities/terminal-session.cap.ts
|
|
16125
|
+
/**
|
|
16126
|
+
* A live terminal session hosted by the provider addon. Output and input do
|
|
16127
|
+
* NOT flow through the capability — they use the addon data plane
|
|
16128
|
+
* (`GET /addon/terminal/<id>/out` SSE, `POST /addon/terminal/<id>/in`) because
|
|
16129
|
+
* terminal output must be ordered and lossless. The event bus is telemetry and
|
|
16130
|
+
* may drop chunks ([D8]), and a dropped chunk desynchronises the vt parser
|
|
16131
|
+
* permanently until a full repaint. The capability owns only lifecycle.
|
|
16132
|
+
*/
|
|
16133
|
+
var TerminalSessionInfoSchema = z.object({
|
|
16134
|
+
/** Opaque session id minted by the provider on `openSession`. */
|
|
16135
|
+
sessionId: z.string(),
|
|
16136
|
+
/** The pre-declared profile this session runs (never a free-form command). */
|
|
16137
|
+
profileId: z.string(),
|
|
16138
|
+
/** Human-readable profile label for the UI session list. */
|
|
16139
|
+
label: z.string(),
|
|
16140
|
+
cols: z.number().int().positive(),
|
|
16141
|
+
rows: z.number().int().positive(),
|
|
16142
|
+
/** ms-epoch the session's pty was spawned. */
|
|
16143
|
+
startedAt: z.number()
|
|
16144
|
+
});
|
|
16145
|
+
/**
|
|
16146
|
+
* A profile the operator may open — a pre-declared, allowlisted program
|
|
16147
|
+
* (`monitor` → `btm`). The capability accepts only these ids; a free-form
|
|
16148
|
+
* command string would be remote code execution as the server's user, so it is
|
|
16149
|
+
* deliberately not part of the contract.
|
|
16150
|
+
*/
|
|
16151
|
+
var TerminalProfileInfoSchema = z.object({
|
|
16152
|
+
profileId: z.string(),
|
|
16153
|
+
label: z.string(),
|
|
16154
|
+
description: z.string().optional()
|
|
16155
|
+
});
|
|
16156
|
+
/**
|
|
16157
|
+
* terminal-session — singleton system capability for interactive TTY sessions.
|
|
16158
|
+
*
|
|
16159
|
+
* Phase 1 (this cap): open/resize/close/list a pty running an allowlisted
|
|
16160
|
+
* profile, streamed to xterm.js over the data plane. Phase 2 (streaming a
|
|
16161
|
+
* session as a camera) is a separate device-provider concern and does not
|
|
16162
|
+
* change this contract.
|
|
16163
|
+
*/
|
|
16164
|
+
var terminalSessionCapability = {
|
|
16165
|
+
name: "terminal-session",
|
|
16166
|
+
scope: "system",
|
|
16167
|
+
mode: "singleton",
|
|
16168
|
+
methods: {
|
|
16169
|
+
/** Pre-declared profiles the operator may open. */
|
|
16170
|
+
listProfiles: method(z.void(), z.array(TerminalProfileInfoSchema).readonly(), { auth: "admin" }),
|
|
16171
|
+
/** Live sessions currently hosted by the provider. */
|
|
16172
|
+
listSessions: method(z.void(), z.array(TerminalSessionInfoSchema).readonly(), { auth: "admin" }),
|
|
16173
|
+
/**
|
|
16174
|
+
* Spawn a pty for an allowlisted profile at the given grid size and return
|
|
16175
|
+
* its session id. Output/input then flow over the data plane by that id.
|
|
16176
|
+
*/
|
|
16177
|
+
openSession: method(z.object({
|
|
16178
|
+
profileId: z.string(),
|
|
16179
|
+
cols: z.number().int().positive(),
|
|
16180
|
+
rows: z.number().int().positive()
|
|
16181
|
+
}), TerminalSessionInfoSchema, {
|
|
16182
|
+
kind: "mutation",
|
|
16183
|
+
auth: "admin"
|
|
16184
|
+
}),
|
|
16185
|
+
/** Resize a live session's pty (reflows the running program). */
|
|
16186
|
+
resize: method(z.object({
|
|
16187
|
+
sessionId: z.string(),
|
|
16188
|
+
cols: z.number().int().positive(),
|
|
16189
|
+
rows: z.number().int().positive()
|
|
16190
|
+
}), z.void(), {
|
|
16191
|
+
kind: "mutation",
|
|
16192
|
+
auth: "admin"
|
|
16193
|
+
}),
|
|
16194
|
+
/** Terminate a live session and release its pty. */
|
|
16195
|
+
close: method(z.object({ sessionId: z.string() }), z.void(), {
|
|
16196
|
+
kind: "mutation",
|
|
16197
|
+
auth: "admin"
|
|
16198
|
+
})
|
|
16199
|
+
}
|
|
16200
|
+
};
|
|
16157
16201
|
/**
|
|
16158
16202
|
* Orchestrator-side destination metadata. The orchestrator computes
|
|
16159
16203
|
* `id = <addonId>:<subId>` from its provider lookup so consumers
|
|
@@ -26287,6 +26331,7 @@ var CAPABILITY_NAMES = {
|
|
|
26287
26331
|
system: "system",
|
|
26288
26332
|
tamper: "tamper",
|
|
26289
26333
|
temperatureSensor: "temperature-sensor",
|
|
26334
|
+
terminalSession: "terminal-session",
|
|
26290
26335
|
toast: "toast",
|
|
26291
26336
|
turnProvider: "turn-provider",
|
|
26292
26337
|
update: "update",
|
|
@@ -26810,6 +26855,10 @@ var CAPABILITY_ROUTER_KEYS = [
|
|
|
26810
26855
|
key: "temperatureSensor",
|
|
26811
26856
|
name: "temperature-sensor"
|
|
26812
26857
|
},
|
|
26858
|
+
{
|
|
26859
|
+
key: "terminalSession",
|
|
26860
|
+
name: "terminal-session"
|
|
26861
|
+
},
|
|
26813
26862
|
{
|
|
26814
26863
|
key: "toast",
|
|
26815
26864
|
name: "toast"
|
|
@@ -27011,6 +27060,7 @@ var ALL_CAPABILITY_DEFINITIONS = [
|
|
|
27011
27060
|
systemCapability,
|
|
27012
27061
|
tamperCapability,
|
|
27013
27062
|
temperatureSensorCapability,
|
|
27063
|
+
terminalSessionCapability,
|
|
27014
27064
|
toastCapability,
|
|
27015
27065
|
turnProviderCapability,
|
|
27016
27066
|
updateCapability,
|
|
@@ -31494,6 +31544,36 @@ var METHOD_ACCESS_MAP = Object.freeze({
|
|
|
31494
31544
|
addonId: null,
|
|
31495
31545
|
access: "create"
|
|
31496
31546
|
},
|
|
31547
|
+
"terminalSession.close": {
|
|
31548
|
+
capName: "terminal-session",
|
|
31549
|
+
capScope: "system",
|
|
31550
|
+
addonId: null,
|
|
31551
|
+
access: "create"
|
|
31552
|
+
},
|
|
31553
|
+
"terminalSession.listProfiles": {
|
|
31554
|
+
capName: "terminal-session",
|
|
31555
|
+
capScope: "system",
|
|
31556
|
+
addonId: null,
|
|
31557
|
+
access: "view"
|
|
31558
|
+
},
|
|
31559
|
+
"terminalSession.listSessions": {
|
|
31560
|
+
capName: "terminal-session",
|
|
31561
|
+
capScope: "system",
|
|
31562
|
+
addonId: null,
|
|
31563
|
+
access: "view"
|
|
31564
|
+
},
|
|
31565
|
+
"terminalSession.openSession": {
|
|
31566
|
+
capName: "terminal-session",
|
|
31567
|
+
capScope: "system",
|
|
31568
|
+
addonId: null,
|
|
31569
|
+
access: "create"
|
|
31570
|
+
},
|
|
31571
|
+
"terminalSession.resize": {
|
|
31572
|
+
capName: "terminal-session",
|
|
31573
|
+
capScope: "system",
|
|
31574
|
+
addonId: null,
|
|
31575
|
+
access: "create"
|
|
31576
|
+
},
|
|
31497
31577
|
"toast.onToast": {
|
|
31498
31578
|
capName: "toast",
|
|
31499
31579
|
capScope: "system",
|
|
@@ -32049,6 +32129,7 @@ var KNOWN_CAP_NAMES = [
|
|
|
32049
32129
|
"stream-params",
|
|
32050
32130
|
"switch",
|
|
32051
32131
|
"system",
|
|
32132
|
+
"terminal-session",
|
|
32052
32133
|
"toast",
|
|
32053
32134
|
"turn-provider",
|
|
32054
32135
|
"update",
|
|
@@ -32180,6 +32261,7 @@ var SYSTEM_CAP_NAMES = [
|
|
|
32180
32261
|
"storage-provider",
|
|
32181
32262
|
"stream-broker",
|
|
32182
32263
|
"system",
|
|
32264
|
+
"terminal-session",
|
|
32183
32265
|
"toast",
|
|
32184
32266
|
"turn-provider",
|
|
32185
32267
|
"user-management",
|
|
@@ -32783,4 +32865,4 @@ function enumerateInferenceDevices(hw) {
|
|
|
32783
32865
|
return out;
|
|
32784
32866
|
}
|
|
32785
32867
|
//#endregion
|
|
32786
|
-
export { ACCESSORY_LABEL, ALL_CAPABILITY_DEFINITIONS, APPLE_SA_TO_MACRO, AUDIO_BACKEND_CHOICES, AUDIO_MACRO_LABELS, AccessoriesStatusSchema, AccessoryKind, AddBrokerInputSchema, AddonAutoUpdateSchema, AddonListItemSchema, AddonPageDeclarationSchema, AddonPageInfoSchema, AdoptInputSchema as AdoptionAdoptInputSchema, AdoptResultSchema as AdoptionAdoptResultSchema, AdoptionFilterSchema, GetCandidateInputSchema as AdoptionGetCandidateInputSchema, ListCandidatesInputSchema as AdoptionListCandidatesInputSchema, ListCandidatesOutputSchema as AdoptionListCandidatesOutputSchema, ReleaseInputSchema as AdoptionReleaseInputSchema, AdoptionStatusSchema, AgentLoadSummarySchema, AirQualitySensorStatusSchema, AlarmArmModeSchema, AlarmPanelStatusSchema, AlarmStateSchema, AlertSchema, AlertSeveritySchema, AlertSourceSchema, AlertStatusSchema, AmbientLightSensorStatusSchema, ApiKeyRecordSchema, ApiKeySummarySchema, ArchiveEntrySchema, ArchiveManifestSchema, AttachmentMediaTypeSchema, AttachmentSchema, AudioAnalysisResultSchema, AudioAnalysisSettingsSchema, AudioChunkInputSchema, AudioClassSummarySchema, AudioClassificationLabelSchema, AudioClassificationResultSchema, AudioCodecInfoSchema, AudioDecodeSessionConfigSchema, AudioEncodeSchema, AudioEncodeSessionConfigSchema, AudioEncodedChunkSchema, AudioEventSchema, AudioLevelSchema, AudioMetricsHistoryPointSchema, AudioMetricsHistorySchema, AudioMetricsSnapshotSchema, AudioPcmChunkSchema, AuthResultSchema, AutoUpdateSettingsSchema, AutomationControlStatusSchema, AvailableIntegrationTypeSchema, BACKEND_TO_FORMAT, BATTERY_DEVICE_PROFILE, BacklightModeSchema, BackupDestinationInfoSchema, BackupEntrySchema, BaseAddon, BaseDevice, BaseDeviceProvider, BatteryStatusSchema, BinaryStatusSchema, BoundingBoxSchema, BrightnessStatusSchema, AddInputSchema as BrokerAddInputSchema, BrokerAudioClientSchema, BrokerClientsSchema, BrokerConnectionDetailsSchema, BrokerConsumerAttributionSchema, BrokerConsumerKindSchema, BrokerDecodedClientSchema, BrokerEncodedClientSchema, GetStateInputSchema as BrokerGetStateInputSchema, BrokerInfoSchema, BrokerProviderInfoSchema, PublishInputSchema as BrokerPublishInputSchema, RegistryStatusSchema as BrokerRegistryStatusSchema, BrokerRtspClientSchema, BrokerStatsSchema, BrokerStatusEnum, BrokerStatusSchema, SubscribeInputSchema as BrokerSubscribeInputSchema, SubscribeResultSchema as BrokerSubscribeResultSchema, TestConnectionResultSchema as BrokerTestConnectionResultSchema, UnsubscribeInputSchema as BrokerUnsubscribeInputSchema, CAM_PROFILE_ORDER, CAPABILITY_NAMES, CAPABILITY_ROUTER_KEYS, CAP_NAMES_WITH_STATUS, CAP_NODE_PIN_CONTEXT_KEY, CAP_PROVIDER_KIND_MAP, COCO_80_LABELS, COCO_TO_MACRO, CamProfileSchema, CamStreamDescriptorSchema, CamStreamKindSchema, CamStreamResolutionSchema, CameraAssignmentStatusSchema, CameraAudioStatusSchema, CameraBrokerProfileSchema, CameraBrokerStatusSchema, CameraCredentialsSchema, CameraCredentialsStatusSchema, CameraDecoderShmSchema, CameraDecoderStatusSchema, CameraDetectionPhaseSchema, CameraDetectionProvisioningSchema, CameraDetectionProvisioningStateSchema, CameraDetectionStatusSchema, CameraMetricsSchema, CameraMetricsWithDeviceIdSchema, CameraMotionStatusSchema, CameraRecordingModeSchema, CameraRecordingStatusSchema, CameraSourceStatusSchema, CameraSourceStreamSchema, CameraStatusSchema, CameraStreamSchema, CandidateQueryFilterSchema, CapScopeSchema, CapabilityBindingsSchema, CarbonMonoxideStatusSchema, ChargingStatus, ClientNetworkStatsSchema, ClimateControlStatusSchema, ClipPlaybackSchema, ClipSchema, ClusterAddonNodeDeploymentSchema, ClusterAddonStatusEntrySchema, CollectionColumnSchema, CollectionIndexSchema, ColorStatusSchema, ConfigEntrySchema, ConfigSectionWithValuesSchema, ConfigTabDeclarationSchema, ConnectivityStatusSchema, ConsumableItemSchema, ConsumablesStatusSchema, ContactStatusSchema, ControlKindSchema, ControlStatusSchema, ConvertArtifactSchema, ConvertResultSchema, ConvertTargetSchema, CoverStateSchema, CoverStatusSchema, CreateApiKeyInputSchema, CreateApiKeyResultSchema, CreateIntegrationInputSchema, CreateScopedTokenInputSchema, CreateScopedTokenResultSchema, CreateUserInputSchema, CustomActionInputSchema, CustomModelDescriptorSchema, DATAPLANE_SECRET_HEADER, DEFAULT_ADDON_PLACEMENT, DEFAULT_AUDIO_ANALYZER_CONFIG, DEFAULT_DECODER_HWACCEL_CONFIG, DEFAULT_EVENT_COLOR, DEFAULT_FEATURES, DEFAULT_RETENTION, DEFAULT_SCRUB_THUMBNAIL_PRESET, DEVICE_BACKEND_TO_FORMAT, DEVICE_CAP_NAMES, DEVICE_PROFILES, DEVICE_SETTINGS_CONTRIBUTION_METHODS, DEVICE_STATUS_METHOD, DEVICE_TYPE_CONTROL_KIND, DEVICE_TYPE_INFO, DayNightModeSchema, DayNightOptionsSchema, DayNightSettingsPatchSchema, DayNightStatusSchema, DecodedAudioChunkSchema, DecodedFrameSchema, DecoderSessionConfigSchema, DecoderStatsSchema, DeleteIntegrationResultSchema, DetectionSourceSchema, DeviceCodeSeveritySchema, DeviceConfig, DeviceDiscoveryStatusSchema, ExposeInputSchema as DeviceExportExposeInputSchema, DeviceExportStatusSchema, UnexposeInputSchema as DeviceExportUnexposeInputSchema, DeviceFeature, DeviceInfoSchema, DeviceLinkModeSchema, DeviceNetworkStatsSchema, DeviceRole, DeviceRuntimeState, DeviceStatusSchema, DeviceType, DiscoveredChildDeviceSchema, DiscoveredChildStatusSchema, DiscoveredDeviceSchema, DiscoveredTargetSchema, DisposerChain, DoorbellPressEventSchema, DoorbellStatusSchema, EVENTFUL_CAP_NAMES, EVENT_KIND_BY_CAP, EVENT_PAD_MS, EVENT_TAXONOMY, EXPRESSION_BUILTINS, EXPRESSION_BUILTIN_NAMES, EXPRESSION_COMPILE_CACHE_CAPACITY, EXPRESSION_IDENTIFIER_RE, EXPRESSION_INJECTED_NOW, ElementConfigStore, EmbeddingInfoSchema, EmbeddingResultSchema, EncodeProfileSchema, EncodedPacketSchema, EnrichedWidgetMetadataSchema, EnumSensorDateTimeFormatSchema, EnumSensorStatusSchema, EventCategory, EventEmitterStatusSchema, EventFireSchema, EventItemSchema, EventKindCategorySchema, EventKindDescriptorSchema, EventKindIconSchema, EventKindSchema, EventSourceType, ExportDownloadSchema, ExportOptionsSchema, ExportRecordSchema, ExportSetupFieldSchema, ExportSetupSchema, ExportSpeedSchema, ExportStateSchema, ExportTimelapseSchema, ExposedDeviceSchema, ExposureModeSchema, ExpressionEvalError, ExpressionParseError, FanControlStatusSchema, FanDirectionSchema, FeatureManifestSchema, FeatureProbeStatusSchema, FloodStatusSchema, FrameHandleFormatSchema, FrameHandleSchema, FrameInputSchema, GasStatusSchema, GetStreamWithCodecInputSchema, GlobalMetricsSchema, HF_BASE_URL, HF_REPO, HWACCEL_OPTIONS, HealthStatusSchema, HistoryPointSchema, HistoryResolutionEnum, HumidifierStatusSchema, HumiditySensorStatusSchema, HvacModeSchema, ImageRotateSchema, ImageSettingsOptionsSchema, ImageSettingsPatchSchema, ImageSettingsStatusSchema, ImageStatusSchema, IngestOwnerSchema, InstalledPackageSchema, IntegrationLiteSchema, IntegrationWithStateSchema, IntercomAbilitySchema, IntercomStatusSchema, KNOWN_CAP_NAMES, KeyEventSchema, LOG_LEVEL_RANK, LabelDefinitionSchema, LawnMowerActivitySchema, LawnMowerControlStatusSchema, LinkedDeviceSchema, LlmDefaultSchema, LlmDefaultSelectorSchema, LlmErrorCodeSchema, LlmGenerateBaseInputSchema, LlmGenerateErrSchema, LlmGenerateOkSchema, LlmGenerateResultSchema, LlmImageSchema, LlmNodeModelSchema, LlmProfileKindDescriptorSchema, LlmProfileKindSchema, LlmProfileSchema, LlmRuntimeCompleteInputSchema, LlmRuntimeDiskUsageSchema, LlmRuntimeNodeSchema, LlmRuntimeStatusSchema, LlmUsageRollupSchema, LlmUsageSchema, LocateSegmentResultSchema, LocationStatSchema, LockControlStatusSchema, LockStateSchema, LogEntrySchema, LogLevelSchema, LogStreamEntrySchema, LoginMethodContributionSchema, LoginStageEnum, MACRO_LABELS, MAX_EXPRESSION_AST_NODES, MAX_EXPRESSION_BINDINGS, MAX_EXPRESSION_CALL_ARGS, MAX_EXPRESSION_EVAL_STEPS, MAX_EXPRESSION_SOURCE_LENGTH, METHOD_ACCESS_MAP, MODEL_FORMATS, MOTION_TRIGGER_FEATURE, ManagedModelCatalogEntrySchema, ManagedModelRefSchema, ManagedRuntimeConfigSchema, MaskGridDimsSchema, MaskGridShapeSchema, MaskLineShapeSchema, MaskPointSchema, MaskPolygonShapeSchema, MaskPolygonVerticesSchema, MaskRectShapeSchema, MaskShapeKindSchema, MaskShapeSchema, MediaFileSchema, MediaPlayerRepeatSchema, MediaPlayerStateSchema, MediaPlayerStatusSchema, MeshPeerSchema, MeshStatusSchema, MethodAccessSchema, ModelCatalogEntrySchema, ModelConvertInputSchema, ModelConvertMetadataSchema, ModelDistributeInputSchema, ModelDistributeResultSchema, ModelExtraFileSchema, ModelFormatEntrySchema, ModelFormatsSchema, ModelSubstitutionSchema, ModelVariantGroupSchema, MotionAnalysisResultSchema, MotionEventSchema, MotionOnMotionChangedDataSchema, MotionRegionSchema, MotionSourceEnum, MotionSourcesSchema, MotionStatusSchema, MotionTriggerRuntimeStateSchema, MotionTriggerStatusSchema, MotionZoneOptionsSchema, MotionZonePatchSchema, MotionZoneRegionSchema, MotionZoneStatusSchema, StatusSchema as MqttBrokerStatusSchema, NC_CONDITION_CATALOG, NC_HISTORY_LIMIT_DEFAULT, NC_HISTORY_LIMIT_MAX, NC_MAX_PER_TRACK_IMMEDIATE, NC_TAXONOMY, NativeCropBboxSchema, NativeCropRefSchema, NativeCropResultSchema, NativeDetectionSchema, NativeObjectClassEnum, NativeObjectDetectionRuntimeStateSchema, NativeObjectDetectionStatusSchema, NcConditionDescriptorSchema, NcConditionsSchema, NcDeliverySchema, NcHistoryEntrySchema, NcHistoryFilterSchema, NcHistoryRecordKindSchema, NcHistoryStatusSchema, NcHistorySubjectSchema, NcMediaPolicySchema, NcOccupancyConditionSchema, NcPlateMatcherSchema, NcRuleInputSchema, NcRulePatchSchema, NcRuleSchema, NcRuleTargetSchema, NcScheduleSchema, NcScheduleWindowSchema, NcTaxonomyEntrySchema, NcTaxonomySchema, NcTestResultSchema, NcThrottleSchema, NcZoneConditionSchema, NetworkAccessStatusSchema, NetworkAddressSchema, NetworkEndpointSchema, NotificationActionSchema, NotificationFormatSchema, NotificationSchema, NotifierStatusSchema, NumericSensorStatusSchema, OPS_LOG_DEFAULT_LIMIT, OPS_LOG_RING_DEFAULT_MAX, OauthIntegrationDescriptorSchema, ObjectEventSchema, OpsLogDomainSchema, OpsLogEntrySchema, OpsLogOpSchema, OpsLogQueryInputSchema, OpsLogReasonSchema, OrchestratorMetricsSchema, OsdOverlayKindEnum, OsdOverlayPatchSchema, OsdOverlaySchema, OsdPositionEnum, OsdStatusSchema, PET_FEEDER_MANUAL_FEED_MAX, PET_FEEDER_MANUAL_FEED_MIN, PIPELINE_FLOW_CAPABILITY_NAMES, PIPELINE_OWNER_CAPABILITY_NAMES, PROVIDER_KIND_CAP_NAMES, PYTHON_SCRIPT, PackageUpdateSchema, PackageVersionInfoSchema, PasskeyLoginMethodSchema, PasskeySummarySchema, PcmSampleFormatSchema, PerScopeBreakdownSchema, PetFeederStatusSchema, PickStreamPreferencesSchema, PickStreamRequirementsSchema, PickedCamStreamSchema, PipelineAssignmentSchema, PipelineDefaultStepSchema, PipelineEngineChoiceSchema, PipelineRunResultBridge, PipelineStepInputSchema, PipelineValidationIssueSchema, PipelineValidationResultSchema, PlaceholderReasonSchema, PolygonPointSchema, PowerMeterStatusSchema, PresenceStatusSchema, PressureSensorStatusSchema, PrivacyMaskOptionsSchema, PrivacyMaskPatchSchema, PrivacyMaskRegionSchema, PrivacyMaskShapeSchema, PrivacyMaskStatusSchema, ProfileRtspEntrySchema, ProfileSlotSchema, ProfileSlotStatusSchema, ProviderStatusSchema, PtzAutotrackRuntimeStateSchema, PtzAutotrackSettingsSchema, PtzAutotrackStatusSchema, PtzAutotrackTargetOptionSchema, PtzMoveCommandSchema, PtzOptionsSchema, PtzPositionSchema, PtzPresetSchema, PtzStatusSchema, QueryFilterSchema, REACHABILITY_FAILURES_TO_OFFLINE, REACHABILITY_POLL_INTERVAL_MS, REACHABILITY_PROBE_TIMEOUT_MS, RECOGNITION_TYPES, RESERVED_BINDING_NAMES, RUNTIME_DEFAULTS, RUNTIME_TO_FORMAT, RawStateResultSchema, ReadSegmentBytesResultSchema, ReadinessRegistry, ReadinessTimeoutError, RecentTracksPageSchema, RecentTracksQueryInput, RecordingAvailabilitySchema, RecordingBandModeSchema, RecordingBandSchema, RecordingBandTriggersSchema, RecordingConfigSchema, RecordingDaysSchema, RecordingDeviceUsageSchema, RecordingLocationUsageSchema, RecordingManifestSchema, RecordingModeSchema, RecordingRangeSchema, RecordingRetentionSchema, RecordingRuleSchema, RecordingScheduleSchema, RecordingStatusSchema, RecordingStorageModeSchema, RecordingStorageUsageSchema, RecordingTriggersSchema, RecordingWeekdaySchema, RedirectLoginMethodSchema, RenderedAsSchema, ReportMotionInputSchema, RingBuffer, RtpSourceSchema, RtspRestreamEntrySchema, RunnerCameraConfigSchema, RunnerCameraDeviceUIFields, RunnerFrameSourceSchema, RunnerInferenceDeviceSchema, RunnerLocalLoadSchema, RunnerLocalMetricsSchema, SCOPE_PRESETS, SCRUB_THUMBNAIL_PRESETS, SCRUB_THUMBNAIL_PRESET_LABELS, SCRUB_THUMBNAIL_PRESET_ORDER, SENSOR_FEATURES, SENSOR_MAP, SOURCE_INFO_METADATA_KEY, STREAM_PROFILE_META, STREAM_QUALITY_LABELS, SUB_DETECTION_TYPES, SYSTEM_CAP_NAMES, SceneCheckSchema, SceneConditionSchema, SceneMonitorSchema, SceneMonitorStateSchema, SceneMonitorStatusSchema, SceneReferenceSchema, ScopedTokenSchema, ScopedTokenSummarySchema, ScoredObjectEventSchema, ScriptRunnerStatusSchema, ScrubThumbnailPresetSchema, SearchResultSchema, SendEmailInputSchema, SendEmailResultSchema, SendResultSchema, SensorEventSchema, ServerBootModeSchema, ServerPackageStatusSchema, ServerRollbackInfoSchema, ServerUpdateActionResultSchema, ServerUpdateCheckResultSchema, ServerUpdateStateSchema, SettingsPatchSchema, SettingsRecordSchema, SettingsSchemaWithValuesSchema, SettingsUpdateResultSchema, ShmRingStatsSchema, SmokeStatusSchema, SmtpStatusSchema, SnapshotImageSchema, SourceInfoSchema, SpatialDetectionSchema, SsoBridgeClaimsSchema, StartEmbeddedInputSchema, StationaryObjectSchema, AbortUploadInputSchema as StorageAbortUploadInputSchema, BeginDownloadInputSchema as StorageBeginDownloadInputSchema, BeginDownloadResultSchema as StorageBeginDownloadResultSchema, BeginUploadInputSchema as StorageBeginUploadInputSchema, BeginUploadResultSchema as StorageBeginUploadResultSchema, EndDownloadInputSchema as StorageEndDownloadInputSchema, FinalizeUploadInputSchema as StorageFinalizeUploadInputSchema, StorageLocationDeclarationSchema, StorageLocationRefSchema, StorageLocationSchema, StorageLocationTypeSchema, ProviderInfoSchema as StorageProviderInfoSchema, ReadChunkInputSchema as StorageReadChunkInputSchema, TestLocationResultSchema as StorageTestLocationResultSchema, WriteChunkInputSchema as StorageWriteChunkInputSchema, StreamCodecSchema, StreamFormatSchema, StreamNetworkStatsSchema, StreamParamsOptionsSchema, StreamParamsStatusSchema, StreamProfileConfigSchema, StreamProfileOptionsSchema, StreamProfilePatchSchema, StreamProfileSchema, StreamSourceEntrySchema, StreamSourceSchema, SubscribeAudioChunksInputSchema, SubscribeAudioChunksResultSchema, SubscribeFramesInputSchema, SubscribeFramesResultSchema, SwitchStatusSchema, SystemMetricsSchema, SystemMirror, TAXONOMY_COLORS, TIMEZONES, TamperStatusSchema, TankStatusSchema, TargetKindCapsSchema, TargetKindLevelSchema, TargetKindSchema, TargetSchema, TemperatureSensorStatusSchema, TestConnectionResultSchema$1 as TestConnectionResultSchema, TestResultSchema, TimelapseRuleInputSchema, TimelapseRulePatchSchema, TimelapseRuleSchema, TimelapseTemplateSchema, ToastSchema, TokenScopeSchema, TopologyNodeSchema, TopologyProcessSchema, TopologyServiceSchema, TrackCascadeCountsSchema, TrackEnvelopeSchema, TrackProjectionSchema, TrackSchema, TrackStateSchema, TrackZoneFilterSchema, TrackedDetectionSchema, TurnServerSchema, UNIT_TABLE, BrokerInfoSchema$1 as UnifiedBrokerInfoSchema, UnitConversionError, UpdateIntegrationInputSchema, UpdateStatusSchema, UpdateUserInputSchema, UserRecordSchema, UserSummarySchema, VacuumControlStatusSchema, VacuumStateSchema, ValveStateSchema, ValveStatusSchema, VibrationStatusSchema, VideoEncodeSchema, WELL_KNOWN_TABS, WELL_KNOWN_TAB_MAP, WaterHeaterStatusSchema, WeatherStatusSchema, WebrtcStreamChoiceSchema, WebrtcStreamTargetSchema, WhiteBalanceModeSchema, WidgetHostEnum, WidgetLoginMethodSchema, WidgetMetadataSchema, WidgetRemoteSchema, WidgetSizeEnum, YAMNET_TO_MACRO, ZoneKindEnum, ZoneRuleModeEnum, ZoneRuleSchema, ZoneRuleStageEnum, ZoneRulesArraySchema, ZoneSchema, ZoneScopeBreakdownSchema, accessoriesCapability, accessoryStableId, addonPagesCapability, addonPagesSourceCapability, addonRoutesCapability, addonSettingsCapability, addonWidgetsCapability, addonWidgetsSourceCapability, addonsCapability, adminUiCapability, airQualitySensorCapability, alarmPanelCapability, alertsCapability, ambientLightSensorCapability, applyTransform, asBoolean, asJsonArray, asJsonObject, asNumber, asString, audioAnalysisCapability, audioAnalyzerCapability, audioCodecCapability, audioMetricsCapability, authProviderCapability, autoAssignProfiles, automationControlCapability, backupCapability, batteryCapability, bestLocationMatch, binaryCapability, bindAddonActions, brightnessCapability, brokerCapability, buildAddonRouteProvider, buildEventKindDescriptor, buildModelVariantGroups, buildNcTaxonomy, buildStreamParamsConfigSchema, buttonCapability, cameraCredentialsCapability, cameraPipelineConfigCapability, cameraStreamsCapability, canConvertUnit, carbonMonoxideCapability, cellsToRects, classifyStream, classifyStreams, climateControlCapability, collectHydratedFieldEntries, collectHydratedFieldValues, colorCapability, colorForKind, compileExpression, compileExpressionSafe, connectivityCapability, consumablesCapability, contactCapability, controlCapability, convertUnit, cosineSimilarity, coverCapability, createDeviceProxy, createDurableState, createEvent, createExpressionScope, createLazyTrpcSource, createMirrorSource, createRuntimeStateBridge, createSliceHandle, createSystemProxy, customAction, customModelRegistryCapability, dayNightCapability, decoderCapability, defaultDeviceFor, defineCustomActions, describeModelVariant, detectionPipelineCapability, deviceAdoptionCapability, deviceBackendToFormat, deviceCustomAction, deviceDiscoveryCapability, deviceExportCapability, deviceManagerCapability, deviceMatchesProfile, deviceOpsCapability, deviceProviderCapability, deviceStateCapability, deviceStatusCapability, doorbellCapability, embeddingEncoderCapability, emitDownForOwnedCaps, emitReadiness, encodeProfileFromStreamShape, enumSensorCapability, enumerateInferenceDevices, enumerateItemArrayFields, enumerateSchemaFields, errMsg, evaluateAst, evaluateLinkExpression, evaluateZoneRules, event, eventEmitterCapability, eventsCapability, expandCapMethods, extractNestedAddonId, extractSourceInfoFromMetadata, faceGalleryCapability, fanControlCapability, featureProbeCapability, filesystemBrowseCapability, findTimezone, floodCapability, formatForBackend, formatForRuntime, gasCapability, getAudioMacroClassIds, getByPath, getCapsByProviderKind, getTaxonomyEntry, hasMotionTrigger, hfModelUrl, htmlToText, humidifierCapability, humiditySensorCapability, hydrateSchema, imageCapability, imageSettingsCapability, integrationsCapability, intercomCapability, isAgentOnlyPlacement, isArrayOutputSchema, isCollectionArrayMethod, isDeployableToAgent, isDeviceConfigCap, isEvent, isNode, isObjectInput, isVoidInput, jobKindSchema, kebabToCamel, lawnMowerControlCapability, lifecycleJobSchema, lifecycleJobScopeSchema, lifecycleJobStateSchema, lifecycleTaskSchema, llmCapability, llmRuntimeCapability, localNetworkCapability, locationSimilarity, lockControlCapability, logDestinationCapability, logLevelAtMost, loginMethodCapability, looseSchema, makeProfileBrokerId, makeSourceBrokerId, mapAudioLabelToMacro, markdownToHtmlLite, markdownToText, maskUrlCredentials, mediaPlayerCapability, mergeSourceInfo, meshNetworkCapability, method, metricsProviderCapability, migrateConfigToBands, modelConvertCapability, modelDistributorCapability, modelFormatForRuntime, motionCapability, motionDetectionCapability, motionTriggerCapability, motionZonesCapability, mqttBrokerCapability, nativeObjectDetectionCapability, networkAccessCapability, networkQualityCapability, nodePin, nodesCapability, normalizeAddonInitResult, normalizeUnit, notificationOutputCapability, notificationRulesCapability, notifierCapability, numericSensorCapability, oauthIntegrationCapability, objectInputDeclaresAddonId, osdCapability, parseCameraStreamConfig, parseExpression, parseJsonArray, parseJsonObject, parseJsonUnknown, parseProfileBrokerId, parseStreamParamsFormPatch, petFeederCapability, pickAccessoryControl, pickPreferredRtspEntry, pipelineAnalyticsCapability, pipelineExecutorCapability, pipelineOrchestratorCapability, pipelineRunnerCapability, plateGalleryCapability, platformProbeCapability, powerMeterCapability, prepareNotification, presenceCapability, pressureSensorCapability, privacyMaskCapability, procedureAuthKey, ptzAutotrackCapability, ptzCapability, pythonScriptForBackend, readNodePin, readinessKey, rebootCapability, recordingCapability, recordingExportCapability, rectsToCells, requiresPython, resolveAddonExecution, resolveAddonGroup, resolveAddonPlacement, resolveAddonRuntime, resolveCapMount, resolveDetectionRuntime, resolveDeviceControlKind, resolveDeviceProfile, resolveFormat, resolveHydratedFieldValue, resolveModelFormat, resolveMutate, resolveRunnerId, resolveScrubThumbnailGeometry, resolveVariantModelId, runInferenceStep, runtimeDevices, sceneMonitorCapability, scopeKey, scoreRuntimes, scriptRunnerCapability, selectAssignedProfileSlots, serverManagementCapability, setByPath, settingsStoreCapability, sleep, sleepCancellable, smokeCapability, smtpProviderCapability, snapshotCapability, ssoBridgeCapability, startReachabilityPoll, storageCapability, storageEvictableCapability, storageProviderCapability, streamBrokerCapability, streamCatalogCapability, streamParamsCapability, streamPixels, streamQualityLabel, subKindsOf, supportedRuntimes, switchCapability, synthesizeSourceInfo, systemCapability, tamperCapability, taskLogEntrySchema, taskPhaseSchema, taskTargetSchema, temperatureSensorCapability, textToHtml, toDeviceSummary, toExpressionValue, toStreamSourceEntry, toastCapability, tokenize, transcodeBody, tryConvertUnit, turnProviderCapability, unitDimension, unitsForDimension, updateCapability, userManagementCapability, userPasskeysCapability, vacuumControlCapability, validateExpressionSource, valveCapability, vibrationCapability, videoclipsCapability, viewerUiCapability, waterHeaterCapability, weatherCapability, webrtcClientHintsSchema, webrtcSessionCapability, wiringAddonHealthSchema, wiringHealthSnapshotSchema, wiringNodeHealthSchema, wiringProbeKindSchema, wiringProbeResultSchema, zodEntriesToConfigUI, zoneAnalyticsCapability, zoneRulesCapability, zonesCapability };
|
|
32868
|
+
export { ACCESSORY_LABEL, ALL_CAPABILITY_DEFINITIONS, APPLE_SA_TO_MACRO, AUDIO_BACKEND_CHOICES, AUDIO_MACRO_LABELS, AccessoriesStatusSchema, AccessoryKind, AddBrokerInputSchema, AddonAutoUpdateSchema, AddonListItemSchema, AddonPageDeclarationSchema, AddonPageInfoSchema, AdoptInputSchema as AdoptionAdoptInputSchema, AdoptResultSchema as AdoptionAdoptResultSchema, AdoptionFilterSchema, GetCandidateInputSchema as AdoptionGetCandidateInputSchema, ListCandidatesInputSchema as AdoptionListCandidatesInputSchema, ListCandidatesOutputSchema as AdoptionListCandidatesOutputSchema, ReleaseInputSchema as AdoptionReleaseInputSchema, AdoptionStatusSchema, AgentLoadSummarySchema, AirQualitySensorStatusSchema, AlarmArmModeSchema, AlarmPanelStatusSchema, AlarmStateSchema, AlertSchema, AlertSeveritySchema, AlertSourceSchema, AlertStatusSchema, AmbientLightSensorStatusSchema, ApiKeyRecordSchema, ApiKeySummarySchema, ArchiveEntrySchema, ArchiveManifestSchema, AttachmentMediaTypeSchema, AttachmentSchema, AudioAnalysisResultSchema, AudioAnalysisSettingsSchema, AudioChunkInputSchema, AudioClassSummarySchema, AudioClassificationLabelSchema, AudioClassificationResultSchema, AudioCodecInfoSchema, AudioDecodeSessionConfigSchema, AudioEncodeSchema, AudioEncodeSessionConfigSchema, AudioEncodedChunkSchema, AudioEventSchema, AudioLevelSchema, AudioMetricsHistoryPointSchema, AudioMetricsHistorySchema, AudioMetricsSnapshotSchema, AudioPcmChunkSchema, AuthResultSchema, AutoUpdateSettingsSchema, AutomationControlStatusSchema, AvailableIntegrationTypeSchema, BACKEND_TO_FORMAT, BATTERY_DEVICE_PROFILE, BacklightModeSchema, BackupDestinationInfoSchema, BackupEntrySchema, BaseAddon, BaseDevice, BaseDeviceProvider, BatteryStatusSchema, BinaryStatusSchema, BoundingBoxSchema, BrightnessStatusSchema, AddInputSchema as BrokerAddInputSchema, BrokerAudioClientSchema, BrokerClientsSchema, BrokerConnectionDetailsSchema, BrokerConsumerAttributionSchema, BrokerConsumerKindSchema, BrokerDecodedClientSchema, BrokerEncodedClientSchema, GetStateInputSchema as BrokerGetStateInputSchema, BrokerInfoSchema, BrokerProviderInfoSchema, PublishInputSchema as BrokerPublishInputSchema, RegistryStatusSchema as BrokerRegistryStatusSchema, BrokerRtspClientSchema, BrokerStatsSchema, BrokerStatusEnum, BrokerStatusSchema, SubscribeInputSchema as BrokerSubscribeInputSchema, SubscribeResultSchema as BrokerSubscribeResultSchema, TestConnectionResultSchema as BrokerTestConnectionResultSchema, UnsubscribeInputSchema as BrokerUnsubscribeInputSchema, CAM_PROFILE_ORDER, CAPABILITY_NAMES, CAPABILITY_ROUTER_KEYS, CAP_NAMES_WITH_STATUS, CAP_NODE_PIN_CONTEXT_KEY, CAP_PROVIDER_KIND_MAP, COCO_80_LABELS, COCO_TO_MACRO, CamProfileSchema, CamStreamDescriptorSchema, CamStreamKindSchema, CamStreamResolutionSchema, CameraAssignmentStatusSchema, CameraAudioStatusSchema, CameraBrokerProfileSchema, CameraBrokerStatusSchema, CameraCredentialsSchema, CameraCredentialsStatusSchema, CameraDecoderShmSchema, CameraDecoderStatusSchema, CameraDetectionPhaseSchema, CameraDetectionProvisioningSchema, CameraDetectionProvisioningStateSchema, CameraDetectionStatusSchema, CameraMetricsSchema, CameraMetricsWithDeviceIdSchema, CameraMotionStatusSchema, CameraRecordingModeSchema, CameraRecordingStatusSchema, CameraSourceStatusSchema, CameraSourceStreamSchema, CameraStatusSchema, CameraStreamSchema, CandidateQueryFilterSchema, CapScopeSchema, CapabilityBindingsSchema, CarbonMonoxideStatusSchema, ChargingStatus, ClientNetworkStatsSchema, ClimateControlStatusSchema, ClipPlaybackSchema, ClipSchema, ClusterAddonNodeDeploymentSchema, ClusterAddonStatusEntrySchema, CollectionColumnSchema, CollectionIndexSchema, ColorStatusSchema, ConfigEntrySchema, ConfigSectionWithValuesSchema, ConfigTabDeclarationSchema, ConnectivityStatusSchema, ConsumableItemSchema, ConsumablesStatusSchema, ContactStatusSchema, ControlKindSchema, ControlStatusSchema, ConvertArtifactSchema, ConvertResultSchema, ConvertTargetSchema, CoverStateSchema, CoverStatusSchema, CreateApiKeyInputSchema, CreateApiKeyResultSchema, CreateIntegrationInputSchema, CreateScopedTokenInputSchema, CreateScopedTokenResultSchema, CreateUserInputSchema, CustomActionInputSchema, CustomModelDescriptorSchema, DATAPLANE_SECRET_HEADER, DEFAULT_ADDON_PLACEMENT, DEFAULT_AUDIO_ANALYZER_CONFIG, DEFAULT_DECODER_HWACCEL_CONFIG, DEFAULT_EVENT_COLOR, DEFAULT_FEATURES, DEFAULT_RETENTION, DEFAULT_SCRUB_THUMBNAIL_PRESET, DEVICE_BACKEND_TO_FORMAT, DEVICE_CAP_NAMES, DEVICE_PROFILES, DEVICE_SETTINGS_CONTRIBUTION_METHODS, DEVICE_STATUS_METHOD, DEVICE_TYPE_CONTROL_KIND, DEVICE_TYPE_INFO, DayNightModeSchema, DayNightOptionsSchema, DayNightSettingsPatchSchema, DayNightStatusSchema, DecodedAudioChunkSchema, DecodedFrameSchema, DecoderSessionConfigSchema, DecoderStatsSchema, DeleteIntegrationResultSchema, DetectionSourceSchema, DeviceCodeSeveritySchema, DeviceConfig, DeviceDiscoveryStatusSchema, ExposeInputSchema as DeviceExportExposeInputSchema, DeviceExportStatusSchema, UnexposeInputSchema as DeviceExportUnexposeInputSchema, DeviceFeature, DeviceInfoSchema, DeviceLinkModeSchema, DeviceNetworkStatsSchema, DeviceRole, DeviceRuntimeState, DeviceStatusSchema, DeviceType, DiscoveredChildDeviceSchema, DiscoveredChildStatusSchema, DiscoveredDeviceSchema, DiscoveredTargetSchema, DisposerChain, DoorbellPressEventSchema, DoorbellStatusSchema, EVENTFUL_CAP_NAMES, EVENT_KIND_BY_CAP, EVENT_PAD_MS, EVENT_TAXONOMY, EXPRESSION_BUILTINS, EXPRESSION_BUILTIN_NAMES, EXPRESSION_COMPILE_CACHE_CAPACITY, EXPRESSION_IDENTIFIER_RE, EXPRESSION_INJECTED_NOW, ElementConfigStore, EmbeddingInfoSchema, EmbeddingResultSchema, EncodeProfileSchema, EncodedPacketSchema, EnrichedWidgetMetadataSchema, EnumSensorDateTimeFormatSchema, EnumSensorStatusSchema, EventCategory, EventEmitterStatusSchema, EventFireSchema, EventItemSchema, EventKindCategorySchema, EventKindDescriptorSchema, EventKindIconSchema, EventKindSchema, EventSourceType, ExportDownloadSchema, ExportOptionsSchema, ExportRecordSchema, ExportSetupFieldSchema, ExportSetupSchema, ExportSpeedSchema, ExportStateSchema, ExportTimelapseSchema, ExposedDeviceSchema, ExposureModeSchema, ExpressionEvalError, ExpressionParseError, FanControlStatusSchema, FanDirectionSchema, FeatureManifestSchema, FeatureProbeStatusSchema, FloodStatusSchema, FrameHandleFormatSchema, FrameHandleSchema, FrameInputSchema, GasStatusSchema, GetStreamWithCodecInputSchema, GlobalMetricsSchema, HF_BASE_URL, HF_REPO, HWACCEL_OPTIONS, HealthStatusSchema, HistoryPointSchema, HistoryResolutionEnum, HumidifierStatusSchema, HumiditySensorStatusSchema, HvacModeSchema, ImageRotateSchema, ImageSettingsOptionsSchema, ImageSettingsPatchSchema, ImageSettingsStatusSchema, ImageStatusSchema, IngestOwnerSchema, InstalledPackageSchema, IntegrationLiteSchema, IntegrationWithStateSchema, IntercomAbilitySchema, IntercomStatusSchema, KNOWN_CAP_NAMES, KeyEventSchema, LOG_LEVEL_RANK, LabelDefinitionSchema, LawnMowerActivitySchema, LawnMowerControlStatusSchema, LinkedDeviceSchema, LlmDefaultSchema, LlmDefaultSelectorSchema, LlmErrorCodeSchema, LlmGenerateBaseInputSchema, LlmGenerateErrSchema, LlmGenerateOkSchema, LlmGenerateResultSchema, LlmImageSchema, LlmNodeModelSchema, LlmProfileKindDescriptorSchema, LlmProfileKindSchema, LlmProfileSchema, LlmRuntimeCompleteInputSchema, LlmRuntimeDiskUsageSchema, LlmRuntimeNodeSchema, LlmRuntimeStatusSchema, LlmUsageRollupSchema, LlmUsageSchema, LocateSegmentResultSchema, LocationStatSchema, LockControlStatusSchema, LockStateSchema, LogEntrySchema, LogLevelSchema, LogStreamEntrySchema, LoginMethodContributionSchema, LoginStageEnum, MACRO_LABELS, MAX_EXPRESSION_AST_NODES, MAX_EXPRESSION_BINDINGS, MAX_EXPRESSION_CALL_ARGS, MAX_EXPRESSION_EVAL_STEPS, MAX_EXPRESSION_SOURCE_LENGTH, METHOD_ACCESS_MAP, MODEL_FORMATS, MOTION_TRIGGER_FEATURE, ManagedModelCatalogEntrySchema, ManagedModelRefSchema, ManagedRuntimeConfigSchema, MaskGridDimsSchema, MaskGridShapeSchema, MaskLineShapeSchema, MaskPointSchema, MaskPolygonShapeSchema, MaskPolygonVerticesSchema, MaskRectShapeSchema, MaskShapeKindSchema, MaskShapeSchema, MediaFileSchema, MediaPlayerRepeatSchema, MediaPlayerStateSchema, MediaPlayerStatusSchema, MeshPeerSchema, MeshStatusSchema, MethodAccessSchema, ModelCatalogEntrySchema, ModelConvertInputSchema, ModelConvertMetadataSchema, ModelDistributeInputSchema, ModelDistributeResultSchema, ModelExtraFileSchema, ModelFormatEntrySchema, ModelFormatsSchema, ModelSubstitutionSchema, ModelVariantGroupSchema, MotionAnalysisResultSchema, MotionEventSchema, MotionOnMotionChangedDataSchema, MotionRegionSchema, MotionSourceEnum, MotionSourcesSchema, MotionStatusSchema, MotionTriggerRuntimeStateSchema, MotionTriggerStatusSchema, MotionZoneOptionsSchema, MotionZonePatchSchema, MotionZoneRegionSchema, MotionZoneStatusSchema, StatusSchema as MqttBrokerStatusSchema, NC_CONDITION_CATALOG, NC_HISTORY_LIMIT_DEFAULT, NC_HISTORY_LIMIT_MAX, NC_MAX_PER_TRACK_IMMEDIATE, NC_TAXONOMY, NativeCropBboxSchema, NativeCropRefSchema, NativeCropResultSchema, NativeDetectionSchema, NativeObjectClassEnum, NativeObjectDetectionRuntimeStateSchema, NativeObjectDetectionStatusSchema, NcConditionDescriptorSchema, NcConditionsSchema, NcDeliverySchema, NcHistoryEntrySchema, NcHistoryFilterSchema, NcHistoryRecordKindSchema, NcHistoryStatusSchema, NcHistorySubjectSchema, NcMediaPolicySchema, NcOccupancyConditionSchema, NcPlateMatcherSchema, NcRuleInputSchema, NcRulePatchSchema, NcRuleSchema, NcRuleTargetSchema, NcScheduleSchema, NcScheduleWindowSchema, NcTaxonomyEntrySchema, NcTaxonomySchema, NcTestResultSchema, NcThrottleSchema, NcZoneConditionSchema, NetworkAccessStatusSchema, NetworkAddressSchema, NetworkEndpointSchema, NotificationActionSchema, NotificationFormatSchema, NotificationSchema, NotifierStatusSchema, NumericSensorStatusSchema, OPS_LOG_DEFAULT_LIMIT, OPS_LOG_RING_DEFAULT_MAX, OauthIntegrationDescriptorSchema, ObjectEventSchema, OpsLogDomainSchema, OpsLogEntrySchema, OpsLogOpSchema, OpsLogQueryInputSchema, OpsLogReasonSchema, OrchestratorMetricsSchema, OsdOverlayKindEnum, OsdOverlayPatchSchema, OsdOverlaySchema, OsdPositionEnum, OsdStatusSchema, PET_FEEDER_MANUAL_FEED_MAX, PET_FEEDER_MANUAL_FEED_MIN, PIPELINE_FLOW_CAPABILITY_NAMES, PIPELINE_OWNER_CAPABILITY_NAMES, PROVIDER_KIND_CAP_NAMES, PYTHON_SCRIPT, PackageUpdateSchema, PackageVersionInfoSchema, PasskeyLoginMethodSchema, PasskeySummarySchema, PcmSampleFormatSchema, PerScopeBreakdownSchema, PetFeederStatusSchema, PickStreamPreferencesSchema, PickStreamRequirementsSchema, PickedCamStreamSchema, PipelineAssignmentSchema, PipelineDefaultStepSchema, PipelineEngineChoiceSchema, PipelineRunResultBridge, PipelineStepInputSchema, PipelineValidationIssueSchema, PipelineValidationResultSchema, PlaceholderReasonSchema, PolygonPointSchema, PowerMeterStatusSchema, PresenceStatusSchema, PressureSensorStatusSchema, PrivacyMaskOptionsSchema, PrivacyMaskPatchSchema, PrivacyMaskRegionSchema, PrivacyMaskShapeSchema, PrivacyMaskStatusSchema, ProfileRtspEntrySchema, ProfileSlotSchema, ProfileSlotStatusSchema, ProviderStatusSchema, PtzAutotrackRuntimeStateSchema, PtzAutotrackSettingsSchema, PtzAutotrackStatusSchema, PtzAutotrackTargetOptionSchema, PtzMoveCommandSchema, PtzOptionsSchema, PtzPositionSchema, PtzPresetSchema, PtzStatusSchema, QueryFilterSchema, REACHABILITY_FAILURES_TO_OFFLINE, REACHABILITY_POLL_INTERVAL_MS, REACHABILITY_PROBE_TIMEOUT_MS, RECOGNITION_TYPES, RESERVED_BINDING_NAMES, RUNTIME_DEFAULTS, RUNTIME_TO_FORMAT, RawStateResultSchema, ReadSegmentBytesResultSchema, ReadinessRegistry, ReadinessTimeoutError, RecentTracksPageSchema, RecentTracksQueryInput, RecordingAvailabilitySchema, RecordingBandModeSchema, RecordingBandSchema, RecordingBandTriggersSchema, RecordingConfigSchema, RecordingDaysSchema, RecordingDeviceUsageSchema, RecordingLocationUsageSchema, RecordingManifestSchema, RecordingModeSchema, RecordingRangeSchema, RecordingRetentionSchema, RecordingRuleSchema, RecordingScheduleSchema, RecordingStatusSchema, RecordingStorageModeSchema, RecordingStorageUsageSchema, RecordingTriggersSchema, RecordingWeekdaySchema, RedirectLoginMethodSchema, RenderedAsSchema, ReportMotionInputSchema, RingBuffer, RtpSourceSchema, RtspRestreamEntrySchema, RunnerCameraConfigSchema, RunnerCameraDeviceUIFields, RunnerFrameSourceSchema, RunnerInferenceDeviceSchema, RunnerLocalLoadSchema, RunnerLocalMetricsSchema, SCOPE_PRESETS, SCRUB_THUMBNAIL_PRESETS, SCRUB_THUMBNAIL_PRESET_LABELS, SCRUB_THUMBNAIL_PRESET_ORDER, SENSOR_FEATURES, SENSOR_MAP, SOURCE_INFO_METADATA_KEY, STREAM_PROFILE_META, STREAM_QUALITY_LABELS, SUB_DETECTION_TYPES, SYSTEM_CAP_NAMES, SceneCheckSchema, SceneConditionSchema, SceneMonitorSchema, SceneMonitorStateSchema, SceneMonitorStatusSchema, SceneReferenceSchema, ScopedTokenSchema, ScopedTokenSummarySchema, ScoredObjectEventSchema, ScriptRunnerStatusSchema, ScrubThumbnailPresetSchema, SearchResultSchema, SendEmailInputSchema, SendEmailResultSchema, SendResultSchema, SensorEventSchema, ServerBootModeSchema, ServerPackageStatusSchema, ServerRollbackInfoSchema, ServerUpdateActionResultSchema, ServerUpdateCheckResultSchema, ServerUpdateStateSchema, SettingsPatchSchema, SettingsRecordSchema, SettingsSchemaWithValuesSchema, SettingsUpdateResultSchema, ShmRingStatsSchema, SmokeStatusSchema, SmtpStatusSchema, SnapshotImageSchema, SourceInfoSchema, SpatialDetectionSchema, SsoBridgeClaimsSchema, StartEmbeddedInputSchema, StationaryObjectSchema, AbortUploadInputSchema as StorageAbortUploadInputSchema, BeginDownloadInputSchema as StorageBeginDownloadInputSchema, BeginDownloadResultSchema as StorageBeginDownloadResultSchema, BeginUploadInputSchema as StorageBeginUploadInputSchema, BeginUploadResultSchema as StorageBeginUploadResultSchema, EndDownloadInputSchema as StorageEndDownloadInputSchema, FinalizeUploadInputSchema as StorageFinalizeUploadInputSchema, StorageLocationDeclarationSchema, StorageLocationRefSchema, StorageLocationSchema, StorageLocationTypeSchema, ProviderInfoSchema as StorageProviderInfoSchema, ReadChunkInputSchema as StorageReadChunkInputSchema, TestLocationResultSchema as StorageTestLocationResultSchema, WriteChunkInputSchema as StorageWriteChunkInputSchema, StreamCodecSchema, StreamFormatSchema, StreamNetworkStatsSchema, StreamParamsOptionsSchema, StreamParamsStatusSchema, StreamProfileConfigSchema, StreamProfileOptionsSchema, StreamProfilePatchSchema, StreamProfileSchema, StreamSourceEntrySchema, StreamSourceSchema, SubscribeAudioChunksInputSchema, SubscribeAudioChunksResultSchema, SubscribeFramesInputSchema, SubscribeFramesResultSchema, SwitchStatusSchema, SystemMetricsSchema, SystemMirror, TAXONOMY_COLORS, TIMEZONES, TamperStatusSchema, TankStatusSchema, TargetKindCapsSchema, TargetKindLevelSchema, TargetKindSchema, TargetSchema, TemperatureSensorStatusSchema, TerminalProfileInfoSchema, TerminalSessionInfoSchema, TestConnectionResultSchema$1 as TestConnectionResultSchema, TestResultSchema, TimelapseRuleInputSchema, TimelapseRulePatchSchema, TimelapseRuleSchema, TimelapseTemplateSchema, ToastSchema, TokenScopeSchema, TopologyNodeSchema, TopologyProcessSchema, TopologyServiceSchema, TrackCascadeCountsSchema, TrackEnvelopeSchema, TrackProjectionSchema, TrackSchema, TrackStateSchema, TrackZoneFilterSchema, TrackedDetectionSchema, TurnServerSchema, UNIT_TABLE, BrokerInfoSchema$1 as UnifiedBrokerInfoSchema, UnitConversionError, UpdateIntegrationInputSchema, UpdateStatusSchema, UpdateUserInputSchema, UserRecordSchema, UserSummarySchema, VacuumControlStatusSchema, VacuumStateSchema, ValveStateSchema, ValveStatusSchema, VibrationStatusSchema, VideoEncodeSchema, WELL_KNOWN_TABS, WELL_KNOWN_TAB_MAP, WaterHeaterStatusSchema, WeatherStatusSchema, WebrtcStreamChoiceSchema, WebrtcStreamTargetSchema, WhiteBalanceModeSchema, WidgetHostEnum, WidgetLoginMethodSchema, WidgetMetadataSchema, WidgetRemoteSchema, WidgetSizeEnum, YAMNET_TO_MACRO, ZoneKindEnum, ZoneRuleModeEnum, ZoneRuleSchema, ZoneRuleStageEnum, ZoneRulesArraySchema, ZoneSchema, ZoneScopeBreakdownSchema, accessoriesCapability, accessoryStableId, addonPagesCapability, addonPagesSourceCapability, addonRoutesCapability, addonSettingsCapability, addonWidgetsCapability, addonWidgetsSourceCapability, addonsCapability, adminUiCapability, airQualitySensorCapability, alarmPanelCapability, alertsCapability, ambientLightSensorCapability, applyTransform, asBoolean, asJsonArray, asJsonObject, asNumber, asString, audioAnalysisCapability, audioAnalyzerCapability, audioCodecCapability, audioMetricsCapability, authProviderCapability, autoAssignProfiles, automationControlCapability, backupCapability, batteryCapability, bestLocationMatch, binaryCapability, bindAddonActions, brightnessCapability, brokerCapability, buildAddonRouteProvider, buildEventKindDescriptor, buildModelVariantGroups, buildNcTaxonomy, buildStreamParamsConfigSchema, buttonCapability, cameraCredentialsCapability, cameraPipelineConfigCapability, cameraStreamsCapability, canConvertUnit, carbonMonoxideCapability, cellsToRects, classifyStream, classifyStreams, climateControlCapability, collectHydratedFieldEntries, collectHydratedFieldValues, colorCapability, colorForKind, compileExpression, compileExpressionSafe, connectivityCapability, consumablesCapability, contactCapability, controlCapability, convertUnit, cosineSimilarity, coverCapability, createDeviceProxy, createDurableState, createEvent, createExpressionScope, createLazyTrpcSource, createMirrorSource, createRuntimeStateBridge, createSliceHandle, createSystemProxy, customAction, customModelRegistryCapability, dayNightCapability, decoderCapability, defaultDeviceFor, defineCustomActions, describeModelVariant, detectionPipelineCapability, deviceAdoptionCapability, deviceBackendToFormat, deviceCustomAction, deviceDiscoveryCapability, deviceExportCapability, deviceManagerCapability, deviceMatchesProfile, deviceOpsCapability, deviceProviderCapability, deviceStateCapability, deviceStatusCapability, doorbellCapability, embeddingEncoderCapability, emitDownForOwnedCaps, emitReadiness, encodeProfileFromStreamShape, enumSensorCapability, enumerateInferenceDevices, enumerateItemArrayFields, enumerateSchemaFields, errMsg, evaluateAst, evaluateLinkExpression, evaluateZoneRules, event, eventEmitterCapability, eventsCapability, expandCapMethods, extractNestedAddonId, extractSourceInfoFromMetadata, faceGalleryCapability, fanControlCapability, featureProbeCapability, filesystemBrowseCapability, findTimezone, floodCapability, formatForBackend, formatForRuntime, gasCapability, getAudioMacroClassIds, getByPath, getCapsByProviderKind, getTaxonomyEntry, hasMotionTrigger, hfModelUrl, htmlToText, humidifierCapability, humiditySensorCapability, hydrateSchema, imageCapability, imageSettingsCapability, integrationsCapability, intercomCapability, isAgentOnlyPlacement, isArrayOutputSchema, isCollectionArrayMethod, isDeployableToAgent, isDeviceConfigCap, isEvent, isNode, isObjectInput, isVoidInput, jobKindSchema, kebabToCamel, lawnMowerControlCapability, lifecycleJobSchema, lifecycleJobScopeSchema, lifecycleJobStateSchema, lifecycleTaskSchema, llmCapability, llmRuntimeCapability, localNetworkCapability, locationSimilarity, lockControlCapability, logDestinationCapability, logLevelAtMost, loginMethodCapability, looseSchema, makeProfileBrokerId, makeSourceBrokerId, mapAudioLabelToMacro, markdownToHtmlLite, markdownToText, maskUrlCredentials, mediaPlayerCapability, mergeSourceInfo, meshNetworkCapability, method, metricsProviderCapability, migrateConfigToBands, modelConvertCapability, modelDistributorCapability, modelFormatForRuntime, motionCapability, motionDetectionCapability, motionTriggerCapability, motionZonesCapability, mqttBrokerCapability, nativeObjectDetectionCapability, networkAccessCapability, networkQualityCapability, nodePin, nodesCapability, normalizeAddonInitResult, normalizeUnit, notificationOutputCapability, notificationRulesCapability, notifierCapability, numericSensorCapability, oauthIntegrationCapability, objectInputDeclaresAddonId, osdCapability, parseCameraStreamConfig, parseExpression, parseJsonArray, parseJsonObject, parseJsonUnknown, parseProfileBrokerId, parseStreamParamsFormPatch, petFeederCapability, pickAccessoryControl, pickPreferredRtspEntry, pipelineAnalyticsCapability, pipelineExecutorCapability, pipelineOrchestratorCapability, pipelineRunnerCapability, plateGalleryCapability, platformProbeCapability, powerMeterCapability, prepareNotification, presenceCapability, pressureSensorCapability, privacyMaskCapability, procedureAuthKey, ptzAutotrackCapability, ptzCapability, pythonScriptForBackend, readNodePin, readinessKey, rebootCapability, recordingCapability, recordingExportCapability, rectsToCells, requiresPython, resolveAddonExecution, resolveAddonGroup, resolveAddonPlacement, resolveAddonRuntime, resolveCapMount, resolveDetectionRuntime, resolveDeviceControlKind, resolveDeviceProfile, resolveFormat, resolveHydratedFieldValue, resolveModelFormat, resolveMutate, resolveRunnerId, resolveScrubThumbnailGeometry, resolveVariantModelId, runInferenceStep, runtimeDevices, sceneMonitorCapability, scopeKey, scoreRuntimes, scriptRunnerCapability, selectAssignedProfileSlots, serverManagementCapability, setByPath, settingsStoreCapability, sleep, sleepCancellable, smokeCapability, smtpProviderCapability, snapshotCapability, ssoBridgeCapability, startReachabilityPoll, storageCapability, storageEvictableCapability, storageProviderCapability, streamBrokerCapability, streamCatalogCapability, streamParamsCapability, streamPixels, streamQualityLabel, subKindsOf, supportedRuntimes, switchCapability, synthesizeSourceInfo, systemCapability, tamperCapability, taskLogEntrySchema, taskPhaseSchema, taskTargetSchema, temperatureSensorCapability, terminalSessionCapability, textToHtml, toDeviceSummary, toExpressionValue, toStreamSourceEntry, toastCapability, tokenize, transcodeBody, tryConvertUnit, turnProviderCapability, unitDimension, unitsForDimension, updateCapability, userManagementCapability, userPasskeysCapability, vacuumControlCapability, validateExpressionSource, valveCapability, vibrationCapability, videoclipsCapability, viewerUiCapability, waterHeaterCapability, weatherCapability, webrtcClientHintsSchema, webrtcSessionCapability, wiringAddonHealthSchema, wiringHealthSnapshotSchema, wiringNodeHealthSchema, wiringProbeKindSchema, wiringProbeResultSchema, zodEntriesToConfigUI, zoneAnalyticsCapability, zoneRulesCapability, zonesCapability };
|
|
@@ -1880,6 +1880,47 @@ function emitDownForOwnedCaps(registry, owned) {
|
|
|
1880
1880
|
*/
|
|
1881
1881
|
var DATAPLANE_SECRET_HEADER = "x-camstack-dataplane-secret";
|
|
1882
1882
|
//#endregion
|
|
1883
|
+
//#region src/cap-call-context.ts
|
|
1884
|
+
/**
|
|
1885
|
+
* Per-call node pinning for `ctx.api` capability calls.
|
|
1886
|
+
*
|
|
1887
|
+
* A capability call normally resolves to its DEFAULT provider — a `singleton`
|
|
1888
|
+
* cap resolves to the hub, a device-scoped cap to the device's owning node. To
|
|
1889
|
+
* query a SPECIFIC node's provider instead (e.g. a remote agent's own
|
|
1890
|
+
* in-process `platform-probe` hardware, which the hub cannot probe), pin the
|
|
1891
|
+
* call to that node.
|
|
1892
|
+
*
|
|
1893
|
+
* The nodeId rides OUT-OF-BAND in the tRPC call context (NOT in the validated
|
|
1894
|
+
* method args), so capability method signatures stay `nodeId`-free — node
|
|
1895
|
+
* targeting is a property of the CALL, not of the method. The transport lifts
|
|
1896
|
+
* it from `op.context` onto the `CapCallInput.nodeId` field (`ipcParentLink`),
|
|
1897
|
+
* and the hub parent's `onUnownedCall` passes it to the `CapRouteResolver`,
|
|
1898
|
+
* which classifies a pinned agent node as `agent-child-forward`
|
|
1899
|
+
* (`$agent-cap-fwd.forward` → the agent's in-process provider).
|
|
1900
|
+
*
|
|
1901
|
+
* Usage at a call site:
|
|
1902
|
+
*
|
|
1903
|
+
* await api.platformProbe.getCapabilities.query(undefined, nodePin(nodeId))
|
|
1904
|
+
*/
|
|
1905
|
+
/** tRPC `op.context` key carrying a per-call node pin. */
|
|
1906
|
+
var CAP_NODE_PIN_CONTEXT_KEY = "__camstackNodePin";
|
|
1907
|
+
/**
|
|
1908
|
+
* Build the tRPC request options that pin a single capability call to `nodeId`.
|
|
1909
|
+
* Pass as the second argument to `.query(input, …)` / `.mutate(input, …)`.
|
|
1910
|
+
*/
|
|
1911
|
+
function nodePin(nodeId) {
|
|
1912
|
+
return { context: { [CAP_NODE_PIN_CONTEXT_KEY]: nodeId } };
|
|
1913
|
+
}
|
|
1914
|
+
/**
|
|
1915
|
+
* Read a per-call node pin out of a tRPC `op.context` (transport side).
|
|
1916
|
+
* Returns the pinned nodeId, or `undefined` when no pin is present.
|
|
1917
|
+
*/
|
|
1918
|
+
function readNodePin(context) {
|
|
1919
|
+
if (context === null || typeof context !== "object") return void 0;
|
|
1920
|
+
const value = Reflect.get(context, CAP_NODE_PIN_CONTEXT_KEY);
|
|
1921
|
+
return typeof value === "string" ? value : void 0;
|
|
1922
|
+
}
|
|
1923
|
+
//#endregion
|
|
1883
1924
|
//#region src/utils/json-safe.ts
|
|
1884
1925
|
/**
|
|
1885
1926
|
* Type-safe JSON parsing helpers.
|
|
@@ -3456,4 +3497,4 @@ function sleepCancellable(ms, signal) {
|
|
|
3456
3497
|
});
|
|
3457
3498
|
}
|
|
3458
3499
|
//#endregion
|
|
3459
|
-
export {
|
|
3500
|
+
export { ProfileSlotSchema as $, parseJsonUnknown as A, BrokerStatsSchema as B, asBoolean as C, DisposerChain as Ct, asString as D, asNumber as E, ReadinessRegistry as F, CamStreamResolutionSchema as G, CAM_PROFILE_ORDER as H, ReadinessTimeoutError as I, DecodedFrameSchema as J, CameraStreamSchema as K, emitDownForOwnedCaps as L, nodePin as M, readNodePin as N, parseJsonArray as O, DATAPLANE_SECRET_HEADER as P, ProfileRtspEntrySchema as Q, readinessKey as R, DeviceType as S, resolveHydratedFieldValue as St, asJsonObject as T, CamProfileSchema as U, BrokerStatusSchema as V, CamStreamKindSchema as W, FrameHandleFormatSchema as X, EncodedPacketSchema as Y, FrameHandleSchema as Z, resolveCapMount as _, WELL_KNOWN_TABS as _t, viewerUiCapability as a, SubscribeFramesInputSchema as at, DeviceFeature as b, collectHydratedFieldValues as bt, createLazyTrpcSource as c, makeSourceBrokerId as ct, DEVICE_SETTINGS_CONTRIBUTION_METHODS as d, BaseAddon as dt, ProfileSlotStatusSchema as et, DEVICE_STATUS_METHOD as f, normalizeAddonInitResult as ft, method as g, isEvent as gt, isDeviceConfigCap as h, emitReadiness as ht, deviceOpsCapability as i, SubscribeAudioChunksResultSchema as it, CAP_NODE_PIN_CONTEXT_KEY as j, parseJsonObject as k, createMirrorSource as l, parseProfileBrokerId as lt, expandCapMethods as m, createEvent as mt, sleepCancellable as n, StreamSourceSchema as nt, adminUiCapability as o, SubscribeFramesResultSchema as ot, event as p, createDurableState as pt, DecodedAudioChunkSchema as q, RawStateResultSchema as r, SubscribeAudioChunksInputSchema as rt, createDeviceProxy as s, makeProfileBrokerId as st, sleep as t, StreamSourceEntrySchema$1 as tt, createSliceHandle as u, selectAssignedProfileSlots as ut, systemMethod as v, WELL_KNOWN_TAB_MAP as vt, asJsonArray as w, DeviceRole as x, hydrateSchema as xt, ChargingStatus as y, collectHydratedFieldEntries as yt, scopeKey as z };
|
|
@@ -1880,6 +1880,47 @@ function emitDownForOwnedCaps(registry, owned) {
|
|
|
1880
1880
|
*/
|
|
1881
1881
|
var DATAPLANE_SECRET_HEADER = "x-camstack-dataplane-secret";
|
|
1882
1882
|
//#endregion
|
|
1883
|
+
//#region src/cap-call-context.ts
|
|
1884
|
+
/**
|
|
1885
|
+
* Per-call node pinning for `ctx.api` capability calls.
|
|
1886
|
+
*
|
|
1887
|
+
* A capability call normally resolves to its DEFAULT provider — a `singleton`
|
|
1888
|
+
* cap resolves to the hub, a device-scoped cap to the device's owning node. To
|
|
1889
|
+
* query a SPECIFIC node's provider instead (e.g. a remote agent's own
|
|
1890
|
+
* in-process `platform-probe` hardware, which the hub cannot probe), pin the
|
|
1891
|
+
* call to that node.
|
|
1892
|
+
*
|
|
1893
|
+
* The nodeId rides OUT-OF-BAND in the tRPC call context (NOT in the validated
|
|
1894
|
+
* method args), so capability method signatures stay `nodeId`-free — node
|
|
1895
|
+
* targeting is a property of the CALL, not of the method. The transport lifts
|
|
1896
|
+
* it from `op.context` onto the `CapCallInput.nodeId` field (`ipcParentLink`),
|
|
1897
|
+
* and the hub parent's `onUnownedCall` passes it to the `CapRouteResolver`,
|
|
1898
|
+
* which classifies a pinned agent node as `agent-child-forward`
|
|
1899
|
+
* (`$agent-cap-fwd.forward` → the agent's in-process provider).
|
|
1900
|
+
*
|
|
1901
|
+
* Usage at a call site:
|
|
1902
|
+
*
|
|
1903
|
+
* await api.platformProbe.getCapabilities.query(undefined, nodePin(nodeId))
|
|
1904
|
+
*/
|
|
1905
|
+
/** tRPC `op.context` key carrying a per-call node pin. */
|
|
1906
|
+
var CAP_NODE_PIN_CONTEXT_KEY = "__camstackNodePin";
|
|
1907
|
+
/**
|
|
1908
|
+
* Build the tRPC request options that pin a single capability call to `nodeId`.
|
|
1909
|
+
* Pass as the second argument to `.query(input, …)` / `.mutate(input, …)`.
|
|
1910
|
+
*/
|
|
1911
|
+
function nodePin(nodeId) {
|
|
1912
|
+
return { context: { [CAP_NODE_PIN_CONTEXT_KEY]: nodeId } };
|
|
1913
|
+
}
|
|
1914
|
+
/**
|
|
1915
|
+
* Read a per-call node pin out of a tRPC `op.context` (transport side).
|
|
1916
|
+
* Returns the pinned nodeId, or `undefined` when no pin is present.
|
|
1917
|
+
*/
|
|
1918
|
+
function readNodePin(context) {
|
|
1919
|
+
if (context === null || typeof context !== "object") return void 0;
|
|
1920
|
+
const value = Reflect.get(context, CAP_NODE_PIN_CONTEXT_KEY);
|
|
1921
|
+
return typeof value === "string" ? value : void 0;
|
|
1922
|
+
}
|
|
1923
|
+
//#endregion
|
|
1883
1924
|
//#region src/utils/json-safe.ts
|
|
1884
1925
|
/**
|
|
1885
1926
|
* Type-safe JSON parsing helpers.
|
|
@@ -3480,6 +3521,12 @@ Object.defineProperty(exports, "CAM_PROFILE_ORDER", {
|
|
|
3480
3521
|
return CAM_PROFILE_ORDER;
|
|
3481
3522
|
}
|
|
3482
3523
|
});
|
|
3524
|
+
Object.defineProperty(exports, "CAP_NODE_PIN_CONTEXT_KEY", {
|
|
3525
|
+
enumerable: true,
|
|
3526
|
+
get: function() {
|
|
3527
|
+
return CAP_NODE_PIN_CONTEXT_KEY;
|
|
3528
|
+
}
|
|
3529
|
+
});
|
|
3483
3530
|
Object.defineProperty(exports, "CamProfileSchema", {
|
|
3484
3531
|
enumerable: true,
|
|
3485
3532
|
get: function() {
|
|
@@ -3816,6 +3863,12 @@ Object.defineProperty(exports, "method", {
|
|
|
3816
3863
|
return method;
|
|
3817
3864
|
}
|
|
3818
3865
|
});
|
|
3866
|
+
Object.defineProperty(exports, "nodePin", {
|
|
3867
|
+
enumerable: true,
|
|
3868
|
+
get: function() {
|
|
3869
|
+
return nodePin;
|
|
3870
|
+
}
|
|
3871
|
+
});
|
|
3819
3872
|
Object.defineProperty(exports, "normalizeAddonInitResult", {
|
|
3820
3873
|
enumerable: true,
|
|
3821
3874
|
get: function() {
|
|
@@ -3846,6 +3899,12 @@ Object.defineProperty(exports, "parseProfileBrokerId", {
|
|
|
3846
3899
|
return parseProfileBrokerId;
|
|
3847
3900
|
}
|
|
3848
3901
|
});
|
|
3902
|
+
Object.defineProperty(exports, "readNodePin", {
|
|
3903
|
+
enumerable: true,
|
|
3904
|
+
get: function() {
|
|
3905
|
+
return readNodePin;
|
|
3906
|
+
}
|
|
3907
|
+
});
|
|
3849
3908
|
Object.defineProperty(exports, "readinessKey", {
|
|
3850
3909
|
enumerable: true,
|
|
3851
3910
|
get: function() {
|