@idea1/cli 1.8.2 → 1.9.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 (147) hide show
  1. package/README.md +205 -69
  2. package/dist/cli/resolver.d.ts +1 -0
  3. package/dist/cli/resolver.d.ts.map +1 -1
  4. package/dist/cli/resolver.js +5 -0
  5. package/dist/cli/resolver.js.map +1 -1
  6. package/dist/cli.d.ts.map +1 -1
  7. package/dist/cli.js +2 -1
  8. package/dist/cli.js.map +1 -1
  9. package/dist/commands/approve-pr.d.ts.map +1 -1
  10. package/dist/commands/approve-pr.js +24 -41
  11. package/dist/commands/approve-pr.js.map +1 -1
  12. package/dist/commands/attach-project-item.d.ts.map +1 -1
  13. package/dist/commands/attach-project-item.js +27 -7
  14. package/dist/commands/attach-project-item.js.map +1 -1
  15. package/dist/commands/close-worktree.d.ts.map +1 -1
  16. package/dist/commands/close-worktree.js +4 -3
  17. package/dist/commands/close-worktree.js.map +1 -1
  18. package/dist/commands/help.d.ts.map +1 -1
  19. package/dist/commands/help.js +17 -11
  20. package/dist/commands/help.js.map +1 -1
  21. package/dist/commands/index.d.ts +2 -1
  22. package/dist/commands/index.d.ts.map +1 -1
  23. package/dist/commands/index.js +3 -1
  24. package/dist/commands/index.js.map +1 -1
  25. package/dist/commands/integrate.d.ts +13 -0
  26. package/dist/commands/integrate.d.ts.map +1 -0
  27. package/dist/commands/integrate.js +128 -0
  28. package/dist/commands/integrate.js.map +1 -0
  29. package/dist/commands/join-project-item.d.ts.map +1 -1
  30. package/dist/commands/join-project-item.js +22 -48
  31. package/dist/commands/join-project-item.js.map +1 -1
  32. package/dist/commands/next-workflow-step.d.ts.map +1 -1
  33. package/dist/commands/next-workflow-step.js +20 -21
  34. package/dist/commands/next-workflow-step.js.map +1 -1
  35. package/dist/commands/ready-for-approval.d.ts.map +1 -1
  36. package/dist/commands/ready-for-approval.js +27 -19
  37. package/dist/commands/ready-for-approval.js.map +1 -1
  38. package/dist/commands/release.d.ts +6 -0
  39. package/dist/commands/release.d.ts.map +1 -1
  40. package/dist/commands/release.js +189 -25
  41. package/dist/commands/release.js.map +1 -1
  42. package/dist/commands/ship-local-changes.d.ts +8 -0
  43. package/dist/commands/ship-local-changes.d.ts.map +1 -0
  44. package/dist/commands/ship-local-changes.js +34 -0
  45. package/dist/commands/ship-local-changes.js.map +1 -0
  46. package/dist/commands/start-agent-implementation.js +2 -2
  47. package/dist/commands/start-agent-implementation.js.map +1 -1
  48. package/dist/commands/start-dev-implementation.d.ts.map +1 -1
  49. package/dist/commands/start-dev-implementation.js +8 -3
  50. package/dist/commands/start-dev-implementation.js.map +1 -1
  51. package/dist/commands/start-project-item.d.ts +27 -0
  52. package/dist/commands/start-project-item.d.ts.map +1 -0
  53. package/dist/commands/start-project-item.js +325 -0
  54. package/dist/commands/start-project-item.js.map +1 -0
  55. package/dist/commands/start.d.ts +8 -2
  56. package/dist/commands/start.d.ts.map +1 -1
  57. package/dist/commands/start.js +76 -35
  58. package/dist/commands/start.js.map +1 -1
  59. package/dist/index.js +0 -0
  60. package/dist/interactive.d.ts.map +1 -1
  61. package/dist/interactive.js +164 -0
  62. package/dist/interactive.js.map +1 -1
  63. package/dist/jobs/job.d.ts +81 -0
  64. package/dist/jobs/job.d.ts.map +1 -0
  65. package/dist/jobs/job.js +258 -0
  66. package/dist/jobs/job.js.map +1 -0
  67. package/dist/jobs/targets.d.ts +58 -0
  68. package/dist/jobs/targets.d.ts.map +1 -0
  69. package/dist/jobs/targets.js +215 -0
  70. package/dist/jobs/targets.js.map +1 -0
  71. package/dist/lib/claude-options.d.ts +3 -2
  72. package/dist/lib/claude-options.d.ts.map +1 -1
  73. package/dist/lib/claude-options.js +15 -4
  74. package/dist/lib/claude-options.js.map +1 -1
  75. package/dist/lib/logger.d.ts +10 -0
  76. package/dist/lib/logger.d.ts.map +1 -1
  77. package/dist/lib/logger.js +16 -0
  78. package/dist/lib/logger.js.map +1 -1
  79. package/dist/lib/prompt.d.ts +7 -0
  80. package/dist/lib/prompt.d.ts.map +1 -1
  81. package/dist/lib/prompt.js +29 -0
  82. package/dist/lib/prompt.js.map +1 -1
  83. package/dist/lib/settings.d.ts +13 -3
  84. package/dist/lib/settings.d.ts.map +1 -1
  85. package/dist/lib/settings.js +12 -3
  86. package/dist/lib/settings.js.map +1 -1
  87. package/dist/lib/shell.d.ts +2 -1
  88. package/dist/lib/shell.d.ts.map +1 -1
  89. package/dist/lib/shell.js +17 -1
  90. package/dist/lib/shell.js.map +1 -1
  91. package/dist/services/git.d.ts +41 -13
  92. package/dist/services/git.d.ts.map +1 -1
  93. package/dist/services/git.js +85 -46
  94. package/dist/services/git.js.map +1 -1
  95. package/dist/services/github.d.ts +28 -0
  96. package/dist/services/github.d.ts.map +1 -1
  97. package/dist/services/github.js +82 -3
  98. package/dist/services/github.js.map +1 -1
  99. package/dist/services/setup.d.ts +4 -2
  100. package/dist/services/setup.d.ts.map +1 -1
  101. package/dist/services/setup.js +61 -37
  102. package/dist/services/setup.js.map +1 -1
  103. package/dist/services/workflow.d.ts +17 -0
  104. package/dist/services/workflow.d.ts.map +1 -0
  105. package/dist/services/workflow.js +39 -0
  106. package/dist/services/workflow.js.map +1 -0
  107. package/dist/services/worktree.js +1 -1
  108. package/dist/services/worktree.js.map +1 -1
  109. package/dist/types/index.d.ts +25 -24
  110. package/dist/types/index.d.ts.map +1 -1
  111. package/dist/version.d.ts +2 -1
  112. package/dist/version.d.ts.map +1 -1
  113. package/dist/version.js +3 -2
  114. package/dist/version.js.map +1 -1
  115. package/dist/workflow/engine/approval-flow.d.ts +10 -2
  116. package/dist/workflow/engine/approval-flow.d.ts.map +1 -1
  117. package/dist/workflow/engine/approval-flow.js +58 -9
  118. package/dist/workflow/engine/approval-flow.js.map +1 -1
  119. package/dist/workflow/engine/handlers/agent-implementation.d.ts.map +1 -1
  120. package/dist/workflow/engine/handlers/agent-implementation.js +4 -11
  121. package/dist/workflow/engine/handlers/agent-implementation.js.map +1 -1
  122. package/dist/workflow/engine/handlers/approve-pr.d.ts.map +1 -1
  123. package/dist/workflow/engine/handlers/approve-pr.js +9 -3
  124. package/dist/workflow/engine/handlers/approve-pr.js.map +1 -1
  125. package/dist/workflow/engine/handlers/dev-implementation.d.ts +2 -2
  126. package/dist/workflow/engine/handlers/dev-implementation.d.ts.map +1 -1
  127. package/dist/workflow/engine/handlers/dev-implementation.js +13 -7
  128. package/dist/workflow/engine/handlers/dev-implementation.js.map +1 -1
  129. package/dist/workflow/engine/handlers/ready-for-approval.d.ts +5 -0
  130. package/dist/workflow/engine/handlers/ready-for-approval.d.ts.map +1 -1
  131. package/dist/workflow/engine/handlers/ready-for-approval.js +11 -7
  132. package/dist/workflow/engine/handlers/ready-for-approval.js.map +1 -1
  133. package/dist/workflow/engine/{release-flow.d.ts → release-engine.d.ts} +83 -6
  134. package/dist/workflow/engine/release-engine.d.ts.map +1 -0
  135. package/dist/workflow/engine/{release-flow.js → release-engine.js} +291 -19
  136. package/dist/workflow/engine/release-engine.js.map +1 -0
  137. package/dist/workflow/engine/ship-flow.d.ts +87 -0
  138. package/dist/workflow/engine/ship-flow.d.ts.map +1 -0
  139. package/dist/workflow/engine/ship-flow.js +221 -0
  140. package/dist/workflow/engine/ship-flow.js.map +1 -0
  141. package/dist/workflow/engine/workflow-engine.d.ts +85 -15
  142. package/dist/workflow/engine/workflow-engine.d.ts.map +1 -1
  143. package/dist/workflow/engine/workflow-engine.js +195 -66
  144. package/dist/workflow/engine/workflow-engine.js.map +1 -1
  145. package/package.json +3 -3
  146. package/dist/workflow/engine/release-flow.d.ts.map +0 -1
  147. package/dist/workflow/engine/release-flow.js.map +0 -1
