@bakers-build/bakers 0.8.0 → 0.8.1-next.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -23,8 +23,8 @@ bakers --help
23
23
  `bakers` is the conductor node and client for a bakers.build network: it registers with a
24
24
  Drupal control plane, claims tickets over JSON:API, and runs agents through
25
25
  spawn plugins (Claude, Codex, herdr, and a deterministic fake for tests). Point
26
- it at a control plane with a `conductor.config.js` (scaffold one with
27
- `bakers init`).
26
+ it at a control plane with a `.bakers/project.config.js` (scaffold one with
27
+ `bakers config init`).
28
28
 
29
29
  ## `bakers ui` deep links
30
30
 
@@ -46,7 +46,7 @@ claimants open a picker. `bakers ui --help` lists every form.
46
46
  ## Plugins
47
47
 
48
48
  The four spawn plugins ship **inside** this package — nothing extra to install.
49
- Import them from the `@bakers-build/bakers/plugins` entry in your `conductor.config.js`:
49
+ Import them from the `@bakers-build/bakers/plugins` entry in your `.bakers/project.config.js`:
50
50
 
51
51
  ```js
52
52
  import {
@@ -34,7 +34,7 @@ async function promptInput(label, secret = false) {
34
34
  }
35
35
  const SCOPE_FILE = {
36
36
  machine: '~/.bakers/machine.config.js',
37
- project: '.bakers/conductor.config.js',
37
+ project: '.bakers/project.config.js',
38
38
  };
39
39
  /**
40
40
  * Report each machine/project `addons[]` entry listed in a scope its addon
@@ -44,7 +44,7 @@ const SCOPE_FILE = {
44
44
  async function checkAddonScopes(report, online, cwd) {
45
45
  const files = report.files.filter((f) => f.selected &&
46
46
  f.state !== 'absent' &&
47
- (f.kind === 'machine' || f.kind === 'conductor'));
47
+ (f.kind === 'machine' || f.kind === 'project'));
48
48
  if (files.length === 0)
49
49
  return;
50
50
  const base = {
@@ -79,20 +79,6 @@ async function checkAddonScopes(report, online, cwd) {
79
79
  ],
80
80
  }))), { unresolved: 'skip', logger: { warn: () => { } } });
81
81
  for (const finding of findings) {
82
- if (finding.code === 'addon_with_invalid') {
83
- report.findings.push({
84
- ...base,
85
- code: 'addon_with_invalid',
86
- severity: 'error',
87
- path: finding.path,
88
- key: `addons[${finding.index}].with${finding.key ? `.${finding.key}` : ''}`,
89
- expected: `'${finding.spec}' setting ${finding.key || 'with'} ${finding.message}.`,
90
- observed: finding.spec,
91
- owner: finding.scope,
92
- remediation: `Fix addons[${finding.index}].with${finding.key ? `.${finding.key}` : ''} of ${finding.path}; see the addon's documentation.`,
93
- });
94
- continue;
95
- }
96
82
  const allowed = finding.allowed.map((s) => SCOPE_FILE[s]).join(' or ');
