@paysdoc/devplatform 1.0.0 → 1.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (72) hide show
  1. package/README.md +74 -13
  2. package/dist/git/branchOps.d.ts +5 -3
  3. package/dist/git/branchOps.d.ts.map +1 -1
  4. package/dist/git/branchOps.js +5 -3
  5. package/dist/git/branchOps.js.map +1 -1
  6. package/dist/git/commitOps.d.ts +5 -1
  7. package/dist/git/commitOps.d.ts.map +1 -1
  8. package/dist/git/commitOps.js +5 -1
  9. package/dist/git/commitOps.js.map +1 -1
  10. package/dist/git/index.d.ts +24 -11
  11. package/dist/git/index.d.ts.map +1 -1
  12. package/dist/git/index.js +24 -11
  13. package/dist/git/index.js.map +1 -1
  14. package/dist/git/literalTokenProvider.d.ts +26 -0
  15. package/dist/git/literalTokenProvider.d.ts.map +1 -0
  16. package/dist/git/literalTokenProvider.js +12 -0
  17. package/dist/git/literalTokenProvider.js.map +1 -0
  18. package/dist/providers/forgeCredentials.d.ts +74 -0
  19. package/dist/providers/forgeCredentials.d.ts.map +1 -0
  20. package/dist/providers/forgeCredentials.js +87 -0
  21. package/dist/providers/forgeCredentials.js.map +1 -0
  22. package/dist/providers/forgeProviders.d.ts +2 -2
  23. package/dist/providers/forgeProviders.d.ts.map +1 -1
  24. package/dist/providers/forgeProviders.js +3 -3
  25. package/dist/providers/forgeProviders.js.map +1 -1
  26. package/dist/providers/github/commands/prCommands.js +1 -1
  27. package/dist/providers/github/commands/prCommands.js.map +1 -1
  28. package/dist/providers/github/ghRepoApi.d.ts +6 -4
  29. package/dist/providers/github/ghRepoApi.d.ts.map +1 -1
  30. package/dist/providers/github/ghRepoApi.js +6 -4
  31. package/dist/providers/github/ghRepoApi.js.map +1 -1
  32. package/dist/providers/github/githubIdentity.d.ts +15 -0
  33. package/dist/providers/github/githubIdentity.d.ts.map +1 -1
  34. package/dist/providers/github/githubIdentity.js +19 -3
  35. package/dist/providers/github/githubIdentity.js.map +1 -1
  36. package/dist/providers/github/githubTokenProvider.d.ts +5 -4
  37. package/dist/providers/github/githubTokenProvider.d.ts.map +1 -1
  38. package/dist/providers/github/githubTokenProvider.js +5 -10
  39. package/dist/providers/github/githubTokenProvider.js.map +1 -1
  40. package/dist/providers/github/index.d.ts +10 -0
  41. package/dist/providers/github/index.d.ts.map +1 -1
  42. package/dist/providers/github/index.js +14 -0
  43. package/dist/providers/github/index.js.map +1 -1
  44. package/dist/providers/github/mappers.d.ts +2 -1
  45. package/dist/providers/github/mappers.d.ts.map +1 -1
  46. package/dist/providers/github/mappers.js +4 -1
  47. package/dist/providers/github/mappers.js.map +1 -1
  48. package/dist/providers/gitlab/gitlabIdentity.d.ts +29 -0
  49. package/dist/providers/gitlab/gitlabIdentity.d.ts.map +1 -0
  50. package/dist/providers/gitlab/gitlabIdentity.js +38 -0
  51. package/dist/providers/gitlab/gitlabIdentity.js.map +1 -0
  52. package/dist/providers/gitlab/gitlabTokenProvider.d.ts +20 -0
  53. package/dist/providers/gitlab/gitlabTokenProvider.d.ts.map +1 -0
  54. package/dist/providers/gitlab/gitlabTokenProvider.js +28 -0
  55. package/dist/providers/gitlab/gitlabTokenProvider.js.map +1 -0
  56. package/dist/providers/index.d.ts +1 -0
  57. package/dist/providers/index.d.ts.map +1 -1
  58. package/dist/providers/index.js +1 -0
  59. package/dist/providers/index.js.map +1 -1
  60. package/dist/providers/jira/jiraApiClient.d.ts +3 -2
  61. package/dist/providers/jira/jiraApiClient.d.ts.map +1 -1
  62. package/dist/providers/jira/jiraApiClient.js +2 -1
  63. package/dist/providers/jira/jiraApiClient.js.map +1 -1
  64. package/dist/providers/jira/jiraIssueTracker.d.ts.map +1 -1
  65. package/dist/providers/jira/jiraIssueTracker.js +2 -0
  66. package/dist/providers/jira/jiraIssueTracker.js.map +1 -1
  67. package/dist/providers/jira/jiraTypes.d.ts +2 -0
  68. package/dist/providers/jira/jiraTypes.d.ts.map +1 -1
  69. package/dist/providers/types.d.ts +9 -1
  70. package/dist/providers/types.d.ts.map +1 -1
  71. package/dist/providers/types.js.map +1 -1
  72. package/package.json +3 -1
package/README.md CHANGED
@@ -17,30 +17,47 @@ The package ships three entry points:
17
17
 
18
18
  ```ts
19
19
  import { BoardStatus, type Issue, type RepoContext } from '@paysdoc/devplatform'; // forge ports + domain model
20
- import { forgeProviders } from '@paysdoc/devplatform/providers'; // adapter assembly + GitHub/GitLab/Jira adapters
20
+ import { forgeProviders, createForgeCredentials } from '@paysdoc/devplatform/providers'; // adapter assembly + GitHub/GitLab/Jira adapters
21
21
  import { GitContext, consoleLogger } from '@paysdoc/devplatform/git'; // forge-neutral git/worktree core
22
22
  ```
23
23
 
