@coralai/sps-cli 0.23.16 → 0.23.18
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 +25 -21
- package/dist/core/taskPrompts.d.ts.map +1 -1
- package/dist/core/taskPrompts.js +11 -8
- package/dist/core/taskPrompts.js.map +1 -1
- package/dist/engines/CloseoutEngine.d.ts +10 -11
- package/dist/engines/CloseoutEngine.d.ts.map +1 -1
- package/dist/engines/CloseoutEngine.js +333 -58
- package/dist/engines/CloseoutEngine.js.map +1 -1
- package/dist/engines/ExecutionEngine.d.ts +0 -6
- package/dist/engines/ExecutionEngine.d.ts.map +1 -1
- package/dist/engines/ExecutionEngine.js +16 -103
- package/dist/engines/ExecutionEngine.js.map +1 -1
- package/dist/manager/post-actions.d.ts +17 -3
- package/dist/manager/post-actions.d.ts.map +1 -1
- package/dist/manager/post-actions.js +55 -35
- package/dist/manager/post-actions.js.map +1 -1
- package/dist/manager/recovery.d.ts +2 -0
- package/dist/manager/recovery.d.ts.map +1 -1
- package/dist/manager/recovery.js +42 -8
- package/dist/manager/recovery.js.map +1 -1
- package/dist/manager/runtime-coordinator.d.ts.map +1 -1
- package/dist/manager/runtime-coordinator.js +9 -1
- package/dist/manager/runtime-coordinator.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -4,15 +4,15 @@
|
|
|
4
4
|
|
|
5
5
|
> **中文文档**: See `README-CN.md` in the source repository for Chinese documentation.
|
|
6
6
|
|
|
7
|
-
**v0.23.
|
|
7
|
+
**v0.23.18**
|
|
8
8
|
|
|
9
9
|
SPS (Smart Pipeline System) is a fully automated development pipeline CLI tool driven by AI Agents. From task card creation to code merging, the entire process runs unattended.
|
|
10
10
|
|
|
11
11
|
```
|
|
12
|
-
Create cards -> Start pipeline ->
|
|
12
|
+
Create cards -> Start pipeline -> Development worker completes branch work -> QA worker integrates branch -> Notify completion
|
|
13
13
|
```
|
|
14
14
|
|
|
15
|
-
Current design direction: SPS is converging on a worker-owned two-phase execution model. `Inprogress` is the development phase, `QA` is the integration/merge phase, and label-driven skill profile injection remains part of worker prompt construction. `v0.23.16`
|
|
15
|
+
Current design direction: SPS is converging on a worker-owned two-phase execution model. `Inprogress` is the development phase, `QA` is the integration/merge phase, and label-driven skill profile injection remains part of worker prompt construction. `v0.23.16` added per-worktree `.sps/development_prompt.txt` and `.sps/integration_prompt.txt`, plus phase-aware recovery prompt selection. `v0.23.17` moved the main integration path into the `QA` worker phase. `v0.23.18` finishes the state-machine alignment for this step: runtime projection and task-level recovery now consistently map `Inprogress` to development and `QA` to integration.
|
|
16
16
|
|
|
17
17
|
## Table of Contents
|
|
18
18
|
|
|
@@ -110,22 +110,23 @@ Each task card progresses through the following state machine, fully driven by S
|
|
|
110
110
|
|
|
111
111
|
### MR_MODE=none (Default, Recommended)
|
|
112
112
|
|
|
113
|
-
|
|
113
|
+
The main path is now a worker-owned two-phase flow:
|
|
114
114
|
|
|
115
115
|
```
|
|
116
|
-
Planning -> Backlog -> Todo -> Inprogress -> Done
|
|
116
|
+
Planning -> Backlog -> Todo -> Inprogress -> QA -> Done
|
|
117
117
|
```
|
|
118
118
|
|
|
119
119
|
| Phase | Trigger Engine | Action |
|
|
120
120
|
|-------|---------------|--------|
|
|
121
121
|
| Planning -> Backlog | SchedulerEngine | Select card for queue, check admission criteria |
|
|
122
|
-
| Backlog -> Todo | ExecutionEngine | Create branch, create worktree, generate
|
|
123
|
-
| Todo -> Inprogress | ExecutionEngine | Assign Worker slot,
|
|
124
|
-
| Inprogress ->
|
|
122
|
+
| Backlog -> Todo | ExecutionEngine | Create branch, create worktree, generate phase prompts |
|
|
123
|
+
| Todo -> Inprogress | ExecutionEngine | Assign Worker slot, launch development worker |
|
|
124
|
+
| Inprogress -> QA | PostActions | Detect development completion, release slot, move card to QA |
|
|
125
|
+
| QA -> Done | CloseoutEngine | Launch/resume integration worker, verify merge evidence, release resources, clean up worktree |
|
|
125
126
|
|
|
126
|
-
|
|
127
|
+
In this model, the development worker stops at “implementation complete and committed on the task branch”. The QA worker owns integration: it must inspect the current worktree, rebase/merge the task branch back into the target branch, resolve conflicts, and finish the integration. `.sps/merge.sh` remains only as a legacy/manual fallback while the old merge helpers are being removed. See `docs/design/10-acp-worker-runtime-design.md` for the persistent Agent transport model, the full worker state breakdown, and the local same-user OAuth reuse boundary. See `docs/design/11-runtime-state-authority-and-recovery-redesign.md` for the redesign that demotes `state.json` / `acp-state.json` to projections and re-centers recovery around PM state plus worktree/git evidence. See `docs/design/12-unified-runtime-state-machine.md` for the next-step module cleanup plan that converges `Execution`, `Recovery`, `Monitor`, `Closeout`, and `PostActions` into one state machine authority plus a single runtime coordinator/write path.
|
|
127
128
|
|
|
128
|
-
PTY transport now extends the same session/run model into the default CLI-backed worker path, but the restart boundary is now explicit. Within a running `tick` process, `WORKER_TRANSPORT=pty` still uses `sessionId/runId` for retries and conflict follow-up runs. Across a `tick` restart, SPS no longer pretends it can recover the old PTY session; it recovers the task from `TaskLease + WorktreeEvidence`, judges completion from git/worktree evidence first, and starts a fresh PTY run in the same worktree only if work remains. `WORKER_TRANSPORT=acp` still keeps its session-based model. The PTY hardening sequence remains: v0.23.5 upgrades `node-pty` to a macOS-safe build, auto-restores missing execute permissions on `spawn-helper`, and auto-skips the benign Codex update notice during PTY boot so `ensureSession()` can reach `ready`; v0.23.6 fixes PTY run lifecycle tracking so newly submitted conflict-resolution runs no longer get marked `completed` during the first inspect cycle before the CLI actually leaves the prompt; v0.23.7 switches `sps worker dashboard` from raw PTY pane dumps to structured worker summaries; v0.23.9 validates persisted PTY sessions by PID before treating them as alive; v0.23.10 aligns PM and read-only views around runtime-owned cards; v0.23.11 introduces PM + worktree + session-first runtime projection; v0.23.12 moves recovery/execution onto `TaskLease + WorktreeEvidence`; v0.23.13 pulls monitor/closeout onto the same lease-first model; v0.23.14 completes the write-path migration through `RuntimeStore`;
|
|
129
|
+
PTY transport now extends the same session/run model into the default CLI-backed worker path, but the restart boundary is now explicit. Within a running `tick` process, `WORKER_TRANSPORT=pty` still uses `sessionId/runId` for retries and conflict follow-up runs. Across a `tick` restart, SPS no longer pretends it can recover the old PTY session; it recovers the task from `TaskLease + WorktreeEvidence`, judges completion from git/worktree evidence first, and starts a fresh PTY run in the same worktree only if work remains. `WORKER_TRANSPORT=acp` still keeps its session-based model. The PTY hardening sequence remains: v0.23.5 upgrades `node-pty` to a macOS-safe build, auto-restores missing execute permissions on `spawn-helper`, and auto-skips the benign Codex update notice during PTY boot so `ensureSession()` can reach `ready`; v0.23.6 fixes PTY run lifecycle tracking so newly submitted conflict-resolution runs no longer get marked `completed` during the first inspect cycle before the CLI actually leaves the prompt; v0.23.7 switches `sps worker dashboard` from raw PTY pane dumps to structured worker summaries; v0.23.9 validates persisted PTY sessions by PID before treating them as alive; v0.23.10 aligns PM and read-only views around runtime-owned cards; v0.23.11 introduces PM + worktree + session-first runtime projection; v0.23.12 moves recovery/execution onto `TaskLease + WorktreeEvidence`; v0.23.13 pulls monitor/closeout onto the same lease-first model; v0.23.14 completes the write-path migration through `RuntimeStore`; v0.23.15 finalizes PTY restart behavior as task-level recovery instead of fake session-level recovery; v0.23.17 moves merge ownership into the QA worker phase; and v0.23.18 aligns recovery/projection so `Inprogress` always resumes development and `QA` always resumes integration. Codex has been verified on launch, task-level recovery, direct merge, same-process resume, PTY conflict fallback, spawn-helper self-heal, immediate post-launch run-state inspection, summary-style dashboard rendering, cold-state liveness validation, runtime-owned PM reconciliation, read-only snapshot rendering, and lease-first recovery/execution/monitor/closeout flow; Claude still depends on host-side `claude auth login` before reaching `ready`.
|
|
129
130
|
|
|
130
131
|
### MR_MODE=create (Optional)
|
|
131
132
|
|
|
@@ -395,7 +396,7 @@ sps tick <project> [project2] [project3] ... [--once] [--json] [--dry-run]
|
|
|
395
396
|
**Execution order (per tick cycle):**
|
|
396
397
|
|
|
397
398
|
1. **scheduler tick** -- Planning -> Backlog (select cards for queue)
|
|
398
|
-
2. **qa tick** -- QA ->
|
|
399
|
+
2. **qa tick** -- QA -> integration worker -> Done (prioritize finishing branch integration and freeing Worker slots)
|
|
399
400
|
3. **pipeline tick** -- Backlog -> Todo -> Inprogress (prepare environment + launch Worker)
|
|
400
401
|
4. **monitor tick** -- Anomaly inspection and alignment
|
|
401
402
|
|
|
@@ -542,7 +543,7 @@ sps pipeline tick <project> [--json] [--dry-run]
|
|
|
542
543
|
**Internal steps:**
|
|
543
544
|
|
|
544
545
|
1. **Check Inprogress cards** -- Detect Worker completion status. MR_MODE=none pushes directly to Done; MR_MODE=create confirms MR then pushes to Done
|
|
545
|
-
2. **Process Backlog cards** -- Create branch + create worktree + generate
|
|
546
|
+
2. **Process Backlog cards** -- Create branch + create worktree + generate phase prompts -> push to Todo
|
|
546
547
|
3. **Process Todo cards** -- Assign Worker slot + build task context + launch Worker -> push to Inprogress
|
|
547
548
|
|
|
548
549
|
Limited by `MAX_ACTIONS_PER_TICK` (default 1) to prevent launching too many Workers in a single tick cycle. There is a delay between multiple Worker launches (2 seconds in print mode, 10 seconds in interactive mode).
|
|
@@ -767,9 +768,9 @@ QA close-out and worktree cleanup.
|
|
|
767
768
|
sps qa tick <project> [--json]
|
|
768
769
|
```
|
|
769
770
|
|
|
770
|
-
**When MR_MODE=none:** The QA
|
|
771
|
+
**When MR_MODE=none:** QA is the integration phase. The QA worker must inspect the task worktree, continue merge/rebase work, resolve conflicts, and drive the branch back into the target branch. `qa tick` launches or resumes that integration worker and only moves the card to `Done` after merge evidence is observed.
|
|
771
772
|
|
|
772
|
-
**When MR_MODE=create:** QA
|
|
773
|
+
**When MR_MODE=create:** QA remains a compatibility path while MR flow is still being converged on the same worker-owned model.
|
|
773
774
|
|
|
774
775
|
**Automatic worktree cleanup:**
|
|
775
776
|
|
|
@@ -825,8 +826,10 @@ sps monitor tick my-project --json
|
|
|
825
826
|
|------|---------|-----------------|
|
|
826
827
|
| `CLAUDE.md` | Project rules for Claude Code Worker | Yes |
|
|
827
828
|
| `AGENTS.md` | Project rules for Codex Worker | Yes |
|
|
828
|
-
| `.sps/task_prompt.txt` |
|
|
829
|
-
| `.sps/
|
|
829
|
+
| `.sps/task_prompt.txt` | Development-phase compatibility prompt alias | No (.gitignore) |
|
|
830
|
+
| `.sps/development_prompt.txt` | Development-phase worker prompt | No (.gitignore) |
|
|
831
|
+
| `.sps/integration_prompt.txt` | Integration-phase worker prompt | No (.gitignore) |
|
|
832
|
+
| `.sps/merge.sh` | Legacy/manual merge fallback script | No (.gitignore) |
|
|
830
833
|
| `docs/DECISIONS.md` | Project knowledge base -- architecture decisions and technical choices | Yes (Worker auto-maintained) |
|
|
831
834
|
| `docs/CHANGELOG.md` | Project knowledge base -- change log | Yes (Worker auto-maintained) |
|
|
832
835
|
|
|
@@ -843,8 +846,9 @@ Prompt assembly order: Skill Profile -> CLAUDE.md/AGENTS.md -> DECISIONS.md/CHAN
|
|
|
843
846
|
1. `CLAUDE.md` and `AGENTS.md` are committed to the repository's main branch
|
|
844
847
|
2. When creating a git worktree, these files are automatically inherited
|
|
845
848
|
3. On startup, the Worker reads CLAUDE.md to understand project rules (auto-discovered in interactive mode; auto-loaded from cwd in print mode)
|
|
846
|
-
4. Task-specific information
|
|
847
|
-
5.
|
|
849
|
+
4. Task-specific information is written into `.sps/development_prompt.txt` and `.sps/integration_prompt.txt` inside each worktree; `.sps/task_prompt.txt` remains as a development-phase compatibility alias
|
|
850
|
+
5. Development workers use the development prompt and stop at a committed task branch; QA workers use the integration prompt and complete merge/conflict work
|
|
851
|
+
6. `.sps/merge.sh` remains only as a legacy/manual fallback while the fixed merge path is being removed
|
|
848
852
|
|
|
849
853
|
### Project Knowledge Base
|
|
850
854
|
|
|
@@ -907,7 +911,7 @@ Project conf can reference global variables (e.g., `${PLANE_URL}`).
|
|
|
907
911
|
|-------|----------|---------|-------------|
|
|
908
912
|
| `PM_TOOL` | No | `trello` | PM backend type: `plane` / `trello` / `markdown` |
|
|
909
913
|
| `PIPELINE_LABEL` | No | `AI-PIPELINE` | Pipeline card label |
|
|
910
|
-
| `MR_MODE` | No | `none` | Merge mode: `none` (
|
|
914
|
+
| `MR_MODE` | No | `none` | Merge mode: `none` (worker-owned QA integration back to target branch) / `create` (create MR, review flow under development) |
|
|
911
915
|
|
|
912
916
|
#### Worker
|
|
913
917
|
|
|
@@ -974,7 +978,7 @@ MAX_CONCURRENT_WORKERS=3
|
|
|
974
978
|
MAX_ACTIONS_PER_TICK=1
|
|
975
979
|
|
|
976
980
|
# Merge mode
|
|
977
|
-
MR_MODE="none" # none (
|
|
981
|
+
MR_MODE="none" # none (worker-owned QA integration) or create (create MR)
|
|
978
982
|
```
|
|
979
983
|
|
|
980
984
|
---
|
|
@@ -1029,7 +1033,7 @@ Layer 0 Core Runtime Configuration, paths, state, locks, logging
|
|
|
1029
1033
|
| Engine | Responsibility |
|
|
1030
1034
|
|--------|---------------|
|
|
1031
1035
|
| SchedulerEngine | Planning -> Backlog (card selection, sorting, admission checks) |
|
|
1032
|
-
| ExecutionEngine | Backlog -> Todo -> Inprogress
|
|
1036
|
+
| ExecutionEngine | Backlog -> Todo -> Inprogress (prepare environment, launch development Worker, detect completion handoff to QA) |
|
|
1033
1037
|
| CloseoutEngine | Worktree cleanup (legacy QA card handling when MR_MODE=create) |
|
|
1034
1038
|
| MonitorEngine | Anomaly detection (orphan cleanup, timeouts, blocks, state alignment, dead Worker completion detection) |
|
|
1035
1039
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"taskPrompts.d.ts","sourceRoot":"","sources":["../../src/core/taskPrompts.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AACpD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAEjD,MAAM,MAAM,eAAe,GAAG,aAAa,GAAG,aAAa,CAAC;AAE5D,eAAO,MAAM,uBAAuB,2BAA2B,CAAC;AAChE,eAAO,MAAM,uBAAuB,2BAA2B,CAAC;AAChE,eAAO,MAAM,uBAAuB,oBA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,CAAC;IACrB,SAAS,EAAE,MAAM,GAAG,QAAQ,CAAC;IAC7B,eAAe,EAAE,MAAM,CAAC;IACxB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,UAAU,kBAAmB,SAAQ,mBAAmB;IACtD,KAAK,EAAE,eAAe,CAAC;CACxB;AAED,wBAAgB,iBAAiB,CAC/B,OAAO,EAAE,SAAS,GAAG,IAAI,GAAG,SAAS,EACrC,UAAU,CAAC,EAAE,cAAc,GAAG,IAAI,GACjC,eAAe,CAOjB;AAED,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,eAAe,GAAG,MAAM,CAEjE;AAED,wBAAgB,gBAAgB,CAAC,GAAG,EAAE,kBAAkB,GAAG,MAAM,CAsBhE;AA6ED,wBAAgB,iBAAiB,CAC/B,KAAK,EAAE,eAAe,EACtB,YAAY,EAAE,MAAM,EACpB,UAAU,EAAE,MAAM,EAClB,cAAc,EAAE,MAAM,GAAG,IAAI,GAC5B,MAAM,CAuBR"}
|
package/dist/core/taskPrompts.js
CHANGED
|
@@ -4,6 +4,8 @@ export const LEGACY_TASK_PROMPT_FILE = 'task_prompt.txt';
|
|
|
4
4
|
export function selectWorkerPhase(pmState, leasePhase) {
|
|
5
5
|
if (pmState === 'QA')
|
|
6
6
|
return 'integration';
|
|
7
|
+
if (pmState === 'Inprogress')
|
|
8
|
+
return 'development';
|
|
7
9
|
if (leasePhase && ['merging', 'resolving_conflict'].includes(leasePhase)) {
|
|
8
10
|
return 'integration';
|
|
9
11
|
}
|
|
@@ -65,13 +67,14 @@ Rules:
|
|
|
65
67
|
2. Integrate branch ${ctx.branchName} back into target branch ${ctx.targetBranch}
|
|
66
68
|
3. If there are conflicts, resolve them carefully based on the task intent and current codebase
|
|
67
69
|
4. Complete any required git add / rebase --continue / merge follow-up steps
|
|
68
|
-
5.
|
|
69
|
-
6.
|
|
70
|
-
7.
|
|
71
|
-
8.
|
|
70
|
+
5. If the integration requires pushing the target branch or the task branch, do it as part of this phase
|
|
71
|
+
6. Validate the repository state before finishing
|
|
72
|
+
7. Do not restart development from scratch unless the repository state clearly requires code changes to complete integration
|
|
73
|
+
8. If you are blocked by permissions, confirmations, or external policy, report the exact blocker instead of looping forever
|
|
74
|
+
9. Say "done" only after integration work is complete or you have identified a concrete external blocker
|
|
72
75
|
|
|
73
76
|
Completion rule:
|
|
74
|
-
- The preferred outcome of this phase is:
|
|
77
|
+
- The preferred outcome of this phase is: branch ${ctx.branchName} has been successfully merged back into ${ctx.targetBranch}, and any required pushes have completed.
|
|
75
78
|
- Do not treat this phase as a fresh development task.`;
|
|
76
79
|
}
|
|
77
80
|
return `# Development Phase Instructions
|
|
@@ -93,12 +96,12 @@ Rules:
|
|
|
93
96
|
4. Commit the finished work to the current task branch ${ctx.branchName}
|
|
94
97
|
5. Do not merge into the target branch ${ctx.targetBranch} in this phase
|
|
95
98
|
6. Do not run merge scripts or perform integration work in this phase
|
|
96
|
-
7.
|
|
99
|
+
7. Do not push or update the target branch in this phase
|
|
97
100
|
8. If you are blocked by permissions, confirmations, or missing environment requirements, report the exact blocker
|
|
98
|
-
9. Say "done" only after the implementation work is complete and
|
|
101
|
+
9. Say "done" only after the implementation work is complete and committed on ${ctx.branchName}
|
|
99
102
|
|
|
100
103
|
Completion rule:
|
|
101
|
-
- The intended end of this phase is: the implementation is complete on branch ${ctx.branchName}
|
|
104
|
+
- The intended end of this phase is: the implementation is complete and committed on branch ${ctx.branchName}.
|
|
102
105
|
- Do not merge into ${ctx.targetBranch} in this phase.`;
|
|
103
106
|
}
|
|
104
107
|
export function buildResumePrompt(phase, worktreePath, branchName, originalPrompt) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"taskPrompts.js","sourceRoot":"","sources":["../../src/core/taskPrompts.ts"],"names":[],"mappings":"AAKA,MAAM,CAAC,MAAM,uBAAuB,GAAG,wBAAwB,CAAC;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AE,EAAE,CAAC;QAC5B,OAAO,MAAM,CAAC;IAChB,CAAC;IAED,OAAO,GAAG,MAAM,iCAAiC,cAAc,CAAC,IAAI,EAAE,EAAE,CAAC;AAC3E,CAAC"}
|
|
@@ -6,18 +6,12 @@ import type { Notifier } from '../interfaces/Notifier.js';
|
|
|
6
6
|
import type { AgentRuntime } from '../interfaces/AgentRuntime.js';
|
|
7
7
|
import type { CommandResult } from '../models/types.js';
|
|
8
8
|
/**
|
|
9
|
-
* CloseoutEngine handles the QA →
|
|
9
|
+
* CloseoutEngine handles the QA → Done pipeline.
|
|
10
10
|
*
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
* ├─ already merged → resource release → Done
|
|
16
|
-
* ├─ open + CI success + can_be_merged → attempt merge
|
|
17
|
-
* ├─ open + CI failed → self-repair or NEEDS-FIX
|
|
18
|
-
* ├─ open + CI running/pending → skip
|
|
19
|
-
* ├─ open + cannot_be_merged → CONFLICT
|
|
20
|
-
* └─ closed (not merged) → NEEDS-FIX
|
|
11
|
+
* In the worker-owned two-phase model, QA means integration:
|
|
12
|
+
* - the worker performs rebase / merge / conflict resolution
|
|
13
|
+
* - SPS only checks evidence, starts or resumes the integration worker,
|
|
14
|
+
* and finalizes the task after the branch is merged.
|
|
21
15
|
*/
|
|
22
16
|
export declare class CloseoutEngine {
|
|
23
17
|
private ctx;
|
|
@@ -31,6 +25,8 @@ export declare class CloseoutEngine {
|
|
|
31
25
|
constructor(ctx: ProjectContext, taskBackend: TaskBackend, repoBackend: RepoBackend, workerProvider: WorkerProvider, notifier?: Notifier | undefined, agentRuntime?: AgentRuntime | null);
|
|
32
26
|
tick(): Promise<CommandResult>;
|
|
33
27
|
private processQaCard;
|
|
28
|
+
private inspectQaWorker;
|
|
29
|
+
private startIntegrationWorker;
|
|
34
30
|
private processOpenMr;
|
|
35
31
|
private handleCiFailure;
|
|
36
32
|
private attemptMerge;
|
|
@@ -67,5 +63,8 @@ export declare class CloseoutEngine {
|
|
|
67
63
|
private notifySafe;
|
|
68
64
|
private resumeAcpWorker;
|
|
69
65
|
private logEvent;
|
|
66
|
+
private resolveIntegrationPrompt;
|
|
67
|
+
private isMergedToBase;
|
|
68
|
+
private releaseQaSlot;
|
|
70
69
|
}
|
|
71
70
|
//# sourceMappingURL=CloseoutEngine.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CloseoutEngine.d.ts","sourceRoot":"","sources":["../../src/engines/CloseoutEngine.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"CloseoutEngine.d.ts","sourceRoot":"","sources":["../../src/engines/CloseoutEngine.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACzD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAChE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAChE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAC;AACtE,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,2BAA2B,CAAC;AAC1D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;AAElE,OAAO,KAAK,EAAE,aAAa,EAAyC,MAAM,oBAAoB,CAAC;AAM/F;;;;;;;GAOG;AACH,qBAAa,cAAc;IAKvB,OAAO,CAAC,GAAG;IACX,OAAO,CAAC,WAAW;IACnB,OAAO,CAAC,WAAW;IACnB,OAAO,CAAC,cAAc;IACtB,OAAO,CAAC,QAAQ,CAAC;IACjB,OAAO,CAAC,YAAY;IATtB,OAAO,CAAC,GAAG,CAAS;IACpB,OAAO,CAAC,YAAY,CAAe;gBAGzB,GAAG,EAAE,cAAc,EACnB,WAAW,EAAE,WAAW,EACxB,WAAW,EAAE,WAAW,EACxB,cAAc,EAAE,cAAc,EAC9B,QAAQ,CAAC,EAAE,QAAQ,YAAA,EACnB,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