rulesync 43.8.1 → 43.8.3

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.
@@ -43375,11 +43375,10 @@ var CopilotcliRule = class CopilotcliRule extends CopilotRule {
43375
43375
  * Rule generator for Snowflake Cortex Code.
43376
43376
  *
43377
43377
  * The Cortex Code CLI documents `AGENTS.md` at the project root as its
43378
- * instruction file ("Support for AGENTS.md files and Agent Skills"). No nested
43379
- * rule directory and no user-scoped rule file are documented for the CLI, so
43380
- * rulesync's topic-based non-root rules are folded into the single root
43381
- * `AGENTS.md` by the RulesProcessor (`nonRoot` is `undefined`, mirroring the
43382
- * codexcli and warp targets) and the target is project-only.
43378
+ * instruction file. The RulesProcessor folds non-root rules into that file
43379
+ * (`nonRoot` is `undefined`, mirroring the codexcli and warp targets).
43380
+ * Global rules are unsupported: this adapter only handles the project file.
43381
+ * CoCo Desktop's `~/.snowflake/cortex/AGENTS.md` is outside that scope.
43383
43382
  *
43384
43383
  * @see https://docs.snowflake.com/en/user-guide/cortex-code/cortex-code
43385
43384
  */
@@ -69518,11 +69517,12 @@ function convertFromCortexcodeFormat(mcpServers) {
69518
69517
  /**
69519
69518
  * Snowflake Cortex Code MCP configuration.
69520
69519
  *
69521
- * Cortex Code reads `mcpServers` only from the single user-scoped file
69522
- * `~/.snowflake/cortex/mcp.json`; no project-scoped MCP location is
69523
- * documented, so the target is global-only. The file is created and edited by
69524
- * `cortex mcp add` as well, so `--delete` leaves it in place rather than
69525
- * removing a file the user did not create through rulesync.
69520
+ * This global-only adapter syncs the user-scoped `~/.snowflake/cortex/mcp.json`
69521
+ * and does not write CoCo Desktop's workspace files (`.snowflake/cortex/mcp.json`
69522
+ * and `.cortex/mcp.json`): those are documented only for CoCo Desktop, while the
69523
+ * Cortex Code CLI documents only the user-scoped file. The user-scoped file is
69524
+ * created and edited by `cortex mcp add` as well, so `--delete` leaves it in
69525
+ * place rather than removing a file the user did not create through rulesync.
69526
69526
  *
69527
69527
  * @see https://docs.snowflake.com/en/user-guide/cortex-code/extensibility#mcp-configuration
69528
69528
  */
@@ -80132,7 +80132,7 @@ function widenToPrefixGlob$1(pattern) {
80132
80132
  return pattern.endsWith("*") ? pattern : `${pattern}*`;
80133
80133
  }
80134
80134
  function widenForOverlap(pattern) {
80135
- if (/\{[^}]*,[^}]*\}/.test(pattern)) return "*";
80135
+ if (pattern.includes("{")) return "*";
80136
80136
  const widened = pattern.replaceAll("**/", "*").replaceAll("/**", "*");
80137
80137
  return widened.endsWith(" *") ? `${widened.slice(0, -2)}*` : widened;
80138
80138
  }
