@llmist/cli 9.3.0 → 9.3.1
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/cli.js +10 -5
- package/dist/cli.js.map +1 -1
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -79,7 +79,7 @@ import { Command, InvalidArgumentError as InvalidArgumentError2 } from "commande
|
|
|
79
79
|
// package.json
|
|
80
80
|
var package_default = {
|
|
81
81
|
name: "@llmist/cli",
|
|
82
|
-
version: "9.3.
|
|
82
|
+
version: "9.3.1",
|
|
83
83
|
description: "CLI for llmist - run LLM agents from the command line",
|
|
84
84
|
type: "module",
|
|
85
85
|
main: "dist/cli.js",
|
|
@@ -918,7 +918,9 @@ import os from "os";
|
|
|
918
918
|
import { pathToFileURL } from "url";
|
|
919
919
|
var CACHE_DIR = path4.join(os.homedir(), ".llmist", "gadget-cache");
|
|
920
920
|
function isExternalPackageSpecifier(specifier) {
|
|
921
|
-
if (
|
|
921
|
+
if (/^(?:@[a-z0-9][\w.-]*\/)?[a-z0-9][\w.-]*(?:@[\w.-]+)?(?::[a-z]+)?(?:\/[A-Z]\w*)?$/i.test(
|
|
922
|
+
specifier
|
|
923
|
+
)) {
|
|
922
924
|
return true;
|
|
923
925
|
}
|
|
924
926
|
if (specifier.startsWith("git+")) {
|
|
@@ -1124,10 +1126,13 @@ async function loadExternalGadgets(specifier, forceInstall = false) {
|
|
|
1124
1126
|
const manifest = readManifest(packagePath);
|
|
1125
1127
|
let entryPoint;
|
|
1126
1128
|
let gadgetNames = null;
|
|
1129
|
+
let isSubagent = false;
|
|
1127
1130
|
if (spec.gadgetName) {
|
|
1128
1131
|
gadgetNames = [spec.gadgetName];
|
|
1129
|
-
|
|
1130
|
-
|
|
1132
|
+
const subagentInfo = manifest?.subagents?.[spec.gadgetName];
|
|
1133
|
+
if (subagentInfo) {
|
|
1134
|
+
entryPoint = subagentInfo.entryPoint;
|
|
1135
|
+
isSubagent = true;
|
|
1131
1136
|
} else {
|
|
1132
1137
|
entryPoint = manifest?.gadgets || "./dist/index.js";
|
|
1133
1138
|
}
|
|
@@ -1160,7 +1165,7 @@ async function loadExternalGadgets(specifier, forceInstall = false) {
|
|
|
1160
1165
|
throw new Error(`Failed to import '${specifier}': ${message}`);
|
|
1161
1166
|
}
|
|
1162
1167
|
let gadgets = [];
|
|
1163
|
-
if (manifest?.factory) {
|
|
1168
|
+
if (manifest?.factory && !isSubagent) {
|
|
1164
1169
|
const exportsObj = exports;
|
|
1165
1170
|
if (spec.preset && typeof exportsObj.createGadgetsByPreset === "function") {
|
|
1166
1171
|
const result = await exportsObj.createGadgetsByPreset(
|