@codyswann/lisa 2.241.0 → 2.243.0
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/core/instruction-files-migration.d.ts +38 -0
- package/dist/core/instruction-files-migration.d.ts.map +1 -1
- package/dist/core/instruction-files-migration.js +76 -7
- package/dist/core/instruction-files-migration.js.map +1 -1
- package/dist/core/learnings-projection.d.ts +38 -0
- package/dist/core/learnings-projection.d.ts.map +1 -0
- package/dist/core/learnings-projection.js +94 -0
- package/dist/core/learnings-projection.js.map +1 -0
- package/dist/core/learnings.d.ts +2 -1
- package/dist/core/learnings.d.ts.map +1 -1
- package/dist/core/learnings.js +2 -1
- package/dist/core/learnings.js.map +1 -1
- package/dist/core/lisa.d.ts +40 -0
- package/dist/core/lisa.d.ts.map +1 -1
- package/dist/core/lisa.js +90 -12
- package/dist/core/lisa.js.map +1 -1
- package/dist/core/project-config.d.ts +36 -3
- package/dist/core/project-config.d.ts.map +1 -1
- package/dist/core/project-config.js +127 -10
- package/dist/core/project-config.js.map +1 -1
- package/dist/sync/registry.js +1 -1
- package/dist/sync/registry.js.map +1 -1
- package/package.json +1 -1
- package/plugins/lisa/.claude-plugin/plugin.json +10 -1
- package/plugins/lisa/.codex-plugin/hooks.json +9 -0
- package/plugins/lisa/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa/.codex-plugin/skills/lisa-persist-learning/SKILL.md +1 -1
- package/plugins/lisa/hooks/threshold-ratchet-compare.mjs +315 -0
- package/plugins/lisa/hooks/threshold-ratchet-families.mjs +295 -0
- package/plugins/lisa/hooks/threshold-ratchet.mjs +213 -0
- package/plugins/lisa/hooks/threshold-ratchet.sh +22 -0
- package/plugins/lisa/rules/eager/config-resolution.md +6 -3
- package/plugins/lisa/rules/eager/project-learnings.md +11 -5
- package/plugins/lisa/rules/reference/config-resolution.md +2 -1
- package/plugins/lisa/rules/reference/project-learnings.md +16 -9
- package/plugins/lisa/skills/lisa-persist-learning/SKILL.md +1 -1
- package/plugins/lisa-agy/plugin.json +1 -1
- package/plugins/lisa-agy/skills/lisa-persist-learning/SKILL.md +1 -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 +10 -1
- package/plugins/lisa-copilot/hooks/threshold-ratchet-compare.mjs +315 -0
- package/plugins/lisa-copilot/hooks/threshold-ratchet-families.mjs +295 -0
- package/plugins/lisa-copilot/hooks/threshold-ratchet.mjs +213 -0
- package/plugins/lisa-copilot/hooks/threshold-ratchet.sh +22 -0
- package/plugins/lisa-copilot/rules/eager/config-resolution.md +6 -3
- package/plugins/lisa-copilot/rules/eager/project-learnings.md +11 -5
- package/plugins/lisa-copilot/rules/reference/config-resolution.md +2 -1
- package/plugins/lisa-copilot/rules/reference/project-learnings.md +16 -9
- package/plugins/lisa-copilot/skills/lisa-persist-learning/SKILL.md +1 -1
- package/plugins/lisa-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-cursor/hooks/hooks.json +4 -0
- package/plugins/lisa-cursor/hooks/threshold-ratchet-compare.mjs +315 -0
- package/plugins/lisa-cursor/hooks/threshold-ratchet-families.mjs +295 -0
- package/plugins/lisa-cursor/hooks/threshold-ratchet.mjs +213 -0
- package/plugins/lisa-cursor/hooks/threshold-ratchet.sh +22 -0
- package/plugins/lisa-cursor/rules/config-resolution-reference.mdc +2 -1
- package/plugins/lisa-cursor/rules/config-resolution.mdc +6 -3
- package/plugins/lisa-cursor/rules/project-learnings-reference.mdc +16 -9
- package/plugins/lisa-cursor/rules/project-learnings.mdc +11 -5
- package/plugins/lisa-cursor/skills/lisa-persist-learning/SKILL.md +1 -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/.claude-plugin/plugin.json +9 -0
- package/plugins/src/base/hooks/threshold-ratchet-compare.mjs +315 -0
- package/plugins/src/base/hooks/threshold-ratchet-families.mjs +295 -0
- package/plugins/src/base/hooks/threshold-ratchet.mjs +213 -0
- package/plugins/src/base/hooks/threshold-ratchet.sh +22 -0
- package/plugins/src/base/rules/eager/config-resolution.md +6 -3
- package/plugins/src/base/rules/eager/project-learnings.md +11 -5
- package/plugins/src/base/rules/reference/config-resolution.md +2 -1
- package/plugins/src/base/rules/reference/project-learnings.md +16 -9
- package/plugins/src/base/skills/lisa-persist-learning/SKILL.md +1 -1
- package/rails/copy-overwrite/lefthook.yml +6 -0
- package/rails/copy-overwrite/scripts/check-threshold-ratchet.mjs +213 -0
- package/rails/copy-overwrite/scripts/threshold-ratchet-compare.mjs +315 -0
- package/rails/copy-overwrite/scripts/threshold-ratchet-families.mjs +295 -0
- package/scripts/build-plugins.sh +20 -0
- package/scripts/check-learnings-budget.ts +1 -2
- package/scripts/lib/per-agent-hook-filter.mjs +7 -0
- package/typescript/copy-contents/.husky/pre-commit +17 -0
- package/typescript/copy-overwrite/scripts/check-threshold-ratchet.mjs +213 -0
- package/typescript/copy-overwrite/scripts/threshold-ratchet-compare.mjs +315 -0
- package/typescript/copy-overwrite/scripts/threshold-ratchet-families.mjs +295 -0
- /package/all/create-only/{.claude/rules → .lisa}/PROJECT_LEARNINGS.md +0 -0
|
@@ -17,6 +17,36 @@ export interface InstructionFilesMigrationResult {
|
|
|
17
17
|
/** Human-readable description of each action taken (empty when no-op). */
|
|
18
18
|
readonly actions: readonly string[];
|
|
19
19
|
}
|
|
20
|
+
/** Outcome of the learnings-ledger relocation. */
|
|
21
|
+
export interface LearningsRelocationResult {
|
|
22
|
+
/** True when the ledger was moved from its legacy to its new location. */
|
|
23
|
+
readonly moved: boolean;
|
|
24
|
+
/** Info line describing the completed move (present only when moved). */
|
|
25
|
+
readonly action?: string;
|
|
26
|
+
/**
|
|
27
|
+
* Warning line when both the legacy and new ledgers exist. Neither file is
|
|
28
|
+
* touched — a human reconciles — so re-runs keep surfacing it until resolved.
|
|
29
|
+
*/
|
|
30
|
+
readonly warning?: string;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Relocate the machine-managed learnings ledger from its legacy location (the
|
|
34
|
+
* sibling of `projectRulesFile`, inside an auto-loaded rules tree) to the new
|
|
35
|
+
* canonical `.lisa/PROJECT_LEARNINGS.md`. Runs during `lisa apply`/`doctor`
|
|
36
|
+
* reconciliation.
|
|
37
|
+
*
|
|
38
|
+
* Move semantics (all idempotent):
|
|
39
|
+
* - legacy present, new absent → move byte-for-byte, remove the legacy file.
|
|
40
|
+
* - both present → do NOT clobber; keep both and warn once, naming both
|
|
41
|
+
* paths, so a human decides which to keep.
|
|
42
|
+
* - legacy absent (or already relocated) → quiet no-op.
|
|
43
|
+
*
|
|
44
|
+
* The move preserves bytes exactly (read buffer, write, unlink) rather than
|
|
45
|
+
* trusting a same-filesystem rename, so it also works across mount boundaries.
|
|
46
|
+
* @param destDir - Absolute path to the host project root.
|
|
47
|
+
* @returns Whether the ledger moved, plus an info or warning line.
|
|
48
|
+
*/
|
|
49
|
+
export declare function relocateProjectLearningsLedger(destDir: string): Promise<LearningsRelocationResult>;
|
|
20
50
|
/** Options controlling the instruction-files migration. */
|
|
21
51
|
export interface MigrateInstructionFilesOptions {
|
|
22
52
|
/**
|
|
@@ -39,6 +69,14 @@ export interface MigrateInstructionFilesOptions {
|
|
|
39
69
|
* configured `projectRulesFile`.
|
|
40
70
|
*/
|
|
41
71
|
readonly projectLearningsFile?: string;
|
|
72
|
+
/**
|
|
73
|
+
* Whether to relocate a legacy ledger as part of this pass. Defaults to true
|
|
74
|
+
* (doctor's behavior). `lisa apply` sets this false because it already runs
|
|
75
|
+
* the relocation in an earlier phase (before the create-only strategy seeds
|
|
76
|
+
* an empty ledger), and re-running it here would re-emit the both-exist
|
|
77
|
+
* warning a second time in the same run.
|
|
78
|
+
*/
|
|
79
|
+
readonly relocateLearnings?: boolean;
|
|
42
80
|
}
|
|
43
81
|
/**
|
|
44
82
|
* Remove a legacy agy `LISA_RULES_START..END` block from an AGENTS.md body,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"instruction-files-migration.d.ts","sourceRoot":"","sources":["../../src/core/instruction-files-migration.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"instruction-files-migration.d.ts","sourceRoot":"","sources":["../../src/core/instruction-files-migration.ts"],"names":[],"mappings":"AA+CA;;;;GAIG;AACH,eAAO,MAAM,uBAAuB,8BAA8B,CAAC;AACnE,4EAA4E;AAC5E,eAAO,MAAM,qBAAqB,4BAA4B,CAAC;AAC/D,0EAA0E;AAC1E,eAAO,MAAM,mCAAmC,0CACP,CAAC;AAC1C,0EAA0E;AAC1E,eAAO,MAAM,iCAAiC,wCACP,CAAC;AAExC,sDAAsD;AACtD,MAAM,WAAW,+BAA+B;IAC9C,kDAAkD;IAClD,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC;IAC1B,0EAA0E;IAC1E,QAAQ,CAAC,OAAO,EAAE,SAAS,MAAM,EAAE,CAAC;CACrC;AAED,kDAAkD;AAClD,MAAM,WAAW,yBAAyB;IACxC,0EAA0E;IAC1E,QAAQ,CAAC,KAAK,EAAE,OAAO,CAAC;IACxB,yEAAyE;IACzE,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC;IACzB;;;OAGG;IACH,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC;CAC3B;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAsB,8BAA8B,CAClD,OAAO,EAAE,MAAM,GACd,OAAO,CAAC,yBAAyB,CAAC,CA8BpC;AAED,2DAA2D;AAC3D,MAAM,WAAW,8BAA8B;IAC7C;;;;;;;OAOG;IACH,QAAQ,CAAC,mBAAmB,CAAC,EAAE,OAAO,CAAC;IACvC;;;;OAIG;IACH,QAAQ,CAAC,4BAA4B,CAAC,EAAE,OAAO,CAAC;IAChD;;;OAGG;IACH,QAAQ,CAAC,oBAAoB,CAAC,EAAE,MAAM,CAAC;IACvC;;;;;;OAMG;IACH,QAAQ,CAAC,iBAAiB,CAAC,EAAE,OAAO,CAAC;CACtC;AAED;;;;;;GAMG;AACH,wBAAgB,uBAAuB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAU5D;AAED;;;;;GAKG;AACH,wBAAgB,8BAA8B,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAEnE;AAED;;;;GAIG;AACH,wBAAgB,8BAA8B,CAC5C,oBAAoB,EAAE,MAAM,GAC3B,MAAM,CAaR;AAoLD;;;;;GAKG;AACH,wBAAsB,uBAAuB,CAC3C,OAAO,EAAE,MAAM,EACf,OAAO,GAAE,8BAAmC,GAC3C,OAAO,CAAC,+BAA+B,CAAC,CAmB1C"}
|
|
@@ -21,13 +21,15 @@
|
|
|
21
21
|
* Lisa-managed agy marker block. Everything else is additive.
|
|
22
22
|
* @module core/instruction-files-migration
|
|
23
23
|
*/
|
|
24
|
+
import * as fse from "fs-extra";
|
|
24
25
|
import { existsSync } from "node:fs";
|
|
25
|
-
import { readFile, writeFile } from "node:fs/promises";
|
|
26
|
+
import { readFile, rm, writeFile } from "node:fs/promises";
|
|
26
27
|
import * as path from "node:path";
|
|
27
28
|
import { AGENTS_MD_FILENAME, installAgentsMd, } from "../codex/agents-md-installer.js";
|
|
28
29
|
import { CLAUDE_MD_AGENTS_IMPORT, CLAUDE_MD_FILENAME, installClaudeMd, } from "../claude/claude-md-installer.js";
|
|
29
30
|
import { harnessIncludesAgent } from "./config.js";
|
|
30
|
-
import {
|
|
31
|
+
import { assertSafeLearningParents, resolveSafeLearningTarget, } from "./learnings-file-safety.js";
|
|
32
|
+
import { readProjectConfig, resolveLegacyProjectLearningsFile, resolveProjectLearningsFile, } from "./project-config.js";
|
|
31
33
|
/**
|
|
32
34
|
* Marker that opened the legacy agy "baked rules" block in `AGENTS.md`. Retained
|
|
33
35
|
* here (after the agy AGENTS.md installer was removed) so the migration can
|
|
@@ -40,6 +42,54 @@ export const LISA_RULES_END_MARKER = "<!-- LISA_RULES_END -->";
|
|
|
40
42
|
export const LISA_PROJECT_LEARNINGS_START_MARKER = "<!-- LISA_PROJECT_LEARNINGS_START -->";
|
|
41
43
|
/** Marker closing Lisa's bounded Antigravity project-learnings bridge. */
|
|
42
44
|
export const LISA_PROJECT_LEARNINGS_END_MARKER = "<!-- LISA_PROJECT_LEARNINGS_END -->";
|
|
45
|
+
/**
|
|
46
|
+
* Relocate the machine-managed learnings ledger from its legacy location (the
|
|
47
|
+
* sibling of `projectRulesFile`, inside an auto-loaded rules tree) to the new
|
|
48
|
+
* canonical `.lisa/PROJECT_LEARNINGS.md`. Runs during `lisa apply`/`doctor`
|
|
49
|
+
* reconciliation.
|
|
50
|
+
*
|
|
51
|
+
* Move semantics (all idempotent):
|
|
52
|
+
* - legacy present, new absent → move byte-for-byte, remove the legacy file.
|
|
53
|
+
* - both present → do NOT clobber; keep both and warn once, naming both
|
|
54
|
+
* paths, so a human decides which to keep.
|
|
55
|
+
* - legacy absent (or already relocated) → quiet no-op.
|
|
56
|
+
*
|
|
57
|
+
* The move preserves bytes exactly (read buffer, write, unlink) rather than
|
|
58
|
+
* trusting a same-filesystem rename, so it also works across mount boundaries.
|
|
59
|
+
* @param destDir - Absolute path to the host project root.
|
|
60
|
+
* @returns Whether the ledger moved, plus an info or warning line.
|
|
61
|
+
*/
|
|
62
|
+
export async function relocateProjectLearningsLedger(destDir) {
|
|
63
|
+
const config = await readProjectConfig(destDir);
|
|
64
|
+
const legacyRelative = resolveLegacyProjectLearningsFile(config);
|
|
65
|
+
const targetRelative = resolveProjectLearningsFile(config);
|
|
66
|
+
if (legacyRelative === targetRelative) {
|
|
67
|
+
return { moved: false };
|
|
68
|
+
}
|
|
69
|
+
const legacyPath = path.join(destDir, legacyRelative);
|
|
70
|
+
if (!existsSync(legacyPath)) {
|
|
71
|
+
return { moved: false };
|
|
72
|
+
}
|
|
73
|
+
// Resolve and containment-check the target the same way the writers do, so
|
|
74
|
+
// doctor's direct path is as guarded as apply's — a symlinked parent that
|
|
75
|
+
// escapes the project root throws before any bytes are written.
|
|
76
|
+
const { root, target } = resolveSafeLearningTarget(destDir, targetRelative);
|
|
77
|
+
if (existsSync(target)) {
|
|
78
|
+
return {
|
|
79
|
+
moved: false,
|
|
80
|
+
warning: `Learnings ledger exists at BOTH ${legacyRelative} and ${targetRelative}. Keeping both untouched. The canonical location is ${targetRelative} — copy any entries you want to keep into it, then delete ${legacyRelative}.`,
|
|
81
|
+
};
|
|
82
|
+
}
|
|
83
|
+
await assertSafeLearningParents(root, path.dirname(target));
|
|
84
|
+
const contents = await readFile(legacyPath);
|
|
85
|
+
await fse.ensureDir(path.dirname(target));
|
|
86
|
+
await writeFile(target, contents);
|
|
87
|
+
await rm(legacyPath);
|
|
88
|
+
return {
|
|
89
|
+
moved: true,
|
|
90
|
+
action: `moved learnings ledger ${legacyRelative} -> ${targetRelative}`,
|
|
91
|
+
};
|
|
92
|
+
}
|
|
43
93
|
/**
|
|
44
94
|
* Remove a legacy agy `LISA_RULES_START..END` block from an AGENTS.md body,
|
|
45
95
|
* collapsing the whitespace left behind. Returns the original string unchanged
|
|
@@ -76,10 +126,11 @@ export function buildAgyProjectLearningsBridge(projectLearningsFile) {
|
|
|
76
126
|
return [
|
|
77
127
|
LISA_PROJECT_LEARNINGS_START_MARKER,
|
|
78
128
|
"Antigravity startup bridge: before normal task work, resolve the canonical",
|
|
79
|
-
"project-learnings
|
|
80
|
-
"`
|
|
81
|
-
"
|
|
82
|
-
"
|
|
129
|
+
"machine-managed project-learnings ledger from `.lisa.config.json` (the",
|
|
130
|
+
"optional `learnings.file` override, else the default `.lisa/PROJECT_LEARNINGS.md`).",
|
|
131
|
+
"Consume it only through the Lisa learnings contract's bounded projection — never",
|
|
132
|
+
"read the raw ledger wholesale into context. If it is absent, continue silently.",
|
|
133
|
+
"If it is malformed, warn once and ignore it.",
|
|
83
134
|
"",
|
|
84
135
|
`Resolved path for this project: \`${projectLearningsFile}\`.`,
|
|
85
136
|
LISA_PROJECT_LEARNINGS_END_MARKER,
|
|
@@ -202,6 +253,23 @@ async function reconcileClaudeMd(destDir, createIfMissing) {
|
|
|
202
253
|
await writeFile(filePath, prefix + existing, "utf8");
|
|
203
254
|
return [`added ${CLAUDE_MD_AGENTS_IMPORT} import to ${CLAUDE_MD_FILENAME}`];
|
|
204
255
|
}
|
|
256
|
+
/**
|
|
257
|
+
* Relocate the legacy ledger and flatten the result into action strings, unless
|
|
258
|
+
* the caller already ran the relocation in an earlier phase (`enabled` false).
|
|
259
|
+
* @param destDir - Absolute path to the host project root.
|
|
260
|
+
* @param enabled - Whether to run the relocation in this pass.
|
|
261
|
+
* @returns Action/warning strings (empty when disabled or a no-op).
|
|
262
|
+
*/
|
|
263
|
+
async function collectLearningsRelocationActions(destDir, enabled) {
|
|
264
|
+
if (!enabled) {
|
|
265
|
+
return [];
|
|
266
|
+
}
|
|
267
|
+
const relocation = await relocateProjectLearningsLedger(destDir);
|
|
268
|
+
return [
|
|
269
|
+
...(relocation.action === undefined ? [] : [relocation.action]),
|
|
270
|
+
...(relocation.warning === undefined ? [] : [relocation.warning]),
|
|
271
|
+
];
|
|
272
|
+
}
|
|
205
273
|
/**
|
|
206
274
|
* Run the instruction-files migration against a host project root.
|
|
207
275
|
* @param destDir - Absolute path to the host project root.
|
|
@@ -217,9 +285,10 @@ export async function migrateInstructionFiles(destDir, options = {}) {
|
|
|
217
285
|
projectLearningsFile: options.projectLearningsFile ??
|
|
218
286
|
resolveProjectLearningsFile(projectConfig),
|
|
219
287
|
};
|
|
288
|
+
const relocationActions = await collectLearningsRelocationActions(destDir, options.relocateLearnings ?? true);
|
|
220
289
|
const agentsActions = await reconcileAgentsMd(destDir, agyProjectLearnings);
|
|
221
290
|
const claudeActions = await reconcileClaudeMd(destDir, createClaudePointer);
|
|
222
|
-
const actions = [...agentsActions, ...claudeActions];
|
|
291
|
+
const actions = [...relocationActions, ...agentsActions, ...claudeActions];
|
|
223
292
|
return { changed: actions.length > 0, actions };
|
|
224
293
|
}
|
|
225
294
|
//# sourceMappingURL=instruction-files-migration.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"instruction-files-migration.js","sourceRoot":"","sources":["../../src/core/instruction-files-migration.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"instruction-files-migration.js","sourceRoot":"","sources":["../../src/core/instruction-files-migration.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,OAAO,KAAK,GAAG,MAAM,UAAU,CAAC;AAChC,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC3D,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAClC,OAAO,EACL,kBAAkB,EAClB,eAAe,GAChB,MAAM,iCAAiC,CAAC;AACzC,OAAO,EACL,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BAAmB,GAAG,OAAO,CAAC,mBAAmB,IAAI,IAAI,CAAC;IAChE,MAAM,mBAAmB,GAAG;QAC1B,OAAO,EACL,OAAO,CAAC,4BAA4B;YACpC,oBAAoB,CAAC,aAAa,CAAC,OAAO,IAAI,QAAQ,EAAE,KAAK,CAAC;QAChE,oBAAoB,EAClB,OAAO,CAAC,oBAAoB;YAC5B,2BAA2B,CAAC,aAAa,CAAC;KAC7C,CAAC;IACF,MAAM,iBAAiB,GAAG,MAAM,iCAAiC,CAC/D,OAAO,EACP,OAAO,CAAC,iBAAiB,IAAI,IAAI,CAClC,CAAC;IACF,MAAM,aAAa,GAAG,MAAM,iBAAiB,CAAC,OAAO,EAAE,mBAAmB,CAAC,CAAC;IAC5E,MAAM,aAAa,GAAG,MAAM,iBAAiB,CAAC,OAAO,EAAE,mBAAmB,CAAC,CAAC;IAC5E,MAAM,OAAO,GAAG,CAAC,GAAG,iBAAiB,EAAE,GAAG,aAAa,EAAE,GAAG,aAAa,CAAC,CAAC;IAC3E,OAAO,EAAE,OAAO,EAAE,OAAO,CAAC,MAAM,GAAG,CAAC,EAAE,OAAO,EAAE,CAAC;AAClD,CAAC"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Bounded serving projection over validated project-learnings entries.
|
|
3
|
+
*
|
|
4
|
+
* The ledger lives cold on disk at `.lisa/PROJECT_LEARNINGS.md` and is never
|
|
5
|
+
* raw-injected into any agent session. Consumers request a *projection* — the
|
|
6
|
+
* highest-priority slice that fits inside the shared token/entry budget — so a
|
|
7
|
+
* ledger that grows past what any session should carry still yields a bounded,
|
|
8
|
+
* deterministic view. This module is pure: it never touches disk and never
|
|
9
|
+
* mutates the caller's array.
|
|
10
|
+
* @module learnings-projection
|
|
11
|
+
*/
|
|
12
|
+
import { type LearningEntry } from "./learnings-contract.js";
|
|
13
|
+
/** The bounded slice the contract serves, plus how many entries it dropped. */
|
|
14
|
+
export interface LearningsProjection {
|
|
15
|
+
/** Highest-priority entries that fit the budget, in serving order. */
|
|
16
|
+
readonly entries: readonly LearningEntry[];
|
|
17
|
+
/** How many validated entries were left out of the served slice. */
|
|
18
|
+
readonly omittedCount: number;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Compute the bounded serving projection: the top entries by
|
|
22
|
+
* {@link compareForProjection} accumulated in priority order until the next
|
|
23
|
+
* entry would exceed either the entry-count or the token budget, at which point
|
|
24
|
+
* accumulation stops (a greedy priority prefix, never skipping a high-priority
|
|
25
|
+
* entry to fit a lower-priority one).
|
|
26
|
+
*
|
|
27
|
+
* Token accounting mirrors the on-disk document exactly: the fixed document
|
|
28
|
+
* wrapper ({@link DOCUMENT_WRAPPER_TOKENS} — header + JSONL fences) is subtracted
|
|
29
|
+
* from `maxTokens` once, and each entry costs the byte length of its canonical
|
|
30
|
+
* `JSON.stringify` rendering plus, for every entry after the first, the single
|
|
31
|
+
* `\n` that joins it to the previous line. So `kept.tokens + wrapper` equals the
|
|
32
|
+
* byte length of `renderLearningsFile(projection.entries)`, the same quantity the
|
|
33
|
+
* budget gate measures.
|
|
34
|
+
* @param entries - Validated learning entries (any order)
|
|
35
|
+
* @returns The served slice and the count of entries it omitted
|
|
36
|
+
*/
|
|
37
|
+
export declare function projectLearnings(entries: readonly LearningEntry[]): LearningsProjection;
|
|
38
|
+
//# sourceMappingURL=learnings-projection.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"learnings-projection.d.ts","sourceRoot":"","sources":["../../src/core/learnings-projection.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AACH,OAAO,EAIL,KAAK,aAAa,EACnB,MAAM,yBAAyB,CAAC;AAGjC,+EAA+E;AAC/E,MAAM,WAAW,mBAAmB;IAClC,sEAAsE;IACtE,QAAQ,CAAC,OAAO,EAAE,SAAS,aAAa,EAAE,CAAC;IAC3C,oEAAoE;IACpE,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;CAC/B;AAyDD;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,gBAAgB,CAC9B,OAAO,EAAE,SAAS,aAAa,EAAE,GAChC,mBAAmB,CA8BrB"}
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Bounded serving projection over validated project-learnings entries.
|
|
3
|
+
*
|
|
4
|
+
* The ledger lives cold on disk at `.lisa/PROJECT_LEARNINGS.md` and is never
|
|
5
|
+
* raw-injected into any agent session. Consumers request a *projection* — the
|
|
6
|
+
* highest-priority slice that fits inside the shared token/entry budget — so a
|
|
7
|
+
* ledger that grows past what any session should carry still yields a bounded,
|
|
8
|
+
* deterministic view. This module is pure: it never touches disk and never
|
|
9
|
+
* mutates the caller's array.
|
|
10
|
+
* @module learnings-projection
|
|
11
|
+
*/
|
|
12
|
+
import { LEARNINGS_CONTRACT, estimateLearningTokens, } from "./learnings-contract.js";
|
|
13
|
+
import { renderLearningsFile } from "./learnings-document.js";
|
|
14
|
+
/** Serving priority of each confidence level (higher wins). */
|
|
15
|
+
const CONFIDENCE_RANK = Object.freeze({
|
|
16
|
+
high: 3,
|
|
17
|
+
medium: 2,
|
|
18
|
+
low: 1,
|
|
19
|
+
});
|
|
20
|
+
/**
|
|
21
|
+
* Byte cost of the canonical document wrapper — the header, the JSONL code
|
|
22
|
+
* fences, and their separators — measured once from an empty render. The serving
|
|
23
|
+
* slice must fit inside the same budget the on-disk document is checked against,
|
|
24
|
+
* so this fixed overhead is subtracted from `maxTokens` before entries are
|
|
25
|
+
* accumulated. Deterministic: `renderLearningsFile([])` has no entry bytes.
|
|
26
|
+
*/
|
|
27
|
+
const DOCUMENT_WRAPPER_TOKENS = estimateLearningTokens(renderLearningsFile([]));
|
|
28
|
+
/** Byte cost of the single `\n` that joins one rendered entry to the previous. */
|
|
29
|
+
const ENTRY_SEPARATOR_TOKENS = estimateLearningTokens("\n");
|
|
30
|
+
/**
|
|
31
|
+
* Order two entries by serving priority: confidence descending
|
|
32
|
+
* (`high` > `medium` > `low`), then `last_confirmed` descending (ISO dates sort
|
|
33
|
+
* lexicographically), then `id` ascending as a stable tiebreak.
|
|
34
|
+
* @param left - First entry
|
|
35
|
+
* @param right - Second entry
|
|
36
|
+
* @returns Negative when `left` sorts first, positive when `right` does
|
|
37
|
+
*/
|
|
38
|
+
function compareForProjection(left, right) {
|
|
39
|
+
const byConfidence = CONFIDENCE_RANK[right.confidence] - CONFIDENCE_RANK[left.confidence];
|
|
40
|
+
if (byConfidence !== 0) {
|
|
41
|
+
return byConfidence;
|
|
42
|
+
}
|
|
43
|
+
if (left.last_confirmed !== right.last_confirmed) {
|
|
44
|
+
return left.last_confirmed < right.last_confirmed ? 1 : -1;
|
|
45
|
+
}
|
|
46
|
+
// Codepoint comparison (not localeCompare) so the tiebreak is deterministic
|
|
47
|
+
// and locale-independent across every runtime that serves the projection.
|
|
48
|
+
if (left.id === right.id) {
|
|
49
|
+
return 0;
|
|
50
|
+
}
|
|
51
|
+
return left.id < right.id ? -1 : 1;
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* Compute the bounded serving projection: the top entries by
|
|
55
|
+
* {@link compareForProjection} accumulated in priority order until the next
|
|
56
|
+
* entry would exceed either the entry-count or the token budget, at which point
|
|
57
|
+
* accumulation stops (a greedy priority prefix, never skipping a high-priority
|
|
58
|
+
* entry to fit a lower-priority one).
|
|
59
|
+
*
|
|
60
|
+
* Token accounting mirrors the on-disk document exactly: the fixed document
|
|
61
|
+
* wrapper ({@link DOCUMENT_WRAPPER_TOKENS} — header + JSONL fences) is subtracted
|
|
62
|
+
* from `maxTokens` once, and each entry costs the byte length of its canonical
|
|
63
|
+
* `JSON.stringify` rendering plus, for every entry after the first, the single
|
|
64
|
+
* `\n` that joins it to the previous line. So `kept.tokens + wrapper` equals the
|
|
65
|
+
* byte length of `renderLearningsFile(projection.entries)`, the same quantity the
|
|
66
|
+
* budget gate measures.
|
|
67
|
+
* @param entries - Validated learning entries (any order)
|
|
68
|
+
* @returns The served slice and the count of entries it omitted
|
|
69
|
+
*/
|
|
70
|
+
export function projectLearnings(entries) {
|
|
71
|
+
const ordered = [...entries].sort(compareForProjection);
|
|
72
|
+
const entryBudget = LEARNINGS_CONTRACT.maxTokens - DOCUMENT_WRAPPER_TOKENS;
|
|
73
|
+
const accumulated = ordered.reduce((accumulator, entry) => {
|
|
74
|
+
if (accumulator.stopped) {
|
|
75
|
+
return accumulator;
|
|
76
|
+
}
|
|
77
|
+
const separator = accumulator.kept.length === 0 ? 0 : ENTRY_SEPARATOR_TOKENS;
|
|
78
|
+
const incremental = separator + estimateLearningTokens(JSON.stringify(entry));
|
|
79
|
+
if (accumulator.kept.length >= LEARNINGS_CONTRACT.maxEntries ||
|
|
80
|
+
accumulator.tokens + incremental > entryBudget) {
|
|
81
|
+
return { ...accumulator, stopped: true };
|
|
82
|
+
}
|
|
83
|
+
return {
|
|
84
|
+
kept: [...accumulator.kept, entry],
|
|
85
|
+
tokens: accumulator.tokens + incremental,
|
|
86
|
+
stopped: false,
|
|
87
|
+
};
|
|
88
|
+
}, { kept: [], tokens: 0, stopped: false });
|
|
89
|
+
return {
|
|
90
|
+
entries: accumulated.kept,
|
|
91
|
+
omittedCount: entries.length - accumulated.kept.length,
|
|
92
|
+
};
|
|
93
|
+
}
|
|
94
|
+
//# sourceMappingURL=learnings-projection.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"learnings-projection.js","sourceRoot":"","sources":["../../src/core/learnings-projection.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AACH,OAAO,EACL,kBAAkB,EAClB,sBAAsB,GAGvB,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AAU9D,+DAA+D;AAC/D,MAAM,eAAe,GACnB,MAAM,CAAC,MAAM,CAAC;IACZ,IAAI,EAAE,CAAC;IACP,MAAM,EAAE,CAAC;IACT,GAAG,EAAE,CAAC;CACP,CAAC,CAAC;AAEL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WAAW,CAAC;QACrB,CAAC;QACD,MAAM,SAAS,GACb,WAAW,CAAC,IAAI,CAAC,MAAM,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,sBAAsB,CAAC;QAC7D,MAAM,WAAW,GACf,SAAS,GAAG,sBAAsB,CAAC,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC,CAAC;QAC5D,IACE,WAAW,CAAC,IAAI,CAAC,MAAM,IAAI,kBAAkB,CAAC,UAAU;YACxD,WAAW,CAAC,MAAM,GAAG,WAAW,GAAG,WAAW,EAC9C,CAAC;YACD,OAAO,EAAE,GAAG,WAAW,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;QAC3C,CAAC;QACD,OAAO;YACL,IAAI,EAAE,CAAC,GAAG,WAAW,CAAC,IAAI,EAAE,KAAK,CAAC;YAClC,MAAM,EAAE,WAAW,CAAC,MAAM,GAAG,WAAW;YACxC,OAAO,EAAE,KAAK;SACf,CAAC;IACJ,CAAC,EACD,EAAE,IAAI,EAAE,EAAE,EAAE,MAAM,EAAE,CAAC,EAAE,OAAO,EAAE,KAAK,EAAE,CACxC,CAAC;IACF,OAAO;QACL,OAAO,EAAE,WAAW,CAAC,IAAI;QACzB,YAAY,EAAE,OAAO,CAAC,MAAM,GAAG,WAAW,CAAC,IAAI,CAAC,MAAM;KACvD,CAAC;AACJ,CAAC"}
|
package/dist/core/learnings.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export * from "./learnings-contract.js";
|
|
2
|
+
export * from "./learnings-projection.js";
|
|
2
3
|
export * from "./learnings-writer.js";
|
|
3
|
-
export { DEFAULT_PROJECT_RULES_FILE, PROJECT_LEARNINGS_FILENAME, readProjectConfig, resolveProjectLearningsFile, resolveProjectRulesFile, type ProjectConfig, } from "./project-config.js";
|
|
4
|
+
export { DEFAULT_PROJECT_LEARNINGS_FILE, DEFAULT_PROJECT_RULES_FILE, PROJECT_LEARNINGS_FILENAME, readProjectConfig, resolveLegacyProjectLearningsFile, resolveProjectLearningsFile, resolveProjectRulesFile, type LearningsConfig, type ProjectConfig, } from "./project-config.js";
|
|
4
5
|
//# sourceMappingURL=learnings.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"learnings.d.ts","sourceRoot":"","sources":["../../src/core/learnings.ts"],"names":[],"mappings":"AAAA,cAAc,yBAAyB,CAAC;AACxC,cAAc,uBAAuB,CAAC;AACtC,OAAO,EACL,0BAA0B,EAC1B,0BAA0B,EAC1B,iBAAiB,EACjB,2BAA2B,EAC3B,uBAAuB,EACvB,KAAK,aAAa,GACnB,MAAM,qBAAqB,CAAC"}
|
|
1
|
+
{"version":3,"file":"learnings.d.ts","sourceRoot":"","sources":["../../src/core/learnings.ts"],"names":[],"mappings":"AAAA,cAAc,yBAAyB,CAAC;AACxC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,uBAAuB,CAAC;AACtC,OAAO,EACL,8BAA8B,EAC9B,0BAA0B,EAC1B,0BAA0B,EAC1B,iBAAiB,EACjB,iCAAiC,EACjC,2BAA2B,EAC3B,uBAAuB,EACvB,KAAK,eAAe,EACpB,KAAK,aAAa,GACnB,MAAM,qBAAqB,CAAC"}
|
package/dist/core/learnings.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export * from "./learnings-contract.js";
|
|
2
|
+
export * from "./learnings-projection.js";
|
|
2
3
|
export * from "./learnings-writer.js";
|
|
3
|
-
export { DEFAULT_PROJECT_RULES_FILE, PROJECT_LEARNINGS_FILENAME, readProjectConfig, resolveProjectLearningsFile, resolveProjectRulesFile, } from "./project-config.js";
|
|
4
|
+
export { DEFAULT_PROJECT_LEARNINGS_FILE, DEFAULT_PROJECT_RULES_FILE, PROJECT_LEARNINGS_FILENAME, readProjectConfig, resolveLegacyProjectLearningsFile, resolveProjectLearningsFile, resolveProjectRulesFile, } from "./project-config.js";
|
|
4
5
|
//# sourceMappingURL=learnings.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"learnings.js","sourceRoot":"","sources":["../../src/core/learnings.ts"],"names":[],"mappings":"AAAA,cAAc,yBAAyB,CAAC;AACxC,cAAc,uBAAuB,CAAC;AACtC,OAAO,EACL,0BAA0B,EAC1B,0BAA0B,EAC1B,iBAAiB,EACjB,2BAA2B,EAC3B,uBAAuB,
|
|
1
|
+
{"version":3,"file":"learnings.js","sourceRoot":"","sources":["../../src/core/learnings.ts"],"names":[],"mappings":"AAAA,cAAc,yBAAyB,CAAC;AACxC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,uBAAuB,CAAC;AACtC,OAAO,EACL,8BAA8B,EAC9B,0BAA0B,EAC1B,0BAA0B,EAC1B,iBAAiB,EACjB,iCAAiC,EACjC,2BAA2B,EAC3B,uBAAuB,GAGxB,MAAM,qBAAqB,CAAC"}
|
package/dist/core/lisa.d.ts
CHANGED
|
@@ -80,6 +80,13 @@ export declare class Lisa {
|
|
|
80
80
|
private projectLearningsFile;
|
|
81
81
|
/** Whether the canonical all/create-only learnings source is registered. */
|
|
82
82
|
private projectLearningsTemplateRegistered;
|
|
83
|
+
/**
|
|
84
|
+
* True when a populated legacy ledger exists and the new `.lisa/` destination
|
|
85
|
+
* does not yet — the create-only strategy must NOT seed an empty ledger over
|
|
86
|
+
* it, or the pending relocation would collide (both-exist no-clobber) and
|
|
87
|
+
* strand the real entries at the raw-injected legacy path.
|
|
88
|
+
*/
|
|
89
|
+
private suppressLearningsSeedForRelocation;
|
|
83
90
|
private readonly separator;
|
|
84
91
|
private readonly lisaignoreSuffix;
|
|
85
92
|
/**
|
|
@@ -424,6 +431,21 @@ export declare class Lisa {
|
|
|
424
431
|
* mode and on harness modes that don't include OpenCode.
|
|
425
432
|
*/
|
|
426
433
|
private processOpencodeEmit;
|
|
434
|
+
/**
|
|
435
|
+
* Relocate a legacy `.claude/rules/PROJECT_LEARNINGS.md` ledger to the new
|
|
436
|
+
* cold `.lisa/PROJECT_LEARNINGS.md` BEFORE the create-only strategy would
|
|
437
|
+
* seed an empty ledger at the new path — otherwise both would exist and the
|
|
438
|
+
* real entries would be stranded at the legacy location.
|
|
439
|
+
*
|
|
440
|
+
* Runs even on the postinstall/bootstrap skip path: that guard exists to
|
|
441
|
+
* suppress agent-surface EMISSIONS, but moving machine-managed state under
|
|
442
|
+
* `.lisa/` is not an agent emission and is safe headless. Skipping it there
|
|
443
|
+
* was the exact defect that stranded populated legacy ledgers on the fleet
|
|
444
|
+
* upgrade path (create-only still seeds an empty `.lisa/` ledger, so every
|
|
445
|
+
* later run then hits the both-exist no-clobber warning). Only dry-run is
|
|
446
|
+
* exempt. Idempotent; logs one line on a move and one warning when both exist.
|
|
447
|
+
*/
|
|
448
|
+
private processLearningsRelocation;
|
|
427
449
|
/**
|
|
428
450
|
* Reconcile the project's agent instruction files onto Lisa's canonical
|
|
429
451
|
* pattern after the per-harness emits run.
|
|
@@ -498,6 +520,24 @@ export declare class Lisa {
|
|
|
498
520
|
* @returns Whether the path is the registered project learnings destination
|
|
499
521
|
*/
|
|
500
522
|
private isProjectLearningsPath;
|
|
523
|
+
/**
|
|
524
|
+
* Whether the create-only strategy must skip seeding the empty ledger because
|
|
525
|
+
* a populated legacy ledger is pending relocation into this destination.
|
|
526
|
+
* @param isProjectLearnings - Whether the candidate is the ledger destination
|
|
527
|
+
* @param strategyName - Strategy that would apply the file
|
|
528
|
+
* @returns True when the empty seed must be suppressed
|
|
529
|
+
*/
|
|
530
|
+
private isSuppressedLearningsSeed;
|
|
531
|
+
/**
|
|
532
|
+
* The other-type owner of a create-only path, when a more-specific stack owns
|
|
533
|
+
* it and would otherwise be overwritten by this pass — else undefined. Flat
|
|
534
|
+
* predicate so the file router stays under its complexity budget.
|
|
535
|
+
* @param relativePath - Path relative to the strategy source directory
|
|
536
|
+
* @param strategyName - Strategy that would apply the file
|
|
537
|
+
* @param currentType - Project type currently being processed
|
|
538
|
+
* @returns The owning type to defer to, or undefined when none applies
|
|
539
|
+
*/
|
|
540
|
+
private createOnlyOverrideOwner;
|
|
501
541
|
/**
|
|
502
542
|
* Decide whether a candidate source file should be passed to its strategy.
|
|
503
543
|
* Centralizes three independent skip rules that all need to short-circuit
|
package/dist/core/lisa.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lisa.d.ts","sourceRoot":"","sources":["../../src/core/lisa.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AA0BnD,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAOzD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AACnD,OAAO,EACL,iBAAiB,EAGlB,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAAE,gBAAgB,EAAwB,MAAM,wBAAwB,CAAC;AAChF,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAc9D,OAAO,KAAK,EAIV,UAAU,EACV,UAAU,EAGX,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"lisa.d.ts","sourceRoot":"","sources":["../../src/core/lisa.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AA0BnD,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAOzD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AACnD,OAAO,EACL,iBAAiB,EAGlB,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAAE,gBAAgB,EAAwB,MAAM,wBAAwB,CAAC;AAChF,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAc9D,OAAO,KAAK,EAIV,UAAU,EACV,UAAU,EAGX,MAAM,aAAa,CAAC;AAcrB,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAkBpD;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAC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