@floomhq/skills 1.1.1 → 1.1.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 +35 -17
- package/dist/version.js +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -4377,7 +4377,7 @@ async function getMachineIdentity() {
|
|
|
4377
4377
|
}
|
|
4378
4378
|
|
|
4379
4379
|
// src/version.ts
|
|
4380
|
-
var VERSION = "1.1.
|
|
4380
|
+
var VERSION = "1.1.3";
|
|
4381
4381
|
|
|
4382
4382
|
// src/api-client.ts
|
|
4383
4383
|
var DEFAULT_TIMEOUT_MS = 2e4;
|
|
@@ -7947,7 +7947,7 @@ async function installCommand(input, rawOpts = {}) {
|
|
|
7947
7947
|
const slug = safeSkillSlug2(derivedSlug(shareData.skill.title));
|
|
7948
7948
|
for (const file of shareData.file_contents) safeRemotePath2(file.path);
|
|
7949
7949
|
const detected = await detectAgents();
|
|
7950
|
-
if (detected.length === 0) {
|
|
7950
|
+
if (detected.length === 0 && flags.agents.length === 0) {
|
|
7951
7951
|
if (json) {
|
|
7952
7952
|
emitJson({ share: shareInfo(shareData), mode: "plan", applied: false, wouldMutate: false, hasSkipped: false, agents: [], next: [cliCmd("install <link> --agent claude")] });
|
|
7953
7953
|
} else {
|
|
@@ -7967,19 +7967,29 @@ async function installCommand(input, rawOpts = {}) {
|
|
|
7967
7967
|
const planMode = isPlanMode(flags);
|
|
7968
7968
|
const wantAll = flags.allAgents;
|
|
7969
7969
|
let selectedAgents = flags.agents.length > 0 ? flags.agents : wantAll ? detected : [];
|
|
7970
|
+
let autoSelectedAgent = null;
|
|
7971
|
+
if (!planMode && selectedAgents.length === 0 && detected.length === 1) {
|
|
7972
|
+
autoSelectedAgent = detected[0];
|
|
7973
|
+
selectedAgents = [autoSelectedAgent];
|
|
7974
|
+
}
|
|
7970
7975
|
if (!planMode && selectedAgents.length === 0) {
|
|
7971
7976
|
if (!isInteractive()) {
|
|
7977
|
+
const suggested = detected[0];
|
|
7978
|
+
const exactCommand = cliCmd(`install ${input.trim()} --agent ${suggested}`);
|
|
7972
7979
|
if (json) {
|
|
7973
|
-
emitJson({
|
|
7980
|
+
emitJson({
|
|
7981
|
+
share: shareInfo(shareData),
|
|
7982
|
+
error: `${cliCmd("install")} found ${detected.length} agents and needs to know which one`,
|
|
7983
|
+
detectedAgents: detected,
|
|
7984
|
+
next: [exactCommand, cliCmd(`install ${input.trim()} --all-agents --yes`)]
|
|
7985
|
+
});
|
|
7974
7986
|
} else {
|
|
7975
|
-
log.err(
|
|
7987
|
+
log.err(`Found ${detected.length} agents on this machine: ${detected.map((a) => AGENT_LABELS[a]).join(", ")}.`);
|
|
7976
7988
|
log.blank();
|
|
7977
|
-
log.info("Pass --agent
|
|
7989
|
+
log.info("Pass --agent to say which one, or --all-agents for every one.");
|
|
7978
7990
|
log.blank();
|
|
7979
|
-
log.
|
|
7980
|
-
log.command(cliCmd(
|
|
7981
|
-
log.command(cliCmd("install <link> --agent claude,codex --yes"));
|
|
7982
|
-
log.command(cliCmd("install <link> --all-agents --yes"));
|
|
7991
|
+
log.command(exactCommand);
|
|
7992
|
+
log.command(cliCmd(`install ${input.trim()} --all-agents --yes`));
|
|
7983
7993
|
}
|
|
7984
7994
|
process.exitCode = 2;
|
|
7985
7995
|
return;
|
|
@@ -8010,11 +8020,7 @@ async function installCommand(input, rawOpts = {}) {
|
|
|
8010
8020
|
selectedAgents = detected;
|
|
8011
8021
|
}
|
|
8012
8022
|
const scopes = flags.allScopes ? ["global", "project"] : flags.scope === "project" ? ["project"] : ["global"];
|
|
8013
|
-
|
|
8014
|
-
log.err("This project has its own agent skill copies. Pass --global, --project, or --all-scopes.");
|
|
8015
|
-
process.exitCode = 2;
|
|
8016
|
-
return;
|
|
8017
|
-
}
|
|
8023
|
+
const autoSelectedScope = !planMode && flags.scope === null && !flags.allScopes && !isInteractive() && await projectSkillsDirExists() ? "global" : null;
|
|
8018
8024
|
const targets = [];
|
|
8019
8025
|
for (const agent of selectedAgents) {
|
|
8020
8026
|
for (const scope of scopes) {
|
|
@@ -8076,6 +8082,16 @@ async function installCommand(input, rawOpts = {}) {
|
|
|
8076
8082
|
log.heading("Shared skill");
|
|
8077
8083
|
log.info(` ${shareData.skill.title} ${shareData.skill.version.display}`);
|
|
8078
8084
|
log.info(` From: ${shareData.skill.owner.name}`);
|
|
8085
|
+
if (autoSelectedAgent) {
|
|
8086
|
+
log.blank();
|
|
8087
|
+
log.info(`${AGENT_LABELS[autoSelectedAgent]} is the only agent on this machine, so it is the one being installed into.`);
|
|
8088
|
+
log.info(`Pass --agent to choose a different one.`);
|
|
8089
|
+
}
|
|
8090
|
+
if (autoSelectedScope) {
|
|
8091
|
+
log.blank();
|
|
8092
|
+
log.info("This project has its own agent skill copies, and no scope was given, so this installs globally.");
|
|
8093
|
+
log.info("Pass --project to install into this project instead, or --all-scopes for both.");
|
|
8094
|
+
}
|
|
8079
8095
|
log.blank();
|
|
8080
8096
|
}
|
|
8081
8097
|
const results = [];
|
|
@@ -8083,10 +8099,10 @@ async function installCommand(input, rawOpts = {}) {
|
|
|
8083
8099
|
cleanup.trackDir(join12(target.skillsDir, ".floom", "tmp"));
|
|
8084
8100
|
try {
|
|
8085
8101
|
const finalDir = await installToDir(target, slug, shareData.file_contents);
|
|
8086
|
-
results.push({ agent: target.agent, ok: true, path: finalDir, message: "installed" });
|
|
8102
|
+
results.push({ agent: target.agent, scope: target.scope, ok: true, path: finalDir, message: "installed" });
|
|
8087
8103
|
if (!json) log.ok(`Installed ${shareData.skill.title} in ${AGENT_LABELS[target.agent]}`);
|
|
8088
8104
|
} catch (error) {
|
|
8089
|
-
results.push({ agent: target.agent, ok: false, message: error.message });
|
|
8105
|
+
results.push({ agent: target.agent, scope: target.scope, ok: false, message: error.message });
|
|
8090
8106
|
if (!json) log.err(`${AGENT_LABELS[target.agent]}: ${error.message}`);
|
|
8091
8107
|
}
|
|
8092
8108
|
}
|
|
@@ -8096,9 +8112,11 @@ async function installCommand(input, rawOpts = {}) {
|
|
|
8096
8112
|
mode: "apply",
|
|
8097
8113
|
applied: true,
|
|
8098
8114
|
hasFailures: results.some((r) => !r.ok),
|
|
8115
|
+
autoSelectedAgent,
|
|
8116
|
+
autoSelectedScope,
|
|
8099
8117
|
agents: results.map((r) => ({
|
|
8100
8118
|
name: r.agent,
|
|
8101
|
-
scope:
|
|
8119
|
+
scope: r.scope,
|
|
8102
8120
|
skillsDir: r.path ?? "",
|
|
8103
8121
|
path: r.path ?? "",
|
|
8104
8122
|
action: "install",
|
package/dist/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const VERSION = "1.1.
|
|
1
|
+
export const VERSION = "1.1.3";
|