@tacuchi/agent-workflow-cli 25.1.2 → 25.2.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/README.md +2 -1
- package/dist/adapters/node-process.js +35 -0
- package/dist/adapters/node-process.js.map +1 -1
- package/dist/application/amend-service.js +393 -0
- package/dist/application/amend-service.js.map +1 -0
- package/dist/application/doctor/actions.js +158 -0
- package/dist/application/doctor/actions.js.map +1 -0
- package/dist/application/doctor/apply.js +399 -0
- package/dist/application/doctor/apply.js.map +1 -0
- package/dist/application/doctor/auth-dsn.js +143 -0
- package/dist/application/doctor/auth-dsn.js.map +1 -0
- package/dist/application/doctor/auth-flow.js +28 -0
- package/dist/application/doctor/auth-flow.js.map +1 -0
- package/dist/application/doctor/auth-registry.js +12 -0
- package/dist/application/doctor/auth-registry.js.map +1 -0
- package/dist/application/doctor/hosts.js +41 -0
- package/dist/application/doctor/hosts.js.map +1 -0
- package/dist/application/doctor/native-host-state.js +211 -0
- package/dist/application/doctor/native-host-state.js.map +1 -0
- package/dist/application/doctor/prepare.js +262 -0
- package/dist/application/doctor/prepare.js.map +1 -0
- package/dist/application/doctor/provider-installation.js +124 -0
- package/dist/application/doctor/provider-installation.js.map +1 -0
- package/dist/application/doctor/provider-mcps.js +650 -0
- package/dist/application/doctor/provider-mcps.js.map +1 -0
- package/dist/application/doctor/provider-plugins-hooks.js +112 -0
- package/dist/application/doctor/provider-plugins-hooks.js.map +1 -0
- package/dist/application/doctor/provider-skills.js +212 -0
- package/dist/application/doctor/provider-skills.js.map +1 -0
- package/dist/application/doctor/provider-tools-auth.js +201 -0
- package/dist/application/doctor/provider-tools-auth.js.map +1 -0
- package/dist/application/doctor/provider-visibility.js +149 -0
- package/dist/application/doctor/provider-visibility.js.map +1 -0
- package/dist/application/doctor/repair-runner.js +169 -0
- package/dist/application/doctor/repair-runner.js.map +1 -0
- package/dist/application/doctor/report.js +155 -0
- package/dist/application/doctor/report.js.map +1 -0
- package/dist/application/doctor/types.js +5 -0
- package/dist/application/doctor/types.js.map +1 -0
- package/dist/application/flow/advance.js +62 -9
- package/dist/application/flow/advance.js.map +1 -1
- package/dist/application/flow/flow-service.js +18 -7
- package/dist/application/flow/flow-service.js.map +1 -1
- package/dist/application/flow/run-projection.js +6 -1
- package/dist/application/flow/run-projection.js.map +1 -1
- package/dist/application/flow/submit.js +143 -3
- package/dist/application/flow/submit.js.map +1 -1
- package/dist/application/mcp-doctor-service.js +1 -1
- package/dist/application/mcp-doctor-service.js.map +1 -1
- package/dist/application/mcp-host-reader.js +134 -26
- package/dist/application/mcp-host-reader.js.map +1 -1
- package/dist/application/mcp-host-receipt-service.js +9 -7
- package/dist/application/mcp-host-receipt-service.js.map +1 -1
- package/dist/application/self/install-skill.js +10 -2
- package/dist/application/self/install-skill.js.map +1 -1
- package/dist/application/self/mcp-config.js +1 -1
- package/dist/application/self/mcp-config.js.map +1 -1
- package/dist/application/session-narrative.js +15 -0
- package/dist/application/session-narrative.js.map +1 -1
- package/dist/application/source-boundary-policy.js +87 -6
- package/dist/application/source-boundary-policy.js.map +1 -1
- package/dist/cli/commands/amend.js +122 -0
- package/dist/cli/commands/amend.js.map +1 -0
- package/dist/cli/commands/doctor.js +300 -0
- package/dist/cli/commands/doctor.js.map +1 -0
- package/dist/cli/commands/index.js +4 -0
- package/dist/cli/commands/index.js.map +1 -1
- package/dist/cli/dispatch-plan.js +47 -0
- package/dist/cli/dispatch-plan.js.map +1 -0
- package/dist/cli/help-groups.js +8 -0
- package/dist/cli/help-groups.js.map +1 -1
- package/dist/cli/main.js +54 -10
- package/dist/cli/main.js.map +1 -1
- package/dist/cli/parser.js +20 -0
- package/dist/cli/parser.js.map +1 -1
- package/dist/domain/doctor/auth.js +65 -0
- package/dist/domain/doctor/auth.js.map +1 -0
- package/dist/domain/doctor/model.js +82 -0
- package/dist/domain/doctor/model.js.map +1 -0
- package/dist/domain/doctor/operations.js +114 -0
- package/dist/domain/doctor/operations.js.map +1 -0
- package/dist/domain/flow/authority.js +8 -0
- package/dist/domain/flow/authority.js.map +1 -1
- package/dist/domain/flow/run-state.js +181 -25
- package/dist/domain/flow/run-state.js.map +1 -1
- package/dist/domain/redaction.js +40 -0
- package/dist/domain/redaction.js.map +1 -1
- package/package.json +1 -1
- package/skills/w/SKILL.md +2 -1
- package/skills/w/commands/README.md +2 -1
- package/skills/w/commands/doctor.md +31 -0
- package/skills/w/context/MANIFEST.json +4 -0
|
@@ -0,0 +1,262 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `prepare`: el lote exacto que una persona va a aprobar, sellado y sin escribir.
|
|
3
|
+
*
|
|
4
|
+
* Sigue el molde que `discard`, `reset` y `reseal` ya comparten, y por las mismas
|
|
5
|
+
* razones. El sello cubre TODO lo material —qué acciones, sobre qué recursos, en
|
|
6
|
+
* qué orden, con qué clases de efecto y contra qué estado leído—, así que
|
|
7
|
+
* cualquier cambio produce otro digest y un reintento idéntico no vuelve a
|
|
8
|
+
* preguntar. Y la vista previa se DERIVA del objeto sellado en vez de guardarse
|
|
9
|
+
* al lado: lo que se muestra y lo que se aplica tienen que salir de los mismos
|
|
10
|
+
* bytes, o la vista previa es una segunda descripción del cambio que puede
|
|
11
|
+
* discrepar con él.
|
|
12
|
+
*
|
|
13
|
+
* El `read_set` es el compare-and-swap: los archivos que se leyeron para decidir,
|
|
14
|
+
* con su digest. `apply` los relee, y si alguno se movió entre la vista previa y
|
|
15
|
+
* la aprobación, no aplica — porque el lote se armó sobre un estado que ya no
|
|
16
|
+
* está.
|
|
17
|
+
*/
|
|
18
|
+
import { readFileSync } from "node:fs";
|
|
19
|
+
import { join } from "node:path";
|
|
20
|
+
import { SELF_AUTHORIZABLE_CLASSES } from "../../domain/capability/effects.js";
|
|
21
|
+
import { doctorOperation } from "../../domain/doctor/operations.js";
|
|
22
|
+
import { semanticDigest } from "../semantic-operation/protocol.js";
|
|
23
|
+
import { runDoctor } from "./report.js";
|
|
24
|
+
export async function prepareDoctorBatch(ctx, input = {}, deps = {}) {
|
|
25
|
+
const report = await runDoctor(ctx, input, deps);
|
|
26
|
+
const actionable = actionableOf(report);
|
|
27
|
+
const select = [...(input.select ?? [])];
|
|
28
|
+
if (select.length === 0)
|
|
29
|
+
return { ok: true, kind: "listing", listing: { actionable, report } };
|
|
30
|
+
const rejection = rejectSelection(select, report, actionable);
|
|
31
|
+
if (rejection !== null)
|
|
32
|
+
return { ok: false, rejection };
|
|
33
|
+
const chosen = actionable.filter((action) => select.includes(action.finding_id));
|
|
34
|
+
const ordered = topological(chosen);
|
|
35
|
+
if (ordered === null) {
|
|
36
|
+
return {
|
|
37
|
+
ok: false,
|
|
38
|
+
rejection: {
|
|
39
|
+
code: "SELECTION_CYCLE",
|
|
40
|
+
message: "las acciones seleccionadas dependen unas de otras en círculo",
|
|
41
|
+
candidates: chosen.map((action) => action.finding_id),
|
|
42
|
+
action: "quitá una de las acciones del ciclo y volvé a preparar",
|
|
43
|
+
},
|
|
44
|
+
};
|
|
45
|
+
}
|
|
46
|
+
const effects = effectsOf(ordered);
|
|
47
|
+
const batch = {
|
|
48
|
+
actions: ordered,
|
|
49
|
+
effects,
|
|
50
|
+
requires_approval: effects.filter((effect) => !SELF_AUTHORIZABLE_CLASSES.includes(effect)),
|
|
51
|
+
};
|
|
52
|
+
const readSet = readSetFor(ctx, ordered);
|
|
53
|
+
// El sello cubre el lote Y el estado leído, y NADA que no sea material: sin
|
|
54
|
+
// versión de CLI, sin marcas de tiempo, sin el informe entero. Dos corridas
|
|
55
|
+
// sobre el mismo estado tienen que sellar igual, o «un reintento idéntico no
|
|
56
|
+
// vuelve a preguntar» deja de ser cierto.
|
|
57
|
+
const digest = semanticDigest({ batch, read_set: readSet });
|
|
58
|
+
return {
|
|
59
|
+
ok: true,
|
|
60
|
+
kind: "sealed",
|
|
61
|
+
report,
|
|
62
|
+
proposal: {
|
|
63
|
+
digest,
|
|
64
|
+
batch,
|
|
65
|
+
read_set: readSet,
|
|
66
|
+
preview: previewOf(batch, readSet, digest),
|
|
67
|
+
next: `aw doctor apply --approval ${digest}${ordered
|
|
68
|
+
.map((action) => ` --select ${action.finding_id}`)
|
|
69
|
+
.join("")}`,
|
|
70
|
+
},
|
|
71
|
+
};
|
|
72
|
+
}
|
|
73
|
+
/** Los hallazgos que el anotador dejó con acción, como acciones del lote. */
|
|
74
|
+
export function actionableOf(report) {
|
|
75
|
+
const actions = [];
|
|
76
|
+
for (const finding of report.findings) {
|
|
77
|
+
const action = finding.remediation.action;
|
|
78
|
+
if (finding.remediation.kind !== "supported" || action === null)
|
|
79
|
+
continue;
|
|
80
|
+
actions.push(toBatchAction(finding, action));
|
|
81
|
+
}
|
|
82
|
+
return actions;
|
|
83
|
+
}
|
|
84
|
+
function toBatchAction(finding, action) {
|
|
85
|
+
const spec = doctorOperation(action.op);
|
|
86
|
+
return {
|
|
87
|
+
finding_id: finding.id,
|
|
88
|
+
host: finding.host,
|
|
89
|
+
resource: finding.resource.name,
|
|
90
|
+
op: action.op,
|
|
91
|
+
args: { ...action.args },
|
|
92
|
+
effects: [...action.effects],
|
|
93
|
+
depends_on: [...action.depends_on],
|
|
94
|
+
expected: action.expected,
|
|
95
|
+
verb: spec === null ? action.op : spec.verb(action.args),
|
|
96
|
+
summary: spec === null ? finding.summary : spec.summary,
|
|
97
|
+
locator: finding.resource.locator,
|
|
98
|
+
...(action.argv === undefined ? {} : { argv: [...action.argv] }),
|
|
99
|
+
};
|
|
100
|
+
}
|
|
101
|
+
/**
|
|
102
|
+
* Un id que no se puede seleccionar se rechaza NOMBRÁNDOLO, y antes de sellar.
|
|
103
|
+
*
|
|
104
|
+
* Las dos razones son distintas y la persona necesita la suya: el id no existe
|
|
105
|
+
* en este informe (se escribió mal, o el estado cambió y el hallazgo ya no está)
|
|
106
|
+
* o existe y no es accionable (es un recurso ajeno, o su remedio es manual). Un
|
|
107
|
+
* rechazo que sólo dijera «selección inválida» obligaría a adivinar cuál de las
|
|
108
|
+
* dos.
|
|
109
|
+
*/
|
|
110
|
+
function rejectSelection(select, report, actionable) {
|
|
111
|
+
const known = new Set(report.findings.map((finding) => finding.id));
|
|
112
|
+
const withAction = new Set(actionable.map((action) => action.finding_id));
|
|
113
|
+
const unknown = select.filter((id) => !known.has(id));
|
|
114
|
+
if (unknown.length > 0) {
|
|
115
|
+
return {
|
|
116
|
+
code: "SELECTION_UNKNOWN",
|
|
117
|
+
message: `este informe no tiene ${unknown.length === 1 ? "el hallazgo" : "los hallazgos"} ${unknown.join(", ")}`,
|
|
118
|
+
candidates: unknown,
|
|
119
|
+
action: "corré `aw doctor` y elegí un id de los que ese informe lista",
|
|
120
|
+
};
|
|
121
|
+
}
|
|
122
|
+
const inert = select.filter((id) => !withAction.has(id));
|
|
123
|
+
if (inert.length > 0) {
|
|
124
|
+
return {
|
|
125
|
+
code: "SELECTION_NOT_ACTIONABLE",
|
|
126
|
+
message: `${inert.join(", ")} no tiene una reparación automatizable: su remedio es manual o el recurso no es de Workline`,
|
|
127
|
+
candidates: inert,
|
|
128
|
+
action: "leé la guía de ese hallazgo en `aw doctor`; seleccionalo sólo si propone una acción",
|
|
129
|
+
};
|
|
130
|
+
}
|
|
131
|
+
return null;
|
|
132
|
+
}
|
|
133
|
+
/**
|
|
134
|
+
* Orden topológico estable, y `null` ante un ciclo.
|
|
135
|
+
*
|
|
136
|
+
* Estable porque el orden es parte del sello: dos corridas sobre la misma
|
|
137
|
+
* selección tienen que producir la misma secuencia, o el digest cambiaría sin
|
|
138
|
+
* que nada material cambie. Se recorre en el orden en que el informe ya venía
|
|
139
|
+
* —host, categoría, recurso— y una acción entra recién cuando entraron todas las
|
|
140
|
+
* que nombra.
|
|
141
|
+
*/
|
|
142
|
+
function topological(actions) {
|
|
143
|
+
const selected = new Set(actions.map((action) => action.finding_id));
|
|
144
|
+
const placed = new Set();
|
|
145
|
+
const ordered = [];
|
|
146
|
+
let pending = [...actions];
|
|
147
|
+
while (pending.length > 0) {
|
|
148
|
+
// Sólo cuentan las dependencias que están EN el lote: una acción que depende
|
|
149
|
+
// de algo que nadie seleccionó no puede esperarlo para siempre.
|
|
150
|
+
const ready = pending.filter((action) => action.depends_on.every((id) => !selected.has(id) || placed.has(id)));
|
|
151
|
+
if (ready.length === 0)
|
|
152
|
+
return null;
|
|
153
|
+
for (const action of ready) {
|
|
154
|
+
ordered.push(action);
|
|
155
|
+
placed.add(action.finding_id);
|
|
156
|
+
}
|
|
157
|
+
pending = pending.filter((action) => !placed.has(action.finding_id));
|
|
158
|
+
}
|
|
159
|
+
return ordered;
|
|
160
|
+
}
|
|
161
|
+
function effectsOf(actions) {
|
|
162
|
+
const classes = new Set();
|
|
163
|
+
for (const action of actions)
|
|
164
|
+
for (const effect of action.effects)
|
|
165
|
+
classes.add(effect);
|
|
166
|
+
return [...classes].sort((left, right) => (left < right ? -1 : left > right ? 1 : 0));
|
|
167
|
+
}
|
|
168
|
+
/**
|
|
169
|
+
* Lo que se leyó para decidir, con su digest: el compare-and-swap del lote.
|
|
170
|
+
*
|
|
171
|
+
* Se lee por `node:fs` y no por el puerto a propósito: son archivos de los
|
|
172
|
+
* HOSTS, fuera del workspace, que es donde el puerto vive. Un archivo ausente
|
|
173
|
+
* entra igual con el digest `absent`, porque «no estaba» es un estado del que
|
|
174
|
+
* también depende la decisión: si aparece entre la vista previa y la aprobación,
|
|
175
|
+
* el lote se armó sobre otra realidad.
|
|
176
|
+
*/
|
|
177
|
+
function readSetFor(ctx, actions) {
|
|
178
|
+
const paths = new Set();
|
|
179
|
+
// Por el servicio de rutas y no por un `join` propio: una segunda forma de
|
|
180
|
+
// decir dónde vive el registro es una que puede quedar apuntando a otro lado.
|
|
181
|
+
paths.add(ctx.paths.userMcpConnectionsFile());
|
|
182
|
+
for (const action of actions) {
|
|
183
|
+
for (const target of targetsOf(ctx, action))
|
|
184
|
+
paths.add(target);
|
|
185
|
+
}
|
|
186
|
+
return [...paths]
|
|
187
|
+
.sort((left, right) => (left < right ? -1 : left > right ? 1 : 0))
|
|
188
|
+
.map((path) => ({ id: path, digest: digestOf(path) }));
|
|
189
|
+
}
|
|
190
|
+
function targetsOf(ctx, action) {
|
|
191
|
+
const home = ctx.env.homeDir();
|
|
192
|
+
const workspace = ctx.paths.workspaceDir();
|
|
193
|
+
const scope = action.args.scope === "global" ? home : workspace;
|
|
194
|
+
switch (action.op) {
|
|
195
|
+
case "mcp.setup":
|
|
196
|
+
case "mcp.remove":
|
|
197
|
+
case "mcp.migrate":
|
|
198
|
+
return [
|
|
199
|
+
join(scope, ".mcp.json"),
|
|
200
|
+
join(scope, ".claude.json"),
|
|
201
|
+
join(scope, ".codex", "config.toml"),
|
|
202
|
+
];
|
|
203
|
+
case "skills.reinstall":
|
|
204
|
+
return [join(home, ".agents", "skills")];
|
|
205
|
+
// Lo que se leyó para decidir que falta autenticar es el archivo que el
|
|
206
|
+
// SUJETO declaró, no una ruta por operación: el proveedor de conexiones —el
|
|
207
|
+
// dueño de `dsn.env`— declara `flow: null`, así que ninguna acción de flujo
|
|
208
|
+
// puede ser suya y cablear su archivo acá sellaría bytes ajenos al recurso.
|
|
209
|
+
// Un sujeto que no declara archivo no aporta ninguno: la otra mitad de su
|
|
210
|
+
// estado es el entorno del proceso, que no tiene bytes que sellar — y por eso
|
|
211
|
+
// una variable exportada entre la vista previa y la aprobación NO invalida el
|
|
212
|
+
// digest; lo que la ataja es que el recurso pasa a reportar sano y `apply`
|
|
213
|
+
// responde `already` en vez de correr un flujo que ya no hace falta.
|
|
214
|
+
case "auth.flow":
|
|
215
|
+
return action.locator === null ? [] : [action.locator];
|
|
216
|
+
case "multiroot.attach":
|
|
217
|
+
case "multiroot.detach":
|
|
218
|
+
return [join(scope, ".claude", "settings.local.json"), join(scope, ".codex", "config.toml")];
|
|
219
|
+
default:
|
|
220
|
+
return [join(home, ".claude", "settings.json")];
|
|
221
|
+
}
|
|
222
|
+
}
|
|
223
|
+
function digestOf(path) {
|
|
224
|
+
try {
|
|
225
|
+
return semanticDigest(readFileSync(path, "utf-8"));
|
|
226
|
+
}
|
|
227
|
+
catch {
|
|
228
|
+
return "absent";
|
|
229
|
+
}
|
|
230
|
+
}
|
|
231
|
+
/**
|
|
232
|
+
* La vista previa, derivada del objeto sellado.
|
|
233
|
+
*
|
|
234
|
+
* Cada línea sale del lote: si el lote cambia, la vista previa cambia con él, y
|
|
235
|
+
* no hay forma de mostrar una cosa y aplicar otra. El digest va abajo porque es
|
|
236
|
+
* lo que la persona aprueba.
|
|
237
|
+
*/
|
|
238
|
+
function previewOf(batch, readSet, digest) {
|
|
239
|
+
const lines = [`${batch.actions.length} acción(es), en este orden:`];
|
|
240
|
+
batch.actions.forEach((action, index) => {
|
|
241
|
+
lines.push(` ${index + 1}. ${action.summary} — ${action.resource} (${action.host})`);
|
|
242
|
+
lines.push(` comando equivalente: ${action.verb}`);
|
|
243
|
+
// Los tokens exactos, cuando la acción corre un programa: aprobar sin verlos
|
|
244
|
+
// sería aprobar «un flujo», no ESTE flujo.
|
|
245
|
+
if (action.argv !== undefined) {
|
|
246
|
+
lines.push(` se ejecutará, tal cual: ${action.argv.join(" ")}`);
|
|
247
|
+
}
|
|
248
|
+
lines.push(` efectos: ${action.effects.join(", ")}`);
|
|
249
|
+
if (action.depends_on.length > 0) {
|
|
250
|
+
lines.push(` después de: ${action.depends_on.join(", ")}`);
|
|
251
|
+
}
|
|
252
|
+
lines.push(` estado esperado: ${action.expected}`);
|
|
253
|
+
});
|
|
254
|
+
lines.push(`efectos del lote: ${batch.effects.join(", ")}`);
|
|
255
|
+
lines.push(batch.requires_approval.length === 0
|
|
256
|
+
? "nada de esto exige tu aprobación: todas las clases se autorizan solas"
|
|
257
|
+
: `lo que tu aprobación habilita: ${batch.requires_approval.join(", ")}`);
|
|
258
|
+
lines.push(`estado leído para decidir: ${readSet.length} archivo(s)`);
|
|
259
|
+
lines.push(`digest: ${digest}`);
|
|
260
|
+
return lines;
|
|
261
|
+
}
|
|
262
|
+
//# sourceMappingURL=prepare.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version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AAK,CAAC,IAAI,CAAC,qBAAqB,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IAC5D,KAAK,CAAC,IAAI,CACR,KAAK,CAAC,iBAAiB,CAAC,MAAM,KAAK,CAAC;QAClC,CAAC,CAAC,uEAAuE;QACzE,CAAC,CAAC,kCAAkC,KAAK,CAAC,iBAAiB,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAC3E,CAAC;IACF,KAAK,CAAC,IAAI,CAAC,8BAA8B,OAAO,CAAC,MAAM,aAAa,CAAC,CAAC;IACtE,KAAK,CAAC,IAAI,CAAC,WAAW,MAAM,EAAE,CAAC,CAAC;IAChC,OAAO,KAAK,CAAC;AACf,CAAC"}
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
import { doctorFindingId } from "../../domain/doctor/model.js";
|
|
2
|
+
/**
|
|
3
|
+
* Installation and hosts — `selfDoctor` plus the catalog's own state report.
|
|
4
|
+
*
|
|
5
|
+
* Nothing is re-derived. `reportAllHostStates` already decides `ready` /
|
|
6
|
+
* `installable` / `residual-config` and already writes the exact next command
|
|
7
|
+
* into `advice`; this provider translates that into the common model and hands
|
|
8
|
+
* the advice over as guidance rather than inventing a second phrasing of it.
|
|
9
|
+
*/
|
|
10
|
+
import { selfDoctor } from "../self/doctor-self.js";
|
|
11
|
+
import { coverage } from "./types.js";
|
|
12
|
+
const CATEGORY = "installation-hosts";
|
|
13
|
+
export const installationProvider = {
|
|
14
|
+
category: CATEGORY,
|
|
15
|
+
async run(input) {
|
|
16
|
+
const report = await selfDoctor(input.ctx);
|
|
17
|
+
const targets = report.data?.skill.targets ?? [];
|
|
18
|
+
const findings = [];
|
|
19
|
+
for (const host of input.hosts) {
|
|
20
|
+
const state = input.hostStates.find((candidate) => candidate.host === host.host);
|
|
21
|
+
findings.push(hostFinding(host, state?.advice ?? null));
|
|
22
|
+
const target = targets.find((candidate) => candidate.target === host.target);
|
|
23
|
+
if (target !== undefined)
|
|
24
|
+
findings.push(...targetFindings(host, target));
|
|
25
|
+
}
|
|
26
|
+
return {
|
|
27
|
+
coverage: input.hosts.map((host) => coverage(CATEGORY, host.host, "checked")),
|
|
28
|
+
findings,
|
|
29
|
+
};
|
|
30
|
+
},
|
|
31
|
+
};
|
|
32
|
+
function hostFinding(host, advice) {
|
|
33
|
+
const evidence = [
|
|
34
|
+
`estado del host: ${host.status}`,
|
|
35
|
+
`runtime: ${host.runtime.state}${host.runtime.version === null ? "" : ` ${host.runtime.version}`}`,
|
|
36
|
+
`Workline instalado: ${host.workline_installed ? "sí" : "no"}`,
|
|
37
|
+
];
|
|
38
|
+
const base = {
|
|
39
|
+
id: doctorFindingId(host.host, CATEGORY, "workline"),
|
|
40
|
+
host: host.host,
|
|
41
|
+
category: CATEGORY,
|
|
42
|
+
resource: { kind: "host", name: host.label, locator: host.target },
|
|
43
|
+
evidence,
|
|
44
|
+
ownership: "ours",
|
|
45
|
+
};
|
|
46
|
+
if (host.status === "ready") {
|
|
47
|
+
return {
|
|
48
|
+
...base,
|
|
49
|
+
state: "healthy",
|
|
50
|
+
summary: `Workline está instalado en ${host.label} y su runtime responde`,
|
|
51
|
+
impact: "las capacidades de Workline se pueden invocar desde este host",
|
|
52
|
+
remediation: { kind: "none", action: null, guidance: [] },
|
|
53
|
+
};
|
|
54
|
+
}
|
|
55
|
+
const guidance = advice === null ? [] : [advice];
|
|
56
|
+
if (host.status === "installable") {
|
|
57
|
+
return {
|
|
58
|
+
...base,
|
|
59
|
+
proposal: { op: "self.install-skill", args: { target: host.target } },
|
|
60
|
+
state: "warning",
|
|
61
|
+
summary: `${host.label} está en esta máquina y Workline no está instalado ahí`,
|
|
62
|
+
impact: "los comandos de Workline no existen en ese host hasta instalarlo",
|
|
63
|
+
remediation: { kind: "manual", action: null, guidance },
|
|
64
|
+
};
|
|
65
|
+
}
|
|
66
|
+
return {
|
|
67
|
+
...base,
|
|
68
|
+
// Retirar lo residual y instalar el bundle no pueden coexistir para un mismo
|
|
69
|
+
// host: el catálogo declara un host `installable` O `residual-config`, nunca
|
|
70
|
+
// los dos, así que la exclusión es del estado y no una regla que haya que
|
|
71
|
+
// recordar acá.
|
|
72
|
+
proposal: { op: "self.uninstall", args: { target: host.target } },
|
|
73
|
+
state: "warning",
|
|
74
|
+
summary: `${host.label} dejó configuración sin un runtime que la use`,
|
|
75
|
+
impact: "la configuración residual puede confundir a otras herramientas que la lean",
|
|
76
|
+
remediation: { kind: "manual", action: null, guidance },
|
|
77
|
+
};
|
|
78
|
+
}
|
|
79
|
+
/**
|
|
80
|
+
* The two things `selfDoctor` observes per destination that a host state cannot.
|
|
81
|
+
*
|
|
82
|
+
* Both are warnings and neither is inferred from a counter: a leftover reported
|
|
83
|
+
* without its path, or a lock warning folded into the host's own state, is a
|
|
84
|
+
* finding whose resource nobody can locate.
|
|
85
|
+
*/
|
|
86
|
+
function targetFindings(host, target) {
|
|
87
|
+
const findings = [];
|
|
88
|
+
if (target.legacy_leftover === true) {
|
|
89
|
+
findings.push({
|
|
90
|
+
id: doctorFindingId(host.host, CATEGORY, "resto-legacy"),
|
|
91
|
+
host: host.host,
|
|
92
|
+
category: CATEGORY,
|
|
93
|
+
resource: {
|
|
94
|
+
kind: "bundle",
|
|
95
|
+
name: "resto legacy",
|
|
96
|
+
locator: target.legacy_leftover_path ?? target.path,
|
|
97
|
+
},
|
|
98
|
+
proposal: { op: "self.clean-legacy", args: { target: host.target } },
|
|
99
|
+
state: "warning",
|
|
100
|
+
summary: target.legacy_leftover_warning ?? "quedó un bundle de una instalación anterior",
|
|
101
|
+
impact: "el host puede cargar documentos viejos junto a los vigentes",
|
|
102
|
+
evidence: [`ruta observada: ${target.legacy_leftover_path ?? target.path}`],
|
|
103
|
+
ownership: "ours",
|
|
104
|
+
remediation: { kind: "manual", action: null, guidance: ["aw self clean-legacy"] },
|
|
105
|
+
});
|
|
106
|
+
}
|
|
107
|
+
if (target.lock_warning !== undefined) {
|
|
108
|
+
findings.push({
|
|
109
|
+
id: doctorFindingId(host.host, CATEGORY, "lock"),
|
|
110
|
+
host: host.host,
|
|
111
|
+
category: CATEGORY,
|
|
112
|
+
resource: { kind: "lock", name: "lock de skills", locator: target.path },
|
|
113
|
+
proposal: { op: "self.install-skill", args: { target: host.target } },
|
|
114
|
+
state: "warning",
|
|
115
|
+
summary: target.lock_warning,
|
|
116
|
+
impact: "el registro compartido de skills no describe lo que está instalado",
|
|
117
|
+
evidence: [`destino: ${target.path}`],
|
|
118
|
+
ownership: "ours",
|
|
119
|
+
remediation: { kind: "manual", action: null, guidance: ["aw self install-skill"] },
|
|
120
|
+
});
|
|
121
|
+
}
|
|
122
|
+
return findings;
|
|
123
|
+
}
|
|
124
|
+
//# sourceMappingURL=provider-installation.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"provider-installation.js","sourceRoot":"","sources":["../../../src/application/doctor/provider-installation.ts"],"names":[],"mappings":"AAAA,OAAO,EAAsB,eAAe,EAAE,MAAM,8BAA8B,CAAC;AACnF;;;;;;;GAOG;AACH,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AAEpD,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAEtC,MAAM,QAAQ,GAAG,oBAA6B,CAAC;AAE/C,MAAM,CAAC,MAAM,oBAAoB,GAAmB;IAClD,QAAQ,EAAE,QAAQ;IAClB,KAAK,CAAC,GAAG,CAAC,KAA0B;QAClC,MAAM,MAAM,GAAG,MAAM,UAAU,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;QAC3C,MAAM,OAAO,GAAG,MAAM,CAAC,IAAI,EAAE,KAAK,CAAC,OAAO,IAAI,EAAE,CAAC;QACjD,MAAM,QAAQ,GAAoB,EAAE,CAAC;QAErC,KAAK,MAAM,IAAI,IAAI,KAAK,CAAC,KAAK,EAAE,CAAC;YAC/B,MAAM,KAAK,GAAG,KAAK,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC,SAAS,EAAE,EA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