@@ -0,0 +1,221 @@
1
+ import { logger } from '../../lib/logger.js';
2
+ import { claudeEntryPointOption } from '../../lib/claude-options.js';
3
+ import { isolationModeOption, resolveIsolationMode } from '../../lib/isolation.js';
4
+ import * as git from '../../services/git.js';
5
+ import * as github from '../../services/github.js';
6
+ import * as worktree from '../../services/worktree.js';
7
+ import { WorkflowBranchState } from '../data/workflow-context.js';
8
+ import { WorkflowStates } from '../data/workflow-states.js';
9
+ import { mergeConfirmationOption } from './approval-flow.js';
10
+ import { branchCreationOptions } from './branch-setup.js';
11
+ import { reviewersOption } from './handlers/ready-for-approval.js';
12
+ import { advanceAsNeededTo, requireLiveContext, startWorkflowManagementAtCommit } from './workflow-engine.js';
13
+ /**
14
+ * Shipping work that exists before its project item's branch does. Uncommitted changes in a
15
+ * checkout of the branch an item's branch is cut from (the base branch, `working/release` by
16
+ * default) are carried onto the item's branch: committed and pushed there, never on the base
17
+ * branch, and checked out per the isolation mode. The item can then be advanced through every
18
+ * workflow state up to Approved and Merged with nothing asked on the way: no Claude session is
19
+ * started, the PR is opened and assigned to the person running the command (who, by merging it, is
20
+ * the approver of record), and it merges once the required checks pass - the same gate as every
21
+ * other stage-1 merge.
22
+ *
23
+ * Changes are carried only onto a branch with no work of its own: one created for them, or a live
24
+ * branch that still matches the branch it is cut from.
25
+ */
26
+ export const carryLocalChangesOption = {
27
+ longName: 'carry-local-changes',
28
+ shortName: 'c',
29
+ description: 'Commit and push the uncommitted changes of your base branch checkout on the item\'s branch rather than the base branch (only while the item\'s branch has no commits of its own)',
30
+ isFlag: true
31
+ };
32
+ export const approveAndMergeOption = {
33
+ longName: 'approve-and-merge',
34
+ description: 'Advance the item through every workflow state up to Approved and Merged without prompting: open its PR assigned to you, wait for the required checks and merge it',
35
+ isFlag: true
36
+ };
37
+ /**
38
+ * Whether the resolved options carry local changes. Reads a flag, so options that depend on it are
39
+ * declared after `carryLocalChangesOption`.
40
+ */
41
+ export function carriesLocalChanges(resolved) {
42
+ return resolved[carryLocalChangesOption.longName] === 'true';
43
+ }
44
+ /**
45
+ * Whether the resolved options approve and merge the item's PR.
46
+ */
47
+ export function approvesAndMerges(resolved) {
48
+ return resolved[approveAndMergeOption.longName] === 'true';
49
+ }
50
+ /**
51
+ * The branch creation options alongside carrying: carried changes go onto an independent branch,
52
+ * so the workflow type is asked only when nothing is carried.
53
+ */
54
+ export const branchCreationOptionsWithCarrying = branchCreationOptions.map(option => option.longName === 'workflow-type'
55
+ ? { ...option, dependsOn: (resolved) => !carriesLocalChanges(resolved) }
56
+ : option);
57
+ export const commitMessageOption = {
58
+ longName: 'commit-message',
59
+ shortName: 'M',
60
+ description: 'Commit message for the carried changes (default: the new item\'s title)',
61
+ defaultValue: '',
62
+ promptWhenDefaultExists: false
63
+ };
64
+ /**
65
+ * Reviewers requested on the PR when the item is approved and merged. Never asked: the PR's
66
+ * assignee approves it.
67
+ */
68
+ export const unpromptedReviewersOption = { ...reviewersOption, dependsOn: () => false };
69
+ /**
70
+ * The options that apply once changes are carried or the item is approved and merged. Declared
71
+ * after the two flags, which they depend on.
72
+ */
73
+ export const shipOptions = [
74
+ { ...commitMessageOption, dependsOn: carriesLocalChanges },
75
+ {
76
+ ...isolationModeOption,
77
+ dependsOn: resolved => carriesLocalChanges(resolved) || approvesAndMerges(resolved)
78
+ },
79
+ unpromptedReviewersOption
80
+ ];
81
+ /**
82
+ * The uncommitted changes of the current checkout, to carry onto an item's branch; null when there
83
+ * are none. Read before anything is created, so a checkout the changes cannot be carried from stops
84
+ * the command before an item or branch exists. `expectedSourceBranch` is the branch a new item's
85
+ * branch will be cut from, or null when an existing item decides that, which carrying checks.
86
+ *
87
+ * The checkout's own branch must have no commits that origin lacks: carrying takes uncommitted
88
+ * changes only, and such commits would either travel with them or be left behind on the base branch.
89
+ */
90
+ export async function findLocalChanges(expectedSourceBranch) {
91
+ if (!await git.hasUncommittedChanges()) {
92
+ return null;
93
+ }
94
+ const sourceBranch = await git.getCurrentBranch();
95
+ if (sourceBranch === 'HEAD') {
96
+ throw new Error('This checkout is not on a branch (detached HEAD), so there is no base branch to carry its uncommitted changes from.');
97
+ }
98
+ if (expectedSourceBranch && sourceBranch !== expectedSourceBranch) {
99
+ throw new Error(`Uncommitted changes are carried from a checkout of ${expectedSourceBranch}, the branch the item's branch is cut from; ` +
100
+ `this checkout is on ${sourceBranch}.`);
101
+ }
102
+ if (!await git.fetchRemoteBranch(sourceBranch)) {
103
+ throw new Error(`${sourceBranch} is not on origin, so the item's branch cannot be cut from it.`);
104
+ }
105
+ if (await git.hasCommitsNotIn('HEAD', `origin/${sourceBranch}`)) {
106
+ throw new Error(`Your ${sourceBranch} has commits that are not on origin. Only uncommitted changes are carried: ` +
107
+ `push those commits or move them off ${sourceBranch} first.`);
108
+ }
109
+ return { sourceBranch, checkoutPath: (await git.getRepoRoot()).trim() };
110
+ }
111
+ /**
112
+ * Carry uncommitted changes onto the item's branch. The changes are committed on top of the
113
+ * checkout's commit without touching the checkout, and the commit becomes the tip of the item's
114
+ * branch on origin: a new branch, recorded on the platform as the item's, for an item with no live
115
+ * branch, or the item's live branch while it has no commits of its own. The base branch is left as
116
+ * origin has it.
117
+ *
118
+ * The branch then gets its local checkout per the isolation mode. In the main repository, the
119
+ * checkout that held the changes switches to the branch with its working tree as it is, which is
120
+ * the branch's tip. Otherwise the branch gets a worktree, and the checkout that held the changes is
121
+ * cleaned of them, unless they changed meanwhile.
122
+ *
123
+ * Reads `commit-message`, `title`, `branch-name`, `base-branch` and `isolation` from the
124
+ * transition's options.
125
+ */
126
+ export async function carryLocalChanges(transition, changes) {
127
+ const { sourceBranch, checkoutPath } = changes;
128
+ const options = transition.options;
129
+ process.chdir(checkoutPath);
130
+ logger.section(`Carry uncommitted changes from ${sourceBranch}`);
131
+ const context = transition.context;
132
+ if (context?.branchState === WorkflowBranchState.Merged) {
133
+ throw new Error(`The work of ${transition.projectItemUrl} is already merged (${context.branchName}); carry these changes onto a new item.`);
134
+ }
135
+ const liveContext = context?.branchState === WorkflowBranchState.Live ? context : null;
136
+ const expectedTipSha = liveContext ? await requireBranchWithNoCommitsOfItsOwn(liveContext, sourceBranch) : null;
137
+ if (!liveContext) {
138
+ const baseBranch = options['base-branch'] || await worktree.resolveBaseBranch();
139
+ if (sourceBranch !== baseBranch) {
140
+ throw new Error(`The item's branch is cut from ${baseBranch}, so changes are carried from a checkout of it; this checkout is on ${sourceBranch}.`);
141
+ }
142
+ }
143
+ const message = options['commit-message'] || options['title'] || `Changes carried from ${sourceBranch} for ${transition.projectItemUrl}`;
144
+ const treeSha = await git.writeWorkingTreeTree();
145
+ const commitSha = await git.commitTree(treeSha, 'HEAD', message);
146
+ if (liveContext) {
147
+ await git.pushCommitToBranch(liveContext.branchName, commitSha, expectedTipSha);
148
+ }
149
+ else {
150
+ await startWorkflowManagementAtCommit(transition, {
151
+ shortBranchName: options['branch-name'] || null,
152
+ baseBranch: sourceBranch,
153
+ commitSha
154
+ });
155
+ }
156
+ const { branchName } = requireLiveContext(transition);
157
+ if (resolveIsolationMode(options) === 'main-repo') {
158
+ await git.switchToCommitKeepingWorkingTree(branchName, commitSha);
159
+ transition.workingPath = checkoutPath;
160
+ }
161
+ else {
162
+ const { workingPath } = await worktree.ensureBranchEnvironment('worktree', branchName);
163
+ if (await git.writeWorkingTreeTree() === treeSha) {
164
+ await git.discardWorkingTreeChanges();
165
+ logger.dim(`Removed the carried changes from ${checkoutPath}, which stays on ${sourceBranch}`);
166
+ }
167
+ else {
168
+ logger.warning(`The changes in ${checkoutPath} changed while they were carried, so they were left there. Discard them once you have checked ${branchName}.`);
169
+ }
170
+ transition.workingPath = workingPath;
171
+ process.chdir(workingPath);
172
+ }
173
+ logger.success(`Carried the uncommitted changes onto ${branchName} (${commitSha.substring(0, 12)})`);
174
+ logger.hint(`Working directory: ${transition.workingPath}`);
175
+ }
176
+ /**
177
+ * The tip on origin of an item's live branch that changes can be carried onto: one cut from the
178
+ * branch the changes are carried from, with no checkout here (the checkout's own work would be
179
+ * stranded), and with no commits of its own, on origin or locally.
180
+ */
181
+ async function requireBranchWithNoCommitsOfItsOwn(context, sourceBranch) {
182
+ const { branchName } = context;
183
+ const branchSource = context.stackBranch ?? context.baseBranch;
184
+ if (branchSource !== sourceBranch) {
185
+ throw new Error(`${branchName} is cut from ${branchSource}, so changes are carried onto it from a checkout of ${branchSource}; this checkout is on ${sourceBranch}.`);
186
+ }
187
+ const checkoutPath = await git.getCheckoutPathForBranch(branchName);
188
+ if (checkoutPath) {
189
+ throw new Error(`${branchName} is checked out at ${checkoutPath}. Changes are carried only onto a branch with no checkout: commit them there, or remove that checkout first.`);
190
+ }
191
+ if (!await git.fetchRemoteBranch(branchName)) {
192
+ throw new Error(`${branchName} is not on origin.`);
193
+ }
194
+ const hasOwnCommits = await git.hasCommitsNotIn(`origin/${branchName}`, `origin/${sourceBranch}`)
195
+ || (await git.localBranchExists(branchName) && await git.hasCommitsNotIn(branchName, `origin/${sourceBranch}`));
196
+ if (hasOwnCommits) {
197
+ throw new Error(`${branchName} already has commits of its own. Changes are carried only onto a branch that still matches ${sourceBranch}: ` +
198
+ `check ${branchName} out (idea1 join-project-item) and commit them there.`);
199
+ }
200
+ return git.resolveCommit(`origin/${branchName}`);
201
+ }
202
+ /**
203
+ * Advance the item through every workflow state up to Approved and Merged, asking nothing: the
204
+ * states on the way get the options a person would otherwise be asked for. No Claude session is
205
+ * started on the way through Agent Implementation, the PR is assigned to the person running the
206
+ * command, who merges it once the required checks pass (which brings the base branch's local
207
+ * checkout up to date with the merge). Each state runs its usual automation, so a run that stops -
208
+ * on failing checks, say - continues from where it stopped when run again.
209
+ */
210
+ export async function approveAndMerge(transition) {
211
+ const login = await github.getCurrentLogin();
212
+ Object.assign(transition.options, {
213
+ [isolationModeOption.longName]: resolveIsolationMode(transition.options),
214
+ [claudeEntryPointOption.longName]: 'none',
215
+ assignee: login,
216
+ [reviewersOption.longName]: transition.options[reviewersOption.longName] ?? '',
217
+ [mergeConfirmationOption.longName]: 'true'
218
+ });
219
+ await advanceAsNeededTo(transition, WorkflowStates.ApprovedAndMerged);
220
+ }
221
+ //# sourceMappingURL=ship-flow.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ship-flow.js","sourceRoot":"","sources":["../../../src/workflow/engine/ship-flow.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAq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AC,iBAAiB,CAAC,CAAC;AACxE,CAAC"}
@@ -16,6 +16,12 @@ import { type WorkflowState } from '../data/workflow-states.js';
16
16
  * to any earlier state, recording the state only) finds its work done and leaves it as it is - also
