@codyswann/lisa 2.277.3 → 2.278.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/cli/index.d.ts.map +1 -1
- package/dist/cli/index.js +5 -2
- package/dist/cli/index.js.map +1 -1
- package/dist/cli/setup-project.d.ts.map +1 -1
- package/dist/cli/setup-project.js +12 -0
- package/dist/cli/setup-project.js.map +1 -1
- package/dist/cli/ui-automations-adapters.d.ts +22 -0
- package/dist/cli/ui-automations-adapters.d.ts.map +1 -1
- package/dist/cli/ui-automations-adapters.js +24 -12
- package/dist/cli/ui-automations-adapters.js.map +1 -1
- package/dist/cli/ui-automations.d.ts +1 -0
- package/dist/cli/ui-automations.d.ts.map +1 -1
- package/dist/cli/ui-automations.js +1 -0
- package/dist/cli/ui-automations.js.map +1 -1
- package/dist/cli/ui-cmd.d.ts +4 -1
- package/dist/cli/ui-cmd.d.ts.map +1 -1
- package/dist/cli/ui-cmd.js +72 -17
- package/dist/cli/ui-cmd.js.map +1 -1
- package/dist/cli/ui-confined-project-read.d.ts +22 -0
- package/dist/cli/ui-confined-project-read.d.ts.map +1 -0
- package/dist/cli/ui-confined-project-read.js +38 -0
- package/dist/cli/ui-confined-project-read.js.map +1 -0
- package/dist/cli/ui-deploy-pipeline.d.ts.map +1 -1
- package/dist/cli/ui-deploy-pipeline.js +4 -15
- package/dist/cli/ui-deploy-pipeline.js.map +1 -1
- package/dist/cli/ui-detected-stacks.d.ts +9 -8
- package/dist/cli/ui-detected-stacks.d.ts.map +1 -1
- package/dist/cli/ui-detected-stacks.js +111 -0
- package/dist/cli/ui-detected-stacks.js.map +1 -1
- package/dist/cli/ui-github-repo-gh.d.ts +6 -0
- package/dist/cli/ui-github-repo-gh.d.ts.map +1 -1
- package/dist/cli/ui-github-repo-gh.js.map +1 -1
- package/dist/cli/ui-github-repo-map.d.ts.map +1 -1
- package/dist/cli/ui-github-repo-map.js +26 -1
- package/dist/cli/ui-github-repo-map.js.map +1 -1
- package/dist/cli/ui-setup-readiness-config.d.ts +28 -0
- package/dist/cli/ui-setup-readiness-config.d.ts.map +1 -0
- package/dist/cli/ui-setup-readiness-config.js +116 -0
- package/dist/cli/ui-setup-readiness-config.js.map +1 -0
- package/dist/cli/ui-setup-readiness-contract.d.ts +32 -0
- package/dist/cli/ui-setup-readiness-contract.d.ts.map +1 -0
- package/dist/cli/ui-setup-readiness-contract.js +61 -0
- package/dist/cli/ui-setup-readiness-contract.js.map +1 -0
- package/dist/cli/ui-setup-readiness-install.d.ts +24 -0
- package/dist/cli/ui-setup-readiness-install.d.ts.map +1 -0
- package/dist/cli/ui-setup-readiness-install.js +207 -0
- package/dist/cli/ui-setup-readiness-install.js.map +1 -0
- package/dist/cli/ui-setup-readiness-local.d.ts +40 -0
- package/dist/cli/ui-setup-readiness-local.d.ts.map +1 -0
- package/dist/cli/ui-setup-readiness-local.js +235 -0
- package/dist/cli/ui-setup-readiness-local.js.map +1 -0
- package/dist/cli/ui-setup-readiness-remote.d.ts +30 -0
- package/dist/cli/ui-setup-readiness-remote.d.ts.map +1 -0
- package/dist/cli/ui-setup-readiness-remote.js +108 -0
- package/dist/cli/ui-setup-readiness-remote.js.map +1 -0
- package/dist/cli/ui-setup-readiness.d.ts +52 -0
- package/dist/cli/ui-setup-readiness.d.ts.map +1 -0
- package/dist/cli/ui-setup-readiness.js +125 -0
- package/dist/cli/ui-setup-readiness.js.map +1 -0
- package/dist/core/upstream-evidence-manifest.d.ts.map +1 -1
- package/dist/core/upstream-evidence-manifest.js +14 -2
- package/dist/core/upstream-evidence-manifest.js.map +1 -1
- package/dist/health/read-only-fs.d.ts +7 -0
- package/dist/health/read-only-fs.d.ts.map +1 -1
- package/dist/health/read-only-fs.js +40 -1
- package/dist/health/read-only-fs.js.map +1 -1
- package/dist/sync/registry.d.ts +14 -0
- package/dist/sync/registry.d.ts.map +1 -1
- package/dist/sync/registry.js +54 -15
- package/dist/sync/registry.js.map +1 -1
- 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/scripts/automation-status-codex-adapter.mjs +270 -23
- package/plugins/lisa-agy/plugin.json +1 -1
- package/plugins/lisa-agy/scripts/automation-status-codex-adapter.mjs +270 -23
- 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/scripts/automation-status-codex-adapter.mjs +270 -23
- package/plugins/lisa-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-cursor/scripts/automation-status-codex-adapter.mjs +270 -23
- 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/scripts/automation-status-codex-adapter.mjs +270 -23
- package/ui/index.html +1 -1
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/** Presence-only GitHub and scheduler evidence for Setup readiness. */
|
|
2
|
+
import type { ProbeResult } from "./ui-status.js";
|
|
3
|
+
import type { HealthResult } from "../health/contract.js";
|
|
4
|
+
import type { GithubRepoPanelValue } from "./ui-github-repo.js";
|
|
5
|
+
import type { AutomationsProbeValue } from "./ui-automations.js";
|
|
6
|
+
import type { DeployPipelineValue } from "./ui-deploy-pipeline.js";
|
|
7
|
+
import { type SetupReadinessFinding } from "./ui-setup-readiness-contract.js";
|
|
8
|
+
/**
|
|
9
|
+
* Map bounded GitHub live data to governance readiness.
|
|
10
|
+
* @param health - Current deterministic Health evidence, when available
|
|
11
|
+
* @param github - Live GitHub repository observation
|
|
12
|
+
* @param deployPipeline - Live deployment-pipeline observation
|
|
13
|
+
* @returns GitHub governance readiness finding
|
|
14
|
+
*/
|
|
15
|
+
export declare function githubGovernanceFinding(health: HealthResult | undefined, github: ProbeResult<GithubRepoPanelValue>, deployPipeline: ProbeResult<DeployPipelineValue>): SetupReadinessFinding;
|
|
16
|
+
/**
|
|
17
|
+
* Map only workflow-referenced secret names to presence readiness.
|
|
18
|
+
* @param github - Live GitHub repository observation
|
|
19
|
+
* @param expectedSecretNames - Secret names referenced by confined workflows
|
|
20
|
+
* @returns Repository-secret presence readiness finding
|
|
21
|
+
*/
|
|
22
|
+
export declare function secretsFinding(github: ProbeResult<GithubRepoPanelValue>, expectedSecretNames: readonly string[]): SetupReadinessFinding;
|
|
23
|
+
/**
|
|
24
|
+
* Require the exact six core scheduler entries with observed cadences.
|
|
25
|
+
* @param result - Live harness scheduler observation
|
|
26
|
+
* @param expectedAutomationIds - Applicable authoritative automation IDs
|
|
27
|
+
* @returns Harness automation readiness finding
|
|
28
|
+
*/
|
|
29
|
+
export declare function automationsFinding(result: ProbeResult<AutomationsProbeValue>, expectedAutomationIds: readonly string[] | undefined): SetupReadinessFinding;
|
|
30
|
+
//# sourceMappingURL=ui-setup-readiness-remote.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ui-setup-readiness-remote.d.ts","sourceRoot":"","sources":["../../src/cli/ui-setup-readiness-remote.ts"],"names":[],"mappings":"AAAA,uEAAuE;AACvE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAClD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAC1D,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,qBAAqB,CAAC;AAChE,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,qBAAqB,CAAC;AACjE,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AACnE,OAAO,EAEL,KAAK,qBAAqB,EAC3B,MAAM,kCAAkC,CAAC;AAM1C;;;;;;GAMG;AAEH,wBAAgB,uBAAuB,CACrC,MAAM,EAAE,YAAY,GAAG,SAAS,EAChC,MAAM,EAAE,WAAW,CAAC,oBAAoB,CAAC,EACzC,cAAc,EAAE,WAAW,CAAC,mBAAmB,CAAC,GAC/C,qBAAqB,CA8DvB;AAED;;;;;GAKG;AACH,wBAAgB,cAAc,CAC5B,MAAM,EAAE,WAAW,CAAC,oBAAoB,CAAC,EACzC,mBAAmB,EAAE,SAAS,MAAM,EAAE,GACrC,qBAAqB,CAgCvB;AAED;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAChC,MAAM,EAAE,WAAW,CAAC,qBAAqB,CAAC,EAC1C,qBAAqB,EAAE,SAAS,MAAM,EAAE,GAAG,SAAS,GACnD,qBAAqB,CAmDvB"}
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
import { setupFinding, } from "./ui-setup-readiness-contract.js";
|
|
2
|
+
const GITHUB_GOVERNANCE_CHECK = "setup.github-governance";
|
|
3
|
+
const SECRETS_CHECK = "setup.secrets";
|
|
4
|
+
const AUTOMATIONS_CHECK = "setup.automations";
|
|
5
|
+
/**
|
|
6
|
+
* Map bounded GitHub live data to governance readiness.
|
|
7
|
+
* @param health - Current deterministic Health evidence, when available
|
|
8
|
+
* @param github - Live GitHub repository observation
|
|
9
|
+
* @param deployPipeline - Live deployment-pipeline observation
|
|
10
|
+
* @returns GitHub governance readiness finding
|
|
11
|
+
*/
|
|
12
|
+
// eslint-disable-next-line sonarjs/cognitive-complexity -- independent canonical, live-repo, secret, and deployment gates stay visible together
|
|
13
|
+
export function githubGovernanceFinding(health, github, deployPipeline) {
|
|
14
|
+
if (github.state !== "value") {
|
|
15
|
+
return setupFinding(GITHUB_GOVERNANCE_CHECK, "warn", `GitHub governance could not be established (${github.reason}).`);
|
|
16
|
+
}
|
|
17
|
+
const settings = github.value.settings;
|
|
18
|
+
const mergeSettingsReady = settings.allow_merge_commit === false &&
|
|
19
|
+
settings.allow_squash_merge === true &&
|
|
20
|
+
settings.allow_rebase_merge === false &&
|
|
21
|
+
settings.allow_auto_merge === true &&
|
|
22
|
+
settings.allow_update_branch === true &&
|
|
23
|
+
settings.delete_branch_on_merge === true &&
|
|
24
|
+
settings.secret_scanning === true;
|
|
25
|
+
const activeRuleset = github.value.rulesets.some(row => row.active &&
|
|
26
|
+
row.targetsDefaultBranch === true &&
|
|
27
|
+
row.requiresPullRequest === true &&
|
|
28
|
+
row.requiresStatusChecks === true);
|
|
29
|
+
const canonicalRulesetStatus = health?.findings.find(finding => finding.check === "github.rulesets")?.status;
|
|
30
|
+
const deployKey = github.value.secrets.some(secret => secret.name === "DEPLOY_KEY" && secret.set);
|
|
31
|
+
const holds = deployPipeline.state === "value"
|
|
32
|
+
? deployPipeline.value.stages.filter(stage => stage.id.startsWith("hold:"))
|
|
33
|
+
: [];
|
|
34
|
+
const approvalGates = holds.length > 0 && holds.every(stage => stage.active === true);
|
|
35
|
+
const missing = [
|
|
36
|
+
...(mergeSettingsReady ? [] : ["merge and security settings"]),
|
|
37
|
+
...(activeRuleset
|
|
38
|
+
? []
|
|
39
|
+
: [
|
|
40
|
+
"an active default-branch ruleset requiring pull requests and status checks",
|
|
41
|
+
]),
|
|
42
|
+
...(canonicalRulesetStatus === "pass"
|
|
43
|
+
? []
|
|
44
|
+
: ["passing canonical github.rulesets Health evidence"]),
|
|
45
|
+
...(deployKey ? [] : ["the write deploy key"]),
|
|
46
|
+
...(approvalGates ? [] : ["deployment environment approval gates"]),
|
|
47
|
+
];
|
|
48
|
+
return missing.length === 0
|
|
49
|
+
? setupFinding(GITHUB_GOVERNANCE_CHECK, "pass", "GitHub merge/security settings, rulesets, write deploy key, and deployment approval gates were observed.")
|
|
50
|
+
: setupFinding(GITHUB_GOVERNANCE_CHECK, canonicalRulesetStatus === "fail" ? "fail" : "warn", `GitHub governance is incomplete: ${missing.join(" and ")}. Run /lisa:setup:github-repo.`);
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* Map only workflow-referenced secret names to presence readiness.
|
|
54
|
+
* @param github - Live GitHub repository observation
|
|
55
|
+
* @param expectedSecretNames - Secret names referenced by confined workflows
|
|
56
|
+
* @returns Repository-secret presence readiness finding
|
|
57
|
+
*/
|
|
58
|
+
export function secretsFinding(github, expectedSecretNames) {
|
|
59
|
+
if (expectedSecretNames.length === 0) {
|
|
60
|
+
return setupFinding(SECRETS_CHECK, "warn", "No explicit CI secret requirements could be established from current workflow references.");
|
|
61
|
+
}
|
|
62
|
+
if (github.state !== "value") {
|
|
63
|
+
return setupFinding(SECRETS_CHECK, "warn", `Repository secret presence could not be established (${github.reason}); no secret values were read.`);
|
|
64
|
+
}
|
|
65
|
+
const presence = new Map(github.value.secrets.map(secret => [secret.name, secret.set]));
|
|
66
|
+
const missing = expectedSecretNames.filter(name => presence.get(name) !== true);
|
|
67
|
+
return missing.length === 0
|
|
68
|
+
? setupFinding(SECRETS_CHECK, "pass", `${expectedSecretNames.length} workflow-referenced repository secret name${expectedSecretNames.length === 1 ? " is" : "s are"} present; values were not read.`)
|
|
69
|
+
: setupFinding(SECRETS_CHECK, "warn", `Missing workflow-referenced repository secret names: ${missing.join(", ")}. Values were not read.`);
|
|
70
|
+
}
|
|
71
|
+
/**
|
|
72
|
+
* Require the exact six core scheduler entries with observed cadences.
|
|
73
|
+
* @param result - Live harness scheduler observation
|
|
74
|
+
* @param expectedAutomationIds - Applicable authoritative automation IDs
|
|
75
|
+
* @returns Harness automation readiness finding
|
|
76
|
+
*/
|
|
77
|
+
export function automationsFinding(result, expectedAutomationIds) {
|
|
78
|
+
if (expectedAutomationIds === undefined ||
|
|
79
|
+
expectedAutomationIds.length === 0) {
|
|
80
|
+
return setupFinding(AUTOMATIONS_CHECK, "warn", "Applicable automation contracts could not be resolved from project configuration and detected stacks.");
|
|
81
|
+
}
|
|
82
|
+
if (result.state !== "value") {
|
|
83
|
+
return setupFinding(AUTOMATIONS_CHECK, "warn", `Harness scheduler state is unavailable (${result.reason}). Run /lisa:setup-automations.`);
|
|
84
|
+
}
|
|
85
|
+
const entries = result.value.automations.flatMap(value => {
|
|
86
|
+
if (value === null || typeof value !== "object" || Array.isArray(value)) {
|
|
87
|
+
return [];
|
|
88
|
+
}
|
|
89
|
+
const id = Reflect.get(value, "id");
|
|
90
|
+
const cadence = Reflect.get(value, "cadence");
|
|
91
|
+
const status = Reflect.get(value, "status");
|
|
92
|
+
return typeof id === "string" ? [{ id, cadence, status }] : [];
|
|
93
|
+
});
|
|
94
|
+
const missing = expectedAutomationIds.filter(expectedId => {
|
|
95
|
+
return !entries.some(entry => {
|
|
96
|
+
const disabled = typeof entry.status === "string" &&
|
|
97
|
+
["disabled", "inactive", "paused"].includes(entry.status.toLowerCase());
|
|
98
|
+
return (entry.id === expectedId &&
|
|
99
|
+
typeof entry.cadence === "string" &&
|
|
100
|
+
entry.cadence.trim().length > 0 &&
|
|
101
|
+
!disabled);
|
|
102
|
+
});
|
|
103
|
+
});
|
|
104
|
+
return missing.length === 0
|
|
105
|
+
? setupFinding(AUTOMATIONS_CHECK, "pass", `All ${expectedAutomationIds.length} applicable Lisa scheduler entries are present with observed cadences.`)
|
|
106
|
+
: setupFinding(AUTOMATIONS_CHECK, "warn", `Missing, disabled, or cadence-unreadable automation entries: ${missing.join(", ")}. Run /lisa:setup-automations.`);
|
|
107
|
+
}
|
|
108
|
+
//# sourceMappingURL=ui-setup-readiness-remote.js.map
|
|
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AChC,CAAC,UAAU,EAAE,UAAU,EAAE,QAAQ,CAAC,CAAC,QAAQ,CAAC,KAAK,CAAC,MAAM,CAAC,WAAW,EAAE,CAAC,CAAC;YAC1E,OAAO,CACL,KAAK,CAAC,EAAE,KAAK,UAAU;gBACvB,OAAO,KAAK,CAAC,OAAO,KAAK,QAAQ;gBACjC,KAAK,CAAC,OAAO,CAAC,IAAI,EAAE,CAAC,MAAM,GAAG,CAAC;gBAC/B,CAAC,QAAQ,CACV,CAAC;QACJ,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;IACH,OAAO,OAAO,CAAC,MAAM,KAAK,CAAC;QACzB,CAAC,CAAC,YAAY,CACV,iBAAiB,EACjB,MAAM,EACN,OAAO,qBAAqB,CAAC,MAAM,wEAAwE,CAC5G;QACH,CAAC,CAAC,YAAY,CACV,iBAAiB,EACjB,MAAM,EACN,gEAAgE,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,gCAAgC,CACnH,CAAC;AACR,CAAC"}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import type { HealthResult } from "../health/contract.js";
|
|
2
|
+
import type { JsonObject } from "../sync/json-path.js";
|
|
3
|
+
import { type AutomationsProbeValue } from "./ui-automations.js";
|
|
4
|
+
import { type SetupReadinessResult } from "./ui-setup-readiness-contract.js";
|
|
5
|
+
import { type GithubRepoPanelValue } from "./ui-github-repo.js";
|
|
6
|
+
import { type DeployPipelineValue } from "./ui-deploy-pipeline.js";
|
|
7
|
+
import { type ProbeResult } from "./ui-status.js";
|
|
8
|
+
/** Bounded inputs captured for one projection. */
|
|
9
|
+
export interface SetupReadinessObservations {
|
|
10
|
+
readonly config: JsonObject;
|
|
11
|
+
readonly health?: HealthResult;
|
|
12
|
+
readonly github: ProbeResult<GithubRepoPanelValue>;
|
|
13
|
+
readonly deployPipeline: ProbeResult<DeployPipelineValue>;
|
|
14
|
+
readonly automations: ProbeResult<AutomationsProbeValue>;
|
|
15
|
+
readonly expectedAutomationIds?: readonly string[];
|
|
16
|
+
readonly expectedSecretNames: readonly string[];
|
|
17
|
+
readonly observedAt?: Date;
|
|
18
|
+
}
|
|
19
|
+
/** Injectable readers for endpoint and focused integration tests. */
|
|
20
|
+
export interface SetupReadinessDependencies {
|
|
21
|
+
readonly readConfig?: (projectRoot: string) => Promise<JsonObject>;
|
|
22
|
+
readonly readHealth?: (projectRoot: string) => Promise<HealthResult>;
|
|
23
|
+
readonly readGithub?: (projectRoot: string, config: JsonObject) => Promise<ProbeResult<GithubRepoPanelValue>>;
|
|
24
|
+
readonly readDeployPipeline?: (projectRoot: string) => Promise<ProbeResult<DeployPipelineValue>>;
|
|
25
|
+
readonly readAutomations?: (projectRoot: string) => Promise<ProbeResult<AutomationsProbeValue>>;
|
|
26
|
+
readonly readExpectedAutomationIds?: (projectRoot: string, config: JsonObject) => Promise<readonly string[]>;
|
|
27
|
+
readonly readExpectedSecretNames?: (projectRoot: string) => Promise<readonly string[]>;
|
|
28
|
+
readonly now?: () => Date;
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Read the same committed-plus-local merged config used by the console.
|
|
32
|
+
* @param projectRoot - Project root whose Lisa config should be read.
|
|
33
|
+
* @returns The bounded merged UI configuration.
|
|
34
|
+
*/
|
|
35
|
+
export declare function readMergedUiConfig(projectRoot: string): Promise<JsonObject>;
|
|
36
|
+
/**
|
|
37
|
+
* Produce the exact twelve findings from already captured observations.
|
|
38
|
+
* @param projectRoot - Canonical project root for local evidence checks.
|
|
39
|
+
* @param observations - Bounded observations captured for this projection.
|
|
40
|
+
* @returns The validated twelve-finding readiness result.
|
|
41
|
+
*/
|
|
42
|
+
export declare function projectSetupReadiness(projectRoot: string, observations: SetupReadinessObservations): Promise<SetupReadinessResult>;
|
|
43
|
+
/**
|
|
44
|
+
* Create a safe-to-repeat reader for one localhost UI server.
|
|
45
|
+
* @param projectPath - Project path served by the local UI.
|
|
46
|
+
* @param dependencies - Optional bounded reader overrides for verification.
|
|
47
|
+
* @returns A read-only readiness projection reader.
|
|
48
|
+
*/
|
|
49
|
+
export declare function createSetupReadinessReader(projectPath: string, dependencies?: SetupReadinessDependencies): () => Promise<SetupReadinessResult>;
|
|
50
|
+
export type { SetupReadinessCheck, SetupReadinessFinding, SetupReadinessResult, } from "./ui-setup-readiness-contract.js";
|
|
51
|
+
export { SETUP_READINESS_CHECKS, validateSetupReadinessResult, } from "./ui-setup-readiness-contract.js";
|
|
52
|
+
//# sourceMappingURL=ui-setup-readiness.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ui-setup-readiness.d.ts","sourceRoot":"","sources":["../../src/cli/ui-setup-readiness.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAC1D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,EAEL,KAAK,qBAAqB,EAC3B,MAAM,qBAAqB,CAAC;AA0B7B,OAAO,EAEL,KAAK,oBAAoB,EAC1B,MAAM,kCAAkC,CAAC;AAC1C,OAAO,EAEL,KAAK,oBAAoB,EAC1B,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAEL,KAAK,mBAAmB,EACzB,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAY,KAAK,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAI5D,kDAAkD;AAClD,MAAM,WAAW,0BAA0B;IACzC,QAAQ,CAAC,MAAM,EAAE,UAAU,CAAC;IAC5B,QAAQ,CAAC,MAAM,CAAC,EAAE,YAAY,CAAC;IAC/B,QAAQ,CAAC,MAAM,EAAE,WAAW,CAAC,oBAAoB,CAAC,CAAC;IACnD,QAAQ,CAAC,cAAc,EAAE,WAAW,CAAC,mBAAmB,CAAC,CAAC;IAC1D,QAAQ,CAAC,WAAW,EAAE,WAAW,CAAC,qBAAqB,CAAC,CAAC;IACzD,QAAQ,CAAC,qBAAqB,CAAC,EAAE,SAAS,MAAM,EAAE,C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C,OAAO,CAAC,oBAAoB,CAAC,CAsC/B;AAmCD;;;;;GAKG;AACH,wBAAgB,0BAA0B,CACxC,WAAW,EAAE,MAAM,EACnB,YAAY,GAAE,0BAA+B,GAC5C,MAAM,OAAO,CAAC,oBAAoB,CAAC,CA0DrC;AAED,YAAY,EACV,mBAAmB,EACnB,qBAAqB,EACrB,oBAAoB,GACrB,MAAM,kCAAkC,CAAC;AAC1C,OAAO,EACL,sBAAsB,EACtB,4BAA4B,GAC7B,MAAM,kCAAkC,CAAC"}
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
/** Current read-only Setup checklist readiness projection for `lisa ui`. */
|
|
2
|
+
import { realpath } from "node:fs/promises";
|
|
3
|
+
import * as path from "node:path";
|
|
4
|
+
import { runDeterministicHealth } from "../health/deterministic.js";
|
|
5
|
+
import { createAutomationsProbe, } from "./ui-automations.js";
|
|
6
|
+
import { readOriginRemote, resolveExpectedAutomationEntries, } from "./ui-automations-adapters.js";
|
|
7
|
+
import { readConfinedDetectedStacks } from "./ui-detected-stacks.js";
|
|
8
|
+
import { readConfinedMergedConfig } from "./ui-confined-project-read.js";
|
|
9
|
+
import { explorationFinding, prdSourceFinding, starterProvenanceFinding, trackerFinding, } from "./ui-setup-readiness-config.js";
|
|
10
|
+
import { healthEvidenceFinding, readWorkflowSecretNames, standardsFinding, agentReadyFinding, wikiSetupFinding, } from "./ui-setup-readiness-local.js";
|
|
11
|
+
import { installFinding } from "./ui-setup-readiness-install.js";
|
|
12
|
+
import { automationsFinding, githubGovernanceFinding, secretsFinding, } from "./ui-setup-readiness-remote.js";
|
|
13
|
+
import { validateSetupReadinessResult, } from "./ui-setup-readiness-contract.js";
|
|
14
|
+
import { createGithubRepoProbe, } from "./ui-github-repo.js";
|
|
15
|
+
import { createDeployPipelineProbe, } from "./ui-deploy-pipeline.js";
|
|
16
|
+
import { runProbe } from "./ui-status.js";
|
|
17
|
+
const ORIGIN_REMOTE_TIMEOUT_MS = 2_500;
|
|
18
|
+
/**
|
|
19
|
+
* Read the same committed-plus-local merged config used by the console.
|
|
20
|
+
* @param projectRoot - Project root whose Lisa config should be read.
|
|
21
|
+
* @returns The bounded merged UI configuration.
|
|
22
|
+
*/
|
|
23
|
+
export async function readMergedUiConfig(projectRoot) {
|
|
24
|
+
return await readConfinedMergedConfig(projectRoot);
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Produce the exact twelve findings from already captured observations.
|
|
28
|
+
* @param projectRoot - Canonical project root for local evidence checks.
|
|
29
|
+
* @param observations - Bounded observations captured for this projection.
|
|
30
|
+
* @returns The validated twelve-finding readiness result.
|
|
31
|
+
*/
|
|
32
|
+
export async function projectSetupReadiness(projectRoot, observations) {
|
|
33
|
+
const [install, agentReady, wiki] = await Promise.all([
|
|
34
|
+
installFinding(projectRoot, observations.config, observations.health),
|
|
35
|
+
agentReadyFinding(projectRoot),
|
|
36
|
+
wikiSetupFinding(projectRoot, observations.health),
|
|
37
|
+
]);
|
|
38
|
+
const findings = [
|
|
39
|
+
install,
|
|
40
|
+
healthEvidenceFinding("setup.sync", observations.health, ["config.required", "config.sync"], "Required Lisa config and mirrored artifacts are populated and synchronized.", "fail"),
|
|
41
|
+
agentReady,
|
|
42
|
+
standardsFinding(observations.health),
|
|
43
|
+
trackerFinding(observations.config),
|
|
44
|
+
prdSourceFinding(observations.config),
|
|
45
|
+
githubGovernanceFinding(observations.health, observations.github, observations.deployPipeline),
|
|
46
|
+
secretsFinding(observations.github, observations.expectedSecretNames),
|
|
47
|
+
automationsFinding(observations.automations, observations.expectedAutomationIds),
|
|
48
|
+
explorationFinding(observations.config),
|
|
49
|
+
wiki,
|
|
50
|
+
starterProvenanceFinding(observations.config),
|
|
51
|
+
];
|
|
52
|
+
return validateSetupReadinessResult({
|
|
53
|
+
schemaVersion: 1,
|
|
54
|
+
observedAt: (observations.observedAt ?? new Date()).toISOString(),
|
|
55
|
+
findings,
|
|
56
|
+
});
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* Convert a failed bounded read into an explicit unknown probe state.
|
|
60
|
+
* @param reason - Stable machine-readable failure reason.
|
|
61
|
+
* @returns An unknown probe result that cannot be mistaken for success.
|
|
62
|
+
*/
|
|
63
|
+
function unknownProbe(reason) {
|
|
64
|
+
return {
|
|
65
|
+
state: "unknown",
|
|
66
|
+
reason,
|
|
67
|
+
message: "The setup readiness capability could not be observed.",
|
|
68
|
+
};
|
|
69
|
+
}
|
|
70
|
+
/**
|
|
71
|
+
* Resolve applicable automation IDs with the same origin fallback as identity.
|
|
72
|
+
* @param root - Canonical project root.
|
|
73
|
+
* @param config - Bounded merged Lisa configuration.
|
|
74
|
+
* @returns Expected automation identifiers for the current project.
|
|
75
|
+
*/
|
|
76
|
+
async function readDefaultExpectedAutomationIds(root, config) {
|
|
77
|
+
const stacks = await readConfinedDetectedStacks(root);
|
|
78
|
+
const gitRemoteUrl = await readOriginRemote(root, AbortSignal.timeout(ORIGIN_REMOTE_TIMEOUT_MS));
|
|
79
|
+
return (await resolveExpectedAutomationEntries(config, stacks, gitRemoteUrl)).map(entry => entry.automationId);
|
|
80
|
+
}
|
|
81
|
+
/**
|
|
82
|
+
* Create a safe-to-repeat reader for one localhost UI server.
|
|
83
|
+
* @param projectPath - Project path served by the local UI.
|
|
84
|
+
* @param dependencies - Optional bounded reader overrides for verification.
|
|
85
|
+
* @returns A read-only readiness projection reader.
|
|
86
|
+
*/
|
|
87
|
+
export function createSetupReadinessReader(projectPath, dependencies = {}) {
|
|
88
|
+
const readConfig = dependencies.readConfig ?? readMergedUiConfig;
|
|
89
|
+
const readHealth = dependencies.readHealth ??
|
|
90
|
+
(async (root) => await runDeterministicHealth(root, { deadlineMs: 20_000 }));
|
|
91
|
+
const readGithub = dependencies.readGithub ??
|
|
92
|
+
(async (root, config) => await runProbe(createGithubRepoProbe(root, config)));
|
|
93
|
+
const readAutomations = dependencies.readAutomations ??
|
|
94
|
+
(async (root) => await runProbe(createAutomationsProbe({ cwd: root })));
|
|
95
|
+
const readDeployPipeline = dependencies.readDeployPipeline ??
|
|
96
|
+
(async (root) => await runProbe(createDeployPipelineProbe(root)));
|
|
97
|
+
const readExpectedAutomationIds = dependencies.readExpectedAutomationIds ?? readDefaultExpectedAutomationIds;
|
|
98
|
+
const readSecrets = dependencies.readExpectedSecretNames ?? readWorkflowSecretNames;
|
|
99
|
+
return async () => {
|
|
100
|
+
const projectRoot = await realpath(path.resolve(projectPath));
|
|
101
|
+
const config = await readConfig(projectRoot).catch(() => ({}));
|
|
102
|
+
const [health, github, deployPipeline, automations, expectedAutomationIds, expectedSecretNames,] = await Promise.all([
|
|
103
|
+
readHealth(projectRoot).catch(() => undefined),
|
|
104
|
+
readGithub(projectRoot, config).catch(() => unknownProbe("github-read-failed")),
|
|
105
|
+
readDeployPipeline(projectRoot).catch(() => unknownProbe("deploy-pipeline-read-failed")),
|
|
106
|
+
readAutomations(projectRoot).catch(() => unknownProbe("scheduler-read-failed")),
|
|
107
|
+
readExpectedAutomationIds(projectRoot, config).catch(() => undefined),
|
|
108
|
+
readSecrets(projectRoot).catch(() => []),
|
|
109
|
+
]);
|
|
110
|
+
return await projectSetupReadiness(projectRoot, {
|
|
111
|
+
config,
|
|
112
|
+
...(health === undefined ? {} : { health }),
|
|
113
|
+
github,
|
|
114
|
+
deployPipeline,
|
|
115
|
+
automations,
|
|
116
|
+
...(expectedAutomationIds === undefined ? {} : { expectedAutomationIds }),
|
|
117
|
+
expectedSecretNames,
|
|
118
|
+
...(dependencies.now === undefined
|
|
119
|
+
? {}
|
|
120
|
+
: { observedAt: dependencies.now() }),
|
|
121
|
+
});
|
|
122
|
+
};
|
|
123
|
+
}
|
|
124
|
+
export { SETUP_READINESS_CHECKS, validateSetupReadinessResult, } from "./ui-setup-readiness-contract.js";
|
|
125
|
+
//# sourceMappingURL=ui-setup-readiness.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ui-setup-readiness.js","sourceRoot":"","sources":["../../src/cli/ui-setup-readiness.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Ac;YACd,WAAW;YACX,GAAG,CAAC,qBAAqB,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,qBAAqB,EAAE,CAAC;YACzE,mBAAmB;YACnB,GAAG,CAAC,YAAY,CAAC,GAAG,KAAK,SAAS;gBAChC,CAAC,CAAC,EAAE;gBACJ,CAAC,CAAC,EAAE,UAAU,EAAE,YAAY,CAAC,GAAG,EAAE,EAAE,CAAC;SACxC,CAAC,CAAC;IACL,CAAC,CAAC;AACJ,CAAC;AAOD,OAAO,EACL,sBAAsB,EACtB,4BAA4B,GAC7B,MAAM,kCAAkC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"upstream-evidence-manifest.d.ts","sourceRoot":"","sources":["../../src/core/upstream-evidence-manifest.ts"],"names":[],"mappings":"AACA,iFAAiF;AACjF,eAAO,MAAM,0BAA0B,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAsgEpE,CAAC;AAEL,4EAA4E;AAC5E,eAAO,MAAM,yBAAyB,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,IAAI,CAAC,
|
|
1
|
+
{"version":3,"file":"upstream-evidence-manifest.d.ts","sourceRoot":"","sources":["../../src/core/upstream-evidence-manifest.ts"],"names":[],"mappings":"AACA,iFAAiF;AACjF,eAAO,MAAM,0BAA0B,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAsgEpE,CAAC;AAEL,4EAA4E;AAC5E,eAAO,MAAM,yBAAyB,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,IAAI,CAAC,CAwlMjE,CAAC;AAEL,sFAAsF;AACtF,eAAO,MAAM,uBAAuB,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,IAAI,CAAC,CAk6I/D,CAAC"}
|
|
@@ -363,7 +363,7 @@ export const UPSTREAM_EVIDENCE_MANIFEST = Object.freeze({
|
|
|
363
363
|
"plugins/src/base/rules/reference/wiki-knowledge-source.md": "305d38e13984c2a64144f302336405d0ccbec493a6ed3ec67d210fed44940717",
|
|
364
364
|
"plugins/src/base/scripts/automation-run-record.mjs": "89143e06975d8333b137fd2bdb5f12bcd703403752337f00c25d18fefba6a4c8",
|
|
365
365
|
"plugins/src/base/scripts/automation-status-claude-adapter.mjs": "b1054acf4a5cbbe5354bd62a22b96533bcbc69b6cb9245976ceb8af638a04494",
|
|
366
|
-
"plugins/src/base/scripts/automation-status-codex-adapter.mjs": "
|
|
366
|
+
"plugins/src/base/scripts/automation-status-codex-adapter.mjs": "ba1d8891f3369865d307e00699d5817172f64947d5b0c4e569e2f8e5bb46a9f5",
|
|
367
367
|
"plugins/src/base/scripts/automation-status-contract-drift.mjs": "5f3f327fddedd6870017a86f2702d9cbb17352384fb225ab353eed54241182ef",
|
|
368
368
|
"plugins/src/base/scripts/automation-status-expected-fleet.mjs": "a7c2463547d28403455ec739772b12c3821e2cde387da3d31e831de1442b25d5",
|
|
369
369
|
"plugins/src/base/scripts/automation-status-report.mjs": "520f77645c5b7cab3f69848fb5cf19e8b1d802cd1f8ce6a35aa36a0bf6a0d146",
|
|
@@ -1026,7 +1026,7 @@ export const UPSTREAM_EVIDENCE_MANIFEST = Object.freeze({
|
|
|
1026
1026
|
"typescript/merge/.oxlintrc.json": "4debc093acfd263eb81ae15894073ebf098513204f45f40b83fb8fa5353fa1f8",
|
|
1027
1027
|
"typescript/package-lisa/package.lisa.json": "7e99286c549c79b1c02c07a4313dcfe5b41b4ebb80a6fbbb8741dd74dc5f454d",
|
|
1028
1028
|
"ui/README.md": "deeb35e767ea5dd2883268835ea3ad21cbad9fa63ec8d8ff5e200f0e2a7d2751",
|
|
1029
|
-
"ui/index.html": "
|
|
1029
|
+
"ui/index.html": "2abf4253d9d576b4e16d41efd30a7f3b334c1a1ec2caad442929ab82bd28fc8d",
|
|
1030
1030
|
});
|
|
1031
1031
|
/** Exact paths tracked by the public Lisa repository at generation time. */
|
|
1032
1032
|
export const UPSTREAM_SURFACE_MANIFEST = Object.freeze({
|
|
@@ -6280,6 +6280,7 @@ export const UPSTREAM_SURFACE_MANIFEST = Object.freeze({
|
|
|
6280
6280
|
"src/cli/ui-ci-quality-jobs.ts": true,
|
|
6281
6281
|
"src/cli/ui-cmd.ts": true,
|
|
6282
6282
|
"src/cli/ui-config-write.ts": true,
|
|
6283
|
+
"src/cli/ui-confined-project-read.ts": true,
|
|
6283
6284
|
"src/cli/ui-deploy-pipeline-model.ts": true,
|
|
6284
6285
|
"src/cli/ui-deploy-pipeline.ts": true,
|
|
6285
6286
|
"src/cli/ui-detected-stacks.ts": true,
|
|
@@ -6292,6 +6293,12 @@ export const UPSTREAM_SURFACE_MANIFEST = Object.freeze({
|
|
|
6292
6293
|
"src/cli/ui-lisa-version.ts": true,
|
|
6293
6294
|
"src/cli/ui-observability-checks.ts": true,
|
|
6294
6295
|
"src/cli/ui-observability-providers.ts": true,
|
|
6296
|
+
"src/cli/ui-setup-readiness-config.ts": true,
|
|
6297
|
+
"src/cli/ui-setup-readiness-contract.ts": true,
|
|
6298
|
+
"src/cli/ui-setup-readiness-install.ts": true,
|
|
6299
|
+
"src/cli/ui-setup-readiness-local.ts": true,
|
|
6300
|
+
"src/cli/ui-setup-readiness-remote.ts": true,
|
|
6301
|
+
"src/cli/ui-setup-readiness.ts": true,
|
|
6295
6302
|
"src/cli/ui-status-json.ts": true,
|
|
6296
6303
|
"src/cli/ui-status.ts": true,
|
|
6297
6304
|
"src/cli/update-check.ts": true,
|
|
@@ -6574,6 +6581,7 @@ export const UPSTREAM_SURFACE_MANIFEST = Object.freeze({
|
|
|
6574
6581
|
"tests/unit/cli/ui-ci-quality-jobs.test.ts": true,
|
|
6575
6582
|
"tests/unit/cli/ui-cmd.test.ts": true,
|
|
6576
6583
|
"tests/unit/cli/ui-config-write.test.ts": true,
|
|
6584
|
+
"tests/unit/cli/ui-confined-project-read.test.ts": true,
|
|
6577
6585
|
"tests/unit/cli/ui-deploy-pipeline-probe.test.ts": true,
|
|
6578
6586
|
"tests/unit/cli/ui-detected-stacks-probe.test.ts": true,
|
|
6579
6587
|
"tests/unit/cli/ui-enabled-plugins-probe.test.ts": true,
|
|
@@ -6583,6 +6591,9 @@ export const UPSTREAM_SURFACE_MANIFEST = Object.freeze({
|
|
|
6583
6591
|
"tests/unit/cli/ui-health.test.ts": true,
|
|
6584
6592
|
"tests/unit/cli/ui-lisa-version-probe.test.ts": true,
|
|
6585
6593
|
"tests/unit/cli/ui-observability-providers-probe.test.ts": true,
|
|
6594
|
+
"tests/unit/cli/ui-setup-readiness-endpoint-confinement.test.ts": true,
|
|
6595
|
+
"tests/unit/cli/ui-setup-readiness-endpoint.test.ts": true,
|
|
6596
|
+
"tests/unit/cli/ui-setup-readiness.test.ts": true,
|
|
6586
6597
|
"tests/unit/cli/ui-status-contract.test.ts": true,
|
|
6587
6598
|
"tests/unit/cli/ui-status-endpoint.test.ts": true,
|
|
6588
6599
|
"tests/unit/cli/ui-status-http-edge.test.ts": true,
|
|
@@ -6768,6 +6779,7 @@ export const UPSTREAM_SURFACE_MANIFEST = Object.freeze({
|
|
|
6768
6779
|
"tests/unit/strategies/automation-run-record.test.ts": true,
|
|
6769
6780
|
"tests/unit/strategies/automation-runbook-contract-rule.test.ts": true,
|
|
6770
6781
|
"tests/unit/strategies/automation-status-claude-adapter.test.ts": true,
|
|
6782
|
+
"tests/unit/strategies/automation-status-codex-adapter-confinement.test.ts": true,
|
|
6771
6783
|
"tests/unit/strategies/automation-status-codex-adapter.test.ts": true,
|
|
6772
6784
|
"tests/unit/strategies/automation-status-codex-command-memory.test.ts": true,
|
|
6773
6785
|
"tests/unit/strategies/automation-status-codex-cwd.test.ts": true,
|