@vypdev/copilot 3.9.1 → 3.9.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -3,122 +3,76 @@
3
3
  ![Build](https://github.com/vypdev/copilot/actions/workflows/ci_check.yml/badge.svg)
4
4
  ![License](https://img.shields.io/github/license/vypdev/copilot)
5
5
 
6
-
7
6
  # Copilot — GitHub with super powers
8
7
 
9
- **Copilot** is a GitHub Action for task management using Git-Flow: it links issues, branches, and pull requests to GitHub Projects, automates branch creation from labels, and keeps boards and progress in sync. Think of it as bringing Atlassian-style integration (boards, tasks, branches) to GitHub.
10
-
11
- Full documentation: **[docs.page/vypdev/copilot](https://docs.page/vypdev/copilot)**
8
+ **Copilot connects the work described in a GitHub issue to its branch, implementation, pull request, review, and release.** It combines a GitHub Action for repository automation with a local CLI and web setup assistant. Enable the capabilities your team needs, including optional AI analysis and code changes.
12
9
 
13
- *Maintains state and configuration persisted in issue descriptions for seamless workflow automation.*
10
+ ## What can I do with it?
14
11
 
15
- ---
12
+ | Your goal | What Copilot provides | Start here |
13
+ |---|---|---|
14
+ | Organize work from issues | Issue Forms, Action-managed branches, lifecycle labels, progress, and GitHub Projects updates | [Manage issues and branches](https://docs.page/vypdev/copilot/guides/issues-and-branches) |
15
+ | Review pull requests | Bugbot findings near the code, a current review status, optional PR descriptions, and explicit requests to fix findings | [Review PRs and resolve findings](https://docs.page/vypdev/copilot/guides/review-pull-requests) |
16
+ | Ask for help or implementation | Commands to explain code, diagnose problems, plan work, or apply an authorized change and run verification | [Work with the bot](https://docs.page/vypdev/copilot/guides/work-with-the-bot) |
17
+ | Keep working branches current | Drift notices and an authorized synchronization command that verifies the merge before pushing | [Branch synchronization](https://docs.page/vypdev/copilot/issues/branch-synchronization) |
18
+ | Ship releases and hotfixes | Frozen source revisions, protected promotion PRs, version tags, GitHub Releases, and reconciliation back to development | [Release and hotfix guide](https://docs.page/vypdev/copilot/guides/releases-and-hotfixes) |
16
19
 
17
- ## Documentation index
20
+ For example, a maintainer starts an admitted issue with `in-progress`. Copilot creates and verifies its branch. A developer or an authorized bot request contributes changes on that exact branch. A linked PR receives review findings and runs the repository's checks. After an authorized merge, a separately launched release can promote the accepted production commit and reconcile it into development.
18
21
 
19
- | Section | Description |
20
- |--------|-------------|
21
- | [How to use](https://docs.page/vypdev/copilot/how-to-use) | Step-by-step setup: PAT, `copilot setup`, workflows |
22
- | [Features & capabilities](https://docs.page/vypdev/copilot/features) | Workflow triggers, single actions, agent execution, and concurrency |
23
- | [Authentication](https://docs.page/vypdev/copilot/authentication) | PAT setup, permissions, token best practices |
24
- | [Configuration](https://docs.page/vypdev/copilot/configuration) | All inputs: branches, labels, projects, locale, agents, and more |
25
- | [Release orchestration](https://docs.page/vypdev/copilot/issues/deployment-orchestration) | Production-first release/hotfix flow, npm OIDC, reconciliation, and recovery |
26
- | [Agents](https://docs.page/vypdev/copilot/agents) | Runtime, model, CLI, policy, and failure behavior |
27
- | [Security & Operations](https://docs.page/vypdev/copilot/security-operations) | Credentials, trust boundaries, provisioning, verification, upgrades, and rollback |
28
- | [Development](https://docs.page/vypdev/copilot/development) | Architecture, testing, documentation, artifacts, and release process |
22
+ ```mermaid
23
+ flowchart LR
24
+ I[Issue and plan] --> B[Verified working branch]
25
+ B --> C[Developer or authorized bot changes]
26
+ C --> P[Linked PR and review]
27
+ P --> M[Protected merge]
28
+ M --> R[Explicit release or hotfix]
29
+ R --> D[Development reconciliation]
30
+ ```
29
31
 
30
- ---
32
+ AI capabilities require a configured agent runtime, an allowed model, and working authentication on the selected runner. Code-changing requests require repository write authority and run configured verification before commit/push. Release promotion follows the repository's merge policy. Installing Copilot does not grant permission to merge or deploy.
31
33
 
32
- ## Getting started
34
+ ## Start with the web assistant
33
35
 
34
- The recommended onboarding path is to install the published package globally with
35
- `pnpm` and initialize the target repository with `copilot setup`:
36
+ Use **Node.js 24 or newer**, `pnpm`, and a working checkout of the repository you want to configure:
36
37
 
37
38
  ```bash
38
39
  pnpm add --global @vypdev/copilot
39
40
  copilot --version
40
41
  cd /path/to/your/repository
41
- copilot setup
42
- # Optional local visual assistant, in the same repository:
43
42
  copilot setup --web
44
43
  ```
45
44
 
46
- `@vypdev/copilot` contains both the `copilot` CLI and the compiled GitHub Action.
47
- The global installation makes the CLI and the setup templates available; it does
48
- not install an Action into GitHub. `copilot setup` is the canonical initialization
49
- flow and will, according to the selected features:
50
-
51
- - copy the selected workflows, Issue Forms, pull request template, and repository agent guidance into the repository;
52
- - create the labels and issue types used by the workflows;
53
- - configure non-sensitive Repository Variables; and
54
- - validate or provision the workflow PAT and provider credentials at the selected scope.
55
-
56
- The wizard selects issue workflow kinds with a Space/Enter multi-select; `All`
57
- is the default. It also generates `.copilot/repository-profile.json`,
58
- `.copilot/AGENT_GUIDE.md`, and the Codex skill
59
- `.agents/skills/copilot-repository-workflow/SKILL.md` by default. The generated
60
- guidance makes clear that the Action owns remote branch lifecycle: agents work
61
- on the exact existing branch and push normal commits, but do not create, rename,
62
- delete, replace, or force-push managed branches.
63
-
64
- The setup PAT entered by the operator is separate from the workflow `PAT` Secret.
65
- Interactive setup can guide creation of both via GitHub's prefilled PAT form:
66
- picks the permission-affecting setup options first, then the operator creates a temporary setup token, and the bot account creates the
67
- persistent workflow token. GitHub handles account switching, 2FA, repository
68
- selection, and final creation; Copilot never creates or revokes either token.
69
- Use `copilot setup --dry-run` to inspect the plan before making local or remote
70
- changes. See the complete [How to use](https://docs.page/vypdev/copilot/how-to-use)
71
- guide and [Authentication](https://docs.page/vypdev/copilot/authentication).
72
-
73
- `--web` opens an ephemeral, loopback-only setup page with a six-stage progress
74
- rail, plan review, separate masked inputs for the two PAT roles, and a
75
- System/Light/Dark theme control. If the browser does not open, use the local
76
- URL printed in the terminal. The page does not create PATs: GitHub owns the
77
- form, account switch, 2FA, and token issuance. You must explicitly approve
78
- the plan and Apply; `--web` cannot be combined with unattended approval or
79
- secret-bearing command-line flags. The terminal wizard remains the default.
80
-
81
- ### Manual workflow integration (advanced)
82
-
83
- You can integrate the Action manually when the CLI setup flow is not suitable:
84
- copy selected files from `setup/workflows/` into `.github/workflows/` and add
85
- steps such as:
86
-
87
- ```yaml
88
- - uses: vypdev/copilot@v3
89
- with:
90
- token: ${{ secrets.PAT }}
91
- ```
45
+ The CLI opens a local browser page. Pair it with the code printed in the terminal, confirm the target repository, and choose **Basic guided setup**. The assistant explains the required permissions, guides the two separate PAT roles, and shows the files and GitHub resources affected before you approve changes.
46
+
47
+ - The temporary **setup PAT** belongs to the operator and is used locally to configure the installation.
48
+ - The persistent **workflow PAT** belongs to the bot account and is stored as the Actions Secret `PAT`.
49
+ - GitHub creates both tokens in its own tabs. The assistant never creates or revokes them.
50
+
51
+ Follow the [web setup tutorial](https://docs.page/vypdev/copilot/setup-web) through installing the generated files and verifying the result. Then complete the [first issue-to-PR workflow](https://docs.page/vypdev/copilot/first-workflow). A local configuration check alone does not prove that an Action can run successfully.
92
52
 
93
- This is a lower-level integration path, not an alternative name for
94
- `copilot setup`: it does not automatically create labels, issue types, Variables,
95
- Secrets, templates, or the complete set of workflows. Those resources must be
96
- configured and kept consistent manually. See [Workflow setup](https://docs.page/vypdev/copilot/issues/workflow-setup)
97
- for action-level examples.
53
+ `copilot setup` without `--web` launches the terminal assistant. Use `copilot setup --web --dry-run` for a no-change preview. The npm package installs the CLI and templates; running setup and installing its generated files enables the Action in your repository.
98
54
 
99
- ---
55
+ ## Choose your next step
100
56
 
101
- ## What it does
57
+ | You need… | Documentation |
58
+ |---|---|
59
+ | A short installation checklist | [Quick start](https://docs.page/vypdev/copilot/quick-start) |
60
+ | A walkthrough of browser setup | [Set up with the web assistant](https://docs.page/vypdev/copilot/setup-web) |
61
+ | Observable proof that the installation works | [First workflow](https://docs.page/vypdev/copilot/first-workflow) |
62
+ | A guide for a specific outcome | [Choose a goal](https://docs.page/vypdev/copilot/guides) |
63
+ | Version selection, contextual or offline help | [Use the documentation](https://docs.page/vypdev/copilot/using-the-docs) |
64
+ | Token ownership, permissions, or account recovery | [Authentication](https://docs.page/vypdev/copilot/authentication) |
65
+ | Existing-installation updates, batch setup, or manual integration | [Setup and maintenance reference](https://docs.page/vypdev/copilot/how-to-use) |
66
+ | Every feature, input, and operational control | [Capabilities](https://docs.page/vypdev/copilot/features), [Configuration](https://docs.page/vypdev/copilot/configuration), [Security & Operations](https://docs.page/vypdev/copilot/security-operations) |
102
67
 
103
- - **Issues** — Branch creation from labels (feature, bugfix, hotfix, release, docs, chore), project linking, assignees, lifecycle/size/progress labels; new issues receive a contextual `@vypbot` welcome; from comments you can ask for help, explain/diagnose/analyze code, plan work, fix findings, or request an authorized implementation.
104
- - **Pull requests** — Link PRs to issues, update project columns, assign reviewers; optional AI-generated PR description and automatic Bugbot review with stable finding threads; use `/copilot analyze` or `@vypbot analyze ...` for read-only review, or request an authorized change.
105
- - **Push (commits)** — Notify the issue, update size/progress, and optionally run Bugbot; a separate agent-free observer watches every branch and recommends synchronizing children when their parent moves.
106
- - **Projects** — Link issues and PRs to boards and move them to the right columns.
107
- - **Single actions** — On-demand maintenance and analysis, plus workflow-owned callbacks for durable release and hotfix operations.
108
- - **Branch synchronization** — Authorized issue/PR commands merge parent into working branch, call the fixer only for eligible conflicts, run verification, reject remote races, push, and report exactly what happened.
109
- - **Release and hotfix orchestration** — Cut from the correct immutable origin, promote through a protected production PR, publish only the accepted production commit, and reconcile it back through resumable managed PRs without keeping a runner polling checks.
110
- - **Evidence and safety** — Every run writes a bounded Job Summary; PR findings are reconciled from GitHub into one status card, historical review status blocks, and a `Copilot / Review` Check Run. Actionable findings are neutral by default and fail it only when `bugbot-fail-on-unresolved` is enabled, while unknown/incomplete state always fails closed. Agent sandboxes run without approval or network access, and all agent/comment content remains bounded, secret-redacted, and treated as untrusted data.
111
- - **Bugbot quality** — Hierarchical rules, semantic finding identity, safe GitHub suggestions, analysis-only dry runs, a multilingual regression corpus, real-agent benchmark runner, content-free telemetry/analytics, and the provider-neutral `@vypdev/copilot/bugbot` API.
112
- - **Concurrency** — Durable mutation workflows wait only for older active runs of that same workflow, with rate-limit-aware polling and a 90-minute deadline. Commit and Pull Request templates share a branch-scoped latest-revision group so a newer Bugbot review supersedes an older one; provider re-reads and head guards make interrupted finding transitions retryable. Event templates can also skip bot-authored jobs before runner allocation through `COPILOT_BOT_LOGIN`. See [Features → Workflow concurrency](https://docs.page/vypdev/copilot/features#workflow-concurrency-and-sequential-execution).
68
+ Setup installs the selected workflows, Issue Forms, labels, issue types, Variables, credentials, and repository agent guidance. Projects, agent routing, release/hotfix workflows, and other capabilities follow your selections. New setup offers PR approval assessment in `recommend` mode; native bot approval requires explicitly selecting `guarded` and meeting its prerequisites. See [guarded approval](https://docs.page/vypdev/copilot/pull-requests/guarded-approval).
113
69
 
114
- AI features use the configured agent runtime and qualified model; see the [Agents](https://docs.page/vypdev/copilot/agents) and [Security & Operations](https://docs.page/vypdev/copilot/security-operations) documentation. You can run progress and Bugbot locally through the [Single actions → Workflow & CLI](https://docs.page/vypdev/copilot/single-actions/workflow-and-cli) path.
70
+ Release templates are registry-neutral. Publishing your application or package requires your own build, validation, and deployment steps. This repository's npm publishing workflow is an example, not something setup installs into every consumer repository.
115
71
 
116
- The programmatic Bugbot API is request-only: `review(BugbotReviewRequest)` is
117
- the sole review entrypoint, and internal runtime aggregates are not exported.
118
- See the [Programmatic API](https://docs.page/vypdev/copilot/bugbot/programmatic-api).
72
+ ## Advanced integrations and contributing
119
73
 
120
- ---
74
+ For a manually maintained workflow, use `vypdev/copilot@v3` and supply `token: ${{ secrets.PAT }}`. Follow the [manual integration instructions](https://docs.page/vypdev/copilot/how-to-use#manual-workflow-integration-advanced) to install the supporting resources and event workflows.
121
75
 
122
- ## Contributing
76
+ The request-only `@vypdev/copilot/bugbot` API is documented in the [programmatic API guide](https://docs.page/vypdev/copilot/bugbot/programmatic-api). For local commands, see [Workflow & CLI](https://docs.page/vypdev/copilot/single-actions/workflow-and-cli).
123
77
 
124
- See [CONTRIBUTING.md](CONTRIBUTING.md) for development setup, conventions, and how to submit changes.
78
+ See [CONTRIBUTING.md](CONTRIBUTING.md) for development setup and contribution requirements.
package/action.yml CHANGED
@@ -45,7 +45,7 @@ inputs:
45
45
  description: "Hours without issue activity before the scheduled inactivity action closes a waiting issue."
46
46
  default: "168"
47
47
  emoji-labeled-title:
48
- description: "Enable titles with emojis based on issue labels."
48
+ description: "Enable label-based issue titles and conventional linked PR titles, preserving author Conventional Commits headers."
49
49
  default: "true"
50
50
  issue-managed-branches:
51
51
  description: "Let the Action create linked branches after an authorized in-progress start."
@@ -5152,6 +5152,8 @@ var _ApplicationError_cause;
5152
5152
  Object.defineProperty(exports, "__esModule", ({ value: true }));
5153
5153
  exports.ApplicationError = exports.APPLICATION_ERROR_METADATA = exports.APPLICATION_ERROR_RECOVERY_IDS = void 0;
5154
5154
  exports.isApplicationErrorCorrelationId = isApplicationErrorCorrelationId;
5155
+ const closed_issue_reconciliation_1 = __nccwpck_require__(1565);
5156
+ const approval_evidence_diagnostic_1 = __nccwpck_require__(8205);
5155
5157
  const branch_sync_validation_1 = __nccwpck_require__(981);
5156
5158
  exports.APPLICATION_ERROR_RECOVERY_IDS = Object.freeze([
5157
5159
  'pull-request-link-restored',
@@ -5167,6 +5169,8 @@ exports.APPLICATION_ERROR_RECOVERY_IDS = Object.freeze([
5167
5169
  'sdd-draft-size-exceeded',
5168
5170
  'sdd-draft-format-invalid',
5169
5171
  'workspace-changes-rejected',
5172
+ 'closed-issue-reconciliation-failed',
5173
+ 'approval-evidence-read-failed',
5170
5174
  ]);
5171
5175
  const PRESERVED_STATE = 'Existing persisted state and completed external effects were preserved.';
5172
5176
  const UNCHANGED_STATE = 'No new state or external effect was created.';
@@ -5358,6 +5362,8 @@ class ApplicationError extends Error {
5358
5362
  exports.ApplicationError = ApplicationError;
5359
5363
  _ApplicationError_cause = new WeakMap();
5360
5364
  const RECOVERY_VARIABLE_KEYS = Object.freeze({
5365
+ 'closed-issue-reconciliation-failed': Object.freeze(['resultId', 'phase', 'state', 'reason', 'changed', 'remaining']),
5366
+ 'approval-evidence-read-failed': Object.freeze(['operation', 'reason', 'permission']),
5361
5367
  'pull-request-link-restored': Object.freeze([]),
5362
5368
  'pull-request-link-base-retained': Object.freeze([]),
5363
5369
  'pull-request-link-reference-retained': Object.freeze([]),
@@ -5410,6 +5416,20 @@ function normalizeApplicationErrorRecovery(recovery) {
5410
5416
  && !branch_sync_validation_1.BRANCH_SYNC_VALIDATION_CODES.some(code => code === variables.validationCode)) {
5411
5417
  throw new TypeError('Application error recovery synchronization validation code is invalid.');
5412
5418
  }
5419
+ if (recovery.id === 'closed-issue-reconciliation-failed'
5420
+ && (!closed_issue_reconciliation_1.CLOSED_ISSUE_RESULTS.some(value => value === variables.resultId)
5421
+ || !closed_issue_reconciliation_1.CLOSED_ISSUE_PHASES.some(value => value === variables.phase)
5422
+ || !['open', 'closed', 'unavailable'].includes(variables.state)
5423
+ || !closed_issue_reconciliation_1.CLOSED_ISSUE_REASONS.some(value => value === variables.reason)
5424
+ || ![variables.changed, variables.remaining].every(value => typeof value === 'number' && Number.isSafeInteger(value) && value >= 0 && value <= 3000))) {
5425
+ throw new TypeError('Closed issue reconciliation diagnostic is invalid.');
5426
+ }
5427
+ if (recovery.id === 'approval-evidence-read-failed'
5428
+ && (!Object.prototype.hasOwnProperty.call(approval_evidence_diagnostic_1.APPROVAL_EVIDENCE_PERMISSIONS, variables.operation)
5429
+ || !approval_evidence_diagnostic_1.APPROVAL_EVIDENCE_REASONS.some(reason => reason === variables.reason)
5430
+ || approval_evidence_diagnostic_1.APPROVAL_EVIDENCE_PERMISSIONS[variables.operation] !== variables.permission)) {
5431
+ throw new TypeError('Approval evidence diagnostic is invalid.');
5432
+ }
5413
5433
  return Object.freeze({
5414
5434
  id: recovery.id,
5415
5435
  variables: Object.freeze({ ...variables }),
@@ -5468,6 +5488,43 @@ function isAgentConfigurationReady(configuration) {
5468
5488
  }
5469
5489
 
5470
5490
 
5491
+ /***/ }),
5492
+
5493
+ /***/ 8205:
5494
+ /***/ ((__unused_webpack_module, exports) => {
5495
+
5496
+
5497
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
5498
+ exports.APPROVAL_EVIDENCE_REASONS = exports.APPROVAL_EVIDENCE_PERMISSIONS = void 0;
5499
+ /** Closed vocabulary: no provider text, URLs, headers, policy values or credentials. */
5500
+ exports.APPROVAL_EVIDENCE_PERMISSIONS = Object.freeze({
5501
+ 'evidence': 'repository-read',
5502
+ 'pull-request': 'pull-requests-read',
5503
+ 'base-ref': 'contents-read',
5504
+ 'merge-commit': 'contents-read',
5505
+ 'policy': 'actions-variables-read',
5506
+ 'files': 'pull-requests-read',
5507
+ 'reviews': 'pull-requests-read',
5508
+ 'comments': 'issues-read',
5509
+ 'head-checks': 'checks-read',
5510
+ 'merge-checks': 'checks-read',
5511
+ 'head-runs': 'actions-read',
5512
+ 'merge-runs': 'actions-read',
5513
+ 'jobs': 'actions-read',
5514
+ 'rules': 'metadata-read',
5515
+ 'classic-protection': 'administration-read',
5516
+ 'authenticated-user': 'authenticated-user-read',
5517
+ 'coverage-artifacts': 'actions-read',
5518
+ 'coverage-download': 'actions-read',
5519
+ 'coverage-parse': 'actions-read',
5520
+ });
5521
+ exports.APPROVAL_EVIDENCE_REASONS = Object.freeze([
5522
+ 'http-400', 'http-401', 'http-403', 'http-404', 'http-409', 'http-422', 'http-429',
5523
+ 'http-500', 'http-502', 'http-503', 'http-504', 'transport-unavailable',
5524
+ 'invalid-response', 'invalid-page', 'page-limit', 'artifact-unavailable', 'artifact-invalid', 'artifact-mismatch',
5525
+ ]);
5526
+
5527
+
5471
5528
  /***/ }),
5472
5529
 
5473
5530
  /***/ 981:
@@ -5913,6 +5970,24 @@ function countActionableBugbotFindings(counts) {
5913
5970
  }
5914
5971
 
5915
5972
 
5973
+ /***/ }),
5974
+
5975
+ /***/ 1565:
5976
+ /***/ ((__unused_webpack_module, exports) => {
5977
+
5978
+
5979
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
5980
+ exports.CLOSED_ISSUE_REASONS = exports.CLOSED_ISSUE_PHASES = exports.CLOSED_ISSUE_RESULTS = void 0;
5981
+ exports.CLOSED_ISSUE_RESULTS = Object.freeze([
5982
+ 'ReconcileClosedIssueMetadataUseCase', 'CloseIssueAfterMergingUseCase', 'RetireBranchSyncUseCase', 'RetireProgressUseCase',
5983
+ ]);
5984
+ exports.CLOSED_ISSUE_PHASES = Object.freeze([
5985
+ 'identity', 'read', 'native-fence', 'label-remove', 'label-add', 'metadata-verification',
5986
+ 'card-inventory', 'card-freshness', 'card-update', 'card-verification',
5987
+ ]);
5988
+ exports.CLOSED_ISSUE_REASONS = Object.freeze(['completed', 'not_planned', 'duplicate', 'reopened', 'unknown', 'unavailable']);
5989
+
5990
+
5916
5991
  /***/ }),
5917
5992
 
5918
5993
  /***/ 8623:
@@ -1,9 +1,13 @@
1
+ import { type ClosedIssueReconciliationFacts } from '../../domain/closed_issue_reconciliation';
2
+ import { type ApprovalEvidenceDiagnostic } from '../../domain/approval_evidence_diagnostic';
1
3
  import { type BranchSyncValidationCode } from '../../domain/branch_sync_validation';
2
4
  export type ApplicationErrorKind = 'configuration' | 'authorization' | 'provider' | 'agent' | 'validation' | 'workflow' | 'unknown';
3
5
  export type ApplicationErrorCode = 'configuration.invalid' | 'configuration.unsupported' | 'authorization.denied' | 'authorization.credential-invalid' | 'provider.not-found' | 'provider.conflict' | 'provider.rate-limited' | 'provider.unavailable' | 'provider.contract-invalid' | 'agent.policy-rejected' | 'agent.failed' | 'locale.output-invalid' | 'locale.translation-failed' | 'validation.invalid-input' | 'validation.evidence-too-large' | 'validation.evidence-unavailable' | 'workflow.invalid-event' | 'workflow.stale' | 'workflow.cancelled' | 'workflow.failed' | 'workflow.presentation-pending' | 'timeout' | 'unexpected';
4
- export declare const APPLICATION_ERROR_RECOVERY_IDS: readonly ["pull-request-link-restored", "pull-request-link-base-retained", "pull-request-link-reference-retained", "pull-request-link-base-and-reference-retained", "managed-branch-enrichment-failed", "inactivity-explanation-failed", "bugbot-review-blocks-pending", "branch-sync-agent-disabled", "branch-sync-fixer-unavailable", "branch-sync-resolution-invalid", "sdd-draft-size-exceeded", "sdd-draft-format-invalid", "workspace-changes-rejected"];
6
+ export declare const APPLICATION_ERROR_RECOVERY_IDS: readonly ["pull-request-link-restored", "pull-request-link-base-retained", "pull-request-link-reference-retained", "pull-request-link-base-and-reference-retained", "managed-branch-enrichment-failed", "inactivity-explanation-failed", "bugbot-review-blocks-pending", "branch-sync-agent-disabled", "branch-sync-fixer-unavailable", "branch-sync-resolution-invalid", "sdd-draft-size-exceeded", "sdd-draft-format-invalid", "workspace-changes-rejected", "closed-issue-reconciliation-failed", "approval-evidence-read-failed"];
5
7
  export type ApplicationErrorRecoveryId = typeof APPLICATION_ERROR_RECOVERY_IDS[number];
6
8
  interface ApplicationErrorRecoveryVariables {
9
+ readonly 'closed-issue-reconciliation-failed': ClosedIssueReconciliationFacts;
10
+ readonly 'approval-evidence-read-failed': ApprovalEvidenceDiagnostic;
7
11
  readonly 'pull-request-link-restored': Readonly<Record<string, never>>;
8
12
  readonly 'pull-request-link-base-retained': Readonly<Record<string, never>>;
9
13
  readonly 'pull-request-link-reference-retained': Readonly<Record<string, never>>;
@@ -0,0 +1,30 @@
1
+ /** Closed vocabulary: no provider text, URLs, headers, policy values or credentials. */
2
+ export declare const APPROVAL_EVIDENCE_PERMISSIONS: Readonly<{
3
+ readonly evidence: "repository-read";
4
+ readonly 'pull-request': "pull-requests-read";
5
+ readonly 'base-ref': "contents-read";
6
+ readonly 'merge-commit': "contents-read";
7
+ readonly policy: "actions-variables-read";
8
+ readonly files: "pull-requests-read";
9
+ readonly reviews: "pull-requests-read";
10
+ readonly comments: "issues-read";
11
+ readonly 'head-checks': "checks-read";
12
+ readonly 'merge-checks': "checks-read";
13
+ readonly 'head-runs': "actions-read";
14
+ readonly 'merge-runs': "actions-read";
15
+ readonly jobs: "actions-read";
16
+ readonly rules: "metadata-read";
17
+ readonly 'classic-protection': "administration-read";
18
+ readonly 'authenticated-user': "authenticated-user-read";
19
+ readonly 'coverage-artifacts': "actions-read";
20
+ readonly 'coverage-download': "actions-read";
21
+ readonly 'coverage-parse': "actions-read";
22
+ }>;
23
+ export type ApprovalEvidenceOperation = keyof typeof APPROVAL_EVIDENCE_PERMISSIONS;
24
+ export declare const APPROVAL_EVIDENCE_REASONS: readonly ["http-400", "http-401", "http-403", "http-404", "http-409", "http-422", "http-429", "http-500", "http-502", "http-503", "http-504", "transport-unavailable", "invalid-response", "invalid-page", "page-limit", "artifact-unavailable", "artifact-invalid", "artifact-mismatch"];
25
+ export type ApprovalEvidenceReason = typeof APPROVAL_EVIDENCE_REASONS[number];
26
+ export type ApprovalEvidenceDiagnostic = {
27
+ readonly operation: ApprovalEvidenceOperation;
28
+ readonly reason: ApprovalEvidenceReason;
29
+ readonly permission: typeof APPROVAL_EVIDENCE_PERMISSIONS[ApprovalEvidenceOperation];
30
+ };
@@ -0,0 +1,11 @@
1
+ export declare const CLOSED_ISSUE_RESULTS: readonly ["ReconcileClosedIssueMetadataUseCase", "CloseIssueAfterMergingUseCase", "RetireBranchSyncUseCase", "RetireProgressUseCase"];
2
+ export declare const CLOSED_ISSUE_PHASES: readonly ["identity", "read", "native-fence", "label-remove", "label-add", "metadata-verification", "card-inventory", "card-freshness", "card-update", "card-verification"];
3
+ export declare const CLOSED_ISSUE_REASONS: readonly ["completed", "not_planned", "duplicate", "reopened", "unknown", "unavailable"];
4
+ export type ClosedIssueReconciliationFacts = {
5
+ readonly resultId: typeof CLOSED_ISSUE_RESULTS[number];
6
+ readonly phase: typeof CLOSED_ISSUE_PHASES[number];
7
+ readonly state: 'open' | 'closed' | 'unavailable';
8
+ readonly reason: typeof CLOSED_ISSUE_REASONS[number];
9
+ readonly changed: number;
10
+ readonly remaining: number;
11
+ };