@savvy-web/silk 3.0.5 → 3.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.
@@ -4225,7 +4225,7 @@ declare class UnsatisfiableConstraintError extends UnsatisfiableConstraintError_
4225
4225
  get message(): string;
4226
4226
  }
4227
4227
  //#endregion
4228
- //#region ../../node_modules/.pnpm/@effected+npm@0.2.3_@effected+semver@0.2.0_effect@4.0.0-beta.99__effect@4.0.0-beta.99/node_modules/@effected/npm/index.d.ts
4228
+ //#region ../../node_modules/.pnpm/@effected+npm@0.3.0_@effected+semver@0.2.0_effect@4.0.0-beta.99__effect@4.0.0-beta.99/node_modules/@effected/npm/index.d.ts
4229
4229
  //#region src/CatalogAssemblyError.d.ts
4230
4230
  declare const CatalogAssemblyError_base: Schema.Class<CatalogAssemblyError, Schema.TaggedStruct<"CatalogAssemblyError", {
4231
4231
  /**
@@ -4497,6 +4497,135 @@ declare class InvalidIntegrityHashError extends InvalidIntegrityHashError_base {
4497
4497
  */
4498
4498
  type IntegrityHashBrand = string & Brand.Brand<"IntegrityHash">;
4499
4499
  //#endregion
4500
+ //#region src/ReleaseAgeGate.d.ts
4501
+ /**
4502
+ * A source's partial contribution to a {@link ReleaseAgeGate}: the effective
4503
+ * gate is assembled from more than one place (inline `pnpm-workspace.yaml`
4504
+ * keys, replayed `updateConfig` hooks, `pnpm config get` output), and each
4505
+ * source may set the age, the exclude list, both, or neither. Absent fields
4506
+ * contribute nothing to the combination.
4507
+ *
4508
+ * Deliberately permissive: unlike {@link ReleaseAgeGate} it does not constrain
4509
+ * `ageMinutes` to be non-negative, because the raw values arrive from arbitrary
4510
+ * config sources and {@link ReleaseAgeGate.combine} is the single authority
4511
+ * that clamps them.
4512
+ *
4513
+ * @public
4514
+ */
4515
+ declare const PartialReleaseAgeGate: Schema.Struct<{
4516
+ /** Minutes a release must age; absent means this source sets no age. */
4517
+ readonly ageMinutes: Schema.optionalKey<Schema.Number>;
4518
+ /** Exempt package-name patterns; absent means this source adds no exemptions. */
4519
+ readonly exclude: Schema.optionalKey<Schema.$Array<Schema.String>>;
4520
+ }>;
4521
+ /**
4522
+ * One source's partial contribution to a release-age gate. All fields optional.
4523
+ *
4524
+ * @public
4525
+ */
4526
+ type PartialReleaseAgeGate = typeof PartialReleaseAgeGate.Type;
4527
+ declare const ReleaseAgeGate_base: Schema.Class<ReleaseAgeGate, Schema.Struct<{
4528
+ /** Minutes a published version must age before it is eligible (non-negative, finite). */
4529
+ readonly ageMinutes: Schema.Number;
4530
+ /** Package-name patterns exempt from the gate (exact names or `*`-globs). */
4531
+ readonly exclude: Schema.$Array<Schema.String>;
4532
+ }>, {}>;
4533
+ /**
4534
+ * pnpm's publish-time release-age gate: the number of minutes a published
4535
+ * version must age before it is eligible, and the set of package-name patterns
4536
+ * exempt from the gate. Mirrors pnpm's `minimumReleaseAge` /
4537
+ * `minimumReleaseAgeExclude` config so a resolver can drop too-young candidate
4538
+ * versions before picking, avoiding `ERR_PNPM_NO_MATURE_MATCHING_VERSION`.
4539
+ *
4540
+ * `ageMinutes` is constrained non-negative and finite; a `ReleaseAgeGate` with
4541
+ * `ageMinutes <= 0` is an inert gate that filters nothing. Assemble a gate from
4542
+ * multiple config sources with {@link ReleaseAgeGate.combine}, and apply it to
4543
+ * a package's candidate versions with {@link ReleaseAgeGate.filterVersions}.
4544
+ *
4545
+ * @example
4546
+ * ```ts
4547
+ * import { ReleaseAgeGate } from "@effected/npm";
4548
+ *
4549
+ * const gate = ReleaseAgeGate.combine(
4550
+ * { ageMinutes: 1440 },
4551
+ * { exclude: ["@my-scope/*"] },
4552
+ * );
4553
+ * // gate.ageMinutes === 1440, gate.exclude === ["@my-scope/*"]
4554
+ *
4555
+ * const eligible = gate.filterVersions(
4556
+ * ["1.0.0", "1.0.1"],
4557
+ * { "1.0.0": "2020-01-01T00:00:00Z", "1.0.1": "2026-07-21T00:00:00Z" },
4558
+ * "prettier",
4559
+ * Date.now(),
4560
+ * );
4561
+ * ```
4562
+ *
4563
+ * @public
4564
+ */
4565
+ declare class ReleaseAgeGate extends ReleaseAgeGate_base {
4566
+ /**
4567
+ * Combine partial contributions from multiple sources into one effective
4568
+ * gate: **strictest age wins** (the maximum of the contributed ages,
4569
+ * clamped to be non-negative) and the exclude sets **union** (deduplicated,
4570
+ * insertion order preserved). A contribution's absent field adds nothing; a
4571
+ * negative or non-finite contributed age is ignored by the clamp. With no
4572
+ * contributions (or only empty ones) the result is the inert zero gate
4573
+ * (`ageMinutes: 0`, `exclude: []`).
4574
+ *
4575
+ * `combine` is total — it never throws on a fractional, negative, or
4576
+ * non-finite contribution — which is why {@link (PartialReleaseAgeGate:variable)}
4577
+ * does not constrain its `ageMinutes` and this method owns the clamp.
4578
+ *
4579
+ * @param contributions - the partial gates to merge, one per source.
4580
+ */
4581
+ static combine(...contributions: readonly PartialReleaseAgeGate[]): ReleaseAgeGate;
4582
+ /**
4583
+ * Whether a package name matches any of `patterns`, using pnpm's
4584
+ * `@pnpm/matcher` semantics: an exact-name match, or a `*`-glob where `*`
4585
+ * matches any run of characters **including `/`** — so a bare `*` matches a
4586
+ * scoped name like `@scope/pkg`, and `@scope/*` matches every package in a
4587
+ * scope.
4588
+ *
4589
+ * @remarks
4590
+ * This is deliberately **NOT** `@effected/glob`'s minimatch dialect, in
4591
+ * which `*` refuses to cross `/` (there `*` matches `pkg` but not
4592
+ * `@scope/pkg`, and you would need `**`). pnpm treats the package name as a
4593
+ * flat string, so this matcher does too. Do not "fix" this to route through
4594
+ * `@effected/glob`: it would silently change which packages a gate exempts
4595
+ * and diverge from pnpm's own behavior.
4596
+ *
4597
+ * @param name - the package name to test.
4598
+ * @param patterns - the exclude patterns (exact names or `*`-globs).
4599
+ */
4600
+ static matchesExclude(name: string, patterns: readonly string[]): boolean;
4601
+ /**
4602
+ * Whether this gate exempts the given package name from the release-age
4603
+ * check — `ReleaseAgeGate.matchesExclude(name, this.exclude)`.
4604
+ *
4605
+ * @param name - the package name to test.
4606
+ */
4607
+ isExcluded(name: string): boolean;
4608
+ /**
4609
+ * Filter a package's candidate versions to those old enough to pass the
4610
+ * gate, given each version's publish timestamp and a caller-supplied `now`.
4611
+ *
4612
+ * A version is kept when it has a parseable publish timestamp at or before
4613
+ * the cutoff (`now - ageMinutes * 60000`). A version with a **missing or
4614
+ * unparseable** timestamp in `times` is **dropped** — matching pnpm's strict
4615
+ * posture: a version whose age cannot be established is treated as too young.
4616
+ * The clock is the caller's; this method reads no wall clock.
4617
+ *
4618
+ * Returns all versions unchanged (a no-op) when the gate is inert
4619
+ * (`ageMinutes <= 0`) or the package name is excluded.
4620
+ *
4621
+ * @param versions - the candidate version strings.
4622
+ * @param times - a map from version string to its ISO-8601 publish date.
4623
+ * @param name - the package name (checked against the gate's `exclude` list).
4624
+ * @param now - the current time in epoch milliseconds (the caller's clock).
4625
+ */
4626
+ filterVersions(versions: readonly string[], times: Readonly<Record<string, string>>, name: string, now: number): readonly string[];
4627
+ }
4628
+ //#endregion
4500
4629
  //#region ../../node_modules/.pnpm/@effected+glob@0.2.0_effect@4.0.0-beta.99/node_modules/@effected/glob/index.d.ts
4501
4630
  //#region src/GlobPattern.d.ts
4502
4631
  declare const GlobPatternError_base: Schema.Class<GlobPatternError, Schema.TaggedStruct<"GlobPatternError", {
@@ -4662,7 +4791,7 @@ declare class GlobPattern extends GlobPattern_base {
4662
4791
  static readonly FromString: Schema.Codec<GlobPattern, string>;
4663
4792
  }
4664
4793
  //#endregion
4665
- //#region ../../node_modules/.pnpm/@effected+lockfiles@0.1.8_@effected+jsonc@0.5.0_effect@4.0.0-beta.99__@effected+npm@0.2_d9e647ebf030778b1166690cbf4c6aa9/node_modules/@effected/lockfiles/index.d.ts
4794
+ //#region ../../node_modules/.pnpm/@effected+lockfiles@0.1.9_@effected+jsonc@0.5.0_effect@4.0.0-beta.99__@effected+npm@0.3_d470055e7ca4b6a23d413cae592e2835/node_modules/@effected/lockfiles/index.d.ts
4666
4795
  //#region src/BunExtension.d.ts
4667
4796
  declare const BunExtension_base: Schema.Class<BunExtension, Schema.Struct<{
4668
4797
  readonly _tag: Schema.tag<"bun">;
@@ -5082,7 +5211,7 @@ declare class LockfileIntegrity extends LockfileIntegrity_base {
5082
5211
  static compare(lockfile: Lockfile, manifests: ReadonlyArray<WorkspaceManifest>): LockfileIntegrity;
5083
5212
  }
5084
5213
  //#endregion
5085
- //#region ../../node_modules/.pnpm/@effected+package-json@0.4.1_effect@4.0.0-beta.99/node_modules/@effected/package-json/index.d.ts
5214
+ //#region ../../node_modules/.pnpm/@effected+package-json@0.4.2_effect@4.0.0-beta.99/node_modules/@effected/package-json/index.d.ts
5086
5215
  //#region src/Dependency.d.ts
5087
5216
  declare const Dependency_base: Schema.Class<Dependency, Schema.Struct<{
5088
5217
  /** The package name. */
@@ -5530,7 +5659,7 @@ declare class Package extends Package_base {
5530
5659
  toJsonString(options?: PackageFormatOptions): string;
5531
5660
  }
5532
5661
  //#endregion
5533
- //#region ../../node_modules/.pnpm/@effected+workspaces@0.5.2_@effected+jsonc@0.5.0_effect@4.0.0-beta.99__effect@4.0.0-beta.99/node_modules/@effected/workspaces/index.d.ts
5662
+ //#region ../../node_modules/.pnpm/@effected+workspaces@0.6.0_@effected+jsonc@0.5.0_effect@4.0.0-beta.99__effect@4.0.0-beta.99/node_modules/@effected/workspaces/index.d.ts
5534
5663
  //#region src/WorkspacePackage.d.ts
5535
5664
  declare const PublishConfig_base: Schema.Class<PublishConfig, Schema.Struct<{
5536
5665
  /** Scoped-package visibility. Its presence overrides `private`. */
@@ -6195,22 +6324,56 @@ declare class WorkspaceDiscovery extends WorkspaceDiscovery_base {
6195
6324
  }
6196
6325
  //#endregion
6197
6326
  //#region src/ConfigDependencyHooks.d.ts
6327
+ /**
6328
+ * The result of replaying a workspace's `configDependencies` hooks: the catalogs
6329
+ * the hooks yield, and the release-age gate contribution they leave on the
6330
+ * config (pnpm's `minimumReleaseAge` / `minimumReleaseAgeExclude`).
6331
+ *
6332
+ * @remarks
6333
+ * `releaseAge` is a `PartialReleaseAgeGate` — the age, the exclude list,
6334
+ * both, or neither, depending on what the replayed hooks set. It is deliberately
6335
+ * a *partial* contribution: a consumer folds it into an effective gate with
6336
+ * `ReleaseAgeGate.combine` alongside inline `pnpm-workspace.yaml` values. Hooks
6337
+ * that set no release-age keys contribute an empty gate (`{}`).
6338
+ *
6339
+ * @public
6340
+ */
6341
+ interface HookInjection {
6342
+ /** The catalogs the replayed hooks yield, as `catalog name → dependency → range`. */
6343
+ readonly catalogs: Readonly<Record<string, Readonly<Record<string, string>>>>;
6344
+ /** The release-age gate contribution the replayed hooks leave on the config. */
6345
+ readonly releaseAge: PartialReleaseAgeGate;
6346
+ }
6198
6347
  /**
6199
6348
  * The {@link ConfigDependencyHooks} service shape.
6200
6349
  *
6201
6350
  * @remarks
6202
6351
  * `inject` is given the workspace root, the manifest's `configDependencies`
6203
6352
  * (name → version+integrity), and the inline-catalog seed as a plain
6204
- * `catalog name → dependency name → range` record, and produces the catalogs the
6205
- * replayed hooks yield. The default (no-op) implementation returns the seed
6206
- * unchanged and loads nothing.
6353
+ * `catalog name → dependency name → range` record, and produces a
6354
+ * {@link HookInjection}: the catalogs the replayed hooks yield **and** the
6355
+ * release-age gate contribution they leave on the config. The default (no-op)
6356
+ * implementation returns the seed catalogs unchanged, contributes an empty
6357
+ * release-age gate, and loads nothing.
6207
6358
  *
6208
6359
  * @public
6209
6360
  */
6210
6361
  interface ConfigDependencyHooksShape {
6211
6362
  /**
6212
6363
  * Replay each config dependency's `updateConfig` hook over `seed`, in
6213
- * declaration order, and return the resulting catalogs.
6364
+ * declaration order, and return both the resulting catalogs and the
6365
+ * release-age gate contribution the hooks leave behind.
6366
+ *
6367
+ * @remarks
6368
+ * The hooks are replayed once over a single threaded config object, exactly
6369
+ * as pnpm does — so catalogs and the release-age keys
6370
+ * (`minimumReleaseAge` / `minimumReleaseAgeExclude`) are both read off that
6371
+ * one final object, and the config-dependency code executes only once. When
6372
+ * two hooks both set a release-age key the **later hook wins** (it rewrites
6373
+ * the threaded value); a hook that returns a malformed value for a key leaves
6374
+ * the prior threaded value in place (tolerant threading, matching the catalog
6375
+ * slice). A hook failing to load or replay fails typed with a
6376
+ * `hooks`-source `CatalogAssemblyError`, never a silent skip.
6214
6377
  *
6215
6378
  * @param root - The workspace root; config dependencies resolve under
6216
6379
  * `<root>/node_modules/.pnpm-config/<name>`.
@@ -6218,7 +6381,7 @@ interface ConfigDependencyHooksShape {
6218
6381
  * version+integrity) declared in `pnpm-workspace.yaml`.
6219
6382
  * @param seed - The inline catalogs, as `catalog name → dependency → range`.
6220
6383
  */
6221
- readonly inject: (root: string, configDependencies: Readonly<Record<string, string>>, seed: Readonly<Record<string, Readonly<Record<string, string>>>>) => Effect.Effect<Readonly<Record<string, Readonly<Record<string, string>>>>, CatalogAssemblyError>;
6384
+ readonly inject: (root: string, configDependencies: Readonly<Record<string, string>>, seed: Readonly<Record<string, Readonly<Record<string, string>>>>) => Effect.Effect<HookInjection, CatalogAssemblyError>;
6222
6385
  }
6223
6386
  declare const ConfigDependencyHooks_base: Context.ServiceClass<ConfigDependencyHooks, "@effected/workspaces/ConfigDependencyHooks", ConfigDependencyHooksShape>;
6224
6387
  /**
@@ -6702,6 +6865,20 @@ interface WorkspaceCatalogsShape {
6702
6865
  readonly set: () => Effect.Effect<CatalogSet, CatalogAssemblyFailure>;
6703
6866
  /** Resolve one `catalog:` specifier; `Option.none()` when it names nothing. */
6704
6867
  readonly resolveSpecifier: (dependency: string, specifier: string) => Effect.Effect<Option.Option<string>, CatalogAssemblyFailure>;
6868
+ /**
6869
+ * The effective pnpm release-age gate for the workspace, combined
6870
+ * strictest-wins from the inline `pnpm-workspace.yaml` keys
6871
+ * (`minimumReleaseAge` / `minimumReleaseAgeExclude`) and the replayed
6872
+ * config-dependency hooks. Assembled from the same single read and hook
6873
+ * replay as `set`, and memoized with it.
6874
+ *
6875
+ * @remarks
6876
+ * Under the default layer (no-op hooks) only inline values contribute; under
6877
+ * {@link WorkspaceCatalogs.layerWithConfigDependencies} the replayed hooks
6878
+ * contribute too. A workspace with no pnpm-workspace.yaml (a bun/npm
6879
+ * workspace) has no release-age keys, so the gate is the inert zero gate.
6880
+ */
6881
+ readonly releaseAgeGate: () => Effect.Effect<ReleaseAgeGate, CatalogAssemblyFailure>;
6705
6882
  }
6706
6883
  /**
6707
6884
  * Options for the {@link WorkspaceCatalogs} layer.
@@ -4225,7 +4225,7 @@ declare class UnsatisfiableConstraintError extends UnsatisfiableConstraintError_
4225
4225
  get message(): string;
4226
4226
  }
4227
4227
  //#endregion
4228
- //#region ../../node_modules/.pnpm/@effected+npm@0.2.3_@effected+semver@0.2.0_effect@4.0.0-beta.99__effect@4.0.0-beta.99/node_modules/@effected/npm/index.d.ts
4228
+ //#region ../../node_modules/.pnpm/@effected+npm@0.3.0_@effected+semver@0.2.0_effect@4.0.0-beta.99__effect@4.0.0-beta.99/node_modules/@effected/npm/index.d.ts
4229
4229
  //#region src/CatalogAssemblyError.d.ts
4230
4230
  declare const CatalogAssemblyError_base: Schema.Class<CatalogAssemblyError, Schema.TaggedStruct<"CatalogAssemblyError", {
4231
4231
  /**
@@ -4497,6 +4497,135 @@ declare class InvalidIntegrityHashError extends InvalidIntegrityHashError_base {
4497
4497
  */
4498
4498
  type IntegrityHashBrand = string & Brand.Brand<"IntegrityHash">;
4499
4499
  //#endregion
4500
+ //#region src/ReleaseAgeGate.d.ts
4501
+ /**
4502
+ * A source's partial contribution to a {@link ReleaseAgeGate}: the effective
4503
+ * gate is assembled from more than one place (inline `pnpm-workspace.yaml`
4504
+ * keys, replayed `updateConfig` hooks, `pnpm config get` output), and each
4505
+ * source may set the age, the exclude list, both, or neither. Absent fields
4506
+ * contribute nothing to the combination.
4507
+ *
4508
+ * Deliberately permissive: unlike {@link ReleaseAgeGate} it does not constrain
4509
+ * `ageMinutes` to be non-negative, because the raw values arrive from arbitrary
4510
+ * config sources and {@link ReleaseAgeGate.combine} is the single authority
4511
+ * that clamps them.
4512
+ *
4513
+ * @public
4514
+ */
4515
+ declare const PartialReleaseAgeGate: Schema.Struct<{
4516
+ /** Minutes a release must age; absent means this source sets no age. */
4517
+ readonly ageMinutes: Schema.optionalKey<Schema.Number>;
4518
+ /** Exempt package-name patterns; absent means this source adds no exemptions. */
4519
+ readonly exclude: Schema.optionalKey<Schema.$Array<Schema.String>>;
4520
+ }>;
4521
+ /**
4522
+ * One source's partial contribution to a release-age gate. All fields optional.
4523
+ *
4524
+ * @public
4525
+ */
4526
+ type PartialReleaseAgeGate = typeof PartialReleaseAgeGate.Type;
4527
+ declare const ReleaseAgeGate_base: Schema.Class<ReleaseAgeGate, Schema.Struct<{
4528
+ /** Minutes a published version must age before it is eligible (non-negative, finite). */
4529
+ readonly ageMinutes: Schema.Number;
4530
+ /** Package-name patterns exempt from the gate (exact names or `*`-globs). */
4531
+ readonly exclude: Schema.$Array<Schema.String>;
4532
+ }>, {}>;
4533
+ /**
4534
+ * pnpm's publish-time release-age gate: the number of minutes a published
4535
+ * version must age before it is eligible, and the set of package-name patterns
4536
+ * exempt from the gate. Mirrors pnpm's `minimumReleaseAge` /
4537
+ * `minimumReleaseAgeExclude` config so a resolver can drop too-young candidate
4538
+ * versions before picking, avoiding `ERR_PNPM_NO_MATURE_MATCHING_VERSION`.
4539
+ *
4540
+ * `ageMinutes` is constrained non-negative and finite; a `ReleaseAgeGate` with
4541
+ * `ageMinutes <= 0` is an inert gate that filters nothing. Assemble a gate from
4542
+ * multiple config sources with {@link ReleaseAgeGate.combine}, and apply it to
4543
+ * a package's candidate versions with {@link ReleaseAgeGate.filterVersions}.
4544
+ *
4545
+ * @example
4546
+ * ```ts
4547
+ * import { ReleaseAgeGate } from "@effected/npm";
4548
+ *
4549
+ * const gate = ReleaseAgeGate.combine(
4550
+ * { ageMinutes: 1440 },
4551
+ * { exclude: ["@my-scope/*"] },
4552
+ * );
4553
+ * // gate.ageMinutes === 1440, gate.exclude === ["@my-scope/*"]
4554
+ *
4555
+ * const eligible = gate.filterVersions(
4556
+ * ["1.0.0", "1.0.1"],
4557
+ * { "1.0.0": "2020-01-01T00:00:00Z", "1.0.1": "2026-07-21T00:00:00Z" },
4558
+ * "prettier",
4559
+ * Date.now(),
4560
+ * );
4561
+ * ```
4562
+ *
4563
+ * @public
4564
+ */
4565
+ declare class ReleaseAgeGate extends ReleaseAgeGate_base {
4566
+ /**
4567
+ * Combine partial contributions from multiple sources into one effective
4568
+ * gate: **strictest age wins** (the maximum of the contributed ages,
4569
+ * clamped to be non-negative) and the exclude sets **union** (deduplicated,
4570
+ * insertion order preserved). A contribution's absent field adds nothing; a
4571
+ * negative or non-finite contributed age is ignored by the clamp. With no
4572
+ * contributions (or only empty ones) the result is the inert zero gate
4573
+ * (`ageMinutes: 0`, `exclude: []`).
4574
+ *
4575
+ * `combine` is total — it never throws on a fractional, negative, or
4576
+ * non-finite contribution — which is why {@link (PartialReleaseAgeGate:variable)}
4577
+ * does not constrain its `ageMinutes` and this method owns the clamp.
4578
+ *
4579
+ * @param contributions - the partial gates to merge, one per source.
4580
+ */
4581
+ static combine(...contributions: readonly PartialReleaseAgeGate[]): ReleaseAgeGate;
4582
+ /**
4583
+ * Whether a package name matches any of `patterns`, using pnpm's
4584
+ * `@pnpm/matcher` semantics: an exact-name match, or a `*`-glob where `*`
4585
+ * matches any run of characters **including `/`** — so a bare `*` matches a
4586
+ * scoped name like `@scope/pkg`, and `@scope/*` matches every package in a
4587
+ * scope.
4588
+ *
4589
+ * @remarks
4590
+ * This is deliberately **NOT** `@effected/glob`'s minimatch dialect, in
4591
+ * which `*` refuses to cross `/` (there `*` matches `pkg` but not
4592
+ * `@scope/pkg`, and you would need `**`). pnpm treats the package name as a
4593
+ * flat string, so this matcher does too. Do not "fix" this to route through
4594
+ * `@effected/glob`: it would silently change which packages a gate exempts
4595
+ * and diverge from pnpm's own behavior.
4596
+ *
4597
+ * @param name - the package name to test.
4598
+ * @param patterns - the exclude patterns (exact names or `*`-globs).
4599
+ */
4600
+ static matchesExclude(name: string, patterns: readonly string[]): boolean;
4601
+ /**
4602
+ * Whether this gate exempts the given package name from the release-age
4603
+ * check — `ReleaseAgeGate.matchesExclude(name, this.exclude)`.
4604
+ *
4605
+ * @param name - the package name to test.
4606
+ */
4607
+ isExcluded(name: string): boolean;
4608
+ /**
4609
+ * Filter a package's candidate versions to those old enough to pass the
4610
+ * gate, given each version's publish timestamp and a caller-supplied `now`.
4611
+ *
4612
+ * A version is kept when it has a parseable publish timestamp at or before
4613
+ * the cutoff (`now - ageMinutes * 60000`). A version with a **missing or
4614
+ * unparseable** timestamp in `times` is **dropped** — matching pnpm's strict
4615
+ * posture: a version whose age cannot be established is treated as too young.
4616
+ * The clock is the caller's; this method reads no wall clock.
4617
+ *
4618
+ * Returns all versions unchanged (a no-op) when the gate is inert
4619
+ * (`ageMinutes <= 0`) or the package name is excluded.
4620
+ *
4621
+ * @param versions - the candidate version strings.
4622
+ * @param times - a map from version string to its ISO-8601 publish date.
4623
+ * @param name - the package name (checked against the gate's `exclude` list).
4624
+ * @param now - the current time in epoch milliseconds (the caller's clock).
4625
+ */
4626
+ filterVersions(versions: readonly string[], times: Readonly<Record<string, string>>, name: string, now: number): readonly string[];
4627
+ }
4628
+ //#endregion
4500
4629
  //#region ../../node_modules/.pnpm/@effected+glob@0.2.0_effect@4.0.0-beta.99/node_modules/@effected/glob/index.d.ts
4501
4630
  //#region src/GlobPattern.d.ts
4502
4631
  declare const GlobPatternError_base: Schema.Class<GlobPatternError, Schema.TaggedStruct<"GlobPatternError", {
@@ -4662,7 +4791,7 @@ declare class GlobPattern extends GlobPattern_base {
4662
4791
  static readonly FromString: Schema.Codec<GlobPattern, string>;
4663
4792
  }
4664
4793
  //#endregion
4665
- //#region ../../node_modules/.pnpm/@effected+lockfiles@0.1.8_@effected+jsonc@0.5.0_effect@4.0.0-beta.99__@effected+npm@0.2_d9e647ebf030778b1166690cbf4c6aa9/node_modules/@effected/lockfiles/index.d.ts
4794
+ //#region ../../node_modules/.pnpm/@effected+lockfiles@0.1.9_@effected+jsonc@0.5.0_effect@4.0.0-beta.99__@effected+npm@0.3_d470055e7ca4b6a23d413cae592e2835/node_modules/@effected/lockfiles/index.d.ts
4666
4795
  //#region src/BunExtension.d.ts
4667
4796
  declare const BunExtension_base: Schema.Class<BunExtension, Schema.Struct<{
4668
4797
  readonly _tag: Schema.tag<"bun">;
@@ -5082,7 +5211,7 @@ declare class LockfileIntegrity extends LockfileIntegrity_base {
5082
5211
  static compare(lockfile: Lockfile, manifests: ReadonlyArray<WorkspaceManifest>): LockfileIntegrity;
5083
5212
  }
5084
5213
  //#endregion
5085
- //#region ../../node_modules/.pnpm/@effected+package-json@0.4.1_effect@4.0.0-beta.99/node_modules/@effected/package-json/index.d.ts
5214
+ //#region ../../node_modules/.pnpm/@effected+package-json@0.4.2_effect@4.0.0-beta.99/node_modules/@effected/package-json/index.d.ts
5086
5215
  //#region src/Dependency.d.ts
5087
5216
  declare const Dependency_base: Schema.Class<Dependency, Schema.Struct<{
5088
5217
  /** The package name. */
@@ -5530,7 +5659,7 @@ declare class Package extends Package_base {
5530
5659
  toJsonString(options?: PackageFormatOptions): string;
5531
5660
  }
5532
5661
  //#endregion
5533
- //#region ../../node_modules/.pnpm/@effected+workspaces@0.5.2_@effected+jsonc@0.5.0_effect@4.0.0-beta.99__effect@4.0.0-beta.99/node_modules/@effected/workspaces/index.d.ts
5662
+ //#region ../../node_modules/.pnpm/@effected+workspaces@0.6.0_@effected+jsonc@0.5.0_effect@4.0.0-beta.99__effect@4.0.0-beta.99/node_modules/@effected/workspaces/index.d.ts
5534
5663
  //#region src/WorkspacePackage.d.ts
5535
5664
  declare const PublishConfig_base: Schema.Class<PublishConfig, Schema.Struct<{
5536
5665
  /** Scoped-package visibility. Its presence overrides `private`. */
@@ -6195,22 +6324,56 @@ declare class WorkspaceDiscovery extends WorkspaceDiscovery_base {
6195
6324
  }
6196
6325
  //#endregion
6197
6326
  //#region src/ConfigDependencyHooks.d.ts
6327
+ /**
6328
+ * The result of replaying a workspace's `configDependencies` hooks: the catalogs
6329
+ * the hooks yield, and the release-age gate contribution they leave on the
6330
+ * config (pnpm's `minimumReleaseAge` / `minimumReleaseAgeExclude`).
6331
+ *
6332
+ * @remarks
6333
+ * `releaseAge` is a `PartialReleaseAgeGate` — the age, the exclude list,
6334
+ * both, or neither, depending on what the replayed hooks set. It is deliberately
6335
+ * a *partial* contribution: a consumer folds it into an effective gate with
6336
+ * `ReleaseAgeGate.combine` alongside inline `pnpm-workspace.yaml` values. Hooks
6337
+ * that set no release-age keys contribute an empty gate (`{}`).
6338
+ *
6339
+ * @public
6340
+ */
6341
+ interface HookInjection {
6342
+ /** The catalogs the replayed hooks yield, as `catalog name → dependency → range`. */
6343
+ readonly catalogs: Readonly<Record<string, Readonly<Record<string, string>>>>;
6344
+ /** The release-age gate contribution the replayed hooks leave on the config. */
6345
+ readonly releaseAge: PartialReleaseAgeGate;
6346
+ }
6198
6347
  /**
6199
6348
  * The {@link ConfigDependencyHooks} service shape.
6200
6349
  *
6201
6350
  * @remarks
6202
6351
  * `inject` is given the workspace root, the manifest's `configDependencies`
6203
6352
  * (name → version+integrity), and the inline-catalog seed as a plain
6204
- * `catalog name → dependency name → range` record, and produces the catalogs the
6205
- * replayed hooks yield. The default (no-op) implementation returns the seed
6206
- * unchanged and loads nothing.
6353
+ * `catalog name → dependency name → range` record, and produces a
6354
+ * {@link HookInjection}: the catalogs the replayed hooks yield **and** the
6355
+ * release-age gate contribution they leave on the config. The default (no-op)
6356
+ * implementation returns the seed catalogs unchanged, contributes an empty
6357
+ * release-age gate, and loads nothing.
6207
6358
  *
6208
6359
  * @public
6209
6360
  */
6210
6361
  interface ConfigDependencyHooksShape {
6211
6362
  /**
6212
6363
  * Replay each config dependency's `updateConfig` hook over `seed`, in
6213
- * declaration order, and return the resulting catalogs.
6364
+ * declaration order, and return both the resulting catalogs and the
6365
+ * release-age gate contribution the hooks leave behind.
6366
+ *
6367
+ * @remarks
6368
+ * The hooks are replayed once over a single threaded config object, exactly
6369
+ * as pnpm does — so catalogs and the release-age keys
6370
+ * (`minimumReleaseAge` / `minimumReleaseAgeExclude`) are both read off that
6371
+ * one final object, and the config-dependency code executes only once. When
6372
+ * two hooks both set a release-age key the **later hook wins** (it rewrites
6373
+ * the threaded value); a hook that returns a malformed value for a key leaves
6374
+ * the prior threaded value in place (tolerant threading, matching the catalog
6375
+ * slice). A hook failing to load or replay fails typed with a
6376
+ * `hooks`-source `CatalogAssemblyError`, never a silent skip.
6214
6377
  *
6215
6378
  * @param root - The workspace root; config dependencies resolve under
6216
6379
  * `<root>/node_modules/.pnpm-config/<name>`.
@@ -6218,7 +6381,7 @@ interface ConfigDependencyHooksShape {
6218
6381
  * version+integrity) declared in `pnpm-workspace.yaml`.
6219
6382
  * @param seed - The inline catalogs, as `catalog name → dependency → range`.
6220
6383
  */
6221
- readonly inject: (root: string, configDependencies: Readonly<Record<string, string>>, seed: Readonly<Record<string, Readonly<Record<string, string>>>>) => Effect.Effect<Readonly<Record<string, Readonly<Record<string, string>>>>, CatalogAssemblyError>;
6384
+ readonly inject: (root: string, configDependencies: Readonly<Record<string, string>>, seed: Readonly<Record<string, Readonly<Record<string, string>>>>) => Effect.Effect<HookInjection, CatalogAssemblyError>;
6222
6385
  }
6223
6386
  declare const ConfigDependencyHooks_base: Context.ServiceClass<ConfigDependencyHooks, "@effected/workspaces/ConfigDependencyHooks", ConfigDependencyHooksShape>;
6224
6387
  /**
@@ -6702,6 +6865,20 @@ interface WorkspaceCatalogsShape {
6702
6865
  readonly set: () => Effect.Effect<CatalogSet, CatalogAssemblyFailure>;
6703
6866
  /** Resolve one `catalog:` specifier; `Option.none()` when it names nothing. */
6704
6867
  readonly resolveSpecifier: (dependency: string, specifier: string) => Effect.Effect<Option.Option<string>, CatalogAssemblyFailure>;
6868
+ /**
6869
+ * The effective pnpm release-age gate for the workspace, combined
6870
+ * strictest-wins from the inline `pnpm-workspace.yaml` keys
6871
+ * (`minimumReleaseAge` / `minimumReleaseAgeExclude`) and the replayed
6872
+ * config-dependency hooks. Assembled from the same single read and hook
6873
+ * replay as `set`, and memoized with it.
6874
+ *
6875
+ * @remarks
6876
+ * Under the default layer (no-op hooks) only inline values contribute; under
6877
+ * {@link WorkspaceCatalogs.layerWithConfigDependencies} the replayed hooks
6878
+ * contribute too. A workspace with no pnpm-workspace.yaml (a bun/npm
6879
+ * workspace) has no release-age keys, so the gate is the inert zero gate.
6880
+ */
6881
+ readonly releaseAgeGate: () => Effect.Effect<ReleaseAgeGate, CatalogAssemblyFailure>;
6705
6882
  }
6706
6883
  /**
6707
6884
  * Options for the {@link WorkspaceCatalogs} layer.