@kisev/agentomatic 11.0.0-dev.46.gfbe1e4c6992e
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/README.md +95 -0
- package/README.ru.md +98 -0
- package/dist/agent-profiles.d.ts +125 -0
- package/dist/agent-profiles.js +820 -0
- package/dist/assets/agents/architect.md +67 -0
- package/dist/assets/agents/critic.md +55 -0
- package/dist/assets/agents/manager.md +40 -0
- package/dist/assets/agents/mapper.md +33 -0
- package/dist/assets/agents/review.md +37 -0
- package/dist/assets/agents/worker.md +78 -0
- package/dist/assets/commands/agents-md.md +10 -0
- package/dist/assets/commands/askme.md +10 -0
- package/dist/assets/commands/ast-grep.md +10 -0
- package/dist/assets/commands/briefing.md +10 -0
- package/dist/assets/commands/code-explain.md +10 -0
- package/dist/assets/commands/code-review.md +10 -0
- package/dist/assets/commands/commit-msg.md +10 -0
- package/dist/assets/commands/docs-prepare.md +10 -0
- package/dist/assets/commands/docs-review.md +10 -0
- package/dist/assets/commands/goal.md +10 -0
- package/dist/assets/commands/humanize.md +10 -0
- package/dist/assets/commands/mattermost-triage.md +10 -0
- package/dist/assets/commands/mattermost.md +10 -0
- package/dist/assets/commands/mr-prepare.md +10 -0
- package/dist/assets/commands/release-prepare.md +10 -0
- package/dist/assets/commands/release-review.md +10 -0
- package/dist/assets/commands/rtk-stats.md +13 -0
- package/dist/assets/commands/rtk.md +10 -0
- package/dist/assets/commands/skill-improve.md +10 -0
- package/dist/assets/commands/slides-prompts-prepare.md +10 -0
- package/dist/assets/commands/spec-manage.md +13 -0
- package/dist/assets/commands/stopit.md +10 -0
- package/dist/assets/commands/task-prepare.md +10 -0
- package/dist/assets/commands/task-review.md +10 -0
- package/dist/assets/commands/task-triage.md +10 -0
- package/dist/assets/commands/taskmatic.md +10 -0
- package/dist/assets/commands/team-retro.md +10 -0
- package/dist/assets/commands/team-roadmap.md +10 -0
- package/dist/assets/commands/team-sprint-close.md +10 -0
- package/dist/assets/commands/team-sprint-start.md +10 -0
- package/dist/assets/lsp-catalog.json +30 -0
- package/dist/assets/migration-inventory.json +301 -0
- package/dist/assets/plugins/memomatic.js +3 -0
- package/dist/assets/plugins/rtk.js +3 -0
- package/dist/assets/plugins/rules-injector.js +3 -0
- package/dist/assets/plugins/zed-bell.js +3 -0
- package/dist/catalog.d.ts +8 -0
- package/dist/catalog.js +39 -0
- package/dist/cli-output.d.ts +27 -0
- package/dist/cli-output.js +296 -0
- package/dist/cli.d.ts +2 -0
- package/dist/cli.js +1135 -0
- package/dist/config-setup.d.ts +71 -0
- package/dist/config-setup.js +438 -0
- package/dist/contracts.d.ts +52 -0
- package/dist/contracts.js +102 -0
- package/dist/doctor.d.ts +44 -0
- package/dist/doctor.js +638 -0
- package/dist/generate-assets.d.ts +1 -0
- package/dist/generate-assets.js +54 -0
- package/dist/index.d.ts +125 -0
- package/dist/index.js +141 -0
- package/dist/installer.d.ts +56 -0
- package/dist/installer.js +710 -0
- package/dist/jsonc.d.ts +56 -0
- package/dist/jsonc.js +432 -0
- package/dist/lifecycle.d.ts +77 -0
- package/dist/lifecycle.js +736 -0
- package/dist/package-metadata.d.ts +4 -0
- package/dist/package-metadata.js +42 -0
- package/dist/plugins/memomatic.d.ts +76 -0
- package/dist/plugins/memomatic.js +101 -0
- package/dist/plugins/rtk.d.ts +41 -0
- package/dist/plugins/rtk.js +177 -0
- package/dist/plugins/rules-injector.d.ts +22 -0
- package/dist/plugins/rules-injector.js +131 -0
- package/dist/plugins/zed-bell.d.ts +13 -0
- package/dist/plugins/zed-bell.js +14 -0
- package/dist/reconcile.d.ts +47 -0
- package/dist/reconcile.js +490 -0
- package/dist/registry.d.ts +21 -0
- package/dist/registry.js +92 -0
- package/dist/routing.d.ts +133 -0
- package/dist/routing.js +578 -0
- package/dist/runtime/state.d.ts +9 -0
- package/dist/runtime/state.js +193 -0
- package/dist/runtime/worktree.d.ts +33 -0
- package/dist/runtime/worktree.js +220 -0
- package/dist/terminal-wizard.d.ts +3 -0
- package/dist/terminal-wizard.js +237 -0
- package/package.json +72 -0
|
@@ -0,0 +1,296 @@
|
|
|
1
|
+
import { CATALOG } from "./catalog.js";
|
|
2
|
+
const GROUPS = ["Agents", "Commands", "Plugins", "State"];
|
|
3
|
+
const OPERATIONS = [
|
|
4
|
+
"create",
|
|
5
|
+
"update",
|
|
6
|
+
"remove",
|
|
7
|
+
"archive-pending",
|
|
8
|
+
"conflict",
|
|
9
|
+
"missing",
|
|
10
|
+
"unchanged",
|
|
11
|
+
];
|
|
12
|
+
const UNSAFE_TERMINAL_CHARACTER = /[\p{Cc}\p{Cf}\p{Zl}\p{Zp}]/u;
|
|
13
|
+
export function terminalSafe(value) {
|
|
14
|
+
return [...value]
|
|
15
|
+
.map((character) => {
|
|
16
|
+
const code = character.codePointAt(0);
|
|
17
|
+
const unsafe = character === "\\" || UNSAFE_TERMINAL_CHARACTER.test(character);
|
|
18
|
+
if (!unsafe)
|
|
19
|
+
return character;
|
|
20
|
+
if (character === "\\")
|
|
21
|
+
return "\\\\";
|
|
22
|
+
if (character === "\n")
|
|
23
|
+
return "\\n";
|
|
24
|
+
if (character === "\r")
|
|
25
|
+
return "\\r";
|
|
26
|
+
if (character === "\t")
|
|
27
|
+
return "\\t";
|
|
28
|
+
if (code <= 0xff)
|
|
29
|
+
return `\\x${code.toString(16).padStart(2, "0")}`;
|
|
30
|
+
if (code <= 0xffff)
|
|
31
|
+
return `\\u${code.toString(16).padStart(4, "0")}`;
|
|
32
|
+
return `\\u{${code.toString(16)}}`;
|
|
33
|
+
})
|
|
34
|
+
.join("");
|
|
35
|
+
}
|
|
36
|
+
function groupFor(path) {
|
|
37
|
+
if (path.startsWith("agents/"))
|
|
38
|
+
return "Agents";
|
|
39
|
+
if (path.startsWith("commands/"))
|
|
40
|
+
return "Commands";
|
|
41
|
+
if (path.startsWith("plugins/"))
|
|
42
|
+
return "Plugins";
|
|
43
|
+
return "State";
|
|
44
|
+
}
|
|
45
|
+
function actionName(action) {
|
|
46
|
+
return {
|
|
47
|
+
install: "Install",
|
|
48
|
+
uninstall: "Uninstall",
|
|
49
|
+
"model-set": "Configure agent model",
|
|
50
|
+
"critic-add": "Add critic",
|
|
51
|
+
"critic-remove": "Remove critic",
|
|
52
|
+
reconcile: "Reconcile agents",
|
|
53
|
+
}[action];
|
|
54
|
+
}
|
|
55
|
+
function operationSummary(operations) {
|
|
56
|
+
return OPERATIONS.map((operation) => {
|
|
57
|
+
const count = operations.filter((item) => item.operation === operation).length;
|
|
58
|
+
return count ? `${operation} ${count}` : undefined;
|
|
59
|
+
})
|
|
60
|
+
.filter(Boolean)
|
|
61
|
+
.join(", ");
|
|
62
|
+
}
|
|
63
|
+
function shortPath(path, group) {
|
|
64
|
+
if (group === "State")
|
|
65
|
+
return terminalSafe(path);
|
|
66
|
+
const value = path.slice(path.indexOf("/") + 1);
|
|
67
|
+
return terminalSafe(value.endsWith(".md") || value.endsWith(".js") ? value.slice(0, -3) : value);
|
|
68
|
+
}
|
|
69
|
+
function detailLines(operations) {
|
|
70
|
+
const lines = [];
|
|
71
|
+
for (const group of GROUPS) {
|
|
72
|
+
const grouped = operations.filter((item) => groupFor(item.path) === group && item.operation !== "unchanged");
|
|
73
|
+
for (const operation of OPERATIONS.filter((value) => value !== "unchanged" && grouped.some((item) => item.operation === value))) {
|
|
74
|
+
const values = grouped
|
|
75
|
+
.filter((item) => item.operation === operation)
|
|
76
|
+
.map((item) => operation === "conflict"
|
|
77
|
+
? `${shortPath(item.path, group)} (${terminalSafe(item.reason ?? "conflict")})`
|
|
78
|
+
: shortPath(item.path, group));
|
|
79
|
+
const visible = operation === "conflict" ? values : values.slice(0, 8);
|
|
80
|
+
const rest = values.length - visible.length;
|
|
81
|
+
lines.push(` ${group}/${operation}: ${visible.join(", ")}${rest ? ` (+${rest} more)` : ""}`);
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
return lines;
|
|
85
|
+
}
|
|
86
|
+
function migrationSummary(operations) {
|
|
87
|
+
const count = operations.filter((item) => item.reason === "v1.0.0 ownership transfer").length;
|
|
88
|
+
return count
|
|
89
|
+
? ` Ownership migration: ${count} agent${count === 1 ? "" : "s"} from v1.0.0`
|
|
90
|
+
: undefined;
|
|
91
|
+
}
|
|
92
|
+
export function renderPlan(plan, options) {
|
|
93
|
+
const version = "package_version" in plan ? ` @kisev/agentomatic ${plan.package_version}` : "";
|
|
94
|
+
const lines = [
|
|
95
|
+
`${actionName(plan.action)}${version} (${plan.scope})`,
|
|
96
|
+
`Target: ${terminalSafe(plan.root)}`,
|
|
97
|
+
...("selection" in plan
|
|
98
|
+
? [
|
|
99
|
+
`Core integration: ${plan.selection.core_activation ? "active" : "not selected"}`,
|
|
100
|
+
`Plugins: ${plan.selection.plugins.length ? plan.selection.plugins.join(", ") : "none"}`,
|
|
101
|
+
]
|
|
102
|
+
: []),
|
|
103
|
+
"",
|
|
104
|
+
options.applied ? "Applied changes:" : "Planned changes:",
|
|
105
|
+
];
|
|
106
|
+
for (const group of GROUPS) {
|
|
107
|
+
const operations = plan.operations.filter((item) => groupFor(item.path) === group);
|
|
108
|
+
if (operations.length)
|
|
109
|
+
lines.push(` ${group}: ${operationSummary(operations)}`);
|
|
110
|
+
}
|
|
111
|
+
const migration = migrationSummary(plan.operations);
|
|
112
|
+
if (migration)
|
|
113
|
+
lines.push(migration);
|
|
114
|
+
const details = detailLines(plan.operations);
|
|
115
|
+
if (details.length)
|
|
116
|
+
lines.push("", "Details:", ...details);
|
|
117
|
+
const conflicts = plan.operations.filter((item) => item.operation === "conflict").length;
|
|
118
|
+
lines.push("", `Conflicts: ${conflicts || "none"}`);
|
|
119
|
+
lines.push(options.applied
|
|
120
|
+
? `Restart required: ${plan.requires_restart ? "yes" : "no"}`
|
|
121
|
+
: `Restart after apply: ${plan.requires_restart ? "yes" : "no"}`);
|
|
122
|
+
if (!options.applied) {
|
|
123
|
+
if (plan.superseded_plan)
|
|
124
|
+
lines.push("", "Superseded plan:", ` kind: ${terminalSafe(plan.superseded_plan.kind)}`, ` confirmation: ${terminalSafe(plan.superseded_plan.confirmation_digest)}`, ` created: ${terminalSafe(plan.superseded_plan.created_at)}`, ` expires: ${terminalSafe(plan.superseded_plan.expires_at)}`);
|
|
125
|
+
if (plan.receipt_expires_at)
|
|
126
|
+
lines.push(`Confirmation expires: ${plan.receipt_expires_at}`);
|
|
127
|
+
if ("plan_digest" in plan)
|
|
128
|
+
lines.push(`Plan digest: ${plan.plan_digest}`);
|
|
129
|
+
if (plan.confirmation_digest ?? plan.digest) {
|
|
130
|
+
lines.push(`Confirmation digest: ${plan.confirmation_digest ?? plan.digest}`);
|
|
131
|
+
lines.push(`Digest: ${plan.confirmation_digest ?? plan.digest}`);
|
|
132
|
+
}
|
|
133
|
+
if (options.confirmationCommand)
|
|
134
|
+
lines.push("", "Apply:", ` ${options.confirmationCommand}`);
|
|
135
|
+
}
|
|
136
|
+
if (options.applied && options.hint)
|
|
137
|
+
lines.push("", "Next:", ` ${options.hint}`);
|
|
138
|
+
return `${lines.join("\n")}\n`;
|
|
139
|
+
}
|
|
140
|
+
export function renderConfigSetup(plan, options) {
|
|
141
|
+
const lines = [
|
|
142
|
+
`Config setup @kisev/agentomatic ${plan.package_version} (${plan.scope})`,
|
|
143
|
+
`Root: ${terminalSafe(plan.root)}`,
|
|
144
|
+
"",
|
|
145
|
+
];
|
|
146
|
+
if (plan.targets.length)
|
|
147
|
+
lines.push("Targets:", ...plan.targets.map((item) => ` ${item.target}: ${terminalSafe(item.path)} (${item.exists ? "existing" : "new"})`));
|
|
148
|
+
else
|
|
149
|
+
lines.push("Targets: none");
|
|
150
|
+
const fragments = plan.operations.filter((item) => item.fragment !== "file");
|
|
151
|
+
if (fragments.length) {
|
|
152
|
+
lines.push("", options.applied ? "Applied fragments:" : "Planned fragments:", ...fragments.map((item) => ` ${item.target}/${item.fragment}: ${item.operation}${item.reason ? ` (${terminalSafe(item.reason)})` : ""}`));
|
|
153
|
+
}
|
|
154
|
+
if (plan.skipped_fragments.length)
|
|
155
|
+
lines.push("", "Skipped fragments:", ...plan.skipped_fragments.map((item) => ` ${item.fragment}: ${terminalSafe(item.reason)}`));
|
|
156
|
+
const conflicts = plan.operations.filter((item) => item.operation === "conflict");
|
|
157
|
+
lines.push("", `Conflicts: ${conflicts.length || "none"}`);
|
|
158
|
+
lines.push(options.applied
|
|
159
|
+
? `Restart required: ${plan.requires_restart ? "yes" : "no"}`
|
|
160
|
+
: `Restart after apply: ${plan.requires_restart ? "yes" : "no"}`);
|
|
161
|
+
if (!options.applied) {
|
|
162
|
+
if (!plan.confirmable) {
|
|
163
|
+
lines.push("", "No configuration changes are required.");
|
|
164
|
+
}
|
|
165
|
+
else {
|
|
166
|
+
if (plan.superseded_plan)
|
|
167
|
+
lines.push("", "Superseded plan:", ` kind: ${terminalSafe(plan.superseded_plan.kind)}`, ` confirmation: ${terminalSafe(plan.superseded_plan.confirmation_digest)}`, ` created: ${terminalSafe(plan.superseded_plan.created_at)}`, ` expires: ${terminalSafe(plan.superseded_plan.expires_at)}`);
|
|
168
|
+
lines.push("", `Plan digest: ${plan.plan_digest}`);
|
|
169
|
+
if (plan.receipt_expires_at)
|
|
170
|
+
lines.push(`Confirmation expires: ${plan.receipt_expires_at}`);
|
|
171
|
+
if (plan.confirmation_digest ?? plan.digest)
|
|
172
|
+
lines.push(`Confirmation digest: ${plan.confirmation_digest ?? plan.digest}`, `Digest: ${plan.confirmation_digest ?? plan.digest}`);
|
|
173
|
+
if (options.confirmationCommand)
|
|
174
|
+
lines.push("", "Apply:", ` ${options.confirmationCommand}`);
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
if (options.applied && options.hint)
|
|
178
|
+
lines.push("", "Next:", ` ${options.hint}`);
|
|
179
|
+
return `${lines.join("\n")}\n`;
|
|
180
|
+
}
|
|
181
|
+
function table(rows) {
|
|
182
|
+
const widths = rows[0].map((_, column) => Math.max(...rows.map((row) => row[column]?.length ?? 0)));
|
|
183
|
+
return rows.map((row) => row
|
|
184
|
+
.map((value, column) => value.padEnd(widths[column]))
|
|
185
|
+
.join(" ")
|
|
186
|
+
.trimEnd());
|
|
187
|
+
}
|
|
188
|
+
export function renderInventory(inventory) {
|
|
189
|
+
const rows = [
|
|
190
|
+
["NAME", "MODEL", "VARIANT", "OWNER", "STATE"],
|
|
191
|
+
...inventory.profiles.map((profile) => [
|
|
192
|
+
terminalSafe(profile.name),
|
|
193
|
+
terminalSafe(profile.model ?? "default"),
|
|
194
|
+
terminalSafe(profile.variant ?? "-"),
|
|
195
|
+
profile.ownership,
|
|
196
|
+
profile.state,
|
|
197
|
+
]),
|
|
198
|
+
];
|
|
199
|
+
return `${[
|
|
200
|
+
`OpenCode agents (${inventory.scope})`,
|
|
201
|
+
`Target: ${terminalSafe(inventory.root)}`,
|
|
202
|
+
"",
|
|
203
|
+
...table(rows),
|
|
204
|
+
"",
|
|
205
|
+
`Critic pool: ${inventory.critic_pool.map(terminalSafe).join(", ")}`,
|
|
206
|
+
`Collisions: ${inventory.collisions.length ? inventory.collisions.map(terminalSafe).join(", ") : "none"}`,
|
|
207
|
+
`Drift: ${inventory.drift.length ? inventory.drift.map(terminalSafe).join(", ") : "none"}`,
|
|
208
|
+
].join("\n")}\n`;
|
|
209
|
+
}
|
|
210
|
+
export function shellCommand(arguments_) {
|
|
211
|
+
return commandLine(["npx", "--yes", `@kisev/agentomatic@${CATALOG.version}`, ...arguments_]);
|
|
212
|
+
}
|
|
213
|
+
function commandLine(arguments_) {
|
|
214
|
+
return arguments_
|
|
215
|
+
.map((value) => /^[A-Za-z0-9_./:@=-]+$/.test(value) ? value : `'${value.replaceAll("'", `'"'"'`)}'`)
|
|
216
|
+
.join(" ");
|
|
217
|
+
}
|
|
218
|
+
export function scopeArguments(scope) {
|
|
219
|
+
return scope === "global" ? ["--global"] : [];
|
|
220
|
+
}
|
|
221
|
+
export function renderReconcile(plan, options) {
|
|
222
|
+
const lines = [
|
|
223
|
+
`Reconcile (${plan.scope})`,
|
|
224
|
+
`Target: ${terminalSafe(plan.root)}`,
|
|
225
|
+
"",
|
|
226
|
+
options.applied ? "Applied retired assets:" : "Planned retired assets:",
|
|
227
|
+
` current: ${plan.current.length}`,
|
|
228
|
+
` retired: ${plan.retired.length}`,
|
|
229
|
+
` renamed: ${plan.renamed.length}`,
|
|
230
|
+
` modified-managed: ${plan.modified_managed.length}`,
|
|
231
|
+
` user-owned: ${plan.user_owned.length}`,
|
|
232
|
+
` unknown: ${plan.unknown.length}`,
|
|
233
|
+
` conflicts: ${plan.conflicts.length}`,
|
|
234
|
+
` diagnostic-state-only: ${plan.diagnostic_state_only.length}`,
|
|
235
|
+
` operations: ${plan.operations.length}`,
|
|
236
|
+
];
|
|
237
|
+
if (plan.retired.length)
|
|
238
|
+
lines.push("", "Retired:", ...plan.retired.slice(0, 20).map((entry) => ` ${terminalSafe(entry.path)}`));
|
|
239
|
+
if (plan.renamed.length)
|
|
240
|
+
lines.push("", "Renamed:", ...plan.renamed.map((entry) => ` ${terminalSafe(entry.path)} -> ${terminalSafe(entry.replacement ?? "unknown")}`));
|
|
241
|
+
if (plan.unknown.length)
|
|
242
|
+
lines.push("", "Unknown (preserved):", ...plan.unknown.map((entry) => ` ${terminalSafe(entry.path)} (${terminalSafe(entry.reason)})`));
|
|
243
|
+
if (plan.operations.length)
|
|
244
|
+
lines.push("", "Operations:", ...plan.operations.map((entry) => ` ${entry.operation}: ${terminalSafe(entry.path)}`));
|
|
245
|
+
if (plan.conflicts.length)
|
|
246
|
+
lines.push("", "Conflicts:", ...plan.conflicts.map((entry) => ` ${terminalSafe(entry.path)} (${terminalSafe(entry.reason)})`));
|
|
247
|
+
if (plan.modified_managed.length)
|
|
248
|
+
lines.push("", "Modified managed:", ...plan.modified_managed.map((entry) => ` ${terminalSafe(entry.path)} (${terminalSafe(entry.reason)})`));
|
|
249
|
+
if (!options.applied) {
|
|
250
|
+
const blocked = plan.modified_managed.length > 0 || plan.conflicts.length > 0;
|
|
251
|
+
if (blocked) {
|
|
252
|
+
lines.push("", "Blocked:");
|
|
253
|
+
if (plan.modified_managed.length)
|
|
254
|
+
lines.push(` Update managed assets first: ${shellCommand(["install", ...scopeArguments(plan.scope), "--dry-run"])}`, " Apply the exact confirmation command from that installer preview, then build a new reconcile preview.");
|
|
255
|
+
if (plan.conflicts.length)
|
|
256
|
+
lines.push(" Manually resolve every ownership conflict listed above before reconciling.");
|
|
257
|
+
}
|
|
258
|
+
else if (!plan.confirmable) {
|
|
259
|
+
lines.push("", "No reconciliation changes are required.");
|
|
260
|
+
}
|
|
261
|
+
else if (options.confirmationCommand) {
|
|
262
|
+
if (plan.superseded_plan)
|
|
263
|
+
lines.push("", "Superseded plan:", ` kind: ${terminalSafe(plan.superseded_plan.kind)}`, ` confirmation: ${terminalSafe(plan.superseded_plan.confirmation_digest)}`, ` created: ${terminalSafe(plan.superseded_plan.created_at)}`, ` expires: ${terminalSafe(plan.superseded_plan.expires_at)}`);
|
|
264
|
+
lines.push("", `Plan digest: ${plan.plan_digest}`);
|
|
265
|
+
if (plan.receipt_expires_at)
|
|
266
|
+
lines.push(`Confirmation expires: ${plan.receipt_expires_at}`);
|
|
267
|
+
if (plan.confirmation_digest ?? plan.digest)
|
|
268
|
+
lines.push(`Confirmation digest: ${plan.confirmation_digest ?? plan.digest}`, `Digest: ${plan.confirmation_digest ?? plan.digest}`);
|
|
269
|
+
lines.push("", "Apply:", ` ${options.confirmationCommand}`);
|
|
270
|
+
}
|
|
271
|
+
}
|
|
272
|
+
return `${lines.join("\n")}\n`;
|
|
273
|
+
}
|
|
274
|
+
export function renderDoctor(report) {
|
|
275
|
+
const actionable = report.checks.filter((item) => item.status === "fail" || item.status === "warn");
|
|
276
|
+
const next = new Set(actionable.flatMap((item) => item.remediation ?? []));
|
|
277
|
+
if (report.conflicts.length) {
|
|
278
|
+
next.add(shellCommand(["reconcile", ...scopeArguments(report.scope), "--dry-run"]));
|
|
279
|
+
}
|
|
280
|
+
if (actionable.some((item) => item.id.startsWith("assets."))) {
|
|
281
|
+
next.add(shellCommand(["install", ...scopeArguments(report.scope), "--dry-run"]));
|
|
282
|
+
}
|
|
283
|
+
const lines = [
|
|
284
|
+
`Doctor TLDR: ${report.status} (${report.scope})`,
|
|
285
|
+
`Package: ${report.versions.package ?? "unavailable"} Catalog: ${report.versions.catalog} OpenCode: ${report.versions.opencode ?? "unavailable"}`,
|
|
286
|
+
`Checks: pass ${report.counts.pass}, warn ${report.counts.warn}, fail ${report.counts.fail}, incomplete ${report.counts.incomplete}`,
|
|
287
|
+
"Mutations: no",
|
|
288
|
+
];
|
|
289
|
+
if (actionable.length)
|
|
290
|
+
lines.push("", "Actionable findings:", ...actionable.map((item) => ` ${terminalSafe(item.id)}: ${terminalSafe(item.summary)}`));
|
|
291
|
+
if (report.conflicts.length)
|
|
292
|
+
lines.push("", "Conflicts:", ...report.conflicts.map((item) => ` ${terminalSafe(String(item.path ?? "unknown"))} (${terminalSafe(String(item.reason ?? "conflict"))})`));
|
|
293
|
+
if (next.size)
|
|
294
|
+
lines.push("", "Next commands:", ...[...next].map((item) => ` ${terminalSafe(item)}`));
|
|
295
|
+
return `${lines.join("\n")}\n`;
|
|
296
|
+
}
|
package/dist/cli.d.ts
ADDED