@bakers-build/addon-agents 0.9.1-next.4 → 0.9.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.
@@ -1,6 +1,19 @@
1
- import type { ConductorEngineConfig } from '@bakers-build/conductor/contract';
1
+ import type { AgentCatalog } from '@bakers-build/conductor/contract';
2
+ /** Sandbox-safe catalog; permission entries can contain personal machine paths. */
3
+ export declare function catalogReport(config: AgentCatalog): {
4
+ agents: {
5
+ alias: string | undefined;
6
+ description: string;
7
+ harness: string;
8
+ model: string | null;
9
+ }[];
10
+ enabled_agents: string[];
11
+ disabled_agents: string[];
12
+ default_agent: string;
13
+ routes: import("@bakers-build/core").AgentRoutes;
14
+ };
2
15
  /** Report the already-resolved catalog; no agent launch or connection I/O. */
3
- export declare function agentReport(config: Pick<ConductorEngineConfig, 'agents' | 'enabled_agents' | 'disabled_agents' | 'default_agent' | 'routes'>): {
16
+ export declare function agentReport(config: AgentCatalog): {
4
17
  agents: {
5
18
  alias: string | undefined;
6
19
  description: string;
@@ -1,3 +1,11 @@
1
+ /** Sandbox-safe catalog; permission entries can contain personal machine paths. */
2
+ export function catalogReport(config) {
3
+ const report = agentReport(config);
4
+ return {
5
+ ...report,
6
+ agents: report.agents.map(({ permissions: _permissions, ...agent }) => agent),
7
+ };
8
+ }
1
9
  /** Report the already-resolved catalog; no agent launch or connection I/O. */
2
10
  export function agentReport(config) {
3
11
  return {
@@ -1,4 +1,4 @@
1
1
  import { type BbCommandPlugin } from '@bakers-build/core';
2
2
  declare const agentsCommand: BbCommandPlugin;
3
3
  export default agentsCommand;
4
- export { agentReport } from './agents.js';
4
+ export { agentReport, catalogReport } from './agents.js';
package/dist/src/index.js CHANGED
@@ -17,4 +17,4 @@ const agentsCommand = {
17
17
  },
18
18
  };
19
19
  export default agentsCommand;
20
- export { agentReport } from './agents.js';
20
+ export { agentReport, catalogReport } from './agents.js';
@@ -1,2 +1,5 @@
1
+ import type { AddonTools } from '@bakers-build/conductor/contract';
1
2
  import type { BbPreset } from '@bakers-build/core';
3
+ export declare const scopes: BbPreset['scopes'];
4
+ export declare const tools: AddonTools;
2
5
  export declare const commands: BbPreset['commands'];
@@ -1,3 +1,13 @@
1
+ export const scopes = ['machine', 'project'];
2
+ export const tools = {
3
+ contract: 1,
4
+ tools: {
5
+ agents_catalog: {
6
+ description: 'Report the conductor’s loaded agent catalog and routes without permissions, configuration reload or agent launch.',
7
+ },
8
+ },
9
+ handlers: (options, host) => import('./tools.js').then((m) => m.handlersFor(options, host)),
10
+ };
1
11
  export const commands = (acc) => [
2
12
  ...acc,
3
13
  {
@@ -0,0 +1,2 @@
1
+ import type { ToolHandler, ToolHost } from '@bakers-build/conductor/contract';
2
+ export declare function handlersFor(_options?: unknown, host?: ToolHost): Record<string, ToolHandler>;
@@ -0,0 +1,10 @@
1
+ import { catalogReport } from './agents.js';
2
+ export function handlersFor(_options, host) {
3
+ if (!host)
4
+ throw new Error('agents_catalog requires a conductor tool host');
5
+ return {
6
+ agents_catalog: async () => ({
7
+ text: JSON.stringify(catalogReport(host.agentCatalog()), null, 2),
8
+ }),
9
+ };
10
+ }
@@ -0,0 +1,6 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://bakers.build/schema/addon-agents/options.schema.json",
4
+ "type": "object",
5
+ "additionalProperties": false
6
+ }
package/package.json CHANGED
@@ -1,15 +1,17 @@
1
1
  {
2
2
  "name": "@bakers-build/addon-agents",
3
- "version": "0.9.1-next.4",
3
+ "version": "0.9.1-next.6",
4
4
  "description": "Locally resolved agent catalog for conductor operators and qualification.",
5
5
  "type": "module",
6
6
  "license": "MIT",
7
7
  "exports": {
8
8
  ".": "./dist/src/index.js",
9
- "./preset": "./dist/src/preset.js"
9
+ "./preset": "./dist/src/preset.js",
10
+ "./options.schema.json": "./options.schema.json"
10
11
  },
11
12
  "files": [
12
- "dist/src"
13
+ "dist/src",
14
+ "options.schema.json"
13
15
  ],
14
16
  "publishConfig": {
15
17
  "access": "public"
@@ -23,11 +25,11 @@
23
25
  "commander": "^12.1.0"
24
26
  },
25
27
  "peerDependencies": {
26
- "@bakers-build/conductor": "^0.9.1-next.4",
27
- "@bakers-build/core": "^0.9.1-next.4"
28
+ "@bakers-build/conductor": "^0.9.1-next.6",
29
+ "@bakers-build/core": "^0.9.1-next.6"
28
30
  },
29
31
  "bakersBuild": {
30
- "commit": "e5f8dc988628be67c3d92064cb3229e30ad2edde",
32
+ "commit": "e7d9921d51d5c045f29ca7e35d1e6a348e6ddf08",
31
33
  "channel": "next"
32
34
  }
33
35
  }