rulesync 14.0.0 → 14.1.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.
@@ -55,6 +55,7 @@ const ALL_FEATURES_WITH_WILDCARD = [...ALL_FEATURES, "*"];
55
55
  const FeatureSchema = zod_mini.z.enum(ALL_FEATURES);
56
56
  zod_mini.z.array(FeatureSchema);
57
57
  const GitignoreDestinationSchema = zod_mini.z.enum(["gitignore", "gitattributes"]);
58
+ const FlattenedCommandNamingSchema = zod_mini.z.enum(["basename", "path"]);
58
59
  const FeatureOptionsSchema = zod_mini.z.record(zod_mini.z.string(), zod_mini.z.unknown());
59
60
  const FeatureValueSchema = zod_mini.z.union([
60
61
  zod_mini.z.boolean(),
@@ -116,26 +117,26 @@ function formatError(error) {
116
117
  }
117
118
  //#endregion
118
119
  //#region src/constants/rulesync-paths.ts
119
- const { join: join$257 } = node_path.posix;
120
+ const { join: join$258 } = node_path.posix;
120
121
  const RULESYNC_CONFIG_RELATIVE_FILE_PATH = "rulesync.jsonc";
121
122
  const RULESYNC_LOCAL_CONFIG_RELATIVE_FILE_PATH = "rulesync.local.jsonc";
122
123
  const RULESYNC_RELATIVE_DIR_PATH = ".rulesync";
123
- const RULESYNC_RULES_RELATIVE_DIR_PATH = join$257(RULESYNC_RELATIVE_DIR_PATH, "rules");
124
- const RULESYNC_COMMANDS_RELATIVE_DIR_PATH = join$257(RULESYNC_RELATIVE_DIR_PATH, "commands");
125
- const RULESYNC_SUBAGENTS_RELATIVE_DIR_PATH = join$257(RULESYNC_RELATIVE_DIR_PATH, "subagents");
126
- const RULESYNC_CHECKS_RELATIVE_DIR_PATH = join$257(RULESYNC_RELATIVE_DIR_PATH, "checks");
127
- const RULESYNC_MCP_RELATIVE_FILE_PATH = join$257(RULESYNC_RELATIVE_DIR_PATH, "mcp.json");
128
- const RULESYNC_HOOKS_RELATIVE_FILE_PATH = join$257(RULESYNC_RELATIVE_DIR_PATH, "hooks.json");
129
- const RULESYNC_PERMISSIONS_RELATIVE_FILE_PATH = join$257(RULESYNC_RELATIVE_DIR_PATH, "permissions.json");
130
- const RULESYNC_MCP_JSONC_RELATIVE_FILE_PATH = join$257(RULESYNC_RELATIVE_DIR_PATH, "mcp.jsonc");
131
- const RULESYNC_HOOKS_JSONC_RELATIVE_FILE_PATH = join$257(RULESYNC_RELATIVE_DIR_PATH, "hooks.jsonc");
132
- const RULESYNC_PERMISSIONS_JSONC_RELATIVE_FILE_PATH = join$257(RULESYNC_RELATIVE_DIR_PATH, "permissions.jsonc");
124
+ const RULESYNC_RULES_RELATIVE_DIR_PATH = join$258(RULESYNC_RELATIVE_DIR_PATH, "rules");
125
+ const RULESYNC_COMMANDS_RELATIVE_DIR_PATH = join$258(RULESYNC_RELATIVE_DIR_PATH, "commands");
126
+ const RULESYNC_SUBAGENTS_RELATIVE_DIR_PATH = join$258(RULESYNC_RELATIVE_DIR_PATH, "subagents");
127
+ const RULESYNC_CHECKS_RELATIVE_DIR_PATH = join$258(RULESYNC_RELATIVE_DIR_PATH, "checks");
128
+ const RULESYNC_MCP_RELATIVE_FILE_PATH = join$258(RULESYNC_RELATIVE_DIR_PATH, "mcp.json");
129
+ const RULESYNC_HOOKS_RELATIVE_FILE_PATH = join$258(RULESYNC_RELATIVE_DIR_PATH, "hooks.json");
130
+ const RULESYNC_PERMISSIONS_RELATIVE_FILE_PATH = join$258(RULESYNC_RELATIVE_DIR_PATH, "permissions.json");
131
+ const RULESYNC_MCP_JSONC_RELATIVE_FILE_PATH = join$258(RULESYNC_RELATIVE_DIR_PATH, "mcp.jsonc");
132
+ const RULESYNC_HOOKS_JSONC_RELATIVE_FILE_PATH = join$258(RULESYNC_RELATIVE_DIR_PATH, "hooks.jsonc");
133
+ const RULESYNC_PERMISSIONS_JSONC_RELATIVE_FILE_PATH = join$258(RULESYNC_RELATIVE_DIR_PATH, "permissions.jsonc");
133
134
  const RULESYNC_AIIGNORE_FILE_NAME = ".aiignore";
134
- const RULESYNC_AIIGNORE_RELATIVE_FILE_PATH = join$257(RULESYNC_RELATIVE_DIR_PATH, ".aiignore");
135
+ const RULESYNC_AIIGNORE_RELATIVE_FILE_PATH = join$258(RULESYNC_RELATIVE_DIR_PATH, ".aiignore");
135
136
  const RULESYNC_IGNORE_RELATIVE_FILE_PATH = ".rulesyncignore";
136
137
  const RULESYNC_OVERVIEW_FILE_NAME = "overview.md";
137
- const RULESYNC_SKILLS_RELATIVE_DIR_PATH = join$257(RULESYNC_RELATIVE_DIR_PATH, "skills");
138
- const RULESYNC_CURATED_SKILLS_RELATIVE_DIR_PATH = join$257(RULESYNC_SKILLS_RELATIVE_DIR_PATH, ".curated");
138
+ const RULESYNC_SKILLS_RELATIVE_DIR_PATH = join$258(RULESYNC_RELATIVE_DIR_PATH, "skills");
139
+ const RULESYNC_CURATED_SKILLS_RELATIVE_DIR_PATH = join$258(RULESYNC_SKILLS_RELATIVE_DIR_PATH, ".curated");
139
140
  const RULESYNC_SOURCES_LOCK_RELATIVE_FILE_PATH = "rulesync.lock";
140
141
  const RULESYNC_NPM_SOURCES_LOCK_RELATIVE_FILE_PATH = "rulesync-npm.lock.json";
141
142
  const RULESYNC_MCP_FILE_NAME = "mcp.json";
@@ -347,6 +348,7 @@ const hooksProcessorToolTargetTuple = [
347
348
  "copilot",
348
349
  "copilotcli",
349
350
  "opencode",
351
+ "pi",
350
352
  "factorydroid",
351
353
  "goose",
352
354
  "hermesagent",
@@ -720,16 +722,9 @@ var BaseLogger = class {
720
722
  return this._silent;
721
723
  }
722
724
  configure({ verbose, silent }) {
723
- if (verbose && silent) {
724
- this._silent = false;
725
- if (!isEnvTest()) this.onConflictingFlags();
726
- }
727
725
  this._silent = silent;
728
726
  this._verbose = verbose && !silent;
729
727
  }
730
- onConflictingFlags() {
731
- console.warn("Both --verbose and --silent specified; --silent takes precedence");
732
- }
733
728
  };
734
729
  /**
735
730
  * ConsoleLogger - human-readable terminal output
@@ -786,7 +781,6 @@ var JsonLogger = class extends BaseLogger {
786
781
  this._commandName = command;
787
782
  this._version = version;
788
783
  }
789
- onConflictingFlags() {}
790
784
  get jsonMode() {
791
785
  return true;
792
786
  }
@@ -834,17 +828,32 @@ var JsonLogger = class extends BaseLogger {
834
828
  debug(_message, ..._args) {}
835
829
  };
836
830
  /**
831
+ * Warn once when both `--verbose` and `--silent` were passed on the command
832
+ * line. Called at CLI-flag parsing time only (`wrapCommand`), so re-configuring
833
+ * a logger from config-file values never re-triggers it. Suppressed in JSON
834
+ * mode to keep non-JSON text off stderr, matching the former JsonLogger
835
+ * behavior.
836
+ */
837
+ function warnOnConflictingFlags({ verbose, silent, jsonMode }) {
838
+ if (!verbose || !silent || jsonMode || isEnvTest()) return;
839
+ console.warn("Both --verbose and --silent specified; --silent takes precedence");
840
+ }
841
+ /**
842
+ * Shared fallback logger for code paths that have no command logger threaded
843
+ * through (module-level translators, `warnWithFallback(undefined, ...)`).
844
+ * `wrapCommand` configures it from CLI flags and `ConfigResolver.resolve`
845
+ * re-configures it from the resolved config, so `silent`/`verbose` settings
846
+ * are honored even on paths where the command logger is not available.
847
+ */
848
+ const fallbackLogger = new ConsoleLogger();
849
+ /**
837
850
  * Emit a warning through `logger.warn` if a logger is supplied, otherwise
838
- * fall through to `console.warn`. Centralizes the "logger may be optional"
839
- * pattern so call sites stay terse and `oxlint`'s `no-console` exception
840
- * lives in exactly one place.
851
+ * fall through to the shared `fallbackLogger`. Centralizes the "logger may
852
+ * be optional" pattern so call sites stay terse and the fallback honors the
853
+ * configured `silent` mode.
841
854
  */
842
855
  function warnWithFallback(logger, message) {
843
- if (logger) {
844
- logger.warn(message);
845
- return;
846
- }
847
- console.warn(message);
856
+ (logger ?? fallbackLogger).warn(message);
848
857
  }
849
858
  //#endregion
850
859
  //#region src/utils/validation.ts
@@ -912,6 +921,7 @@ const ConfigParamsSchema = zod_mini.z.object({
912
921
  simulateCommands: (0, zod_mini.optional)(zod_mini.z.boolean()),
913
922
  simulateSubagents: (0, zod_mini.optional)(zod_mini.z.boolean()),
914
923
  simulateSkills: (0, zod_mini.optional)(zod_mini.z.boolean()),
924
+ flattenedCommandNaming: (0, zod_mini.optional)(FlattenedCommandNamingSchema),
915
925
  gitignoreTargetsOnly: (0, zod_mini.optional)(zod_mini.z.boolean()),
916
926
  gitignoreDestination: (0, zod_mini.optional)(GitignoreDestinationSchema),
917
927
  dryRun: (0, zod_mini.optional)(zod_mini.z.boolean()),
@@ -989,13 +999,14 @@ var Config = class Config {
989
999
  simulateCommands;
990
1000
  simulateSubagents;
991
1001
  simulateSkills;
1002
+ flattenedCommandNaming;
992
1003
  gitignoreTargetsOnly;
993
1004
  gitignoreDestination;
994
1005
  dryRun;
995
1006
  check;
996
1007
  inputRoot;
997
1008
  sources;
998
- constructor({ outputRoots, targets, features, verbose, delete: isDelete, global, silent, simulateCommands, simulateSubagents, simulateSkills, gitignoreTargetsOnly, gitignoreDestination, dryRun, check, inputRoot, sources, configFileTargets }) {
1009
+ constructor({ outputRoots, targets, features, verbose, delete: isDelete, global, silent, simulateCommands, simulateSubagents, simulateSkills, flattenedCommandNaming, gitignoreTargetsOnly, gitignoreDestination, dryRun, check, inputRoot, sources, configFileTargets }) {
999
1010
  assertTargetsFeaturesExclusive({
1000
1011
  targets,
1001
1012
  features
@@ -1022,6 +1033,7 @@ var Config = class Config {
1022
1033
  this.simulateCommands = simulateCommands ?? false;
1023
1034
  this.simulateSubagents = simulateSubagents ?? false;
1024
1035
  this.simulateSkills = simulateSkills ?? false;
1036
+ this.flattenedCommandNaming = flattenedCommandNaming ?? "basename";
1025
1037
  this.gitignoreTargetsOnly = gitignoreTargetsOnly ?? true;
1026
1038
  this.gitignoreDestination = gitignoreDestination ?? "gitignore";
1027
1039
  this.dryRun = dryRun ?? false;
@@ -1190,6 +1202,9 @@ var Config = class Config {
1190
1202
  getSimulateCommands() {
1191
1203
  return this.simulateCommands;
1192
1204
  }
1205
+ getFlattenedCommandNaming() {
1206
+ return this.flattenedCommandNaming;
1207
+ }
1193
1208
  getSimulateSubagents() {
1194
1209
  return this.simulateSubagents;
1195
1210
  }
@@ -1242,6 +1257,7 @@ const getDefaults = () => ({
1242
1257
  simulateCommands: false,
1243
1258
  simulateSubagents: false,
1244
1259
  simulateSkills: false,
1260
+ flattenedCommandNaming: "basename",
1245
1261
  gitignoreTargetsOnly: true,
1246
1262
  gitignoreDestination: "gitignore",
1247
1263
  dryRun: false,
@@ -1271,6 +1287,7 @@ const mergeConfigs = (baseConfig, localConfig) => {
1271
1287
  simulateCommands: localConfig.simulateCommands ?? baseConfig.simulateCommands,
1272
1288
  simulateSubagents: localConfig.simulateSubagents ?? baseConfig.simulateSubagents,
1273
1289
  simulateSkills: localConfig.simulateSkills ?? baseConfig.simulateSkills,
1290
+ flattenedCommandNaming: localConfig.flattenedCommandNaming ?? baseConfig.flattenedCommandNaming,
1274
1291
  gitignoreTargetsOnly: localConfig.gitignoreTargetsOnly ?? baseConfig.gitignoreTargetsOnly,
1275
1292
  gitignoreDestination: localConfig.gitignoreDestination ?? baseConfig.gitignoreDestination,
1276
1293
  dryRun: localConfig.dryRun ?? baseConfig.dryRun,
@@ -1349,6 +1366,26 @@ var ConfigResolver = class {
1349
1366
  validatedConfigPath,
1350
1367
  localConfigPath
1351
1368
  });
1369
+ const resolvedVerbose = pick({
1370
+ cli: verbose,
1371
+ file: configByFile.verbose,
1372
+ fallback: getDefaults().verbose
1373
+ });
1374
+ const resolvedSilent = pick({
1375
+ cli: silent,
1376
+ file: configByFile.silent,
1377
+ fallback: getDefaults().silent
1378
+ });
1379
+ if (logger !== void 0) {
1380
+ logger.configure({
1381
+ verbose: resolvedVerbose,
1382
+ silent: resolvedSilent
1383
+ });
1384
+ fallbackLogger.configure({
1385
+ verbose: resolvedVerbose,
1386
+ silent: resolvedSilent
1387
+ });
1388
+ }
1352
1389
  const resolvedInputRoot = inputRoot ?? configByFile.inputRoot;
1353
1390
  const resolvedGlobal = resolveGlobal({
1354
1391
  logger,
@@ -1365,11 +1402,7 @@ var ConfigResolver = class {
1365
1402
  return new Config({
1366
1403
  targets: resolvedTargets,
1367
1404
  features: resolvedFeatures,
1368
- verbose: pick({
1369
- cli: verbose,
1370
- file: configByFile.verbose,
1371
- fallback: getDefaults().verbose
1372
- }),
1405
+ verbose: resolvedVerbose,
1373
1406
  delete: pick({
1374
1407
  cli: isDelete,
1375
1408
  file: configByFile.delete,
@@ -1384,11 +1417,7 @@ var ConfigResolver = class {
1384
1417
  global: resolvedGlobal
1385
1418
  }),
1386
1419
  global: resolvedGlobal,
1387
- silent: pick({
1388
- cli: silent,
1389
- file: configByFile.silent,
1390
- fallback: getDefaults().silent
1391
- }),
1420
+ silent: resolvedSilent,
1392
1421
  simulateCommands: pick({
1393
1422
  cli: simulateCommands,
1394
1423
  file: configByFile.simulateCommands,
@@ -1426,6 +1455,7 @@ var ConfigResolver = class {
1426
1455
  }),
1427
1456
  inputRoot: resolvedInputRoot !== void 0 ? (0, node_path.resolve)(resolvedInputRoot) : cwd,
1428
1457
  sources: configByFile.sources ?? getDefaults().sources,
1458
+ flattenedCommandNaming: configByFile.flattenedCommandNaming ?? getDefaults().flattenedCommandNaming,
1429
1459
  configFileTargets: extractConfigFileTargets(configByFile.targets)
1430
1460
  });
1431
1461
  }
@@ -5258,12 +5288,15 @@ var OpenCodeCommand = class OpenCodeCommand extends ToolCommand {
5258
5288
  }
5259
5289
  };
5260
5290
  const PI_AGENT_DIR = (0, node_path.join)(".pi", "agent");
5291
+ const PI_AGENT_EXTENSIONS_DIR_PATH = (0, node_path.join)(PI_AGENT_DIR, "extensions");
5261
5292
  const PI_AGENT_PROMPTS_DIR_PATH = (0, node_path.join)(PI_AGENT_DIR, "prompts");
5262
5293
  const PI_AGENT_SKILLS_DIR_PATH = (0, node_path.join)(PI_AGENT_DIR, "skills");
5294
+ const PI_EXTENSIONS_DIR_PATH = (0, node_path.join)(".pi", "extensions");
5263
5295
  const PI_PROMPTS_DIR_PATH = (0, node_path.join)(".pi", "prompts");
5264
5296
  const PI_SKILLS_DIR_PATH = (0, node_path.join)(".pi", "skills");
5265
5297
  const PI_RULE_FILE_NAME = "AGENTS.md";
5266
5298
  const PI_APPEND_SYSTEM_FILE_NAME = "APPEND_SYSTEM.md";
5299
+ const PI_HOOKS_FILE_NAME = "rulesync-hooks.ts";
5267
5300
  //#endregion
5268
5301
  //#region src/features/commands/pi-command.ts
5269
5302
  /**
@@ -6441,7 +6474,8 @@ var CommandsProcessor = class extends FeatureProcessor {
6441
6474
  toolTarget;
6442
6475
  global;
6443
6476
  getFactory;
6444
- constructor({ outputRoot = process.cwd(), inputRoot = process.cwd(), toolTarget, global = false, getFactory = defaultGetFactory$5, dryRun = false, logger }) {
6477
+ flattenedCommandNaming;
6478
+ constructor({ outputRoot = process.cwd(), inputRoot = process.cwd(), toolTarget, global = false, getFactory = defaultGetFactory$5, dryRun = false, flattenedCommandNaming = "basename", logger }) {
6445
6479
  super({
6446
6480
  outputRoot,
6447
6481
  inputRoot,
@@ -6453,6 +6487,7 @@ var CommandsProcessor = class extends FeatureProcessor {
6453
6487
  this.toolTarget = result.data;
6454
6488
  this.global = global;
6455
6489
  this.getFactory = getFactory;
6490
+ this.flattenedCommandNaming = flattenedCommandNaming;
6456
6491
  }
6457
6492
  async convertRulesyncFilesToToolFiles(rulesyncFiles) {
6458
6493
  const rulesyncCommands = rulesyncFiles.filter((file) => file instanceof RulesyncCommand);
@@ -6489,8 +6524,9 @@ var CommandsProcessor = class extends FeatureProcessor {
6489
6524
  });
6490
6525
  }
6491
6526
  flattenRelativeFilePath(rulesyncCommand) {
6492
- const flatPath = (0, node_path.basename)(rulesyncCommand.getRelativeFilePath());
6493
- if (flatPath === rulesyncCommand.getRelativeFilePath()) return rulesyncCommand;
6527
+ const relativeFilePath = rulesyncCommand.getRelativeFilePath();
6528
+ const flatPath = this.flattenedCommandNaming === "path" ? toPosixPath(relativeFilePath).split("/").join("-") : (0, node_path.basename)(relativeFilePath);
6529
+ if (flatPath === relativeFilePath) return rulesyncCommand;
6494
6530
  return rulesyncCommand.withRelativeFilePath(flatPath);
6495
6531
  }
6496
6532
  safeRelativePath(basePath, fullPath) {
@@ -6816,6 +6852,26 @@ const OPENCODE_HOOK_EVENTS = [
6816
6852
  /** Hook events supported by Kilo. (Currently identical to OpenCode) */
6817
6853
  const KILO_HOOK_EVENTS = OPENCODE_HOOK_EVENTS;
6818
6854
  /**
6855
+ * Hook events supported by Pi Coding Agent, bridged through a generated
6856
+ * TypeScript extension (Pi has no static hook config file; its extension API
6857
+ * exposes lifecycle events instead).
6858
+ *
6859
+ * Only canonical events with a semantically faithful Pi extension event are
6860
+ * listed; see CANONICAL_TO_PI_EVENT_NAMES for the mapping.
6861
+ *
6862
+ * @see https://github.com/badlogic/pi-mono/blob/main/packages/coding-agent/docs/extensions.md
6863
+ */
6864
+ const PI_HOOK_EVENTS = [
6865
+ "sessionStart",
6866
+ "sessionEnd",
6867
+ "preToolUse",
6868
+ "postToolUse",
6869
+ "preModelInvocation",
6870
+ "beforeSubmitPrompt",
6871
+ "stop",
6872
+ "preCompact"
6873
+ ];
6874
+ /**
6819
6875
  * Hook events supported by GitHub Copilot (cloud coding agent).
6820
6876
  *
6821
6877
  * GitHub now documents an eight-event surface for `.github/hooks/*.json`:
@@ -7215,6 +7271,7 @@ const HooksConfigSchema = zod_mini.z.looseObject({
7215
7271
  copilotcli: zod_mini.z.optional(zod_mini.z.looseObject({ hooks: zod_mini.z.optional(hooksRecordSchema) })),
7216
7272
  opencode: zod_mini.z.optional(zod_mini.z.looseObject({ hooks: zod_mini.z.optional(hooksRecordSchema) })),
7217
7273
  kilo: zod_mini.z.optional(zod_mini.z.looseObject({ hooks: zod_mini.z.optional(hooksRecordSchema) })),
7274
+ pi: zod_mini.z.optional(zod_mini.z.looseObject({ hooks: zod_mini.z.optional(hooksRecordSchema) })),
7218
7275
  factorydroid: zod_mini.z.optional(zod_mini.z.looseObject({ hooks: zod_mini.z.optional(hooksRecordSchema) })),
7219
7276
  codexcli: zod_mini.z.optional(zod_mini.z.looseObject({ hooks: zod_mini.z.optional(hooksRecordSchema) })),
7220
7277
  goose: zod_mini.z.optional(zod_mini.z.looseObject({ hooks: zod_mini.z.optional(hooksRecordSchema) })),
@@ -7395,6 +7452,31 @@ const CANONICAL_TO_OPENCODE_EVENT_NAMES = {
7395
7452
  */
7396
7453
  const CANONICAL_TO_KILO_EVENT_NAMES = CANONICAL_TO_OPENCODE_EVENT_NAMES;
7397
7454
  /**
7455
+ * Map canonical camelCase event names to Pi Coding Agent extension event
7456
+ * names (snake_case).
7457
+ *
7458
+ * Mapping notes: `sessionEnd` → `session_shutdown` (fires on session
7459
+ * teardown), `beforeSubmitPrompt` → `input` (user input interception),
7460
+ * `preModelInvocation` → `context` (fires before each LLM call), and
7461
+ * `stop` → `agent_end` (agent finished responding; unlike Claude Code's
7462
+ * Stop, this also fires before Pi auto-retries or auto-compacts —
7463
+ * `agent_settled` would skip queued follow-ups instead, a pure trade-off).
7464
+ * Pi events without a faithful canonical counterpart (e.g. `turn_start`,
7465
+ * `agent_settled`) are intentionally unmapped.
7466
+ *
7467
+ * @see https://github.com/badlogic/pi-mono/blob/main/packages/coding-agent/docs/extensions.md
7468
+ */
7469
+ const CANONICAL_TO_PI_EVENT_NAMES = {
7470
+ sessionStart: "session_start",
7471
+ sessionEnd: "session_shutdown",
7472
+ preToolUse: "tool_call",
7473
+ postToolUse: "tool_result",
7474
+ preModelInvocation: "context",
7475
+ beforeSubmitPrompt: "input",
7476
+ stop: "agent_end",
7477
+ preCompact: "session_before_compact"
7478
+ };
7479
+ /**
7398
7480
  * Map canonical camelCase event names to Copilot camelCase.
7399
7481
  */
7400
7482
  const CANONICAL_TO_COPILOT_EVENT_NAMES = {
@@ -10825,6 +10907,176 @@ var OpencodeHooks = class OpencodeHooks extends ToolHooks {
10825
10907
  }
10826
10908
  };
10827
10909
  //#endregion
10910
+ //#region src/features/hooks/pi-extension-generator.ts
10911
+ /**
10912
+ * Pi extension events fired per tool invocation; handlers for these receive
10913
+ * `event.toolName` and honor the canonical hook `matcher` as a regex on it.
10914
+ */
10915
+ const PI_TOOL_EVENTS = /* @__PURE__ */ new Set(["tool_call", "tool_result"]);
10916
+ /**
10917
+ * Validate a hook matcher as a regular expression and return it as a JS
10918
+ * string-literal (JSON.stringify quoting) safe to embed in generated code.
10919
+ */
10920
+ function matcherToEmbeddedLiteral(matcher) {
10921
+ let sanitized = matcher;
10922
+ for (const char of CONTROL_CHARS) sanitized = sanitized.replaceAll(char, "");
10923
+ if (sanitized === "*") sanitized = ".*";
10924
+ try {
10925
+ new RegExp(sanitized);
10926
+ } catch {
10927
+ throw new Error(`Invalid regex pattern in hook matcher: ${sanitized}`);
10928
+ }
10929
+ return JSON.stringify(sanitized);
10930
+ }
10931
+ function collectPiHandlers({ effectiveHooks, eventMap }) {
10932
+ const handlerGroups = {};
10933
+ for (const [canonicalEvent, definitions] of Object.entries(effectiveHooks)) {
10934
+ const piEvent = eventMap[canonicalEvent];
10935
+ if (!piEvent) continue;
10936
+ const handlers = [];
10937
+ for (const def of definitions) {
10938
+ if ((def.type ?? "command") !== "command") continue;
10939
+ if (!def.command) continue;
10940
+ handlers.push({
10941
+ command: def.command,
10942
+ matcher: def.matcher ? def.matcher : void 0
10943
+ });
10944
+ }
10945
+ if (handlers.length > 0) {
10946
+ const existing = handlerGroups[piEvent];
10947
+ if (existing) existing.push(...handlers);
10948
+ else handlerGroups[piEvent] = handlers;
10949
+ }
10950
+ }
10951
+ return handlerGroups;
10952
+ }
10953
+ function buildSubscriptionLines(handlerGroups) {
10954
+ const lines = [];
10955
+ for (const [piEvent, handlers] of Object.entries(handlerGroups)) {
10956
+ const usesToolName = PI_TOOL_EVENTS.has(piEvent) && handlers.some((h) => h.matcher);
10957
+ lines.push(` pi.on(${JSON.stringify(piEvent)}, async (${usesToolName ? "event" : ""}) => {`);
10958
+ for (const handler of handlers) {
10959
+ const embeddedCommand = JSON.stringify(handler.command);
10960
+ if (usesToolName && handler.matcher) {
10961
+ lines.push(` if (new RegExp(${matcherToEmbeddedLiteral(handler.matcher)}).test(event.toolName)) {`);
10962
+ lines.push(` await run(${embeddedCommand});`);
10963
+ lines.push(" }");
10964
+ } else lines.push(` await run(${embeddedCommand});`);
10965
+ }
10966
+ lines.push(" });");
10967
+ }
10968
+ return lines;
10969
+ }
10970
+ /**
10971
+ * Generate the rulesync-owned Pi extension (a TypeScript module with a
10972
+ * default-export factory receiving Pi's ExtensionAPI) that subscribes to the
10973
+ * mapped lifecycle events and executes the configured hook commands via the
10974
+ * platform shell. The generated extension observes events only: it never
10975
+ * blocks or mutates Pi events.
10976
+ *
10977
+ * @see https://github.com/badlogic/pi-mono/blob/main/packages/coding-agent/docs/extensions.md
10978
+ */
10979
+ function generatePiExtensionCode({ config, supportedEvents, eventMap }) {
10980
+ const supported = new Set(supportedEvents);
10981
+ const configHooks = {
10982
+ ...config.hooks,
10983
+ ...config.pi?.hooks
10984
+ };
10985
+ const effectiveHooks = {};
10986
+ for (const [event, defs] of Object.entries(configHooks)) if (supported.has(event)) effectiveHooks[event] = defs;
10987
+ const subscriptionLines = buildSubscriptionLines(collectPiHandlers({
10988
+ effectiveHooks,
10989
+ eventMap
10990
+ }));
10991
+ const lines = ["// Generated by rulesync. Do not edit manually."];
10992
+ if (subscriptionLines.length === 0) {
10993
+ lines.push("export default function () {}");
10994
+ lines.push("");
10995
+ return lines.join("\n");
10996
+ }
10997
+ lines.push("import { exec } from \"node:child_process\";");
10998
+ lines.push("import { promisify } from \"node:util\";");
10999
+ lines.push("");
11000
+ lines.push("import type { ExtensionAPI } from \"@earendil-works/pi-coding-agent\";");
11001
+ lines.push("");
11002
+ lines.push("const run = promisify(exec);");
11003
+ lines.push("");
11004
+ lines.push("export default function (pi: ExtensionAPI) {");
11005
+ lines.push(...subscriptionLines);
11006
+ lines.push("}");
11007
+ lines.push("");
11008
+ return lines.join("\n");
11009
+ }
11010
+ //#endregion
11011
+ //#region src/features/hooks/pi-hooks.ts
11012
+ /**
11013
+ * Pi Coding Agent has no static hooks config file; its extension API exposes
11014
+ * lifecycle events instead. rulesync bridges canonical hooks by generating a
11015
+ * rulesync-owned TypeScript extension in Pi's extension discovery paths:
11016
+ * `.pi/extensions/rulesync-hooks.ts` (project) and
11017
+ * `~/.pi/agent/extensions/rulesync-hooks.ts` (global).
11018
+ *
11019
+ * @see https://github.com/badlogic/pi-mono/blob/main/packages/coding-agent/docs/extensions.md
11020
+ */
11021
+ var PiHooks = class PiHooks extends ToolHooks {
11022
+ constructor(params) {
11023
+ super({
11024
+ ...params,
11025
+ fileContent: params.fileContent ?? ""
11026
+ });
11027
+ }
11028
+ static getSettablePaths(options) {
11029
+ return {
11030
+ relativeDirPath: options?.global ? PI_AGENT_EXTENSIONS_DIR_PATH : PI_EXTENSIONS_DIR_PATH,
11031
+ relativeFilePath: PI_HOOKS_FILE_NAME
11032
+ };
11033
+ }
11034
+ static async fromFile({ outputRoot = process.cwd(), validate = true, global = false }) {
11035
+ const paths = PiHooks.getSettablePaths({ global });
11036
+ const fileContent = await readFileContent((0, node_path.join)(outputRoot, paths.relativeDirPath, paths.relativeFilePath));
11037
+ return new PiHooks({
11038
+ outputRoot,
11039
+ relativeDirPath: paths.relativeDirPath,
11040
+ relativeFilePath: paths.relativeFilePath,
11041
+ fileContent,
11042
+ validate
11043
+ });
11044
+ }
11045
+ static fromRulesyncHooks({ outputRoot = process.cwd(), rulesyncHooks, validate = true, global = false }) {
11046
+ const fileContent = generatePiExtensionCode({
11047
+ config: rulesyncHooks.getJson(),
11048
+ supportedEvents: PI_HOOK_EVENTS,
11049
+ eventMap: CANONICAL_TO_PI_EVENT_NAMES
11050
+ });
11051
+ const paths = PiHooks.getSettablePaths({ global });
11052
+ return new PiHooks({
11053
+ outputRoot,
11054
+ relativeDirPath: paths.relativeDirPath,
11055
+ relativeFilePath: paths.relativeFilePath,
11056
+ fileContent,
11057
+ validate
11058
+ });
11059
+ }
11060
+ toRulesyncHooks() {
11061
+ throw new Error("Not implemented because Pi hooks are generated as a TypeScript extension file.");
11062
+ }
11063
+ validate() {
11064
+ return {
11065
+ success: true,
11066
+ error: null
11067
+ };
11068
+ }
11069
+ static forDeletion({ outputRoot = process.cwd(), relativeDirPath, relativeFilePath }) {
11070
+ return new PiHooks({
11071
+ outputRoot,
11072
+ relativeDirPath,
11073
+ relativeFilePath,
11074
+ fileContent: "",
11075
+ validate: false
11076
+ });
11077
+ }
11078
+ };
11079
+ //#endregion
10828
11080
  //#region src/features/hooks/qwencode-hooks.ts
10829
11081
  /**
10830
11082
  * Build a single Qwen Code hook object from a canonical hook definition.
@@ -11594,6 +11846,17 @@ const toolHooksFactories = /* @__PURE__ */ new Map([
11594
11846
  supportedHookTypes: ["command"],
11595
11847
  supportsMatcher: true
11596
11848
  }],
11849
+ ["pi", {
11850
+ class: PiHooks,
11851
+ meta: {
11852
+ supportsProject: true,
11853
+ supportsGlobal: true,
11854
+ supportsImport: false
11855
+ },
11856
+ supportedEvents: PI_HOOK_EVENTS,
11857
+ supportedHookTypes: ["command"],
11858
+ supportsMatcher: true
11859
+ }],
11597
11860
  ["factorydroid", {
11598
11861
  class: FactorydroidHooks,
11599
11862
  meta: {
@@ -19347,7 +19610,7 @@ function convertAntigravityIdeToRulesyncPermissions(params) {
19347
19610
  }
19348
19611
  //#endregion
19349
19612
  //#region src/features/permissions/augmentcode-permissions.ts
19350
- const moduleLogger$1 = new ConsoleLogger();
19613
+ const moduleLogger$1 = fallbackLogger;
19351
19614
  zod_mini.z.enum([
19352
19615
  "allow",
19353
19616
  "deny",
@@ -23152,7 +23415,7 @@ const QwenSettingsPermissionsSchema = zod_mini.z.looseObject({
23152
23415
  deny: zod_mini.z.optional(zod_mini.z.array(zod_mini.z.string()))
23153
23416
  });
23154
23417
  const QwenSettingsSchema = zod_mini.z.looseObject({ permissions: zod_mini.z.optional(QwenSettingsPermissionsSchema) });
23155
- const moduleLogger = new ConsoleLogger();
23418
+ const moduleLogger = fallbackLogger;
23156
23419
  /**
23157
23420
  * Mapping from rulesync canonical tool category names (lowercase) to Qwen Code tool names (PascalCase).
23158
23421
  * Unknown names pass through as-is (e.g., mcp__server__tool).
@@ -40559,7 +40822,8 @@ function buildCommandsStrategy(ctx) {
40559
40822
  toolTarget,
40560
40823
  global,
40561
40824
  dryRun,
40562
- logger
40825
+ logger,
40826
+ flattenedCommandNaming: config.getFlattenedCommandNaming()
40563
40827
  }),
40564
40828
  loadSource: (p) => p.loadToolFiles(),
40565
40829
  toRulesync: (p, files) => p.convertToolFilesToRulesyncFiles(files),
@@ -41399,6 +41663,7 @@ async function generateCommandsCore(params) {
41399
41663
  toolTarget,
41400
41664
  global: config.getGlobal(),
41401
41665
  dryRun: config.isPreviewMode(),
41666
+ flattenedCommandNaming: config.getFlattenedCommandNaming(),
41402
41667
  logger
41403
41668
  });
41404
41669
  const result = await processFeatureWithRulesyncFiles({
@@ -42372,6 +42637,12 @@ Object.defineProperty(exports, "ensureDir", {
42372
42637
  return ensureDir;
42373
42638
  }
42374
42639
  });
42640
+ Object.defineProperty(exports, "fallbackLogger", {
42641
+ enumerable: true,
42642
+ get: function() {
42643
+ return fallbackLogger;
42644
+ }
42645
+ });
42375
42646
  Object.defineProperty(exports, "fileExists", {
42376
42647
  enumerable: true,
42377
42648
  get: function() {
@@ -42486,6 +42757,12 @@ Object.defineProperty(exports, "toPosixPath", {
42486
42757
  return toPosixPath;
42487
42758
  }
42488
42759
  });
42760
+ Object.defineProperty(exports, "warnOnConflictingFlags", {
42761
+ enumerable: true,
42762
+ get: function() {
42763
+ return warnOnConflictingFlags;
42764
+ }
42765
+ });
42489
42766
  Object.defineProperty(exports, "writeFileContent", {
42490
42767
  enumerable: true,
42491
42768
  get: function() {
package/dist/index.cjs CHANGED
@@ -1,5 +1,5 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_import = require("./import-Dh9PCQKq.cjs");
2
+ const require_import = require("./import-CDKxRD_F.cjs");
3
3
  //#region src/index.ts
4
4
  async function generate(options = {}) {
5
5
  const { silent = true, verbose = false, ...rest } = options;
package/dist/index.d.cts CHANGED
@@ -15,7 +15,7 @@ declare const FeatureSchema: z.ZodMiniEnum<{
15
15
  type Feature = z.infer<typeof FeatureSchema>;
16
16
  //#endregion
17
17
  //#region src/types/tool-target-tuples.d.ts
18
- declare const ALL_TOOL_TARGET_TUPLES: readonly [readonly ["agentsmd", "aiassistant", "amp", "antigravity-cli", "antigravity-ide", "augmentcode", "augmentcode-legacy", "claudecode", "claudecode-legacy", "cline", "codexcli", "copilot", "copilotcli", "cursor", "deepagents", "factorydroid", "goose", "grokcli", "hermesagent", "junie", "kilo", "kiro", "kiro-cli", "kiro-ide", "opencode", "pi", "qwencode", "reasonix", "replit", "roo", "rovodev", "takt", "vibe", "warp", "devin", "zed"], readonly ["aiassistant", "antigravity-cli", "augmentcode", "claudecode", "claudecode-legacy", "cline", "cursor", "goose", "junie", "kilo", "kiro", "kiro-cli", "kiro-ide", "qwencode", "roo", "devin", "vibe", "warp", "zed"], readonly ["amp", "antigravity-cli", "antigravity-ide", "augmentcode", "claudecode", "claudecode-legacy", "cline", "codexcli", "copilot", "copilotcli", "cursor", "deepagents", "factorydroid", "goose", "grokcli", "hermesagent", "kilo", "kiro", "kiro-cli", "kiro-ide", "junie", "opencode", "qwencode", "reasonix", "roo", "rovodev", "takt", "vibe", "warp", "devin", "zed"], readonly ["agentsmd", "antigravity-cli", "antigravity-ide", "augmentcode", "claudecode", "claudecode-legacy", "cline", "codexcli", "copilot", "cursor", "factorydroid", "goose", "hermesagent", "junie", "kilo", "kiro", "kiro-cli", "kiro-ide", "opencode", "pi", "qwencode", "reasonix", "roo", "rovodev", "takt", "devin"], readonly ["kilo", "agentsmd", "augmentcode", "claudecode", "claudecode-legacy", "cline", "codexcli", "copilot", "copilotcli", "cursor", "deepagents", "devin", "factorydroid", "goose", "grokcli", "hermesagent", "junie", "kiro", "kiro-cli", "kiro-ide", "opencode", "qwencode", "reasonix", "roo", "rovodev", "takt", "vibe"], readonly ["agentsmd", "agentsskills", "aiassistant", "amp", "antigravity-cli", "antigravity-ide", "augmentcode", "claudecode", "claudecode-legacy", "cline", "codexcli", "copilot", "copilotcli", "cursor", "deepagents", "factorydroid", "goose", "grokcli", "hermesagent", "junie", "kilo", "kiro", "kiro-cli", "kiro-ide", "opencode", "pi", "qwencode", "reasonix", "replit", "roo", "rovodev", "takt", "vibe", "warp", "devin", "zed"], readonly ["antigravity-cli", "antigravity-ide", "kilo", "cursor", "claudecode", "codexcli", "copilot", "copilotcli", "opencode", "factorydroid", "goose", "hermesagent", "deepagents", "kiro", "kiro-cli", "kiro-ide", "devin", "augmentcode", "junie", "vibe", "qwencode", "reasonix", "grokcli"], readonly ["amp", "antigravity-cli", "antigravity-ide", "augmentcode", "claudecode", "cline", "codexcli", "copilot", "cursor", "devin", "factorydroid", "goose", "grokcli", "hermesagent", "junie", "kilo", "kiro", "kiro-cli", "kiro-ide", "opencode", "qwencode", "reasonix", "rovodev", "takt", "vibe", "warp", "zed"], readonly ["amp"]];
18
+ declare const ALL_TOOL_TARGET_TUPLES: readonly [readonly ["agentsmd", "aiassistant", "amp", "antigravity-cli", "antigravity-ide", "augmentcode", "augmentcode-legacy", "claudecode", "claudecode-legacy", "cline", "codexcli", "copilot", "copilotcli", "cursor", "deepagents", "factorydroid", "goose", "grokcli", "hermesagent", "junie", "kilo", "kiro", "kiro-cli", "kiro-ide", "opencode", "pi", "qwencode", "reasonix", "replit", "roo", "rovodev", "takt", "vibe", "warp", "devin", "zed"], readonly ["aiassistant", "antigravity-cli", "augmentcode", "claudecode", "claudecode-legacy", "cline", "cursor", "goose", "junie", "kilo", "kiro", "kiro-cli", "kiro-ide", "qwencode", "roo", "devin", "vibe", "warp", "zed"], readonly ["amp", "antigravity-cli", "antigravity-ide", "augmentcode", "claudecode", "claudecode-legacy", "cline", "codexcli", "copilot", "copilotcli", "cursor", "deepagents", "factorydroid", "goose", "grokcli", "hermesagent", "kilo", "kiro", "kiro-cli", "kiro-ide", "junie", "opencode", "qwencode", "reasonix", "roo", "rovodev", "takt", "vibe", "warp", "devin", "zed"], readonly ["agentsmd", "antigravity-cli", "antigravity-ide", "augmentcode", "claudecode", "claudecode-legacy", "cline", "codexcli", "copilot", "cursor", "factorydroid", "goose", "hermesagent", "junie", "kilo", "kiro", "kiro-cli", "kiro-ide", "opencode", "pi", "qwencode", "reasonix", "roo", "rovodev", "takt", "devin"], readonly ["kilo", "agentsmd", "augmentcode", "claudecode", "claudecode-legacy", "cline", "codexcli", "copilot", "copilotcli", "cursor", "deepagents", "devin", "factorydroid", "goose", "grokcli", "hermesagent", "junie", "kiro", "kiro-cli", "kiro-ide", "opencode", "qwencode", "reasonix", "roo", "rovodev", "takt", "vibe"], readonly ["agentsmd", "agentsskills", "aiassistant", "amp", "antigravity-cli", "antigravity-ide", "augmentcode", "claudecode", "claudecode-legacy", "cline", "codexcli", "copilot", "copilotcli", "cursor", "deepagents", "factorydroid", "goose", "grokcli", "hermesagent", "junie", "kilo", "kiro", "kiro-cli", "kiro-ide", "opencode", "pi", "qwencode", "reasonix", "replit", "roo", "rovodev", "takt", "vibe", "warp", "devin", "zed"], readonly ["antigravity-cli", "antigravity-ide", "kilo", "cursor", "claudecode", "codexcli", "copilot", "copilotcli", "opencode", "pi", "factorydroid", "goose", "hermesagent", "deepagents", "kiro", "kiro-cli", "kiro-ide", "devin", "augmentcode", "junie", "vibe", "qwencode", "reasonix", "grokcli"], readonly ["amp", "antigravity-cli", "antigravity-ide", "augmentcode", "claudecode", "cline", "codexcli", "copilot", "cursor", "devin", "factorydroid", "goose", "grokcli", "hermesagent", "junie", "kilo", "kiro", "kiro-cli", "kiro-ide", "opencode", "qwencode", "reasonix", "rovodev", "takt", "vibe", "warp", "zed"], readonly ["amp"]];
19
19
  //#endregion
20
20
  //#region src/types/tool-targets.d.ts
21
21
  type AllToolTarget = (typeof ALL_TOOL_TARGET_TUPLES)[number][number];
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.cts","names":[],"sources":["../src/types/features.ts","../src/types/tool-target-tuples.ts","../src/types/tool-targets.ts","../src/lib/convert.ts","../src/types/ai-dir.ts","../src/features/skills/rulesync-skill.ts","../src/lib/generate.ts","../src/lib/import.ts","../src/index.ts"],"mappings":";;cAEa;cAcP,eAAa,EAAA;;;;;;;;;;;KAEP,UAAU,EAAE,aAAa;;;cC6OxB;;;KCrPR,wBAAwB;cAEhB,4BAA4B,kBAAkB;cAM9C,kBAAgB,EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAEjB,aAAa,EAAE,aAAa;;;KCN5B;EACV;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;;;KCnBU;EAEN;EACA;;EAGA;EACA,OAAO;;KAGD;EACV;EACA,YAAY;;KAGF;EACV;EACA;EACA;EACA;IACE;IACA;IACA,cAAc;;EAEhB,aAAa;EACb;;KAGU,qBAAqB,KAC/B;uBAIoB;;;;qBAID;;;;qBAKA;;;;qBAKA;;;;YAKT;IACR;IACA;IACA,cAAc;;;;;YAMN,YAAY;;;;qBAKH;EAEnB,cACE,YACA,iBACA,SACA,UACA,YACA,UACC;SAcU,QAAQ,SAAS,qBAAqB,QAAQ;EAI3D;EAIA;EAIA;EAIA;EAqBA;IAEM;IACA;IACA,cAAc;;EAMpB,iBAAiB;;;;EAOjB;EAIA;EAIA,YAAY,cAAc,cAAc,cAAc;;;;;;;;;;;mBAc/B,kBACrB,oBACA,yBACA,iBACA,0BACC,QAAQ;WAmBF,YAAY;;;;cCrLjB,wCAAsC,EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KA8LhC;EACV;EACA;EACA;EACA;EACA;EACA;IACE;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA,QAAQ;IACR;IACA;IACA;IACA;IACA;;EAEF;IACE;IACA;MACE;MACA;MACA;MACA;MACA;MACA;;IAEF;MACE;;IAEF;MACE,QAAQ;QACN;QACA;QACA;QACA;QACA;;;;EAIN;IACE;IACA;IACA,yBAAyB;IACzB,WAAW;;EAEb;IACE;;EAEF;IACE;IACA;IACA,yBAAyB;IACzB,WAAW;;EAEb;IACE;IACA;;EAEF;IACE;IACA;IACA;;EAEF;IACE;IACA;IACA;IACA,gBAAgB;IAChB,WAAW;;EAEb;IACE;;EAEF;IACE;IACA;IACA,gBAAgB;IAChB,WAAW;;EAEb,MAAM;EACN,QAAQ;EACR;IACE;IACA;IACA,yBAAyB;IACzB,WAAW;;EAEb;IACE;IACA;IACA,WAAW;;EAEb;IACE;IACA;;EAEF;IACE;IACA,yBAAyB;IACzB,WAAW;IACX;;EAEF;IACE;IACA,yBAAyB;IACzB,WAAW;IACX;IACA;;EAEF;IACE;IACA;;;KAKQ,2BAA2B,EAAE,aAAa;KAO1C;EACV;EACA;EACA;EACA,aAAa;EACb;EACA,aAAa;EACb;EACA;;KAGU;EACV;;KAGU;EACV;EACA;EACA;EACA;;;;;;cAOW,sBAAsB;EACjC,cACE,YACA,iBACA,SACA,aACA,MACA,YACA,UACA,UACC;SAsBI,oBAAoB;EAU3B,kBAAkB;EAQlB;EAIA,YAAY;SAcC,UACX,YACA,iBACA,SACA,UACC,6BAA6B,QAAQ;;;;KChZ9B;EACV;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA,QAAQ;EACR;;;;KCPU;EACV;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;;;KCjCG;EACH;EACA;EACA;EACA;;KAGU,kBAAkB;EAC5B,UAAU;EACV,WAAW;EACX;;;;;;;EAOA;EACA;EACA;EACA;EACA;EACA;EACA;;KAGU,gBAAgB;EAC1B,QAAQ;EACR,WAAW;;KAGD,iBAAiB;EAC3B,MAAM;EACN,IAAI;EACJ,WAAW;EACX;;iBAGoB,SAAS,UAAS,kBAAuB,QAAQ;iBAqBjD,eAAe,SAAS,gBAAgB,QAAQ;iBAehD,gBAAgB,SAAS,iBAAiB,QAAQ"}
1
+ {"version":3,"file":"index.d.cts","names":[],"sources":["../src/types/features.ts","../src/types/tool-target-tuples.ts","../src/types/tool-targets.ts","../src/lib/convert.ts","../src/types/ai-dir.ts","../src/features/skills/rulesync-skill.ts","../src/lib/generate.ts","../src/lib/import.ts","../src/index.ts"],"mappings":";;cAEa;cAcP,eAAa,EAAA;;;;;;;;;;;KAEP,UAAU,EAAE,aAAa;;;cC8OxB;;;KCtPR,wBAAwB;cAEhB,4BAA4B,kBAAkB;cAM9C,kBAAgB,EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAEjB,aAAa,EAAE,aAAa;;;KCN5B;EACV;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;;;KCnBU;EAEN;EACA;;EAGA;EACA,OAAO;;KAGD;EACV;EACA,YAAY;;KAGF;EACV;EACA;EACA;EACA;IACE;IACA;IACA,cAAc;;EAEhB,aAAa;EACb;;KAGU,qBAAqB,KAC/B;uBAIoB;;;;qBAID;;;;qBAKA;;;;qBAKA;;;;YAKT;IACR;IACA;IACA,cAAc;;;;;YAMN,YAAY;;;;qBAKH;EAEnB,cACE,YACA,iBACA,SACA,UACA,YACA,UACC;SAcU,QAAQ,SAAS,qBAAqB,QAAQ;EAI3D;EAIA;EAIA;EAIA;EAqBA;IAEM;IACA;IACA,cAAc;;EAMpB,iBAAiB;;;;EAOjB;EAIA;EAIA,YAAY,cAAc,cAAc,cAAc;;;;;;;;;;;mBAc/B,kBACrB,oBACA,yBACA,iBACA,0BACC,QAAQ;WAmBF,YAAY;;;;cCrLjB,wCAAsC,EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KA8LhC;EACV;EACA;EACA;EACA;EACA;EACA;IACE;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA,QAAQ;IACR;IACA;IACA;IACA;IACA;;EAEF;IACE;IACA;MACE;MACA;MACA;MACA;MACA;MACA;;IAEF;MACE;;IAEF;MACE,QAAQ;QACN;QACA;QACA;QACA;QACA;;;;EAIN;IACE;IACA;IACA,yBAAyB;IACzB,WAAW;;EAEb;IACE;;EAEF;IACE;IACA;IACA,yBAAyB;IACzB,WAAW;;EAEb;IACE;IACA;;EAEF;IACE;IACA;IACA;;EAEF;IACE;IACA;IACA;IACA,gBAAgB;IAChB,WAAW;;EAEb;IACE;;EAEF;IACE;IACA;IACA,gBAAgB;IAChB,WAAW;;EAEb,MAAM;EACN,QAAQ;EACR;IACE;IACA;IACA,yBAAyB;IACzB,WAAW;;EAEb;IACE;IACA;IACA,WAAW;;EAEb;IACE;IACA;;EAEF;IACE;IACA,yBAAyB;IACzB,WAAW;IACX;;EAEF;IACE;IACA,yBAAyB;IACzB,WAAW;IACX;IACA;;EAEF;IACE;IACA;;;KAKQ,2BAA2B,EAAE,aAAa;KAO1C;EACV;EACA;EACA;EACA,aAAa;EACb;EACA,aAAa;EACb;EACA;;KAGU;EACV;;KAGU;EACV;EACA;EACA;EACA;;;;;;cAOW,sBAAsB;EACjC,cACE,YACA,iBACA,SACA,aACA,MACA,YACA,UACA,UACC;SAsBI,oBAAoB;EAU3B,kBAAkB;EAQlB;EAIA,YAAY;SAcC,UACX,YACA,iBACA,SACA,UACC,6BAA6B,QAAQ;;;;KChZ9B;EACV;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA,QAAQ;EACR;;;;KCPU;EACV;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;;;KCjCG;EACH;EACA;EACA;EACA;;KAGU,kBAAkB;EAC5B,UAAU;EACV,WAAW;EACX;;;;;;;EAOA;EACA;EACA;EACA;EACA;EACA;EACA;;KAGU,gBAAgB;EAC1B,QAAQ;EACR,WAAW;;KAGD,iBAAiB;EAC3B,MAAM;EACN,IAAI;EACJ,WAAW;EACX;;iBAGoB,SAAS,UAAS,kBAAuB,QAAQ;iBAqBjD,eAAe,SAAS,gBAAgB,QAAQ;iBAehD,gBAAgB,SAAS,iBAAiB,QAAQ"}