@camstack/types 1.2.71 → 1.2.73

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/addon.js CHANGED
@@ -1,6 +1,6 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
2
  const require_event_category = require("./event-category-D3gG7oil.js");
3
- const require_sleep = require("./sleep-DbVrpKVz.js");
3
+ const require_sleep = require("./sleep-B-mRsuDp.js");
4
4
  const require_err_msg = require("./err-msg-COpsHMw2.js");
5
5
  //#region src/generated/collection-array-methods.ts
6
6
  /**
@@ -102,12 +102,25 @@ var CAP_INPUT_DEFAULTS = Object.freeze({
102
102
  "page": 1,
103
103
  "pageSize": 50
104
104
  } },
105
- "llm": { "upsertProfile": { "profile": { "__nested__": { "timeoutMs": 6e4 } } } },
105
+ "llm": { "upsertProfile": { "profile": { "__nested__": {
106
+ "timeoutMs": 6e4,
107
+ "connectTimeoutMs": 1e4,
108
+ "firstTokenTimeoutMs": 12e4,
109
+ "idleTimeoutMs": 6e4,
110
+ "retry": {
111
+ "enabled": false,
112
+ "maxAttempts": 1
113
+ },
114
+ "toolsEnabled": false
115
+ } } } },
106
116
  "llm-runtime": {
107
117
  "complete": { "runtime": { "__nested__": {
108
118
  "contextSize": 4096,
109
119
  "gpuLayers": 0,
110
120
  "parallel": 1,
121
+ "flashAttention": false,
122
+ "mlock": false,
123
+ "noMmap": false,
111
124
  "autoStart": false,
112
125
  "idleStopMinutes": 30
113
126
  } } },
@@ -115,6 +128,9 @@ var CAP_INPUT_DEFAULTS = Object.freeze({
115
128
  "contextSize": 4096,
116
129
  "gpuLayers": 0,
117
130
  "parallel": 1,
131
+ "flashAttention": false,
132
+ "mlock": false,
133
+ "noMmap": false,
118
134
  "autoStart": false,
119
135
  "idleStopMinutes": 30
120
136
  } } }
package/dist/addon.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  import { t as EventCategory } from "./event-category-Bxo5yJjt.mjs";
2
- import { C as DeviceType, F as nodePin, H as scopeKey, I as readNodePin, R as ReadinessRegistry, _t as normalizeAddonInitResult, a as asJsonObject, bt as emitReadiness, d as DEVICE_SCOPED_CAPS, f as isDeviceScopedCap, gt as BaseAddon, ht as DisposerChain, k as expandCapMethods, mt as DATAPLANE_SECRET_HEADER, p as createDeviceProxy, s as asString, t as sleep, u as parseJsonUnknown, v as deviceOpsCapability, w as adminUiCapability, y as viewerUiCapability, z as ReadinessTimeoutError } from "./sleep-CTgUmjYq.mjs";
2
+ import { C as DeviceType, F as nodePin, H as scopeKey, I as readNodePin, R as ReadinessRegistry, _t as normalizeAddonInitResult, a as asJsonObject, bt as emitReadiness, d as DEVICE_SCOPED_CAPS, f as isDeviceScopedCap, gt as BaseAddon, ht as DisposerChain, k as expandCapMethods, mt as DATAPLANE_SECRET_HEADER, p as createDeviceProxy, s as asString, t as sleep, u as parseJsonUnknown, v as deviceOpsCapability, w as adminUiCapability, y as viewerUiCapability, z as ReadinessTimeoutError } from "./sleep-CQayd2Su.mjs";
3
3
  import { t as errMsg } from "./err-msg-IQTHeDzc.mjs";
4
4
  //#region src/generated/collection-array-methods.ts
5
5
  /**
@@ -101,12 +101,25 @@ var CAP_INPUT_DEFAULTS = Object.freeze({
101
101
  "page": 1,
102
102
  "pageSize": 50
103
103
  } },
104
- "llm": { "upsertProfile": { "profile": { "__nested__": { "timeoutMs": 6e4 } } } },
104
+ "llm": { "upsertProfile": { "profile": { "__nested__": {
105
+ "timeoutMs": 6e4,
106
+ "connectTimeoutMs": 1e4,
107
+ "firstTokenTimeoutMs": 12e4,
108
+ "idleTimeoutMs": 6e4,
109
+ "retry": {
110
+ "enabled": false,
111
+ "maxAttempts": 1
112
+ },
113
+ "toolsEnabled": false
114
+ } } } },
105
115
  "llm-runtime": {
106
116
  "complete": { "runtime": { "__nested__": {
107
117
  "contextSize": 4096,
108
118
  "gpuLayers": 0,
109
119
  "parallel": 1,
120
+ "flashAttention": false,
121
+ "mlock": false,
122
+ "noMmap": false,
110
123
  "autoStart": false,
111
124
  "idleStopMinutes": 30
112
125
  } } },
@@ -114,6 +127,9 @@ var CAP_INPUT_DEFAULTS = Object.freeze({
114
127
  "contextSize": 4096,
115
128
  "gpuLayers": 0,
116
129
  "parallel": 1,
130
+ "flashAttention": false,
131
+ "mlock": false,
132
+ "noMmap": false,
117
133
  "autoStart": false,
118
134
  "idleStopMinutes": 30
119
135
  } } }
@@ -58,7 +58,7 @@ export { EmbeddingInfoSchema, EmbeddingResultSchema, embeddingEncoderCapability,
58
58
  export { filesystemBrowseCapability, type IFilesystemBrowseProvider, } from './filesystem-browse.cap.js';
59
59
  export { type ILlmProvider, type LlmDefault, LlmDefaultSchema, type LlmDefaultSelector, LlmDefaultSelectorSchema, type LlmProfile, type LlmProfileKind, type LlmProfileKindDescriptor, LlmProfileKindDescriptorSchema, LlmProfileKindSchema, LlmProfileSchema, type LlmRuntimeNode, LlmRuntimeNodeSchema, type LlmUsageRollup, LlmUsageRollupSchema, llmCapability, type ManagedModelCatalogEntry, ManagedModelCatalogEntrySchema, } from './llm.cap.js';
60
60
  export { type ILlmRuntimeProvider, type LlmNodeModel, LlmNodeModelSchema, type LlmRuntimeCompleteInput, LlmRuntimeCompleteInputSchema, type LlmRuntimeDiskUsage, LlmRuntimeDiskUsageSchema, type LlmRuntimeStatus, LlmRuntimeStatusSchema, llmRuntimeCapability, type ManagedModelRef, ManagedModelRefSchema, type ManagedRuntimeConfig, ManagedRuntimeConfigSchema, } from './llm-runtime.cap.js';
61
- export { type LlmErrorCode, LlmErrorCodeSchema, type LlmGenerateBaseInput, LlmGenerateBaseInputSchema, type LlmGenerateErr, LlmGenerateErrSchema, type LlmGenerateOk, LlmGenerateOkSchema, type LlmGenerateResult, LlmGenerateResultSchema, type LlmImage, LlmImageSchema, type LlmUsage, LlmUsageSchema, } from './llm-shared.js';
61
+ export { type LlmErrorCode, LlmErrorCodeSchema, type LlmGenerateBaseInput, LlmGenerateBaseInputSchema, type LlmGenerateErr, LlmGenerateErrSchema, type LlmGenerateOk, LlmGenerateOkSchema, type LlmGenerateResult, LlmGenerateResultSchema, type LlmImage, LlmImageSchema, type LlmRetryPolicy, LlmRetryPolicySchema, LlmTimeoutDefaults, type LlmUsage, LlmUsageSchema, } from './llm-shared.js';
62
62
  export { LogEntrySchema, LogLevelSchema, logDestinationCapability } from './log-destination.cap.js';
63
63
  export type { ILoginMethodProvider, LoginMethodContribution, LoginStage, PasskeyLoginMethod, RedirectLoginMethod, WidgetLoginMethod, } from './login-method.cap.js';
64
64
  export { LoginMethodContributionSchema, LoginStageEnum, loginMethodCapability, PasskeyLoginMethodSchema, RedirectLoginMethodSchema, WidgetLoginMethodSchema, } from './login-method.cap.js';
@@ -181,7 +181,7 @@ export { type IPtzAutotrackProvider, type PtzAutotrackRuntimeState, PtzAutotrack
181
181
  export { type IRebootProvider, rebootCapability } from './reboot.cap.js';
182
182
  export { type IRecordingProvider, type LocateSegmentResult, LocateSegmentResultSchema, type ReadGopBytesResult, ReadGopBytesResultSchema, type ReadSegmentBytesResult, ReadSegmentBytesResultSchema, type RecordingAvailability, RecordingAvailabilitySchema, type RecordingDays, RecordingDaysSchema, type RecordingDeviceUsage, RecordingDeviceUsageSchema, type RecordingLocationUsage, RecordingLocationUsageSchema, type RecordingManifest, RecordingManifestSchema, RecordingRangeSchema, type RecordingRebalanceInput, RecordingRebalanceInputSchema, type RecordingRebalanceMove, RecordingRebalanceMoveSchema, type RecordingRebalancePlan, RecordingRebalancePlanSchema, type RecordingRebalanceSkip, type RecordingRebalanceSkipReason, RecordingRebalanceSkipReasonSchema, RecordingRebalanceSkipSchema, type RecordingStatus, RecordingStatusSchema, type RecordingStorageUsage, RecordingStorageUsageSchema, recordingCapability, } from './recording.cap.js';
183
183
  export { EXPORT_DENSE_MAX_RANGES, type ExportBytes, ExportBytesSchema, type ExportDense, type ExportDenseRange, ExportDenseRangeSchema, ExportDenseSchema, type ExportDownload, ExportDownloadSchema, type ExportOptions, ExportOptionsSchema, type ExportRecord, ExportRecordSchema, ExportSpeedSchema, type ExportState, ExportStateSchema, ExportTimelapseSchema, type IRecordingExportProvider, RECORDING_EXPORT_MAX_READ_BYTES, recordingExportCapability, } from './recording-export.cap.js';
184
- export { type ISceneMonitorProvider, type SceneCheck, SceneCheckSchema, type SceneCondition, SceneConditionSchema, type SceneMonitor, SceneMonitorSchema, type SceneMonitorState, SceneMonitorStateSchema, type SceneMonitorStatus, SceneMonitorStatusSchema, type SceneReference, SceneReferenceSchema, sceneMonitorCapability, } from './scene-monitor.cap.js';
184
+ export { type ISceneMonitorProvider, SCENE_CONDITIONS, SCENE_CONFIRM_DEFAULT_MAX_IMAGE_PX, SCENE_CONFIRM_DEFAULT_TIMEOUT_MS, SCENE_DEFAULT_ANCHOR_THRESHOLD, SCENE_DEFAULT_CHECK_INTERVAL_SEC, SCENE_DEFAULT_OBSERVATION_SPACING_SEC, SCENE_DEFAULT_QUIET_SECONDS, SCENE_DIVERGED, SCENE_RESET_RECAPTURES, type SceneCheck, SceneCheckSchema, type SceneCondition, SceneConditionSchema, type SceneConfirm, SceneConfirmSchema, type SceneMonitor, SceneMonitorSchema, type SceneMonitorState, SceneMonitorStateSchema, type SceneMonitorStatus, SceneMonitorStatusSchema, type SceneReference, SceneReferenceSchema, type SceneUnavailable, SceneUnavailableSchema, type SceneVerdict, SceneVerdictSchema, sceneMonitorCapability, } from './scene-monitor.cap.js';
185
185
  export { type ZoneRule, type ZoneRuleMode, ZoneRuleModeEnum, ZoneRuleSchema, type ZoneRules, ZoneRulesArraySchema, } from './schemas/zone-rule.js';
186
186
  export { type IScriptRunnerProvider, type ScriptRunnerStatus, ScriptRunnerStatusSchema, scriptRunnerCapability, } from './script-runner.cap.js';
187
187
  export { type ISmokeProvider, type SmokeStatus, SmokeStatusSchema, smokeCapability, } from './smoke.cap.js';
@@ -189,7 +189,7 @@ export { type CamStreamDescriptor, CamStreamDescriptorSchema, type IStreamCatalo
189
189
  export { type IStreamParamsProvider, type StreamParamsOptions, StreamParamsOptionsSchema, type StreamParamsStatus, StreamParamsStatusSchema, type StreamProfile, StreamProfileConfigSchema, StreamProfileOptionsSchema, type StreamProfilePatch, StreamProfilePatchSchema, StreamProfileSchema, streamParamsCapability, } from './stream-params.cap.js';
190
190
  export { buildStreamParamsConfigSchema, parseStreamParamsFormPatch, STREAM_PROFILE_META, type StreamProfileMeta, } from './stream-params-config-schema.js';
191
191
  export { type ISwitchProvider, type SwitchStatus, SwitchStatusSchema, switchCapability, } from './switch.cap.js';
192
- export { FeatureManifestSchema, HealthStatusSchema, type ISystemProvider, NetworkAddressSchema, systemCapability, } from './system.cap.js';
192
+ export { FeatureManifestSchema, HealthStatusSchema, type ISystemProvider, NetworkAddressSchema, type SetSiteLocationInput, SetSiteLocationInputSchema, type SiteLocation, SiteLocationSchema, type SiteLocationSource, SiteLocationSourceSchema, type SiteLocationStatus, SiteLocationStatusSchema, systemCapability, } from './system.cap.js';
193
193
  export { type ITamperProvider, type TamperStatus, TamperStatusSchema, tamperCapability, } from './tamper.cap.js';
194
194
  export { type ITemperatureSensorProvider, type TemperatureSensorStatus, TemperatureSensorStatusSchema, temperatureSensorCapability, } from './temperature-sensor.cap.js';
195
195
  export { type IToastProvider, ToastSchema, toastCapability } from './toast.cap.js';
@@ -43,6 +43,29 @@ export declare const ManagedRuntimeConfigSchema: z.ZodObject<{
43
43
  gpuLayers: z.ZodDefault<z.ZodNumber>;
44
44
  threads: z.ZodOptional<z.ZodNumber>;
45
45
  parallel: z.ZodDefault<z.ZodNumber>;
46
+ batchSize: z.ZodOptional<z.ZodNumber>;
47
+ ubatchSize: z.ZodOptional<z.ZodNumber>;
48
+ flashAttention: z.ZodDefault<z.ZodBoolean>;
49
+ mlock: z.ZodDefault<z.ZodBoolean>;
50
+ noMmap: z.ZodDefault<z.ZodBoolean>;
51
+ cacheTypeK: z.ZodOptional<z.ZodEnum<{
52
+ f32: "f32";
53
+ f16: "f16";
54
+ q8_0: "q8_0";
55
+ q5_1: "q5_1";
56
+ q5_0: "q5_0";
57
+ q4_1: "q4_1";
58
+ q4_0: "q4_0";
59
+ }>>;
60
+ cacheTypeV: z.ZodOptional<z.ZodEnum<{
61
+ f32: "f32";
62
+ f16: "f16";
63
+ q8_0: "q8_0";
64
+ q5_1: "q5_1";
65
+ q5_0: "q5_0";
66
+ q4_1: "q4_1";
67
+ q4_0: "q4_0";
68
+ }>>;
46
69
  autoStart: z.ZodDefault<z.ZodBoolean>;
47
70
  idleStopMinutes: z.ZodDefault<z.ZodNumber>;
48
71
  }, z.core.$strip>;
@@ -90,6 +113,13 @@ export declare const LlmRuntimeCompleteInputSchema: z.ZodObject<{
90
113
  jsonSchema: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
91
114
  maxTokens: z.ZodOptional<z.ZodNumber>;
92
115
  temperature: z.ZodOptional<z.ZodNumber>;
116
+ topP: z.ZodOptional<z.ZodNumber>;
117
+ topK: z.ZodOptional<z.ZodNumber>;
118
+ retry: z.ZodOptional<z.ZodObject<{
119
+ enabled: z.ZodDefault<z.ZodBoolean>;
120
+ maxAttempts: z.ZodDefault<z.ZodNumber>;
121
+ }, z.core.$strip>>;
122
+ requestId: z.ZodOptional<z.ZodString>;
93
123
  images: z.ZodOptional<z.ZodArray<z.ZodObject<{
94
124
  bytes: z.ZodCustom<Uint8Array<ArrayBuffer>, Uint8Array<ArrayBuffer>>;
95
125
  mimeType: z.ZodString;
@@ -114,6 +144,29 @@ export declare const LlmRuntimeCompleteInputSchema: z.ZodObject<{
114
144
  gpuLayers: z.ZodDefault<z.ZodNumber>;
115
145
  threads: z.ZodOptional<z.ZodNumber>;
116
146
  parallel: z.ZodDefault<z.ZodNumber>;
147
+ batchSize: z.ZodOptional<z.ZodNumber>;
148
+ ubatchSize: z.ZodOptional<z.ZodNumber>;
149
+ flashAttention: z.ZodDefault<z.ZodBoolean>;
150
+ mlock: z.ZodDefault<z.ZodBoolean>;
151
+ noMmap: z.ZodDefault<z.ZodBoolean>;
152
+ cacheTypeK: z.ZodOptional<z.ZodEnum<{
153
+ f32: "f32";
154
+ f16: "f16";
155
+ q8_0: "q8_0";
156
+ q5_1: "q5_1";
157
+ q5_0: "q5_0";
158
+ q4_1: "q4_1";
159
+ q4_0: "q4_0";
160
+ }>>;
161
+ cacheTypeV: z.ZodOptional<z.ZodEnum<{
162
+ f32: "f32";
163
+ f16: "f16";
164
+ q8_0: "q8_0";
165
+ q5_1: "q5_1";
166
+ q5_0: "q5_0";
167
+ q4_1: "q4_1";
168
+ q4_0: "q4_0";
169
+ }>>;
117
170
  autoStart: z.ZodDefault<z.ZodBoolean>;
118
171
  idleStopMinutes: z.ZodDefault<z.ZodNumber>;
119
172
  }, z.core.$strip>;
@@ -135,6 +188,13 @@ export declare const llmRuntimeCapability: {
135
188
  jsonSchema: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
136
189
  maxTokens: z.ZodOptional<z.ZodNumber>;
137
190
  temperature: z.ZodOptional<z.ZodNumber>;
191
+ topP: z.ZodOptional<z.ZodNumber>;
192
+ topK: z.ZodOptional<z.ZodNumber>;
193
+ retry: z.ZodOptional<z.ZodObject<{
194
+ enabled: z.ZodDefault<z.ZodBoolean>;
195
+ maxAttempts: z.ZodDefault<z.ZodNumber>;
196
+ }, z.core.$strip>>;
197
+ requestId: z.ZodOptional<z.ZodString>;
138
198
  images: z.ZodOptional<z.ZodArray<z.ZodObject<{
139
199
  bytes: z.ZodCustom<Uint8Array<ArrayBuffer>, Uint8Array<ArrayBuffer>>;
140
200
  mimeType: z.ZodString;
@@ -159,6 +219,29 @@ export declare const llmRuntimeCapability: {
159
219
  gpuLayers: z.ZodDefault<z.ZodNumber>;
160
220
  threads: z.ZodOptional<z.ZodNumber>;
161
221
  parallel: z.ZodDefault<z.ZodNumber>;
222
+ batchSize: z.ZodOptional<z.ZodNumber>;
223
+ ubatchSize: z.ZodOptional<z.ZodNumber>;
224
+ flashAttention: z.ZodDefault<z.ZodBoolean>;
225
+ mlock: z.ZodDefault<z.ZodBoolean>;
226
+ noMmap: z.ZodDefault<z.ZodBoolean>;
227
+ cacheTypeK: z.ZodOptional<z.ZodEnum<{
228
+ f32: "f32";
229
+ f16: "f16";
230
+ q8_0: "q8_0";
231
+ q5_1: "q5_1";
232
+ q5_0: "q5_0";
233
+ q4_1: "q4_1";
234
+ q4_0: "q4_0";
235
+ }>>;
236
+ cacheTypeV: z.ZodOptional<z.ZodEnum<{
237
+ f32: "f32";
238
+ f16: "f16";
239
+ q8_0: "q8_0";
240
+ q5_1: "q5_1";
241
+ q5_0: "q5_0";
242
+ q4_1: "q4_1";
243
+ q4_0: "q4_0";
244
+ }>>;
162
245
  autoStart: z.ZodDefault<z.ZodBoolean>;
163
246
  idleStopMinutes: z.ZodDefault<z.ZodNumber>;
164
247
  }, z.core.$strip>;
@@ -210,6 +293,29 @@ export declare const llmRuntimeCapability: {
210
293
  gpuLayers: z.ZodDefault<z.ZodNumber>;
211
294
  threads: z.ZodOptional<z.ZodNumber>;
212
295
  parallel: z.ZodDefault<z.ZodNumber>;
296
+ batchSize: z.ZodOptional<z.ZodNumber>;
297
+ ubatchSize: z.ZodOptional<z.ZodNumber>;
298
+ flashAttention: z.ZodDefault<z.ZodBoolean>;
299
+ mlock: z.ZodDefault<z.ZodBoolean>;
300
+ noMmap: z.ZodDefault<z.ZodBoolean>;
301
+ cacheTypeK: z.ZodOptional<z.ZodEnum<{
302
+ f32: "f32";
303
+ f16: "f16";
304
+ q8_0: "q8_0";
305
+ q5_1: "q5_1";
306
+ q5_0: "q5_0";
307
+ q4_1: "q4_1";
308
+ q4_0: "q4_0";
309
+ }>>;
310
+ cacheTypeV: z.ZodOptional<z.ZodEnum<{
311
+ f32: "f32";
312
+ f16: "f16";
313
+ q8_0: "q8_0";
314
+ q5_1: "q5_1";
315
+ q5_0: "q5_0";
316
+ q4_1: "q4_1";
317
+ q4_0: "q4_0";
318
+ }>>;
213
319
  autoStart: z.ZodDefault<z.ZodBoolean>;
214
320
  idleStopMinutes: z.ZodDefault<z.ZodNumber>;
215
321
  }, z.core.$strip>;
@@ -91,6 +91,35 @@ export declare const LlmImageSchema: z.ZodObject<{
91
91
  mimeType: z.ZodString;
92
92
  }, z.core.$strip>;
93
93
  export type LlmImage = z.infer<typeof LlmImageSchema>;
94
+ /**
95
+ * Retry policy. `enabled: false` is NOT the same as `maxAttempts: 1` in intent —
96
+ * the flag is what a consumer table flips, the count is what the operator tunes.
97
+ * A retry doubles the wall time of a call, so the two gates that run inside a
98
+ * notification's budget keep it off (see `CONSUMER_RETRY_POLICY` in addon-ai).
99
+ */
100
+ export declare const LlmRetryPolicySchema: z.ZodObject<{
101
+ enabled: z.ZodDefault<z.ZodBoolean>;
102
+ maxAttempts: z.ZodDefault<z.ZodNumber>;
103
+ }, z.core.$strip>;
104
+ export type LlmRetryPolicy = z.infer<typeof LlmRetryPolicySchema>;
105
+ /**
106
+ * The four bounds, as ONE vocabulary.
107
+ *
108
+ * These were three magic constants inside the test chat (`connect` 10 s,
109
+ * `first token` 120 s, `idle` 60 s) plus a separate `timeoutMs` on the profile.
110
+ * They are the same four questions on every call path, so they are profile
111
+ * fields with defaults — and each still names a DIFFERENT failure:
112
+ * - `connect` — the endpoint never accepted the request (port closed).
113
+ * - `firstToken` — accepted, nothing produced yet (cold model loading).
114
+ * - `idle` — tokens started then stopped (a stall, model proven up).
115
+ * - `total` — the whole generation, the only bound a unary call has.
116
+ */
117
+ export declare const LlmTimeoutDefaults: {
118
+ readonly totalMs: 60000;
119
+ readonly connectMs: 10000;
120
+ readonly firstTokenMs: 120000;
121
+ readonly idleMs: 60000;
122
+ };
94
123
  export declare const LlmGenerateBaseInputSchema: z.ZodObject<{
95
124
  addonId: z.ZodOptional<z.ZodString>;
96
125
  profileId: z.ZodOptional<z.ZodString>;
@@ -100,5 +129,13 @@ export declare const LlmGenerateBaseInputSchema: z.ZodObject<{
100
129
  jsonSchema: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
101
130
  maxTokens: z.ZodOptional<z.ZodNumber>;
102
131
  temperature: z.ZodOptional<z.ZodNumber>;
132
+ topP: z.ZodOptional<z.ZodNumber>;
133
+ topK: z.ZodOptional<z.ZodNumber>;
134
+ timeoutMs: z.ZodOptional<z.ZodNumber>;
135
+ retry: z.ZodOptional<z.ZodObject<{
136
+ enabled: z.ZodDefault<z.ZodBoolean>;
137
+ maxAttempts: z.ZodDefault<z.ZodNumber>;
138
+ }, z.core.$strip>>;
139
+ requestId: z.ZodOptional<z.ZodString>;
103
140
  }, z.core.$strip>;
104
141
  export type LlmGenerateBaseInput = z.infer<typeof LlmGenerateBaseInputSchema>;
@@ -37,8 +37,20 @@ export declare const LlmProfileSchema: z.ZodObject<{
37
37
  apiKey: z.ZodOptional<z.ZodString>;
38
38
  supportsVision: z.ZodBoolean;
39
39
  temperature: z.ZodOptional<z.ZodNumber>;
40
+ topP: z.ZodOptional<z.ZodNumber>;
41
+ topK: z.ZodOptional<z.ZodNumber>;
40
42
  maxTokens: z.ZodOptional<z.ZodNumber>;
43
+ contextLength: z.ZodOptional<z.ZodNumber>;
44
+ systemPrompt: z.ZodOptional<z.ZodString>;
41
45
  timeoutMs: z.ZodDefault<z.ZodNumber>;
46
+ connectTimeoutMs: z.ZodDefault<z.ZodNumber>;
47
+ firstTokenTimeoutMs: z.ZodDefault<z.ZodNumber>;
48
+ idleTimeoutMs: z.ZodDefault<z.ZodNumber>;
49
+ retry: z.ZodDefault<z.ZodObject<{
50
+ enabled: z.ZodDefault<z.ZodBoolean>;
51
+ maxAttempts: z.ZodDefault<z.ZodNumber>;
52
+ }, z.core.$strip>>;
53
+ toolsEnabled: z.ZodDefault<z.ZodBoolean>;
42
54
  extraHeaders: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
43
55
  runtime: z.ZodOptional<z.ZodObject<{
44
56
  nodeId: z.ZodString;
@@ -60,6 +72,29 @@ export declare const LlmProfileSchema: z.ZodObject<{
60
72
  gpuLayers: z.ZodDefault<z.ZodNumber>;
61
73
  threads: z.ZodOptional<z.ZodNumber>;
62
74
  parallel: z.ZodDefault<z.ZodNumber>;
75
+ batchSize: z.ZodOptional<z.ZodNumber>;
76
+ ubatchSize: z.ZodOptional<z.ZodNumber>;
77
+ flashAttention: z.ZodDefault<z.ZodBoolean>;
78
+ mlock: z.ZodDefault<z.ZodBoolean>;
79
+ noMmap: z.ZodDefault<z.ZodBoolean>;
80
+ cacheTypeK: z.ZodOptional<z.ZodEnum<{
81
+ f32: "f32";
82
+ f16: "f16";
83
+ q8_0: "q8_0";
84
+ q5_1: "q5_1";
85
+ q5_0: "q5_0";
86
+ q4_1: "q4_1";
87
+ q4_0: "q4_0";
88
+ }>>;
89
+ cacheTypeV: z.ZodOptional<z.ZodEnum<{
90
+ f32: "f32";
91
+ f16: "f16";
92
+ q8_0: "q8_0";
93
+ q5_1: "q5_1";
94
+ q5_0: "q5_0";
95
+ q4_1: "q4_1";
96
+ q4_0: "q4_0";
97
+ }>>;
63
98
  autoStart: z.ZodDefault<z.ZodBoolean>;
64
99
  idleStopMinutes: z.ZodDefault<z.ZodNumber>;
65
100
  }, z.core.$strip>>;
@@ -182,6 +217,14 @@ export declare const llmCapability: {
182
217
  jsonSchema: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
183
218
  maxTokens: z.ZodOptional<z.ZodNumber>;
184
219
  temperature: z.ZodOptional<z.ZodNumber>;
220
+ topP: z.ZodOptional<z.ZodNumber>;
221
+ topK: z.ZodOptional<z.ZodNumber>;
222
+ timeoutMs: z.ZodOptional<z.ZodNumber>;
223
+ retry: z.ZodOptional<z.ZodObject<{
224
+ enabled: z.ZodDefault<z.ZodBoolean>;
225
+ maxAttempts: z.ZodDefault<z.ZodNumber>;
226
+ }, z.core.$strip>>;
227
+ requestId: z.ZodOptional<z.ZodString>;
185
228
  }, z.core.$strip>, z.ZodDiscriminatedUnion<[z.ZodObject<{
186
229
  ok: z.ZodLiteral<true>;
187
230
  text: z.ZodString;
@@ -217,6 +260,14 @@ export declare const llmCapability: {
217
260
  jsonSchema: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
218
261
  maxTokens: z.ZodOptional<z.ZodNumber>;
219
262
  temperature: z.ZodOptional<z.ZodNumber>;
263
+ topP: z.ZodOptional<z.ZodNumber>;
264
+ topK: z.ZodOptional<z.ZodNumber>;
265
+ timeoutMs: z.ZodOptional<z.ZodNumber>;
266
+ retry: z.ZodOptional<z.ZodObject<{
267
+ enabled: z.ZodDefault<z.ZodBoolean>;
268
+ maxAttempts: z.ZodDefault<z.ZodNumber>;
269
+ }, z.core.$strip>>;
270
+ requestId: z.ZodOptional<z.ZodString>;
220
271
  images: z.ZodArray<z.ZodObject<{
221
272
  bytes: z.ZodCustom<Uint8Array<ArrayBuffer>, Uint8Array<ArrayBuffer>>;
222
273
  mimeType: z.ZodString;
@@ -247,6 +298,17 @@ export declare const llmCapability: {
247
298
  message: z.ZodString;
248
299
  retryAfterMs: z.ZodOptional<z.ZodNumber>;
249
300
  }, z.core.$strip>], "ok">, "mutation">;
301
+ /**
302
+ * Stop a generation started with a `requestId`.
303
+ *
304
+ * Idempotent and always successful: cancelling an id that already finished,
305
+ * never existed, or was cancelled a moment ago is a no-op. A caller that has
306
+ * given up must never have to handle an error from giving up.
307
+ */
308
+ readonly cancel: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
309
+ addonId: z.ZodOptional<z.ZodString>;
310
+ requestId: z.ZodString;
311
+ }, z.core.$strip>, z.ZodVoid, "mutation">;
250
312
  readonly listProfileKinds: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{}, z.core.$strip>, z.ZodArray<z.ZodObject<{
251
313
  kind: z.ZodEnum<{
252
314
  "openai-compatible": "openai-compatible";
@@ -277,8 +339,20 @@ export declare const llmCapability: {
277
339
  apiKey: z.ZodOptional<z.ZodString>;
278
340
  supportsVision: z.ZodBoolean;
279
341
  temperature: z.ZodOptional<z.ZodNumber>;
342
+ topP: z.ZodOptional<z.ZodNumber>;
343
+ topK: z.ZodOptional<z.ZodNumber>;
280
344
  maxTokens: z.ZodOptional<z.ZodNumber>;
345
+ contextLength: z.ZodOptional<z.ZodNumber>;
346
+ systemPrompt: z.ZodOptional<z.ZodString>;
281
347
  timeoutMs: z.ZodDefault<z.ZodNumber>;
348
+ connectTimeoutMs: z.ZodDefault<z.ZodNumber>;
349
+ firstTokenTimeoutMs: z.ZodDefault<z.ZodNumber>;
350
+ idleTimeoutMs: z.ZodDefault<z.ZodNumber>;
351
+ retry: z.ZodDefault<z.ZodObject<{
352
+ enabled: z.ZodDefault<z.ZodBoolean>;
353
+ maxAttempts: z.ZodDefault<z.ZodNumber>;
354
+ }, z.core.$strip>>;
355
+ toolsEnabled: z.ZodDefault<z.ZodBoolean>;
282
356
  extraHeaders: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
283
357
  runtime: z.ZodOptional<z.ZodObject<{
284
358
  nodeId: z.ZodString;
@@ -300,6 +374,29 @@ export declare const llmCapability: {
300
374
  gpuLayers: z.ZodDefault<z.ZodNumber>;
301
375
  threads: z.ZodOptional<z.ZodNumber>;
302
376
  parallel: z.ZodDefault<z.ZodNumber>;
377
+ batchSize: z.ZodOptional<z.ZodNumber>;
378
+ ubatchSize: z.ZodOptional<z.ZodNumber>;
379
+ flashAttention: z.ZodDefault<z.ZodBoolean>;
380
+ mlock: z.ZodDefault<z.ZodBoolean>;
381
+ noMmap: z.ZodDefault<z.ZodBoolean>;
382
+ cacheTypeK: z.ZodOptional<z.ZodEnum<{
383
+ f32: "f32";
384
+ f16: "f16";
385
+ q8_0: "q8_0";
386
+ q5_1: "q5_1";
387
+ q5_0: "q5_0";
388
+ q4_1: "q4_1";
389
+ q4_0: "q4_0";
390
+ }>>;
391
+ cacheTypeV: z.ZodOptional<z.ZodEnum<{
392
+ f32: "f32";
393
+ f16: "f16";
394
+ q8_0: "q8_0";
395
+ q5_1: "q5_1";
396
+ q5_0: "q5_0";
397
+ q4_1: "q4_1";
398
+ q4_0: "q4_0";
399
+ }>>;
303
400
  autoStart: z.ZodDefault<z.ZodBoolean>;
304
401
  idleStopMinutes: z.ZodDefault<z.ZodNumber>;
305
402
  }, z.core.$strip>>;
@@ -322,8 +419,20 @@ export declare const llmCapability: {
322
419
  apiKey: z.ZodOptional<z.ZodString>;
323
420
  supportsVision: z.ZodBoolean;
324
421
  temperature: z.ZodOptional<z.ZodNumber>;
422
+ topP: z.ZodOptional<z.ZodNumber>;
423
+ topK: z.ZodOptional<z.ZodNumber>;
325
424
  maxTokens: z.ZodOptional<z.ZodNumber>;
425
+ contextLength: z.ZodOptional<z.ZodNumber>;
426
+ systemPrompt: z.ZodOptional<z.ZodString>;
326
427
  timeoutMs: z.ZodDefault<z.ZodNumber>;
428
+ connectTimeoutMs: z.ZodDefault<z.ZodNumber>;
429
+ firstTokenTimeoutMs: z.ZodDefault<z.ZodNumber>;
430
+ idleTimeoutMs: z.ZodDefault<z.ZodNumber>;
431
+ retry: z.ZodDefault<z.ZodObject<{
432
+ enabled: z.ZodDefault<z.ZodBoolean>;
433
+ maxAttempts: z.ZodDefault<z.ZodNumber>;
434
+ }, z.core.$strip>>;
435
+ toolsEnabled: z.ZodDefault<z.ZodBoolean>;
327
436
  extraHeaders: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
328
437
  runtime: z.ZodOptional<z.ZodObject<{
329
438
  nodeId: z.ZodString;
@@ -345,6 +454,29 @@ export declare const llmCapability: {
345
454
  gpuLayers: z.ZodDefault<z.ZodNumber>;
346
455
  threads: z.ZodOptional<z.ZodNumber>;
347
456
  parallel: z.ZodDefault<z.ZodNumber>;
457
+ batchSize: z.ZodOptional<z.ZodNumber>;
458
+ ubatchSize: z.ZodOptional<z.ZodNumber>;
459
+ flashAttention: z.ZodDefault<z.ZodBoolean>;
460
+ mlock: z.ZodDefault<z.ZodBoolean>;
461
+ noMmap: z.ZodDefault<z.ZodBoolean>;
462
+ cacheTypeK: z.ZodOptional<z.ZodEnum<{
463
+ f32: "f32";
464
+ f16: "f16";
465
+ q8_0: "q8_0";
466
+ q5_1: "q5_1";
467
+ q5_0: "q5_0";
468
+ q4_1: "q4_1";
469
+ q4_0: "q4_0";
470
+ }>>;
471
+ cacheTypeV: z.ZodOptional<z.ZodEnum<{
472
+ f32: "f32";
473
+ f16: "f16";
474
+ q8_0: "q8_0";
475
+ q5_1: "q5_1";
476
+ q5_0: "q5_0";
477
+ q4_1: "q4_1";
478
+ q4_0: "q4_0";
479
+ }>>;
348
480
  autoStart: z.ZodDefault<z.ZodBoolean>;
349
481
  idleStopMinutes: z.ZodDefault<z.ZodNumber>;
350
482
  }, z.core.$strip>>;
@@ -366,8 +498,20 @@ export declare const llmCapability: {
366
498
  apiKey: z.ZodOptional<z.ZodString>;
367
499
  supportsVision: z.ZodBoolean;
368
500
  temperature: z.ZodOptional<z.ZodNumber>;
501
+ topP: z.ZodOptional<z.ZodNumber>;
502
+ topK: z.ZodOptional<z.ZodNumber>;
369
503
  maxTokens: z.ZodOptional<z.ZodNumber>;
504
+ contextLength: z.ZodOptional<z.ZodNumber>;
505
+ systemPrompt: z.ZodOptional<z.ZodString>;
370
506
  timeoutMs: z.ZodDefault<z.ZodNumber>;
507
+ connectTimeoutMs: z.ZodDefault<z.ZodNumber>;
508
+ firstTokenTimeoutMs: z.ZodDefault<z.ZodNumber>;
509
+ idleTimeoutMs: z.ZodDefault<z.ZodNumber>;
510
+ retry: z.ZodDefault<z.ZodObject<{
511
+ enabled: z.ZodDefault<z.ZodBoolean>;
512
+ maxAttempts: z.ZodDefault<z.ZodNumber>;
513
+ }, z.core.$strip>>;
514
+ toolsEnabled: z.ZodDefault<z.ZodBoolean>;
371
515
  extraHeaders: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
372
516
  runtime: z.ZodOptional<z.ZodObject<{
373
517
  nodeId: z.ZodString;
@@ -389,6 +533,29 @@ export declare const llmCapability: {
389
533
  gpuLayers: z.ZodDefault<z.ZodNumber>;
390
534
  threads: z.ZodOptional<z.ZodNumber>;
391
535
  parallel: z.ZodDefault<z.ZodNumber>;
536
+ batchSize: z.ZodOptional<z.ZodNumber>;
537
+ ubatchSize: z.ZodOptional<z.ZodNumber>;
538
+ flashAttention: z.ZodDefault<z.ZodBoolean>;
539
+ mlock: z.ZodDefault<z.ZodBoolean>;
540
+ noMmap: z.ZodDefault<z.ZodBoolean>;
541
+ cacheTypeK: z.ZodOptional<z.ZodEnum<{
542
+ f32: "f32";
543
+ f16: "f16";
544
+ q8_0: "q8_0";
545
+ q5_1: "q5_1";
546
+ q5_0: "q5_0";
547
+ q4_1: "q4_1";
548
+ q4_0: "q4_0";
549
+ }>>;
550
+ cacheTypeV: z.ZodOptional<z.ZodEnum<{
551
+ f32: "f32";
552
+ f16: "f16";
553
+ q8_0: "q8_0";
554
+ q5_1: "q5_1";
555
+ q5_0: "q5_0";
556
+ q4_1: "q4_1";
557
+ q4_0: "q4_0";
558
+ }>>;
392
559
  autoStart: z.ZodDefault<z.ZodBoolean>;
393
560
  idleStopMinutes: z.ZodDefault<z.ZodNumber>;
394
561
  }, z.core.$strip>>;
@@ -230,28 +230,36 @@ export declare const NC_AUDIO_DBFS_FLOOR = -96;
230
230
  /**
231
231
  * Audio condition (IMMEDIATE trigger) — a rule on SOUND, not on a picture.
232
232
  *
233
- * Operator-approved vocabulary (2026-08-12, option A — the same one the
234
- * reference notifier uses, so an operator moving between them re-uses what
235
- * they already know): a rule matches when, over a sampling window of
236
- * `samplingSeconds`, at least `hitPercent`% of the audio samples in that
237
- * window are HITS. A sample is a hit when it satisfies BOTH present filters:
233
+ * **TWO EXCLUSIVE MODES** (operator decision 2026-08-14, D157). Which one a
234
+ * rule is in is not a stored field it is WHICH FILTER the rule carries, so
235
+ * there is no second switch that can disagree with the first and every rule
236
+ * authored before the decision migrates for free (`audioModeOf`):
238
237
  *
239
- * - `dbThreshold`its level is at or above this many dBFS (see
240
- * {@link NC_AUDIO_DBFS_FLOOR}: negative-going, `0` = full scale);
241
- * - `labels` the classifier put at least one of these labels on it.
238
+ * - **LABEL mode `labels` present.** The rule fires on the FIRST frame the
239
+ * classifier labels with one of them. No window, no percentage:
240
+ * `hitPercent` and `samplingSeconds` are ignored, and the rule's own
241
+ * `throttle` cooldown is the only brake. The per-label confidence floor is
242
+ * the analyzer's (`classificationMinScore`, per device) — a label only
243
+ * reaches this condition if the classifier was already confident enough.
244
+ * - **LEVEL mode — `dbThreshold` present, no labels.** The sampling window IS
245
+ * the condition: at least `hitPercent`% of the samples over
246
+ * `samplingSeconds` must be at or above `dbThreshold` dBFS (see
247
+ * {@link NC_AUDIO_DBFS_FLOOR}: negative-going, `0` = full scale). The window
248
+ * must be FULL before it can match — a window open for two of its ten
249
+ * seconds is 100% of nothing.
242
250
  *
243
- * Both are OPTIONAL and independent, which is the point of the shape: a
244
- * loudness rule ("something loud at 3am") needs no model to be right, and a
245
- * label rule ("a dog barked") needs no threshold. **Fail-closed when NEITHER
246
- * is given** a window in which every sample is trivially a hit would fire on
247
- * silence, so the engine refuses such a condition rather than notifying on
248
- * nothing (the schema cannot express "at least one of" without becoming a
249
- * ZodEffects the cap path would have to special-case).
251
+ * **Why label mode has no window.** It had one, and it never fired: the
252
+ * analyzer emits ~1 audio frame per second but YAMNet only LABELS one to three
253
+ * of them per episode, even through continuous crying. The measured maximum
254
+ * `hitPercent` over the whole live history was 40 under the shipped default
255
+ * of 60, so a label rule could not fire at all, ever. A percentage of frames is
256
+ * the wrong question to ask of a sparse classifier.
250
257
  *
251
- * `hitPercent` is over the samples the window actually HOLDS, and the window
252
- * must be FULL before it can match a window that has been open for two
253
- * seconds of its ten is 100% of nothing, and firing on it would make
254
- * `samplingSeconds` decorative.
258
+ * **Fail-closed when NEITHER is given** every sample would be a trivial hit
259
+ * and the rule would fire on silence. The schema cannot express "exactly one
260
+ * of" without becoming a ZodEffects the cap path would have to special-case, so
261
+ * the exclusivity is enforced where every editor writes (`patchAudio`) and a
262
+ * legacy rule carrying both resolves to LABEL (the mode that fires).
255
263
  *
256
264
  * Labels are the audio macro classes (`AUDIO_MACRO_LABELS` / the NC taxonomy's
257
265
  * `audio-*` ids). Both spellings are accepted — the matcher normalizes the