@detergent-software/conductor 3.0.0-dev.3 → 3.0.0-dev.30

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 (171) hide show
  1. package/CHANGELOG.md +241 -0
  2. package/README.md +201 -63
  3. package/build/brief-cli.js +1 -1
  4. package/build/brief-cli.js.map +1 -1
  5. package/build/broker-cli.js +24 -25
  6. package/build/broker-cli.js.map +1 -1
  7. package/build/broker.js +66 -92
  8. package/build/broker.js.map +1 -1
  9. package/build/claude.js +50 -7
  10. package/build/claude.js.map +1 -1
  11. package/build/cli.js +143 -63
  12. package/build/cli.js.map +1 -1
  13. package/build/clones.js +92 -0
  14. package/build/clones.js.map +1 -0
  15. package/build/code-host-cli.js +116 -32
  16. package/build/code-host-cli.js.map +1 -1
  17. package/build/code-host-service.js +8 -0
  18. package/build/code-host-service.js.map +1 -1
  19. package/build/code-host.js +22 -11
  20. package/build/code-host.js.map +1 -1
  21. package/build/config.js +58 -14
  22. package/build/config.js.map +1 -1
  23. package/build/console.js +40 -24
  24. package/build/console.js.map +1 -1
  25. package/build/credentials.js +42 -29
  26. package/build/credentials.js.map +1 -1
  27. package/build/daemon.js +38 -22
  28. package/build/daemon.js.map +1 -1
  29. package/build/help.js +179 -42
  30. package/build/help.js.map +1 -1
  31. package/build/history.js +4 -2
  32. package/build/history.js.map +1 -1
  33. package/build/host/credential-manager.js +109 -0
  34. package/build/host/credential-manager.js.map +1 -0
  35. package/build/host/keychain.js +44 -0
  36. package/build/host/keychain.js.map +1 -0
  37. package/build/host/launchd.js +118 -0
  38. package/build/host/launchd.js.map +1 -0
  39. package/build/host/libsecret.js +40 -0
  40. package/build/host/libsecret.js.map +1 -0
  41. package/build/host/macos-terminal.js +63 -0
  42. package/build/host/macos-terminal.js.map +1 -0
  43. package/build/host/platform.js +4 -0
  44. package/build/host/platform.js.map +1 -0
  45. package/build/host/secrets.js +46 -0
  46. package/build/host/secrets.js.map +1 -0
  47. package/build/host/shell.js +26 -0
  48. package/build/host/shell.js.map +1 -0
  49. package/build/host/startup.js +26 -0
  50. package/build/host/startup.js.map +1 -0
  51. package/build/host/systemd.js +91 -0
  52. package/build/host/systemd.js.map +1 -0
  53. package/build/host/task-scheduler.js +78 -0
  54. package/build/host/task-scheduler.js.map +1 -0
  55. package/build/host/terminal.js +46 -0
  56. package/build/host/terminal.js.map +1 -0
  57. package/build/host/tmux.js +39 -0
  58. package/build/host/tmux.js.map +1 -0
  59. package/build/host/windows-terminal.js +46 -0
  60. package/build/host/windows-terminal.js.map +1 -0
  61. package/build/in-process.js +6 -5
  62. package/build/in-process.js.map +1 -1
  63. package/build/inbox.js +63 -17
  64. package/build/inbox.js.map +1 -1
  65. package/build/init.js +508 -0
  66. package/build/init.js.map +1 -0
  67. package/build/landing.js +86 -7
  68. package/build/landing.js.map +1 -1
  69. package/build/lib/providers/ado/code-host.js +5 -1
  70. package/build/lib/providers/ado/code-host.js.map +1 -1
  71. package/build/lib/providers/ado/pipelines.js +130 -22
  72. package/build/lib/providers/ado/pipelines.js.map +1 -1
  73. package/build/lib/providers/ado/trigger.js +5 -0
  74. package/build/lib/providers/ado/trigger.js.map +1 -1
  75. package/build/lib/providers/ado/writes.js +10 -1
  76. package/build/lib/providers/ado/writes.js.map +1 -1
  77. package/build/lib/providers/github/actions.js +90 -3
  78. package/build/lib/providers/github/actions.js.map +1 -1
  79. package/build/lib/providers/github/code-host.js +2 -0
  80. package/build/lib/providers/github/code-host.js.map +1 -1
  81. package/build/lib/providers/github/writes.js +24 -2
  82. package/build/lib/providers/github/writes.js.map +1 -1
  83. package/build/lib/providers/index.js +4 -3
  84. package/build/lib/providers/index.js.map +1 -1
  85. package/build/lib/providers/npm/stage.js +28 -5
  86. package/build/lib/providers/npm/stage.js.map +1 -1
  87. package/build/lib/providers/timing.js +10 -0
  88. package/build/lib/providers/timing.js.map +1 -0
  89. package/build/lib/providers/verdicts/pr.js +47 -6
  90. package/build/lib/providers/verdicts/pr.js.map +1 -1
  91. package/build/lib/providers/verdicts/runs.js +12 -2
  92. package/build/lib/providers/verdicts/runs.js.map +1 -1
  93. package/build/local-files.js +95 -0
  94. package/build/local-files.js.map +1 -0
  95. package/build/manager.js +171 -47
  96. package/build/manager.js.map +1 -1
  97. package/build/note.js +1 -1
  98. package/build/note.js.map +1 -1
  99. package/build/notify.js +101 -39
  100. package/build/notify.js.map +1 -1
  101. package/build/npm-reads.js +323 -0
  102. package/build/npm-reads.js.map +1 -0
  103. package/build/paths.js +44 -1
  104. package/build/paths.js.map +1 -1
  105. package/build/plugin.js +10 -0
  106. package/build/plugin.js.map +1 -1
  107. package/build/profile-fields.js +149 -0
  108. package/build/profile-fields.js.map +1 -0
  109. package/build/profile-layers.js +264 -0
  110. package/build/profile-layers.js.map +1 -0
  111. package/build/profile.js +70 -44
  112. package/build/profile.js.map +1 -1
  113. package/build/project-check-cli.js +18 -10
  114. package/build/project-check-cli.js.map +1 -1
  115. package/build/project-check.js +187 -98
  116. package/build/project-check.js.map +1 -1
  117. package/build/pushover.js +5 -5
  118. package/build/pushover.js.map +1 -1
  119. package/build/registry.js +195 -36
  120. package/build/registry.js.map +1 -1
  121. package/build/release-kinds.js +34 -0
  122. package/build/release-kinds.js.map +1 -0
  123. package/build/rule-actions.js +4 -2
  124. package/build/rule-actions.js.map +1 -1
  125. package/build/rules-service.js +101 -44
  126. package/build/rules-service.js.map +1 -1
  127. package/build/rules.js +15 -15
  128. package/build/rules.js.map +1 -1
  129. package/build/run.js +20 -7
  130. package/build/run.js.map +1 -1
  131. package/build/runs.js +200 -45
  132. package/build/runs.js.map +1 -1
  133. package/build/scheduler.js +11 -1
  134. package/build/scheduler.js.map +1 -1
  135. package/build/server.js +6 -25
  136. package/build/server.js.map +1 -1
  137. package/build/spend.js +4 -0
  138. package/build/spend.js.map +1 -1
  139. package/build/store.js +82 -25
  140. package/build/store.js.map +1 -1
  141. package/build/timeline.js +104 -0
  142. package/build/timeline.js.map +1 -0
  143. package/build/tracker-reads-cli.js +4 -5
  144. package/build/tracker-reads-cli.js.map +1 -1
  145. package/build/train-cli.js +6 -5
  146. package/build/train-cli.js.map +1 -1
  147. package/build/upgrade.js +8 -9
  148. package/build/upgrade.js.map +1 -1
  149. package/build/wait.js +6 -6
  150. package/build/wait.js.map +1 -1
  151. package/build/watchers/ado.js +11 -3
  152. package/build/watchers/ado.js.map +1 -1
  153. package/build/watchers/github.js +15 -4
  154. package/build/watchers/github.js.map +1 -1
  155. package/build/watchers/npm.js +6 -4
  156. package/build/watchers/npm.js.map +1 -1
  157. package/build/webhook.js +80 -0
  158. package/build/webhook.js.map +1 -0
  159. package/build/worktrees.js +199 -92
  160. package/build/worktrees.js.map +1 -1
  161. package/package.json +61 -61
  162. package/plugin/skills/conductor-console/SKILL.md +4 -4
  163. package/plugin/skills/work-item/SKILL.md +13 -11
  164. package/build/checkout-sync.js +0 -249
  165. package/build/checkout-sync.js.map +0 -1
  166. package/build/credential.js +0 -66
  167. package/build/credential.js.map +0 -1
  168. package/build/startup.js +0 -92
  169. package/build/startup.js.map +0 -1
  170. package/build/tab.js +0 -32
  171. package/build/tab.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"profile.js","sourceRoot":"","sources":["../src/profile.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACvC,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxD,OAAO,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AACxC,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACvC,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAElD,MAAM,CAAC,MAAM,YAAY,GAAG,IAAI,CAAC,S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1B,MAAM,IAAI,cAAc,CAAC,GAAG,MAAM,aAAa,EAAE;YAC/C,aAAa,IAAI,CAAC,SAAS,CAAC,QAAQ,IAAI,IAAI,CAAC,qDAAqD,QAAQ,EAAE;SAC7G,CAAC,CAAC;IACL,CAAC;IACD,OAAO,UAAU,CAAC,IAAI,EAAE,aAAa,EAAE,MAAM,CAAC,CAAC;AACjD,CAAC;AAED,+FAA+F;AAC/F,0FAA0F;AAC1F,MAAM,UAAU,cAAc,CAAC,KAAc;IAC3C,IAAI,CAAC,CAAC,KAAK,YAAY,cAAc,CAAC;QAAE,OAAO,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;IACtG,OAAO,KAAK,CAAC,OAAO,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC;AAC7E,CAAC"}