17
17
  * once the work is merged and its branch retired.
18
18
  *
19
+ * A command names its target - a project item URL, a branch name or a GitHub PR URL - and the
20
+ * engine resolves it to a project item, or to a branch no item is recorded for (`resolveTarget`).
21
+ * Work happens where the branch is checked out when it has a local checkout; a branch with none is
22
+ * worked on through origin and GitHub, and is checked out only when a step needs its files
23
+ * (`ensureWorkingPath`), so a command never arranges a checkout itself.
24
+ *
19
25
  * A command resolves the transition it operates on and, when it changes the item, calls the
20
26
  * operation that says so: `advanceAsNeededTo` to move the item on, `reenterState` to run the
21
27
  * automation of the state it is already in. Both put the item under workflow management on the way
@@ -56,27 +62,76 @@ export interface WorkflowStateHandler {
56
62
  complete?: (transition: WorkflowTransition) => Promise<void>;
57
63
  }
58
64
  export interface ResolveTransitionInput {
59
- /** Project item URL; required when the current branch is not the item's branch. */
60
- projectItemUrl?: string;
65
+ /**
66
+ * What the command operates on: a project item URL, a branch name, or a GitHub PR URL (standing
67
+ * for its head branch). Null for the current branch.
68
+ */
69
+ target: string | null;
61
70
  /** Resolved command options, handed to the state handlers. */
62
71
  options: Record<string, string>;
63
72
  }
