@camstack/addon-terminal 0.1.57 → 0.1.60

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
@@ -7817,7 +7817,8 @@ var OpsLogReasonSchema = _enum([
7817
7817
  "quota",
7818
7818
  "manual",
7819
7819
  "operator",
7820
- "maintenance"
7820
+ "maintenance",
7821
+ "orphaned-device"
7821
7822
  ]);
7822
7823
  /** One audit row, shared verbatim by both domains. */
7823
7824
  var OpsLogEntrySchema = object({
@@ -13057,10 +13058,39 @@ var DevicePersistConfigPayloadSchema = object({
13057
13058
  deviceId: number(),
13058
13059
  data: record(string(), unknown())
13059
13060
  });
13061
+ /** What a migration actually did, per switch. `unreachable` is a first-class
13062
+ * answer: a camera that could not be asked is not a camera that was silenced. */
13063
+ var MigrateSwitchOutcomeSchema = _enum([
13064
+ "off",
13065
+ "on",
13066
+ "not-offered",
13067
+ "unreachable"
13068
+ ]);
13069
+ var MigrateSwitchReportSchema = object({
13070
+ deviceId: number(),
13071
+ switchId: CameraSwitchIdSchema,
13072
+ outcome: MigrateSwitchOutcomeSchema,
13073
+ detail: string().optional()
13074
+ });
13075
+ var MigrateDeviceResultSchema = object({
13076
+ sourceId: number(),
13077
+ targetId: number(),
13078
+ switches: array(MigrateSwitchReportSchema).readonly(),
13079
+ /** Switches that could NOT be turned off on the source. Empty is the only
13080
+ * value meaning the replaced hardware is quiet. */
13081
+ sourceStillLive: array(CameraSwitchIdSchema).readonly(),
13082
+ swapped: boolean()
13083
+ });
13060
13084
  method(object({
13061
13085
  addonId: string(),
13062
13086
  stableId: string()
13063
- }), object({ id: number() }), { kind: "mutation" }), method(DeviceRegisterPayloadSchema, _void(), { kind: "mutation" }), method(DeviceRemovePayloadSchema, _void(), { kind: "mutation" }), method(DevicePersistConfigPayloadSchema, _void(), { kind: "mutation" }), method(object({ deviceId: number() }), record(string(), unknown())), method(object({ deviceId: number() }), record(string(), unknown())), method(object({ deviceId: number() }), DeviceMetaSchema.nullable()), method(object({
13087
+ }), object({ id: number() }), { kind: "mutation" }), method(object({
13088
+ sourceId: number(),
13089
+ targetId: number()
13090
+ }), MigrateDeviceResultSchema, {
13091
+ kind: "mutation",
13092
+ auth: "admin"
13093
+ }), method(DeviceRegisterPayloadSchema, _void(), { kind: "mutation" }), method(DeviceRemovePayloadSchema, _void(), { kind: "mutation" }), method(DevicePersistConfigPayloadSchema, _void(), { kind: "mutation" }), method(object({ deviceId: number() }), record(string(), unknown())), method(object({ deviceId: number() }), record(string(), unknown())), method(object({ deviceId: number() }), DeviceMetaSchema.nullable()), method(object({
13064
13094
  deviceId: number(),
13065
13095
  name: string()
13066
13096
  }), _void(), {
@@ -13535,6 +13565,35 @@ method(_void(), array(string()).readonly(), { auth: "admin" }), method(object({
13535
13565
  auth: "admin"
13536
13566
  });
13537
13567
  /**
13568
+ * Transport bounds for AI capability methods.
13569
+ *
13570
+ * Its own module because `llm.cap.ts` and `llm-runtime.cap.ts` already import
13571
+ * each other: declaring the constant in either one hands the other `undefined`
13572
+ * at module-init time, and an undefined `timeoutMs` silently falls back to the
13573
+ * kernel's 60 s default — the exact failure this constant exists to prevent,
13574
+ * reintroduced invisibly. Found by the guard, not by review.
13575
+ */
13576
+ /**
13577
+ * Ceiling for a cap method that runs inference or loads a model.
13578
+ *
13579
+ * Deliberately far above anything the AI layer itself may wait for (a summary
13580
+ * asks 180 s by default, a rule may ask 600 s), because the TRANSPORT must
13581
+ * never be the layer that gives up first: when it does, the failure is
13582
+ * reported as a transport error for a model that was still thinking, naming
13583
+ * the wrong layer and hiding the real one.
13584
+ *
13585
+ * Measured 2026-09-03: a 6-image vision request needs 44.8 s warm and ~20 s
13586
+ * more on a cold model load. With no declaration every digest failed at
13587
+ * exactly 60 s and shipped without its text.
13588
+ *
13589
+ * A ceiling, not a budget. The AI layer's own timeouts (the rule's `timeoutMs`,
13590
+ * the profile's `timeoutMs` / `firstTokenTimeoutMs`) remain the things that
13591
+ * decide when to stop, because only they can say WHY.
13592
+ */
13593
+ var AI_CAP_TRANSPORT_TIMEOUT_MS = 6e5;
13594
+ /** A multi-gigabyte download. An hour is not generous, it is honest. */
13595
+ var AI_MODEL_INSTALL_TIMEOUT_MS = 60 * 6e4;
13596
+ /**
13538
13597
  * Shared LLM generate contracts — imported by BOTH `llm.cap.ts` (consumer
13539
13598
  * surface) and `llm-runtime.cap.ts` (node-side managed executor) so the two
13540
13599
  * caps stay wire-compatible without a circular cap→cap import.
@@ -13806,16 +13865,19 @@ method(LlmGenerateBaseInputSchema.extend({
13806
13865
  timeoutMs: number().int().positive().optional()
13807
13866
  }), LlmGenerateResultSchema, {
13808
13867
  kind: "mutation",
13809
- auth: "admin"
13868
+ auth: "admin",
13869
+ timeoutMs: AI_CAP_TRANSPORT_TIMEOUT_MS
13810
13870
  }), method(object({ runtime: ManagedRuntimeConfigSchema }), LlmRuntimeStatusSchema, {
13811
13871
  kind: "mutation",
13812
- auth: "admin"
13872
+ auth: "admin",
13873
+ timeoutMs: AI_CAP_TRANSPORT_TIMEOUT_MS
13813
13874
  }), method(object({}), _void(), {
13814
13875
  kind: "mutation",
13815
13876
  auth: "admin"
13816
13877
  }), method(object({}), LlmRuntimeStatusSchema, { auth: "admin" }), method(object({ model: ManagedModelRefSchema }), _void(), {
13817
13878
  kind: "mutation",
13818
- auth: "admin"
13879
+ auth: "admin",
13880
+ timeoutMs: AI_MODEL_INSTALL_TIMEOUT_MS
13819
13881
  }), method(object({ file: string() }), _void(), {
13820
13882
  kind: "mutation",
13821
13883
  auth: "admin"
@@ -13983,7 +14045,13 @@ var ProfileRefInputSchema = object({
13983
14045
  addonId: string(),
13984
14046
  profileId: string()
13985
14047
  });
13986
- method(LlmGenerateBaseInputSchema, LlmGenerateResultSchema, { kind: "mutation" }), method(GenerateVisionInputSchema, LlmGenerateResultSchema, { kind: "mutation" }), method(object({
14048
+ method(LlmGenerateBaseInputSchema, LlmGenerateResultSchema, {
14049
+ kind: "mutation",
14050
+ timeoutMs: AI_CAP_TRANSPORT_TIMEOUT_MS
14051
+ }), method(GenerateVisionInputSchema, LlmGenerateResultSchema, {
14052
+ kind: "mutation",
14053
+ timeoutMs: AI_CAP_TRANSPORT_TIMEOUT_MS
14054
+ }), method(object({
13987
14055
  addonId: string().optional(),
13988
14056
  requestId: string()
13989
14057
  }), _void(), { kind: "mutation" }), method(object({}), array(LlmProfileKindDescriptorSchema)), method(object({}), array(LlmProfileSchema)), method(object({ profile: LlmProfileSchema }), LlmProfileSchema, {
@@ -13994,7 +14062,8 @@ method(LlmGenerateBaseInputSchema, LlmGenerateResultSchema, { kind: "mutation" }
13994
14062
  auth: "admin"
13995
14063
  }), method(ProfileRefInputSchema, LlmGenerateResultSchema, {
13996
14064
  kind: "mutation",
13997
- auth: "admin"
14065
+ auth: "admin",
14066
+ timeoutMs: AI_CAP_TRANSPORT_TIMEOUT_MS
13998
14067
  }), method(ProfileRefInputSchema, array(string())), method(object({}), array(LlmDefaultSchema)), method(object({
13999
14068
  selector: LlmDefaultSelectorSchema,
14000
14069
  profileId: string().nullable()
@@ -34201,6 +34270,12 @@ Object.freeze({
34201
34270
  addonId: null,
34202
34271
  access: "view"
34203
34272
  },
34273
+ "deviceManager.migrateDevice": {
34274
+ capName: "device-manager",
34275
+ capScope: "system",
34276
+ addonId: null,
34277
+ access: "create"
34278
+ },
34204
34279
  "deviceManager.persistConfig": {
34205
34280
  capName: "device-manager",
34206
34281
  capScope: "system",
package/dist/addon.mjs CHANGED
@@ -7794,7 +7794,8 @@ var OpsLogReasonSchema = _enum([
7794
7794
  "quota",
7795
7795
  "manual",
7796
7796
  "operator",
7797
- "maintenance"
7797
+ "maintenance",
7798
+ "orphaned-device"
7798
7799
  ]);
7799
7800
  /** One audit row, shared verbatim by both domains. */
7800
7801
  var OpsLogEntrySchema = object({
@@ -13034,10 +13035,39 @@ var DevicePersistConfigPayloadSchema = object({
13034
13035
  deviceId: number(),
13035
13036
  data: record(string(), unknown())
13036
13037
  });
13038
+ /** What a migration actually did, per switch. `unreachable` is a first-class
13039
+ * answer: a camera that could not be asked is not a camera that was silenced. */
13040
+ var MigrateSwitchOutcomeSchema = _enum([
13041
+ "off",
13042
+ "on",
13043
+ "not-offered",
13044
+ "unreachable"
13045
+ ]);
13046
+ var MigrateSwitchReportSchema = object({
13047
+ deviceId: number(),
13048
+ switchId: CameraSwitchIdSchema,
13049
+ outcome: MigrateSwitchOutcomeSchema,
13050
+ detail: string().optional()
13051
+ });
13052
+ var MigrateDeviceResultSchema = object({
13053
+ sourceId: number(),
13054
+ targetId: number(),
13055
+ switches: array(MigrateSwitchReportSchema).readonly(),
13056
+ /** Switches that could NOT be turned off on the source. Empty is the only
13057
+ * value meaning the replaced hardware is quiet. */
13058
+ sourceStillLive: array(CameraSwitchIdSchema).readonly(),
13059
+ swapped: boolean()
13060
+ });
13037
13061
  method(object({
13038
13062
  addonId: string(),
13039
13063
  stableId: string()
13040
- }), object({ id: number() }), { kind: "mutation" }), method(DeviceRegisterPayloadSchema, _void(), { kind: "mutation" }), method(DeviceRemovePayloadSchema, _void(), { kind: "mutation" }), method(DevicePersistConfigPayloadSchema, _void(), { kind: "mutation" }), method(object({ deviceId: number() }), record(string(), unknown())), method(object({ deviceId: number() }), record(string(), unknown())), method(object({ deviceId: number() }), DeviceMetaSchema.nullable()), method(object({
13064
+ }), object({ id: number() }), { kind: "mutation" }), method(object({
13065
+ sourceId: number(),
13066
+ targetId: number()
13067
+ }), MigrateDeviceResultSchema, {
13068
+ kind: "mutation",
13069
+ auth: "admin"
13070
+ }), method(DeviceRegisterPayloadSchema, _void(), { kind: "mutation" }), method(DeviceRemovePayloadSchema, _void(), { kind: "mutation" }), method(DevicePersistConfigPayloadSchema, _void(), { kind: "mutation" }), method(object({ deviceId: number() }), record(string(), unknown())), method(object({ deviceId: number() }), record(string(), unknown())), method(object({ deviceId: number() }), DeviceMetaSchema.nullable()), method(object({
13041
13071
  deviceId: number(),
13042
13072
  name: string()
13043
13073
  }), _void(), {
@@ -13512,6 +13542,35 @@ method(_void(), array(string()).readonly(), { auth: "admin" }), method(object({
13512
13542
  auth: "admin"
13513
13543
  });
13514
13544
  /**
13545
+ * Transport bounds for AI capability methods.
13546
+ *
13547
+ * Its own module because `llm.cap.ts` and `llm-runtime.cap.ts` already import
13548
+ * each other: declaring the constant in either one hands the other `undefined`
13549
+ * at module-init time, and an undefined `timeoutMs` silently falls back to the
13550
+ * kernel's 60 s default — the exact failure this constant exists to prevent,
13551
+ * reintroduced invisibly. Found by the guard, not by review.
13552
+ */
13553
+ /**
13554
+ * Ceiling for a cap method that runs inference or loads a model.
13555
+ *
13556
+ * Deliberately far above anything the AI layer itself may wait for (a summary
13557
+ * asks 180 s by default, a rule may ask 600 s), because the TRANSPORT must
13558
+ * never be the layer that gives up first: when it does, the failure is
13559
+ * reported as a transport error for a model that was still thinking, naming
13560
+ * the wrong layer and hiding the real one.
13561
+ *
13562
+ * Measured 2026-09-03: a 6-image vision request needs 44.8 s warm and ~20 s
13563
+ * more on a cold model load. With no declaration every digest failed at
13564
+ * exactly 60 s and shipped without its text.
13565
+ *
13566
+ * A ceiling, not a budget. The AI layer's own timeouts (the rule's `timeoutMs`,
13567
+ * the profile's `timeoutMs` / `firstTokenTimeoutMs`) remain the things that
13568
+ * decide when to stop, because only they can say WHY.
13569
+ */
13570
+ var AI_CAP_TRANSPORT_TIMEOUT_MS = 6e5;
13571
+ /** A multi-gigabyte download. An hour is not generous, it is honest. */
13572
+ var AI_MODEL_INSTALL_TIMEOUT_MS = 60 * 6e4;
13573
+ /**
13515
13574
  * Shared LLM generate contracts — imported by BOTH `llm.cap.ts` (consumer
13516
13575
  * surface) and `llm-runtime.cap.ts` (node-side managed executor) so the two
13517
13576
  * caps stay wire-compatible without a circular cap→cap import.
@@ -13783,16 +13842,19 @@ method(LlmGenerateBaseInputSchema.extend({
13783
13842
  timeoutMs: number().int().positive().optional()
13784
13843
  }), LlmGenerateResultSchema, {
13785
13844
  kind: "mutation",
13786
- auth: "admin"
13845
+ auth: "admin",
13846
+ timeoutMs: AI_CAP_TRANSPORT_TIMEOUT_MS
13787
13847
  }), method(object({ runtime: ManagedRuntimeConfigSchema }), LlmRuntimeStatusSchema, {
13788
13848
  kind: "mutation",
13789
- auth: "admin"
13849
+ auth: "admin",
13850
+ timeoutMs: AI_CAP_TRANSPORT_TIMEOUT_MS
13790
13851
  }), method(object({}), _void(), {
13791
13852
  kind: "mutation",
13792
13853
  auth: "admin"
13793
13854
  }), method(object({}), LlmRuntimeStatusSchema, { auth: "admin" }), method(object({ model: ManagedModelRefSchema }), _void(), {
13794
13855
  kind: "mutation",
13795
- auth: "admin"
13856
+ auth: "admin",
13857
+ timeoutMs: AI_MODEL_INSTALL_TIMEOUT_MS
13796
13858
  }), method(object({ file: string() }), _void(), {
13797
13859
  kind: "mutation",
13798
13860
  auth: "admin"
@@ -13960,7 +14022,13 @@ var ProfileRefInputSchema = object({
13960
14022
  addonId: string(),
13961
14023
  profileId: string()
13962
14024
  });
13963
- method(LlmGenerateBaseInputSchema, LlmGenerateResultSchema, { kind: "mutation" }), method(GenerateVisionInputSchema, LlmGenerateResultSchema, { kind: "mutation" }), method(object({
14025
+ method(LlmGenerateBaseInputSchema, LlmGenerateResultSchema, {
14026
+ kind: "mutation",
14027
+ timeoutMs: AI_CAP_TRANSPORT_TIMEOUT_MS
14028
+ }), method(GenerateVisionInputSchema, LlmGenerateResultSchema, {
14029
+ kind: "mutation",
14030
+ timeoutMs: AI_CAP_TRANSPORT_TIMEOUT_MS
14031
+ }), method(object({
13964
14032
  addonId: string().optional(),
13965
14033
  requestId: string()
13966
14034
  }), _void(), { kind: "mutation" }), method(object({}), array(LlmProfileKindDescriptorSchema)), method(object({}), array(LlmProfileSchema)), method(object({ profile: LlmProfileSchema }), LlmProfileSchema, {
@@ -13971,7 +14039,8 @@ method(LlmGenerateBaseInputSchema, LlmGenerateResultSchema, { kind: "mutation" }
13971
14039
  auth: "admin"
13972
14040
  }), method(ProfileRefInputSchema, LlmGenerateResultSchema, {
13973
14041
  kind: "mutation",
13974
- auth: "admin"
14042
+ auth: "admin",
14043
+ timeoutMs: AI_CAP_TRANSPORT_TIMEOUT_MS
13975
14044
  }), method(ProfileRefInputSchema, array(string())), method(object({}), array(LlmDefaultSchema)), method(object({
13976
14045
  selector: LlmDefaultSelectorSchema,
13977
14046
  profileId: string().nullable()
@@ -34178,6 +34247,12 @@ Object.freeze({
34178
34247
  addonId: null,
34179
34248
  access: "view"
34180
34249
  },
34250
+ "deviceManager.migrateDevice": {
34251
+ capName: "device-manager",
34252
+ capScope: "system",
34253
+ addonId: null,
34254
+ access: "create"
34255
+ },
34181
34256
  "deviceManager.persistConfig": {
34182
34257
  capName: "device-manager",
34183
34258
  capScope: "system",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-terminal",
3
- "version": "0.1.57",
3
+ "version": "0.1.60",
4
4
  "description": "Interactive terminal sessions (pty + xterm) as a CamStack addon",
5
5
  "keywords": [
6
6
  "camstack",