@event4u/agent-config 9.10.0 → 9.11.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 (121) hide show
  1. package/.claude-plugin/marketplace.json +1 -1
  2. package/CHANGELOG.md +59 -0
  3. package/README.md +12 -15
  4. package/agents/templates/.ai-council.yml.example +481 -0
  5. package/agents/templates/.ai-video.xml.example +247 -0
  6. package/dist/agent-src/rules/design-fidelity.md +1 -1
  7. package/dist/agent-src/skills/existing-ui-audit/SKILL.md +15 -2
  8. package/dist/agent-src/skills/fe-design/SKILL.md +10 -0
  9. package/dist/agent-src/templates/agents/agent-project-settings.example.yml +1 -1
  10. package/dist/agent-src/templates/scripts/work_engine/directives/ui/apply.ts +30 -30
  11. package/dist/agent-src/templates/scripts/work_engine/directives/ui/design.ts +88 -33
  12. package/dist/agent-src/templates/scripts/work_engine/directives/ui/polish.ts +20 -0
  13. package/dist/agent-src/templates/scripts/work_engine/directives/ui/review.ts +20 -1
  14. package/dist/agent-src/templates/scripts/work_engine/directives/ui/stack_bundles.ts +179 -0
  15. package/dist/agent-src/templates/scripts/work_engine/stack/detect.ts +155 -4
  16. package/dist/agent-src/templates/scripts/work_engine/state.ts +21 -4
  17. package/dist/cli/initRouting.js +74 -11
  18. package/dist/cli/initRouting.js.map +1 -1
  19. package/dist/cli/main.js +14 -3
  20. package/dist/cli/main.js.map +1 -1
  21. package/dist/cli-delegate/chunk-4SV3XGFA.js +6910 -0
  22. package/dist/cli-delegate/chunk-736JCWLM.js +1104 -0
  23. package/dist/cli-delegate/chunk-7DSAMZFU.js +356 -0
  24. package/dist/cli-delegate/chunk-7HQ52DHU.js +74 -0
  25. package/dist/cli-delegate/chunk-BJGXZNPM.js +266 -0
  26. package/dist/cli-delegate/chunk-FTAISGDQ.js +117 -0
  27. package/dist/cli-delegate/chunk-GME3Q44L.js +82 -0
  28. package/dist/cli-delegate/chunk-GRRPEPRN.js +336 -0
  29. package/dist/cli-delegate/chunk-HJ6DAJHR.js +502 -0
  30. package/dist/cli-delegate/chunk-IR7P7JWA.js +872 -0
  31. package/dist/cli-delegate/chunk-J55WI3RR.js +47 -0
  32. package/dist/cli-delegate/chunk-MCJYCQPF.js +35 -0
  33. package/dist/cli-delegate/chunk-NDJLNC6Q.js +169 -0
  34. package/dist/cli-delegate/chunk-OMIVVCG2.js +26 -0
  35. package/dist/cli-delegate/chunk-OY53J6II.js +7336 -0
  36. package/dist/cli-delegate/chunk-RDGRHAAB.js +259 -0
  37. package/dist/cli-delegate/chunk-TFG57JJM.js +1969 -0
  38. package/dist/cli-delegate/chunk-XX6TOPD7.js +715 -0
  39. package/dist/cli-delegate/chunk-YMFO6FDN.js +10603 -0
  40. package/dist/cli-delegate/cmd_analyze_session.js +294 -0
  41. package/dist/cli-delegate/cmd_conformance.js +646 -0
  42. package/dist/cli-delegate/cmd_converge.js +326 -0
  43. package/dist/cli-delegate/cmd_doctor.js +144 -0
  44. package/dist/cli-delegate/cmd_explain.js +2508 -0
  45. package/dist/cli-delegate/cmd_export.js +296 -0
  46. package/dist/cli-delegate/cmd_fleet.js +332 -0
  47. package/dist/cli-delegate/cmd_memory_get.js +3878 -0
  48. package/dist/cli-delegate/cmd_migrate.js +11 -0
  49. package/dist/cli-delegate/cmd_preflight.js +270 -0
  50. package/dist/cli-delegate/cmd_prune.js +444 -0
  51. package/dist/cli-delegate/cmd_refresh.js +28 -0
  52. package/dist/cli-delegate/cmd_settings_check.js +574 -0
  53. package/dist/cli-delegate/cmd_settings_migrate.js +223 -0
  54. package/dist/cli-delegate/cmd_sync.js +264 -0
  55. package/dist/cli-delegate/cmd_uninstall.js +656 -0
  56. package/dist/cli-delegate/cmd_update.js +425 -0
  57. package/dist/cli-delegate/cmd_upgrade.js +444 -0
  58. package/dist/cli-delegate/cmd_validate.js +305 -0
  59. package/dist/cli-delegate/cmd_versions.js +370 -0
  60. package/dist/discovery/deprecation-report.md +1 -1
  61. package/dist/discovery/discovery-manifest.json +14 -7
  62. package/dist/discovery/discovery-manifest.json.sha256 +1 -1
  63. package/dist/discovery/discovery-manifest.summary.md +2 -2
  64. package/dist/discovery/orphan-report.md +1 -1
  65. package/dist/discovery/packs.json +12 -7
  66. package/dist/discovery/trust-report.md +1 -1
  67. package/dist/discovery/workspaces.json +4 -3
  68. package/dist/install/emit_host_rules_cli.js +2 -1
  69. package/dist/install/emit_host_rules_cli.js.map +1 -1
  70. package/dist/install/install.mjs +410 -378
  71. package/dist/install/rule_scope.js +5 -1
  72. package/dist/install/rule_scope.js.map +1 -1
  73. package/dist/install/toolDetection.js +40 -12
  74. package/dist/install/toolDetection.js.map +1 -1
  75. package/dist/install/wizard-plan.js +2 -2
  76. package/dist/install/wizard-plan.js.map +1 -1
  77. package/dist/mcp/registry-manifest.json +1 -1
  78. package/dist/mcp/server.json +2 -2
  79. package/dist/mcp/server.mjs +1614 -765
  80. package/dist/router.json +1 -1
  81. package/package.json +4 -2
  82. package/src/agent-src/templates/scripts/work_engine/directives/ui/apply.ts +30 -30
  83. package/src/agent-src/templates/scripts/work_engine/directives/ui/design.ts +88 -33
  84. package/src/agent-src/templates/scripts/work_engine/directives/ui/polish.ts +20 -0
  85. package/src/agent-src/templates/scripts/work_engine/directives/ui/review.ts +20 -1
  86. package/src/agent-src/templates/scripts/work_engine/directives/ui/stack_bundles.ts +179 -0
  87. package/src/agent-src/templates/scripts/work_engine/stack/detect.ts +155 -4
  88. package/src/agent-src/templates/scripts/work_engine/state.ts +21 -4
  89. package/src/config/discovery/packs.yml +7 -0
  90. package/src/config/evaluator-budgets.json +1 -1
  91. package/src/config/pack-size-budget.json +27 -0
  92. package/src/install/emit_host_rules_cli.ts +2 -1
  93. package/src/install/rule_scope.ts +5 -1
  94. package/src/install/toolDetection.ts +39 -8
  95. package/src/install/wizard-plan.ts +2 -2
  96. package/src/scripts/_cli/cmd_conformance.ts +2 -1
  97. package/src/scripts/_cli/cmd_converge.ts +2 -1
  98. package/src/scripts/_cli/cmd_doctor.ts +214 -13
  99. package/src/scripts/_cli/cmd_export.ts +2 -1
  100. package/src/scripts/_cli/cmd_fleet.ts +2 -1
  101. package/src/scripts/_cli/cmd_migrate.ts +2 -1
  102. package/src/scripts/_cli/cmd_preflight.ts +2 -1
  103. package/src/scripts/_cli/cmd_refresh.ts +2 -1
  104. package/src/scripts/_cli/cmd_update.ts +2 -1
  105. package/src/scripts/_cli/cmd_upgrade.ts +2 -1
  106. package/src/scripts/_cli/cmd_versions.ts +2 -1
  107. package/src/scripts/_cli/detection_report.ts +480 -0
  108. package/src/scripts/_dispatch.bash +52 -14
  109. package/src/scripts/_lib/changelog_eras.ts +103 -9
  110. package/src/scripts/_lib/environment_detector.ts +441 -0
  111. package/src/scripts/_lib/package_root.ts +72 -0
  112. package/src/scripts/ai_council/config.ts +15 -7
  113. package/src/scripts/ai_council/modes.ts +68 -2
  114. package/src/scripts/ai_council/transport_resolver.ts +331 -0
  115. package/src/scripts/check_bundle_path_leakage.ts +10 -4
  116. package/src/scripts/check_dependency_floors.ts +153 -0
  117. package/src/scripts/check_pack_size.ts +188 -0
  118. package/src/scripts/council_cli.ts +6 -2
  119. package/src/scripts/evaluator_umbrella.sh +34 -1
  120. package/src/scripts/lint_eval_fixture_citations.ts +113 -0
  121. package/src/scripts/lint_ui_stack_bundles.ts +170 -0