24
+ A launch boundary obtains its `TokenProvider` and bootstrap `GitIdentity` from the forge name
25
+ alone, then hands both straight to `GitContext` — no GitHub- or GitLab-named import required:
26
+
27
+ ```ts
28
+ import { Platform } from '@paysdoc/devplatform';
29
+
30
+ const { tokenProvider, gitIdentity } = createForgeCredentials({
31
+ forge: { codeHost: 'github', issueTracker: 'github' },
32
+ identity: { owner: 'acme', repo: 'webapp', platform: Platform.GitHub },
33
+ deps: { github: { appConfig: null, pat: process.env.GH_TOKEN } },
34
+ });
35
+ const gitContext = new GitContext({ owner: 'acme', repo: 'webapp', selfHost: false, gitIdentity, tokenProvider, frameworkRepoRoot, targetReposDir });
36
+ ```
37
+
24
38
  ## What it does
25
39
 
26
40
  - **Forge-neutral git executor** — `GitContext.exec()` is the single spawn site, env merge, cwd resolution, and ENOENT rewrap for every git command; no forge semantics leak into it.
27
41
  - **Identity-bound context construction** — a `GitContext` is built from a mandatory owner/repo/selfHost/tokenProvider/gitIdentity; incomplete identity fails at construction rather than at first use.
28
42
  - **Worktree lifecycle management** — create/ensure, list, remove, probe (health: `healthy`/`locked`/`prunable`/`missing`), and reset (takeover) operations for git worktrees under `.worktrees/`.
29
- - **Branch, commit, and remote operations** — branch creation/switching, commits, and remote push/fetch helpers layered on the shared executor.
43
+ - **Branch, commit, and remote operations** — branch creation/switching, commits, and remote push/fetch helpers layered on the shared executor; `commitOps`, `branchOps`, and `isLeaseRejection` ship from `@paysdoc/devplatform/git` since issue #11, for a consumer that wants to drive them directly.
30
44
  - **Working-directory guard** — turns a spawn ENOENT caused by a missing cwd into a diagnostic naming the path and repo identity, keyed off the OS-independent error `code`.
31
45
  - **Distributed-lock claim primitives** — detached-worktree add/remove, empty-commit nonce marking, and a never-forced push used to implement an atomic winner/loser election (e.g. for upgrade claims).
32
46
  - **Process cleanup** — kills processes still running inside a worktree directory before it is removed.
33
47
  - **Pluggable credential and logging ports** — `TokenProvider` (credential-purpose-scoped) and `Logger` ports let a consumer supply auth and logging without the core depending on either.
34
48
  - **Bootstrap-only git reads** — a narrow, structurally-exempt set of pre-context reads (origin remote URL, env/git-config identity) for use before a full `GitContext` exists.
35
49
  - **Forge-neutral provider interfaces** — `IssueTracker`, `CodeHost`, and `BoardManager` ports abstract issue tracking, PR/code hosting, and project boards across platforms.
50
+ - **Workspace validation helpers** — `validateWorkingDirectory` and `parseOwnerRepoFromUrl` ship from `@paysdoc/devplatform/providers` for cross-adapter cwd/remote-URL checks shared by GitHub, GitLab, and Jira.
36
51
  - **`forgeProviders()` assembly function** — binds one `RepoIdentifier` to a full provider triple, validating identity, token provider shape, and context binding before constructing any adapter; rejects unknown or wrong-port forge names via `UnknownForgeError`.
37
- - **GitHub adapter** — issue tracker, code host, and Projects V2 board manager built on the `gh` CLI, including issue/PR read and write operations, label management, GitHub App authentication, and token resolution.
52
+ - **`createForgeCredentials()` forge-keyed credential factory** — resolves a `TokenProvider` and a bootstrap `GitIdentity` from `forge.codeHost` alone, the way `forgeProviders()` resolves the tracker/code-host/board: GitHub dispatches through the App-installation-token → PAT → `gh auth token` chain plus the App-bot identity; GitLab serves its configured token for both credential purposes plus an environment/git-config identity; an unknown code host is refused via `UnknownForgeError` before any credential seam is touched. `createLiteralTokenProvider` — a fixed-string `TokenProvider` for tests and fixtures ships from `@paysdoc/devplatform/git` (re-exported from the GitHub adapter for backwards compatibility).
53
+ - **GitHub adapter** — issue tracker, code host, and Projects V2 board manager built on the `gh` CLI, including issue/PR read and write operations, label management, GitHub App authentication, and token resolution. Since issue #11, its credential/identity helpers (`createGitHubTokenProvider`, `resolveBootstrapGitIdentity`, `resolveContextToken`, `ghAuthToken`, `isGitHubAppConfigured`, `getInstallationToken`) and the bound `createGhRepoApi` view ship from `@paysdoc/devplatform/providers` too, for a consumer switching over with no behaviour change — `createForgeCredentials` remains the recommended, forge-neutral route that composes exactly those functions.
38
54
  - **GitLab adapter** — code host implementation backed by a `curl`-based API client with injected configuration (no environment reads).
39
55
  - **Jira adapter** — issue tracker backed by the Jira REST API v3, including Markdown ↔ Atlassian Document Format (ADF) conversion.
40
56
  - **Board status model** — a canonical, ordered set of board columns (`Blocked`/`Todo`/`In Progress`/`Review`/`Done`) with colors and descriptions shared across board-capable adapters.
41
57
  - **Injected configuration everywhere** — GitLab, Jira, and GitHub App adapters take configuration as constructor arguments; none reads `process.env` or files directly, keeping the library embeddable in any host.
42
58
  - **Compiled ESM + type declarations** — `bun run build` emits `dist/**/*.js` and `dist/**/*.d.ts` via `tsc`, with a three-entry-point `exports` map (`.`, `./providers`, `./git`) and a `files` allow-list so `npm pack` ships only `dist/`, `README.md`, and `LICENSE`.
