@camstack/types 1.2.596 → 1.2.598
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/CHANGELOG.md +18 -5
- package/dist/addon/record-integration-instances.d.ts +12 -1
- package/dist/addon.js +1 -1
- package/dist/addon.mjs +1 -1
- package/dist/capabilities/index.d.ts +3 -3
- package/dist/capabilities/integration-instances.cap.d.ts +26 -0
- package/dist/capabilities/pipeline-executor.cap.d.ts +3 -0
- package/dist/capabilities/pipeline-orchestrator.cap.d.ts +241 -1
- package/dist/capabilities/pipeline-runner.cap.d.ts +3 -0
- package/dist/client.js +4 -0
- package/dist/client.mjs +4 -0
- package/dist/device/hero/hero-fragment.d.ts +1 -1
- package/dist/generated/addon-api.d.ts +28 -0
- package/dist/generated/method-access-map.d.ts +1 -1
- package/dist/generated/system-proxy.d.ts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +246 -18
- package/dist/index.mjs +242 -19
- package/dist/{runtime-capabilities-wOKNm9iz.js → runtime-capabilities-DWgr8hrq.js} +19 -0
- package/dist/{runtime-capabilities-Bgt5QBvO.mjs → runtime-capabilities-qX7BpOYT.mjs} +14 -1
- package/dist/types/agent-pipeline-settings.d.ts +14 -0
- package/package.json +1 -1
|
@@ -1751,6 +1751,18 @@ function isInstanceEnabled(body) {
|
|
|
1751
1751
|
}
|
|
1752
1752
|
/** The body key of the switch; only {@link RecordIntegrationInstances.setInstanceEnabled} writes it. */
|
|
1753
1753
|
var SWITCH_KEY = "enabled";
|
|
1754
|
+
/**
|
|
1755
|
+
* The "Add device" mode an instance gets when its provider states none, from how the provider's
|
|
1756
|
+
* devices are found: `lan` scans, `account` adopts the account's children, anything else is manual.
|
|
1757
|
+
* The one place this default lives.
|
|
1758
|
+
*/
|
|
1759
|
+
function defaultAddDeviceMode(description) {
|
|
1760
|
+
switch (description.discovery?.mode) {
|
|
1761
|
+
case "lan": return "scan";
|
|
1762
|
+
case "account": return "children";
|
|
1763
|
+
default: return "none";
|
|
1764
|
+
}
|
|
1765
|
+
}
|
|
1754
1766
|
/** The keys of the kind's secret fields that sit at the top level of the body. */
|
|
1755
1767
|
function topLevelSecretKeys(paths) {
|
|
1756
1768
|
return new Set(paths.filter((p) => !p.includes(".") && !p.includes("[") && !p.includes("{")));
|
|
@@ -1853,6 +1865,7 @@ var RecordIntegrationInstances = class {
|
|
|
1853
1865
|
enabled: isInstanceEnabled(record.data),
|
|
1854
1866
|
formValues: shown,
|
|
1855
1867
|
kind,
|
|
1868
|
+
addDevice: this.hooks.addDevice?.(record.data) ?? defaultAddDeviceMode(this.hooks.description),
|
|
1856
1869
|
...health?.status !== void 0 ? { status: health.status } : {},
|
|
1857
1870
|
...health?.lastCheckedAt !== void 0 ? { lastCheckedAt: health.lastCheckedAt } : {}
|
|
1858
1871
|
};
|
|
@@ -24339,6 +24352,12 @@ Object.defineProperty(exports, "declarationsOf", {
|
|
|
24339
24352
|
return declarationsOf;
|
|
24340
24353
|
}
|
|
24341
24354
|
});
|
|
24355
|
+
Object.defineProperty(exports, "defaultAddDeviceMode", {
|
|
24356
|
+
enumerable: true,
|
|
24357
|
+
get: function() {
|
|
24358
|
+
return defaultAddDeviceMode;
|
|
24359
|
+
}
|
|
24360
|
+
});
|
|
24342
24361
|
Object.defineProperty(exports, "defaultDeviceFor", {
|
|
24343
24362
|
enumerable: true,
|
|
24344
24363
|
get: function() {
|
|
@@ -1751,6 +1751,18 @@ function isInstanceEnabled(body) {
|
|
|
1751
1751
|
}
|
|
1752
1752
|
/** The body key of the switch; only {@link RecordIntegrationInstances.setInstanceEnabled} writes it. */
|
|
1753
1753
|
var SWITCH_KEY = "enabled";
|
|
1754
|
+
/**
|
|
1755
|
+
* The "Add device" mode an instance gets when its provider states none, from how the provider's
|
|
1756
|
+
* devices are found: `lan` scans, `account` adopts the account's children, anything else is manual.
|
|
1757
|
+
* The one place this default lives.
|
|
1758
|
+
*/
|
|
1759
|
+
function defaultAddDeviceMode(description) {
|
|
1760
|
+
switch (description.discovery?.mode) {
|
|
1761
|
+
case "lan": return "scan";
|
|
1762
|
+
case "account": return "children";
|
|
1763
|
+
default: return "none";
|
|
1764
|
+
}
|
|
1765
|
+
}
|
|
1754
1766
|
/** The keys of the kind's secret fields that sit at the top level of the body. */
|
|
1755
1767
|
function topLevelSecretKeys(paths) {
|
|
1756
1768
|
return new Set(paths.filter((p) => !p.includes(".") && !p.includes("[") && !p.includes("{")));
|
|
@@ -1853,6 +1865,7 @@ var RecordIntegrationInstances = class {
|
|
|
1853
1865
|
enabled: isInstanceEnabled(record.data),
|
|
1854
1866
|
formValues: shown,
|
|
1855
1867
|
kind,
|
|
1868
|
+
addDevice: this.hooks.addDevice?.(record.data) ?? defaultAddDeviceMode(this.hooks.description),
|
|
1856
1869
|
...health?.status !== void 0 ? { status: health.status } : {},
|
|
1857
1870
|
...health?.lastCheckedAt !== void 0 ? { lastCheckedAt: health.lastCheckedAt } : {}
|
|
1858
1871
|
};
|
|
@@ -23199,4 +23212,4 @@ function enumerateInferenceDevices(hw) {
|
|
|
23199
23212
|
return out;
|
|
23200
23213
|
}
|
|
23201
23214
|
//#endregion
|
|
23202
|
-
export { CAP_STATE_LEAVES as $,
|
|
23215
|
+
export { CAP_STATE_LEAVES as $, AddonMigrationsBlockedError as $a, BatchTooLargeError as $i, registerKnownSecret as $n, secretTreeFromPaths as $r, AudioChunkFormatSchema as $t, DEVICE_SCOPED_CAPS as A, WELL_KNOWN_TABS as Aa, RECORD_CLASSES as Ai, NOT_A_DEVICE as An, HISTORY_UNIT_LABELS as Ar, allVocabActions as At, commandEffect as B, isSecretClear as Ba, RECORD_SETTINGS_MAX_ROWS as Bi, OnBehalfSourceSchema as Bn, CamstackError as Br, emitDownForOwnedCaps as Bt, asNumber as C, switchRecordsOverMigrationApi as Ca, parseSecretPath as Ci, QUANTITY_BASE as Cn, SECRET_META as Cr, DEVICE_CHILDREN_BATCH_MAX as Ct, parseJsonUnknown as D, createEvent as Da, secretArrayPrefixes as Di, historyUnitFor as Dn, DEVICE_SETTINGS_CONTRIBUTION_METHODS as Dr, t as Dt, parseJsonObject as E, runAddonMigrations as Ea, recordSecretRef as Ei, displayUnitFor as En, DEFAULT_RUNTIME_STATE_DURABILITY as Er, addonPagesSourceCapability as Et, createEventBusSliceSource as F, dehydrateSchema as Fa, RECORD_MAX_DATA_BYTES as Fi, TransitionCommandSchema as Fn, isDeviceConfigCap as Fr, CAP_VOCABULARY_BY_NAME as Ft, resolveSideEffect as G, toSecretFieldView as Ga, formatSecretScope as Gi, assertTransactScope as Gn, readErrorI18n as Gr, DEBUG_WATCH_REARM_EVERY_MS as Gt, commandHoldMs as H, isSecretMarker as Ha, SECRET_REF_SCHEME as Hi, ruleFireOfClaim as Hn, ErrorI18nPayloadSchema as Hr, scopeKey as Ht, createLazyTrpcSource as I, hydrateSchema as Ia, RECORD_MAX_INDEXES as Ii, TransitionOutcomeSchema as In, method as Ir, CAP_VOCABULARY as It, HF_REPO as J, collectSecretConfigKeys as Ja, normalizeSecretOwner as Ji, createSecretsAccess as Jn, classifyStoreError as Jr, DebugWatchTable as Jt, DEFAULT_TOKEN_EXPIRY as K, REDACTED_SECRET as Ka, globalSecretScope as Ki, resolveSecretViewsIn as Kn, userError as Kr, DEBUG_WATCH_WINDOW_MS as Kt, createMirrorSource as L, resolveHydratedFieldValue as La, RECORD_MAX_INDEX_FIELDS as Li, TransitionValueSchema as Ln, optionalMethod as Lr, MODEL_FORMATS as Lt, createDeviceProxy as M, collectHydratedFieldEntries as Ma, RECORD_DEFAULT_MAX_DATA_BYTES as Mi, DeviceTransitionSchema as Mn, event as Mr, findVocabAction as Mt, invokeTrpcLeaf as N, collectHydratedFieldValues as Na, RECORD_DELETE_BATCH as Ni, TransitionActorKindSchema as Nn, expandCapMethods as Nr, vocabActionIdFor as Nt, hfModelUrl as O, emitReadiness as Oa, RECORD_BATCH_MAX as Oi, isReadingQuantity as On, DEVICE_STATUS_METHOD as Or, VocabActionError as Ot, addonSliceHandleApi as P, dehydrateConfigField as Pa, RECORD_ID_MAX_LENGTH as Pi, TransitionActorSchema as Pn, historyItemFieldPath as Pr, vocabCall as Pt, CAP_NAMES as Q, schemaDeclaresAnyField as Qa, optionalLinkField as Qi, knownSecretCount as Qn, parseSecretStatePath as Qr, isDebugChannelName as Qt, createSliceHandle as R, SECRET_CLEAR as Ra, RECORD_QUERY_MAX as Ri, CommandOriginClaimSchema as Rn, resolveCapMount as Rr, ReadinessRegistry as Rt, asJsonObject as S, secretsOverMigrationApi as Sa, mapSecretLeaves as Si, DISPLAY_PREFERENCES as Sn, defineRecordKinds as Sr, deviceOpsCapability as St, parseJsonArray as T, defineAddonMigrations as Ta, recordSecretCollection as Ti, baseUnitOf as Tn, isZodSecret as Tr, AddonPageDeclarationSchema as Tt, effectConditionHolds as U, isSecretMarkerLike as Ua, arrayItemFieldPath as Ui, makeInMemoryRecords as Un, FORBIDDEN_MESSAGE_PREFIX as Ur, DEBUG_CHANNEL_PREFIX as Ut, commandEffects as V, isSecretFieldView as Va, RECORD_SWEEP_INTERVAL_MS as Vi, RuleFireOriginSchema as Vn, ErrorCodeSchema as Vr, readinessKey as Vt, isCommand as W, makeSecretMarker as Wa, buildSecretRef as Wi, createRecordsAccess as Wn, forbiddenError as Wr, DEBUG_WATCH_HARD_CAP_MS as Wt, CAP_ADVANCE_FIELDS as X, isSecretConfigField as Xa, linkField as Xi, clearKnownSecrets as Xn, normalizeAddonInitResult as Xr, createDebugEmitter as Xt, RUNTIME_DEFAULTS as Y, isKeychainStoredField as Ya, parseSecretRef as Yi, MIN_SCRUBBED_LENGTH as Yn, migrationSet as Yr, __resetDebugInterestForTests as Yt, CAP_METHOD_TIMEOUTS_MS as Z, omitTransientConfig as Za, linksOfKind as Zi, forgetKnownSecret as Zn, mergeSecretStatePaths as Zr, getDebugInterest as Zt, pythonScriptForBackend as _, recordsErrorFromMessage as _a, defaultAddDeviceMode as _i, makeProfileBrokerId as _n, RecordKindNameSchema as _r, switchRefusesSetState as _t, runtimeDevices as a, PlaintextSecretError as aa, transformSecretWrite as ai, CamStreamKindSchema as an, PEER_BYTES_TICKET_TTL_MS as ar, defineCustomActions as at, asBoolean as b, recordsOverMigrationApi as ba, REMOVE_LEAF as bi, selectAssignedProfileSlots as bn, assertValidDeclaration as br, MIGRATION_API_VERSION as bt, coralUsableUnits as c, RecordSecretUnavailableError as ca, resolveDeviceSettings as ci, DecodedAudioChunkSchema as cn, DATAPLANE_SECRET_HEADER as cr, CAP_COMMAND_ORIGIN_CONTEXT_KEY as ct, sleepCancellable as d, RecordsError as da, createDurableState as di, ProfileSlotSchema as dn, defineEntryKind as dr, nodePin as dt, DeclarationRefusedError as ea, secretTreeFromSchema as ei, AudioStreamPickSchema as en, findMigrationsBlocked as eo, scrubKnownSecrets as er, CAP_METHOD_NOT_IMPLEMENTED as et, DEVICE_BACKEND_TO_FORMAT as f, RevConflictError as fa, moveRegistrySwitchToBody as fi, ProfileSlotStatusSchema as fn, entryBody as fr, readCommandOrigin as ft, formatForRuntime as g, asRecordsError as ga, RecordIntegrationInstances as gi, SubscribeAudioChunksResultSchema as gn, RecordKindDeclarationSchema as gr, SWITCH_SETTABLE_GATE as gt, deviceBackendToFormat as h, UnknownRecordKindError as ha, registrySwitchToBodyMigration as hi, SubscribeAudioChunksInputSchema as hn, RecordIndexSchema as hr, viewerUiCapability as ht, modelFormatForRuntime as i, NoCallerError as ia, resolveSecretMarkers as ii, CamProfileSchema as in, isAudioChunkFormat as io, PEER_BYTES_STALL_MS as ir, customAction as it, isDeviceScopedCap as j, WELL_KNOWN_TAB_MAP as ja, RECORD_DATABASES as ji, DeviceCommandSettledEventSchema as jn, PROVIDER_PIN_FIELD as jr, assertDeviceOffers as jt, BOOT_RECOVERY_BACKOFF_MS as k, isEvent as ka, RECORD_BATCH_MAX_BYTES as ki, readingMeta as kn, HISTORY_DEFAULT_MIN_INTERVAL_MS as kr, actionEffect as kt, edgetpuDelegateDevice as l, RecordTooLargeError as la, resolvedValues as li, FrameHandleSchema as ln, SHARE_VIEW_KINDS as lr, CAP_NODE_PIN_CONTEXT_KEY as lt, RUNTIME_TO_FORMAT as m, UnindexedFilterError as ma, registrySwitchToBodyId as mi, StreamSourceSchema as mn, RecordFieldPathSchema as mr, toNodeId as mt, describeNvidia as n, ForeignSecretMarkerError as na, collectSecretMarkerRefs as ni, BrokerStatusSchema as nn, audioChunkBytesPerSample as no, PEER_BYTES_CHUNK_BYTES as nr, CALLER_STAMPED_CAPABILITIES as nt, scoreRuntimes as o, RECORDS_ERROR_CODES as oa, SCOPED_SETTINGS_SCOPES as oi, CamStreamResolutionSchema as on, PeerBytesTicketSchema as or, describeCustomActions as ot, PYTHON_SCRIPT as p, TransactRefusedError as pa, registrySwitchPortsOver as pi, StreamSourceEntrySchema$1 as pn, EntryDescriptorSchema as pr, readNodePin as pt, HF_BASE_URL as q, collectKeychainStoredKeys as qa, isSecretRef as qi, REVALIDATE_AFTER_MS as qn, BaseAddon as qr, DebugInterest as qt, enumerateInferenceDevices as r, InvalidRecordError as ra, isSecretRefOwnedBy as ri, CAM_PROFILE_ORDER as rn, expandAudioChunkToF32le as ro, PEER_BYTES_MAX_OUTSTANDING as rr, withoutCallerStamp as rt, supportedRuntimes as s, RecordNotFoundError as sa, nodeIdOfScopedKey as si, CameraStreamSchema as sn, CALLER_USERNAME_HEADER as sr, deviceCustomAction as st, defaultDeviceFor as t, FilterRequiredError as ta, KeychainWriteRefusedError as ti, BrokerStatsSchema as tn, AUDIO_CHUNK_FORMATS as to, shortSecretRefHash as tr, isCapMethodAbsent as tt, sleep as u, RecordUniqueViolationError as ua, normalizeNodeId as ui, ProfileRtspEntrySchema as un, DisposerChain as ur, commandOrigin as ut, requiresPython as v, defaultIntegrationDepsOver as va, isInstanceEnabled as vi, makeSourceBrokerId as vn, RecordRetentionSchema as vr, PipelineRunResultBridge as vt, asString as w, AddonMigrationDefinitionError as wa, recordArrayItemPath as wi, ReadingQuantitySchema as wn, collectZodSecretPaths as wr, adminUiCapability as wt, asJsonArray as x, rowsDepsOver as xa, collectSecretLeaves as xi, DEFAULT_DISPLAY_PREFERENCE as xn, declarationsOf as xr, RawStateResultSchema as xt, maskUrlCredentials as y, integrationRowsApiOver as ya, secretViewsOf as yi, parseProfileBrokerId as yn, StoredRecordKindDeclarationSchema as yr, PipelineStepInputSchema as yt, auditedFields as z, classifySecretWrite as za, RECORD_SECRET_COLLECTION_PREFIX as zi, OnBehalfSchema as zn, systemMethod as zr, ReadinessTimeoutError as zt };
|
|
@@ -36,6 +36,14 @@ export interface DeviceStepConfig {
|
|
|
36
36
|
* when the effective device's format cannot run the step's model.
|
|
37
37
|
*/
|
|
38
38
|
readonly jumpDeviceKey?: string;
|
|
39
|
+
/**
|
|
40
|
+
* DEVICE switch for this step (D1065). `false` = the step is never
|
|
41
|
+
* provisioned on this accelerator: a detail step jumps to another enabled
|
|
42
|
+
* device of the node where it is allowed, else it is skipped
|
|
43
|
+
* (`disabled-on-device`). Absent = inherit (on). Written by
|
|
44
|
+
* `setDeviceStepEnabled`.
|
|
45
|
+
*/
|
|
46
|
+
readonly enabled?: boolean;
|
|
39
47
|
}
|
|
40
48
|
/**
|
|
41
49
|
* Per-agent pipeline settings. Phase 2f: engine + hwaccel + audio
|
|
@@ -108,6 +116,12 @@ export interface AgentPipelineSettings {
|
|
|
108
116
|
* read.
|
|
109
117
|
*/
|
|
110
118
|
readonly stepSettings?: Readonly<Record<string, Readonly<Record<string, unknown>>>>;
|
|
119
|
+
/**
|
|
120
|
+
* NODE switch per step (D1065): `stepId → enabled`. `false` = the step never
|
|
121
|
+
* runs on any camera whose pipeline runs on this node (skip reason
|
|
122
|
+
* `disabled-on-node`). Absent = inherit. Written by `setNodeStepEnabled`.
|
|
123
|
+
*/
|
|
124
|
+
readonly stepEnabled?: Readonly<Record<string, boolean>>;
|
|
111
125
|
/**
|
|
112
126
|
* Multi-device inference opt-in (Phase 4 multi-device). Maps a device key
|
|
113
127
|
* (`openvino:npu`, `openvino:gpu`, `edgetpu:usb`, `edgetpu:usb:1`, `cpu`, …
|