64
73
  /**
65
- * Work out which project item and branch a command operates on. Reading only: an item outside
66
- * workflow management resolves to a transition with no context, and the transition the command
67
- * goes on to make is what gives it one.
68
- *
69
- * On a managed branch (the platform records the current branch as an item's) the branch is the
70
- * target. Otherwise the item URL is required: its summary is read from the platform and, when its
71
- * branch is live and checked out somewhere locally, that checkout becomes the working directory.
74
+ * What a target resolves to: a project item, or a branch no project item is recorded for.
75
+ */
76
+ export type ResolvedTarget = {
77
+ kind: 'item';
78
+ transition: WorkflowTransition;
79
+ } | {
80
+ kind: 'branch';
81
+ branchName: string;
82
+ };
83
+ /**
84
+ * Work out which project item a command operates on, for commands that need one. A branch (named,
85
+ * behind a PR URL, or the current one) must be a project item's branch.
72
86
  */
73
87
  export declare function resolveTransition(input: ResolveTransitionInput): Promise<WorkflowTransition>;
74
88
  /**
75
- * Like `resolveTransition`, returning null for a current branch outside workflow management when
76
- * no item URL was given. For commands that also operate on a branch with no project item
77
- * (`ready-for-approval`, `approve-pr`).
89
+ * Work out what a command operates on: a project item, or a branch with no project item, for the
90
+ * commands that also take those (`ready-for-approval`, `approve-pr`). Reading only: an item outside
91
+ * workflow management resolves to a transition with no context, and the transition the command goes
92
+ * on to make is what gives it one.
93
+ *
94
+ * A branch is the target's when it is a project item's branch (the platform records it as the
95
+ * item's), so a branch or PR URL target names the item as surely as its URL does. Whatever the
96
+ * target, its branch's local checkout, when it has one, is brought up to date with origin and
97
+ * becomes the working directory; a branch with no checkout is worked on through origin and GitHub
98
+ * alone, and gets a checkout only when a step needs one (`ensureWorkingPath`).
99
+ */
100
+ export declare function resolveTarget(input: ResolveTransitionInput): Promise<ResolvedTarget>;
101
+ /** The target named by a run, with what is known of it before anything moves. See `readTarget`. */
102
+ export interface TargetSummary {
103
+ /** The target as given: an item URL, a branch name or a PR URL. */
104
+ target: string;
105
+ /** What progress output calls the target: `#<id> <title>` for an item, the branch name otherwise. */
106
+ label: string;
107
+ /** The item's URL; null for a branch with no project item. */
108
+ projectItemUrl: string | null;
109
+ /** The branch carrying the work; null for an item with no live branch in this repository. */
110
+ branchName: string | null;
111
+ /** The item's state; null for an item outside workflow management or a branch with no item. */
112
+ currentState: WorkflowState | null;
113
+ }
114
+ /**
115
+ * What a target is - its item, branch and state - read without moving into any checkout or
116
+ * changing anything, so many targets can be checked before any of them is worked on.
78
117
  */
