@homeflare/alchemy 0.26.0 → 0.27.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (64) hide show
  1. package/dist/github/declare-repo-baseline.d.ts +11 -0
  2. package/dist/github/declare-repo-baseline.d.ts.map +1 -0
  3. package/dist/github/index.d.ts +20 -11
  4. package/dist/github/index.d.ts.map +1 -1
  5. package/dist/github/index.js +715 -4
  6. package/dist/github/index.js.map +14 -4
  7. package/dist/github/repo-baseline-data.d.ts +75 -0
  8. package/dist/github/repo-baseline-data.d.ts.map +1 -0
  9. package/dist/github/repo-policy.d.ts +4 -4
  10. package/dist/github/repo-policy.d.ts.map +1 -1
  11. package/dist/github/repository-ruleset-constraints.d.ts +105 -0
  12. package/dist/github/repository-ruleset-constraints.d.ts.map +1 -0
  13. package/dist/github/repository-ruleset-errors.d.ts +97 -0
  14. package/dist/github/repository-ruleset-errors.d.ts.map +1 -0
  15. package/dist/github/repository-ruleset-fake-octokit.d.ts +24 -0
  16. package/dist/github/repository-ruleset-fake-octokit.d.ts.map +1 -0
  17. package/dist/github/repository-ruleset-fixtures.d.ts +20 -0
  18. package/dist/github/repository-ruleset-fixtures.d.ts.map +1 -0
  19. package/dist/github/repository-ruleset-form.d.ts +30 -0
  20. package/dist/github/repository-ruleset-form.d.ts.map +1 -0
  21. package/dist/github/repository-ruleset-guards.d.ts +70 -0
  22. package/dist/github/repository-ruleset-guards.d.ts.map +1 -0
  23. package/dist/github/repository-ruleset-octokit.d.ts +5 -0
  24. package/dist/github/repository-ruleset-octokit.d.ts.map +1 -0
  25. package/dist/github/repository-ruleset-probe.d.ts +87 -0
  26. package/dist/github/repository-ruleset-probe.d.ts.map +1 -0
  27. package/dist/github/repository-ruleset-reconcile.d.ts +24 -0
  28. package/dist/github/repository-ruleset-reconcile.d.ts.map +1 -0
  29. package/dist/github/repository-ruleset-test-helpers.d.ts +32 -0
  30. package/dist/github/repository-ruleset-test-helpers.d.ts.map +1 -0
  31. package/dist/github/repository-ruleset.d.ts +89 -0
  32. package/dist/github/repository-ruleset.d.ts.map +1 -0
  33. package/dist/launchd/index.js.map +2 -2
  34. package/dist/launchd/port-claims.d.ts +2 -2
  35. package/dist/launchd/port-claims.d.ts.map +1 -1
  36. package/docs/launchd-ports.md +14 -17
  37. package/docs/repo-policy-ruleset-hazards.md +8 -0
  38. package/docs/repo-policy.md +27 -12
  39. package/docs/repository-ruleset.md +114 -0
  40. package/docs/upstream-conformance.md +12 -1
  41. package/docs/upstream-pr-ruleset-fixes.md +77 -0
  42. package/package.json +1 -1
  43. package/src/github/declare-repo-baseline.ts +42 -0
  44. package/src/github/index.ts +43 -11
  45. package/src/github/repo-baseline-data.test.ts +76 -0
  46. package/src/github/repo-baseline-data.ts +86 -0
  47. package/src/github/repo-policy.ts +17 -17
  48. package/src/github/repository-ruleset-constraints.ts +136 -0
  49. package/src/github/repository-ruleset-coverage.test.ts +82 -0
  50. package/src/github/repository-ruleset-errors.ts +136 -0
  51. package/src/github/repository-ruleset-fake-octokit.ts +131 -0
  52. package/src/github/repository-ruleset-fixtures.ts +183 -0
  53. package/src/github/repository-ruleset-form.ts +212 -0
  54. package/src/github/repository-ruleset-guards.ts +194 -0
  55. package/src/github/repository-ruleset-lifecycle.test.ts +172 -0
  56. package/src/github/repository-ruleset-octokit.ts +140 -0
  57. package/src/github/repository-ruleset-probe.ts +116 -0
  58. package/src/github/repository-ruleset-reconcile.ts +176 -0
  59. package/src/github/repository-ruleset-test-helpers.ts +102 -0
  60. package/src/github/repository-ruleset-wire.test.ts +66 -0
  61. package/src/github/repository-ruleset-write-refusals.test.ts +199 -0
  62. package/src/github/repository-ruleset-write.test.ts +83 -0
  63. package/src/github/repository-ruleset.ts +219 -0
  64. package/src/launchd/port-claims.ts +8 -9
