@bakers-build/core 0.5.1-next.855 → 0.5.1-next.857

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.
@@ -59,6 +59,8 @@ function isPresetShaped(mod) {
59
59
  return true;
60
60
  if (typeof mod.inbox === 'object' && mod.inbox !== null)
61
61
  return true;
62
+ if (typeof mod.tools === 'object' && mod.tools !== null)
63
+ return true;
62
64
  if (Array.isArray(mod.scopes) || typeof mod.mergeWith === 'function')
63
65
  return true;
64
66
  return PRESET_FUNCTION_KEYS.some((k) => typeof mod[k] === 'function');
@@ -287,6 +289,15 @@ export async function discoverAddons(entries, surface, bases, opts = {}) {
287
289
  ...(presetOpts !== undefined ? { options: presetOpts } : {}),
288
290
  });
289
291
  }
292
+ if (surface === 'conductor' &&
293
+ preset.tools !== undefined &&
294
+ (!opts.only || opts.only.includes('addonTools'))) {
295
+ acc.addonTools.push({
296
+ ...addonPackage(key),
297
+ tools: preset.tools,
298
+ ...(presetOpts !== undefined ? { options: presetOpts } : {}),
299
+ });
300
+ }
290
301
  }
291
302
  };
292
303
  await walk(entries);
@@ -98,6 +98,17 @@ export interface DiscoveredContributions {
98
98
  inbox: unknown;
99
99
  options?: unknown;
100
100
  }>;
101
+ /**
102
+ * Addon agent tools (conductor surface): each addon's `tools` export with
103
+ * its name, version and `with` options, like `addonInbox`. Opaque here; the
104
+ * conductor types `tools` as its `AddonTools`.
105
+ */
106
+ addonTools: Array<{
107
+ name: string;
108
+ version: string;
109
+ tools: unknown;
110
+ options?: unknown;
111
+ }>;
101
112
  }
102
113
  /**
103
114
  * An OPAQUE per-surface accumulator. The kernel threads it without knowing its
@@ -146,6 +157,8 @@ export interface BbPreset<O = unknown> {
146
157
  connectionPlugins?: (acc: DropSHPlugin[], opts: O) => DropSHPlugin[] | Promise<DropSHPlugin[]>;
147
158
  uiEntries?: (acc: string[], opts: O) => string[] | Promise<string[]>;
148
159
  inbox?: unknown;
160
+ /** Agent tools the conductor serves to runs and addons — a value, like `inbox`. */
161
+ tools?: unknown;
149
162
  }
150
163
  /** The preset function keys, for shape-detection during discovery. */
151
164
  export declare const PRESET_FUNCTION_KEYS: Array<keyof DiscoveredContributions>;
@@ -63,5 +63,6 @@ export function emptyContributions() {
63
63
  connectionPlugins: [],
64
64
  uiEntries: [],
65
65
  addonInbox: [],
66
+ addonTools: [],
66
67
  };
67
68
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bakers-build/core",
3
- "version": "0.5.1-next.855",
3
+ "version": "0.5.1-next.857",
4
4
  "description": "bakers.build surface-agnostic kernel: host contract, split-config helpers, addon preset/discovery machinery, shared primitives.",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -38,7 +38,7 @@
38
38
  "yaml": "^2.7.0"
39
39
  },
40
40
  "bakersBuild": {
41
- "commit": "bea27960d8d0cfb827f72aae305ed5820ecd28f3",
41
+ "commit": "31830084e7db17fb0417b4681ec7dace42ae4138",
42
42
  "channel": "next"
43
43
  }
44
44
  }