@@ -0,0 +1,444 @@
1
+ import { createRequire as __acCreateRequire } from 'node:module'; const require = globalThis.require ?? __acCreateRequire(import.meta.url);
2
+ import {
3
+ PROJECT_BRIDGE_MARKERS
4
+ } from "./chunk-YMFO6FDN.js";
5
+ import "./chunk-XX6TOPD7.js";
6
+ import {
7
+ manifest_path,
8
+ read_manifest
9
+ } from "./chunk-IR7P7JWA.js";
10
+ import "./chunk-GRRPEPRN.js";
11
+ import "./chunk-7DSAMZFU.js";
12
+ import {
13
+ resolve_project_root
14
+ } from "./chunk-HJ6DAJHR.js";
15
+ import "./chunk-NDJLNC6Q.js";
16
+ import "./chunk-MCJYCQPF.js";
17
+ import "./chunk-OY53J6II.js";
18
+ import "./chunk-J55WI3RR.js";
19
+
20
+ // src/scripts/_cli/cmd_prune.ts
21
+ import * as crypto from "node:crypto";
22
+ import * as fs from "node:fs";
23
+ import * as path from "node:path";
24
+ import process from "node:process";
25
+ import { fileURLToPath, pathToFileURL } from "node:url";
26
+ var ArgparseExit = class extends Error {
27
+ code;
28
+ constructor(code) {
29
+ super(`ArgparseExit(${code})`);
30
+ this.name = "ArgparseExit";
31
+ this.code = code;
32
+ }
33
+ };
34
+ var _stdout = { write: (t) => process.stdout.write(t) };
35
+ var _stderr = { write: (t) => process.stderr.write(t) };
36
+ function _print(out, line = "") {
37
+ out.write(line + "\n");
38
+ }
39
+ function expanduser(p) {
40
+ if (p === "~" || p.startsWith("~/")) {
41
+ const home = process.env["HOME"] ?? process.env["USERPROFILE"] ?? "";
42
+ return home + p.slice(1);
43
+ }
44
+ return p;
45
+ }
46
+ function _exists(p) {
47
+ try {
48
+ fs.lstatSync(p);
49
+ return true;
50
+ } catch {
51
+ return false;
52
+ }
53
+ }
54
+ function _listOf(value) {
55
+ return Array.isArray(value) ? value : [];
56
+ }
57
+ function _jsonStrAscii(s) {
58
+ let out = '"';
59
+ for (let i = 0; i < s.length; i++) {
60
+ const code = s.charCodeAt(i);
61
+ const ch = s[i];
62
+ switch (ch) {
63
+ case '"':
64
+ out += '\\"';
65
+ break;
66
+ case "\\":
67
+ out += "\\\\";
68
+ break;
69
+ case "\n":
70
+ out += "\\n";
71
+ break;
72
+ case "\r":
73
+ out += "\\r";
74
+ break;
75
+ case " ":
76
+ out += "\\t";
77
+ break;
78
+ case "\b":
79
+ out += "\\b";
80
+ break;
81
+ case "\f":
82
+ out += "\\f";
83
+ break;
84
+ default:
85
+ if (code < 32 || code > 126) {
86
+ out += "\\u" + code.toString(16).padStart(4, "0");
87
+ } else {
88
+ out += ch;
89
+ }
90
+ }
91
+ }
92
+ return out + '"';
93
+ }
94
+ function _jsonScalarAscii(value) {
95
+ if (value === null || value === void 0) return "null";
96
+ if (typeof value === "boolean") return value ? "true" : "false";
97
+ if (typeof value === "number") {
98
+ if (!Number.isFinite(value)) {
99
+ if (Number.isNaN(value)) return "NaN";
100
+ return value > 0 ? "Infinity" : "-Infinity";
101
+ }
102
+ return String(value);
103
+ }
104
+ if (typeof value === "string") return _jsonStrAscii(value);
105
+ return null;
106
+ }
107
+ function _dumpIndentAscii(value, indent, depth) {
108
+ const scalar = _jsonScalarAscii(value);
109
+ if (scalar !== null) return scalar;
110
+ const pad = " ".repeat(indent * (depth + 1));
111
+ const closePad = " ".repeat(indent * depth);
112
+ if (Array.isArray(value)) {
113
+ if (value.length === 0) return "[]";
114
+ const items = value.map((v) => pad + _dumpIndentAscii(v, indent, depth + 1));
115
+ return `[
116
+ ${items.join(",\n")}
117
+ ${closePad}]`;
118
+ }
119
+ if (typeof value === "object" && value !== null) {
120
+ const obj = value;
121
+ const keys = Object.keys(obj);
122
+ if (keys.length === 0) return "{}";
123
+ const items = keys.map(
124
+ (k) => `${pad}${_jsonStrAscii(k)}: ${_dumpIndentAscii(obj[k], indent, depth + 1)}`
125
+ );
126
+ return `{
127
+ ${items.join(",\n")}
128
+ ${closePad}}`;
129
+ }
130
+ return _jsonStrAscii(String(value));
131
+ }
132
+ function _jsonDumpsIndentAscii(value, indent) {
133
+ return _dumpIndentAscii(value, indent, 0);
134
+ }
135
+ function _resolve_project_root(arg) {
136
+ const [root] = resolve_project_root(arg);
137
+ return root;
138
+ }
139
+ function _load_manifest(project_root, opts) {
140
+ const manifest_path2 = manifest_path(project_root);
141
+ const manifest = read_manifest(manifest_path2);
142
+ if (manifest === null) {
143
+ if (opts.force_empty) {
144
+ return [null, /* @__PURE__ */ new Set()];
145
+ }
146
+ return [null, null];
147
+ }
148
+ const tools = _listOf(manifest["tools"]) ?? [];
149
+ const declared = /* @__PURE__ */ new Set();
150
+ for (const e of tools) {
151
+ const name = e["name"];
152
+ if (name && e["scope"] === "project" && (e["status"] ?? "installed") === "installed") {
153
+ declared.add(String(name));
154
+ }
155
+ }
156
+ return [manifest, declared];
157
+ }
158
+ function _resolve_path(project_root, raw) {
159
+ const p = expanduser(raw);
160
+ if (!path.isAbsolute(p)) {
161
+ return path.join(project_root, p);
162
+ }
163
+ return p;
164
+ }
165
+ function _sha256(p) {
166
+ try {
167
+ return crypto.createHash("sha256").update(fs.readFileSync(p)).digest("hex");
168
+ } catch {
169
+ return null;
170
+ }
171
+ }
172
+ function _orphaned(project_root, manifest, declared, opts = {}) {
173
+ const resume_uninstall = opts.resume_uninstall ?? false;
174
+ const out = [];
175
+ const seen = /* @__PURE__ */ new Set();
176
+ if (!resume_uninstall) {
177
+ for (const tool_id of Object.keys(PROJECT_BRIDGE_MARKERS)) {
178
+ const rel = PROJECT_BRIDGE_MARKERS[tool_id];
179
+ if (declared.has(tool_id)) {
180
+ continue;
181
+ }
182
+ const target = path.join(project_root, rel);
183
+ if (!_exists(target)) {
184
+ continue;
185
+ }
186
+ out.push([tool_id, target, null, null]);
187
+ seen.add(_realpath(target));
188
+ }
189
+ }
190
+ if (manifest === null) {
191
+ return out;
192
+ }
193
+ for (const tool of _listOf(manifest["tools"])) {
194
+ if (tool["scope"] !== "project") {
195
+ continue;
196
+ }
197
+ const files = _listOf(tool["files"]);
198
+ if (!files.length) {
199
+ continue;
200
+ }
201
+ const tool_id = String(tool["name"] ?? "");
202
+ const status = tool["status"] ?? "installed";
203
+ if (resume_uninstall) {
204
+ if (status !== "uninstalling") {
205
+ continue;
206
+ }
207
+ } else if (status === "installed" && declared.has(tool_id)) {
208
+ continue;
209
+ }
210
+ for (const entry of files) {
211
+ const kind = entry["kind"];
212
+ if (kind !== "bridge" && kind !== "marker" && kind !== "deployed") {
213
+ continue;
214
+ }
215
+ const raw = entry["path"] ?? "";
216
+ if (!raw) {
217
+ continue;
218
+ }
219
+ const target = _resolve_path(project_root, raw);
220
+ const resolved = _realpath(target);
221
+ if (seen.has(resolved) || !_exists(target)) {
222
+ continue;
223
+ }
224
+ out.push([tool_id, target, kind, entry["sha256"] ?? null]);
225
+ seen.add(resolved);
226
+ }
227
+ }
228
+ return out;
229
+ }
230
+ function _realpath(p) {
231
+ try {
232
+ return fs.realpathSync(p);
233
+ } catch {
234
+ return path.resolve(p);
235
+ }
236
+ }
237
+ function _classify(target, expected_sha) {
238
+ if (expected_sha === null) {
239
+ return ["orphan", null];
240
+ }
241
+ const actual = _sha256(target);
242
+ if (actual === null || actual !== expected_sha) {
243
+ return ["modified", actual];
244
+ }
245
+ return ["orphan", actual];
246
+ }
247
+ function _remove(target, opts) {
248
+ if (opts.dry_run) {
249
+ return [true, "would remove"];
250
+ }
251
+ try {
252
+ fs.unlinkSync(target);
253
+ return [true, "removed"];
254
+ } catch (exc) {
255
+ const e = exc;
256
+ if (e && e.code === "EISDIR") {
257
+ return [false, "\u274C is a directory (refusing \u2014 use uninstall --purge)"];
258
+ }
259
+ return [false, `\u274C failed (${_pyOSErrorStr(e, target)})`];
260
+ }
261
+ }
262
+ function _pyOSErrorStr(e, filename) {
263
+ const errno = typeof e.errno === "number" ? Math.abs(e.errno) : null;
264
+ const STRERROR = {
265
+ EPERM: "Operation not permitted",
266
+ EISDIR: "Is a directory",
267
+ EACCES: "Permission denied",
268
+ ENOENT: "No such file or directory",
269
+ EBUSY: "Device or resource busy",
270
+ ENOTEMPTY: "Directory not empty"
271
+ };
272
+ const strerror = e.code && STRERROR[e.code] || (e.message ?? String(e));
273
+ if (errno !== null) {
274
+ return `[Errno ${errno}] ${strerror}: '${filename}'`;
275
+ }
276
+ return strerror;
277
+ }
278
+ function _parse(argv) {
279
+ const prog = "agent-config prune";
280
+ const usage = "usage: agent-config prune [-h] [--project PROJECT] [--dry-run] [--json]\n [--all-missing-lock] [--resume-uninstall]\n";
281
+ const emitError = (msg) => {
282
+ _stderr.write(usage);
283
+ _stderr.write(`${prog}: error: ${msg}
284
+ `);
285
+ throw new ArgparseExit(2);
286
+ };
287
+ const opts = {
288
+ project: null,
289
+ dry_run: false,
290
+ json: false,
291
+ all_missing_lock: false,
292
+ resume_uninstall: false
293
+ };
294
+ let i = 0;
295
+ while (i < argv.length) {
296
+ const tok = argv[i];
297
+ const flag = tok.includes("=") ? tok.slice(0, tok.indexOf("=")) : tok;
298
+ if (flag === "-h" || flag === "--help") {
299
+ _stdout.write(usage);
300
+ throw new ArgparseExit(0);
301
+ } else if (flag === "--project") {
302
+ const eq = tok.indexOf("=");
303
+ if (eq >= 0) {
304
+ opts.project = tok.slice(eq + 1);
305
+ i += 1;
306
+ } else {
307
+ const val = argv[i + 1];
308
+ if (val === void 0) {
309
+ emitError("argument --project: expected one argument");
310
+ }
311
+ opts.project = val;
312
+ i += 2;
313
+ }
314
+ } else if (flag === "--dry-run") {
315
+ opts.dry_run = true;
316
+ i += 1;
317
+ } else if (flag === "--json") {
318
+ opts.json = true;
319
+ i += 1;
320
+ } else if (flag === "--all-missing-lock") {
321
+ opts.all_missing_lock = true;
322
+ i += 1;
323
+ } else if (flag === "--resume-uninstall") {
324
+ opts.resume_uninstall = true;
325
+ i += 1;
326
+ } else {
327
+ emitError(`unrecognized arguments: ${tok}`);
328
+ }
329
+ }
330
+ return opts;
331
+ }
332
+ function _relativeToOr(target, base) {
333
+ if (!path.isAbsolute(target)) {
334
+ return target;
335
+ }
336
+ const rel = path.relative(base, target);
337
+ if (rel.startsWith("..") || path.isAbsolute(rel)) {
338
+ return target;
339
+ }
340
+ return rel;
341
+ }
342
+ function _emit_text(project_root, candidates, results, opts, out) {
343
+ const prefix = opts.dry_run ? "[dry-run] " : "";
344
+ if (!candidates.length) {
345
+ _print(out, `\u2705 ${prefix}no orphaned bridges in ${project_root}`);
346
+ return;
347
+ }
348
+ const modified = results.filter((r) => r[2] === "modified");
349
+ const orphans = results.filter((r) => r[2] === "orphan");
350
+ _print(
351
+ out,
352
+ `${prefix}${orphans.length} orphaned, ${modified.length} modified bridge(s) under ${project_root}:`
353
+ );
354
+ for (const [tool_id, target, state, ok, msg] of results) {
355
+ const rel = _relativeToOr(target, project_root);
356
+ if (state === "modified") {
357
+ _print(out, ` \u26A0 ${tool_id}: modified \u2014 skipped ${rel}`);
358
+ continue;
359
+ }
360
+ const mark = ok ? "\xB7" : "!";
361
+ _print(out, ` ${mark} ${tool_id}: ${msg} ${rel}`);
362
+ }
363
+ }
364
+ function _emit_json(project_root, results, opts, out) {
365
+ const payload = {
366
+ project_root,
367
+ dry_run: opts.dry_run,
368
+ orphans: results.map(([tool_id, target, state, ok, msg]) => ({
369
+ tool: tool_id,
370
+ path: _relativeToOr(target, project_root),
371
+ state,
372
+ ok,
373
+ status: msg
374
+ }))
375
+ };
376
+ _print(out, _jsonDumpsIndentAscii(payload, 2));
377
+ }
378
+ function main(argv = null) {
379
+ const opts = _parse(argv !== null ? [...argv] : process.argv.slice(2));
380
+ const project_root = _resolve_project_root(opts.project);
381
+ const [manifest, declared] = _load_manifest(project_root, {
382
+ force_empty: opts.all_missing_lock
383
+ });
384
+ if (declared === null) {
385
+ const manifest_path2 = manifest_path(project_root);
386
+ _print(_stderr, `\u274C no project lockfile at ${manifest_path2}`);
387
+ _print(
388
+ _stderr,
389
+ " pass --all-missing-lock to prune every known marker (destructive)"
390
+ );
391
+ return 1;
392
+ }
393
+ const candidates = _orphaned(project_root, manifest, declared, {
394
+ resume_uninstall: opts.resume_uninstall
395
+ });
396
+ const results = [];
397
+ for (const [tool_id, target, _kind, expected_sha] of candidates) {
398
+ const [state] = _classify(target, expected_sha);
399
+ if (state === "modified") {
400
+ results.push([tool_id, target, state, true, "skipped (modified)"]);
401
+ continue;
402
+ }
403
+ const [ok, msg] = _remove(target, { dry_run: opts.dry_run });
404
+ results.push([tool_id, target, state, ok, msg]);
405
+ }
406
+ if (opts.json) {
407
+ _emit_json(project_root, results, { dry_run: opts.dry_run }, _stdout);
408
+ } else {
409
+ _emit_text(project_root, candidates, results, { dry_run: opts.dry_run }, _stdout);
410
+ }
411
+ const failed = results.filter((r) => !r[2]);
412
+ return failed.length ? 1 : 0;
413
+ }
414
+ var _HERE = fileURLToPath(import.meta.url);
415
+ function _isCliEntry() {
416
+ if (process.argv[1] === void 0) {
417
+ return false;
418
+ }
419
+ const argvUrl = pathToFileURL(path.resolve(process.argv[1])).href;
420
+ if (import.meta.url === argvUrl) {
421
+ return true;
422
+ }
423
+ try {
424
+ const here = fs.realpathSync(fileURLToPath(import.meta.url));
425
+ const argv = fs.realpathSync(path.resolve(process.argv[1]));
426
+ return here === argv;
427
+ } catch {
428
+ return false;
429
+ }
430
+ }
431
+ if (_isCliEntry() || process.argv[1] === _HERE) {
432
+ try {
433
+ process.exitCode = main(process.argv.slice(2));
434
+ } catch (exc) {
435
+ if (exc instanceof ArgparseExit) {
436
+ process.exitCode = exc.code;
437
+ } else {
438
+ throw exc;
439
+ }
440
+ }
441
+ }
442
+ export {
443
+ main
444
+ };
@@ -0,0 +1,28 @@
1
+ #!/usr/bin/env tsx
2
+ import { createRequire as __acCreateRequire } from 'node:module'; const require = globalThis.require ?? __acCreateRequire(import.meta.url);
3
+ import {
4
+ ArgparseExit,
5
+ _default_runner,
6
+ _is_source_repo,
7
+ _parse,
8
+ _refresh_global,
9
+ _refresh_project,
10
+ _remove_legacy_consumer_bridge_marker,
11
+ _sync_gitattributes,
12
+ _sync_gitignore,
13
+ main
14
+ } from "./chunk-736JCWLM.js";
15
+ import "./chunk-MCJYCQPF.js";
16
+ import "./chunk-J55WI3RR.js";
17
+ export {
18
+ ArgparseExit,
19
+ _default_runner,
20
+ _is_source_repo,
21
+ _parse,
22
+ _refresh_global,
23
+ _refresh_project,
24
+ _remove_legacy_consumer_bridge_marker,
25
+ _sync_gitattributes,
26
+ _sync_gitignore,
27
+ main
28
+ };