agent-cloud-kit 1.0.0-rc.1 → 1.0.0-rc.3
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 +21 -10
- package/dist/cli.js +87 -36
- package/dist/config.js +11 -11
- package/dist/docker.js +1 -1
- package/dist/doctor.js +17 -17
- package/dist/init.js +10 -10
- package/dist/installers.js +6 -6
- package/dist/launcher.js +1 -1
- package/dist/manual.js +2 -2
- package/dist/prepare/banner.js +130 -0
- package/dist/prepare/detect.js +10 -11
- package/dist/prepare/index.js +208 -44
- package/dist/run.js +2 -2
- package/dist/select.js +112 -0
- package/dist/session.js +10 -10
- package/dist/setup.js +6 -6
- package/dist/skill.js +6 -6
- package/package.json +1 -1
- package/skills/cloud-ready/SKILL.md +5 -4
package/dist/setup.js
CHANGED
|
@@ -66,14 +66,14 @@ async function aptLane(config, deps) {
|
|
|
66
66
|
for (const url of config.aptRepos) {
|
|
67
67
|
const name = `apt repo ${url}`;
|
|
68
68
|
if (!url.startsWith(HTTPS_PREFIX)) {
|
|
69
|
-
results.push(await refused(name, `
|
|
69
|
+
results.push(await refused(name, `el repo de apt debe ser una URL ${HTTPS_PREFIX}`));
|
|
70
70
|
continue;
|
|
71
71
|
}
|
|
72
72
|
results.push(await step(name, () => deps.run("bash", ["-c", APT_REPO_SCRIPT, SCRIPT_NAME, url], { env, timeoutMs: APT_STEP_TIMEOUT_MS })));
|
|
73
73
|
}
|
|
74
74
|
const valid = config.apt.filter((pkg) => DEBIAN_PACKAGE_NAME.test(pkg));
|
|
75
75
|
for (const pkg of config.apt.filter((p) => !valid.includes(p))) {
|
|
76
|
-
results.push(await refused(`apt package ${pkg}`, "
|
|
76
|
+
results.push(await refused(`apt package ${pkg}`, "nombre de paquete Debian inválido"));
|
|
77
77
|
}
|
|
78
78
|
if (!valid.length && !config.aptRepos.length)
|
|
79
79
|
return results;
|
|
@@ -119,11 +119,11 @@ async function dockerLane(config, images, docker, deps) {
|
|
|
119
119
|
const results = [];
|
|
120
120
|
const valid = images.filter((image) => !WHITESPACE.test(image) && !image.startsWith("-") && image !== "");
|
|
121
121
|
for (const image of images.filter((i) => !valid.includes(i))) {
|
|
122
|
-
results.push(await refused(`docker pull ${image}`, "
|
|
122
|
+
results.push(await refused(`docker pull ${image}`, "referencia de imagen inválida"));
|
|
123
123
|
}
|
|
124
124
|
const up = await docker.ensure().catch(() => false);
|
|
125
125
|
if (!up)
|
|
126
|
-
return [...results, await refused("docker", `dockerd
|
|
126
|
+
return [...results, await refused("docker", `dockerd no arrancó; revisa ${DOCKERD_LOG}`)];
|
|
127
127
|
return [...results, ...(await pullAll(valid, deps))];
|
|
128
128
|
}
|
|
129
129
|
/**
|
|
@@ -181,7 +181,7 @@ function manifestVersion(root) {
|
|
|
181
181
|
function copyPackage(source, target, version) {
|
|
182
182
|
const found = manifestVersion(source);
|
|
183
183
|
if (found !== version)
|
|
184
|
-
throw new Error(`
|
|
184
|
+
throw new Error(`el paquete en ${source} es ${found ?? "desconocido"}, no ${version}`);
|
|
185
185
|
const temp = `${target}.${process.pid}.tmp`;
|
|
186
186
|
rmSync(temp, { recursive: true, force: true });
|
|
187
187
|
mkdirSync(temp, { recursive: true });
|
|
@@ -267,7 +267,7 @@ export async function setupRepo(repo, ctx) {
|
|
|
267
267
|
});
|
|
268
268
|
const { config, errors } = readConfig(repo);
|
|
269
269
|
if (!config)
|
|
270
|
-
return failed("config", errors.join("; ") || "
|
|
270
|
+
return failed("config", errors.join("; ") || "sin configuración");
|
|
271
271
|
try {
|
|
272
272
|
return await runPhases(repo, config, ctx);
|
|
273
273
|
}
|
package/dist/skill.js
CHANGED
|
@@ -78,15 +78,15 @@ function withVersion(text, version) {
|
|
|
78
78
|
* @throws When the package has no skill or the copy fails (the installed skill is kept).
|
|
79
79
|
* @example
|
|
80
80
|
* installSkill("/home/user/app", "/usr/lib/node_modules/agent-cloud-kit", "1.0.0");
|
|
81
|
-
* // "
|
|
81
|
+
* // "se instaló .agents/skills/cloud-ready 1.0.0"
|
|
82
82
|
*/
|
|
83
83
|
export function installSkill(repo, packageRoot, packageVersion) {
|
|
84
84
|
const current = skillVersion(repo);
|
|
85
85
|
if (current === packageVersion)
|
|
86
|
-
return `${SKILL_DIR}
|
|
86
|
+
return `${SKILL_DIR} ya está en ${packageVersion}`;
|
|
87
87
|
const source = join(packageRoot, PACKAGE_SKILL_DIR);
|
|
88
88
|
if (!existsSync(join(source, "SKILL.md")))
|
|
89
|
-
throw new Error(
|
|
89
|
+
throw new Error(`no se encontró ${PACKAGE_SKILL_DIR}/SKILL.md en ${packageRoot}`);
|
|
90
90
|
const target = join(repo, SKILL_DIR);
|
|
91
91
|
const temp = `${target}.${process.pid}.tmp`;
|
|
92
92
|
const old = `${target}.${process.pid}.old`;
|
|
@@ -107,7 +107,7 @@ export function installSkill(repo, packageRoot, packageVersion) {
|
|
|
107
107
|
throw err;
|
|
108
108
|
}
|
|
109
109
|
rmSync(old, { recursive: true, force: true });
|
|
110
|
-
return current === undefined ? `
|
|
110
|
+
return current === undefined ? `se instaló ${SKILL_DIR} ${packageVersion}` : `se actualizó ${SKILL_DIR} de ${current} a ${packageVersion}`;
|
|
111
111
|
}
|
|
112
112
|
/**
|
|
113
113
|
* Tells whether a path exists, counting a broken symlink as existing.
|
|
@@ -132,7 +132,7 @@ function present(path) {
|
|
|
132
132
|
* @param repo - Repo root.
|
|
133
133
|
* @returns A line describing what was done, or undefined when nothing was needed.
|
|
134
134
|
* @example
|
|
135
|
-
* linkSkill("/home/user/app"); // "
|
|
135
|
+
* linkSkill("/home/user/app"); // "se enlazó .claude/skills/cloud-ready a .agents/skills/cloud-ready"
|
|
136
136
|
*/
|
|
137
137
|
export function linkSkill(repo) {
|
|
138
138
|
const claudeSkills = join(repo, CLAUDE_SKILLS_DIR);
|
|
@@ -144,5 +144,5 @@ export function linkSkill(repo) {
|
|
|
144
144
|
return undefined;
|
|
145
145
|
mkdirSync(claudeSkills, { recursive: true });
|
|
146
146
|
symlinkSync(SKILL_LINK_TARGET, link);
|
|
147
|
-
return `
|
|
147
|
+
return `se enlazó ${SKILL_LINK} a ${SKILL_DIR}`;
|
|
148
148
|
}
|
package/package.json
CHANGED
|
@@ -88,7 +88,7 @@ No le pidas al usuario una lista de variables secretas ni de dominios: anota en
|
|
|
88
88
|
10. **No hagas commit:** `agent-cloud-kit prepare` lo hace al salir. Si te invocaron fuera de
|
|
89
89
|
`prepare`, pregunta al usuario.
|
|
90
90
|
11. **Termina diciéndole al usuario que salga:** dile al usuario, con estas palabras o parecidas,
|
|
91
|
-
"configure terminó: sal de claude con `/exit` y `prepare` sigue
|
|
91
|
+
"configure terminó: sal de claude con `/exit` y `prepare` sigue". Si te
|
|
92
92
|
invocaron fuera de `prepare`, omite este paso.
|
|
93
93
|
|
|
94
94
|
## `verify` (en la nube)
|
|
@@ -98,8 +98,8 @@ Solo con `CLAUDE_CODE_REMOTE=true`; si no, detente y dilo. El prompt trae la ram
|
|
|
98
98
|
`claude/…`: no la cambies; al final empujas a la rama de `prepare`.
|
|
99
99
|
|
|
100
100
|
1. **Contexto:** lee `.claude/cloud.json`, el archivo de `notes` y `docs/agent-cloud.md`. Anota
|
|
101
|
-
las líneas `agent-cloud-kit:` de falla que mostró el inicio de la sesión ("
|
|
102
|
-
|
|
101
|
+
las líneas `agent-cloud-kit:` de falla que mostró el inicio de la sesión ("el setup del entorno no corrió",
|
|
102
|
+
"falló el setup: …", "la máquina se preparó con otra configuración", "faltan variables de entorno").
|
|
103
103
|
2. **Corre `agent-cloud-kit doctor`** y guarda la salida. Si `agent-cloud-kit` no está en el
|
|
104
104
|
`PATH`, el setup no corrió: usa `npx -y agent-cloud-kit doctor` y repórtalo.
|
|
105
105
|
3. **Comprueba la preparación:** dependencias instaladas (p. ej. `node_modules` existe), las
|
|
@@ -174,7 +174,8 @@ inicio de la sesión la marca como faltante, o el error nombra una variable vac
|
|
|
174
174
|
3. **Díselo al usuario en la sesión, en ese momento**, sin esperar al final: qué falta, por qué
|
|
175
175
|
(el comando y el error) y qué hacer, con estas palabras o parecidas: "Falta `<X>` en el entorno
|
|
176
176
|
de claude.ai. Agrégalo en <Network access / Variables de entorno> (está en
|
|
177
|
-
`docs/agent-cloud.md`)
|
|
177
|
+
`docs/agent-cloud.md`) y vuelve a verificar: en tu terminal, en la rama `<rama>` actualizada
|
|
178
|
+
(`git pull`), corre `npx agent-cloud-kit verify`".
|
|
178
179
|
4. En `verify`, ponlo también en "Cambiar en claude.ai" del comentario del PR.
|
|
179
180
|
|
|
180
181
|
Un dominio que ya está en `domains`, o una variable que ya está en `requiredEnv`, no se agrega
|