lua-cli 3.51.0 → 3.52.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
@@ -6663,6 +6663,9 @@ function isWebRouteInput(value3) {
6663
6663
  if (!app || typeof app.id !== "string" || typeof app.name !== "string" || typeof app.origin !== "string") return false;
6664
6664
  return true;
6665
6665
  }
6666
+ function agentPaneEnabled(version) {
6667
+ return version?.agentPane !== false;
6668
+ }
6666
6669
  function evidenceDisplayText(text2) {
6667
6670
  const raw = typeof text2 === "string" ? text2 : "";
6668
6671
  if (!raw.trim()) return "";
@@ -12704,6 +12707,8 @@ listed here; never invent a target.`;
12704
12707
  __name3(isWebRouteInput, "isWebRouteInput");
12705
12708
  WEB_APP_NAME_PATTERN = /^[a-z][a-z0-9-]*$/;
12706
12709
  WEB_APP_TITLE_MAX_CHARS = 80;
12710
+ __name(agentPaneEnabled, "agentPaneEnabled");
12711
+ __name3(agentPaneEnabled, "agentPaneEnabled");
12707
12712
  WEB_APP_ENTRY_HTML_MAX_CHARS = 256 * 1024;
12708
12713
  WEB_APP_MAX_ASSETS = 1e3;
12709
12714
  WEB_APP_ASSET_PATH_PATTERN = /^assets\/(?!.*\.\.)[A-Za-z0-9._\-/]+$/;
@@ -34350,6 +34355,7 @@ var init_web_app_plugin = __esm({
34350
34355
  const { routes, unreadable, duplicates, files } = readRoutes(config);
34351
34356
  const sourceFile = config.getSourceFile();
34352
34357
  const title = extractStringProperty(config, "title");
34358
+ const agentPane = extractBooleanProperty(config, "agentPane");
34353
34359
  return {
34354
34360
  kind: this.kind,
34355
34361
  ...common,
@@ -34357,6 +34363,8 @@ var init_web_app_plugin = __esm({
34357
34363
  pattern,
34358
34364
  title,
34359
34365
  titleUnreadable: hasProperty(config, "title") && title === void 0,
34366
+ agentPane,
34367
+ agentPaneUnreadable: hasProperty(config, "agentPane") && agentPane === void 0,
34360
34368
  pagesRoot,
34361
34369
  spa: typeof pages?.spa === "boolean" ? pages.spa : void 0,
34362
34370
  nav: Array.isArray(pages?.nav) ? pages.nav : void 0,
@@ -34402,6 +34410,9 @@ var init_web_app_plugin = __esm({
34402
34410
  } else if (meta.title !== void 0 && (!meta.title.trim() || meta.title.length > WEB_APP_TITLE_MAX_CHARS)) {
34403
34411
  errors.push(validationError(`Web app \`title\` must be non-empty and at most ${WEB_APP_TITLE_MAX_CHARS} characters`, at));
34404
34412
  }
34413
+ if (meta.agentPaneUnreadable) {
34414
+ errors.push(validationError("Web app `agentPane` must be a compile-time boolean (`true` or `false`)", at));
34415
+ }
34405
34416
  if (!meta.pagesRoot) {
34406
34417
  errors.push(validationError("Web app `pages.root` must be a string literal naming the Vite project directory", at));
34407
34418
  }
