@camstack/addon-post-analysis 1.2.27 → 1.2.29
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/{dist-Be0WkqVJ.js → dist-DY_XHH2r.js} +145 -0
- package/dist/{dist-D7FtjvAJ.mjs → dist-DvGwl3d2.mjs} +145 -0
- package/dist/embedding-encoder/index.js +1 -1
- package/dist/embedding-encoder/index.mjs +1 -1
- package/dist/{node-C5glqf4X.js → node-DSR4j3NF.js} +1 -1
- package/dist/pipeline-analytics/{_virtual_mf-localSharedImportMap___mfe_internal__addon_pipeline_analytics_widgets-CgiwmstG.mjs → _virtual_mf-localSharedImportMap___mfe_internal__addon_pipeline_analytics_widgets-BNpbrkKP.mjs} +2 -2
- package/dist/pipeline-analytics/{hostInit-BWwP7qzu.mjs → hostInit-Cn_w2I8X.mjs} +2 -2
- package/dist/pipeline-analytics/index.js +24 -5
- package/dist/pipeline-analytics/index.mjs +23 -4
- package/dist/pipeline-analytics/remoteEntry.js +1 -1
- package/package.json +1 -1
|
@@ -20770,6 +20770,103 @@ method(object({}), array(TargetKindSchema)), method(object({}), array(TargetSche
|
|
|
20770
20770
|
enabled: boolean()
|
|
20771
20771
|
}), _void(), { kind: "mutation" });
|
|
20772
20772
|
/**
|
|
20773
|
+
* core-blocks — user-authored TypeScript, stored in the kernel and executed in
|
|
20774
|
+
* its own process.
|
|
20775
|
+
*
|
|
20776
|
+
* Spec: `docs/superpowers/specs/2026-08-04-core-blocks-and-synthetic-devices-design.md`.
|
|
20777
|
+
*
|
|
20778
|
+
* The first use is **owning devices without being a device provider**: a block
|
|
20779
|
+
* declares devices under a system or custom integration and drives their state,
|
|
20780
|
+
* with the same `ctx` an addon gets. Automations come later; nothing here
|
|
20781
|
+
* models a trigger.
|
|
20782
|
+
*
|
|
20783
|
+
* **Stated plainly, because it does not change by being true:** a block has an
|
|
20784
|
+
* addon's powers — devices, storage, the event bus, `ctx.api`. It is a plugin
|
|
20785
|
+
* with no review step. What makes that survivable is not a sandbox, it is
|
|
20786
|
+
* PROCESS ISOLATION: one process per block, supervised by `CrashSupervisor`,
|
|
20787
|
+
* so a block that throws or never returns is marked `failed` and visible
|
|
20788
|
+
* instead of taking the hub with it (D6). Every method here is admin-only, and
|
|
20789
|
+
* must stay so.
|
|
20790
|
+
*/
|
|
20791
|
+
/** Where a block runs. The operator chooses — a block driving a device on an
|
|
20792
|
+
* agent is the reason placement is not fixed to the hub. */
|
|
20793
|
+
var CoreBlockPlacementSchema = union([literal("hub"), string().min(1)]);
|
|
20794
|
+
/** What a block's process is doing. Mirrors the addon runner's own lifecycle so
|
|
20795
|
+
* a failing block reads the same way a failing addon does. */
|
|
20796
|
+
var CoreBlockStatusSchema = _enum([
|
|
20797
|
+
"stopped",
|
|
20798
|
+
"starting",
|
|
20799
|
+
"running",
|
|
20800
|
+
"failed"
|
|
20801
|
+
]);
|
|
20802
|
+
/** Client-authored fields. */
|
|
20803
|
+
var CoreBlockInputSchema = object({
|
|
20804
|
+
name: string().min(1).max(120),
|
|
20805
|
+
/** TypeScript source. Compiled server-side before it is ever stored — a
|
|
20806
|
+
* block that does not compile is a fork failure the operator would meet
|
|
20807
|
+
* minutes later, in a log, instead of in the editor. */
|
|
20808
|
+
code: string().max(2e5),
|
|
20809
|
+
enabled: boolean(),
|
|
20810
|
+
placement: CoreBlockPlacementSchema,
|
|
20811
|
+
/**
|
|
20812
|
+
* Integration the block's devices hang from. Absent = the system integration
|
|
20813
|
+
* blocks share. A block may declare its own instead.
|
|
20814
|
+
*/
|
|
20815
|
+
integrationId: string().optional()
|
|
20816
|
+
});
|
|
20817
|
+
/** A stored block. */
|
|
20818
|
+
var CoreBlockSchema = CoreBlockInputSchema.extend({
|
|
20819
|
+
id: string(),
|
|
20820
|
+
createdAt: number(),
|
|
20821
|
+
updatedAt: number(),
|
|
20822
|
+
/** Server-stamped author. */
|
|
20823
|
+
createdBy: string(),
|
|
20824
|
+
status: CoreBlockStatusSchema,
|
|
20825
|
+
/**
|
|
20826
|
+
* Why the block is not running, when it is not. The operator's ONLY window
|
|
20827
|
+
* into a block that failed at load — a block that is silently absent is the
|
|
20828
|
+
* failure mode this whole feature has to avoid.
|
|
20829
|
+
*/
|
|
20830
|
+
lastError: string().optional(),
|
|
20831
|
+
/** Ms epoch of the last state change. */
|
|
20832
|
+
lastChangedAt: number()
|
|
20833
|
+
});
|
|
20834
|
+
/** What a compile attempt produced. */
|
|
20835
|
+
var CoreBlockCompileResultSchema = object({
|
|
20836
|
+
ok: boolean(),
|
|
20837
|
+
/** Present when `ok` is false — the first error, in the author's words. */
|
|
20838
|
+
error: string().optional(),
|
|
20839
|
+
line: number().optional(),
|
|
20840
|
+
column: number().optional()
|
|
20841
|
+
});
|
|
20842
|
+
method(object({}), object({ blocks: array(CoreBlockSchema) }), { auth: "admin" }), method(object({ blockId: string() }), object({ block: CoreBlockSchema.nullable() }), { auth: "admin" }), method(object({ block: CoreBlockInputSchema }), object({ block: CoreBlockSchema }), {
|
|
20843
|
+
kind: "mutation",
|
|
20844
|
+
auth: "admin",
|
|
20845
|
+
caller: "required"
|
|
20846
|
+
}), method(object({
|
|
20847
|
+
blockId: string(),
|
|
20848
|
+
block: CoreBlockInputSchema.partial()
|
|
20849
|
+
}), object({ block: CoreBlockSchema }), {
|
|
20850
|
+
kind: "mutation",
|
|
20851
|
+
auth: "admin",
|
|
20852
|
+
caller: "required"
|
|
20853
|
+
}), method(object({ blockId: string() }), object({ success: literal(true) }), {
|
|
20854
|
+
kind: "mutation",
|
|
20855
|
+
auth: "admin"
|
|
20856
|
+
}), method(object({
|
|
20857
|
+
blockId: string(),
|
|
20858
|
+
enabled: boolean()
|
|
20859
|
+
}), object({ block: CoreBlockSchema }), {
|
|
20860
|
+
kind: "mutation",
|
|
20861
|
+
auth: "admin"
|
|
20862
|
+
}), method(object({ code: string() }), CoreBlockCompileResultSchema, {
|
|
20863
|
+
kind: "mutation",
|
|
20864
|
+
auth: "admin"
|
|
20865
|
+
}), method(object({}), object({ libs: array(object({
|
|
20866
|
+
filePath: string(),
|
|
20867
|
+
content: string()
|
|
20868
|
+
})) }), { auth: "admin" });
|
|
20869
|
+
/**
|
|
20773
20870
|
* Zod schemas for persisted record types.
|
|
20774
20871
|
*
|
|
20775
20872
|
* These schemas serve as the single source of truth for types that are
|
|
@@ -26348,6 +26445,54 @@ Object.freeze({
|
|
|
26348
26445
|
addonId: null,
|
|
26349
26446
|
access: "create"
|
|
26350
26447
|
},
|
|
26448
|
+
"coreBlocks.compile": {
|
|
26449
|
+
capName: "core-blocks",
|
|
26450
|
+
capScope: "system",
|
|
26451
|
+
addonId: null,
|
|
26452
|
+
access: "create"
|
|
26453
|
+
},
|
|
26454
|
+
"coreBlocks.create": {
|
|
26455
|
+
capName: "core-blocks",
|
|
26456
|
+
capScope: "system",
|
|
26457
|
+
addonId: null,
|
|
26458
|
+
access: "create"
|
|
26459
|
+
},
|
|
26460
|
+
"coreBlocks.delete": {
|
|
26461
|
+
capName: "core-blocks",
|
|
26462
|
+
capScope: "system",
|
|
26463
|
+
addonId: null,
|
|
26464
|
+
access: "delete"
|
|
26465
|
+
},
|
|
26466
|
+
"coreBlocks.get": {
|
|
26467
|
+
capName: "core-blocks",
|
|
26468
|
+
capScope: "system",
|
|
26469
|
+
addonId: null,
|
|
26470
|
+
access: "view"
|
|
26471
|
+
},
|
|
26472
|
+
"coreBlocks.getTypeDefs": {
|
|
26473
|
+
capName: "core-blocks",
|
|
26474
|
+
capScope: "system",
|
|
26475
|
+
addonId: null,
|
|
26476
|
+
access: "view"
|
|
26477
|
+
},
|
|
26478
|
+
"coreBlocks.list": {
|
|
26479
|
+
capName: "core-blocks",
|
|
26480
|
+
capScope: "system",
|
|
26481
|
+
addonId: null,
|
|
26482
|
+
access: "view"
|
|
26483
|
+
},
|
|
26484
|
+
"coreBlocks.setEnabled": {
|
|
26485
|
+
capName: "core-blocks",
|
|
26486
|
+
capScope: "system",
|
|
26487
|
+
addonId: null,
|
|
26488
|
+
access: "create"
|
|
26489
|
+
},
|
|
26490
|
+
"coreBlocks.update": {
|
|
26491
|
+
capName: "core-blocks",
|
|
26492
|
+
capScope: "system",
|
|
26493
|
+
addonId: null,
|
|
26494
|
+
access: "create"
|
|
26495
|
+
},
|
|
26351
26496
|
"cover.close": {
|
|
26352
26497
|
capName: "cover",
|
|
26353
26498
|
capScope: "device",
|
|
@@ -20748,6 +20748,103 @@ method(object({}), array(TargetKindSchema)), method(object({}), array(TargetSche
|
|
|
20748
20748
|
enabled: boolean()
|
|
20749
20749
|
}), _void(), { kind: "mutation" });
|
|
20750
20750
|
/**
|
|
20751
|
+
* core-blocks — user-authored TypeScript, stored in the kernel and executed in
|
|
20752
|
+
* its own process.
|
|
20753
|
+
*
|
|
20754
|
+
* Spec: `docs/superpowers/specs/2026-08-04-core-blocks-and-synthetic-devices-design.md`.
|
|
20755
|
+
*
|
|
20756
|
+
* The first use is **owning devices without being a device provider**: a block
|
|
20757
|
+
* declares devices under a system or custom integration and drives their state,
|
|
20758
|
+
* with the same `ctx` an addon gets. Automations come later; nothing here
|
|
20759
|
+
* models a trigger.
|
|
20760
|
+
*
|
|
20761
|
+
* **Stated plainly, because it does not change by being true:** a block has an
|
|
20762
|
+
* addon's powers — devices, storage, the event bus, `ctx.api`. It is a plugin
|
|
20763
|
+
* with no review step. What makes that survivable is not a sandbox, it is
|
|
20764
|
+
* PROCESS ISOLATION: one process per block, supervised by `CrashSupervisor`,
|
|
20765
|
+
* so a block that throws or never returns is marked `failed` and visible
|
|
20766
|
+
* instead of taking the hub with it (D6). Every method here is admin-only, and
|
|
20767
|
+
* must stay so.
|
|
20768
|
+
*/
|
|
20769
|
+
/** Where a block runs. The operator chooses — a block driving a device on an
|
|
20770
|
+
* agent is the reason placement is not fixed to the hub. */
|
|
20771
|
+
var CoreBlockPlacementSchema = union([literal("hub"), string().min(1)]);
|
|
20772
|
+
/** What a block's process is doing. Mirrors the addon runner's own lifecycle so
|
|
20773
|
+
* a failing block reads the same way a failing addon does. */
|
|
20774
|
+
var CoreBlockStatusSchema = _enum([
|
|
20775
|
+
"stopped",
|
|
20776
|
+
"starting",
|
|
20777
|
+
"running",
|
|
20778
|
+
"failed"
|
|
20779
|
+
]);
|
|
20780
|
+
/** Client-authored fields. */
|
|
20781
|
+
var CoreBlockInputSchema = object({
|
|
20782
|
+
name: string().min(1).max(120),
|
|
20783
|
+
/** TypeScript source. Compiled server-side before it is ever stored — a
|
|
20784
|
+
* block that does not compile is a fork failure the operator would meet
|
|
20785
|
+
* minutes later, in a log, instead of in the editor. */
|
|
20786
|
+
code: string().max(2e5),
|
|
20787
|
+
enabled: boolean(),
|
|
20788
|
+
placement: CoreBlockPlacementSchema,
|
|
20789
|
+
/**
|
|
20790
|
+
* Integration the block's devices hang from. Absent = the system integration
|
|
20791
|
+
* blocks share. A block may declare its own instead.
|
|
20792
|
+
*/
|
|
20793
|
+
integrationId: string().optional()
|
|
20794
|
+
});
|
|
20795
|
+
/** A stored block. */
|
|
20796
|
+
var CoreBlockSchema = CoreBlockInputSchema.extend({
|
|
20797
|
+
id: string(),
|
|
20798
|
+
createdAt: number(),
|
|
20799
|
+
updatedAt: number(),
|
|
20800
|
+
/** Server-stamped author. */
|
|
20801
|
+
createdBy: string(),
|
|
20802
|
+
status: CoreBlockStatusSchema,
|
|
20803
|
+
/**
|
|
20804
|
+
* Why the block is not running, when it is not. The operator's ONLY window
|
|
20805
|
+
* into a block that failed at load — a block that is silently absent is the
|
|
20806
|
+
* failure mode this whole feature has to avoid.
|
|
20807
|
+
*/
|
|
20808
|
+
lastError: string().optional(),
|
|
20809
|
+
/** Ms epoch of the last state change. */
|
|
20810
|
+
lastChangedAt: number()
|
|
20811
|
+
});
|
|
20812
|
+
/** What a compile attempt produced. */
|
|
20813
|
+
var CoreBlockCompileResultSchema = object({
|
|
20814
|
+
ok: boolean(),
|
|
20815
|
+
/** Present when `ok` is false — the first error, in the author's words. */
|
|
20816
|
+
error: string().optional(),
|
|
20817
|
+
line: number().optional(),
|
|
20818
|
+
column: number().optional()
|
|
20819
|
+
});
|
|
20820
|
+
method(object({}), object({ blocks: array(CoreBlockSchema) }), { auth: "admin" }), method(object({ blockId: string() }), object({ block: CoreBlockSchema.nullable() }), { auth: "admin" }), method(object({ block: CoreBlockInputSchema }), object({ block: CoreBlockSchema }), {
|
|
20821
|
+
kind: "mutation",
|
|
20822
|
+
auth: "admin",
|
|
20823
|
+
caller: "required"
|
|
20824
|
+
}), method(object({
|
|
20825
|
+
blockId: string(),
|
|
20826
|
+
block: CoreBlockInputSchema.partial()
|
|
20827
|
+
}), object({ block: CoreBlockSchema }), {
|
|
20828
|
+
kind: "mutation",
|
|
20829
|
+
auth: "admin",
|
|
20830
|
+
caller: "required"
|
|
20831
|
+
}), method(object({ blockId: string() }), object({ success: literal(true) }), {
|
|
20832
|
+
kind: "mutation",
|
|
20833
|
+
auth: "admin"
|
|
20834
|
+
}), method(object({
|
|
20835
|
+
blockId: string(),
|
|
20836
|
+
enabled: boolean()
|
|
20837
|
+
}), object({ block: CoreBlockSchema }), {
|
|
20838
|
+
kind: "mutation",
|
|
20839
|
+
auth: "admin"
|
|
20840
|
+
}), method(object({ code: string() }), CoreBlockCompileResultSchema, {
|
|
20841
|
+
kind: "mutation",
|
|
20842
|
+
auth: "admin"
|
|
20843
|
+
}), method(object({}), object({ libs: array(object({
|
|
20844
|
+
filePath: string(),
|
|
20845
|
+
content: string()
|
|
20846
|
+
})) }), { auth: "admin" });
|
|
20847
|
+
/**
|
|
20751
20848
|
* Zod schemas for persisted record types.
|
|
20752
20849
|
*
|
|
20753
20850
|
* These schemas serve as the single source of truth for types that are
|
|
@@ -26326,6 +26423,54 @@ Object.freeze({
|
|
|
26326
26423
|
addonId: null,
|
|
26327
26424
|
access: "create"
|
|
26328
26425
|
},
|
|
26426
|
+
"coreBlocks.compile": {
|
|
26427
|
+
capName: "core-blocks",
|
|
26428
|
+
capScope: "system",
|
|
26429
|
+
addonId: null,
|
|
26430
|
+
access: "create"
|
|
26431
|
+
},
|
|
26432
|
+
"coreBlocks.create": {
|
|
26433
|
+
capName: "core-blocks",
|
|
26434
|
+
capScope: "system",
|
|
26435
|
+
addonId: null,
|
|
26436
|
+
access: "create"
|
|
26437
|
+
},
|
|
26438
|
+
"coreBlocks.delete": {
|
|
26439
|
+
capName: "core-blocks",
|
|
26440
|
+
capScope: "system",
|
|
26441
|
+
addonId: null,
|
|
26442
|
+
access: "delete"
|
|
26443
|
+
},
|
|
26444
|
+
"coreBlocks.get": {
|
|
26445
|
+
capName: "core-blocks",
|
|
26446
|
+
capScope: "system",
|
|
26447
|
+
addonId: null,
|
|
26448
|
+
access: "view"
|
|
26449
|
+
},
|
|
26450
|
+
"coreBlocks.getTypeDefs": {
|
|
26451
|
+
capName: "core-blocks",
|
|
26452
|
+
capScope: "system",
|
|
26453
|
+
addonId: null,
|
|
26454
|
+
access: "view"
|
|
26455
|
+
},
|
|
26456
|
+
"coreBlocks.list": {
|
|
26457
|
+
capName: "core-blocks",
|
|
26458
|
+
capScope: "system",
|
|
26459
|
+
addonId: null,
|
|
26460
|
+
access: "view"
|
|
26461
|
+
},
|
|
26462
|
+
"coreBlocks.setEnabled": {
|
|
26463
|
+
capName: "core-blocks",
|
|
26464
|
+
capScope: "system",
|
|
26465
|
+
addonId: null,
|
|
26466
|
+
access: "create"
|
|
26467
|
+
},
|
|
26468
|
+
"coreBlocks.update": {
|
|
26469
|
+
capName: "core-blocks",
|
|
26470
|
+
capScope: "system",
|
|
26471
|
+
addonId: null,
|
|
26472
|
+
access: "create"
|
|
26473
|
+
},
|
|
26329
26474
|
"cover.close": {
|
|
26330
26475
|
capName: "cover",
|
|
26331
26476
|
capScope: "device",
|
|
@@ -2,7 +2,7 @@ Object.defineProperties(exports, {
|
|
|
2
2
|
__esModule: { value: true },
|
|
3
3
|
[Symbol.toStringTag]: { value: "Module" }
|
|
4
4
|
});
|
|
5
|
-
const require_dist = require("../dist-
|
|
5
|
+
const require_dist = require("../dist-DY_XHH2r.js");
|
|
6
6
|
let node_fs = require("node:fs");
|
|
7
7
|
let node_fs$1 = require_dist.__toESM(node_fs, 1);
|
|
8
8
|
node_fs = require_dist.__toESM(node_fs);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { E as embeddingEncoderCapability, O as hfModelUrl, R as BaseAddon } from "../dist-
|
|
1
|
+
import { E as embeddingEncoderCapability, O as hfModelUrl, R as BaseAddon } from "../dist-DvGwl3d2.mjs";
|
|
2
2
|
import { createRequire } from "node:module";
|
|
3
3
|
import * as fs from "node:fs";
|
|
4
4
|
import "node:fs";
|
|
@@ -18,7 +18,7 @@ var e = {
|
|
|
18
18
|
},
|
|
19
19
|
"@camstack/types": {
|
|
20
20
|
name: "@camstack/types",
|
|
21
|
-
version: "1.2.
|
|
21
|
+
version: "1.2.28",
|
|
22
22
|
scope: ["default"],
|
|
23
23
|
loaded: !1,
|
|
24
24
|
from: "addon_pipeline_analytics_widgets",
|
|
@@ -33,7 +33,7 @@ var e = {
|
|
|
33
33
|
},
|
|
34
34
|
"@camstack/ui-library": {
|
|
35
35
|
name: "@camstack/ui-library",
|
|
36
|
-
version: "1.2.
|
|
36
|
+
version: "1.2.20",
|
|
37
37
|
scope: ["default"],
|
|
38
38
|
loaded: !1,
|
|
39
39
|
from: "addon_pipeline_analytics_widgets",
|
|
@@ -36,7 +36,7 @@ async function r() {
|
|
|
36
36
|
}
|
|
37
37
|
},
|
|
38
38
|
"@camstack/types": {
|
|
39
|
-
version: "1.2.
|
|
39
|
+
version: "1.2.28",
|
|
40
40
|
scope: "default",
|
|
41
41
|
shareConfig: {
|
|
42
42
|
singleton: !0,
|
|
@@ -81,7 +81,7 @@ async function r() {
|
|
|
81
81
|
}
|
|
82
82
|
},
|
|
83
83
|
"@camstack/ui-library": {
|
|
84
|
-
version: "1.2.
|
|
84
|
+
version: "1.2.20",
|
|
85
85
|
scope: "default",
|
|
86
86
|
shareConfig: {
|
|
87
87
|
singleton: !0,
|
|
@@ -2,7 +2,7 @@ Object.defineProperties(exports, {
|
|
|
2
2
|
__esModule: { value: true },
|
|
3
3
|
[Symbol.toStringTag]: { value: "Module" }
|
|
4
4
|
});
|
|
5
|
-
const require_dist = require("../dist-
|
|
5
|
+
const require_dist = require("../dist-DY_XHH2r.js");
|
|
6
6
|
let node_fs = require("node:fs");
|
|
7
7
|
let node_path = require("node:path");
|
|
8
8
|
node_path = require_dist.__toESM(node_path);
|
|
@@ -632,9 +632,15 @@ var NC_ALARM_DEVICE_NAME = "Alarm";
|
|
|
632
632
|
* does not belong in here.
|
|
633
633
|
*/
|
|
634
634
|
async function ensureAlarmPanel(deps) {
|
|
635
|
-
const
|
|
635
|
+
const existingIntegration = await deps.getIntegration(deps.addonId);
|
|
636
|
+
if (existingIntegration !== null && !existingIntegration.fixed) {
|
|
637
|
+
await deps.markFixed(existingIntegration.id);
|
|
638
|
+
deps.logger.info("marked the notification-center integration as fixed", { meta: { integrationId: existingIntegration.id } });
|
|
639
|
+
}
|
|
640
|
+
const integration = existingIntegration ?? await deps.createIntegration({
|
|
636
641
|
addonId: deps.addonId,
|
|
637
|
-
name: deps.integrationName
|
|
642
|
+
name: deps.integrationName,
|
|
643
|
+
info: { fixed: true }
|
|
638
644
|
});
|
|
639
645
|
const existingDevice = await deps.findDeviceByStableId(NC_ALARM_STABLE_ID);
|
|
640
646
|
if (existingDevice !== null) return {
|
|
@@ -22346,7 +22352,20 @@ var PipelineAnalyticsAddon = class extends require_dist.BaseAddon {
|
|
|
22346
22352
|
logger: this.ctx.logger.child("alarm"),
|
|
22347
22353
|
addonId: PIPELINE_ANALYTICS_ADDON_ID,
|
|
22348
22354
|
integrationName: NC_INTEGRATION_NAME,
|
|
22349
|
-
getIntegration: async (addonId) =>
|
|
22355
|
+
getIntegration: async (addonId) => {
|
|
22356
|
+
const found = await api.integrations.getByAddonId.query({ addonId });
|
|
22357
|
+
return found === null ? null : {
|
|
22358
|
+
id: found.id,
|
|
22359
|
+
fixed: found.info?.["fixed"] === true
|
|
22360
|
+
};
|
|
22361
|
+
},
|
|
22362
|
+
markFixed: async (integrationId) => {
|
|
22363
|
+
await api.integrations.update.mutate({
|
|
22364
|
+
id: integrationId,
|
|
22365
|
+
info: { fixed: true },
|
|
22366
|
+
skipRestart: true
|
|
22367
|
+
});
|
|
22368
|
+
},
|
|
22350
22369
|
createIntegration: async (input) => api.integrations.create.mutate(input),
|
|
22351
22370
|
findDeviceByStableId: async (stableId) => {
|
|
22352
22371
|
const found = (await api.deviceManager.listAll.query({ addonId: PIPELINE_ANALYTICS_ADDON_ID })).find((d) => d.stableId === stableId);
|
|
@@ -22389,7 +22408,7 @@ var PipelineAnalyticsAddon = class extends require_dist.BaseAddon {
|
|
|
22389
22408
|
let storage = this.ctx.kernel.storage;
|
|
22390
22409
|
const mediaRoot = process.env.CAMSTACK_MEDIA_ROOT?.trim();
|
|
22391
22410
|
if (mediaRoot) {
|
|
22392
|
-
const { FilesystemStorageProvider } = await Promise.resolve().then(() => require("../node-
|
|
22411
|
+
const { FilesystemStorageProvider } = await Promise.resolve().then(() => require("../node-DSR4j3NF.js"));
|
|
22393
22412
|
storage = new FilesystemStorageProvider(mediaRoot, { eventMedia: mediaRoot });
|
|
22394
22413
|
logger.info("pipeline-analytics: event media rooted at CAMSTACK_MEDIA_ROOT", { meta: { mediaRoot } });
|
|
22395
22414
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { $ as EventCategory, A as notificationRulesCapability, B as createEvent, C as cosineSimilarity, D as faceGalleryCapability, F as videoclipsCapability, G as array, H as isDeviceScopedCap, I as zoneAnalyticsCapability, J as number, K as boolean, L as errMsg, M as plateGalleryCapability, N as readDeviceStateFrom, P as subKindsOf, Q as unknown, R as BaseAddon, S as buildEventKindDescriptor, T as defineCustomActions, U as nodePin, V as hydrateSchema, W as _enum, X as record, Y as object, Z as string, _ as TimelapseRuleInputSchema, a as MACRO_LABELS, b as alarmPanelCapability, c as NcConditionDescriptorSchema, d as NcRuleSchema, f as NcSnoozeInputSchema, g as OpsLogEntrySchema, h as NcTaxonomySchema, i as EVENT_PAD_MS, j as pipelineAnalyticsCapability, k as kebabToCamel, l as NcRuleInputSchema, m as NcSnoozeSuppressedSchema, n as DEFAULT_EVENT_COLOR, o as NC_CONDITION_CATALOG, p as NcSnoozeSchema, q as literal, r as EVENT_KIND_BY_CAP, s as NC_TAXONOMY, t as BaseDevice, u as NcRulePatchSchema, v as TimelapseRuleSchema, w as customAction, x as audioMetricsCapability, y as addonWidgetsSourceCapability, z as DeviceType } from "../dist-
|
|
1
|
+
import { $ as EventCategory, A as notificationRulesCapability, B as createEvent, C as cosineSimilarity, D as faceGalleryCapability, F as videoclipsCapability, G as array, H as isDeviceScopedCap, I as zoneAnalyticsCapability, J as number, K as boolean, L as errMsg, M as plateGalleryCapability, N as readDeviceStateFrom, P as subKindsOf, Q as unknown, R as BaseAddon, S as buildEventKindDescriptor, T as defineCustomActions, U as nodePin, V as hydrateSchema, W as _enum, X as record, Y as object, Z as string, _ as TimelapseRuleInputSchema, a as MACRO_LABELS, b as alarmPanelCapability, c as NcConditionDescriptorSchema, d as NcRuleSchema, f as NcSnoozeInputSchema, g as OpsLogEntrySchema, h as NcTaxonomySchema, i as EVENT_PAD_MS, j as pipelineAnalyticsCapability, k as kebabToCamel, l as NcRuleInputSchema, m as NcSnoozeSuppressedSchema, n as DEFAULT_EVENT_COLOR, o as NC_CONDITION_CATALOG, p as NcSnoozeSchema, q as literal, r as EVENT_KIND_BY_CAP, s as NC_TAXONOMY, t as BaseDevice, u as NcRulePatchSchema, v as TimelapseRuleSchema, w as customAction, x as audioMetricsCapability, y as addonWidgetsSourceCapability, z as DeviceType } from "../dist-DvGwl3d2.mjs";
|
|
2
2
|
import { promises } from "node:fs";
|
|
3
3
|
import path from "node:path";
|
|
4
4
|
import { createHmac, randomUUID, timingSafeEqual } from "node:crypto";
|
|
@@ -626,9 +626,15 @@ var NC_ALARM_DEVICE_NAME = "Alarm";
|
|
|
626
626
|
* does not belong in here.
|
|
627
627
|
*/
|
|
628
628
|
async function ensureAlarmPanel(deps) {
|
|
629
|
-
const
|
|
629
|
+
const existingIntegration = await deps.getIntegration(deps.addonId);
|
|
630
|
+
if (existingIntegration !== null && !existingIntegration.fixed) {
|
|
631
|
+
await deps.markFixed(existingIntegration.id);
|
|
632
|
+
deps.logger.info("marked the notification-center integration as fixed", { meta: { integrationId: existingIntegration.id } });
|
|
633
|
+
}
|
|
634
|
+
const integration = existingIntegration ?? await deps.createIntegration({
|
|
630
635
|
addonId: deps.addonId,
|
|
631
|
-
name: deps.integrationName
|
|
636
|
+
name: deps.integrationName,
|
|
637
|
+
info: { fixed: true }
|
|
632
638
|
});
|
|
633
639
|
const existingDevice = await deps.findDeviceByStableId(NC_ALARM_STABLE_ID);
|
|
634
640
|
if (existingDevice !== null) return {
|
|
@@ -22340,7 +22346,20 @@ var PipelineAnalyticsAddon = class extends BaseAddon {
|
|
|
22340
22346
|
logger: this.ctx.logger.child("alarm"),
|
|
22341
22347
|
addonId: PIPELINE_ANALYTICS_ADDON_ID,
|
|
22342
22348
|
integrationName: NC_INTEGRATION_NAME,
|
|
22343
|
-
getIntegration: async (addonId) =>
|
|
22349
|
+
getIntegration: async (addonId) => {
|
|
22350
|
+
const found = await api.integrations.getByAddonId.query({ addonId });
|
|
22351
|
+
return found === null ? null : {
|
|
22352
|
+
id: found.id,
|
|
22353
|
+
fixed: found.info?.["fixed"] === true
|
|
22354
|
+
};
|
|
22355
|
+
},
|
|
22356
|
+
markFixed: async (integrationId) => {
|
|
22357
|
+
await api.integrations.update.mutate({
|
|
22358
|
+
id: integrationId,
|
|
22359
|
+
info: { fixed: true },
|
|
22360
|
+
skipRestart: true
|
|
22361
|
+
});
|
|
22362
|
+
},
|
|
22344
22363
|
createIntegration: async (input) => api.integrations.create.mutate(input),
|
|
22345
22364
|
findDeviceByStableId: async (stableId) => {
|
|
22346
22365
|
const found = (await api.deviceManager.listAll.query({ addonId: PIPELINE_ANALYTICS_ADDON_ID })).find((d) => d.stableId === stableId);
|
|
@@ -30,7 +30,7 @@ async function d(e) {
|
|
|
30
30
|
}
|
|
31
31
|
}
|
|
32
32
|
async function f() {
|
|
33
|
-
return l ||= d(() => import("./_virtual_mf-localSharedImportMap___mfe_internal__addon_pipeline_analytics_widgets-
|
|
33
|
+
return l ||= d(() => import("./_virtual_mf-localSharedImportMap___mfe_internal__addon_pipeline_analytics_widgets-BNpbrkKP.mjs")).catch((e) => {
|
|
34
34
|
throw l = void 0, e;
|
|
35
35
|
}), l;
|
|
36
36
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@camstack/addon-post-analysis",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.29",
|
|
4
4
|
"description": "Post-Analysis bundle — enrichment, embedding-encoder, pipeline-analytics. Multi-entry npm package shipping addons that consume pipeline output.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"camstack",
|