@jakobm/peacekeeper 0.19.0 → 0.21.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 (82) hide show
  1. package/README.md +85 -32
  2. package/dist/bin/peacekeeper.js +36 -0
  3. package/{bin/peacekeeper.yaml → dist/cmdabra.yaml} +7 -0
  4. package/dist/package.json +57 -0
  5. package/dist/src/container.js +89 -0
  6. package/dist/src/modules/cli/interface.js +1 -0
  7. package/dist/src/modules/cli/service.js +48 -0
  8. package/dist/src/modules/cli/types.js +2 -0
  9. package/dist/src/modules/configuration/interface.js +6 -0
  10. package/{scripts → dist/src/modules/configuration}/project-config-defaults.json +1 -0
  11. package/dist/src/modules/configuration/project-config.js +114 -0
  12. package/dist/src/modules/configuration/update-config.js +42 -0
  13. package/dist/src/modules/dependencies.yaml +16 -0
  14. package/dist/src/modules/external.js +48 -0
  15. package/dist/src/modules/lifecycle/checkpoint-codex-changes.js +204 -0
  16. package/dist/src/modules/lifecycle/checkpoint-codex-session-start.js +23 -0
  17. package/dist/src/modules/lifecycle/checkpoint-codex-stop.js +69 -0
  18. package/dist/src/modules/lifecycle/checkpoint-instructions.js +21 -0
  19. package/dist/src/modules/lifecycle/cleanup-ended-session.js +265 -0
  20. package/dist/src/modules/lifecycle/interface.js +7 -0
  21. package/dist/src/modules/lifecycle/log-script-invocation.js +115 -0
  22. package/dist/src/modules/lifecycle/queue-merged-worktree-cleanup.js +37 -0
  23. package/dist/src/modules/maintenance/cleanup-merged-branches.js +298 -0
  24. package/dist/src/modules/maintenance/interface.js +7 -0
  25. package/dist/src/modules/maintenance/remove-empty-directories.js +114 -0
  26. package/{scripts → dist/src/modules/projects}/check-project-requirements.txt +35 -22
  27. package/dist/src/modules/projects/check-project.js +344 -0
  28. package/dist/src/modules/projects/create-project-core.js +186 -0
  29. package/dist/src/modules/projects/create-project.js +19 -0
  30. package/dist/src/modules/projects/generate-github-setup.js +13 -0
  31. package/dist/src/modules/projects/github-setup-prefix.sh +5 -0
  32. package/dist/src/modules/projects/github-setup-repository-template.sh +90 -0
  33. package/dist/src/modules/projects/github-setup-suffix-template.sh +5 -0
  34. package/dist/src/modules/projects/install-hooks.js +151 -0
  35. package/dist/src/modules/projects/interface.js +6 -0
  36. package/dist/src/modules/releases/assess-release-core.js +145 -0
  37. package/dist/src/modules/releases/assess-release.js +8 -0
  38. package/dist/src/modules/releases/interface.js +9 -0
  39. package/dist/src/modules/releases/release-core.js +529 -0
  40. package/dist/src/modules/releases/release-protection.js +147 -0
  41. package/dist/src/modules/releases/release.js +23 -0
  42. package/dist/src/modules/releases/verify-release-core.js +44 -0
  43. package/dist/src/modules/releases/verify-release-protection.js +25 -0
  44. package/dist/src/modules/releases/verify-release-version.js +14 -0
  45. package/dist/src/modules/releases/verify-release.js +30 -0
  46. package/dist/src/modules/testing/check-test-receipt.js +46 -0
  47. package/dist/src/modules/testing/interface.js +5 -0
  48. package/dist/src/modules/testing/receipt-state.js +99 -0
  49. package/dist/src/modules/testing/record-test-receipt.js +29 -0
  50. package/dist/src/modules/testing/run-tests.js +57 -0
  51. package/package.json +25 -9
  52. package/bin/peacekeeper.js +0 -68
  53. package/scripts/assess-release-core.js +0 -146
  54. package/scripts/assess-release.js +0 -7
  55. package/scripts/check-project.js +0 -333
  56. package/scripts/check-test-receipt.js +0 -49
  57. package/scripts/checkpoint-codex-changes.js +0 -232
  58. package/scripts/checkpoint-codex-session-start.js +0 -24
  59. package/scripts/checkpoint-codex-stop.js +0 -86
  60. package/scripts/checkpoint-instructions.js +0 -19
  61. package/scripts/cleanup-ended-session.js +0 -318
  62. package/scripts/cleanup-merged-branches.js +0 -382
  63. package/scripts/create-project-core.js +0 -195
  64. package/scripts/create-project.js +0 -26
  65. package/scripts/install-hooks.js +0 -155
  66. package/scripts/log-script-invocation.js +0 -125
  67. package/scripts/project-config.js +0 -115
  68. package/scripts/queue-merged-worktree-cleanup.js +0 -58
  69. package/scripts/receipt-state.js +0 -91
  70. package/scripts/record-test-receipt.js +0 -37
  71. package/scripts/release-core.js +0 -529
  72. package/scripts/release-protection.js +0 -96
  73. package/scripts/release.js +0 -18
  74. package/scripts/remove-empty-directories.js +0 -163
  75. package/scripts/run-tests.js +0 -66
  76. package/scripts/update-config.js +0 -41
  77. package/scripts/verify-release-core.js +0 -39
  78. package/scripts/verify-release-protection.js +0 -19
  79. package/scripts/verify-release-version.js +0 -14
  80. package/scripts/verify-release.js +0 -26
  81. /package/{scripts → dist/src/modules/projects}/codex-setup-prefix.sh +0 -0
  82. /package/{scripts → dist/src/modules/releases}/assess-release-schema.json +0 -0