79
- export declare function resolveTransitionIfManaged(input: ResolveTransitionInput): Promise<WorkflowTransition | null>;
118
+ export declare function readTarget(target: string): Promise<TargetSummary>;
119
+ export interface StartWorkflowManagementAtCommitInput {
120
+ /** The branch name under the branch prefix; null to derive one from the item. */
121
+ shortBranchName: string | null;
122
+ /** The branch the new branch is cut from and its pull request targets. */
123
+ baseBranch: string;
124
+ /** The new branch's tip: a commit on top of `baseBranch`. */
125
+ commitSha: string;
126
+ }
127
+ /**
128
+ * Put an item that has no live branch under workflow management on a new independent branch whose
129
+ * tip is a commit already made on top of the base branch - for work that exists before its branch
130
+ * does - rather than on the base branch's tip. Recorded on the platform as `advanceAsNeededTo`
131
+ * records a branch it creates: a new context enters the first state, an existing one keeps its
132
+ * status. Work that was merged has no branch left to put new work on.
133
+ */
134
+ export declare function startWorkflowManagementAtCommit(transition: WorkflowTransition, input: StartWorkflowManagementAtCommitInput): Promise<void>;
80
135
  /**
81
136
  * Move the item to `targetState` one state at a time: each state on the way is entered in order -
82
137
  * its handler prepares, the state is recorded on the item, its handler completes - exactly as
@@ -94,10 +149,17 @@ export declare function advanceAsNeededTo(transition: WorkflowTransition, target
94
149
  * the branch is recorded on the item alongside it.
95
150
  */