@@ -34511,6 +34522,10 @@ var init_web_app_plugin = __esm({
34511
34522
  ...meta.title?.trim() ? {
34512
34523
  title: meta.title.trim()
34513
34524
  } : {},
34525
+ // Only the opt-out is written, so an app that never sets it compiles exactly as before.
34526
+ ...meta.agentPane === false ? {
34527
+ agentPane: false
34528
+ } : {},
34514
34529
  pagesRoot: meta.pagesRoot ?? ".",
34515
34530
  spa: meta.spa !== false,
34516
34531
  nav: meta.nav ?? [],
@@ -53039,6 +53054,10 @@ var WebAppHandler = class extends BaseVersionedHandler {
53039
53054
  ...app.title ? {
53040
53055
  title: app.title
53041
53056
  } : {},
53057
+ // Sent only to turn the pane off; absent ⇒ lua-api stores the default (on).
53058
+ ...app.agentPane === false ? {
53059
+ agentPane: false
53060
+ } : {},
53042
53061
  ...app.description ? {
53043
53062
  description: app.description
53044
53063
  } : {},
@@ -53720,6 +53739,7 @@ async function handleDevRequest(req, ctx) {
53720
53739
  version: "0.0.0-dev",
53721
53740
  deployment: 0
53722
53741
  },
53742
+ agentPane: ctx.app.agentPane !== false,
53723
53743
  nav: ctx.app.nav,
53724
53744
  user: {
53725
53745
  id: ctx.auth.userId,
@@ -79934,6 +79954,10 @@ async function templateDraftAction(templateApi, options) {
79934
79954
  } : {},
79935
79955
  ...result.draft.onUninstall ? {
79936
79956
  onUninstall: result.draft.onUninstall
79957
+ } : {},
79958
+ // BAC-2623 — the draft composer does not author sharedData; keep what the yaml already declares.
79959
+ ...config.template?.sharedData ? {
79960
+ sharedData: config.template.sharedData
79937
79961
  } : {}
79938
79962
  };
79939
79963
  writeYamlConfig(config);
@@ -79971,7 +79995,8 @@ var TEMPLATE_SECTION_KEYS = [
79971
79995
  "paramsMeta",
79972
79996
  "onInstall",
79973
79997
  "onUninstall",
79974
- "installPolicy"
79998
+ "installPolicy",
79999
+ "sharedData"
79975
80000
  ];
79976
80001
  var HOOK_KEYS = [
79977
80002
  "tool",
@@ -79986,6 +80011,9 @@ function sectionKeys(section2, value3) {
79986
80011
  const vars = value3.vars ?? [];
79987
80012
  return vars.map((v) => v.name);
79988
80013
  }
80014
+ if (section2 === "sharedData") {
80015
+ return (value3 ?? []).map((e) => `${e.name}:${e.access}`);
80016
+ }
79989
80017
  if (section2 === "onInstall" || section2 === "onUninstall") {
79990
80018
  const hook = value3;
79991
80019
  return HOOK_KEYS.filter((key) => Boolean(hook[key]));
@@ -80007,7 +80035,8 @@ async function confirmTemplateSectionConsequences(templateApi, templateId, local
80007
80035
  paramsMeta: "the deploy form falls back to derived display names and string typing",
80008
80036
  onInstall: "new installs no longer run a post-install hook; installed agents are untouched",
80009
80037
  onUninstall: "uninstalls no longer run cleanup before teardown (provider-side artifacts may be left behind)",
80010
- installPolicy: "new installs are no longer limited to one per workspace"
80038
+ installPolicy: "new installs are no longer limited to one per workspace",
80039
+ sharedData: "new installs no longer join these shared collections; agents already on them keep their access"
80011
80040
  };
80012
80041
  for (const section2 of TEMPLATE_SECTION_KEYS) {
80013
80042
  const serverKeys = sectionKeys(section2, latest[section2]);
@@ -80049,7 +80078,9 @@ async function templatePublishAction(templateApi, config, options) {
80049
80078
  onInstall: templateSection.onInstall ?? null,
80050
80079
  onUninstall: templateSection.onUninstall ?? null,
80051
80080
  // BAC-466 — null clears (the personaTemplate rule): absent = no per-workspace limit.
80052
- installPolicy: templateSection.installPolicy ?? null
80081
+ installPolicy: templateSection.installPolicy ?? null,
80082
+ // BAC-2623 — [] clears (absent = joins nothing).
80083
+ sharedData: templateSection.sharedData ?? []
80053
80084
  };
80054
80085
  }
80055
80086
  writeProgress("\u{1F504} Publishing template version...");