97
83
  report.findings.push({
98
84
  ...base,
@@ -108,9 +94,14 @@ async function checkAddonScopes(report, online, cwd) {
108
94
  if (findings.length > 0 && report.result !== 'failed')
109
95
  report.result = 'blocked';
110
96
  }
97
+ /** `, N values not checked`: a passing result never hides what it skipped. */
98
+ function notCheckedSummary(report) {
99
+ const count = report.findings.filter((f) => f.code === 'not_checked' || f.code === 'options_not_checked').length;
100
+ return count ? `, ${count} value${count === 1 ? '' : 's'} not checked` : '';
101
+ }
111
102
  export function renderConfigReport(report, dryRun = false) {
112
103
  const lines = [
113
- `bakers config ${report.operation}: ${report.result}${dryRun ? ' (dry run; no files written)' : ''}`,
104
+ `bakers config ${report.operation}: ${report.result}${notCheckedSummary(report)}${dryRun ? ' (dry run; no files written)' : ''}`,
114
105
  `Scope: ${report.resolved_scopes.join(', ')}`,
115
106
  `Machine root: ${report.roots.machine}`,
116
107
  `Connection root: ${report.roots.connection}`,
@@ -190,7 +181,7 @@ function buildConfigCommand(parent, operation, deps, hiddenScope, description) {
190
181
  options.scope = hiddenScope;
191
182
  const { applyConfigPlan, planConfig } = await import('@bakers-build/conductor/config');
192
183
  if (options.projectConnection !== undefined)
193
- throw new Error('--project-connection is retired; use --connection <id> and .bakers/connection.config.local.js.');
184
+ throw new Error('--project-connection is retired; use --connection <id> or BAKERS_CONNECTION.');
194
185
  const cwd = deps.cwd ?? process.cwd();
195
186
  const env = deps.env ?? process.env;
196
187
  const interactive = (deps.isTTY ?? Boolean(process.stdin.isTTY && process.stdout.isTTY)) &&
@@ -241,9 +232,11 @@ function buildConfigCommand(parent, operation, deps, hiddenScope, description) {
241
232
  operation,
242
233
  cwd,
243
234
  // Only forward an explicitly injected home; absent, core resolves the
244
- // `.bakers` root itself and honours BB_HOME.
235
+ // `.bakers` root itself and honours BAKERS_HOME.
245
236
  ...(deps.home !== undefined ? { home: deps.home } : {}),
246
237
  inputs,
238
+ // Addon option schemas resolve from this CLI install, as the loader's do.
239
+ addonBases: [import.meta.url],
247
240
  // `bakers init` (hiddenScope !== undefined) never pulls the project
248
241
  // layer in, even inside a project checkout (BB-496 finding 1).
249
242
  ...(hiddenScope !== undefined ? { excludeProjectLayer: true } : {}),
@@ -268,7 +261,7 @@ function buildConfigCommand(parent, operation, deps, hiddenScope, description) {
268
261
  selectedConnection = await resolveBbConnectionSelection({
269
262
  cwd,
270
263
  // Only forward an explicitly injected home; absent, core resolves
271
- // the `.bakers` root itself and honours BB_HOME (same rule as the
264
+ // the `.bakers` root itself and honours BAKERS_HOME (same rule as the
272
265
  // `planning` object above — a stray `?? homedir()` here would
273
266
  // resolve this command's connection selection under `~/.bakers` while
274
267
  // the rest of it honours the override).
@@ -318,7 +311,7 @@ function buildConfigCommand(parent, operation, deps, hiddenScope, description) {
318
311
  ['clientId', 'client_id', 'OAuth client identifier'],
319
312
  ['secret', 'client_secret', 'OAuth client secret'],
320
313
  ['workspaceId', 'workspace_id', 'Workspace UUID'],
321
- ['workspace', 'bakers.workspace', 'Workspace name'],
314
+ ['workspace', 'project.workspace', 'Workspace name'],
322
315
  ].filter(([input]) => !(deviceCode && input === 'secret'));
323
316
  for (const [input, key, label] of fields) {
324
317
  const requiredForFreshConnection = freshConnection &&
@@ -1,9 +1,9 @@
1
1
  import { type CommandDescriptor } from '@bakers-build/core';
2
2
  import { Command } from 'commander';
3
- /** The built-in command registry. `$BB_COMMANDS` (JSON array of descriptors)
3
+ /** The built-in command registry. `$BAKERS_COMMANDS` (JSON array of descriptors)
4
4
  * overrides it wholesale. */
5
5
  export declare const DEFAULT_COMMANDS: CommandDescriptor[];
6
- /** Resolve the registry: `$BB_COMMANDS` override else the built-in set. */
6
+ /** Resolve the registry: `$BAKERS_COMMANDS` override else the built-in set. */
7
7
  export declare function resolveCommands(): CommandDescriptor[];
8
8
  export { resolveCliVersion } from '@bakers-build/core';
9
9
  /** Host bases for ESLint-style sibling resolution: the meta install → cwd. */
package/dist/src/host.js CHANGED
@@ -16,12 +16,12 @@ import { registerUpdate } from './update.js';
16
16
  // ESLint-style resolved, LAZILY mounted command plugins (AC-2). The host
17
17
  // discovers + mounts; it hard-wires nothing. Only the invoked subcommand's module
18
18
  // is imported — `bakers --help` lists all four via describe-only stubs and imports
19
- // none; `bakers oven …` imports only the conductor module.
19
+ // none; `bakers conductor …` imports only the conductor module.
20
20
  //
21
21
  // BB-215: the registry is DERIVED from the command surface — the command
22
22
  // addons' preset `commands` accumulators — rather than a hand-written list.
23
23
  // Those presets are LIGHT (they import no runtime, only return descriptors), so
24
- // composing them at boot keeps `bakers --help` import-light. `$BB_COMMANDS`
24
+ // composing them at boot keeps `bakers --help` import-light. `$BAKERS_COMMANDS`
25
25
  // still overrides the whole registry. BB-224 (Finding 7) added the fourth
26
26
  // command surface, `@bakers-build/addon-deployment` (`bakers deployment …`), which the
27
27
  // `conductor` command plugin used to register as a side effect.
@@ -46,16 +46,16 @@ function composeCommandSurface() {
46
46
  }
47
47
  return acc;
48
48
  }
49
- /** The built-in command registry. `$BB_COMMANDS` (JSON array of descriptors)
49
+ /** The built-in command registry. `$BAKERS_COMMANDS` (JSON array of descriptors)
50
50
  * overrides it wholesale. */
51
51
  export const DEFAULT_COMMANDS = composeCommandSurface();
52
- /** Resolve the registry: `$BB_COMMANDS` override else the built-in set. */
52
+ /** Resolve the registry: `$BAKERS_COMMANDS` override else the built-in set. */
53
53
  export function resolveCommands() {
54
- const override = process.env.BB_COMMANDS;
54
+ const override = process.env.BAKERS_COMMANDS;
55
55
  if (override && override.trim() !== '') {
56
56
  const parsed = JSON.parse(override);
57
57
  if (!Array.isArray(parsed)) {
58
- throw new Error('$BB_COMMANDS must be a JSON array of command descriptors');
58
+ throw new Error('$BAKERS_COMMANDS must be a JSON array of command descriptors');
59
59
  }
60
60
  return parsed;
61
61
  }
@@ -120,14 +120,14 @@ function addStub(program, entry, bases, argv) {
120
120
  }
121
121
  /** Best-effort describe text for a stub without importing the plugin. BB-215:
122
122
  * the descriptor now carries its own `describe` (from the addon's preset); this
123
- * falls back only for a `$BB_COMMANDS` entry that omits it. */
123
+ * falls back only for a `$BAKERS_COMMANDS` entry that omits it. */
124
124
  function pluginDescribe(entry) {
125
125
  if (typeof entry.describe === 'string' && entry.describe.trim() !== '') {
126
126
  return entry.describe;
127
127
  }
128
128
  switch (entry.name) {
129
- case 'oven':
130
- return 'node-agent lifecycle + local registry';
129
+ case 'conductor':
130
+ return 'conductor lifecycle + local registry';
131
131
  case 'ui':
132
132
  return 'interactive terminal UI: dashboard, projects, tickets';
133
133
  case 'dropsh':
@@ -166,7 +166,7 @@ export async function buildHostProgram(argv, opts = {}) {
166
166
  return resolveBbProjectContext(await createBbConnectionClient(connection), selection);
167
167
  },
168
168
  writeWorkspace: async (configPath, name) => {
169
- await projectContext.writeBbWorkspaceSelection(projectContext.bakersProjectOwner(configPath), name, `Set bakers.workspace in ${configPath} to switch manually.`);
169
+ await projectContext.writeBbWorkspaceSelection(projectContext.bakersProjectOwner(configPath), name, `Set project.workspace in ${configPath} to switch manually.`);
170
170
  },
171
171
  },
172
172
  }
@@ -180,13 +180,13 @@ export async function buildHostProgram(argv, opts = {}) {
180
180
  program
181
181
  .name('bakers')
182
182
  .description('bakers.build conductor + client CLI')
183
- .option('--conductor <name>', 'select a conductor by stem (conductor→conductor.config.js, else <name>.conductor.config.js; env $BB_CONDUCTOR)');
184
- // The global --conductor flag threads into $BB_CONDUCTOR (flag wins over env)
183
+ .option('--conductor <name>', 'select a conductor variant (default → project.config.js, else project.<name>.config.js; env $BAKERS_CONDUCTOR)');
184
+ // The global --conductor flag threads into $BAKERS_CONDUCTOR (flag wins over env)
185
185
  // so every command selects the named engine config without per-command wiring.
186
186
  program.hook('preAction', () => {
187
187
  const name = program.opts().conductor;
188
188
  if (typeof name === 'string' && name !== '') {
189
- process.env.BB_CONDUCTOR = name;
189
+ process.env.BAKERS_CONDUCTOR = name;
190
190
  }
191
191
  });
192
192
  const cliVersion = resolveCliVersion();
@@ -212,8 +212,14 @@ export async function buildHostProgram(argv, opts = {}) {
212
212
  }
213
213
  /** Parse argv against the host program, mapping commander's clean exits. */
214
214
  export async function runHost(argv, opts = {}) {
215
- // Forward help to plugins that render their own complete option list.
215
+ // A hidden alias (`oven` for `conductor`) runs as its command: the argv
216
+ // names the command, so help, dispatch and the plugin see one name.
216
217
  const index = firstPositionalIndex(argv);
218
+ const at = argv[index] === 'help' ? index + 1 : index;
219
+ const canonical = resolveCommands().find((c) => c.aliases?.includes(argv[at]));
220
+ if (canonical)
221
+ argv = [...argv.slice(0, at), canonical.name, ...argv.slice(at + 1)];
222
+ // Forward help to plugins that render their own complete option list.
217
223
  if (argv[index] === 'help' &&
218
224
  resolveCommands().some((c) => c.forwardHelp && c.name === argv[index + 1])) {
219
225
  argv = [...argv.slice(0, index), ...argv.slice(index + 1), '--help'];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bakers-build/bakers",
3
- "version": "0.8.0",
3
+ "version": "0.8.1-next.2",
4
4
  "description": "bakers.build meta package: the `bakers` plugin-host CLI + all runtime plugins. Global install target.",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -38,39 +38,42 @@
38
38
  "jsonapi"
39
39
  ],
40
40
  "dependencies": {
41
- "@bakers-build/addon-agents": "^0.8.0",
42
- "@bakers-build/addon-auth-basic": "^0.8.0",
43
- "@bakers-build/addon-claude": "^0.8.0",
44
- "@bakers-build/addon-codex": "^0.8.0",
45
- "@bakers-build/addon-ddev": "^0.8.0",
46
- "@bakers-build/addon-deployment": "^0.8.0",
47
- "@bakers-build/addon-dropsh": "^0.8.0",
48
- "@bakers-build/addon-essentials": "^0.8.0",
49
- "@bakers-build/addon-bakers-ui": "^0.8.0",
50
- "@bakers-build/addon-bakers-ui-artifacts": "^0.8.0",
51
- "@bakers-build/addon-grok": "^0.8.0",
52
- "@bakers-build/addon-herdr": "^0.8.0",
53
- "@bakers-build/addon-herdr-core": "^0.8.0",
54
- "@bakers-build/addon-info": "^0.8.0",
55
- "@bakers-build/addon-kimi": "^0.8.0",
56
- "@bakers-build/addon-opencode": "^0.8.0",
57
- "@bakers-build/addon-orca": "^0.8.0",
58
- "@bakers-build/addon-pi": "^0.8.0",
59
- "@bakers-build/addon-ports": "^0.8.0",
60
- "@bakers-build/addon-ports-cloudflare": "^0.8.0",
61
- "@bakers-build/addon-ports-cloudflare-quick": "^0.8.0",
62
- "@bakers-build/addon-ports-frp": "^0.8.0",
63
- "@bakers-build/addon-remote-drupal": "^0.8.0",
64
- "@bakers-build/addon-track": "^0.8.0",
65
- "@bakers-build/addon-workspace": "^0.8.0",
66
- "@bakers-build/addon-workspace-git": "^0.8.0",
67
- "@bakers-build/conductor": "^0.8.0",
68
- "@bakers-build/core": "^0.8.0",
69
- "@bakers-build/ui": "^0.8.0",
41
+ "@bakers-build/addon-agents": "^0.8.1-next.2",
42
+ "@bakers-build/addon-auth-basic": "^0.8.1-next.2",
43
+ "@bakers-build/addon-claude": "^0.8.1-next.2",
44
+ "@bakers-build/addon-codex": "^0.8.1-next.2",
45
+ "@bakers-build/addon-ddev": "^0.8.1-next.2",
46
+ "@bakers-build/addon-deployment": "^0.8.1-next.2",
47
+ "@bakers-build/addon-dropsh": "^0.8.1-next.2",
48
+ "@bakers-build/addon-essentials": "^0.8.1-next.2",
49
+ "@bakers-build/addon-bakers-ui": "^0.8.1-next.2",
50
+ "@bakers-build/addon-bakers-ui-artifacts": "^0.8.1-next.2",
51
+ "@bakers-build/addon-forge": "^0.8.1-next.2",
52
+ "@bakers-build/addon-forge-github": "^0.8.1-next.2",
53
+ "@bakers-build/addon-forge-gitlab": "^0.8.1-next.2",
54
+ "@bakers-build/addon-grok": "^0.8.1-next.2",
55
+ "@bakers-build/addon-herdr": "^0.8.1-next.2",
56
+ "@bakers-build/addon-herdr-core": "^0.8.1-next.2",
57
+ "@bakers-build/addon-info": "^0.8.1-next.2",
58
+ "@bakers-build/addon-kimi": "^0.8.1-next.2",
59
+ "@bakers-build/addon-opencode": "^0.8.1-next.2",
60
+ "@bakers-build/addon-orca": "^0.8.1-next.2",
61
+ "@bakers-build/addon-pi": "^0.8.1-next.2",
62
+ "@bakers-build/addon-ports": "^0.8.1-next.2",
63
+ "@bakers-build/addon-ports-cloudflare": "^0.8.1-next.2",
64
+ "@bakers-build/addon-ports-cloudflare-quick": "^0.8.1-next.2",
65
+ "@bakers-build/addon-ports-frp": "^0.8.1-next.2",
66
+ "@bakers-build/addon-remote-drupal": "^0.8.1-next.2",
67
+ "@bakers-build/addon-track": "^0.8.1-next.2",
68
+ "@bakers-build/addon-workspace": "^0.8.1-next.2",
69
+ "@bakers-build/addon-workspace-git": "^0.8.1-next.2",
70
+ "@bakers-build/conductor": "^0.8.1-next.2",
71
+ "@bakers-build/core": "^0.8.1-next.2",
72
+ "@bakers-build/ui": "^0.8.1-next.2",
70
73
  "commander": "^12.1.0"
71
74
  },
72
75
  "bakersBuild": {
73
- "commit": "082d8c57436f78e751f5a9a26a4446cec42209ce",
74
- "channel": "latest"
76
+ "commit": "0177880667693d1c36c65ffced82d2f3a17cbf2a",
77
+ "channel": "next"
75
78
  }
76
79
  }