96
151
  export declare function reenterState(transition: WorkflowTransition, state: WorkflowState): Promise<void>;
152
+ /**
153
+ * Prompt for every handler option that was not supplied on the command line and that advancing
154
+ * from `fromState` to `targetState` needs, so a handler reached through `next` asks the same
155
+ * questions as its dedicated command would. A batch asks this for each of its items, up front, so
156
+ * its unattended runs are asked nothing; an option answered once is not asked again.
157
+ */
158
+ export declare function resolveOptionsForAdvancing(fromState: WorkflowState | null, targetState: WorkflowState, options: Record<string, string>): Promise<void>;
97
159
  /**
98
160
  * The summary of the project item a branch in this repository implements, with the item's workflow
99
- * context. Null for a branch outside workflow management. The item URL is remembered locally for
100
- * the branch.
161
+ * context. Null for a branch outside workflow management, which the base branch always is: no item
162
+ * is assigned to it, so it is not looked up. The item URL is remembered locally for the branch.
101
163
  */
102
164
  export declare function getProjectItemSummaryForBranch(branchName: string): Promise<ProjectItemSummary | null>;
103
165
  /**
@@ -163,6 +225,14 @@ export declare function isWorkMerged(transition: WorkflowTransition): boolean;
163
225
  * The item's context with its live branch, for handlers that do branch work.
164
226
  */