43
- - **CI type-check, git/gh guard, unit-test, and package gate** — GitHub Actions runs `bun install`, `bun run typecheck`, `bun run lint:git-guard`, and `bun run test:unit` on every PR and push to `main`, plus a second job that builds, packs, and smoke-tests the tarball under both Node and Bun.
59
+ - **Cucumber/Gherkin BDD suite** — `bun run test:e2e` runs `cucumber-js` over per-issue `.feature` files under `features/per-issue/`, backed by step definitions and a shared Cucumber world/support layer, with promoted, reusable phrases tracked in `features/regression/vocabulary.md`. A `@packaging` subset packs the real tarball into a clean consumer and proves a name resolves both at runtime and in the emitted `.d.ts`.
60
+ - **CI type-check, git/gh guard, unit-test, BDD, and package gate** — GitHub Actions runs `bun install`, `bun run typecheck`, `bun run lint:git-guard`, `bun run test:unit`, and the hermetic (`not @packaging`) BDD scenarios on every PR and push to `main`, plus a second job that builds, packs, smoke-tests the tarball under both Node and Bun, and runs the `@packaging` BDD scenarios against it.
44
61
  - **Automated releases via semantic-release** — a `Release` GitHub Actions job runs semantic-release on every push to `main`, using a commit parser that accepts an optional `<agent-name>: ` prefix before the conventional type (`build-agent: feat: …` → minor, `review-patch-agent: fix: …` → patch, `plan-orchestrator: chore: …` → no release), a PR `release-dry-run` job that prints the computed next version before merge, and npm OIDC trusted publishing with an `NPM_TOKEN` fallback.
45
62
  - **Git/gh CI guard** — an AST-based check (`bun run lint:git-guard`, `scripts/checkGitGhGuard.ts` + `scripts/guard/`) that fails CI on a direct `git`/`gh` shell-out outside `src/git/` and `src/providers/github/` (the two structurally-exempt packages), or on ad-hoc provider/`GitContext` construction anywhere outside the one-entry `src/providers/forgeProviders.ts` allowlist.
46
63
  - **Claude Code agent guardrails** — a hooked `.claude/settings.json` and `.claude/hooks/*` scripts (pre/post-tool-use, notification, stop, subagent-stop) constrain and observe agent tool use in this repo.
@@ -48,11 +65,18 @@ import { GitContext, consoleLogger } from '@paysdoc/devplatform/git';
48
65
  ## Setup
49
66
 
50
67
  1. Install dependencies: `bun install`
51
- 2. Copy the environment template and fill in your own values: `cp .env.sample .env`
52
- 3. Type-check: `bun run typecheck`
53
- 4. Run the unit test suite: `bun run test:unit`
68
+ 2. Type-check: `bun run typecheck`
69
+ 3. Run the unit test suite: `bun run test:unit`
70
+ 4. Run the BDD scenario suite: `bun run test:e2e`
54
71
  5. Build: `bun run build`
55
72
 
73
+ This package takes all forge configuration (tokens, App credentials, GitLab/Jira settings) as
74
+ constructor arguments from the consumer — it reads no `.env` file and no `process.env` value as
75
+ its primary configuration path. There is no root `.env.sample` to copy for using the library
76
+ itself; the optional `GIT_AUTHOR_*`/`GITHUB_APP_*` environment fallbacks used only by the
77
+ bootstrap-identity readers are documented in `app_docs/git-worktree-core.md` and
78
+ `app_docs/github-provider.md`.
79
+
56
80
  ## Releasing
57
81
 