@@ -0,0 +1,42 @@
1
+ export default ({ projectConfig, external: { fs, isDeepStrictEqual, output, path, projectConfigDefaults, runtime, } }) => {
2
+ const { CONFIG_FILE, repositoryRoot, validateConfig } = projectConfig;
3
+ function complete(value, defaults) {
4
+ if (value === null || typeof value !== 'object' || Array.isArray(value))
5
+ return value;
6
+ const result = { ...value };
7
+ for (const [key, fallback] of Object.entries(defaults)) {
8
+ if (!Object.hasOwn(value, key))
9
+ result[key] = JSON.parse(JSON.stringify(fallback));
10
+ else if (fallback !== null && typeof fallback === 'object' && !Array.isArray(fallback)) {
11
+ result[key] = complete(value[key], fallback);
12
+ }
13
+ }
14
+ return result;
15
+ }
16
+ function updateConfig(cwd = runtime.cwd()) {
17
+ const file = path.join(repositoryRoot(cwd), CONFIG_FILE);
18
+ const defaults = projectConfigDefaults;
19
+ validateConfig(defaults, 'bundled defaults');
20
+ const exists = fs.existsSync(file);
21
+ const original = exists ? JSON.parse(fs.readFileSync(file, 'utf8')) : {};
22
+ const updated = complete(original, defaults);
23
+ validateConfig(updated, file);
24
+ if (!exists || !isDeepStrictEqual(original, updated)) {
25
+ fs.writeFileSync(file, `${JSON.stringify(updated, null, 2)}\n`);
26
+ output.log(`Updated ${file}. Review defaults before using project commands.`);
27
+ }
28
+ else
29
+ output.log(`Configuration already complete: ${file}`);
30
+ }
31
+ function run() {
32
+ try {
33
+ updateConfig();
34
+ }
35
+ catch (error) {
36
+ output.error(error instanceof Error ? error.message : String(error));
37
+ runtime.exitCode = 1;
38
+ }
39
+ }
40
+ const api = { run, updateConfig };
41
+ return api;
42
+ };
@@ -0,0 +1,16 @@
1
+ allowed-modules:
2
+ cli: [configuration, lifecycle, maintenance, projects, releases, testing]
3
+ configuration: []
4
+ lifecycle: [configuration, maintenance]
5
+ maintenance: [configuration]
6
+ projects: [configuration, releases]
7
+ releases: [configuration]
8
+ testing: [configuration, projects]
9
+ allowed-external:
10
+ cli: [cliConfigPath, runCli]
11
+ configuration: [execFileSync, fs, isDeepStrictEqual, output, path, projectConfigDefaults, runtime]
12
+ lifecycle: [buffer, clock, executablePath, fs, output, path, runtime, spawn, spawnSync]
13
+ maintenance: [execFileSync, fs, output, path, runtime, spawnSync]
14
+ projects: [fs, isDeepStrictEqual, modulesRoot, output, packageVersion, path, projectConfigDefaults, runtime, semver, spawnSync, TOML, url, YAML]
15
+ releases: [assessReleaseSchema, clock, execFileSync, fs, modulesRoot, os, output, path, runtime, semver, spawnSync, url, YAML]
16
+ testing: [clock, crypto, execFileSync, fs, modulesRoot, os, output, path, runtime, spawnSync]
@@ -0,0 +1,48 @@
1
+ import { execFileSync, spawn, spawnSync } from 'node:child_process';
2
+ import crypto from 'node:crypto';
3
+ import fs from 'node:fs';
4
+ import os from 'node:os';
5
+ import path from 'node:path';
6
+ import { isDeepStrictEqual } from 'node:util';
7
+ import { fileURLToPath } from 'node:url';
8
+ import TOML from '@iarna/toml';
9
+ import semver from 'semver';
10
+ import YAML from 'yaml';
11
+ import assessReleaseSchema from './releases/assess-release-schema.json' with { type: 'json' };
12
+ import packageManifest from '../../package.json' with { type: 'json' };
13
+ import projectConfigDefaults from './configuration/project-config-defaults.json' with { type: 'json' };
14
+ const moduleDirectory = path.dirname(fileURLToPath(import.meta.url));
15
+ export default () => ({
16
+ buffer: Buffer,
17
+ clock: Object.freeze({
18
+ date: () => new Date(),
19
+ now: () => Date.now(),
20
+ parse: (value) => Date.parse(value),
21
+ sleep: (milliseconds) => new Promise(resolve => setTimeout(resolve, milliseconds)),
22
+ sleepSync: (milliseconds) => {
23
+ Atomics.wait(new Int32Array(new SharedArrayBuffer(4)), 0, 0, milliseconds);
24
+ },
25
+ timezone: () => Intl.DateTimeFormat().resolvedOptions().timeZone,
26
+ }),
27
+ cliConfigPath: path.resolve(moduleDirectory, '../../cmdabra.yaml'),
28
+ executablePath: path.resolve(moduleDirectory, '../../bin/peacekeeper.js'),
29
+ assessReleaseSchema,
30
+ crypto,
31
+ execFileSync,
32
+ fs,
33
+ isDeepStrictEqual,
34
+ modulesRoot: moduleDirectory,
35
+ os,
36
+ output: console,
37
+ packageVersion: packageManifest.version,
38
+ path,
39
+ projectConfigDefaults,
40
+ runCli: async (...args) => (await import('@jakobm/cmdabra')).runCli(...args),
41
+ runtime: process,
42
+ semver,
43
+ spawn,
44
+ spawnSync,
45
+ TOML,
46
+ url: URL,
47
+ YAML,
48
+ });
@@ -0,0 +1,204 @@
1
+ /**
2
+ * Commit the current Codex worktree and push to configured remotes.
3
+ *
4
+ * Explicit checkpoint remotes also receive new branches. Without that setting,
5
+ * only an existing branch on the configured remote is pushed. Failures are recorded inside
6
+ * the worktree's Git metadata so the Stop hook can keep them visible.
7
+ */
8
+ export default ({ configuration, logScriptInvocation, external: { clock, fs, output, path, runtime, spawnSync, } }) => {
9
+ const { isPrimaryWorktree } = logScriptInvocation;
10
+ const { projectConfig } = configuration;
11
+ function runGit(args, options = {}) {
12
+ const result = spawnSync('git', args, {
13
+ cwd: options.cwd,
14
+ encoding: 'utf8',
15
+ stdio: options.stdio || ['ignore', 'pipe', 'pipe'],
16
+ });
17
+ if (result.status !== 0) {
18
+ const detail = result.stderr?.trim() || result.stdout?.trim();
19
+ throw new Error(detail || `git ${args.join(' ')} failed`);
20
+ }
21
+ return result.stdout?.trim() || '';
22
+ }
23
+ function tryGit(args, cwd) {
24
+ return spawnSync('git', args, {
25
+ cwd,
26
+ encoding: 'utf8',
27
+ stdio: ['ignore', 'pipe', 'pipe'],
28
+ });
29
+ }
30
+ function markerPath(repositoryRoot) {
31
+ const gitDirectory = runGit([
32
+ 'rev-parse',
33
+ '--path-format=absolute',
34
+ '--git-dir',
35
+ ], { cwd: repositoryRoot });
36
+ return path.join(gitDirectory, 'codex-checkpoint-error.json');
37
+ }
38
+ function writeFailureMarker(repositoryRoot, error, branch) {
39
+ const marker = markerPath(repositoryRoot);
40
+ fs.writeFileSync(marker, `${JSON.stringify({
41
+ branch: branch || null,
42
+ error: error.message,
43
+ timestamp: clock.date().toISOString(),
44
+ }, null, 2)}\n`);
45
+ }
46
+ function clearFailureMarker(repositoryRoot) {
47
+ fs.rmSync(markerPath(repositoryRoot), { force: true });
48
+ }
49
+ function remoteBranchExists(repositoryRoot, branch) {
50
+ const { remote } = projectConfig(repositoryRoot).git;
51
+ const result = tryGit([
52
+ 'ls-remote',
53
+ '--exit-code',
54
+ '--heads',
55
+ remote,
56
+ `refs/heads/${branch}`,
57
+ ], repositoryRoot);
58
+ if (result.status === 0) {
59
+ return true;
60
+ }
61
+ if (result.status === 2) {
62
+ return false;
63
+ }
64
+ const detail = result.stderr?.trim() || result.stdout?.trim();
65
+ throw new Error(detail || `could not inspect branches on ${remote}`);
66
+ }
67
+ function validateMessage(subject, bodyParagraphs) {
68
+ if (typeof subject !== 'string' || subject.trim() === '') {
69
+ throw new Error('a non-empty commit subject is required');
70
+ }
71
+ if (subject.includes('\n')) {
72
+ throw new Error('the commit subject must be a single line');
73
+ }
74
+ if (!Array.isArray(bodyParagraphs)
75
+ || bodyParagraphs.length === 0
76
+ || bodyParagraphs.some((paragraph) => paragraph.trim() === '')) {
77
+ throw new Error('at least one non-empty commit body paragraph is required');
78
+ }
79
+ return {
80
+ bodyParagraphs: bodyParagraphs.map((paragraph) => paragraph.trim()),
81
+ subject: subject.trim(),
82
+ };
83
+ }
84
+ function parseArguments(args) {
85
+ let subject = null;
86
+ const bodyParagraphs = [];
87
+ for (let index = 0; index < args.length; index += 1) {
88
+ const argument = args[index];
89
+ const value = args[index + 1];
90
+ if (argument === '--subject' && value !== undefined) {
91
+ if (subject !== null) {
92
+ throw new Error('--subject may only be provided once');
93
+ }
94
+ subject = value;
95
+ index += 1;
96
+ }
97
+ else if (argument === '--body' && value !== undefined) {
98
+ bodyParagraphs.push(value);
99
+ index += 1;
100
+ }
101
+ else {
102
+ throw new Error(`unknown or incomplete argument: ${argument}`);
103
+ }
104
+ }
105
+ return validateMessage(subject, bodyParagraphs);
106
+ }
107
+ function checkpoint(repositoryRoot, message, log = output.log) {
108
+ if (isPrimaryWorktree(repositoryRoot)) {
109
+ throw new Error('refusing to checkpoint the primary Git worktree');
110
+ }
111
+ let branch = null;
112
+ try {
113
+ const { subject, bodyParagraphs } = validateMessage(message?.subject, message?.bodyParagraphs);
114
+ branch = runGit(['symbolic-ref', '--quiet', '--short', 'HEAD'], {
115
+ cwd: repositoryRoot,
116
+ });
117
+ const { defaultBranch, remote, checkpointPushRemotes } = projectConfig(repositoryRoot).git;
118
+ if (branch === defaultBranch) {
119
+ throw new Error(`refusing to checkpoint changes directly on ${defaultBranch}`);
120
+ }
121
+ const conflicts = runGit(['diff', '--name-only', '--diff-filter=U'], {
122
+ cwd: repositoryRoot,
123
+ });
124
+ if (conflicts !== '') {
125
+ throw new Error(`resolve merge conflicts before checkpointing:\n${conflicts}`);
126
+ }
127
+ const status = runGit(['status', '--porcelain', '--untracked-files=all'], {
128
+ cwd: repositoryRoot,
129
+ });
130
+ const previousFailureExists = fs.existsSync(markerPath(repositoryRoot));
131
+ if (status !== '') {
132
+ runGit(['add', '--all'], { cwd: repositoryRoot });
133
+ const commitArguments = ['commit', '--message', subject];
134
+ for (const paragraph of bodyParagraphs) {
135
+ commitArguments.push('--message', paragraph);
136
+ }
137
+ runGit(commitArguments, {
138
+ cwd: repositoryRoot,
139
+ stdio: ['ignore', 'pipe', 'pipe'],
140
+ });
141
+ log(`Committed ${branch}: ${subject}`);
142
+ }
143
+ else if (!previousFailureExists) {
144
+ log('No changes to checkpoint.');
145
+ return { committed: false, pushed: false };
146
+ }
147
+ const pushRemotes = checkpointPushRemotes;
148
+ if (pushRemotes.length === 0) {
149
+ clearFailureMarker(repositoryRoot);
150
+ log(`Kept ${branch} local because checkpoint push is disabled.`);
151
+ return { committed: status !== '', pushed: false };
152
+ }
153
+ for (const pushRemote of pushRemotes) {
154
+ const configuredRemotes = runGit(['remote'], { cwd: repositoryRoot }).split('\n');
155
+ if (!configuredRemotes.includes(pushRemote)) {
156
+ throw new Error(`checkpoint remote ${pushRemote} is not configured in Git`);
157
+ }
158
+ runGit([
159
+ 'push',
160
+ ...(remote === pushRemote ? ['--set-upstream'] : []),
161
+ pushRemote,
162
+ `HEAD:refs/heads/${branch}`,
163
+ ], { cwd: repositoryRoot });
164
+ log(`Pushed ${branch} to ${pushRemote}/${branch}.`);
165
+ }
166
+ clearFailureMarker(repositoryRoot);
167
+ return { committed: status !== '', pushed: true };
168
+ }
169
+ catch (error) {
170
+ try {
171
+ writeFailureMarker(repositoryRoot, error, branch);
172
+ }
173
+ catch {
174
+ // Preserve the original Git error when recording it also fails.
175
+ }
176
+ throw error;
177
+ }
178
+ }
179
+ function main(input = []) {
180
+ const repositoryRoot = runGit(['rev-parse', '--show-toplevel']);
181
+ const message = Array.isArray(input)
182
+ ? parseArguments(input)
183
+ : validateMessage(input.subject, input.bodyParagraphs);
184
+ checkpoint(repositoryRoot, message);
185
+ }
186
+ function run(input = []) {
187
+ try {
188
+ main(input);
189
+ }
190
+ catch (error) {
191
+ output.error(`Error: ${error instanceof Error ? error.message : String(error)}`);
192
+ runtime.exitCode = 1;
193
+ }
194
+ }
195
+ const api = {
196
+ checkpoint,
197
+ markerPath,
198
+ parseArguments,
199
+ remoteBranchExists,
200
+ run,
201
+ validateMessage,
202
+ };
203
+ return api;
204
+ };
@@ -0,0 +1,23 @@
1
+ export default ({ checkpointInstructions, configuration, logScriptInvocation }) => {
2
+ const { checkpointInstructions: formatCheckpointInstructions } = checkpointInstructions;
3
+ const { projectConfig } = configuration;
4
+ const { isPrimaryWorktree, runLoggedCheckpointHook } = logScriptInvocation;
5
+ function buildResponse(event) {
6
+ if (event?.hook_event_name !== 'SessionStart' || typeof event.cwd !== 'string') {
7
+ return {};
8
+ }
9
+ if (isPrimaryWorktree(event.cwd))
10
+ return {};
11
+ return {
12
+ hookSpecificOutput: {
13
+ hookEventName: 'SessionStart',
14
+ additionalContext: formatCheckpointInstructions(projectConfig(event.cwd)),
15
+ },
16
+ };
17
+ }
18
+ function run() {
19
+ runLoggedCheckpointHook(buildResponse, 'Codex checkpoint instructions failed');
20
+ }
21
+ const api = { buildResponse, run };
22
+ return api;
23
+ };
@@ -0,0 +1,69 @@
1
+ /**
2
+ * Continue a stopping Codex turn once when its worktree needs a checkpoint.
3
+ *
4
+ * The continuation lets the agent use its task context to choose a meaningful
5
+ * English commit message instead of forcing the hook to invent one.
6
+ */
7
+ export default ({ checkpointCodexChanges, checkpointInstructions, configuration, logScriptInvocation, external: { fs, spawnSync } }) => {
8
+ const { markerPath } = checkpointCodexChanges;
9
+ const { checkpointInstructions: formatCheckpointInstructions } = checkpointInstructions;
10
+ const { projectConfig } = configuration;
11
+ const { isPrimaryWorktree, runLoggedCheckpointHook } = logScriptInvocation;
12
+ function runGit(args, cwd) {
13
+ const result = spawnSync('git', args, {
14
+ cwd,
15
+ encoding: 'utf8',
16
+ stdio: ['ignore', 'pipe', 'pipe'],
17
+ });
18
+ if (result.status !== 0) {
19
+ const detail = result.stderr?.trim() || result.stdout?.trim();
20
+ throw new Error(detail || `git ${args.join(' ')} failed`);
21
+ }
22
+ return result.stdout.trim();
23
+ }
24
+ function readFailure(repositoryRoot) {
25
+ const file = markerPath(repositoryRoot);
26
+ if (!fs.existsSync(file)) {
27
+ return null;
28
+ }
29
+ try {
30
+ return JSON.parse(fs.readFileSync(file, 'utf8'));
31
+ }
32
+ catch {
33
+ return { error: 'the previous checkpoint failed' };
34
+ }
35
+ }
36
+ function buildResponse(event) {
37
+ if (event?.hook_event_name !== 'Stop' || typeof event.cwd !== 'string') {
38
+ return {};
39
+ }
40
+ if (isPrimaryWorktree(event.cwd)) {
41
+ return {};
42
+ }
43
+ const config = projectConfig(event.cwd);
44
+ const status = runGit(['status', '--porcelain', '--untracked-files=all'], event.cwd);
45
+ const failure = readFailure(event.cwd);
46
+ if (status === '' && !failure) {
47
+ return {};
48
+ }
49
+ if (event.stop_hook_active) {
50
+ const problem = failure?.error || 'uncommitted changes remain';
51
+ return {
52
+ systemMessage: `Codex checkpoint incomplete: ${problem}`,
53
+ };
54
+ }
55
+ const failureInstruction = failure
56
+ ? ` The previous checkpoint failed with: ${failure.error}. Resolve that failure first.`
57
+ : '';
58
+ return {
59
+ decision: 'block',
60
+ reason: formatCheckpointInstructions(config)
61
+ + failureInstruction,
62
+ };
63
+ }
64
+ function run() {
65
+ runLoggedCheckpointHook(buildResponse, 'Codex checkpoint check failed');
66
+ }
67
+ const api = { buildResponse, run };
68
+ return api;
69
+ };
@@ -0,0 +1,21 @@
1
+ /** Shared policy delivered before work starts and when Stop requests a retry. */
2
+ export default () => {
3
+ function checkpointInstructions(config) {
4
+ return 'This checkpoint workflow applies only in linked Git worktrees, never in the primary checkout. '
5
+ + 'Follow any explicit user instruction not to commit or push. If such an instruction conflicts '
6
+ + 'with this workflow, do not run the checkpoint command; explain that the checkpoint was skipped '
7
+ + 'at the user\'s request, even if a Stop hook asks for it. '
8
+ + 'Before the final response for a task that changed repository files, review the completed diff '
9
+ + 'and checkpoint the work. If HEAD is detached or the worktree is on the configured default branch '
10
+ + `(${config.git.defaultBranch}), first create and switch to a descriptive task branch named with the ${config.git.branchPrefix} prefix. `
11
+ + 'Write an English commit message with a concise, descriptive single-line subject and a body '
12
+ + 'separated from it by a blank line. The English body should explain the change using between '
13
+ + 'one and ten sentences. Run `npm exec --no -- peacekeeper checkpoint-codex-changes '
14
+ + '--subject "<subject>" --body "<body paragraph>"`; repeat `--body` for additional paragraphs when useful. '
15
+ + 'The command stages all changes, so do not include unrelated changes. '
16
+ + 'Push behavior follows the project configuration. Unless an explicit user instruction disables '
17
+ + 'this workflow, finish only after the checkpoint succeeds.';
18
+ }
19
+ const api = { checkpointInstructions };
20
+ return api;
21
+ };