@codyswann/lisa 2.217.4 → 2.217.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/dist/sync/config-sync.d.ts +1 -3
- package/dist/sync/config-sync.d.ts.map +1 -1
- package/dist/sync/config-sync.js +36 -44
- package/dist/sync/config-sync.js.map +1 -1
- package/dist/sync/legacy-aliases.d.ts +27 -0
- package/dist/sync/legacy-aliases.d.ts.map +1 -0
- package/dist/sync/legacy-aliases.js +53 -0
- package/dist/sync/legacy-aliases.js.map +1 -0
- 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/registry.d.ts +6 -0
- package/dist/sync/registry.d.ts.map +1 -1
- package/dist/sync/registry.js +11 -4
- package/dist/sync/registry.js.map +1 -1
- 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 +1 -1
- 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
- package/ui/README.md +5 -3
- package/ui/index.html +1 -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
|
@@ -19,8 +19,9 @@ import * as path from "node:path";
|
|
|
19
19
|
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
|
-
|
|
23
|
-
|
|
22
|
+
import { aliasCompatibleDefault, hasLegacyAlias } from "./legacy-aliases.js";
|
|
23
|
+
import { applyLegacyMonitorThresholdMigration } from "./legacy-monitor-thresholds.js";
|
|
24
|
+
import { recordedPopulation, recordPopulation } from "./sync-population.js";
|
|
24
25
|
/**
|
|
25
26
|
* Check whether a registry relevance condition matches the merged config.
|
|
26
27
|
* @param merged - Merged (committed + local) config view
|
|
@@ -42,9 +43,8 @@ function conditionMatches(merged, condition) {
|
|
|
42
43
|
* @returns True when the entry should be synced
|
|
43
44
|
*/
|
|
44
45
|
function isRelevant(merged, relevantWhen) {
|
|
45
|
-
if (relevantWhen === undefined)
|
|
46
|
+
if (relevantWhen === undefined)
|
|
46
47
|
return true;
|
|
47
|
-
}
|
|
48
48
|
return relevantWhen.some(condition => conditionMatches(merged, condition));
|
|
49
49
|
}
|
|
50
50
|
/**
|
|
@@ -61,33 +61,6 @@ async function readArtifactValue(destDir, entry) {
|
|
|
61
61
|
}));
|
|
62
62
|
return reads.find(value => value !== undefined);
|
|
63
63
|
}
|
|
64
|
-
/**
|
|
65
|
-
* Read the recorded populated-default value for a key, if any. Provenance
|
|
66
|
-
* keys are stored literally (dots included) inside `_lisaSync.populated`.
|
|
67
|
-
* @param committed - Committed config object
|
|
68
|
-
* @param key - Config key
|
|
69
|
-
* @returns The value recorded at population time, or undefined
|
|
70
|
-
*/
|
|
71
|
-
function recordedPopulation(committed, key) {
|
|
72
|
-
const populated = getAtPath(committed, `${SYNC_METADATA_KEY}.populated`);
|
|
73
|
-
return isJsonObject(populated) ? populated[key] : undefined;
|
|
74
|
-
}
|
|
75
|
-
/**
|
|
76
|
-
* Record that a key was auto-populated with a default value, storing the key
|
|
77
|
-
* literally (dots included) so later runs can detect default evolution.
|
|
78
|
-
* @param committed - Committed config object
|
|
79
|
-
* @param key - Config key
|
|
80
|
-
* @param value - The default value written
|
|
81
|
-
* @returns Updated committed config
|
|
82
|
-
*/
|
|
83
|
-
function recordPopulation(committed, key, value) {
|
|
84
|
-
const populated = getAtPath(committed, `${SYNC_METADATA_KEY}.populated`);
|
|
85
|
-
const populatedObject = isJsonObject(populated) ? populated : {};
|
|
86
|
-
return setAtPath(committed, `${SYNC_METADATA_KEY}.populated`, {
|
|
87
|
-
...populatedObject,
|
|
88
|
-
[key]: value,
|
|
89
|
-
});
|
|
90
|
-
}
|
|
91
64
|
/**
|
|
92
65
|
* Build the next state with an updated committed config and appended action.
|
|
93
66
|
* @param state - Current sync state
|
|
@@ -127,34 +100,53 @@ function populateMissing(state, entry, artifactValue) {
|
|
|
127
100
|
* @param state - Current sync state
|
|
128
101
|
* @param entry - Registry entry
|
|
129
102
|
* @param merged - Merged config view (local overlay applied)
|
|
103
|
+
* @param local - Local config overlay
|
|
130
104
|
* @param artifactValue - Value found in an existing artifact, if any
|
|
131
105
|
* @returns Updated state
|
|
132
106
|
*/
|
|
133
|
-
function populateEntry(state, entry, merged, artifactValue) {
|
|
134
|
-
const
|
|
107
|
+
function populateEntry(state, entry, merged, local, artifactValue) {
|
|
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);
|
|
135
113
|
if (configValue === undefined) {
|
|
136
|
-
return populateMissing(
|
|
114
|
+
return populateMissing(stateAfterMigration, entry, artifactValue);
|
|
137
115
|
}
|
|
138
|
-
const
|
|
116
|
+
const committedValue = getAtPath(stateAfterMigration.committed, entry.key);
|
|
117
|
+
const localValue = getAtPath(local, entry.key);
|
|
118
|
+
const recorded = recordedPopulation(stateAfterMigration.committed, entry.key);
|
|
119
|
+
const evolutionValue = entry.legacyAliases === undefined ? configValue : committedValue;
|
|
139
120
|
if (recorded !== undefined &&
|
|
140
|
-
jsonEquals(
|
|
141
|
-
!jsonEquals(
|
|
142
|
-
|
|
143
|
-
|
|
121
|
+
jsonEquals(evolutionValue, recorded) &&
|
|
122
|
+
!jsonEquals(evolutionValue, entry.defaultValue) &&
|
|
123
|
+
!hasLegacyAlias(localValue, entry.legacyAliases)) {
|
|
124
|
+
const committed = recordPopulation(setAtPath(stateAfterMigration.committed, entry.key, entry.defaultValue), entry.key, entry.defaultValue);
|
|
125
|
+
return withAction(stateAfterMigration, committed, {
|
|
144
126
|
key: entry.key,
|
|
145
127
|
kind: "default-evolved",
|
|
146
128
|
detail: "value still matched the old default; updated to the new one",
|
|
147
129
|
});
|
|
148
130
|
}
|
|
149
|
-
const
|
|
150
|
-
if (
|
|
151
|
-
return
|
|
131
|
+
const hasEffectiveAlias = hasLegacyAlias(configValue, entry.legacyAliases);
|
|
132
|
+
if (hasEffectiveAlias && committedValue === undefined) {
|
|
133
|
+
return stateAfterMigration;
|
|
134
|
+
}
|
|
135
|
+
// Compatibility fills are based only on committed state. Each present alias
|
|
136
|
+
// prunes its own mapped current default while unrelated defaults still fill.
|
|
137
|
+
const fillSource = hasEffectiveAlias ? committedValue : configValue;
|
|
138
|
+
const fallback = hasEffectiveAlias
|
|
139
|
+
? aliasCompatibleDefault(configValue, entry.defaultValue, entry.legacyAliases)
|
|
140
|
+
: entry.defaultValue;
|
|
141
|
+
const filled = fillMissing(fillSource, fallback);
|
|
142
|
+
if (!jsonEquals(filled, fillSource)) {
|
|
143
|
+
return withAction(stateAfterMigration, setAtPath(stateAfterMigration.committed, entry.key, filled), {
|
|
152
144
|
key: entry.key,
|
|
153
145
|
kind: "filled-missing",
|
|
154
146
|
detail: "missing sub-keys filled with defaults",
|
|
155
147
|
});
|
|
156
148
|
}
|
|
157
|
-
return
|
|
149
|
+
return stateAfterMigration;
|
|
158
150
|
}
|
|
159
151
|
/**
|
|
160
152
|
* Queue artifact writes for one entry (sync direction: config wins). Only
|
|
@@ -244,7 +236,7 @@ export async function runConfigSync(destDir, options = {}) {
|
|
|
244
236
|
return state;
|
|
245
237
|
}
|
|
246
238
|
const artifactValue = await readArtifactValue(destDir, entry);
|
|
247
|
-
const populated = populateEntry(state, entry, merged, artifactValue);
|
|
239
|
+
const populated = populateEntry(state, entry, merged, local, artifactValue);
|
|
248
240
|
return syncArtifacts(populated, entry, destDir, local);
|
|
249
241
|
}, Promise.resolve(initial));
|
|
250
242
|
const mergedFinal = deepMerge(finalState.committed, local);
|
|
@@ -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;
|
|
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;AAC7E,OAAO,EAAE,oCAAoC,EAAE,MAAM,gCAAgC,CAAC;AACtF,OAAO,EAAE,kBAAkB,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AA2C5E;;;;;GAKG;AACH,SAAS,gBAAgB,CAAC,MAAkB,EAAE,SA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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,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Compatibility helpers for registry settings with deprecated relative paths.
|
|
3
|
+
* @module sync/legacy-aliases
|
|
4
|
+
*/
|
|
5
|
+
import { type JsonValue } from "./json-path.js";
|
|
6
|
+
/** One deprecated relative path and the current path that replaces it. */
|
|
7
|
+
export interface LegacyAliasMapping {
|
|
8
|
+
readonly currentPath: string;
|
|
9
|
+
readonly legacyPath: string;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Whether a value contains any declared deprecated alias. Presence is checked
|
|
13
|
+
* against `undefined` so explicit `0` and `null` values remain human-owned.
|
|
14
|
+
* @param value - Setting value to inspect
|
|
15
|
+
* @param aliases - Relative-path alias mappings
|
|
16
|
+
* @returns True when at least one legacy path is present
|
|
17
|
+
*/
|
|
18
|
+
export declare function hasLegacyAlias(value: JsonValue | undefined, aliases: readonly LegacyAliasMapping[] | undefined): boolean;
|
|
19
|
+
/**
|
|
20
|
+
* Remove only current defaults whose legacy counterpart is present.
|
|
21
|
+
* @param value - Effective entry value used to detect aliases
|
|
22
|
+
* @param defaultValue - Registry default to prune
|
|
23
|
+
* @param aliases - Relative-path alias mappings
|
|
24
|
+
* @returns Default value safe to fill beside the effective aliases
|
|
25
|
+
*/
|
|
26
|
+
export declare function aliasCompatibleDefault(value: JsonValue, defaultValue: JsonValue, aliases: readonly LegacyAliasMapping[] | undefined): JsonValue;
|
|
27
|
+
//# sourceMappingURL=legacy-aliases.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"legacy-aliases.d.ts","sourceRoot":"","sources":["../../src/sync/legacy-aliases.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,EAA2B,KAAK,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAEzE,0EAA0E;AAC1E,MAAM,WAAW,kBAAkB;IACjC,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;CAC7B;AAED;;;;;;GAMG;AACH,wBAAgB,cAAc,CAC5B,KAAK,EAAE,SAAS,GAAG,SAAS,EAC5B,OAAO,EAAE,SAAS,kBAAkB,EAAE,GAAG,SAAS,GACjD,OAAO,CAKT;AA6BD;;;;;;GAMG;AACH,wBAAgB,sBAAsB,CACpC,KAAK,EAAE,SAAS,EAChB,YAAY,EAAE,SAAS,EACvB,OAAO,EAAE,SAAS,kBAAkB,EAAE,GAAG,SAAS,GACjD,SAAS,CAUX"}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Compatibility helpers for registry settings with deprecated relative paths.
|
|
3
|
+
* @module sync/legacy-aliases
|
|
4
|
+
*/
|
|
5
|
+
import { getAtPath, isJsonObject } from "./json-path.js";
|
|
6
|
+
/**
|
|
7
|
+
* Whether a value contains any declared deprecated alias. Presence is checked
|
|
8
|
+
* against `undefined` so explicit `0` and `null` values remain human-owned.
|
|
9
|
+
* @param value - Setting value to inspect
|
|
10
|
+
* @param aliases - Relative-path alias mappings
|
|
11
|
+
* @returns True when at least one legacy path is present
|
|
12
|
+
*/
|
|
13
|
+
export function hasLegacyAlias(value, aliases) {
|
|
14
|
+
return (aliases?.some(alias => getAtPath(value, alias.legacyPath) !== undefined) ??
|
|
15
|
+
false);
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Return a JSON value without one nested object path.
|
|
19
|
+
* @param value - Value to copy
|
|
20
|
+
* @param dotPath - Relative dot path to omit
|
|
21
|
+
* @returns Copied value with the addressed property omitted
|
|
22
|
+
*/
|
|
23
|
+
function omitAtPath(value, dotPath) {
|
|
24
|
+
if (!isJsonObject(value)) {
|
|
25
|
+
return value;
|
|
26
|
+
}
|
|
27
|
+
const dotIndex = dotPath.indexOf(".");
|
|
28
|
+
const head = dotIndex === -1 ? dotPath : dotPath.slice(0, dotIndex);
|
|
29
|
+
if (dotIndex === -1) {
|
|
30
|
+
return Object.fromEntries(Object.entries(value).filter(([key]) => key !== head));
|
|
31
|
+
}
|
|
32
|
+
const child = value[head];
|
|
33
|
+
if (child === undefined) {
|
|
34
|
+
return value;
|
|
35
|
+
}
|
|
36
|
+
return {
|
|
37
|
+
...value,
|
|
38
|
+
[head]: omitAtPath(child, dotPath.slice(dotIndex + 1)),
|
|
39
|
+
};
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* Remove only current defaults whose legacy counterpart is present.
|
|
43
|
+
* @param value - Effective entry value used to detect aliases
|
|
44
|
+
* @param defaultValue - Registry default to prune
|
|
45
|
+
* @param aliases - Relative-path alias mappings
|
|
46
|
+
* @returns Default value safe to fill beside the effective aliases
|
|
47
|
+
*/
|
|
48
|
+
export function aliasCompatibleDefault(value, defaultValue, aliases) {
|
|
49
|
+
return (aliases?.reduce((fallback, alias) => getAtPath(value, alias.legacyPath) === undefined
|
|
50
|
+
? fallback
|
|
51
|
+
: omitAtPath(fallback, alias.currentPath), defaultValue) ?? defaultValue);
|
|
52
|
+
}
|
|
53
|
+
//# sourceMappingURL=legacy-aliases.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"legacy-aliases.js","sourceRoot":"","sources":["../../src/sync/legacy-aliases.ts"],"names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,UAAU,sBAAsB,CACpC,KAAgB,EAChB,YAAuB,EACvB,OAAkD;IAElD,OAAO,CACL,OAAO,EAAE,MAAM,CACb,CAAC,QAAQ,EAAE,KAAK,EAAE,EAAE,CAClB,SAAS,CAAC,KAAK,EAAE,KAAK,CAAC,UAAU,CAAC,KAAK,SAAS;QAC9C,CAAC,CAAC,QAAQ;QACV,CAAC,CAAC,UAAU,CAAC,QAAQ,EAAE,KAAK,CAAC,WAAW,CAAC,EAC7C,YAAY,CACb,IAAI,YAAY,CAClB,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,UAAU,EAAE,iCAAiC;KAC9C;IACD;QACE,SAAS,EAAE,qCAAqC;QAChD,UAAU,EAAE,iCAAiC;KAC9C;CACO,CAAC;AAsBX;;;;;GAKG;AACH,SAAS,YAAY,CAAC,IAAgB,EAAE,OAAe;IACrD,MAAM,QAAQ,GAAG,OAAO,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;IACtC,MAAM,IAAI,GAAG,QAAQ,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,EAAE,QAAQ,CAAC,CAAC;IACpE,MAAM,IAAI,GAAG,QAAQ,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,OAAO,CAAC,KAAK,CAAC,QAAQ,GAAG,CAAC,CAAC,CAAC;IAChE,IAAI,IAAI,KAAK,EAAE,EAAE,CAAC;QAChB,MAAM,EAAE,CAA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GAAG,OAAO,CAAC,OAAO;gBAClB;oBACE,GAAG,EAAE,SAAS,CAAC,UAAU;oBACzB,MAAM,EAAE,yBAAyB,SAAS,CAAC,SAAS,mCAAmC;iBACxF;aACF;SACF,CAAC;IACJ,CAAC,EACD,EAAE,SAAS,EAAE,OAAO,EAAE,EAAE,EAAE,CAC3B,CAAC;AACJ,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,oCAAoC,CAClD,KAAQ,EACR,QAAgB;IAEhB,IAAI,QAAQ,KAAK,SAAS,EAAE,CAAC;QAC3B,OAAO,KAAK,CAAC;IACf,CAAC;IACD,MAAM,SAAS,GAAG,8BAA8B,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC;IAClE,IAAI,SAAS,CAAC,OAAO,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QACnC,OAAO,KAAK,CAAC;IACf,CAAC;IACD,OAAO;QACL,GAAG,KAAK;QACR,SAAS,EAAE,SAAS,CAAC,SAAS;QAC9B,OAAO,EAAE;YACP,GAAG,KAAK,CAAC,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"}
|
package/dist/sync/registry.d.ts
CHANGED
|
@@ -11,6 +11,7 @@
|
|
|
11
11
|
* @module sync/registry
|
|
12
12
|
*/
|
|
13
13
|
import type { JsonValue } from "./json-path.js";
|
|
14
|
+
import type { LegacyAliasMapping } from "./legacy-aliases.js";
|
|
14
15
|
/**
|
|
15
16
|
* A project file that mirrors a synced setting. Artifact files are only ever
|
|
16
17
|
* written when they already exist on disk — sync never scaffolds an artifact
|
|
@@ -28,6 +29,11 @@ export interface SyncedSetting {
|
|
|
28
29
|
readonly key: string;
|
|
29
30
|
/** Built-in default used when neither config nor artifact has a value */
|
|
30
31
|
readonly defaultValue: JsonValue;
|
|
32
|
+
/**
|
|
33
|
+
* Internal relative-path mappings for deprecated keys that remain readable.
|
|
34
|
+
* Sync uses these to avoid filling a new default beside a human-owned alias.
|
|
35
|
+
*/
|
|
36
|
+
readonly legacyAliases?: readonly LegacyAliasMapping[];
|
|
31
37
|
/** Files that mirror this value (written from config on every sync) */
|
|
32
38
|
readonly artifacts?: readonly ArtifactBinding[];
|
|
33
39
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"registry.d.ts","sourceRoot":"","sources":["../../src/sync/registry.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AACH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"registry.d.ts","sourceRoot":"","sources":["../../src/sync/registry.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AACH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAChD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AAE9D;;;;GAIG;AACH,MAAM,WAAW,eAAe;IAC9B,8CAA8C;IAC9C,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,2EAA2E;IAC3E,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;CAC1B;AAED,2EAA2E;AAC3E,MAAM,WAAW,aAAa;IAC5B,yDAAyD;IACzD,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB,yEAAyE;IACzE,QAAQ,CAAC,YAAY,EAAE,SAAS,CAAC;IACjC;;;OAGG;IACH,QAAQ,CAAC,aAAa,CAAC,EAAE,SAAS,kBAAkB,EAAE,CAAC;IACvD,uEAAuE;IACvE,QAAQ,CAAC,SAAS,CAAC,EAAE,SAAS,eAAe,EAAE,CAAC;IAChD;;;;OAIG;IACH,QAAQ,CAAC,YAAY,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IAC1C,sDAAsD;IACtD,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;CAC9B;AAED,8DAA8D;AAC9D,MAAM,WAAW,WAAW;IAC1B,uCAAuC;IACvC,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB,oEAAoE;IACpE,QAAQ,CAAC,YAAY,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IAC1C,4CAA4C;IAC5C,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;CAC5B;AAoCD;;;;;GAKG;AACH,eAAO,MAAM,aAAa,EAAE,SAAS,aAAa,EAuIjD,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,aAAa,EAAE,SAAS,WAAW,EA0C/C,CAAC"}
|
package/dist/sync/registry.js
CHANGED
|
@@ -89,10 +89,7 @@ export const SYNC_REGISTRY = [
|
|
|
89
89
|
gapTiers: "core",
|
|
90
90
|
backoffHours: 24,
|
|
91
91
|
// Provider-neutral threshold names: the audit spans Sentry, CloudWatch,
|
|
92
|
-
// X-Ray, and future providers, so no key is prefixed with a vendor.
|
|
93
|
-
// lisa-monitor skill still reads the legacy sentryMinEvents24h /
|
|
94
|
-
// xrayFaultRatePct keys — renaming those (config-resolution.md + skill)
|
|
95
|
-
// is a tracked follow-up; see ui/README.md.
|
|
92
|
+
// X-Ray, and future providers, so no key is prefixed with a vendor.
|
|
96
93
|
thresholds: {
|
|
97
94
|
minEvents24h: 1,
|
|
98
95
|
errorRateSpikeMultiplier: 2,
|
|
@@ -100,6 +97,16 @@ export const SYNC_REGISTRY = [
|
|
|
100
97
|
faultRatePct: 5,
|
|
101
98
|
},
|
|
102
99
|
},
|
|
100
|
+
legacyAliases: [
|
|
101
|
+
{
|
|
102
|
+
currentPath: "thresholds.minEvents24h",
|
|
103
|
+
legacyPath: "thresholds.sentryMinEvents24h",
|
|
104
|
+
},
|
|
105
|
+
{
|
|
106
|
+
currentPath: "thresholds.faultRatePct",
|
|
107
|
+
legacyPath: "thresholds.xrayFaultRatePct",
|
|
108
|
+
},
|
|
109
|
+
],
|
|
103
110
|
description: "Observability audit caps and alert thresholds",
|
|
104
111
|
},
|
|
105
112
|
{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"registry.js","sourceRoot":"","sources":["../../src/sync/registry.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"registry.js","sourceRoot":"","sources":["../../src/sync/registry.ts"],"names":[],"mappings":"AA4DA,MAAM,iBAAiB,GAAG,cAAc,CAAC;AACzC,MAAM,mBAAmB,GAAG,gBAAgB,CAAC;AAC7C,MAAM,kBAAkB,GAAG,eAAe,CAAC;AAC3C,MAAM,mBAAmB,GAAG,gBAAgB,CAAC;AAC7C,MAAM,kBAAkB,GAAG,eAAe,CAAC;AAC3C,MAAM,kBAAkB,GAAG,eAAe,CAAC;AAE3C,MAAM,iBAAiB,GAAc;IACnC,MAAM,EAAE,EAAE,UAAU,EAAE,EAAE,EAAE,QAAQ,EAAE,EAAE,EAAE,SAAS,EAAE,EAAE,EAAE,KAAK,EAAE,EAAE,EAAE;CACnE,CAAC;AAEF,MAAM,oBAAoB,GAAG;IAC3B,KAAK,EAAE,cAAc;IACrB,OAAO,EAAE,oBAAoB;IAC7B,OAAO,EAAE,gBAAgB;IACzB,YAAY,EAAE,cAAc;IAC5B,IAAI,EAAE;QACJ,GAAG,EAAE,eAAe;QACpB,OAAO,EAAE,eAAe;QACxB,UAAU,EAAE,aAAa;KAC1B;CACO,CAAC;AAEX,MAAM,kBAAkB,GAAc;IACpC,KAAK,EAAE,WAAW;IAClB,KAAK,EAAE,WAAW;IAClB,SAAS,EAAE,eAAe;IAC1B,OAAO,EAAE,aAAa;IACtB,QAAQ,EAAE,cAAc;IACxB,OAAO,EAAE,aAAa;IACtB,QAAQ,EAAE,cAAc;IACxB,QAAQ,EAAE,qBAAqB;CAChC,CAAC;AAEF;;;;;GAKG;AACH,MAAM,CAAC,MAAM,aAAa,GAA6B;IACrD;QACE,GAAG,EAAE,SAAS;QACd,YAAY,EAAE,QAAQ;QAC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,EAAE,uBAAuB;KACnC;IACD;QACE,GAAG,EAAE,YAAY;QACjB,YAAY,EAAE,CAAC,mBAAmB,EAAE,kBAAkB,CAAC;QACvD,SAAS,EAAE,oBAAoB;KAChC;IACD;QACE,GAAG,EAAE,aAAa;QAClB,YAAY,EAAE,CAAC,mBAAmB,EAAE,kBAAkB,CAAC;QACvD,SAAS,EAAE,oBAAoB;KAChC;IACD;QACE,GAAG,EAAE,kBAAkB;QACvB,YAAY,EAAE,CAAC,mBAAmB,EAAE,kBAAkB,CAAC;QACvD,SAAS,EAAE,oBAAoB;KAChC;IACD;QACE,GAAG,EAAE,gBAAgB;QACrB,YAAY,EAAE,CAAC,mBAAmB,CAAC;QACnC,SAAS,EAAE,oBAAoB;KAChC;IACD;QACE,GAAG,EAAE,oBAAoB;QACzB,YAAY,EAAE,CAAC,kBAAkB,CAAC;QAClC,SAAS,EAAE,oBAAoB;KAChC;IACD;QACE,GAAG,EAAE,sBAAsB;QAC3B,YAAY,EAAE,CAAC,kBAAkB,CAAC;QAClC,SAAS,EAAE,oBAAoB;KAChC;CACF,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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
|
96
96
|
},
|
|
97
97
|
"name": "@codyswann/lisa",
|
|
98
|
-
"version": "2.217.
|
|
98
|
+
"version": "2.217.6",
|
|
99
99
|
"description": "Claude Code governance framework that applies guardrails, guidance, and automated enforcement to projects",
|
|
100
100
|
"main": "dist/index.js",
|
|
101
101
|
"exports": {
|