@lumerahq/cli 0.18.14 → 0.19.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/{chunk-PVR5DD4G.js → chunk-GKI2HQJC.js} +0 -5
- package/dist/{chunk-PMRN3STN.js → chunk-XDTWVFPE.js} +1 -1
- package/dist/{deps-JVAT5WIB.js → deps-ULTIIDYK.js} +2 -2
- package/dist/{dev-FT5OXF5S.js → dev-EVREBGR6.js} +1 -1
- package/dist/index.js +13 -13
- package/dist/{init-2T6GQ7HJ.js → init-37XOMJLU.js} +1 -1
- package/dist/{register-F23I2BE3.js → register-JJUMS4FI.js} +1 -1
- package/dist/{resources-4F2PYBBR.js → resources-MKCLJUH3.js} +9 -63
- package/dist/{run-6KT4I7J7.js → run-5ZOSPBGO.js} +1 -1
- package/dist/{skills-FBYZIK3M.js → skills-TNJHMV4F.js} +3 -3
- package/package.json +1 -1
|
@@ -219,11 +219,6 @@ var ApiClient = class {
|
|
|
219
219
|
method: "DELETE"
|
|
220
220
|
});
|
|
221
221
|
}
|
|
222
|
-
// MCP Servers
|
|
223
|
-
async listMCPServers() {
|
|
224
|
-
const result = await this.request("/api/mcp-servers");
|
|
225
|
-
return result.servers || [];
|
|
226
|
-
}
|
|
227
222
|
// Agent Skills (for slug-to-ID resolution)
|
|
228
223
|
async listAgentSkills() {
|
|
229
224
|
const result = await this.request("/api/lm_agent_skills?limit=100");
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
deps,
|
|
3
3
|
syncDeps
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-XDTWVFPE.js";
|
|
5
5
|
import "./chunk-2CR762KB.js";
|
|
6
|
-
import "./chunk-
|
|
6
|
+
import "./chunk-GKI2HQJC.js";
|
|
7
7
|
import "./chunk-ZH3NVYEQ.js";
|
|
8
8
|
import "./chunk-FJFIWC7G.js";
|
|
9
9
|
import "./chunk-PNKVD2UK.js";
|
package/dist/index.js
CHANGED
|
@@ -219,39 +219,39 @@ async function main() {
|
|
|
219
219
|
switch (command) {
|
|
220
220
|
// Resource commands
|
|
221
221
|
case "plan":
|
|
222
|
-
await import("./resources-
|
|
222
|
+
await import("./resources-MKCLJUH3.js").then((m) => m.plan(args.slice(1)));
|
|
223
223
|
break;
|
|
224
224
|
case "apply":
|
|
225
|
-
await import("./resources-
|
|
225
|
+
await import("./resources-MKCLJUH3.js").then((m) => m.apply(args.slice(1)));
|
|
226
226
|
break;
|
|
227
227
|
case "pull":
|
|
228
|
-
await import("./resources-
|
|
228
|
+
await import("./resources-MKCLJUH3.js").then((m) => m.pull(args.slice(1)));
|
|
229
229
|
break;
|
|
230
230
|
case "destroy":
|
|
231
|
-
await import("./resources-
|
|
231
|
+
await import("./resources-MKCLJUH3.js").then((m) => m.destroy(args.slice(1)));
|
|
232
232
|
break;
|
|
233
233
|
case "list":
|
|
234
|
-
await import("./resources-
|
|
234
|
+
await import("./resources-MKCLJUH3.js").then((m) => m.list(args.slice(1)));
|
|
235
235
|
break;
|
|
236
236
|
case "show":
|
|
237
|
-
await import("./resources-
|
|
237
|
+
await import("./resources-MKCLJUH3.js").then((m) => m.show(args.slice(1)));
|
|
238
238
|
break;
|
|
239
239
|
case "diff":
|
|
240
|
-
await import("./resources-
|
|
240
|
+
await import("./resources-MKCLJUH3.js").then((m) => m.diff(args.slice(1)));
|
|
241
241
|
break;
|
|
242
242
|
// Development
|
|
243
243
|
case "dev":
|
|
244
|
-
await import("./dev-
|
|
244
|
+
await import("./dev-EVREBGR6.js").then((m) => m.dev(args.slice(1)));
|
|
245
245
|
break;
|
|
246
246
|
case "run":
|
|
247
|
-
await import("./run-
|
|
247
|
+
await import("./run-5ZOSPBGO.js").then((m) => m.run(args.slice(1)));
|
|
248
248
|
break;
|
|
249
249
|
// Project
|
|
250
250
|
case "init":
|
|
251
|
-
await import("./init-
|
|
251
|
+
await import("./init-37XOMJLU.js").then((m) => m.init(args.slice(1)));
|
|
252
252
|
break;
|
|
253
253
|
case "register":
|
|
254
|
-
await import("./register-
|
|
254
|
+
await import("./register-JJUMS4FI.js").then((m) => m.register(args.slice(1)));
|
|
255
255
|
break;
|
|
256
256
|
case "templates":
|
|
257
257
|
await import("./templates-M3RDNDDY.js").then((m) => m.templates(subcommand, args.slice(2)));
|
|
@@ -264,11 +264,11 @@ async function main() {
|
|
|
264
264
|
break;
|
|
265
265
|
// Skills
|
|
266
266
|
case "skills":
|
|
267
|
-
await import("./skills-
|
|
267
|
+
await import("./skills-TNJHMV4F.js").then((m) => m.skills(subcommand, args.slice(2)));
|
|
268
268
|
break;
|
|
269
269
|
// Dependencies
|
|
270
270
|
case "deps":
|
|
271
|
-
await import("./deps-
|
|
271
|
+
await import("./deps-ULTIIDYK.js").then((m) => m.deps(args.slice(1)));
|
|
272
272
|
break;
|
|
273
273
|
// Auth
|
|
274
274
|
case "login":
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
syncDeps
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-XDTWVFPE.js";
|
|
4
4
|
import {
|
|
5
5
|
deploy
|
|
6
6
|
} from "./chunk-SU26C4GL.js";
|
|
@@ -9,7 +9,7 @@ import {
|
|
|
9
9
|
} from "./chunk-2CR762KB.js";
|
|
10
10
|
import {
|
|
11
11
|
createApiClient
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-GKI2HQJC.js";
|
|
13
13
|
import {
|
|
14
14
|
findProjectRoot,
|
|
15
15
|
getApiUrl,
|
|
@@ -1433,6 +1433,13 @@ function loadLocalAgents(platformDir, filterName, appName) {
|
|
|
1433
1433
|
if (filterName && config.external_id !== filterName && config.name !== filterName && entry.name !== filterName) {
|
|
1434
1434
|
continue;
|
|
1435
1435
|
}
|
|
1436
|
+
if (config.mcp_servers !== void 0) {
|
|
1437
|
+
console.log(
|
|
1438
|
+
pc.yellow(
|
|
1439
|
+
` \u26A0 ${entry.name}: "mcp_servers" is deprecated and ignored \u2014 MCP servers are now scoped per project in Platform \u2192 Integrations.`
|
|
1440
|
+
)
|
|
1441
|
+
);
|
|
1442
|
+
}
|
|
1436
1443
|
if (!config.external_id) {
|
|
1437
1444
|
if (appName) {
|
|
1438
1445
|
config.external_id = `${appName}:${entry.name}`;
|
|
@@ -1482,17 +1489,6 @@ async function planAgents(api, localAgents, projectId) {
|
|
|
1482
1489
|
} catch {
|
|
1483
1490
|
}
|
|
1484
1491
|
}
|
|
1485
|
-
let mcpNameToId = /* @__PURE__ */ new Map();
|
|
1486
|
-
let mcpIdToName = /* @__PURE__ */ new Map();
|
|
1487
|
-
const hasMcpRefs = localAgents.some((a) => a.agent.mcp_servers && a.agent.mcp_servers.length > 0) || remoteAgents.some((a) => a.mcp_server_ids && a.mcp_server_ids.length > 0);
|
|
1488
|
-
if (hasMcpRefs) {
|
|
1489
|
-
try {
|
|
1490
|
-
const servers = await api.listMCPServers();
|
|
1491
|
-
mcpNameToId = new Map(servers.map((s) => [s.name, s.id]));
|
|
1492
|
-
mcpIdToName = new Map(servers.map((s) => [s.id, s.name]));
|
|
1493
|
-
} catch {
|
|
1494
|
-
}
|
|
1495
|
-
}
|
|
1496
1492
|
for (const { agent, systemPrompt, policyScript } of localAgents) {
|
|
1497
1493
|
const remote = remoteByExternalId.get(agent.external_id);
|
|
1498
1494
|
if (!remote) {
|
|
@@ -1516,16 +1512,6 @@ async function planAgents(api, localAgents, projectId) {
|
|
|
1516
1512
|
if (removedSlugs.length) parts.push(`-${removedSlugs.join(", -")}`);
|
|
1517
1513
|
diffs.push(`skills (${parts.join(", ")})`);
|
|
1518
1514
|
}
|
|
1519
|
-
const localMcpIds = (agent.mcp_servers || []).map((n) => mcpNameToId.get(n) || n).sort();
|
|
1520
|
-
const remoteMcpIds = [...remote.mcp_server_ids || []].sort();
|
|
1521
|
-
if (localMcpIds.join(",") !== remoteMcpIds.join(",")) {
|
|
1522
|
-
const addedNames = localMcpIds.filter((id) => !remoteMcpIds.includes(id)).map((id) => mcpIdToName.get(id) || id);
|
|
1523
|
-
const removedNames = remoteMcpIds.filter((id) => !localMcpIds.includes(id)).map((id) => mcpIdToName.get(id) || id);
|
|
1524
|
-
const parts = [];
|
|
1525
|
-
if (addedNames.length) parts.push(`+${addedNames.join(", +")}`);
|
|
1526
|
-
if (removedNames.length) parts.push(`-${removedNames.join(", -")}`);
|
|
1527
|
-
diffs.push(`mcp_servers (${parts.join(", ")})`);
|
|
1528
|
-
}
|
|
1529
1515
|
if (diffs.length > 0) {
|
|
1530
1516
|
const textDiffs = [];
|
|
1531
1517
|
if (diffs.includes("system_prompt")) {
|
|
@@ -1556,16 +1542,6 @@ async function applyAgents(api, localAgents, projectId) {
|
|
|
1556
1542
|
console.log(pc.yellow(` \u26A0 Could not fetch skills for resolution: ${e}`));
|
|
1557
1543
|
}
|
|
1558
1544
|
}
|
|
1559
|
-
let mcpMap = /* @__PURE__ */ new Map();
|
|
1560
|
-
const hasMcpRefs = localAgents.some((a) => a.agent.mcp_servers && a.agent.mcp_servers.length > 0);
|
|
1561
|
-
if (hasMcpRefs) {
|
|
1562
|
-
try {
|
|
1563
|
-
const servers = await api.listMCPServers();
|
|
1564
|
-
mcpMap = new Map(servers.map((s) => [s.name, s.id]));
|
|
1565
|
-
} catch (e) {
|
|
1566
|
-
console.log(pc.yellow(` \u26A0 Could not fetch MCP servers for resolution: ${e}`));
|
|
1567
|
-
}
|
|
1568
|
-
}
|
|
1569
1545
|
for (const { agent, systemPrompt, policyScript } of localAgents) {
|
|
1570
1546
|
const remote = remoteByExternalId.get(agent.external_id);
|
|
1571
1547
|
const skillIds = [];
|
|
@@ -1579,17 +1555,6 @@ async function applyAgents(api, localAgents, projectId) {
|
|
|
1579
1555
|
}
|
|
1580
1556
|
}
|
|
1581
1557
|
}
|
|
1582
|
-
const mcpServerIds = [];
|
|
1583
|
-
if (agent.mcp_servers) {
|
|
1584
|
-
for (const name of agent.mcp_servers) {
|
|
1585
|
-
const id = mcpMap.get(name);
|
|
1586
|
-
if (id) {
|
|
1587
|
-
mcpServerIds.push(id);
|
|
1588
|
-
} else {
|
|
1589
|
-
console.log(pc.yellow(` \u26A0 MCP server "${name}" not found, skipping`));
|
|
1590
|
-
}
|
|
1591
|
-
}
|
|
1592
|
-
}
|
|
1593
1558
|
const payload = {
|
|
1594
1559
|
external_id: agent.external_id,
|
|
1595
1560
|
name: agent.name,
|
|
@@ -1597,7 +1562,6 @@ async function applyAgents(api, localAgents, projectId) {
|
|
|
1597
1562
|
system_prompt: systemPrompt,
|
|
1598
1563
|
model: agent.model || "",
|
|
1599
1564
|
skill_ids: skillIds,
|
|
1600
|
-
mcp_server_ids: mcpServerIds,
|
|
1601
1565
|
policy_script: policyScript || "",
|
|
1602
1566
|
policy_enabled: agent.policy_enabled || false,
|
|
1603
1567
|
policy_description: agent.policy_description || ""
|
|
@@ -1628,12 +1592,6 @@ async function pullAgents(api, platformDir, filterName, projectId) {
|
|
|
1628
1592
|
skillIdToSlug = new Map(skills.map((s) => [s.id, s.slug]));
|
|
1629
1593
|
} catch {
|
|
1630
1594
|
}
|
|
1631
|
-
let mcpIdToName = /* @__PURE__ */ new Map();
|
|
1632
|
-
try {
|
|
1633
|
-
const servers = await api.listMCPServers();
|
|
1634
|
-
mcpIdToName = new Map(servers.map((s) => [s.id, s.name]));
|
|
1635
|
-
} catch {
|
|
1636
|
-
}
|
|
1637
1595
|
for (const agent of agents) {
|
|
1638
1596
|
if (!agent.external_id || agent.managed) continue;
|
|
1639
1597
|
if (filterName && agent.external_id !== filterName && agent.name !== filterName) {
|
|
@@ -1649,13 +1607,6 @@ async function pullAgents(api, platformDir, filterName, projectId) {
|
|
|
1649
1607
|
if (slug) skillSlugs.push(slug);
|
|
1650
1608
|
}
|
|
1651
1609
|
}
|
|
1652
|
-
const mcpServerNames = [];
|
|
1653
|
-
if (agent.mcp_server_ids) {
|
|
1654
|
-
for (const id of agent.mcp_server_ids) {
|
|
1655
|
-
const name = mcpIdToName.get(id);
|
|
1656
|
-
if (name) mcpServerNames.push(name);
|
|
1657
|
-
}
|
|
1658
|
-
}
|
|
1659
1610
|
const config = {
|
|
1660
1611
|
external_id: agent.external_id,
|
|
1661
1612
|
name: agent.name
|
|
@@ -1663,7 +1614,6 @@ async function pullAgents(api, platformDir, filterName, projectId) {
|
|
|
1663
1614
|
if (agent.description) config.description = agent.description;
|
|
1664
1615
|
if (agent.model) config.model = agent.model;
|
|
1665
1616
|
if (skillSlugs.length > 0) config.skills = skillSlugs;
|
|
1666
|
-
if (mcpServerNames.length > 0) config.mcp_servers = mcpServerNames;
|
|
1667
1617
|
if (agent.policy_enabled) config.policy_enabled = true;
|
|
1668
1618
|
writeFileSync(join(agentDir, "config.json"), JSON.stringify(config, null, 2) + "\n");
|
|
1669
1619
|
writeFileSync(join(agentDir, "system_prompt.md"), agent.system_prompt || "");
|
|
@@ -2226,10 +2176,6 @@ async function showResource(api, platformDir, resourceType, resourceName, appNam
|
|
|
2226
2176
|
const skills = local?.agent.skills || remote?.skill_ids || [];
|
|
2227
2177
|
console.log(` Skills: ${skills.join(", ")}`);
|
|
2228
2178
|
}
|
|
2229
|
-
if (local?.agent.mcp_servers?.length || remote?.mcp_server_ids?.length) {
|
|
2230
|
-
const mcps = local?.agent.mcp_servers || remote?.mcp_server_ids || [];
|
|
2231
|
-
console.log(` MCP Servers: ${mcps.join(", ")}`);
|
|
2232
|
-
}
|
|
2233
2179
|
console.log();
|
|
2234
2180
|
} else if (resourceType === "mailboxes") {
|
|
2235
2181
|
const localMailboxes = loadLocalMailboxes(platformDir, resourceName);
|
|
@@ -20,7 +20,7 @@ import { join, resolve } from "path";
|
|
|
20
20
|
function findProjectRoot() {
|
|
21
21
|
let dir = process.cwd();
|
|
22
22
|
while (dir !== "/") {
|
|
23
|
-
if (existsSync(join(dir, "
|
|
23
|
+
if (existsSync(join(dir, ".agents")) || existsSync(join(dir, ".claude"))) {
|
|
24
24
|
return dir;
|
|
25
25
|
}
|
|
26
26
|
dir = resolve(dir, "..");
|
|
@@ -199,7 +199,7 @@ async function install(flags) {
|
|
|
199
199
|
const projectRoot = findProjectRoot();
|
|
200
200
|
if (!projectRoot) {
|
|
201
201
|
console.log(pc.red(" Error: Not in a Lumera project directory"));
|
|
202
|
-
console.log(pc.dim(" Run this command from a directory containing
|
|
202
|
+
console.log(pc.dim(" Run this command from a directory containing .agents/ or .claude/"));
|
|
203
203
|
process.exit(1);
|
|
204
204
|
}
|
|
205
205
|
const skillsDir = join(projectRoot, ".agents", "skills");
|
|
@@ -256,7 +256,7 @@ async function update(args, flags) {
|
|
|
256
256
|
const projectRoot = findProjectRoot();
|
|
257
257
|
if (!projectRoot) {
|
|
258
258
|
console.log(pc.red(" Error: Not in a Lumera project directory"));
|
|
259
|
-
console.log(pc.dim(" Run this command from a directory containing
|
|
259
|
+
console.log(pc.dim(" Run this command from a directory containing .agents/ or .claude/"));
|
|
260
260
|
process.exit(1);
|
|
261
261
|
}
|
|
262
262
|
const skillsDir = join(projectRoot, ".agents", "skills");
|