@codyswann/lisa 2.217.5 → 2.217.7
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/sync/config-sync.d.ts +1 -3
- package/dist/sync/config-sync.d.ts.map +1 -1
- package/dist/sync/config-sync.js +16 -40
- package/dist/sync/config-sync.js.map +1 -1
- package/dist/sync/legacy-monitor-thresholds.d.ts +42 -0
- package/dist/sync/legacy-monitor-thresholds.d.ts.map +1 -0
- package/dist/sync/legacy-monitor-thresholds.js +93 -0
- package/dist/sync/legacy-monitor-thresholds.js.map +1 -0
- package/dist/sync/sync-population.d.ts +28 -0
- package/dist/sync/sync-population.d.ts.map +1 -0
- package/dist/sync/sync-population.js +46 -0
- package/dist/sync/sync-population.js.map +1 -0
- package/package.json +13 -7
- package/plugins/lisa/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa/.codex-plugin/skills/lisa-monitor/SKILL.md +5 -1
- package/plugins/lisa/skills/lisa-monitor/SKILL.md +5 -1
- package/plugins/lisa-agy/plugin.json +1 -1
- package/plugins/lisa-agy/skills/lisa-monitor/SKILL.md +5 -1
- package/plugins/lisa-cdk/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-cdk/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-cdk-agy/plugin.json +1 -1
- package/plugins/lisa-cdk-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-cdk-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-copilot/skills/lisa-monitor/SKILL.md +5 -1
- package/plugins/lisa-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-cursor/skills/lisa-monitor/SKILL.md +5 -1
- package/plugins/lisa-expo/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-expo/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-expo-agy/plugin.json +1 -1
- package/plugins/lisa-expo-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-expo-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-harper-fabric/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-harper-fabric/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-harper-fabric-agy/plugin.json +1 -1
- package/plugins/lisa-harper-fabric-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-harper-fabric-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-nestjs/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-nestjs/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-nestjs-agy/plugin.json +1 -1
- package/plugins/lisa-nestjs-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-nestjs-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-openclaw/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-openclaw/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-openclaw-agy/plugin.json +1 -1
- package/plugins/lisa-openclaw-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-openclaw-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-phaser/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-phaser/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-phaser-agy/plugin.json +1 -1
- package/plugins/lisa-phaser-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-phaser-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-rails/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-rails/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-rails-agy/plugin.json +1 -1
- package/plugins/lisa-rails-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-rails-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-typescript/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-typescript/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-typescript-agy/plugin.json +1 -1
- package/plugins/lisa-typescript-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-typescript-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-wiki/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-wiki/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-wiki-agy/plugin.json +1 -1
- package/plugins/lisa-wiki-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-wiki-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/src/base/skills/lisa-monitor/SKILL.md +5 -1
|
@@ -1,7 +1,5 @@
|
|
|
1
|
-
/** Key holding sync provenance metadata inside `.lisa.config.json`. */
|
|
2
|
-
export declare const SYNC_METADATA_KEY = "_lisaSync";
|
|
3
1
|
/** What sync did (or would do, in dry-run) for one setting. */
|
|
4
|
-
export type SyncActionKind = "absorbed-artifact" | "populated-default" | "filled-missing" | "default-evolved" | "artifact-synced"
|
|
2
|
+
export type SyncActionKind = "absorbed-artifact" | "populated-default" | "filled-missing" | "default-evolved" | "artifact-synced";
|
|
5
3
|
/** One reportable sync action. */
|
|
6
4
|
export interface SyncAction {
|
|
7
5
|
/** Config key the action applies to */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config-sync.d.ts","sourceRoot":"","sources":["../../src/sync/config-sync.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"config-sync.d.ts","sourceRoot":"","sources":["../../src/sync/config-sync.ts"],"names":[],"mappings":"AAqCA,+DAA+D;AAC/D,MAAM,MAAM,cAAc,GACtB,mBAAmB,GACnB,mBAAmB,GACnB,gBAAgB,GAChB,iBAAiB,GACjB,iBAAiB,CAAC;AAEtB,kCAAkC;AAClC,MAAM,WAAW,UAAU;IACzB,uCAAuC;IACvC,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB,oBAAoB;IACpB,QAAQ,CAAC,IAAI,EAAE,cAAc,CAAC;IAC9B,oEAAoE;IACpE,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;CACzB;AAED,8BAA8B;AAC9B,MAAM,WAAW,UAAU;IACzB,2EAA2E;IAC3E,QAAQ,CAAC,OAAO,EAAE,SAAS,UAAU,EAAE,CAAC;IACxC,6DAA6D;IAC7D,QAAQ,CAAC,eAAe,EAAE,SAAS;QAAE,GAAG,EAAE,MAAM,CAAC;QAAC,SAAS,EAAE,MAAM,CAAA;KAAE,EAAE,CAAC;IACxE,wDAAwD;IACxD,QAAQ,CAAC,MAAM,EAAE,OAAO,CAAC;CAC1B;AAED,yCAAyC;AACzC,MAAM,WAAW,WAAW;IAC1B,sCAAsC;IACtC,QAAQ,CAAC,MAAM,CAAC,EAAE,OAAO,CAAC;CAC3B;AAiQD;;;;;;;;;GASG;AACH,wBAAsB,aAAa,CACjC,OAAO,EAAE,MAAM,EACf,OAAO,GAAE,WAAgB,GACxB,OAAO,CAAC,UAAU,CAAC,CA0CrB"}
|
package/dist/sync/config-sync.js
CHANGED
|
@@ -20,8 +20,8 @@ import { deepMerge, readJsonOrNull, writeJson } from "../utils/index.js";
|
|
|
20
20
|
import { fillMissing, getAtPath, isJsonObject, jsonEquals, setAtPath, } from "./json-path.js";
|
|
21
21
|
import { REQUIRED_KEYS, SYNC_REGISTRY, } from "./registry.js";
|
|
22
22
|
import { aliasCompatibleDefault, hasLegacyAlias } from "./legacy-aliases.js";
|
|
23
|
-
|
|
24
|
-
|
|
23
|
+
import { applyLegacyMonitorThresholdMigration } from "./legacy-monitor-thresholds.js";
|
|
24
|
+
import { recordedPopulation, recordPopulation } from "./sync-population.js";
|
|
25
25
|
/**
|
|
26
26
|
* Check whether a registry relevance condition matches the merged config.
|
|
27
27
|
* @param merged - Merged (committed + local) config view
|
|
@@ -43,9 +43,8 @@ function conditionMatches(merged, condition) {
|
|
|
43
43
|
* @returns True when the entry should be synced
|
|
44
44
|
*/
|
|
45
45
|
function isRelevant(merged, relevantWhen) {
|
|
46
|
-
if (relevantWhen === undefined)
|
|
46
|
+
if (relevantWhen === undefined)
|
|
47
47
|
return true;
|
|
48
|
-
}
|
|
49
48
|
return relevantWhen.some(condition => conditionMatches(merged, condition));
|
|
50
49
|
}
|
|
51
50
|
/**
|
|
@@ -62,33 +61,6 @@ async function readArtifactValue(destDir, entry) {
|
|
|
62
61
|
}));
|
|
63
62
|
return reads.find(value => value !== undefined);
|
|
64
63
|
}
|
|
65
|
-
/**
|
|
66
|
-
* Read the recorded populated-default value for a key, if any. Provenance
|
|
67
|
-
* keys are stored literally (dots included) inside `_lisaSync.populated`.
|
|
68
|
-
* @param committed - Committed config object
|
|
69
|
-
* @param key - Config key
|
|
70
|
-
* @returns The value recorded at population time, or undefined
|
|
71
|
-
*/
|
|
72
|
-
function recordedPopulation(committed, key) {
|
|
73
|
-
const populated = getAtPath(committed, `${SYNC_METADATA_KEY}.populated`);
|
|
74
|
-
return isJsonObject(populated) ? populated[key] : undefined;
|
|
75
|
-
}
|
|
76
|
-
/**
|
|
77
|
-
* Record that a key was auto-populated with a default value, storing the key
|
|
78
|
-
* literally (dots included) so later runs can detect default evolution.
|
|
79
|
-
* @param committed - Committed config object
|
|
80
|
-
* @param key - Config key
|
|
81
|
-
* @param value - The default value written
|
|
82
|
-
* @returns Updated committed config
|
|
83
|
-
*/
|
|
84
|
-
function recordPopulation(committed, key, value) {
|
|
85
|
-
const populated = getAtPath(committed, `${SYNC_METADATA_KEY}.populated`);
|
|
86
|
-
const populatedObject = isJsonObject(populated) ? populated : {};
|
|
87
|
-
return setAtPath(committed, `${SYNC_METADATA_KEY}.populated`, {
|
|
88
|
-
...populatedObject,
|
|
89
|
-
[key]: value,
|
|
90
|
-
});
|
|
91
|
-
}
|
|
92
64
|
/**
|
|
93
65
|
* Build the next state with an updated committed config and appended action.
|
|
94
66
|
* @param state - Current sync state
|
|
@@ -133,20 +105,24 @@ function populateMissing(state, entry, artifactValue) {
|
|
|
133
105
|
* @returns Updated state
|
|
134
106
|
*/
|
|
135
107
|
function populateEntry(state, entry, merged, local, artifactValue) {
|
|
136
|
-
const
|
|
108
|
+
const stateAfterMigration = applyLegacyMonitorThresholdMigration(state, entry.key);
|
|
109
|
+
const mergedAfterMigration = stateAfterMigration === state
|
|
110
|
+
? merged
|
|
111
|
+
: deepMerge(stateAfterMigration.committed, local);
|
|
112
|
+
const configValue = getAtPath(mergedAfterMigration, entry.key);
|
|
137
113
|
if (configValue === undefined) {
|
|
138
|
-
return populateMissing(
|
|
114
|
+
return populateMissing(stateAfterMigration, entry, artifactValue);
|
|
139
115
|
}
|
|
140
|
-
const committedValue = getAtPath(
|
|
116
|
+
const committedValue = getAtPath(stateAfterMigration.committed, entry.key);
|
|
141
117
|
const localValue = getAtPath(local, entry.key);
|
|
142
|
-
const recorded = recordedPopulation(
|
|
118
|
+
const recorded = recordedPopulation(stateAfterMigration.committed, entry.key);
|
|
143
119
|
const evolutionValue = entry.legacyAliases === undefined ? configValue : committedValue;
|
|
144
120
|
if (recorded !== undefined &&
|
|
145
121
|
jsonEquals(evolutionValue, recorded) &&
|
|
146
122
|
!jsonEquals(evolutionValue, entry.defaultValue) &&
|
|
147
123
|
!hasLegacyAlias(localValue, entry.legacyAliases)) {
|
|
148
|
-
const committed = recordPopulation(setAtPath(
|
|
149
|
-
return withAction(
|
|
124
|
+
const committed = recordPopulation(setAtPath(stateAfterMigration.committed, entry.key, entry.defaultValue), entry.key, entry.defaultValue);
|
|
125
|
+
return withAction(stateAfterMigration, committed, {
|
|
150
126
|
key: entry.key,
|
|
151
127
|
kind: "default-evolved",
|
|
152
128
|
detail: "value still matched the old default; updated to the new one",
|
|
@@ -154,7 +130,7 @@ function populateEntry(state, entry, merged, local, artifactValue) {
|
|
|
154
130
|
}
|
|
155
131
|
const hasEffectiveAlias = hasLegacyAlias(configValue, entry.legacyAliases);
|
|
156
132
|
if (hasEffectiveAlias && committedValue === undefined) {
|
|
157
|
-
return
|
|
133
|
+
return stateAfterMigration;
|
|
158
134
|
}
|
|
159
135
|
// Compatibility fills are based only on committed state. Each present alias
|
|
160
136
|
// prunes its own mapped current default while unrelated defaults still fill.
|
|
@@ -164,13 +140,13 @@ function populateEntry(state, entry, merged, local, artifactValue) {
|
|
|
164
140
|
: entry.defaultValue;
|
|
165
141
|
const filled = fillMissing(fillSource, fallback);
|
|
166
142
|
if (!jsonEquals(filled, fillSource)) {
|
|
167
|
-
return withAction(
|
|
143
|
+
return withAction(stateAfterMigration, setAtPath(stateAfterMigration.committed, entry.key, filled), {
|
|
168
144
|
key: entry.key,
|
|
169
145
|
kind: "filled-missing",
|
|
170
146
|
detail: "missing sub-keys filled with defaults",
|
|
171
147
|
});
|
|
172
148
|
}
|
|
173
|
-
return
|
|
149
|
+
return stateAfterMigration;
|
|
174
150
|
}
|
|
175
151
|
/**
|
|
176
152
|
* Queue artifact writes for one entry (sync direction: config wins). Only
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config-sync.js","sourceRoot":"","sources":["../../src/sync/config-sync.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AACH,OAAO,KAAK,GAAG,MAAM,UAAU,CAAC;AAChC,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAClC,OAAO,EAAE,SAAS,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AACzE,OAAO,EACL,WAAW,EACX,SAAS,EACT,YAAY,EACZ,UAAU,EACV,SAAS,GAGV,MAAM,gBAAgB,CAAC;AACxB,OAAO,EACL,aAAa,EACb,aAAa,GAEd,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,sBAAsB,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"config-sync.js","sourceRoot":"","sources":["../../src/sync/config-sync.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AACH,OAAO,KAAK,GAAG,MAAM,UAAU,CAAC;AAChC,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;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MAAM,WAAW,GAAG,SAAS,CAAC,UAAU,CAAC,SAAS,EAAE,KAAK,CAAe,CAAC;IACzE,IAAI,OAAO,CAAC,MAAM,KAAK,IAAI,EAAE,CAAC;QAC5B,MAAM,YAAY,CAAC,OAAO,EAAE,SAAS,EAAE,UAAU,CAAC,CAAC;IACrD,CAAC;IACD,OAAO;QACL,OAAO,EAAE,UAAU,CAAC,OAAO;QAC3B,eAAe,EAAE,mBAAmB,CAAC,WAAW,CAAC;QACjD,MAAM,EAAE,OAAO,CAAC,MAAM,KAAK,IAAI;KAChC,CAAC;AACJ,CAAC;AAED;;;;;GAKG;AACH,KAAK,UAAU,YAAY,CACzB,OAAe,EACf,iBAA6B,EAC7B,KAAgB;IAEhB,IAAI,CAAC,UAAU,CAAC,iBAAiB,EAAE,KAAK,CAAC,SAAS,CAAC,EAAE,CAAC;QACpD,MAAM,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE,mBAAmB,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC,CAAC;IAC5E,CAAC;IACD,MAAM,OAAO,CAAC,GAAG,CACf,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,OAAO,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI,EAAE,OAAO,CAAC,EAAE,EAAE,CACjE,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE,IAAI,CAAC,EAAE,OAAO,CAAC,CAC7C,CACF,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Compatibility helpers for migrating deprecated monitor threshold keys.
|
|
3
|
+
* @module sync/legacy-monitor-thresholds
|
|
4
|
+
*/
|
|
5
|
+
import { type JsonObject } from "./json-path.js";
|
|
6
|
+
/** Result of applying legacy monitor-threshold migration to one config. */
|
|
7
|
+
export interface LegacyMonitorThresholdMigration {
|
|
8
|
+
/** Updated committed config object */
|
|
9
|
+
readonly committed: JsonObject;
|
|
10
|
+
/** Reportable migration actions */
|
|
11
|
+
readonly actions: readonly {
|
|
12
|
+
key: string;
|
|
13
|
+
detail: string;
|
|
14
|
+
}[];
|
|
15
|
+
}
|
|
16
|
+
/** Minimal sync-state shape needed to append migration actions. */
|
|
17
|
+
interface MigrationState {
|
|
18
|
+
/** Updated committed config object */
|
|
19
|
+
readonly committed: JsonObject;
|
|
20
|
+
/** Existing reportable sync actions */
|
|
21
|
+
readonly actions: readonly {
|
|
22
|
+
readonly key: string;
|
|
23
|
+
readonly kind: string;
|
|
24
|
+
readonly detail: string;
|
|
25
|
+
}[];
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Move legacy monitor thresholds to provider-neutral keys when provenance
|
|
29
|
+
* proves Lisa populated the legacy value.
|
|
30
|
+
* @param committed - Committed config object
|
|
31
|
+
* @returns Updated config and migration actions
|
|
32
|
+
*/
|
|
33
|
+
export declare function migrateLegacyMonitorThresholds(committed: JsonObject): LegacyMonitorThresholdMigration;
|
|
34
|
+
/**
|
|
35
|
+
* Append legacy monitor-threshold migration actions to a sync state.
|
|
36
|
+
* @param state - Sync state containing committed config and actions
|
|
37
|
+
* @param entryKey - Registry entry key currently being populated
|
|
38
|
+
* @returns Updated state with migration actions appended
|
|
39
|
+
*/
|
|
40
|
+
export declare function applyLegacyMonitorThresholdMigration<T extends MigrationState>(state: T, entryKey: string): T;
|
|
41
|
+
export {};
|
|
42
|
+
//# sourceMappingURL=legacy-monitor-thresholds.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"legacy-monitor-thresholds.d.ts","sourceRoot":"","sources":["../../src/sync/legacy-monitor-thresholds.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,EAKL,KAAK,UAAU,EAChB,MAAM,gBAAgB,CAAC;AAkBxB,2EAA2E;AAC3E,MAAM,WAAW,+BAA+B;IAC9C,sCAAsC;IACtC,QAAQ,CAAC,SAAS,EAAE,UAAU,CAAC;IAC/B,mCAAmC;IACnC,QAAQ,CAAC,OAAO,EAAE,SAAS;QAAE,GAAG,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE,EAAE,CAAC;CAC9D;AAED,mEAAmE;AACnE,UAAU,cAAc;IACtB,sCAAsC;IACtC,QAAQ,CAAC,SAAS,EAAE,UAAU,CAAC;IAC/B,uCAAuC;IACvC,QAAQ,CAAC,OAAO,EAAE,SAAS;QACzB,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;QACrB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;QACtB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;KACzB,EAAE,CAAC;CACL;AAuBD;;;;;GAKG;AACH,wBAAgB,8BAA8B,CAC5C,SAAS,EAAE,UAAU,GACpB,+BAA+B,CAyCjC;AAED;;;;;GAKG;AACH,wBAAgB,oCAAoC,CAAC,CAAC,SAAS,cAAc,EAC3E,KAAK,EAAE,CAAC,EACR,QAAQ,EAAE,MAAM,GACf,CAAC,CAmBH"}
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Compatibility helpers for migrating deprecated monitor threshold keys.
|
|
3
|
+
* @module sync/legacy-monitor-thresholds
|
|
4
|
+
*/
|
|
5
|
+
import { getAtPath, isJsonObject, jsonEquals, setAtPath, } from "./json-path.js";
|
|
6
|
+
import { recordedPopulation, recordPopulation, removePopulation, } from "./sync-population.js";
|
|
7
|
+
const LEGACY_MONITOR_THRESHOLD_MIGRATIONS = [
|
|
8
|
+
{
|
|
9
|
+
legacyKey: "monitor.thresholds.sentryMinEvents24h",
|
|
10
|
+
currentKey: "monitor.thresholds.minEvents24h",
|
|
11
|
+
},
|
|
12
|
+
{
|
|
13
|
+
legacyKey: "monitor.thresholds.xrayFaultRatePct",
|
|
14
|
+
currentKey: "monitor.thresholds.faultRatePct",
|
|
15
|
+
},
|
|
16
|
+
];
|
|
17
|
+
/**
|
|
18
|
+
* Return a copy of an object with one dot-path property removed.
|
|
19
|
+
* @param root - Object to copy
|
|
20
|
+
* @param dotPath - Dot-separated key path to remove
|
|
21
|
+
* @returns Updated object without the path
|
|
22
|
+
*/
|
|
23
|
+
function removeAtPath(root, dotPath) {
|
|
24
|
+
const dotIndex = dotPath.indexOf(".");
|
|
25
|
+
const head = dotIndex === -1 ? dotPath : dotPath.slice(0, dotIndex);
|
|
26
|
+
const rest = dotIndex === -1 ? "" : dotPath.slice(dotIndex + 1);
|
|
27
|
+
if (rest === "") {
|
|
28
|
+
const { [head]: _removed, ...remaining } = root;
|
|
29
|
+
return remaining;
|
|
30
|
+
}
|
|
31
|
+
const child = root[head];
|
|
32
|
+
if (!isJsonObject(child)) {
|
|
33
|
+
return root;
|
|
34
|
+
}
|
|
35
|
+
return { ...root, [head]: removeAtPath(child, rest) };
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Move legacy monitor thresholds to provider-neutral keys when provenance
|
|
39
|
+
* proves Lisa populated the legacy value.
|
|
40
|
+
* @param committed - Committed config object
|
|
41
|
+
* @returns Updated config and migration actions
|
|
42
|
+
*/
|
|
43
|
+
export function migrateLegacyMonitorThresholds(committed) {
|
|
44
|
+
return LEGACY_MONITOR_THRESHOLD_MIGRATIONS.reduce((current, migration) => {
|
|
45
|
+
const legacyValue = getAtPath(current.committed, migration.legacyKey);
|
|
46
|
+
const currentValue = getAtPath(current.committed, migration.currentKey);
|
|
47
|
+
const recorded = recordedPopulation(current.committed, migration.legacyKey);
|
|
48
|
+
if (legacyValue === undefined ||
|
|
49
|
+
currentValue !== undefined ||
|
|
50
|
+
recorded === undefined ||
|
|
51
|
+
!jsonEquals(legacyValue, recorded)) {
|
|
52
|
+
return current;
|
|
53
|
+
}
|
|
54
|
+
const committed = recordPopulation(removePopulation(removeAtPath(setAtPath(current.committed, migration.currentKey, legacyValue), migration.legacyKey), migration.legacyKey), migration.currentKey, legacyValue);
|
|
55
|
+
return {
|
|
56
|
+
committed,
|
|
57
|
+
actions: [
|
|
58
|
+
...current.actions,
|
|
59
|
+
{
|
|
60
|
+
key: migration.currentKey,
|
|
61
|
+
detail: `auto-populated legacy ${migration.legacyKey} migrated to provider-neutral key`,
|
|
62
|
+
},
|
|
63
|
+
],
|
|
64
|
+
};
|
|
65
|
+
}, { committed, actions: [] });
|
|
66
|
+
}
|
|
67
|
+
/**
|
|
68
|
+
* Append legacy monitor-threshold migration actions to a sync state.
|
|
69
|
+
* @param state - Sync state containing committed config and actions
|
|
70
|
+
* @param entryKey - Registry entry key currently being populated
|
|
71
|
+
* @returns Updated state with migration actions appended
|
|
72
|
+
*/
|
|
73
|
+
export function applyLegacyMonitorThresholdMigration(state, entryKey) {
|
|
74
|
+
if (entryKey !== "monitor") {
|
|
75
|
+
return state;
|
|
76
|
+
}
|
|
77
|
+
const migration = migrateLegacyMonitorThresholds(state.committed);
|
|
78
|
+
if (migration.actions.length === 0) {
|
|
79
|
+
return state;
|
|
80
|
+
}
|
|
81
|
+
return {
|
|
82
|
+
...state,
|
|
83
|
+
committed: migration.committed,
|
|
84
|
+
actions: [
|
|
85
|
+
...state.actions,
|
|
86
|
+
...migration.actions.map(action => ({
|
|
87
|
+
...action,
|
|
88
|
+
kind: "default-evolved",
|
|
89
|
+
})),
|
|
90
|
+
],
|
|
91
|
+
};
|
|
92
|
+
}
|
|
93
|
+
//# sourceMappingURL=legacy-monitor-thresholds.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"legacy-monitor-thresholds.js","sourceRoot":"","sources":["../../src/sync/legacy-monitor-thresholds.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,EACL,SAAS,EACT,YAAY,EACZ,UAAU,EACV,SAAS,GAEV,MAAM,gBAAgB,CAAC;AACxB,OAAO,EACL,kBAAkB,EAClB,gBAAgB,EAChB,gBAAgB,GACjB,MAAM,sBAAsB,CAAC;AAE9B,MAAM,mCAAmC,GAAG;IAC1C;QACE,SAAS,EAAE,uCAAuC;QAClD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AAC,OAAO;YAChB,GAAG,SAAS,CAAC,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;gBAClC,GAAG,MAAM;gBACT,IAAI,EAAE,iBAA0B;aACjC,CAAC,CAAC;SACJ;KACG,CAAC;AACT,CAAC"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Helpers for `_lisaSync.populated` provenance metadata.
|
|
3
|
+
* @module sync/sync-population
|
|
4
|
+
*/
|
|
5
|
+
import { type JsonObject, type JsonValue } from "./json-path.js";
|
|
6
|
+
/**
|
|
7
|
+
* Read recorded sync provenance for one literal config key.
|
|
8
|
+
* @param committed - Committed config object
|
|
9
|
+
* @param key - Literal provenance key
|
|
10
|
+
* @returns Recorded value, when present
|
|
11
|
+
*/
|
|
12
|
+
export declare function recordedPopulation(committed: JsonObject, key: string): JsonValue | undefined;
|
|
13
|
+
/**
|
|
14
|
+
* Record sync provenance for one literal config key.
|
|
15
|
+
* @param committed - Committed config object
|
|
16
|
+
* @param key - Literal provenance key
|
|
17
|
+
* @param value - Value to record
|
|
18
|
+
* @returns Updated committed config
|
|
19
|
+
*/
|
|
20
|
+
export declare function recordPopulation(committed: JsonObject, key: string, value: JsonValue): JsonObject;
|
|
21
|
+
/**
|
|
22
|
+
* Remove one literal provenance key from `_lisaSync.populated`.
|
|
23
|
+
* @param committed - Committed config object
|
|
24
|
+
* @param key - Literal provenance key to remove
|
|
25
|
+
* @returns Updated committed config
|
|
26
|
+
*/
|
|
27
|
+
export declare function removePopulation(committed: JsonObject, key: string): JsonObject;
|
|
28
|
+
//# sourceMappingURL=sync-population.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sync-population.d.ts","sourceRoot":"","sources":["../../src/sync/sync-population.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,EAIL,KAAK,UAAU,EACf,KAAK,SAAS,EACf,MAAM,gBAAgB,CAAC;AAIxB;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAChC,SAAS,EAAE,UAAU,EACrB,GAAG,EAAE,MAAM,GACV,SAAS,GAAG,SAAS,CAGvB;AAED;;;;;;GAMG;AACH,wBAAgB,gBAAgB,CAC9B,SAAS,EAAE,UAAU,EACrB,GAAG,EAAE,MAAM,EACX,KAAK,EAAE,SAAS,GACf,UAAU,CAOZ;AAED;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAC9B,SAAS,EAAE,UAAU,EACrB,GAAG,EAAE,MAAM,GACV,UAAU,CAOZ"}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Helpers for `_lisaSync.populated` provenance metadata.
|
|
3
|
+
* @module sync/sync-population
|
|
4
|
+
*/
|
|
5
|
+
import { getAtPath, isJsonObject, setAtPath, } from "./json-path.js";
|
|
6
|
+
const SYNC_METADATA_KEY = "_lisaSync";
|
|
7
|
+
/**
|
|
8
|
+
* Read recorded sync provenance for one literal config key.
|
|
9
|
+
* @param committed - Committed config object
|
|
10
|
+
* @param key - Literal provenance key
|
|
11
|
+
* @returns Recorded value, when present
|
|
12
|
+
*/
|
|
13
|
+
export function recordedPopulation(committed, key) {
|
|
14
|
+
const populated = getAtPath(committed, `${SYNC_METADATA_KEY}.populated`);
|
|
15
|
+
return isJsonObject(populated) ? populated[key] : undefined;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Record sync provenance for one literal config key.
|
|
19
|
+
* @param committed - Committed config object
|
|
20
|
+
* @param key - Literal provenance key
|
|
21
|
+
* @param value - Value to record
|
|
22
|
+
* @returns Updated committed config
|
|
23
|
+
*/
|
|
24
|
+
export function recordPopulation(committed, key, value) {
|
|
25
|
+
const populated = getAtPath(committed, `${SYNC_METADATA_KEY}.populated`);
|
|
26
|
+
const populatedObject = isJsonObject(populated) ? populated : {};
|
|
27
|
+
return setAtPath(committed, `${SYNC_METADATA_KEY}.populated`, {
|
|
28
|
+
...populatedObject,
|
|
29
|
+
[key]: value,
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Remove one literal provenance key from `_lisaSync.populated`.
|
|
34
|
+
* @param committed - Committed config object
|
|
35
|
+
* @param key - Literal provenance key to remove
|
|
36
|
+
* @returns Updated committed config
|
|
37
|
+
*/
|
|
38
|
+
export function removePopulation(committed, key) {
|
|
39
|
+
const populated = getAtPath(committed, `${SYNC_METADATA_KEY}.populated`);
|
|
40
|
+
if (!isJsonObject(populated) || !Object.hasOwn(populated, key)) {
|
|
41
|
+
return committed;
|
|
42
|
+
}
|
|
43
|
+
const { [key]: _removed, ...remaining } = populated;
|
|
44
|
+
return setAtPath(committed, `${SYNC_METADATA_KEY}.populated`, remaining);
|
|
45
|
+
}
|
|
46
|
+
//# sourceMappingURL=sync-population.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sync-population.js","sourceRoot":"","sources":["../../src/sync/sync-population.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,EACL,SAAS,EACT,YAAY,EACZ,SAAS,GAGV,MAAM,gBAAgB,CAAC;AAExB,MAAM,iBAAiB,GAAG,WAAW,CAAC;AAEtC;;;;;GAKG;AACH,MAAM,UAAU,kBAAkB,CAChC,SAAqB,EACrB,GAAW;IAEX,MAAM,SAAS,GAAG,SAAS,CAAC,SAAS,EAAE,GAAG,iBAAiB,YAAY,CAAC,CAAC;IACzE,OAAO,YAAY,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;AAC9D,CAAC;AAED;;;;;;GAMG;AACH,MAAM,UAAU,gBAAgB,CAC9B,SAAqB,EACrB,GAAW,EACX,KAAgB;IAEhB,MAAM,SAAS,GAAG,SAAS,CAAC,SAAS,EAAE,GAAG,iBAAiB,YAAY,CAAC,CAAC;IACzE,MAAM,eAAe,GAAG,YAAY,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC;IACjE,OAAO,SAAS,CAAC,SAAS,EAAE,GAAG,iBAAiB,YAAY,EAAE;QAC5D,GAAG,eAAe;QAClB,CAAC,GAAG,CAAC,EAAE,KAAK;KACb,CAAC,CAAC;AACL,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,gBAAgB,CAC9B,SAAqB,EACrB,GAAW;IAEX,MAAM,SAAS,GAAG,SAAS,CAAC,SAAS,EAAE,GAAG,iBAAiB,YAAY,CAAC,CAAC;IACzE,IAAI,CAAC,YAAY,CAAC,SAAS,CAAC,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,SAAS,EAAE,GAAG,CAAC,EAAE,CAAC;QAC/D,OAAO,SAAS,CAAC;IACnB,CAAC;IACD,MAAM,EAAE,CAAC,GAAG,CAAC,EAAE,QAAQ,EAAE,GAAG,SAAS,EAAE,GAAG,SAAS,CAAC;IACpD,OAAO,SAAS,CAAC,SAAS,EAAE,GAAG,iBAAiB,YAAY,EAAE,SAAS,CAAC,CAAC;AAC3E,CAAC"}
|
package/package.json
CHANGED
|
@@ -76,26 +76,32 @@
|
|
|
76
76
|
],
|
|
77
77
|
"resolutions": {
|
|
78
78
|
"@isaacs/brace-expansion": "^5.0.1",
|
|
79
|
-
"axios": ">=1.15.
|
|
79
|
+
"axios": ">=1.15.2",
|
|
80
80
|
"esbuild": ">=0.28.1",
|
|
81
81
|
"flatted": "^3.4.2",
|
|
82
82
|
"handlebars": ">=4.7.9",
|
|
83
83
|
"lodash": ">=4.18.1",
|
|
84
|
-
"vite": "
|
|
85
|
-
"ws": ">=8.
|
|
84
|
+
"vite": "$vite",
|
|
85
|
+
"ws": ">=8.21.0",
|
|
86
|
+
"multer": ">=2.2.0",
|
|
87
|
+
"undici": ">=6.27.0",
|
|
88
|
+
"form-data": ">=4.0.6"
|
|
86
89
|
},
|
|
87
90
|
"overrides": {
|
|
88
91
|
"@isaacs/brace-expansion": "^5.0.1",
|
|
89
|
-
"axios": ">=1.15.
|
|
92
|
+
"axios": ">=1.15.2",
|
|
90
93
|
"esbuild": ">=0.28.1",
|
|
91
94
|
"flatted": "^3.4.2",
|
|
92
95
|
"handlebars": ">=4.7.9",
|
|
93
96
|
"lodash": ">=4.18.1",
|
|
94
|
-
"vite": "
|
|
95
|
-
"ws": ">=8.
|
|
97
|
+
"vite": "$vite",
|
|
98
|
+
"ws": ">=8.21.0",
|
|
99
|
+
"multer": ">=2.2.0",
|
|
100
|
+
"undici": ">=6.27.0",
|
|
101
|
+
"form-data": ">=4.0.6"
|
|
96
102
|
},
|
|
97
103
|
"name": "@codyswann/lisa",
|
|
98
|
-
"version": "2.217.
|
|
104
|
+
"version": "2.217.7",
|
|
99
105
|
"description": "Claude Code governance framework that applies guardrails, guidance, and automated enforcement to projects",
|
|
100
106
|
"main": "dist/index.js",
|
|
101
107
|
"exports": {
|
|
@@ -15,7 +15,7 @@ Spot-check application health, **audit observability completeness**, and **file
|
|
|
15
15
|
- `--all-gaps` — also file `recommended`-tier gaps (session replay, product analytics, etc.), not just `core`. Does not change anomaly thresholds.
|
|
16
16
|
- `max_candidates=<n>` — cap tickets filed this run (default 20; config `monitor.maxCandidates`).
|
|
17
17
|
|
|
18
|
-
##
|
|
18
|
+
## Deprecated monitor threshold aliases
|
|
19
19
|
|
|
20
20
|
Before resolving anomaly thresholds, inspect the committed
|
|
21
21
|
`.lisa.config.json` and local `.lisa.config.local.json` separately with `jq`.
|
|
@@ -28,6 +28,10 @@ that emits either entire config into agent context:
|
|
|
28
28
|
- `monitor.thresholds.faultRatePct`, then
|
|
29
29
|
`monitor.thresholds.xrayFaultRatePct`.
|
|
30
30
|
|
|
31
|
+
The provider-neutral keys are the current contract. The legacy
|
|
32
|
+
provider-prefixed keys are deprecated compatibility aliases and are used only
|
|
33
|
+
when the matching provider-neutral key is absent.
|
|
34
|
+
|
|
31
35
|
Run this fixed filter once with literal final argument `.lisa.config.json` and
|
|
32
36
|
once with literal final argument `.lisa.config.local.json` when the respective
|
|
33
37
|
file exists:
|
|
@@ -15,7 +15,7 @@ Spot-check application health, **audit observability completeness**, and **file
|
|
|
15
15
|
- `--all-gaps` — also file `recommended`-tier gaps (session replay, product analytics, etc.), not just `core`. Does not change anomaly thresholds.
|
|
16
16
|
- `max_candidates=<n>` — cap tickets filed this run (default 20; config `monitor.maxCandidates`).
|
|
17
17
|
|
|
18
|
-
##
|
|
18
|
+
## Deprecated monitor threshold aliases
|
|
19
19
|
|
|
20
20
|
Before resolving anomaly thresholds, inspect the committed
|
|
21
21
|
`.lisa.config.json` and local `.lisa.config.local.json` separately with `jq`.
|
|
@@ -28,6 +28,10 @@ that emits either entire config into agent context:
|
|
|
28
28
|
- `monitor.thresholds.faultRatePct`, then
|
|
29
29
|
`monitor.thresholds.xrayFaultRatePct`.
|
|
30
30
|
|
|
31
|
+
The provider-neutral keys are the current contract. The legacy
|
|
32
|
+
provider-prefixed keys are deprecated compatibility aliases and are used only
|
|
33
|
+
when the matching provider-neutral key is absent.
|
|
34
|
+
|
|
31
35
|
Run this fixed filter once with literal final argument `.lisa.config.json` and
|
|
32
36
|
once with literal final argument `.lisa.config.local.json` when the respective
|
|
33
37
|
file exists:
|
|
@@ -15,7 +15,7 @@ Spot-check application health, **audit observability completeness**, and **file
|
|
|
15
15
|
- `--all-gaps` — also file `recommended`-tier gaps (session replay, product analytics, etc.), not just `core`. Does not change anomaly thresholds.
|
|
16
16
|
- `max_candidates=<n>` — cap tickets filed this run (default 20; config `monitor.maxCandidates`).
|
|
17
17
|
|
|
18
|
-
##
|
|
18
|
+
## Deprecated monitor threshold aliases
|
|
19
19
|
|
|
20
20
|
Before resolving anomaly thresholds, inspect the committed
|
|
21
21
|
`.lisa.config.json` and local `.lisa.config.local.json` separately with `jq`.
|
|
@@ -28,6 +28,10 @@ that emits either entire config into agent context:
|
|
|
28
28
|
- `monitor.thresholds.faultRatePct`, then
|
|
29
29
|
`monitor.thresholds.xrayFaultRatePct`.
|
|
30
30
|
|
|
31
|
+
The provider-neutral keys are the current contract. The legacy
|
|
32
|
+
provider-prefixed keys are deprecated compatibility aliases and are used only
|
|
33
|
+
when the matching provider-neutral key is absent.
|
|
34
|
+
|
|
31
35
|
Run this fixed filter once with literal final argument `.lisa.config.json` and
|
|
32
36
|
once with literal final argument `.lisa.config.local.json` when the respective
|
|
33
37
|
file exists:
|
|
@@ -15,7 +15,7 @@ Spot-check application health, **audit observability completeness**, and **file
|
|
|
15
15
|
- `--all-gaps` — also file `recommended`-tier gaps (session replay, product analytics, etc.), not just `core`. Does not change anomaly thresholds.
|
|
16
16
|
- `max_candidates=<n>` — cap tickets filed this run (default 20; config `monitor.maxCandidates`).
|
|
17
17
|
|
|
18
|
-
##
|
|
18
|
+
## Deprecated monitor threshold aliases
|
|
19
19
|
|
|
20
20
|
Before resolving anomaly thresholds, inspect the committed
|
|
21
21
|
`.lisa.config.json` and local `.lisa.config.local.json` separately with `jq`.
|
|
@@ -28,6 +28,10 @@ that emits either entire config into agent context:
|
|
|
28
28
|
- `monitor.thresholds.faultRatePct`, then
|
|
29
29
|
`monitor.thresholds.xrayFaultRatePct`.
|
|
30
30
|
|
|
31
|
+
The provider-neutral keys are the current contract. The legacy
|
|
32
|
+
provider-prefixed keys are deprecated compatibility aliases and are used only
|
|
33
|
+
when the matching provider-neutral key is absent.
|
|
34
|
+
|
|
31
35
|
Run this fixed filter once with literal final argument `.lisa.config.json` and
|
|
32
36
|
once with literal final argument `.lisa.config.local.json` when the respective
|
|
33
37
|
file exists:
|
|
@@ -15,7 +15,7 @@ Spot-check application health, **audit observability completeness**, and **file
|
|
|
15
15
|
- `--all-gaps` — also file `recommended`-tier gaps (session replay, product analytics, etc.), not just `core`. Does not change anomaly thresholds.
|
|
16
16
|
- `max_candidates=<n>` — cap tickets filed this run (default 20; config `monitor.maxCandidates`).
|
|
17
17
|
|
|
18
|
-
##
|
|
18
|
+
## Deprecated monitor threshold aliases
|
|
19
19
|
|
|
20
20
|
Before resolving anomaly thresholds, inspect the committed
|
|
21
21
|
`.lisa.config.json` and local `.lisa.config.local.json` separately with `jq`.
|
|
@@ -28,6 +28,10 @@ that emits either entire config into agent context:
|
|
|
28
28
|
- `monitor.thresholds.faultRatePct`, then
|
|
29
29
|
`monitor.thresholds.xrayFaultRatePct`.
|
|
30
30
|
|
|
31
|
+
The provider-neutral keys are the current contract. The legacy
|
|
32
|
+
provider-prefixed keys are deprecated compatibility aliases and are used only
|
|
33
|
+
when the matching provider-neutral key is absent.
|
|
34
|
+
|
|
31
35
|
Run this fixed filter once with literal final argument `.lisa.config.json` and
|
|
32
36
|
once with literal final argument `.lisa.config.local.json` when the respective
|
|
33
37
|
file exists:
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "lisa-openclaw",
|
|
3
|
-
"version": "2.217.
|
|
3
|
+
"version": "2.217.7",
|
|
4
4
|
"description": "Connect staff roles to Telegram or Slack via OpenClaw — facilitator/specialist hub-and-spoke routing and repo-coding topics, for Claude Code and Codex",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Cody Swann"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "lisa-openclaw",
|
|
3
|
-
"version": "2.217.
|
|
3
|
+
"version": "2.217.7",
|
|
4
4
|
"description": "Connect staff roles to Telegram or Slack via OpenClaw — facilitator/specialist hub-and-spoke routing and repo-coding topics, across Claude and Codex.",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Cody Swann"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "lisa-openclaw",
|
|
3
|
-
"version": "2.217.
|
|
3
|
+
"version": "2.217.7",
|
|
4
4
|
"description": "Connect staff roles to Telegram or Slack via OpenClaw — facilitator/specialist hub-and-spoke routing and repo-coding topics, for Claude Code and Codex",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Cody Swann"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "lisa-openclaw",
|
|
3
|
-
"version": "2.217.
|
|
3
|
+
"version": "2.217.7",
|
|
4
4
|
"description": "Connect staff roles to Telegram or Slack via OpenClaw — facilitator/specialist hub-and-spoke routing and repo-coding topics, for Claude Code and Codex",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Cody Swann"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "lisa-openclaw",
|
|
3
|
-
"version": "2.217.
|
|
3
|
+
"version": "2.217.7",
|
|
4
4
|
"description": "Connect staff roles to Telegram or Slack via OpenClaw — facilitator/specialist hub-and-spoke routing and repo-coding topics, for Claude Code and Codex",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Cody Swann"
|
|
@@ -15,7 +15,7 @@ Spot-check application health, **audit observability completeness**, and **file
|
|
|
15
15
|
- `--all-gaps` — also file `recommended`-tier gaps (session replay, product analytics, etc.), not just `core`. Does not change anomaly thresholds.
|
|
16
16
|
- `max_candidates=<n>` — cap tickets filed this run (default 20; config `monitor.maxCandidates`).
|
|
17
17
|
|
|
18
|
-
##
|
|
18
|
+
## Deprecated monitor threshold aliases
|
|
19
19
|
|
|
20
20
|
Before resolving anomaly thresholds, inspect the committed
|
|
21
21
|
`.lisa.config.json` and local `.lisa.config.local.json` separately with `jq`.
|
|
@@ -28,6 +28,10 @@ that emits either entire config into agent context:
|
|
|
28
28
|
- `monitor.thresholds.faultRatePct`, then
|
|
29
29
|
`monitor.thresholds.xrayFaultRatePct`.
|
|
30
30
|
|
|
31
|
+
The provider-neutral keys are the current contract. The legacy
|
|
32
|
+
provider-prefixed keys are deprecated compatibility aliases and are used only
|
|
33
|
+
when the matching provider-neutral key is absent.
|
|
34
|
+
|
|
31
35
|
Run this fixed filter once with literal final argument `.lisa.config.json` and
|
|
32
36
|
once with literal final argument `.lisa.config.local.json` when the respective
|
|
33
37
|
file exists:
|