@@ -80348,17 +80348,40 @@ function normalizeUrlPattern(pattern) {
80348
80348
  /**
80349
80349
  * A URL pattern with its scheme stripped and only its host lowercased, for
80350
80350
  * writing it into a tool that matches paths case-sensitively (Copilot in VS
80351
- * Code). A scheme spelled as a glob (a `*` scheme, `http*`, or a bare double
80352
- * slash after a `*`) is stripped too.
80351
+ * Code). A scheme spelled as a glob (a `*` scheme, `http*://`, or a bare double
80352
+ * slash after a `*` or at the start) is stripped too. A double slash after
80353
+ * anything else without a `:` is part of the path, so `evil.com//x` keeps its
80354
+ * host `evil.com`.
80353
80355
  */
80354
80356
  function stripUrlSchemeKeepingPathCase(pattern) {
80355
- const withoutScheme = pattern.replace(/^[a-z0-9+.*-]*:?\/\//i, "");
80357
+ return keepingPathCase(pattern.replace(/^(?:[a-z0-9+.*-]*:|\*)?\/\//i, ""));
80358
+ }
80359
+ /**
80360
+ * The reading `stripUrlSchemeKeepingPathCase` gave before it required a `:`,
80361
+ * which took any `<word>//` prefix for a scheme (`evil.com//x` became `x`).
80362
+ * Overlap checks compare this reading too, so requiring the `:` only ever
80363
+ * adds overlaps and never lets through an allow that was withheld before.
80364
+ */
80365
+ function stripUrlSchemeLoosely(pattern) {
80366
+ return keepingPathCase(pattern.replace(/^[a-z0-9+.*-]*:?\/\//i, ""));
80367
+ }
80368
+ /**
80369
+ * Whether a URL pattern has a `<word>//` prefix without a `:` (`evil.com//x`),
80370
+ * which an earlier reading took for a scheme. Such a pattern names a host
80371
+ * other than the one that reading gave, so a tool should not be handed a
80372
+ * rewritten form of it.
80373
+ */
80374
+ function hasDoubleSlashWithoutScheme(pattern) {
80375
+ return stripUrlSchemeKeepingPathCase(pattern) !== stripUrlSchemeLoosely(pattern);
80376
+ }
80377
+ /** A scheme-less URL pattern with only its host lowercased. */
80378
+ function keepingPathCase(withoutScheme) {
80356
80379
  const slash = withoutScheme.indexOf("/");
80357
80380
  return slash === -1 ? withoutScheme.toLowerCase() : `${withoutScheme.slice(0, slash).toLowerCase()}${withoutScheme.slice(slash)}`;
80358
80381
  }
80359
- /** Split a lowercased, scheme-less URL or domain pattern into host, port and path. */
80360
- function splitUrlPattern(pattern) {
80361
- const normalized = stripUrlSchemeKeepingPathCase(pattern).toLowerCase();
80382
+ /** Split a scheme-less URL or domain pattern into lowercased host, port and path. */
80383
+ function splitUrlPattern(withoutScheme) {
80384
+ const normalized = withoutScheme.toLowerCase();
80362
80385
  const slash = normalized.indexOf("/");
80363
80386
  const hostPort = slash === -1 ? normalized : normalized.slice(0, slash);
80364
80387
  const path = slash === -1 ? void 0 : normalized.slice(slash);
@@ -80381,8 +80404,10 @@ function splitUrlPattern(pattern) {
80381
80404
  * tools read as every URL on it, on any port, and on its subdomains, so a
80382
80405
  * missing path or port matches every path or port, and each host also stands
80383
80406
  * for `*.<host>`. Because a glob can also match across those parts, the
80384
- * whole strings are compared as well, and an overlap from either counts. A
80385
- * pattern holding whitespace names no URL.
80407
+ * whole strings are compared as well, a pathless `right` also as `<host>/*`
80408
+ * (so an allowed `example.com` overlaps a restricted `*.pdf`), and an overlap
80409
+ * from any of them counts. A pattern holding whitespace names no URL. Callers
80410
+ * pass the restriction as `left` and the allow as `right`.
80386
80411
  */
80387
80412
  function urlPatternsOverlap(left, right) {
80388
80413
  if (left === right) return true;
@@ -80393,17 +80418,35 @@ function urlPatternsOverlap(left, right) {
80393
80418
  * The whole-string comparison a `*` restriction also gets, since a glob there
80394
80419
  * matches the whole URL (`*.pdf` names `https://example.com/doc.pdf`): the two
80395
80420
  * patterns compared as written and lowercased without a scheme, each widened
80396
- * by `createShadowingRestrictionsTest`.
80421
+ * by `createShadowingRestrictionsTest`. A pathless allow (`right`) is a host
80422
+ * and stands for every path on it, so against a restriction without a `/`
80423
+ * (`*.pdf`, `*admin`) it is also compared as `<host>/*`. A restriction with a
80424
+ * `/` names its host and path itself and is compared part by part instead, and
80425
+ * a pathless restriction is not widened: `.env/*` would reach every allow that
80426
+ * starts with a `*` (`*.github.com`), and `*://evil.com/*` against
80427
+ * `good.com/*` would match through the `*`.
80397
80428
  */
80398
80429
  function wholeStringsOverlap(left, right) {
80399
- return [[left, right], [normalizeUrlPattern(left), normalizeUrlPattern(right)]].some(([restriction = "", allow = ""]) => createShadowingRestrictionsTest([{
80430
+ const normalizedLeft = normalizeUrlPattern(left);
80431
+ const normalizedRight = normalizeUrlPattern(right);
80432
+ return [
80433
+ [left, right],
80434
+ [normalizedLeft, normalizedRight],
80435
+ ...normalizedLeft.includes("/") ? [] : [[normalizedLeft, withAnyPath(normalizedRight)]]
80436
+ ].some(([restriction = "", allow = ""]) => createShadowingRestrictionsTest([{
80400
80437
  pattern: restriction,
80401
80438
  fromAllToolsCategory: false
80402
80439
  }])(allow).length > 0);
80403
80440
  }
80441
+ /** A scheme-less pattern with `/*` appended when it has no path. */
80442
+ function withAnyPath(withoutScheme) {
80443
+ return stripUrlSchemeKeepingPathCase(withoutScheme).includes("/") ? withoutScheme : `${withoutScheme}/*`;
80444
+ }
80404
80445
  function urlPartsOverlap(left, right) {
80405
- const a = splitUrlPattern(left);
80406
- const b = splitUrlPattern(right);
80446
+ const readings = (pattern) => [.../* @__PURE__ */ new Set([stripUrlSchemeKeepingPathCase(pattern), stripUrlSchemeLoosely(pattern)])].map(splitUrlPattern);
80447
+ return readings(left).some((a) => readings(right).some((b) => urlPartsPairOverlap(a, b)));
80448
+ }
80449
+ function urlPartsPairOverlap(a, b) {
80407
80450
  const hosts = (host) => [host, `*.${host}`];
80408
80451
  if (!hosts(a.host).some((x) => hosts(b.host).some((y) => globsIntersect(x, y)))) return false;
80409
80452
  if (a.port !== void 0 && b.port !== void 0 && !globsIntersect(a.port, b.port)) return false;
@@ -80749,7 +80792,7 @@ const MATCH_ALL_PATH_GLOBS = /* @__PURE__ */ new Set([
80749
80792
  "**/*"
80750
80793
  ]);
80751
80794
  const DIRECTORY_CONTENTS_SUFFIX = /\/\*\*(?:\/\*)?$/;
80752
- const HOME_OR_VARIABLE_PATH = /^~(?:[A-Za-z_][\w.-]*)?(?:[/\\]|$)|^\$[A-Za-z_]|^%[A-Za-z_]\w*%|\$\{[A-Za-z_]/;
80795
+ const HOME_OR_VARIABLE_PATH = /^~(?:[A-Za-z_][\w.-]*)?(?:[/\\]|$)|^\$[A-Za-z_]|^%[A-Za-z_][\w() ]*%|\$\{[A-Za-z_]/;
80753
80796
  const LEADING_HOME = /^~(?:\/|$)/;
80754
80797
  /**
80755
80798
  * The home directory as an Antigravity path: forward slashes, no trailing
@@ -80763,8 +80806,8 @@ function toAntigravityHomePath(homeDirectory) {
80763
80806
  * directory. agy 1.5.1 matches `~` literally, so a `~/...` rule would never
80764
80807
  * apply (rulesync#3324). Only a file the user's own home holds, such as the
80765
80808
  * global Antigravity CLI settings, may carry a machine-specific path, so the
80766
- * caller passes `homeDirectory` only then. `$HOME`, `${HOME}`, `%VAR%` and
80767
- * `~user/` are left as written and still warned about.
80809
+ * caller passes `homeDirectory` only then. `$HOME`, `${HOME}`, `%VAR%`, `~\`,
80810
+ * `~user` and `~user/` are left as written and still warned about.
80768
80811
  */
80769
80812
  function expandLeadingHome(target, homeDirectory) {
80770
80813
  if (homeDirectory === void 0 || !LEADING_HOME.test(target)) return target;
@@ -88178,7 +88221,7 @@ function honorCopilotAllToolsRestrictions({ permission, category, logger }) {
88178
88221
  key: "*"
88179
88222
  }) ?? {};
88180
88223
  const isWritable = restatesAsCategoryRule();
88181
- const restateAs = (params) => params.pattern === "*" || isWritable(params);
88224
+ const restateAs = (params) => params.pattern === "*" || isWritable(params) && !(params.category === "webfetch" && hasDoubleSlashWithoutScheme(params.pattern));
88182
88225
  const writable = {};
88183
88226
  const notWritable = {};
88184
88227
  for (const [pattern, action] of Object.entries(allToolsRules)) {
@@ -43353,11 +43353,10 @@ var CopilotcliRule = class CopilotcliRule extends CopilotRule {
43353
43353
  * Rule generator for Snowflake Cortex Code.
43354
43354
  *
43355
43355
  * The Cortex Code CLI documents `AGENTS.md` at the project root as its
43356
- * instruction file ("Support for AGENTS.md files and Agent Skills"). No nested
43357
- * rule directory and no user-scoped rule file are documented for the CLI, so
43358
- * rulesync's topic-based non-root rules are folded into the single root
43359
- * `AGENTS.md` by the RulesProcessor (`nonRoot` is `undefined`, mirroring the
43360
- * codexcli and warp targets) and the target is project-only.
43356
+ * instruction file. The RulesProcessor folds non-root rules into that file
43357
+ * (`nonRoot` is `undefined`, mirroring the codexcli and warp targets).
43358
+ * Global rules are unsupported: this adapter only handles the project file.
43359
+ * CoCo Desktop's `~/.snowflake/cortex/AGENTS.md` is outside that scope.
43361
43360
  *
43362
43361
  * @see https://docs.snowflake.com/en/user-guide/cortex-code/cortex-code
43363
43362
  */
@@ -69496,11 +69495,12 @@ function convertFromCortexcodeFormat(mcpServers) {
69496
69495
  /**
69497
69496
  * Snowflake Cortex Code MCP configuration.
69498
69497
  *
69499
- * Cortex Code reads `mcpServers` only from the single user-scoped file
69500
- * `~/.snowflake/cortex/mcp.json`; no project-scoped MCP location is
69501
- * documented, so the target is global-only. The file is created and edited by
69502
- * `cortex mcp add` as well, so `--delete` leaves it in place rather than
69503
- * removing a file the user did not create through rulesync.
69498
+ * This global-only adapter syncs the user-scoped `~/.snowflake/cortex/mcp.json`
69499
+ * and does not write CoCo Desktop's workspace files (`.snowflake/cortex/mcp.json`
69500
+ * and `.cortex/mcp.json`): those are documented only for CoCo Desktop, while the
69501
+ * Cortex Code CLI documents only the user-scoped file. The user-scoped file is
69502
+ * created and edited by `cortex mcp add` as well, so `--delete` leaves it in
69503
+ * place rather than removing a file the user did not create through rulesync.
69504
69504
  *
69505
69505
  * @see https://docs.snowflake.com/en/user-guide/cortex-code/extensibility#mcp-configuration
69506
69506
  */
@@ -80110,7 +80110,7 @@ function widenToPrefixGlob$1(pattern) {
80110
80110
  return pattern.endsWith("*") ? pattern : `${pattern}*`;
80111
80111
  }
80112
80112
  function widenForOverlap(pattern) {
80113
- if (/\{[^}]*,[^}]*\}/.test(pattern)) return "*";
80113
+ if (pattern.includes("{")) return "*";
80114
80114
  const widened = pattern.replaceAll("**/", "*").replaceAll("/**", "*");
80115
80115
  return widened.endsWith(" *") ? `${widened.slice(0, -2)}*` : widened;
80116
80116
  }
@@ -80326,17 +80326,40 @@ function normalizeUrlPattern(pattern) {
80326
80326
  /**
80327
80327
  * A URL pattern with its scheme stripped and only its host lowercased, for
80328
80328
  * writing it into a tool that matches paths case-sensitively (Copilot in VS
80329
- * Code). A scheme spelled as a glob (a `*` scheme, `http*`, or a bare double
80330
- * slash after a `*`) is stripped too.
80329
+ * Code). A scheme spelled as a glob (a `*` scheme, `http*://`, or a bare double
80330
+ * slash after a `*` or at the start) is stripped too. A double slash after
80331
+ * anything else without a `:` is part of the path, so `evil.com//x` keeps its
80332
+ * host `evil.com`.
80331
80333
  */
80332
80334
  function stripUrlSchemeKeepingPathCase(pattern) {
80333
- const withoutScheme = pattern.replace(/^[a-z0-9+.*-]*:?\/\//i, "");
80335
+ return keepingPathCase(pattern.replace(/^(?:[a-z0-9+.*-]*:|\*)?\/\//i, ""));
80336
+ }
80337
+ /**
80338
+ * The reading `stripUrlSchemeKeepingPathCase` gave before it required a `:`,
80339
+ * which took any `<word>//` prefix for a scheme (`evil.com//x` became `x`).
80340
+ * Overlap checks compare this reading too, so requiring the `:` only ever
80341
+ * adds overlaps and never lets through an allow that was withheld before.
80342
+ */
80343
+ function stripUrlSchemeLoosely(pattern) {
80344
+ return keepingPathCase(pattern.replace(/^[a-z0-9+.*-]*:?\/\//i, ""));
80345
+ }
80346
+ /**
80347
+ * Whether a URL pattern has a `<word>//` prefix without a `:` (`evil.com//x`),
80348
+ * which an earlier reading took for a scheme. Such a pattern names a host
80349
+ * other than the one that reading gave, so a tool should not be handed a
80350
+ * rewritten form of it.
80351
+ */
80352
+ function hasDoubleSlashWithoutScheme(pattern) {
80353
+ return stripUrlSchemeKeepingPathCase(pattern) !== stripUrlSchemeLoosely(pattern);
80354
+ }
80355
+ /** A scheme-less URL pattern with only its host lowercased. */
80356
+ function keepingPathCase(withoutScheme) {
80334
80357
  const slash = withoutScheme.indexOf("/");
80335
80358
  return slash === -1 ? withoutScheme.toLowerCase() : `${withoutScheme.slice(0, slash).toLowerCase()}${withoutScheme.slice(slash)}`;
80336
80359
  }
80337
- /** Split a lowercased, scheme-less URL or domain pattern into host, port and path. */
80338
- function splitUrlPattern(pattern) {
80339
- const normalized = stripUrlSchemeKeepingPathCase(pattern).toLowerCase();
80360
+ /** Split a scheme-less URL or domain pattern into lowercased host, port and path. */
80361
+ function splitUrlPattern(withoutScheme) {
80362
+ const normalized = withoutScheme.toLowerCase();
80340
80363
  const slash = normalized.indexOf("/");
80341
80364
  const hostPort = slash === -1 ? normalized : normalized.slice(0, slash);
80342
80365
  const path = slash === -1 ? void 0 : normalized.slice(slash);
@@ -80359,8 +80382,10 @@ function splitUrlPattern(pattern) {
80359
80382
  * tools read as every URL on it, on any port, and on its subdomains, so a
80360
80383
  * missing path or port matches every path or port, and each host also stands
80361
80384
  * for `*.<host>`. Because a glob can also match across those parts, the
80362
- * whole strings are compared as well, and an overlap from either counts. A
80363
- * pattern holding whitespace names no URL.
80385
+ * whole strings are compared as well, a pathless `right` also as `<host>/*`
80386
+ * (so an allowed `example.com` overlaps a restricted `*.pdf`), and an overlap
80387
+ * from any of them counts. A pattern holding whitespace names no URL. Callers
80388
+ * pass the restriction as `left` and the allow as `right`.
80364
80389
  */
80365
80390
  function urlPatternsOverlap(left, right) {
80366
80391
  if (left === right) return true;
@@ -80371,17 +80396,35 @@ function urlPatternsOverlap(left, right) {
80371
80396
  * The whole-string comparison a `*` restriction also gets, since a glob there
80372
80397
  * matches the whole URL (`*.pdf` names `https://example.com/doc.pdf`): the two
80373
80398
  * patterns compared as written and lowercased without a scheme, each widened
80374
- * by `createShadowingRestrictionsTest`.
80399
+ * by `createShadowingRestrictionsTest`. A pathless allow (`right`) is a host
80400
+ * and stands for every path on it, so against a restriction without a `/`
80401
+ * (`*.pdf`, `*admin`) it is also compared as `<host>/*`. A restriction with a
80402
+ * `/` names its host and path itself and is compared part by part instead, and
80403
+ * a pathless restriction is not widened: `.env/*` would reach every allow that
80404
+ * starts with a `*` (`*.github.com`), and `*://evil.com/*` against
80405
+ * `good.com/*` would match through the `*`.
80375
80406
  */
80376
80407
  function wholeStringsOverlap(left, right) {
80377
- return [[left, right], [normalizeUrlPattern(left), normalizeUrlPattern(right)]].some(([restriction = "", allow = ""]) => createShadowingRestrictionsTest([{
80408
+ const normalizedLeft = normalizeUrlPattern(left);
80409
+ const normalizedRight = normalizeUrlPattern(right);
80410
+ return [
80411
+ [left, right],
80412
+ [normalizedLeft, normalizedRight],
80413
+ ...normalizedLeft.includes("/") ? [] : [[normalizedLeft, withAnyPath(normalizedRight)]]
80414
+ ].some(([restriction = "", allow = ""]) => createShadowingRestrictionsTest([{
80378
80415
  pattern: restriction,
80379
80416
  fromAllToolsCategory: false
80380
80417
  }])(allow).length > 0);
80381
80418
  }
80419
+ /** A scheme-less pattern with `/*` appended when it has no path. */
80420
+ function withAnyPath(withoutScheme) {
80421
+ return stripUrlSchemeKeepingPathCase(withoutScheme).includes("/") ? withoutScheme : `${withoutScheme}/*`;
80422
+ }
80382
80423
  function urlPartsOverlap(left, right) {
80383
- const a = splitUrlPattern(left);
80384
- const b = splitUrlPattern(right);
80424
+ const readings = (pattern) => [.../* @__PURE__ */ new Set([stripUrlSchemeKeepingPathCase(pattern), stripUrlSchemeLoosely(pattern)])].map(splitUrlPattern);
80425
+ return readings(left).some((a) => readings(right).some((b) => urlPartsPairOverlap(a, b)));
80426
+ }
80427
+ function urlPartsPairOverlap(a, b) {
80385
80428
  const hosts = (host) => [host, `*.${host}`];
80386
80429
  if (!hosts(a.host).some((x) => hosts(b.host).some((y) => globsIntersect(x, y)))) return false;
80387
80430
  if (a.port !== void 0 && b.port !== void 0 && !globsIntersect(a.port, b.port)) return false;
@@ -80727,7 +80770,7 @@ const MATCH_ALL_PATH_GLOBS = /* @__PURE__ */ new Set([
80727
80770
  "**/*"
80728
80771
  ]);
80729
80772
  const DIRECTORY_CONTENTS_SUFFIX = /\/\*\*(?:\/\*)?$/;
80730
- const HOME_OR_VARIABLE_PATH = /^~(?:[A-Za-z_][\w.-]*)?(?:[/\\]|$)|^\$[A-Za-z_]|^%[A-Za-z_]\w*%|\$\{[A-Za-z_]/;
80773
+ const HOME_OR_VARIABLE_PATH = /^~(?:[A-Za-z_][\w.-]*)?(?:[/\\]|$)|^\$[A-Za-z_]|^%[A-Za-z_][\w() ]*%|\$\{[A-Za-z_]/;
80731
80774
  const LEADING_HOME = /^~(?:\/|$)/;
80732
80775
  /**
80733
80776
  * The home directory as an Antigravity path: forward slashes, no trailing
@@ -80741,8 +80784,8 @@ function toAntigravityHomePath(homeDirectory) {
80741
80784
  * directory. agy 1.5.1 matches `~` literally, so a `~/...` rule would never
80742
80785
  * apply (rulesync#3324). Only a file the user's own home holds, such as the
80743
80786
  * global Antigravity CLI settings, may carry a machine-specific path, so the
80744
- * caller passes `homeDirectory` only then. `$HOME`, `${HOME}`, `%VAR%` and
80745
- * `~user/` are left as written and still warned about.
80787
+ * caller passes `homeDirectory` only then. `$HOME`, `${HOME}`, `%VAR%`, `~\`,
80788
+ * `~user` and `~user/` are left as written and still warned about.
80746
80789
  */
80747
80790
  function expandLeadingHome(target, homeDirectory) {
80748
80791
  if (homeDirectory === void 0 || !LEADING_HOME.test(target)) return target;
@@ -88156,7 +88199,7 @@ function honorCopilotAllToolsRestrictions({ permission, category, logger }) {
88156
88199
  key: "*"
88157
88200
  }) ?? {};
88158
88201
  const isWritable = restatesAsCategoryRule();
88159
- const restateAs = (params) => params.pattern === "*" || isWritable(params);
88202
+ const restateAs = (params) => params.pattern === "*" || isWritable(params) && !(params.category === "webfetch" && hasDoubleSlashWithoutScheme(params.pattern));
88160
88203
  const writable = {};
88161
88204
  const notWritable = {};
88162
88205
  for (const [pattern, action] of Object.entries(allToolsRules)) {
@@ -105930,4 +105973,4 @@ const CHECKS_IMPORT_STRATEGY = {
105930
105973
  };
105931
105974
  export { RulesyncRule as $, RULESYNC_RULES_RELATIVE_DIR_PATH as $n, getFileSizeAndExecutableBit as $t, CODEBUDDY_LOCAL_RULE_FILE_NAME as A, ToolTargetSchema as An, fallbackLogger as At, CLAUDECODE_LOCAL_RULE_FILE_NAME as B, RULESYNC_CONFIG_RELATIVE_FILE_PATH as Bn, assertDirectoryIfExists as Bt, LETTACODE_DIR as C, toPosixPath as Cn, SourceEntrySchema as Ct, COMMANDCODE_DIR as D, ALL_TOOL_TARGETS as Dn, ConsoleLogger as Dt, FACTORYDROID_SETTINGS_LOCAL_FILE_NAME as E, mapWithConcurrency as En, findControlCharacter as Et, sweepRefusalReason as F, FEATURE_SOURCE_TREE_ENTRIES as Fn, CLIError as Ft, toInstructionBudgetFile as G, RULESYNC_IGNORE_RELATIVE_FILE_PATH as Gn, assertWritablePathInsideRoot as Gt, CLAUDECODE_SETTINGS_LOCAL_FILE_NAME as H, RULESYNC_CURATED_RULES_RELATIVE_DIR_PATH as Hn, assertNoSymlinkBelowRoot as Ht, CODEXCLI_BASH_RULES_FILE_NAME as I, MAX_FILE_SIZE as In, ErrorCodes as It, getLocalSkillDirNames as J, RULESYNC_MCP_SCHEMA_URL as Jn, directoryExists as Jt, classifyRemoteName as K, RULESYNC_LOCAL_CONFIG_RELATIVE_FILE_PATH as Kn, checkPathTraversal as Kt, CODEXCLI_DIR as L, RULESYNC_AIIGNORE_RELATIVE_FILE_PATH as Ln, parseJsonc as Lt, AUGMENTCODE_SETTINGS_LOCAL_FILE_NAME as M, ALL_FEATURES_WITH_WILDCARD as Mn, withFallbackLoggerTarget as Mt, caseFoldIdentity as N, DEPRECATED_FEATURE_REPLACEMENTS as Nn, resetRunWarningState as Nt, COMMANDCODE_SETTINGS_LOCAL_FILE_NAME as O, ALL_TOOL_TARGETS_WITH_WILDCARD as On, JsonLogger as Ot, groupSpellingsByCaseFoldedIdentity as P, CURATED_RULES_FEATURE_SUBDIR as Pn, withWarnOnceScope as Pt, RulesyncSkillFrontmatterSchema as Q, RULESYNC_RELATIVE_DIR_PATH as Qn, findFilesByGlobs as Qt, CLAUDECODE_AGENT_MEMORY_LOCAL_DIR_NAME as R, RULESYNC_CHECKS_RELATIVE_DIR_PATH as Rn, PathOutsideRootError as Rt, QWENCODE_LOCAL_RULE_FILE_NAME as S, splitPathSegments as Sn, GITIGNORE_DESTINATION_KEY as St, FACTORYDROID_DIR as T, writeFileContent as Tn, getSourceTransport as Tt, CLAUDECODE_SKILLS_DIR_PATH as U, RULESYNC_CURATED_SKILLS_RELATIVE_DIR_PATH as Un, assertPathResolvesInsideRoot as Ut, CLAUDECODE_MEMORIES_DIR_NAME as V, RULESYNC_CONFIG_SCHEMA_URL as Vn, assertLandingOutsideVcsMetadata as Vt, findProjectInstructionBudgetFindings as W, RULESYNC_HOOKS_RELATIVE_FILE_PATH as Wn, assertTreeContainsNoSymlinks as Wt, RulesyncSubagentFrontmatterSchema as X, RULESYNC_PERMISSIONS_RELATIVE_FILE_PATH as Xn, fileExists as Xt, RulesyncSubagent as Y, RULESYNC_NPM_SOURCES_LOCK_RELATIVE_FILE_PATH as Yn, ensureDir as Yt, RulesyncSkill as Z, RULESYNC_PERMISSIONS_SCHEMA_URL as Zn, fileExistsStrict as Zt, SkillsProcessor as _, removeFileWithoutFollowingSymlinks as _n, mergeInputRootConfigs as _t, convertFromTool as a, listDirectoryEntryNames as an, formatMegabytes as ar, getRulesyncSourceCandidates as at, REASONIX_LOCAL_RULE_FILE_NAME as b, resolvedRelativePath as bn, CONFLICTING_TARGET_PAIRS as bt, ELLIPSIS_WIDTH as c, normalizePosixDirPath as cn, hasEnclosingMarkOutsideKeycap as cr, RulesyncCommandFrontmatterSchema as ct, McpProcessor as d, readFileContent as dn, stripControlCharactersKeepingLineFeeds as dr, stringifyFrontmatter as dt, getHomeDirectory as en, RULESYNC_SKILLS_RELATIVE_DIR_PATH as er, RulesyncRuleFrontmatterSchema as et, IgnoreProcessor as f, readFileContentOrNull as fn, stripControlCharactersKeepingLineFeedsAndTabs as fr, loadYaml as ft, SubagentsProcessor as g, removeFileStrict as gn, ConfigResolver as gt, RulesProcessor as h, removeFile as hn, SKILL_FILE_NAME as ht, inspectInputRoots as i, isSymlink as in, RULESYNC_XDG_CONFIG_HOME_DEFAULT_DIR_NAME as ir, RulesyncHooks as it, AUGMENTCODE_DIR as j, ALL_FEATURES as jn, warnOnConflictingFlags as jt, CODEBUDDY_DIR as k, PACKAGING_TOOL_TARGETS as kn, WarningCollectingLogger as kt, displayWidthOf as l, pathEscapesRoot as ln, quoteForLog as lr, RulesyncCheck as lt, ChecksProcessor as m, removeDirectoryStrict as mn, SHARED_USER_MANAGED_CONFIG_PATHS as mt, formatSourceLoadFailure as n, isFileSystemError as nn, RULESYNC_SUBAGENTS_RELATIVE_DIR_PATH as nr, RulesyncMcp as nt, getProcessorRegistryEntry as o, listFilePathsRecursively as on, formatError as or, resolveRulesyncSourceWritePath as ot, HooksProcessor as p, removeDirectory as pn, stripHiddenCharacters as pr, isRecord as pt, hasWindowsFoldableName as q, RULESYNC_MCP_RELATIVE_FILE_PATH as qn, createTempDirectory as qt, generate as r, isRootDirPath as rn, RULESYNC_USER_CONFIG_DIR_NAME as rr, RulesyncIgnore as rt, parseCommaSeparatedList as s, listSubdirectoryNames as sn, truncateText as sr, RulesyncCommand as st, importFromTool as t, isFileNotFoundError as tn, RULESYNC_SOURCES_LOCK_RELATIVE_FILE_PATH as tr, RulesyncPermissions as tt, shortenToWidth as u, posixRelativePathEscapesRoot as un, stripControlCharacters as ur, RulesyncCheckFrontmatterSchema as ut, CRUSH_LOCAL_RULE_FILE_NAME as v, removeTempDirectory as vn, parseConfigFileContent as vt, LETTACODE_SETTINGS_LOCAL_FILE_NAME as w, writeFileBuffer as wn, assertTargetsFeaturesExclusive as wt, QWENCODE_DIR as x, runWithDirectoryRollback as xn, ConfigFileSchema as xt, CommandsProcessor as y, resolvePath as yn, resolveEffectiveInputRoots as yt, CLAUDECODE_DIR as z, RULESYNC_COMMANDS_RELATIVE_DIR_PATH as zn, applyFileMode as zt };
105932
105975
 
105933
- //# sourceMappingURL=import-UXidZnLu.js.map
105976
+ //# sourceMappingURL=import-ks5bN8zb.js.map