@floomhq/skills 0.2.2 → 0.2.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/dist/index.js +13 -6
- package/dist/index.js.map +2 -2
- package/dist/version.js +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -2407,7 +2407,7 @@ function getApiBaseUrls(preferred) {
|
|
|
2407
2407
|
}
|
|
2408
2408
|
|
|
2409
2409
|
// src/version.ts
|
|
2410
|
-
var VERSION = "0.2.
|
|
2410
|
+
var VERSION = "0.2.3";
|
|
2411
2411
|
|
|
2412
2412
|
// src/api-client.ts
|
|
2413
2413
|
var DEFAULT_TIMEOUT_MS = 2e4;
|
|
@@ -3519,6 +3519,9 @@ function textOf(result) {
|
|
|
3519
3519
|
function pass(name, detail) {
|
|
3520
3520
|
return { name, ok: true, detail };
|
|
3521
3521
|
}
|
|
3522
|
+
function warn(name, detail) {
|
|
3523
|
+
return { name, ok: true, detail, status: "warn" };
|
|
3524
|
+
}
|
|
3522
3525
|
function fail(name, detail) {
|
|
3523
3526
|
return { name, ok: false, detail };
|
|
3524
3527
|
}
|
|
@@ -3534,9 +3537,7 @@ async function doctorCommand(opts = {}) {
|
|
|
3534
3537
|
const auth = await readAuth();
|
|
3535
3538
|
const token = process.env.FLOOM_API_TOKEN?.trim() || auth?.token;
|
|
3536
3539
|
if (!token) {
|
|
3537
|
-
checks.push(
|
|
3538
|
-
emitDoctor(checks, opts.json);
|
|
3539
|
-
process.exit(1);
|
|
3540
|
+
checks.push(warn("fresh_agent_auth", "missing token; API-backed tool calls skipped"));
|
|
3540
3541
|
}
|
|
3541
3542
|
const cliPath = process.argv[1];
|
|
3542
3543
|
if (!cliPath) {
|
|
@@ -3554,8 +3555,8 @@ async function doctorCommand(opts = {}) {
|
|
|
3554
3555
|
env: {
|
|
3555
3556
|
...process.env,
|
|
3556
3557
|
HOME: tmpHome,
|
|
3557
|
-
FLOOM_API_TOKEN: token,
|
|
3558
3558
|
FLOOM_SKILLS_DIR: tmpSkills,
|
|
3559
|
+
...token ? { FLOOM_API_TOKEN: token } : {},
|
|
3559
3560
|
...auth?.apiUrl ? { FLOOM_API_URL: auth.apiUrl } : {}
|
|
3560
3561
|
},
|
|
3561
3562
|
stderr: "pipe"
|
|
@@ -3568,6 +3569,11 @@ async function doctorCommand(opts = {}) {
|
|
|
3568
3569
|
const expected = ["get_skill", "install_skill", "list_workspaces", "search_skills"];
|
|
3569
3570
|
const missing = expected.filter((name) => !toolNames.includes(name));
|
|
3570
3571
|
checks.push(missing.length === 0 ? pass("mcp_tools", toolNames.join(", ")) : fail("mcp_tools", `missing ${missing.join(", ")}`));
|
|
3572
|
+
if (!token) {
|
|
3573
|
+
checks.push(warn("mcp_api_calls", "skipped because no FLOOM_API_TOKEN or ~/.floom/auth.json was available"));
|
|
3574
|
+
emitDoctor(checks, opts.json);
|
|
3575
|
+
return;
|
|
3576
|
+
}
|
|
3571
3577
|
const workspaces = await client.callTool({ name: "list_workspaces", arguments: {} });
|
|
3572
3578
|
checks.push(textOf(workspaces).length > 0 ? pass("mcp_list_workspaces", `${textOf(workspaces).length} chars`) : fail("mcp_list_workspaces", "empty response"));
|
|
3573
3579
|
const search = await client.callTool({ name: "search_skills", arguments: { query: opts.query ?? "pdf" } });
|
|
@@ -3599,7 +3605,8 @@ function emitDoctor(checks, json) {
|
|
|
3599
3605
|
log.heading("Floom doctor");
|
|
3600
3606
|
for (const check of checks) {
|
|
3601
3607
|
const detail = check.detail ? ` ${check.detail}` : "";
|
|
3602
|
-
if (check.
|
|
3608
|
+
if (check.status === "warn") log.warn(`${check.name}${detail}`);
|
|
3609
|
+
else if (check.ok) log.ok(`${check.name}${detail}`);
|
|
3603
3610
|
else log.err(`${check.name}${detail}`);
|
|
3604
3611
|
}
|
|
3605
3612
|
}
|