@bakers-build/conductor 0.11.1-next.2 → 0.11.1-next.3
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/dist/src/contract.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export { AmbiguousProjectNameError, type ResolvedBbProjectContext, resolveBbProjectContext, } from './bakers-project-context.js';
|
|
2
2
|
export { type AgentFootprint, type AgentModelApi, type AgentRunContext, type AgentRunIdentity, type AgentRunPreparation, type AgentRuntimeInfo, type BbAgent, CONDUCTOR_TOKEN_ENV, CONDUCTOR_TOOL_TIMEOUT_MS, CONDUCTOR_TOOLS_SERVER, CONDUCTOR_URL_ENV, DEFAULT_ENV_DENY, emptyAgentFootprint, matchesEnvDeny, type PluginLaunch, type RunBind, type RunEnvPolicy, } from './plugins/agent.js';
|
|
3
3
|
export { detectKnownOverrides, type KnownOptionSpec, type KnownOverrides, type KnownScalarKind, type ResolvedSecurity, resolveAgentCliOptions, resolveSecurityOptions, type SandboxOptions, SECURITY_MODES, type SecurityMode, type SecurityOptions, type SecurityReport, SHARED_SECURITY_KEY, type SharedListKey, type SharedSecurity, validateAgentArgs, validateOptionalBoolean, validateOptionalString, validateSharedSecurity, } from './plugins/agent-args.js';
|
|
4
|
-
export { ensureHome, homeKey, homePath, type MarketplaceDeclaration, validateMarketplaces, } from './plugins/agent-home.js';
|
|
4
|
+
export { ensureHome, homeKey, homePath, lock, type MarketplaceDeclaration, validateMarketplaces, } from './plugins/agent-home.js';
|
|
5
5
|
export type { BbExecutor, ConductorStartContext, ExecutorCapabilities, HookContext, HookListener, HookListenerContext, HookListenerFn, HookName, HookResult, MachineRegistrationData, OpenWorkspaceContext, SpawnedSession, SpawnRunInput, WorktreeTeardown, } from './plugins/executor.js';
|
|
6
6
|
export type { DiscoveredInbox, InboxBinding, InboxMessageHandler, InboxMessageRequest, InboxMessages, LoadedInbox, } from './plugins/message.js';
|
|
7
7
|
export { loadInbox, validateRequestPayload, } from './plugins/message.js';
|
package/dist/src/contract.js
CHANGED
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
export { AmbiguousProjectNameError, resolveBbProjectContext, } from './bakers-project-context.js';
|
|
15
15
|
export { CONDUCTOR_TOKEN_ENV, CONDUCTOR_TOOL_TIMEOUT_MS, CONDUCTOR_TOOLS_SERVER, CONDUCTOR_URL_ENV, DEFAULT_ENV_DENY, emptyAgentFootprint, matchesEnvDeny, } from './plugins/agent.js';
|
|
16
16
|
export { detectKnownOverrides, resolveAgentCliOptions, resolveSecurityOptions, SECURITY_MODES, SHARED_SECURITY_KEY, validateAgentArgs, validateOptionalBoolean, validateOptionalString, validateSharedSecurity, } from './plugins/agent-args.js';
|
|
17
|
-
export { ensureHome, homeKey, homePath, validateMarketplaces, } from './plugins/agent-home.js';
|
|
17
|
+
export { ensureHome, homeKey, homePath, lock, validateMarketplaces, } from './plugins/agent-home.js';
|
|
18
18
|
export { loadInbox, validateRequestPayload, } from './plugins/message.js';
|
|
19
19
|
export { resolveAgent, selectAgent, selectAgents, selectExecutor, selectRemote, selectWorkspace, } from './plugins/plugins.js';
|
|
20
20
|
export { narrowConductorContributions, } from './plugins/preset.js';
|
|
@@ -1278,14 +1278,22 @@ export class Conductor {
|
|
|
1278
1278
|
Object.assign(entry, { state: 'on', hash, home, marketplaces });
|
|
1279
1279
|
let launch;
|
|
1280
1280
|
try {
|
|
1281
|
-
launch = await chosen.agent.installPlugins(marketplaces, home);
|
|
1281
|
+
launch = await chosen.agent.installPlugins(marketplaces, home, pickSecrets(chosen.agent.secretEnv ?? [], this.secrets));
|
|
1282
|
+
// A host install used the person's own config dir, not this home.
|
|
1283
|
+
if (launch.home === 'host') {
|
|
1284
|
+
delete entry.hash;
|
|
1285
|
+
delete entry.home;
|
|
1286
|
+
}
|
|
1282
1287
|
Object.assign(entry, {
|
|
1283
1288
|
outcome: launch.home,
|
|
1284
1289
|
...(launch.trust_bypass?.length
|
|
1285
1290
|
? { trust_bypass: launch.trust_bypass }
|
|
1286
1291
|
: {}),
|
|
1287
1292
|
...(launch.gaps?.length ? { gaps: launch.gaps } : {}),
|
|
1293
|
+
...(launch.warnings?.length ? { warnings: launch.warnings } : {}),
|
|
1288
1294
|
});
|
|
1295
|
+
for (const warning of launch.warnings ?? [])
|
|
1296
|
+
this.logger.warn({ ticket: t.identifier, run: run.runUuid }, warning);
|
|
1289
1297
|
}
|
|
1290
1298
|
catch (err) {
|
|
1291
1299
|
entry.failure = err instanceof Error ? err.message : String(err);
|
|
@@ -14,6 +14,8 @@ export declare function validateMarketplaces(value: unknown): MarketplaceDeclara
|
|
|
14
14
|
export declare function homeKey(marketplaces: MarketplaceDeclaration[]): string;
|
|
15
15
|
/** `~/.cache/bakers/agent-homes/<harness>/<key>`, outside the sandbox-hidden `~/.bakers`. */
|
|
16
16
|
export declare function homePath(harness: string, key: string): string;
|
|
17
|
+
/** Take `<home>.lock`; a lock whose owner process is gone is taken over. */
|
|
18
|
+
export declare function lock(path: string): Promise<() => void>;
|
|
17
19
|
/**
|
|
18
20
|
* Make `path` a complete agent home: `reused` when a previous build finished,
|
|
19
21
|
* else `build(path)` runs under the lock and the home is `built`. A failed
|
|
@@ -62,7 +62,7 @@ function alive(pid) {
|
|
|
62
62
|
}
|
|
63
63
|
}
|
|
64
64
|
/** Take `<home>.lock`; a lock whose owner process is gone is taken over. */
|
|
65
|
-
async function lock(path) {
|
|
65
|
+
export async function lock(path) {
|
|
66
66
|
const file = `${path}.lock`;
|
|
67
67
|
const owner = `${process.pid}:${Math.random()}`;
|
|
68
68
|
for (;;) {
|
|
@@ -100,8 +100,13 @@ export interface PluginLaunch {
|
|
|
100
100
|
env: Record<string, string>;
|
|
101
101
|
/** Passed to `launchCommand` as its `args`. */
|
|
102
102
|
args: string[];
|
|
103
|
-
/**
|
|
104
|
-
|
|
103
|
+
/**
|
|
104
|
+
* `built` when this call built the home, `reused` when it was complete,
|
|
105
|
+
* `host` when the run uses the person's own config dir instead.
|
|
106
|
+
*/
|
|
107
|
+
home: 'built' | 'reused' | 'host';
|
|
108
|
+
/** Differences from the declaration left unchanged, logged at run start. */
|
|
109
|
+
warnings?: string[];
|
|
105
110
|
/** Trust checks this run skips, for the run's `plugins` log entry. */
|
|
106
111
|
trust_bypass?: string[];
|
|
107
112
|
/** Declared plugins the harness cannot load, for the same entry. */
|
|
@@ -164,7 +169,9 @@ export interface BbAgent extends AgentRuntimeInfo {
|
|
|
164
169
|
* launches. Called before every launch, in every security mode. Throws,
|
|
165
170
|
* naming the plugin and the harness output, when the install fails.
|
|
166
171
|
*/
|
|
167
|
-
installPlugins?(marketplaces: readonly MarketplaceDeclaration[], home: string
|
|
172
|
+
installPlugins?(marketplaces: readonly MarketplaceDeclaration[], home: string,
|
|
173
|
+
/** The run's picked {@link secretEnv} values, for a token login. */
|
|
174
|
+
secrets?: Readonly<Record<string, string>>): Promise<PluginLaunch>;
|
|
168
175
|
/**
|
|
169
176
|
* How the conductor treats ticket/project env_vars whose names match
|
|
170
177
|
* `deny`: dropped when `drop`, kept (and still logged) otherwise. Omitted →
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bakers-build/conductor",
|
|
3
|
-
"version": "0.11.1-next.
|
|
3
|
+
"version": "0.11.1-next.3",
|
|
4
4
|
"description": "bakers.build conductor engine + CLI: registers, claims tickets via JSON:API, dispatches agents.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -32,14 +32,14 @@
|
|
|
32
32
|
"dependencies": {
|
|
33
33
|
"@dropsh/plugin-jsonapi-schema": "^0.8.2",
|
|
34
34
|
"@dropsh/plugin-oauth2": "^0.8.2",
|
|
35
|
-
"@bakers-build/core": "^0.11.1-next.
|
|
36
|
-
"@bakers-build/message": "^0.11.1-next.
|
|
35
|
+
"@bakers-build/core": "^0.11.1-next.3",
|
|
36
|
+
"@bakers-build/message": "^0.11.1-next.3",
|
|
37
37
|
"@modelcontextprotocol/sdk": "1.32.1",
|
|
38
38
|
"commander": "^12.1.0",
|
|
39
39
|
"dropsh": "^0.8.2"
|
|
40
40
|
},
|
|
41
41
|
"bakersBuild": {
|
|
42
|
-
"commit": "
|
|
42
|
+
"commit": "0bd662a88dd41e11e79a7912bf83dc0ee48a733d",
|
|
43
43
|
"channel": "next"
|
|
44
44
|
}
|
|
45
45
|
}
|