@codyswann/lisa 2.277.4 → 2.279.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.
Files changed (149) hide show
  1. package/dist/cli/doctor-readiness-credentials.d.ts +46 -0
  2. package/dist/cli/doctor-readiness-credentials.d.ts.map +1 -0
  3. package/dist/cli/doctor-readiness-credentials.js +199 -0
  4. package/dist/cli/doctor-readiness-credentials.js.map +1 -0
  5. package/dist/cli/doctor-readiness-delivery.d.ts +16 -0
  6. package/dist/cli/doctor-readiness-delivery.d.ts.map +1 -0
  7. package/dist/cli/doctor-readiness-delivery.js +243 -0
  8. package/dist/cli/doctor-readiness-delivery.js.map +1 -0
  9. package/dist/cli/doctor-readiness-journey.d.ts +4 -10
  10. package/dist/cli/doctor-readiness-journey.d.ts.map +1 -1
  11. package/dist/cli/doctor-readiness-journey.js +17 -1
  12. package/dist/cli/doctor-readiness-journey.js.map +1 -1
  13. package/dist/cli/doctor-readiness-release-path.d.ts +62 -0
  14. package/dist/cli/doctor-readiness-release-path.d.ts.map +1 -0
  15. package/dist/cli/doctor-readiness-release-path.js +275 -0
  16. package/dist/cli/doctor-readiness-release-path.js.map +1 -0
  17. package/dist/cli/doctor-readiness-types.d.ts +25 -0
  18. package/dist/cli/doctor-readiness-types.d.ts.map +1 -0
  19. package/dist/cli/doctor-readiness-types.js +13 -0
  20. package/dist/cli/doctor-readiness-types.js.map +1 -0
  21. package/dist/cli/doctor-readiness-workflows.d.ts +64 -0
  22. package/dist/cli/doctor-readiness-workflows.d.ts.map +1 -0
  23. package/dist/cli/doctor-readiness-workflows.js +198 -0
  24. package/dist/cli/doctor-readiness-workflows.js.map +1 -0
  25. package/dist/cli/doctor-readiness.d.ts +19 -3
  26. package/dist/cli/doctor-readiness.d.ts.map +1 -1
  27. package/dist/cli/doctor-readiness.js +87 -26
  28. package/dist/cli/doctor-readiness.js.map +1 -1
  29. package/dist/cli/ui-automations-adapters.d.ts +22 -0
  30. package/dist/cli/ui-automations-adapters.d.ts.map +1 -1
  31. package/dist/cli/ui-automations-adapters.js +24 -12
  32. package/dist/cli/ui-automations-adapters.js.map +1 -1
  33. package/dist/cli/ui-automations.d.ts +1 -0
  34. package/dist/cli/ui-automations.d.ts.map +1 -1
  35. package/dist/cli/ui-automations.js +1 -0
  36. package/dist/cli/ui-automations.js.map +1 -1
  37. package/dist/cli/ui-cmd.d.ts +4 -1
  38. package/dist/cli/ui-cmd.d.ts.map +1 -1
  39. package/dist/cli/ui-cmd.js +72 -17
  40. package/dist/cli/ui-cmd.js.map +1 -1
  41. package/dist/cli/ui-confined-project-read.d.ts +22 -0
  42. package/dist/cli/ui-confined-project-read.d.ts.map +1 -0
  43. package/dist/cli/ui-confined-project-read.js +38 -0
  44. package/dist/cli/ui-confined-project-read.js.map +1 -0
  45. package/dist/cli/ui-deploy-pipeline.d.ts.map +1 -1
  46. package/dist/cli/ui-deploy-pipeline.js +4 -15
  47. package/dist/cli/ui-deploy-pipeline.js.map +1 -1
  48. package/dist/cli/ui-detected-stacks.d.ts +9 -8
  49. package/dist/cli/ui-detected-stacks.d.ts.map +1 -1
  50. package/dist/cli/ui-detected-stacks.js +111 -0
  51. package/dist/cli/ui-detected-stacks.js.map +1 -1
  52. package/dist/cli/ui-github-repo-gh.d.ts +6 -0
  53. package/dist/cli/ui-github-repo-gh.d.ts.map +1 -1
  54. package/dist/cli/ui-github-repo-gh.js.map +1 -1
  55. package/dist/cli/ui-github-repo-map.d.ts.map +1 -1
  56. package/dist/cli/ui-github-repo-map.js +26 -1
  57. package/dist/cli/ui-github-repo-map.js.map +1 -1
  58. package/dist/cli/ui-setup-readiness-config.d.ts +28 -0
  59. package/dist/cli/ui-setup-readiness-config.d.ts.map +1 -0
  60. package/dist/cli/ui-setup-readiness-config.js +116 -0
  61. package/dist/cli/ui-setup-readiness-config.js.map +1 -0
  62. package/dist/cli/ui-setup-readiness-contract.d.ts +32 -0
  63. package/dist/cli/ui-setup-readiness-contract.d.ts.map +1 -0
  64. package/dist/cli/ui-setup-readiness-contract.js +61 -0
  65. package/dist/cli/ui-setup-readiness-contract.js.map +1 -0
  66. package/dist/cli/ui-setup-readiness-install.d.ts +24 -0
  67. package/dist/cli/ui-setup-readiness-install.d.ts.map +1 -0
  68. package/dist/cli/ui-setup-readiness-install.js +207 -0
  69. package/dist/cli/ui-setup-readiness-install.js.map +1 -0
  70. package/dist/cli/ui-setup-readiness-local.d.ts +40 -0
  71. package/dist/cli/ui-setup-readiness-local.d.ts.map +1 -0
  72. package/dist/cli/ui-setup-readiness-local.js +235 -0
  73. package/dist/cli/ui-setup-readiness-local.js.map +1 -0
  74. package/dist/cli/ui-setup-readiness-remote.d.ts +30 -0
  75. package/dist/cli/ui-setup-readiness-remote.d.ts.map +1 -0
  76. package/dist/cli/ui-setup-readiness-remote.js +108 -0
  77. package/dist/cli/ui-setup-readiness-remote.js.map +1 -0
  78. package/dist/cli/ui-setup-readiness.d.ts +52 -0
  79. package/dist/cli/ui-setup-readiness.d.ts.map +1 -0
  80. package/dist/cli/ui-setup-readiness.js +125 -0
  81. package/dist/cli/ui-setup-readiness.js.map +1 -0
  82. package/dist/core/upstream-evidence-manifest.d.ts.map +1 -1
  83. package/dist/core/upstream-evidence-manifest.js +24 -2
  84. package/dist/core/upstream-evidence-manifest.js.map +1 -1
  85. package/dist/health/read-only-fs.d.ts +7 -0
  86. package/dist/health/read-only-fs.d.ts.map +1 -1
  87. package/dist/health/read-only-fs.js +40 -1
  88. package/dist/health/read-only-fs.js.map +1 -1
  89. package/dist/sync/registry.d.ts +14 -0
  90. package/dist/sync/registry.d.ts.map +1 -1
  91. package/dist/sync/registry.js +54 -15
  92. package/dist/sync/registry.js.map +1 -1
  93. package/package.json +1 -1
  94. package/plugins/lisa/.claude-plugin/plugin.json +1 -1
  95. package/plugins/lisa/.codex-plugin/plugin.json +1 -1
  96. package/plugins/lisa/scripts/automation-status-codex-adapter.mjs +270 -23
  97. package/plugins/lisa-agy/plugin.json +1 -1
  98. package/plugins/lisa-agy/scripts/automation-status-codex-adapter.mjs +270 -23
  99. package/plugins/lisa-cdk/.claude-plugin/plugin.json +1 -1
  100. package/plugins/lisa-cdk/.codex-plugin/plugin.json +1 -1
  101. package/plugins/lisa-cdk-agy/plugin.json +1 -1
  102. package/plugins/lisa-cdk-copilot/.claude-plugin/plugin.json +1 -1
  103. package/plugins/lisa-cdk-cursor/.claude-plugin/plugin.json +1 -1
  104. package/plugins/lisa-copilot/.claude-plugin/plugin.json +1 -1
  105. package/plugins/lisa-copilot/scripts/automation-status-codex-adapter.mjs +270 -23
  106. package/plugins/lisa-cursor/.claude-plugin/plugin.json +1 -1
  107. package/plugins/lisa-cursor/scripts/automation-status-codex-adapter.mjs +270 -23
  108. package/plugins/lisa-expo/.claude-plugin/plugin.json +1 -1
  109. package/plugins/lisa-expo/.codex-plugin/plugin.json +1 -1
  110. package/plugins/lisa-expo-agy/plugin.json +1 -1
  111. package/plugins/lisa-expo-copilot/.claude-plugin/plugin.json +1 -1
  112. package/plugins/lisa-expo-cursor/.claude-plugin/plugin.json +1 -1
  113. package/plugins/lisa-harper-fabric/.claude-plugin/plugin.json +1 -1
  114. package/plugins/lisa-harper-fabric/.codex-plugin/plugin.json +1 -1
  115. package/plugins/lisa-harper-fabric-agy/plugin.json +1 -1
  116. package/plugins/lisa-harper-fabric-copilot/.claude-plugin/plugin.json +1 -1
  117. package/plugins/lisa-harper-fabric-cursor/.claude-plugin/plugin.json +1 -1
  118. package/plugins/lisa-nestjs/.claude-plugin/plugin.json +1 -1
  119. package/plugins/lisa-nestjs/.codex-plugin/plugin.json +1 -1
  120. package/plugins/lisa-nestjs-agy/plugin.json +1 -1
  121. package/plugins/lisa-nestjs-copilot/.claude-plugin/plugin.json +1 -1
  122. package/plugins/lisa-nestjs-cursor/.claude-plugin/plugin.json +1 -1
  123. package/plugins/lisa-openclaw/.claude-plugin/plugin.json +1 -1
  124. package/plugins/lisa-openclaw/.codex-plugin/plugin.json +1 -1
  125. package/plugins/lisa-openclaw-agy/plugin.json +1 -1
  126. package/plugins/lisa-openclaw-copilot/.claude-plugin/plugin.json +1 -1
  127. package/plugins/lisa-openclaw-cursor/.claude-plugin/plugin.json +1 -1
  128. package/plugins/lisa-phaser/.claude-plugin/plugin.json +1 -1
  129. package/plugins/lisa-phaser/.codex-plugin/plugin.json +1 -1
  130. package/plugins/lisa-phaser-agy/plugin.json +1 -1
  131. package/plugins/lisa-phaser-copilot/.claude-plugin/plugin.json +1 -1
  132. package/plugins/lisa-phaser-cursor/.claude-plugin/plugin.json +1 -1
  133. package/plugins/lisa-rails/.claude-plugin/plugin.json +1 -1
  134. package/plugins/lisa-rails/.codex-plugin/plugin.json +1 -1
  135. package/plugins/lisa-rails-agy/plugin.json +1 -1
  136. package/plugins/lisa-rails-copilot/.claude-plugin/plugin.json +1 -1
  137. package/plugins/lisa-rails-cursor/.claude-plugin/plugin.json +1 -1
  138. package/plugins/lisa-typescript/.claude-plugin/plugin.json +1 -1
  139. package/plugins/lisa-typescript/.codex-plugin/plugin.json +1 -1
  140. package/plugins/lisa-typescript-agy/plugin.json +1 -1
  141. package/plugins/lisa-typescript-copilot/.claude-plugin/plugin.json +1 -1
  142. package/plugins/lisa-typescript-cursor/.claude-plugin/plugin.json +1 -1
  143. package/plugins/lisa-wiki/.claude-plugin/plugin.json +1 -1
  144. package/plugins/lisa-wiki/.codex-plugin/plugin.json +1 -1
  145. package/plugins/lisa-wiki-agy/plugin.json +1 -1
  146. package/plugins/lisa-wiki-copilot/.claude-plugin/plugin.json +1 -1
  147. package/plugins/lisa-wiki-cursor/.claude-plugin/plugin.json +1 -1
  148. package/plugins/src/base/scripts/automation-status-codex-adapter.mjs +270 -23
  149. package/ui/index.html +1 -1