@@ -1,8 +1,10 @@
1
1
  import { mkdirSync } from 'node:fs';
2
2
  import { z } from 'zod';
3
3
  import { broker } from "./broker.js";
4
+ import { claudeCli } from "./claude.js";
4
5
  import { callApi, NotRunningError } from "./client.js";
5
6
  import { projectHosts } from "./code-host.js";
7
+ import { loadConfig } from "./config.js";
6
8
  import { ConductorError } from "./errors.js";
7
9
  import { localCredentials } from "./in-process.js";
8
10
  import { checkFailed, checkLines, checkProject, checkReportSchema, noProject, } from "./project-check.js";
@@ -12,27 +14,31 @@ import { boardsQueue } from "./watchers/boards-queue.js";
12
14
  import { issuesQueue } from "./watchers/issues-queue.js";
13
15
  import { linearQueue } from "./watchers/linear-queue.js";
14
16
  import { gitWorktrees } from "./worktrees.js";
15
- // The worktree's create hook may run 10 minutes (pnpm install) and its remove 5, on top of the reads.
17
+ // The worktree's setup may run 10 minutes (pnpm install) and its remove 5, on top of the reads.
16
18
  const CHECK_TIMEOUT_MS = 17 * 60_000;
17
19
  const refused = z.object({ details: z.array(z.string()).optional(), error: z.string() });
