@bakers-build/addon-agents 0.10.1-next.10 → 0.10.1-next.12

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.
@@ -2,6 +2,9 @@ import type { AgentCatalog } from '@bakers-build/conductor/contract';
2
2
  /** Sandbox-safe catalog; permission entries can contain personal machine paths. */
3
3
  export declare function catalogReport(config: AgentCatalog): {
4
4
  agents: {
5
+ secret_env?: {
6
+ [k: string]: string;
7
+ };
5
8
  alias: string | undefined;
6
9
  description: string;
7
10
  harness: string;
@@ -12,9 +15,15 @@ export declare function catalogReport(config: AgentCatalog): {
12
15
  default_agent: string;
13
16
  routes: import("@bakers-build/core").AgentRoutes;
14
17
  };
15
- /** Report the already-resolved catalog; no agent launch or connection I/O. */
16
- export declare function agentReport(config: AgentCatalog): {
18
+ /**
19
+ * Report the already-resolved catalog; no agent launch or connection I/O.
20
+ * With `isSet`, each agent's declared secrets show `set` or `unset`, never a value.
21
+ */
22
+ export declare function agentReport(config: AgentCatalog, isSet?: (name: string) => boolean): {
17
23
  agents: {
24
+ secret_env?: {
25
+ [k: string]: string;
26
+ };
18
27
  alias: string | undefined;
19
28
  description: string;
20
29
  harness: string;
@@ -6,8 +6,11 @@ export function catalogReport(config) {
6
6
  agents: report.agents.map(({ permissions: _permissions, ...agent }) => agent),
7
7
  };
8
8
  }
9
- /** Report the already-resolved catalog; no agent launch or connection I/O. */
10
- export function agentReport(config) {
9
+ /**
10
+ * Report the already-resolved catalog; no agent launch or connection I/O.
11
+ * With `isSet`, each agent's declared secrets show `set` or `unset`, never a value.
12
+ */
13
+ export function agentReport(config, isSet) {
11
14
  return {
12
15
  agents: config.agents.map((c) => ({
13
16
  alias: c.alias,
@@ -15,6 +18,14 @@ export function agentReport(config) {
15
18
  harness: c.agent.id,
16
19
  model: c.model ?? null,
17
20
  permissions: c.agent.permissions ?? null,
21
+ ...(isSet && c.agent.secretEnv?.length
22
+ ? {
23
+ secret_env: Object.fromEntries(c.agent.secretEnv.map((name) => [
24
+ name,
25
+ isSet(name) ? 'set' : 'unset',
26
+ ])),
27
+ }
28
+ : {}),
18
29
  })),
19
30
  enabled_agents: config.enabled_agents,
20
31
  disabled_agents: config.disabled_agents,
package/dist/src/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { loadConductorConfig } from '@bakers-build/conductor';
2
- import { resolveConfigPath } from '@bakers-build/core';
2
+ import { loadSecretsFile, resolveConfigPath, } from '@bakers-build/core';
3
3
  import { agentReport } from './agents.js';
4
4
  const agentsCommand = {
5
5
  kind: 'command',
@@ -12,7 +12,9 @@ const agentsCommand = {
12
12
  .option('--config <path>', 'conductor config path')
13
13
  .action(async (options) => {
14
14
  const config = await loadConductorConfig(resolveConfigPath(options.config));
15
- process.stdout.write(`${JSON.stringify(agentReport(config), null, 2)}\n`);
15
+ const file = loadSecretsFile();
16
+ const isSet = (name) => Boolean(process.env[name] || file[name]);
17
+ process.stdout.write(`${JSON.stringify(agentReport(config, isSet), null, 2)}\n`);
16
18
  });
17
19
  },
18
20
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bakers-build/addon-agents",
3
- "version": "0.10.1-next.10",
3
+ "version": "0.10.1-next.12",
4
4
  "description": "Locally resolved agent catalog for conductor operators and qualification.",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -25,11 +25,11 @@
25
25
  "commander": "^12.1.0"
26
26
  },
27
27
  "peerDependencies": {
28
- "@bakers-build/conductor": "^0.10.1-next.10",
29
- "@bakers-build/core": "^0.10.1-next.10"
28
+ "@bakers-build/conductor": "^0.10.1-next.12",
29
+ "@bakers-build/core": "^0.10.1-next.12"
30
30
  },
31
31
  "bakersBuild": {
32
- "commit": "d0f650fbe4c44eda2a26be62d28d30c22c56c386",
32
+ "commit": "460f5570442a0b09af52a1d4450b879075302e57",
33
33
  "channel": "next"
34
34
  }
35
35
  }