@@ -0,0 +1,11 @@
1
+ import * as GitHub from 'alchemy/GitHub';
2
+ import * as Effect from 'effect/Effect';
3
+ import { type RepoBaselineInput } from './repo-baseline-data.ts';
4
+ import { RepositoryRuleset } from './repository-ruleset.ts';
5
+ export interface DeclareRepoBaselineOptions extends RepoBaselineInput {
6
+ }
7
+ export declare const declareRepoBaseline: (id: string, options: DeclareRepoBaselineOptions) => Effect.Effect<{
8
+ repository: GitHub.Repository;
9
+ ruleset: RepositoryRuleset;
10
+ }, never, GitHub.GitHubCredentials | GitHub.Providers>;
11
+ //# sourceMappingURL=declare-repo-baseline.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"declare-repo-baseline.d.ts","sourceRoot":"","sources":["../../src/github/declare-repo-baseline.ts"],"names":[],"mappings":"AAsBA,OAAO,KAAK,MAAM,MAAM,gBAAgB,CAAC;AAEzC,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AACxC,OAAO,EACL,KAAK,iBAAiB,EAGvB,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAE5D,MAAM,WAAW,0BAA2B,SAAQ,iBAAiB;CAAG;AAExE,eAAO,MAAM,mBAAmB,OAAQ,MAAM,WAAW,0BAA0B;;;sDAO/E,CAAC"}
@@ -1,18 +1,27 @@
1
1
  /**
2
- * GitHub helpers for Alchemy — one repository's house policy in one call.
2
+ * GitHub helpers for Alchemy — one repository's house policy in one call, and (2026-09-23) the
3
+ * one bridge resource this house builds atop upstream GitHub: `GitHub.RepositoryRuleset`.
3
4
  *
4
- * ⛔ THIS SUBPATH SHIPS NO PROVIDER, AND DELIBERATELY SO. GitHub is first-class in
5
- * Alchemy; everything here composes the vendor's own `Repository` and `Ruleset`.
6
- * Provide `GitHub.providers()` exactly as you would without it.
7
- * ★ WHY IT EXISTS ANYWAY. "Open a pull request, let auto-merge land it" is safe only when
8
- * five repository properties and four ruleset rules all agree, and every way of getting
9
- * one of them wrong is silent — an auto-merge that lands on red, a force push that
10
- * rewrites the branch a release tagged, a required context nothing ever reports. One
11
- * call puts the whole policy in one place, and one place is where it gets fixed.
5
+ * ⚠️ `declareRepoPolicy`/`declareRepoBaseline` COMPOSE UPSTREAM `GitHub.Repository` PLUS THIS
6
+ * SUBPATH'S OWN `RepositoryRulesetProvider()` — provide BOTH `GitHub.providers()` and
7
+ * `RepositoryRulesetProvider()`. Before 2026-09-23 this subpath shipped no provider at all,
8
+ * composing only vendor resources; `RepositoryRuleset` is the one exception, and
9
+ * repository-ruleset.ts's header says why upstream's own `Ruleset` cannot fill the gap.
10
+ * ★ WHY THE POLICY HELPERS EXIST. "Open a pull request, let auto-merge land it" is safe only
11
+ * when five repository properties and four ruleset rules all agree, and every way of getting
12
+ * one of them wrong is silent — an auto-merge that lands on red, a force push that rewrites
13
+ * the branch a release tagged, a required context nothing ever reports. One call puts the
14
+ * whole policy in one place, and one place is where it gets fixed.
12
15
  *
13
- * ⛔ THIS BARREL IS THE PUBLIC API. `repo-policy-form.ts` is reachable by path if you
14
- * genuinely need an internal — a deliberate act rather than an accident of barrelling.
16
+ * ⛔ THIS BARREL IS THE PUBLIC API. `repo-policy-form.ts`, `repository-ruleset-form.ts` and the
17
+ * rest of the `repository-ruleset-*` internals are reachable by path if you genuinely need
18
+ * one — a deliberate act rather than an accident of barrelling.
15
19
  */
