@darkrymit/crunes-cli 0.8.5 → 0.10.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.
Files changed (95) hide show
  1. package/dist/chunks/{add-CBHWFGCA.js → add-IT3IHBPO.js} +2 -2
  2. package/dist/chunks/add-MSX6XSU3.js +68 -0
  3. package/dist/chunks/{apply-J4YICV6H.js → apply-LOIJIPLR.js} +21 -12
  4. package/dist/chunks/{benchmark-AKKV7G32.js → benchmark-3IHFP3V2.js} +27 -18
  5. package/dist/chunks/{browse-JZFU52ET.js → browse-PHMBDREQ.js} +2 -2
  6. package/dist/chunks/chunk-2DNYVKBF.js +109 -0
  7. package/dist/chunks/chunk-2FI6KN3C.js +283 -0
  8. package/dist/chunks/chunk-2HM5Q52B.js +131 -0
  9. package/dist/chunks/{chunk-6MRZXASS.js → chunk-2Q3KLBE6.js} +16 -0
  10. package/dist/chunks/{chunk-ZJDKCC2Y.js → chunk-4GJMCFR6.js} +6 -3
  11. package/dist/chunks/chunk-55GTJG5I.js +1154 -0
  12. package/dist/chunks/chunk-6IC6ZJ74.js +9525 -0
  13. package/dist/chunks/chunk-7KYCYDAS.js +325 -0
  14. package/dist/chunks/chunk-DTOYFY3Z.js +578 -0
  15. package/dist/chunks/chunk-EO3CSXWK.js +70 -0
  16. package/dist/chunks/chunk-FIAFVIAN.js +79 -0
  17. package/dist/chunks/{chunk-J3GZ3DXD.js → chunk-GVMT55GH.js} +3 -2
  18. package/dist/chunks/chunk-H2OT7D6N.js +303 -0
  19. package/dist/chunks/{chunk-JOAL437H.js → chunk-I6MHDUCW.js} +16 -1
  20. package/dist/chunks/chunk-KSQDFE5N.js +85 -0
  21. package/dist/chunks/{chunk-BTIPUR5S.js → chunk-KUEMDPNG.js} +108 -91
  22. package/dist/chunks/{chunk-6XLT25GS.js → chunk-MIKWIFYR.js} +47 -0
  23. package/dist/chunks/{chunk-GTCPZ22N.js → chunk-MTJ2KW3V.js} +3 -1
  24. package/dist/chunks/chunk-MVCBPI4J.js +2354 -0
  25. package/dist/chunks/{chunk-T53L5CJW.js → chunk-PBGUKXT6.js} +2887 -1874
  26. package/dist/chunks/{chunk-KII6KW5Z.js → chunk-RVBAAXRY.js} +64 -44
  27. package/dist/chunks/chunk-SUCYDYMU.js +44 -0
  28. package/dist/chunks/chunk-UBCAZGLE.js +15 -0
  29. package/dist/chunks/{chunk-63H5VXZY.js → chunk-UEUUOAJY.js} +4 -1
  30. package/dist/chunks/chunk-VP7YLCQP.js +244 -0
  31. package/dist/chunks/{chunk-NDEYEYSU.js → chunk-WJII3LZK.js} +4 -3
  32. package/dist/chunks/chunk-XDMMSZIL.js +71 -0
  33. package/dist/chunks/chunk-YKIKJHYO.js +94 -0
  34. package/dist/chunks/{chunk-NYLRTAAA.js → chunk-YVN3VDRE.js} +1 -1
  35. package/dist/chunks/{clear-YBDIPEEH.js → clear-AT7HNUV4.js} +2 -2
  36. package/dist/chunks/{create-L6DJN4ME.js → create-DXW4YYLJ.js} +8 -8
  37. package/dist/chunks/create-LPLNCOW4.js +268 -0
  38. package/dist/chunks/{create-GPDE2YKL.js → create-Y4LHLWGL.js} +26 -18
  39. package/dist/chunks/{delete-LNOYM5KG.js → delete-2EXPFBFC.js} +2 -2
  40. package/dist/chunks/{delete-E4TEBRPX.js → delete-GKYA2W5Z.js} +4 -2
  41. package/dist/chunks/{delete-C4UJ7X5K.js → delete-MJAECXXV.js} +2 -2
  42. package/dist/chunks/disable-TITOSMXB.js +43 -0
  43. package/dist/chunks/doctor-R2Y6UAY4.js +208 -0
  44. package/dist/chunks/enable-LGTPDWPV.js +35 -0
  45. package/dist/chunks/{globals-H2WF344Y.js → globals-SNQFCHMP.js} +1 -1
  46. package/dist/chunks/{init-HU5OMHEH.js → init-KO2HLED5.js} +18 -8
  47. package/dist/chunks/install-7IRUAGSF.js +64 -0
  48. package/dist/chunks/{intro-36OLGNYN.js → intro-JNJ6A75J.js} +89 -21
  49. package/dist/chunks/{kill-2UG7PHUV.js → kill-TX3PC73P.js} +2 -1
  50. package/dist/chunks/{list-2JYMBMZC.js → list-BCCM3TLP.js} +12 -7
  51. package/dist/chunks/{list-4X3JFQGS.js → list-EHREZR6M.js} +2 -1
  52. package/dist/chunks/{list-U7PAYNAH.js → list-LC6HB3H3.js} +2 -2
  53. package/dist/chunks/list-MLKZE36K.js +92 -0
  54. package/dist/chunks/list-QVZKR3IE.js +62 -0
  55. package/dist/chunks/{list-7VHJIUDX.js → list-U4EMHQZT.js} +2 -2
  56. package/dist/chunks/{list-PTAWQYWG.js → list-V7VVD5AG.js} +2 -1
  57. package/dist/chunks/{list-A5WVDBWF.js → list-VA73WPK6.js} +2 -2
  58. package/dist/chunks/{manifest-7RVNKBOH.js → manifest-76MIEL2F.js} +3 -1
  59. package/dist/chunks/migrate-Y3EKMVP5.js +87 -0
  60. package/dist/chunks/{output-RJ6JSNY7.js → output-QN5CVJ62.js} +4 -1
  61. package/dist/chunks/{query-AW7WYILM.js → query-2US3CPYT.js} +2 -2
  62. package/dist/chunks/{registry-RG34DPD7.js → registry-IWP7JMNI.js} +2 -2
  63. package/dist/chunks/{remove-QUH2D3S5.js → remove-BCFTF23J.js} +2 -2
  64. package/dist/chunks/{repl-STBZC4P2.js → repl-2YWTHUWT.js} +4 -0
  65. package/dist/chunks/{repl-BPEWARN7.js → repl-5GDN3RAO.js} +99 -31
  66. package/dist/chunks/resolver-CA2A32AC.js +36 -0
  67. package/dist/chunks/run-WL3IZBXF.js +35 -0
  68. package/dist/chunks/rune-YA4TFHTB.js +283 -0
  69. package/dist/chunks/runner-QNZMBHQY.js +34 -0
  70. package/dist/chunks/{search-MSSDGJTF.js → search-B7IM7JRJ.js} +2 -2
  71. package/dist/chunks/shell-explain-LKBBP2BG.js +77 -0
  72. package/dist/chunks/trust-BFIDANXD.js +109 -0
  73. package/dist/chunks/uninstall-3MWZIZVA.js +58 -0
  74. package/dist/chunks/{unset-YASSMSE5.js → unset-P6IUF7SS.js} +2 -2
  75. package/dist/chunks/{update-KSC6VRMU.js → update-W4MJUTTW.js} +25 -19
  76. package/dist/chunks/{update-EWWDROKW.js → update-WXT7CHYA.js} +2 -2
  77. package/dist/chunks/{utils-3SJFSUSV.js → utils-B2QULX5J.js} +8 -4
  78. package/dist/chunks/{version-YG2M7HER.js → version-FLHI5KFS.js} +3 -3
  79. package/dist/cli.js +115 -70
  80. package/package.json +2 -2
  81. package/dist/chunks/chunk-ASZKAC24.js +0 -103
  82. package/dist/chunks/chunk-G3U4V32O.js +0 -46
  83. package/dist/chunks/chunk-GSA432UC.js +0 -90
  84. package/dist/chunks/chunk-WJRZN7BR.js +0 -77492
  85. package/dist/chunks/create-VYZRWRGQ.js +0 -170
  86. package/dist/chunks/disable-FGJ7VMPO.js +0 -47
  87. package/dist/chunks/doctor-7NWBJAH7.js +0 -53
  88. package/dist/chunks/enable-ZL6QOC2I.js +0 -47
  89. package/dist/chunks/install-FIYRMVLR.js +0 -57
  90. package/dist/chunks/list-AIYNOPNZ.js +0 -28
  91. package/dist/chunks/list-NZ5DHXJF.js +0 -111
  92. package/dist/chunks/resolver-36V72VKR.js +0 -28
  93. package/dist/chunks/run-IVL23SMW.js +0 -26
  94. package/dist/chunks/rune-XRREUL56.js +0 -186
  95. package/dist/chunks/uninstall-G56DZRFG.js +0 -49
