camstack 1.2.4 → 1.2.5
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.
|
@@ -14522,7 +14522,7 @@ function date4(params) {
|
|
|
14522
14522
|
// ../../node_modules/zod/v4/classic/external.js
|
|
14523
14523
|
config(en_default());
|
|
14524
14524
|
|
|
14525
|
-
// ../types/dist/sleep-
|
|
14525
|
+
// ../types/dist/sleep-DiOnzenz.mjs
|
|
14526
14526
|
var WELL_KNOWN_TABS = [
|
|
14527
14527
|
{
|
|
14528
14528
|
id: "overview",
|
|
@@ -15129,6 +15129,7 @@ function method(input, output, options) {
|
|
|
15129
15129
|
kind: options?.kind ?? "query",
|
|
15130
15130
|
auth: options?.auth ?? "protected",
|
|
15131
15131
|
...options?.access !== void 0 ? { access: options.access } : {},
|
|
15132
|
+
...options?.caller !== void 0 ? { caller: options.caller } : {},
|
|
15132
15133
|
timeoutMs: options?.timeoutMs
|
|
15133
15134
|
};
|
|
15134
15135
|
}
|
|
@@ -16344,6 +16345,35 @@ for (const l of AUDIO_MACRO_LABELS) {
|
|
|
16344
16345
|
sub(kind, "audio", "audio", TAXONOMY_COLORS.audio, kind, l.name);
|
|
16345
16346
|
}
|
|
16346
16347
|
var EVENT_TAXONOMY = Object.freeze(Object.fromEntries(entries));
|
|
16348
|
+
var NcTaxonomyEntrySchema = external_exports.object({
|
|
16349
|
+
/** Stable kind id (e.g. 'person', 'car', 'audio-scream', 'doorbell'). */
|
|
16350
|
+
kind: external_exports.string(),
|
|
16351
|
+
/** English fallback label (the UI translates via the event-kind i18n key). */
|
|
16352
|
+
label: external_exports.string(),
|
|
16353
|
+
/** Macro/category parent for grouping ('car' → 'vehicle'); null for a top. */
|
|
16354
|
+
parentKind: external_exports.string().nullable()
|
|
16355
|
+
});
|
|
16356
|
+
var NcTaxonomySchema = external_exports.object({
|
|
16357
|
+
videoClasses: external_exports.array(NcTaxonomyEntrySchema),
|
|
16358
|
+
audioKinds: external_exports.array(NcTaxonomyEntrySchema),
|
|
16359
|
+
labels: external_exports.array(NcTaxonomyEntrySchema)
|
|
16360
|
+
});
|
|
16361
|
+
function toEntry(kind, label, parentKind) {
|
|
16362
|
+
return {
|
|
16363
|
+
kind,
|
|
16364
|
+
label,
|
|
16365
|
+
parentKind
|
|
16366
|
+
};
|
|
16367
|
+
}
|
|
16368
|
+
function buildNcTaxonomy() {
|
|
16369
|
+
const all = Object.values(EVENT_TAXONOMY);
|
|
16370
|
+
return {
|
|
16371
|
+
videoClasses: all.filter((e) => e.category === "detection").map((e) => toEntry(e.kind, e.label, e.parentKind)),
|
|
16372
|
+
audioKinds: all.filter((e) => e.category === "audio" && e.level === "sub").map((e) => toEntry(e.kind, e.label, e.parentKind)),
|
|
16373
|
+
labels: all.filter((e) => e.category === "sensor" || e.category === "control").map((e) => toEntry(e.kind, e.label, e.parentKind))
|
|
16374
|
+
};
|
|
16375
|
+
}
|
|
16376
|
+
var NC_TAXONOMY = Object.freeze(buildNcTaxonomy());
|
|
16347
16377
|
var ExpressionParseError = class extends Error {
|
|
16348
16378
|
position;
|
|
16349
16379
|
constructor(message, position) {
|
|
@@ -19498,6 +19528,17 @@ var CameraMetricsSchema = external_exports.object({
|
|
|
19498
19528
|
])
|
|
19499
19529
|
});
|
|
19500
19530
|
var CameraMetricsWithDeviceIdSchema = CameraMetricsSchema.extend({ deviceId: external_exports.number() });
|
|
19531
|
+
var NativeCropRefSchema = external_exports.object({
|
|
19532
|
+
/** Handle keying the retained native surface (node-pinned to its owner). */
|
|
19533
|
+
handle: FrameHandleSchema,
|
|
19534
|
+
/** The parent crop's padded/clamped rectangle in FRAME-space pixels. */
|
|
19535
|
+
cropFrameSpace: external_exports.object({
|
|
19536
|
+
x: external_exports.number(),
|
|
19537
|
+
y: external_exports.number(),
|
|
19538
|
+
w: external_exports.number(),
|
|
19539
|
+
h: external_exports.number()
|
|
19540
|
+
})
|
|
19541
|
+
});
|
|
19501
19542
|
var ModelFormatSchema$1 = external_exports.enum([
|
|
19502
19543
|
"onnx",
|
|
19503
19544
|
"coreml",
|
|
@@ -19850,7 +19891,22 @@ var pipelineExecutorCapability = {
|
|
|
19850
19891
|
* Omitted ⇒ the runner's default device (current single-engine
|
|
19851
19892
|
* behaviour). Selects WHICH device pool of the node runs the call.
|
|
19852
19893
|
*/
|
|
19853
|
-
deviceKey: external_exports.string().optional()
|
|
19894
|
+
deviceKey: external_exports.string().optional(),
|
|
19895
|
+
/**
|
|
19896
|
+
* Two-plane NATIVE child-crop reference. Set by `runDetailSubtree` ONLY
|
|
19897
|
+
* when the parent crop was resolved from the frame's retained NATIVE
|
|
19898
|
+
* surface (a frameHandle HIT). Lets the executor re-cut a LEAF crop
|
|
19899
|
+
* child's ROI (plate-ocr, face-embedding, leaf classifiers) at native
|
|
19900
|
+
* resolution from that surface — the SAME quality path faces already
|
|
19901
|
+
* had — instead of the downscaled parent tile. `handle` keys the native
|
|
19902
|
+
* surface (node-pinned to its owner); `cropFrameSpace` is the parent
|
|
19903
|
+
* crop's padded/clamped rectangle in FRAME-space pixels, used to compose
|
|
19904
|
+
* the executor's crop-normalized child ROI back into frame-normalized
|
|
19905
|
+
* coordinates. Auxiliary to the image source (`image`/`frame`/…), NOT one
|
|
19906
|
+
* of the mutually-exclusive image inputs. Absent ⇒ tile-crop children
|
|
19907
|
+
* (today's behaviour on the fallback path).
|
|
19908
|
+
*/
|
|
19909
|
+
nativeCropRef: NativeCropRefSchema.optional()
|
|
19854
19910
|
}), PipelineRunResultBridge, { kind: "mutation" }),
|
|
19855
19911
|
/**
|
|
19856
19912
|
* Batched run — N raw frames packed into one cap call. The provider
|
|
@@ -20098,7 +20154,11 @@ var DetailResultSchema = external_exports.object({
|
|
|
20098
20154
|
bbox: NativeCropBboxSchema.optional(),
|
|
20099
20155
|
embedding: external_exports.string().optional(),
|
|
20100
20156
|
label: external_exports.string().optional(),
|
|
20101
|
-
alignedCropJpeg: external_exports.string().optional()
|
|
20157
|
+
alignedCropJpeg: external_exports.string().optional(),
|
|
20158
|
+
/** Face short side (px) measured on the NATIVE crop surface. The `bbox`
|
|
20159
|
+
* above is detection-frame px (≈6× smaller on a 4K camera) — min-face-size
|
|
20160
|
+
* consumers MUST prefer this when present (2026-07-22 native-gate fix). */
|
|
20161
|
+
nativeFaceShortSidePx: external_exports.number().optional()
|
|
20102
20162
|
});
|
|
20103
20163
|
var motionCooldownMsField = {
|
|
20104
20164
|
min: 0,
|
|
@@ -20106,6 +20166,12 @@ var motionCooldownMsField = {
|
|
|
20106
20166
|
default: 3e4,
|
|
20107
20167
|
step: 500
|
|
20108
20168
|
};
|
|
20169
|
+
var maxSessionHoldMsField = {
|
|
20170
|
+
min: 0,
|
|
20171
|
+
max: 6e5,
|
|
20172
|
+
default: 12e4,
|
|
20173
|
+
step: 5e3
|
|
20174
|
+
};
|
|
20109
20175
|
var motionFpsField = {
|
|
20110
20176
|
min: 1,
|
|
20111
20177
|
max: 30,
|
|
@@ -20186,6 +20252,19 @@ var RunnerCameraConfigSchema = external_exports.object({
|
|
|
20186
20252
|
"on-motion"
|
|
20187
20253
|
]).default("always-on"),
|
|
20188
20254
|
motionCooldownMs: external_exports.number().min(motionCooldownMsField.min).default(motionCooldownMsField.default),
|
|
20255
|
+
/**
|
|
20256
|
+
* Orchestrator-side on-motion session-hold cap (ms). While an on-motion
|
|
20257
|
+
* detection session is active and ≥1 confirmed non-stationary track is
|
|
20258
|
+
* still live, the orchestrator keeps the session open past
|
|
20259
|
+
* `motionCooldownMs` (a slowly-moving subject can stop re-triggering the
|
|
20260
|
+
* camera's VMD yet is still being tracked frame-to-frame) — up to this many
|
|
20261
|
+
* ms since the session opened, after which it closes regardless. `0`
|
|
20262
|
+
* disables the hold (legacy cooldown-only teardown). Not consumed by the
|
|
20263
|
+
* runner itself — carried here so it shares the per-camera device-settings
|
|
20264
|
+
* surface with `motionCooldownMs`; the orchestrator reads it off the
|
|
20265
|
+
* resolved `CameraDetectionConfig`.
|
|
20266
|
+
*/
|
|
20267
|
+
maxSessionHoldMs: external_exports.number().min(maxSessionHoldMsField.min).max(maxSessionHoldMsField.max).optional(),
|
|
20189
20268
|
motionFps: external_exports.number().min(motionFpsField.min).max(motionFpsField.max).default(motionFpsField.default),
|
|
20190
20269
|
detectionFps: external_exports.number().min(detectionFpsField.min).max(detectionFpsField.max).default(detectionFpsField.default),
|
|
20191
20270
|
motionStreamId: external_exports.string(),
|
|
@@ -20334,6 +20413,21 @@ var RunnerCameraDeviceUIFields = [
|
|
|
20334
20413
|
nullable: true,
|
|
20335
20414
|
nullLabel: "Default"
|
|
20336
20415
|
},
|
|
20416
|
+
{
|
|
20417
|
+
key: "maxSessionHoldMs",
|
|
20418
|
+
type: "slider",
|
|
20419
|
+
label: "Max session hold",
|
|
20420
|
+
description: "Upper bound on how long detection keeps running past the motion cooldown while a subject is still moving in-frame but no longer triggering motion. Prevents the detection box from stopping on a slow-moving subject. Set to 0 to disable.",
|
|
20421
|
+
min: maxSessionHoldMsField.min,
|
|
20422
|
+
max: maxSessionHoldMsField.max,
|
|
20423
|
+
step: maxSessionHoldMsField.step,
|
|
20424
|
+
default: maxSessionHoldMsField.default,
|
|
20425
|
+
showValue: true,
|
|
20426
|
+
unit: "s",
|
|
20427
|
+
displayScale: 1e3,
|
|
20428
|
+
nullable: true,
|
|
20429
|
+
nullLabel: "Default"
|
|
20430
|
+
},
|
|
20337
20431
|
{
|
|
20338
20432
|
key: "onboardMotionDrivesAnalyzer",
|
|
20339
20433
|
type: "boolean",
|
|
@@ -22918,106 +23012,6 @@ var addonWidgetsCapability = {
|
|
|
22918
23012
|
mode: "singleton",
|
|
22919
23013
|
methods: { listWidgets: method(external_exports.void(), external_exports.array(EnrichedWidgetMetadataSchema).readonly()) }
|
|
22920
23014
|
};
|
|
22921
|
-
var NotificationRuleConditionsSchema = external_exports.object({
|
|
22922
|
-
deviceIds: external_exports.array(external_exports.number()).readonly().optional(),
|
|
22923
|
-
classNames: external_exports.array(external_exports.string()).readonly().optional(),
|
|
22924
|
-
zoneIds: external_exports.array(external_exports.string()).readonly().optional(),
|
|
22925
|
-
minConfidence: external_exports.number().optional(),
|
|
22926
|
-
source: external_exports.enum([
|
|
22927
|
-
"pipeline",
|
|
22928
|
-
"onboard",
|
|
22929
|
-
"any"
|
|
22930
|
-
]).optional(),
|
|
22931
|
-
schedule: external_exports.object({
|
|
22932
|
-
days: external_exports.array(external_exports.number()).readonly(),
|
|
22933
|
-
startHour: external_exports.number(),
|
|
22934
|
-
endHour: external_exports.number()
|
|
22935
|
-
}).optional(),
|
|
22936
|
-
cooldownSeconds: external_exports.number().optional(),
|
|
22937
|
-
minDwellSeconds: external_exports.number().optional(),
|
|
22938
|
-
/** Match against `event.data.eventType` token (e.g. `'press_long'`). When non-empty, only events
|
|
22939
|
-
* carrying a matching `data.eventType` string pass this condition. Rules without this field are
|
|
22940
|
-
* unaffected (back-compat). Distinct from `rule.eventTypes` which holds EventCategory strings. */
|
|
22941
|
-
eventTypeTokens: external_exports.array(external_exports.string()).readonly().optional(),
|
|
22942
|
-
/** Match detections whose CLIP image embedding is semantically similar to this free-text
|
|
22943
|
-
* description. Requires the embedding-encoder cap to have pre-warmed the text vector.
|
|
22944
|
-
* `minSimilarity` is the cosine similarity threshold in [0, 1]. */
|
|
22945
|
-
clipDescription: external_exports.object({
|
|
22946
|
-
text: external_exports.string().min(1),
|
|
22947
|
-
minSimilarity: external_exports.number().min(0).max(1)
|
|
22948
|
-
}).optional(),
|
|
22949
|
-
/** Match events whose recognized-entity label (face identity name or plate
|
|
22950
|
-
* vehicle name, propagated onto `event.data.label`) is one of these values.
|
|
22951
|
-
* Empty/absent → unaffected (back-compat). Enables "notify me when <named
|
|
22952
|
-
* vehicle/person> is seen". */
|
|
22953
|
-
labels: external_exports.array(external_exports.string()).readonly().optional()
|
|
22954
|
-
});
|
|
22955
|
-
var NotificationRuleTemplateSchema = external_exports.object({
|
|
22956
|
-
title: external_exports.string(),
|
|
22957
|
-
body: external_exports.string(),
|
|
22958
|
-
imageMode: external_exports.enum([
|
|
22959
|
-
"crop",
|
|
22960
|
-
"annotated",
|
|
22961
|
-
"full",
|
|
22962
|
-
"none"
|
|
22963
|
-
])
|
|
22964
|
-
});
|
|
22965
|
-
var NotificationRuleSchema = external_exports.object({
|
|
22966
|
-
id: external_exports.string(),
|
|
22967
|
-
name: external_exports.string(),
|
|
22968
|
-
enabled: external_exports.boolean(),
|
|
22969
|
-
eventTypes: external_exports.array(external_exports.string()).readonly(),
|
|
22970
|
-
conditions: NotificationRuleConditionsSchema,
|
|
22971
|
-
outputs: external_exports.array(external_exports.string()).readonly(),
|
|
22972
|
-
template: NotificationRuleTemplateSchema.optional(),
|
|
22973
|
-
priority: external_exports.enum([
|
|
22974
|
-
"low",
|
|
22975
|
-
"normal",
|
|
22976
|
-
"high",
|
|
22977
|
-
"critical"
|
|
22978
|
-
])
|
|
22979
|
-
});
|
|
22980
|
-
var NotificationTestResultSchema = external_exports.object({
|
|
22981
|
-
ruleId: external_exports.string(),
|
|
22982
|
-
eventId: external_exports.string(),
|
|
22983
|
-
timestamp: external_exports.number(),
|
|
22984
|
-
wouldFire: external_exports.boolean(),
|
|
22985
|
-
reason: external_exports.string().optional()
|
|
22986
|
-
});
|
|
22987
|
-
var NotificationHistoryEntrySchema = external_exports.object({
|
|
22988
|
-
id: external_exports.string(),
|
|
22989
|
-
ruleId: external_exports.string(),
|
|
22990
|
-
ruleName: external_exports.string(),
|
|
22991
|
-
eventId: external_exports.string(),
|
|
22992
|
-
timestamp: external_exports.number(),
|
|
22993
|
-
outputs: external_exports.array(external_exports.string()).readonly(),
|
|
22994
|
-
success: external_exports.boolean(),
|
|
22995
|
-
error: external_exports.string().optional(),
|
|
22996
|
-
deviceId: external_exports.number().optional()
|
|
22997
|
-
});
|
|
22998
|
-
var NotificationHistoryFilterSchema = external_exports.object({
|
|
22999
|
-
ruleId: external_exports.string().optional(),
|
|
23000
|
-
deviceId: external_exports.number().optional(),
|
|
23001
|
-
from: external_exports.number().optional(),
|
|
23002
|
-
to: external_exports.number().optional(),
|
|
23003
|
-
limit: external_exports.number().optional()
|
|
23004
|
-
});
|
|
23005
|
-
var advancedNotifierCapability = {
|
|
23006
|
-
name: "advanced-notifier",
|
|
23007
|
-
scope: "system",
|
|
23008
|
-
mode: "singleton",
|
|
23009
|
-
internal: true,
|
|
23010
|
-
methods: {
|
|
23011
|
-
getRules: method(external_exports.void(), external_exports.object({ rules: external_exports.array(NotificationRuleSchema).readonly() })),
|
|
23012
|
-
upsertRule: method(external_exports.object({ rule: NotificationRuleSchema }), external_exports.object({ success: external_exports.literal(true) }), { kind: "mutation" }),
|
|
23013
|
-
deleteRule: method(external_exports.object({ ruleId: external_exports.string() }), external_exports.object({ success: external_exports.literal(true) }), { kind: "mutation" }),
|
|
23014
|
-
testRule: method(external_exports.object({
|
|
23015
|
-
ruleId: external_exports.string(),
|
|
23016
|
-
lookbackMinutes: external_exports.number()
|
|
23017
|
-
}), external_exports.object({ results: external_exports.array(NotificationTestResultSchema).readonly() }), { kind: "mutation" }),
|
|
23018
|
-
getHistory: method(external_exports.object({ filter: NotificationHistoryFilterSchema.optional() }), external_exports.object({ entries: external_exports.array(NotificationHistoryEntrySchema).readonly() }))
|
|
23019
|
-
}
|
|
23020
|
-
};
|
|
23021
23015
|
var AlertSeveritySchema = external_exports.enum([
|
|
23022
23016
|
"info",
|
|
23023
23017
|
"success",
|
|
@@ -23283,57 +23277,6 @@ var authProviderCapability = {
|
|
|
23283
23277
|
/** BIG PLAN 2: declarative mount hint — read by `@camstack/system` `buildCapRouters`. */
|
|
23284
23278
|
mount: { kind: "skip" }
|
|
23285
23279
|
};
|
|
23286
|
-
var LoginStageEnum = external_exports.enum(["primary", "second-factor"]);
|
|
23287
|
-
var RedirectLoginMethodSchema = external_exports.object({
|
|
23288
|
-
kind: external_exports.literal("redirect"),
|
|
23289
|
-
/** Stable id within the login-method set (e.g. `auth-oidc/google`). */
|
|
23290
|
-
id: external_exports.string(),
|
|
23291
|
-
/** Operator-facing button label. */
|
|
23292
|
-
label: external_exports.string(),
|
|
23293
|
-
/** lucide-react icon name. */
|
|
23294
|
-
icon: external_exports.string().optional(),
|
|
23295
|
-
/** Addon-owned HTTP route the button navigates to (GET). */
|
|
23296
|
-
startUrl: external_exports.string(),
|
|
23297
|
-
stage: LoginStageEnum
|
|
23298
|
-
});
|
|
23299
|
-
var WidgetLoginMethodSchema = external_exports.object({
|
|
23300
|
-
kind: external_exports.literal("widget"),
|
|
23301
|
-
/** Stable id within the login-method set (e.g. `auth-webauthn/passkey-login`). */
|
|
23302
|
-
id: external_exports.string(),
|
|
23303
|
-
/** Owning addon id — drives the public bundle URL + the MF namespace. */
|
|
23304
|
-
addonId: external_exports.string(),
|
|
23305
|
-
/** Bundle filename inside the addon's dist dir (`remoteEntry.js`). */
|
|
23306
|
-
bundle: external_exports.string(),
|
|
23307
|
-
/** MF remote descriptor — `{ remoteName, exposedModule, componentKey }`. */
|
|
23308
|
-
remote: WidgetRemoteSchema,
|
|
23309
|
-
stage: LoginStageEnum
|
|
23310
|
-
});
|
|
23311
|
-
var PasskeyLoginMethodSchema = external_exports.object({
|
|
23312
|
-
kind: external_exports.literal("passkey"),
|
|
23313
|
-
/** Stable id within the login-method set (e.g. `auth-webauthn/passkey-direct-login`). */
|
|
23314
|
-
id: external_exports.string(),
|
|
23315
|
-
/** Operator-facing button label. */
|
|
23316
|
-
label: external_exports.string(),
|
|
23317
|
-
stage: LoginStageEnum,
|
|
23318
|
-
/** Effective WebAuthn RP ID (`resolveRpID()`) — the shell gates visibility on it. */
|
|
23319
|
-
rpId: external_exports.string(),
|
|
23320
|
-
/** Effective expected origin (`resolveOrigin()`), null when unconfigured. */
|
|
23321
|
-
origin: external_exports.string().nullable()
|
|
23322
|
-
});
|
|
23323
|
-
var LoginMethodContributionSchema = external_exports.discriminatedUnion("kind", [
|
|
23324
|
-
RedirectLoginMethodSchema,
|
|
23325
|
-
WidgetLoginMethodSchema,
|
|
23326
|
-
PasskeyLoginMethodSchema
|
|
23327
|
-
]);
|
|
23328
|
-
var loginMethodCapability = {
|
|
23329
|
-
name: "login-method",
|
|
23330
|
-
scope: "system",
|
|
23331
|
-
mode: "collection",
|
|
23332
|
-
internal: true,
|
|
23333
|
-
methods: { getLoginMethods: method(external_exports.void(), external_exports.array(LoginMethodContributionSchema).readonly()) },
|
|
23334
|
-
/** BIG PLAN 2: declarative mount hint — read by `@camstack/system` `buildCapRouters`. */
|
|
23335
|
-
mount: { kind: "skip" }
|
|
23336
|
-
};
|
|
23337
23280
|
var BackupDestinationInfoSchema = external_exports.object({
|
|
23338
23281
|
/**
|
|
23339
23282
|
* Sub-id within this addon. Convention `default` for single-
|
|
@@ -25038,290 +24981,640 @@ var filesystemBrowseCapability = {
|
|
|
25038
24981
|
})
|
|
25039
24982
|
}
|
|
25040
24983
|
};
|
|
25041
|
-
var
|
|
25042
|
-
|
|
25043
|
-
|
|
25044
|
-
"warn",
|
|
25045
|
-
"error"
|
|
25046
|
-
]);
|
|
25047
|
-
var LogEntrySchema = external_exports.object({
|
|
25048
|
-
timestamp: external_exports.date(),
|
|
25049
|
-
level: LogLevelSchema,
|
|
25050
|
-
scope: external_exports.array(external_exports.string()),
|
|
25051
|
-
message: external_exports.string(),
|
|
25052
|
-
meta: external_exports.record(external_exports.string(), external_exports.unknown()).optional(),
|
|
25053
|
-
tags: external_exports.record(external_exports.string(), external_exports.string()).optional()
|
|
25054
|
-
});
|
|
25055
|
-
var logDestinationCapability = {
|
|
25056
|
-
name: "log-destination",
|
|
25057
|
-
scope: "system",
|
|
25058
|
-
mode: "collection",
|
|
25059
|
-
internal: true,
|
|
25060
|
-
methods: {
|
|
25061
|
-
write: method(LogEntrySchema, external_exports.void(), { kind: "mutation" }),
|
|
25062
|
-
query: method(external_exports.object({
|
|
25063
|
-
scope: external_exports.array(external_exports.string()).optional(),
|
|
25064
|
-
level: LogLevelSchema.optional(),
|
|
25065
|
-
since: external_exports.date().optional(),
|
|
25066
|
-
until: external_exports.date().optional(),
|
|
25067
|
-
limit: external_exports.number().optional(),
|
|
25068
|
-
tags: external_exports.record(external_exports.string(), external_exports.string()).optional()
|
|
25069
|
-
}), external_exports.array(LogEntrySchema).readonly())
|
|
25070
|
-
},
|
|
25071
|
-
/** BIG PLAN 2: declarative mount hint — read by `@camstack/system` `buildCapRouters`. */
|
|
25072
|
-
mount: { kind: "skip" }
|
|
25073
|
-
};
|
|
25074
|
-
var CpuBreakdownSchema = external_exports.object({
|
|
25075
|
-
total: external_exports.number(),
|
|
25076
|
-
user: external_exports.number(),
|
|
25077
|
-
system: external_exports.number(),
|
|
25078
|
-
irq: external_exports.number(),
|
|
25079
|
-
nice: external_exports.number(),
|
|
25080
|
-
loadAvg: external_exports.tuple([
|
|
25081
|
-
external_exports.number(),
|
|
25082
|
-
external_exports.number(),
|
|
25083
|
-
external_exports.number()
|
|
25084
|
-
]),
|
|
25085
|
-
cores: external_exports.number()
|
|
25086
|
-
});
|
|
25087
|
-
var MemoryInfoSchema = external_exports.object({
|
|
25088
|
-
percent: external_exports.number(),
|
|
25089
|
-
totalBytes: external_exports.number(),
|
|
25090
|
-
usedBytes: external_exports.number(),
|
|
25091
|
-
availableBytes: external_exports.number(),
|
|
25092
|
-
swapUsedBytes: external_exports.number(),
|
|
25093
|
-
swapTotalBytes: external_exports.number()
|
|
25094
|
-
});
|
|
25095
|
-
var DiskIoSnapshotSchema = external_exports.object({
|
|
25096
|
-
readBytes: external_exports.number(),
|
|
25097
|
-
writeBytes: external_exports.number(),
|
|
25098
|
-
readOps: external_exports.number(),
|
|
25099
|
-
writeOps: external_exports.number(),
|
|
25100
|
-
timestampMs: external_exports.number()
|
|
25101
|
-
});
|
|
25102
|
-
var NetworkIoSnapshotSchema = external_exports.object({
|
|
25103
|
-
rxBytes: external_exports.number(),
|
|
25104
|
-
txBytes: external_exports.number(),
|
|
25105
|
-
rxPackets: external_exports.number(),
|
|
25106
|
-
txPackets: external_exports.number(),
|
|
25107
|
-
rxErrors: external_exports.number(),
|
|
25108
|
-
txErrors: external_exports.number(),
|
|
25109
|
-
timestampMs: external_exports.number()
|
|
24984
|
+
var LlmUsageSchema = external_exports.object({
|
|
24985
|
+
inputTokens: external_exports.number(),
|
|
24986
|
+
outputTokens: external_exports.number()
|
|
25110
24987
|
});
|
|
25111
|
-
var
|
|
25112
|
-
|
|
24988
|
+
var LlmErrorCodeSchema = external_exports.enum([
|
|
24989
|
+
"timeout",
|
|
24990
|
+
"rate-limited",
|
|
24991
|
+
"auth",
|
|
24992
|
+
"refusal",
|
|
24993
|
+
"bad-request",
|
|
24994
|
+
"unavailable",
|
|
24995
|
+
"no-profile",
|
|
24996
|
+
"budget-exceeded",
|
|
24997
|
+
"adapter-error"
|
|
24998
|
+
]);
|
|
24999
|
+
var LlmGenerateOkSchema = external_exports.object({
|
|
25000
|
+
ok: external_exports.literal(true),
|
|
25001
|
+
text: external_exports.string(),
|
|
25113
25002
|
model: external_exports.string(),
|
|
25114
|
-
|
|
25115
|
-
|
|
25116
|
-
|
|
25117
|
-
});
|
|
25118
|
-
var ProcessResourceInfoSchema = external_exports.object({
|
|
25119
|
-
openFds: external_exports.number(),
|
|
25120
|
-
threadCount: external_exports.number(),
|
|
25121
|
-
activeHandles: external_exports.number(),
|
|
25122
|
-
activeRequests: external_exports.number()
|
|
25003
|
+
usage: LlmUsageSchema,
|
|
25004
|
+
truncated: external_exports.boolean(),
|
|
25005
|
+
latencyMs: external_exports.number()
|
|
25123
25006
|
});
|
|
25124
|
-
var
|
|
25125
|
-
|
|
25126
|
-
|
|
25127
|
-
|
|
25007
|
+
var LlmGenerateErrSchema = external_exports.object({
|
|
25008
|
+
ok: external_exports.literal(false),
|
|
25009
|
+
code: LlmErrorCodeSchema,
|
|
25010
|
+
message: external_exports.string(),
|
|
25011
|
+
retryAfterMs: external_exports.number().optional()
|
|
25128
25012
|
});
|
|
25129
|
-
var
|
|
25130
|
-
|
|
25131
|
-
|
|
25013
|
+
var LlmGenerateResultSchema = external_exports.discriminatedUnion("ok", [LlmGenerateOkSchema, LlmGenerateErrSchema]);
|
|
25014
|
+
var LlmImageSchema = external_exports.object({
|
|
25015
|
+
bytes: external_exports.instanceof(Uint8Array),
|
|
25016
|
+
mimeType: external_exports.string()
|
|
25132
25017
|
});
|
|
25133
|
-
var
|
|
25134
|
-
|
|
25135
|
-
|
|
25136
|
-
|
|
25137
|
-
|
|
25138
|
-
|
|
25139
|
-
|
|
25140
|
-
|
|
25141
|
-
|
|
25142
|
-
|
|
25143
|
-
|
|
25144
|
-
|
|
25145
|
-
|
|
25146
|
-
|
|
25147
|
-
|
|
25148
|
-
var DiskSpaceInfoSchema = external_exports.object({
|
|
25149
|
-
path: external_exports.string(),
|
|
25150
|
-
totalBytes: external_exports.number(),
|
|
25151
|
-
usedBytes: external_exports.number(),
|
|
25152
|
-
availableBytes: external_exports.number(),
|
|
25153
|
-
percent: external_exports.number()
|
|
25018
|
+
var LlmGenerateBaseInputSchema = external_exports.object({
|
|
25019
|
+
/** Collection routing (the notification-output posture). */
|
|
25020
|
+
addonId: external_exports.string().optional(),
|
|
25021
|
+
/** Explicit profile; else the resolution chain (spec §3). */
|
|
25022
|
+
profileId: external_exports.string().optional(),
|
|
25023
|
+
/** MANDATORY usage tag: 'ai-summary', 'notifier-rules', 'adhoc-ui', … */
|
|
25024
|
+
consumer: external_exports.string(),
|
|
25025
|
+
system: external_exports.string().optional(),
|
|
25026
|
+
/** v1: single-turn. `messages[]` is a v2 additive field. */
|
|
25027
|
+
prompt: external_exports.string(),
|
|
25028
|
+
/** Structured output — adapter-mapped (response_format / forced tool / responseSchema). */
|
|
25029
|
+
jsonSchema: external_exports.record(external_exports.string(), external_exports.unknown()).optional(),
|
|
25030
|
+
/** Per-call override of the profile default. */
|
|
25031
|
+
maxTokens: external_exports.number().int().positive().optional(),
|
|
25032
|
+
temperature: external_exports.number().optional()
|
|
25154
25033
|
});
|
|
25155
|
-
var
|
|
25156
|
-
|
|
25157
|
-
|
|
25158
|
-
|
|
25159
|
-
|
|
25160
|
-
|
|
25161
|
-
|
|
25162
|
-
|
|
25163
|
-
|
|
25164
|
-
|
|
25165
|
-
|
|
25166
|
-
|
|
25167
|
-
|
|
25168
|
-
|
|
25169
|
-
|
|
25170
|
-
|
|
25171
|
-
|
|
25034
|
+
var ManagedModelRefSchema = external_exports.discriminatedUnion("kind", [
|
|
25035
|
+
external_exports.object({
|
|
25036
|
+
kind: external_exports.literal("catalog"),
|
|
25037
|
+
catalogId: external_exports.string()
|
|
25038
|
+
}),
|
|
25039
|
+
external_exports.object({
|
|
25040
|
+
kind: external_exports.literal("url"),
|
|
25041
|
+
url: external_exports.string(),
|
|
25042
|
+
sha256: external_exports.string().optional()
|
|
25043
|
+
}),
|
|
25044
|
+
external_exports.object({
|
|
25045
|
+
kind: external_exports.literal("path"),
|
|
25046
|
+
path: external_exports.string()
|
|
25047
|
+
})
|
|
25048
|
+
]);
|
|
25049
|
+
var ManagedRuntimeConfigSchema = external_exports.object({
|
|
25050
|
+
/** WHERE the runtime lives — hub or any agent. */
|
|
25051
|
+
nodeId: external_exports.string(),
|
|
25052
|
+
/** Closed for v1; 'ollama' is a v2 candidate. */
|
|
25053
|
+
engine: external_exports.enum(["llama-cpp"]),
|
|
25054
|
+
model: ManagedModelRefSchema,
|
|
25055
|
+
contextSize: external_exports.number().int().default(4096),
|
|
25056
|
+
/** 0 = CPU-only. */
|
|
25057
|
+
gpuLayers: external_exports.number().int().default(0),
|
|
25058
|
+
/** Default: cpus-2, clamped ≥1 (resolved node-side). */
|
|
25059
|
+
threads: external_exports.number().int().optional(),
|
|
25060
|
+
/** Concurrent slots. */
|
|
25061
|
+
parallel: external_exports.number().int().default(1),
|
|
25062
|
+
/** Else lazy: first generate boots it. */
|
|
25063
|
+
autoStart: external_exports.boolean().default(false),
|
|
25064
|
+
/** 0 = never; frees RAM after quiet periods. */
|
|
25065
|
+
idleStopMinutes: external_exports.number().int().default(30)
|
|
25172
25066
|
});
|
|
25173
|
-
var
|
|
25174
|
-
|
|
25067
|
+
var LlmRuntimeStatusSchema = external_exports.object({
|
|
25068
|
+
/** Status is ALWAYS node-qualified. */
|
|
25175
25069
|
nodeId: external_exports.string(),
|
|
25176
|
-
role: external_exports.enum(["hub", "worker"]),
|
|
25177
|
-
pid: external_exports.number(),
|
|
25178
25070
|
state: external_exports.enum([
|
|
25179
|
-
"starting",
|
|
25180
|
-
"running",
|
|
25181
|
-
"stopping",
|
|
25182
25071
|
"stopped",
|
|
25183
|
-
"
|
|
25184
|
-
|
|
25185
|
-
|
|
25186
|
-
|
|
25187
|
-
|
|
25188
|
-
pid: external_exports.number(),
|
|
25189
|
-
ppid: external_exports.number(),
|
|
25190
|
-
pgid: external_exports.number(),
|
|
25191
|
-
classification: external_exports.enum([
|
|
25192
|
-
"root",
|
|
25193
|
-
"managed",
|
|
25194
|
-
"system",
|
|
25195
|
-
"ghost"
|
|
25072
|
+
"downloading",
|
|
25073
|
+
"starting",
|
|
25074
|
+
"ready",
|
|
25075
|
+
"crashed",
|
|
25076
|
+
"failed"
|
|
25196
25077
|
]),
|
|
25197
|
-
|
|
25198
|
-
|
|
25199
|
-
|
|
25200
|
-
|
|
25201
|
-
|
|
25202
|
-
|
|
25203
|
-
|
|
25204
|
-
|
|
25205
|
-
|
|
25206
|
-
|
|
25207
|
-
/** True when ancestor walk reaches `ppid=1` (reparented to init/launchd). */
|
|
25208
|
-
orphaned: external_exports.boolean()
|
|
25209
|
-
});
|
|
25210
|
-
var KillProcessInputSchema = external_exports.object({
|
|
25211
|
-
pid: external_exports.number(),
|
|
25212
|
-
/** Force = SIGKILL. Default is SIGTERM. */
|
|
25213
|
-
force: external_exports.boolean().optional()
|
|
25214
|
-
});
|
|
25215
|
-
var KillProcessResultSchema = external_exports.object({
|
|
25216
|
-
success: external_exports.boolean(),
|
|
25217
|
-
reason: external_exports.string().optional(),
|
|
25218
|
-
signal: external_exports.enum(["SIGTERM", "SIGKILL"]).optional()
|
|
25078
|
+
pid: external_exports.number().optional(),
|
|
25079
|
+
port: external_exports.number().optional(),
|
|
25080
|
+
modelPath: external_exports.string().optional(),
|
|
25081
|
+
modelId: external_exports.string().optional(),
|
|
25082
|
+
downloadProgress: external_exports.number().min(0).max(1).optional(),
|
|
25083
|
+
lastError: external_exports.string().optional(),
|
|
25084
|
+
crashesInWindow: external_exports.number(),
|
|
25085
|
+
/** Child RSS (sampled best-effort). */
|
|
25086
|
+
memoryBytes: external_exports.number().optional(),
|
|
25087
|
+
vramBytes: external_exports.number().optional()
|
|
25219
25088
|
});
|
|
25220
|
-
var
|
|
25221
|
-
|
|
25222
|
-
|
|
25089
|
+
var LlmNodeModelSchema = external_exports.object({
|
|
25090
|
+
file: external_exports.string(),
|
|
25091
|
+
sizeBytes: external_exports.number(),
|
|
25092
|
+
catalogId: external_exports.string().optional(),
|
|
25093
|
+
installedAt: external_exports.number().optional()
|
|
25223
25094
|
});
|
|
25224
|
-
var
|
|
25225
|
-
|
|
25226
|
-
|
|
25227
|
-
|
|
25228
|
-
/** Process pid that was signalled. */
|
|
25229
|
-
pid: external_exports.number().optional(),
|
|
25230
|
-
reason: external_exports.string().optional()
|
|
25095
|
+
var LlmRuntimeDiskUsageSchema = external_exports.object({
|
|
25096
|
+
nodeId: external_exports.string(),
|
|
25097
|
+
modelsBytes: external_exports.number(),
|
|
25098
|
+
freeBytes: external_exports.number().optional()
|
|
25231
25099
|
});
|
|
25232
|
-
var
|
|
25233
|
-
|
|
25234
|
-
|
|
25235
|
-
|
|
25236
|
-
|
|
25237
|
-
diskPercent: external_exports.number().optional(),
|
|
25238
|
-
temperature: external_exports.number().optional(),
|
|
25239
|
-
gpuPercent: external_exports.number().optional(),
|
|
25240
|
-
gpuMemoryPercent: external_exports.number().optional()
|
|
25100
|
+
var LlmRuntimeCompleteInputSchema = LlmGenerateBaseInputSchema.extend({
|
|
25101
|
+
images: external_exports.array(LlmImageSchema).optional(),
|
|
25102
|
+
runtime: ManagedRuntimeConfigSchema,
|
|
25103
|
+
/** The managed profile's timeout, threaded by the hub provider. */
|
|
25104
|
+
timeoutMs: external_exports.number().int().positive().optional()
|
|
25241
25105
|
});
|
|
25242
|
-
var
|
|
25243
|
-
name: "
|
|
25106
|
+
var llmRuntimeCapability = {
|
|
25107
|
+
name: "llm-runtime",
|
|
25244
25108
|
scope: "system",
|
|
25245
25109
|
mode: "singleton",
|
|
25110
|
+
internal: true,
|
|
25246
25111
|
methods: {
|
|
25247
|
-
|
|
25248
|
-
|
|
25249
|
-
/** Most recent cached snapshot from the background sampler, or null pre-first-sample. */
|
|
25250
|
-
getCached: method(external_exports.void(), SystemResourceSnapshotSchema.nullable()),
|
|
25251
|
-
/** Light-weight cached summary for heartbeats and list views. */
|
|
25252
|
-
getCurrent: method(external_exports.void(), SystemMetricsSchema),
|
|
25253
|
-
/** Disk space for the given mount/path. */
|
|
25254
|
-
getDiskSpace: method(external_exports.object({ dirPath: external_exports.string() }), DiskSpaceInfoSchema),
|
|
25255
|
-
/** GPU info (null if unavailable). */
|
|
25256
|
-
getGpuInfo: method(external_exports.void(), MetricsGpuInfoSchema.nullable()),
|
|
25257
|
-
/** CPU temperature in °C (null if unavailable). */
|
|
25258
|
-
getCpuTemperature: method(external_exports.void(), external_exports.number().nullable()),
|
|
25259
|
-
/** Per-PID resource stats. Missing/dead PIDs are omitted from the result. */
|
|
25260
|
-
getProcessStats: method(external_exports.object({ pids: external_exports.array(external_exports.number()) }), external_exports.array(PidResourceStatsSchema)),
|
|
25261
|
-
/**
|
|
25262
|
-
* List addon instances known to this node — one entry per forked worker
|
|
25263
|
-
* plus a synthetic 'hub' entry representing the local hub process.
|
|
25264
|
-
* Used by benchmarks/observability to detect whether a given addon runs
|
|
25265
|
-
* in its own process (measurable independently) or inline with the hub.
|
|
25266
|
-
*/
|
|
25267
|
-
listAddonInstances: method(external_exports.void(), external_exports.array(AddonInstanceSchema).readonly()),
|
|
25268
|
-
/**
|
|
25269
|
-
* Resource stats for the process hosting the given addon.
|
|
25270
|
-
* Returns null when the addon runs in-process on the hub (can't measure
|
|
25271
|
-
* independently — caller should detect via listAddonInstances). Returns
|
|
25272
|
-
* hub process stats for addonId '$hub'.
|
|
25273
|
-
*/
|
|
25274
|
-
getAddonStats: method(external_exports.object({ addonId: external_exports.string() }), PidResourceStatsSchema.nullable()),
|
|
25275
|
-
/**
|
|
25276
|
-
* Snapshot of every camstack-related process on this node with a
|
|
25277
|
-
* ghost/managed/root classification. Powers the Cluster → Agent →
|
|
25278
|
-
* Processes tab: cross-references `$process.list` against a `ps` scan
|
|
25279
|
-
* so orphaned trees (PPID=1) or unknown children show up as `ghost`
|
|
25280
|
-
* and can be killed from the UI.
|
|
25281
|
-
*/
|
|
25282
|
-
listNodeProcesses: method(external_exports.void(), external_exports.array(NodeProcessSchema).readonly()),
|
|
25283
|
-
/**
|
|
25284
|
-
* Send SIGTERM (or SIGKILL when `force`) to a pid inside this node's
|
|
25285
|
-
* process tree. The provider refuses pids that aren't in the live
|
|
25286
|
-
* `listNodeProcesses()` snapshot — callers can't use this endpoint
|
|
25287
|
-
* to kill arbitrary system processes.
|
|
25288
|
-
*/
|
|
25289
|
-
killProcess: method(KillProcessInputSchema, KillProcessResultSchema, {
|
|
25112
|
+
complete: method(LlmRuntimeCompleteInputSchema, LlmGenerateResultSchema, { kind: "mutation" }),
|
|
25113
|
+
ensureStarted: method(external_exports.object({ runtime: ManagedRuntimeConfigSchema }), LlmRuntimeStatusSchema, {
|
|
25290
25114
|
kind: "mutation",
|
|
25291
25115
|
auth: "admin"
|
|
25292
25116
|
}),
|
|
25293
|
-
|
|
25294
|
-
* Tell the addon's forked runner to write a V8 heap snapshot to disk (via
|
|
25295
|
-
* SIGUSR2 — the runner's diagnostic handler). Also logs its
|
|
25296
|
-
* `process.memoryUsage()` + heap-space breakdown. Refuses pids not in the
|
|
25297
|
-
* live `listNodeProcesses()` snapshot. Use for deep per-addon memory
|
|
25298
|
-
* attribution; copy the returned path off the node to analyze.
|
|
25299
|
-
*/
|
|
25300
|
-
dumpHeapSnapshot: method(DumpHeapSnapshotInputSchema, DumpHeapSnapshotResultSchema, {
|
|
25117
|
+
stop: method(external_exports.object({}), external_exports.void(), {
|
|
25301
25118
|
kind: "mutation",
|
|
25302
25119
|
auth: "admin"
|
|
25303
|
-
})
|
|
25120
|
+
}),
|
|
25121
|
+
status: method(external_exports.object({}), LlmRuntimeStatusSchema),
|
|
25122
|
+
installModel: method(external_exports.object({ model: ManagedModelRefSchema }), external_exports.void(), {
|
|
25123
|
+
kind: "mutation",
|
|
25124
|
+
auth: "admin"
|
|
25125
|
+
}),
|
|
25126
|
+
deleteModel: method(external_exports.object({ file: external_exports.string() }), external_exports.void(), {
|
|
25127
|
+
kind: "mutation",
|
|
25128
|
+
auth: "admin"
|
|
25129
|
+
}),
|
|
25130
|
+
listLocalModels: method(external_exports.object({}), external_exports.array(LlmNodeModelSchema)),
|
|
25131
|
+
getDiskUsage: method(external_exports.object({}), LlmRuntimeDiskUsageSchema)
|
|
25304
25132
|
}
|
|
25305
25133
|
};
|
|
25306
|
-
var
|
|
25307
|
-
|
|
25308
|
-
|
|
25309
|
-
|
|
25310
|
-
|
|
25311
|
-
|
|
25312
|
-
|
|
25313
|
-
var
|
|
25314
|
-
|
|
25315
|
-
|
|
25316
|
-
|
|
25317
|
-
|
|
25318
|
-
|
|
25319
|
-
|
|
25320
|
-
|
|
25321
|
-
|
|
25322
|
-
|
|
25323
|
-
|
|
25324
|
-
|
|
25134
|
+
var LlmProfileKindSchema = external_exports.enum([
|
|
25135
|
+
"openai-compatible",
|
|
25136
|
+
"openai",
|
|
25137
|
+
"anthropic",
|
|
25138
|
+
"google",
|
|
25139
|
+
"managed-local"
|
|
25140
|
+
]);
|
|
25141
|
+
var LlmProfileSchema = external_exports.object({
|
|
25142
|
+
id: external_exports.string(),
|
|
25143
|
+
name: external_exports.string(),
|
|
25144
|
+
kind: LlmProfileKindSchema,
|
|
25145
|
+
/** Stamped by the provider — keeps the fanned catalog routable. */
|
|
25146
|
+
addonId: external_exports.string(),
|
|
25147
|
+
enabled: external_exports.boolean(),
|
|
25148
|
+
/** Vendor model id, or the managed runtime's loaded model. */
|
|
25149
|
+
model: external_exports.string(),
|
|
25150
|
+
/** Required for openai-compatible; override for cloud kinds. */
|
|
25151
|
+
baseUrl: external_exports.string().optional(),
|
|
25152
|
+
/** ConfigUISchema type:'password' — never round-trips (spec §5). */
|
|
25153
|
+
apiKey: external_exports.string().optional(),
|
|
25154
|
+
supportsVision: external_exports.boolean(),
|
|
25155
|
+
temperature: external_exports.number().min(0).max(2).optional(),
|
|
25156
|
+
maxTokens: external_exports.number().int().positive().optional(),
|
|
25157
|
+
timeoutMs: external_exports.number().int().positive().default(6e4),
|
|
25158
|
+
extraHeaders: external_exports.record(external_exports.string(), external_exports.string()).optional(),
|
|
25159
|
+
/** kind === 'managed-local' only (spec §4). */
|
|
25160
|
+
runtime: ManagedRuntimeConfigSchema.optional()
|
|
25161
|
+
});
|
|
25162
|
+
var ConfigSchemaPassthrough$1 = external_exports.unknown();
|
|
25163
|
+
var LlmProfileKindDescriptorSchema = external_exports.object({
|
|
25164
|
+
kind: LlmProfileKindSchema,
|
|
25165
|
+
label: external_exports.string(),
|
|
25166
|
+
icon: external_exports.string(),
|
|
25167
|
+
/** Stamped by each provider so the concat-fanned catalog stays routable. */
|
|
25168
|
+
addonId: external_exports.string(),
|
|
25169
|
+
configSchema: ConfigSchemaPassthrough$1
|
|
25170
|
+
});
|
|
25171
|
+
var LlmDefaultSelectorSchema = external_exports.union([external_exports.object({ consumer: external_exports.string() }), external_exports.object({ purpose: external_exports.enum(["text", "vision"]) })]);
|
|
25172
|
+
var LlmDefaultSchema = external_exports.object({
|
|
25173
|
+
selector: LlmDefaultSelectorSchema,
|
|
25174
|
+
profileId: external_exports.string()
|
|
25175
|
+
});
|
|
25176
|
+
var LlmUsageRollupSchema = external_exports.object({
|
|
25177
|
+
day: external_exports.string(),
|
|
25178
|
+
consumer: external_exports.string(),
|
|
25179
|
+
profileId: external_exports.string(),
|
|
25180
|
+
calls: external_exports.number(),
|
|
25181
|
+
okCalls: external_exports.number(),
|
|
25182
|
+
errorCalls: external_exports.number(),
|
|
25183
|
+
inputTokens: external_exports.number(),
|
|
25184
|
+
outputTokens: external_exports.number(),
|
|
25185
|
+
avgLatencyMs: external_exports.number()
|
|
25186
|
+
});
|
|
25187
|
+
var ManagedModelCatalogEntrySchema = external_exports.object({
|
|
25188
|
+
id: external_exports.string(),
|
|
25189
|
+
label: external_exports.string(),
|
|
25190
|
+
family: external_exports.string(),
|
|
25191
|
+
purpose: external_exports.enum(["text", "vision"]),
|
|
25192
|
+
url: external_exports.string(),
|
|
25193
|
+
sha256: external_exports.string(),
|
|
25194
|
+
sizeBytes: external_exports.number(),
|
|
25195
|
+
quantization: external_exports.string(),
|
|
25196
|
+
/** Load-time guidance shown in the picker. */
|
|
25197
|
+
minRamBytes: external_exports.number(),
|
|
25198
|
+
contextSizeDefault: external_exports.number().int(),
|
|
25199
|
+
/** Vision models: companion projector file. */
|
|
25200
|
+
mmprojUrl: external_exports.string().optional()
|
|
25201
|
+
});
|
|
25202
|
+
var LlmRuntimeNodeSchema = external_exports.object({
|
|
25203
|
+
nodeId: external_exports.string(),
|
|
25204
|
+
reachable: external_exports.boolean(),
|
|
25205
|
+
status: LlmRuntimeStatusSchema.optional(),
|
|
25206
|
+
disk: LlmRuntimeDiskUsageSchema.optional(),
|
|
25207
|
+
error: external_exports.string().optional()
|
|
25208
|
+
});
|
|
25209
|
+
var GenerateVisionInputSchema = LlmGenerateBaseInputSchema.extend({ images: external_exports.array(LlmImageSchema).min(1) });
|
|
25210
|
+
var ProfileRefInputSchema = external_exports.object({
|
|
25211
|
+
addonId: external_exports.string(),
|
|
25212
|
+
profileId: external_exports.string()
|
|
25213
|
+
});
|
|
25214
|
+
var llmCapability = {
|
|
25215
|
+
name: "llm",
|
|
25216
|
+
scope: "system",
|
|
25217
|
+
mode: "collection",
|
|
25218
|
+
internal: false,
|
|
25219
|
+
providerKind: "ai",
|
|
25220
|
+
/** `nodeId` inputs below are DATA (the hub provider pins itself), never routing. */
|
|
25221
|
+
nodeIdMode: "data",
|
|
25222
|
+
methods: {
|
|
25223
|
+
generate: method(LlmGenerateBaseInputSchema, LlmGenerateResultSchema, { kind: "mutation" }),
|
|
25224
|
+
generateVision: method(GenerateVisionInputSchema, LlmGenerateResultSchema, { kind: "mutation" }),
|
|
25225
|
+
listProfileKinds: method(external_exports.object({}), external_exports.array(LlmProfileKindDescriptorSchema)),
|
|
25226
|
+
listProfiles: method(external_exports.object({}), external_exports.array(LlmProfileSchema)),
|
|
25227
|
+
upsertProfile: method(external_exports.object({ profile: LlmProfileSchema }), LlmProfileSchema, {
|
|
25228
|
+
kind: "mutation",
|
|
25229
|
+
auth: "admin"
|
|
25230
|
+
}),
|
|
25231
|
+
deleteProfile: method(ProfileRefInputSchema, external_exports.void(), {
|
|
25232
|
+
kind: "mutation",
|
|
25233
|
+
auth: "admin"
|
|
25234
|
+
}),
|
|
25235
|
+
testProfile: method(ProfileRefInputSchema, LlmGenerateResultSchema, {
|
|
25236
|
+
kind: "mutation",
|
|
25237
|
+
auth: "admin"
|
|
25238
|
+
}),
|
|
25239
|
+
/** Live vendor enumeration (GET /models etc.). */
|
|
25240
|
+
listModels: method(ProfileRefInputSchema, external_exports.array(external_exports.string())),
|
|
25241
|
+
getDefaults: method(external_exports.object({}), external_exports.array(LlmDefaultSchema)),
|
|
25242
|
+
setDefault: method(external_exports.object({
|
|
25243
|
+
selector: LlmDefaultSelectorSchema,
|
|
25244
|
+
profileId: external_exports.string().nullable()
|
|
25245
|
+
}), external_exports.void(), {
|
|
25246
|
+
kind: "mutation",
|
|
25247
|
+
auth: "admin"
|
|
25248
|
+
}),
|
|
25249
|
+
getUsage: method(external_exports.object({
|
|
25250
|
+
since: external_exports.number().optional(),
|
|
25251
|
+
until: external_exports.number().optional(),
|
|
25252
|
+
consumer: external_exports.string().optional(),
|
|
25253
|
+
profileId: external_exports.string().optional()
|
|
25254
|
+
}), external_exports.array(LlmUsageRollupSchema)),
|
|
25255
|
+
listModelCatalog: method(external_exports.object({}), external_exports.array(ManagedModelCatalogEntrySchema)),
|
|
25256
|
+
listRuntimeNodes: method(external_exports.object({}), external_exports.array(LlmRuntimeNodeSchema)),
|
|
25257
|
+
listNodeModels: method(external_exports.object({ nodeId: external_exports.string() }), external_exports.array(LlmNodeModelSchema)),
|
|
25258
|
+
installModel: method(external_exports.object({
|
|
25259
|
+
nodeId: external_exports.string(),
|
|
25260
|
+
model: ManagedModelRefSchema
|
|
25261
|
+
}), external_exports.void(), {
|
|
25262
|
+
kind: "mutation",
|
|
25263
|
+
auth: "admin"
|
|
25264
|
+
}),
|
|
25265
|
+
deleteModel: method(external_exports.object({
|
|
25266
|
+
nodeId: external_exports.string(),
|
|
25267
|
+
file: external_exports.string()
|
|
25268
|
+
}), external_exports.void(), {
|
|
25269
|
+
kind: "mutation",
|
|
25270
|
+
auth: "admin"
|
|
25271
|
+
}),
|
|
25272
|
+
getRuntimeStatus: method(ProfileRefInputSchema, LlmRuntimeStatusSchema),
|
|
25273
|
+
startRuntime: method(ProfileRefInputSchema, LlmRuntimeStatusSchema, {
|
|
25274
|
+
kind: "mutation",
|
|
25275
|
+
auth: "admin"
|
|
25276
|
+
}),
|
|
25277
|
+
stopRuntime: method(ProfileRefInputSchema, external_exports.void(), {
|
|
25278
|
+
kind: "mutation",
|
|
25279
|
+
auth: "admin"
|
|
25280
|
+
})
|
|
25281
|
+
}
|
|
25282
|
+
};
|
|
25283
|
+
var LogLevelSchema = external_exports.enum([
|
|
25284
|
+
"debug",
|
|
25285
|
+
"info",
|
|
25286
|
+
"warn",
|
|
25287
|
+
"error"
|
|
25288
|
+
]);
|
|
25289
|
+
var LogEntrySchema = external_exports.object({
|
|
25290
|
+
timestamp: external_exports.date(),
|
|
25291
|
+
level: LogLevelSchema,
|
|
25292
|
+
scope: external_exports.array(external_exports.string()),
|
|
25293
|
+
message: external_exports.string(),
|
|
25294
|
+
meta: external_exports.record(external_exports.string(), external_exports.unknown()).optional(),
|
|
25295
|
+
tags: external_exports.record(external_exports.string(), external_exports.string()).optional()
|
|
25296
|
+
});
|
|
25297
|
+
var logDestinationCapability = {
|
|
25298
|
+
name: "log-destination",
|
|
25299
|
+
scope: "system",
|
|
25300
|
+
mode: "collection",
|
|
25301
|
+
internal: true,
|
|
25302
|
+
methods: {
|
|
25303
|
+
write: method(LogEntrySchema, external_exports.void(), { kind: "mutation" }),
|
|
25304
|
+
query: method(external_exports.object({
|
|
25305
|
+
scope: external_exports.array(external_exports.string()).optional(),
|
|
25306
|
+
level: LogLevelSchema.optional(),
|
|
25307
|
+
since: external_exports.date().optional(),
|
|
25308
|
+
until: external_exports.date().optional(),
|
|
25309
|
+
limit: external_exports.number().optional(),
|
|
25310
|
+
tags: external_exports.record(external_exports.string(), external_exports.string()).optional()
|
|
25311
|
+
}), external_exports.array(LogEntrySchema).readonly())
|
|
25312
|
+
},
|
|
25313
|
+
/** BIG PLAN 2: declarative mount hint — read by `@camstack/system` `buildCapRouters`. */
|
|
25314
|
+
mount: { kind: "skip" }
|
|
25315
|
+
};
|
|
25316
|
+
var LoginStageEnum = external_exports.enum(["primary", "second-factor"]);
|
|
25317
|
+
var RedirectLoginMethodSchema = external_exports.object({
|
|
25318
|
+
kind: external_exports.literal("redirect"),
|
|
25319
|
+
/** Stable id within the login-method set (e.g. `auth-oidc/google`). */
|
|
25320
|
+
id: external_exports.string(),
|
|
25321
|
+
/** Operator-facing button label. */
|
|
25322
|
+
label: external_exports.string(),
|
|
25323
|
+
/** lucide-react icon name. */
|
|
25324
|
+
icon: external_exports.string().optional(),
|
|
25325
|
+
/** Addon-owned HTTP route the button navigates to (GET). */
|
|
25326
|
+
startUrl: external_exports.string(),
|
|
25327
|
+
stage: LoginStageEnum
|
|
25328
|
+
});
|
|
25329
|
+
var WidgetLoginMethodSchema = external_exports.object({
|
|
25330
|
+
kind: external_exports.literal("widget"),
|
|
25331
|
+
/** Stable id within the login-method set (e.g. `auth-webauthn/passkey-login`). */
|
|
25332
|
+
id: external_exports.string(),
|
|
25333
|
+
/** Owning addon id — drives the public bundle URL + the MF namespace. */
|
|
25334
|
+
addonId: external_exports.string(),
|
|
25335
|
+
/** Bundle filename inside the addon's dist dir (`remoteEntry.js`). */
|
|
25336
|
+
bundle: external_exports.string(),
|
|
25337
|
+
/** MF remote descriptor — `{ remoteName, exposedModule, componentKey }`. */
|
|
25338
|
+
remote: WidgetRemoteSchema,
|
|
25339
|
+
stage: LoginStageEnum
|
|
25340
|
+
});
|
|
25341
|
+
var PasskeyLoginMethodSchema = external_exports.object({
|
|
25342
|
+
kind: external_exports.literal("passkey"),
|
|
25343
|
+
/** Stable id within the login-method set (e.g. `auth-webauthn/passkey-direct-login`). */
|
|
25344
|
+
id: external_exports.string(),
|
|
25345
|
+
/** Operator-facing button label. */
|
|
25346
|
+
label: external_exports.string(),
|
|
25347
|
+
stage: LoginStageEnum,
|
|
25348
|
+
/** Effective WebAuthn RP ID (`resolveRpID()`) — the shell gates visibility on it. */
|
|
25349
|
+
rpId: external_exports.string(),
|
|
25350
|
+
/** Effective expected origin (`resolveOrigin()`), null when unconfigured. */
|
|
25351
|
+
origin: external_exports.string().nullable()
|
|
25352
|
+
});
|
|
25353
|
+
var LoginMethodContributionSchema = external_exports.discriminatedUnion("kind", [
|
|
25354
|
+
RedirectLoginMethodSchema,
|
|
25355
|
+
WidgetLoginMethodSchema,
|
|
25356
|
+
PasskeyLoginMethodSchema
|
|
25357
|
+
]);
|
|
25358
|
+
var loginMethodCapability = {
|
|
25359
|
+
name: "login-method",
|
|
25360
|
+
scope: "system",
|
|
25361
|
+
mode: "collection",
|
|
25362
|
+
internal: true,
|
|
25363
|
+
methods: { getLoginMethods: method(external_exports.void(), external_exports.array(LoginMethodContributionSchema).readonly()) },
|
|
25364
|
+
/** BIG PLAN 2: declarative mount hint — read by `@camstack/system` `buildCapRouters`. */
|
|
25365
|
+
mount: { kind: "skip" }
|
|
25366
|
+
};
|
|
25367
|
+
var CpuBreakdownSchema = external_exports.object({
|
|
25368
|
+
total: external_exports.number(),
|
|
25369
|
+
user: external_exports.number(),
|
|
25370
|
+
system: external_exports.number(),
|
|
25371
|
+
irq: external_exports.number(),
|
|
25372
|
+
nice: external_exports.number(),
|
|
25373
|
+
loadAvg: external_exports.tuple([
|
|
25374
|
+
external_exports.number(),
|
|
25375
|
+
external_exports.number(),
|
|
25376
|
+
external_exports.number()
|
|
25377
|
+
]),
|
|
25378
|
+
cores: external_exports.number()
|
|
25379
|
+
});
|
|
25380
|
+
var MemoryInfoSchema = external_exports.object({
|
|
25381
|
+
percent: external_exports.number(),
|
|
25382
|
+
totalBytes: external_exports.number(),
|
|
25383
|
+
usedBytes: external_exports.number(),
|
|
25384
|
+
availableBytes: external_exports.number(),
|
|
25385
|
+
swapUsedBytes: external_exports.number(),
|
|
25386
|
+
swapTotalBytes: external_exports.number()
|
|
25387
|
+
});
|
|
25388
|
+
var DiskIoSnapshotSchema = external_exports.object({
|
|
25389
|
+
readBytes: external_exports.number(),
|
|
25390
|
+
writeBytes: external_exports.number(),
|
|
25391
|
+
readOps: external_exports.number(),
|
|
25392
|
+
writeOps: external_exports.number(),
|
|
25393
|
+
timestampMs: external_exports.number()
|
|
25394
|
+
});
|
|
25395
|
+
var NetworkIoSnapshotSchema = external_exports.object({
|
|
25396
|
+
rxBytes: external_exports.number(),
|
|
25397
|
+
txBytes: external_exports.number(),
|
|
25398
|
+
rxPackets: external_exports.number(),
|
|
25399
|
+
txPackets: external_exports.number(),
|
|
25400
|
+
rxErrors: external_exports.number(),
|
|
25401
|
+
txErrors: external_exports.number(),
|
|
25402
|
+
timestampMs: external_exports.number()
|
|
25403
|
+
});
|
|
25404
|
+
var MetricsGpuInfoSchema = external_exports.object({
|
|
25405
|
+
utilization: external_exports.number(),
|
|
25406
|
+
model: external_exports.string(),
|
|
25407
|
+
memoryUsedBytes: external_exports.number(),
|
|
25408
|
+
memoryTotalBytes: external_exports.number(),
|
|
25409
|
+
temperature: external_exports.number().nullable()
|
|
25410
|
+
});
|
|
25411
|
+
var ProcessResourceInfoSchema = external_exports.object({
|
|
25412
|
+
openFds: external_exports.number(),
|
|
25413
|
+
threadCount: external_exports.number(),
|
|
25414
|
+
activeHandles: external_exports.number(),
|
|
25415
|
+
activeRequests: external_exports.number()
|
|
25416
|
+
});
|
|
25417
|
+
var PressureAvgsSchema = external_exports.object({
|
|
25418
|
+
avg10: external_exports.number(),
|
|
25419
|
+
avg60: external_exports.number(),
|
|
25420
|
+
avg300: external_exports.number()
|
|
25421
|
+
});
|
|
25422
|
+
var PressureInfoSchema = external_exports.object({
|
|
25423
|
+
some: PressureAvgsSchema,
|
|
25424
|
+
full: PressureAvgsSchema.nullable()
|
|
25425
|
+
});
|
|
25426
|
+
var SystemResourceSnapshotSchema = external_exports.object({
|
|
25427
|
+
cpu: CpuBreakdownSchema,
|
|
25428
|
+
memory: MemoryInfoSchema,
|
|
25429
|
+
gpu: MetricsGpuInfoSchema.nullable(),
|
|
25430
|
+
network: NetworkIoSnapshotSchema,
|
|
25431
|
+
disk: DiskIoSnapshotSchema,
|
|
25432
|
+
pressure: external_exports.object({
|
|
25433
|
+
cpu: PressureInfoSchema.nullable(),
|
|
25434
|
+
memory: PressureInfoSchema.nullable(),
|
|
25435
|
+
io: PressureInfoSchema.nullable()
|
|
25436
|
+
}),
|
|
25437
|
+
process: ProcessResourceInfoSchema,
|
|
25438
|
+
cpuTemperature: external_exports.number().nullable(),
|
|
25439
|
+
timestampMs: external_exports.number()
|
|
25440
|
+
});
|
|
25441
|
+
var DiskSpaceInfoSchema = external_exports.object({
|
|
25442
|
+
path: external_exports.string(),
|
|
25443
|
+
totalBytes: external_exports.number(),
|
|
25444
|
+
usedBytes: external_exports.number(),
|
|
25445
|
+
availableBytes: external_exports.number(),
|
|
25446
|
+
percent: external_exports.number()
|
|
25447
|
+
});
|
|
25448
|
+
var PidResourceStatsSchema = external_exports.object({
|
|
25449
|
+
pid: external_exports.number(),
|
|
25450
|
+
cpu: external_exports.number(),
|
|
25451
|
+
memory: external_exports.number(),
|
|
25452
|
+
/**
|
|
25453
|
+
* Private (anonymous) resident bytes — the per-process V8 heap + native
|
|
25454
|
+
* allocations NOT shared with other processes (Linux RssAnon). This is the
|
|
25455
|
+
* "real" per-runner cost; summing it across runners is meaningful, unlike
|
|
25456
|
+
* `memory` (RSS), which double-counts the shared mmap'd framework code.
|
|
25457
|
+
* Undefined where /proc is unavailable (e.g. macOS).
|
|
25458
|
+
*/
|
|
25459
|
+
privateBytes: external_exports.number().optional(),
|
|
25460
|
+
/**
|
|
25461
|
+
* Shared file-backed resident bytes (Linux RssFile) — mmap'd framework/lib
|
|
25462
|
+
* code shared copy-on-write across runners. Undefined on macOS.
|
|
25463
|
+
*/
|
|
25464
|
+
sharedBytes: external_exports.number().optional()
|
|
25465
|
+
});
|
|
25466
|
+
var AddonInstanceSchema = external_exports.object({
|
|
25467
|
+
addonId: external_exports.string(),
|
|
25468
|
+
nodeId: external_exports.string(),
|
|
25469
|
+
role: external_exports.enum(["hub", "worker"]),
|
|
25470
|
+
pid: external_exports.number(),
|
|
25471
|
+
state: external_exports.enum([
|
|
25472
|
+
"starting",
|
|
25473
|
+
"running",
|
|
25474
|
+
"stopping",
|
|
25475
|
+
"stopped",
|
|
25476
|
+
"crashed"
|
|
25477
|
+
]),
|
|
25478
|
+
uptimeSec: external_exports.number()
|
|
25479
|
+
});
|
|
25480
|
+
var NodeProcessSchema = external_exports.object({
|
|
25481
|
+
pid: external_exports.number(),
|
|
25482
|
+
ppid: external_exports.number(),
|
|
25483
|
+
pgid: external_exports.number(),
|
|
25484
|
+
classification: external_exports.enum([
|
|
25485
|
+
"root",
|
|
25486
|
+
"managed",
|
|
25487
|
+
"system",
|
|
25488
|
+
"ghost"
|
|
25489
|
+
]),
|
|
25490
|
+
/** `$process` addon binding when `managed`, else null. */
|
|
25491
|
+
addonId: external_exports.string().nullable(),
|
|
25492
|
+
/** Kernel-reported nodeId when the process is a known agent/worker. */
|
|
25493
|
+
nodeId: external_exports.string().nullable(),
|
|
25494
|
+
/** Truncated command line. */
|
|
25495
|
+
command: external_exports.string(),
|
|
25496
|
+
cpuPercent: external_exports.number(),
|
|
25497
|
+
memoryRssBytes: external_exports.number(),
|
|
25498
|
+
/** Wall-clock uptime (seconds). Parsed from `ps etime`. */
|
|
25499
|
+
uptimeSec: external_exports.number(),
|
|
25500
|
+
/** True when ancestor walk reaches `ppid=1` (reparented to init/launchd). */
|
|
25501
|
+
orphaned: external_exports.boolean()
|
|
25502
|
+
});
|
|
25503
|
+
var KillProcessInputSchema = external_exports.object({
|
|
25504
|
+
pid: external_exports.number(),
|
|
25505
|
+
/** Force = SIGKILL. Default is SIGTERM. */
|
|
25506
|
+
force: external_exports.boolean().optional()
|
|
25507
|
+
});
|
|
25508
|
+
var KillProcessResultSchema = external_exports.object({
|
|
25509
|
+
success: external_exports.boolean(),
|
|
25510
|
+
reason: external_exports.string().optional(),
|
|
25511
|
+
signal: external_exports.enum(["SIGTERM", "SIGKILL"]).optional()
|
|
25512
|
+
});
|
|
25513
|
+
var DumpHeapSnapshotInputSchema = external_exports.object({
|
|
25514
|
+
/** The addon whose runner should dump a heap snapshot. */
|
|
25515
|
+
addonId: external_exports.string()
|
|
25516
|
+
});
|
|
25517
|
+
var DumpHeapSnapshotResultSchema = external_exports.object({
|
|
25518
|
+
success: external_exports.boolean(),
|
|
25519
|
+
/** Path of the written .heapsnapshot inside the runner's container/host. */
|
|
25520
|
+
path: external_exports.string().optional(),
|
|
25521
|
+
/** Process pid that was signalled. */
|
|
25522
|
+
pid: external_exports.number().optional(),
|
|
25523
|
+
reason: external_exports.string().optional()
|
|
25524
|
+
});
|
|
25525
|
+
var SystemMetricsSchema = external_exports.object({
|
|
25526
|
+
cpuPercent: external_exports.number(),
|
|
25527
|
+
memoryPercent: external_exports.number(),
|
|
25528
|
+
memoryUsedMB: external_exports.number(),
|
|
25529
|
+
memoryTotalMB: external_exports.number(),
|
|
25530
|
+
diskPercent: external_exports.number().optional(),
|
|
25531
|
+
temperature: external_exports.number().optional(),
|
|
25532
|
+
gpuPercent: external_exports.number().optional(),
|
|
25533
|
+
gpuMemoryPercent: external_exports.number().optional()
|
|
25534
|
+
});
|
|
25535
|
+
var metricsProviderCapability = {
|
|
25536
|
+
name: "metrics-provider",
|
|
25537
|
+
scope: "system",
|
|
25538
|
+
mode: "singleton",
|
|
25539
|
+
methods: {
|
|
25540
|
+
/** Fresh, full system snapshot (triggers OS-level collection). */
|
|
25541
|
+
collectSnapshot: method(external_exports.void(), SystemResourceSnapshotSchema),
|
|
25542
|
+
/** Most recent cached snapshot from the background sampler, or null pre-first-sample. */
|
|
25543
|
+
getCached: method(external_exports.void(), SystemResourceSnapshotSchema.nullable()),
|
|
25544
|
+
/** Light-weight cached summary for heartbeats and list views. */
|
|
25545
|
+
getCurrent: method(external_exports.void(), SystemMetricsSchema),
|
|
25546
|
+
/** Disk space for the given mount/path. */
|
|
25547
|
+
getDiskSpace: method(external_exports.object({ dirPath: external_exports.string() }), DiskSpaceInfoSchema),
|
|
25548
|
+
/** GPU info (null if unavailable). */
|
|
25549
|
+
getGpuInfo: method(external_exports.void(), MetricsGpuInfoSchema.nullable()),
|
|
25550
|
+
/** CPU temperature in °C (null if unavailable). */
|
|
25551
|
+
getCpuTemperature: method(external_exports.void(), external_exports.number().nullable()),
|
|
25552
|
+
/** Per-PID resource stats. Missing/dead PIDs are omitted from the result. */
|
|
25553
|
+
getProcessStats: method(external_exports.object({ pids: external_exports.array(external_exports.number()) }), external_exports.array(PidResourceStatsSchema)),
|
|
25554
|
+
/**
|
|
25555
|
+
* List addon instances known to this node — one entry per forked worker
|
|
25556
|
+
* plus a synthetic 'hub' entry representing the local hub process.
|
|
25557
|
+
* Used by benchmarks/observability to detect whether a given addon runs
|
|
25558
|
+
* in its own process (measurable independently) or inline with the hub.
|
|
25559
|
+
*/
|
|
25560
|
+
listAddonInstances: method(external_exports.void(), external_exports.array(AddonInstanceSchema).readonly()),
|
|
25561
|
+
/**
|
|
25562
|
+
* Resource stats for the process hosting the given addon.
|
|
25563
|
+
* Returns null when the addon runs in-process on the hub (can't measure
|
|
25564
|
+
* independently — caller should detect via listAddonInstances). Returns
|
|
25565
|
+
* hub process stats for addonId '$hub'.
|
|
25566
|
+
*/
|
|
25567
|
+
getAddonStats: method(external_exports.object({ addonId: external_exports.string() }), PidResourceStatsSchema.nullable()),
|
|
25568
|
+
/**
|
|
25569
|
+
* Snapshot of every camstack-related process on this node with a
|
|
25570
|
+
* ghost/managed/root classification. Powers the Cluster → Agent →
|
|
25571
|
+
* Processes tab: cross-references `$process.list` against a `ps` scan
|
|
25572
|
+
* so orphaned trees (PPID=1) or unknown children show up as `ghost`
|
|
25573
|
+
* and can be killed from the UI.
|
|
25574
|
+
*/
|
|
25575
|
+
listNodeProcesses: method(external_exports.void(), external_exports.array(NodeProcessSchema).readonly()),
|
|
25576
|
+
/**
|
|
25577
|
+
* Send SIGTERM (or SIGKILL when `force`) to a pid inside this node's
|
|
25578
|
+
* process tree. The provider refuses pids that aren't in the live
|
|
25579
|
+
* `listNodeProcesses()` snapshot — callers can't use this endpoint
|
|
25580
|
+
* to kill arbitrary system processes.
|
|
25581
|
+
*/
|
|
25582
|
+
killProcess: method(KillProcessInputSchema, KillProcessResultSchema, {
|
|
25583
|
+
kind: "mutation",
|
|
25584
|
+
auth: "admin"
|
|
25585
|
+
}),
|
|
25586
|
+
/**
|
|
25587
|
+
* Tell the addon's forked runner to write a V8 heap snapshot to disk (via
|
|
25588
|
+
* SIGUSR2 — the runner's diagnostic handler). Also logs its
|
|
25589
|
+
* `process.memoryUsage()` + heap-space breakdown. Refuses pids not in the
|
|
25590
|
+
* live `listNodeProcesses()` snapshot. Use for deep per-addon memory
|
|
25591
|
+
* attribution; copy the returned path off the node to analyze.
|
|
25592
|
+
*/
|
|
25593
|
+
dumpHeapSnapshot: method(DumpHeapSnapshotInputSchema, DumpHeapSnapshotResultSchema, {
|
|
25594
|
+
kind: "mutation",
|
|
25595
|
+
auth: "admin"
|
|
25596
|
+
})
|
|
25597
|
+
}
|
|
25598
|
+
};
|
|
25599
|
+
var ModelConvertInputSchema = external_exports.object({
|
|
25600
|
+
sourceUrl: external_exports.string(),
|
|
25601
|
+
metadata: ModelConvertMetadataSchema,
|
|
25602
|
+
targets: external_exports.array(ConvertTargetSchema).min(1).readonly(),
|
|
25603
|
+
calibrationRef: external_exports.string().optional(),
|
|
25604
|
+
sessionId: external_exports.string().optional()
|
|
25605
|
+
});
|
|
25606
|
+
var modelConvertCapability = {
|
|
25607
|
+
name: "model-convert",
|
|
25608
|
+
scope: "system",
|
|
25609
|
+
mode: "singleton",
|
|
25610
|
+
internal: true,
|
|
25611
|
+
methods: { convert: method(ModelConvertInputSchema, ConvertResultSchema, {
|
|
25612
|
+
kind: "mutation",
|
|
25613
|
+
auth: "admin",
|
|
25614
|
+
timeoutMs: 6e5
|
|
25615
|
+
}) }
|
|
25616
|
+
};
|
|
25617
|
+
var ModelDistributeInputSchema = external_exports.object({
|
|
25325
25618
|
nodeId: external_exports.string(),
|
|
25326
25619
|
modelId: external_exports.string(),
|
|
25327
25620
|
format: external_exports.enum(MODEL_FORMATS),
|
|
@@ -25522,393 +25815,490 @@ var TargetKindLevelSchema = external_exports.object({
|
|
|
25522
25815
|
silent: external_exports.boolean().optional(),
|
|
25523
25816
|
noPush: external_exports.boolean().optional()
|
|
25524
25817
|
}).optional(),
|
|
25525
|
-
/** e.g. Pushover `emergency` requires `retry` / `expire`. */
|
|
25526
|
-
requires: external_exports.array(external_exports.string()).optional(),
|
|
25527
|
-
description: external_exports.string().optional()
|
|
25528
|
-
});
|
|
25529
|
-
var TargetKindAttachmentsCapsSchema = external_exports.object({
|
|
25530
|
-
mediaTypes: external_exports.array(AttachmentMediaTypeSchema),
|
|
25531
|
-
mode: external_exports.enum([
|
|
25532
|
-
"url",
|
|
25533
|
-
"bytes",
|
|
25534
|
-
"both"
|
|
25535
|
-
]),
|
|
25536
|
-
max: external_exports.number().int().nonnegative(),
|
|
25537
|
-
maxBytes: external_exports.number().int().positive().optional()
|
|
25538
|
-
});
|
|
25539
|
-
var TargetKindCapsSchema = external_exports.object({
|
|
25540
|
-
attachments: TargetKindAttachmentsCapsSchema,
|
|
25541
|
-
/** Max action buttons (0 = none). */
|
|
25542
|
-
actions: external_exports.number().int().nonnegative(),
|
|
25543
|
-
levels: external_exports.array(TargetKindLevelSchema),
|
|
25544
|
-
format: external_exports.array(NotificationFormatSchema),
|
|
25545
|
-
clickUrl: external_exports.boolean(),
|
|
25546
|
-
sound: external_exports.boolean(),
|
|
25547
|
-
ttl: external_exports.boolean(),
|
|
25548
|
-
bodyMaxLen: external_exports.number().int().positive()
|
|
25549
|
-
});
|
|
25550
|
-
var ConfigSchemaPassthrough$1 = external_exports.unknown();
|
|
25551
|
-
var TargetKindSchema = external_exports.object({
|
|
25552
|
-
kind: external_exports.string(),
|
|
25553
|
-
label: external_exports.string(),
|
|
25554
|
-
icon: external_exports.string(),
|
|
25555
|
-
/** Stamped by each provider so the concat-fanned catalog stays routable. */
|
|
25556
|
-
addonId: external_exports.string(),
|
|
25557
|
-
configSchema: ConfigSchemaPassthrough$1,
|
|
25558
|
-
supportsDiscovery: external_exports.boolean(),
|
|
25559
|
-
caps: TargetKindCapsSchema
|
|
25560
|
-
});
|
|
25561
|
-
var TargetSchema = external_exports.object({
|
|
25562
|
-
id: external_exports.string(),
|
|
25563
|
-
name: external_exports.string(),
|
|
25564
|
-
kind: external_exports.string(),
|
|
25565
|
-
addonId: external_exports.string(),
|
|
25566
|
-
enabled: external_exports.boolean(),
|
|
25567
|
-
config: external_exports.record(external_exports.string(), external_exports.unknown())
|
|
25568
|
-
});
|
|
25569
|
-
var DiscoveredTargetSchema = external_exports.object({
|
|
25570
|
-
kind: external_exports.string(),
|
|
25571
|
-
suggestedName: external_exports.string(),
|
|
25572
|
-
config: external_exports.record(external_exports.string(), external_exports.unknown())
|
|
25573
|
-
});
|
|
25574
|
-
var RenderedAsSchema = external_exports.object({
|
|
25575
|
-
level: external_exports.string(),
|
|
25576
|
-
format: NotificationFormatSchema,
|
|
25577
|
-
attachmentsSent: external_exports.number().int().nonnegative(),
|
|
25578
|
-
actionsSent: external_exports.number().int().nonnegative(),
|
|
25579
|
-
truncated: external_exports.boolean(),
|
|
25580
|
-
dropped: external_exports.array(external_exports.string())
|
|
25581
|
-
});
|
|
25582
|
-
var SendResultSchema = external_exports.object({
|
|
25583
|
-
success: external_exports.boolean(),
|
|
25584
|
-
error: external_exports.string().optional(),
|
|
25585
|
-
renderedAs: RenderedAsSchema.optional()
|
|
25586
|
-
});
|
|
25587
|
-
var TestResultSchema = SendResultSchema;
|
|
25588
|
-
var notificationOutputCapability = {
|
|
25589
|
-
name: "notification-output",
|
|
25590
|
-
scope: "system",
|
|
25591
|
-
mode: "collection",
|
|
25592
|
-
methods: {
|
|
25593
|
-
listTargetKinds: method(external_exports.object({}), external_exports.array(TargetKindSchema)),
|
|
25594
|
-
listTargets: method(external_exports.object({}), external_exports.array(TargetSchema)),
|
|
25595
|
-
discoverTargets: method(external_exports.object({
|
|
25596
|
-
kind: external_exports.string(),
|
|
25597
|
-
config: external_exports.record(external_exports.string(), external_exports.unknown()).optional()
|
|
25598
|
-
}), external_exports.array(DiscoveredTargetSchema)),
|
|
25599
|
-
send: method(external_exports.object({
|
|
25600
|
-
targetId: external_exports.string(),
|
|
25601
|
-
notification: NotificationSchema
|
|
25602
|
-
}), SendResultSchema, { kind: "mutation" }),
|
|
25603
|
-
testTarget: method(external_exports.object({
|
|
25604
|
-
targetId: external_exports.string(),
|
|
25605
|
-
sample: NotificationSchema.optional()
|
|
25606
|
-
}), TestResultSchema, { kind: "mutation" }),
|
|
25607
|
-
upsertTarget: method(external_exports.object({ target: TargetSchema }), TargetSchema, { kind: "mutation" }),
|
|
25608
|
-
deleteTarget: method(external_exports.object({ targetId: external_exports.string() }), external_exports.void(), { kind: "mutation" }),
|
|
25609
|
-
setTargetEnabled: method(external_exports.object({
|
|
25610
|
-
targetId: external_exports.string(),
|
|
25611
|
-
enabled: external_exports.boolean()
|
|
25612
|
-
}), external_exports.void(), { kind: "mutation" })
|
|
25613
|
-
}
|
|
25614
|
-
};
|
|
25615
|
-
var LlmUsageSchema = external_exports.object({
|
|
25616
|
-
inputTokens: external_exports.number(),
|
|
25617
|
-
outputTokens: external_exports.number()
|
|
25618
|
-
});
|
|
25619
|
-
var LlmErrorCodeSchema = external_exports.enum([
|
|
25620
|
-
"timeout",
|
|
25621
|
-
"rate-limited",
|
|
25622
|
-
"auth",
|
|
25623
|
-
"refusal",
|
|
25624
|
-
"bad-request",
|
|
25625
|
-
"unavailable",
|
|
25626
|
-
"no-profile",
|
|
25627
|
-
"budget-exceeded",
|
|
25628
|
-
"adapter-error"
|
|
25629
|
-
]);
|
|
25630
|
-
var LlmGenerateOkSchema = external_exports.object({
|
|
25631
|
-
ok: external_exports.literal(true),
|
|
25632
|
-
text: external_exports.string(),
|
|
25633
|
-
model: external_exports.string(),
|
|
25634
|
-
usage: LlmUsageSchema,
|
|
25635
|
-
truncated: external_exports.boolean(),
|
|
25636
|
-
latencyMs: external_exports.number()
|
|
25637
|
-
});
|
|
25638
|
-
var LlmGenerateErrSchema = external_exports.object({
|
|
25639
|
-
ok: external_exports.literal(false),
|
|
25640
|
-
code: LlmErrorCodeSchema,
|
|
25641
|
-
message: external_exports.string(),
|
|
25642
|
-
retryAfterMs: external_exports.number().optional()
|
|
25643
|
-
});
|
|
25644
|
-
var LlmGenerateResultSchema = external_exports.discriminatedUnion("ok", [LlmGenerateOkSchema, LlmGenerateErrSchema]);
|
|
25645
|
-
var LlmImageSchema = external_exports.object({
|
|
25646
|
-
bytes: external_exports.instanceof(Uint8Array),
|
|
25647
|
-
mimeType: external_exports.string()
|
|
25648
|
-
});
|
|
25649
|
-
var LlmGenerateBaseInputSchema = external_exports.object({
|
|
25650
|
-
/** Collection routing (the notification-output posture). */
|
|
25651
|
-
addonId: external_exports.string().optional(),
|
|
25652
|
-
/** Explicit profile; else the resolution chain (spec §3). */
|
|
25653
|
-
profileId: external_exports.string().optional(),
|
|
25654
|
-
/** MANDATORY usage tag: 'ai-summary', 'notifier-rules', 'adhoc-ui', … */
|
|
25655
|
-
consumer: external_exports.string(),
|
|
25656
|
-
system: external_exports.string().optional(),
|
|
25657
|
-
/** v1: single-turn. `messages[]` is a v2 additive field. */
|
|
25658
|
-
prompt: external_exports.string(),
|
|
25659
|
-
/** Structured output — adapter-mapped (response_format / forced tool / responseSchema). */
|
|
25660
|
-
jsonSchema: external_exports.record(external_exports.string(), external_exports.unknown()).optional(),
|
|
25661
|
-
/** Per-call override of the profile default. */
|
|
25662
|
-
maxTokens: external_exports.number().int().positive().optional(),
|
|
25663
|
-
temperature: external_exports.number().optional()
|
|
25664
|
-
});
|
|
25665
|
-
var ManagedModelRefSchema = external_exports.discriminatedUnion("kind", [
|
|
25666
|
-
external_exports.object({
|
|
25667
|
-
kind: external_exports.literal("catalog"),
|
|
25668
|
-
catalogId: external_exports.string()
|
|
25669
|
-
}),
|
|
25670
|
-
external_exports.object({
|
|
25671
|
-
kind: external_exports.literal("url"),
|
|
25672
|
-
url: external_exports.string(),
|
|
25673
|
-
sha256: external_exports.string().optional()
|
|
25674
|
-
}),
|
|
25675
|
-
external_exports.object({
|
|
25676
|
-
kind: external_exports.literal("path"),
|
|
25677
|
-
path: external_exports.string()
|
|
25678
|
-
})
|
|
25679
|
-
]);
|
|
25680
|
-
var ManagedRuntimeConfigSchema = external_exports.object({
|
|
25681
|
-
/** WHERE the runtime lives — hub or any agent. */
|
|
25682
|
-
nodeId: external_exports.string(),
|
|
25683
|
-
/** Closed for v1; 'ollama' is a v2 candidate. */
|
|
25684
|
-
engine: external_exports.enum(["llama-cpp"]),
|
|
25685
|
-
model: ManagedModelRefSchema,
|
|
25686
|
-
contextSize: external_exports.number().int().default(4096),
|
|
25687
|
-
/** 0 = CPU-only. */
|
|
25688
|
-
gpuLayers: external_exports.number().int().default(0),
|
|
25689
|
-
/** Default: cpus-2, clamped ≥1 (resolved node-side). */
|
|
25690
|
-
threads: external_exports.number().int().optional(),
|
|
25691
|
-
/** Concurrent slots. */
|
|
25692
|
-
parallel: external_exports.number().int().default(1),
|
|
25693
|
-
/** Else lazy: first generate boots it. */
|
|
25694
|
-
autoStart: external_exports.boolean().default(false),
|
|
25695
|
-
/** 0 = never; frees RAM after quiet periods. */
|
|
25696
|
-
idleStopMinutes: external_exports.number().int().default(30)
|
|
25818
|
+
/** e.g. Pushover `emergency` requires `retry` / `expire`. */
|
|
25819
|
+
requires: external_exports.array(external_exports.string()).optional(),
|
|
25820
|
+
description: external_exports.string().optional()
|
|
25697
25821
|
});
|
|
25698
|
-
var
|
|
25699
|
-
|
|
25700
|
-
|
|
25701
|
-
|
|
25702
|
-
"
|
|
25703
|
-
"
|
|
25704
|
-
"starting",
|
|
25705
|
-
"ready",
|
|
25706
|
-
"crashed",
|
|
25707
|
-
"failed"
|
|
25822
|
+
var TargetKindAttachmentsCapsSchema = external_exports.object({
|
|
25823
|
+
mediaTypes: external_exports.array(AttachmentMediaTypeSchema),
|
|
25824
|
+
mode: external_exports.enum([
|
|
25825
|
+
"url",
|
|
25826
|
+
"bytes",
|
|
25827
|
+
"both"
|
|
25708
25828
|
]),
|
|
25709
|
-
|
|
25710
|
-
|
|
25711
|
-
modelPath: external_exports.string().optional(),
|
|
25712
|
-
modelId: external_exports.string().optional(),
|
|
25713
|
-
downloadProgress: external_exports.number().min(0).max(1).optional(),
|
|
25714
|
-
lastError: external_exports.string().optional(),
|
|
25715
|
-
crashesInWindow: external_exports.number(),
|
|
25716
|
-
/** Child RSS (sampled best-effort). */
|
|
25717
|
-
memoryBytes: external_exports.number().optional(),
|
|
25718
|
-
vramBytes: external_exports.number().optional()
|
|
25829
|
+
max: external_exports.number().int().nonnegative(),
|
|
25830
|
+
maxBytes: external_exports.number().int().positive().optional()
|
|
25719
25831
|
});
|
|
25720
|
-
var
|
|
25721
|
-
|
|
25722
|
-
|
|
25723
|
-
|
|
25724
|
-
|
|
25832
|
+
var TargetKindCapsSchema = external_exports.object({
|
|
25833
|
+
attachments: TargetKindAttachmentsCapsSchema,
|
|
25834
|
+
/** Max action buttons (0 = none). */
|
|
25835
|
+
actions: external_exports.number().int().nonnegative(),
|
|
25836
|
+
levels: external_exports.array(TargetKindLevelSchema),
|
|
25837
|
+
format: external_exports.array(NotificationFormatSchema),
|
|
25838
|
+
clickUrl: external_exports.boolean(),
|
|
25839
|
+
sound: external_exports.boolean(),
|
|
25840
|
+
ttl: external_exports.boolean(),
|
|
25841
|
+
bodyMaxLen: external_exports.number().int().positive()
|
|
25725
25842
|
});
|
|
25726
|
-
var
|
|
25727
|
-
|
|
25728
|
-
|
|
25729
|
-
|
|
25843
|
+
var ConfigSchemaPassthrough = external_exports.unknown();
|
|
25844
|
+
var TargetKindSchema = external_exports.object({
|
|
25845
|
+
kind: external_exports.string(),
|
|
25846
|
+
label: external_exports.string(),
|
|
25847
|
+
icon: external_exports.string(),
|
|
25848
|
+
/** Stamped by each provider so the concat-fanned catalog stays routable. */
|
|
25849
|
+
addonId: external_exports.string(),
|
|
25850
|
+
configSchema: ConfigSchemaPassthrough,
|
|
25851
|
+
supportsDiscovery: external_exports.boolean(),
|
|
25852
|
+
caps: TargetKindCapsSchema
|
|
25730
25853
|
});
|
|
25731
|
-
var
|
|
25732
|
-
|
|
25733
|
-
|
|
25734
|
-
|
|
25735
|
-
|
|
25854
|
+
var TargetSchema = external_exports.object({
|
|
25855
|
+
id: external_exports.string(),
|
|
25856
|
+
name: external_exports.string(),
|
|
25857
|
+
kind: external_exports.string(),
|
|
25858
|
+
addonId: external_exports.string(),
|
|
25859
|
+
enabled: external_exports.boolean(),
|
|
25860
|
+
config: external_exports.record(external_exports.string(), external_exports.unknown())
|
|
25736
25861
|
});
|
|
25737
|
-
var
|
|
25738
|
-
|
|
25862
|
+
var DiscoveredTargetSchema = external_exports.object({
|
|
25863
|
+
kind: external_exports.string(),
|
|
25864
|
+
suggestedName: external_exports.string(),
|
|
25865
|
+
config: external_exports.record(external_exports.string(), external_exports.unknown())
|
|
25866
|
+
});
|
|
25867
|
+
var RenderedAsSchema = external_exports.object({
|
|
25868
|
+
level: external_exports.string(),
|
|
25869
|
+
format: NotificationFormatSchema,
|
|
25870
|
+
attachmentsSent: external_exports.number().int().nonnegative(),
|
|
25871
|
+
actionsSent: external_exports.number().int().nonnegative(),
|
|
25872
|
+
truncated: external_exports.boolean(),
|
|
25873
|
+
dropped: external_exports.array(external_exports.string())
|
|
25874
|
+
});
|
|
25875
|
+
var SendResultSchema = external_exports.object({
|
|
25876
|
+
success: external_exports.boolean(),
|
|
25877
|
+
error: external_exports.string().optional(),
|
|
25878
|
+
renderedAs: RenderedAsSchema.optional()
|
|
25879
|
+
});
|
|
25880
|
+
var TestResultSchema = SendResultSchema;
|
|
25881
|
+
var notificationOutputCapability = {
|
|
25882
|
+
name: "notification-output",
|
|
25739
25883
|
scope: "system",
|
|
25740
|
-
mode: "
|
|
25741
|
-
internal: true,
|
|
25884
|
+
mode: "collection",
|
|
25742
25885
|
methods: {
|
|
25743
|
-
|
|
25744
|
-
|
|
25745
|
-
|
|
25746
|
-
|
|
25747
|
-
|
|
25748
|
-
|
|
25749
|
-
|
|
25750
|
-
|
|
25751
|
-
|
|
25752
|
-
|
|
25753
|
-
|
|
25754
|
-
|
|
25755
|
-
|
|
25756
|
-
}),
|
|
25757
|
-
|
|
25758
|
-
|
|
25759
|
-
|
|
25760
|
-
|
|
25761
|
-
|
|
25762
|
-
|
|
25886
|
+
listTargetKinds: method(external_exports.object({}), external_exports.array(TargetKindSchema)),
|
|
25887
|
+
listTargets: method(external_exports.object({}), external_exports.array(TargetSchema)),
|
|
25888
|
+
discoverTargets: method(external_exports.object({
|
|
25889
|
+
kind: external_exports.string(),
|
|
25890
|
+
config: external_exports.record(external_exports.string(), external_exports.unknown()).optional()
|
|
25891
|
+
}), external_exports.array(DiscoveredTargetSchema)),
|
|
25892
|
+
send: method(external_exports.object({
|
|
25893
|
+
targetId: external_exports.string(),
|
|
25894
|
+
notification: NotificationSchema
|
|
25895
|
+
}), SendResultSchema, { kind: "mutation" }),
|
|
25896
|
+
testTarget: method(external_exports.object({
|
|
25897
|
+
targetId: external_exports.string(),
|
|
25898
|
+
sample: NotificationSchema.optional()
|
|
25899
|
+
}), TestResultSchema, { kind: "mutation" }),
|
|
25900
|
+
upsertTarget: method(external_exports.object({ target: TargetSchema }), TargetSchema, { kind: "mutation" }),
|
|
25901
|
+
deleteTarget: method(external_exports.object({ targetId: external_exports.string() }), external_exports.void(), { kind: "mutation" }),
|
|
25902
|
+
setTargetEnabled: method(external_exports.object({
|
|
25903
|
+
targetId: external_exports.string(),
|
|
25904
|
+
enabled: external_exports.boolean()
|
|
25905
|
+
}), external_exports.void(), { kind: "mutation" })
|
|
25763
25906
|
}
|
|
25764
25907
|
};
|
|
25765
|
-
var
|
|
25766
|
-
"
|
|
25767
|
-
"
|
|
25768
|
-
"
|
|
25769
|
-
"
|
|
25770
|
-
"managed-local"
|
|
25908
|
+
var NcDeliverySchema = external_exports.enum([
|
|
25909
|
+
"immediate",
|
|
25910
|
+
"track-end",
|
|
25911
|
+
"device-event",
|
|
25912
|
+
"package-event"
|
|
25771
25913
|
]);
|
|
25772
|
-
var
|
|
25773
|
-
|
|
25774
|
-
|
|
25775
|
-
|
|
25776
|
-
|
|
25777
|
-
|
|
25778
|
-
|
|
25779
|
-
|
|
25780
|
-
|
|
25781
|
-
|
|
25782
|
-
|
|
25783
|
-
|
|
25784
|
-
|
|
25785
|
-
|
|
25786
|
-
|
|
25787
|
-
|
|
25788
|
-
|
|
25789
|
-
|
|
25790
|
-
|
|
25791
|
-
|
|
25914
|
+
var NcScheduleWindowSchema = external_exports.object({
|
|
25915
|
+
/** Days of week the window STARTS on (0 = Sunday … 6 = Saturday). */
|
|
25916
|
+
days: external_exports.array(external_exports.number().int().min(0).max(6)).min(1),
|
|
25917
|
+
startMinute: external_exports.number().int().min(0).max(1439),
|
|
25918
|
+
endMinute: external_exports.number().int().min(0).max(1439)
|
|
25919
|
+
});
|
|
25920
|
+
var NcScheduleSchema = external_exports.object({
|
|
25921
|
+
windows: external_exports.array(NcScheduleWindowSchema).min(1),
|
|
25922
|
+
/** IANA timezone; default = hub host timezone. */
|
|
25923
|
+
timezone: external_exports.string().optional(),
|
|
25924
|
+
/** Active OUTSIDE the windows (e.g. "only outside business hours"). */
|
|
25925
|
+
invert: external_exports.boolean().optional()
|
|
25926
|
+
});
|
|
25927
|
+
var NcPlateMatcherSchema = external_exports.object({
|
|
25928
|
+
values: external_exports.array(external_exports.string().min(1)).min(1),
|
|
25929
|
+
/** Max Levenshtein distance after normalization (uppercase alphanumeric). */
|
|
25930
|
+
maxDistance: external_exports.number().int().min(0).max(3).default(1)
|
|
25931
|
+
});
|
|
25932
|
+
var NcOccupancyConditionSchema = external_exports.object({
|
|
25933
|
+
/** Admin zone id to scope the count to; absent = whole-frame occupancy. */
|
|
25934
|
+
zoneId: external_exports.string().optional(),
|
|
25935
|
+
/** Object class to count; absent = any class. */
|
|
25936
|
+
className: external_exports.string().optional(),
|
|
25937
|
+
op: external_exports.enum([
|
|
25938
|
+
"became-occupied",
|
|
25939
|
+
"became-free",
|
|
25940
|
+
">=",
|
|
25941
|
+
"<="
|
|
25942
|
+
]).default("became-occupied"),
|
|
25943
|
+
count: external_exports.number().int().min(0).default(1),
|
|
25944
|
+
sustainSeconds: external_exports.number().int().min(0).max(3600).default(15)
|
|
25945
|
+
});
|
|
25946
|
+
var NcZoneConditionSchema = external_exports.object({
|
|
25947
|
+
ids: external_exports.array(external_exports.string().min(1)).min(1),
|
|
25948
|
+
/** Quantifier over `ids` — at least one / every one visited. */
|
|
25949
|
+
match: external_exports.enum(["any", "all"]).default("any")
|
|
25950
|
+
});
|
|
25951
|
+
var NcConditionsSchema = external_exports.object({
|
|
25952
|
+
/** Device scope — absent = all devices. */
|
|
25953
|
+
devices: external_exports.array(external_exports.number()).optional(),
|
|
25954
|
+
/** Detector class names (any overlap with the record's class set). */
|
|
25955
|
+
classes: external_exports.array(external_exports.string().min(1)).optional(),
|
|
25956
|
+
/** Veto classes — any overlap fails the rule. */
|
|
25957
|
+
classesExclude: external_exports.array(external_exports.string().min(1)).optional(),
|
|
25958
|
+
/** Minimum detection confidence 0–1 (fails when the record has none). */
|
|
25959
|
+
minConfidence: external_exports.number().min(0).max(1).optional(),
|
|
25960
|
+
/** Admin zone membership over event `zones` / track `zonesVisited`. */
|
|
25961
|
+
zones: NcZoneConditionSchema.optional(),
|
|
25962
|
+
/** Veto zones — any hit fails the rule. */
|
|
25963
|
+
zonesExclude: external_exports.array(external_exports.string().min(1)).optional(),
|
|
25964
|
+
/**
|
|
25965
|
+
* Exact (case-insensitive) match on the record's collapsed `label`
|
|
25966
|
+
* (identity name / plate text / subclass).
|
|
25967
|
+
*/
|
|
25968
|
+
labelEquals: external_exports.array(external_exports.string().min(1)).optional(),
|
|
25969
|
+
/**
|
|
25970
|
+
* Identity matcher. P1 boundary: matched against the record's collapsed
|
|
25971
|
+
* `label` (the identity display name propagated by the face pipeline) —
|
|
25972
|
+
* identity-ID matching rides in P2 when identity ids reach the record.
|
|
25973
|
+
*/
|
|
25974
|
+
identities: external_exports.array(external_exports.string().min(1)).optional(),
|
|
25975
|
+
/** Fuzzy plate matcher against the record's `label` (plate text). */
|
|
25976
|
+
plates: NcPlateMatcherSchema.optional(),
|
|
25977
|
+
/**
|
|
25978
|
+
* Identity EXCLUDE — mirror of {@link identities} with `notIn` semantics.
|
|
25979
|
+
* Same P1 boundary: matched against the record's collapsed `label` (the
|
|
25980
|
+
* identity display name). A record with NO label passes (nothing to
|
|
25981
|
+
* exclude), unlike the include variant which fails on an absent label.
|
|
25982
|
+
*/
|
|
25983
|
+
identitiesExclude: external_exports.array(external_exports.string().min(1)).optional(),
|
|
25984
|
+
/**
|
|
25985
|
+
* Minimum server-computed key-event importance in [0,1] (`Track.importance`).
|
|
25986
|
+
* TRACK-END only: importance is scored at track close, so it does not exist
|
|
25987
|
+
* at immediate / object-event evaluation time (see catalog `appliesTo`). At
|
|
25988
|
+
* close the value is threaded via the close-time info (the `Track` clone is
|
|
25989
|
+
* captured before the DB row is updated, so it would otherwise read stale).
|
|
25990
|
+
* Fails when the record carries no importance (never guess quality — the
|
|
25991
|
+
* `minConfidence` precedent). MVP cut: a single scalar threshold.
|
|
25992
|
+
*/
|
|
25993
|
+
minImportance: external_exports.number().min(0).max(1).optional(),
|
|
25994
|
+
/**
|
|
25995
|
+
* Minimum track dwell in SECONDS — `(lastSeen − firstSeen) / 1000`.
|
|
25996
|
+
* TRACK-END only: an `immediate` / object-event subject has no closed
|
|
25997
|
+
* lifespan, so a dwell condition never matches immediate delivery
|
|
25998
|
+
* (documented choice — the object-event record carries no `firstSeen`,
|
|
25999
|
+
* so dwell cannot be computed from what the subject actually carries).
|
|
26000
|
+
*/
|
|
26001
|
+
minDwellSeconds: external_exports.number().min(0).optional(),
|
|
26002
|
+
/**
|
|
26003
|
+
* Detection provenance filter. `any` (default / absent) matches every
|
|
26004
|
+
* source; otherwise the subject's source must equal it. Legacy records
|
|
26005
|
+
* with no stamped source are treated as `pipeline`. The union spans both
|
|
26006
|
+
* record kinds — object events carry `pipeline` | `onboard`, synthetic
|
|
26007
|
+
* tracks carry `sensor`.
|
|
26008
|
+
*/
|
|
26009
|
+
source: external_exports.enum([
|
|
26010
|
+
"pipeline",
|
|
26011
|
+
"onboard",
|
|
26012
|
+
"sensor",
|
|
26013
|
+
"any"
|
|
26014
|
+
]).optional(),
|
|
26015
|
+
/**
|
|
26016
|
+
* Minimum identity / plate MATCH confidence in [0,1] — DISTINCT from the
|
|
26017
|
+
* detector `minConfidence` (that gates the object-detection score; this
|
|
26018
|
+
* gates the recognition/OCR match score). Fails when the subject carries
|
|
26019
|
+
* no label-match confidence (never guess). TRACK-END only: the confidence
|
|
26020
|
+
* lives on the recognition result and reaches the subject at track close.
|
|
26021
|
+
*
|
|
26022
|
+
* What it measures precisely (plumbed at track close — the closer threads
|
|
26023
|
+
* the value into `NcTrackClosedInfo.labelConfidence`, the same seam as
|
|
26024
|
+
* `importance`): the BEST recognition match confidence observed for the
|
|
26025
|
+
* label the track carries at close — for a face, the peak cosine similarity
|
|
26026
|
+
* of the ASSIGNED identity (`FaceMatch.score`, reset on an identity switch);
|
|
26027
|
+
* for a plate, the peak OCR read score of the best-held plate
|
|
26028
|
+
* (`plateText.confidence`). When BOTH a face and a plate were recognized on
|
|
26029
|
+
* one track the higher of the two is used. A track that ended with no
|
|
26030
|
+
* confident identity/plate match carries no value, so the condition fails
|
|
26031
|
+
* closed for it (an un-recognized subject).
|
|
26032
|
+
*/
|
|
26033
|
+
minLabelConfidence: external_exports.number().min(0).max(1).optional(),
|
|
26034
|
+
/**
|
|
26035
|
+
* DEVICE-EVENT only. Raw device event-type tokens (`EventFire.eventType`,
|
|
26036
|
+
* e.g. a doorbell `press` / `press_long`) — matched case-insensitively
|
|
26037
|
+
* against the token carried on the device-event subject (extracted from the
|
|
26038
|
+
* event-emitter runtime slice's `lastEvent.eventType`). Fails when the
|
|
26039
|
+
* subject carries no token. Doorbell-pulse / passive-sensor kinds emit no
|
|
26040
|
+
* eventType, so gate those with {@link sensorKinds} instead.
|
|
26041
|
+
*/
|
|
26042
|
+
eventTypeTokens: external_exports.array(external_exports.string().min(1)).optional(),
|
|
26043
|
+
/**
|
|
26044
|
+
* DEVICE-EVENT only. Sensor/control taxonomy kinds (e.g. `doorbell`,
|
|
26045
|
+
* `contact`, `button`, `device-event`) — matched against the persisted
|
|
26046
|
+
* `SensorEvent.kind` (see `sensor-event-kinds.ts`). Membership is OR.
|
|
26047
|
+
*/
|
|
26048
|
+
sensorKinds: external_exports.array(external_exports.string().min(1)).optional(),
|
|
26049
|
+
/**
|
|
26050
|
+
* PACKAGE-EVENT only. Which package phase fires the rule — `delivered`
|
|
26051
|
+
* (a parked parcel appeared), `picked-up` (it departed), or `both`. Fails
|
|
26052
|
+
* when the subject's phase does not match (a subject always carries a phase
|
|
26053
|
+
* on the package-event trigger).
|
|
26054
|
+
*/
|
|
26055
|
+
packagePhase: external_exports.enum([
|
|
26056
|
+
"delivered",
|
|
26057
|
+
"picked-up",
|
|
26058
|
+
"both"
|
|
26059
|
+
]).optional(),
|
|
26060
|
+
/**
|
|
26061
|
+
* PERSONAL-RULE custom zones (viewer-drawn). Inline normalized polygons
|
|
26062
|
+
* (MaskShape vocabulary). A record passes when its bbox overlaps ANY
|
|
26063
|
+
* listed polygon (ZoneEngine membership semantics). Evaluated only when
|
|
26064
|
+
* the subject carries a bbox; absent bbox ⇒ the condition FAILS.
|
|
26065
|
+
*/
|
|
26066
|
+
customZones: external_exports.array(MaskPolygonShapeSchema).optional(),
|
|
26067
|
+
/**
|
|
26068
|
+
* DEVICE-EVENT only. ZoneAnalytics occupancy edge — fires when a device's
|
|
26069
|
+
* (optionally zone/class-scoped) occupancy count crosses the configured
|
|
26070
|
+
* threshold and holds for `sustainSeconds`. Fail-closed on missing
|
|
26071
|
+
* substrate (no snapshot / missing zone). See {@link NcOccupancyCondition}.
|
|
26072
|
+
*/
|
|
26073
|
+
occupancy: NcOccupancyConditionSchema.optional()
|
|
25792
26074
|
});
|
|
25793
|
-
var
|
|
25794
|
-
|
|
25795
|
-
|
|
25796
|
-
|
|
25797
|
-
|
|
25798
|
-
|
|
25799
|
-
|
|
25800
|
-
|
|
26075
|
+
var NcRuleTargetSchema = external_exports.object({
|
|
26076
|
+
/** `notification-output` Target id. */
|
|
26077
|
+
targetId: external_exports.string().min(1),
|
|
26078
|
+
/**
|
|
26079
|
+
* Per-backend passthrough. Recognized keys are mapped onto the canonical
|
|
26080
|
+
* Notification (`priority`, `level`, `sound`, `clickUrl`, `ttl`); the
|
|
26081
|
+
* degrade engine drops what the backend can't render.
|
|
26082
|
+
*/
|
|
26083
|
+
params: external_exports.record(external_exports.string(), external_exports.unknown()).optional()
|
|
25801
26084
|
});
|
|
25802
|
-
var
|
|
25803
|
-
|
|
25804
|
-
|
|
25805
|
-
|
|
26085
|
+
var NcMediaPolicySchema = external_exports.object({ attach: external_exports.enum([
|
|
26086
|
+
"best",
|
|
26087
|
+
"best-matching",
|
|
26088
|
+
"keyFrame",
|
|
26089
|
+
"none"
|
|
26090
|
+
]).default("best") });
|
|
26091
|
+
var NcThrottleSchema = external_exports.object({
|
|
26092
|
+
cooldownSec: external_exports.number().int().min(0).max(86400).default(60),
|
|
26093
|
+
/** `rule` = one shared cooldown; `rule-device` = per-camera cooldown. */
|
|
26094
|
+
scope: external_exports.enum(["rule", "rule-device"]).default("rule-device")
|
|
26095
|
+
});
|
|
26096
|
+
var NcRuleInputSchema = external_exports.object({
|
|
26097
|
+
name: external_exports.string().min(1).max(200),
|
|
26098
|
+
enabled: external_exports.boolean().default(true),
|
|
26099
|
+
delivery: NcDeliverySchema,
|
|
26100
|
+
conditions: NcConditionsSchema.default({}),
|
|
26101
|
+
schedule: NcScheduleSchema.optional(),
|
|
26102
|
+
targets: external_exports.array(NcRuleTargetSchema).min(1),
|
|
26103
|
+
media: NcMediaPolicySchema.default({ attach: "best" }),
|
|
26104
|
+
throttle: NcThrottleSchema.default({
|
|
26105
|
+
cooldownSec: 60,
|
|
26106
|
+
scope: "rule-device"
|
|
26107
|
+
}),
|
|
26108
|
+
/** `{{var}}` templating over camera/class/label/zones/confidence/time. */
|
|
26109
|
+
template: external_exports.object({
|
|
26110
|
+
title: external_exports.string().max(500).optional(),
|
|
26111
|
+
body: external_exports.string().max(2e3).optional()
|
|
26112
|
+
}).optional(),
|
|
26113
|
+
/** Canonical notification priority ordinal (1..5); per-target overridable. */
|
|
26114
|
+
priority: external_exports.number().int().min(1).max(5).default(3),
|
|
26115
|
+
/**
|
|
26116
|
+
* Ownership/visibility key. Absent = admin/global rule (unchanged legacy
|
|
26117
|
+
* behaviour, visible to all, read-only in the viewer). Present = personal
|
|
26118
|
+
* rule owned by this userId. Server-stamped; never trusted from a client.
|
|
26119
|
+
*/
|
|
26120
|
+
ownerUserId: external_exports.string().optional()
|
|
25806
26121
|
});
|
|
25807
|
-
var
|
|
25808
|
-
|
|
25809
|
-
|
|
25810
|
-
|
|
25811
|
-
|
|
25812
|
-
|
|
25813
|
-
|
|
25814
|
-
|
|
25815
|
-
|
|
25816
|
-
|
|
26122
|
+
var NcRulePatchSchema = NcRuleInputSchema.partial().extend({ disabledTargetIds: external_exports.array(external_exports.string()).optional() });
|
|
26123
|
+
var NcRuleSchema = NcRuleInputSchema.extend({
|
|
26124
|
+
id: external_exports.string(),
|
|
26125
|
+
/** userId of the admin who created the rule (server-stamped caller). */
|
|
26126
|
+
createdBy: external_exports.string(),
|
|
26127
|
+
createdAt: external_exports.number(),
|
|
26128
|
+
updatedAt: external_exports.number(),
|
|
26129
|
+
/**
|
|
26130
|
+
* Per-target opt-out set. A targetId here is suppressed for THIS rule at
|
|
26131
|
+
* send time. Only a target's OWNER may add/remove its id (server-checked
|
|
26132
|
+
* in `nc.setRuleTargetEnabled`). Defaults to empty.
|
|
26133
|
+
*/
|
|
26134
|
+
disabledTargetIds: external_exports.array(external_exports.string()).default([])
|
|
26135
|
+
});
|
|
26136
|
+
var NcTestResultSchema = external_exports.object({
|
|
26137
|
+
recordId: external_exports.string(),
|
|
26138
|
+
recordKind: external_exports.enum([
|
|
26139
|
+
"object-event",
|
|
26140
|
+
"track",
|
|
26141
|
+
"device-event",
|
|
26142
|
+
"package-event"
|
|
26143
|
+
]),
|
|
26144
|
+
deviceId: external_exports.number(),
|
|
26145
|
+
timestamp: external_exports.number(),
|
|
26146
|
+
wouldFire: external_exports.boolean(),
|
|
26147
|
+
/** Condition id that failed (first failing group), when `wouldFire` is false. */
|
|
26148
|
+
failedCondition: external_exports.string().optional(),
|
|
26149
|
+
className: external_exports.string().optional(),
|
|
26150
|
+
label: external_exports.string().optional()
|
|
25817
26151
|
});
|
|
25818
|
-
var
|
|
26152
|
+
var NcConditionDescriptorSchema = external_exports.object({
|
|
26153
|
+
/** Field id inside `NcConditions` (or `'schedule'` for the rule-level group). */
|
|
25819
26154
|
id: external_exports.string(),
|
|
26155
|
+
group: external_exports.enum([
|
|
26156
|
+
"scope",
|
|
26157
|
+
"class",
|
|
26158
|
+
"zones",
|
|
26159
|
+
"quality",
|
|
26160
|
+
"label",
|
|
26161
|
+
"schedule",
|
|
26162
|
+
"device",
|
|
26163
|
+
"package",
|
|
26164
|
+
"occupancy"
|
|
26165
|
+
]),
|
|
25820
26166
|
label: external_exports.string(),
|
|
25821
|
-
|
|
25822
|
-
|
|
25823
|
-
|
|
25824
|
-
|
|
25825
|
-
|
|
25826
|
-
|
|
25827
|
-
|
|
25828
|
-
|
|
25829
|
-
|
|
25830
|
-
|
|
25831
|
-
|
|
26167
|
+
/** Editor widget the UI renders — never hardcode per-condition forms. */
|
|
26168
|
+
valueType: external_exports.enum([
|
|
26169
|
+
"deviceIdList",
|
|
26170
|
+
"stringList",
|
|
26171
|
+
"number01",
|
|
26172
|
+
"number",
|
|
26173
|
+
"sourceSelect",
|
|
26174
|
+
"zoneSelection",
|
|
26175
|
+
"zoneIdList",
|
|
26176
|
+
"schedule",
|
|
26177
|
+
"plateMatcher",
|
|
26178
|
+
"packagePhase",
|
|
26179
|
+
"polygonDraw",
|
|
26180
|
+
"occupancy"
|
|
26181
|
+
]),
|
|
26182
|
+
operator: external_exports.enum([
|
|
26183
|
+
"in",
|
|
26184
|
+
"notIn",
|
|
26185
|
+
"anyOf",
|
|
26186
|
+
"allOf",
|
|
26187
|
+
"gte",
|
|
26188
|
+
"fuzzyIn",
|
|
26189
|
+
"withinSchedule"
|
|
26190
|
+
]),
|
|
26191
|
+
/** Which delivery kinds the condition applies to. */
|
|
26192
|
+
appliesTo: external_exports.array(NcDeliverySchema),
|
|
26193
|
+
phase: external_exports.string(),
|
|
26194
|
+
description: external_exports.string().optional()
|
|
26195
|
+
});
|
|
26196
|
+
var NcHistoryStatusSchema = external_exports.enum([
|
|
26197
|
+
"pending",
|
|
26198
|
+
"sent",
|
|
26199
|
+
"dead"
|
|
26200
|
+
]);
|
|
26201
|
+
var NcHistoryRecordKindSchema = external_exports.enum([
|
|
26202
|
+
"object-event",
|
|
26203
|
+
"track-end",
|
|
26204
|
+
"device-event",
|
|
26205
|
+
"package-event"
|
|
26206
|
+
]);
|
|
26207
|
+
var NcHistorySubjectSchema = external_exports.object({
|
|
26208
|
+
className: external_exports.string(),
|
|
26209
|
+
label: external_exports.string().optional(),
|
|
26210
|
+
confidence: external_exports.number().optional(),
|
|
26211
|
+
zones: external_exports.array(external_exports.string()),
|
|
26212
|
+
timestamp: external_exports.number()
|
|
25832
26213
|
});
|
|
25833
|
-
var
|
|
25834
|
-
|
|
25835
|
-
|
|
25836
|
-
|
|
25837
|
-
|
|
25838
|
-
|
|
26214
|
+
var NcHistoryEntrySchema = external_exports.object({
|
|
26215
|
+
/** Outbox row id — the stable dedup id `ruleId:dedupRef:targetId`. */
|
|
26216
|
+
id: external_exports.string(),
|
|
26217
|
+
ruleId: external_exports.string(),
|
|
26218
|
+
/** Rule name frozen at fire time (outlives a later rename / delete). */
|
|
26219
|
+
ruleName: external_exports.string(),
|
|
26220
|
+
/** The rule urgency/trigger that produced this delivery. */
|
|
26221
|
+
delivery: NcDeliverySchema,
|
|
26222
|
+
targetId: external_exports.string(),
|
|
26223
|
+
deviceId: external_exports.number(),
|
|
26224
|
+
recordKind: NcHistoryRecordKindSchema,
|
|
26225
|
+
/** Event / track ref of the evaluated record (§3.2 `eventRef`). */
|
|
26226
|
+
recordId: external_exports.string(),
|
|
26227
|
+
/** Present for track-scoped deliveries (object-event / track-end). */
|
|
26228
|
+
trackId: external_exports.string().optional(),
|
|
26229
|
+
status: NcHistoryStatusSchema,
|
|
26230
|
+
/** Delivery attempts made so far. */
|
|
26231
|
+
attempts: external_exports.number().int(),
|
|
26232
|
+
/** Fire time (outbox enqueue). */
|
|
26233
|
+
createdAt: external_exports.number(),
|
|
26234
|
+
/** Last transition time (terminal for sent / dead). */
|
|
26235
|
+
updatedAt: external_exports.number(),
|
|
26236
|
+
/** Failure detail — present on a `dead` row. */
|
|
26237
|
+
error: external_exports.string().optional(),
|
|
26238
|
+
subject: NcHistorySubjectSchema
|
|
25839
26239
|
});
|
|
25840
|
-
var
|
|
25841
|
-
|
|
25842
|
-
|
|
25843
|
-
|
|
26240
|
+
var NcHistoryFilterSchema = external_exports.object({
|
|
26241
|
+
ruleId: external_exports.string().optional(),
|
|
26242
|
+
deviceId: external_exports.number().optional(),
|
|
26243
|
+
status: NcHistoryStatusSchema.optional(),
|
|
26244
|
+
since: external_exports.number().optional(),
|
|
26245
|
+
until: external_exports.number().optional(),
|
|
26246
|
+
limit: external_exports.number().int().min(1).max(500).default(100)
|
|
25844
26247
|
});
|
|
25845
|
-
var
|
|
25846
|
-
name: "
|
|
26248
|
+
var notificationRulesCapability = {
|
|
26249
|
+
name: "notification-rules",
|
|
25847
26250
|
scope: "system",
|
|
25848
|
-
mode: "
|
|
25849
|
-
internal: false,
|
|
25850
|
-
providerKind: "ai",
|
|
25851
|
-
/** `nodeId` inputs below are DATA (the hub provider pins itself), never routing. */
|
|
25852
|
-
nodeIdMode: "data",
|
|
26251
|
+
mode: "singleton",
|
|
25853
26252
|
methods: {
|
|
25854
|
-
|
|
25855
|
-
|
|
25856
|
-
|
|
25857
|
-
listProfiles: method(external_exports.object({}), external_exports.array(LlmProfileSchema)),
|
|
25858
|
-
upsertProfile: method(external_exports.object({ profile: LlmProfileSchema }), LlmProfileSchema, {
|
|
25859
|
-
kind: "mutation",
|
|
25860
|
-
auth: "admin"
|
|
25861
|
-
}),
|
|
25862
|
-
deleteProfile: method(ProfileRefInputSchema, external_exports.void(), {
|
|
25863
|
-
kind: "mutation",
|
|
25864
|
-
auth: "admin"
|
|
25865
|
-
}),
|
|
25866
|
-
testProfile: method(ProfileRefInputSchema, LlmGenerateResultSchema, {
|
|
26253
|
+
listRules: method(external_exports.object({}), external_exports.object({ rules: external_exports.array(NcRuleSchema) }), { auth: "admin" }),
|
|
26254
|
+
getRule: method(external_exports.object({ ruleId: external_exports.string() }), external_exports.object({ rule: NcRuleSchema.nullable() }), { auth: "admin" }),
|
|
26255
|
+
createRule: method(external_exports.object({ rule: NcRuleInputSchema }), external_exports.object({ rule: NcRuleSchema }), {
|
|
25867
26256
|
kind: "mutation",
|
|
25868
|
-
auth: "admin"
|
|
26257
|
+
auth: "admin",
|
|
26258
|
+
caller: "required"
|
|
25869
26259
|
}),
|
|
25870
|
-
|
|
25871
|
-
|
|
25872
|
-
|
|
25873
|
-
|
|
25874
|
-
selector: LlmDefaultSelectorSchema,
|
|
25875
|
-
profileId: external_exports.string().nullable()
|
|
25876
|
-
}), external_exports.void(), {
|
|
26260
|
+
updateRule: method(external_exports.object({
|
|
26261
|
+
ruleId: external_exports.string(),
|
|
26262
|
+
patch: NcRulePatchSchema
|
|
26263
|
+
}), external_exports.object({ rule: NcRuleSchema }), {
|
|
25877
26264
|
kind: "mutation",
|
|
25878
|
-
auth: "admin"
|
|
26265
|
+
auth: "admin",
|
|
26266
|
+
caller: "required"
|
|
25879
26267
|
}),
|
|
25880
|
-
|
|
25881
|
-
since: external_exports.number().optional(),
|
|
25882
|
-
until: external_exports.number().optional(),
|
|
25883
|
-
consumer: external_exports.string().optional(),
|
|
25884
|
-
profileId: external_exports.string().optional()
|
|
25885
|
-
}), external_exports.array(LlmUsageRollupSchema)),
|
|
25886
|
-
listModelCatalog: method(external_exports.object({}), external_exports.array(ManagedModelCatalogEntrySchema)),
|
|
25887
|
-
listRuntimeNodes: method(external_exports.object({}), external_exports.array(LlmRuntimeNodeSchema)),
|
|
25888
|
-
listNodeModels: method(external_exports.object({ nodeId: external_exports.string() }), external_exports.array(LlmNodeModelSchema)),
|
|
25889
|
-
installModel: method(external_exports.object({
|
|
25890
|
-
nodeId: external_exports.string(),
|
|
25891
|
-
model: ManagedModelRefSchema
|
|
25892
|
-
}), external_exports.void(), {
|
|
26268
|
+
deleteRule: method(external_exports.object({ ruleId: external_exports.string() }), external_exports.object({ success: external_exports.literal(true) }), {
|
|
25893
26269
|
kind: "mutation",
|
|
25894
26270
|
auth: "admin"
|
|
25895
26271
|
}),
|
|
25896
|
-
|
|
25897
|
-
|
|
25898
|
-
|
|
25899
|
-
}), external_exports.
|
|
26272
|
+
setRuleEnabled: method(external_exports.object({
|
|
26273
|
+
ruleId: external_exports.string(),
|
|
26274
|
+
enabled: external_exports.boolean()
|
|
26275
|
+
}), external_exports.object({ success: external_exports.literal(true) }), {
|
|
25900
26276
|
kind: "mutation",
|
|
25901
26277
|
auth: "admin"
|
|
25902
26278
|
}),
|
|
25903
|
-
|
|
25904
|
-
|
|
26279
|
+
/**
|
|
26280
|
+
* Dry-run a rule against recently persisted records (object events for
|
|
26281
|
+
* `immediate`, closed tracks for `track-end`). Mutation kind only to
|
|
26282
|
+
* carry the full rule object safely; no side effects.
|
|
26283
|
+
*/
|
|
26284
|
+
testRule: method(external_exports.object({
|
|
26285
|
+
rule: NcRuleInputSchema,
|
|
26286
|
+
lookbackMinutes: external_exports.number().int().min(1).max(1440).default(60)
|
|
26287
|
+
}), external_exports.object({ results: external_exports.array(NcTestResultSchema) }), {
|
|
25905
26288
|
kind: "mutation",
|
|
25906
26289
|
auth: "admin"
|
|
25907
26290
|
}),
|
|
25908
|
-
|
|
25909
|
-
|
|
25910
|
-
|
|
25911
|
-
|
|
26291
|
+
getConditionCatalog: method(external_exports.object({}), external_exports.object({ catalog: external_exports.array(NcConditionDescriptorSchema) })),
|
|
26292
|
+
/**
|
|
26293
|
+
* Queryable delivery history — a read-only view over the durable outbox
|
|
26294
|
+
* (fired rule, subject summary, target, status, timestamps, error on a
|
|
26295
|
+
* dead row). Newest-first, bounded by `filter.limit`. Retention follows
|
|
26296
|
+
* the outbox's own terminal-row prune horizon (no separate history
|
|
26297
|
+
* horizon — single collection, single source of truth). Admin-only in
|
|
26298
|
+
* P1 (no user dimension); the P2 viewer History screen adds per-caller
|
|
26299
|
+
* scoping on the same method.
|
|
26300
|
+
*/
|
|
26301
|
+
getHistory: method(external_exports.object({ filter: NcHistoryFilterSchema.default({ limit: 100 }) }), external_exports.object({ entries: external_exports.array(NcHistoryEntrySchema) }), { auth: "admin" })
|
|
25912
26302
|
}
|
|
25913
26303
|
};
|
|
25914
26304
|
var MethodAccessSchema = external_exports.enum([
|
|
@@ -26597,7 +26987,14 @@ var pipelineAnalyticsCapability = {
|
|
|
26597
26987
|
eventId: external_exports.string(),
|
|
26598
26988
|
kind: MediaFileKindEnum.optional()
|
|
26599
26989
|
}), external_exports.array(MediaFileSchema).readonly()),
|
|
26600
|
-
|
|
26990
|
+
/** All media rows owned by a track. `kinds` narrows to a kind subset so a
|
|
26991
|
+
* client can fetch the SMALL display variants on open and pull the
|
|
26992
|
+
* multi-MB native variants only on demand (mirrors `getEventMedia.kind`).
|
|
26993
|
+
* Absent ⇒ every kind (back-compat). */
|
|
26994
|
+
getTrackMedia: method(external_exports.object({
|
|
26995
|
+
trackId: external_exports.string(),
|
|
26996
|
+
kinds: external_exports.array(MediaFileKindEnum).optional()
|
|
26997
|
+
}), external_exports.array(MediaFileSchema).readonly()),
|
|
26601
26998
|
/**
|
|
26602
26999
|
* Search object events by text query using CLIP cosine similarity.
|
|
26603
27000
|
* Encodes `text` via the `embedding-encoder` cap, queries the
|
|
@@ -26646,58 +27043,6 @@ var pipelineAnalyticsCapability = {
|
|
|
26646
27043
|
}) }
|
|
26647
27044
|
}
|
|
26648
27045
|
};
|
|
26649
|
-
var LEGACY_ICON = {
|
|
26650
|
-
motion: "motion",
|
|
26651
|
-
audio: "audio",
|
|
26652
|
-
person: "person",
|
|
26653
|
-
vehicle: "vehicle",
|
|
26654
|
-
animal: "animal",
|
|
26655
|
-
package: "package",
|
|
26656
|
-
door: "door",
|
|
26657
|
-
pir: "pir",
|
|
26658
|
-
smoke: "smoke",
|
|
26659
|
-
water: "water",
|
|
26660
|
-
button: "button",
|
|
26661
|
-
generic: "generic",
|
|
26662
|
-
gas: "smoke",
|
|
26663
|
-
vibration: "generic",
|
|
26664
|
-
tamper: "generic",
|
|
26665
|
-
presence: "person",
|
|
26666
|
-
lock: "generic",
|
|
26667
|
-
siren: "generic",
|
|
26668
|
-
switch: "generic",
|
|
26669
|
-
doorbell: "button"
|
|
26670
|
-
};
|
|
26671
|
-
function legacyIcon(iconId) {
|
|
26672
|
-
return LEGACY_ICON[iconId] ?? "generic";
|
|
26673
|
-
}
|
|
26674
|
-
var CAP_TO_KIND = {
|
|
26675
|
-
contact: "contact",
|
|
26676
|
-
motion: "motion-sensor",
|
|
26677
|
-
smoke: "smoke",
|
|
26678
|
-
flood: "flood",
|
|
26679
|
-
gas: "gas",
|
|
26680
|
-
"carbon-monoxide": "carbon-monoxide",
|
|
26681
|
-
vibration: "vibration",
|
|
26682
|
-
tamper: "tamper",
|
|
26683
|
-
presence: "presence",
|
|
26684
|
-
"enum-sensor": "enum-sensor",
|
|
26685
|
-
"event-emitter": "device-event",
|
|
26686
|
-
"lock-control": "lock",
|
|
26687
|
-
switch: "switch",
|
|
26688
|
-
button: "button",
|
|
26689
|
-
doorbell: "doorbell"
|
|
26690
|
-
};
|
|
26691
|
-
function buildDescriptor(capName, kind) {
|
|
26692
|
-
const t = EVENT_TAXONOMY[kind];
|
|
26693
|
-
if (t === void 0) throw new Error(`EVENT_KIND_BY_CAP: cap '${capName}' maps to unknown taxonomy kind '${kind}'`);
|
|
26694
|
-
return {
|
|
26695
|
-
...t,
|
|
26696
|
-
icon: legacyIcon(t.iconId)
|
|
26697
|
-
};
|
|
26698
|
-
}
|
|
26699
|
-
var EVENT_KIND_BY_CAP = Object.freeze(Object.fromEntries(Object.entries(CAP_TO_KIND).map(([capName, kind]) => [capName, buildDescriptor(capName, kind)])));
|
|
26700
|
-
var EVENTFUL_CAP_NAMES = Object.keys(CAP_TO_KIND);
|
|
26701
27046
|
var CameraPipelineConfigSchema = external_exports.object({
|
|
26702
27047
|
engine: PipelineEngineChoiceSchema.optional(),
|
|
26703
27048
|
steps: external_exports.array(PipelineStepInputSchema).readonly(),
|
|
@@ -27384,6 +27729,58 @@ var pipelineOrchestratorCapability = {
|
|
|
27384
27729
|
})
|
|
27385
27730
|
}
|
|
27386
27731
|
};
|
|
27732
|
+
var LEGACY_ICON = {
|
|
27733
|
+
motion: "motion",
|
|
27734
|
+
audio: "audio",
|
|
27735
|
+
person: "person",
|
|
27736
|
+
vehicle: "vehicle",
|
|
27737
|
+
animal: "animal",
|
|
27738
|
+
package: "package",
|
|
27739
|
+
door: "door",
|
|
27740
|
+
pir: "pir",
|
|
27741
|
+
smoke: "smoke",
|
|
27742
|
+
water: "water",
|
|
27743
|
+
button: "button",
|
|
27744
|
+
generic: "generic",
|
|
27745
|
+
gas: "smoke",
|
|
27746
|
+
vibration: "generic",
|
|
27747
|
+
tamper: "generic",
|
|
27748
|
+
presence: "person",
|
|
27749
|
+
lock: "generic",
|
|
27750
|
+
siren: "generic",
|
|
27751
|
+
switch: "generic",
|
|
27752
|
+
doorbell: "button"
|
|
27753
|
+
};
|
|
27754
|
+
function legacyIcon(iconId) {
|
|
27755
|
+
return LEGACY_ICON[iconId] ?? "generic";
|
|
27756
|
+
}
|
|
27757
|
+
var CAP_TO_KIND = {
|
|
27758
|
+
contact: "contact",
|
|
27759
|
+
motion: "motion-sensor",
|
|
27760
|
+
smoke: "smoke",
|
|
27761
|
+
flood: "flood",
|
|
27762
|
+
gas: "gas",
|
|
27763
|
+
"carbon-monoxide": "carbon-monoxide",
|
|
27764
|
+
vibration: "vibration",
|
|
27765
|
+
tamper: "tamper",
|
|
27766
|
+
presence: "presence",
|
|
27767
|
+
"enum-sensor": "enum-sensor",
|
|
27768
|
+
"event-emitter": "device-event",
|
|
27769
|
+
"lock-control": "lock",
|
|
27770
|
+
switch: "switch",
|
|
27771
|
+
button: "button",
|
|
27772
|
+
doorbell: "doorbell"
|
|
27773
|
+
};
|
|
27774
|
+
function buildDescriptor(capName, kind) {
|
|
27775
|
+
const t = EVENT_TAXONOMY[kind];
|
|
27776
|
+
if (t === void 0) throw new Error(`EVENT_KIND_BY_CAP: cap '${capName}' maps to unknown taxonomy kind '${kind}'`);
|
|
27777
|
+
return {
|
|
27778
|
+
...t,
|
|
27779
|
+
icon: legacyIcon(t.iconId)
|
|
27780
|
+
};
|
|
27781
|
+
}
|
|
27782
|
+
var EVENT_KIND_BY_CAP = Object.freeze(Object.fromEntries(Object.entries(CAP_TO_KIND).map(([capName, kind]) => [capName, buildDescriptor(capName, kind)])));
|
|
27783
|
+
var EVENTFUL_CAP_NAMES = Object.keys(CAP_TO_KIND);
|
|
27387
27784
|
var ServerBootModeSchema = external_exports.enum([
|
|
27388
27785
|
"workspace",
|
|
27389
27786
|
"baked",
|
|
@@ -29104,7 +29501,28 @@ var FaceInfoSchema = external_exports.object({
|
|
|
29104
29501
|
* (`/addon/<addonId>/event-media/<keyFrameMediaKey>`). Absent when the
|
|
29105
29502
|
* track produced no key frame (e.g. native/onboard source) — the UI falls
|
|
29106
29503
|
* back to the inline `base64` face crop. */
|
|
29107
|
-
keyFrameMediaKey: external_exports.string().optional()
|
|
29504
|
+
keyFrameMediaKey: external_exports.string().optional(),
|
|
29505
|
+
/** Winning identity-match cosine (0..1) for this face's track, when an
|
|
29506
|
+
* identity was auto-confirmed. Lets the UI surface WHY a face was assigned
|
|
29507
|
+
* (confidence badge / low-confidence audit). Absent on legacy rows and on
|
|
29508
|
+
* faces that were never auto-recognized. */
|
|
29509
|
+
bestMatchScore: external_exports.number().optional(),
|
|
29510
|
+
/** Native-scale face short side (px) at recognition time, when the runner
|
|
29511
|
+
* measured it. Lets the UI flag low-resolution auto-assignments. Absent on
|
|
29512
|
+
* legacy rows / runners that reported no native measure. */
|
|
29513
|
+
nativeFaceShortSidePx: external_exports.number().optional(),
|
|
29514
|
+
/** SUGGESTED identity for this face — a plausible-but-not-confident match that
|
|
29515
|
+
* MISSED auto-assignment (cosine in the suggestion band, or above threshold
|
|
29516
|
+
* but blocked only by the recognition size floor). Mutually exclusive with
|
|
29517
|
+
* `recognizedIdentityId` (a suggestion is NEVER an assignment): the face stays
|
|
29518
|
+
* UNASSIGNED and everything else keeps treating it as unrecognized — the UI
|
|
29519
|
+
* merely offers a one-tap "is this <name>?" confirm. Absent on legacy rows and
|
|
29520
|
+
* on faces that were auto-assigned or below the suggestion band. (2026-07-24) */
|
|
29521
|
+
suggestedIdentityId: external_exports.string().optional(),
|
|
29522
|
+
/** Peak identity-match cosine (0..1) for `suggestedIdentityId`, captured at the
|
|
29523
|
+
* same moment as `bestMatchScore` (track peak, at close). Lets the UI rank /
|
|
29524
|
+
* badge suggestion confidence. Present iff `suggestedIdentityId` is. (2026-07-24) */
|
|
29525
|
+
suggestedMatchScore: external_exports.number().optional()
|
|
29108
29526
|
});
|
|
29109
29527
|
var FaceFilterEnum = external_exports.enum([
|
|
29110
29528
|
"unassigned",
|
|
@@ -31427,36 +31845,6 @@ var METHOD_ACCESS_MAP = Object.freeze({
|
|
|
31427
31845
|
addonId: null,
|
|
31428
31846
|
access: "view"
|
|
31429
31847
|
},
|
|
31430
|
-
"advancedNotifier.deleteRule": {
|
|
31431
|
-
capName: "advanced-notifier",
|
|
31432
|
-
capScope: "system",
|
|
31433
|
-
addonId: null,
|
|
31434
|
-
access: "delete"
|
|
31435
|
-
},
|
|
31436
|
-
"advancedNotifier.getHistory": {
|
|
31437
|
-
capName: "advanced-notifier",
|
|
31438
|
-
capScope: "system",
|
|
31439
|
-
addonId: null,
|
|
31440
|
-
access: "view"
|
|
31441
|
-
},
|
|
31442
|
-
"advancedNotifier.getRules": {
|
|
31443
|
-
capName: "advanced-notifier",
|
|
31444
|
-
capScope: "system",
|
|
31445
|
-
addonId: null,
|
|
31446
|
-
access: "view"
|
|
31447
|
-
},
|
|
31448
|
-
"advancedNotifier.testRule": {
|
|
31449
|
-
capName: "advanced-notifier",
|
|
31450
|
-
capScope: "system",
|
|
31451
|
-
addonId: null,
|
|
31452
|
-
access: "create"
|
|
31453
|
-
},
|
|
31454
|
-
"advancedNotifier.upsertRule": {
|
|
31455
|
-
capName: "advanced-notifier",
|
|
31456
|
-
capScope: "system",
|
|
31457
|
-
addonId: null,
|
|
31458
|
-
access: "create"
|
|
31459
|
-
},
|
|
31460
31848
|
"alarmPanel.arm": {
|
|
31461
31849
|
capName: "alarm-panel",
|
|
31462
31850
|
capScope: "device",
|
|
@@ -33761,6 +34149,60 @@ var METHOD_ACCESS_MAP = Object.freeze({
|
|
|
33761
34149
|
addonId: null,
|
|
33762
34150
|
access: "create"
|
|
33763
34151
|
},
|
|
34152
|
+
"notificationRules.createRule": {
|
|
34153
|
+
capName: "notification-rules",
|
|
34154
|
+
capScope: "system",
|
|
34155
|
+
addonId: null,
|
|
34156
|
+
access: "create"
|
|
34157
|
+
},
|
|
34158
|
+
"notificationRules.deleteRule": {
|
|
34159
|
+
capName: "notification-rules",
|
|
34160
|
+
capScope: "system",
|
|
34161
|
+
addonId: null,
|
|
34162
|
+
access: "delete"
|
|
34163
|
+
},
|
|
34164
|
+
"notificationRules.getConditionCatalog": {
|
|
34165
|
+
capName: "notification-rules",
|
|
34166
|
+
capScope: "system",
|
|
34167
|
+
addonId: null,
|
|
34168
|
+
access: "view"
|
|
34169
|
+
},
|
|
34170
|
+
"notificationRules.getHistory": {
|
|
34171
|
+
capName: "notification-rules",
|
|
34172
|
+
capScope: "system",
|
|
34173
|
+
addonId: null,
|
|
34174
|
+
access: "view"
|
|
34175
|
+
},
|
|
34176
|
+
"notificationRules.getRule": {
|
|
34177
|
+
capName: "notification-rules",
|
|
34178
|
+
capScope: "system",
|
|
34179
|
+
addonId: null,
|
|
34180
|
+
access: "view"
|
|
34181
|
+
},
|
|
34182
|
+
"notificationRules.listRules": {
|
|
34183
|
+
capName: "notification-rules",
|
|
34184
|
+
capScope: "system",
|
|
34185
|
+
addonId: null,
|
|
34186
|
+
access: "view"
|
|
34187
|
+
},
|
|
34188
|
+
"notificationRules.setRuleEnabled": {
|
|
34189
|
+
capName: "notification-rules",
|
|
34190
|
+
capScope: "system",
|
|
34191
|
+
addonId: null,
|
|
34192
|
+
access: "create"
|
|
34193
|
+
},
|
|
34194
|
+
"notificationRules.testRule": {
|
|
34195
|
+
capName: "notification-rules",
|
|
34196
|
+
capScope: "system",
|
|
34197
|
+
addonId: null,
|
|
34198
|
+
access: "create"
|
|
34199
|
+
},
|
|
34200
|
+
"notificationRules.updateRule": {
|
|
34201
|
+
capName: "notification-rules",
|
|
34202
|
+
capScope: "system",
|
|
34203
|
+
addonId: null,
|
|
34204
|
+
access: "create"
|
|
34205
|
+
},
|
|
33764
34206
|
"notifier.cancel": {
|
|
33765
34207
|
capName: "notifier",
|
|
33766
34208
|
capScope: "device",
|