@@ -0,0 +1,235 @@
1
+ /** Local filesystem and deterministic-Health evidence for Setup readiness. */
2
+ import { readdir, realpath } from "node:fs/promises";
3
+ import path from "node:path";
4
+ import { projectPathKind, projectRegularFileExists, readProjectText, resolveProjectPath, } from "../health/read-only-fs.js";
5
+ import { requireCanonicalUtcTimestamp } from "../health/strict-validation.js";
6
+ import { setupFinding, } from "./ui-setup-readiness-contract.js";
7
+ const AGENT_READY_CHECK = "setup.agent-ready";
8
+ const WIKI_CHECK = "setup.wiki";
9
+ /** Fixed Health checks that establish local standards/governance conformance. */
10
+ export const STANDARDS_HEALTH_CHECKS = [
11
+ "templates.managed",
12
+ "package.conformance",
13
+ "hooks.managed",
14
+ "config.sync",
15
+ "instructions.canonical",
16
+ "ci.workflows",
17
+ ];
18
+ /**
19
+ * Never upgrade standards adoption without current lint/test preservation proof.
20
+ * @param health - Current deterministic Health evidence, when available
21
+ * @returns Standards-adoption readiness finding
22
+ */
23
+ export function standardsFinding(health) {
24
+ const managed = healthEvidenceFinding("setup.standards", health, STANDARDS_HEALTH_CHECKS, "Managed standards surfaces are current.", "fail");
25
+ return managed.status === "pass"
26
+ ? setupFinding("setup.standards", "warn", "Managed standards surfaces are current, but bounded current lint, test, and behavior-preservation proof is unavailable.")
27
+ : managed;
28
+ }
29
+ /** Project workflow secret available without explicit provisioning. */
30
+ const IMPLICIT_WORKFLOW_SECRETS = new Set(["GITHUB_TOKEN"]);
31
+ /**
32
+ * Whether an unknown field is non-empty operator text.
33
+ * @param value - Untrusted field value
34
+ * @returns Whether the value contains non-whitespace text
35
+ */
36
+ function hasText(value) {
37
+ return typeof value === "string" && value.trim().length > 0;
38
+ }
39
+ /**
40
+ * Canonicalize one strictly source-confined evidence path.
41
+ * @param value - Untrusted source evidence path
42
+ * @returns Normalized wiki/sources path, or undefined when invalid
43
+ */
44
+ function normalizeSourceEvidencePath(value) {
45
+ if (!hasText(value) || value.includes("\\") || path.posix.isAbsolute(value)) {
46
+ return undefined;
47
+ }
48
+ const segments = value.split("/");
49
+ if (segments.some(segment => segment === "" || segment === "." || segment === "..")) {
50
+ return undefined;
51
+ }
52
+ const normalized = path.posix.normalize(value);
53
+ return normalized === value && normalized.startsWith("wiki/sources/")
54
+ ? normalized
55
+ : undefined;
56
+ }
57
+ /**
58
+ * Refuse symlinks in every parent and inspect the final file with no-follow.
59
+ * @param root - Canonical project root
60
+ * @param evidencePath - Normalized project-relative evidence path
61
+ * @returns Whether the evidence path has safe parents and a regular final file
62
+ */
63
+ async function sourceEvidenceIsRegular(root, evidencePath) {
64
+ const segments = evidencePath.split("/");
65
+ const parents = segments
66
+ .slice(0, -1)
67
+ .map((_, index) => segments.slice(0, index + 1).join("/"));
68
+ const parentKinds = await Promise.all(parents.map(parent => projectPathKind(root, parent)));
69
+ if (!parentKinds.every(kind => kind === "directory"))
70
+ return false;
71
+ return await projectRegularFileExists(root, evidencePath);
72
+ }
73
+ /**
74
+ * Validate one complete agent-ready source row and its confined evidence.
75
+ * @param root - Canonical project root
76
+ * @param source - Untrusted source-registry row
77
+ * @returns Completeness classification for the source row
78
+ */
79
+ async function sourceRowIsComplete(root, source) {
80
+ if (source === null || typeof source !== "object" || Array.isArray(source)) {
81
+ return "invalid";
82
+ }
83
+ const probe = Reflect.get(source, "read_only_probe");
84
+ const evidence = Reflect.get(source, "sanitized_evidence");
85
+ const terminalStatus = Reflect.get(source, "terminal_status");
86
+ const openGap = Reflect.get(source, "open_gap");
87
+ if (!hasText(Reflect.get(source, "source_id")) ||
88
+ !hasText(Reflect.get(source, "scope")) ||
89
+ probe === null ||
90
+ typeof probe !== "object" ||
91
+ Array.isArray(probe) ||
92
+ !hasText(Reflect.get(probe, "command")) ||
93
+ !hasText(Reflect.get(probe, "observed")) ||
94
+ typeof terminalStatus !== "string" ||
95
+ !["complete", "partial", "unavailable", "pending"].includes(terminalStatus) ||
96
+ (openGap !== null && !hasText(openGap)) ||
97
+ !Array.isArray(evidence) ||
98
+ evidence.length === 0 ||
99
+ evidence.some(item => normalizeSourceEvidencePath(item) === undefined)) {
100
+ return "invalid";
101
+ }
102
+ const canonicalEvidence = evidence.map(item => normalizeSourceEvidencePath(item));
103
+ const regularFiles = await Promise.all(canonicalEvidence.map(item => sourceEvidenceIsRegular(root, item)));
104
+ if (!regularFiles.every(Boolean))
105
+ return "invalid";
106
+ return terminalStatus === "complete" && openGap === null
107
+ ? "complete"
108
+ : "incomplete";
109
+ }
110
+ /**
111
+ * Aggregate stable check IDs without interpreting human-readable reasons.
112
+ * @param check - Setup checklist identifier being evaluated
113
+ * @param health - Current deterministic Health evidence, when available
114
+ * @param requiredChecks - Health check identifiers required for readiness
115
+ * @param passReason - Operator-readable reason used when every check passes
116
+ * @param unavailableStatus - Status used when required evidence is absent
117
+ * @returns Setup finding derived from the required Health checks
118
+ */
119
+ export function healthEvidenceFinding(check, health, requiredChecks, passReason, unavailableStatus = "warn") {
120
+ const byCheck = new Map((health?.findings ?? []).map(finding => [finding.check, finding]));
121
+ const unavailable = requiredChecks.filter(id => !byCheck.has(id));
122
+ if (unavailable.length > 0) {
123
+ return setupFinding(check, unavailableStatus, `Required deterministic evidence is unavailable: ${unavailable.join(", ")}.`);
124
+ }
125
+ const nonPassing = requiredChecks.filter(id => byCheck.get(id)?.status !== "pass");
126
+ if (nonPassing.length === 0) {
127
+ return setupFinding(check, "pass", passReason);
128
+ }
129
+ const hasFailure = nonPassing.some(id => byCheck.get(id)?.status === "fail");
130
+ return setupFinding(check, hasFailure ? "fail" : "warn", `Deterministic setup evidence is not passing: ${nonPassing.join(", ")}.`);
131
+ }
132
+ /**
133
+ * Require a complete source registry and no open knowledge gaps.
134
+ * @param projectRoot - Project root containing agent-ready evidence
135
+ * @returns Agent-readiness finding from confined registry and gap evidence
136
+ */
137
+ // eslint-disable-next-line max-lines-per-function, sonarjs/cognitive-complexity -- one bounded registry-and-evidence validation transaction stays auditable together
138
+ export async function agentReadyFinding(projectRoot) {
139
+ try {
140
+ const root = await realpath(projectRoot);
141
+ const [registryText, gapsText] = await Promise.all([
142
+ readProjectText(root, "wiki/state/agent-ready/sources.json"),
143
+ readProjectText(root, "wiki/gaps.md"),
144
+ ]);
145
+ if (registryText === undefined || gapsText === undefined) {
146
+ return setupFinding(AGENT_READY_CHECK, "warn", "Agent-ready evidence is incomplete: run /lisa:agent-ready to create the source registry and wiki/gaps.md.");
147
+ }
148
+ const parsed = JSON.parse(registryText);
149
+ if (parsed === null ||
150
+ typeof parsed !== "object" ||
151
+ Array.isArray(parsed) ||
152
+ Reflect.get(parsed, "schema_version") !== 1) {
153
+ return setupFinding(AGENT_READY_CHECK, "fail", "The agent-ready source registry is malformed or unsupported.");
154
+ }
155
+ requireCanonicalUtcTimestamp(Reflect.get(parsed, "updated_at"), "agent-ready updated_at");
156
+ const sources = Reflect.get(parsed, "sources");
157
+ if (!Array.isArray(sources) || sources.length === 0) {
158
+ return setupFinding(AGENT_READY_CHECK, "warn", "The agent-ready source registry has no inventoried sources.");
159
+ }
160
+ const sourceIds = sources.flatMap(source => {
161
+ if (source === null || typeof source !== "object")
162
+ return [];
163
+ const id = Reflect.get(source, "source_id");
164
+ return typeof id === "string" ? [id] : [];
165
+ });
166
+ const validations = await Promise.all(sources.map(source => sourceRowIsComplete(root, source)));
167
+ if (validations.includes("invalid")) {
168
+ return setupFinding(AGENT_READY_CHECK, "fail", "The agent-ready source registry has an invalid row or missing, unsafe, or non-file sanitized evidence.");
169
+ }
170
+ const incomplete = validations.filter(value => value === "incomplete").length;
171
+ if (new Set(sourceIds).size !== sources.length) {
172
+ return setupFinding(AGENT_READY_CHECK, "fail", "The agent-ready source registry has missing or duplicate source identifiers.");
173
+ }
174
+ const openGaps = [...gapsText.matchAll(/\*\*Status\*\*:\s*open\b/giu)]
175
+ .length;
176
+ if (incomplete > 0 || openGaps > 0) {
177
+ return setupFinding(AGENT_READY_CHECK, "warn", `Knowledge convergence is incomplete: ${incomplete} source record${incomplete === 1 ? "" : "s"} incomplete and ${openGaps} open gap${openGaps === 1 ? "" : "s"}.`);
178
+ }
179
+ return setupFinding(AGENT_READY_CHECK, "pass", `All ${sources.length} inventoried sources are complete and wiki/gaps.md has no open gaps.`);
180
+ }
181
+ catch {
182
+ return setupFinding(AGENT_READY_CHECK, "fail", "Agent-ready evidence is unreadable; re-run /lisa:agent-ready.");
183
+ }
184
+ }
185
+ /**
186
+ * Require the optional wiki to exist before accepting the Health wiki check.
187
+ * @param projectRoot - Project root containing the optional wiki
188
+ * @param health - Current deterministic Health evidence, when available
189
+ * @returns Wiki setup readiness finding
190
+ */
191
+ export async function wikiSetupFinding(projectRoot, health) {
192
+ try {
193
+ const root = await realpath(projectRoot);
194
+ if ((await projectPathKind(root, "wiki")) !== "directory") {
195
+ return setupFinding(WIKI_CHECK, "warn", "Optional LLM wiki is not installed. Run /lisa:wiki:install.");
196
+ }
197
+ }
198
+ catch {
199
+ return setupFinding(WIKI_CHECK, "fail", "The wiki path is unsafe or unreadable.");
200
+ }
201
+ return healthEvidenceFinding(WIKI_CHECK, health, ["project.wiki"], "The optional LLM wiki contract files are installed.");
202
+ }
203
+ /**
204
+ * Read names referenced as `secrets.NAME` from current workflow files.
205
+ * @param projectRoot - Project root containing GitHub workflows
206
+ * @returns Sorted unique explicit workflow secret names
207
+ */
208
+ export async function readWorkflowSecretNames(projectRoot) {
209
+ try {
210
+ const root = await realpath(projectRoot);
211
+ if ((await projectPathKind(root, ".github/workflows")) !== "directory") {
212
+ return [];
213
+ }
214
+ const directory = resolveProjectPath(root, ".github/workflows");
215
+ const entries = await readdir(directory, { withFileTypes: true });
216
+ const workflowNames = entries
217
+ .filter(entry => entry.isFile() && /\.(?:ya?ml)$/iu.test(entry.name))
218
+ .map(entry => `.github/workflows/${entry.name}`)
219
+ .sort((left, right) => left.localeCompare(right));
220
+ if (workflowNames.length > 100) {
221
+ throw new Error("Workflow secret inventory exceeds the bounded reader");
222
+ }
223
+ const contents = await Promise.all(workflowNames.map(name => readProjectText(root, name, 256 * 1024)));
224
+ const names = contents.flatMap(content => content === undefined
225
+ ? []
226
+ : [...content.matchAll(/\bsecrets\.([A-Z][A-Z0-9_]*)\b/gu)].map(match => match[1]));
227
+ return [...new Set(names)]
228
+ .filter(name => !IMPLICIT_WORKFLOW_SECRETS.has(name))
229
+ .sort((left, right) => left.localeCompare(right));
230
+ }
231
+ catch {
232
+ return [];
233
+ }
234
+ }
235
+ //# sourceMappingURL=ui-setup-readiness-local.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ui-setup-readiness-local.js","sourceRoot":"","sources":["../../src/cli/ui-setup-readiness-local.ts"],"names":[],"mappings":"AAAA,8EAA8E;AAC9E,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AACrD,OAAO,IAAI,MAAM,WAAW,CAAC;AAE7B,OAAO,EACL,eAAe,EACf,wBAAwB,EACxB,eAAe,EACf,kBAAkB,GACnB,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAAE,4BAA4B,EAAE,MAAM,gCAAgC,CAAC;AAC9E,OAAO,EACL,YAAY,GAGb,MAAM,kCAAkC,CAAC;AAE1C,MAAM,iBAAiB,GAAG,mBAAmB,CAAC;AAC9C,MAAM,UAAU,GAAG,YAAY,CAAC;AAEhC,iFAAiF;AACjF,MAAM,CAAC,MAAM,uBAAuB,GAAG;IACrC,mBAAmB;IACnB,qBAAqB;IACrB,eAAe;IACf,aAAa;IACb,wBAAwB;IACxB,cAAc;CACN,CAAC;AAEX;;;;GAIG;AACH,MAAM,UAAU,gBAAgB,CAC9B,MAAgC;IAEhC,MAAM,OAAO,GAAG,qBAAqB,CACnC,iBAAiB,EACjB,MAAM,EACN,uBAAuB,EACvB,yCAAyC,EACzC,MAAM,CACP,CAAC;IACF,OAAO,OAAO,CAAC,MAAM,KAAK,MAAM;QAC9B,CAAC,CAAC,YAAY,CACV,iBAAiB,EACjB,MAAM,EACN,yHAAyH,CAC1H;QACH,CAAC,CAAC,OAAO,CAAC;AACd,CAAC;AAED,uEAAuE;AACvE,MAAM,yBAAyB,GAAG,IAAI,GAAG,CAAC,CAAC,cAAc,CAAC,CAAC,CAAC;AAE5D;;;;GAIG;AACH,SAAS,OAAO,CAAC,KAAc;IAC7B,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,CAAC,IAAI,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CAAC;QACpD,IAAI,aAAa,CAAC,MAAM,GAAG,GAAG,EAAE,CAAC;YAC/B,MAAM,IAAI,KAAK,CAAC,sDAAsD,CAAC,CAAC;QAC1E,CAAC;QACD,MAAM,QAAQ,GAAG,MAAM,OAAO,CAAC,GAAG,CAChC,aAAa,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC,eAAe,CAAC,IAAI,EAAE,IAAI,EAAE,GAAG,GAAG,IAAI,CAAC,CAAC,CACnE,CAAC;QACF,MAAM,KAAK,GAAG,QAAQ,CAAC,OAAO,CAAC,OAAO,CAAC,EAAE,CACvC,OAAO,KAAK,SAAS;YACnB,CAAC,CAAC,EAAE;YACJ,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC,QAAQ,CAAC,kCAAkC,CAAC,CAAC,CAAC,GAAG,CAC3D,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,CAAC,CAAE,CACnB,CACN,CAAC;QACF,OAAO,CAAC,GAAG,IAAI,GAAG,CAAC,KAAK,CAAC,CAAC;aACvB,MAAM,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,yBAAyB,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;aACpD,IAAI,CAAC,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE,CAAC,IAAI,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC,CAAC;IACtD,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,EAAE,CAAC;IACZ,CAAC;AACH,CAAC"}
@@ -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
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ui-setup-readiness-remote.js","sourceRoot":"","sources":["../../src/cli/ui-setup-readiness-remote.ts"],"names":[],"mappings":"AAMA,OAAO,EACL,YAAY,GAEb,MAAM,kCAAkC,CAAC;AAE1C,MAAM,uBAAuB,GAAG,yBAAyB,CAAC;AAC1D,MAAM,aAAa,GAAG,eAAe,CAAC;AACtC,MAAM,iBAAiB,GAAG,mBAAmB,CAAC;AAE9C;;;;;;GAMG;AACH,gJAAgJ;AAChJ,MAAM,UAAU,uBAAuB,CACrC,MAAgC,EAChC,MAAyC,EACzC,cAAgD;IAEhD,IAAI,MAAM,CAAC,KAAK,KAAK,OAAO,EAAE,CAAC;QAC7B,OAAO,YAAY,CACjB,uBAAuB,EACvB,MAAM,EACN,+CAA+C,MAAM,CAAC,MAAM,IAAI,CACjE,CAAC;IACJ,CAAC;IACD,MAAM,QAAQ,GAAG,MAAM,CAAC,KAAK,CAAC,QAAQ,CAAC;IACvC,MAAM,kBAAkB,GACtB,QAAQ,CAAC,kBAAkB,KAAK,KAAK;QACrC,QAAQ,CAAC,kBAAkB,KAAK,IAAI;QACpC,QAAQ,CAAC,kBAAkB,KAAK,KAAK;QACrC,QAAQ,CAAC,gBAAgB,KAAK,IAAI;QAClC,QAAQ,CAAC,mBAAmB,KAAK,IAAI;QACrC,QAAQ,CAAC,sBAAsB,KAAK,IAAI;QACxC,QAAQ,CAAC,eAAe,KAAK,IAAI,CAAC;IACpC,MAAM,aAAa,GAAG,MAAM,CAAC,KAAK,CAAC,QAAQ,CAAC,IAAI,CAC9C,GAAG,CAAC,EAAE,CACJ,GAAG,CAAC,MAAM;QACV,GAAG,CAAC,oBAAoB,KAAK,IAAI;QACjC,GAAG,CAAC,mBAAmB,KAAK,IAAI;QAChC,GAAG,CAAC,oBAAoB,KAAK,IAAI,CACpC,CAAC;IACF,MAAM,sBAAsB,GAAG,MAAM,EAAE,QAAQ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K,CAAC,MAAM,KAAK,QAAQ;gBAChC,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.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ection 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.ts"],"names":[],"mappings":"AAAA,4EAA4E;AAC5E,OAAO,EAAE,QAAQ,E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AC,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,CA4kMjE,CAAC;AAEL,sFAAsF;AACtF,eAAO,MAAM,uBAAuB,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,IAAI,CAAC,CAk6I/D,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,CAkmMjE,CAAC;AAEL,sFAAsF;AACtF,eAAO,MAAM,uBAAuB,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,IAAI,CAAC,CAk6I/D,CAAC"}