18
20
  // `conduct project check <name>`: through the daemon, which checks as its own accounts, else here
19
21
  // as the machine's. Returns the exit code: 1 when a check failed, else 0.
20
22
  export async function projectCheckCommand(paths, name, options, io) {
21
- let report;
23
+ const report = await projectCheckReport(paths, name, options, io);
24
+ if (options.json)
25
+ io.out(JSON.stringify(report, null, 2));
26
+ else
27
+ checkLines(report).forEach((line) => io.out(line));
28
+ return checkFailed(report) ? 1 : 0;
29
+ }
30
+ // The check's report, from the daemon or made here, for a caller that prints it its own way
31
+ // (`conduct init`).
32
+ export async function projectCheckReport(paths, name, options, io) {
22
33
  try {
23
- report = await checkByDaemon(paths, name, options);
34
+ return await checkByDaemon(paths, name, options);
24
35
  }
25
36
  catch (error) {
26
37
  if (!(error instanceof NotRunningError))
27
38
  throw error;
28
39
  io.err('checking here (the conductor is not running)');
29
- report = await checkHere(paths, name, options, io);
40
+ return checkHere(paths, name, options, io);
30
41
  }
31
- if (options.json)
32
- io.out(JSON.stringify(report, null, 2));
33
- else
34
- checkLines(report).forEach((line) => io.out(line));
35
- return checkFailed(report) ? 1 : 0;
36
42
  }
