@bakers-build/core 0.6.1-next.5 → 0.6.1-next.6
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.
|
@@ -34,6 +34,8 @@ export interface MachineContext {
|
|
|
34
34
|
* Omitted or false keeps the original local URL.
|
|
35
35
|
*/
|
|
36
36
|
tunnel?: boolean;
|
|
37
|
+
/** Shared run security for every agent; the conductor validates it. */
|
|
38
|
+
security?: unknown;
|
|
37
39
|
}
|
|
38
40
|
/**
|
|
39
41
|
* Warn once that a leftover `max_parallel` in a config file is ignored: the
|
package/dist/src/index.js
CHANGED
|
@@ -39,6 +39,5 @@ export { DEFAULT_SLUG_MAX_LENGTH, slugify } from './core/slug.js';
|
|
|
39
39
|
export { AddonUnresolvedError, discoverAddons, loadAddonPreset, resolveConductorSlots, } from './plugins/discover-addons.js';
|
|
40
40
|
export { emptyContributions, PRESET_FUNCTION_KEYS, SURFACE_KEYS, } from './plugins/preset.js';
|
|
41
41
|
export { discoverScoped, readConfigAddons, readEffectiveAddon, scopeAddons, } from './plugins/scoped-addons.js';
|
|
42
|
-
// BB-194 AC-2:
|
|
43
|
-
//
|
|
44
|
-
// seam (`@bakers-build/addon-bakers-ui`), and herdr types its impl locally.
|
|
42
|
+
// BB-194 AC-2: there is no agent-host contract here; `bakers ui` no longer
|
|
43
|
+
// hosts agents.
|
|
@@ -35,6 +35,9 @@ export declare function loadAddonPreset(spec: string, bases: string[], warn?: Wa
|
|
|
35
35
|
export declare function discoverAddons(entries: AddonEntry[] | undefined, surface: BbSurface, bases: string[], opts?: {
|
|
36
36
|
logger?: ConductorLogger;
|
|
37
37
|
globals?: unknown;
|
|
38
|
+
/** Like `globals`, but seen only by the `agents` accumulators (the
|
|
39
|
+
* conductor's shared run security). */
|
|
40
|
+
agentGlobals?: unknown;
|
|
38
41
|
/** Narrow the surface's accumulators to this subset (intersection only). */
|
|
39
42
|
only?: Array<keyof DiscoveredContributions>;
|
|
40
43
|
/** `skip` warns and drops an addon that does not RESOLVE; import errors still throw. */
|
|
@@ -188,7 +188,7 @@ function mergeGlobals(globals, own) {
|
|
|
188
188
|
}
|
|
189
189
|
/** Run one preset's surface accumulators into `acc`, attaching `priority` to any
|
|
190
190
|
* newly appended agent candidates. */
|
|
191
|
-
async function applyPreset(preset, opts, priority, alias, surface, acc, only) {
|
|
191
|
+
async function applyPreset(preset, opts, priority, alias, surface, acc, only, agentOpts = opts) {
|
|
192
192
|
// `only` NARROWS, never widens: a key the surface does not run stays unrun.
|
|
193
193
|
const keys = only
|
|
194
194
|
? SURFACE_KEYS[surface].filter((k) => only.includes(k))
|
|
@@ -198,8 +198,9 @@ async function applyPreset(preset, opts, priority, alias, surface, acc, only) {
|
|
|
198
198
|
if (typeof fn !== 'function')
|
|
199
199
|
continue;
|
|
200
200
|
const before = key === 'agents' ? acc.agents.length : 0;
|
|
201
|
+
const keyOpts = key === 'agents' ? agentOpts : opts;
|
|
201
202
|
// biome-ignore lint/suspicious/noExplicitAny: heterogeneous per-key arrays
|
|
202
|
-
acc[key] = await fn(acc[key],
|
|
203
|
+
acc[key] = await fn(acc[key], keyOpts);
|
|
203
204
|
if (key === 'agents' && alias !== undefined) {
|
|
204
205
|
const added = acc.agents.slice(before);
|
|
205
206
|
const selected = added.filter((c) => c.alias === alias);
|
|
@@ -279,7 +280,7 @@ export async function discoverAddons(entries, surface, bases, opts = {}) {
|
|
|
279
280
|
await walk(preset.addons, listBases);
|
|
280
281
|
}
|
|
281
282
|
const presetOpts = mergeGlobals(opts.globals, withOpts);
|
|
282
|
-
await applyPreset(preset, presetOpts, priority, alias, surface, acc, opts.only);
|
|
283
|
+
await applyPreset(preset, presetOpts, priority, alias, surface, acc, opts.only, mergeGlobals(opts.agentGlobals, presetOpts));
|
|
283
284
|
if (surface === 'conductor' &&
|
|
284
285
|
preset.inbox !== undefined &&
|
|
285
286
|
(!opts.only || opts.only.includes('addonInbox'))) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bakers-build/core",
|
|
3
|
-
"version": "0.6.1-next.
|
|
3
|
+
"version": "0.6.1-next.6",
|
|
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": "
|
|
41
|
+
"commit": "12b97ff4aa2422d69dab286141f3234609f32351",
|
|
42
42
|
"channel": "next"
|
|
43
43
|
}
|
|
44
44
|
}
|