16
20
  export { type RepoPolicy, type RepoPolicyBypassActor, type RepoPolicyOptions, type RepoPolicyRepositorySettings, repoPolicy, } from './repo-policy-form.ts';
17
21
  export { type DeclareRepoPolicyOptions, declareRepoPolicy } from './repo-policy.ts';
22
+ export { type RepoBaselineInput, PUBLIC_ONLY_UNDECLARABLE, repoBaselineRuleset, repoBaselineSettings, } from './repo-baseline-data.ts';
23
+ export { type DeclareRepoBaselineOptions, declareRepoBaseline } from './declare-repo-baseline.ts';
24
+ export { RepositoryRuleset, RepositoryRulesetProvider, type RepositoryRulesetAttributes, type RepositoryRulesetProps, type RepositoryRulesetPullRequestRule, type RepositoryRulesetReviewerRule, type RepositoryRulesetRules, type RepositoryRulesetStatusChecksRule, } from './repository-ruleset.ts';
25
+ export { RULE_TYPE_COVERAGE, type RepositoryRuleType } from './repository-ruleset-constraints.ts';
26
+ export { BypassActorWidened, DuplicateRuleset, NeverReportedContext, ReadbackMismatch, RequiredChecksOmitted, RulesetConstraintRefused, UndeclaredLiveRule, type RepositoryRulesetError, } from './repository-ruleset-errors.ts';
18
27
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/github/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AACH,OAAO,EACL,KAAK,UAAU,EACf,KAAK,qBAAqB,EAC1B,KAAK,iBAAiB,EACtB,KAAK,4BAA4B,EACjC,UAAU,GACX,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,KAAK,wBAAwB,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/github/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AACH,OAAO,EACL,KAAK,UAAU,EACf,KAAK,qBAAqB,EAC1B,KAAK,iBAAiB,EACtB,KAAK,4BAA4B,EACjC,UAAU,GACX,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,KAAK,wBAAwB,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AACpF,OAAO,EACL,KAAK,iBAAiB,EACtB,wBAAwB,EACxB,mBAAmB,EACnB,oBAAoB,GACrB,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,KAAK,0BAA0B,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AAClG,OAAO,EACL,iBAAiB,EACjB,yBAAyB,EACzB,KAAK,2BAA2B,EAChC,KAAK,sBAAsB,EAC3B,KAAK,gCAAgC,EACrC,KAAK,6BAA6B,EAClC,KAAK,sBAAsB,EAC3B,KAAK,iCAAiC,GACvC,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,kBAAkB,EAAE,KAAK,kBAAkB,EAAE,MAAM,qCAAqC,CAAC;AAClG,OAAO,EACL,kBAAkB,EAClB,gBAAgB,EAChB,oBAAoB,EACpB,gBAAgB,EAChB,qBAAqB,EACrB,wBAAwB,EACxB,kBAAkB,EAClB,KAAK,sBAAsB,GAC5B,MAAM,gCAAgC,CAAC"}