37
43
  async function checkByDaemon(paths, name, options) {
38
44
  const { body, status } = await callApi(paths, {
@@ -71,9 +77,11 @@ async function checkHere(paths, name, options, io) {
71
77
  function localDeps(paths, store) {
72
78
  const credentials = localCredentials(paths, store);
73
79
  return {
80
+ claude: claudeCli(),
74
81
  credentials,
75
82
  hosts: (project) => projectHosts(credentials, project),
76
- ports: broker({ store }),
83
+ paths,
84
+ ports: broker({ pool: loadConfig(paths.config).ports, store }),
77
85
  queue: routedQueue({
78
86
  'ado-boards': boardsQueue({ credentials }),
79
87
  'github-issues': issuesQueue({ credentials }),
@@ -1 +1 @@
1
- {"version":3,"file":"project-check-cli.js","sourceRoot":"","sources":["../src/project-check-cli.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;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AAY,EAAE;KAC1B,CAAC;AACJ,CAAC"}
@@ -1,14 +1,23 @@
1
- import { existsSync, readFileSync } from 'node:fs';
2
1
  import { join } from 'node:path';
2
+ import { gt } from 'semver';
3
3
  import { z } from 'zod';
4
+ import { portEnv } from "./broker.js";
5
+ import { runGit } from "./checkout.js";
6
+ import { trustStep } from "./claude.js";
4
7
  import { repoKey, repoOf } from "./code-host.js";
5
8
  import { TRACKER_API } from "./conditions.js";
6
9
  import { ConductorError } from "./errors.js";
7
10
  import { answersTo, NotFound } from "./lib/providers/index.js";
11
+ import { projectPaths } from "./paths.js";
8
12
  import { pluginSkill, pluginSource, projectSkills, readPluginSkill } from "./plugin.js";
9
- import { PROFILE_FILE, readProfile } from "./profile.js";
13
+ import { minimumCheck } from "./profile-fields.js";
14
+ import { projectProfile } from "./profile-layers.js";
15
+ import {} from "./profile.js";
10
16
  import { PROTOCOL } from "./protocol.js";
17
+ import { registeredByCheckout } from "./registry.js";
18
+ import { RELEASE_KINDS } from "./release-kinds.js";
11
19
  import { ciRefusal } from "./runs.js";
20
+ import { BRANCH_PREFIX, SESSION_SETTINGS } from "./worktrees.js";
12
21
  // `conduct project check <name>` (ATK-490): whether a registered project can be conducted, checked
13
22
  // before the first launch instead of found by a failed one. Each check reads what the launch and the
14
23
  // watchers would use, as the project's accounts; only the worktree check writes, and it removes what
@@ -25,6 +34,9 @@ export const CHECKS = [
25
34
  'health',
26
35
  ];
27
36
  const HEALTH_TIMEOUT_MS = 15_000;
37
+ // How the worktree check's summary starts when a skill the profile names is missing after setup:
38
+ // `conduct init` reads it to point at the verify skill's maker.
39
+ export const MISSING_SKILLS = "a new worktree's skills:";
28
40
  const SOURCE_WORDS = {
29
41
  'cli-login': 'CLI login',
30
42
  'machine-token': "the machine's token",
@@ -95,6 +107,7 @@ export async function checkProject(given, project, options) {
95
107
  const deps = {
96
108
  ...given,
97
109
  credentials: {
110
+ ...given.credentials,
98
111
  probe: (provider, name) => {
99
112
  const key = `${provider}:${name}`;
100
113
  const known = probes.get(key) ?? given.credentials.probe(provider, name);
@@ -103,15 +116,17 @@ export async function checkProject(given, project, options) {
103
116
  },
104
117
  },
105
118
  };
106
- const { profile, result } = profileCheck(project);
119
+ const resolve = deps.resolveProfile ?? ((name) => projectProfile(deps.paths, name));
120
+ const { profile, result } = profileCheck(project, deps.paths, () => resolve(project.name));
107
121
  const results = [{ check: 'profile', ...result }];
122
+ const { clone, worktrees: dir } = projectPaths(deps.paths, project.name);
108
123
  const steps = [
109
124
  ['auth', (p) => authCheck(deps, p)],
110
125
  ['tracker', (p) => trackerCheck(deps, p)],
111
126
  ['code-host', (p) => codeHostCheck(deps, p)],
112
127
  ['ci', (p) => ciCheck(deps, p)],
113
- ['worktree', (p) => worktreeCheck(deps, project.root, p, options)],
114
- ['skills', (p) => skillsCheck(deps, project.root, p)],
128
+ ['worktree', (p) => worktreeCheck(deps, { clone, dir }, p, options)],
129
+ ['skills', (p) => skillsCheck(deps, p, options)],
115
130
  ['ports', (p) => portsCheck(deps, p)],
116
131
  ['health', (p) => healthCheck(deps, p)],
117
132
  ];
@@ -151,43 +166,52 @@ export function differences(a, b, path = '') {
151
166
  // The check of a name no project is registered under.
152
167
  export function noProject(name, names) {
153
168
  return new ConductorError(`no project ${name}`, [
154
- names.length > 0 ? `registered: ${names.join(', ')}` : 'register one with `conduct project add <path>`',
169
+ names.length > 0 ? `registered: ${names.join(', ')}` : 'register one with `conduct project add <url | path>`',
155
170
  ]);
156
171
  }
157
- // The profile on disk against this build's schema and the stored copy the daemon works from. The
158
- // rest of the checks use the file when it reads (the daemon takes it on its next save or start),
159
- // else the stored copy, else nothing.
160
- export function profileCheck(project) {
161
- let disk;
172
+ // The profile as its layers give it now (the machine file over the repo's at origin/<base>) against
173
+ // this build's schema and the stored copy the daemon works from, and each file's `conductor` minimum
174
+ // against the fields it writes (ATK-580). The rest of the checks use the resolved profile when it
175
+ // reads (the daemon takes it on its next start, save or fetch), else the stored copy, else nothing.
176
+ export function profileCheck(project, paths, resolve) {
177
+ if (registeredByCheckout(paths, project)) {
178
+ return {
179
+ profile: null,
180
+ result: fail(`${project.name} is registered by the checkout ${project.clone}, which the conductor no longer works in`, `run \`conduct project add "${project.clone}"\`: it clones the checkout's origin into ${projectPaths(paths, project.name).clone} and keeps the registration`),
181
+ };
182
+ }
183
+ let layered;
162
184
  try {
163
- disk = readProfile(project.root).profile;
185
+ layered = resolve();
164
186
  }
165
187
  catch (error) {
166
188
  return {
167
189
  profile: project.profile,
168
- result: fail(messageOf(error), `fix ${project.profilePath} and check again; until then the daemon keeps its stored copy`, detailsOf(error)),
169
- };
170
- }
171
- if (disk.name !== project.name) {
172
- return {
173
- profile: project.profile ?? disk,
174
- result: fail(`${project.profilePath} renames the project to "${disk.name}"`, `put "name": "${project.name}" back: a project keeps the name it was registered under. Or rename it: \`conduct project remove ${project.name}\`, then \`conduct project add "${project.root}"\``),
190
+ result: fail(messageOf(error), `fix the profile (\`conduct profile ${project.name}\` names its files) and check again; until then the daemon keeps its stored copy`, detailsOf(error)),
175
191
  };
176
192
  }
193
+ const { layers, profile: now } = layered;
194
+ const minimum = combined([layers.machine, layers.repo].flatMap((layer) => layer === null ? [] : [minimumCheck(JSON.stringify(layer.raw), layer.label)]));
195
+ const files = [layers.machine, layers.repo].flatMap((l) => (l === null ? [] : [l.label])).join(' over ');
196
+ const moved = [layers.machine, layers.repo].flatMap((l) => l !== null && Object.hasOwn(l.raw, 'workers') ? [l.label] : []);
197
+ const checked = (outcome) => withMovedWorkers(withMinimum(outcome, minimum), moved);
177
198
  if (project.profile === null) {
178
199
  return {
179
- profile: disk,
180
- result: warn(`${PROFILE_FILE} is valid, but the daemon's stored copy is one this build can't read (${project.problem ?? 'unknown'})`, 'the daemon takes the file when it next starts, or on the next save of the file'),
200
+ profile: now,
201
+ result: checked(warn(`the profile (${files}) is valid, but the daemon's stored copy is one this build can't read (${project.problem ?? 'unknown'})`, 'the daemon takes the profile when it next starts, or after the next save or fetch')),
181
202
  };
182
203
  }
183
- const changed = differences(project.profile, disk);
204
+ const changed = differences(project.profile, now);
184
205
  if (changed.length > 0) {
185
206
  return {
186
- profile: disk,
187
- result: warn(`${PROFILE_FILE} is valid, but ${changed.length === 1 ? 'a field differs' : `${changed.length} fields differ`} from the daemon's stored copy`, 'the daemon takes the file on its next save, or when it next starts', changed),
207
+ profile: now,
208
+ result: checked(warn(`the profile (${files}) is valid, but ${changed.length === 1 ? 'a field differs' : `${changed.length} fields differ`} from the daemon's stored copy`, 'the daemon takes it after the next save of the machine profile or fetch of the clone, or when it next starts', changed)),
188
209
  };
189
210
  }
190
- return { profile: disk, result: ok(`${PROFILE_FILE} is valid (protocol ${PROTOCOL}) and matches the stored copy`) };
211
+ return {
212
+ profile: now,
213
+ result: checked(ok(`the profile (${files}) is valid (protocol ${PROTOCOL}) and matches the stored copy`)),
214
+ };
191
215
  }
192
216
  // Which credential each provider the project uses signs in with (credentials.ts: a project token,
193
217
  // then the machine's token, then the CLI login), and for each that isn't the project's own token, how
@@ -216,8 +240,7 @@ async function authCheck(deps, profile) {
216
240
  const scoped = wide.map((provider) => {
217
241
  const target = `conductor-${profile.name}-${provider}`;
218
242
  const key = provider === 'linear' ? 'linear.credential' : `${provider}.token`;
219
- const user = provider === 'linear' ? 'linear' : 'pat';
220
- return `for ${provider}, ${SCOPES[provider]}: cmdkey /generic:${target} /user:${user} /pass, then set projects.${profile.name}.${key} to "${target}" in config.json`;
243
+ return `for ${provider}, ${SCOPES[provider]}: ${deps.credentials.saveCommand(provider, target)}, then set projects.${profile.name}.${key} to "${target}" in config.json`;
221
244
  });
222
245
  return {
223
246
  details: [...details, ...scoped],
@@ -255,7 +278,13 @@ async function ciCheck(deps, profile) {
255
278
  return fail(problems.join('; '), `name each release's pipeline by its YAML file name, path or name, once; ${repoKey(repo)} has ${known.length > 0 ? known.join(', ') : 'none'}`);
256
279
  }
257
280
  const releases = resolved.length > 0 ? `; releases: ${resolved.join(', ')}` : '; no release pipelines named';
258
- return ok(`${pipelines.length} ${profile.ci.kind} pipelines on ${repoKey(repo)}${releases}`);
281
+ const found = `${pipelines.length} ${profile.ci.kind} pipelines on ${repoKey(repo)}${releases}`;
282
+ // Each release waits on a person at its kind's gate (release-kinds.ts), which `gates` should name.
283
+ const ungated = profile.releases.filter((r) => !profile.gates.includes(RELEASE_KINDS[r.kind].gate));
284
+ if (ungated.length > 0) {
285
+ return warn(`${found}, but gates leaves out ${ungated.map((r) => `release ${r.key}'s ${RELEASE_KINDS[r.kind].gate}`).join(', ')}`, `add ${[...new Set(ungated.map((r) => RELEASE_KINDS[r.kind].gate))].join(', ')} to the profile's gates`);
286
+ }
287
+ return ok(found);
259
288
  }
260
289
  async function codeHostCheck(deps, profile) {
261
290
  const repo = repoOf(profile);
@@ -276,9 +305,21 @@ async function codeHostCheck(deps, profile) {
276
305
  return fail(`${repoKey(repo)} has no branch ${profile.baseBranch}`, "set baseBranch to the repo's base");
277
306
  return ok(`${repoKey(repo)} answers as ${account.label}; ${profile.baseBranch} is at ${tip.slice(0, 7)}`);
278
307
  }
308
+ // The layers' minimum checks as one: every file's problems, and the newest version that clears them.
309
+ function combined(checks) {
310
+ let needs = null;
311
+ for (const check of checks)
312
+ if (check.needs !== null && (needs === null || gt(check.needs, needs)))
313
+ needs = check.needs;
314
+ return { needs, problems: checks.flatMap((c) => c.problems) };
315
+ }
279
316
  function detailsOf(error) {
280
317
  return error instanceof ConductorError ? error.details : [];
281
318
  }
319
+ // Exit 1 is git's "not ignored"; an error (128) says nothing either way, so it isn't warned about.
320
+ async function gitIgnores(checkout, file) {
321
+ return (await runGit(['check-ignore', '-q', file], checkout)).code !== 1;
322
+ }
282
323
  async function healthCheck(deps, profile) {
283
324
  const urls = Object.entries(profile.health ?? {});
284
325
  if (urls.length === 0)
@@ -307,12 +348,14 @@ function messageOf(error) {
307
348
  return error instanceof Error ? error.message : String(error);
308
349
  }
309
350
  async function portsCheck(deps, profile) {
351
+ if (profile.ports.length === 0)
352
+ return skip('the profile names no ports');
310
353
  try {
311
- const { ports, slot } = await deps.ports.previewPorts(profile);
354
+ const ports = await deps.ports.previewPorts(profile.ports);
312
355
  const named = Object.entries(ports)
313
356
  .map(([name, port]) => `${name} ${port}`)
314
357
  .join(', ');
315
- return ok(`a new worktree gets slot ${slot} (${named}), of 1 to ${profile.ports.maxSlot}`);
358
+ return ok(`a new worktree gets ${named} from the machine's pool`);
316
359
  }
317
360
  catch (error) {
318
361
  if (!(error instanceof ConductorError))
@@ -320,61 +363,38 @@ async function portsCheck(deps, profile) {
320
363
  return fail(error.message, error.details[0] ?? '`conduct ports` lists the assignments');
321
364
  }
322
365
  }
323
- function readInstalledSkill(root, name) {
324
- try {
325
- return readFileSync(join(root, '.claude', 'skills', name, 'SKILL.md'), 'utf8');
326
- }
327
- catch {
328
- return null;
329
- }
330
- }
331
- // The main checkout's skills, read-only: the worktree hooks copy them into each worker's worktree.
332
- async function skillsCheck(deps, root, profile) {
333
- const read = deps.readSkill ?? readInstalledSkill;
334
- const { aliases, verify, work } = profile.skills;
366
+ // The skills the profile names, read where a session finds them before any worktree exists: the
367
+ // conductor plugin's (conductor:<skill>), with the work skill's declared protocol. The project's
368
+ // own skills arrive through `setup` in each new worktree, so the worktree check looks for those.
369
+ async function skillsCheck(deps, profile, options) {
370
+ const { verify, work } = profile.skills;
335
371
  const problems = [];
336
- const installed = [];
337
- // The conductor plugin's skills (conductor:<skill>) come with the package, not the checkout: read
338
- // from its plugin and left out of the audit.
339
372
  const plugin = deps.pluginDir ?? pluginSource();
340
- const readAny = (name) => {
341
- const skill = pluginSkill(name);
342
- return skill === null ? read(root, name) : readPluginSkill(plugin, skill);
343
- };
344
- const absent = (name) => pluginSkill(name) === null ? "isn't installed" : "isn't in the conductor plugin";
345
- const workSkill = readAny(work);
346
- if (workSkill === null)
347
- problems.push(`the work skill ${work} ${absent(work)}`);
348
- else {
349
- if (pluginSkill(work) === null)
350
- installed.push(work);
351
- const declared = declaredProtocol(workSkill);
373
+ const fromPlugin = [work, verify].filter((name) => pluginSkill(name) !== null);
374
+ for (const name of fromPlugin) {
375
+ const text = readPluginSkill(plugin, pluginSkill(name) ?? name);
376
+ if (text === null) {
377
+ problems.push(`${name} isn't in the conductor plugin`);
378
+ continue;
379
+ }
380
+ if (name !== work)
381
+ continue;
382
+ const declared = declaredProtocol(text);
352
383
  if (declared === null)
353
384
  problems.push(`${work} declares no worker protocol (protocol: ${PROTOCOL} in its frontmatter)`);
354
385
  else if (declared !== PROTOCOL)
355
386
  problems.push(`${work} speaks worker protocol ${declared}; this conductor speaks ${PROTOCOL}`);
356
387
  }
357
- if (readAny(verify) === null)
358
- problems.push(`the verify skill ${verify} ${absent(verify)}`);
359
- else if (pluginSkill(verify) === null)
360
- installed.push(verify);
361
- // Beside a plugin work skill an alias only names older notes' headings: nothing installs it.
362
- const checkAliases = pluginSkill(work) === null;
363
- const missing = checkAliases ? aliases.filter((alias) => read(root, alias) === null) : [];
364
- // Only the installed ones: a missing one is said once, above.
365
- const stale = installed.length > 0 ? await deps.worktrees.auditSkills(root, installed) : null;
366
- // An audit that couldn't run carries atk's output, JSON over several lines: one line here.
367
- if (stale !== null && stale.length > 0)
368
- problems.push(`atk audit: ${stale.join(', ').replace(/\s+/g, ' ')}`);
369
- if (problems.length > 0) {
370
- return fail(problems.join('; '), `atk install in ${root}, or set skills.work and skills.verify to the installed skills' names`);
371
- }
372
- const audited = stale === null ? '' : ', matching .atk-lock.json';
373
- const summary = `${work} (worker protocol ${PROTOCOL}) and ${verify} are installed${audited}`;
374
- if (missing.length > 0) {
375
- return warn(`${summary}; the alias ${missing.join(', ')} isn't`, 'notes under an alias still count; install it only for launchers that call it (atk install), or drop it from skills.aliases once no item in flight uses it');
376
- }
377
- return ok(`${summary}${checkAliases && aliases.length > 0 ? `, as is ${aliases.join(', ')}` : ''}`);
388
+ if (problems.length > 0)
389
+ return fail(problems.join('; '), 'upgrade the conductor, or set skills.work and skills.verify to skills it has');
390
+ const own = [work, verify].filter((name) => pluginSkill(name) === null);
391
+ const plugged = fromPlugin.length > 0
392
+ ? `${fromPlugin.join(' and ')} ${fromPlugin.length === 1 ? 'comes' : 'come'} with the conductor plugin`
393
+ : '';
394
+ const theirs = own.length === 0
395
+ ? ''
396
+ : `${own.join(' and ')} ${own.length === 1 ? 'comes' : 'come'} from the project's setup: ${options.worktree ? 'the worktree check looked for' : '--no-worktree, so nothing looked for'} ${own.length === 1 ? 'it' : 'them'}`;
397
+ return ok([plugged, theirs].filter((s) => s !== '').join('; '));
378
398
  }
379
399
  // A timestamp safe in a worktree and branch name.
380
400
  // To the millisecond, so two checks started together get worktrees of their own.
@@ -420,34 +440,103 @@ async function trackerCheck(deps, profile) {
420
440
  }
421
441
  return ok(`${where} lists ${items}, and ${prioritized} of its projects have a priority, as ${account.label}`);
422
442
  }
423
- // The launch's first two stages on a throwaway worktree (manager.ts launchWorker): the project's
424
- // create hook, then the skills check. Whatever it made is removed, whichever way it went.
425
- async function worktreeCheck(deps, root, profile, options) {
443
+ // A profile that writes a field newer than its `conductor` minimum reads here, but an older conductor
444
+ // would refuse it with the fields it doesn't know instead of the one line that says to upgrade: a
445
+ // warn, beside whatever else the profile check found.
446
+ function withMinimum(outcome, { needs, problems }) {
447
+ if (problems.length === 0)
448
+ return outcome;
449
+ const below = `its "conductor" minimum is below ${problems.length === 1 ? 'a field' : `${problems.length} fields`} it writes`;
450
+ const fix = needs === null
451
+ ? "the conductor's profile-fields.ts records no version for these fields: file it against the conductor"
452
+ : `raise "conductor" to ${needs}, the oldest conductor that reads every field the file writes`;
453
+ return {
454
+ details: [...outcome.details, ...problems],
455
+ fix: outcome.fix === null ? fix : `${outcome.fix}; ${fix}`,
456
+ status: 'warn',
457
+ summary: outcome.status === 'ok' ? `${outcome.summary}, but ${below}` : `${outcome.summary}; ${below}`,
458
+ };
459
+ }
460
+ // A profile file that still sets `workers`, which moved to the machine's config.json (ATK-529): it
461
+ // is read and ignored, so a warn, beside whatever else the profile check found.
462
+ function withMovedWorkers(outcome, files) {
463
+ if (files.length === 0)
464
+ return outcome;
465
+ const moved = `${files.join(' and ')} ${files.length === 1 ? 'sets' : 'set'} "workers", which moved to the machine's config.json and is ignored here`;
466
+ const fix = 'set "workers": { "tab": true } in ~/.conductor/config.json on each machine that wants a tab per launch, and drop "workers" from the profile';
467
+ return {
468
+ details: outcome.details,
469
+ fix: outcome.fix === null ? fix : `${outcome.fix}; ${fix}`,
470
+ status: 'warn',
471
+ summary: outcome.status === 'ok' ? `${outcome.summary}, but ${moved}` : `${outcome.summary}; ${moved}`,
472
+ };
473
+ }
474
+ // The launch's worktree stages on a throwaway worktree (manager.ts launchWorker): `git worktree add`
475
+ // from origin/<base>, the local files and setup, with ports as the broker would give them, then the
476
+ // skills check and the trust probe a launch's `claude --bg` meets (ATK-571). Whatever it made is
477
+ // removed, whichever way it went.
478
+ async function worktreeCheck(deps, { clone, dir }, profile, options) {
426
479
  if (!options.worktree)
427
480
  return skip('--no-worktree');
428
481
  const name = `conduct-check-${stamp((deps.now ?? (() => new Date()))())}`;
429
- let path = null;
482
+ const left = join(dir, name);
483
+ // The ports check reports a pool with too few free; setup then runs without them.
484
+ const env = portEnv(await deps.ports.previewPorts(profile.ports).catch(() => ({})));
430
485
  let outcome;
431
486
  try {
432
- path = await deps.worktrees.create(root, name);
433
- const problem = await deps.worktrees.checkSkills(path, projectSkills([profile.skills.work, profile.skills.verify]));
434
- outcome =
435
- problem === null
436
- ? ok(`the worktree hooks created and removed ${name}, and its skills match`)
437
- : fail(`a new worktree's skills: ${problem}`, `atk install in ${root}, then commit .atk-lock.json if it changed`);
487
+ const path = await deps.worktrees.create({
488
+ base: profile.baseBranch,
489
+ clone,
490
+ env: { ...env, CONDUCTOR_ITEM: name, CONDUCTOR_PROJECT: profile.name, CONDUCTOR_WORKTREE: left },
491
+ ...(profile.localFilesFrom === undefined ? {} : { localFilesFrom: profile.localFilesFrom }),
492
+ name,
493
+ path: left,
494
+ sessionEnv: env,
495
+ setup: profile.setup,
496
+ });
497
+ const skills = [profile.skills.work, profile.skills.verify];
498
+ const problem = deps.worktrees.missingSkills(path, projectSkills(skills));
499
+ const ignored = await (deps.ignores ?? gitIgnores)(path, SESSION_SETTINGS);
500
+ const made = `created ${name} from origin/${profile.baseBranch}${profile.setup.length > 0 ? ` and ran its ${profile.setup.length} setup ${profile.setup.length === 1 ? 'command' : 'commands'}` : ''}, then removed it`;
501
+ if (problem !== null) {
502
+ outcome = fail(`${MISSING_SKILLS} ${problem}`, "add what installs them to the profile's setup (ATK's runs atk install), or install them in ~/.claude/skills");
503
+ }
504
+ else {
505
+ // Before the remove below: the probe's session is gone before its directory is.
506
+ let trust;
507
+ try {
508
+ trust = await deps.claude.trusts(path, name);
509
+ }
510
+ catch (error) {
511
+ trust = { error };
512
+ }
513
+ outcome =
514
+ 'error' in trust
515
+ ? fail(`claude --bg couldn't start a session in a new worktree: ${messageOf(trust.error)}`, 'a launch fails the same way: run `claude --bg` in a worktree of the clone to see why', detailsOf(trust.error))
516
+ : !trust.trusted
517
+ ? fail(`Claude Code doesn't trust ${clone}, so no worker can start in its worktrees`, `${trustStep(clone)}, then check again`)
518
+ : trust.removeError !== null
519
+ ? warn(`${made}, but the trust probe's idle session ${trust.session} is still there`, `remove it: claude rm ${trust.session}`, [trust.removeError])
520
+ : !ignored && Object.keys(env).length > 0
521
+ ? warn(`${made}, but git doesn't ignore ${SESSION_SETTINGS}, where a worker's ports go`, `add ${SESSION_SETTINGS.split('\\').join('/')} to .gitignore, so a worker doesn't take the file for work of its own`)
522
+ : ok(`${made}; its skills are there, and Claude Code trusts it`);
523
+ }
438
524
  }
439
525
  catch (error) {
440
- outcome = fail(`the worktree hooks couldn't create a worktree: ${messageOf(error)}`, `the project needs the ATK worktree-kit bundle (/worktree-setup); its hook output is above. If the hook made the branch worktree-${name} first, delete it: git -C ${root} branch -D worktree-${name}`, detailsOf(error));
526
+ outcome = fail(`a new worktree couldn't be made: ${messageOf(error)}`, "check the profile's baseBranch, localFilesFrom and setup; the failing step's output is above", detailsOf(error));
441
527
  }
442
- // A create that failed part way can leave its directory behind.
443
- const left = path ?? join(root, '.claude', 'worktrees', name);
444
- if (path !== null || existsSync(left)) {
445
- try {
446
- await deps.worktrees.remove(root, left);
447
- }
448
- catch (error) {
449
- return fail(`${left} is still there: ${messageOf(error)}`, `remove it by hand: git -C ${root} worktree remove --force ${left}, then git -C ${root} branch -D worktree-${name}`, [`before that: ${outcome.status} ${outcome.summary}`, ...detailsOf(error)]);
450
- }
528
+ // A create that failed part way can leave its directory or branch behind; with neither, this
529
+ // removes nothing.
530
+ try {
531
+ await deps.worktrees.remove(left, { deleteBranch: true, repo: clone });
532
+ }
533
+ catch (error) {
534
+ return fail(`${left} is still there: ${messageOf(error)}`, `remove it by hand: delete the directory, then git -C ${clone} worktree prune and git -C ${clone} branch -D ${BRANCH_PREFIX}${name}`, [
535
+ `before that: ${outcome.status} ${outcome.summary}`,
536
+ ...outcome.details,
537
+ ...(outcome.fix === null ? [] : [`its fix: ${outcome.fix}`]),
538
+ ...detailsOf(error),
539
+ ]);
451
540
  }
452
541
  return outcome;
453
542
  }