@mark1russell7/alerts 0.1.4 → 0.1.6
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/build/index.d.ts +60 -6
- package/build/index.d.ts.map +1 -1
- package/build/index.js +255 -178
- package/build/index.js.map +1 -1
- package/package.json +1 -1
package/build/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { canonicalHash, canonicalJson } from "@mark1russell7/rigor-generators";
|
|
2
2
|
import { NUMBER_RING, minimumHittingSet, pathSetReliability, stronglyConnectedComponents, twoTerminalReliability } from "@mark1russell7/collections/graph";
|
|
3
3
|
import { compareCodeUnits } from "@mark1russell7/text/order";
|
|
4
|
-
import { EARTH_MEAN_RADIUS_KM, GeoError, distanceKm, distanceToGeometryKm, simplifyRegions } from "@mark1russell7/geo";
|
|
5
4
|
import { interval } from "@mark1russell7/interval";
|
|
5
|
+
import { EARTH_MEAN_RADIUS_KM, GeoError, distanceKm, distanceToGeometryKm, simplifyRegions } from "@mark1russell7/geo";
|
|
6
6
|
import { firstInstantOf, inWindow, localTime, nextBoundary, windowProblems } from "@mark1russell7/algebra/clock";
|
|
7
7
|
import { countOf } from "@mark1russell7/text/english";
|
|
8
8
|
import { err, ok, tryCatch } from "@mark1russell7/optional";
|
|
@@ -1451,6 +1451,158 @@ function weakOf(parts, importance) {
|
|
|
1451
1451
|
...next === void 0 ? {} : { next }
|
|
1452
1452
|
};
|
|
1453
1453
|
}
|
|
1454
|
+
// src/score.ts
|
|
1455
|
+
/**
|
|
1456
|
+
* The shadow score of an incident: the probability of the event and the harm of one event, from public
|
|
1457
|
+
* measures. The score operates next to the table. It decides a level only for a person with a score rule
|
|
1458
|
+
* (`PersonWatch.score`, AL-31). Else the table decides each send, and the gate test of `score.test.ts` holds this.
|
|
1459
|
+
*/
|
|
1460
|
+
/** The format of a file of priors. */
|
|
1461
|
+
const PRIORS_FORMAT = "alerts-priors/2";
|
|
1462
|
+
function longestPrefix(priors, kind, pick) {
|
|
1463
|
+
let found;
|
|
1464
|
+
for (const [key, prior] of Object.entries(priors.kinds)) {
|
|
1465
|
+
const value = pick(prior);
|
|
1466
|
+
if (value === void 0 || !hasKind([key], kind)) continue;
|
|
1467
|
+
if (found === void 0 || key.length > found.key.length) found = {
|
|
1468
|
+
value,
|
|
1469
|
+
key
|
|
1470
|
+
};
|
|
1471
|
+
}
|
|
1472
|
+
return found;
|
|
1473
|
+
}
|
|
1474
|
+
function kindFactor(priors, kind, field) {
|
|
1475
|
+
const found = longestPrefix(priors, kind, (prior) => prior[field]);
|
|
1476
|
+
return found === void 0 ? void 0 : {
|
|
1477
|
+
estimate: found.value,
|
|
1478
|
+
from: {
|
|
1479
|
+
table: "kinds",
|
|
1480
|
+
key: found.key
|
|
1481
|
+
}
|
|
1482
|
+
};
|
|
1483
|
+
}
|
|
1484
|
+
function underOf(priors, kind, significance) {
|
|
1485
|
+
const found = longestPrefix(priors, kind, (prior) => prior.under?.[significance]);
|
|
1486
|
+
return found === void 0 ? void 0 : {
|
|
1487
|
+
prior: found.value,
|
|
1488
|
+
key: found.key
|
|
1489
|
+
};
|
|
1490
|
+
}
|
|
1491
|
+
function certaintyFactor(priors, certainty) {
|
|
1492
|
+
const estimate = priors.certainty[certainty];
|
|
1493
|
+
return estimate === void 0 ? void 0 : {
|
|
1494
|
+
estimate,
|
|
1495
|
+
from: {
|
|
1496
|
+
table: "certainty",
|
|
1497
|
+
key: certainty
|
|
1498
|
+
}
|
|
1499
|
+
};
|
|
1500
|
+
}
|
|
1501
|
+
/**
|
|
1502
|
+
* This function gives the product of a probability and a count. `mul` of `@mark1russell7/interval` rounds the interval
|
|
1503
|
+
* outward. The two factors are 0 or more, thus the exact product is 0 or more. A low bound below 0 becomes 0, and the
|
|
1504
|
+
* interval still holds each product. An underflow to 0 gives such a bound.
|
|
1505
|
+
*/
|
|
1506
|
+
function expectedOf(probability, count) {
|
|
1507
|
+
const bounds = interval.mul([probability.low, probability.high], [count.low, count.high]);
|
|
1508
|
+
if (bounds === null) throw new Error("The product of two intervals that are not empty is not empty.");
|
|
1509
|
+
return {
|
|
1510
|
+
value: probability.value * count.value,
|
|
1511
|
+
low: Math.max(0, bounds[0]),
|
|
1512
|
+
high: bounds[1]
|
|
1513
|
+
};
|
|
1514
|
+
}
|
|
1515
|
+
/**
|
|
1516
|
+
* This function calculates the shadow score of an incident from the priors.
|
|
1517
|
+
*
|
|
1518
|
+
* - An observed event has the basis `event`. The harm under an alert counts each alert, also the alerts with no event.
|
|
1519
|
+
* Thus it is too low for an event that occurs.
|
|
1520
|
+
* - Else an incident with a significance has the basis `alert` when the priors give the harm under its alerts. The
|
|
1521
|
+
* longest prefix of the kind with a measure of that significance decides.
|
|
1522
|
+
* - Else the basis is `event`. The probability of a warning is the verified share of the warnings of its kind. The
|
|
1523
|
+
* measure of the warnings is data, so it decides over the certainty word of the sender.
|
|
1524
|
+
* - Else the probability is that of the certainty of the incident.
|
|
1525
|
+
* - The deaths and the injuries of one event come from the longest prefix of the kind with each field.
|
|
1526
|
+
* - The expected harm is the probability times the deaths and times the injuries (`expectedOf`).
|
|
1527
|
+
*
|
|
1528
|
+
* A factor that the priors do not give makes a score with no read. The score names each missing factor.
|
|
1529
|
+
*/
|
|
1530
|
+
function shadowScore(incident, priors) {
|
|
1531
|
+
const code = incident.kind.code;
|
|
1532
|
+
const significance = incident.kind.significance;
|
|
1533
|
+
const under = incident.certainty === "observed" || significance === void 0 ? void 0 : underOf(priors, code, significance);
|
|
1534
|
+
if (under !== void 0 && significance !== void 0) {
|
|
1535
|
+
const from = {
|
|
1536
|
+
table: "under",
|
|
1537
|
+
key: under.key,
|
|
1538
|
+
significance,
|
|
1539
|
+
area: under.prior.area
|
|
1540
|
+
};
|
|
1541
|
+
const { deaths, injuries } = under.prior;
|
|
1542
|
+
return {
|
|
1543
|
+
read: true,
|
|
1544
|
+
basis: "alert",
|
|
1545
|
+
deaths: {
|
|
1546
|
+
estimate: deaths,
|
|
1547
|
+
from
|
|
1548
|
+
},
|
|
1549
|
+
injuries: {
|
|
1550
|
+
estimate: injuries,
|
|
1551
|
+
from
|
|
1552
|
+
},
|
|
1553
|
+
expected: {
|
|
1554
|
+
deaths,
|
|
1555
|
+
injuries
|
|
1556
|
+
}
|
|
1557
|
+
};
|
|
1558
|
+
}
|
|
1559
|
+
const probability = (incident.certainty !== "observed" && incident.kind.significance === "warning" ? kindFactor(priors, code, "verified") : void 0) ?? certaintyFactor(priors, incident.certainty);
|
|
1560
|
+
const deaths = kindFactor(priors, code, "deaths");
|
|
1561
|
+
const injuries = kindFactor(priors, code, "injuries");
|
|
1562
|
+
if (probability !== void 0 && deaths !== void 0 && injuries !== void 0) return {
|
|
1563
|
+
read: true,
|
|
1564
|
+
basis: "event",
|
|
1565
|
+
probability,
|
|
1566
|
+
deaths,
|
|
1567
|
+
injuries,
|
|
1568
|
+
expected: {
|
|
1569
|
+
deaths: expectedOf(probability.estimate, deaths.estimate),
|
|
1570
|
+
injuries: expectedOf(probability.estimate, injuries.estimate)
|
|
1571
|
+
}
|
|
1572
|
+
};
|
|
1573
|
+
const missing = [];
|
|
1574
|
+
if (probability === void 0) missing.push("probability");
|
|
1575
|
+
if (deaths === void 0) missing.push("deaths");
|
|
1576
|
+
if (injuries === void 0) missing.push("injuries");
|
|
1577
|
+
return {
|
|
1578
|
+
read: false,
|
|
1579
|
+
missing
|
|
1580
|
+
};
|
|
1581
|
+
}
|
|
1582
|
+
function harmAbove(a, b) {
|
|
1583
|
+
return a.deaths.low > b.deaths.high && a.injuries.low > b.injuries.high;
|
|
1584
|
+
}
|
|
1585
|
+
/**
|
|
1586
|
+
* This function gives each difference between the table and the shadow score. In a difference, the table gives
|
|
1587
|
+
* `above` the higher level, and the score of `below` is higher on each measure with no overlap. Thus the function
|
|
1588
|
+
* needs no weight between a death and an injury.
|
|
1589
|
+
*
|
|
1590
|
+
* - An incident with the level `none` or with a score with no read is in no difference.
|
|
1591
|
+
* - The differences are in the code-point order of `above`, then of `below`. Thus the order of the input does not change them.
|
|
1592
|
+
*/
|
|
1593
|
+
function shadowDifferences(incidents) {
|
|
1594
|
+
const scored = incidents.flatMap((incident) => incident.level === "none" || incident.shadow?.read !== true ? [] : [{
|
|
1595
|
+
anchor: incident.anchor,
|
|
1596
|
+
rank: LEVELS.indexOf(incident.level),
|
|
1597
|
+
expected: incident.shadow.expected
|
|
1598
|
+
}]);
|
|
1599
|
+
const differences = [];
|
|
1600
|
+
for (const high of scored) for (const low of scored) if (high.rank > low.rank && harmAbove(low.expected, high.expected)) differences.push({
|
|
1601
|
+
above: high.anchor,
|
|
1602
|
+
below: low.anchor
|
|
1603
|
+
});
|
|
1604
|
+
return differences.sort((a, b) => compareCodeUnits(a.above, b.above) || compareCodeUnits(a.below, b.below));
|
|
1605
|
+
}
|
|
1454
1606
|
// src/shapes.ts
|
|
1455
1607
|
/**
|
|
1456
1608
|
* The tests of the shapes of an area against a position: the polygons and the circles of the core. The
|
|
@@ -1983,6 +2135,46 @@ function tableLevel(policy, incident, at, foreign = false) {
|
|
|
1983
2135
|
};
|
|
1984
2136
|
}
|
|
1985
2137
|
/**
|
|
2138
|
+
* This function gives the result of the score rule of a person for an incident or a line (AL-31). The result is
|
|
2139
|
+
* `undefined` when the rule does not examine the kind. Three conditions cause this:
|
|
2140
|
+
*
|
|
2141
|
+
* - The person has no rule.
|
|
2142
|
+
* - The table is the quiet table of other copies (AL-76).
|
|
2143
|
+
* - A prefix of `except` holds the kind.
|
|
2144
|
+
*
|
|
2145
|
+
* Else `raised` is true when two conditions are true. The expected deaths of the score (`shadowScore`) reach the risk of
|
|
2146
|
+
* the rule. The table gives a level below `life-safety`. A score with no read does not raise. With no priors in the
|
|
2147
|
+
* policy, the result has no score, and `raised` is false.
|
|
2148
|
+
*/
|
|
2149
|
+
function scoreRuleResult(policy, rule, incident, table) {
|
|
2150
|
+
if (rule === void 0 || table.foreign === true || hasKind(rule.except ?? [], incident.kind.code)) return void 0;
|
|
2151
|
+
if (policy.priors === void 0) return {
|
|
2152
|
+
kind: "score",
|
|
2153
|
+
risk: rule.risk,
|
|
2154
|
+
raised: false
|
|
2155
|
+
};
|
|
2156
|
+
const score = shadowScore(incident, policy.priors);
|
|
2157
|
+
const raised = score.read && score.expected.deaths.value >= rule.risk && rank(table.level) < rank("life-safety");
|
|
2158
|
+
return {
|
|
2159
|
+
kind: "score",
|
|
2160
|
+
risk: rule.risk,
|
|
2161
|
+
raised,
|
|
2162
|
+
score
|
|
2163
|
+
};
|
|
2164
|
+
}
|
|
2165
|
+
/**
|
|
2166
|
+
* This function gives the policy of the assessment with the priors of the score rules (AL-31). The priors go in only
|
|
2167
|
+
* when a person has a score rule and the policy has no priors. Else the function gives the policy as it is. Thus with no
|
|
2168
|
+
* score rule, each assessment stays the same.
|
|
2169
|
+
*/
|
|
2170
|
+
function policyWithPriors(policy, people, priors) {
|
|
2171
|
+
if (priors === void 0 || policy?.priors !== void 0 || !people.some((person) => person.score !== void 0)) return policy;
|
|
2172
|
+
return {
|
|
2173
|
+
...policy ?? DEFAULT_ASSESS_POLICY,
|
|
2174
|
+
priors
|
|
2175
|
+
};
|
|
2176
|
+
}
|
|
2177
|
+
/**
|
|
1986
2178
|
* This function gives the test of an incident of the sources of other copies (AL-76). The test is true when each report
|
|
1987
2179
|
* of the incident comes from a source that is not in `sources`. Such an incident came from another copy only. A report
|
|
1988
2180
|
* with no known source counts as a report of this copy. A report of `SYSTEM_SOURCE` also counts as a report of this
|
|
@@ -2134,6 +2326,10 @@ function reachedAssessment(assessment) {
|
|
|
2134
2326
|
*
|
|
2135
2327
|
* The value `foreign` tells that this copy runs no source of the incident (`foreignIncidents`). A kind with no class
|
|
2136
2328
|
* then gets `FOREIGN_TABLE`, not the table `otherwise` (AL-76).
|
|
2329
|
+
*
|
|
2330
|
+
* A person with a score rule (`PersonWatch.score`, AL-31) gets `life-safety` when the expected deaths of the score reach
|
|
2331
|
+
* the risk of the rule (`scoreRuleResult`). The rule raises the table level of the incident and of each line, before the
|
|
2332
|
+
* rules of the person. The reason `score` follows the reason `table`.
|
|
2137
2333
|
*/
|
|
2138
2334
|
function assess(incident, person, places, policy = DEFAULT_ASSESS_POLICY, at, foreign = false) {
|
|
2139
2335
|
if (!inAudience(incident, person.person)) return {
|
|
@@ -2177,6 +2373,12 @@ function assess(incident, person, places, policy = DEFAULT_ASSESS_POLICY, at, fo
|
|
|
2177
2373
|
return result("none");
|
|
2178
2374
|
}
|
|
2179
2375
|
const table = tableLevel(policy, incident, at, foreign);
|
|
2376
|
+
const scored = scoreRuleResult(policy, person.score, incident, table);
|
|
2377
|
+
const incidentLevel = scored?.raised === true ? "life-safety" : table.level;
|
|
2378
|
+
const lineLevel = (line) => {
|
|
2379
|
+
const found = tableLevel(policy, line, at, foreign);
|
|
2380
|
+
return scoreRuleResult(policy, person.score, line, found)?.raised === true ? "life-safety" : found.level;
|
|
2381
|
+
};
|
|
2180
2382
|
const tables = /* @__PURE__ */ new Map();
|
|
2181
2383
|
const placeTable = (id) => {
|
|
2182
2384
|
const known = tables.get(id);
|
|
@@ -2184,10 +2386,10 @@ function assess(incident, person, places, policy = DEFAULT_ASSESS_POLICY, at, fo
|
|
|
2184
2386
|
const place = byId.get(id);
|
|
2185
2387
|
const holding = place === void 0 ? [] : linesAt(incident, place);
|
|
2186
2388
|
const found = holding.length === 0 ? {
|
|
2187
|
-
level:
|
|
2389
|
+
level: incidentLevel,
|
|
2188
2390
|
reports: []
|
|
2189
2391
|
} : {
|
|
2190
|
-
level: holding.map(
|
|
2392
|
+
level: holding.map(lineLevel).reduce(higherLevel),
|
|
2191
2393
|
reports: holding.map((line) => line.report)
|
|
2192
2394
|
};
|
|
2193
2395
|
tables.set(id, found);
|
|
@@ -2212,7 +2414,8 @@ function assess(incident, person, places, policy = DEFAULT_ASSESS_POLICY, at, fo
|
|
|
2212
2414
|
kind: "table",
|
|
2213
2415
|
...table
|
|
2214
2416
|
});
|
|
2215
|
-
|
|
2417
|
+
if (scored !== void 0) reasons.push(scored);
|
|
2418
|
+
const entryLevel = lowerLevel(incidentLevel, relevancePolicy.entryMax ?? "urgent");
|
|
2216
2419
|
if (plan !== void 0) {
|
|
2217
2420
|
const { reach, why } = plan.relevance;
|
|
2218
2421
|
reasons.push({
|
|
@@ -2243,7 +2446,7 @@ function assess(incident, person, places, policy = DEFAULT_ASSESS_POLICY, at, fo
|
|
|
2243
2446
|
};
|
|
2244
2447
|
if (isPrivate(incident)) {
|
|
2245
2448
|
reasons.push({ kind: "addressed" });
|
|
2246
|
-
return result(atMatch(void 0,
|
|
2449
|
+
return result(atMatch(void 0, incidentLevel, "entity"));
|
|
2247
2450
|
}
|
|
2248
2451
|
for (const match of matches) {
|
|
2249
2452
|
reasons.push({
|
|
@@ -2252,7 +2455,7 @@ function assess(incident, person, places, policy = DEFAULT_ASSESS_POLICY, at, fo
|
|
|
2252
2455
|
});
|
|
2253
2456
|
if (plan !== void 0 && !plan.places.has(match.place)) continue;
|
|
2254
2457
|
const found = placeTable(match.place);
|
|
2255
|
-
if (found.reports.length > 0 && found.level !==
|
|
2458
|
+
if (found.reports.length > 0 && found.level !== incidentLevel) reasons.push({
|
|
2256
2459
|
kind: "place-table",
|
|
2257
2460
|
place: match.place,
|
|
2258
2461
|
reports: found.reports,
|
|
@@ -2266,13 +2469,33 @@ function assess(incident, person, places, policy = DEFAULT_ASSESS_POLICY, at, fo
|
|
|
2266
2469
|
kind: "subject",
|
|
2267
2470
|
subject
|
|
2268
2471
|
});
|
|
2269
|
-
level = higherLevel(level, atMatch(void 0,
|
|
2472
|
+
level = higherLevel(level, atMatch(void 0, incidentLevel, kindOfNode(subjectNode({
|
|
2270
2473
|
system: subject.system,
|
|
2271
2474
|
id: subject.id ?? "*"
|
|
2272
2475
|
})) ?? "entity"));
|
|
2273
2476
|
}
|
|
2274
2477
|
return result(level);
|
|
2275
2478
|
}
|
|
2479
|
+
/**
|
|
2480
|
+
* This function gives the assessment of `assess`, with the shadow score as its last reason. The score
|
|
2481
|
+
* does not change the level or the other reasons. An assessment with no reason of the table gets no
|
|
2482
|
+
* score. Examples are an ended incident, a status that the policy does not send and an incident with no match.
|
|
2483
|
+
*
|
|
2484
|
+
* The reason of the score rule of a person holds the score when the policy has priors (AL-31). Such an assessment
|
|
2485
|
+
* gets no second score.
|
|
2486
|
+
*/
|
|
2487
|
+
function assessWithShadow(incident, person, places, priors, policy = DEFAULT_ASSESS_POLICY, at) {
|
|
2488
|
+
const assessment = assess(incident, person, places, policy, at);
|
|
2489
|
+
if (!assessment.reasons.some((reason) => reason.kind === "table")) return assessment;
|
|
2490
|
+
if (assessment.reasons.some((reason) => reason.kind === "score" && reason.score !== void 0)) return assessment;
|
|
2491
|
+
return {
|
|
2492
|
+
...assessment,
|
|
2493
|
+
reasons: [...assessment.reasons, {
|
|
2494
|
+
kind: "shadow",
|
|
2495
|
+
score: shadowScore(incident, priors)
|
|
2496
|
+
}]
|
|
2497
|
+
};
|
|
2498
|
+
}
|
|
2276
2499
|
const SUBJECT_KINDS = [
|
|
2277
2500
|
"place",
|
|
2278
2501
|
"topic",
|
|
@@ -2406,174 +2629,6 @@ function sameRelation(first, second, relation) {
|
|
|
2406
2629
|
function rank(level) {
|
|
2407
2630
|
return ASSESSED_LEVELS.indexOf(level);
|
|
2408
2631
|
}
|
|
2409
|
-
// src/score.ts
|
|
2410
|
-
/**
|
|
2411
|
-
* The shadow score of an incident: the probability of the event and the harm of one event, from public
|
|
2412
|
-
* measures. The score operates next to the table, and it does not decide a level at this time. The table
|
|
2413
|
-
* decides each send, and the gate test of `score.test.ts` holds this.
|
|
2414
|
-
*/
|
|
2415
|
-
/** The format of a file of priors. */
|
|
2416
|
-
const PRIORS_FORMAT = "alerts-priors/2";
|
|
2417
|
-
function longestPrefix(priors, kind, pick) {
|
|
2418
|
-
let found;
|
|
2419
|
-
for (const [key, prior] of Object.entries(priors.kinds)) {
|
|
2420
|
-
const value = pick(prior);
|
|
2421
|
-
if (value === void 0 || !hasKind([key], kind)) continue;
|
|
2422
|
-
if (found === void 0 || key.length > found.key.length) found = {
|
|
2423
|
-
value,
|
|
2424
|
-
key
|
|
2425
|
-
};
|
|
2426
|
-
}
|
|
2427
|
-
return found;
|
|
2428
|
-
}
|
|
2429
|
-
function kindFactor(priors, kind, field) {
|
|
2430
|
-
const found = longestPrefix(priors, kind, (prior) => prior[field]);
|
|
2431
|
-
return found === void 0 ? void 0 : {
|
|
2432
|
-
estimate: found.value,
|
|
2433
|
-
from: {
|
|
2434
|
-
table: "kinds",
|
|
2435
|
-
key: found.key
|
|
2436
|
-
}
|
|
2437
|
-
};
|
|
2438
|
-
}
|
|
2439
|
-
function underOf(priors, kind, significance) {
|
|
2440
|
-
const found = longestPrefix(priors, kind, (prior) => prior.under?.[significance]);
|
|
2441
|
-
return found === void 0 ? void 0 : {
|
|
2442
|
-
prior: found.value,
|
|
2443
|
-
key: found.key
|
|
2444
|
-
};
|
|
2445
|
-
}
|
|
2446
|
-
function certaintyFactor(priors, certainty) {
|
|
2447
|
-
const estimate = priors.certainty[certainty];
|
|
2448
|
-
return estimate === void 0 ? void 0 : {
|
|
2449
|
-
estimate,
|
|
2450
|
-
from: {
|
|
2451
|
-
table: "certainty",
|
|
2452
|
-
key: certainty
|
|
2453
|
-
}
|
|
2454
|
-
};
|
|
2455
|
-
}
|
|
2456
|
-
/**
|
|
2457
|
-
* This function gives the product of a probability and a count. `mul` of `@mark1russell7/interval` rounds the interval
|
|
2458
|
-
* outward. The two factors are 0 or more, thus the exact product is 0 or more. A low bound below 0 becomes 0, and the
|
|
2459
|
-
* interval still holds each product. An underflow to 0 gives such a bound.
|
|
2460
|
-
*/
|
|
2461
|
-
function expectedOf(probability, count) {
|
|
2462
|
-
const bounds = interval.mul([probability.low, probability.high], [count.low, count.high]);
|
|
2463
|
-
if (bounds === null) throw new Error("The product of two intervals that are not empty is not empty.");
|
|
2464
|
-
return {
|
|
2465
|
-
value: probability.value * count.value,
|
|
2466
|
-
low: Math.max(0, bounds[0]),
|
|
2467
|
-
high: bounds[1]
|
|
2468
|
-
};
|
|
2469
|
-
}
|
|
2470
|
-
/**
|
|
2471
|
-
* This function calculates the shadow score of an incident from the priors.
|
|
2472
|
-
*
|
|
2473
|
-
* - An observed event has the basis `event`. The harm under an alert counts each alert, also the alerts with no event.
|
|
2474
|
-
* Thus it is too low for an event that occurs.
|
|
2475
|
-
* - Else an incident with a significance has the basis `alert` when the priors give the harm under its alerts. The
|
|
2476
|
-
* longest prefix of the kind with a measure of that significance decides.
|
|
2477
|
-
* - Else the basis is `event`. The probability of a warning is the verified share of the warnings of its kind. The
|
|
2478
|
-
* measure of the warnings is data, so it decides over the certainty word of the sender.
|
|
2479
|
-
* - Else the probability is that of the certainty of the incident.
|
|
2480
|
-
* - The deaths and the injuries of one event come from the longest prefix of the kind with each field.
|
|
2481
|
-
* - The expected harm is the probability times the deaths and times the injuries (`expectedOf`).
|
|
2482
|
-
*
|
|
2483
|
-
* A factor that the priors do not give makes a score with no read. The score names each missing factor.
|
|
2484
|
-
*/
|
|
2485
|
-
function shadowScore(incident, priors) {
|
|
2486
|
-
const code = incident.kind.code;
|
|
2487
|
-
const significance = incident.kind.significance;
|
|
2488
|
-
const under = incident.certainty === "observed" || significance === void 0 ? void 0 : underOf(priors, code, significance);
|
|
2489
|
-
if (under !== void 0 && significance !== void 0) {
|
|
2490
|
-
const from = {
|
|
2491
|
-
table: "under",
|
|
2492
|
-
key: under.key,
|
|
2493
|
-
significance,
|
|
2494
|
-
area: under.prior.area
|
|
2495
|
-
};
|
|
2496
|
-
const { deaths, injuries } = under.prior;
|
|
2497
|
-
return {
|
|
2498
|
-
read: true,
|
|
2499
|
-
basis: "alert",
|
|
2500
|
-
deaths: {
|
|
2501
|
-
estimate: deaths,
|
|
2502
|
-
from
|
|
2503
|
-
},
|
|
2504
|
-
injuries: {
|
|
2505
|
-
estimate: injuries,
|
|
2506
|
-
from
|
|
2507
|
-
},
|
|
2508
|
-
expected: {
|
|
2509
|
-
deaths,
|
|
2510
|
-
injuries
|
|
2511
|
-
}
|
|
2512
|
-
};
|
|
2513
|
-
}
|
|
2514
|
-
const probability = (incident.certainty !== "observed" && incident.kind.significance === "warning" ? kindFactor(priors, code, "verified") : void 0) ?? certaintyFactor(priors, incident.certainty);
|
|
2515
|
-
const deaths = kindFactor(priors, code, "deaths");
|
|
2516
|
-
const injuries = kindFactor(priors, code, "injuries");
|
|
2517
|
-
if (probability !== void 0 && deaths !== void 0 && injuries !== void 0) return {
|
|
2518
|
-
read: true,
|
|
2519
|
-
basis: "event",
|
|
2520
|
-
probability,
|
|
2521
|
-
deaths,
|
|
2522
|
-
injuries,
|
|
2523
|
-
expected: {
|
|
2524
|
-
deaths: expectedOf(probability.estimate, deaths.estimate),
|
|
2525
|
-
injuries: expectedOf(probability.estimate, injuries.estimate)
|
|
2526
|
-
}
|
|
2527
|
-
};
|
|
2528
|
-
const missing = [];
|
|
2529
|
-
if (probability === void 0) missing.push("probability");
|
|
2530
|
-
if (deaths === void 0) missing.push("deaths");
|
|
2531
|
-
if (injuries === void 0) missing.push("injuries");
|
|
2532
|
-
return {
|
|
2533
|
-
read: false,
|
|
2534
|
-
missing
|
|
2535
|
-
};
|
|
2536
|
-
}
|
|
2537
|
-
/**
|
|
2538
|
-
* This function gives the assessment of `assess`, with the shadow score as its last reason. The score
|
|
2539
|
-
* does not change the level or the other reasons. An assessment with no reason of the table gets no
|
|
2540
|
-
* score. Examples are an ended incident, a status that the policy does not send and an incident with no match.
|
|
2541
|
-
*/
|
|
2542
|
-
function assessWithShadow(incident, person, places, priors, policy = DEFAULT_ASSESS_POLICY, at) {
|
|
2543
|
-
const assessment = assess(incident, person, places, policy, at);
|
|
2544
|
-
if (!assessment.reasons.some((reason) => reason.kind === "table")) return assessment;
|
|
2545
|
-
return {
|
|
2546
|
-
...assessment,
|
|
2547
|
-
reasons: [...assessment.reasons, {
|
|
2548
|
-
kind: "shadow",
|
|
2549
|
-
score: shadowScore(incident, priors)
|
|
2550
|
-
}]
|
|
2551
|
-
};
|
|
2552
|
-
}
|
|
2553
|
-
function harmAbove(a, b) {
|
|
2554
|
-
return a.deaths.low > b.deaths.high && a.injuries.low > b.injuries.high;
|
|
2555
|
-
}
|
|
2556
|
-
/**
|
|
2557
|
-
* This function gives each difference between the table and the shadow score. In a difference, the table gives
|
|
2558
|
-
* `above` the higher level, and the score of `below` is higher on each measure with no overlap. Thus the function
|
|
2559
|
-
* needs no weight between a death and an injury.
|
|
2560
|
-
*
|
|
2561
|
-
* - An incident with the level `none` or with a score with no read is in no difference.
|
|
2562
|
-
* - The differences are in the code-point order of `above`, then of `below`. Thus the order of the input does not change them.
|
|
2563
|
-
*/
|
|
2564
|
-
function shadowDifferences(incidents) {
|
|
2565
|
-
const scored = incidents.flatMap((incident) => incident.level === "none" || incident.shadow?.read !== true ? [] : [{
|
|
2566
|
-
anchor: incident.anchor,
|
|
2567
|
-
rank: LEVELS.indexOf(incident.level),
|
|
2568
|
-
expected: incident.shadow.expected
|
|
2569
|
-
}]);
|
|
2570
|
-
const differences = [];
|
|
2571
|
-
for (const high of scored) for (const low of scored) if (high.rank > low.rank && harmAbove(low.expected, high.expected)) differences.push({
|
|
2572
|
-
above: high.anchor,
|
|
2573
|
-
below: low.anchor
|
|
2574
|
-
});
|
|
2575
|
-
return differences.sort((a, b) => compareCodeUnits(a.above, b.above) || compareCodeUnits(a.below, b.below));
|
|
2576
|
-
}
|
|
2577
2632
|
// src/escalation.ts
|
|
2578
2633
|
/** The events of the escalation machine. */
|
|
2579
2634
|
const ESCALATION_EVENTS = {
|
|
@@ -3538,6 +3593,7 @@ const TAXONOMY = {
|
|
|
3538
3593
|
"security.law-enforcement": entry("Law enforcement warning", "Police warn an area of a danger, for example an armed person, a manhunt or a bomb threat."),
|
|
3539
3594
|
"security.maritime-threat": entry("Attack or threat to shipping", "Piracy, armed robbery, missile or drone attacks and boarding of ships in a sea area."),
|
|
3540
3595
|
"security.missing-person": entry("Missing and endangered person", "Police ask the public to look for a missing person who is in danger, for example an older person with dementia."),
|
|
3596
|
+
"security.nuclear-war": entry("Nuclear war", "An armed conflict in which states use nuclear weapons, or an official warning of a nuclear attack."),
|
|
3541
3597
|
"security.terrorism": entry("Terrorism threat or attack", "A government warning of a terrorist threat, or a terrorist attack that has happened."),
|
|
3542
3598
|
"security.travel-advisory": entry("Government travel advisory", "A government changes its advice on travel to a country or region for safety, health or security reasons."),
|
|
3543
3599
|
"rescue.disaster-assistance": entry("Disaster recovery center or aid open", "Aid becomes available after a disaster: recovery centers, assistance programs, food and water points."),
|
|
@@ -3555,6 +3611,7 @@ const TAXONOMY = {
|
|
|
3555
3611
|
"health.medical-emergency": entry("Medical emergency", "A person needs emergency medical care now, for example after a fall, an injury, a stroke or a heart attack at home."),
|
|
3556
3612
|
"health.outbreak": entry("Disease outbreak", "An unusual cluster or spread of an infectious disease, reported by a public health agency."),
|
|
3557
3613
|
"health.outbreak.foodborne": entry("Foodborne illness outbreak", "Illnesses linked to a food product, under investigation, often before or with a recall."),
|
|
3614
|
+
"health.outbreak.pandemic": entry("Pandemic", "An infectious disease spreads between people in many countries, and a public health agency declares a pandemic or a global emergency."),
|
|
3558
3615
|
"health.travel-notice": entry("Travel health notice", "A health notice for travellers to a country, from usual precautions to avoid all travel."),
|
|
3559
3616
|
"health.wastewater-signal": entry("Wastewater pathogen signal", "A rise in a virus or bacterium measured in sewage, an early sign of community spread."),
|
|
3560
3617
|
"env.air-quality": entry("Air quality", "Ozone, particles or other pollutants at an unhealthy AQI level, observed or forecast."),
|
|
@@ -3608,6 +3665,7 @@ const TAXONOMY = {
|
|
|
3608
3665
|
"infra.postal": entry("Postal service", "The mail and parcel services."),
|
|
3609
3666
|
"infra.postal.disruption": entry("Postal service disruption", "Mail and parcel delays or suspensions from weather, facility closures or strikes."),
|
|
3610
3667
|
"infra.power": entry("Electric power", "The supply of electric power from the grid to its customers."),
|
|
3668
|
+
"infra.power.grid-collapse": entry("Collapse of the power grid", "A wide failure of a power grid cuts the power of a large region, with a slow restart of the grid."),
|
|
3611
3669
|
"infra.power.grid-emergency": entry("Grid emergency or conservation appeal", "A grid operator warns that supply is short, asks people to save power, or orders rotating outages."),
|
|
3612
3670
|
"infra.power.load-shedding": entry("Scheduled load shedding", "Rotating power cuts by a published schedule and stage when a national grid lacks supply."),
|
|
3613
3671
|
"infra.power.outage": entry("Power outage", "Loss of electric power to customers in an area, with counts of customers out and restoration estimates."),
|
|
@@ -3618,6 +3676,7 @@ const TAXONOMY = {
|
|
|
3618
3676
|
"infra.structure.collapse": entry("Building or bridge collapse", "A building, bridge, tunnel or other structure fails, often with casualties and closures around it."),
|
|
3619
3677
|
"infra.supply-chain": entry("Supply chains", "The ports, routes and suppliers that move goods."),
|
|
3620
3678
|
"infra.supply-chain.disruption": entry("Supply chain or shipping chokepoint disruption", "A block at a port, canal or strait, or a supplier failure, that delays goods and raises prices."),
|
|
3679
|
+
"infra.supply-chain.food": entry("Food supply disruption", "A failure in the production, transport or sale of food leaves the stores of a wide area short of food."),
|
|
3621
3680
|
"infra.telecom": entry("Telephone and network", "The phone, mobile and emergency call networks."),
|
|
3622
3681
|
"infra.telecom.911-outage": entry("911 outage", "Emergency calls to 911 do not connect in an area, with an alternate number to call."),
|
|
3623
3682
|
"infra.telecom.outage": entry("Phone or mobile network outage", "Loss of mobile, landline or cable service in an area, from storms, cuts or carrier faults."),
|
|
@@ -3625,8 +3684,10 @@ const TAXONOMY = {
|
|
|
3625
3684
|
"infra.water": entry("Water service", "The supply of tap water to an area."),
|
|
3626
3685
|
"infra.water.outage": entry("Water service outage", "Loss of water pressure or supply to an area after a main break, pump failure or plant fault."),
|
|
3627
3686
|
"cbrne.biological": entry("Biological agent incident", "A deliberate or accidental release of a dangerous pathogen or toxin."),
|
|
3687
|
+
"cbrne.emp": entry("Electromagnetic pulse", "A pulse from a nuclear burst high in the atmosphere, or from a weapon, damages electronics and power lines over an area."),
|
|
3628
3688
|
"cbrne.explosion": entry("Industrial explosion", "An explosion at a plant, depot or storage site, with fire, blast damage and smoke."),
|
|
3629
3689
|
"cbrne.hazardous-materials": entry("Hazardous materials", "A release of toxic gas or liquid from a plant, a vehicle or an attack that endangers people nearby."),
|
|
3690
|
+
"cbrne.nuclear-detonation": entry("Nuclear detonation", "A nuclear weapon or device explodes, with blast, heat, radiation and fallout downwind."),
|
|
3630
3691
|
"cbrne.nuclear-plant": entry("Nuclear power plant", "An event at a nuclear plant reported to the regulator, from a minor fault up to an emergency classification."),
|
|
3631
3692
|
"cbrne.radiological": entry("Radiological hazard", "Raised radiation levels or loss of a radioactive source, with protective actions."),
|
|
3632
3693
|
"cyber.advisory": entry("Security advisory", "A government or vendor advisory about a flaw or a threat."),
|
|
@@ -3634,6 +3695,7 @@ const TAXONOMY = {
|
|
|
3634
3695
|
"cyber.campaign": entry("Active threat campaign advisory", "A joint government advisory on an active attacker group, its methods and the steps defenders take now."),
|
|
3635
3696
|
"cyber.data-breach": entry("Data breach", "Personal data stolen from an organization, which can expose the accounts and identity of the people in it."),
|
|
3636
3697
|
"cyber.ddos": entry("Large denial-of-service attack", "A flood of traffic that takes a service, a network or a country offline for a period."),
|
|
3698
|
+
"cyber.infrastructure-attack": entry("Cyber attack on critical infrastructure", "An attack on the computer systems of a utility, a hospital or another critical service stops or damages that service."),
|
|
3637
3699
|
"cyber.ransomware": entry("Ransomware", "Ransomware attacks and the groups that do them."),
|
|
3638
3700
|
"cyber.ransomware.victim": entry("Ransomware attack on an organization", "A ransomware group claims an organization as a victim, which can stop services that people depend on."),
|
|
3639
3701
|
"cyber.software": entry("Software lifecycle", "The facts of the lifecycle of a software product that change its risk."),
|
|
@@ -3684,8 +3746,10 @@ const TAXONOMY = {
|
|
|
3684
3746
|
"market.release": entry("Scheduled economic releases", "A scheduled economic release or central bank decision is due or is out."),
|
|
3685
3747
|
"market.release.fomc": entry("FOMC decision or minutes", "The Federal Open Market Committee publishes a rate decision, statement or minutes."),
|
|
3686
3748
|
"market.release.macro": entry("Macro data release", "A government agency publishes a scheduled economic number, for example CPI, jobs or GDP."),
|
|
3749
|
+
"civic.ai-collapse": entry("Wide disruption from artificial intelligence", "A failure or a misuse of artificial intelligence systems disrupts jobs, services or public order over a wide area."),
|
|
3687
3750
|
"civic.court-ruling": entry("Court ruling or docket change", "A court rules or a docket changes in a case that matters to the person."),
|
|
3688
3751
|
"civic.economy": entry("Government economic actions", "A government takes an economic action, for example sanctions or a fiscal step, that touches a person."),
|
|
3752
|
+
"civic.economy.collapse": entry("Economic collapse", "The economy of a country falls into a deep crisis, for example a run on the banks, very high inflation or a depression."),
|
|
3689
3753
|
"civic.economy.enforcement": entry("Financial enforcement action", "A financial regulator takes an enforcement action against a firm."),
|
|
3690
3754
|
"civic.economy.fiscal": entry("Federal fiscal stress", "Federal cash or debt data shows a debt-limit squeeze or another fiscal stress."),
|
|
3691
3755
|
"civic.election": entry("Election date or voting change", "Election dates, registration deadlines, polling place changes and results that affect a voter."),
|
|
@@ -10389,7 +10453,13 @@ const assessPolicySchema = schemaOf()(z.strictObject({
|
|
|
10389
10453
|
statuses: z.array(statusSchema).readonly(),
|
|
10390
10454
|
classes: z.array(kindClassSchema).readonly(),
|
|
10391
10455
|
otherwise: levelTableSchema,
|
|
10392
|
-
relevance: z.lazy(() => relevancePolicySchema).exactOptional()
|
|
10456
|
+
relevance: z.lazy(() => relevancePolicySchema).exactOptional(),
|
|
10457
|
+
priors: z.lazy(() => scorePriorsSchema).exactOptional()
|
|
10458
|
+
}).readonly());
|
|
10459
|
+
/** This schema checks the score rule of a person (AL-31). The risk is a number above 0, and each prefix is a code of the taxonomy. */
|
|
10460
|
+
const scoreRuleSchema = schemaOf()(z.strictObject({
|
|
10461
|
+
risk: z.number().positive(),
|
|
10462
|
+
except: z.array(kindCodeSchema).readonly().exactOptional()
|
|
10393
10463
|
}).readonly());
|
|
10394
10464
|
/** This schema checks the kind of a subject. */
|
|
10395
10465
|
const subjectKindSchema = schemaOf()(z.enum([
|
|
@@ -10452,7 +10522,8 @@ const personWatchSchema = schemaOf()(z.strictObject({
|
|
|
10452
10522
|
rules: z.array(levelRuleSchema).readonly(),
|
|
10453
10523
|
quiet: quietWindowSchema.exactOptional(),
|
|
10454
10524
|
interests: z.lazy(() => interestGraphSchema).exactOptional(),
|
|
10455
|
-
mandatory: z.array(mandatoryRuleSchema).refine((rules) => new Set(rules.map((rule) => rule.place)).size === rules.length, "A place has one rule of the life-safety warnings at most.").readonly().exactOptional()
|
|
10525
|
+
mandatory: z.array(mandatoryRuleSchema).refine((rules) => new Set(rules.map((rule) => rule.place)).size === rules.length, "A place has one rule of the life-safety warnings at most.").readonly().exactOptional(),
|
|
10526
|
+
score: scoreRuleSchema.exactOptional()
|
|
10456
10527
|
}).readonly());
|
|
10457
10528
|
function estimateIn(min, max) {
|
|
10458
10529
|
const part = z.number().min(min).max(max);
|
|
@@ -10709,6 +10780,12 @@ const assessReasonSchema = schemaOf()(z.discriminatedUnion("kind", [
|
|
|
10709
10780
|
kind: z.literal("shadow"),
|
|
10710
10781
|
score: shadowScoreSchema
|
|
10711
10782
|
}),
|
|
10783
|
+
z.strictObject({
|
|
10784
|
+
kind: z.literal("score"),
|
|
10785
|
+
risk: z.number().positive(),
|
|
10786
|
+
raised: z.boolean(),
|
|
10787
|
+
score: shadowScoreSchema.exactOptional()
|
|
10788
|
+
}),
|
|
10712
10789
|
z.strictObject({
|
|
10713
10790
|
kind: z.literal("reach"),
|
|
10714
10791
|
reach: probabilitySchema,
|
|
@@ -11323,6 +11400,6 @@ const NEED_CODE = /^[a-z][a-z0-9-]*(\.[a-z][a-z0-9-]*)+$/;
|
|
|
11323
11400
|
function isNeedCode(code) {
|
|
11324
11401
|
return NEED_CODE.test(code);
|
|
11325
11402
|
}
|
|
11326
|
-
export { ASSESSED_LEVELS, BALANCE_KIND, BALANCE_STAGES, CAP_MESSAGE_SYSTEM, CATEGORIES, CATEGORY_LABELS, CELL_RESOURCES, CHAIN_MACHINE, CHANNEL_KIND, CHANNEL_SUBJECT, CLOCK_KIND, CLOCK_STEP_ABOVE, CLOCK_STEP_WINDOW, CLOCK_SUBJECT, CONFIG_FORMAT, CONFIG_HASH_SCHEME, CONFIG_PART_FORMAT, CONTEXT_KINDS, COPY_FORMAT, COPY_ID, COPY_KIND, COPY_STAGES, COPY_STEADY_LIMIT, COPY_SUBJECT, COUNTED_CALLS, COUNTED_FAILURES, COVERAGE_KIND, DEFAULT_ASSESS_POLICY, DEFAULT_BASELINE, DEFAULT_CHANNEL_DOWN, DEFAULT_COVERAGE_POLICY, DEFAULT_ENTRY_MAX, DEFAULT_FAIL_AFTER, DEFAULT_LINK_POLICY, DEFAULT_RELEVANCE_POLICY, DEFAULT_SEND_LIMITS, DEFAULT_SOURCE_CLEAR, DEFAULT_STALE_INTERVALS, DEFAULT_TELL_DAILY_CAP, DEFAULT_THROTTLE, DIMENSIONS, DIMENSION_IDS, DOWN_STATES, DRILL_KIND, DRILL_PROBES, DRILL_SUBJECT, DRILL_WATCH_GRACE, EARTHQUAKE_KINDS, EARTHQUAKE_PAST_WITHIN, EMPTY_STATE, ESCALATION_EVENTS, ESCALATION_KIND, ESCALATION_MACHINE, FLOAT_REACH, FOREIGN_TABLE, HEALTH_EVENTS, HEALTH_FORMAT, HEALTH_KIND, HEALTH_MACHINE, HELD_SHOWN, HISTORY_FORMAT, ID_SCHEME, INCIDENT_SUBJECT, INDICATOR_AREA_KINDS, INTERESTS_FORMAT, KIND_ALIASES, LEVELS, LIFELINES, LIFELINES_SOURCE, LIFELINES_TOOLKIT, LIFELINE_LABELS, LIFE_SAFETY_KINDS, LIMITED_LEVELS, LIMIT_ACCOUNT_KINDS, LIMIT_KIND, LIMIT_SUBJECT, LOG_KIND, LOG_RECOVERY_WINDOW, LOG_SUBJECT, LOOP_BLOCK_CLASSES, LOOP_BLOCK_LIMIT, LOOP_BLOCK_WINDOW, LOOP_KIND, MAGNITUDE_PARAMETER, MAP_FORMAT, MAP_VIEW, MAX_PLACE_CODES, MEASURE_ID, MOVES, NEEDS, NEED_ALERT_LEVELS, NEED_LEVELS, NO_HISTORIES, NO_LABELS, NO_SYSTEM_LINES, OBSERVE_DIGEST_PER_DAY, OBSERVE_WINDOW, ONLY_COPY, OPT_IN_WAYS, OPT_IN_WORDS, ORIGIN_RANK, OWN_BASELINES, OWN_ENTRY_TIMES, PART_NAME, PATH_SYSTEMS, PERSON_SUBJECT, PRIORS_FORMAT, Problems, QUIET_HORIZON, QUOTA_KIND, QUOTA_STAGES, RANK_DELAY_LIMIT, RETENTION_HORIZON, RULED_STATUSES, SEND_LIMIT_MAX_WINDOW, SEND_LIMIT_MIN_WINDOW, SERIES_VERSION, SEVERITY_ORDER, SHARED_HANDOVER, SOURCE_SUBJECT, STORE_FILL_WINDOW, STORE_KIND, STORE_SUBJECT, SUBJECT_SYSTEMS, SYSTEM_SOURCE, TAXONOMY, TELL_CLASSES, TELL_KIND, THREAT_STAGES, THROTTLE_KEYS, THROTTLE_MAX_WINDOW, THROTTLE_MIN_WINDOW, THROTTLE_STREAMS, TOMBSTONE_LIFE, TRY_ENDS, UNKNOWN_KIND, UNKNOWN_WEIGHT, USE_KIND, USE_STAGES, US_GALLON_L, WHY_FULL_COVERAGE, WHY_LIMITS, WORK_DEFAULTS, WORK_DEFAULTS_DATE, acknowledgedLevel, acknowledgmentOf, acknowledgmentSchema, add, addHistory, addSystemReports, addressFieldSchema, addressProblems, addressSchema, addressValueSchema, admits, advanceHealth, alertAreaSchema, alertConfigSchema, areaMeetsPlace, areaSchema, areasWithoutBlocks, asksForAck, assess, assessPolicySchema, assessReasonSchema, assessWithShadow, assessedLevelSchema, assessmentSchema, assessmentWhy, audienceKey, audienceOf, balanceFloors, balanceFloorsBelow, balanceHealthSchema, balanceReadSchema, balanceStageSchema, balanceStages, balanceUnreadAt, basemapToleranceKm, blockClass, blockSizeText, breadthOf, canReach, canaryResultSchema, canonicalKind, capMessageKey, carriages, categoryOf, categorySchema, cellResourceSchema, certaintySchema, chainNext, chainRun, channelDescriptorSchema, channelDownConfigSchema, channelDownPolicy, channelDownRules, channelFailureKindSchema, channelHealthSchema, channelIdSchema, channelQuotaSchema, channelRunSchema, channelRuns, checkWith, classOf, compareMapIncidents, compareRegionCodes, composeInterests, configHash, configPartSchema, configuredExpectations, contactChannels, contactConfigSchema, contextSource, copyHealthSchema, copyIdSchema, copyListenSchema, copyMeasure, copyPeerSchema, copyProblems, copyReadSchema, copySettingsSchema, copyStageSchema, copyStages, copyUnreadAt, copyUnsteadyAt, correlationKeySchema, coverage, coverageSchema, coverageShort, cursorSchema, dailyInstant, dailyTimeProblems, decide, decideStep, defaultEdgeId, delayLimit, deliveryLayer, deliverySchema, deliveryStateSchema, deliveryStatusSchema, digestDeliveries, digestEntryKey, digestKey, digestMessageOf, digestTimeOf, dimensionIdSchema, distinctShapes, downChannels, drillConfigSchema, drillDue, drillInCopy, drillPathSchema, drillProblems, drillRules, drillVerdict, drillWatchAt, drillWindowSchema, durationSchema, durationText, edgeKindSchema, edgeOriginSchema, endMarkSchema, endedReports, escalate, escalationEndSchema, escalationPolicySchema, escalationProblems, escalationStepSchema, estimateSchema, exhaustions, expectationConfigSchema, expectationProblems, expectedHarmSchema, expectedOf, failureDomains, fetchFailureSchema, fetchOutcomeSchema, fetchRecordSchema, fitsWhy, foreignIncidents, gapGrade, graphLabels, hasKind, health, healthPayload, healthPayloadSchema, healthStateSchema, heldPersons, heldText, higherLevel, historyChangeAt, historyChangeSchema, historyIncidentSchema, historyPayload, historyPayloadSchema, historyPlaceSchema, historyRegionSchema, historyTimes, historyView, holdKey, inAudience, inQuietWindow, incidentLineSchema, incidentSchema, incidentTitle, incidents, indicatorAreaKindSchema, indicatorAreaSchema, indicatorBreadth, instantSchema, interestDefaultsConfigSchema, interestEdgeSchema, interestGraphSchema, interestRowSchema, interestsPayload, interestsPayloadSchema, interestsPersonSchema, isContactUrl, isDimensionId, isLifeline, isLimitedLevel, isNeedCode, isPrivate, isShape, isSignal, join, joinRuns, kindClassSchema, kindCodeSchema, kindLabel, kindOfNode, kindPriorSchema, kindSchema, knownKind, lastRun, lateSources, lateness, latenessLimitSchema, latenessSchema, latenessStateSchema, latenessStep, latestIn, levelRuleSchema, levelSchema, levelTableSchema, limitConfigSchema, limitRoutes, limitRule, limitShare, linesAt, linkFamilySchema, linkPolicySchema, linkRule, loadConfig, localPlaces, locateOutcomeSchema, lowerLevel, mapPayload, mapProblemSchema, mapResultSchema, mapShapeSchema, mapView, matchPlaces, matchSubjects, measureDeclarationSchema, measureOf, mergeParts, messageKey, messageOf, messageSchema, missLimit, missRecord, missedDrillAt, mostInWindow, moveSchema, muteEffectSchema, muteOf, muteSchema, nextDrillAt, nodeCovers, nodeKeySchema, nodesOverlap, normalize, observationId, observationIdSchema, observationSchema, observeConditions, observeCut, observeFetch, observeVerdict, operationSchema, optInConfigSchema, optInFields, optInProblems, optInTime, optedIn, outageAudit, outageConfigSchema, outagePersonConfigSchema, ownBaselineSchema, parentKind, parseConfig, parseCopySettings, partLabel, personConfigSchema, personIdSchema, personInterests, personWatchSchema, placeCodesWithContaining, placeConfigSchema, placeIdSchema, placeLabels, placeNode, placeOfNode, placeWhy, placesLayer, plainLabel, planDigests, policyFor, policyName, positionSchema, probabilitySchema, providerBalanceSchema, pruneTombstones, quietWindowProblems, quietWindowSchema, quotaHealthSchema, quotaStageSchema, quotaStages, rankDelayOf, rankDelayProblems, rankDelaysSchema, rankFloorProblems, rankFloors, reachOf, reachedAssessment, readHealthSchema, readSeries, readingProblems, readingSchema, receiptSchema, recentBlocks, recentRecovery, recentStep, recipientProblems, regionCodeKey, regionCodeSchema, regionContains, regionCovers, regionDistanceKm, regionRank, regionsNear, relevance, relevancePathSchema, relevancePolicySchema, relevanceSchema, reportId, reportIdSchema, reportPasses, reportSchema, reportsShared, requiredFor, resolveOptIn, responseTypeSchema, retire, retirements, route, ruleSteps, runOpens, schemaOf, scoreFactorSchema, scorePriorsSchema, secretRefSchema, sendCapUsd, sendLimitConfigSchema, sendLimitProblems, sendLimitsOf, sendOutcomeSchema, sentFails, sentLevel, seriesKey, servicesLayer, severitySchema, shadowDifferences, shadowScore, shadowScoreSchema, shapeDistanceKm, sharedHandoverAt, shiftDelivery, shiftEndMark, shiftEscalationEnd, shiftEscalationStart, shiftHealth, shiftMerge, shiftReport, significanceSchema, simplifyBasemap, sourceClearAt, sourceClearConfigSchema, sourceClearPolicy, sourceClearTime, sourceCovers, sourceDescriptorSchema, sourceHealthSchema, sourceHealthView, sourceHealthViewSchema, sourceIdSchema, sourcePlaces, spendConfigSchema, staleTime, startHealth, statusSchema, stepSizeText, storeEmptyAt, subjectEntrySchema, subjectKindSchema, subjectNode, subjectSchema, subjectWatchSchema, systemReports, tableLevel, tellConfigSchema, tellSiteSchema, threats, throttleConfigSchema, throttleOf, throttleProblems, throttleRoutes, throttleStreamOf, topicEntry, transportSchema, tryChainSchema, underPriorSchema, unknownKinds, urgencySchema, useLevelsReached, useStages, useUnreadAt, watchSchema, watchedDrillMiss, watchedDrillReportAt, watchedPlaceSchema, whyLimitSchema, whyLine, whyRecordSchema, workLayer };
|
|
11403
|
+
export { ASSESSED_LEVELS, BALANCE_KIND, BALANCE_STAGES, CAP_MESSAGE_SYSTEM, CATEGORIES, CATEGORY_LABELS, CELL_RESOURCES, CHAIN_MACHINE, CHANNEL_KIND, CHANNEL_SUBJECT, CLOCK_KIND, CLOCK_STEP_ABOVE, CLOCK_STEP_WINDOW, CLOCK_SUBJECT, CONFIG_FORMAT, CONFIG_HASH_SCHEME, CONFIG_PART_FORMAT, CONTEXT_KINDS, COPY_FORMAT, COPY_ID, COPY_KIND, COPY_STAGES, COPY_STEADY_LIMIT, COPY_SUBJECT, COUNTED_CALLS, COUNTED_FAILURES, COVERAGE_KIND, DEFAULT_ASSESS_POLICY, DEFAULT_BASELINE, DEFAULT_CHANNEL_DOWN, DEFAULT_COVERAGE_POLICY, DEFAULT_ENTRY_MAX, DEFAULT_FAIL_AFTER, DEFAULT_LINK_POLICY, DEFAULT_RELEVANCE_POLICY, DEFAULT_SEND_LIMITS, DEFAULT_SOURCE_CLEAR, DEFAULT_STALE_INTERVALS, DEFAULT_TELL_DAILY_CAP, DEFAULT_THROTTLE, DIMENSIONS, DIMENSION_IDS, DOWN_STATES, DRILL_KIND, DRILL_PROBES, DRILL_SUBJECT, DRILL_WATCH_GRACE, EARTHQUAKE_KINDS, EARTHQUAKE_PAST_WITHIN, EMPTY_STATE, ESCALATION_EVENTS, ESCALATION_KIND, ESCALATION_MACHINE, FLOAT_REACH, FOREIGN_TABLE, HEALTH_EVENTS, HEALTH_FORMAT, HEALTH_KIND, HEALTH_MACHINE, HELD_SHOWN, HISTORY_FORMAT, ID_SCHEME, INCIDENT_SUBJECT, INDICATOR_AREA_KINDS, INTERESTS_FORMAT, KIND_ALIASES, LEVELS, LIFELINES, LIFELINES_SOURCE, LIFELINES_TOOLKIT, LIFELINE_LABELS, LIFE_SAFETY_KINDS, LIMITED_LEVELS, LIMIT_ACCOUNT_KINDS, LIMIT_KIND, LIMIT_SUBJECT, LOG_KIND, LOG_RECOVERY_WINDOW, LOG_SUBJECT, LOOP_BLOCK_CLASSES, LOOP_BLOCK_LIMIT, LOOP_BLOCK_WINDOW, LOOP_KIND, MAGNITUDE_PARAMETER, MAP_FORMAT, MAP_VIEW, MAX_PLACE_CODES, MEASURE_ID, MOVES, NEEDS, NEED_ALERT_LEVELS, NEED_LEVELS, NO_HISTORIES, NO_LABELS, NO_SYSTEM_LINES, OBSERVE_DIGEST_PER_DAY, OBSERVE_WINDOW, ONLY_COPY, OPT_IN_WAYS, OPT_IN_WORDS, ORIGIN_RANK, OWN_BASELINES, OWN_ENTRY_TIMES, PART_NAME, PATH_SYSTEMS, PERSON_SUBJECT, PRIORS_FORMAT, Problems, QUIET_HORIZON, QUOTA_KIND, QUOTA_STAGES, RANK_DELAY_LIMIT, RETENTION_HORIZON, RULED_STATUSES, SEND_LIMIT_MAX_WINDOW, SEND_LIMIT_MIN_WINDOW, SERIES_VERSION, SEVERITY_ORDER, SHARED_HANDOVER, SOURCE_SUBJECT, STORE_FILL_WINDOW, STORE_KIND, STORE_SUBJECT, SUBJECT_SYSTEMS, SYSTEM_SOURCE, TAXONOMY, TELL_CLASSES, TELL_KIND, THREAT_STAGES, THROTTLE_KEYS, THROTTLE_MAX_WINDOW, THROTTLE_MIN_WINDOW, THROTTLE_STREAMS, TOMBSTONE_LIFE, TRY_ENDS, UNKNOWN_KIND, UNKNOWN_WEIGHT, USE_KIND, USE_STAGES, US_GALLON_L, WHY_FULL_COVERAGE, WHY_LIMITS, WORK_DEFAULTS, WORK_DEFAULTS_DATE, acknowledgedLevel, acknowledgmentOf, acknowledgmentSchema, add, addHistory, addSystemReports, addressFieldSchema, addressProblems, addressSchema, addressValueSchema, admits, advanceHealth, alertAreaSchema, alertConfigSchema, areaMeetsPlace, areaSchema, areasWithoutBlocks, asksForAck, assess, assessPolicySchema, assessReasonSchema, assessWithShadow, assessedLevelSchema, assessmentSchema, assessmentWhy, audienceKey, audienceOf, balanceFloors, balanceFloorsBelow, balanceHealthSchema, balanceReadSchema, balanceStageSchema, balanceStages, balanceUnreadAt, basemapToleranceKm, blockClass, blockSizeText, breadthOf, canReach, canaryResultSchema, canonicalKind, capMessageKey, carriages, categoryOf, categorySchema, cellResourceSchema, certaintySchema, chainNext, chainRun, channelDescriptorSchema, channelDownConfigSchema, channelDownPolicy, channelDownRules, channelFailureKindSchema, channelHealthSchema, channelIdSchema, channelQuotaSchema, channelRunSchema, channelRuns, checkWith, classOf, compareMapIncidents, compareRegionCodes, composeInterests, configHash, configPartSchema, configuredExpectations, contactChannels, contactConfigSchema, contextSource, copyHealthSchema, copyIdSchema, copyListenSchema, copyMeasure, copyPeerSchema, copyProblems, copyReadSchema, copySettingsSchema, copyStageSchema, copyStages, copyUnreadAt, copyUnsteadyAt, correlationKeySchema, coverage, coverageSchema, coverageShort, cursorSchema, dailyInstant, dailyTimeProblems, decide, decideStep, defaultEdgeId, delayLimit, deliveryLayer, deliverySchema, deliveryStateSchema, deliveryStatusSchema, digestDeliveries, digestEntryKey, digestKey, digestMessageOf, digestTimeOf, dimensionIdSchema, distinctShapes, downChannels, drillConfigSchema, drillDue, drillInCopy, drillPathSchema, drillProblems, drillRules, drillVerdict, drillWatchAt, drillWindowSchema, durationSchema, durationText, edgeKindSchema, edgeOriginSchema, endMarkSchema, endedReports, escalate, escalationEndSchema, escalationPolicySchema, escalationProblems, escalationStepSchema, estimateSchema, exhaustions, expectationConfigSchema, expectationProblems, expectedHarmSchema, expectedOf, failureDomains, fetchFailureSchema, fetchOutcomeSchema, fetchRecordSchema, fitsWhy, foreignIncidents, gapGrade, graphLabels, hasKind, health, healthPayload, healthPayloadSchema, healthStateSchema, heldPersons, heldText, higherLevel, historyChangeAt, historyChangeSchema, historyIncidentSchema, historyPayload, historyPayloadSchema, historyPlaceSchema, historyRegionSchema, historyTimes, historyView, holdKey, inAudience, inQuietWindow, incidentLineSchema, incidentSchema, incidentTitle, incidents, indicatorAreaKindSchema, indicatorAreaSchema, indicatorBreadth, instantSchema, interestDefaultsConfigSchema, interestEdgeSchema, interestGraphSchema, interestRowSchema, interestsPayload, interestsPayloadSchema, interestsPersonSchema, isContactUrl, isDimensionId, isLifeline, isLimitedLevel, isNeedCode, isPrivate, isShape, isSignal, join, joinRuns, kindClassSchema, kindCodeSchema, kindLabel, kindOfNode, kindPriorSchema, kindSchema, knownKind, lastRun, lateSources, lateness, latenessLimitSchema, latenessSchema, latenessStateSchema, latenessStep, latestIn, levelRuleSchema, levelSchema, levelTableSchema, limitConfigSchema, limitRoutes, limitRule, limitShare, linesAt, linkFamilySchema, linkPolicySchema, linkRule, loadConfig, localPlaces, locateOutcomeSchema, lowerLevel, mapPayload, mapProblemSchema, mapResultSchema, mapShapeSchema, mapView, matchPlaces, matchSubjects, measureDeclarationSchema, measureOf, mergeParts, messageKey, messageOf, messageSchema, missLimit, missRecord, missedDrillAt, mostInWindow, moveSchema, muteEffectSchema, muteOf, muteSchema, nextDrillAt, nodeCovers, nodeKeySchema, nodesOverlap, normalize, observationId, observationIdSchema, observationSchema, observeConditions, observeCut, observeFetch, observeVerdict, operationSchema, optInConfigSchema, optInFields, optInProblems, optInTime, optedIn, outageAudit, outageConfigSchema, outagePersonConfigSchema, ownBaselineSchema, parentKind, parseConfig, parseCopySettings, partLabel, personConfigSchema, personIdSchema, personInterests, personWatchSchema, placeCodesWithContaining, placeConfigSchema, placeIdSchema, placeLabels, placeNode, placeOfNode, placeWhy, placesLayer, plainLabel, planDigests, policyFor, policyName, policyWithPriors, positionSchema, probabilitySchema, providerBalanceSchema, pruneTombstones, quietWindowProblems, quietWindowSchema, quotaHealthSchema, quotaStageSchema, quotaStages, rankDelayOf, rankDelayProblems, rankDelaysSchema, rankFloorProblems, rankFloors, reachOf, reachedAssessment, readHealthSchema, readSeries, readingProblems, readingSchema, receiptSchema, recentBlocks, recentRecovery, recentStep, recipientProblems, regionCodeKey, regionCodeSchema, regionContains, regionCovers, regionDistanceKm, regionRank, regionsNear, relevance, relevancePathSchema, relevancePolicySchema, relevanceSchema, reportId, reportIdSchema, reportPasses, reportSchema, reportsShared, requiredFor, resolveOptIn, responseTypeSchema, retire, retirements, route, ruleSteps, runOpens, schemaOf, scoreFactorSchema, scorePriorsSchema, scoreRuleResult, scoreRuleSchema, secretRefSchema, sendCapUsd, sendLimitConfigSchema, sendLimitProblems, sendLimitsOf, sendOutcomeSchema, sentFails, sentLevel, seriesKey, servicesLayer, severitySchema, shadowDifferences, shadowScore, shadowScoreSchema, shapeDistanceKm, sharedHandoverAt, shiftDelivery, shiftEndMark, shiftEscalationEnd, shiftEscalationStart, shiftHealth, shiftMerge, shiftReport, significanceSchema, simplifyBasemap, sourceClearAt, sourceClearConfigSchema, sourceClearPolicy, sourceClearTime, sourceCovers, sourceDescriptorSchema, sourceHealthSchema, sourceHealthView, sourceHealthViewSchema, sourceIdSchema, sourcePlaces, spendConfigSchema, staleTime, startHealth, statusSchema, stepSizeText, storeEmptyAt, subjectEntrySchema, subjectKindSchema, subjectNode, subjectSchema, subjectWatchSchema, systemReports, tableLevel, tellConfigSchema, tellSiteSchema, threats, throttleConfigSchema, throttleOf, throttleProblems, throttleRoutes, throttleStreamOf, topicEntry, transportSchema, tryChainSchema, underPriorSchema, unknownKinds, urgencySchema, useLevelsReached, useStages, useUnreadAt, watchSchema, watchedDrillMiss, watchedDrillReportAt, watchedPlaceSchema, whyLimitSchema, whyLine, whyRecordSchema, workLayer };
|
|
11327
11404
|
|
|
11328
11405
|
//# sourceMappingURL=index.js.map
|