165
227
  export declare function requireLiveContext(transition: WorkflowTransition): WorkflowContext;
228
+ /**
229
+ * The branch's local checkout, created when it has none - a step that needs to work in the branch's
230
+ * files asks for it, and only then does a checkout come to exist: a worktree, or the branch checked
231
+ * out in the main repository, per the `isolation` option. The checkout becomes the working
232
+ * directory. Steps that can work through origin and GitHub alone use `transition.workingPath`,
233
+ * the checkout the branch already had.
234
+ */
235
+ export declare function ensureWorkingPath(transition: WorkflowTransition): Promise<string>;
166
236
  /**
167
237
  * The local checkout a handler needs, with guidance when there is none.
168
238
  */
@@ -1 +1 @@
1
- {"version":3,"file":"workflow-engine.d.ts","sourceRoot":"","sources":["../../../src/workflow/engine/workflow-engine.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAW,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAOnE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAClE,OAAO,KAAK,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAC;AAEpF,OAAO,EAKL,KAAK,aAAa,EACnB,MAAM,4BAA4B,CAAC;AAIpC;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AAEH;;GAEG;AACH,MAAM,WAAW,kBAAkB;IACjC,cAAc,EAAE,MAAM,CAAC;IACvB,qHAAqH;IACrH,OAAO,EAAE,eAAe,GAAG,IAAI,CAAC;IAChC,6EAA6E;IAC7E,YAAY,EAAE,aAAa,GAAG,IAAI,CAAC;IACnC,sFAAsF;IACtF,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,iFAAiF;IACjF,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CACjC;AAED;;;;GAIG;AACH,MAAM,WAAW,oBAAoB;IACnC,KAAK,EAAE,aAAa,CAAC;IACrB,0HAA0H;IAC1H,OAAO,CAAC,EAAE,aAAa,EAAE,CAAC;IAC1B,OAAO,CAAC,EAAE,CAAC,UAAU,EAAE,kBAAkB,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IAC5D,QAAQ,CAAC,EAA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