@@ -1,15 +1,21 @@
1
1
  import {
2
- loadConfig
3
- } from "./chunk-GSA432UC.js";
2
+ isVerbose,
3
+ output
4
+ } from "./chunk-MIKWIFYR.js";
4
5
  import {
5
- isGlobMatch,
6
- isWildcardMatch,
6
+ describeConfigLayers,
7
7
  runRune
8
- } from "./chunk-WJRZN7BR.js";
8
+ } from "./chunk-H2OT7D6N.js";
9
9
  import {
10
- isVerbose,
11
- output
12
- } from "./chunk-6XLT25GS.js";
10
+ renderSection
11
+ } from "./chunk-DTOYFY3Z.js";
12
+ import {
13
+ loadConfig
14
+ } from "./chunk-2FI6KN3C.js";
15
+ import {
16
+ isGlobMatch,
17
+ isWildcardMatch
18
+ } from "./chunk-MVCBPI4J.js";
13
19
  import {
14
20
  init_require_shim
15
21
  } from "./chunk-TPK5AGRA.js";
@@ -17,54 +23,42 @@ import {
17
23
  // src/rune/commands/run.js
18
24
  init_require_shim();
19
25
 
20
- // src/shared/render.js
26
+ // src/rune/commands/denial-hint.js
21
27
  init_require_shim();
22
- function render(data) {
23
- if (!data) return null;
24
- if (data.type === "tree") return renderTree(data.root);
25
- if (data.type === "markdown") return data.content ?? null;
26
- return null;
27
- }
28
- function renderSection(section) {
29
- const parts = [];
30
- if (section.title) {
31
- parts.push(`## ${section.title}`);
32
- } else if (section.name) {
33
- parts.push(`## ${section.name}`);
34
- } else {
35
- parts.push("## (no title)");
28
+ var UNGRANTED = /^'([a-z]+(?:\.[a-z]+)*):([\s\S]*)' is not permitted\.$/;
29
+ var UNSCANNABLE = /^Cannot scan command: /;
30
+ function permissionHint(message, { key, lifecycle = "run", configLayers }) {
31
+ const text = String(message ?? "").trim();
32
+ if (UNSCANNABLE.test(text)) {
33
+ return [
34
+ "",
35
+ " This construct cannot be split into command positions, so it cannot be permission-checked.",
36
+ " No grant overrides this \u2014 rewrite the command as plain invocations, or move the logic into",
37
+ " the rune and call the programs directly."
38
+ ].join("\n");
36
39
  }
37
- if (section.attrs && Object.keys(section.attrs).length > 0) {
38
- const attrStr = Object.entries(section.attrs).map(([k, v]) => `[${k}: ${v}]`).join(" ");
39
- parts.push(attrStr);
40
+ const m = UNGRANTED.exec(text);
41
+ if (!m) return null;
42
+ const [, capability, value] = m;
43
+ const token = `${capability}:${value}`;
44
+ const lines = [
45
+ "",
46
+ ` Add the grant to the rune's entry in the config that declares it:`,
47
+ "",
48
+ ` "runes": { "${key}": { "permissions": { "${lifecycle}": { "allow": ["${token}"] } } } }`,
49
+ "",
50
+ ` Looked in: ${configLayers}.`
51
+ ];
52
+ if (capability === "shell.run") {
53
+ lines.push(` Every command in a pipeline needs its own grant \u2014 \`crunes shell explain '<command>'\` lists them.`);
40
54
  }
41
- const content = render(section.data);
42
- if (content) {
43
- parts.push(content);
55
+ if (capability === "fs.glob") {
56
+ lines.push(` fs.glob grants match the pattern string exactly; only \`fs.glob:*\` is a wildcard.`);
44
57
  }
45
- return parts.filter(Boolean).join("\n") || null;
46
- }
47
- function formatSection(section, rune) {
48
- const nameStr = section.title ?? section.name ?? "(no title)";
49
- const attrsStr = section.attrs && Object.keys(section.attrs).length > 0 ? " " + Object.entries(section.attrs).map(([k, v]) => `[${k}: ${v}]`).join(" ") : "";
50
- const content = render(section.data);
51
- return `[${rune}:section] ${nameStr}${attrsStr}${content ? "\n" + content : ""}`;
52
- }
53
- function renderTree(root) {
54
- if (!root) return null;
55
- const lines = [`${root.name.padEnd(12)}${root.description}`];
56
- appendChildren(root.children ?? [], "", lines);
57
- return lines.join("\n");
58
- }
59
- function appendChildren(children, prefix, lines) {
60
- for (let i = 0; i < children.length; i++) {
61
- const child = children[i];
62
- const isLast = i === children.length - 1;
63
- const connector = isLast ? "\u2514\u2500\u2500 " : "\u251C\u2500\u2500 ";
64
- const childPrefix = prefix + (isLast ? " " : "\u2502 ");
65
- lines.push(`${prefix}${connector}${child.name.padEnd(12)}${child.description}`);
66
- appendChildren(child.children ?? [], childPrefix, lines);
58
+ if (lifecycle === "repl") {
59
+ lines.push(` "repl" grants are separate from "run" \u2014 neither inherits from the other.`);
67
60
  }
61
+ return lines.join("\n");
68
62
  }
69
63
 
70
64
  // src/rune/commands/batch-permission.js
@@ -99,8 +93,16 @@ function parseBracketKey(token) {
99
93
  const bracketArgs = inner.trim() ? inner.trim().split(/\s+/) : [];
100
94
  return { key: key || null, bracketArgs };
101
95
  }
102
- function parseSegment(argv) {
103
- if (!argv.length) return { key: null, sections: null, runeArgs: [] };
96
+ function joinBracketTokens(argv) {
97
+ const first = argv[0];
98
+ if (!first || !first.includes("[") || first.includes("]")) return argv;
99
+ const end = argv.findIndex((tok, i) => i > 0 && tok.includes("]"));
100
+ if (end === -1) return argv;
101
+ return [argv.slice(0, end + 1).join(" "), ...argv.slice(end + 1)];
102
+ }
103
+ function parseSegment(rawArgv) {
104
+ if (!rawArgv.length) return { key: null, sections: null, runeArgs: [] };
105
+ const argv = joinBracketTokens(rawArgv);
104
106
  const { key, bracketArgs } = parseBracketKey(argv[0]);
105
107
  if (key && key.startsWith("-")) {
106
108
  output.error(`Unknown option or misplaced flag: "${key}"`);
@@ -172,6 +174,25 @@ function parseRunArgs(argv) {
172
174
  const segments = rawSegments.map(parseSegment);
173
175
  return { segments, format, failFast, isBatch: allowBatch };
174
176
  }
177
+ function framedSection(prefix, section) {
178
+ const rendered = renderSection(section);
179
+ if (!rendered) return null;
180
+ const lines = rendered.split("\n");
181
+ let contentStartIndex = 1;
182
+ let attrs = "";
183
+ if (lines[1] && lines[1].startsWith("[")) {
184
+ attrs = " " + lines[1];
185
+ contentStartIndex = 2;
186
+ }
187
+ return `${prefix} ${section.name}${attrs}
188
+ ${lines.slice(contentStartIndex).join("\n")}
189
+
190
+ `;
191
+ }
192
+ function writeSection(direct, prefix, section) {
193
+ const text = direct ? (renderSection(section) ?? "") + "\n\n" : framedSection(prefix, section);
194
+ if (text) process.stdout.write(text);
195
+ }
175
196
  async function handler({
176
197
  segments,
177
198
  format = "text",
@@ -195,8 +216,8 @@ async function handler({
195
216
  process.exit(1);
196
217
  }
197
218
  if (isBatch) {
198
- const { resolvePluginRune } = await import("./resolver-36V72VKR.js");
199
- const { loadPluginJson } = await import("./manifest-7RVNKBOH.js");
219
+ const { resolvePluginRune } = await import("./resolver-CA2A32AC.js");
220
+ const { loadPluginJson } = await import("./manifest-76MIEL2F.js");
200
221
  for (const seg of segments) {
201
222
  let entry = config.runes?.[seg.key] ?? {};
202
223
  if (!entry.batch && seg.key.includes(":")) {
@@ -214,12 +235,23 @@ async function handler({
214
235
  const matchString = buildMatchString(seg.key, seg.runeArgs);
215
236
  const result = checkBatchPermission(entry, matchString);
216
237
  if (!result.allowed) {
217
- output.error(`Batch not permitted for "${matchString}". Add a batch.allow pattern in config.json or run it separately.`);
238
+ const spaceIdx = matchString.indexOf(" ");
239
+ const subject = spaceIdx === -1 ? matchString : matchString.slice(spaceIdx + 1);
240
+ const lines = [`Batch not permitted for "${matchString}" \u2014 ${result.reason}.`, ""];
241
+ lines.push(` "batch" is a field of the rune entry, beside "run" \u2014 not inside a block:`);
242
+ lines.push("");
243
+ lines.push(` "runes": { "${seg.key}": { "batch": { "allow": ["${subject}"] } } }`);
244
+ lines.push("");
245
+ lines.push(` Patterns match the rune's arguments \u2014 here "${subject}" \u2014 or its bare key when it is`);
246
+ lines.push(` invoked with none. Edit the config that declares this rune: ${describeConfigLayers(configRoot ?? projectRoot)}.`);
247
+ lines.push(` Or drop -b and run the segments separately.`);
248
+ output.error(lines.join("\n"));
218
249
  process.exit(1);
219
250
  }
220
251
  }
221
252
  }
222
253
  let anyFailed = false;
254
+ const direct = !isBatch && format === "text" && segments.length === 1;
223
255
  for (let i = 0; i < segments.length; i++) {
224
256
  const printedSections = /* @__PURE__ */ new Set();
225
257
  const { key, sections: sectionFilter, runeArgs } = segments[i];
@@ -230,6 +262,8 @@ async function handler({
230
262
  sections: sectionFilter,
231
263
  configDir: configRoot,
232
264
  instanceId: String(i + 1),
265
+ direct,
266
+ stdin: isBatch ? "ignore" : "inherit",
233
267
  onEvent(event) {
234
268
  const { type, level, message, meta, section, instanceId: instanceId2, rune } = event;
235
269
  const prefix = level ? `[${instanceId2}:${rune}:${type}:${level}]` : `[${instanceId2}:${rune}:${type}]`;
@@ -252,30 +286,21 @@ async function handler({
252
286
  } else {
253
287
  if (type === "section") {
254
288
  if (!sectionFilter || isGlobMatch(section.name, sectionFilter)) {
255
- const rendered = renderSection(section);
256
- const lines = rendered ? rendered.split("\n") : [];
257
- let contentStartIndex = 1;
258
- let attrs = "";
259
- if (lines[1] && lines[1].startsWith("[")) {
260
- attrs = " " + lines[1];
261
- contentStartIndex = 2;
262
- }
263
- const content = lines.slice(contentStartIndex).join("\n");
264
- process.stdout.write(`${prefix} ${section.name}${attrs}
265
- ${content}
266
-
267
- `);
289
+ writeSection(direct, prefix, section);
268
290
  printedSections.add(section);
269
291
  }
270
292
  } else {
271
293
  const attrsStr = meta && Object.keys(meta).length > 0 ? " " + Object.entries(meta).map(([k, v]) => `[${k}: ${v}]`).join(" ") : "";
272
- if (message && message.includes("\n")) {
273
- process.stdout.write(`${prefix}${attrsStr}
294
+ if (direct) {
295
+ process.stderr.write(`${message ?? ""}${attrsStr}
296
+ `);
297
+ } else if (message && message.includes("\n")) {
298
+ process.stderr.write(`${prefix}${attrsStr}
274
299
  ${message}
275
300
 
276
301
  `);
277
302
  } else {
278
- process.stdout.write(`${prefix} ${message ?? ""}${attrsStr}
303
+ process.stderr.write(`${prefix} ${message ?? ""}${attrsStr}
279
304
  `);
280
305
  }
281
306
  }
@@ -285,15 +310,21 @@ ${message}
285
310
  if (isVerbose) console.error(`[crunes:debug] Rune "${key}" completed with ${sections?.length ?? 0} sections`);
286
311
  } catch (err) {
287
312
  const msg = isVerbose ? err.stack || err.message : err.message;
313
+ const hint = permissionHint(err.message, {
314
+ key,
315
+ lifecycle: "run",
316
+ configLayers: describeConfigLayers(configRoot ?? projectRoot)
317
+ });
288
318
  output.error(`Rune "${key}" failed:
289
- ${msg}`);
319
+ ${msg}${hint ?? ""}`);
290
320
  anyFailed = true;
291
321
  if (failFast) process.exit(1);
292
322
  continue;
293
323
  }
324
+ if (sections?.directExitCode !== void 0) return process.exit(sections.directExitCode);
294
325
  if (!sections) {
295
326
  const available = Object.keys(config.runes ?? {}).join(", ") || "(none)";
296
- output.error(`Unknown key: "${key}". Available: ${available}`);
327
+ output.error(`Unknown key: "${key}". Available: ${available}. Looked in: ${describeConfigLayers(configRoot ?? projectRoot)}.`);
297
328
  anyFailed = true;
298
329
  if (failFast) process.exit(1);
299
330
  continue;
@@ -311,22 +342,7 @@ ${msg}`);
311
342
  section: sect
312
343
  }) + "\n");
313
344
  } else {
314
- const rendered = renderSection(sect);
315
- if (rendered) {
316
- const prefix = `[${instanceId}:${key}:section]`;
317
- const lines = rendered.split("\n");
318
- let contentStartIndex = 1;
319
- let attrs = "";
320
- if (lines[1] && lines[1].startsWith("[")) {
321
- attrs = " " + lines[1];
322
- contentStartIndex = 2;
323
- }
324
- const content = lines.slice(contentStartIndex).join("\n");
325
- process.stdout.write(`${prefix} ${sect.name}${attrs}
326
- ${content}
327
-
328
- `);
329
- }
345
+ writeSection(direct, `[${instanceId}:${key}:section]`, sect);
330
346
  }
331
347
  printedSections.add(sect);
332
348
  }
@@ -336,8 +352,9 @@ ${content}
336
352
  }
337
353
 
338
354
  export {
339
- formatSection,
355
+ permissionHint,
340
356
  parseBracketKey,
357
+ joinBracketTokens,
341
358
  parseSegment,
342
359
  parseRunArgs,
343
360
  handler
@@ -1,3 +1,10 @@
1
+ import {
2
+ Ce,
3
+ R2 as R,
4
+ fe,
5
+ ge,
6
+ ye
7
+ } from "./chunk-CGZL5SSH.js";
1
8
  import {
2
9
  source_default
3
10
  } from "./chunk-WCODTMDN.js";
@@ -9,6 +16,9 @@ import {
9
16
  init_require_shim();
10
17
  var _plain = false;
11
18
  var isVerbose = false;
19
+ function isPlain() {
20
+ return _plain;
21
+ }
12
22
  function configure({ plain = false, verbose = false } = {}) {
13
23
  _plain = plain;
14
24
  isVerbose = verbose;
@@ -40,11 +50,48 @@ var output = {
40
50
  },
41
51
  info(msg) {
42
52
  console.log(`${sym.info()} ${msg}`);
53
+ },
54
+ // clack draws its frame with box characters and knows nothing about --plain, whose
55
+ // contract is "no box-drawing". Under --plain these degrade to ordinary lines.
56
+ intro(msg) {
57
+ if (_plain) console.log(`${sym.info()} ${msg}`);
58
+ else ye(msg);
59
+ },
60
+ outro(msg) {
61
+ if (_plain) console.log(`${sym.ok()} ${msg}`);
62
+ else fe(msg);
63
+ },
64
+ cancel(msg) {
65
+ if (_plain) console.error(`${sym.err()} ${msg}`);
66
+ else ge(msg);
67
+ },
68
+ note(body, title) {
69
+ if (_plain) {
70
+ console.log(`=== ${title} ===`);
71
+ console.log(body);
72
+ } else {
73
+ Ce(body, title);
74
+ }
75
+ },
76
+ log: {
77
+ success(msg) {
78
+ if (_plain) console.log(`${sym.ok()} ${msg}`);
79
+ else R.success(msg);
80
+ },
81
+ warn(msg) {
82
+ if (_plain) console.warn(`${sym.warn()} ${msg}`);
83
+ else R.warn(msg);
84
+ },
85
+ error(msg) {
86
+ if (_plain) console.error(`${sym.err()} ${msg}`);
87
+ else R.error(msg);
88
+ }
43
89
  }
44
90
  };
45
91
 
46
92
  export {
47
93
  isVerbose,
94
+ isPlain,
48
95
  configure,
49
96
  output
50
97
  };
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  getPluginsJsonPath
3
- } from "./chunk-6MRZXASS.js";
3
+ } from "./chunk-2Q3KLBE6.js";
4
4
  import {
5
5
  init_require_shim
6
6
  } from "./chunk-TPK5AGRA.js";
@@ -27,7 +27,9 @@ async function saveRegistry(data) {
27
27
  async function registerPlugin(entry) {
28
28
  const registry = await loadRegistry();
29
29
  const key = `${entry.marketplaceName}@${entry.name}`;
30
+ const trustedNative = registry.plugins[key]?.trustedNative;
30
31
  registry.plugins[key] = {
32
+ ...trustedNative && { trustedNative },
31
33
  version: entry.version,
32
34
  path: entry.path,
33
35
  cacheDir: entry.cacheDir ?? entry.path,