58
82
  Releases are computed by [semantic-release](https://semantic-release.gitbook.io/) from commit messages on
@@ -77,6 +101,31 @@ back to an `NPM_TOKEN` secret if one is present. The release baseline is the `v1
77
101
  of the first manually published version; the release workflow hard-fails if that tag is not reachable, so it
78
102
  can never recompute or republish `1.0.0`.
79
103
 
104
+ The npm trusted publisher for `@paysdoc/devplatform` must be linked to this exact GitHub Actions workflow
105
+ (owner `paysdoc`, repository `devplatform`, workflow filename `release.yml`, no environment) **and must have
106
+ the direct `npm publish` action allowed**. npm creates a new trusted publisher with `npm stage publish`
107
+ permission only; direct publishing is a separate tick under the publisher's "Allowed actions" that is off by
108
+ default. Without it the OIDC token exchange succeeds, provenance is signed, and the publish `PUT` itself is
109
+ then denied with `403 … OIDC permission denied for this action`. Fix it on npmjs.com, or from an
110
+ authenticated, 2FA-enabled npm CLI (11.15+):
111
+
112
+ ```
113
+ npm trust list @paysdoc/devplatform
114
+ npm trust github @paysdoc/devplatform --file release.yml --repo paysdoc/devplatform --allow-publish --allow-stage-publish
115
+ ```
116
+
117
+ Do not reach for `NPM_TOKEN` to work around this: npm is removing direct publishing via bypass-2FA tokens in
118
+ January 2027, and a stage-only token cannot serve `@semantic-release/npm`, which runs plain `npm publish` and
119
+ has no staged-publishing mode. The package's Publishing access setting may be "Require two-factor
120
+ authentication and disallow tokens" — that only restricts classic tokens, trusted publishers keep working.
121
+
122
+ semantic-release pushes the git tag *before* it publishes, so a run that fails at `npm publish` leaves an
123
+ orphan tag that a re-run will not republish (no new commits exist after the tag) and reports "no relevant
124
+ changes". Delete the orphan tag and any GitHub release it created, then trigger the workflow again — never
125
+ delete `v1.0.0`. After a successful publish, the registry metadata shows the new version within a couple of
126
+ minutes but the tarball itself can 404 for several minutes more; that is npm replication lag, not a failed
127
+ release.
128
+
80
129
  ## Domain glossary
81
130
 
82
131
  See [UBIQUITOUS_LANGUAGE.md](./UBIQUITOUS_LANGUAGE.md) for the canonical terms used across this codebase (identity, forge, provider, worktree, etc.).
@@ -91,30 +140,42 @@ See [UBIQUITOUS_LANGUAGE.md](./UBIQUITOUS_LANGUAGE.md) for the canonical terms u
91
140
  hooks/ Claude Code lifecycle hooks (pre/post-tool-use, notification, stop, subagent-stop)
92
141
  skills/ Agent skills (TDD, PRD authoring, architecture review, ubiquitous language, ...)
93
142
  settings.json Agent permission/guardrail configuration
143
+ bun.lock Bun lockfile
94
144
  .github/
95
145
  workflows/ci.yml Typecheck + git/gh guard + unit test CI gate, build/pack/smoke-test package gate, and a PR-only release-dry-run job
96
146
  workflows/release.yml Release automation: semantic-release on push to main (v1.0.0 baseline guard, OIDC + NPM_TOKEN fallback)
97
147
  adw.yml ADW guardrails toggle (outside .adw/, survives regeneration)
98
148
  app_docs/ Per-module documentation owned by conditional_docs.md routing (ADW-generated)
99
149
  UBIQUITOUS_LANGUAGE.md Canonical domain glossary
100
- features/regression/vocabulary.md Regression test vocabulary
101
- specs/ Per-issue implementation plans (ADW-generated)
150
+ LICENSE Package license
151
+ package.json Package manifest: entry-point exports map, files allow-list, scripts
152
+ cucumber.js Cucumber/BDD runner configuration (loads tsx, points at features/)
153
+ features/
154
+ per-issue/ Per-issue Gherkin feature files (e.g. feature-9.feature), tagged @adw-<issue>
155
+ regression/vocabulary.md Regression test vocabulary (promoted, reusable Given/When/Then phrases)
156
+ step_definitions/ Cucumber step definitions wiring Gherkin steps to the library's public surface
157
+ support/ Shared Cucumber world/support code (packagedConsumer helper, world.ts)
158
+ logs/<session-id>/ Claude Code hook session logs (chat, pre/post-tool-use, stop transcripts)
159
+ specs/ Per-issue implementation plans (ADW-generated), plus specs/patch/ for patch plans
102
160
  release.config.js semantic-release configuration: agent-prefix-aware commit parser, branches, plugin list
103
161
  scripts/
104
- smokePackage.ts Builds, packs, and smoke-tests the tarball under Node + Bun (`bun run smoke:package`)
162
+ smokePackage.ts Builds, packs, and smoke-tests the tarball under Node + Bun via a table-driven dynamic-import key check (`bun run smoke:package`)
105
163
  releaseDryRun.ts Runs `semantic-release --dry-run` and prints the computed next version (`bun run release:dry-run`)
106
164
  checkGitGhGuard.ts CI git/gh guard entry point (`bun run lint:git-guard`) — dev-only, excluded from dist/
107
165
  guard/ Guard rule modules: shell-out exempt-package set, construction allowlist, stdout report
108
166
  src/
109
167
  index.ts Root entry point ("."): forge ports + domain model only
110
168
  __tests__/ Import-graph, package-exports, and release-config contract tests
111
- git/ Forge-neutral git/worktree core (GitContext, worktree ops, bootstrap identity, process cleanup) — entry point "./git"
169
+ git/ Forge-neutral git/worktree core (GitContext, worktree ops, bootstrap identity, process cleanup) — entry point "./git"; also re-exports commitOps/branchOps/isLeaseRejection since issue #11
170
+ literalTokenProvider.ts Fixed-string TokenProvider for tests/fixtures (re-exported from the GitHub adapter)
112
171
  providers/ Forge provider ports and adapters — entry point "./providers"
113
- github/ GitHub adapter (issue tracker, code host, board manager, App auth, gh CLI commands)
114
- gitlab/ GitLab adapter (API client, code host, type mappers)
172
+ github/ GitHub adapter (issue tracker, code host, board manager, App auth, gh CLI commands); its credential/identity helpers and createGhRepoApi are re-exported on this barrel since issue #11
173
+ gitlab/ GitLab adapter (API client, code host, type mappers, adapter-internal token provider + bootstrap identity)
115
174
  jira/ Jira adapter (API client, issue tracker, ADF converter)
116
175
  forgeProviders.ts Provider assembly function
176
+ forgeCredentials.ts Forge-keyed credential factory (TokenProvider + bootstrap GitIdentity)
117
177
  types.ts Platform-agnostic provider interfaces
178
+ workspaceValidation.ts Cross-adapter cwd/remote-URL validation helpers
118
179
  dist/ Build output (gitignored) — emitted by `bun run build`
119
180
  tsconfig.json TypeScript strict-mode configuration (NodeNext modules/resolution)
120
181
  tsconfig.build.json Build config: extends tsconfig.json, emits dist/**/*.js + dist/**/*.d.ts
@@ -1,7 +1,9 @@
1
1
  /**
2
- * Package-private branch operation orchestration for GitContext.
3
- * Each function takes an injected runner (cmd, cwd) => string so GitContext
4
- * methods stay thin and this module is testable without a real context.
2
+ * Branch operation orchestration for GitContext. Exported from the `./git`
3
+ * entry point since issue #11. Each function takes an injected
4
+ * `(cmd, cwd) => string` runner so GitContext methods stay thin and this
5
+ * module is testable without a real context; the `PROTECTED_BRANCHES` guard
6
+ * is unchanged and stays off the public surface.
5
7
  */
6
8
  export declare const PROTECTED_BRANCHES: readonly ["main", "master", "develop"];
7
9
  type Runner = (command: string, cwd: string) => string;
@@ -1 +1 @@
1
- {"version":3,"file":"branchOps.d.ts","sourceRoot":"","sources":["../../src/git/branchOps.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,eAAO,MAAM,kBAAkB,wCAAyC,CAAC;AAEzE,KAAK,MAAM,GAAG,CAAC,OAAO,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,KAAK,MAAM,CAAC;AAMvD,iBAAS,gBAAgB,CAAC,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,MAAM,CAE1D;AAED,iBAAS,4BAA4B,CAAC,GAAG,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,IAAI,CAY3F;AAED,iBAAS,qBAAqB,CAAC,GAAG,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,IAAI,CAWpF;AAED,iBAAS,iBAAiB,CAAC,GAAG,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,OAAO,CAQ5E;AAED,iBAAS,kBAAkB,CAAC,GAAG,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,OAAO,CAQ7E;AAED;;;GAGG;AACH,iBAAS,aAAa,CAAC,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,MAAM,EAAE,CAYzD;AAED,eAAO,MAAM,SAAS;;;;;;;CAOrB,CAAC"}
1
+ {"version":3,"file":"branchOps.d.ts","sourceRoot":"","sources":["../../src/git/branchOps.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,eAAO,MAAM,kBAAkB,wCAAyC,CAAC;AAEzE,KAAK,MAAM,GAAG,CAAC,OAAO,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,KAAK,MAAM,CAAC;AAMvD,iBAAS,gBAAgB,CAAC,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,MAAM,CAE1D;AAED,iBAAS,4BAA4B,CAAC,GAAG,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,IAAI,CAY3F;AAED,iBAAS,qBAAqB,CAAC,GAAG,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,IAAI,CAWpF;AAED,iBAAS,iBAAiB,CAAC,GAAG,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,OAAO,CAQ5E;AAED,iBAAS,kBAAkB,CAAC,GAAG,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,OAAO,CAQ7E;AAED;;;GAGG;AACH,iBAAS,aAAa,CAAC,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,MAAM,EAAE,CAYzD;AAED,eAAO,MAAM,SAAS;;;;;;;CAOrB,CAAC"}
@@ -1,7 +1,9 @@
1
1
  /**
2
- * Package-private branch operation orchestration for GitContext.
3
- * Each function takes an injected runner (cmd, cwd) => string so GitContext
4
- * methods stay thin and this module is testable without a real context.
2
+ * Branch operation orchestration for GitContext. Exported from the `./git`
3
+ * entry point since issue #11. Each function takes an injected
4
+ * `(cmd, cwd) => string` runner so GitContext methods stay thin and this
5
+ * module is testable without a real context; the `PROTECTED_BRANCHES` guard
6
+ * is unchanged and stays off the public surface.
5
7
  */
6
8
  export const PROTECTED_BRANCHES = ['main', 'master', 'develop'];
7
9
  function isProtected(branch) {
@@ -1 +1 @@
1
- {"version":3,"file":"branchOps.js","sourceRoot":"","sources":["../../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kB;IAClB,aAAa;CACd,CAAC"}
@@ -1,5 +1,9 @@
1
1
  /**
2
- * Package-private commit/push operation orchestration for GitContext.
2
+ * Commit/push operation orchestration for GitContext. Exported from the
3
+ * `./git` entry point since issue #11 — alongside `isLeaseRejection` — so ADW's
4
+ * regression steps can drive it directly with their own runner. Every function
5
+ * still takes an injected `(command, cwd) => string` runner; nothing here
6
+ * spawns a process itself.
3
7
  */
4
8
  type Runner = (command: string, cwd: string) => string;
5
9
  export declare function isLeaseRejection(error: unknown): boolean;
@@ -1 +1 @@
1
- {"version":3,"file":"commitOps.d.ts","sourceRoot":"","sources":["../../src/git/commitOps.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,KAAK,MAAM,GAAG,CAAC,OAAO,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,KAAK,MAAM,CAAC;AAIvD,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,OAAO,GAAG,OAAO,CAMxD;AAkDD,iBAAS,aAAa,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE;IAAE,YAAY,CAAC,EAAE,SAAS,MAAM,EAAE,CAAA;CAAE,GAAG,OAAO,CAOtH;AAED;;;;;GAKG;AACH,iBAAS,oBAAoB,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,SAAS,MAAM,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,OAAO,CAQ1G;AAED;;;;;GAKG;AACH,iBAAS,iBAAiB,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,SAAS,MAAM,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,OAAO,CAQvG;AAED,iBAAS,UAAU,CAAC,GAAG,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,IAAI,CAclE;AAED,iBAAS,eAAe,CA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AAG,OAAO,CAEhE;AAED,eAAO,MAAM,SAAS;;;;;;;CAOrB,CAAC"}
@@ -1,5 +1,9 @@
1
1
  /**
2
- * Package-private commit/push operation orchestration for GitContext.
2
+ * Commit/push operation orchestration for GitContext. Exported from the
3
+ * `./git` entry point since issue #11 — alongside `isLeaseRejection` — so ADW's
4
+ * regression steps can drive it directly with their own runner. Every function
5
+ * still takes an injected `(command, cwd) => string` runner; nothing here
6
+ * spawns a process itself.
3
7
  */
4
8
  export function isLeaseRejection(error) {
5
9
  const e = error;
@@ -1 +1 @@
1
- {"version":3,"file":"commitOps.js","sourceRoot":"","sources":["../../src/git/commitOps.ts"],"names":[],"mappings":"AAAA;;GAEG;AAMH,MAAM,UAAU,gBAAgB,CAAC,KAAc;IAC7C,MAAM,CAAC,GAAG,KAAkB,CAAC;IAC7B,MAAM,IAAI,GAAG,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,OAAO,CAAC;SACzC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC;SACxC,IAAI,CAAC,IAAI,CAAC,CAAC;IACd,OAAO,IAAI,CAAC,QAAQ,CAAC,YAAY,CAAC,IAAI,IAAI,CAAC,QAAQ,CAAC,mCAAmC,CAAC,CAAC;AAC3F,CAAC;AAED,SAAS,iBAAiB,CAAC,MAAc,EAAE,KAAc;IACvD,MAAM,CAAC,GAAG,KAAkB,CAAC;IAC7B,OAAO,CACL,8CAA8C,MAAM,0BAA0B;QAC9E,6EAA6E;QAC7E,mCAAmC;QACnC,8CAA8C,MAAM,sBAAsB;QAC1E,sEAAsE,MAAM,IAAI;QAChF,mBAAmB,MAAM,CAAC,CAAC,CAAC,MAAM,IAAI,CAAC,CAAC,OAAO,IAAI,KAAK,CAAC,EAAE,CAC5D,CAAC;AACJ,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,6BAA6B,EAAE,GAAG,CAAC,CAAC;AACjD,CAAC;AAED,SAAS,qBAAqB,CAAC,GAAW,EAAE,GAAW;IACrD,OAAO,GAAG,CAAC,wBAAwB,EAAE,GAAG,CAAC,CAAC,IAAI,EAAE,CAAC,MAAM,GAAG,CAAC,CAAC;AAC9D,CAAC;AAED,MAAM,CAAC,MAAM,SAAS,GAAG;IACvB,aAAa;IACb,oBAAoB;IACpB,iBAAiB;IACjB,UAAU;IACV,eAAe;IACf,qBAAqB;CACtB,CAAC"}
@@ -8,19 +8,29 @@
8
8
  * a forge adapter built on this package implements instead of the core
9
9
  * holding a credential — and the `Logger` port (`Logger`/`LogLevel`,
10
10
  * defaulting to `consoleLogger`), so the package carries no dependency on
11
- * the host application's logger. The GitHub implementation of the
12
- * TokenProvider port (`createGitHubTokenProvider`), the gh command-string
13
- * builders, GitHub App authentication, token resolution, GitHub remote-URL
14
- * parsing, bot-identity derivation, clone-URL construction and
15
- * `gh auth token` all live in the GitHub forge adapter
16
- * (`adws/providers/github/`, #792/#793), not here.
11
+ * the host application's logger. Also exports `createLiteralTokenProvider`,
12
+ * a fixed-string TokenProvider for tests and fixtures — the one
13
+ * implementation that lives here rather than in a forge adapter, since it
14
+ * carries no forge logic. Every *production* TokenProvider implementation
15
+ * (`createGitHubTokenProvider`), the gh command-string builders, GitHub App
16
+ * authentication, token resolution, GitHub remote-URL parsing, bot-identity
17
+ * derivation and clone-URL construction all live in the GitHub forge adapter
18
+ * (`src/providers/github/`, #792/#793) and, since issue #11, are themselves
19
+ * re-exported from that adapter's `./index.ts` — reachable from this package's
20
+ * consumers via `@paysdoc/devplatform/providers` — rather than deep-import
21
+ * only. The forge-keyed `createForgeCredentials` factory
22
+ * (`src/providers/forgeCredentials.ts`, issue #9) remains the recommended,
23
+ * forge-neutral way to obtain a production TokenProvider without naming a
24
+ * forge. This git core still never imports from `src/providers/`.
17
25
  *
18
26
  * Also exports the worktree lifecycle op namespaces (create/remove/query/
19
- * probe/reset) and the distributed-lock `claimOps`, alongside the
20
- * `repoWorkspace` workspace ops the full forge-neutral git/worktree
21
- * surface this package ships (issue #1). None of it imports from
22
- * `src/providers/`; that boundary is enforced by a committed import-graph
23
- * test.
27
+ * probe/reset), the distributed-lock `claimOps`, the commit/push and branch
28
+ * orchestration namespaces (`commitOps`, `isLeaseRejection`, `branchOps`
29
+ * exported since issue #11, git-core: runner-injected orchestration with no
30
+ * forge vocabulary), alongside the `repoWorkspace` workspace ops the full
31
+ * forge-neutral git/worktree surface this package ships (issue #1). None of
32
+ * it imports from `src/providers/`; that boundary is enforced by a committed
33
+ * import-graph test.
24
34
  *
25
35
  * Bootstrap exceptions (issue #700, narrowed by #793): the functions below
26
36
  * are the ONLY legitimate pre-context git reads in the codebase — generic
@@ -32,8 +42,11 @@
32
42
  export { GitContext } from './gitContext.js';
33
43
  export type { GitIdentity, GitContextOptions, ExecFn, GitContextDeps, FsDeps, ExecWorkingDirectory, ExecOptions, TokenProvider, CredentialPurpose, CredentialRequest, Logger, LogLevel, } from './types.js';
34
44
  export { consoleLogger } from './consoleLogger.js';
45
+ export { createLiteralTokenProvider } from './literalTokenProvider.js';
35
46
  export { killProcessesInDirectory } from './processCleanup.js';
36
47
  export { claimOps } from './claimOps.js';
48
+ export { commitOps, isLeaseRejection } from './commitOps.js';
49
+ export { branchOps } from './branchOps.js';
37
50
  export { worktreeCreateOps } from './worktreeCreateOps.js';
38
51
  export { worktreeRemoveOps } from './worktreeRemoveOps.js';
39
52
  export { worktreeQueryOps } from './worktreeQueryOps.js';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/git/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC7C,YAAY,EACV,WAAW,EAAE,iBAAiB,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM,EAAE,oBAAoB,EAAE,WAAW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ential — and the `Logger` port (`Logger`/`LogLevel`,
10
10
  * defaulting to `consoleLogger`), so the package carries no dependency on
11
- * the host application's logger. The GitHub implementation of the
12
- * TokenProvider port (`createGitHubTokenProvider`), the gh command-string
13
- * builders, GitHub App authentication, token resolution, GitHub remote-URL
14
- * parsing, bot-identity derivation, clone-URL construction and
15
- * `gh auth token` all live in the GitHub forge adapter
16
- * (`adws/providers/github/`, #792/#793), not here.
11
+ * the host application's logger. Also exports `createLiteralTokenProvider`,
12
+ * a fixed-string TokenProvider for tests and fixtures — the one
13
+ * implementation that lives here rather than in a forge adapter, since it
14
+ * carries no forge logic. Every *production* TokenProvider implementation
15
+ * (`createGitHubTokenProvider`), the gh command-string builders, GitHub App
16
+ * authentication, token resolution, GitHub remote-URL parsing, bot-identity
17
+ * derivation and clone-URL construction all live in the GitHub forge adapter
18
+ * (`src/providers/github/`, #792/#793) and, since issue #11, are themselves
19
+ * re-exported from that adapter's `./index.ts` — reachable from this package's
20
+ * consumers via `@paysdoc/devplatform/providers` — rather than deep-import
21
+ * only. The forge-keyed `createForgeCredentials` factory
22
+ * (`src/providers/forgeCredentials.ts`, issue #9) remains the recommended,
23
+ * forge-neutral way to obtain a production TokenProvider without naming a
24
+ * forge. This git core still never imports from `src/providers/`.
17
25
  *
18
26
  * Also exports the worktree lifecycle op namespaces (create/remove/query/
19
- * probe/reset) and the distributed-lock `claimOps`, alongside the
20
- * `repoWorkspace` workspace ops the full forge-neutral git/worktree
21
- * surface this package ships (issue #1). None of it imports from
22
- * `src/providers/`; that boundary is enforced by a committed import-graph
23
- * test.
27
+ * probe/reset), the distributed-lock `claimOps`, the commit/push and branch
28
+ * orchestration namespaces (`commitOps`, `isLeaseRejection`, `branchOps`
29
+ * exported since issue #11, git-core: runner-injected orchestration with no
30
+ * forge vocabulary), alongside the `repoWorkspace` workspace ops the full
31
+ * forge-neutral git/worktree surface this package ships (issue #1). None of
32
+ * it imports from `src/providers/`; that boundary is enforced by a committed
33
+ * import-graph test.
24
34
  *
25
35
  * Bootstrap exceptions (issue #700, narrowed by #793): the functions below
26
36
  * are the ONLY legitimate pre-context git reads in the codebase — generic
@@ -31,8 +41,11 @@
31
41
  */
32
42
  export { GitContext } from './gitContext.js';
33
43
  export { consoleLogger } from './consoleLogger.js';
44
+ export { createLiteralTokenProvider } from './literalTokenProvider.js';
34
45
  export { killProcessesInDirectory } from './processCleanup.js';
35
46
  export { claimOps } from './claimOps.js';
47
+ export { commitOps, isLeaseRejection } from './commitOps.js';
48
+ export { branchOps } from './branchOps.js';
36
49
  export { worktreeCreateOps } from './worktreeCreateOps.js';
37
50
  export { worktreeRemoveOps } from './worktreeRemoveOps.js';
38
51
  export { worktreeQueryOps } from './worktreeQueryOps.js';
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/git/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAK7C,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACnD,OAAO,EAAE,wBAAwB,EAAE,MAAM,qBAAqB,CAAC;AAC/D,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAC3D,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAC3D,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AACzD,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AACzD,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAKzD,0FAA0F;AAC1F,OAAO,EAAE,mBAAmB,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,qBAAqB,EAAE,MAAM,wBAAwB,CAAC;AAE3H,OAAO,EACL,0BAA0B,EAC1B,YAAY,EACZ,SAAS,EACT,mBAAmB,GACpB,MAAM,oBAAoB,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/git/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwCG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAK7C,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACnD,OAAO,EAAE,0BAA0B,EAAE,MAAM,2BAA2B,CAAC;AACvE,OAAO,EAAE,wBAAwB,EAAE,MAAM,qBAAqB,CAAC;AAC/D,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,SAAS,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAC7D,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAC3C,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAC3D,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAC3D,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AACzD,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AACzD,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAKzD,0FAA0F;AAC1F,OAAO,EAAE,mBAAmB,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,qBAAqB,EAAE,MAAM,wBAAwB,CAAC;AAE3H,OAAO,EACL,0BAA0B,EAC1B,YAAY,EACZ,SAAS,EACT,mBAAmB,GACpB,MAAM,oBAAoB,CAAC"}
@@ -0,0 +1,26 @@
1
+ /**
2
+ * A fixed-string TokenProvider — for tests and fixtures, never a production
3
+ * credential source (production boundaries build a provider through
4
+ * `createForgeCredentials`, `src/providers/forgeCredentials.ts`).
5
+ *
6
+ * Lives in the git core rather than an adapter: it carries no forge *logic* —
7
+ * no resolution order, no App/PAT/CLI chain — only a literal echo, and the
8
+ * core's own tests need it (six suites under `src/git/__tests__/` construct a
9
+ * `GitContext` and need some `TokenProvider`). `src/providers/github/githubTokenProvider.ts`
10
+ * re-exports this same function so no import outside `src/git/__tests__/` had
11
+ * to move.
12
+ *
13
+ * The overlay key stays `GH_TOKEN` — a relocation, not a behaviour change:
14
+ * every fixture in this repository and in ADW asserts that key. Per
15
+ * `./types.js`'s `TokenProvider` docblock, a production provider keeps the
16
+ * credential variable's *name* on the adapter side of the port; this fixture
17
+ * is the one deliberate, documented exception, grandfathered in by the shape
18
+ * every existing test already depends on.
19
+ */
20
+ import type { TokenProvider } from './types.js';
21
+ /**
22
+ * A TokenProvider that serves a fixed credential — `alternateIdentityPat`
23
+ * (when given) for `'alternateIdentity'` requests, `token` otherwise.
24
+ */
25
+ export declare function createLiteralTokenProvider(token: string, alternateIdentityPat?: string): TokenProvider;
26
+ //# sourceMappingURL=literalTokenProvider.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"literalTokenProvider.d.ts","sourceRoot":"","sources":["../../src/git/literalTokenProvider.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AACH,OAAO,KAAK,EAAqB,aAAa,EAAE,MAAM,YAAY,CAAC;AAEnE;;;GAGG;AACH,wBAAgB,0BAA0B,CAAC,KAAK,EAAE,MAAM,EAAE,oBAAoB,CAAC,EAAE,MAAM,GAAG,aAAa,CAMtG"}
@@ -0,0 +1,12 @@
1
+ /**
2
+ * A TokenProvider that serves a fixed credential — `alternateIdentityPat`
3
+ * (when given) for `'alternateIdentity'` requests, `token` otherwise.
4
+ */
5
+ export function createLiteralTokenProvider(token, alternateIdentityPat) {
6
+ return {
7
+ credentialEnv({ purpose }) {
8
+ return { GH_TOKEN: (purpose === 'alternateIdentity' && alternateIdentityPat) ? alternateIdentityPat : token };
9
+ },
10
+ };
11
+ }
12
+ //# sourceMappingURL=literalTokenProvider.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"literalTokenProvider.js","sourceRoot":"","sources":["../../src/git/literalTokenProvider.ts"],"names":[],"mappings":"AAqBA;;;GAGG;AACH,MAAM,UAAU,0BAA0B,CAAC,KAAa,EAAE,oBAA6B;IACrF,OAAO;QACL,aAAa,CAAC,EAAE,OAAO,EAAqB;YAC1C,OAAO,EAAE,QAAQ,EAAE,CAAC,OAAO,KAAK,mBAAmB,IAAI,oBAAoB,CAAC,CAAC,CAAC,CAAC,oBAAoB,CAAC,CAAC,CAAC,KAAK,EAAE,CAAC;QAChH,CAAC;KACF,CAAC;AACJ,CAAC"}
@@ -0,0 +1,74 @@
1
+ /**
2
+ * createForgeCredentials() — the forge-keyed credential factory (issue #9),
3
+ * a sibling of `forgeProviders()`. Resolves a `TokenProvider` and a
4
+ * bootstrap `GitIdentity` from a forge name alone, dispatching on
5
+ * `forge.codeHost` the same way `forgeProviders()` dispatches for the
6
+ * tracker, code host and board — the consumer never names GitHub or GitLab.
7
+ *
8
+ * Since issue #11, the GitHub barrel also re-exports the GitHub-named helpers
9
+ * that build these values (`createGitHubTokenProvider`, `resolveContextToken`,
10
+ * `getInstallationToken`, `isGitHubAppConfigured`, `resolveBootstrapGitIdentity`,
11
+ * `ghAuthToken`) so ADW's launch boundary can switch over to the published
12
+ * package with no behaviour change. This factory remains the forge-neutral,
13
+ * recommended route — it composes exactly those functions — and still
14
+ * re-exports only the `GitHubAppConfig`/`AppAuthDeps` *types*: the GitHub
15
+ * barrel must not re-export them too, or `src/providers/index.ts`'s `export *`
16
+ * over both barrels would collide (TS2308).
17
+ *
18
+ * Side-effect contract: construction never resolves a token — the returned
19
+ * `TokenProvider` resolves per `credentialEnv` call, unmemoised, exactly as
20
+ * `createGitHubTokenProvider`/`createGitLabTokenProvider` do on their own
21
+ * (the only cache on the path is `appAuth.ts`'s expiry-aware
22
+ * installation-token cache). Construction DOES perform the bootstrap
23
+ * identity reads (environment, then `git config` when needed) eagerly,
24
+ * exactly as `resolveBootstrapGitIdentity`/`resolveGitLabBootstrapGitIdentity`
25
+ * do today.
26
+ */
27
+ import type { GitIdentity, TokenProvider } from '../git/types.js';
28
+ import type { GitConfigIdentityDeps } from '../git/bootstrapIdentity.js';
29
+ import { type RepoIdentifier } from './types.js';
30
+ import { type ForgeSelection } from './forgeProviders.js';
31
+ import type { GitHubAppConfig, AppAuthDeps } from './github/appAuth.js';
32
+ import type { GitLabConfig } from './gitlab/gitlabApiClient.js';
33
+ export type { GitHubAppConfig, AppAuthDeps };
34
+ /** What the launch boundary currently injects by hand for the GitHub branch. */
35
+ export interface GitHubCredentialDeps {
36
+ /** Already resolved from the environment by the caller — never re-read here. */
37
+ readonly appConfig: GitHubAppConfig | null;
38
+ readonly pat?: string;
39
+ readonly alternateIdentityPat?: string;
40
+ /** Test seam; production default is the adapter's `gh auth token` reader. */
41
+ readonly ghAuthToken?: () => string;
42
+ readonly env?: NodeJS.ProcessEnv;
43
+ readonly exec?: GitConfigIdentityDeps['exec'];
44
+ /** The `runCurl`/`apiBaseUrl` transport seam of `getInstallationToken`; production default is real curl against `api.github.com`. */
45
+ readonly appAuth?: AppAuthDeps;
46
+ }
47
+ /** Mirrors `ForgeProviderDeps`: forge-neutral seams at the top, one per-forge bag each. */
48
+ export interface ForgeCredentialDeps {
49
+ /** Forge-neutral bootstrap-identity seam, applies to whichever code host is selected. Overridden by `github.env` when both are given. */
50
+ readonly env?: NodeJS.ProcessEnv;
51
+ /** Forge-neutral bootstrap-identity seam. Overridden by `github.exec` when both are given. */
52
+ readonly exec?: GitConfigIdentityDeps['exec'];
53
+ readonly github?: GitHubCredentialDeps;
54
+ /** Required when `forge.codeHost === 'gitlab'`. */
55
+ readonly gitlab?: GitLabConfig;
56
+ }
57
+ export interface ForgeCredentialsOptions {
58
+ readonly forge: ForgeSelection;
59
+ readonly identity: RepoIdentifier;
60
+ readonly deps?: ForgeCredentialDeps;
61
+ }
62
+ export type ForgeCredentials = Readonly<{
63
+ tokenProvider: TokenProvider;
64
+ gitIdentity: GitIdentity;
65
+ }>;
66
+ /**
67
+ * Builds the one `{ tokenProvider, gitIdentity }` pair for `identity`. Guard
68
+ * clauses run in `forgeProviders()`'s order — identity, then the code host
69
+ * — entirely before any credential source is touched, so a refusal never
70
+ * partially resolves a token. Only the code host is validated; the tracker
71
+ * selection is irrelevant to credentials.
72
+ */
73
+ export declare function createForgeCredentials(options: ForgeCredentialsOptions): ForgeCredentials;
74
+ //# sourceMappingURL=forgeCredentials.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"forgeCredentials.d.ts","sourceRoot":"","sources":["../../src/providers/forgeCredentials.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAClE,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,6BAA6B,CAAC;AACzE,OAAO,EAAE,KAAK,cAAc,EAA0B,MAAM,YAAY,CAAC;AACzE,OAAO,EAAwD,KAAK,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAIhH,OAAO,KAAK,EAAE,eAAe,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAIxE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAEhE,YAAY,EAAE,eAAe,EAAE,WAAW,EAAE,CAAC;AAM7C,gFAAgF;AAChF,MAAM,WAAW,oBAAoB;IACnC,gFAAgF;IAChF,QAAQ,CAAC,SAAS,EAAE,eAAe,GAAG,IAAI,CAAC;IAC3C,QAAQ,CAAC,GAAG,CAAC,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,oBAAoB,CAAC,EAAE,MAAM,CAAC;IACvC,6EAA6E;IAC7E,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,MAAM,CAAC;IACpC,QAAQ,CAAC,GAAG,CAAC,EAAE,MAAM,CAAC,UAAU,CAAC;IACjC,QAAQ,CAAC,IAAI,CAAC,EAAE,qBAAqB,CAAC,MAAM,CAAC,CAAC;IAC9C,q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