@camstack/types 1.2.400 → 1.2.402
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/addon.js +1 -71
- package/dist/addon.mjs +1 -71
- package/dist/capabilities/addon-settings.cap.d.ts +5 -0
- package/dist/capabilities/capability-definition.d.ts +42 -1
- package/dist/capabilities/consumables.cap.d.ts +187 -14
- package/dist/capabilities/core-blocks.cap.d.ts +1 -0
- package/dist/capabilities/device-history.cap.d.ts +148 -0
- package/dist/capabilities/device-manager.cap.d.ts +4 -0
- package/dist/capabilities/dishwasher.cap.d.ts +3 -38
- package/dist/capabilities/index.d.ts +7 -7
- package/dist/capabilities/pipeline-orchestrator.cap.d.ts +28 -0
- package/dist/capabilities/platform-probe.cap.d.ts +74 -0
- package/dist/capabilities/vacuum-control.cap.d.ts +5 -141
- package/dist/client.js +19 -4
- package/dist/client.mjs +19 -4
- package/dist/generated/addon-api.d.ts +28 -0
- package/dist/generated/addon-cap-facts.d.ts +1 -1
- package/dist/generated/history-catalog.d.ts +8 -2
- package/dist/generated/method-access-map.d.ts +1 -1
- package/dist/generated/system-proxy.d.ts +2 -2
- package/dist/index.d.ts +1 -1
- package/dist/index.js +420 -129
- package/dist/index.mjs +407 -128
- package/dist/interfaces/config-ui.d.ts +4 -2
- package/dist/pipeline/load-balancing/effective-shares.d.ts +6 -0
- package/dist/pipeline/load-balancing/share-election.d.ts +46 -0
- package/dist/{sleep-DJFUfKvA.mjs → sleep-CUp20JkO.mjs} +10 -2
- package/dist/{sleep-CD18m9HF.js → sleep-DVovpDRU.js} +15 -1
- package/package.json +1 -1
|
@@ -72,9 +72,11 @@ export interface ConfigSection {
|
|
|
72
72
|
* inside the same top tab in `order` sequence — used for the
|
|
73
73
|
* Zones tab where orchestrator (geometry CRUD) + motion-wasm
|
|
74
74
|
* (motion rules) + detection-pipeline (detection rules) all
|
|
75
|
-
* contribute to one operator surface.
|
|
75
|
+
* contribute to one operator surface. `'hero'` shows the section ONCE
|
|
76
|
+
* directly under the device's hero card, outside every tab — the
|
|
77
|
+
* Consumables section (D915).
|
|
76
78
|
*/
|
|
77
|
-
readonly location?: 'settings' | 'top-tab';
|
|
79
|
+
readonly location?: 'settings' | 'top-tab' | 'hero';
|
|
78
80
|
/** Sort order within the tab. Lower = top. */
|
|
79
81
|
readonly order?: number;
|
|
80
82
|
/**
|
|
@@ -26,6 +26,12 @@ export interface EffectiveSharesInput {
|
|
|
26
26
|
readonly eligibleNodes: readonly string[];
|
|
27
27
|
/** nodeId → device keys that can take sessions; a node absent here lists none. */
|
|
28
28
|
readonly eligibleDevices: Readonly<Record<string, readonly string[]>>;
|
|
29
|
+
/**
|
|
30
|
+
* nodeId → device keys the node's probe answered WITHOUT (D919): stored
|
|
31
|
+
* weights survive a device that left, but it takes no share — neither set
|
|
32
|
+
* nor effective — and the election's weights never name it.
|
|
33
|
+
*/
|
|
34
|
+
readonly absentDevices?: Readonly<Record<string, readonly string[]>>;
|
|
29
35
|
readonly policy?: SessionPlacementPolicy;
|
|
30
36
|
readonly computedAt?: number | null;
|
|
31
37
|
readonly trigger?: string | null;
|
|
@@ -59,3 +59,49 @@ export type ShareElection = {
|
|
|
59
59
|
readonly kind: 'none';
|
|
60
60
|
};
|
|
61
61
|
export declare function electByShare(candidates: readonly ShareCandidate[]): ShareElection;
|
|
62
|
+
/**
|
|
63
|
+
* Affinity (D916, amends D913): a camera's sessions are short and frequent, and
|
|
64
|
+
* every election is a fresh one — with the recency memory rotating on purpose,
|
|
65
|
+
* one camera hopped node on 11 of 14 sessions in ten minutes, each hop a stream
|
|
66
|
+
* dial, a decode-worker fork and a cold pre-roll. The candidate a camera ran on
|
|
67
|
+
* last is kept while its deficit is within {@link SHARE_AFFINITY_TOLERANCE_SESSIONS}
|
|
68
|
+
* of the turn holder's, and while it has room (offered, not capped, not
|
|
69
|
+
* drowning). It moves only when the share is really off — and because a kept
|
|
70
|
+
* session still counts toward its candidate, the cumulative split still follows
|
|
71
|
+
* the shares: no candidate runs more than about one session over its share
|
|
72
|
+
* before its cameras leave.
|
|
73
|
+
*/
|
|
74
|
+
export declare const SHARE_AFFINITY_TOLERANCE_SESSIONS = 1;
|
|
75
|
+
export type ShareAffinityReason =
|
|
76
|
+
/** The camera has no remembered placement (first session, or it expired). */
|
|
77
|
+
'no-previous'
|
|
78
|
+
/** The previous candidate is not offered this time (offline, ineligible, in backoff). */
|
|
79
|
+
| 'previous-ineligible'
|
|
80
|
+
/** The previous candidate is at its cap or drowning. */
|
|
81
|
+
| 'previous-no-room'
|
|
82
|
+
/** The share rule elected the previous candidate anyway. */
|
|
83
|
+
| 'previous-is-turn'
|
|
84
|
+
/** Kept: the previous candidate is within the tolerance of the turn holder. */
|
|
85
|
+
| 'within-one-session'
|
|
86
|
+
/** Moved: the previous candidate is more than the tolerance over its share. */
|
|
87
|
+
| 'share-off';
|
|
88
|
+
/** One candidate as the election saw it — what the election line logs. */
|
|
89
|
+
export interface ShareScoredCandidate {
|
|
90
|
+
readonly key: string;
|
|
91
|
+
readonly share: number;
|
|
92
|
+
readonly running: number;
|
|
93
|
+
readonly recent: number;
|
|
94
|
+
readonly deficit: number;
|
|
95
|
+
}
|
|
96
|
+
export interface ShareAffinityElection {
|
|
97
|
+
readonly election: ShareElection;
|
|
98
|
+
/** True when the elected candidate is the previous one. */
|
|
99
|
+
readonly sticky: boolean;
|
|
100
|
+
readonly affinityReason: ShareAffinityReason;
|
|
101
|
+
readonly previousKey: string | null;
|
|
102
|
+
/** The candidate the plain share rule elected (null when nothing was). */
|
|
103
|
+
readonly turnKey: string | null;
|
|
104
|
+
readonly scored: readonly ShareScoredCandidate[];
|
|
105
|
+
}
|
|
106
|
+
/** {@link electByShare}, keeping the previous candidate while the share allows it. */
|
|
107
|
+
export declare function electByShareWithAffinity(candidates: readonly ShareCandidate[], previousKey: string | null, toleranceSessions?: number): ShareAffinityElection;
|
|
@@ -6028,6 +6028,10 @@ var HISTORY_UNIT_LABELS = {
|
|
|
6028
6028
|
kbps: "kbps",
|
|
6029
6029
|
fps: "fps"
|
|
6030
6030
|
};
|
|
6031
|
+
/** The catalog field path of an item field: `<itemsPath>[].<field>` (`items[].level`). */
|
|
6032
|
+
function historyItemFieldPath(itemsPath, field) {
|
|
6033
|
+
return `${itemsPath}[].${field}`;
|
|
6034
|
+
}
|
|
6031
6035
|
/** Capture floor (ms) applied to `gauge` / `counter` series when a field states none. */
|
|
6032
6036
|
var HISTORY_DEFAULT_MIN_INTERVAL_MS = 1e4;
|
|
6033
6037
|
/**
|
|
@@ -6084,7 +6088,11 @@ var ContributionSectionSchema = z.object({
|
|
|
6084
6088
|
z.literal(4)
|
|
6085
6089
|
]).optional(),
|
|
6086
6090
|
tab: z.string().optional(),
|
|
6087
|
-
location: z.enum([
|
|
6091
|
+
location: z.enum([
|
|
6092
|
+
"settings",
|
|
6093
|
+
"top-tab",
|
|
6094
|
+
"hero"
|
|
6095
|
+
]).optional(),
|
|
6088
6096
|
order: z.number().optional(),
|
|
6089
6097
|
fields: z.array(z.any())
|
|
6090
6098
|
});
|
|
@@ -8177,4 +8185,4 @@ function sleepCancellable(ms, signal) {
|
|
|
8177
8185
|
});
|
|
8178
8186
|
}
|
|
8179
8187
|
//#endregion
|
|
8180
|
-
export {
|
|
8188
|
+
export { method as $, PEER_BYTES_TICKET_TTL_MS as $n, audioChunkBytesPerSample as $r, parseSecretPath as $t, HF_REPO as A, RECORD_DEFAULT_MAX_DATA_BYTES as An, WELL_KNOWN_TAB_MAP as Ar, SubscribeAudioChunksResultSchema as At, describeCustomActions as B, resolveSecretViewsIn as Bn, isSecretFieldView as Br, EntryDescriptorSchema as Bt, addonSliceHandleApi as C, UnknownRecordKindError as Cn, parseSecretRef as Cr, FrameHandleSchema as Ct, createSliceHandle as D, RECORD_BATCH_MAX_BYTES as Dn, emitReadiness as Dr, StreamSourceEntrySchema$1 as Dt, createMirrorSource as E, RECORD_BATCH_MAX as En, createEvent as Er, ProfileSlotStatusSchema as Et, DEVICE_CHILDREN_BATCH_MAX as F, RECORD_MAX_INDEX_FIELDS as Fn, hydrateSchema as Fr, makeInMemoryRecords as Ft, DEVICE_STATUS_METHOD as G, forgetKnownSecret as Gn, REDACTED_SECRET as Gr, RecordRetentionSchema as Gt, adminUiCapability as H, createSecretsAccess as Hn, isSecretMarkerLike as Hr, RecordIndexSchema as Ht, CALLER_STAMPED_CAPABILITIES as I, RECORD_QUERY_MAX as In, resolveHydratedFieldValue as Ir, defineEntryKind as It, PROVIDER_PIN_FIELD as J, scrubKnownSecrets as Jn, isKeychainStoredField as Jr, declarationsOf as Jt, HISTORY_DEFAULT_MIN_INTERVAL_MS as K, knownSecretCount as Kn, collectKeychainStoredKeys as Kr, StoredRecordKindDeclarationSchema as Kt, withoutCallerStamp as L, RECORD_SECRET_COLLECTION_PREFIX as Ln, SECRET_CLEAR as Lr, entryBody as Lt, RawStateResultSchema as M, RECORD_ID_MAX_LENGTH as Mn, collectHydratedFieldValues as Mr, makeSourceBrokerId as Mt, deviceOpsCapability as N, RECORD_MAX_DATA_BYTES as Nn, dehydrateConfigField as Nr, parseProfileBrokerId as Nt, DEFAULT_TOKEN_EXPIRY as O, RECORD_CLASSES as On, isEvent as Or, StreamSourceSchema as Ot, viewerUiCapability as P, RECORD_MAX_INDEXES as Pn, dehydrateSchema as Pr, selectAssignedProfileSlots as Pt, isDeviceConfigCap as Q, PEER_BYTES_STALL_MS as Qn, AUDIO_CHUNK_FORMATS as Qr, mapSecretLeaves as Qt, customAction as R, RECORD_SETTINGS_MAX_ROWS as Rn, classifySecretWrite as Rr, createRecordsAccess as Rt, invokeTrpcLeaf as S, UnindexedFilterError as Sn, normalizeSecretOwner as Sr, DecodedAudioChunkSchema as St, createLazyTrpcSource as T, recordsErrorFromMessage as Tn, createDurableState as Tr, ProfileSlotSchema as Tt, DEFAULT_RUNTIME_STATE_DURABILITY as U, MIN_SCRUBBED_LENGTH as Un, makeSecretMarker as Ur, RecordKindDeclarationSchema as Ut, deviceCustomAction as V, REVALIDATE_AFTER_MS as Vn, isSecretMarker as Vr, RecordFieldPathSchema as Vt, DEVICE_SETTINGS_CONTRIBUTION_METHODS as W, clearKnownSecrets as Wn, toSecretFieldView as Wr, RecordKindNameSchema as Wt, expandCapMethods as X, PEER_BYTES_CHUNK_BYTES as Xn, omitTransientConfig as Xr, REMOVE_LEAF as Xt, event as Y, shortSecretRefHash as Yn, isSecretConfigField as Yr, defineRecordKinds as Yt, historyItemFieldPath as Z, PEER_BYTES_MAX_OUTSTANDING as Zn, schemaDeclaresAnyField as Zr, collectSecretLeaves as Zt, readErrorI18n as _, RecordTooLargeError as _n, arrayItemFieldPath as _r, CAM_PROFILE_ORDER as _t, asJsonArray as a, collectZodSecretPaths as an, classifyStoreError as ar, readNodePin as at, isDeviceScopedCap as b, RevConflictError as bn, globalSecretScope as br, CamStreamResolutionSchema as bt, asString as c, DeclarationRefusedError as cn, parseSecretStatePath as cr, ReadinessRegistry as ct, parseJsonUnknown as d, InvalidRecordError as dn, KeychainWriteRefusedError as dr, readinessKey as dt, expandAudioChunkToF32le as ei, recordArrayItemPath as en, PeerBytesTicketSchema as er, optionalMethod as et, hfModelUrl as f, NoCallerError as fn, collectSecretMarkerRefs as fr, scopeKey as ft, ErrorI18nPayloadSchema as g, RecordSecretUnavailableError as gn, SECRET_REF_SCHEME as gr, BrokerStatusSchema as gt, ErrorCodeSchema as h, RecordNotFoundError as hn, transformSecretWrite as hr, BrokerStatsSchema as ht, asBoolean as i, SECRET_META as in, BaseAddon as ir, nodePin as it, RUNTIME_DEFAULTS as j, RECORD_DELETE_BATCH as jn, collectHydratedFieldEntries as jr, makeProfileBrokerId as jt, HF_BASE_URL as k, RECORD_DATABASES as kn, WELL_KNOWN_TABS as kr, SubscribeAudioChunksInputSchema as kt, parseJsonArray as l, FilterRequiredError as ln, secretTreeFromPaths as lr, ReadinessTimeoutError as lt, CamstackError as m, RECORDS_ERROR_CODES as mn, resolveSecretMarkers as mr, AudioStreamPickSchema as mt, sleepCancellable as n, recordSecretRef as nn, SHARE_VIEW_KINDS as nr, systemMethod as nt, asJsonObject as o, isZodSecret as on, normalizeAddonInitResult as or, toNodeId as ot, BOOT_RECOVERY_BACKOFF_MS as p, PlaintextSecretError as pn, isSecretRefOwnedBy as pr, AudioChunkFormatSchema as pt, HISTORY_UNIT_LABELS as q, registerKnownSecret as qn, collectSecretConfigKeys as qr, assertValidDeclaration as qt, maskUrlCredentials as r, secretArrayPrefixes as rn, DisposerChain as rr, CAP_NODE_PIN_CONTEXT_KEY as rt, asNumber as s, BatchTooLargeError as sn, mergeSecretStatePaths as sr, MODEL_FORMATS as st, sleep as t, isAudioChunkFormat as ti, recordSecretCollection as tn, DATAPLANE_SECRET_HEADER as tr, resolveCapMount as tt, parseJsonObject as u, ForeignSecretMarkerError as un, secretTreeFromSchema as ur, emitDownForOwnedCaps as ut, userError as v, RecordUniqueViolationError as vn, buildSecretRef as vr, CamProfileSchema as vt, createEventBusSliceSource as w, asRecordsError as wn, normalizeNodeId as wr, ProfileRtspEntrySchema as wt, createDeviceProxy as x, TransactRefusedError as xn, isSecretRef as xr, CameraStreamSchema as xt, DEVICE_SCOPED_CAPS as y, RecordsError as yn, formatSecretScope as yr, CamStreamKindSchema as yt, defineCustomActions as z, RECORD_SWEEP_INTERVAL_MS as zn, isSecretClear as zr, assertTransactScope as zt };
|
|
@@ -6028,6 +6028,10 @@ var HISTORY_UNIT_LABELS = {
|
|
|
6028
6028
|
kbps: "kbps",
|
|
6029
6029
|
fps: "fps"
|
|
6030
6030
|
};
|
|
6031
|
+
/** The catalog field path of an item field: `<itemsPath>[].<field>` (`items[].level`). */
|
|
6032
|
+
function historyItemFieldPath(itemsPath, field) {
|
|
6033
|
+
return `${itemsPath}[].${field}`;
|
|
6034
|
+
}
|
|
6031
6035
|
/** Capture floor (ms) applied to `gauge` / `counter` series when a field states none. */
|
|
6032
6036
|
var HISTORY_DEFAULT_MIN_INTERVAL_MS = 1e4;
|
|
6033
6037
|
/**
|
|
@@ -6084,7 +6088,11 @@ var ContributionSectionSchema = zod.z.object({
|
|
|
6084
6088
|
zod.z.literal(4)
|
|
6085
6089
|
]).optional(),
|
|
6086
6090
|
tab: zod.z.string().optional(),
|
|
6087
|
-
location: zod.z.enum([
|
|
6091
|
+
location: zod.z.enum([
|
|
6092
|
+
"settings",
|
|
6093
|
+
"top-tab",
|
|
6094
|
+
"hero"
|
|
6095
|
+
]).optional(),
|
|
6088
6096
|
order: zod.z.number().optional(),
|
|
6089
6097
|
fields: zod.z.array(zod.z.any())
|
|
6090
6098
|
});
|
|
@@ -9077,6 +9085,12 @@ Object.defineProperty(exports, "hfModelUrl", {
|
|
|
9077
9085
|
return hfModelUrl;
|
|
9078
9086
|
}
|
|
9079
9087
|
});
|
|
9088
|
+
Object.defineProperty(exports, "historyItemFieldPath", {
|
|
9089
|
+
enumerable: true,
|
|
9090
|
+
get: function() {
|
|
9091
|
+
return historyItemFieldPath;
|
|
9092
|
+
}
|
|
9093
|
+
});
|
|
9080
9094
|
Object.defineProperty(exports, "hydrateSchema", {
|
|
9081
9095
|
enumerable: true,
|
|
9082
9096
|
get: function() {
|