import { IssuesTransport, Introspector, ScmManifest, ScmTransport, GapPolicy, Logger, BaseScmAdapter, CiManifest, CiStatusMaps, CiTransport, BaseCiAdapter, DeployManifest, DeployStatusMaps, DeployTransport, BaseDeployAdapter, IssuesProviderConfig, CapabilityManifest, BaseIssuesAdapter, LinkMap, ProviderRoleMap, TypeMap } from '@lonca/baron-core'; /** * The Azure DevOps provider id. Kept in its own leaf module (no imports) so the transport, * introspector, and scm modules can read it WITHOUT importing `index.ts` — `index.ts` re-exports * those modules, so referencing an `index.ts` const at their module top-level would hit a circular * temporal-dead-zone error under real ESM evaluation order. */ declare const AZURE_DEVOPS_PROVIDER = "azure-devops"; interface AzureDevOpsTransportOptions { readonly organization: string; readonly project: string; /** Personal access token. Read from env / secret-manager by the caller; never committed. */ readonly token: string; /** Team whose iterations/sprints are read. Defaults to Azure's `${project} Team` default team. */ readonly team?: string | undefined; } /** * Live transport over the Azure DevOps REST API (azure-devops-node-api). Azure models work richly: * roles ride native states (the discriminator is System.State, fully faithful on reads), hierarchy * is a native parent relation, and the board column is a separate, best-effort axis. The * WorkItemTracking client is built lazily and cached (its first call fetches resource-area metadata). */ declare function createAzureDevOpsTransport(options: AzureDevOpsTransportOptions): IssuesTransport; /** * Live introspection over the Azure DevOps REST API. Pulls the project's work-item types and their * states (with categories) from the WorkItemTracking API, then the board columns and iterations from * the Work API (which are team-scoped, so a TeamContext is built from the Core API's first team). * Board/iteration discovery is best-effort: a project with no accessible team still yields a valid * type/state vocabulary. Carries no role-mapping logic (invariant #4) — that lives in the proposal. */ declare function createAzureDevOpsIntrospector(options: AzureDevOpsTransportOptions): Introspector; interface AzureDevOpsScmTransportOptions { readonly organization: string; readonly project: string; /** Repository id or name. */ readonly repository: string; /** Personal access token. Read from env / secret-manager by the caller; never committed. */ readonly token: string; /** * Integration branch to fork from and target PRs at when a recipe omits the branch. Many teams * merge into `dev` while the repo default is `release`/`main`, so this is configurable; defaults * to the repository's default branch when unset. */ readonly baseBranch?: string | undefined; } /** Azure Repos supports draft PRs and first-class PR comment threads. */ declare const azureDevOpsScmManifest: ScmManifest; /** * Live `scm` transport over the Azure DevOps REST API (azure-devops-node-api GitApi). Branches are * created with an atomic ref update from the base branch's tip; PRs use full `refs/heads/*` ref * names; a PR thread is a native comment thread. The GitApi client is built lazily and cached. */ declare function createAzureDevOpsScmTransport(options: AzureDevOpsScmTransportOptions): ScmTransport; declare function defineAzureDevOpsScmAdapter(transport: ScmTransport, gapPolicy?: GapPolicy, logger?: Logger): BaseScmAdapter; interface AzureDevOpsCiTransportOptions { readonly organization: string; readonly project: string; readonly token: string; } /** Azure Pipelines capabilities. Stages come from the build timeline (run detail). */ declare const azureDevOpsCiManifest: CiManifest; /** * Azure's fixed enums → normalized RunStatus. A finished unit is decided by its `result`, an in-flight * one by its `status`; 'Completed' is intentionally absent so a finished unit is always classified by * its result. Covers BOTH the build axes (BuildStatus / BuildResult) and the timeline axes * (TimelineRecordState / TaskResult) for stages — the enums overlap (Succeeded/Failed/Canceled/ * InProgress) and the few extras are added here. */ declare const azureDevOpsCiStatusMaps: CiStatusMaps; /** * Live `ci` transport over the Azure DevOps REST API (azure-devops-node-api BuildApi): pipelines, * runs, run detail (with timeline stages), a size-aware log tail, plus trigger (queueBuild) and * cancel (updateBuild → Cancelling). The BuildApi client is built lazily and cached. */ declare function createAzureDevOpsCiTransport(options: AzureDevOpsCiTransportOptions): CiTransport; declare function defineAzureDevOpsCiAdapter(transport: CiTransport, gapPolicy?: GapPolicy, logger?: Logger): BaseCiAdapter; interface AzureDevOpsDeployTransportOptions { readonly organization: string; readonly project: string; readonly token: string; } /** Azure Pipelines Environments + deployment execution records. Read-only (no trigger) in this slice. */ declare const azureDevOpsDeployManifest: DeployManifest; /** * Azure's deployment execution `result` is a TaskResult; an unfinished record has no result and is * classified by the synthetic 'InProgress' phase. Mirrors the CI stage enum mapping. */ declare const azureDevOpsDeployStatusMaps: DeployStatusMaps; declare function createAzureDevOpsDeployTransport(options: AzureDevOpsDeployTransportOptions): DeployTransport; declare function defineAzureDevOpsDeployAdapter(transport: DeployTransport, gapPolicy?: GapPolicy, logger?: Logger): BaseDeployAdapter; /** * Azure Boards has rich, native modelling: parent/child hierarchy, a board column distinct from * the workflow state, sprints, and arbitrary process-template states. */ declare const azureDevOpsManifest: CapabilityManifest; /** * Example role map modelled on the Beetegre V2 Scrum process (states + board columns). Each * installation owns its own map; `baron init` introspects the real project and proposes one. */ declare const exampleAzureDevOpsRoleMap: ProviderRoleMap; declare const exampleAzureDevOpsTypeMap: TypeMap; /** Abstract link types onto Azure's fixed native link reference names. */ declare const exampleAzureDevOpsLinkMap: LinkMap; type AzureDevOpsIssuesConfig = Omit; /** * Builds the Azure DevOps `issues` port. The adapter contributes only the manifest; all * role/native translation and gap negotiation come from the shared {@link BaseIssuesAdapter}. */ declare function defineAzureDevOpsIssuesAdapter(config: AzureDevOpsIssuesConfig, transport: IssuesTransport, logger?: Logger): BaseIssuesAdapter; export { AZURE_DEVOPS_PROVIDER, type AzureDevOpsCiTransportOptions, type AzureDevOpsDeployTransportOptions, type AzureDevOpsIssuesConfig, type AzureDevOpsScmTransportOptions, type AzureDevOpsTransportOptions, azureDevOpsCiManifest, azureDevOpsCiStatusMaps, azureDevOpsDeployManifest, azureDevOpsDeployStatusMaps, azureDevOpsManifest, azureDevOpsScmManifest, createAzureDevOpsCiTransport, createAzureDevOpsDeployTransport, createAzureDevOpsIntrospector, createAzureDevOpsScmTransport, createAzureDevOpsTransport, defineAzureDevOpsCiAdapter, defineAzureDevOpsDeployAdapter, defineAzureDevOpsIssuesAdapter, defineAzureDevOpsScmAdapter, exampleAzureDevOpsLinkMap, exampleAzureDevOpsRoleMap, exampleAzureDevOpsTypeMap };