@lumerahq/cli 0.30.16 → 0.31.0-dev.0

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 CHANGED
@@ -240,25 +240,25 @@ async function main() {
240
240
  switch (command) {
241
241
  // Resource commands
242
242
  case "plan":
243
- await import("./resources-LEDTATIA.js").then((m) => m.plan(args.slice(1)));
243
+ await import("./resources-I6JSKGOX.js").then((m) => m.plan(args.slice(1)));
244
244
  break;
245
245
  case "apply":
246
- await import("./resources-LEDTATIA.js").then((m) => m.apply(args.slice(1)));
246
+ await import("./resources-I6JSKGOX.js").then((m) => m.apply(args.slice(1)));
247
247
  break;
248
248
  case "pull":
249
- await import("./resources-LEDTATIA.js").then((m) => m.pull(args.slice(1)));
249
+ await import("./resources-I6JSKGOX.js").then((m) => m.pull(args.slice(1)));
250
250
  break;
251
251
  case "destroy":
252
- await import("./resources-LEDTATIA.js").then((m) => m.destroy(args.slice(1)));
252
+ await import("./resources-I6JSKGOX.js").then((m) => m.destroy(args.slice(1)));
253
253
  break;
254
254
  case "list":
255
- await import("./resources-LEDTATIA.js").then((m) => m.list(args.slice(1)));
255
+ await import("./resources-I6JSKGOX.js").then((m) => m.list(args.slice(1)));
256
256
  break;
257
257
  case "show":
258
- await import("./resources-LEDTATIA.js").then((m) => m.show(args.slice(1)));
258
+ await import("./resources-I6JSKGOX.js").then((m) => m.show(args.slice(1)));
259
259
  break;
260
260
  case "diff":
261
- await import("./resources-LEDTATIA.js").then((m) => m.diff(args.slice(1)));
261
+ await import("./resources-I6JSKGOX.js").then((m) => m.diff(args.slice(1)));
262
262
  break;
263
263
  // Development
264
264
  case "dev":
@@ -2928,6 +2928,14 @@ function loadLocalAgents(platformDir, filterName, appName) {
2928
2928
  continue;
2929
2929
  }
2930
2930
  }
2931
+ if (config.allowed_user_tags !== void 0) {
2932
+ const tags = config.allowed_user_tags;
2933
+ if (!Array.isArray(tags) || tags.length > 100 || tags.some((tag) => typeof tag !== "string" || !tag || Buffer.byteLength(tag) > 64 || tag !== tag.trim() || tag !== tag.toLowerCase())) {
2934
+ errors.push(`${entry.name}: allowed_user_tags must be an array of at most 100 canonical tag keys (1\u201364 bytes each)`);
2935
+ continue;
2936
+ }
2937
+ config.allowed_user_tags = [...new Set(tags)].sort();
2938
+ }
2931
2939
  let systemPrompt = readFileSync2(promptPath, "utf-8");
2932
2940
  let policyScript = existsSync2(policyPath) ? readFileSync2(policyPath, "utf-8") : "";
2933
2941
  if (appName) {
@@ -2948,6 +2956,9 @@ function loadLocalAgents(platformDir, filterName, appName) {
2948
2956
  }
2949
2957
  return agents;
2950
2958
  }
2959
+ function allowedUserTagsChanged(local, remote) {
2960
+ return local.allowed_user_tags !== void 0 && JSON.stringify([...new Set(local.allowed_user_tags)].sort()) !== JSON.stringify([...new Set(remote.allowed_user_tags ?? [])].sort());
2961
+ }
2951
2962
  async function planAgents(api, localAgents, projectId, localSourceSkillSlugs = /* @__PURE__ */ new Set(), pendingLocalSkillSlugs = /* @__PURE__ */ new Set(), appName) {
2952
2963
  const changes = [];
2953
2964
  let validationErrors = 0;
@@ -3000,6 +3011,7 @@ async function planAgents(api, localAgents, projectId, localSourceSkillSlugs = /
3000
3011
  if ((remote.system_prompt || "").trim() !== systemPrompt.trim()) diffs.push("system_prompt");
3001
3012
  if ((remote.model || "") !== (agent.model || "")) diffs.push("model");
3002
3013
  if (agent.thinking_level !== void 0 && (remote.thinking_level || "") !== agent.thinking_level) diffs.push("thinking_level");
3014
+ if (allowedUserTagsChanged(agent, remote)) diffs.push("allowed_user_tags");
3003
3015
  if ((remote.idle_reap_timeout_seconds ?? 0) !== (agent.idle_reap_timeout_seconds ?? 0)) diffs.push("idle_reap_timeout_seconds");
3004
3016
  if ((remote.policy_script || "").trim() !== (policyScript || "").trim()) diffs.push("policy_script");
3005
3017
  if ((remote.policy_enabled || false) !== (agent.policy_enabled || false)) diffs.push("policy_enabled");
@@ -3103,6 +3115,7 @@ async function applyAgents(api, localAgents, projectId, localSourceSkillSlugs =
3103
3115
  system_prompt: systemPrompt,
3104
3116
  model: agent.model || "",
3105
3117
  ...agent.thinking_level !== void 0 ? { thinking_level: agent.thinking_level } : {},
3118
+ ...agent.allowed_user_tags !== void 0 ? { allowed_user_tags: agent.allowed_user_tags } : {},
3106
3119
  idle_reap_timeout_seconds: agent.idle_reap_timeout_seconds ?? 0,
3107
3120
  skill_ids: skillIds,
3108
3121
  policy_script: policyScript || "",
@@ -3164,6 +3177,7 @@ async function pullAgents(api, platformDir, filterName, projectId, appName) {
3164
3177
  if (agent.description) config.description = agent.description;
3165
3178
  if (agent.model) config.model = agent.model;
3166
3179
  if (agent.thinking_level) config.thinking_level = agent.thinking_level;
3180
+ if (agent.allowed_user_tags != null) config.allowed_user_tags = agent.allowed_user_tags;
3167
3181
  if (agent.idle_reap_timeout_seconds) config.idle_reap_timeout_seconds = agent.idle_reap_timeout_seconds;
3168
3182
  if (skillSlugs.length > 0) config.skills = skillSlugs;
3169
3183
  if (agent.policy_enabled) config.policy_enabled = true;
@@ -4583,7 +4597,11 @@ async function diff(args) {
4583
4597
  const promptChanged = (remote.system_prompt || "").trim() !== local.systemPrompt.trim();
4584
4598
  const policyChanged = (remote.policy_script || "").trim() !== (local.policyScript || "").trim();
4585
4599
  const thinkingLevelChanged = local.agent.thinking_level !== void 0 && (remote.thinking_level || "") !== local.agent.thinking_level;
4586
- if (!promptChanged && !policyChanged && !thinkingLevelChanged && remote.name === local.agent.name && (remote.description || "") === (local.agent.description || "") && (remote.model || "") === (local.agent.model || "") && (remote.idle_reap_timeout_seconds ?? 0) === (local.agent.idle_reap_timeout_seconds ?? 0) && (remote.policy_enabled || false) === (local.agent.policy_enabled || false)) {
4600
+ const userTagsChanged = allowedUserTagsChanged(local.agent, remote);
4601
+ if (userTagsChanged) {
4602
+ console.log(` allowed_user_tags: ${pc2.red(JSON.stringify(remote.allowed_user_tags ?? []))} \u2192 ${pc2.green(JSON.stringify(local.agent.allowed_user_tags))}`);
4603
+ }
4604
+ if (!promptChanged && !policyChanged && !thinkingLevelChanged && !userTagsChanged && remote.name === local.agent.name && (remote.description || "") === (local.agent.description || "") && (remote.model || "") === (local.agent.model || "") && (remote.idle_reap_timeout_seconds ?? 0) === (local.agent.idle_reap_timeout_seconds ?? 0) && (remote.policy_enabled || false) === (local.agent.policy_enabled || false)) {
4587
4605
  console.log(pc2.green(` \u2713 No changes`));
4588
4606
  } else {
4589
4607
  if (promptChanged) renderFullDiff("system_prompt.md", remote.system_prompt || "", local.systemPrompt);
@@ -4706,6 +4724,7 @@ export {
4706
4724
  destroy,
4707
4725
  diff,
4708
4726
  list,
4727
+ loadLocalAgents,
4709
4728
  loadLocalCollections,
4710
4729
  loadLocalSkills,
4711
4730
  localProjectSkillSlug,
@@ -4715,6 +4734,7 @@ export {
4715
4734
  planSkills,
4716
4735
  projectSkillRefCandidates,
4717
4736
  pull,
4737
+ pullAgents,
4718
4738
  pullCollections,
4719
4739
  pullSkills,
4720
4740
  resolveAgentSkillRefs,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lumerahq/cli",
3
- "version": "0.30.16",
3
+ "version": "0.31.0-dev.0",
4
4
  "description": "CLI for building and deploying Lumera apps",
5
5
  "type": "module",
6
6
  "engines": {